Files
liquidjs/js/liquid.browser.min.js
T

3 lines
88 KiB
JavaScript

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e=e||self).liquidjs={})}(this,function(l){"use strict";var j=function(e,t){return(j=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}))(e,t)};function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}j(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var T=function(){return(T=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)};function a(e,s,a,u){return new(a=a||Promise)(function(r,t){function n(e){try{o(u.next(e))}catch(e){t(e)}}function i(e){try{o(u.throw(e))}catch(e){t(e)}}function o(e){var t;e.done?r(e.value):((t=e.value)instanceof a?t:new a(function(e){e(t)})).then(n,i)}o((u=u.apply(e,s||[])).next())})}function x(n,i){var o,s,a,u={label:0,sent:function(){if(1&a[0])throw a[1];return a[1]},trys:[],ops:[]},c={next:e(0),throw:e(1),return:e(2)};return"function"==typeof Symbol&&(c[Symbol.iterator]=function(){return this}),c;function e(r){return function(e){var t=[r,e];if(o)throw new TypeError("Generator is already executing.");for(;u=c&&t[c=0]?0:u;)try{if(o=1,s&&(a=2&t[0]?s.return:t[0]?s.throw||((a=s.return)&&a.call(s),0):s.next)&&!(a=a.call(s,t[1])).done)return a;switch(s=0,(t=a?[2&t[0],a.value]:t)[0]){case 0:case 1:a=t;break;case 4:return u.label++,{value:t[1],done:!1};case 5:u.label++,s=t[1],t=[0];continue;case 7:t=u.ops.pop(),u.trys.pop();continue;default:if(!(a=0<(a=u.trys).length&&a[a.length-1])&&(6===t[0]||2===t[0])){u=0;continue}if(3===t[0]&&(!a||t[1]>a[0]&&t[1]<a[3]))u.label=t[1];else if(6===t[0]&&u.label<a[1])u.label=a[1],a=t;else{if(!(a&&u.label<a[2])){a[2]&&u.ops.pop(),u.trys.pop();continue}u.label=a[2],u.ops.push(t)}}t=i.call(n,u)}catch(e){t=[6,e],s=0}finally{o=a=0}if(5&t[0])throw t[1];return{value:t[0]?t[1]:void 0,done:!0}}}}function L(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&n>=e.length?void 0:e)&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function g(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||((n=n||Array.prototype.slice.call(t,0,i))[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}V.prototype.getText=function(){return this.input.slice(this.begin,this.end)},V.prototype.getPosition=function(){for(var e=d([1,1],2),t=e[0],r=e[1],n=0;n<this.begin;n++)"\n"===this.input[n]?(t++,r=1):r++;return[t,r]},V.prototype.size=function(){return this.end-this.begin};var e=V;function V(e,t,r,n,i){this.kind=e,this.input=t,this.begin=r,this.end=n,this.file=i}P.prototype.liquidMethodMissing=function(e){};var s=P;function P(){}var A=Object.prototype.toString,C=String.prototype.toLowerCase,I=Object.hasOwnProperty;function u(e){return"string"==typeof e}function c(e){return"function"==typeof e}function B(e){return e&&c(e.next)&&c(e.throw)&&c(e.return)}function m(e){return u(e=v(e))?e:h(e)?"":w(e)?e.map(m).join(""):String(e)}function H(t){var e;return w(t=v(t))?t:u(t)&&0<t.length?[t]:Q(e=t)&&Symbol.iterator in e?Array.from(t):Q(t)?Object.keys(t).map(function(e){return[e,t[e]]}):[]}function y(e){return h(e=v(e))?[]:w(e)?e:[e]}function v(e){return e instanceof s&&c(e.valueOf)?e.valueOf():e}function U(e){return e=Number(e),isNaN(e)?0:e}function K(e){return"number"==typeof e}function h(e){return null==e}function w(e){return"[object Array]"===A.call(e)}function W(e){return e&&K(e.length)}function Y(e,t){for(var r in e=e||{})if(I.call(e,r)&&!1===t(e[r],r,e))break}function $(e){return e[e.length-1]}function Q(e){var t=typeof e;return null!==e&&("object"==t||"function"==t)}function Z(e,t,r){void 0===r&&(r=1);for(var n=[],i=e;i<t;i+=r)n.push(i);return n}function J(e,t,r){return G(e,t,r=void 0===r?" ":r,function(e,t){return t+e})}function G(e,t,r,n){for(var i=t-(e=String(e)).length;0<i--;)e=n(e,r);return e}function X(e){return e}function ee(e,t){return null==e&&null==t?0:null==e?1:null==t||(e=C.call(e))<(t=C.call(t))?-1:t<e?1:0}function t(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.call.apply(r,g([this],d(e.map(v)),!1))}}function te(e){return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}var re,ne="__liquidClass__",ie=(o(oe,re=Error),oe.prototype.update=function(){var n,i,o,s,e,t,r;Object.defineProperty(this,"context",{value:(e=this.token,t=d(e.getPosition(),2),n=t[0],i=t[1],o=e.input.split("\n"),t=Math.max(n-2,1),s=Math.min(n+3,o.length),Z(t,s+1).map(function(e){var t=e===n?">> ":" ",r=J(String(e),String(s).length),t="".concat(t).concat(r,"| "),r=e===n?"\n"+J("^",i+t.length):"";return t+o[e-1]+r}).join("\n")),enumerable:!1}),this.message=(e=this.message,(t=this.token).file&&(e+=", file:".concat(t.file)),t=d(t.getPosition(),2),r=t[0],t=t[1],e+=", line:".concat(r,", col:").concat(t)),this.stack=this.message+"\n"+this.context+"\n"+this.stack,this.originalError&&(this.stack+="\nFrom "+this.originalError.stack)},oe.is=function(e){return"LiquidError"===(null==e?void 0:e[ne])},oe);function oe(e,t){var r=re.call(this,"string"==typeof e?e:e.message)||this;return r.context="","string"!=typeof e&&Object.defineProperty(r,"originalError",{value:e,enumerable:!1}),Object.defineProperty(r,"token",{value:t,enumerable:!1}),Object.defineProperty(r,ne,{value:"LiquidError",enumerable:!1}),r}o(ue,se=ie);var se,ae=ue;function ue(e,t){e=se.call(this,e,t)||this;return e.name="TokenizationError",se.prototype.update.call(e),e}o(he,ce=ie);var ce,le=he;function he(e,t){t=ce.call(this,e,t)||this;return t.name="ParseError",t.message=e.message,ce.prototype.update.call(t),t}o(de,pe=ie),de.is=function(e){return"RenderError"===e.name};var pe,fe=de;function de(e,t){t=pe.call(this,e,t.token)||this;return t.name="RenderError",t.message=e.message,pe.prototype.update.call(t),t}o(ye,ge=ie),ye.is=function(e){return"LiquidErrors"===e.name};var ge,me=ye;function ye(e){var t=ge.call(this,e[0],e[0].token)||this,r=(t.errors=e,t.name="LiquidErrors",1<e.length?"s":"");return t.message="".concat(e.length," error").concat(r," found"),ge.prototype.update.call(t),t}o(be,ve=ie);var ve,we=be;function be(e,t){t=ve.call(this,e,t)||this;return t.name="UndefinedVariableError",t.message=e.message,ve.prototype.update.call(t),t}o(xe,ke=Error);var ke,Te=xe;function xe(e){var t=ke.call(this,"undefined variable: ".concat(e))||this;return t.name="InternalUndefinedVariableError",t.variableName=e,t}o(_e,Le=Error);var Le,Fe=_e;function _e(e){var t=Le.call(this,e)||this;return t.name="AssertionError",t.message=e+"",t}var p=[0,0,0,0,0,0,0,0,0,20,4,4,4,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,2,8,0,0,0,0,8,0,0,0,64,0,65,0,0,33,33,33,33,33,33,33,33,33,33,0,0,2,2,2,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0],Se=1,Oe=4,ze=16;function Re(e){e=e.charCodeAt(0);return 128<=e?!p[e]:p[e]&Se}function F(e,t){if(!e)throw t="function"==typeof t?t():t||"expect ".concat(e," to be true"),new Fe(t)}function Ee(e,t){F(!e,t=void 0===t?"unexpected ".concat(JSON.stringify(e)):t)}p[160]=p[5760]=p[6158]=p[8192]=p[8193]=p[8194]=p[8195]=p[8196]=p[8197]=p[8198]=p[8199]=p[8200]=p[8201]=p[8202]=p[8232]=p[8233]=p[8239]=p[8287]=p[12288]=Oe,p[8220]=p[8221]=128;o(Ne,qe=s),Ne.prototype.equals=function(e){return h(v(e))},Ne.prototype.gt=function(){return!1},Ne.prototype.geq=function(){return!1},Ne.prototype.lt=function(){return!1},Ne.prototype.leq=function(){return!1},Ne.prototype.valueOf=function(){return null};var qe,r=Ne;function Ne(){return null!==qe&&qe.apply(this,arguments)||this}o(n,De=s),n.prototype.equals=function(e){return!(e instanceof n||(u(e=v(e))||w(e)?0!==e.length:!Q(e)||0!==Object.keys(e).length))},n.prototype.gt=function(){return!1},n.prototype.geq=function(){return!1},n.prototype.lt=function(){return!1},n.prototype.leq=function(){return!1},n.prototype.valueOf=function(){return""},n.is=function(e){return e instanceof n};var De,Me=n;function n(){return null!==De&&De.apply(this,arguments)||this}o(Pe,je=Me),Pe.prototype.equals=function(e){return!1===e||!!h(v(e))||(u(e)?/^\s*$/.test(e):je.prototype.equals.call(this,e))},Pe.is=function(e){return e instanceof Pe};var je,Ve=Pe;function Pe(){return null!==je&&je.apply(this,arguments)||this}o(i,Ae=s),i.prototype.next=function(){this.i++},i.prototype.index0=function(){return this.i},i.prototype.index=function(){return this.i+1},i.prototype.first=function(){return 0===this.i},i.prototype.last=function(){return this.i===this.length-1},i.prototype.rindex=function(){return this.length-this.i},i.prototype.rindex0=function(){return this.length-this.i-1},i.prototype.valueOf=function(){return JSON.stringify(this)};var Ae,Ce=i;function i(e,t,r){var n=Ae.call(this)||this;return n.i=0,n.length=e,n.name="".concat(r,"-").concat(t),n}o(He,Ie=s),He.prototype.super=function(){return this.superBlockRender()};var Ie,Be=He;function He(e){void 0===e&&(e=function(){return""});var t=Ie.call(this)||this;return t.superBlockRender=e,t}function f(e){return e&&c(e.equals)&&c(e.gt)&&c(e.geq)&&c(e.lt)&&c(e.leq)}var r=new r,Ue={true:!0,false:!1,nil:r,null:r,empty:new Me,blank:new Ve};function Ke(e){var t,r,n={};try{for(var i=L(Object.entries(e)),o=i.next();!o.done;o=i.next()){for(var s=d(o.value,2),a=s[0],u=s[1],c=n,l=0;l<a.length;l++){var h=a[l];c[h]=c[h]||{},l===a.length-1&&Re(a[l])&&(c[h].needBoundary=!0),c=c[h]}c.data=u,c.end=!0}}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}return n}function b(s){return a(this,void 0,void 0,function(){var r,n,i,o;return x(this,function(e){switch(e.label){case 0:if(!B(s))return[2,s];n=!1,i="next",e.label=1;case 1:o=s[i](r),n=o.done,r=o.value,i="next",e.label=2;case 2:return(e.trys.push([2,5,,6]),B(r)&&(r=b(r)),(t=r)&&c(t.then))?[4,r]:[3,4];case 3:r=e.sent(),e.label=4;case 4:return[3,6];case 5:return o=e.sent(),i="throw",r=o,[3,6];case 6:if(!n)return[3,1];e.label=7;case 7:return[2,r]}var t})})}function k(e){if(!B(e))return e;var t="next";do{var r,n=e[t](r),i=n.done,t="next";if(B(r=n.value))try{r=k(r)}catch(e){t="throw",r=e}}while(!i);return r}var We=/%([-_0^#:]+)?(\d+)?([EO])?(.)/;function Ye(e){return[31,function(e){e=e.getFullYear();return 0==(3&e)&&(e%100||e%400==0&&e)}(e)?29:28,31,30,31,30,31,31,30,31,30,31]}function $e(e){for(var t=0,r=0;r<e.getMonth();++r)t+=Ye(e)[r];return t+e.getDate()}function Qe(e,t){var r=$e(e)+(t-e.getDay()),e=7-new Date(e.getFullYear(),0,1).getDay()+t;return String(Math.floor((r-e)/7)+1)}var Ze={d:2,e:2,H:2,I:2,j:3,k:2,l:2,L:3,m:2,M:2,S:2,U:2,W:2},Je=new Set("aAbBceklpP");function Ge(e,t){var r=Math.abs(e.getTimezoneOffset()),n=Math.floor(r/60),r=r%60;return(0<e.getTimezoneOffset()?"-":"+")+J(n,2,"0")+(t.flags[":"]?":":"")+J(r,2,"0")}var Xe={a:function(e){return e.getShortWeekdayName()},A:function(e){return e.getLongWeekdayName()},b:function(e){return e.getShortMonthName()},B:function(e){return e.getLongMonthName()},c:function(e){return e.toLocaleString()},C:function(e){return parseInt(e.getFullYear().toString().substring(0,2),10)},d:function(e){return e.getDate()},e:function(e){return e.getDate()},H:function(e){return e.getHours()},I:function(e){return String(e.getHours()%12||12)},j:$e,k:function(e){return e.getHours()},l:function(e){return String(e.getHours()%12||12)},L:function(e){return e.getMilliseconds()},m:function(e){return e.getMonth()+1},M:function(e){return e.getMinutes()},N:function(e,t){t=Number(t.width)||9;return G(String(e.getMilliseconds()).slice(0,t),t,e=void 0===(e="0")?" ":e,function(e,t){return e+t})},p:function(e){return e.getHours()<12?"AM":"PM"},P:function(e){return e.getHours()<12?"am":"pm"},q:function(e){if(e=e.getDate(),[11,12,13].includes(e))return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},s:function(e){return Math.round(e.getTime()/1e3)},S:function(e){return e.getSeconds()},u:function(e){return e.getDay()||7},U:function(e){return Qe(e,0)},w:function(e){return e.getDay()},W:function(e){return Qe(e,1)},x:function(e){return e.toLocaleDateString()},X:function(e){return e.toLocaleTimeString()},y:function(e){return e.getFullYear().toString().slice(2,4)},Y:function(e){return e.getFullYear()},z:Ge,Z:function(e,t){return e.getTimeZoneName()||Ge(e,t)},t:function(){return"\t"},n:function(){return"\n"},"%":function(){return"%"}};function et(e,t){for(var r,n="",i=t;r=We.exec(i);)n+=i.slice(0,r.index),i=i.slice(r.index+r[0].length),n+=function(e,t){var r,t=d(t,5),n=t[0],i=t[1],i=void 0===i?"":i,o=t[2],s=t[3],t=t[4],a=Xe[t];if(!a)return n;var u={};try{for(var c=L(i),l=c.next();!l.done;l=c.next()){var h=l.value;u[h]=!0}}catch(e){r={error:e}}finally{try{l&&!l.done&&(p=c.return)&&p.call(c)}finally{if(r)throw r.error}}var n=String(a(e,{flags:u,width:o,modifier:s})),i=Je.has(t)?" ":"0",p=o||Ze[t]||0;u["^"]?n=n.toUpperCase():u["#"]&&(n=function(e){return g([],d(e),!1).some(function(e){return"a"<=e&&e<="z"})?e.toUpperCase():e.toLowerCase()}(n));u._?i=" ":u[0]&&(i="0");u["-"]&&(p=0);return J(n,p,i)}(e,r);return n+i}function tt(){return"undefined"!=typeof Intl?Intl.DateTimeFormat:void 0}Xe.h=Xe.b;var rt=/([zZ]|([+-])(\d{2}):(\d{2}))$/,nt=["January","February","March","April","May","June","July","August","September","October","November","December"],it=nt.map(function(e){return e.slice(0,3)}),ot=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],st=ot.map(function(e){return e.slice(0,3)}),at=(_.prototype.getTime=function(){return this.displayDate.getTime()},_.prototype.getMilliseconds=function(){return this.displayDate.getMilliseconds()},_.prototype.getSeconds=function(){return this.displayDate.getSeconds()},_.prototype.getMinutes=function(){return this.displayDate.getMinutes()},_.prototype.getHours=function(){return this.displayDate.getHours()},_.prototype.getDay=function(){return this.displayDate.getDay()},_.prototype.getDate=function(){return this.displayDate.getDate()},_.prototype.getMonth=function(){return this.displayDate.getMonth()},_.prototype.getFullYear=function(){return this.displayDate.getFullYear()},_.prototype.toLocaleString=function(e,t){return(null!=t&&t.timeZone?this.date:this.displayDate).toLocaleString(e,t)},_.prototype.toLocaleTimeString=function(e){return this.displayDate.toLocaleTimeString(e)},_.prototype.toLocaleDateString=function(e){return this.displayDate.toLocaleDateString(e)},_.prototype.getTimezoneOffset=function(){return this.timezoneOffset},_.prototype.getTimeZoneName=function(){return this.timezoneFixed?this.timezoneName:this.DateTimeFormat?this.DateTimeFormat().resolvedOptions().timeZone:void 0},_.prototype.getLongMonthName=function(){var e;return null!=(e=this.format({month:"long"}))?e:nt[this.getMonth()]},_.prototype.getShortMonthName=function(){var e;return null!=(e=this.format({month:"short"}))?e:it[this.getMonth()]},_.prototype.getLongWeekdayName=function(){var e;return null!=(e=this.format({weekday:"long"}))?e:ot[this.displayDate.getDay()]},_.prototype.getShortWeekdayName=function(){var e;return null!=(e=this.format({weekday:"short"}))?e:st[this.displayDate.getDay()]},_.prototype.valid=function(){return!isNaN(this.getTime())},_.prototype.format=function(e){return this.DateTimeFormat&&this.DateTimeFormat(this.locale,e).format(this.displayDate)},_.createDateFixedToTimezone=function(e,t){var r,n,i=e.match(rt);return i&&"Z"===i[1]?new _(+new Date(e),t,0):i&&i[2]&&i[3]&&i[4]?(n=(i=d(i,5))[2],r=i[3],i=i[4],n=("+"===n?-1:1)*(60*parseInt(r,10)+parseInt(i,10)),new _(+new Date(e),t,n)):new _(e,t)},_.getTimezoneOffset=function(e,t){e=t.toLocaleString("en-US",{timeZone:e}),t=t.toLocaleString("en-US",{timeZone:"UTC"}),e=new Date(e);return(+new Date(t)-+e)/6e4},_);function _(e,t,r){this.locale=t,this.DateTimeFormat=tt(),this.date=new Date(e),this.timezoneFixed=void 0!==r,void 0===r&&(r=this.date.getTimezoneOffset()),this.timezoneOffset=u(r)?_.getTimezoneOffset(r,this.date):r,this.timezoneName=u(r)?r:"";t=6e4*(this.date.getTimezoneOffset()-this.timezoneOffset),e=this.date.getTime()+t;this.displayDate=new Date(e)}ct.prototype.use=function(e){e=U(e),F(this.base+e<=this.limit,this.message),this.base+=e},ct.prototype.check=function(e){F((e=U(e))<=this.limit,this.message)};var ut=ct;function ct(e,t){this.base=0,this.message="".concat(e," limit exceeded"),this.limit=t}o(ht,lt=e),Object.defineProperty(ht.prototype,"content",{get:function(){return this.input.slice(this.contentRange[0],this.contentRange[1])},enumerable:!1,configurable:!0});var lt,r=ht;function ht(e,t,r,n,i,o,s,a){for(var t=d(t,2),u=t[0],t=t[1],e=lt.call(this,e,r,n,i,a)||this,n=(e.trimLeft=!1,e.trimRight=!1,"-"===r[u]),i="-"===r[t-1],c=n?u+1:u,l=i?t-1:t;c<l&&p[r.charCodeAt(c)]&Oe;)c++;for(;c<l&&p[r.charCodeAt(l-1)]&Oe;)l--;return e.contentRange=[c,l],e.trimLeft=n||o,e.trimRight=i||s,e}o(dt,pt=r),Object.defineProperty(dt.prototype,"args",{get:function(){return this.tokenizer.input.slice(this.tokenizer.p,this.contentRange[1])},enumerable:!1,configurable:!0});var pt,ft=dt;function dt(e,t,r,n,i){var o=this,s=n.trimTagLeft,a=n.trimTagRight,u=n.tagDelimiterLeft,c=n.tagDelimiterRight,u=d([t+u.length,r-c.length],2),c=u[0],u=u[1];return(o=pt.call(this,l.TokenKind.Tag,[c,u],e,t,r,s,a,i)||this).tokenizer=new z(e,n.operators,i,o.contentRange),o.name=o.tokenizer.readTagName(),o.tokenizer.assert(o.name,"illegal tag syntax, tag name expected"),o.tokenizer.skipBlank(),o}o(yt,gt=r);var gt,mt=yt;function yt(e,t,r,n,i){var o=n.trimOutputLeft,s=n.trimOutputRight,a=n.outputDelimiterLeft,n=n.outputDelimiterRight,a=[t+a.length,r-n.length];return gt.call(this,l.TokenKind.Output,a,e,t,r,o,s,i)||this}o(bt,vt=e),bt.prototype.getContent=function(){return this.input.slice(this.begin+this.trimLeft,this.end-this.trimRight)};var vt,wt=bt;function bt(e,t,r,n){var i=vt.call(this,l.TokenKind.HTML,e,t,r,n)||this;return i.input=e,i.begin=t,i.end=r,i.file=n,i.trimLeft=0,i.trimRight=0,i}o(xt,kt=e);var kt,Tt=xt;function xt(e,t,r,n){var i=kt.call(this,l.TokenKind.Number,e,t,r,n)||this;return i.input=e,i.begin=t,i.end=r,i.file=n,i.content=Number(i.getText()),i}o(_t,Lt=e);var Lt,Ft=_t;function _t(e,t,r,n){var i=Lt.call(this,l.TokenKind.Word,e,t,r,n)||this;return i.input=e,i.begin=t,i.end=r,i.file=n,i.content=i.getText(),i}o(zt,St=e);var St,Ot=zt;function zt(e,t,r,n){var i=St.call(this,l.TokenKind.Literal,e,t,r,n)||this;return i.input=e,i.begin=t,i.end=r,i.file=n,i.literal=i.getText(),i.content=Ue[i.literal],i}var Rt,Et={"==":2,"!=":2,">":2,"<":2,">=":2,"<=":2,contains:2,not:1,and:0,or:0},qt={"==":0,"!=":0,">":0,"<":0,">=":0,"<=":0,contains:0,not:1,and:0,or:0},Nt=(o(Dt,Rt=e),Dt.prototype.getPrecedence=function(){var e=this.getText();return e in Et?Et[e]:1},Dt);function Dt(e,t,r,n){var i=Rt.call(this,l.TokenKind.Operator,e,t,r,n)||this;return i.input=e,i.begin=t,i.end=r,i.file=n,i.operator=i.getText(),i}o(Vt,Mt=e);var Mt,jt=Vt;function Vt(e,t,r,n,i,o){r=Mt.call(this,l.TokenKind.PropertyAccess,r,n,i,o)||this;return r.variable=e,r.props=t,r}o(Ct,Pt=e);var Pt,At=Ct;function Ct(e,t,r,n,i,o){r=Pt.call(this,l.TokenKind.Filter,r,n,i,o)||this;return r.name=e,r.args=t,r}o(Ht,It=e);var It,Bt=Ht;function Ht(e,t,r,n,i,o){var s=It.call(this,l.TokenKind.Hash,e,t,r,o)||this;return s.input=e,s.begin=t,s.end=r,s.name=n,s.value=i,s.file=o,s}var Ut=/[\da-fA-F]/,Kt=/[0-7]/,Wt={b:"\b",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v"};function Yt(e){e=e.charCodeAt(0);return 97<=e?e-87:65<=e?e-55:e-48}o(Zt,$t=e);var $t,Qt=Zt;function Zt(e,t,r,n){var i=$t.call(this,l.TokenKind.Quoted,e,t,r,n)||this;return i.input=e,i.begin=t,i.end=r,i.file=n,i.content=function(e){for(var t="",r=1;r<e.length-1;r++)if("\\"!==e[r])t+=e[r];else if(void 0!==Wt[e[r+1]])t+=Wt[e[++r]];else if("u"===e[r+1]){for(var n=0,i=r+2;i<=r+5&&Ut.test(e[i]);)n=16*n+Yt(e[i++]);r=i-1,t+=String.fromCharCode(n)}else if(Kt.test(e[r+1])){for(i=r+1,n=0;i<=r+3&&Kt.test(e[i]);)n=8*n+Yt(e[i++]);r=i-1,t+=String.fromCharCode(n)}else t+=e[++r];return t}(i.getText()),i}o(Xt,Jt=e);var Jt,Gt=Xt;function Xt(e,t,r,n,i,o){var s=Jt.call(this,l.TokenKind.Range,e,t,r,o)||this;return s.input=e,s.begin=t,s.end=r,s.lhs=n,s.rhs=i,s.file=o,s}o(rr,er=r);var er,tr=rr;function rr(e,t,r,n,i){t=er.call(this,l.TokenKind.Tag,[t,r],e,t,r,!1,!1,i)||this;return t.tokenizer=new z(e,n.operators,i,t.contentRange),t.name=t.tokenizer.readTagName(),t.tokenizer.assert(t.name,"illegal liquid tag syntax"),t.tokenizer.skipBlank(),t.args=t.tokenizer.remaining(),t}o(or,nr=e);var nr,ir=or;function or(e,t,r,n,i,o){var s=nr.call(this,l.TokenKind.FilteredValue,r,n,i,o)||this;return s.initial=e,s.filters=t,s.input=r,s.begin=n,s.end=i,s.file=o,s}var sr={now:function(){return Date.now()}};function ar(){return"object"==typeof global&&global.performance||"object"==typeof window&&window.performance||sr}cr.prototype.write=function(e){this.buffer+=m(e)};var ur=cr;function cr(){this.buffer=""}var lr=function(){throw this.buffer="",this.stream=null,new Error("streaming not supported in browser")},hr=(pr.prototype.write=function(e){"string"!=typeof(e=v(e))&&""===this.buffer?this.buffer=e:this.buffer=m(this.buffer)+m(e)},pr);function pr(){this.buffer=""}dr.prototype.renderTemplatesToNodeStream=function(e,t){var r=this,n=new lr;return Promise.resolve().then(function(){return b(r.renderTemplates(e,t,n))}).then(function(){return n.end()},function(e){return n.error(e)}),n.stream},dr.prototype.renderTemplates=function(t,r,n){var i,o,s,a,u,c,l,h;return x(this,function(e){switch(e.label){case 0:n=n||new(r.opts.keepOutputType?hr:ur),i=[],e.label=1;case 1:e.trys.push([1,8,9,10]),o=L(t),s=o.next(),e.label=2;case 2:if(s.done)return[3,7];a=s.value,r.renderLimit.check(ar().now()),e.label=3;case 3:return e.trys.push([3,5,,6]),[4,a.render(r,n)];case 4:return(u=e.sent())&&n.write(u),r.breakCalled||r.continueCalled?[3,7]:[3,6];case 5:if(u=e.sent(),c=ie.is(u)?u:new fe(u,a),r.opts.catchAllErrors)return i.push(c),[3,6];throw c;case 6:return s=o.next(),[3,2];case 7:return[3,10];case 8:return c=e.sent(),l={error:c},[3,10];case 9:try{s&&!s.done&&(h=o.return)&&h.call(o)}finally{if(l)throw l.error}return[7];case 10:if(i.length)throw new me(i);return[2,n.buffer]}})};var fr=dr;function dr(){}mr.prototype.evaluate=function(t,r){var n,i,o,s,a,u,c,l,h,p,f;return x(this,function(e){switch(e.label){case 0:F(t,"unable to evaluate: context not defined"),n=[],e.label=1;case 1:e.trys.push([1,11,12,13]),i=L(this.postfix),o=i.next(),e.label=2;case 2:return o.done?[3,10]:on(s=o.value)?(a=n.pop(),u=void 0,1!==qt[s.operator]?[3,4]:[4,t.opts.operators[s.operator](a,t)]):[3,7];case 3:return u=e.sent(),[3,6];case 4:return h=n.pop(),[4,t.opts.operators[s.operator](h,a,t)];case 5:u=e.sent(),e.label=6;case 6:return n.push(u),[3,9];case 7:return l=(c=n).push,[4,S(s,t,r)];case 8:l.apply(c,[e.sent()]),e.label=9;case 9:return o=i.next(),[3,2];case 10:return[3,13];case 11:return h=e.sent(),p={error:h},[3,13];case 12:try{o&&!o.done&&(f=i.return)&&f.call(i)}finally{if(p)throw p.error}return[7];case 13:return[2,n[0]]}})},mr.prototype.valid=function(){return!!this.postfix.length};var gr=mr;function mr(e){this.postfix=g([],d(function(t){var r,n,i,o,s,a;return x(this,function(e){switch(e.label){case 0:r=[],e.label=1;case 1:e.trys.push([1,10,11,12]),n=L(t),i=n.next(),e.label=2;case 2:if(i.done)return[3,9];if(!on(o=i.value))return[3,6];e.label=3;case 3:return r.length&&r[r.length-1].getPrecedence()>o.getPrecedence()?[4,r.pop()]:[3,5];case 4:return e.sent(),[3,3];case 5:return r.push(o),[3,8];case 6:return[4,o];case 7:e.sent(),e.label=8;case 8:return i=n.next(),[3,2];case 9:return[3,12];case 10:return s=e.sent(),s={error:s},[3,12];case 11:try{i&&!i.done&&(a=n.return)&&a.call(n)}finally{if(s)throw s.error}return[7];case 12:return r.length?[4,r.pop()]:[3,14];case 13:return e.sent(),[3,12];case 14:return[2]}})}(e)),!1)}function S(t,r,n){return void 0===n&&(n=!1),x(this,function(e){switch(e.label){case 0:return t?"content"in t?[2,t.content]:ln(t)?[4,function(t,r,n){var i,o,s,a,u,c,l,h,p;return x(this,function(e){switch(e.label){case 0:i=[],e.label=1;case 1:e.trys.push([1,6,7,8]),o=L(t.props),s=o.next(),e.label=2;case 2:return s.done?[3,5]:(c=s.value,u=(a=i).push,[4,S(c,r,!1)]);case 3:u.apply(a,[e.sent()]),e.label=4;case 4:return s=o.next(),[3,2];case 5:return[3,8];case 6:return c=e.sent(),h={error:c},[3,8];case 7:try{s&&!s.done&&(p=o.return)&&p.call(o)}finally{if(h)throw h.error}return[7];case 8:return(e.trys.push([8,14,,15]),t.variable)?[4,S(t.variable,r,n)]:[3,11];case 9:return l=e.sent(),[4,r._getFromScope(l,i)];case 10:return[2,e.sent()];case 11:return[4,r._get(i)];case 12:return[2,e.sent()];case 13:return[3,15];case 14:if(l=e.sent(),n&&"InternalUndefinedVariableError"===l.name)return[2,null];throw new we(l,t);case 15:return[2]}})}(t,r,n)]:[3,2]:[2];case 1:return[2,e.sent()];case 2:return hn(t)?[4,function(t,r){var n,i;return x(this,function(e){switch(e.label){case 0:return[4,S(t.lhs,r)];case 1:return n=e.sent(),[4,S(t.rhs,r)];case 2:return i=e.sent(),r.memoryLimit.use(i-n+1),[2,Z(+n,+i+1)]}})}(t,r)]:[3,4];case 3:return[2,e.sent()];case 4:return[2]}})}function yr(e){return e.content}function vr(e,t){return!wr(e,t)}function wr(e,t){return e=v(e),t.opts.jsTruthy?!e:!1===e||null==e}Ve={"==":O,"!=":function(e,t){return!O(e,t)},">":function(e,t){return f(e)?e.gt(t):f(t)?t.lt(e):v(e)>v(t)},"<":function(e,t){return f(e)?e.lt(t):f(t)?t.gt(e):v(e)<v(t)},">=":function(e,t){return f(e)?e.geq(t):f(t)?t.leq(e):v(e)>=v(t)},"<=":function(e,t){return f(e)?e.leq(t):f(t)?t.geq(e):v(e)<=v(t)},contains:function(e,t){return w(e=v(e))?e.some(function(e){return O(e,t)}):!!c(null==e?void 0:e.indexOf)&&-1<e.indexOf(v(t))},not:function(e,t){return wr(v(e),t)},and:function(e,t,r){return vr(v(e),r)&&vr(v(t),r)},or:function(e,t,r){return vr(v(e),r)||vr(v(t),r)}};function O(e,t){var r,n;return f(e)?e.equals(t):f(t)?t.equals(e):(e=v(e),t=v(t),w(e)?w(t)&&(n=t,(r=e).length===n.length)&&!r.some(function(e,t){return!O(e,n[t])}):e===t)}var br=function(e,t,r,n){this.key=e,this.value=t,this.next=r,this.prev=n},kr=(Tr.prototype.write=function(e,t){this.cache[e]?this.cache[e].value=t:(t=new br(e,t,this.head.next,this.head),this.head.next.prev=t,this.head.next=t,this.cache[e]=t,this.size++,this.ensureLimit())},Tr.prototype.read=function(e){var t;if(this.cache[e])return t=this.cache[e].value,this.remove(e),this.write(e,t),t},Tr.prototype.remove=function(e){var t=this.cache[e];t.prev.next=t.next,t.next.prev=t.prev,delete this.cache[e],this.size--},Tr.prototype.clear=function(){this.head.next=this.tail,this.tail.prev=this.head,this.size=0,this.cache={}},Tr.prototype.ensureLimit=function(){this.size>this.limit&&this.remove(this.tail.prev.key)},Tr);function Tr(e,t){void 0===t&&(t=0),this.limit=e,this.size=t,this.cache={},this.head=new br("HEAD",null,null,null),this.tail=new br("TAIL",null,null,null),this.head.next=this.tail,this.tail.prev=this.head}function xr(e,t){var r=document.createElement("base"),e=(r.href=e,document.getElementsByTagName("head")[0]),n=(e.insertBefore(r,e.firstChild),document.createElement("a")),t=(n.href=t,n.href);return e.removeChild(r),t}r=Object.freeze({__proto__:null,resolve:function(e,t,i){return e.length&&"/"!==$(e)&&(e+="/"),xr(e,t).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/,function(e,t,r){var n=r.split("/").pop();return/\.\w+$/.test(n)?e:t+r+i})},readFile:function(n){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,new Promise(function(e,t){var r=new XMLHttpRequest;r.onload=function(){200<=r.status&&r.status<300?e(r.responseText):t(new Error(r.statusText))},r.onerror=function(){t(new Error("An error occurred whilst receiving the response."))},r.open("GET",n),r.send()})]})})},readFileSync:function(e){var t=new XMLHttpRequest;if(t.open("GET",e,!1),t.send(),t.status<200||300<=t.status)throw new Error(t.statusText);return t.responseText},exists:function(e){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,!0]})})},existsSync:function(e){return!0},dirname:function(e){return xr(e,".")},sep:"/"});function Lr(e,t){return void 0===t&&(t=0),JSON.stringify(e,null,t)}var Fr={default:function(e,t){for(var r=[],n=2;n<arguments.length;n++)r[n-2]=arguments[n];return w(e=v(e))||u(e)?e.length?e:t:(!1!==e||!new Map(r).get("allow_false"))&&(wr(e,this.context)?t:e)},raw:{raw:!0,handler:X},jsonify:Lr,to_integer:function(e){return Number(e)},json:Lr,inspect:function(e,t){void 0===t&&(t=0);var r=[];return JSON.stringify(e,function(e,t){if("object"==typeof t&&null!==t){for(;0<r.length&&r[r.length-1]!==this;)r.pop();if(r.includes(t))return"[Circular]";r.push(t)}return t},t)}},_r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},Sr={"&amp;":"&","&lt;":"<","&gt;":">","&#34;":'"',"&#39;":"'"};function Or(e){return e=m(e),this.context.memoryLimit.use(e.length),e.replace(/&|<|>|"|'/g,function(e){return _r[e]})}var zr=Object.freeze({__proto__:null,escape:Or,xml_escape:function(e){return Or.call(this,e)},escape_once:function(e){return Or.call(this,function(e){return e=m(e),this.context.memoryLimit.use(e.length),e.replace(/&(amp|lt|gt|#34|#39);/g,function(e){return Sr[e]})}.call(this,e))},newline_to_br:function(e){return e=m(e),this.context.memoryLimit.use(e.length),e.replace(/\r?\n/gm,"<br />\n")},strip_html:function(e){return e=m(e),this.context.memoryLimit.use(e.length),e.replace(/<script[\s\S]*?<\/script>|<style[\s\S]*?<\/style>|<.*?>|<!--[\s\S]*?-->/g,"")}}),Rr=(Er.prototype.exists=function(t){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,this.existsSync(t)]})})},Er.prototype.existsSync=function(e){return!h(this.mapping[e])},Er.prototype.readFile=function(t){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,this.readFileSync(t)]})})},Er.prototype.readFileSync=function(e){var t=this.mapping[e];if(h(t))throw new Error("ENOENT: ".concat(e));return t},Er.prototype.dirname=function(e){e=e.split(this.sep);return e.pop(),e.join(this.sep)},Er.prototype.resolve=function(e,t,r){var n,i;if(t+=r,"."===e)return t;var o=e.split(/\/+/);try{for(var s=L(t.split(this.sep)),a=s.next();!a.done;a=s.next()){var u=a.value;"."!==u&&""!==u&&(".."===u?(1<o.length||""!==o[0])&&o.pop():o.push(u))}}catch(e){n={error:e}}finally{try{a&&!a.done&&(i=s.return)&&i.call(s)}finally{if(n)throw n.error}}return o.join(this.sep)},Er);function Er(e){this.mapping=e,this.sep="/"}var qr={root:["."],layouts:["."],partials:["."],relativeReference:!0,jekyllInclude:!1,keyValueSeparator:":",cache:void 0,extname:"",fs:r,dynamicPartials:!0,jsTruthy:!1,dateFormat:"%A, %B %-e, %Y at %-l:%M %P %z",locale:"",trimTagRight:!1,trimTagLeft:!1,trimOutputRight:!1,trimOutputLeft:!1,greedy:!0,tagDelimiterLeft:"{%",tagDelimiterRight:"%}",outputDelimiterLeft:"{{",outputDelimiterRight:"}}",preserveTimezones:!1,strictFilters:!1,strictVariables:!1,ownPropertyOnly:!0,lenientIf:!1,globals:{},keepOutputType:!1,operators:Ve,memoryLimit:1/0,parseLimit:1/0,renderLimit:1/0};function Nr(e){var t,r;return e.hasOwnProperty("root")&&(e.hasOwnProperty("partials")||(e.partials=e.root),e.hasOwnProperty("layouts")||(e.layouts=e.root)),e.hasOwnProperty("cache")&&(r=void 0,r="number"==typeof e.cache?0<e.cache?new kr(e.cache):void 0:"object"==typeof e.cache?e.cache:e.cache?new kr(1024):void 0,e.cache=r),(e=T(T(T({},qr),e.jekyllInclude?{dynamicPartials:!1}:{}),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=Dr(e.root),e.partials=Dr(e.partials),e.layouts=Dr(e.layouts),e.outputEscape=e.outputEscape&&("escape"===(r=e.outputEscape)?Or:"json"===r?Fr.json:(F(c(r),"`outputEscape` need to be of type string or function"),r)),e.locale||(e.locale=null!=(t=null==(t=tt())?void 0:t().resolvedOptions().locale)?t:"en-US"),e.templates&&(e.fs=new Rr(e.templates),e.relativeReference=!0,e.root=e.partials=e.layouts="."),e}function Dr(e){var t=[];return w(e)&&(t=e),t=u(e)?[e]:t}function Mr(e,t){for(var r=!1,n=0;n<e.length;n++){var i=e[n];if(nn(i)){if(!r&&i.trimLeft){a=s=o=void 0;var o=e[n-1],s=t.greedy;if(o&&sn(o))for(var a=s?Oe:ze;p[o.input.charCodeAt(o.end-1-o.trimRight)]&a;)o.trimRight++}if(un(i)&&("raw"===i.name?r=!0:"endraw"===i.name&&(r=!1)),!r&&i.trimRight){c=s=u=void 0;var u=e[n+1],s=t.greedy;if(u&&sn(u)){for(var c=s?Oe:ze;p[u.input.charCodeAt(u.begin+u.trimLeft)]&c;)u.trimLeft++;"\n"===u.input.charAt(u.begin+u.trimLeft)&&u.trimLeft++}}}}}R.prototype.readExpression=function(){return new gr(this.readExpressionTokens())},R.prototype.readExpressionTokens=function(){var t;return x(this,function(e){switch(e.label){case 0:return this.p<this.N?(t=this.readOperator())?[4,t]:[3,2]:[3,5];case 1:return e.sent(),[3,0];case 2:return(t=this.readValue())?[4,t]:[3,4];case 3:return e.sent(),[3,0];case 4:case 5:return[2]}})},R.prototype.readOperator=function(){this.skipBlank();var e=this.matchTrie(this.opTrie);if(-1!==e)return new Nt(this.input,this.p,this.p=e,this.file)},R.prototype.matchTrie=function(e){for(var t,r=e,n=this.p;r[this.input[n]]&&n<this.N;)(r=r[this.input[n++]]).end&&(t=r);return!t||t.needBoundary&&Re(this.peek(n-this.p))?-1:n},R.prototype.readFilteredValue=function(){var e=this.p,t=this.readExpression(),r=(this.assert(t.valid(),"invalid value expression: ".concat(this.snapshot())),this.readFilters());return new ir(t,r,this.input,e,this.p,this.file)},R.prototype.readFilters=function(){for(var e=[];;){var t=this.readFilter();if(!t)return e;e.push(t)}},R.prototype.readFilter=function(){var e=this;if(this.skipBlank(),this.end())return null;this.assert("|"===this.read(),'expected "|" before filter');var t=this.readIdentifier();if(!t.size())return this.assert(this.end(),"expected filter name"),null;var r=[];if(this.skipBlank(),":"===this.peek())do{++this.p;var n=this.readFilterArg()}while(n&&r.push(n),this.skipBlank(),this.assert(this.end()||","===this.peek()||"|"===this.peek(),function(){return"unexpected character ".concat(e.snapshot())}),","===this.peek());else if("|"!==this.peek()&&!this.end())throw this.error('expected ":" after filter name');return new At(t.getText(),r,this.input,t.begin,this.p,this.file)},R.prototype.readFilterArg=function(){var e=this.readValue();if(e){if(this.skipBlank(),":"!==this.peek())return e;++this.p;var t=this.readValue();return[e.getText(),t]}},R.prototype.readTopLevelTokens=function(e){void 0===e&&(e=qr);for(var t=[];this.p<this.N;){var r=this.readTopLevelToken(e);t.push(r)}return Mr(t,e),t},R.prototype.readTopLevelToken=function(e){var t=e.tagDelimiterLeft,r=e.outputDelimiterLeft;return-1<this.rawBeginAt?this.readEndrawOrRawContent(e):this.match(t)?this.readTagToken(e):this.match(r)?this.readOutputToken(e):this.readHTMLToken([t,r])},R.prototype.readHTMLToken=function(e){for(var t=this,r=this.p;this.p<this.N&&!e.some(function(e){return t.match(e)});)++this.p;return new wt(this.input,r,this.p,this.file)},R.prototype.readTagToken=function(e){var t=this.file,r=this.input,n=this.p;if(-1===this.readToDelimiter(e.tagDelimiterRight))throw this.error("tag ".concat(this.snapshot(n)," not closed"),n);r=new ft(r,n,this.p,e,t);return"raw"===r.name&&(this.rawBeginAt=n),r},R.prototype.readToDelimiter=function(e,t){for(void 0===t&&(t=!1),this.skipBlank();this.p<this.N;)if(t&&8&this.peekType())this.readQuoted();else if(++this.p,this.rmatch(e))return this.p;return-1},R.prototype.readOutputToken=function(e){void 0===e&&(e=qr);var t=this.file,r=this.input,n=e.outputDelimiterRight,i=this.p;if(-1===this.readToDelimiter(n,!0))throw this.error("output ".concat(this.snapshot(i)," not closed"),i);return new mt(r,i,this.p,e,t)},R.prototype.readEndrawOrRawContent=function(e){for(var t,r=e.tagDelimiterLeft,n=e.tagDelimiterRight,i=this.p,o=this.readTo(r)-r.length;this.p<this.N;)if("endraw"!==this.readIdentifier().getText())o=this.readTo(r)-r.length;else for(;this.p<=this.N;){if(this.rmatch(n))return t=this.p,i===o?(this.rawBeginAt=-1,new ft(this.input,i,t,e,this.file)):(this.p=o,new wt(this.input,i,o,this.file));if(this.rmatch(r))break;this.p++}throw this.error("raw ".concat(this.snapshot(this.rawBeginAt)," not closed"),i)},R.prototype.readLiquidTagTokens=function(e){void 0===e&&(e=qr);for(var t=[];this.p<this.N;){var r=this.readLiquidTagToken(e);r&&t.push(r)}return t},R.prototype.readLiquidTagToken=function(e){var t,r;if(this.skipBlank(),!this.end())return t=this.p,this.readToDelimiter("\n"),r=this.p,new tr(this.input,t,r,e,this.file)},R.prototype.error=function(e,t){return void 0===t&&(t=this.p),new ae(e,new Ft(this.input,t,this.N,this.file))},R.prototype.assert=function(e,t,r){if(!e)throw this.error("function"==typeof t?t():t,r)},R.prototype.snapshot=function(e){return void 0===e&&(e=this.p),JSON.stringify((e=this.input.slice(e,this.N),t=32,e.length>t?e.slice(0,t-3)+"...":e));var t},R.prototype.readWord=function(){return this.readIdentifier()},R.prototype.readIdentifier=function(){this.skipBlank();for(var e=this.p;!this.end()&&Re(this.peek());)++this.p;return new Ft(this.input,e,this.p,this.file)},R.prototype.readNonEmptyIdentifier=function(){var e=this.readIdentifier();return e.size()?e:void 0},R.prototype.readTagName=function(){return this.skipBlank(),"#"===this.input[this.p]?this.input.slice(this.p,++this.p):this.readIdentifier().getText()},R.prototype.readHashes=function(e){for(var t=[];;){var r=this.readHash(e);if(!r)return t;t.push(r)}},R.prototype.readHash=function(e){this.skipBlank(),","===this.peek()&&++this.p;var t,r=this.p,n=this.readNonEmptyIdentifier();if(n)return this.skipBlank(),e=u(e)?e:e?"=":":",this.peek()===e&&(++this.p,t=this.readValue()),new Bt(this.input,r,this.p,n,t,this.file)},R.prototype.remaining=function(){return this.input.slice(this.p,this.N)},R.prototype.advance=function(e){this.p+=e=void 0===e?1:e},R.prototype.end=function(){return this.p>=this.N},R.prototype.read=function(){return this.input[this.p++]},R.prototype.readTo=function(e){for(;this.p<this.N;)if(++this.p,this.rmatch(e))return this.p;return-1},R.prototype.readValue=function(){this.skipBlank();var e=this.p,t=this.readLiteral()||this.readQuoted()||this.readRange()||this.readNumber(),r=this.readProperties(!t);return r.length?new jt(t,r,this.input,e,this.p):t},R.prototype.readScopeValue=function(){this.skipBlank();var e=this.p,t=this.readProperties();if(t.length)return new jt(void 0,t,this.input,e,this.p)},R.prototype.readProperties=function(e){void 0===e&&(e=!0);for(var t=[];;){if("["===this.peek()){this.p++;var r=this.readValue()||new Ft(this.input,this.p,this.p,this.file);this.assert(-1!==this.readTo("]"),"[ not closed")}else{if(e&&!t.length)if(r=this.readNonEmptyIdentifier()){t.push(r);continue}if("."!==this.peek()||"."===this.peek(1))break;if(this.p++,!(r=this.readNonEmptyIdentifier()))break}t.push(r)}return t},R.prototype.readNumber=function(){this.skipBlank();var e,t=!1,r=!1,n=0;for(64&this.peekType()&&n++;this.p+n<=this.N;){if(32&this.peekType(n))r=!0;else{if("."!==this.peek(n)||"."===this.peek(n+1))break;if(t||!r)return;t=!0}n++}if(r&&!Re(this.peek(n)))return e=new Tt(this.input,this.p,this.p+n,this.file),this.advance(n),e},R.prototype.readLiteral=function(){this.skipBlank();var e,t=this.matchTrie(this.literalTrie);if(-1!==t)return e=new Ot(this.input,this.p,t,this.file),this.p=t,e},R.prototype.readRange=function(){this.skipBlank();var e,t,r=this.p;if("("===this.peek())return++this.p,e=this.readValueOrThrow(),this.p+=2,t=this.readValueOrThrow(),++this.p,new Gt(this.input,r,this.p,e,t,this.file)},R.prototype.readValueOrThrow=function(){var e=this,t=this.readValue();return this.assert(t,function(){return"unexpected token ".concat(e.snapshot(),", value expected")}),t},R.prototype.readQuoted=function(){this.skipBlank();var e=this.p;if(8&this.peekType()){++this.p;for(var t=!1;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);return new Qt(this.input,e,this.p,this.file)}},R.prototype.readFileNameTemplate=function(t){var r,n,i;return x(this,function(e){switch(e.label){case 0:r=t.outputDelimiterLeft,n=[","," ",r],i=new Set(n),e.label=1;case 1:return this.p<this.N&&!i.has(this.peek())?[4,this.match(r)?this.readOutputToken(t):this.readHTMLToken(n)]:[3,3];case 2:return e.sent(),[3,1];case 3:return[2]}})},R.prototype.match=function(e){for(var t=0;t<e.length;t++)if(e[t]!==this.input[this.p+t])return!1;return!0},R.prototype.rmatch=function(e){for(var t=0;t<e.length;t++)if(e[e.length-1-t]!==this.input[this.p-1-t])return!1;return!0},R.prototype.peekType=function(e){return this.p+(e=void 0===e?0:e)>=this.N?0:p[this.input.charCodeAt(this.p+e)]},R.prototype.peek=function(e){return this.p+(e=void 0===e?0:e)>=this.N?"":this.input[this.p+e]},R.prototype.skipBlank=function(){for(;this.peekType()&Oe;)++this.p};var z=R;function R(e,t,r,n){void 0===t&&(t=qr.operators),this.input=e,this.file=r,this.rawBeginAt=-1,this.p=n?n[0]:0,this.N=n?n[1]:e.length,this.opTrie=Ke(t),this.literalTrie=Ke(Ue)}Vr.prototype.on=function(e,t){return this.handlers[e]=t,this},Vr.prototype.trigger=function(e,t){e=this.handlers[e];return!!e&&(e.call(this,t),!0)},Vr.prototype.start=function(){var e,t;for(this.trigger("start");!this.stopRequested&&(e=this.tokens.shift());)this.trigger("token",e)||un(e)&&this.trigger("tag:".concat(e.name),e)||(t=this.parseToken(e,this.tokens),this.trigger("template",t));return this.stopRequested||this.trigger("end"),this},Vr.prototype.stop=function(){return this.stopRequested=!0,this};var jr=Vr;function Vr(e,t){this.handlers={},this.stopRequested=!1,this.tokens=e,this.parseToken=t}function Pr(e){this.token=e}o(Cr,Ar=Pr);var Ar,E=Cr;function Cr(e,t,r){var n=Ar.call(this,e)||this;return n.name=e.name,n.liquid=r,n.tokenizer=e.tokenizer,n}Br.prototype.render=function(t){var r,n,i,o,s,a,u,c,l;return x(this,function(e){switch(e.label){case 0:r={},e.label=1;case 1:e.trys.push([1,8,9,10]),n=L(Object.keys(this.hash)),i=n.next(),e.label=2;case 2:return i.done?[3,7]:(o=i.value,s=r,a=o,void 0!==this.hash[o]?[3,3]:(u=!0,[3,5]));case 3:return[4,S(this.hash[o],t)];case 4:u=e.sent(),e.label=5;case 5:s[a]=u,e.label=6;case 6:return i=n.next(),[3,2];case 7:return[3,10];case 8:return c=e.sent(),c={error:c},[3,10];case 9:try{i&&!i.done&&(l=n.return)&&l.call(n)}finally{if(c)throw c.error}return[7];case 10:return[2,r]}})};var Ir=Br;function Br(e,t){this.hash={};var r,n,e=new z(e,{});try{for(var i=L(e.readHashes(t)),o=i.next();!o.done;o=i.next()){var s=o.value;this.hash[s.name.content]=s.value}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}Ur.prototype.render=function(t,r){var n,i,o,s,a,u,c,l,h,p,f;return x(this,function(e){switch(e.label){case 0:n=[],e.label=1;case 1:e.trys.push([1,8,9,10]),i=L(this.args),o=i.next(),e.label=2;case 2:return o.done?[3,7]:w(s=o.value)?(u=(a=n).push,c=[s[0]],[4,S(s[1],r)]):[3,4];case 3:return u.apply(a,[c.concat([e.sent()])]),[3,6];case 4:return h=(l=n).push,[4,S(s,r)];case 5:h.apply(l,[e.sent()]),e.label=6;case 6:return o=i.next(),[3,2];case 7:return[3,10];case 8:return p=e.sent(),p={error:p},[3,10];case 9:try{o&&!o.done&&(f=i.return)&&f.call(i)}finally{if(p)throw p.error}return[7];case 10:return[4,this.handler.apply({context:r,token:this.token,liquid:this.liquid},g([t],d(n),!1))];case 11:return[2,e.sent()]}})};var Hr=Ur;function Ur(e,t,r){this.token=e,this.name=e.name,this.handler=c(t)?t:c(null==t?void 0:t.handler)?t.handler:X,this.raw=!c(t)&&!(null==t||!t.raw),this.args=e.args,this.liquid=r}Kr.prototype.value=function(t,r){var n,i,o,s,a;return x(this,function(e){switch(e.label){case 0:return r=r||t.opts.lenientIf&&0<this.filters.length&&"default"===this.filters[0].name,[4,this.initial.evaluate(t,r)];case 1:n=e.sent(),e.label=2;case 2:e.trys.push([2,7,8,9]),i=L(this.filters),o=i.next(),e.label=3;case 3:return o.done?[3,6]:[4,o.value.render(n,t)];case 4:n=e.sent(),e.label=5;case 5:return o=i.next(),[3,3];case 6:return[3,9];case 7:return s=e.sent(),s={error:s},[3,9];case 8:try{o&&!o.done&&(a=i.return)&&a.call(i)}finally{if(s)throw s.error}return[7];case 9:return[2,n]}})},Kr.prototype.getFilter=function(e,t){var r=e.filters[t];return F(r||!e.options.strictFilters,function(){return"undefined filter: ".concat(t)}),r};var q=Kr;function Kr(e,t){var r=this,e=(this.filters=[],"string"==typeof e?new z(e,t.options.operators).readFilteredValue():e);this.initial=e.initial,this.filters=e.filters.map(function(e){return new Hr(e,r.getFilter(t,e.name),t)})}o($r,Wr=Pr),$r.prototype.render=function(t,r){var n;return x(this,function(e){switch(e.label){case 0:return[4,this.value.value(t,!1)];case 1:return n=e.sent(),r.write(n),[2]}})};var Wr,Yr=$r;function $r(e,t){var r,n=this,n=Wr.call(this,e)||this,e=new z(e.input,t.options.operators,e.file,e.contentRange),e=(n.value=new q(e.readFilteredValue(),t),n.value.filters),i=t.options.outputEscape;return null!=(r=e[e.length-1])&&r.raw||!i||(r=new At(toString.call(i),[],"",0,0),e.push(new Hr(r,i,t))),n}o(Gr,Qr=Pr),Gr.prototype.render=function(e,t){return x(this,function(e){return t.write(this.str),[2]})};var Qr,Zr,Jr=Gr;function Gr(e){var t=Qr.call(this,e)||this;return t.str=e.getContent(),t}(r=Zr=Zr||{}).Partials="partials",r.Layouts="layouts",r.Root="root";en.prototype.lookup=function(t,r,n,i){var o,s,a,u,c,l,h,p;return x(this,function(e){switch(e.label){case 0:o=this.options.fs,s=this.options[r],e.label=1;case 1:e.trys.push([1,8,9,10]),a=L(this.candidates(t,s,i,r!==Zr.Root)),u=a.next(),e.label=2;case 2:return u.done?[3,7]:(c=u.value,n?(l=o.existsSync(c),[3,5]):[3,3]);case 3:return[4,o.exists(c)];case 4:l=e.sent(),e.label=5;case 5:if(l)return[2,c];e.label=6;case 6:return u=a.next(),[3,2];case 7:return[3,10];case 8:return h=e.sent(),h={error:h},[3,10];case 9:try{u&&!u.done&&(p=a.return)&&p.call(a)}finally{if(h)throw h.error}return[7];case 10:throw this.lookupError(t,s)}})},en.prototype.candidates=function(t,r,n,i){var o,s,a,u,c,l,h,p,f,d,g,m,y;return x(this,function(e){switch(e.label){case 0:if(s=this.options,o=s.fs,s=s.extname,!this.shouldLoadRelative(t)||!n)return[3,8];p=o.resolve(this.dirname(n),t,s),e.label=1;case 1:e.trys.push([1,6,7,8]),a=L(r),u=a.next(),e.label=2;case 2:return u.done?[3,5]:(h=u.value,i&&!this.contains(h,p)?[3,4]:[4,p]);case 3:return e.sent(),[3,5];case 4:return u=a.next(),[3,2];case 5:return[3,8];case 6:return d=e.sent(),d={error:d},[3,8];case 7:try{u&&!u.done&&(g=a.return)&&g.call(a)}finally{if(d)throw d.error}return[7];case 8:e.trys.push([8,13,14,15]),c=L(r),l=c.next(),e.label=9;case 9:return l.done?[3,12]:(h=l.value,p=o.resolve(h,t,s),i&&!this.contains(h,p)?[3,11]:[4,p]);case 10:e.sent(),e.label=11;case 11:return l=c.next(),[3,9];case 12:return[3,15];case 13:return m=e.sent(),m={error:m},[3,15];case 14:try{l&&!l.done&&(y=c.return)&&y.call(c)}finally{if(m)throw m.error}return[7];case 15:return void 0===o.fallback?[3,17]:void 0===(f=o.fallback(t))?[3,17]:[4,f];case 16:e.sent(),e.label=17;case 17:return[2]}})},en.prototype.dirname=function(e){var t=this.options.fs;return F(t.dirname,"`fs.dirname` is required for relative reference"),t.dirname(e)},en.prototype.lookupError=function(e,t){var r=new Error("ENOENT");return r.message='ENOENT: Failed to lookup "'.concat(e,'" in "').concat(t,'"'),r.code="ENOENT",r};var Xr=en;function en(e){var t;(this.options=e).relativeReference?(F(e=e.fs.sep,"`fs.sep` is required for relative reference"),t=new RegExp(["."+e,".."+e,"./","../"].map(function(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}).join("|")),this.shouldLoadRelative=function(e){return t.test(e)}):this.shouldLoadRelative=function(e){return!1},this.contains=this.options.fs.contains||function(){return!0}}rn.prototype.parse=function(e,t){e=String(e),this.parseLimit.use(e.length);e=new z(e,this.liquid.options.operators,t).readTopLevelTokens(this.liquid.options);return this.parseTokens(e)},rn.prototype.parseTokens=function(e){for(var t,r=[],n=[];t=e.shift();)try{r.push(this.parseToken(t,e))}catch(e){if(!this.liquid.options.catchAllErrors)throw e;n.push(e)}if(n.length)throw new me(n);return r},rn.prototype.parseToken=function(t,e){try{var r;return un(t)?(F(r=this.liquid.tags[t.name],'tag "'.concat(t.name,'" not found')),new r(t,e,this.liquid,this)):an(t)?new Yr(t,this.liquid):new Jr(t)}catch(e){if(ie.is(e))throw e;throw new le(e,t)}},rn.prototype.parseStream=function(e){var r=this;return new jr(e,function(e,t){return r.parseToken(e,t)})},rn.prototype._parseFileCached=function(t,r,n,i){var o,s,a,u,c,l;return void 0===n&&(n=Zr.Root),x(this,function(e){switch(e.label){case 0:return o=this.cache,s=this.loader.shouldLoadRelative(t)?i+","+t:n+":"+t,[4,o.read(s)];case 1:return(l=e.sent())?[2,l]:(a=this._parseFile(t,r,n,i),r?[4,a]:[3,3]);case 2:return c=e.sent(),[3,4];case 3:c=b(a),e.label=4;case 4:u=c,o.write(s,u),e.label=5;case 5:return e.trys.push([5,7,,8]),[4,u];case 6:return[2,e.sent()];case 7:throw l=e.sent(),o.remove(s),l;case 8:return[2]}})},rn.prototype._parseFile=function(t,r,n,i){var o,s,a;return void 0===n&&(n=Zr.Root),x(this,function(e){switch(e.label){case 0:return[4,this.loader.lookup(t,n,r,i)];case 1:return(o=e.sent(),s=this.parse,r)?(a=this.fs.readFileSync(o),[3,4]):[3,2];case 2:return[4,this.fs.readFile(o)];case 3:a=e.sent(),e.label=4;case 4:return[2,s.apply(this,[a,o])]}})};var tn=rn;function rn(e){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 Xr(this.liquid.options),this.parseLimit=new ut("parse length",e.options.parseLimit)}function nn(e){return!!(N(e)&l.TokenKind.Delimited)}function on(e){return N(e)===l.TokenKind.Operator}function sn(e){return N(e)===l.TokenKind.HTML}function an(e){return N(e)===l.TokenKind.Output}function un(e){return N(e)===l.TokenKind.Tag}function cn(e){return N(e)===l.TokenKind.Quoted}function ln(e){return N(e)===l.TokenKind.PropertyAccess}function hn(e){return N(e)===l.TokenKind.Range}function N(e){return e?e.kind:-1}(r=l.TokenKind||(l.TokenKind={}))[r.Number=1]="Number",r[r.Literal=2]="Literal",r[r.Tag=4]="Tag",r[r.Output=8]="Output",r[r.HTML=16]="HTML",r[r.Filter=32]="Filter",r[r.Hash=64]="Hash",r[r.PropertyAccess=128]="PropertyAccess",r[r.Word=256]="Word",r[r.Range=512]="Range",r[r.Quoted=1024]="Quoted",r[r.Operator=2048]="Operator",r[r.FilteredValue=4096]="FilteredValue",r[r.Delimited=12]="Delimited";var pn,r=Object.freeze({__proto__:null,isDelimitedToken:nn,isOperatorToken:on,isHTMLToken:sn,isOutputToken:an,isTagToken:un,isQuotedToken:cn,isLiteralToken:function(e){return N(e)===l.TokenKind.Literal},isNumberToken:function(e){return N(e)===l.TokenKind.Number},isPropertyAccessToken:ln,isWordToken:function(e){return N(e)===l.TokenKind.Word},isRangeToken:hn}),fn=(D.prototype.getRegister=function(e){return this.registers[e]=this.registers[e]||{}},D.prototype.setRegister=function(e,t){return this.registers[e]=t},D.prototype.saveRegister=function(){for(var t=this,e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e.map(function(e){return[e,t.getRegister(e)]})},D.prototype.restoreRegister=function(e){var r=this;return e.forEach(function(e){var e=d(e,2),t=e[0],e=e[1];return r.setRegister(t,e)})},D.prototype.getAll=function(){return g([this.globals,this.environments],d(this.scopes),!1).reduce(function(e,t){return T(e,t)},{})},D.prototype.get=function(e){return this.getSync(e)},D.prototype.getSync=function(e){return k(this._get(e))},D.prototype._get=function(t){var r;return x(this,function(e){switch(e.label){case 0:return r=this.findScope(t[0]),[4,this._getFromScope(r,t)];case 1:return[2,e.sent()]}})},D.prototype.getFromScope=function(e,t){return k(this._getFromScope(e,t))},D.prototype._getFromScope=function(t,r,n){var i;return void 0===n&&(n=this.strictVariables),x(this,function(e){switch(e.label){case 0:u(r)&&(r=r.split(".")),i=0,e.label=1;case 1:return i<r.length?[4,function(e,t,r){if(e=function e(t){return t&&c(t.toLiquid)?e(t.toLiquid()):t}(e),t=v(t),h(e))return e;if(w(e)&&t<0)return e[e.length+ +t];r=function(e,t,r){if(!r||I.call(e,t)||e instanceof s)return e[t]}(e,t,r);if(void 0===r&&e instanceof s)return e.liquidMethodMissing(t);if(c(r))return r.call(e);{if("size"===t)return function(e){return I.call(e,"size")||void 0!==e.size?e.size:w(e)||u(e)?e.length:"object"==typeof e?Object.keys(e).length:void 0}(e);if("first"===t)return function(e){return w(e)?e[0]:e.first}(e);if("last"===t)return function(e){return w(e)?e[e.length-1]:e.last}(e)}return r}(t,r[i],this.ownPropertyOnly)]:[3,4];case 2:if(t=e.sent(),n&&void 0===t)throw new Te(r.slice(0,i+1).join("."));e.label=3;case 3:return i++,[3,1];case 4:return[2,t]}})},D.prototype.push=function(e){return this.scopes.push(e)},D.prototype.pop=function(){return this.scopes.pop()},D.prototype.bottom=function(){return this.scopes[0]},D.prototype.spawn=function(e){return new D(e=void 0===e?{}:e,this.opts,{sync:this.sync,globals:this.globals,strictVariables:this.strictVariables},{renderLimit:this.renderLimit,memoryLimit:this.memoryLimit})},D.prototype.findScope=function(e){for(var t=this.scopes.length-1;0<=t;t--){var r=this.scopes[t];if(e in r)return r}return e in this.environments?this.environments:this.globals},D);function D(e,t,r,n){void 0===e&&(e={}),void 0===t&&(t=qr),void 0===r&&(r={});var i,n=void 0===n?{}:n,o=n.memoryLimit,n=n.renderLimit;this.scopes=[{}],this.registers={},this.breakCalled=!1,this.continueCalled=!1,this.sync=!!r.sync,this.opts=t,this.globals=null!=(i=r.globals)?i:t.globals,this.environments=Q(e)?e:Object(e),this.strictVariables=null!=(i=r.strictVariables)?i:this.opts.strictVariables,this.ownPropertyOnly=null!=(e=r.ownPropertyOnly)?e:t.ownPropertyOnly,this.memoryLimit=null!=o?o:new ut("memory alloc",null!=(i=r.memoryLimit)?i:t.memoryLimit),this.renderLimit=null!=n?n:new ut("template render",ar().now()+(null!=(e=r.renderLimit)?e:t.renderLimit))}(dn=pn=pn||{})[dn.OUTPUT=0]="OUTPUT",dn[dn.STORE=1]="STORE";var dn=t(Math.abs),gn=t(Math.max),mn=t(Math.min),yn=t(Math.ceil),vn=t(function(e,t,r){return(r=void 0===r?!1:r)?Math.floor(e/t):e/t}),wn=t(Math.floor),bn=t(function(e,t){return e-t}),kn=t(function(e,t){return e%t}),Tn=t(function(e,t){return e*t});var dn=Object.freeze({__proto__:null,abs:dn,at_least:gn,at_most:mn,ceil:yn,divided_by:vn,floor:wn,minus:bn,modulo:kn,times:Tn,round:function(e,t){return void 0===t&&(t=0),e=v(e),t=v(t),t=Math.pow(10,t),Math.round(e*t)/t},plus:function(e,t){return e=v(e),t=v(t),Number(e)+Number(t)}}),gn=/[^\p{M}\p{L}\p{Nd}]+/gu,xn={raw:/\s+/g,default:gn,pretty:/[^\p{M}\p{L}\p{Nd}._~!$&'()+,;=@]+/gu,ascii:/[^A-Za-z0-9]+/g,latin:gn,none:null};mn=Object.freeze({__proto__:null,url_decode:function(e){return decodeURIComponent(m(e)).replace(/\+/g," ")},url_encode:function(e){return encodeURIComponent(m(e)).replace(/%20/g,"+")},cgi_escape:function(e){return encodeURIComponent(m(e)).replace(/%20/g,"+").replace(/[!'()*]/g,function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()})},uri_escape:function(e){return encodeURI(m(e)).replace(/%5B/g,"[").replace(/%5D/g,"]")},slugify:function(e,t,r){void 0===t&&(t="default"),void 0===r&&(r=!1),e=m(e);var n=xn[t];return n&&(e=(e="latin"===t?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"):e).replace(n,"-").replace(/^-|-$/g,"")),r?e:e.toLowerCase()}}),yn=t(function(e,t){var e=y(e),t=h(t)?" ":m(t),r=e.length*(1+t.length);return this.context.memoryLimit.use(r),e.join(t)}),vn=t(function(e){return W(e)?$(e):""}),wn=t(function(e){return W(e)?e[0]:""}),bn=t(function(e){e=y(e);return this.context.memoryLimit.use(e.length),g([],d(e),!1).reverse()});function Ln(e,t){void 0===t&&(t=[]);e=y(e),t=y(t);return this.context.memoryLimit.use(e.length+t.length),e.concat(t)}kn=Object.freeze({__proto__:null,join:yn,last:vn,first:wn,reverse:bn,sort:function(t,r){var n,i,o,s,a,u,c,l,h,p,f;return x(this,function(e){switch(e.label){case 0:n=[],i=y(t),this.context.memoryLimit.use(i.length),e.label=1;case 1:e.trys.push([1,8,9,10]),o=L(i),s=o.next(),e.label=2;case 2:return s.done?[3,7]:(a=s.value,c=(u=n).push,l=[a],r?[4,this.context._getFromScope(a,m(r).split("."),!1)]:[3,4]);case 3:return h=e.sent(),[3,5];case 4:h=a,e.label=5;case 5:c.apply(u,[l.concat([h])]),e.label=6;case 6:return s=o.next(),[3,2];case 7:return[3,10];case 8:return p=e.sent(),p={error:p},[3,10];case 9:try{s&&!s.done&&(f=o.return)&&f.call(o)}finally{if(p)throw p.error}return[7];case 10:return[2,n.sort(function(e,t){e=e[1],t=t[1];return e<t?-1:t<e?1:0}).map(function(e){return e[0]})]}})},sort_natural:function(e,t){var r=m(t),t=void 0===t?ee:function(e,t){return ee(e[r],t[r])},e=y(e);return this.context.memoryLimit.use(e.length),g([],d(e),!1).sort(t)},size:function(e){return e&&e.length||0},map:function(t,r){var n,i,o,s,a,u,c,l,h;return x(this,function(e){switch(e.label){case 0:n=[],i=y(t),this.context.memoryLimit.use(i.length),e.label=1;case 1:e.trys.push([1,6,7,8]),o=L(i),s=o.next(),e.label=2;case 2:return s.done?[3,5]:(c=s.value,u=(a=n).push,[4,this.context._getFromScope(c,m(r),!1)]);case 3:u.apply(a,[e.sent()]),e.label=4;case 4:return s=o.next(),[3,2];case 5:return[3,8];case 6:return c=e.sent(),l={error:c},[3,8];case 7:try{s&&!s.done&&(h=o.return)&&h.call(o)}finally{if(l)throw l.error}return[7];case 8:return[2,n]}})},sum:function(t,r){var n,i,o,s,a,u,c,l,h,p;return x(this,function(e){switch(e.label){case 0:n=0,i=y(t),e.label=1;case 1:e.trys.push([1,8,9,10]),o=L(i),s=o.next(),e.label=2;case 2:return s.done?[3,7]:(a=s.value,u=Number,r?[4,this.context._getFromScope(a,m(r),!1)]:[3,4]);case 3:return c=e.sent(),[3,5];case 4:c=a,e.label=5;case 5:l=u.apply(void 0,[c]),n+=Number.isNaN(l)?0:l,e.label=6;case 6:return s=o.next(),[3,2];case 7:return[3,10];case 8:return l=e.sent(),h={error:l},[3,10];case 9:try{s&&!s.done&&(p=o.return)&&p.call(o)}finally{if(h)throw h.error}return[7];case 10:return[2,n]}})},compact:function(e){return e=y(e),this.context.memoryLimit.use(e.length),e.filter(function(e){return!h(v(e))})},concat:Ln,push:function(e,t){return Ln.call(this,e,[t])},unshift:function(e,t){return e=y(e),this.context.memoryLimit.use(e.length),(e=g([],d(e),!1)).unshift(t),e},pop:function(e){return(e=g([],d(y(e)),!1)).pop(),e},shift:function(e){return e=y(e),this.context.memoryLimit.use(e.length),(e=g([],d(e),!1)).shift(),e},slice:function(e,t,r){return void 0===r&&(r=1),h(e=v(e))?[]:(w(e)||(e=m(e)),t=t<0?e.length+t:t,this.context.memoryLimit.use(r),e.slice(t,t+r))},where:function(t,r,n){var i,o,s,a,u,c,l,h,p,f,d=this;return x(this,function(e){switch(e.label){case 0:i=[],t=y(t),this.context.memoryLimit.use(t.length),o=new z(m(r)).readScopeValue(),e.label=1;case 1:e.trys.push([1,6,7,8]),s=L(t),a=s.next(),e.label=2;case 2:return a.done?[3,5]:(l=a.value,c=(u=i).push,[4,S(o,this.context.spawn(l))]);case 3:c.apply(u,[e.sent()]),e.label=4;case 4:return a=s.next(),[3,2];case 5:return[3,8];case 6:return l=e.sent(),p={error:l},[3,8];case 7:try{a&&!a.done&&(f=s.return)&&f.call(s)}finally{if(p)throw p.error}return[7];case 8:return h=this.context.opts.jekyllWhere?function(e){return!Me.is(n)&&w(e)?(t=n,e.some(function(e){return O(e,t)})):O(e,n);var t}:function(e){return O(e,n)},[2,t.filter(function(e,t){return void 0===n?vr(i[t],d.context):h(i[t])})]}})},where_exp:function(t,r,n){var i,o,s,a,u,c,l,h,p;return x(this,function(e){switch(e.label){case 0:i=[],o=new q(m(n),this.liquid),s=y(t),this.context.memoryLimit.use(s.length),e.label=1;case 1:e.trys.push([1,6,7,8]),a=L(s),u=a.next(),e.label=2;case 2:return u.done?[3,5]:(c=u.value,[4,o.value(this.context.spawn(((p={})[r]=c,p)))]);case 3:e.sent()&&i.push(c),e.label=4;case 4:return u=a.next(),[3,2];case 5:return[3,8];case 6:return p=e.sent(),l={error:p},[3,8];case 7:try{u&&!u.done&&(h=a.return)&&h.call(a)}finally{if(l)throw l.error}return[7];case 8:return[2,i]}})},group_by:function(t,r){var n,i,o,s,a,u,c,l;return x(this,function(e){switch(e.label){case 0:n=new Map,t=y(t),i=new z(m(r)).readScopeValue(),this.context.memoryLimit.use(t.length),e.label=1;case 1:e.trys.push([1,6,7,8]),o=L(t),s=o.next(),e.label=2;case 2:return s.done?[3,5]:(a=s.value,[4,S(i,this.context.spawn(a))]);case 3:u=e.sent(),n.has(u)||n.set(u,[]),n.get(u).push(a),e.label=4;case 4:return s=o.next(),[3,2];case 5:return[3,8];case 6:return u=e.sent(),c={error:u},[3,8];case 7:try{s&&!s.done&&(l=o.return)&&l.call(o)}finally{if(c)throw c.error}return[7];case 8:return[2,g([],d(n.entries()),!1).map(function(e){e=d(e,2);return{name:e[0],items:e[1]}})]}})},group_by_exp:function(t,r,n){var i,o,s,a,u,c,l,h;return x(this,function(e){switch(e.label){case 0:i=new Map,o=new q(m(n),this.liquid),t=y(t),this.context.memoryLimit.use(t.length),e.label=1;case 1:e.trys.push([1,6,7,8]),s=L(t),a=s.next(),e.label=2;case 2:return a.done?[3,5]:(u=a.value,[4,o.value(this.context.spawn(((h={})[r]=u,h)))]);case 3:h=e.sent(),i.has(h)||i.set(h,[]),i.get(h).push(u),e.label=4;case 4:return a=s.next(),[3,2];case 5:return[3,8];case 6:return c=e.sent(),c={error:c},[3,8];case 7:try{a&&!a.done&&(l=s.return)&&l.call(s)}finally{if(c)throw c.error}return[7];case 8:return[2,g([],d(i.entries()),!1).map(function(e){e=d(e,2);return{name:e[0],items:e[1]}})]}})},find:function(t,r,n){var i,o,s,a,u,c,l;return x(this,function(e){switch(e.label){case 0:i=new z(m(r)).readScopeValue(),o=y(t),e.label=1;case 1:e.trys.push([1,6,7,8]),s=L(o),a=s.next(),e.label=2;case 2:return a.done?[3,5]:(u=a.value,[4,S(i,this.context.spawn(u))]);case 3:if(O(e.sent(),n))return[2,u];e.label=4;case 4:return a=s.next(),[3,2];case 5:return[3,8];case 6:return c=e.sent(),c={error:c},[3,8];case 7:try{a&&!a.done&&(l=s.return)&&l.call(s)}finally{if(c)throw c.error}return[7];case 8:return[2]}})},find_exp:function(t,r,n){var i,o,s,a,u,c,l,h;return x(this,function(e){switch(e.label){case 0:i=new q(m(n),this.liquid),o=y(t),e.label=1;case 1:e.trys.push([1,6,7,8]),s=L(o),a=s.next(),e.label=2;case 2:return a.done?[3,5]:(u=a.value,[4,i.value(this.context.spawn(((h={})[r]=u,h)))]);case 3:if(e.sent())return[2,u];e.label=4;case 4:return a=s.next(),[3,2];case 5:return[3,8];case 6:return h=e.sent(),c={error:h},[3,8];case 7:try{a&&!a.done&&(l=s.return)&&l.call(s)}finally{if(c)throw c.error}return[7];case 8:return[2]}})},uniq:function(e){return e=y(e),this.context.memoryLimit.use(e.length),g([],d(new Set(e)),!1)},sample:function(e,t){return void 0===t&&(t=1),h(e=v(e))?[]:(w(e)||(e=m(e)),this.context.memoryLimit.use(t),e=g([],d(e),!1).sort(function(){return Math.random()-.5}),1===t?e[0]:e.slice(0,t))}});function Fn(e,t,r){var n=(null!=(n=null==e?void 0:e.length)?n:0)+(null!=(n=null==t?void 0:t.length)?n:0)+(null!=(n=null==r?void 0:r.length)?n:0),n=(this.context.memoryLimit.use(n),Sn(e,this.context.opts,r));return n?et(n,t=h(t=v(t))?this.context.opts.dateFormat:m(t)):e}function _n(e,t,r,n){var i=Sn(e,this.context.opts);return i?"ordinal"===r?(r=i.getDate(),et(i,"US"===n?"".concat(t," ").concat(r,"%q, %Y"):"".concat(r,"%q ").concat(t," %Y"))):et(i,"%d ".concat(t," %Y")):e}function Sn(e,t,r){var n=null!=r?r:t.timezoneOffset,i=t.locale;return(t="now"===(e=v(e))||"today"===e?new at(Date.now(),i,n):K(e)?new at(1e3*e,i,n):u(e)?/^\d+$/.test(e)?new at(1e3*+e,i,n):t.preserveTimezones&&void 0===r?at.createDateFixedToTimezone(e,i):new at(e,i,n):new at(e,i,n)).valid()?t:void 0}var Tn=Object.freeze({__proto__:null,date:Fn,date_to_xmlschema:function(e){return Fn.call(this,e,"%Y-%m-%dT%H:%M:%S%:z")},date_to_rfc822:function(e){return Fn.call(this,e,"%a, %d %b %Y %H:%M:%S %z")},date_to_string:function(e,t,r){return _n.call(this,e,"%b",t,r)},date_to_long_string:function(e,t,r){return _n.call(this,e,"%B",t,r)}}),On=/[\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF]/gu,zn=/[^\u4E00-\u9FFF\uF900-\uFAFF\u3400-\u4DBF\u3040-\u309F\u30A0-\u30FF\uAC00-\uD7AF\s]+/gu;var Rn,gn=Object.freeze({__proto__:null,append:function(e,t){return F(2===arguments.length,"append expect 2 arguments"),e=m(e),t=m(t),this.context.memoryLimit.use(e.length+t.length),e+t},prepend:function(e,t){return F(2===arguments.length,"prepend expect 2 arguments"),e=m(e),t=m(t),this.context.memoryLimit.use(e.length+t.length),t+e},lstrip:function(e,t){return e=m(e),this.context.memoryLimit.use(e.length),t?(t=te(m(t)),e.replace(new RegExp("^[".concat(t,"]+"),"g"),"")):e.replace(/^\s+/,"")},downcase:function(e){return e=m(e),this.context.memoryLimit.use(e.length),e.toLowerCase()},upcase:function(e){return e=m(e),this.context.memoryLimit.use(e.length),m(e).toUpperCase()},remove:function(e,t){return e=m(e),this.context.memoryLimit.use(e.length),e.split(m(t)).join("")},remove_first:function(e,t){return e=m(e),this.context.memoryLimit.use(e.length),e.replace(m(t),"")},remove_last:function(e,t){var e=m(e),t=(this.context.memoryLimit.use(e.length),m(t)),r=e.lastIndexOf(t);return-1===r?e:e.substring(0,r)+e.substring(r+t.length)},rstrip:function(e,t){return e=m(e),this.context.memoryLimit.use(e.length),t?(t=te(m(t)),e.replace(new RegExp("[".concat(t,"]+$"),"g"),"")):e.replace(/\s+$/,"")},split:function(e,t){for(var e=m(e),r=(this.context.memoryLimit.use(e.length),e.split(m(t)));r.length&&""===r[r.length-1];)r.pop();return r},strip:function(e,t){return e=m(e),this.context.memoryLimit.use(e.length),t?(t=te(m(t)),e.replace(new RegExp("^[".concat(t,"]+"),"g"),"").replace(new RegExp("[".concat(t,"]+$"),"g"),"")):e.trim()},strip_newlines:function(e){return e=m(e),this.context.memoryLimit.use(e.length),e.replace(/\r?\n/gm,"")},capitalize:function(e){return e=m(e),this.context.memoryLimit.use(e.length),e.charAt(0).toUpperCase()+e.slice(1).toLowerCase()},replace:function(e,t,r){return e=m(e),this.context.memoryLimit.use(e.length),e.split(m(t)).join(r)},replace_first:function(e,t,r){return e=m(e),this.context.memoryLimit.use(e.length),e.replace(m(t),r)},replace_last:function(e,t,r){var e=m(e),t=(this.context.memoryLimit.use(e.length),m(t)),n=e.lastIndexOf(t);return-1===n?e:(r=m(r),e.substring(0,n)+r+e.substring(n+t.length))},truncate:function(e,t,r){void 0===t&&(t=50),void 0===r&&(r="...");var n=m(e);return this.context.memoryLimit.use(n.length),n.length<=t?e:n.substring(0,t-r.length)+r},truncatewords:function(e,t,r){void 0===t&&(t=15),void 0===r&&(r="...");e=m(e);this.context.memoryLimit.use(e.length);var n=(e=e.split(/\s+/)).slice(0,t=t<=0?1:t).join(" ");return e.length>=t&&(n+=r),n},normalize_whitespace:function(e){return e=m(e),this.context.memoryLimit.use(e.length),e.replace(/\s+/g," ")},number_of_words:function(e,t){var r=m(e);if(this.context.memoryLimit.use(r.length),!(e=r.trim()))return 0;switch(t){case"cjk":return(e.match(On)||[]).length+(e.match(zn)||[]).length;case"auto":return On.test(e)?e.match(On).length+(e.match(zn)||[]).length:e.split(/\s+/).length;default:return e.split(/\s+/).length}},array_to_sentence_string:function(e,t){switch(void 0===t&&(t="and"),this.context.memoryLimit.use(e.length),e.length){case 0:return"";case 1:return e[0];case 2:return"".concat(e[0]," ").concat(t," ").concat(e[1]);default:return"".concat(e.slice(0,-1).join(", "),", ").concat(t," ").concat(e[e.length-1])}}}),En=T(T(T(T(T(T(T({},zr),dn),mn),kn),Tn),gn),Fr),yn=(o(qn,Rn=E),qn.prototype.render=function(t){var r,n;return x(this,function(e){switch(e.label){case 0:return r=t.bottom(),n=this.key,[4,this.value.value(t,this.liquid.options.lenientIf)];case 1:return r[n]=e.sent(),[2]}})},qn);function qn(e,t,r){e=Rn.call(this,e,t,r)||this;return e.key=e.tokenizer.readIdentifier().content,e.tokenizer.assert(e.key,"expected variable name"),e.tokenizer.skipBlank(),e.tokenizer.assert("="===e.tokenizer.peek(),'expected "="'),e.tokenizer.advance(),e.value=new q(e.tokenizer.readFilteredValue(),e.liquid),e}var Nn,Dn=["offset","limit","reversed"],vn=(o(Mn,Nn=E),Mn.prototype.render=function(t,r){var n,i,o,s,a,u,c,l,h,p,f;return x(this,function(e){switch(e.label){case 0:return n=this.liquid.renderer,o=H,[4,S(this.collection,t)];case 1:return(i=o.apply(void 0,[e.sent()])).length?[3,3]:[4,n.renderTemplates(this.elseTemplates,t,r)];case 2:return e.sent(),[2];case 3:return s="continue-"+this.variable+"-"+this.collection.getText(),t.push({continue:t.getRegister(s)}),[4,this.hash.render(t)];case 4:a=e.sent(),t.pop(),u=this.liquid.options.orderedFilterParameters?Object.keys(a).filter(function(e){return Dn.includes(e)}):Dn.filter(function(e){return void 0!==a[e]}),i=u.reduce(function(e,t){var r;return"offset"===t?(r=a.offset,e.slice(r)):"limit"===t?(r=a.limit,e.slice(0,r)):g([],d(e),!1).reverse()},i),t.setRegister(s,(a.offset||0)+i.length),u={forloop:new Ce(i.length,this.collection.getText(),this.variable)},t.push(u),e.label=5;case 5:e.trys.push([5,10,11,12]),c=L(i),l=c.next(),e.label=6;case 6:return l.done?[3,9]:(h=l.value,u[this.variable]=h,t.continueCalled=t.breakCalled=!1,[4,n.renderTemplates(this.templates,t,r)]);case 7:if(e.sent(),t.breakCalled)return[3,9];u.forloop.next(),e.label=8;case 8:return l=c.next(),[3,6];case 9:return[3,12];case 10:return h=e.sent(),p={error:h},[3,12];case 11:try{l&&!l.done&&(f=c.return)&&f.call(c)}finally{if(p)throw p.error}return[7];case 12:return t.pop(),[2]}})},Mn);function Mn(e,t,r,n){var i,o=Nn.call(this,e,t,r)||this,s=o.tokenizer.readIdentifier(),a=o.tokenizer.readIdentifier(),u=o.tokenizer.readValue();if(!s.size()||"in"!==a.content||!u)throw new Error("illegal tag: ".concat(e.getText()));o.variable=s.content,o.collection=u,o.hash=new Ir(o.tokenizer.remaining(),r.options.keyValueSeparator),o.templates=[],o.elseTemplates=[];var c=n.parseStream(t).on("start",function(){return i=o.templates}).on("tag:else",function(e){Ee(e.args),i=o.elseTemplates}).on("tag:endfor",function(e){Ee(e.args),c.stop()}).on("template",function(e){return i.push(e)}).on("end",function(){throw new Error("tag ".concat(e.getText()," not closed"))});return c.start(),o}o(Vn,jn=E),Vn.prototype.render=function(t){var r;return x(this,function(e){switch(e.label){case 0:return[4,this.liquid.renderer.renderTemplates(this.templates,t)];case 1:return r=e.sent(),t.bottom()[this.variable]=r,[2]}})},Vn.prototype.readVariableName=function(){var e=this.tokenizer.readIdentifier().content;if(e)return e;e=this.tokenizer.readQuoted();if(e)return yr(e);throw this.tokenizer.error("invalid capture name")};var jn,wn=Vn;function Vn(e,t,r,n){var i=jn.call(this,e,t,r)||this;for(i.templates=[],i.variable=i.readVariableName();t.length;){var o=t.shift();if(un(o)&&"endcapture"===o.name)return i;i.templates.push(n.parseToken(o,t))}throw new Error("tag ".concat(e.getText()," not closed"))}o(An,Pn=E),An.prototype.render=function(t,r){var n,i,o,s,a,u,c,l,h,p,f,d,g,m;return x(this,function(e){switch(e.label){case 0:return n=this.liquid.renderer,o=v,[4,this.value.value(t,t.opts.lenientIf)];case 1:i=o.apply(void 0,[e.sent()]),s=!1,e.label=2;case 2:e.trys.push([2,14,15,16]),a=L(this.branches),u=a.next(),e.label=3;case 3:if(u.done)return[3,13];c=u.value,e.label=4;case 4:e.trys.push([4,10,11,12]),g=void 0,l=L(c.values),h=l.next(),e.label=5;case 5:return h.done?[3,9]:[4,S(h.value,t,t.opts.lenientIf)];case 6:return(p=e.sent(),O(i,p))?[4,n.renderTemplates(c.templates,t,r)]:[3,8];case 7:return e.sent(),s=!0,[3,9];case 8:return h=l.next(),[3,5];case 9:return[3,12];case 10:return p=e.sent(),g={error:p},[3,12];case 11:try{h&&!h.done&&(m=l.return)&&m.call(l)}finally{if(g)throw g.error}return[7];case 12:return u=a.next(),[3,3];case 13:return[3,16];case 14:return f=e.sent(),f={error:f},[3,16];case 15:try{u&&!u.done&&(d=a.return)&&d.call(a)}finally{if(f)throw f.error}return[7];case 16:return s?[3,18]:[4,n.renderTemplates(this.elseTemplates,t,r)];case 17:e.sent(),e.label=18;case 18:return[2]}})};var Pn,bn=An;function An(e,t,r,n){var i=Pn.call(this,e,t,r)||this,o=(i.branches=[],i.elseTemplates=[],i.value=new q(i.tokenizer.readFilteredValue(),i.liquid),i.elseTemplates=[],[]),s=0,a=n.parseStream(t).on("tag:when",function(e){if(!(0<s)){o=[];for(var t=[];!e.tokenizer.end();)t.push(e.tokenizer.readValueOrThrow()),e.tokenizer.skipBlank(),","===e.tokenizer.peek()?e.tokenizer.readTo(","):e.tokenizer.readTo("or");i.branches.push({values:t,templates:o})}}).on("tag:else",function(){s++,o=i.elseTemplates}).on("tag:endcase",function(){return a.stop()}).on("template",function(e){o===i.elseTemplates&&1!==s||o.push(e)}).on("end",function(){throw new Error("tag ".concat(e.getText()," not closed"))});return a.start(),i}o(In,Cn=E),In.prototype.render=function(){};var Cn,zr=In;function In(e,t,r){for(var n=Cn.call(this,e,t,r)||this;t.length;){var i=t.shift();if(un(i)&&"endcomment"===i.name)return n}throw new Error("tag ".concat(e.getText()," not closed"))}o(Hn,Bn=E),Hn.prototype.render=function(t,r){var n,i,o,s,a,u,c,l,h,p,f,d,g,m,y,v,w,b,k;return x(this,function(e){switch(e.label){case 0:return n=(i=this).liquid,i=i.hash,[4,Wn(this.file,t,n)];case 1:return F(o=e.sent(),function(){return'illegal file path "'.concat(o,'"')}),s=t.spawn(),a=s.bottom(),u=T,c=[a],[4,i.render(t)];case 2:return(u.apply(void 0,c.concat([e.sent()])),this.with)?(f=this.with,p=f.value,f=f.alias,l=a,h=f||o,[4,S(p,t)]):[3,4];case 3:l[h]=e.sent(),e.label=4;case 4:return this.for?(g=this.for,p=g.value,f=g.alias,g=H,[4,S(p,t)]):[3,15];case 5:d=g.apply(void 0,[e.sent()]),a.forloop=new Ce(d.length,p.getText(),f),e.label=6;case 6:e.trys.push([6,12,13,14]),m=L(d),y=m.next(),e.label=7;case 7:return y.done?[3,11]:(v=y.value,a[f]=v,[4,n._parsePartialFile(o,s.sync,this.currentFile)]);case 8:return w=e.sent(),[4,n.renderer.renderTemplates(w,s,r)];case 9:e.sent(),a.forloop.next(),e.label=10;case 10:return y=m.next(),[3,7];case 11:return[3,14];case 12:return v=e.sent(),b={error:v},[3,14];case 13:try{y&&!y.done&&(k=m.return)&&k.call(m)}finally{if(b)throw b.error}return[7];case 14:return[3,18];case 15:return[4,n._parsePartialFile(o,s.sync,this.currentFile)];case 16:return w=e.sent(),[4,n.renderer.renderTemplates(w,s,r)];case 17:e.sent(),e.label=18;case 18:return[2]}})};var Bn,dn=Hn;function Hn(e,t,r,n){var i=Bn.call(this,e,t,r)||this,o=i.tokenizer;for(i.file=Un(o,i.liquid,n),i.currentFile=e.file;!o.end();){o.skipBlank();var s=o.p,a=o.readIdentifier();if(("with"===a.content||"for"===a.content)&&(o.skipBlank(),":"!==o.peek())){var u=o.readValue();if(u){var c=o.p,l=void 0;"as"===o.readIdentifier().content?l=o.readIdentifier():o.p=c,i[a.content]={value:u,alias:l&&l.content},o.skipBlank(),","===o.peek()&&o.advance();continue}}o.p=s;break}return i.hash=new Ir(o.remaining(),r.options.keyValueSeparator),i}function Un(e,t,r){var n;return t.options.dynamicPartials?(n=e.readValue(),e.assert(n,"illegal file path"),"none"===n.getText()?void 0:cn(n)?Kn(r.parse(yr(n))):n):(n=g([],d(e.readFileNameTemplate(t.options)),!1),"none"===(e=Kn(r.parseTokens(n)))?void 0:e)}function Kn(e){return 1===e.length&&sn(e[0].token)?e[0].token.getContent():e}function Wn(t,r,n){return x(this,function(e){switch(e.label){case 0:return"string"==typeof t?[2,t]:Array.isArray(t)?[2,n.renderer.renderTemplates(t,r)]:[4,S(t,r)];case 1:return[2,e.sent()]}})}o($n,Yn=E),$n.prototype.render=function(t,r){var n,i,o,s,a,u,c,l,h,p;return x(this,function(e){switch(e.label){case 0:return n=(o=this).liquid,i=o.hash,o=o.withVar,s=n.renderer,[4,Wn(this.file,t,n)];case 1:return F(a=e.sent(),function(){return'illegal file path "'.concat(a,'"')}),u=t.saveRegister("blocks","blockMode"),t.setRegister("blocks",{}),t.setRegister("blockMode",pn.OUTPUT),[4,i.render(t)];case 2:return(c=e.sent(),o)?(l=c,h=a,[4,S(o,t)]):[3,4];case 3:l[h]=e.sent(),e.label=4;case 4:return[4,n._parsePartialFile(a,t.sync,this.currentFile)];case 5:return p=e.sent(),t.push(t.opts.jekyllInclude?{include:c}:c),[4,s.renderTemplates(p,t,r)];case 6:return e.sent(),t.pop(),t.restoreRegister(u),[2]}})};var Yn,mn=$n;function $n(e,t,r,n){var t=Yn.call(this,e,t,r)||this,i=e.tokenizer,n=(t.file=Un(i,t.liquid,n),t.currentFile=e.file,i.p);return"with"===i.readIdentifier().content&&(i.skipBlank(),":"!==i.peek())?t.withVar=i.readValue():i.p=n,t.hash=new Ir(i.remaining(),r.options.jekyllInclude||r.options.keyValueSeparator),t}o(Zn,Qn=E),Zn.prototype.render=function(e,t){e=e.environments;K(e[this.variable])||(e[this.variable]=0),t.write(m(--e[this.variable]))};var Qn,kn=Zn;function Zn(e,t,r){e=Qn.call(this,e,t,r)||this;return e.variable=e.tokenizer.readIdentifier().content,e}o(Gn,Jn=E),Gn.prototype.render=function(t,e){var r,n,i,o;return x(this,function(e){switch(e.label){case 0:return[4,S(this.group,t)];case 1:return r=e.sent(),r="cycle:".concat(r,":")+this.candidates.join(","),n=t.getRegister("cycle"),void 0===(i=n[r])&&(i=n[r]=0),o=this.candidates[i],i=(i+1)%this.candidates.length,n[r]=i,[4,S(o,t)];case 2:return[2,e.sent()]}})};var Jn,Tn=Gn;function Gn(e,t,r){var n=Jn.call(this,e,t,r)||this,t=(n.candidates=[],n.tokenizer.readValue());for(n.tokenizer.skipBlank(),t&&(":"===n.tokenizer.peek()?(n.group=t,n.tokenizer.advance()):n.candidates.push(t));!n.tokenizer.end();){var i=n.tokenizer.readValue();i&&n.candidates.push(i),n.tokenizer.readTo(",")}return n.tokenizer.assert(n.candidates.length,function(){return'empty candidates: "'.concat(e.getText(),'"')}),n}o(ei,Xn=E),ei.prototype.render=function(t,r){var n,i,o,s,a,u,c;return x(this,function(e){switch(e.label){case 0:n=this.liquid.renderer,e.label=1;case 1:e.trys.push([1,7,8,9]),i=L(this.branches),o=i.next(),e.label=2;case 2:return o.done?[3,6]:(s=o.value,a=s.value,s=s.templates,[4,a.value(t,t.opts.lenientIf)]);case 3:return vr(e.sent(),t)?[4,n.renderTemplates(s,t,r)]:[3,5];case 4:return e.sent(),[2];case 5:return o=i.next(),[3,2];case 6:return[3,9];case 7:return a=e.sent(),u={error:a},[3,9];case 8:try{o&&!o.done&&(c=i.return)&&c.call(i)}finally{if(u)throw u.error}return[7];case 9:return[4,n.renderTemplates(this.elseTemplates||[],t,r)];case 10:return e.sent(),[2]}})};var Xn,gn=ei;function ei(e,t,r,n){var i=Xn.call(this,e,t,r)||this,o=(i.branches=[],[]);return n.parseStream(t).on("start",function(){return i.branches.push({value:new q(e.args,i.liquid),templates:o=[]})}).on("tag:elsif",function(e){F(!i.elseTemplates,"unexpected elsif after else"),i.branches.push({value:new q(e.args,i.liquid),templates:o=[]})}).on("tag:else",function(e){Ee(e.args),F(!i.elseTemplates,"duplicated else"),o=i.elseTemplates=[]}).on("tag:endif",function(e){Ee(e.args),this.stop()}).on("template",function(e){return o.push(e)}).on("end",function(){throw new Error("tag ".concat(e.getText()," not closed"))}).start(),i}o(ni,ti=E),ni.prototype.render=function(e,t){var e=e.environments,r=(K(e[this.variable])||(e[this.variable]=0),e[this.variable]);e[this.variable]++,t.write(m(r))};var ti,ri=ni;function ni(e,t,r){e=ti.call(this,e,t,r)||this;return e.variable=e.tokenizer.readIdentifier().content,e}o(si,ii=E),si.prototype.render=function(t,r){var n,i,o,s,a,u,c,l,h;return x(this,function(e){switch(e.label){case 0:return(n=(c=this).liquid,i=c.args,c=c.file,o=n.renderer,void 0!==c)?[3,2]:(t.setRegister("blockMode",pn.OUTPUT),[4,o.renderTemplates(this.templates,t,r)]);case 1:return e.sent(),[2];case 2:return[4,Wn(this.file,t,n)];case 3:return F(s=e.sent(),function(){return'illegal file path "'.concat(s,'"')}),[4,n._parseLayoutFile(s,t.sync,this.currentFile)];case 4:return a=e.sent(),t.setRegister("blockMode",pn.STORE),[4,o.renderTemplates(this.templates,t)];case 5:return u=e.sent(),void 0===(c=t.getRegister("blocks"))[""]&&(c[""]=function(e,t){return t.write(u)}),t.setRegister("blockMode",pn.OUTPUT),h=(l=t).push,[4,i.render(t)];case 6:return h.apply(l,[e.sent()]),[4,o.renderTemplates(a,t,r)];case 7:return e.sent(),t.pop(),[2]}})};var ii,oi=si;function si(e,t,r,n){var i=ii.call(this,e,t,r)||this;return i.file=Un(i.tokenizer,i.liquid,n),i.currentFile=e.file,i.args=new Ir(i.tokenizer.remaining(),r.options.keyValueSeparator),i.templates=n.parseTokens(t),i}o(ci,ai=E),ci.prototype.render=function(t,r){var n;return x(this,function(e){switch(e.label){case 0:return(n=this.getBlockRender(t),t.getRegister("blockMode")!==pn.STORE)?[3,1]:(t.getRegister("blocks")[this.block]=n,[3,3]);case 1:return[4,n(new Be,r)];case 2:e.sent(),e.label=3;case 3:return[2]}})},ci.prototype.getBlockRender=function(n){function r(t,r){return x(this,function(e){switch(e.label){case 0:return n.push({block:t}),[4,i.renderer.renderTemplates(o,n,r)];case 1:return e.sent(),n.pop(),[2]}})}var i=this.liquid,o=this.templates,s=n.getRegister("blocks")[this.block];return s?function(e,t){return s(new Be(function(){return r(e,t)}),t)}:r};var ai,ui=ci;function ci(e,t,r,n){var i=ai.call(this,e,t,r)||this,r=(i.templates=[],/\w+/.exec(e.args));for(i.block=r?r[0]:"";t.length;){var o=t.shift();if(un(o)&&"endblock"===o.name)return i;o=n.parseToken(o,t);i.templates.push(o)}throw new Error("tag ".concat(e.getText()," not closed"))}o(pi,li=E),pi.prototype.render=function(){return this.tokens.map(function(e){return e.getText()}).join("")};var li,hi=pi;function pi(e,t,r){var n=li.call(this,e,t,r)||this;for(n.tokens=[];t.length;){var i=t.shift();if(un(i)&&"endraw"===i.name)return n;n.tokens.push(i)}throw new Error("tag ".concat(e.getText()," not closed"))}o(gi,fi=Ce),gi.prototype.row=function(){return Math.floor(this.i/this.cols)+1},gi.prototype.col0=function(){return this.i%this.cols},gi.prototype.col=function(){return this.col0()+1},gi.prototype.col_first=function(){return 0===this.col0()},gi.prototype.col_last=function(){return this.col()===this.cols};var fi,di=gi;function gi(e,t,r,n){r=fi.call(this,e,r,n)||this;return r.length=e,r.cols=t,r}o(vi,mi=E),vi.prototype.render=function(t,r){var n,i,o,s,a,u;return x(this,function(e){switch(e.label){case 0:return i=H,[4,S(this.collection,t)];case 1:return n=i.apply(void 0,[e.sent()]),[4,this.args.render(t)];case 2:s=e.sent(),a=s.offset||0,o=void 0===s.limit?n.length:s.limit,n=n.slice(a,a+o),a=s.cols||n.length,o=this.liquid.renderer,s=new di(n.length,a,this.collection.getText(),this.variable),a={tablerowloop:s},t.push(a),u=0,e.label=3;case 3:return u<n.length?(a[this.variable]=n[u],0===s.col0()&&(1!==s.row()&&r.write("</tr>"),r.write('<tr class="row'.concat(s.row(),'">'))),r.write('<td class="col'.concat(s.col(),'">')),[4,o.renderTemplates(this.templates,t,r)]):[3,6];case 4:e.sent(),r.write("</td>"),e.label=5;case 5:return u++,s.next(),[3,3];case 6:return n.length&&r.write("</tr>"),t.pop(),[2]}})};var mi,yi=vi;function vi(e,t,r,n){var i,o=mi.call(this,e,t,r)||this,s=o.tokenizer.readIdentifier(),a=(o.tokenizer.skipBlank(),o.tokenizer.readIdentifier()),u=o.tokenizer.readValue();if("in"!==a.content||!u)throw new Error("illegal tag: ".concat(e.getText()));o.variable=s.content,o.collection=u,o.args=new Ir(o.tokenizer.remaining(),r.options.keyValueSeparator),o.templates=[];var c=n.parseStream(t).on("start",function(){return i=o.templates}).on("tag:endtablerow",function(){return c.stop()}).on("template",function(e){return i.push(e)}).on("end",function(){throw new Error("tag ".concat(e.getText()," not closed"))});return c.start(),o}o(ki,wi=E),ki.prototype.render=function(t,r){var n,i,o,s,a,u,c,l;return x(this,function(e){switch(e.label){case 0:n=this.liquid.renderer,e.label=1;case 1:e.trys.push([1,7,8,9]),i=L(this.branches),o=i.next(),e.label=2;case 2:return o.done?[3,6]:(a=o.value,u=a.value,s=a.test,a=a.templates,[4,u.value(t,t.opts.lenientIf)]);case 3:return(u=e.sent(),s(u,t))?[4,n.renderTemplates(a,t,r)]:[3,5];case 4:return e.sent(),[2];case 5:return o=i.next(),[3,2];case 6:return[3,9];case 7:return c=e.sent(),c={error:c},[3,9];case 8:try{o&&!o.done&&(l=i.return)&&l.call(i)}finally{if(c)throw c.error}return[7];case 9:return[4,n.renderTemplates(this.elseTemplates,t,r)];case 10:return e.sent(),[2]}})};var wi,bi=ki;function ki(e,t,r,n){var i=wi.call(this,e,t,r)||this,o=(i.branches=[],i.elseTemplates=[],[]),s=0;return n.parseStream(t).on("start",function(){return i.branches.push({value:new q(e.args,i.liquid),test:wr,templates:o=[]})}).on("tag:elsif",function(e){0<s?o=[]:i.branches.push({value:new q(e.args,i.liquid),test:vr,templates:o=[]})}).on("tag:else",function(){s++,o=i.elseTemplates}).on("tag:endunless",function(){this.stop()}).on("template",function(e){o===i.elseTemplates&&1!==s||o.push(e)}).on("end",function(){throw new Error("tag ".concat(e.getText()," not closed"))}).start(),i}o(Li,Ti=E),Li.prototype.render=function(e,t){e.breakCalled=!0};var Ti,xi=Li;function Li(){return null!==Ti&&Ti.apply(this,arguments)||this}o(Si,Fi=E),Si.prototype.render=function(e,t){e.continueCalled=!0};var Fi,_i=Si;function Si(){return null!==Fi&&Fi.apply(this,arguments)||this}o(Ri,Oi=E),Ri.prototype.render=function(t,r){var n;return x(this,function(e){switch(e.label){case 0:return this.value?[4,this.value.value(t,!1)]:[2];case 1:return n=e.sent(),r.write(n),[2]}})};var Oi,zi=Ri;function Ri(e,t,r){e=Oi.call(this,e,t,r)||this;return e.tokenizer.skipBlank(),e.tokenizer.end()||(e.value=new q(e.tokenizer.readFilteredValue(),e.liquid)),e}o(Ni,Ei=E),Ni.prototype.render=function(t,r){return x(this,function(e){switch(e.label){case 0:return[4,this.liquid.renderer.renderTemplates(this.templates,t,r)];case 1:return e.sent(),[2]}})};var Ei,qi=Ni;function Ni(e,t,r,n){e=Ei.call(this,e,t,r)||this,t=e.tokenizer.readLiquidTagTokens(e.liquid.options);return e.templates=n.parseTokens(t),e}o(ji,Di=E),ji.prototype.render=function(){};var Di,Mi=ji;function ji(e,t,r){t=Di.call(this,e,t,r)||this;if(-1!==e.args.search(/\n\s*[^#\s]/g))throw new Error("every line of an inline comment must start with a '#' character");return t}var Vi={assign:yn,for:vn,capture:wn,case:bn,comment:zr,include:mn,render:dn,decrement:kn,increment:ri,cycle:Tn,if:gn,layout:oi,block:ui,raw:hi,tablerow:yi,unless:bi,break:xi,continue:_i,echo:zi,liquid:qi,"#":Mi},Pi=(M.prototype.parse=function(e,t){return new tn(this).parse(e,t)},M.prototype._render=function(e,t,r){t=t instanceof fn?t:new fn(t,this.options,r);return this.renderer.renderTemplates(e,t)},M.prototype.render=function(t,r,n){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,b(this._render(t,r,T(T({},n),{sync:!1})))]})})},M.prototype.renderSync=function(e,t,r){return k(this._render(e,t,T(T({},r),{sync:!0})))},M.prototype.renderToNodeStream=function(e,t,r){t=new fn(t,this.options,r=void 0===r?{}:r);return this.renderer.renderTemplatesToNodeStream(e,t)},M.prototype._parseAndRender=function(e,t,r){e=this.parse(e);return this._render(e,t,r)},M.prototype.parseAndRender=function(t,r,n){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,b(this._parseAndRender(t,r,T(T({},n),{sync:!1})))]})})},M.prototype.parseAndRenderSync=function(e,t,r){return k(this._parseAndRender(e,t,T(T({},r),{sync:!0})))},M.prototype._parsePartialFile=function(e,t,r){return new tn(this).parseFile(e,t,Zr.Partials,r)},M.prototype._parseLayoutFile=function(e,t,r){return new tn(this).parseFile(e,t,Zr.Layouts,r)},M.prototype._parseFile=function(e,t,r,n){return new tn(this).parseFile(e,t,r,n)},M.prototype.parseFile=function(t,r){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,b(new tn(this).parseFile(t,!1,r))]})})},M.prototype.parseFileSync=function(e,t){return k(new tn(this).parseFile(e,!0,t))},M.prototype._renderFile=function(t,r,n){var i;return x(this,function(e){switch(e.label){case 0:return[4,this._parseFile(t,n.sync,n.lookupType)];case 1:return i=e.sent(),[4,this._render(i,r,n)];case 2:return[2,e.sent()]}})},M.prototype.renderFile=function(t,r,n){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,b(this._renderFile(t,r,T(T({},n),{sync:!1})))]})})},M.prototype.renderFileSync=function(e,t,r){return k(this._renderFile(e,t,T(T({},r),{sync:!0})))},M.prototype.renderFileToNodeStream=function(r,n,i){return a(this,void 0,void 0,function(){var t;return x(this,function(e){switch(e.label){case 0:return[4,this.parseFile(r)];case 1:return t=e.sent(),[2,this.renderToNodeStream(t,n,i)]}})})},M.prototype._evalValue=function(e,t){e=new q(e,this),t=t instanceof fn?t:new fn(t,this.options);return e.value(t)},M.prototype.evalValue=function(t,r){return a(this,void 0,void 0,function(){return x(this,function(e){return[2,b(this._evalValue(t,r))]})})},M.prototype.evalValueSync=function(e,t){return k(this._evalValue(e,t))},M.prototype.registerFilter=function(e,t){this.filters[e]=t},M.prototype.registerTag=function(e,t){function r(e,t,r){r=n.call(this,e,t,r)||this;return c(i.parse)&&i.parse.call(r,e,t),r}var i,n;this.tags[e]=c(t)?t:(i=t,o(r,n=E),r.prototype.render=function(t,r){var n;return x(this,function(e){switch(e.label){case 0:return[4,new Ir(this.token.args,t.opts.keyValueSeparator).render(t)];case 1:return n=e.sent(),[4,i.render.call(this,t,r,n)];case 2:return[2,e.sent()]}})},r)},M.prototype.plugin=function(e){return e.call(this,M)},M.prototype.express=function(){var o=this,s=!0;return function(e,t,r){var n,i;s&&(s=!1,i=Dr(this.root),(n=o.options.root).unshift.apply(n,g([],d(i),!1)),(n=o.options.layouts).unshift.apply(n,g([],d(i),!1)),(n=o.options.partials).unshift.apply(n,g([],d(i),!1))),o.renderFile(e,t).then(function(e){return r(null,e)},r)}},M);function M(e){void 0===e&&(e={});var r=this;this.renderer=new fr,this.filters={},this.tags={},this.options=Nr(e),this.parser=new tn(this),Y(Vi,function(e,t){return r.registerTag(t,e)}),Y(En,function(e,t){return r.registerFilter(t,e)})}l.AssertionError=Fe,l.AssignTag=yn,l.BlockTag=ui,l.BreakTag=xi,l.CaptureTag=wn,l.CaseTag=bn,l.CommentTag=zr,l.Context=fn,l.ContinueTag=_i,l.CycleTag=Tn,l.DecrementTag=kn,l.Drop=s,l.EchoTag=zi,l.Expression=gr,l.Filter=Hr,l.ForTag=vn,l.Hash=Ir,l.IfTag=gn,l.IncludeTag=mn,l.IncrementTag=ri,l.InlineCommentTag=Mi,l.LayoutTag=oi,l.Liquid=Pi,l.LiquidError=ie,l.LiquidTag=qi,l.Output=Yr,l.ParseError=le,l.ParseStream=jr,l.RawTag=hi,l.RenderError=fe,l.RenderTag=dn,l.TablerowTag=yi,l.Tag=E,l.TagToken=ft,l.Token=e,l.TokenizationError=ae,l.Tokenizer=z,l.TypeGuards=r,l.UndefinedVariableError=we,l.UnlessTag=bi,l.Value=q,l.assert=F,l.createTrie=Ke,l.defaultOperators=Ve,l.defaultOptions=qr,l.evalQuotedToken=yr,l.evalToken=S,l.filters=En,l.isFalsy=wr,l.isTruthy=vr,l.tags=Vi,l.toPromise=b,l.toValue=v,l.toValueSync=k,l.version="10.19.1",Object.defineProperty(l,"__esModule",{value:!0})});
//# sourceMappingURL=liquid.browser.min.js.map