@templatical/editor 0.8.0 → 0.8.2
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-B74X6tIx.js → AiChatSidebar-CXpsSTbt.js} +13 -13
- package/dist/{AiFeatureMenu-BOxQqkn9.js → AiFeatureMenu-CBtADSlv.js} +7 -7
- package/dist/{BlockIssueBadge-DJTiT1eF.js → BlockIssueBadge-FEuyG1p0.js} +5 -5
- package/dist/{CloudEditor-BzCVDD6e.js → CloudEditor-C5iH4_HX.js} +19 -19
- package/dist/{CollaboratorBar-Cb-c1IkS.js → CollaboratorBar-Bqp1kjPK.js} +4 -4
- package/dist/{CommentsSidebar-Qvppl-DR.js → CommentsSidebar-DaWP5ZGl.js} +12 -12
- package/dist/{CountdownBlock-D0IiMliC.js → CountdownBlock-C51M6s-J.js} +3 -3
- package/dist/{CountdownToolbar-BVVT8U5C.js → CountdownToolbar-C2QkG8S0.js} +3 -3
- package/dist/{DesignReferenceSidebar-ucgtoDll.js → DesignReferenceSidebar-BwIRFmpA.js} +9 -9
- package/dist/{IssuesPanel-XVdvrgmq.js → IssuesPanel-B6ukjc1i.js} +8 -8
- package/dist/{LoadingTrack-CFkDkjBb.js → LoadingTrack-CZ6tO326.js} +1 -1
- package/dist/{ModuleBrowserModal-BotDsZ0R.js → ModuleBrowserModal-DvhbtQ5Q.js} +11 -11
- package/dist/{ModulePreviewCanvas-CDg4MnJP.js → ModulePreviewCanvas-DJbx-ARl.js} +3 -3
- package/dist/{NumberWithSuffix-n-cr7lpU.js → NumberWithSuffix-wOM0319c.js} +3 -3
- package/dist/{ParagraphEditor-CfzIUFQ_.js → ParagraphEditor-DcVQcYUK.js} +25 -25
- package/dist/{RichTextEditorContent-Cu9NEkKd.js → RichTextEditorContent-C02UzFoS.js} +6 -6
- package/dist/{SaveModuleDialog-DuzfCamG.js → SaveModuleDialog-C0Hcbpfe.js} +7 -7
- package/dist/{SnapshotHistory-DiAPOSDM.js → SnapshotHistory-ByXaMG1n.js} +9 -9
- package/dist/{TemplateScoringPanel-BzDVdfOx.js → TemplateScoringPanel-BpQgtaDl.js} +14 -14
- package/dist/{TestEmailModal-D5I5Mgtb.js → TestEmailModal-Rdi8WxSm.js} +5 -5
- package/dist/{TitleEditor-CZUkhtDo.js → TitleEditor-CT4asLZe.js} +12 -12
- package/dist/{TplModal-CVq2BAIW.js → TplModal-anuE6Hb0.js} +4 -4
- package/dist/{blockTypeIcons-CJNuGjLX.js → blockTypeIcons-8MdDzKgP.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-DtrT-aFR.js → AiFeatureMenu-B2lX_OPX.js} +3 -3
- package/dist/cdn/chunks/{AiFeatureMenu-DtrT-aFR.js.map → AiFeatureMenu-B2lX_OPX.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-w7n4orSd.js → BlockIssueBadge-CrmWF2hu.js} +3 -3
- package/dist/cdn/chunks/{BlockIssueBadge-w7n4orSd.js.map → BlockIssueBadge-CrmWF2hu.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-CwG0DhG1.js → CloudEditor-Do4-w8x5.js} +8 -8
- package/dist/cdn/chunks/{CloudEditor-CwG0DhG1.js.map → CloudEditor-Do4-w8x5.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-DYjZaz7H.js → CollaboratorBar-Xmam6lHp.js} +4 -4
- package/dist/cdn/chunks/{CollaboratorBar-DYjZaz7H.js.map → CollaboratorBar-Xmam6lHp.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CFR8VJCU.js → CountdownBlock-DadDprcu.js} +3 -3
- package/dist/cdn/chunks/{CountdownBlock-CFR8VJCU.js.map → CountdownBlock-DadDprcu.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-DOrQCH57.js → CountdownToolbar-qQC07x3l.js} +4 -4
- package/dist/cdn/chunks/{CountdownToolbar-DOrQCH57.js.map → CountdownToolbar-qQC07x3l.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-C54PhBgc.js → IssuesPanel-DWoYjpo4.js} +4 -4
- package/dist/cdn/chunks/{IssuesPanel-C54PhBgc.js.map → IssuesPanel-DWoYjpo4.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-4V6um-AC.js → ModuleBrowserModal-BQ2-bR4y.js} +6 -6
- package/dist/cdn/chunks/{ModuleBrowserModal-4V6um-AC.js.map → ModuleBrowserModal-BQ2-bR4y.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-DL8zI6VX.js → ModulePreviewCanvas-B57d9ZNW.js} +3 -3
- package/dist/cdn/chunks/{ModulePreviewCanvas-DL8zI6VX.js.map → ModulePreviewCanvas-B57d9ZNW.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-avXrYDo6.js → NumberWithSuffix-CJFH3eNR.js} +3 -3
- package/dist/cdn/chunks/{NumberWithSuffix-avXrYDo6.js.map → NumberWithSuffix-CJFH3eNR.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-Cpmy85zL.js → ParagraphEditor-DPFK_KjR.js} +19 -19
- package/dist/cdn/chunks/{ParagraphEditor-Cpmy85zL.js.map → ParagraphEditor-DPFK_KjR.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-CFL-Lrv5.js → RichTextEditorContent-frc9A4J9.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-CFL-Lrv5.js.map → RichTextEditorContent-frc9A4J9.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-D6szy5vX.js → SaveModuleDialog-OgP9rNwp.js} +3 -3
- package/dist/cdn/chunks/{SaveModuleDialog-D6szy5vX.js.map → SaveModuleDialog-OgP9rNwp.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-CSDdss38.js → TitleEditor-DZ_v-LQC.js} +9 -9
- package/dist/cdn/chunks/{TitleEditor-CSDdss38.js.map → TitleEditor-DZ_v-LQC.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-BEdpG8xl.js → blockTypeIcons-DYAslSVB.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-BEdpG8xl.js.map → blockTypeIcons-DYAslSVB.js.map} +1 -1
- package/dist/cdn/chunks/de-BBEGQDsd.js.map +1 -1
- package/dist/cdn/chunks/de-DG1WWVXM.js.map +1 -1
- package/dist/cdn/chunks/de-RQrZR56a.js.map +1 -1
- package/dist/cdn/chunks/{draggable-P6QWzy4g.js → draggable-CLpL3kf8.js} +6 -6
- package/dist/cdn/chunks/draggable-CLpL3kf8.js.map +1 -0
- package/dist/cdn/chunks/emojiData-EMFlj6FJ.js.map +1 -1
- package/dist/cdn/chunks/en-BE6OV83-.js.map +1 -1
- package/dist/cdn/chunks/en-Bl1ecfRF.js.map +1 -1
- package/dist/cdn/chunks/en-CHha-_ta.js.map +1 -1
- package/dist/cdn/chunks/{extensions-DgvvgeJU.js → extensions-IwIDJ7T-.js} +4 -4
- package/dist/cdn/chunks/{extensions-DgvvgeJU.js.map → extensions-IwIDJ7T-.js.map} +1 -1
- package/dist/cdn/chunks/{features-CgTy87Ni.js → features-svfaXiyQ.js} +663 -645
- package/dist/cdn/chunks/features-svfaXiyQ.js.map +1 -0
- package/dist/cdn/chunks/{icons-DxJ--AJb.js → icons-BWmUvlwk.js} +12 -12
- package/dist/cdn/chunks/{icons-DxJ--AJb.js.map → icons-BWmUvlwk.js.map} +1 -1
- package/dist/cdn/chunks/{liquid.browser-lQbkge2E.js → liquid.browser-cpFt-Vmw.js} +674 -612
- package/dist/cdn/chunks/liquid.browser-cpFt-Vmw.js.map +1 -0
- package/dist/cdn/chunks/{media-library-Byh_BbTm.js → media-library-DyxGPQvA.js} +6 -5
- package/dist/cdn/chunks/{media-library-Byh_BbTm.js.map → media-library-DyxGPQvA.js.map} +1 -1
- package/dist/cdn/chunks/pt-BR-BYRTP5Ww.js.map +1 -1
- package/dist/cdn/chunks/pt-BR-CFomv2R8.js.map +1 -1
- package/dist/cdn/chunks/pt-BR-CQl2JxRp.js.map +1 -1
- package/dist/cdn/chunks/pusher-bjpcqCZG.js.map +1 -1
- package/dist/cdn/chunks/quality-DLJBm0Sf.js +2140 -0
- package/dist/cdn/chunks/quality-DLJBm0Sf.js.map +1 -0
- package/dist/cdn/chunks/readableTextColor-DhoK4XiZ.js.map +1 -1
- package/dist/cdn/chunks/{renderer-DttVILgu.js → renderer-BDRxApzE.js} +11 -5
- package/dist/cdn/chunks/{renderer-DttVILgu.js.map → renderer-BDRxApzE.js.map} +1 -1
- package/dist/cdn/chunks/{src-a8fYhBi5.js → src-DBcvijiJ.js} +5 -5
- package/dist/cdn/chunks/{src-a8fYhBi5.js.map → src-DBcvijiJ.js.map} +1 -1
- package/dist/cdn/chunks/styleConstants-DP1VOca8.js.map +1 -1
- package/dist/cdn/chunks/{styles-8qDRQ-6n.js → styles--HrprHTR.js} +17 -17
- package/dist/cdn/chunks/{styles-8qDRQ-6n.js.map → styles--HrprHTR.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-BwTCLVWl.js → tiptap-BCvhHXDe.js} +711 -692
- package/dist/cdn/chunks/tiptap-BCvhHXDe.js.map +1 -0
- package/dist/cdn/editor.js +6 -6
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-BF4bEbCU.js → check-DwVS7v3N.js} +1 -1
- package/dist/{chevron-down-4NzWtv6Y.js → chevron-down-CytfFjil.js} +1 -1
- package/dist/{circle-alert-CPIth9bC.js → circle-alert-9J8Q4fwU.js} +1 -1
- package/dist/{clock-B9-ct9r_.js → clock-CL2fYWmc.js} +1 -1
- package/dist/{cloud-k0DgeCo2.js → cloud-DHsOqOnH.js} +1 -1
- package/dist/{createLucideIcon-Di4mqmGn.js → createLucideIcon-DTECxBv6.js} +4 -4
- package/dist/{dist-DVwOAodp.js → dist-3RAjjDZq.js} +2 -2
- package/dist/{dist-hfu7I2rO.js → dist-B5FKze93.js} +375 -353
- package/dist/dist-BWVK8w_m.js +5 -0
- package/dist/{dist-CISFttkF.js → dist-BjSjVZRA.js} +2 -2
- package/dist/{dist-DD-9hatO.js → dist-BoGj0ys1.js} +8 -8
- package/dist/{dist-BzRLLpfq.js → dist-CkhqaMca.js} +6 -5
- package/dist/{dist-U5guDm2w.js → dist-D8IxYzaU.js} +125 -125
- package/dist/{dist-B2jcQhv8.js → dist-DPiqL9q5.js} +17 -17
- package/dist/{dist-v8h02hhE.js → dist-DgD8K8y0.js} +2 -2
- package/dist/{dist-DxD1kSdH.js → dist-DiYYRj9J.js} +22 -48
- package/dist/{dist-CQQS9SRN.js → dist-DpF3BN6Y.js} +85 -62
- package/dist/dist-UekZXGFH.js +5 -0
- package/dist/{dist-DUvhjQ2-.js → dist-qFGe50Kc.js} +2 -2
- package/dist/{extensions-C-FpnfJn.js → extensions-BTheidN4.js} +19 -19
- package/dist/{image-up-CubAveUO.js → image-up-YgXg9o1y.js} +1 -1
- package/dist/index.d.ts +39 -92
- package/dist/{info-DiINxXfZ.js → info-W-213KLD.js} +1 -1
- package/dist/{keys-CY3tkCsv.js → keys-XS_XrjqL.js} +1 -1
- package/dist/{liquid.browser-DX8ZHRdq.js → liquid.browser-Dc30h4PN.js} +673 -611
- package/dist/{list-checks-CMtEXe9l.js → list-checks-BQrZlWzC.js} +1 -1
- package/dist/{loader-circle-_9bP23op.js → loader-circle-BQPHssrF.js} +1 -1
- package/dist/{message-circle-gzy2ZGJ3.js → message-circle-iMgHXBeH.js} +1 -1
- package/dist/{refresh-cw-C9_M6yB3.js → refresh-cw-DFozdLYp.js} +1 -1
- package/dist/{scan-line-DUEg6DoT.js → scan-line-D3NN0Gre.js} +1 -1
- package/dist/{send-BatIZC9a.js → send-DBhq0GU2.js} +1 -1
- package/dist/{shield-check-C5Gv2cM1.js → shield-check-DquM3-E5.js} +1 -1
- package/dist/{sparkles-D1IGi_cC.js → sparkles-CTGknLJy.js} +1 -1
- package/dist/{styles-Ci7RdimQ.js → styles-BUp0dVGV.js} +33 -33
- package/dist/templatical-editor.js +4 -4
- package/dist/{text-align-start-DG3aAH7Y.js → text-align-end-BPOHCD7K.js} +11 -11
- package/dist/{trash-2-424iqbpN.js → trash-2-VyX2kcG0.js} +1 -1
- package/dist/{triangle-alert-DWQySIE2.js → triangle-alert-HIqW9Hwv.js} +1 -1
- package/dist/{useAliveFlag-D8GoB4VE.js → useAliveFlag-t3e0dokQ.js} +1 -1
- package/dist/{useCloudI18n-BPUHj2CZ.js → useCloudI18n-oETj4WiF.js} +2 -2
- package/dist/{useEditorCore-DT3VrvZS.js → useEditorCore-CJB2x6Ts.js} +719 -716
- package/dist/{useI18n-CWX9ZTCW.js → useI18n-tMHqPsE4.js} +2 -2
- package/dist/{useMergeTag-B3F9VR04.js → useMergeTag-Bv8ASt6n.js} +2 -2
- package/dist/usePopoverRoot-Bs6kLsI3.js +8 -0
- package/dist/{vue.runtime.esm-bundler-Bxqkjqhc.js → vue.runtime.esm-bundler-xiAB6UTz.js} +15 -12
- package/dist/{x-Dlaenqta.js → x-C1j-AamY.js} +1 -1
- package/package.json +33 -34
- package/dist/cdn/chunks/draggable-P6QWzy4g.js.map +0 -1
- package/dist/cdn/chunks/features-CgTy87Ni.js.map +0 -1
- package/dist/cdn/chunks/liquid.browser-lQbkge2E.js.map +0 -1
- package/dist/cdn/chunks/quality-CHCEMG8e.js +0 -1846
- package/dist/cdn/chunks/quality-CHCEMG8e.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BwTCLVWl.js.map +0 -1
- package/dist/dist-BYt3jdCR.js +0 -5
- package/dist/dist-CfQPBf15.js +0 -5
- package/dist/usePopoverRoot-BKJcxsst.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../node_modules/.pnpm/liquidjs@10.
|
|
1
|
+
//#region ../../node_modules/.pnpm/liquidjs@10.27.0/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;
|
|
@@ -91,8 +91,7 @@ function le(e, t, n = " ") {
|
|
|
91
91
|
function ue(e, t, n, r) {
|
|
92
92
|
e = String(e);
|
|
93
93
|
let i = t - e.length;
|
|
94
|
-
|
|
95
|
-
return e;
|
|
94
|
+
return i <= 0 ? e : r(e, n.repeat(i));
|
|
96
95
|
}
|
|
97
96
|
function de(e) {
|
|
98
97
|
return e;
|
|
@@ -109,17 +108,17 @@ function me(e, t) {
|
|
|
109
108
|
function he(e, t) {
|
|
110
109
|
return p(e) && p(t) ? 0 : p(e) ? 1 : p(t) || (e = r.call(e), t = r.call(t), e < t) ? -1 : +(e > t);
|
|
111
110
|
}
|
|
112
|
-
function
|
|
111
|
+
function _(e) {
|
|
113
112
|
return function(...t) {
|
|
114
113
|
return e.call(this, ...t.map(f));
|
|
115
114
|
};
|
|
116
115
|
}
|
|
117
|
-
function
|
|
116
|
+
function v(e) {
|
|
118
117
|
return function(...t) {
|
|
119
118
|
return e.call(this, ...t.map(ee));
|
|
120
119
|
};
|
|
121
120
|
}
|
|
122
|
-
function*
|
|
121
|
+
function* ge(e) {
|
|
123
122
|
let t = /* @__PURE__ */ new Set();
|
|
124
123
|
for (let n of e) {
|
|
125
124
|
let e = JSON.stringify(n);
|
|
@@ -614,8 +613,9 @@ var nt = {
|
|
|
614
613
|
m: (e) => e.getMonth() + 1,
|
|
615
614
|
M: (e) => e.getMinutes(),
|
|
616
615
|
N: (e, t) => {
|
|
617
|
-
|
|
618
|
-
|
|
616
|
+
var n;
|
|
617
|
+
let r = Number(t.width) || 9, i = String(e.getMilliseconds()).slice(0, r);
|
|
618
|
+
return (n = t.memoryLimit) == null || n.use(r - i.length), le(i, r, "0");
|
|
619
619
|
},
|
|
620
620
|
p: (e) => e.getHours() < 12 ? "AM" : "PM",
|
|
621
621
|
P: (e) => e.getHours() < 12 ? "am" : "pm",
|
|
@@ -637,27 +637,28 @@ var nt = {
|
|
|
637
637
|
"%": () => "%"
|
|
638
638
|
};
|
|
639
639
|
nt.h = nt.b;
|
|
640
|
-
function
|
|
641
|
-
let
|
|
642
|
-
for (;
|
|
643
|
-
return
|
|
644
|
-
}
|
|
645
|
-
function
|
|
646
|
-
let [
|
|
647
|
-
if (!
|
|
648
|
-
let
|
|
649
|
-
for (let e of
|
|
650
|
-
let
|
|
651
|
-
flags:
|
|
652
|
-
width:
|
|
653
|
-
modifier:
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
640
|
+
function rt(e, t, n) {
|
|
641
|
+
let r = "", i = t, a;
|
|
642
|
+
for (; a = Ke.exec(i);) r += i.slice(0, a.index), i = i.slice(a.index + a[0].length), r += it(e, a, n);
|
|
643
|
+
return r + i;
|
|
644
|
+
}
|
|
645
|
+
function it(e, t, n) {
|
|
646
|
+
let [r, i = "", a, o, s] = t, c = nt[s];
|
|
647
|
+
if (!c) return r;
|
|
648
|
+
let l = {};
|
|
649
|
+
for (let e of i) l[e] = !0;
|
|
650
|
+
let u = String(c(e, {
|
|
651
|
+
flags: l,
|
|
652
|
+
width: a,
|
|
653
|
+
modifier: o,
|
|
654
|
+
memoryLimit: n
|
|
655
|
+
})), d = et.has(s) ? " " : "0", f = a || $e[s] || 0;
|
|
656
|
+
return l["^"] ? u = u.toUpperCase() : l["#"] && (u = fe(u)), l._ ? d = " " : l[0] && (d = "0"), l["-"] && (f = 0), n?.use(Number(f) - u.length), g(u, f, d);
|
|
657
|
+
}
|
|
658
|
+
function at() {
|
|
658
659
|
return typeof Intl < "u" ? Intl.DateTimeFormat : void 0;
|
|
659
660
|
}
|
|
660
|
-
var
|
|
661
|
+
var ot = 6e4, st = /([zZ]|([+-])(\d{2}):?(\d{2}))$/, ct = [
|
|
661
662
|
"January",
|
|
662
663
|
"February",
|
|
663
664
|
"March",
|
|
@@ -670,7 +671,7 @@ var at = 6e4, ot = /([zZ]|([+-])(\d{2}):?(\d{2}))$/, st = [
|
|
|
670
671
|
"October",
|
|
671
672
|
"November",
|
|
672
673
|
"December"
|
|
673
|
-
],
|
|
674
|
+
], lt = ct.map((e) => e.slice(0, 3)), ut = [
|
|
674
675
|
"Sunday",
|
|
675
676
|
"Monday",
|
|
676
677
|
"Tuesday",
|
|
@@ -678,10 +679,10 @@ var at = 6e4, ot = /([zZ]|([+-])(\d{2}):?(\d{2}))$/, st = [
|
|
|
678
679
|
"Thursday",
|
|
679
680
|
"Friday",
|
|
680
681
|
"Saturday"
|
|
681
|
-
],
|
|
682
|
+
], dt = ut.map((e) => e.slice(0, 3)), k = class e {
|
|
682
683
|
constructor(t, n, r) {
|
|
683
|
-
this.locale = n, this.DateTimeFormat =
|
|
684
|
-
let i = (this.date.getTimezoneOffset() - this.timezoneOffset) *
|
|
684
|
+
this.locale = n, this.DateTimeFormat = at(), 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 : "";
|
|
685
|
+
let i = (this.date.getTimezoneOffset() - this.timezoneOffset) * ot, o = this.date.getTime() + i;
|
|
685
686
|
this.displayDate = new Date(o);
|
|
686
687
|
}
|
|
687
688
|
getTime() {
|
|
@@ -728,16 +729,16 @@ var at = 6e4, ot = /([zZ]|([+-])(\d{2}):?(\d{2}))$/, st = [
|
|
|
728
729
|
if (this.DateTimeFormat) return this.DateTimeFormat().resolvedOptions().timeZone;
|
|
729
730
|
}
|
|
730
731
|
getLongMonthName() {
|
|
731
|
-
return this.format({ month: "long" }) ??
|
|
732
|
+
return this.format({ month: "long" }) ?? ct[this.getMonth()];
|
|
732
733
|
}
|
|
733
734
|
getShortMonthName() {
|
|
734
|
-
return this.format({ month: "short" }) ??
|
|
735
|
+
return this.format({ month: "short" }) ?? lt[this.getMonth()];
|
|
735
736
|
}
|
|
736
737
|
getLongWeekdayName() {
|
|
737
|
-
return this.format({ weekday: "long" }) ??
|
|
738
|
+
return this.format({ weekday: "long" }) ?? ut[this.displayDate.getDay()];
|
|
738
739
|
}
|
|
739
740
|
getShortWeekdayName() {
|
|
740
|
-
return this.format({ weekday: "short" }) ??
|
|
741
|
+
return this.format({ weekday: "short" }) ?? dt[this.displayDate.getDay()];
|
|
741
742
|
}
|
|
742
743
|
valid() {
|
|
743
744
|
return !isNaN(this.getTime());
|
|
@@ -746,7 +747,7 @@ var at = 6e4, ot = /([zZ]|([+-])(\d{2}):?(\d{2}))$/, st = [
|
|
|
746
747
|
return this.DateTimeFormat && this.DateTimeFormat(this.locale, e).format(this.displayDate);
|
|
747
748
|
}
|
|
748
749
|
static createDateFixedToTimezone(t, n) {
|
|
749
|
-
let r = t.match(
|
|
750
|
+
let r = t.match(st);
|
|
750
751
|
if (r && r[1] === "Z") return new e(+new Date(t), n, 0);
|
|
751
752
|
if (r && r[2] && r[3] && r[4]) {
|
|
752
753
|
let [, , i, a, o] = r, s = (i === "+" ? -1 : 1) * (parseInt(a, 10) * 60 + parseInt(o, 10));
|
|
@@ -758,7 +759,7 @@ var at = 6e4, ot = /([zZ]|([+-])(\d{2}):?(\d{2}))$/, st = [
|
|
|
758
759
|
let n = t.toLocaleString("en-US", { timeZone: e }), r = t.toLocaleString("en-US", { timeZone: "UTC" }), i = new Date(n);
|
|
759
760
|
return (new Date(r) - +i) / (60 * 1e3);
|
|
760
761
|
}
|
|
761
|
-
},
|
|
762
|
+
}, ft = class {
|
|
762
763
|
constructor(e, t) {
|
|
763
764
|
this.base = 0, this.message = `${e} limit exceeded`, this.limit = t;
|
|
764
765
|
}
|
|
@@ -768,7 +769,7 @@ var at = 6e4, ot = /([zZ]|([+-])(\d{2}):?(\d{2}))$/, st = [
|
|
|
768
769
|
check(e) {
|
|
769
770
|
+e > 0 && C(+e <= this.limit, this.message);
|
|
770
771
|
}
|
|
771
|
-
},
|
|
772
|
+
}, pt = class extends e {
|
|
772
773
|
constructor(e, [t, n], r, i, a, o, s, c) {
|
|
773
774
|
super(e, r, i, a, c), this.trimLeft = !1, this.trimRight = !1;
|
|
774
775
|
let l = r[t] === "-", u = r[n - 1] === "-", d = l ? t + 1 : t, f = u ? n - 1 : n;
|
|
@@ -779,36 +780,36 @@ var at = 6e4, ot = /([zZ]|([+-])(\d{2}):?(\d{2}))$/, st = [
|
|
|
779
780
|
get content() {
|
|
780
781
|
return this.input.slice(this.contentRange[0], this.contentRange[1]);
|
|
781
782
|
}
|
|
782
|
-
},
|
|
783
|
+
}, mt = class extends pt {
|
|
783
784
|
constructor(e, t, n, r, i) {
|
|
784
785
|
let { trimTagLeft: a, trimTagRight: o, tagDelimiterLeft: s, tagDelimiterRight: c } = r, [l, u] = [t + s.length, n - c.length];
|
|
785
|
-
super(
|
|
786
|
+
super(q.Tag, [l, u], e, t, n, a, o, i), this.tokenizer = new I(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]);
|
|
786
787
|
}
|
|
787
|
-
},
|
|
788
|
+
}, ht = class extends pt {
|
|
788
789
|
constructor(e, t, n, r, i) {
|
|
789
790
|
let { trimOutputLeft: a, trimOutputRight: o, outputDelimiterLeft: s, outputDelimiterRight: c } = r, l = [t + s.length, n - c.length];
|
|
790
|
-
super(
|
|
791
|
+
super(q.Output, l, e, t, n, a, o, i);
|
|
791
792
|
}
|
|
792
|
-
},
|
|
793
|
+
}, gt = class extends e {
|
|
793
794
|
constructor(e, t, n, r) {
|
|
794
|
-
super(
|
|
795
|
+
super(q.HTML, e, t, n, r), this.input = e, this.begin = t, this.end = n, this.file = r, this.trimLeft = 0, this.trimRight = 0;
|
|
795
796
|
}
|
|
796
797
|
getContent() {
|
|
797
798
|
return this.input.slice(this.begin + this.trimLeft, this.end - this.trimRight);
|
|
798
799
|
}
|
|
799
|
-
}, gt = class extends e {
|
|
800
|
-
constructor(e, t, n, r) {
|
|
801
|
-
super(J.Number, e, t, n, r), this.input = e, this.begin = t, this.end = n, this.file = r, this.content = Number(this.getText());
|
|
802
|
-
}
|
|
803
800
|
}, _t = class extends e {
|
|
804
801
|
constructor(e, t, n, r) {
|
|
805
|
-
super(
|
|
802
|
+
super(q.Number, e, t, n, r), this.input = e, this.begin = t, this.end = n, this.file = r, this.content = Number(this.getText());
|
|
806
803
|
}
|
|
807
804
|
}, vt = class extends e {
|
|
808
805
|
constructor(e, t, n, r) {
|
|
809
|
-
super(
|
|
806
|
+
super(q.Word, e, t, n, r), this.input = e, this.begin = t, this.end = n, this.file = r, this.content = this.getText();
|
|
810
807
|
}
|
|
811
|
-
}, yt = {
|
|
808
|
+
}, yt = class extends e {
|
|
809
|
+
constructor(e, t, n, r) {
|
|
810
|
+
super(q.Literal, e, t, n, r), this.input = e, this.begin = t, this.end = n, this.file = r, this.literal = this.getText(), this.content = He[this.literal];
|
|
811
|
+
}
|
|
812
|
+
}, bt = {
|
|
812
813
|
"==": 2,
|
|
813
814
|
"!=": 2,
|
|
814
815
|
">": 2,
|
|
@@ -819,7 +820,7 @@ var at = 6e4, ot = /([zZ]|([+-])(\d{2}):?(\d{2}))$/, st = [
|
|
|
819
820
|
not: 1,
|
|
820
821
|
and: 0,
|
|
821
822
|
or: 0
|
|
822
|
-
},
|
|
823
|
+
}, xt = {
|
|
823
824
|
"==": 0,
|
|
824
825
|
"!=": 0,
|
|
825
826
|
">": 0,
|
|
@@ -830,27 +831,27 @@ var at = 6e4, ot = /([zZ]|([+-])(\d{2}):?(\d{2}))$/, st = [
|
|
|
830
831
|
not: 1,
|
|
831
832
|
and: 0,
|
|
832
833
|
or: 0
|
|
833
|
-
},
|
|
834
|
+
}, St = class extends e {
|
|
834
835
|
constructor(e, t, n, r) {
|
|
835
|
-
super(
|
|
836
|
+
super(q.Operator, e, t, n, r), this.input = e, this.begin = t, this.end = n, this.file = r, this.operator = this.getText();
|
|
836
837
|
}
|
|
837
838
|
getPrecedence() {
|
|
838
839
|
let e = this.getText();
|
|
839
|
-
return e in
|
|
840
|
-
}
|
|
841
|
-
}, St = class extends e {
|
|
842
|
-
constructor(e, t, n, r, i, a) {
|
|
843
|
-
super(J.PropertyAccess, n, r, i, a), this.variable = e, this.props = t;
|
|
840
|
+
return e in bt ? bt[e] : 1;
|
|
844
841
|
}
|
|
845
842
|
}, Ct = class extends e {
|
|
846
843
|
constructor(e, t, n, r, i, a) {
|
|
847
|
-
super(
|
|
844
|
+
super(q.PropertyAccess, n, r, i, a), this.variable = e, this.props = t;
|
|
848
845
|
}
|
|
849
846
|
}, wt = class extends e {
|
|
850
847
|
constructor(e, t, n, r, i, a) {
|
|
851
|
-
super(
|
|
848
|
+
super(q.Filter, n, r, i, a), this.name = e, this.args = t;
|
|
852
849
|
}
|
|
853
|
-
}, Tt =
|
|
850
|
+
}, Tt = class extends e {
|
|
851
|
+
constructor(e, t, n, r, i, a) {
|
|
852
|
+
super(q.Hash, e, t, n, a), this.input = e, this.begin = t, this.end = n, this.name = r, this.value = i, this.file = a;
|
|
853
|
+
}
|
|
854
|
+
}, Et = /[\da-fA-F]/, Dt = /[0-7]/, Ot = {
|
|
854
855
|
b: "\b",
|
|
855
856
|
f: "\f",
|
|
856
857
|
n: "\n",
|
|
@@ -858,64 +859,64 @@ var at = 6e4, ot = /([zZ]|([+-])(\d{2}):?(\d{2}))$/, st = [
|
|
|
858
859
|
t: " ",
|
|
859
860
|
v: "\v"
|
|
860
861
|
};
|
|
861
|
-
function
|
|
862
|
+
function kt(e) {
|
|
862
863
|
let t = e.charCodeAt(0);
|
|
863
864
|
return t >= 97 ? t - 87 : t >= 65 ? t - 55 : t - 48;
|
|
864
865
|
}
|
|
865
|
-
function
|
|
866
|
+
function At(e) {
|
|
866
867
|
let t = "";
|
|
867
868
|
for (let n = 1; n < e.length - 1; n++) {
|
|
868
869
|
if (e[n] !== "\\") {
|
|
869
870
|
t += e[n];
|
|
870
871
|
continue;
|
|
871
872
|
}
|
|
872
|
-
if (
|
|
873
|
+
if (Ot[e[n + 1]] !== void 0) t += Ot[e[++n]];
|
|
873
874
|
else if (e[n + 1] === "u") {
|
|
874
875
|
let r = 0, i = n + 2;
|
|
875
|
-
for (; i <= n + 5 &&
|
|
876
|
+
for (; i <= n + 5 && Et.test(e[i]);) r = r * 16 + kt(e[i++]);
|
|
876
877
|
n = i - 1, t += String.fromCharCode(r);
|
|
877
|
-
} else if (!
|
|
878
|
+
} else if (!Dt.test(e[n + 1])) t += e[++n];
|
|
878
879
|
else {
|
|
879
880
|
let r = n + 1, i = 0;
|
|
880
|
-
for (; r <= n + 3 &&
|
|
881
|
+
for (; r <= n + 3 && Dt.test(e[r]);) i = i * 8 + kt(e[r++]);
|
|
881
882
|
n = r - 1, t += String.fromCharCode(i);
|
|
882
883
|
}
|
|
883
884
|
}
|
|
884
885
|
return t;
|
|
885
886
|
}
|
|
886
|
-
var
|
|
887
|
+
var jt = class extends e {
|
|
887
888
|
constructor(e, t, n, r) {
|
|
888
|
-
super(
|
|
889
|
+
super(q.Quoted, e, t, n, r), this.input = e, this.begin = t, this.end = n, this.file = r, this.content = At(this.getText());
|
|
889
890
|
}
|
|
890
|
-
},
|
|
891
|
+
}, Mt = class extends e {
|
|
891
892
|
constructor(e, t, n, r, i, a) {
|
|
892
|
-
super(
|
|
893
|
+
super(q.Range, e, t, n, a), this.input = e, this.begin = t, this.end = n, this.lhs = r, this.rhs = i, this.file = a;
|
|
893
894
|
}
|
|
894
|
-
},
|
|
895
|
+
}, Nt = class extends pt {
|
|
895
896
|
constructor(e, t, n, r, i) {
|
|
896
|
-
super(
|
|
897
|
+
super(q.Tag, [t, n], e, t, n, !1, !1, i), this.tokenizer = new I(e, r.operators, i, this.contentRange), this.name = this.tokenizer.readTagName(), this.tokenizer.assert(this.name, "illegal liquid tag syntax"), this.tokenizer.skipBlank();
|
|
897
898
|
}
|
|
898
899
|
get args() {
|
|
899
900
|
return this.tokenizer.input.slice(this.tokenizer.p, this.contentRange[1]);
|
|
900
901
|
}
|
|
901
|
-
},
|
|
902
|
+
}, Pt = class extends e {
|
|
902
903
|
constructor(e, t, n, r, i, a) {
|
|
903
|
-
super(
|
|
904
|
+
super(q.FilteredValue, n, r, i, a), this.initial = e, this.filters = t, this.input = n, this.begin = r, this.end = i, this.file = a;
|
|
904
905
|
}
|
|
905
|
-
},
|
|
906
|
-
function
|
|
907
|
-
return typeof global == "object" && global.performance || typeof window == "object" && window.performance ||
|
|
906
|
+
}, Ft = { now: () => Date.now() };
|
|
907
|
+
function It() {
|
|
908
|
+
return typeof global == "object" && global.performance || typeof window == "object" && window.performance || Ft;
|
|
908
909
|
}
|
|
909
|
-
var
|
|
910
|
+
var Lt = class {
|
|
910
911
|
renderTemplatesToNodeStream(e, t) {
|
|
911
912
|
let n = new Re();
|
|
912
913
|
return Promise.resolve().then(() => D(this.renderTemplates(e, t, n))).then(() => n.end(), (e) => n.error(e)), n.stream;
|
|
913
914
|
}
|
|
914
915
|
*renderTemplates(e, t, n) {
|
|
915
|
-
n ||= t.opts.keepOutputType ? new ze() : new Le();
|
|
916
|
+
n ||= t.opts.keepOutputType ? new ze() : new Le(), t.renderLimit.check(It().now());
|
|
916
917
|
let r = [];
|
|
917
918
|
for (let i of e) {
|
|
918
|
-
t.renderLimit.check(
|
|
919
|
+
t.renderLimit.check(It().now());
|
|
919
920
|
try {
|
|
920
921
|
let e = yield i.render(t, n);
|
|
921
922
|
if (e && n.write(e), t.breakCalled || t.continueCalled) break;
|
|
@@ -928,41 +929,41 @@ var It = class {
|
|
|
928
929
|
if (r.length) throw new xe(r);
|
|
929
930
|
return n.buffer;
|
|
930
931
|
}
|
|
931
|
-
},
|
|
932
|
+
}, Rt = class {
|
|
932
933
|
constructor(e) {
|
|
933
|
-
this.postfix = [...
|
|
934
|
+
this.postfix = [...Ht(e)];
|
|
934
935
|
}
|
|
935
936
|
*evaluate(e, t) {
|
|
936
937
|
C(e, "unable to evaluate: context not defined");
|
|
937
938
|
let n = [];
|
|
938
|
-
for (let r of this.postfix) if (
|
|
939
|
+
for (let r of this.postfix) if (Bn(r)) {
|
|
939
940
|
let t = n.pop(), i;
|
|
940
|
-
if (
|
|
941
|
+
if (xt[r.operator] === 1) i = yield e.opts.operators[r.operator](t, e);
|
|
941
942
|
else {
|
|
942
943
|
let a = n.pop();
|
|
943
944
|
i = yield e.opts.operators[r.operator](a, t, e);
|
|
944
945
|
}
|
|
945
946
|
n.push(i);
|
|
946
|
-
} else n.push(yield
|
|
947
|
+
} else n.push(yield A(r, e, t));
|
|
947
948
|
return n[0];
|
|
948
949
|
}
|
|
949
950
|
valid() {
|
|
950
951
|
return !!this.postfix.length;
|
|
951
952
|
}
|
|
952
953
|
};
|
|
953
|
-
function*
|
|
954
|
+
function* A(e, t, n = !1) {
|
|
954
955
|
if (e) {
|
|
955
956
|
if ("content" in e) return e.content;
|
|
956
|
-
if (
|
|
957
|
-
if (
|
|
957
|
+
if (Gn(e)) return yield zt(e, t, n);
|
|
958
|
+
if (qn(e)) return yield Vt(e, t);
|
|
958
959
|
}
|
|
959
960
|
}
|
|
960
|
-
function*
|
|
961
|
+
function* zt(e, t, n) {
|
|
961
962
|
let r = [];
|
|
962
|
-
for (let n of e.props) r.push(yield
|
|
963
|
+
for (let n of e.props) r.push(yield A(n, t, !1));
|
|
963
964
|
try {
|
|
964
965
|
if (e.variable) {
|
|
965
|
-
let i = yield
|
|
966
|
+
let i = yield A(e.variable, t, n);
|
|
966
967
|
return yield t._getFromScope(i, r);
|
|
967
968
|
} else return yield t._get(r);
|
|
968
969
|
} catch (t) {
|
|
@@ -970,60 +971,60 @@ function* Rt(e, t, n) {
|
|
|
970
971
|
throw new Se(t, e);
|
|
971
972
|
}
|
|
972
973
|
}
|
|
973
|
-
function
|
|
974
|
+
function Bt(e) {
|
|
974
975
|
return e.content;
|
|
975
976
|
}
|
|
976
|
-
function*
|
|
977
|
-
let n = yield
|
|
977
|
+
function* Vt(e, t) {
|
|
978
|
+
let n = yield A(e.lhs, t), r = yield A(e.rhs, t);
|
|
978
979
|
return t.memoryLimit.use(r - n + 1), ce(+n, +r + 1);
|
|
979
980
|
}
|
|
980
|
-
function*
|
|
981
|
+
function* Ht(e) {
|
|
981
982
|
let t = [];
|
|
982
|
-
for (let n of e) if (
|
|
983
|
+
for (let n of e) if (Bn(n)) {
|
|
983
984
|
for (; t.length && t[t.length - 1].getPrecedence() > n.getPrecedence();) yield t.pop();
|
|
984
985
|
t.push(n);
|
|
985
986
|
} else yield n;
|
|
986
987
|
for (; t.length;) yield t.pop();
|
|
987
988
|
}
|
|
988
|
-
function
|
|
989
|
-
return !
|
|
989
|
+
function j(e, t) {
|
|
990
|
+
return !M(e, t);
|
|
990
991
|
}
|
|
991
|
-
function
|
|
992
|
+
function M(e, t) {
|
|
992
993
|
return e = f(e), t.opts.jsTruthy ? !e : e === !1 || e == null;
|
|
993
994
|
}
|
|
994
|
-
var
|
|
995
|
-
"==":
|
|
996
|
-
"!=": (e, t) => !
|
|
995
|
+
var Ut = {
|
|
996
|
+
"==": N,
|
|
997
|
+
"!=": (e, t) => !N(e, t),
|
|
997
998
|
">": (e, t) => T(e) ? e.gt(t) : T(t) ? t.lt(e) : f(e) > f(t),
|
|
998
999
|
"<": (e, t) => T(e) ? e.lt(t) : T(t) ? t.gt(e) : f(e) < f(t),
|
|
999
1000
|
">=": (e, t) => T(e) ? e.geq(t) : T(t) ? t.leq(e) : f(e) >= f(t),
|
|
1000
1001
|
"<=": (e, t) => T(e) ? e.leq(t) : T(t) ? t.geq(e) : f(e) <= f(t),
|
|
1001
|
-
contains: (e, t) => (e = f(e), m(e) ? e.some((e) =>
|
|
1002
|
-
not: (e, t) =>
|
|
1003
|
-
and: (e, t, n) =>
|
|
1004
|
-
or: (e, t, n) =>
|
|
1002
|
+
contains: (e, t) => (e = f(e), m(e) ? e.some((e) => N(e, t)) : o(e?.indexOf) ? e.indexOf(f(t)) > -1 : !1),
|
|
1003
|
+
not: (e, t) => M(f(e), t),
|
|
1004
|
+
and: (e, t, n) => j(f(e), n) && j(f(t), n),
|
|
1005
|
+
or: (e, t, n) => j(f(e), n) || j(f(t), n)
|
|
1005
1006
|
};
|
|
1006
|
-
function
|
|
1007
|
-
return T(e) ? e.equals(t) : T(t) ? t.equals(e) : (e = f(e), t = f(t), m(e) ? m(t) &&
|
|
1008
|
-
}
|
|
1009
|
-
function Ut(e, t) {
|
|
1010
|
-
return e.length === t.length ? !e.some((e, n) => !P(e, t[n])) : !1;
|
|
1007
|
+
function N(e, t) {
|
|
1008
|
+
return T(e) ? e.equals(t) : T(t) ? t.equals(e) : (e = f(e), t = f(t), m(e) ? m(t) && Wt(e, t) : e === t);
|
|
1011
1009
|
}
|
|
1012
1010
|
function Wt(e, t) {
|
|
1013
|
-
return e.some((e) =>
|
|
1011
|
+
return e.length === t.length ? !e.some((e, n) => !N(e, t[n])) : !1;
|
|
1012
|
+
}
|
|
1013
|
+
function Gt(e, t) {
|
|
1014
|
+
return e.some((e) => N(e, t));
|
|
1014
1015
|
}
|
|
1015
|
-
var
|
|
1016
|
+
var Kt = class {
|
|
1016
1017
|
constructor(e, t, n, r) {
|
|
1017
1018
|
this.key = e, this.value = t, this.next = n, this.prev = r;
|
|
1018
1019
|
}
|
|
1019
|
-
},
|
|
1020
|
+
}, qt = class {
|
|
1020
1021
|
constructor(e, t = 0) {
|
|
1021
|
-
this.limit = e, this.size = t, this.cache = {}, this.head = new
|
|
1022
|
+
this.limit = e, this.size = t, this.cache = {}, this.head = new Kt("HEAD", null, null, null), this.tail = new Kt("TAIL", null, null, null), this.head.next = this.tail, this.tail.prev = this.head;
|
|
1022
1023
|
}
|
|
1023
1024
|
write(e, t) {
|
|
1024
1025
|
if (this.cache[e]) this.cache[e].value = t;
|
|
1025
1026
|
else {
|
|
1026
|
-
let n = new
|
|
1027
|
+
let n = new Kt(e, t, this.head.next, this.head);
|
|
1027
1028
|
this.head.next.prev = n, this.head.next = n, this.cache[e] = n, this.size++, this.ensureLimit();
|
|
1028
1029
|
}
|
|
1029
1030
|
}
|
|
@@ -1043,7 +1044,7 @@ var Gt = class {
|
|
|
1043
1044
|
this.size > this.limit && this.remove(this.tail.prev.key);
|
|
1044
1045
|
}
|
|
1045
1046
|
};
|
|
1046
|
-
function
|
|
1047
|
+
function Jt(e, t) {
|
|
1047
1048
|
let n = document.createElement("base");
|
|
1048
1049
|
n.href = e;
|
|
1049
1050
|
let r = document.getElementsByTagName("head")[0];
|
|
@@ -1053,13 +1054,13 @@ function qt(e, t) {
|
|
|
1053
1054
|
let a = i.href;
|
|
1054
1055
|
return r.removeChild(n), a;
|
|
1055
1056
|
}
|
|
1056
|
-
function
|
|
1057
|
-
return e.length && se(e) !== "/" && (e += "/"),
|
|
1057
|
+
function Yt(e, t, n) {
|
|
1058
|
+
return e.length && se(e) !== "/" && (e += "/"), Jt(e, t).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/, (e, t, r) => {
|
|
1058
1059
|
let i = r.split("/").pop();
|
|
1059
1060
|
return /\.\w+$/.test(i) ? e : t + r + n;
|
|
1060
1061
|
});
|
|
1061
1062
|
}
|
|
1062
|
-
function
|
|
1063
|
+
function Xt(e) {
|
|
1063
1064
|
return E(this, void 0, void 0, function* () {
|
|
1064
1065
|
return new Promise((t, n) => {
|
|
1065
1066
|
let r = new XMLHttpRequest();
|
|
@@ -1071,39 +1072,39 @@ function Yt(e) {
|
|
|
1071
1072
|
});
|
|
1072
1073
|
});
|
|
1073
1074
|
}
|
|
1074
|
-
function
|
|
1075
|
+
function Zt(e) {
|
|
1075
1076
|
let t = new XMLHttpRequest();
|
|
1076
1077
|
if (t.open("GET", e, !1), t.send(), t.status < 200 || t.status >= 300) throw Error(t.statusText);
|
|
1077
1078
|
return t.responseText;
|
|
1078
1079
|
}
|
|
1079
|
-
function
|
|
1080
|
+
function Qt(e) {
|
|
1080
1081
|
return E(this, void 0, void 0, function* () {
|
|
1081
1082
|
return !0;
|
|
1082
1083
|
});
|
|
1083
1084
|
}
|
|
1084
|
-
function
|
|
1085
|
+
function $t(e) {
|
|
1085
1086
|
return !0;
|
|
1086
1087
|
}
|
|
1087
|
-
function
|
|
1088
|
-
return
|
|
1088
|
+
function en(e) {
|
|
1089
|
+
return Jt(e, ".");
|
|
1089
1090
|
}
|
|
1090
|
-
var
|
|
1091
|
+
var tn = /* @__PURE__ */ Object.freeze({
|
|
1091
1092
|
__proto__: null,
|
|
1092
|
-
resolve:
|
|
1093
|
-
readFile:
|
|
1094
|
-
readFileSync:
|
|
1095
|
-
exists:
|
|
1096
|
-
existsSync:
|
|
1097
|
-
dirname:
|
|
1093
|
+
resolve: Yt,
|
|
1094
|
+
readFile: Xt,
|
|
1095
|
+
readFileSync: Zt,
|
|
1096
|
+
exists: Qt,
|
|
1097
|
+
existsSync: $t,
|
|
1098
|
+
dirname: en,
|
|
1098
1099
|
sep: "/"
|
|
1099
1100
|
});
|
|
1100
|
-
function
|
|
1101
|
-
return e = f(e), m(e) || a(e) ? e.length ? e : t : e === !1 && new Map(n).get("allow_false") ? !1 :
|
|
1101
|
+
function nn(e, t, ...n) {
|
|
1102
|
+
return e = f(e), m(e) || a(e) ? e.length ? e : t : e === !1 && new Map(n).get("allow_false") ? !1 : M(e, this.context) ? t : e;
|
|
1102
1103
|
}
|
|
1103
|
-
function
|
|
1104
|
+
function rn(e, t = 0) {
|
|
1104
1105
|
return JSON.stringify(e, null, t);
|
|
1105
1106
|
}
|
|
1106
|
-
function
|
|
1107
|
+
function an(e, t = 0) {
|
|
1107
1108
|
let n = [];
|
|
1108
1109
|
return JSON.stringify(e, function(e, t) {
|
|
1109
1110
|
if (typeof t != "object" || !t) return t;
|
|
@@ -1111,60 +1112,82 @@ function rn(e, t = 0) {
|
|
|
1111
1112
|
return n.includes(t) ? "[Circular]" : (n.push(t), t);
|
|
1112
1113
|
}, t);
|
|
1113
1114
|
}
|
|
1114
|
-
function
|
|
1115
|
+
function on(e) {
|
|
1115
1116
|
return Number(e);
|
|
1116
1117
|
}
|
|
1117
|
-
var
|
|
1118
|
-
default:
|
|
1118
|
+
var sn = {
|
|
1119
|
+
default: nn,
|
|
1119
1120
|
raw: {
|
|
1120
1121
|
raw: !0,
|
|
1121
1122
|
handler: de
|
|
1122
1123
|
},
|
|
1123
|
-
jsonify:
|
|
1124
|
-
to_integer:
|
|
1125
|
-
json:
|
|
1126
|
-
inspect:
|
|
1127
|
-
},
|
|
1124
|
+
jsonify: rn,
|
|
1125
|
+
to_integer: on,
|
|
1126
|
+
json: rn,
|
|
1127
|
+
inspect: an
|
|
1128
|
+
}, cn = {
|
|
1128
1129
|
"&": "&",
|
|
1129
1130
|
"<": "<",
|
|
1130
1131
|
">": ">",
|
|
1131
1132
|
"\"": """,
|
|
1132
1133
|
"'": "'"
|
|
1133
|
-
},
|
|
1134
|
+
}, ln = {
|
|
1134
1135
|
"&": "&",
|
|
1135
1136
|
"<": "<",
|
|
1136
1137
|
">": ">",
|
|
1137
1138
|
""": "\"",
|
|
1138
1139
|
"'": "'"
|
|
1139
1140
|
};
|
|
1140
|
-
function ln(e) {
|
|
1141
|
-
return e = l(e), this.context.memoryLimit.use(e.length), e.replace(/&|<|>|"|'/g, (e) => sn[e]);
|
|
1142
|
-
}
|
|
1143
1141
|
function un(e) {
|
|
1144
|
-
return
|
|
1142
|
+
return e = l(e), this.context.memoryLimit.use(e.length), e.replace(/&|<|>|"|'/g, (e) => cn[e]);
|
|
1145
1143
|
}
|
|
1146
1144
|
function dn(e) {
|
|
1147
|
-
return
|
|
1145
|
+
return un.call(this, e);
|
|
1148
1146
|
}
|
|
1149
1147
|
function fn(e) {
|
|
1150
|
-
return
|
|
1148
|
+
return e = l(e), this.context.memoryLimit.use(e.length), e.replace(/&(amp|lt|gt|#34|#39);/g, (e) => ln[e]);
|
|
1151
1149
|
}
|
|
1152
1150
|
function pn(e) {
|
|
1151
|
+
return un.call(this, fn.call(this, e));
|
|
1152
|
+
}
|
|
1153
|
+
function mn(e) {
|
|
1153
1154
|
let t = l(e);
|
|
1154
1155
|
return this.context.memoryLimit.use(t.length), t.replace(/\r?\n/gm, "<br />\n");
|
|
1155
1156
|
}
|
|
1156
|
-
function
|
|
1157
|
+
function hn(e) {
|
|
1157
1158
|
let t = l(e);
|
|
1158
|
-
|
|
1159
|
+
this.context.memoryLimit.use(t.length);
|
|
1160
|
+
let n = new Map([
|
|
1161
|
+
["<script", "<\/script>"],
|
|
1162
|
+
["<style", "</style>"],
|
|
1163
|
+
["<!--", "-->"],
|
|
1164
|
+
["<", ">"]
|
|
1165
|
+
]), r = "", i = 0;
|
|
1166
|
+
for (; i < t.length;) {
|
|
1167
|
+
let e = t.indexOf("<", i);
|
|
1168
|
+
if (e < 0) return r + t.slice(i);
|
|
1169
|
+
r += t.slice(i, e);
|
|
1170
|
+
for (let [r, a] of n) {
|
|
1171
|
+
if (!t.startsWith(r, e)) continue;
|
|
1172
|
+
let o = t.indexOf(a, e + r.length);
|
|
1173
|
+
if (o >= 0) {
|
|
1174
|
+
i = o + a.length;
|
|
1175
|
+
break;
|
|
1176
|
+
}
|
|
1177
|
+
n.delete(r);
|
|
1178
|
+
}
|
|
1179
|
+
if (i === e) return r + t.slice(e);
|
|
1180
|
+
}
|
|
1181
|
+
return r;
|
|
1159
1182
|
}
|
|
1160
|
-
var
|
|
1183
|
+
var gn = /* @__PURE__ */ Object.freeze({
|
|
1161
1184
|
__proto__: null,
|
|
1162
|
-
escape:
|
|
1163
|
-
xml_escape:
|
|
1164
|
-
escape_once:
|
|
1165
|
-
newline_to_br:
|
|
1166
|
-
strip_html:
|
|
1167
|
-
}),
|
|
1185
|
+
escape: un,
|
|
1186
|
+
xml_escape: dn,
|
|
1187
|
+
escape_once: pn,
|
|
1188
|
+
newline_to_br: mn,
|
|
1189
|
+
strip_html: hn
|
|
1190
|
+
}), _n = class {
|
|
1168
1191
|
constructor(e) {
|
|
1169
1192
|
this.mapping = e, this.sep = "/";
|
|
1170
1193
|
}
|
|
@@ -1197,7 +1220,7 @@ var hn = /* @__PURE__ */ Object.freeze({
|
|
|
1197
1220
|
else e === ".." ? (r.length > 1 || r[0] !== "") && r.pop() : r.push(e);
|
|
1198
1221
|
return r.join(this.sep);
|
|
1199
1222
|
}
|
|
1200
|
-
},
|
|
1223
|
+
}, P = {
|
|
1201
1224
|
root: ["."],
|
|
1202
1225
|
layouts: ["."],
|
|
1203
1226
|
partials: ["."],
|
|
@@ -1206,7 +1229,7 @@ var hn = /* @__PURE__ */ Object.freeze({
|
|
|
1206
1229
|
keyValueSeparator: ":",
|
|
1207
1230
|
cache: void 0,
|
|
1208
1231
|
extname: "",
|
|
1209
|
-
fs:
|
|
1232
|
+
fs: tn,
|
|
1210
1233
|
dynamicPartials: !0,
|
|
1211
1234
|
jsTruthy: !1,
|
|
1212
1235
|
dateFormat: "%A, %B %-e, %Y at %-l:%M %P %z",
|
|
@@ -1227,49 +1250,49 @@ var hn = /* @__PURE__ */ Object.freeze({
|
|
|
1227
1250
|
lenientIf: !1,
|
|
1228
1251
|
globals: {},
|
|
1229
1252
|
keepOutputType: !1,
|
|
1230
|
-
operators:
|
|
1253
|
+
operators: Ut,
|
|
1231
1254
|
memoryLimit: Infinity,
|
|
1232
1255
|
parseLimit: Infinity,
|
|
1233
1256
|
renderLimit: Infinity
|
|
1234
1257
|
};
|
|
1235
|
-
function
|
|
1258
|
+
function vn(e) {
|
|
1236
1259
|
if (e.hasOwnProperty("root") && (e.hasOwnProperty("partials") || (e.partials = e.root), e.hasOwnProperty("layouts") || (e.layouts = e.root)), e.hasOwnProperty("cache")) {
|
|
1237
1260
|
let t;
|
|
1238
|
-
t = typeof e.cache == "number" ? e.cache > 0 ? new
|
|
1261
|
+
t = typeof e.cache == "number" ? e.cache > 0 ? new qt(e.cache) : void 0 : typeof e.cache == "object" ? e.cache : e.cache ? new qt(1024) : void 0, e.cache = t;
|
|
1239
1262
|
}
|
|
1240
|
-
return e = Object.assign(Object.assign(Object.assign({},
|
|
1263
|
+
return e = Object.assign(Object.assign(Object.assign({}, P), 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 = F(e.root), e.partials = F(e.partials), e.layouts = F(e.layouts), e.outputEscape = e.outputEscape && yn(e.outputEscape), e.locale ||= at()?.().resolvedOptions().locale ?? "en-US", e.templates && (e.fs = new _n(e.templates), e.relativeReference = !0, e.root = e.partials = e.layouts = "."), e;
|
|
1241
1264
|
}
|
|
1242
|
-
function
|
|
1243
|
-
return e === "escape" ?
|
|
1265
|
+
function yn(e) {
|
|
1266
|
+
return e === "escape" ? un : e === "json" ? sn.json : (C(o(e), "`outputEscape` need to be of type string or function"), e);
|
|
1244
1267
|
}
|
|
1245
|
-
function
|
|
1268
|
+
function F(e) {
|
|
1246
1269
|
let t = [];
|
|
1247
1270
|
return m(e) && (t = e), a(e) && (t = [e]), t;
|
|
1248
1271
|
}
|
|
1249
|
-
function
|
|
1272
|
+
function bn(e, t) {
|
|
1250
1273
|
let n = !1;
|
|
1251
1274
|
for (let r = 0; r < e.length; r++) {
|
|
1252
1275
|
let i = e[r];
|
|
1253
|
-
|
|
1276
|
+
zn(i) && (!n && i.trimLeft && xn(e[r - 1], t.greedy), J(i) && (i.name === "raw" ? n = !0 : i.name === "endraw" && (n = !1)), !n && i.trimRight && Sn(e[r + 1], t.greedy));
|
|
1254
1277
|
}
|
|
1255
1278
|
}
|
|
1256
|
-
function
|
|
1257
|
-
if (!e || !
|
|
1279
|
+
function xn(e, t) {
|
|
1280
|
+
if (!e || !Vn(e)) return;
|
|
1258
1281
|
let n = t ? x : ke;
|
|
1259
1282
|
for (; b[e.input.charCodeAt(e.end - 1 - e.trimRight)] & n;) e.trimRight++;
|
|
1260
1283
|
}
|
|
1261
|
-
function
|
|
1262
|
-
if (!e || !
|
|
1284
|
+
function Sn(e, t) {
|
|
1285
|
+
if (!e || !Vn(e)) return;
|
|
1263
1286
|
let n = t ? x : ke;
|
|
1264
1287
|
for (; b[e.input.charCodeAt(e.begin + e.trimLeft)] & n;) e.trimLeft++;
|
|
1265
1288
|
e.input.charAt(e.begin + e.trimLeft) === "\n" && e.trimLeft++;
|
|
1266
1289
|
}
|
|
1267
|
-
var
|
|
1268
|
-
constructor(e, t =
|
|
1290
|
+
var I = class {
|
|
1291
|
+
constructor(e, t = P.operators, n, r) {
|
|
1269
1292
|
this.input = e, this.file = n, this.rawBeginAt = -1, this.p = r ? r[0] : 0, this.N = r ? r[1] : e.length, this.opTrie = Ue(t), this.literalTrie = Ue(He);
|
|
1270
1293
|
}
|
|
1271
1294
|
readExpression() {
|
|
1272
|
-
return new
|
|
1295
|
+
return new Rt(this.readExpressionTokens());
|
|
1273
1296
|
}
|
|
1274
1297
|
*readExpressionTokens() {
|
|
1275
1298
|
for (; this.p < this.N;) {
|
|
@@ -1289,7 +1312,7 @@ var L = class {
|
|
|
1289
1312
|
readOperator() {
|
|
1290
1313
|
this.skipBlank();
|
|
1291
1314
|
let e = this.matchTrie(this.opTrie);
|
|
1292
|
-
if (e !== -1) return new
|
|
1315
|
+
if (e !== -1) return new St(this.input, this.p, this.p = e, this.file);
|
|
1293
1316
|
}
|
|
1294
1317
|
matchTrie(e) {
|
|
1295
1318
|
let t = e, n = this.p, r;
|
|
@@ -1298,7 +1321,7 @@ var L = class {
|
|
|
1298
1321
|
}
|
|
1299
1322
|
readFilteredValue() {
|
|
1300
1323
|
let e = this.p, t = this.readExpression();
|
|
1301
|
-
return this.assert(t.valid(), `invalid value expression: ${this.snapshot()}`), new
|
|
1324
|
+
return this.assert(t.valid(), `invalid value expression: ${this.snapshot()}`), new Pt(t, this.readFilters(), this.input, e, this.p, this.file);
|
|
1302
1325
|
}
|
|
1303
1326
|
readFilters() {
|
|
1304
1327
|
let e = [];
|
|
@@ -1320,7 +1343,7 @@ var L = class {
|
|
|
1320
1343
|
e && t.push(e), this.skipBlank(), this.assert(this.end() || this.peek() === "," || this.peek() === "|", () => `unexpected character ${this.snapshot()}`);
|
|
1321
1344
|
} while (this.peek() === ",");
|
|
1322
1345
|
else if (!(this.peek() === "|" || this.end())) throw this.error("expected \":\" after filter name");
|
|
1323
|
-
return new
|
|
1346
|
+
return new wt(e.getText(), t, this.input, e.begin, this.p, this.file);
|
|
1324
1347
|
}
|
|
1325
1348
|
readFilterArg() {
|
|
1326
1349
|
let e = this.readValue();
|
|
@@ -1330,13 +1353,13 @@ var L = class {
|
|
|
1330
1353
|
let t = this.readValue();
|
|
1331
1354
|
return [e.getText(), t];
|
|
1332
1355
|
}
|
|
1333
|
-
readTopLevelTokens(e =
|
|
1356
|
+
readTopLevelTokens(e = P) {
|
|
1334
1357
|
let t = [];
|
|
1335
1358
|
for (; this.p < this.N;) {
|
|
1336
1359
|
let n = this.readTopLevelToken(e);
|
|
1337
1360
|
t.push(n);
|
|
1338
1361
|
}
|
|
1339
|
-
return
|
|
1362
|
+
return bn(t, e), t;
|
|
1340
1363
|
}
|
|
1341
1364
|
readTopLevelToken(e) {
|
|
1342
1365
|
let { tagDelimiterLeft: t, outputDelimiterLeft: n } = e;
|
|
@@ -1345,12 +1368,12 @@ var L = class {
|
|
|
1345
1368
|
readHTMLToken(e) {
|
|
1346
1369
|
let t = this.p;
|
|
1347
1370
|
for (; this.p < this.N && !e.some((e) => this.match(e));) ++this.p;
|
|
1348
|
-
return new
|
|
1371
|
+
return new gt(this.input, t, this.p, this.file);
|
|
1349
1372
|
}
|
|
1350
1373
|
readTagToken(e) {
|
|
1351
1374
|
let { file: t, input: n } = this, r = this.p;
|
|
1352
1375
|
if (this.readToDelimiter(e.tagDelimiterRight) === -1) throw this.error(`tag ${this.snapshot(r)} not closed`, r);
|
|
1353
|
-
let i = new
|
|
1376
|
+
let i = new mt(n, r, this.p, e, t);
|
|
1354
1377
|
return i.name === "raw" && (this.rawBeginAt = r), i;
|
|
1355
1378
|
}
|
|
1356
1379
|
readToDelimiter(e, t = !1) {
|
|
@@ -1363,10 +1386,10 @@ var L = class {
|
|
|
1363
1386
|
}
|
|
1364
1387
|
return -1;
|
|
1365
1388
|
}
|
|
1366
|
-
readOutputToken(e =
|
|
1389
|
+
readOutputToken(e = P) {
|
|
1367
1390
|
let { file: t, input: n } = this, { outputDelimiterRight: r } = e, i = this.p;
|
|
1368
1391
|
if (this.readToDelimiter(r, !0) === -1) throw this.error(`output ${this.snapshot(i)} not closed`, i);
|
|
1369
|
-
return new
|
|
1392
|
+
return new ht(n, i, this.p, e, t);
|
|
1370
1393
|
}
|
|
1371
1394
|
readEndrawOrRawContent(e) {
|
|
1372
1395
|
let { tagDelimiterLeft: t, tagDelimiterRight: n } = e, r = this.p, i = this.readTo(t) - t.length;
|
|
@@ -1378,7 +1401,7 @@ var L = class {
|
|
|
1378
1401
|
for (; this.p <= this.N;) {
|
|
1379
1402
|
if (this.rmatch(n)) {
|
|
1380
1403
|
let t = this.p;
|
|
1381
|
-
return r === i ? (this.rawBeginAt = -1, new
|
|
1404
|
+
return r === i ? (this.rawBeginAt = -1, new mt(this.input, r, t, e, this.file)) : (this.p = i, new gt(this.input, r, i, this.file));
|
|
1382
1405
|
}
|
|
1383
1406
|
if (this.rmatch(t)) break;
|
|
1384
1407
|
this.p++;
|
|
@@ -1386,7 +1409,7 @@ var L = class {
|
|
|
1386
1409
|
}
|
|
1387
1410
|
throw this.error(`raw ${this.snapshot(this.rawBeginAt)} not closed`, r);
|
|
1388
1411
|
}
|
|
1389
|
-
readLiquidTagTokens(e =
|
|
1412
|
+
readLiquidTagTokens(e = P) {
|
|
1390
1413
|
let t = [];
|
|
1391
1414
|
for (; this.p < this.N;) {
|
|
1392
1415
|
let n = this.readLiquidTagToken(e);
|
|
@@ -1399,10 +1422,10 @@ var L = class {
|
|
|
1399
1422
|
let t = this.p;
|
|
1400
1423
|
this.readToDelimiter("\n");
|
|
1401
1424
|
let n = this.p;
|
|
1402
|
-
return new
|
|
1425
|
+
return new Nt(this.input, t, n, e, this.file);
|
|
1403
1426
|
}
|
|
1404
1427
|
error(e, t = this.p) {
|
|
1405
|
-
return new ve(e, new
|
|
1428
|
+
return new ve(e, new vt(this.input, t, this.N, this.file));
|
|
1406
1429
|
}
|
|
1407
1430
|
assert(e, t, n) {
|
|
1408
1431
|
if (!e) throw this.error(typeof t == "function" ? t() : t, n);
|
|
@@ -1417,7 +1440,7 @@ var L = class {
|
|
|
1417
1440
|
this.skipBlank();
|
|
1418
1441
|
let e = this.p;
|
|
1419
1442
|
for (; !this.end() && S(this.peek());) ++this.p;
|
|
1420
|
-
return new
|
|
1443
|
+
return new vt(this.input, e, this.p, this.file);
|
|
1421
1444
|
}
|
|
1422
1445
|
readNonEmptyIdentifier() {
|
|
1423
1446
|
let e = this.readIdentifier();
|
|
@@ -1441,7 +1464,7 @@ var L = class {
|
|
|
1441
1464
|
let r;
|
|
1442
1465
|
this.skipBlank();
|
|
1443
1466
|
let i = a(e) ? e : e ? "=" : ":";
|
|
1444
|
-
return this.peek() === i && (++this.p, r = this.readValue()), new
|
|
1467
|
+
return this.peek() === i && (++this.p, r = this.readValue()), new Tt(this.input, t, this.p, n, r, this.file);
|
|
1445
1468
|
}
|
|
1446
1469
|
remaining() {
|
|
1447
1470
|
return this.input.slice(this.p, this.N);
|
|
@@ -1462,19 +1485,19 @@ var L = class {
|
|
|
1462
1485
|
readValue() {
|
|
1463
1486
|
this.skipBlank();
|
|
1464
1487
|
let e = this.p, t = this.readLiteral() || this.readQuoted() || this.readRange() || this.readNumber(), n = this.readProperties(!t);
|
|
1465
|
-
return n.length ? new
|
|
1488
|
+
return n.length ? new Ct(t, n, this.input, e, this.p) : t;
|
|
1466
1489
|
}
|
|
1467
1490
|
readScopeValue() {
|
|
1468
1491
|
this.skipBlank();
|
|
1469
1492
|
let e = this.p, t = this.readProperties();
|
|
1470
|
-
if (t.length) return new
|
|
1493
|
+
if (t.length) return new Ct(void 0, t, this.input, e, this.p);
|
|
1471
1494
|
}
|
|
1472
1495
|
readProperties(e = !0) {
|
|
1473
1496
|
let t = [];
|
|
1474
1497
|
for (;;) {
|
|
1475
1498
|
if (this.peek() === "[") {
|
|
1476
1499
|
this.p++;
|
|
1477
|
-
let e = this.readValue() || new
|
|
1500
|
+
let e = this.readValue() || new vt(this.input, this.p, this.p, this.file);
|
|
1478
1501
|
this.assert(this.readTo("]") !== -1, "[ not closed"), t.push(e);
|
|
1479
1502
|
continue;
|
|
1480
1503
|
}
|
|
@@ -1505,7 +1528,7 @@ var L = class {
|
|
|
1505
1528
|
e = !0, n++;
|
|
1506
1529
|
} else break;
|
|
1507
1530
|
if (t && !S(this.peek(n))) {
|
|
1508
|
-
let e = new
|
|
1531
|
+
let e = new _t(this.input, this.p, this.p + n, this.file);
|
|
1509
1532
|
return this.advance(n), e;
|
|
1510
1533
|
}
|
|
1511
1534
|
}
|
|
@@ -1513,7 +1536,7 @@ var L = class {
|
|
|
1513
1536
|
this.skipBlank();
|
|
1514
1537
|
let e = this.matchTrie(this.literalTrie);
|
|
1515
1538
|
if (e === -1) return;
|
|
1516
|
-
let t = new
|
|
1539
|
+
let t = new yt(this.input, this.p, e, this.file);
|
|
1517
1540
|
return this.p = e, t;
|
|
1518
1541
|
}
|
|
1519
1542
|
readRange() {
|
|
@@ -1524,7 +1547,7 @@ var L = class {
|
|
|
1524
1547
|
let t = this.readValueOrThrow();
|
|
1525
1548
|
this.skipBlank(), this.assert(this.read() === "." && this.read() === ".", "invalid range syntax");
|
|
1526
1549
|
let n = this.readValueOrThrow();
|
|
1527
|
-
return this.skipBlank(), this.assert(this.read() === ")", "invalid range syntax"), new
|
|
1550
|
+
return this.skipBlank(), this.assert(this.read() === ")", "invalid range syntax"), new Mt(this.input, e, this.p, t, n, this.file);
|
|
1528
1551
|
}
|
|
1529
1552
|
readValueOrThrow() {
|
|
1530
1553
|
let e = this.readValue();
|
|
@@ -1537,7 +1560,7 @@ var L = class {
|
|
|
1537
1560
|
++this.p;
|
|
1538
1561
|
let t = !1;
|
|
1539
1562
|
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);
|
|
1540
|
-
return new
|
|
1563
|
+
return new jt(this.input, e, this.p, this.file);
|
|
1541
1564
|
}
|
|
1542
1565
|
*readFileNameTemplate(e) {
|
|
1543
1566
|
let { outputDelimiterLeft: t } = e, n = [
|
|
@@ -1567,7 +1590,7 @@ var L = class {
|
|
|
1567
1590
|
skipBlank() {
|
|
1568
1591
|
for (; this.peekType() & x;) ++this.p;
|
|
1569
1592
|
}
|
|
1570
|
-
},
|
|
1593
|
+
}, Cn = class {
|
|
1571
1594
|
constructor(e, t) {
|
|
1572
1595
|
this.handlers = {}, this.stopRequested = !1, this.tokens = e, this.parseToken = t;
|
|
1573
1596
|
}
|
|
@@ -1582,7 +1605,7 @@ var L = class {
|
|
|
1582
1605
|
this.trigger("start");
|
|
1583
1606
|
let e;
|
|
1584
1607
|
for (; !this.stopRequested && (e = this.tokens.shift());) {
|
|
1585
|
-
if (this.trigger("token", e) ||
|
|
1608
|
+
if (this.trigger("token", e) || J(e) && this.trigger(`tag:${e.name}`, e)) continue;
|
|
1586
1609
|
let t = this.parseToken(e, this.tokens);
|
|
1587
1610
|
this.trigger("template", t);
|
|
1588
1611
|
}
|
|
@@ -1591,58 +1614,58 @@ var L = class {
|
|
|
1591
1614
|
stop() {
|
|
1592
1615
|
return this.stopRequested = !0, this;
|
|
1593
1616
|
}
|
|
1594
|
-
},
|
|
1617
|
+
}, wn = class {
|
|
1595
1618
|
constructor(e) {
|
|
1596
1619
|
this.token = e;
|
|
1597
1620
|
}
|
|
1598
|
-
},
|
|
1621
|
+
}, L = class extends wn {
|
|
1599
1622
|
constructor(e, t, n) {
|
|
1600
1623
|
super(e), this.name = e.name, this.liquid = n, this.tokenizer = e.tokenizer;
|
|
1601
1624
|
}
|
|
1602
|
-
},
|
|
1625
|
+
}, R = class {
|
|
1603
1626
|
constructor(e, t) {
|
|
1604
1627
|
this.hash = {};
|
|
1605
|
-
let n = e instanceof
|
|
1628
|
+
let n = e instanceof I ? e : new I(e, {});
|
|
1606
1629
|
for (let e of n.readHashes(t)) this.hash[e.name.content] = e.value;
|
|
1607
1630
|
}
|
|
1608
1631
|
*render(e) {
|
|
1609
1632
|
let t = {};
|
|
1610
|
-
for (let n of Object.keys(this.hash)) t[n] = this.hash[n] === void 0 ? !0 : yield
|
|
1633
|
+
for (let n of Object.keys(this.hash)) t[n] = this.hash[n] === void 0 ? !0 : yield A(this.hash[n], e);
|
|
1611
1634
|
return t;
|
|
1612
1635
|
}
|
|
1613
1636
|
};
|
|
1614
|
-
function
|
|
1615
|
-
return class extends
|
|
1637
|
+
function Tn(e) {
|
|
1638
|
+
return class extends L {
|
|
1616
1639
|
constructor(t, n, r) {
|
|
1617
1640
|
super(t, n, r), o(e.parse) && e.parse.call(this, t, n);
|
|
1618
1641
|
}
|
|
1619
1642
|
*render(t, n) {
|
|
1620
|
-
let r = yield new
|
|
1643
|
+
let r = yield new R(this.token.args, t.opts.keyValueSeparator).render(t);
|
|
1621
1644
|
return yield e.render.call(this, t, n, r);
|
|
1622
1645
|
}
|
|
1623
1646
|
};
|
|
1624
1647
|
}
|
|
1625
|
-
function
|
|
1648
|
+
function En(e) {
|
|
1626
1649
|
return m(e);
|
|
1627
1650
|
}
|
|
1628
|
-
var
|
|
1651
|
+
var Dn = class {
|
|
1629
1652
|
constructor(e, t, n) {
|
|
1630
1653
|
this.token = e, this.name = e.name, this.handler = o(t) ? t : o(t?.handler) ? t.handler : de, this.raw = !o(t) && !!t?.raw, this.args = e.args, this.liquid = n;
|
|
1631
1654
|
}
|
|
1632
1655
|
*render(e, t) {
|
|
1633
1656
|
let n = [];
|
|
1634
|
-
for (let e of this.args)
|
|
1657
|
+
for (let e of this.args) En(e) ? n.push([e[0], yield A(e[1], t)]) : n.push(yield A(e, t));
|
|
1635
1658
|
return yield this.handler.apply({
|
|
1636
1659
|
context: t,
|
|
1637
1660
|
token: this.token,
|
|
1638
1661
|
liquid: this.liquid
|
|
1639
1662
|
}, [e, ...n]);
|
|
1640
1663
|
}
|
|
1641
|
-
},
|
|
1664
|
+
}, z = class {
|
|
1642
1665
|
constructor(e, t) {
|
|
1643
1666
|
this.filters = [];
|
|
1644
|
-
let n = typeof e == "string" ? new
|
|
1645
|
-
this.initial = n.initial, this.filters = n.filters.map((e) => new
|
|
1667
|
+
let n = typeof e == "string" ? new I(e, t.options.operators).readFilteredValue() : e;
|
|
1668
|
+
this.initial = n.initial, this.filters = n.filters.map((e) => new Dn(e, this.getFilter(t, e.name), t));
|
|
1646
1669
|
}
|
|
1647
1670
|
*value(e, t) {
|
|
1648
1671
|
t ||= e.opts.lenientIf && this.filters.length > 0 && this.filters[0].name === "default";
|
|
@@ -1654,15 +1677,15 @@ var En = class {
|
|
|
1654
1677
|
let n = e.filters[t];
|
|
1655
1678
|
return C(n || !e.options.strictFilters, () => `undefined filter: ${t}`), n;
|
|
1656
1679
|
}
|
|
1657
|
-
},
|
|
1680
|
+
}, On = class extends wn {
|
|
1658
1681
|
constructor(e, t) {
|
|
1659
1682
|
super(e);
|
|
1660
|
-
let n = new
|
|
1661
|
-
this.value = new
|
|
1683
|
+
let n = new I(e.input, t.options.operators, e.file, e.contentRange);
|
|
1684
|
+
this.value = new z(n.readFilteredValue(), t);
|
|
1662
1685
|
let r = this.value.filters, i = t.options.outputEscape;
|
|
1663
1686
|
if (!r[r.length - 1]?.raw && i) {
|
|
1664
|
-
let e = new
|
|
1665
|
-
r.push(new
|
|
1687
|
+
let e = new wt(toString.call(i), [], "", 0, 0);
|
|
1688
|
+
r.push(new Dn(e, i, t));
|
|
1666
1689
|
}
|
|
1667
1690
|
}
|
|
1668
1691
|
*render(e, t) {
|
|
@@ -1672,19 +1695,19 @@ var En = class {
|
|
|
1672
1695
|
*arguments() {
|
|
1673
1696
|
yield this.value;
|
|
1674
1697
|
}
|
|
1675
|
-
},
|
|
1698
|
+
}, kn = class extends wn {
|
|
1676
1699
|
constructor(e) {
|
|
1677
1700
|
super(e), this.str = e.getContent();
|
|
1678
1701
|
}
|
|
1679
1702
|
*render(e, t) {
|
|
1680
1703
|
t.write(this.str);
|
|
1681
1704
|
}
|
|
1682
|
-
},
|
|
1705
|
+
}, B = class e {
|
|
1683
1706
|
constructor(e, t) {
|
|
1684
1707
|
this.segments = e, this.location = t;
|
|
1685
1708
|
}
|
|
1686
1709
|
toString() {
|
|
1687
|
-
return
|
|
1710
|
+
return W(this.segments, !0);
|
|
1688
1711
|
}
|
|
1689
1712
|
toArray() {
|
|
1690
1713
|
function* t(...n) {
|
|
@@ -1692,16 +1715,16 @@ var En = class {
|
|
|
1692
1715
|
}
|
|
1693
1716
|
return Array.from(t(...this.segments));
|
|
1694
1717
|
}
|
|
1695
|
-
},
|
|
1718
|
+
}, An = class {
|
|
1696
1719
|
constructor() {
|
|
1697
1720
|
this.map = /* @__PURE__ */ new Map();
|
|
1698
1721
|
}
|
|
1699
1722
|
get(e) {
|
|
1700
|
-
let t =
|
|
1723
|
+
let t = W([e.segments[0]]);
|
|
1701
1724
|
return this.map.has(t) || this.map.set(t, []), this.map.get(t);
|
|
1702
1725
|
}
|
|
1703
1726
|
has(e) {
|
|
1704
|
-
return this.map.has(
|
|
1727
|
+
return this.map.has(W([e.segments[0]]));
|
|
1705
1728
|
}
|
|
1706
1729
|
push(e) {
|
|
1707
1730
|
this.get(e).push(e);
|
|
@@ -1709,9 +1732,9 @@ var En = class {
|
|
|
1709
1732
|
asObject() {
|
|
1710
1733
|
return Object.fromEntries(this.map);
|
|
1711
1734
|
}
|
|
1712
|
-
},
|
|
1713
|
-
function*
|
|
1714
|
-
let r = new
|
|
1735
|
+
}, jn = { partials: !0 };
|
|
1736
|
+
function* Mn(e, t, n) {
|
|
1737
|
+
let r = new An(), i = new An(), o = new An(), s = new Nn(/* @__PURE__ */ new Set()), c = /* @__PURE__ */ new Set();
|
|
1715
1738
|
function l(e, t) {
|
|
1716
1739
|
r.push(e);
|
|
1717
1740
|
let n = t.alias(e);
|
|
@@ -1722,14 +1745,14 @@ function* jn(e, t, n) {
|
|
|
1722
1745
|
let n = e.segments[0];
|
|
1723
1746
|
a(n) && !t.has(n) && i.push(e);
|
|
1724
1747
|
}
|
|
1725
|
-
for (let n of e.segments) n instanceof
|
|
1748
|
+
for (let n of e.segments) n instanceof B && l(n, t);
|
|
1726
1749
|
}
|
|
1727
1750
|
function* u(e, r) {
|
|
1728
|
-
if (e.arguments) for (let t of e.arguments()) for (let e of
|
|
1751
|
+
if (e.arguments) for (let t of e.arguments()) for (let e of Pn(t)) l(e, r);
|
|
1729
1752
|
if (e.localScope) for (let t of e.localScope()) {
|
|
1730
1753
|
r.add(t.content), r.deleteAlias(t.content);
|
|
1731
1754
|
let [e, n] = t.getPosition();
|
|
1732
|
-
o.push(new
|
|
1755
|
+
o.push(new B([t.content], {
|
|
1733
1756
|
row: e,
|
|
1734
1757
|
col: n,
|
|
1735
1758
|
file: t.file
|
|
@@ -1742,12 +1765,12 @@ function* jn(e, t, n) {
|
|
|
1742
1765
|
return;
|
|
1743
1766
|
}
|
|
1744
1767
|
if (c.has(i.name)) return;
|
|
1745
|
-
let o = /* @__PURE__ */ new Set(), s = i.isolated ? new
|
|
1768
|
+
let o = /* @__PURE__ */ new Set(), s = i.isolated ? new Nn(o) : r.push(o);
|
|
1746
1769
|
for (let e of i.scope) if (a(e)) o.add(e);
|
|
1747
1770
|
else {
|
|
1748
1771
|
let [t, n] = e;
|
|
1749
1772
|
o.add(t);
|
|
1750
|
-
let r = Array.from(
|
|
1773
|
+
let r = Array.from(Pn(n));
|
|
1751
1774
|
r.length && s.setAlias(t, r[0].segments);
|
|
1752
1775
|
}
|
|
1753
1776
|
for (let r of yield e.children(t, n)) yield u(r, s), c.add(i.name);
|
|
@@ -1765,13 +1788,13 @@ function* jn(e, t, n) {
|
|
|
1765
1788
|
locals: o.asObject()
|
|
1766
1789
|
};
|
|
1767
1790
|
}
|
|
1768
|
-
function
|
|
1769
|
-
return D(
|
|
1791
|
+
function V(e, t = {}) {
|
|
1792
|
+
return D(Mn(e, Object.assign(Object.assign({}, jn), t).partials, !1));
|
|
1770
1793
|
}
|
|
1771
|
-
function
|
|
1772
|
-
return O(
|
|
1794
|
+
function H(e, t = {}) {
|
|
1795
|
+
return O(Mn(e, Object.assign(Object.assign({}, jn), t).partials, !0));
|
|
1773
1796
|
}
|
|
1774
|
-
var
|
|
1797
|
+
var Nn = class {
|
|
1775
1798
|
constructor(e) {
|
|
1776
1799
|
this.stack = [{
|
|
1777
1800
|
names: e,
|
|
@@ -1798,7 +1821,7 @@ var Mn = class {
|
|
|
1798
1821
|
let t = e.segments[0];
|
|
1799
1822
|
if (!a(t)) return;
|
|
1800
1823
|
let n = this.getAlias(t);
|
|
1801
|
-
if (n !== void 0) return new
|
|
1824
|
+
if (n !== void 0) return new B([...n, ...e.segments.slice(1)], e.location);
|
|
1802
1825
|
}
|
|
1803
1826
|
setAlias(e, t) {
|
|
1804
1827
|
this.stack[this.stack.length - 1].aliases.set(e, t);
|
|
@@ -1813,39 +1836,39 @@ var Mn = class {
|
|
|
1813
1836
|
}
|
|
1814
1837
|
}
|
|
1815
1838
|
};
|
|
1816
|
-
function* Nn(e) {
|
|
1817
|
-
X(e) ? yield* W(e) : e instanceof B && (yield* Pn(e));
|
|
1818
|
-
}
|
|
1819
1839
|
function* Pn(e) {
|
|
1820
|
-
|
|
1821
|
-
|
|
1840
|
+
Y(e) ? yield* U(e) : e instanceof z && (yield* Fn(e));
|
|
1841
|
+
}
|
|
1842
|
+
function* Fn(e) {
|
|
1843
|
+
for (let t of e.initial.postfix) Y(t) && (yield* U(t));
|
|
1844
|
+
for (let t of e.filters) for (let e of t.args) En(e) && e[1] ? yield* U(e[1]) : Y(e) && (yield* U(e));
|
|
1822
1845
|
}
|
|
1823
|
-
function*
|
|
1824
|
-
|
|
1846
|
+
function* U(e) {
|
|
1847
|
+
qn(e) ? (yield* U(e.lhs), yield* U(e.rhs)) : Gn(e) && (yield In(e));
|
|
1825
1848
|
}
|
|
1826
|
-
function
|
|
1849
|
+
function In(e) {
|
|
1827
1850
|
let t = [], n = e.file, r = e.props[0];
|
|
1828
|
-
n ||= r.file,
|
|
1829
|
-
for (let r of e.props.slice(1)) n ||= r.file,
|
|
1851
|
+
n ||= r.file, Un(r) || Wn(r) || Kn(r) ? t.push(r.content) : Gn(r) && t.push(...In(r).segments);
|
|
1852
|
+
for (let r of e.props.slice(1)) n ||= r.file, Un(r) || Wn(r) || Kn(r) ? t.push(r.content) : Gn(r) && t.push(In(r));
|
|
1830
1853
|
let [i, a] = e.getPosition();
|
|
1831
|
-
return new
|
|
1854
|
+
return new B(t, {
|
|
1832
1855
|
row: i,
|
|
1833
1856
|
col: a,
|
|
1834
1857
|
file: n
|
|
1835
1858
|
});
|
|
1836
1859
|
}
|
|
1837
|
-
var
|
|
1838
|
-
function
|
|
1860
|
+
var Ln = /^[\u0080-\uFFFFa-zA-Z_][\u0080-\uFFFFa-zA-Z0-9_-]*$/;
|
|
1861
|
+
function W(e, t = !1) {
|
|
1839
1862
|
let n = [], r = e[0];
|
|
1840
|
-
a(r) && (!t || r.match(
|
|
1841
|
-
for (let t of e.slice(1)) t instanceof
|
|
1863
|
+
a(r) && (!t || r.match(Ln) ? n.push(`${r}`) : n.push(`['${r}']`));
|
|
1864
|
+
for (let t of e.slice(1)) t instanceof B ? n.push(`[${W(t.segments)}]`) : a(t) ? t.match(Ln) ? n.push(`.${t}`) : n.push(`['${t}']`) : n.push(`[${t}]`);
|
|
1842
1865
|
return n.join("");
|
|
1843
1866
|
}
|
|
1844
|
-
var
|
|
1867
|
+
var G;
|
|
1845
1868
|
(function(e) {
|
|
1846
1869
|
e.Partials = "partials", e.Layouts = "layouts", e.Root = "root";
|
|
1847
|
-
})(
|
|
1848
|
-
var
|
|
1870
|
+
})(G ||= {});
|
|
1871
|
+
var Rn = class {
|
|
1849
1872
|
constructor(e) {
|
|
1850
1873
|
if (this.options = e, e.relativeReference) {
|
|
1851
1874
|
let t = e.fs.sep;
|
|
@@ -1894,15 +1917,15 @@ var Ln = class {
|
|
|
1894
1917
|
let n = /* @__PURE__ */ Error("ENOENT");
|
|
1895
1918
|
return n.message = `ENOENT: Failed to lookup "${e}" in "${t}"`, n.code = "ENOENT", n;
|
|
1896
1919
|
}
|
|
1897
|
-
},
|
|
1920
|
+
}, K = class {
|
|
1898
1921
|
constructor(e) {
|
|
1899
|
-
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
|
|
1922
|
+
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 Rn(this.liquid.options), this.parseLimit = new ft("parse length", e.options.parseLimit), this.readFile = Ge(this.fs.readFile?.bind(this.fs) || (() => E(this, void 0, void 0, function* () {
|
|
1900
1923
|
throw Error("readFile not implemented");
|
|
1901
1924
|
})), this.fs.readFileSync?.bind(this.fs));
|
|
1902
1925
|
}
|
|
1903
1926
|
parse(e, t) {
|
|
1904
1927
|
e = String(e), this.parseLimit.use(e.length);
|
|
1905
|
-
let n = new
|
|
1928
|
+
let n = new I(e, this.liquid.options.operators, t).readTopLevelTokens(this.liquid.options);
|
|
1906
1929
|
return this.parseTokens(n);
|
|
1907
1930
|
}
|
|
1908
1931
|
parseTokens(e) {
|
|
@@ -1918,19 +1941,19 @@ var Ln = class {
|
|
|
1918
1941
|
}
|
|
1919
1942
|
parseToken(e, t) {
|
|
1920
1943
|
try {
|
|
1921
|
-
if (
|
|
1944
|
+
if (J(e)) {
|
|
1922
1945
|
let n = this.liquid.tags[e.name];
|
|
1923
1946
|
return C(n, `tag "${e.name}" not found`), new n(e, t, this.liquid, this);
|
|
1924
1947
|
}
|
|
1925
|
-
return
|
|
1948
|
+
return Hn(e) ? new On(e, this.liquid) : new kn(e);
|
|
1926
1949
|
} catch (t) {
|
|
1927
1950
|
throw y.is(t) ? t : new ye(t, e);
|
|
1928
1951
|
}
|
|
1929
1952
|
}
|
|
1930
1953
|
parseStream(e) {
|
|
1931
|
-
return new
|
|
1954
|
+
return new Cn(e, (e, t) => this.parseToken(e, t));
|
|
1932
1955
|
}
|
|
1933
|
-
*_parseFileCached(e, t, n =
|
|
1956
|
+
*_parseFileCached(e, t, n = G.Root, r) {
|
|
1934
1957
|
let i = this.cache, a = this.loader.shouldLoadRelative(e) ? r + "," + e : n + ":" + e, o = yield i.read(a);
|
|
1935
1958
|
if (o) return o;
|
|
1936
1959
|
let s = this._parseFile(e, t, n, r), c = t ? yield s : D(s);
|
|
@@ -1941,53 +1964,57 @@ var Ln = class {
|
|
|
1941
1964
|
throw i.remove(a), e;
|
|
1942
1965
|
}
|
|
1943
1966
|
}
|
|
1944
|
-
*_parseFile(e, t, n =
|
|
1967
|
+
*_parseFile(e, t, n = G.Root, r) {
|
|
1945
1968
|
let i = yield this.loader.lookup(e, n, t, r);
|
|
1946
1969
|
return this.parse(yield this.readFile(!!t, i), i);
|
|
1947
1970
|
}
|
|
1948
|
-
},
|
|
1971
|
+
}, q;
|
|
1949
1972
|
(function(e) {
|
|
1950
1973
|
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";
|
|
1951
|
-
})(
|
|
1952
|
-
function Rn(e) {
|
|
1953
|
-
return !!(Z(e) & J.Delimited);
|
|
1954
|
-
}
|
|
1974
|
+
})(q ||= {});
|
|
1955
1975
|
function zn(e) {
|
|
1956
|
-
return
|
|
1976
|
+
return !!(X(e) & q.Delimited);
|
|
1957
1977
|
}
|
|
1958
1978
|
function Bn(e) {
|
|
1959
|
-
return
|
|
1979
|
+
return X(e) === q.Operator;
|
|
1960
1980
|
}
|
|
1961
1981
|
function Vn(e) {
|
|
1962
|
-
return
|
|
1963
|
-
}
|
|
1964
|
-
function Y(e) {
|
|
1965
|
-
return Z(e) === J.Tag;
|
|
1982
|
+
return X(e) === q.HTML;
|
|
1966
1983
|
}
|
|
1967
1984
|
function Hn(e) {
|
|
1968
|
-
return
|
|
1985
|
+
return X(e) === q.Output;
|
|
1986
|
+
}
|
|
1987
|
+
function J(e) {
|
|
1988
|
+
return X(e) === q.Tag;
|
|
1969
1989
|
}
|
|
1970
1990
|
function Un(e) {
|
|
1971
|
-
return
|
|
1991
|
+
return X(e) === q.Quoted;
|
|
1972
1992
|
}
|
|
1973
1993
|
function Wn(e) {
|
|
1974
|
-
return
|
|
1994
|
+
return X(e) === q.Number;
|
|
1975
1995
|
}
|
|
1976
1996
|
function Gn(e) {
|
|
1977
|
-
return
|
|
1997
|
+
return X(e) === q.PropertyAccess;
|
|
1978
1998
|
}
|
|
1979
1999
|
function Kn(e) {
|
|
1980
|
-
return
|
|
2000
|
+
return X(e) === q.Word;
|
|
2001
|
+
}
|
|
2002
|
+
function qn(e) {
|
|
2003
|
+
return X(e) === q.Range;
|
|
2004
|
+
}
|
|
2005
|
+
function Y(e) {
|
|
2006
|
+
return (X(e) & 1667) > 0;
|
|
1981
2007
|
}
|
|
1982
2008
|
function X(e) {
|
|
1983
|
-
return
|
|
2009
|
+
return e ? e.kind : -1;
|
|
1984
2010
|
}
|
|
1985
2011
|
function Z(e) {
|
|
1986
|
-
|
|
2012
|
+
let t = Object.create(null);
|
|
2013
|
+
return e && Object.assign(t, e), t;
|
|
1987
2014
|
}
|
|
1988
2015
|
var Q = class e {
|
|
1989
|
-
constructor(e = {}, t =
|
|
1990
|
-
this.scopes = [
|
|
2016
|
+
constructor(e = {}, t = P, n = {}, { memoryLimit: r, renderLimit: i } = {}) {
|
|
2017
|
+
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 = h(e) ? e : Object(e), this.strictVariables = n.strictVariables ?? this.opts.strictVariables, this.ownPropertyOnly = n.ownPropertyOnly ?? t.ownPropertyOnly, this.memoryLimit = r ?? new ft("memory alloc", n.memoryLimit ?? t.memoryLimit), this.renderLimit = i ?? new ft("template render", It().now() + (n.renderLimit ?? t.renderLimit));
|
|
1991
2018
|
}
|
|
1992
2019
|
getRegister(e, t = void 0) {
|
|
1993
2020
|
return this.registers[e] = this.registers[e] || t;
|
|
@@ -2039,7 +2066,8 @@ var Q = class e {
|
|
|
2039
2066
|
return new e(t, this.opts, {
|
|
2040
2067
|
sync: this.sync,
|
|
2041
2068
|
globals: this.globals,
|
|
2042
|
-
strictVariables: this.strictVariables
|
|
2069
|
+
strictVariables: this.strictVariables,
|
|
2070
|
+
ownPropertyOnly: this.ownPropertyOnly
|
|
2043
2071
|
}, {
|
|
2044
2072
|
renderLimit: this.renderLimit,
|
|
2045
2073
|
memoryLimit: this.memoryLimit
|
|
@@ -2055,20 +2083,20 @@ var Q = class e {
|
|
|
2055
2083
|
readProperty(e, n) {
|
|
2056
2084
|
if (e = ne(e), n = f(n), p(e)) return e;
|
|
2057
2085
|
if (m(e) && n < 0) return e[e.length + +n];
|
|
2058
|
-
let r =
|
|
2059
|
-
return r === void 0 && e instanceof t ? e.liquidMethodMissing(n, this) : o(r) ? r.call(e) : n === "size" ?
|
|
2086
|
+
let r = Jn(e, n, this.ownPropertyOnly);
|
|
2087
|
+
return r === void 0 && e instanceof t ? e.liquidMethodMissing(n, this) : o(r) ? r.call(e) : n === "size" ? Zn(e) : n === "first" ? Yn(e) : n === "last" ? Xn(e) : r;
|
|
2060
2088
|
}
|
|
2061
2089
|
};
|
|
2062
|
-
function
|
|
2090
|
+
function Jn(e, n, r) {
|
|
2063
2091
|
if (!(r && !i.call(e, n) && !(e instanceof t))) return e[n];
|
|
2064
2092
|
}
|
|
2065
|
-
function
|
|
2093
|
+
function Yn(e) {
|
|
2066
2094
|
return m(e) ? e[0] : e.first;
|
|
2067
2095
|
}
|
|
2068
|
-
function
|
|
2096
|
+
function Xn(e) {
|
|
2069
2097
|
return m(e) ? e[e.length - 1] : e.last;
|
|
2070
2098
|
}
|
|
2071
|
-
function
|
|
2099
|
+
function Zn(e) {
|
|
2072
2100
|
if (i.call(e, "size") || e.size !== void 0) return e.size;
|
|
2073
2101
|
if (m(e) || a(e)) return e.length;
|
|
2074
2102
|
if (typeof e == "object") return Object.keys(e).length;
|
|
@@ -2077,75 +2105,75 @@ var $;
|
|
|
2077
2105
|
(function(e) {
|
|
2078
2106
|
e[e.OUTPUT = 0] = "OUTPUT", e[e.STORE = 1] = "STORE";
|
|
2079
2107
|
})($ ||= {});
|
|
2080
|
-
var
|
|
2081
|
-
function
|
|
2108
|
+
var Qn = v(Math.abs), $n = v(Math.max), er = v(Math.min), tr = v(Math.ceil), nr = v((e, t, n = !1) => n ? Math.floor(e / t) : e / t), rr = v(Math.floor), ir = v((e, t) => e - t), ar = v((e, t) => e + t), or = v((e, t) => e % t), sr = v((e, t) => e * t);
|
|
2109
|
+
function cr(e, t = 0) {
|
|
2082
2110
|
e = ee(e), t = ee(t);
|
|
2083
2111
|
let n = 10 ** t, r = e * n;
|
|
2084
2112
|
return Math.sign(e) * Math.round(Math.abs(r)) / n;
|
|
2085
2113
|
}
|
|
2086
|
-
var
|
|
2114
|
+
var lr = /* @__PURE__ */ Object.freeze({
|
|
2087
2115
|
__proto__: null,
|
|
2088
|
-
abs:
|
|
2089
|
-
at_least:
|
|
2090
|
-
at_most:
|
|
2091
|
-
ceil:
|
|
2092
|
-
divided_by:
|
|
2093
|
-
floor:
|
|
2094
|
-
minus:
|
|
2095
|
-
plus:
|
|
2096
|
-
modulo:
|
|
2097
|
-
times:
|
|
2098
|
-
round:
|
|
2099
|
-
}),
|
|
2116
|
+
abs: Qn,
|
|
2117
|
+
at_least: $n,
|
|
2118
|
+
at_most: er,
|
|
2119
|
+
ceil: tr,
|
|
2120
|
+
divided_by: nr,
|
|
2121
|
+
floor: rr,
|
|
2122
|
+
minus: ir,
|
|
2123
|
+
plus: ar,
|
|
2124
|
+
modulo: or,
|
|
2125
|
+
times: sr,
|
|
2126
|
+
round: cr
|
|
2127
|
+
}), ur = (e) => decodeURIComponent(l(e)).replace(/\+/g, " "), dr = (e) => encodeURIComponent(l(e)).replace(/%20/g, "+"), fr = (e) => encodeURIComponent(l(e)).replace(/%20/g, "+").replace(/[!'()*]/g, (e) => "%" + e.charCodeAt(0).toString(16).toUpperCase()), pr = (e) => encodeURI(l(e)).replace(/%5B/g, "[").replace(/%5D/g, "]"), mr = /[^\p{M}\p{L}\p{Nd}]+/gu, hr = {
|
|
2100
2128
|
raw: /\s+/g,
|
|
2101
|
-
default:
|
|
2129
|
+
default: mr,
|
|
2102
2130
|
pretty: /[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/gu,
|
|
2103
2131
|
ascii: /[^A-Za-z0-9]+/g,
|
|
2104
|
-
latin:
|
|
2132
|
+
latin: mr,
|
|
2105
2133
|
none: null
|
|
2106
2134
|
};
|
|
2107
|
-
function
|
|
2135
|
+
function gr(e, t = "default", n = !1) {
|
|
2108
2136
|
e = l(e);
|
|
2109
|
-
let r =
|
|
2110
|
-
return r && (t === "latin" && (e =
|
|
2137
|
+
let r = hr[t];
|
|
2138
|
+
return r && (t === "latin" && (e = _r(e)), e = e.replace(r, "-").replace(/^-|-$/g, "")), n ? e : e.toLowerCase();
|
|
2111
2139
|
}
|
|
2112
|
-
function
|
|
2140
|
+
function _r(e) {
|
|
2113
2141
|
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");
|
|
2114
2142
|
}
|
|
2115
|
-
var
|
|
2143
|
+
var vr = /* @__PURE__ */ Object.freeze({
|
|
2116
2144
|
__proto__: null,
|
|
2117
|
-
url_decode:
|
|
2118
|
-
url_encode:
|
|
2119
|
-
cgi_escape:
|
|
2120
|
-
uri_escape:
|
|
2121
|
-
slugify:
|
|
2122
|
-
}),
|
|
2145
|
+
url_decode: ur,
|
|
2146
|
+
url_encode: dr,
|
|
2147
|
+
cgi_escape: fr,
|
|
2148
|
+
uri_escape: pr,
|
|
2149
|
+
slugify: gr
|
|
2150
|
+
}), yr = _(function(e, t) {
|
|
2123
2151
|
let n = d(e), r = p(t) ? " " : l(t), i = n.length * (1 + r.length);
|
|
2124
2152
|
return this.context.memoryLimit.use(i), n.join(r);
|
|
2125
|
-
}),
|
|
2153
|
+
}), br = _((e) => ie(e) ? se(e) : ""), xr = _((e) => ie(e) ? e[0] : ""), Sr = _(function(e) {
|
|
2126
2154
|
let t = d(e);
|
|
2127
2155
|
return this.context.memoryLimit.use(t.length), [...t].reverse();
|
|
2128
2156
|
});
|
|
2129
|
-
function*
|
|
2157
|
+
function* Cr(e, t, n) {
|
|
2130
2158
|
let r = [], i = d(e);
|
|
2131
2159
|
this.context.memoryLimit.use(i.length);
|
|
2132
2160
|
for (let e of i) r.push([e, t ? yield this.context._getFromScope(e, l(t).split("."), !1) : e]);
|
|
2133
2161
|
return r.sort((e, t) => n(e[1], t[1])).map((e) => e[0]);
|
|
2134
2162
|
}
|
|
2135
|
-
function* Cr(e, t) {
|
|
2136
|
-
return yield* Sr.call(this, e, t, me);
|
|
2137
|
-
}
|
|
2138
2163
|
function* wr(e, t) {
|
|
2139
|
-
return yield*
|
|
2164
|
+
return yield* Cr.call(this, e, t, me);
|
|
2140
2165
|
}
|
|
2141
|
-
|
|
2142
|
-
|
|
2166
|
+
function* Tr(e, t) {
|
|
2167
|
+
return yield* Cr.call(this, e, t, he);
|
|
2168
|
+
}
|
|
2169
|
+
var Er = (e) => e && e.length || 0;
|
|
2170
|
+
function* Dr(e, t) {
|
|
2143
2171
|
let n = [], r = d(e);
|
|
2144
2172
|
this.context.memoryLimit.use(r.length);
|
|
2145
2173
|
for (let e of r) n.push(yield this.context._getFromScope(e, l(t), !1));
|
|
2146
2174
|
return n;
|
|
2147
2175
|
}
|
|
2148
|
-
function*
|
|
2176
|
+
function* Or(e, t) {
|
|
2149
2177
|
let n = 0, r = d(e);
|
|
2150
2178
|
for (let e of r) {
|
|
2151
2179
|
let r = Number(t ? yield this.context._getFromScope(e, l(t), !1) : e);
|
|
@@ -2153,49 +2181,49 @@ function* Dr(e, t) {
|
|
|
2153
2181
|
}
|
|
2154
2182
|
return n;
|
|
2155
2183
|
}
|
|
2156
|
-
function
|
|
2184
|
+
function kr(e) {
|
|
2157
2185
|
let t = d(e);
|
|
2158
2186
|
return this.context.memoryLimit.use(t.length), t.filter((e) => !p(f(e)));
|
|
2159
2187
|
}
|
|
2160
|
-
function
|
|
2188
|
+
function Ar(e, t = []) {
|
|
2161
2189
|
let n = d(e), r = d(t);
|
|
2162
2190
|
return this.context.memoryLimit.use(n.length + r.length), n.concat(r);
|
|
2163
2191
|
}
|
|
2164
|
-
function Ar(e, t) {
|
|
2165
|
-
return kr.call(this, e, [t]);
|
|
2166
|
-
}
|
|
2167
2192
|
function jr(e, t) {
|
|
2193
|
+
return Ar.call(this, e, [t]);
|
|
2194
|
+
}
|
|
2195
|
+
function Mr(e, t) {
|
|
2168
2196
|
let n = d(e);
|
|
2169
2197
|
this.context.memoryLimit.use(n.length);
|
|
2170
2198
|
let r = [...n];
|
|
2171
2199
|
return r.unshift(t), r;
|
|
2172
2200
|
}
|
|
2173
|
-
function
|
|
2201
|
+
function Nr(e) {
|
|
2174
2202
|
let t = [...d(e)];
|
|
2175
2203
|
return t.pop(), t;
|
|
2176
2204
|
}
|
|
2177
|
-
function
|
|
2205
|
+
function Pr(e) {
|
|
2178
2206
|
let t = d(e);
|
|
2179
2207
|
this.context.memoryLimit.use(t.length);
|
|
2180
2208
|
let n = [...t];
|
|
2181
2209
|
return n.shift(), n;
|
|
2182
2210
|
}
|
|
2183
|
-
function
|
|
2211
|
+
function Fr(e, t, n = 1) {
|
|
2184
2212
|
return e = f(e), p(e) ? [] : (m(e) || (e = l(e)), t = t < 0 ? e.length + t : t, this.context.memoryLimit.use(n), e.slice(t, t + n));
|
|
2185
2213
|
}
|
|
2186
|
-
function
|
|
2187
|
-
return this.context.opts.jekyllWhere ? (t) => Pe.is(e) ?
|
|
2214
|
+
function Ir(e) {
|
|
2215
|
+
return this.context.opts.jekyllWhere ? (t) => Pe.is(e) ? N(t, e) : m(t) ? Gt(t, e) : N(t, e) : e === void 0 ? (e) => j(e, this.context) : (t) => N(t, e);
|
|
2188
2216
|
}
|
|
2189
|
-
function*
|
|
2217
|
+
function* Lr(e, t, n, r) {
|
|
2190
2218
|
let i = [];
|
|
2191
2219
|
t = d(t), this.context.memoryLimit.use(t.length);
|
|
2192
|
-
let a = new
|
|
2193
|
-
for (let e of t) i.push(yield
|
|
2194
|
-
let o =
|
|
2220
|
+
let a = new I(l(n)).readScopeValue();
|
|
2221
|
+
for (let e of t) i.push(yield A(a, this.context.spawn(e)));
|
|
2222
|
+
let o = Ir.call(this, r);
|
|
2195
2223
|
return t.filter((t, n) => o(i[n]) === e);
|
|
2196
2224
|
}
|
|
2197
|
-
function*
|
|
2198
|
-
let i = [], a = new
|
|
2225
|
+
function* Rr(e, t, n, r) {
|
|
2226
|
+
let i = [], a = new z(l(r), this.liquid), o = d(t);
|
|
2199
2227
|
this.context.memoryLimit.use(o.length);
|
|
2200
2228
|
for (let t of o) {
|
|
2201
2229
|
this.context.push({ [n]: t });
|
|
@@ -2204,25 +2232,25 @@ function* Lr(e, t, n, r) {
|
|
|
2204
2232
|
}
|
|
2205
2233
|
return i;
|
|
2206
2234
|
}
|
|
2207
|
-
function* Rr(e, t, n) {
|
|
2208
|
-
return yield* Ir.call(this, !0, e, t, n);
|
|
2209
|
-
}
|
|
2210
2235
|
function* zr(e, t, n) {
|
|
2211
|
-
return yield*
|
|
2236
|
+
return yield* Lr.call(this, !0, e, t, n);
|
|
2212
2237
|
}
|
|
2213
2238
|
function* Br(e, t, n) {
|
|
2214
|
-
return yield* Lr.call(this, !
|
|
2239
|
+
return yield* Lr.call(this, !1, e, t, n);
|
|
2215
2240
|
}
|
|
2216
2241
|
function* Vr(e, t, n) {
|
|
2217
|
-
return yield*
|
|
2242
|
+
return yield* Rr.call(this, !0, e, t, n);
|
|
2243
|
+
}
|
|
2244
|
+
function* Hr(e, t, n) {
|
|
2245
|
+
return yield* Rr.call(this, !1, e, t, n);
|
|
2218
2246
|
}
|
|
2219
|
-
function*
|
|
2247
|
+
function* Ur(e, t) {
|
|
2220
2248
|
let n = /* @__PURE__ */ new Map();
|
|
2221
2249
|
e = u(e);
|
|
2222
|
-
let r = new
|
|
2250
|
+
let r = new I(l(t)).readScopeValue();
|
|
2223
2251
|
this.context.memoryLimit.use(e.length);
|
|
2224
2252
|
for (let t of e) {
|
|
2225
|
-
let e = yield
|
|
2253
|
+
let e = yield A(r, this.context.spawn(t));
|
|
2226
2254
|
n.has(e) || n.set(e, []), n.get(e).push(t);
|
|
2227
2255
|
}
|
|
2228
2256
|
return [...n.entries()].map(([e, t]) => ({
|
|
@@ -2230,8 +2258,8 @@ function* Hr(e, t) {
|
|
|
2230
2258
|
items: t
|
|
2231
2259
|
}));
|
|
2232
2260
|
}
|
|
2233
|
-
function*
|
|
2234
|
-
let r = /* @__PURE__ */ new Map(), i = new
|
|
2261
|
+
function* Wr(e, t, n) {
|
|
2262
|
+
let r = /* @__PURE__ */ new Map(), i = new z(l(n), this.liquid);
|
|
2235
2263
|
e = u(e), this.context.memoryLimit.use(e.length);
|
|
2236
2264
|
for (let n of e) {
|
|
2237
2265
|
this.context.push({ [t]: n });
|
|
@@ -2243,132 +2271,133 @@ function* Ur(e, t, n) {
|
|
|
2243
2271
|
items: t
|
|
2244
2272
|
}));
|
|
2245
2273
|
}
|
|
2246
|
-
function* Wr(e, t, n) {
|
|
2247
|
-
let r = new L(l(t)).readScopeValue(), i = d(e), a = Fr.call(this, n);
|
|
2248
|
-
for (let e = 0; e < i.length; e++) if (a(yield j(r, this.context.spawn(i[e])))) return [e, i[e]];
|
|
2249
|
-
}
|
|
2250
2274
|
function* Gr(e, t, n) {
|
|
2251
|
-
let r = new
|
|
2275
|
+
let r = new I(l(t)).readScopeValue(), i = d(e), a = Ir.call(this, n);
|
|
2276
|
+
for (let e = 0; e < i.length; e++) if (a(yield A(r, this.context.spawn(i[e])))) return [e, i[e]];
|
|
2277
|
+
}
|
|
2278
|
+
function* Kr(e, t, n) {
|
|
2279
|
+
let r = new z(l(n), this.liquid), i = d(e);
|
|
2252
2280
|
for (let e = 0; e < i.length; e++) {
|
|
2253
2281
|
this.context.push({ [t]: i[e] });
|
|
2254
2282
|
let n = yield r.value(this.context);
|
|
2255
2283
|
if (this.context.pop(), n) return [e, i[e]];
|
|
2256
2284
|
}
|
|
2257
2285
|
}
|
|
2258
|
-
function* Kr(e, t, n) {
|
|
2259
|
-
return !!(yield* Wr.call(this, e, t, n));
|
|
2260
|
-
}
|
|
2261
2286
|
function* qr(e, t, n) {
|
|
2262
2287
|
return !!(yield* Gr.call(this, e, t, n));
|
|
2263
2288
|
}
|
|
2264
2289
|
function* Jr(e, t, n) {
|
|
2265
|
-
|
|
2266
|
-
return r ? r[0] : void 0;
|
|
2290
|
+
return !!(yield* Kr.call(this, e, t, n));
|
|
2267
2291
|
}
|
|
2268
2292
|
function* Yr(e, t, n) {
|
|
2269
2293
|
let r = yield* Gr.call(this, e, t, n);
|
|
2270
2294
|
return r ? r[0] : void 0;
|
|
2271
2295
|
}
|
|
2272
2296
|
function* Xr(e, t, n) {
|
|
2273
|
-
let r = yield*
|
|
2274
|
-
return r ? r[
|
|
2297
|
+
let r = yield* Kr.call(this, e, t, n);
|
|
2298
|
+
return r ? r[0] : void 0;
|
|
2275
2299
|
}
|
|
2276
2300
|
function* Zr(e, t, n) {
|
|
2277
2301
|
let r = yield* Gr.call(this, e, t, n);
|
|
2278
2302
|
return r ? r[1] : void 0;
|
|
2279
2303
|
}
|
|
2280
|
-
function Qr(e) {
|
|
2304
|
+
function* Qr(e, t, n) {
|
|
2305
|
+
let r = yield* Kr.call(this, e, t, n);
|
|
2306
|
+
return r ? r[1] : void 0;
|
|
2307
|
+
}
|
|
2308
|
+
function $r(e) {
|
|
2281
2309
|
return e = d(e), this.context.memoryLimit.use(e.length), [...new Set(e)];
|
|
2282
2310
|
}
|
|
2283
|
-
function
|
|
2311
|
+
function ei(e, t = 1) {
|
|
2284
2312
|
if (e = f(e), p(e)) return [];
|
|
2285
2313
|
m(e) || (e = l(e)), this.context.memoryLimit.use(t);
|
|
2286
2314
|
let n = [...e].sort(() => Math.random() - .5);
|
|
2287
2315
|
return t === 1 ? n[0] : n.slice(0, t);
|
|
2288
2316
|
}
|
|
2289
|
-
var
|
|
2317
|
+
var ti = /* @__PURE__ */ Object.freeze({
|
|
2290
2318
|
__proto__: null,
|
|
2291
|
-
join:
|
|
2292
|
-
last:
|
|
2293
|
-
first:
|
|
2294
|
-
reverse:
|
|
2295
|
-
sort:
|
|
2296
|
-
sort_natural:
|
|
2297
|
-
size:
|
|
2298
|
-
map:
|
|
2299
|
-
sum:
|
|
2300
|
-
compact:
|
|
2301
|
-
concat:
|
|
2302
|
-
push:
|
|
2303
|
-
unshift:
|
|
2304
|
-
pop:
|
|
2305
|
-
shift:
|
|
2306
|
-
slice:
|
|
2307
|
-
where:
|
|
2308
|
-
reject:
|
|
2309
|
-
where_exp:
|
|
2310
|
-
reject_exp:
|
|
2311
|
-
group_by:
|
|
2312
|
-
group_by_exp:
|
|
2313
|
-
has:
|
|
2314
|
-
has_exp:
|
|
2315
|
-
find_index:
|
|
2316
|
-
find_index_exp:
|
|
2317
|
-
find:
|
|
2318
|
-
find_exp:
|
|
2319
|
-
uniq:
|
|
2320
|
-
sample:
|
|
2319
|
+
join: yr,
|
|
2320
|
+
last: br,
|
|
2321
|
+
first: xr,
|
|
2322
|
+
reverse: Sr,
|
|
2323
|
+
sort: wr,
|
|
2324
|
+
sort_natural: Tr,
|
|
2325
|
+
size: Er,
|
|
2326
|
+
map: Dr,
|
|
2327
|
+
sum: Or,
|
|
2328
|
+
compact: kr,
|
|
2329
|
+
concat: Ar,
|
|
2330
|
+
push: jr,
|
|
2331
|
+
unshift: Mr,
|
|
2332
|
+
pop: Nr,
|
|
2333
|
+
shift: Pr,
|
|
2334
|
+
slice: Fr,
|
|
2335
|
+
where: zr,
|
|
2336
|
+
reject: Br,
|
|
2337
|
+
where_exp: Vr,
|
|
2338
|
+
reject_exp: Hr,
|
|
2339
|
+
group_by: Ur,
|
|
2340
|
+
group_by_exp: Wr,
|
|
2341
|
+
has: qr,
|
|
2342
|
+
has_exp: Jr,
|
|
2343
|
+
find_index: Yr,
|
|
2344
|
+
find_index_exp: Xr,
|
|
2345
|
+
find: Zr,
|
|
2346
|
+
find_exp: Qr,
|
|
2347
|
+
uniq: $r,
|
|
2348
|
+
sample: ei
|
|
2321
2349
|
});
|
|
2322
|
-
function
|
|
2323
|
-
let r = (e?.length ?? 0) + (
|
|
2350
|
+
function ni(e, t, n) {
|
|
2351
|
+
let r = (e?.length ?? 0) + (n?.length ?? 0);
|
|
2324
2352
|
this.context.memoryLimit.use(r);
|
|
2325
|
-
let i =
|
|
2326
|
-
return i ? (t = f(t), t = p(t) ? this.context.opts.dateFormat : l(t),
|
|
2327
|
-
}
|
|
2328
|
-
function ni(e) {
|
|
2329
|
-
return ti.call(this, e, "%Y-%m-%dT%H:%M:%S%:z");
|
|
2353
|
+
let i = ci(e, this.context.opts, n);
|
|
2354
|
+
return i ? (t = f(t), t = p(t) ? this.context.opts.dateFormat : l(t), this.context.memoryLimit.use(t.length), rt(i, t, this.context.memoryLimit)) : e;
|
|
2330
2355
|
}
|
|
2331
2356
|
function ri(e) {
|
|
2332
|
-
return
|
|
2357
|
+
return ni.call(this, e, "%Y-%m-%dT%H:%M:%S%:z");
|
|
2333
2358
|
}
|
|
2334
|
-
function ii(e
|
|
2335
|
-
return
|
|
2359
|
+
function ii(e) {
|
|
2360
|
+
return ni.call(this, e, "%a, %d %b %Y %H:%M:%S %z");
|
|
2336
2361
|
}
|
|
2337
2362
|
function ai(e, t, n) {
|
|
2338
|
-
return
|
|
2363
|
+
return si.call(this, e, "%b", t, n);
|
|
2339
2364
|
}
|
|
2340
|
-
function oi(e, t, n
|
|
2341
|
-
|
|
2365
|
+
function oi(e, t, n) {
|
|
2366
|
+
return si.call(this, e, "%B", t, n);
|
|
2367
|
+
}
|
|
2368
|
+
function si(e, t, n, r) {
|
|
2369
|
+
let i = ci(e, this.context.opts);
|
|
2342
2370
|
if (!i) return e;
|
|
2371
|
+
let a = this.context.memoryLimit;
|
|
2343
2372
|
if (n === "ordinal") {
|
|
2344
2373
|
let e = i.getDate();
|
|
2345
|
-
return r === "US" ?
|
|
2374
|
+
return r === "US" ? rt(i, `${t} ${e}%q, %Y`, a) : rt(i, `${e}%q ${t} %Y`, a);
|
|
2346
2375
|
}
|
|
2347
|
-
return
|
|
2376
|
+
return rt(i, `%d ${t} %Y`, a);
|
|
2348
2377
|
}
|
|
2349
|
-
function
|
|
2378
|
+
function ci(e, t, n) {
|
|
2350
2379
|
let r, i = n ?? t.timezoneOffset, o = t.locale;
|
|
2351
|
-
if (e = f(e), !p(e)) return r = e === "now" || e === "today" ? new
|
|
2380
|
+
if (e = f(e), !p(e)) return r = e === "now" || e === "today" ? new k(Date.now(), o, i) : te(e) ? new k(e * 1e3, o, i) : a(e) ? /^\d+$/.test(e) ? new k(e * 1e3, o, i) : t.preserveTimezones && n === void 0 ? k.createDateFixedToTimezone(e, o) : new k(e, o, i) : new k(e, o, i), r.valid() ? r : void 0;
|
|
2352
2381
|
}
|
|
2353
|
-
var
|
|
2382
|
+
var li = /* @__PURE__ */ Object.freeze({
|
|
2354
2383
|
__proto__: null,
|
|
2355
|
-
date:
|
|
2356
|
-
date_to_xmlschema:
|
|
2357
|
-
date_to_rfc822:
|
|
2358
|
-
date_to_string:
|
|
2359
|
-
date_to_long_string:
|
|
2360
|
-
}),
|
|
2361
|
-
function
|
|
2384
|
+
date: ni,
|
|
2385
|
+
date_to_xmlschema: ri,
|
|
2386
|
+
date_to_rfc822: ii,
|
|
2387
|
+
date_to_string: ai,
|
|
2388
|
+
date_to_long_string: oi
|
|
2389
|
+
}), ui = /[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu, di = /[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;
|
|
2390
|
+
function fi(e, t) {
|
|
2362
2391
|
C(arguments.length === 2, "append expect 2 arguments");
|
|
2363
2392
|
let n = l(e), r = l(t);
|
|
2364
2393
|
return this.context.memoryLimit.use(n.length + r.length), n + r;
|
|
2365
2394
|
}
|
|
2366
|
-
function
|
|
2395
|
+
function pi(e, t) {
|
|
2367
2396
|
C(arguments.length === 2, "prepend expect 2 arguments");
|
|
2368
2397
|
let n = l(e), r = l(t);
|
|
2369
2398
|
return this.context.memoryLimit.use(n.length + r.length), r + n;
|
|
2370
2399
|
}
|
|
2371
|
-
function
|
|
2400
|
+
function mi(e, t) {
|
|
2372
2401
|
let n = l(e);
|
|
2373
2402
|
if (this.context.memoryLimit.use(n.length), t) {
|
|
2374
2403
|
t = l(t), this.context.memoryLimit.use(t.length);
|
|
@@ -2377,29 +2406,29 @@ function pi(e, t) {
|
|
|
2377
2406
|
}
|
|
2378
2407
|
return n.trimStart();
|
|
2379
2408
|
}
|
|
2380
|
-
function
|
|
2409
|
+
function hi(e) {
|
|
2381
2410
|
let t = l(e);
|
|
2382
2411
|
return this.context.memoryLimit.use(t.length), t.toLowerCase();
|
|
2383
2412
|
}
|
|
2384
|
-
function
|
|
2413
|
+
function gi(e) {
|
|
2385
2414
|
let t = l(e);
|
|
2386
2415
|
return this.context.memoryLimit.use(t.length), l(t).toUpperCase();
|
|
2387
2416
|
}
|
|
2388
|
-
function
|
|
2417
|
+
function _i(e, t) {
|
|
2389
2418
|
let n = l(e);
|
|
2390
2419
|
return t = l(t), this.context.memoryLimit.use(n.length + t.length), n.split(t).join("");
|
|
2391
2420
|
}
|
|
2392
|
-
function
|
|
2421
|
+
function vi(e, t) {
|
|
2393
2422
|
let n = l(e);
|
|
2394
2423
|
return t = l(t), this.context.memoryLimit.use(n.length + t.length), n.replace(t, "");
|
|
2395
2424
|
}
|
|
2396
|
-
function
|
|
2425
|
+
function yi(e, t) {
|
|
2397
2426
|
let n = l(e), r = l(t);
|
|
2398
2427
|
this.context.memoryLimit.use(n.length + r.length);
|
|
2399
2428
|
let i = n.lastIndexOf(r);
|
|
2400
2429
|
return i === -1 ? n : n.substring(0, i) + n.substring(i + r.length);
|
|
2401
2430
|
}
|
|
2402
|
-
function
|
|
2431
|
+
function bi(e, t) {
|
|
2403
2432
|
if (e = l(e), this.context.memoryLimit.use(e.length), t) {
|
|
2404
2433
|
t = l(t), this.context.memoryLimit.use(t.length);
|
|
2405
2434
|
for (let n = e.length - 1, r = new Set(t); n >= 0; n--) if (!r.has(e[n])) return e.slice(0, n + 1);
|
|
@@ -2407,14 +2436,14 @@ function yi(e, t) {
|
|
|
2407
2436
|
}
|
|
2408
2437
|
return e.trimEnd();
|
|
2409
2438
|
}
|
|
2410
|
-
function
|
|
2439
|
+
function xi(e, t) {
|
|
2411
2440
|
let n = l(e);
|
|
2412
2441
|
this.context.memoryLimit.use(n.length);
|
|
2413
2442
|
let r = n.split(l(t));
|
|
2414
2443
|
for (; r.length && r[r.length - 1] === "";) r.pop();
|
|
2415
2444
|
return r;
|
|
2416
2445
|
}
|
|
2417
|
-
function
|
|
2446
|
+
function Si(e, t) {
|
|
2418
2447
|
let n = l(e);
|
|
2419
2448
|
if (this.context.memoryLimit.use(n.length), t) {
|
|
2420
2449
|
let e = new Set(l(t));
|
|
@@ -2426,34 +2455,34 @@ function xi(e, t) {
|
|
|
2426
2455
|
}
|
|
2427
2456
|
return n.trim();
|
|
2428
2457
|
}
|
|
2429
|
-
function
|
|
2458
|
+
function Ci(e) {
|
|
2430
2459
|
let t = l(e);
|
|
2431
2460
|
return this.context.memoryLimit.use(t.length), t.replace(/\r?\n/gm, "");
|
|
2432
2461
|
}
|
|
2433
|
-
function
|
|
2462
|
+
function wi(e) {
|
|
2434
2463
|
return e = l(e), this.context.memoryLimit.use(e.length), e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
|
|
2435
2464
|
}
|
|
2436
|
-
function
|
|
2465
|
+
function Ti(e, t, n) {
|
|
2437
2466
|
let r = l(e);
|
|
2438
2467
|
t = l(t), n = l(n);
|
|
2439
2468
|
let i = r.split(t), a = r.length + (i.length - 1) * (n.length - t.length);
|
|
2440
2469
|
return this.context.memoryLimit.use(a), i.join(n);
|
|
2441
2470
|
}
|
|
2442
|
-
function
|
|
2471
|
+
function Ei(e, t, n) {
|
|
2443
2472
|
let r = l(e);
|
|
2444
2473
|
return t = l(t), n = l(n), this.context.memoryLimit.use(r.length + t.length + n.length), r.replace(t, () => n);
|
|
2445
2474
|
}
|
|
2446
|
-
function
|
|
2475
|
+
function Di(e, t, n) {
|
|
2447
2476
|
let r = l(e), i = l(t), a = l(n);
|
|
2448
2477
|
this.context.memoryLimit.use(r.length + i.length + a.length);
|
|
2449
2478
|
let o = r.lastIndexOf(i);
|
|
2450
2479
|
return o === -1 ? r : r.substring(0, o) + a + r.substring(o + i.length);
|
|
2451
2480
|
}
|
|
2452
|
-
function
|
|
2481
|
+
function Oi(e, t = 50, n = "...") {
|
|
2453
2482
|
let r = l(e);
|
|
2454
2483
|
return n = l(n), this.context.memoryLimit.use(r.length + n.length), r.length <= t ? e : r.substring(0, t - n.length) + n;
|
|
2455
2484
|
}
|
|
2456
|
-
function
|
|
2485
|
+
function ki(e, t = 15, n = "...") {
|
|
2457
2486
|
let r = l(e);
|
|
2458
2487
|
n = l(n), this.context.memoryLimit.use(r.length + n.length);
|
|
2459
2488
|
let i = r.split(/\s+/);
|
|
@@ -2461,20 +2490,20 @@ function Oi(e, t = 15, n = "...") {
|
|
|
2461
2490
|
let a = i.slice(0, t).join(" ");
|
|
2462
2491
|
return i.length >= t && (a += n), a;
|
|
2463
2492
|
}
|
|
2464
|
-
function
|
|
2493
|
+
function Ai(e) {
|
|
2465
2494
|
let t = l(e);
|
|
2466
2495
|
return this.context.memoryLimit.use(t.length), t.replace(/\s+/g, " ");
|
|
2467
2496
|
}
|
|
2468
|
-
function
|
|
2497
|
+
function ji(e, t) {
|
|
2469
2498
|
let n = l(e);
|
|
2470
2499
|
if (this.context.memoryLimit.use(n.length), e = n.trim(), !e) return 0;
|
|
2471
2500
|
switch (t) {
|
|
2472
|
-
case "cjk": return (e.match(
|
|
2473
|
-
case "auto": return
|
|
2501
|
+
case "cjk": return (e.match(ui) || []).length + (e.match(di) || []).length;
|
|
2502
|
+
case "auto": return ui.test(e) ? e.match(ui).length + (e.match(di) || []).length : e.split(/\s+/).length;
|
|
2474
2503
|
default: return e.split(/\s+/).length;
|
|
2475
2504
|
}
|
|
2476
2505
|
}
|
|
2477
|
-
function
|
|
2506
|
+
function Mi(e, t = "and") {
|
|
2478
2507
|
switch (t = l(t), this.context.memoryLimit.use(e.length + t.length), e.length) {
|
|
2479
2508
|
case 0: return "";
|
|
2480
2509
|
case 1: return e[0];
|
|
@@ -2482,52 +2511,85 @@ function ji(e, t = "and") {
|
|
|
2482
2511
|
default: return `${e.slice(0, -1).join(", ")}, ${t} ${e[e.length - 1]}`;
|
|
2483
2512
|
}
|
|
2484
2513
|
}
|
|
2485
|
-
var
|
|
2514
|
+
var Ni = /* @__PURE__ */ Object.freeze({
|
|
2486
2515
|
__proto__: null,
|
|
2487
|
-
append:
|
|
2488
|
-
prepend:
|
|
2489
|
-
lstrip:
|
|
2490
|
-
downcase:
|
|
2491
|
-
upcase:
|
|
2492
|
-
remove:
|
|
2493
|
-
remove_first:
|
|
2494
|
-
remove_last:
|
|
2495
|
-
rstrip:
|
|
2496
|
-
split:
|
|
2497
|
-
strip:
|
|
2498
|
-
strip_newlines:
|
|
2499
|
-
capitalize:
|
|
2500
|
-
replace:
|
|
2501
|
-
replace_first:
|
|
2502
|
-
replace_last:
|
|
2503
|
-
truncate:
|
|
2504
|
-
truncatewords:
|
|
2505
|
-
normalize_whitespace:
|
|
2506
|
-
number_of_words:
|
|
2507
|
-
array_to_sentence_string:
|
|
2516
|
+
append: fi,
|
|
2517
|
+
prepend: pi,
|
|
2518
|
+
lstrip: mi,
|
|
2519
|
+
downcase: hi,
|
|
2520
|
+
upcase: gi,
|
|
2521
|
+
remove: _i,
|
|
2522
|
+
remove_first: vi,
|
|
2523
|
+
remove_last: yi,
|
|
2524
|
+
rstrip: bi,
|
|
2525
|
+
split: xi,
|
|
2526
|
+
strip: Si,
|
|
2527
|
+
strip_newlines: Ci,
|
|
2528
|
+
capitalize: wi,
|
|
2529
|
+
replace: Ti,
|
|
2530
|
+
replace_first: Ei,
|
|
2531
|
+
replace_last: Di,
|
|
2532
|
+
truncate: Oi,
|
|
2533
|
+
truncatewords: ki,
|
|
2534
|
+
normalize_whitespace: Ai,
|
|
2535
|
+
number_of_words: ji,
|
|
2536
|
+
array_to_sentence_string: Mi
|
|
2508
2537
|
});
|
|
2509
|
-
function
|
|
2538
|
+
function Pi(e) {
|
|
2510
2539
|
return btoa(String.fromCharCode(...new TextEncoder().encode(e)));
|
|
2511
2540
|
}
|
|
2512
|
-
function
|
|
2541
|
+
function Fi(e) {
|
|
2513
2542
|
return new TextDecoder().decode(Uint8Array.from(atob(e), (e) => e.charCodeAt(0)));
|
|
2514
2543
|
}
|
|
2515
|
-
function
|
|
2544
|
+
function Ii(e) {
|
|
2516
2545
|
if (typeof Buffer < "u" && Buffer.isBuffer(e)) return this.context.memoryLimit.use(e.byteLength), e.toString("base64");
|
|
2517
2546
|
let t = l(e);
|
|
2518
|
-
return this.context.memoryLimit.use(t.length),
|
|
2547
|
+
return this.context.memoryLimit.use(t.length), Pi(t);
|
|
2519
2548
|
}
|
|
2520
|
-
function
|
|
2549
|
+
function Li(e) {
|
|
2521
2550
|
let t = l(e);
|
|
2522
|
-
return this.context.memoryLimit.use(t.length),
|
|
2551
|
+
return this.context.memoryLimit.use(t.length), Fi(t);
|
|
2523
2552
|
}
|
|
2524
|
-
var
|
|
2553
|
+
var Ri = /* @__PURE__ */ Object.freeze({
|
|
2525
2554
|
__proto__: null,
|
|
2526
|
-
base64_encode:
|
|
2527
|
-
base64_decode:
|
|
2528
|
-
})
|
|
2555
|
+
base64_encode: Ii,
|
|
2556
|
+
base64_decode: Li
|
|
2557
|
+
});
|
|
2558
|
+
function zi(e) {
|
|
2559
|
+
let t = new Uint8Array(e), n = "";
|
|
2560
|
+
for (let e = 0; e < t.length; e++) n += t[e].toString(16).padStart(2, "0");
|
|
2561
|
+
return n;
|
|
2562
|
+
}
|
|
2563
|
+
function Bi(e) {
|
|
2564
|
+
return E(this, void 0, void 0, function* () {
|
|
2565
|
+
let t = new TextEncoder().encode(e);
|
|
2566
|
+
return zi(yield crypto.subtle.digest("SHA-256", t));
|
|
2567
|
+
});
|
|
2568
|
+
}
|
|
2569
|
+
function Vi(e, t) {
|
|
2570
|
+
return E(this, void 0, void 0, function* () {
|
|
2571
|
+
let n = new TextEncoder(), r = yield crypto.subtle.importKey("raw", n.encode(t), {
|
|
2572
|
+
name: "HMAC",
|
|
2573
|
+
hash: "SHA-256"
|
|
2574
|
+
}, !1, ["sign"]);
|
|
2575
|
+
return zi(yield crypto.subtle.sign("HMAC", r, n.encode(e)));
|
|
2576
|
+
});
|
|
2577
|
+
}
|
|
2578
|
+
function Hi(e) {
|
|
2579
|
+
let t = l(e);
|
|
2580
|
+
return this.context.memoryLimit.use(t.length), Bi(t);
|
|
2581
|
+
}
|
|
2582
|
+
function Ui(e, t) {
|
|
2583
|
+
let n = l(e), r = l(t);
|
|
2584
|
+
return this.context.memoryLimit.use(n.length + r.length), Vi(n, r);
|
|
2585
|
+
}
|
|
2586
|
+
var Wi = /* @__PURE__ */ Object.freeze({
|
|
2587
|
+
__proto__: null,
|
|
2588
|
+
sha256: Hi,
|
|
2589
|
+
hmac_sha256: Ui
|
|
2590
|
+
}), Gi = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, gn), lr), vr), ti), li), Ni), Ri), Wi), sn), Ki = class extends L {
|
|
2529
2591
|
constructor(e, t, n) {
|
|
2530
|
-
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
|
|
2592
|
+
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 z(this.tokenizer.readFilteredValue(), this.liquid);
|
|
2531
2593
|
}
|
|
2532
2594
|
*render(e) {
|
|
2533
2595
|
e.bottom()[this.key] = yield this.value.value(e, this.liquid.options.lenientIf);
|
|
@@ -2538,16 +2600,16 @@ var Li = /* @__PURE__ */ Object.freeze({
|
|
|
2538
2600
|
*localScope() {
|
|
2539
2601
|
yield this.identifier;
|
|
2540
2602
|
}
|
|
2541
|
-
},
|
|
2603
|
+
}, qi = [
|
|
2542
2604
|
"offset",
|
|
2543
2605
|
"limit",
|
|
2544
2606
|
"reversed"
|
|
2545
|
-
],
|
|
2607
|
+
], Ji = class extends L {
|
|
2546
2608
|
constructor(e, t, n, r) {
|
|
2547
2609
|
super(e, t, n);
|
|
2548
2610
|
let i = this.tokenizer.readIdentifier(), a = this.tokenizer.readIdentifier(), o = this.tokenizer.readValue();
|
|
2549
2611
|
if (!i.size() || a.content !== "in" || !o) throw Error(`illegal tag: ${e.getText()}`);
|
|
2550
|
-
this.variable = i.content, this.collection = o, this.hash = new
|
|
2612
|
+
this.variable = i.content, this.collection = o, this.hash = new R(this.tokenizer, n.options.keyValueSeparator), this.templates = [], this.elseTemplates = [];
|
|
2551
2613
|
let s, c = r.parseStream(t).on("start", () => s = this.templates).on("tag:else", (e) => {
|
|
2552
2614
|
w(e.args), s = this.elseTemplates;
|
|
2553
2615
|
}).on("tag:endfor", (e) => {
|
|
@@ -2558,16 +2620,16 @@ var Li = /* @__PURE__ */ Object.freeze({
|
|
|
2558
2620
|
c.start();
|
|
2559
2621
|
}
|
|
2560
2622
|
*render(e, t) {
|
|
2561
|
-
let n = this.liquid.renderer, r = u(yield
|
|
2623
|
+
let n = this.liquid.renderer, r = u(yield A(this.collection, e));
|
|
2562
2624
|
if (!r.length) {
|
|
2563
2625
|
yield n.renderTemplates(this.elseTemplates, e, t);
|
|
2564
2626
|
return;
|
|
2565
2627
|
}
|
|
2566
2628
|
let i = "continue-" + this.variable + "-" + this.collection.getText();
|
|
2567
|
-
e.push({ continue: e.getRegister(i, {}) });
|
|
2629
|
+
e.push(Z({ continue: e.getRegister(i, {}) }));
|
|
2568
2630
|
let a = yield this.hash.render(e);
|
|
2569
|
-
e.pop(), r = (this.liquid.options.orderedFilterParameters ? Object.keys(a).filter((e) =>
|
|
2570
|
-
let o = { forloop: new Ie(r.length, this.collection.getText(), this.variable) };
|
|
2631
|
+
e.pop(), r = (this.liquid.options.orderedFilterParameters ? Object.keys(a).filter((e) => qi.includes(e)) : qi.filter((e) => a[e] !== void 0)).reduce((e, t) => t === "offset" ? Xi(e, a.offset) : t === "limit" ? Zi(e, a.limit) : Yi(e), r), e.setRegister(i, (a.offset || 0) + r.length);
|
|
2632
|
+
let o = Z({ forloop: new Ie(r.length, this.collection.getText(), this.variable) });
|
|
2571
2633
|
e.push(o);
|
|
2572
2634
|
for (let i of r) {
|
|
2573
2635
|
if (o[this.variable] = i, e.continueCalled = e.breakCalled = !1, yield n.renderTemplates(this.templates, e, t), e.breakCalled) break;
|
|
@@ -2581,26 +2643,26 @@ var Li = /* @__PURE__ */ Object.freeze({
|
|
|
2581
2643
|
}
|
|
2582
2644
|
*arguments() {
|
|
2583
2645
|
yield this.collection;
|
|
2584
|
-
for (let e of Object.values(this.hash.hash))
|
|
2646
|
+
for (let e of Object.values(this.hash.hash)) Y(e) && (yield e);
|
|
2585
2647
|
}
|
|
2586
2648
|
blockScope() {
|
|
2587
2649
|
return [this.variable, "forloop"];
|
|
2588
2650
|
}
|
|
2589
2651
|
};
|
|
2590
|
-
function
|
|
2652
|
+
function Yi(e) {
|
|
2591
2653
|
return [...e].reverse();
|
|
2592
2654
|
}
|
|
2593
|
-
function
|
|
2655
|
+
function Xi(e, t) {
|
|
2594
2656
|
return e.slice(t);
|
|
2595
2657
|
}
|
|
2596
|
-
function
|
|
2658
|
+
function Zi(e, t) {
|
|
2597
2659
|
return e.slice(0, t);
|
|
2598
2660
|
}
|
|
2599
|
-
var
|
|
2661
|
+
var Qi = class extends L {
|
|
2600
2662
|
constructor(e, t, n, r) {
|
|
2601
2663
|
for (super(e, t, n), this.templates = [], this.identifier = this.readVariable(), this.variable = this.identifier.content; t.length;) {
|
|
2602
2664
|
let e = t.shift();
|
|
2603
|
-
if (
|
|
2665
|
+
if (J(e) && e.name === "endcapture") return;
|
|
2604
2666
|
this.templates.push(r.parseToken(e, t));
|
|
2605
2667
|
}
|
|
2606
2668
|
throw Error(`tag ${e.getText()} not closed`);
|
|
@@ -2620,9 +2682,9 @@ var Gi = class extends R {
|
|
|
2620
2682
|
*localScope() {
|
|
2621
2683
|
yield this.identifier;
|
|
2622
2684
|
}
|
|
2623
|
-
},
|
|
2685
|
+
}, $i = class extends L {
|
|
2624
2686
|
constructor(e, t, n, r) {
|
|
2625
|
-
super(e, t, n), this.branches = [], this.elseTemplates = [], this.value = new
|
|
2687
|
+
super(e, t, n), this.branches = [], this.elseTemplates = [], this.value = new z(this.tokenizer.readFilteredValue(), this.liquid), this.elseTemplates = [];
|
|
2626
2688
|
let i = [], a = 0, o = r.parseStream(t).on("tag:when", (e) => {
|
|
2627
2689
|
if (a > 0) return;
|
|
2628
2690
|
i = [];
|
|
@@ -2643,7 +2705,7 @@ var Gi = class extends R {
|
|
|
2643
2705
|
}
|
|
2644
2706
|
*render(e, t) {
|
|
2645
2707
|
let n = this.liquid.renderer, r = f(yield this.value.value(e, e.opts.lenientIf)), i = !1;
|
|
2646
|
-
for (let a of this.branches) for (let o of a.values) if (
|
|
2708
|
+
for (let a of this.branches) for (let o of a.values) if (N(r, yield A(o, e, e.opts.lenientIf))) {
|
|
2647
2709
|
yield n.renderTemplates(a.templates, e, t), i = !0;
|
|
2648
2710
|
break;
|
|
2649
2711
|
}
|
|
@@ -2656,20 +2718,20 @@ var Gi = class extends R {
|
|
|
2656
2718
|
let e = this.branches.flatMap((e) => e.templates);
|
|
2657
2719
|
return this.elseTemplates && e.push(...this.elseTemplates), e;
|
|
2658
2720
|
}
|
|
2659
|
-
},
|
|
2721
|
+
}, ea = class extends L {
|
|
2660
2722
|
constructor(e, t, n) {
|
|
2661
2723
|
for (super(e, t, n); t.length;) {
|
|
2662
2724
|
let e = t.shift();
|
|
2663
|
-
if (
|
|
2725
|
+
if (J(e) && e.name === "endcomment") return;
|
|
2664
2726
|
}
|
|
2665
2727
|
throw Error(`tag ${e.getText()} not closed`);
|
|
2666
2728
|
}
|
|
2667
2729
|
render() {}
|
|
2668
|
-
},
|
|
2730
|
+
}, ta = class extends L {
|
|
2669
2731
|
constructor(e, t, n, r) {
|
|
2670
2732
|
super(e, t, n);
|
|
2671
2733
|
let i = this.tokenizer;
|
|
2672
|
-
for (this.file =
|
|
2734
|
+
for (this.file = na(i, this.liquid, r), this.currentFile = e.file; !i.end();) {
|
|
2673
2735
|
i.skipBlank();
|
|
2674
2736
|
let e = i.p, t = i.readIdentifier();
|
|
2675
2737
|
if ((t.content === "with" || t.content === "for") && (i.skipBlank(), i.peek() !== ":")) {
|
|
@@ -2686,18 +2748,18 @@ var Gi = class extends R {
|
|
|
2686
2748
|
i.p = e;
|
|
2687
2749
|
break;
|
|
2688
2750
|
}
|
|
2689
|
-
this.hash = new
|
|
2751
|
+
this.hash = new R(i, n.options.keyValueSeparator);
|
|
2690
2752
|
}
|
|
2691
2753
|
*render(e, t) {
|
|
2692
|
-
let { liquid: n, hash: r } = this, i = yield
|
|
2754
|
+
let { liquid: n, hash: r } = this, i = yield ia(this.file, e, n);
|
|
2693
2755
|
C(i, () => `illegal file path "${i}"`);
|
|
2694
2756
|
let a = e.spawn(), o = a.bottom();
|
|
2695
2757
|
if (We(o, yield r.render(e)), this.with) {
|
|
2696
2758
|
let { value: t, alias: n } = this.with;
|
|
2697
|
-
o[n || i] = yield
|
|
2759
|
+
o[n || i] = yield A(t, e);
|
|
2698
2760
|
}
|
|
2699
2761
|
if (this.for) {
|
|
2700
|
-
let { value: r, alias: s } = this.for, c = u(yield
|
|
2762
|
+
let { value: r, alias: s } = this.for, c = u(yield A(r, e));
|
|
2701
2763
|
o.forloop = new Ie(c.length, r.getText(), s);
|
|
2702
2764
|
for (let e of c) {
|
|
2703
2765
|
o[s] = e;
|
|
@@ -2731,48 +2793,48 @@ var Gi = class extends R {
|
|
|
2731
2793
|
}
|
|
2732
2794
|
}
|
|
2733
2795
|
*arguments() {
|
|
2734
|
-
for (let e of Object.values(this.hash.hash))
|
|
2796
|
+
for (let e of Object.values(this.hash.hash)) Y(e) && (yield e);
|
|
2735
2797
|
if (this.with) {
|
|
2736
2798
|
let { value: e } = this.with;
|
|
2737
|
-
|
|
2799
|
+
Y(e) && (yield e);
|
|
2738
2800
|
}
|
|
2739
2801
|
if (this.for) {
|
|
2740
2802
|
let { value: e } = this.for;
|
|
2741
|
-
|
|
2803
|
+
Y(e) && (yield e);
|
|
2742
2804
|
}
|
|
2743
2805
|
}
|
|
2744
2806
|
};
|
|
2745
|
-
function
|
|
2807
|
+
function na(e, t, n) {
|
|
2746
2808
|
if (t.options.dynamicPartials) {
|
|
2747
2809
|
let t = e.readValue();
|
|
2748
|
-
return e.assert(t, "illegal file path"), t.getText() === "none" ? void 0 :
|
|
2810
|
+
return e.assert(t, "illegal file path"), t.getText() === "none" ? void 0 : Un(t) ? ra(n.parse(Bt(t))) : t;
|
|
2749
2811
|
}
|
|
2750
|
-
let r = [...e.readFileNameTemplate(t.options)], i =
|
|
2812
|
+
let r = [...e.readFileNameTemplate(t.options)], i = ra(n.parseTokens(r));
|
|
2751
2813
|
return i === "none" ? void 0 : i;
|
|
2752
2814
|
}
|
|
2753
|
-
function
|
|
2754
|
-
return e.length === 1 &&
|
|
2815
|
+
function ra(e) {
|
|
2816
|
+
return e.length === 1 && Vn(e[0].token) ? e[0].token.getContent() : e;
|
|
2755
2817
|
}
|
|
2756
|
-
function*
|
|
2757
|
-
return typeof e == "string" ? e : Array.isArray(e) ? n.renderer.renderTemplates(e, t) : yield
|
|
2818
|
+
function* ia(e, t, n) {
|
|
2819
|
+
return typeof e == "string" ? e : Array.isArray(e) ? n.renderer.renderTemplates(e, t) : yield A(e, t);
|
|
2758
2820
|
}
|
|
2759
|
-
var
|
|
2821
|
+
var aa = class extends L {
|
|
2760
2822
|
constructor(e, t, n, r) {
|
|
2761
2823
|
super(e, t, n);
|
|
2762
2824
|
let { tokenizer: i } = e;
|
|
2763
|
-
this.file =
|
|
2825
|
+
this.file = na(i, this.liquid, r), this.currentFile = e.file;
|
|
2764
2826
|
let a = i.p;
|
|
2765
|
-
i.readIdentifier().content === "with" ? (i.skipBlank(), i.peek() === ":" ? i.p = a : this.withVar = i.readValue()) : i.p = a, this.hash = new
|
|
2827
|
+
i.readIdentifier().content === "with" ? (i.skipBlank(), i.peek() === ":" ? i.p = a : this.withVar = i.readValue()) : i.p = a, this.hash = new R(i, n.options.jekyllInclude || n.options.keyValueSeparator);
|
|
2766
2828
|
}
|
|
2767
2829
|
*render(e, t) {
|
|
2768
|
-
let { liquid: n, hash: r, withVar: i } = this, { renderer: a } = n, o = yield
|
|
2830
|
+
let { liquid: n, hash: r, withVar: i } = this, { renderer: a } = n, o = yield ia(this.file, e, n);
|
|
2769
2831
|
C(o, () => `illegal file path "${o}"`);
|
|
2770
2832
|
let s = e.saveRegister("blocks", "blockMode");
|
|
2771
2833
|
e.setRegister("blocks", {}), e.setRegister("blockMode", $.OUTPUT);
|
|
2772
|
-
let c = yield r.render(e);
|
|
2773
|
-
i && (c[o] = yield
|
|
2834
|
+
let c = Z(yield r.render(e));
|
|
2835
|
+
i && (c[o] = yield A(i, e));
|
|
2774
2836
|
let l = yield n._parsePartialFile(o, e.sync, this.currentFile);
|
|
2775
|
-
e.push(e.opts.jekyllInclude ? { include: c } : c), yield a.renderTemplates(l, e, t), e.pop(), e.restoreRegister(s);
|
|
2837
|
+
e.push(e.opts.jekyllInclude ? Z({ include: c }) : c), yield a.renderTemplates(l, e, t), e.pop(), e.restoreRegister(s);
|
|
2776
2838
|
}
|
|
2777
2839
|
*children(e, t) {
|
|
2778
2840
|
return e && a(this.file) ? yield this.liquid._parsePartialFile(this.file, t, this.currentFile) : [];
|
|
@@ -2788,9 +2850,9 @@ var Qi = class extends R {
|
|
|
2788
2850
|
}
|
|
2789
2851
|
}
|
|
2790
2852
|
*arguments() {
|
|
2791
|
-
yield* Object.values(this.hash.hash).filter(
|
|
2853
|
+
yield* Object.values(this.hash.hash).filter(Y), Y(this.file) && (yield this.file), Y(this.withVar) && (yield this.withVar);
|
|
2792
2854
|
}
|
|
2793
|
-
},
|
|
2855
|
+
}, oa = class extends L {
|
|
2794
2856
|
constructor(e, t, n) {
|
|
2795
2857
|
super(e, t, n), this.identifier = this.tokenizer.readIdentifier(), this.variable = this.identifier.content;
|
|
2796
2858
|
}
|
|
@@ -2801,7 +2863,7 @@ var Qi = class extends R {
|
|
|
2801
2863
|
*localScope() {
|
|
2802
2864
|
yield this.identifier;
|
|
2803
2865
|
}
|
|
2804
|
-
},
|
|
2866
|
+
}, sa = class extends L {
|
|
2805
2867
|
constructor(e, t, n) {
|
|
2806
2868
|
super(e, t, n), this.candidates = [];
|
|
2807
2869
|
let r = this.tokenizer.readValue();
|
|
@@ -2812,24 +2874,24 @@ var Qi = class extends R {
|
|
|
2812
2874
|
this.tokenizer.assert(this.candidates.length, () => `empty candidates: "${e.getText()}"`);
|
|
2813
2875
|
}
|
|
2814
2876
|
*render(e, t) {
|
|
2815
|
-
let n = `cycle:${yield
|
|
2877
|
+
let n = `cycle:${yield A(this.group, e)}:` + this.candidates.join(","), r = e.getRegister("cycle", {}), i = r[n];
|
|
2816
2878
|
i === void 0 && (i = r[n] = 0);
|
|
2817
2879
|
let a = this.candidates[i];
|
|
2818
|
-
return i = (i + 1) % this.candidates.length, r[n] = i, yield
|
|
2880
|
+
return i = (i + 1) % this.candidates.length, r[n] = i, yield A(a, e);
|
|
2819
2881
|
}
|
|
2820
2882
|
*arguments() {
|
|
2821
2883
|
yield* this.candidates, this.group && (yield this.group);
|
|
2822
2884
|
}
|
|
2823
|
-
},
|
|
2885
|
+
}, ca = class extends L {
|
|
2824
2886
|
constructor(e, t, n, r) {
|
|
2825
2887
|
super(e, t, n), this.branches = [];
|
|
2826
2888
|
let i = [];
|
|
2827
2889
|
r.parseStream(t).on("start", () => this.branches.push({
|
|
2828
|
-
value: new
|
|
2890
|
+
value: new z(e.tokenizer.readFilteredValue(), this.liquid),
|
|
2829
2891
|
templates: i = []
|
|
2830
2892
|
})).on("tag:elsif", (e) => {
|
|
2831
2893
|
C(!this.elseTemplates, "unexpected elsif after else"), this.branches.push({
|
|
2832
|
-
value: new
|
|
2894
|
+
value: new z(e.tokenizer.readFilteredValue(), this.liquid),
|
|
2833
2895
|
templates: i = []
|
|
2834
2896
|
});
|
|
2835
2897
|
}).on("tag:else", (e) => {
|
|
@@ -2842,7 +2904,7 @@ var Qi = class extends R {
|
|
|
2842
2904
|
}
|
|
2843
2905
|
*render(e, t) {
|
|
2844
2906
|
let n = this.liquid.renderer;
|
|
2845
|
-
for (let { value: r, templates: i } of this.branches) if (
|
|
2907
|
+
for (let { value: r, templates: i } of this.branches) if (j(yield r.value(e, e.opts.lenientIf), e)) {
|
|
2846
2908
|
yield n.renderTemplates(i, e, t);
|
|
2847
2909
|
return;
|
|
2848
2910
|
}
|
|
@@ -2855,7 +2917,7 @@ var Qi = class extends R {
|
|
|
2855
2917
|
arguments() {
|
|
2856
2918
|
return this.branches.map((e) => e.value);
|
|
2857
2919
|
}
|
|
2858
|
-
},
|
|
2920
|
+
}, la = class extends L {
|
|
2859
2921
|
constructor(e, t, n) {
|
|
2860
2922
|
super(e, t, n), this.identifier = this.tokenizer.readIdentifier(), this.variable = this.identifier.content;
|
|
2861
2923
|
}
|
|
@@ -2868,9 +2930,9 @@ var Qi = class extends R {
|
|
|
2868
2930
|
*localScope() {
|
|
2869
2931
|
yield this.identifier;
|
|
2870
2932
|
}
|
|
2871
|
-
},
|
|
2933
|
+
}, ua = class extends L {
|
|
2872
2934
|
constructor(e, t, n, r) {
|
|
2873
|
-
super(e, t, n), this.file =
|
|
2935
|
+
super(e, t, n), this.file = na(this.tokenizer, this.liquid, r), this.currentFile = e.file, this.args = new R(this.tokenizer, n.options.keyValueSeparator), this.templates = r.parseTokens(t);
|
|
2874
2936
|
}
|
|
2875
2937
|
*render(e, t) {
|
|
2876
2938
|
let { liquid: n, args: r, file: i } = this, { renderer: a } = n;
|
|
@@ -2878,20 +2940,20 @@ var Qi = class extends R {
|
|
|
2878
2940
|
e.setRegister("blockMode", $.OUTPUT), yield a.renderTemplates(this.templates, e, t);
|
|
2879
2941
|
return;
|
|
2880
2942
|
}
|
|
2881
|
-
let o = yield
|
|
2943
|
+
let o = yield ia(this.file, e, n);
|
|
2882
2944
|
C(o, () => `illegal file path "${o}"`);
|
|
2883
2945
|
let s = yield n._parseLayoutFile(o, e.sync, this.currentFile);
|
|
2884
2946
|
e.setRegister("blockMode", $.STORE);
|
|
2885
2947
|
let c = yield a.renderTemplates(this.templates, e), l = e.getRegister("blocks", {});
|
|
2886
|
-
l[""] === void 0 && (l[""] = (e, t) => t.write(c)), e.setRegister("blockMode", $.OUTPUT), e.push(yield r.render(e)), yield a.renderTemplates(s, e, t), e.pop();
|
|
2948
|
+
l[""] === void 0 && (l[""] = (e, t) => t.write(c)), e.setRegister("blockMode", $.OUTPUT), e.push(Z(yield r.render(e))), yield a.renderTemplates(s, e, t), e.pop();
|
|
2887
2949
|
}
|
|
2888
2950
|
*children(e) {
|
|
2889
2951
|
let t = this.templates.slice();
|
|
2890
2952
|
return e && a(this.file) && t.push(...yield this.liquid._parsePartialFile(this.file, !0, this.currentFile)), t;
|
|
2891
2953
|
}
|
|
2892
2954
|
*arguments() {
|
|
2893
|
-
for (let e of Object.values(this.args.hash))
|
|
2894
|
-
|
|
2955
|
+
for (let e of Object.values(this.args.hash)) Y(e) && (yield e);
|
|
2956
|
+
Y(this.file) && (yield this.file);
|
|
2895
2957
|
}
|
|
2896
2958
|
partialScope() {
|
|
2897
2959
|
if (a(this.file)) return {
|
|
@@ -2900,13 +2962,13 @@ var Qi = class extends R {
|
|
|
2900
2962
|
scope: Object.keys(this.args.hash)
|
|
2901
2963
|
};
|
|
2902
2964
|
}
|
|
2903
|
-
},
|
|
2965
|
+
}, da = class extends L {
|
|
2904
2966
|
constructor(e, t, n, r) {
|
|
2905
2967
|
super(e, t, n), this.templates = [];
|
|
2906
2968
|
let i = /\w+/.exec(e.args);
|
|
2907
2969
|
for (this.block = i ? i[0] : ""; t.length;) {
|
|
2908
2970
|
let e = t.shift();
|
|
2909
|
-
if (
|
|
2971
|
+
if (J(e) && e.name === "endblock") return;
|
|
2910
2972
|
let n = r.parseToken(e, t);
|
|
2911
2973
|
this.templates.push(n);
|
|
2912
2974
|
}
|
|
@@ -2920,7 +2982,7 @@ var Qi = class extends R {
|
|
|
2920
2982
|
let t = this, { liquid: n, templates: r } = this, i = e.getRegister("blocks", {})[this.block], a = function* (i, a) {
|
|
2921
2983
|
let o = e.getRegister("blockStack", []);
|
|
2922
2984
|
if (o.includes(t)) throw Error("block tag cannot be nested");
|
|
2923
|
-
o.push(t), e.push({ block: i }), yield n.renderer.renderTemplates(r, e, a), e.pop(), o.pop();
|
|
2985
|
+
o.push(t), e.push(Z({ block: i })), yield n.renderer.renderTemplates(r, e, a), e.pop(), o.pop();
|
|
2924
2986
|
};
|
|
2925
2987
|
return i ? (e, t) => i(new Be((t) => a(e, t)), t) : a;
|
|
2926
2988
|
}
|
|
@@ -2930,11 +2992,11 @@ var Qi = class extends R {
|
|
|
2930
2992
|
blockScope() {
|
|
2931
2993
|
return ["block"];
|
|
2932
2994
|
}
|
|
2933
|
-
},
|
|
2995
|
+
}, fa = class extends L {
|
|
2934
2996
|
constructor(e, t, n) {
|
|
2935
2997
|
for (super(e, t, n), this.tokens = []; t.length;) {
|
|
2936
2998
|
let e = t.shift();
|
|
2937
|
-
if (
|
|
2999
|
+
if (J(e) && e.name === "endraw") return;
|
|
2938
3000
|
this.tokens.push(e);
|
|
2939
3001
|
}
|
|
2940
3002
|
throw Error(`tag ${e.getText()} not closed`);
|
|
@@ -2942,7 +3004,7 @@ var Qi = class extends R {
|
|
|
2942
3004
|
render() {
|
|
2943
3005
|
return this.tokens.map((e) => e.getText()).join("");
|
|
2944
3006
|
}
|
|
2945
|
-
},
|
|
3007
|
+
}, pa = class extends Ie {
|
|
2946
3008
|
constructor(e, t, n, r) {
|
|
2947
3009
|
super(e, n, r), this.length = e, this.cols = t;
|
|
2948
3010
|
}
|
|
@@ -2961,38 +3023,38 @@ var Qi = class extends R {
|
|
|
2961
3023
|
col_last() {
|
|
2962
3024
|
return this.col() === this.cols;
|
|
2963
3025
|
}
|
|
2964
|
-
},
|
|
2965
|
-
assign:
|
|
2966
|
-
for:
|
|
2967
|
-
capture:
|
|
2968
|
-
case:
|
|
2969
|
-
comment:
|
|
2970
|
-
include:
|
|
2971
|
-
render:
|
|
2972
|
-
decrement:
|
|
2973
|
-
increment:
|
|
2974
|
-
cycle:
|
|
2975
|
-
if:
|
|
2976
|
-
layout:
|
|
2977
|
-
block:
|
|
2978
|
-
raw:
|
|
2979
|
-
tablerow: class extends
|
|
3026
|
+
}, ma = {
|
|
3027
|
+
assign: Ki,
|
|
3028
|
+
for: Ji,
|
|
3029
|
+
capture: Qi,
|
|
3030
|
+
case: $i,
|
|
3031
|
+
comment: ea,
|
|
3032
|
+
include: aa,
|
|
3033
|
+
render: ta,
|
|
3034
|
+
decrement: oa,
|
|
3035
|
+
increment: la,
|
|
3036
|
+
cycle: sa,
|
|
3037
|
+
if: ca,
|
|
3038
|
+
layout: ua,
|
|
3039
|
+
block: da,
|
|
3040
|
+
raw: fa,
|
|
3041
|
+
tablerow: class extends L {
|
|
2980
3042
|
constructor(e, t, n, r) {
|
|
2981
3043
|
super(e, t, n);
|
|
2982
3044
|
let i = this.tokenizer.readIdentifier();
|
|
2983
3045
|
this.tokenizer.skipBlank();
|
|
2984
3046
|
let a = this.tokenizer.readIdentifier(), o = this.tokenizer.readValue();
|
|
2985
3047
|
if (a.content !== "in" || !o) throw Error(`illegal tag: ${e.getText()}`);
|
|
2986
|
-
this.variable = i.content, this.collection = o, this.args = new
|
|
3048
|
+
this.variable = i.content, this.collection = o, this.args = new R(this.tokenizer, n.options.keyValueSeparator), this.templates = [];
|
|
2987
3049
|
let s, c = r.parseStream(t).on("start", () => s = this.templates).on("tag:endtablerow", () => c.stop()).on("template", (e) => s.push(e)).on("end", () => {
|
|
2988
3050
|
throw Error(`tag ${e.getText()} not closed`);
|
|
2989
3051
|
});
|
|
2990
3052
|
c.start();
|
|
2991
3053
|
}
|
|
2992
3054
|
*render(e, t) {
|
|
2993
|
-
let n = u(yield
|
|
3055
|
+
let n = u(yield A(this.collection, e)), r = yield this.args.render(e), i = r.offset || 0, a = r.limit === void 0 ? n.length : r.limit;
|
|
2994
3056
|
n = n.slice(i, i + a);
|
|
2995
|
-
let o = r.cols || n.length, s = this.liquid.renderer, c = new
|
|
3057
|
+
let o = r.cols || n.length, s = this.liquid.renderer, c = new pa(n.length, o, this.collection.getText(), this.variable), l = Z({ tablerowloop: c });
|
|
2996
3058
|
e.push(l);
|
|
2997
3059
|
for (let r = 0; r < n.length; r++, c.next()) l[this.variable] = n[r], c.col0() === 0 && (c.row() !== 1 && t.write("</tr>"), t.write(`<tr class="row${c.row()}">`)), t.write(`<td class="col${c.col()}">`), yield s.renderTemplates(this.templates, e, t), t.write("</td>");
|
|
2998
3060
|
n.length && t.write("</tr>"), e.pop();
|
|
@@ -3002,19 +3064,19 @@ var Qi = class extends R {
|
|
|
3002
3064
|
}
|
|
3003
3065
|
*arguments() {
|
|
3004
3066
|
yield this.collection;
|
|
3005
|
-
for (let e of Object.values(this.args.hash))
|
|
3067
|
+
for (let e of Object.values(this.args.hash)) Y(e) && (yield e);
|
|
3006
3068
|
}
|
|
3007
3069
|
blockScope() {
|
|
3008
3070
|
return [this.variable, "tablerowloop"];
|
|
3009
3071
|
}
|
|
3010
3072
|
},
|
|
3011
|
-
unless: class extends
|
|
3073
|
+
unless: class extends L {
|
|
3012
3074
|
constructor(e, t, n, r) {
|
|
3013
3075
|
super(e, t, n), this.branches = [], this.elseTemplates = [];
|
|
3014
3076
|
let i = [], a = 0;
|
|
3015
3077
|
r.parseStream(t).on("start", () => this.branches.push({
|
|
3016
|
-
value: new
|
|
3017
|
-
test:
|
|
3078
|
+
value: new z(e.tokenizer.readFilteredValue(), this.liquid),
|
|
3079
|
+
test: M,
|
|
3018
3080
|
templates: i = []
|
|
3019
3081
|
})).on("tag:elsif", (e) => {
|
|
3020
3082
|
if (a > 0) {
|
|
@@ -3022,8 +3084,8 @@ var Qi = class extends R {
|
|
|
3022
3084
|
return;
|
|
3023
3085
|
}
|
|
3024
3086
|
this.branches.push({
|
|
3025
|
-
value: new
|
|
3026
|
-
test:
|
|
3087
|
+
value: new z(e.tokenizer.readFilteredValue(), this.liquid),
|
|
3088
|
+
test: j,
|
|
3027
3089
|
templates: i = []
|
|
3028
3090
|
});
|
|
3029
3091
|
}).on("tag:else", () => {
|
|
@@ -3052,19 +3114,19 @@ var Qi = class extends R {
|
|
|
3052
3114
|
return this.branches.map((e) => e.value);
|
|
3053
3115
|
}
|
|
3054
3116
|
},
|
|
3055
|
-
break: class extends
|
|
3117
|
+
break: class extends L {
|
|
3056
3118
|
render(e, t) {
|
|
3057
3119
|
e.breakCalled = !0;
|
|
3058
3120
|
}
|
|
3059
3121
|
},
|
|
3060
|
-
continue: class extends
|
|
3122
|
+
continue: class extends L {
|
|
3061
3123
|
render(e, t) {
|
|
3062
3124
|
e.continueCalled = !0;
|
|
3063
3125
|
}
|
|
3064
3126
|
},
|
|
3065
|
-
echo: class extends
|
|
3127
|
+
echo: class extends L {
|
|
3066
3128
|
constructor(e, t, n) {
|
|
3067
|
-
super(e, t, n), this.tokenizer.skipBlank(), this.tokenizer.end() || (this.value = new
|
|
3129
|
+
super(e, t, n), this.tokenizer.skipBlank(), this.tokenizer.end() || (this.value = new z(this.tokenizer.readFilteredValue(), this.liquid));
|
|
3068
3130
|
}
|
|
3069
3131
|
*render(e, t) {
|
|
3070
3132
|
if (!this.value) return;
|
|
@@ -3075,7 +3137,7 @@ var Qi = class extends R {
|
|
|
3075
3137
|
this.value && (yield this.value);
|
|
3076
3138
|
}
|
|
3077
3139
|
},
|
|
3078
|
-
liquid: class extends
|
|
3140
|
+
liquid: class extends L {
|
|
3079
3141
|
constructor(e, t, n, r) {
|
|
3080
3142
|
super(e, t, n);
|
|
3081
3143
|
let i = this.tokenizer.readLiquidTagTokens(this.liquid.options);
|
|
@@ -3088,18 +3150,18 @@ var Qi = class extends R {
|
|
|
3088
3150
|
return this.templates;
|
|
3089
3151
|
}
|
|
3090
3152
|
},
|
|
3091
|
-
"#": class extends
|
|
3153
|
+
"#": class extends L {
|
|
3092
3154
|
constructor(e, t, n) {
|
|
3093
3155
|
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");
|
|
3094
3156
|
}
|
|
3095
3157
|
render() {}
|
|
3096
3158
|
}
|
|
3097
|
-
},
|
|
3159
|
+
}, ha = class e {
|
|
3098
3160
|
constructor(e = {}) {
|
|
3099
|
-
this.renderer = new
|
|
3161
|
+
this.renderer = new Lt(), this.filters = Object.create(null), this.tags = Object.create(null), this.options = vn(e), this.parser = new K(this), oe(ma, (e, t) => this.registerTag(t, e)), oe(Gi, (e, t) => this.registerFilter(t, e));
|
|
3100
3162
|
}
|
|
3101
3163
|
parse(e, t) {
|
|
3102
|
-
return new
|
|
3164
|
+
return new K(this).parse(e, t);
|
|
3103
3165
|
}
|
|
3104
3166
|
_render(e, t, n) {
|
|
3105
3167
|
let r = t instanceof Q ? t : new Q(t, this.options, n);
|
|
@@ -3130,21 +3192,21 @@ var Qi = class extends R {
|
|
|
3130
3192
|
return O(this._parseAndRender(e, t, Object.assign(Object.assign({}, n), { sync: !0 })));
|
|
3131
3193
|
}
|
|
3132
3194
|
_parsePartialFile(e, t, n) {
|
|
3133
|
-
return new
|
|
3195
|
+
return new K(this).parseFile(e, t, G.Partials, n);
|
|
3134
3196
|
}
|
|
3135
3197
|
_parseLayoutFile(e, t, n) {
|
|
3136
|
-
return new
|
|
3198
|
+
return new K(this).parseFile(e, t, G.Layouts, n);
|
|
3137
3199
|
}
|
|
3138
3200
|
_parseFile(e, t, n, r) {
|
|
3139
|
-
return new
|
|
3201
|
+
return new K(this).parseFile(e, t, n, r);
|
|
3140
3202
|
}
|
|
3141
3203
|
parseFile(e, t) {
|
|
3142
3204
|
return E(this, void 0, void 0, function* () {
|
|
3143
|
-
return D(new
|
|
3205
|
+
return D(new K(this).parseFile(e, !1, t));
|
|
3144
3206
|
});
|
|
3145
3207
|
}
|
|
3146
3208
|
parseFileSync(e, t) {
|
|
3147
|
-
return O(new
|
|
3209
|
+
return O(new K(this).parseFile(e, !0, t));
|
|
3148
3210
|
}
|
|
3149
3211
|
*_renderFile(e, t, n) {
|
|
3150
3212
|
let r = yield this._parseFile(e, n.sync, n.lookupType);
|
|
@@ -3165,7 +3227,7 @@ var Qi = class extends R {
|
|
|
3165
3227
|
});
|
|
3166
3228
|
}
|
|
3167
3229
|
_evalValue(e, t) {
|
|
3168
|
-
let n = new
|
|
3230
|
+
let n = new z(e, this), r = t instanceof Q ? t : new Q(t, this.options);
|
|
3169
3231
|
return n.value(r);
|
|
3170
3232
|
}
|
|
3171
3233
|
evalValue(e, t) {
|
|
@@ -3180,7 +3242,7 @@ var Qi = class extends R {
|
|
|
3180
3242
|
this.filters[e] = t;
|
|
3181
3243
|
}
|
|
3182
3244
|
registerTag(e, t) {
|
|
3183
|
-
this.tags[e] = o(t) ? t :
|
|
3245
|
+
this.tags[e] = o(t) ? t : Tn(t);
|
|
3184
3246
|
}
|
|
3185
3247
|
plugin(t) {
|
|
3186
3248
|
return t.call(this, e);
|
|
@@ -3190,7 +3252,7 @@ var Qi = class extends R {
|
|
|
3190
3252
|
return function(n, r, i) {
|
|
3191
3253
|
if (t) {
|
|
3192
3254
|
t = !1;
|
|
3193
|
-
let n =
|
|
3255
|
+
let n = F(this.root);
|
|
3194
3256
|
e.options.root.unshift(...n), e.options.layouts.unshift(...n), e.options.partials.unshift(...n);
|
|
3195
3257
|
}
|
|
3196
3258
|
e.renderFile(n, r).then((e) => i(null, e), i);
|
|
@@ -3198,80 +3260,80 @@ var Qi = class extends R {
|
|
|
3198
3260
|
}
|
|
3199
3261
|
analyze(e, t = {}) {
|
|
3200
3262
|
return E(this, void 0, void 0, function* () {
|
|
3201
|
-
return
|
|
3263
|
+
return V(e, t);
|
|
3202
3264
|
});
|
|
3203
3265
|
}
|
|
3204
3266
|
analyzeSync(e, t = {}) {
|
|
3205
|
-
return
|
|
3267
|
+
return H(e, t);
|
|
3206
3268
|
}
|
|
3207
3269
|
parseAndAnalyze(e, t, n = {}) {
|
|
3208
3270
|
return E(this, void 0, void 0, function* () {
|
|
3209
|
-
return
|
|
3271
|
+
return V(this.parse(e, t), n);
|
|
3210
3272
|
});
|
|
3211
3273
|
}
|
|
3212
3274
|
parseAndAnalyzeSync(e, t, n = {}) {
|
|
3213
|
-
return
|
|
3275
|
+
return H(this.parse(e, t), n);
|
|
3214
3276
|
}
|
|
3215
3277
|
variables(e, t = {}) {
|
|
3216
3278
|
return E(this, void 0, void 0, function* () {
|
|
3217
|
-
let n = yield
|
|
3279
|
+
let n = yield V(a(e) ? this.parse(e) : e, t);
|
|
3218
3280
|
return Object.keys(n.variables);
|
|
3219
3281
|
});
|
|
3220
3282
|
}
|
|
3221
3283
|
variablesSync(e, t = {}) {
|
|
3222
|
-
let n =
|
|
3284
|
+
let n = H(a(e) ? this.parse(e) : e, t);
|
|
3223
3285
|
return Object.keys(n.variables);
|
|
3224
3286
|
}
|
|
3225
3287
|
fullVariables(e, t = {}) {
|
|
3226
3288
|
return E(this, void 0, void 0, function* () {
|
|
3227
|
-
let n = yield
|
|
3289
|
+
let n = yield V(a(e) ? this.parse(e) : e, t);
|
|
3228
3290
|
return Array.from(new Set(Object.values(n.variables).flatMap((e) => e.map((e) => String(e)))));
|
|
3229
3291
|
});
|
|
3230
3292
|
}
|
|
3231
3293
|
fullVariablesSync(e, t = {}) {
|
|
3232
|
-
let n =
|
|
3294
|
+
let n = H(a(e) ? this.parse(e) : e, t);
|
|
3233
3295
|
return Array.from(new Set(Object.values(n.variables).flatMap((e) => e.map((e) => String(e)))));
|
|
3234
3296
|
}
|
|
3235
3297
|
variableSegments(e, t = {}) {
|
|
3236
3298
|
return E(this, void 0, void 0, function* () {
|
|
3237
|
-
let n = yield
|
|
3238
|
-
return Array.from(
|
|
3299
|
+
let n = yield V(a(e) ? this.parse(e) : e, t);
|
|
3300
|
+
return Array.from(ge(Object.values(n.variables).flatMap((e) => e.map((e) => e.toArray()))));
|
|
3239
3301
|
});
|
|
3240
3302
|
}
|
|
3241
3303
|
variableSegmentsSync(e, t = {}) {
|
|
3242
|
-
let n =
|
|
3243
|
-
return Array.from(
|
|
3304
|
+
let n = H(a(e) ? this.parse(e) : e, t);
|
|
3305
|
+
return Array.from(ge(Object.values(n.variables).flatMap((e) => e.map((e) => e.toArray()))));
|
|
3244
3306
|
}
|
|
3245
3307
|
globalVariables(e, t = {}) {
|
|
3246
3308
|
return E(this, void 0, void 0, function* () {
|
|
3247
|
-
let n = yield
|
|
3309
|
+
let n = yield V(a(e) ? this.parse(e) : e, t);
|
|
3248
3310
|
return Object.keys(n.globals);
|
|
3249
3311
|
});
|
|
3250
3312
|
}
|
|
3251
3313
|
globalVariablesSync(e, t = {}) {
|
|
3252
|
-
let n =
|
|
3314
|
+
let n = H(a(e) ? this.parse(e) : e, t);
|
|
3253
3315
|
return Object.keys(n.globals);
|
|
3254
3316
|
}
|
|
3255
3317
|
globalFullVariables(e, t = {}) {
|
|
3256
3318
|
return E(this, void 0, void 0, function* () {
|
|
3257
|
-
let n = yield
|
|
3319
|
+
let n = yield V(a(e) ? this.parse(e) : e, t);
|
|
3258
3320
|
return Array.from(new Set(Object.values(n.globals).flatMap((e) => e.map((e) => String(e)))));
|
|
3259
3321
|
});
|
|
3260
3322
|
}
|
|
3261
3323
|
globalFullVariablesSync(e, t = {}) {
|
|
3262
|
-
let n =
|
|
3324
|
+
let n = H(a(e) ? this.parse(e) : e, t);
|
|
3263
3325
|
return Array.from(new Set(Object.values(n.globals).flatMap((e) => e.map((e) => String(e)))));
|
|
3264
3326
|
}
|
|
3265
3327
|
globalVariableSegments(e, t = {}) {
|
|
3266
3328
|
return E(this, void 0, void 0, function* () {
|
|
3267
|
-
let n = yield
|
|
3268
|
-
return Array.from(
|
|
3329
|
+
let n = yield V(a(e) ? this.parse(e) : e, t);
|
|
3330
|
+
return Array.from(ge(Object.values(n.globals).flatMap((e) => e.map((e) => e.toArray()))));
|
|
3269
3331
|
});
|
|
3270
3332
|
}
|
|
3271
3333
|
globalVariableSegmentsSync(e, t = {}) {
|
|
3272
|
-
let n =
|
|
3273
|
-
return Array.from(
|
|
3334
|
+
let n = H(a(e) ? this.parse(e) : e, t);
|
|
3335
|
+
return Array.from(ge(Object.values(n.globals).flatMap((e) => e.map((e) => e.toArray()))));
|
|
3274
3336
|
}
|
|
3275
3337
|
};
|
|
3276
3338
|
//#endregion
|
|
3277
|
-
export {
|
|
3339
|
+
export { ha as Liquid };
|