Socket
Socket
Sign inDemoInstall

liquidjs

Package Overview
Dependencies
Maintainers
1
Versions
206
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

liquidjs - npm Package Compare versions

Comparing version 7.3.1 to 7.4.0

dist/util/deprecate.d.ts

12

CHANGELOG.md

@@ -0,1 +1,13 @@

# [7.4.0](https://github.com/harttle/liquidjs/compare/v7.3.1...v7.4.0) (2019-02-28)
### Bug Fixes
* math filters now return number, resolves [#110](https://github.com/harttle/liquidjs/issues/110) ([b4acdb4](https://github.com/harttle/liquidjs/commit/b4acdb4))
### Features
* exported Drop interface for [#107](https://github.com/harttle/liquidjs/issues/107) ([7bee9fc](https://github.com/harttle/liquidjs/commit/7bee9fc)), closes [#109](https://github.com/harttle/liquidjs/issues/109)
## [7.3.1](https://github.com/harttle/liquidjs/compare/v7.3.0...v7.3.1) (2019-02-25)

@@ -2,0 +14,0 @@

6

dist/builtin/filters/index.d.ts

@@ -22,6 +22,6 @@ declare const _default: {

'floor': (v: number) => number;
'minus': (l: number, r: number) => string;
'modulo': (l: number, r: number) => string;
'minus': (v: number, arg: number) => number;
'modulo': (v: number, arg: number) => number;
'round': (v: number, arg?: number) => number;
'plus': (l: number, r: number) => string;
'plus': (v: number, arg: number) => number;
'times': (v: number, arg: number) => number;

@@ -28,0 +28,0 @@ 'escape': (str: string) => string;

@@ -6,8 +6,8 @@ declare const _default: {

'floor': (v: number) => number;
'minus': (l: number, r: number) => string;
'modulo': (l: number, r: number) => string;
'minus': (v: number, arg: number) => number;
'modulo': (v: number, arg: number) => number;
'round': (v: number, arg?: number) => number;
'plus': (l: number, r: number) => string;
'plus': (v: number, arg: number) => number;
'times': (v: number, arg: number) => number;
};
export default _default;
export declare abstract class Drop {
valueOf(): any;
liquidMethodMissing(key: string): string | undefined;
}
import { Drop } from './drop';
import { IComparable } from './icomparable';
import { IDrop } from '../drop/idrop';
export declare class EmptyDrop extends Drop implements IDrop, IComparable {
export declare class EmptyDrop extends Drop implements IComparable {
equals(value: any): boolean;

@@ -10,3 +9,3 @@ gt(): boolean;

leq(): boolean;
value(): string;
valueOf(): string;
}
import { Drop } from './drop';
import { IComparable } from './icomparable';
import { IDrop } from '../drop/idrop';
export declare class NullDrop extends Drop implements IDrop, IComparable {
export declare class NullDrop extends Drop implements IComparable {
equals(value: any): boolean;

@@ -10,3 +9,3 @@ gt(): boolean;

leq(): boolean;
value(): null;
valueOf(): null;
}

@@ -10,21 +10,21 @@ export interface LiquidOptions {

dynamicPartials?: boolean;
/** `strict_filters` is used to enable strict filter existence. If set to `false`, undefined filters will be rendered as empty string. Otherwise, undefined filters will cause an exception. Defaults to `false`. */
strict_filters?: boolean;
/** `strict_variables` is used to enable strict variable derivation. If set to `false`, undefined variables will be rendered as empty string. Otherwise, undefined variables will cause an exception. Defaults to `false`. */
strict_variables?: boolean;
/** `trim_tag_right` is used to strip blank characters (including ` `, `\t`, and `\r`) from the right of tags (`{% %}`) until `\n` (inclusive). Defaults to `false`. */
trim_tag_right?: boolean;
/** `trim_tag_left` is similar to `trim_tag_right`, whereas the `\n` is exclusive. Defaults to `false`. See Whitespace Control for details. */
trim_tag_left?: boolean;
/** ``trim_output_right` is used to strip blank characters (including ` `, `\t`, and `\r`) from the right of values (`{{ }}`) until `\n` (inclusive). Defaults to `false`. */
trim_output_right?: boolean;
/** `trim_output_left` is similar to `trim_output_right`, whereas the `\n` is exclusive. Defaults to `false`. See Whitespace Control for details. */
trim_output_left?: boolean;
/** `tag_delimiter_left` and `tag_delimiter_right` are used to override the delimiter for liquid tags **/
tag_delimiter_left?: string;
tag_delimiter_right?: string;
/** `output_delimiter_left` and `output_delimiter_right` are used to override the delimiter for liquid outputs **/
output_delimiter_left?: string;
output_delimiter_right?: string;
/** `greedy` is used to specify whether `trim_left`/`trim_right` is greedy. When set to `true`, all consecutive blank characters including `\n` will be trimed regardless of line breaks. Defaults to `true`. */
/** `strictFilters` is used to enable strict filter existence. If set to `false`, undefined filters will be rendered as empty string. Otherwise, undefined filters will cause an exception. Defaults to `false`. */
strictFilters?: boolean;
/** `strictVariables` is used to enable strict variable derivation. If set to `false`, undefined variables will be rendered as empty string. Otherwise, undefined variables will cause an exception. Defaults to `false`. */
strictVariables?: boolean;
/** `trimTagRight` is used to strip blank characters (including ` `, `\t`, and `\r`) from the right of tags (`{% %}`) until `\n` (inclusive). Defaults to `false`. */
trimTagRight?: boolean;
/** `trimTagLeft` is similar to `trimTagRight`, whereas the `\n` is exclusive. Defaults to `false`. See Whitespace Control for details. */
trimTagLeft?: boolean;
/** ``trimOutputRight` is used to strip blank characters (including ` `, `\t`, and `\r`) from the right of values (`{{ }}`) until `\n` (inclusive). Defaults to `false`. */
trimOutputRight?: boolean;
/** `trimOutputLeft` is similar to `trimOutputRight`, whereas the `\n` is exclusive. Defaults to `false`. See Whitespace Control for details. */
trimOutputLeft?: boolean;
/** `tagDelimiterLeft` and `tagDelimiterRight` are used to override the delimiter for liquid tags **/
tagDelimiterLeft?: string;
tagDelimiterRight?: string;
/** `outputDelimiterLeft` and `outputDelimiterRight` are used to override the delimiter for liquid outputs **/
outputDelimiterLeft?: string;
outputDelimiterRight?: string;
/** `greedy` is used to specify whether `trim*Left`/`trim*Right` is greedy. When set to `true`, all consecutive blank characters including `\n` will be trimed regardless of line breaks. Defaults to `true`. */
greedy?: boolean;

@@ -40,12 +40,12 @@ }

dynamicPartials: boolean;
strict_filters: boolean;
strict_variables: boolean;
trim_tag_right: boolean;
trim_tag_left: boolean;
trim_output_right: boolean;
trim_output_left: boolean;
tag_delimiter_left: string;
tag_delimiter_right: string;
output_delimiter_left: string;
output_delimiter_right: string;
strictFilters: boolean;
strictVariables: boolean;
trimTagRight: boolean;
trimTagLeft: boolean;
trimOutputRight: boolean;
trimOutputLeft: boolean;
tagDelimiterLeft: string;
tagDelimiterRight: string;
outputDelimiterLeft: string;
outputDelimiterRight: string;
greedy: boolean;

@@ -52,0 +52,0 @@ }

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Liquid=e()}(this,function(){"use strict";var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var v=function(){return(v=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function h(o,u,s,a){return new(s||(s=Promise))(function(t,e){function n(t){try{i(a.next(t))}catch(t){e(t)}}function r(t){try{i(a.throw(t))}catch(t){e(t)}}function i(e){e.done?t(e.value):new s(function(t){t(e.value)}).then(n,r)}i((a=a.apply(o,u||[])).next())})}function d(n,r){var i,o,u,t,s={label:0,sent:function(){if(1&u[0])throw u[1];return u[1]},trys:[],ops:[]};return t={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(i)throw new TypeError("Generator is already executing.");for(;s;)try{if(i=1,o&&(u=2&e[0]?o.return:e[0]?o.throw||((u=o.return)&&u.call(o),0):o.next)&&!(u=u.call(o,e[1])).done)return u;switch(o=0,u&&(e=[2&e[0],u.value]),e[0]){case 0:case 1:u=e;break;case 4:return s.label++,{value:e[1],done:!1};case 5:s.label++,o=e[1],e=[0];continue;case 7:e=s.ops.pop(),s.trys.pop();continue;default:if(!(u=0<(u=s.trys).length&&u[u.length-1])&&(6===e[0]||2===e[0])){s=0;continue}if(3===e[0]&&(!u||e[1]>u[0]&&e[1]<u[3])){s.label=e[1];break}if(6===e[0]&&s.label<u[1]){s.label=u[1],u=e;break}if(u&&s.label<u[2]){s.label=u[2],s.ops.push(e);break}u[2]&&s.ops.pop(),s.trys.pop();continue}e=r.call(n,s)}catch(t){e=[6,t],o=0}finally{i=u=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}var o=Object.prototype.toString,u=Array.prototype.toString;function l(t){return"[object String]"===o.call(t)}function s(t){return"function"==typeof t}function a(t){return c(t)?"":s(t.to_liquid)?a(t.to_liquid()):s(t.toLiquid)?a(t.toLiquid()):s(t.to_s)?t.to_s():-1<[o,u].indexOf(t.toString)?(e=t,n=[],JSON.stringify(e,function(t,e){if(m(e)){if(-1!==n.indexOf(e))return;n.push(e)}return e})):s(t.toString)?t.toString():o.call(t);var e,n}function c(t){return null==t}function f(t){return"[object Array]"===o.call(t)}function p(t,e){for(var n in t=t||{})if(t.hasOwnProperty(n)&&!1===e(t[n],n,t))break;return t}function g(t){return t[t.length-1]}function m(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function y(t,e,n){void 0===e&&(e=t,t=0),n=n||1;for(var r=[],i=t;i<e;i+=n)r.push(i);return r}function w(t,e,n){void 0===n&&(n=" ");for(var r=e-(t=String(t)).length;0<r--;)t=n+t;return t}var t=function(r){function t(t,e){var n=r.call(this,t.message)||this;return n.originalError=t,n.token=e,n}return i(t,r),t.prototype.update=function(){var i,o,t,u,e=this.originalError,n=(i=this.token,o=i.input.split("\n"),t=Math.max(i.line-2,1),u=Math.min(i.line+3,o.length),y(t,u+1).map(function(t){var e=t===i.line?">> ":" ",n=w(String(t),String(u).length),r=o[t-1];return""+e+n+"| "+r}).join("\n"));this.message=function(t,e){e.file&&(t+=", file:"+e.file);return t+=", line:"+e.line+", col:"+e.col}(e.message,this.token),this.stack=this.message+"\n"+n+"\n"+this.stack+"\nFrom "+e.stack},t}(Error),b=function(r){function t(t,e){var n=r.call(this,new Error(t),e)||this;return n.name="TokenizationError",r.prototype.update.call(n),n}return i(t,r),t}(t),n=function(r){function t(t,e){var n=r.call(this,t,e)||this;return n.name="ParseError",n.message=t.message,r.prototype.update.call(n),n}return i(t,r),t}(t),T=function(r){function t(t,e){var n=r.call(this,t,e.token)||this;return n.name="RenderError",n.message=t.message,r.prototype.update.call(n),n}return i(t,r),t}(t),e=function(n){function t(t){var e=n.call(this,t)||this;return e.resolvedHTML="",e.name="RenderBreakError",e.message=t+"",e}return i(t,n),t}(Error),E=function(n){function t(t){var e=n.call(this,t)||this;return e.name="AssertionError",e.message=t+"",e}return i(t,n),t}(Error);function x(t,e){if(!t)throw new E(e=e||"expect "+t+" to be true")}var k,_,q={root:["."],cache:!1,extname:"",dynamicPartials:!0,trim_tag_right:!1,trim_tag_left:!1,trim_output_right:!1,trim_output_left:!1,greedy:!0,tag_delimiter_left:"{%",tag_delimiter_right:"%}",output_delimiter_left:"{{",output_delimiter_right:"}}",strict_filters:!1,strict_variables:!1};function S(t){var e;return(t=t||{}).hasOwnProperty("root")&&(t.root=f(e=t.root)?e:l(e)?[e]:[]),t}function R(t){return v({},q,t)}(_=k||(k={}))[_.OUTPUT=0]="OUTPUT",_[_.STORE=1]="STORE";var M=k,O=function(){function t(t,e){void 0===t&&(t={}),this.blocks={},this.groups={},this.blockMode=M.OUTPUT,this.opts=R(e),this.contexts=[t||{}]}return t.prototype.getAll=function(){return this.contexts.reduce(function(t,e){return v(t,e)},{})},t.prototype.get=function(t){var n=this,e=this.propertyAccessSeq(t),r=this.findContextFor(e[0])||g(this.contexts);return e.reduce(function(t,e){return n.readProperty(t,e)},r)},t.prototype.set=function(t,n){var r=this.propertyAccessSeq(t),i=this.findContextFor(r[0])||g(this.contexts);r.some(function(t,e){return!m(i)||(e===r.length-1?(i[t]=n,!0):(void 0===i[t]&&(i[t]={}),i=i[t],!1))})},t.prototype.unshift=function(t){return this.contexts.unshift(t)},t.prototype.push=function(t){return this.contexts.push(t)},t.prototype.pop=function(e){if(!arguments.length)return this.contexts.pop();var t=this.contexts.findIndex(function(t){return t===e});if(-1===t)throw new TypeError("scope not found, cannot pop");return this.contexts.splice(t,1)[0]},t.prototype.findContextFor=function(t,e){void 0===e&&(e=function(){return!0});for(var n=this.contexts.length-1;0<=n;n--){var r=this.contexts[n];if(e(r)&&t in r)return r}return null},t.prototype.readProperty=function(t,e){var n,r;if(c(t)?n=t:(t=function(t){if(s(t.to_liquid))return t.to_liquid();if(s(t.toLiquid))return t.toLiquid();return t}(t),n="size"===e?c((r=t).size)&&(f(r)||l(r))?r.length:r.size:t[e],s(t.liquid_method_missing)&&(n=t.liquid_method_missing(e))),c(n)&&this.opts.strict_variables)throw new TypeError("undefined variable: "+e);return n},t.prototype.propertyAccessSeq=function(t){t=String(t);for(var e,n=[],r="",i=0;i<t.length;)switch(t[i]){case"[":u();var o=t[i+1];i=/['"]/.test(o)?(x(-1!==(e=t.indexOf(o,i+2)),"unbalanced "+o+": "+t),r=t.slice(i+2,e),u(),e+2):(x(-1!==(e=L(t,i+1)),"unbalanced []: "+t),r=t.slice(i+1,e),/^[+-]?\d+$/.test(r)||(r=String(this.get(r))),u(),e+1);break;case".":u(),i++;break;default:r+=t[i],i++}if(u(),!n.length)throw new TypeError('invalid path:"'+t+'"');return n;function u(){r.length&&n.push(r),r=""}},t}();function L(t,e){for(var n=1,r=e;r<t.length;r++)if("["===t[r]&&n++,"]"===t[r]&&0===--n)return r;return-1}var A=function(){},F=function(){},I=function(){},N=function(){},P=Object.freeze({AssignScope:F,CaptureScope:A,IncrementScope:I,DecrementScope:N,ParseError:n,TokenizationError:b,RenderBreakError:e,AssertionError:E});var U={readFile:function(r){return h(this,void 0,void 0,function(){return d(this,function(t){return[2,new Promise(function(t,e){var n=new XMLHttpRequest;n.onload=function(){200<=n.status&&n.status<300?t(n.responseText):e(new Error(n.statusText))},n.onerror=function(){e(new Error("An error occurred whilst receiving the response."))},n.open("GET",r),n.send()})]})})},resolve:function(t,e,i){return t.length&&"/"!==g(t)&&(t+="/"),function(t,e){var n=document.createElement("base");n.href=t;var r=document.getElementsByTagName("head")[0];r.insertBefore(n,r.firstChild);var i=document.createElement("a");i.href=e;var o=i.href;return r.removeChild(n),o}(t,e).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/,function(t,e,n){var r=n.split("/").pop();return/\.\w+$/.test(r)?t:e+n+i})},exists:function(){return h(this,void 0,void 0,function(){return d(this,function(t){return[2,!0]})})}};var j,D,H=function(t,e,n,r,i){this.type="notset",this.col=r,this.line=n,this.raw=t,this.value=t,this.input=e,this.file=i},z=function(u){function t(t,e,n,r,i){var o=u.call(this,t,e,n,r,i)||this;return o.type="html",o.value=t,o}return i(t,u),t}(H),C=function(s){function t(t,e,n,r,i,o){var u=s.call(this,t,n,r,i,o)||this;return u.trimLeft="-"===e[0],u.trimRight="-"===g(e),u.value=e.slice(u.trimLeft?1:0,u.trimRight?-1:e.length).trim(),u}return i(t,s),t}(H),Y=new RegExp(/'[^']*'/.source+"|"+/"[^"]*"/.source),$=new RegExp("(?:"+Y.source+"|[^'\"])*"),G=/[+-]?(?:\d+\.?\d*|\.?\d+)/,B=/[\w-]+[?]?/,V=new RegExp("\\[(?:"+Y.source+"|[\\w-\\.]+)\\]"),W=new RegExp("(?:"+Y.source+"|"+/true|false/.source+"|"+G.source+")"),J=new RegExp(B.source+"(?:\\."+B.source+"|"+V.source+")*"),X=new RegExp("(?:"+J.source+"|"+G.source+")"),K=new RegExp("\\("+X.source+"\\.\\."+X.source+"\\)"),Q=new RegExp("\\(("+X.source+")\\.\\.("+X.source+")\\)"),Z=new RegExp("(?:"+J.source+"|"+W.source+"|"+K.source+")"),tt=new RegExp("(?:"+B.source+")\\s*:\\s*(?:"+Z.source+")"),et=new RegExp("("+B.source+")\\s*:\\s*("+Z.source+")","g"),nt=new RegExp("^\\s*("+B.source+")\\s*([\\s\\S]*?)\\s*$"),rt=new RegExp("^"+Y.source+"$"),it=new RegExp("^"+Q.source+"$"),ot=[/\s+or\s+/,/\s+and\s+/,/==|!=|<=|>=|<|>|\s+contains\s+/],ut=function(a){function t(t,e,n,r,i,o){var u=a.call(this,t,e,n,r,i,o)||this;u.type="tag";var s=u.value.match(nt);if(!s)throw new b("illegal tag syntax",u);return u.name=s[1],u.args=s[2],u}return i(t,a),t}(C),st=function(s){function t(t,e,n,r,i,o){var u=s.call(this,t,e,n,r,i,o)||this;return u.type="output",u}return i(t,s),t}(C);(D=j||(j={}))[D.HTML=0]="HTML",D[D.OUTPUT=1]="OUTPUT",D[D.TAG=2]="TAG";var at=function(){function t(t){this.options=R(t)}return t.prototype.tokenize=function(t,e){for(var n=[],r=this.options.tag_delimiter_left,i=this.options.tag_delimiter_right,o=this.options.output_delimiter_left,u=this.options.output_delimiter_right,s=0,a=1,c=j.HTML,l="",f=0,p=1,h=1;s<t.length;){if("\n"===t[s]&&(a++,f=s+1),c===j.HTML){if(t.substr(s,o.length)===o){l&&n.push(new z(l,t,p,h,e)),p=a,h=s-f+1,s+=(l=o).length,c=j.OUTPUT;continue}if(t.substr(s,r.length)===r){l&&n.push(new z(l,t,p,h,e)),p=a,h=s-f+1,s+=(l=r).length,c=j.TAG;continue}}else{if(c===j.OUTPUT&&t.substr(s,u.length)===u){l+=u,n.push(new st(l,l.slice(o.length,-u.length),t,p,h,e)),l="",p=a,h=(s+=u.length)-f+1,c=j.HTML;continue}if(t.substr(s,i.length)===i){l+=i,n.push(new ut(l,l.slice(r.length,-i.length),t,p,h,e)),l="",p=a,h=(s+=i.length)-f+1,c=j.HTML;continue}}l+=t[s++]}if(c===j.HTML)return l&&n.push(new z(l,t,p,h,e)),function(u,s){s=v({greedy:!0},s);var a=!1;u.forEach(function(t,e){var n,r,i,o;i=t,o=s,!a&&("tag"===i.type?i.trimLeft||o.trim_tag_left:"output"===i.type?i.trimLeft||o.trim_output_left:void 0)&&function(t,e){if(t&&"html"===t.type){var n=e?/\s+$/g:/[\t\r ]*$/g;t.value=t.value.replace(n,"")}}(u[e-1],s.greedy),"tag"===t.type&&"raw"===t.name&&(a=!0),"tag"===t.type&&"endraw"===t.name&&(a=!1),n=t,r=s,!a&&("tag"===n.type?n.trimRight||r.trim_tag_right:"output"===n.type?n.trimRight||r.trim_output_right:void 0)&&function(t,e){if(t&&"html"===t.type){var n=e?/^\s+/g:/^[\t\r ]*\n?/g;t.value=t.value.replace(n,"")}}(u[e+1],s.greedy)})}(n,this.options),n;var d=c===j.OUTPUT?"output":"tag",g=16<l.length?l.slice(0,13)+"...":l;throw new b(d+' "'+g+'" not closed',new H(l,t,p,h,e))},t}(),ct=function(){function t(){}return t.prototype.renderTemplates=function(s,a){return h(this,void 0,void 0,function(){var e,n,r,i,o,u;return d(this,function(t){switch(t.label){case 0:x(a,"unable to evalTemplates: scope undefined"),e="",n=0,r=s,t.label=1;case 1:if(!(n<r.length))return[3,6];i=r[n],t.label=2;case 2:return t.trys.push([2,4,,5]),o=e,[4,i.render(a)];case 3:return e=o+t.sent(),[3,5];case 4:if("RenderBreakError"===(u=t.sent()).name)throw u.resolvedHTML=e,u;throw"RenderError"===u.name?u:new T(u,i);case 5:return n++,[3,1];case 6:return[2,e]}})})},t}();function lt(t){return t&&s(t.equals)}var ft=function(){};function pt(t){return t instanceof ft&&s(t.value)}var ht=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.equals=function(t){return l(t)||f(t)?0===t.length:!!m(t)&&0===Object.keys(t).length},e.prototype.gt=function(){return!1},e.prototype.geq=function(){return!1},e.prototype.lt=function(){return!1},e.prototype.leq=function(){return!1},e.prototype.value=function(){return""},e}(ft),dt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.equals=function(t){return!1===t||(!!c(pt(t)?t.value():t)||(l(t)?/^\s*$/.test(t):e.prototype.equals.call(this,t)))},t}(ht),gt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.equals=function(t){return c(pt(t)?t.value():t)||t instanceof dt},e.prototype.gt=function(){return!1},e.prototype.geq=function(){return!1},e.prototype.lt=function(){return!1},e.prototype.leq=function(){return!1},e.prototype.value=function(){return null},e}(ft),vt={"==":function(t,e){return lt(t)?t.equals(e):lt(e)?e.equals(t):t===e},"!=":function(t,e){return lt(t)?!t.equals(e):lt(e)?!e.equals(t):t!==e},">":function(t,e){return lt(t)?t.gt(e):lt(e)?e.lt(t):e<t},"<":function(t,e){return lt(t)?t.lt(e):lt(e)?e.gt(t):t<e},">=":function(t,e){return lt(t)?t.geq(e):lt(e)?e.leq(t):e<=t},"<=":function(t,e){return lt(t)?t.leq(e):lt(e)?e.geq(t):t<=e},contains:function(t,e){return!!t&&("function"==typeof t.indexOf&&-1<t.indexOf(e))},and:function(t,e){return bt(t)&&bt(e)},or:function(t,e){return bt(t)||bt(e)}};function mt(t,e){var n=function t(e,n){x(n,"unable to parseExp: scope undefined");for(var r,i=ot,o=0;o<i.length;o++){var u=i[o],s=new RegExp("^("+$.source+")("+u.source+")("+$.source+")$");if(r=e.match(s)){var a=t(r[1],n);return(0,vt[r[2].trim()])(a,t(r[3],n))}}return(r=e.match(it))?y(yt(r[1],n),yt(r[2],n)+1):yt(e,n)}(t,e);return pt(n)?n.value():n}function yt(t,e){return t?"true"===(t=t.trim())||"false"!==t&&("nil"===t||"null"===t?new gt:"empty"===t?new ht:"blank"===t?new dt:isNaN(Number(t))?'"'!==t[0]&&"'"!==t[0]||t[0]!==g(t)?e.get(t):t.slice(1,-1):Number(t)):null}function wt(t,e){var n=yt(t,e);return pt(n)?n.value():n}function bt(t){return!Tt(t)}function Tt(t){return!1===t||null==t}var Et,xt,kt=function(t,e){var n;for(et.lastIndex=0;n=et.exec(t);){var r=n[1],i=n[2];this[r]=wt(i,e)}},_t=function(t){this.token=t},qt=function(u){function s(t,e,n){var r=u.call(this,t)||this;r.name=t.name;var i,o=s.impls[t.name];return x(o,"tag "+t.name+" not found"),r.impl=(i=o,Object.create(i)),r.impl.liquid=n,r.impl.parse&&r.impl.parse(t,e),r}return i(s,u),s.prototype.render=function(r){return h(this,void 0,void 0,function(){var e,n;return d(this,function(t){switch(t.label){case 0:return e=new kt(this.token.args,r),"function"!=typeof(n=this.impl).render?[2,""]:[4,n.render(r,e)];case 1:return[2,a(t.sent())]}})})},s.register=function(t,e){s.impls[t]=e},s.clear=function(){s.impls={}},s.impls={},s}(_t),St=function(){function i(t,e,n){var r=i.impls[t];if(!r&&n)throw new TypeError("undefined filter: "+t);this.name=t,this.impl=r||function(t){return t},this.args=e}return i.prototype.render=function(t,e){var n=this.args.map(function(t){return wt(t,e)});return this.impl.apply(null,[t].concat(n))},i.register=function(t,e){i.impls[t]=e},i.clear=function(){i.impls={}},i.impls={},i}(),Rt=function(){function t(t,e){this.handlers={},this.stopRequested=!1,this.tokens=t,this.parseToken=e}return t.prototype.on=function(t,e){return this.handlers[t]=e,this},t.prototype.trigger=function(t,e){var n=this.handlers[t];return"function"==typeof n&&(n(e),!0)},t.prototype.start=function(){var t;for(this.trigger("start");!this.stopRequested&&(t=this.tokens.shift());)if(!(this.trigger("token",t)||"tag"===t.type&&this.trigger("tag:"+t.name,t))){var e=this.parseToken(t,this.tokens);this.trigger("template",e)}return this.stopRequested||this.trigger("end"),this},t.prototype.stop=function(){return this.stopRequested=!0,this},t}();(xt=Et||(Et={}))[xt.INIT=0]="INIT",xt[xt.FILTER_NAME=1]="FILTER_NAME",xt[xt.FILTER_ARG=2]="FILTER_ARG";var Mt=function(){function t(t,e){this.filters=[];for(var n="",r="",i=Et.INIT,o=!1,u="",s=[],a=0;a<t.length;a++)if(r)t[a]===r&&(o=!(r="")),n+=t[a];else if(/\s/.test(t[a])){if(!n)continue;o=!0}else if("|"===t[a])i===Et.INIT?this.initial=n:(i===Et.FILTER_NAME?u=n:s.push(n),this.filters.push(new St(u,s,e)),u="",s=[]),i=Et.FILTER_NAME,n="",o=!1;else if(i===Et.FILTER_NAME&&":"===t[a])u=n,i=Et.FILTER_ARG,n="",o=!1;else if(i===Et.FILTER_ARG&&","===t[a])s.push(n),n="",o=!1;else{if(o)continue;'"'!==t[a]&&"'"!==t[a]||r||(r=t[a]),n+=t[a]}n&&(i===Et.INIT?this.initial=n:i===Et.FILTER_NAME?this.filters.push(new St(n,[],e)):(s.push(n),this.filters.push(new St(u,s,e))))}return t.prototype.value=function(n){return this.filters.reduce(function(t,e){return e.render(t,n)},mt(this.initial,n))},t}(),Ot=function(r){function t(t,e){var n=r.call(this,t)||this;return n.value=new Mt(t.value,e),n}return i(t,r),t.prototype.render=function(e){return h(this,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:return[4,this.value.value(e)];case 1:return[2,a(t.sent())]}})})},t}(_t),Lt=function(n){function t(t){var e=n.call(this,t)||this;return e.str=t.value,e}return i(t,n),t.prototype.render=function(){return h(this,void 0,void 0,function(){return d(this,function(t){return[2,this.str]})})},t}(_t),At=function(){function t(t){this.liquid=t}return t.prototype.parse=function(t){for(var e,n=[];e=t.shift();)n.push(this.parseToken(e,t));return n},t.prototype.parseToken=function(e,t){try{return"tag"===e.type?new qt(e,t,this.liquid):"output"===e.type?new Ot(e,this.liquid.options.strict_filters):new Lt(e)}catch(t){throw new n(t,e)}},t.prototype.parseStream=function(t){var n=this;return new Rt(t,function(t,e){return n.parseToken(t,e)})},t}(),Ft=new RegExp("("+B.source+")\\s*=([^]*)"),It={parse:function(t){var e=t.args.match(Ft);x(e,"illegal token "+t.raw),this.key=e[1],this.value=e[2]},render:function(t){var e=new F;return e[this.key]=this.liquid.evalValue(this.value,t),t.push(e),Promise.resolve("")}};function Nt(n,r){var i=Promise.resolve(0),o=[];return n.forEach(function(t,e){i=i.then(function(){return r(t,e,n)}).then(function(t){return o.push(t)})}),i.then(function(){return o})}var Pt=new RegExp("^("+B.source+")\\s+in\\s+("+Z.source+")(?:\\s+"+tt.source+")*(?:\\s+(reversed))?(?:\\s+"+tt.source+")*$"),Ut={type:"block",parse:function(t,e){var n,r=this,i=Pt.exec(t.args);x(i,"illegal tag: "+t.raw),this.variable=i[1],this.collection=i[2],this.reversed=!!i[3],this.templates=[],this.elseTemplates=[];var o=this.liquid.parser.parseStream(e).on("start",function(){return n=r.templates}).on("tag:else",function(){return n=r.elseTemplates}).on("tag:endfor",function(){return o.stop()}).on("template",function(t){return n.push(t)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")});o.start()},render:function(a,c){return h(this,void 0,void 0,function(){var r,e,n,i,o,u,s=this;return d(this,function(t){switch(t.label){case 0:return f(r=mt(this.collection,a))||(l(r)&&0<r.length?r=[r]:m(r)&&(r=Object.keys(r).map(function(t){return[t,r[t]]}))),f(r)&&r.length?(e=c.offset||0,n=void 0===c.limit?r.length:c.limit,r=r.slice(e,e+n),this.reversed&&r.reverse(),i=r.map(function(t,e){var n={};return n[s.variable]=t,n.forloop={first:0===e,index:e+1,index0:e,last:e===r.length-1,length:r.length,rindex:r.length-e,rindex0:r.length-e-1},n}),o="",u=!1,[4,Nt(i,function(r){return h(s,void 0,void 0,function(){var e,n;return d(this,function(t){switch(t.label){case 0:if(u)return[2];a.push(r),t.label=1;case 1:return t.trys.push([1,3,,4]),e=o,[4,this.liquid.renderer.renderTemplates(this.templates,a)];case 2:return o=e+t.sent(),[3,4];case 3:if("RenderBreakError"!==(n=t.sent()).name)throw n;return o+=n.resolvedHTML,"break"===n.message&&(u=!0),[3,4];case 4:return a.pop(r),[2]}})})})]):[2,this.liquid.renderer.renderTemplates(this.elseTemplates,a)];case 1:return t.sent(),[2,o]}})})}},jt=new RegExp("("+B.source+")"),Dt={parse:function(t,e){var n=this,r=t.args.match(jt);x(r,t.args+" not valid identifier"),this.variable=r[1],this.templates=[];var i=this.liquid.parser.parseStream(e);i.on("tag:endcapture",function(){return i.stop()}).on("template",function(t){return n.templates.push(t)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")}),i.start()},render:function(r){return h(this,void 0,void 0,function(){var e,n;return d(this,function(t){switch(t.label){case 0:return[4,this.liquid.renderer.renderTemplates(this.templates,r)];case 1:return e=t.sent(),(n=new A)[this.variable]=e,r.push(n),[2]}})})}},Ht={parse:function(t,e){var n=this;this.cond=t.args,this.cases=[],this.elseTemplates=[];var r=[],i=this.liquid.parser.parseStream(e).on("tag:when",function(t){n.cases.push({val:t.args,templates:r=[]})}).on("tag:else",function(){return r=n.elseTemplates}).on("tag:endcase",function(){return i.stop()}).on("template",function(t){return r.push(t)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")});i.start()},render:function(t){for(var e=0;e<this.cases.length;e++){var n=this.cases[e];if(mt(n.val,t)===mt(this.cond,t))return this.liquid.renderer.renderTemplates(n.templates,t)}return this.liquid.renderer.renderTemplates(this.elseTemplates,t)}},zt={parse:function(t,e){var n=this.liquid.parser.parseStream(e);n.on("token",function(t){"endcomment"===t.name&&n.stop()}).on("end",function(){throw new Error("tag "+t.raw+" not closed")}),n.start()}},Ct=/[^\s,]+/,Yt=new RegExp("with\\s+("+Z.source+")"),$t={parse:function(t){var e=Ct.exec(t.args);e&&(this.staticValue=e[0]),(e=Z.exec(t.args))&&(this.value=e[0]),(e=Yt.exec(t.args))&&(this.with=e[1])},render:function(s,a){return h(this,void 0,void 0,function(){var e,n,r,i,o,u;return d(this,function(t){switch(t.label){case 0:return s.opts.dynamicPartials?rt.exec(this.value)?(n=this.value.slice(1,-1),[4,this.liquid.parseAndRender(n,s.getAll(),s.opts)]):[3,2]:[3,4];case 1:return e=t.sent(),[3,3];case 2:e=wt(this.value,s),t.label=3;case 3:return[3,5];case 4:e=this.staticValue,t.label=5;case 5:return x(e,"cannot include with empty filename"),r=s.blocks,i=s.blockMode,s.blocks={},s.blockMode=M.OUTPUT,this.with&&(a[e]=wt(this.with,s)),[4,this.liquid.getTemplate(e,s.opts)];case 6:return o=t.sent(),s.push(a),[4,this.liquid.renderer.renderTemplates(o,s)];case 7:return u=t.sent(),s.pop(a),s.blocks=r,s.blockMode=i,[2,u]}})})}},Gt={parse:function(t){var e=t.args.match(B);x(e,"illegal identifier "+t.args),this.variable=e[0]},render:function(t){var e=t.findContextFor(this.variable,function(t){return!(t instanceof A||t instanceof F)});return e||(e=new N,t.unshift(e)),"number"!=typeof e[this.variable]&&(e[this.variable]=0),--e[this.variable]}},Bt=new RegExp("^(?:("+Z.source+")\\s*:\\s*)?(.*)$"),Vt=new RegExp(Z.source,"g"),Wt={parse:function(t){var e=Bt.exec(t.args);x(e,"illegal tag: "+t.raw),this.group=e[1]||"";var n=e[2];for(this.candidates=[];e=Vt.exec(n);)this.candidates.push(e[0]);x(this.candidates.length,"empty candidates: "+t.raw)},render:function(t){var e="cycle:"+wt(this.group,t)+":"+this.candidates.join(","),n=t.groups,r=n[e];void 0===r&&(r=n[e]=0);var i=this.candidates[r];return r=(r+1)%this.candidates.length,n[e]=r,wt(i,t)}},Jt={parse:function(t,e){var n,r=this;this.branches=[],this.elseTemplates=[];var i=this.liquid.parser.parseStream(e).on("start",function(){return r.branches.push({cond:t.args,templates:n=[]})}).on("tag:elsif",function(t){r.branches.push({cond:t.args,templates:n=[]})}).on("tag:else",function(){return n=r.elseTemplates}).on("tag:endif",function(){return i.stop()}).on("template",function(t){return n.push(t)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")});i.start()},render:function(t){for(var e=0,n=this.branches;e<n.length;e++){var r=n[e];if(bt(mt(r.cond,t)))return this.liquid.renderer.renderTemplates(r.templates,t)}return this.liquid.renderer.renderTemplates(this.elseTemplates,t)}},Xt={parse:function(t){var e=t.args.match(B);x(e,"illegal identifier "+t.args),this.variable=e[0]},render:function(t){var e=t.findContextFor(this.variable,function(t){return!(t instanceof A||t instanceof F)});e||(e=new I,t.unshift(e)),"number"!=typeof e[this.variable]&&(e[this.variable]=0);var n=e[this.variable];return e[this.variable]++,n}},Kt=/\S+/,Qt={parse:function(t,e){var n=Kt.exec(t.args);n&&(this.staticLayout=n[0]),(n=Z.exec(t.args))&&(this.layout=n[0]),this.tpls=this.liquid.parser.parse(e)},render:function(o,u){return h(this,void 0,void 0,function(){var e,n,r,i;return d(this,function(t){switch(t.label){case 0:return x(e=o.opts.dynamicPartials?wt(this.layout,o):this.staticLayout,"cannot apply layout with empty filename"),o.blockMode=M.STORE,[4,this.liquid.renderer.renderTemplates(this.tpls,o)];case 1:return n=t.sent(),void 0===o.blocks[""]&&(o.blocks[""]=n),[4,this.liquid.getTemplate(e,o.opts)];case 2:return r=t.sent(),o.push(u),o.blockMode=M.OUTPUT,[4,this.liquid.renderer.renderTemplates(r,o)];case 3:return i=t.sent(),o.pop(u),[2,i]}})})}},Zt={parse:function(t,e){var n=this,r=/\w+/.exec(t.args);this.block=r?r[0]:"",this.tpls=[];var i=this.liquid.parser.parseStream(e).on("tag:endblock",function(){return i.stop()}).on("template",function(t){return n.tpls.push(t)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")});i.start()},render:function(i){return h(this,void 0,void 0,function(){var e,n,r;return d(this,function(t){switch(t.label){case 0:return void 0===(e=i.blocks[this.block])?[3,1]:(r=e,[3,3]);case 1:return[4,this.liquid.renderer.renderTemplates(this.tpls,i)];case 2:r=t.sent(),t.label=3;case 3:return n=r,i.blockMode===M.STORE?(i.blocks[this.block]=n,[2,""]):[2,n]}})})}},te={parse:function(t,e){var n=this;this.tokens=[];var r=this.liquid.parser.parseStream(e);r.on("token",function(t){"endraw"===t.name?r.stop():n.tokens.push(t)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")}),r.start()},render:function(){return this.tokens.map(function(t){return t.raw}).join("")}},ee=new RegExp("^("+B.source+")\\s+in\\s+("+Z.source+")(?:\\s+"+tt.source+")*$"),ne={assign:It,for:Ut,capture:Dt,case:Ht,comment:zt,include:$t,decrement:Gt,increment:Xt,cycle:Wt,if:Jt,layout:Qt,block:Zt,raw:te,tablerow:{parse:function(t,e){var n,r=this,i=ee.exec(t.args);x(i,"illegal tag: "+t.raw),this.variable=i[1],this.collection=i[2],this.templates=[];var o=this.liquid.parser.parseStream(e).on("start",function(){return n=r.templates}).on("tag:endtablerow",function(){return o.stop()}).on("template",function(t){return n.push(t)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")});o.start()},render:function(c,l){return h(this,void 0,void 0,function(){var e,n,r,o,i,u,s,a=this;return d(this,function(t){switch(t.label){case 0:return e=mt(this.collection,c)||[],n=l.offset||0,r=void 0===l.limit?e.length:l.limit,e=e.slice(n,n+r),o=l.cols||e.length,i=e.map(function(t){var e={};return e[a.variable]=t,e}),u=0,s="",[4,Nt(i,function(r,i){return h(a,void 0,void 0,function(){var e,n;return d(this,function(t){switch(t.label){case 0:return u=Math.floor(i/o)+1,1===(e=i%o+1)&&(1!==u&&(s+="</tr>"),s+='<tr class="row'+u+'">'),s+='<td class="col'+e+'">',c.push(r),n=s,[4,this.liquid.renderer.renderTemplates(this.templates,c)];case 1:return s=n+t.sent(),s+="</td>",c.pop(r),[2,s]}})})})];case 1:return t.sent(),0<u&&(s+="</tr>"),[2,s]}})})}},unless:{parse:function(t,e){var n,r=this;this.templates=[],this.elseTemplates=[];var i=this.liquid.parser.parseStream(e).on("start",function(){n=r.templates,r.cond=t.args}).on("tag:else",function(){return n=r.elseTemplates}).on("tag:endunless",function(){return i.stop()}).on("template",function(t){return n.push(t)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")});i.start()},render:function(t){return Tt(mt(this.cond,t))?this.liquid.renderer.renderTemplates(this.templates,t):this.liquid.renderer.renderTemplates(this.elseTemplates,t)}},break:{render:function(){return h(this,void 0,void 0,function(){return d(this,function(t){throw new e("break")})})}},continue:{render:function(){return h(this,void 0,void 0,function(){return d(this,function(t){throw new e("continue")})})}}},re={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},ie={"&amp;":"&","&lt;":"<","&gt;":">","&#34;":'"',"&#39;":"'"};function oe(t){return String(t).replace(/&|<|>|"|'/g,function(t){return re[t]})}var ue={escape:oe,escape_once:function(t){return oe(String(t).replace(/&(amp|lt|gt|#34|#39);/g,function(t){return ie[t]}))},newline_to_br:function(t){return t.replace(/\n/g,"<br />")},strip_html:function(t){return t.replace(/<script.*?<\/script>|<!--.*?-->|<style.*?<\/style>|<.*?>/g,"")}},se={append:function(t,e){return t+e},prepend:function(t,e){return e+t},capitalize:function(t){return String(t).charAt(0).toUpperCase()+t.slice(1)},lstrip:function(t){return String(t).replace(/^\s+/,"")},downcase:function(t){return t.toLowerCase()},upcase:function(t){return String(t).toUpperCase()},remove:function(t,e){return t.split(e).join("")},remove_first:function(t,e){return t.replace(e,"")},replace:function(t,e,n){return String(t).split(e).join(n)},replace_first:function(t,e,n){return String(t).replace(e,n)},rstrip:function(t){return String(t).replace(/\s+$/,"")},split:function(t,e){return String(t).split(e)},strip:function(t){return String(t).trim()},strip_newlines:function(t){return String(t).replace(/\n/g,"")},truncate:function(t,e,n){return void 0===e&&(e=50),void 0===n&&(n="..."),(t=String(t)).length<=e?t:t.substr(0,e-n.length)+n},truncatewords:function(t,e,n){void 0===e&&(e=15),void 0===n&&(n="...");var r=t.split(/\s+/),i=r.slice(0,e).join(" ");return r.length>=e&&(i+=n),i}},ae={abs:function(t){return Math.abs(t)},ceil:function(t){return Math.ceil(t)},divided_by:function(t,e){return t/e},floor:function(t){return Math.floor(t)},minus:le(function(t,e){return t-e}),modulo:le(function(t,e){return t%e}),round:function(t,e){void 0===e&&(e=0);var n=Math.pow(10,e);return Math.round(t*n)/n},plus:le(function(t,e){return Number(t)+Number(e)}),times:function(t,e){return t*e}};function ce(t){var e=String(t).split(".");return 1<e.length?e[1].length:0}function le(r){return function(t,e){var n=Math.max(ce(t),ce(e));return r(t,e).toFixed(n)}}var fe={url_decode:function(t){return t.split("+").map(decodeURIComponent).join(" ")},url_encode:function(t){return t.split(" ").map(encodeURIComponent).join("+")}},pe={join:function(t,e){return t.join(void 0===e?" ":e)},last:function(t){return g(t)},first:function(t){return t[0]},map:function(t,e){return t.map(function(t){return t[e]})},reverse:function(t){return t.reverse()},sort:function(t,e){return t.sort(e)},size:function(t){return t.length},concat:function(t,e){return Array.prototype.concat.call(t,e)},slice:function(t,e,n){return void 0===n&&(n=1),t.slice(e,e+n)},uniq:function(t){var e={};return(t||[]).filter(function(t){return!e.hasOwnProperty(String(t))&&(e[String(t)]=!0)})}},he=["January","February","March","April","May","June","July","August","September","October","November","December"],de=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ge=he.map(ye),ve=de.map(ye),me={1:"st",2:"nd",3:"rd",default:"th"};function ye(t){return t.slice(0,3)}var we={daysInMonth:function(t){return[31,we.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31]},getDayOfYear:function(t){for(var e=0,n=0;n<t.getMonth();++n)e+=we.daysInMonth(t)[n];return e+t.getDate()},getWeekOfYear:function(t,e){var n=this.getDayOfYear(t)+(e-t.getDay()),r=7-new Date(t.getFullYear(),0,1).getDay()+e;return w(String(Math.floor((n-r)/7)+1),2,"0")},isLeapYear:function(t){var e=t.getFullYear();return!(0!=(3&e)||!(e%100||e%400==0&&e))},getSuffix:function(t){var e=t.getDate().toString(),n=parseInt(e.slice(-1));return me[n]||me.default},century:function(t){return parseInt(t.getFullYear().toString().substring(0,2),10)}},be={a:function(t){return ve[t.getDay()]},A:function(t){return de[t.getDay()]},b:function(t){return ge[t.getMonth()]},B:function(t){return he[t.getMonth()]},c:function(t){return t.toLocaleString()},C:function(t){return we.century(t)},d:function(t){return w(t.getDate(),2,"0")},e:function(t){return w(t.getDate(),2)},H:function(t){return w(t.getHours(),2,"0")},I:function(t){return w(String(t.getHours()%12||12),2,"0")},j:function(t){return w(we.getDayOfYear(t),3,"0")},k:function(t){return w(t.getHours(),2)},l:function(t){return w(String(t.getHours()%12||12),2)},L:function(t){return w(t.getMilliseconds(),3,"0")},m:function(t){return w(t.getMonth()+1,2,"0")},M:function(t){return w(t.getMinutes(),2,"0")},p:function(t){return t.getHours()<12?"AM":"PM"},P:function(t){return t.getHours()<12?"am":"pm"},q:function(t){return we.getSuffix(t)},s:function(t){return Math.round(t.valueOf()/1e3)},S:function(t){return w(t.getSeconds(),2,"0")},u:function(t){return t.getDay()||7},U:function(t){return we.getWeekOfYear(t,0)},w:function(t){return t.getDay()},W:function(t){return we.getWeekOfYear(t,1)},x:function(t){return t.toLocaleDateString()},X:function(t){return t.toLocaleTimeString()},y:function(t){return t.getFullYear().toString().substring(2,4)},Y:function(t){return t.getFullYear()},z:function(t){var e=t.getTimezoneOffset()/60*100;return(0<e?"-":"+")+w(String(Math.abs(e)),4,"0")},"%":function(){return"%"}};be.h=be.b,be.N=be.L;var Te=v({},ue,se,ae,fe,{date:function(t,e){var n,r=t;return"now"===t?r=new Date:l(t)&&(r=new Date(t)),(n=r)instanceof Date&&!isNaN(n.getTime())?function(t,e){for(var n="",r=e;;){var i=/%./g,o=i.exec(r);if(!o)return n+r;n+=r.slice(0,i.lastIndex-2),r=r.slice(i.lastIndex);var u=o[0].charAt(1),s=be[u];n+=s?s(t):"%"+u}}(r,e):t}},{default:function(t,e){return bt(t)?t:e}},pe);return function(){function e(t){void 0===t&&(t={});var n=this;this.cache={},this.options=R(S(t)),this.parser=new At(this),this.renderer=new ct,this.tokenizer=new at(this.options),p(ne,function(t,e){return n.registerTag(e,t)}),p(Te,function(t,e){return n.registerFilter(e,t)})}return e.prototype.parse=function(t,e){var n=this.tokenizer.tokenize(t,e);return this.parser.parse(n)},e.prototype.render=function(t,e,n){var r=v({},this.options,S(n)),i=new O(e,r);return this.renderer.renderTemplates(t,i)},e.prototype.parseAndRender=function(n,r,i){return h(this,void 0,void 0,function(){var e;return d(this,function(t){switch(t.label){case 0:return[4,this.parse(n)];case 1:return e=t.sent(),[2,this.render(e,r,i)]}})})},e.prototype.getTemplate=function(f,p){return h(this,void 0,void 0,function(){var e,n,r,i,o,u,s,a,c,l=this;return d(this,function(t){switch(t.label){case 0:e=S(p),n=e.root?e.root.concat(this.options.root):this.options.root,r=n.map(function(t){return U.resolve(t,f,l.options.extname)}),i=0,o=r,t.label=1;case 1:return i<o.length?(u=o[i],[4,U.exists(u)]):[3,5];case 2:return t.sent()?this.options.cache&&this.cache[u]?[2,this.cache[u]]:(a=this.parse,[4,U.readFile(u)]):[3,4];case 3:return s=a.apply(this,[t.sent(),u]),this.options.cache&&(this.cache[u]=s),[2,s];case 4:return i++,[3,1];case 5:throw(c=new Error("ENOENT")).message='ENOENT: Failed to lookup "'+f+'" in "'+n+'"',c.code="ENOENT",c}})})},e.prototype.renderFile=function(r,i,o){return h(this,void 0,void 0,function(){var e,n;return d(this,function(t){switch(t.label){case 0:return e=S(o),[4,this.getTemplate(r,e)];case 1:return n=t.sent(),[2,this.render(n,i,o)]}})})},e.prototype.evalValue=function(t,e){return new Mt(t,this.options.strict_filters).value(e)},e.prototype.registerFilter=function(t,e){return St.register(t,e)},e.prototype.registerTag=function(t,e){return qt.register(t,e)},e.prototype.plugin=function(t){return t.call(this,e)},e.prototype.express=function(){var i=this;return function(t,e,n){var r={root:this.root};i.renderFile(t,e,r).then(function(t){return n(null,t)},n)}},(e.default=e).isTruthy=bt,e.isFalsy=Tt,e.evalExp=mt,e.evalValue=wt,e.Types=P,e}()});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Liquid=e()}(this,function(){"use strict";var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var v=function(){return(v=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function h(o,s,u,a){return new(u||(u=Promise))(function(t,e){function n(t){try{i(a.next(t))}catch(t){e(t)}}function r(t){try{i(a.throw(t))}catch(t){e(t)}}function i(e){e.done?t(e.value):new u(function(t){t(e.value)}).then(n,r)}i((a=a.apply(o,s||[])).next())})}function d(n,r){var i,o,s,t,u={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return t={next:e(0),throw:e(1),return:e(2)},"function"==typeof Symbol&&(t[Symbol.iterator]=function(){return this}),t;function e(e){return function(t){return function(e){if(i)throw new TypeError("Generator is already executing.");for(;u;)try{if(i=1,o&&(s=2&e[0]?o.return:e[0]?o.throw||((s=o.return)&&s.call(o),0):o.next)&&!(s=s.call(o,e[1])).done)return s;switch(o=0,s&&(e=[2&e[0],s.value]),e[0]){case 0:case 1:s=e;break;case 4:return u.label++,{value:e[1],done:!1};case 5:u.label++,o=e[1],e=[0];continue;case 7:e=u.ops.pop(),u.trys.pop();continue;default:if(!(s=0<(s=u.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){u=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3])){u.label=e[1];break}if(6===e[0]&&u.label<s[1]){u.label=s[1],s=e;break}if(s&&u.label<s[2]){u.label=s[2],u.ops.push(e);break}s[2]&&u.ops.pop(),u.trys.pop();continue}e=r.call(n,u)}catch(t){e=[6,t],o=0}finally{i=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}([e,t])}}}var n={};function s(t,e){n[t]||(console.warn(t+" See: https://github.com/harttle/liquidjs/issues/"+e),n[t]=!0)}var e=Object.prototype.toString;function l(t){return"[object String]"===e.call(t)}function o(t){return"function"==typeof t}function a(t){return c(t)?"":o((t=u(t)).to_s)?(s("to_s is deprecated, use toString instead.",109),t.to_s()):String(t)}function u(t){return o(t.to_liquid)?(s("to_liquid is deprecated, use toLiquid instead.",109),u(t.to_liquid())):o(t.toLiquid)?u(t.toLiquid()):t}function c(t){return null==t}function f(t){return"[object Array]"===e.call(t)}function p(t,e){for(var n in t=t||{})if(t.hasOwnProperty(n)&&!1===e(t[n],n,t))break;return t}function g(t){return t[t.length-1]}function m(t){var e=typeof t;return null!==t&&("object"===e||"function"===e)}function y(t,e,n){void 0===n&&(n=1);for(var r=[],i=t;i<e;i+=n)r.push(i);return r}function w(t,e,n){void 0===n&&(n=" ");for(var r=e-(t=String(t)).length;0<r--;)t=n+t;return t}var b=function(){function t(){}return t.prototype.valueOf=function(){},t.prototype.liquidMethodMissing=function(t){},t}(),t=function(r){function t(t,e){var n=r.call(this,t.message)||this;return n.originalError=t,n.token=e,n}return i(t,r),t.prototype.update=function(){var i,o,t,s,e=this.originalError,n=(i=this.token,o=i.input.split("\n"),t=Math.max(i.line-2,1),s=Math.min(i.line+3,o.length),y(t,s+1).map(function(t){var e=t===i.line?">> ":" ",n=w(String(t),String(s).length),r=o[t-1];return""+e+n+"| "+r}).join("\n"));this.message=function(t,e){e.file&&(t+=", file:"+e.file);return t+=", line:"+e.line+", col:"+e.col}(e.message,this.token),this.stack=this.message+"\n"+n+"\n"+this.stack+"\nFrom "+e.stack},t}(Error),T=function(r){function t(t,e){var n=r.call(this,new Error(t),e)||this;return n.name="TokenizationError",r.prototype.update.call(n),n}return i(t,r),t}(t),E=function(r){function t(t,e){var n=r.call(this,t,e)||this;return n.name="ParseError",n.message=t.message,r.prototype.update.call(n),n}return i(t,r),t}(t),x=function(r){function t(t,e){var n=r.call(this,t,e.token)||this;return n.name="RenderError",n.message=t.message,r.prototype.update.call(n),n}return i(t,r),t}(t),k=function(n){function t(t){var e=n.call(this,t)||this;return e.resolvedHTML="",e.name="RenderBreakError",e.message=t+"",e}return i(t,n),t}(Error),q=function(n){function t(t){var e=n.call(this,t)||this;return e.name="AssertionError",e.message=t+"",e}return i(t,n),t}(Error);function R(t,e){if(!t)throw new q(e=e||"expect "+t+" to be true")}var S,O,M={root:["."],cache:!1,extname:"",dynamicPartials:!0,trimTagRight:!1,trimTagLeft:!1,trimOutputRight:!1,trimOutputLeft:!1,greedy:!0,tagDelimiterLeft:"{%",tagDelimiterRight:"%}",outputDelimiterLeft:"{{",outputDelimiterRight:"}}",strictFilters:!1,strictVariables:!1};function L(t){var e;(t=t||{}).hasOwnProperty("root")&&(t.root=f(e=t.root)?e:l(e)?[e]:[]);for(var n=0,r=Object.keys(t);n<r.length;n++){var i=r[n];if(-1<i.indexOf("_")){var o=i.replace(/_([a-z])/g,function(t,e){return e.toUpperCase()});s(i+" is deprecated, use "+o+" instead.",109),t[o]=t[i]}}return t}function _(t){return v({},M,t)}(O=S||(S={}))[O.OUTPUT=0]="OUTPUT",O[O.STORE=1]="STORE";var F=S,A=function(){function t(t,e){void 0===t&&(t={}),this.blocks={},this.groups={},this.blockMode=F.OUTPUT,this.opts=_(e),this.contexts=[t||{}]}return t.prototype.getAll=function(){return this.contexts.reduce(function(t,e){return v(t,e)},{})},t.prototype.get=function(t){var r=this,e=this.propertyAccessSeq(t),n=this.findContextFor(e[0])||g(this.contexts);return e.reduce(function(t,e){var n=r.readProperty(t,e);if(c(n)&&r.opts.strictVariables)throw new TypeError("undefined variable: "+e);return n},n)},t.prototype.set=function(t,n){var r=this.propertyAccessSeq(t),i=this.findContextFor(r[0])||g(this.contexts);r.some(function(t,e){return!m(i)||(e===r.length-1?(i[t]=n,!0):(void 0===i[t]&&(i[t]={}),i=i[t],!1))})},t.prototype.unshift=function(t){return this.contexts.unshift(t)},t.prototype.push=function(t){return this.contexts.push(t)},t.prototype.pop=function(e){if(!arguments.length)return this.contexts.pop();var t=this.contexts.findIndex(function(t){return t===e});if(-1===t)throw new TypeError("scope not found, cannot pop");return this.contexts.splice(t,1)[0]},t.prototype.findContextFor=function(t,e){void 0===e&&(e=function(){return!0});for(var n=this.contexts.length-1;0<=n;n--){var r=this.contexts[n];if(e(r)&&t in r)return r}return null},t.prototype.readProperty=function(t,e){return c(t)?t:(t=u(t))instanceof b?o(t[e])?t[e]():t.hasOwnProperty(e)?t[e]:t.liquidMethodMissing(e):"size"===e?c((n=t).size)&&(f(n)||l(n))?n.length:n.size:t[e];var n},t.prototype.propertyAccessSeq=function(t){t=String(t);for(var e,n=[],r="",i=0;i<t.length;)switch(t[i]){case"[":s();var o=t[i+1];i=/['"]/.test(o)?(R(-1!==(e=t.indexOf(o,i+2)),"unbalanced "+o+": "+t),r=t.slice(i+2,e),s(),e+2):(R(-1!==(e=I(t,i+1)),"unbalanced []: "+t),r=t.slice(i+1,e),/^[+-]?\d+$/.test(r)||(r=String(this.get(r))),s(),e+1);break;case".":s(),i++;break;default:r+=t[i],i++}if(s(),!n.length)throw new TypeError('invalid path:"'+t+'"');return n;function s(){r.length&&n.push(r),r=""}},t}();function I(t,e){for(var n=1,r=e;r<t.length;r++)if("["===t[r]&&n++,"]"===t[r]&&0===--n)return r;return-1}var P=function(){},D=function(){},N=function(){},j=function(){},U=Object.freeze({AssignScope:D,CaptureScope:P,IncrementScope:N,DecrementScope:j,ParseError:E,TokenizationError:T,RenderBreakError:k,AssertionError:q,Drop:b});var H={readFile:function(r){return h(this,void 0,void 0,function(){return d(this,function(t){return[2,new Promise(function(t,e){var n=new XMLHttpRequest;n.onload=function(){200<=n.status&&n.status<300?t(n.responseText):e(new Error(n.statusText))},n.onerror=function(){e(new Error("An error occurred whilst receiving the response."))},n.open("GET",r),n.send()})]})})},resolve:function(t,e,i){return t.length&&"/"!==g(t)&&(t+="/"),function(t,e){var n=document.createElement("base");n.href=t;var r=document.getElementsByTagName("head")[0];r.insertBefore(n,r.firstChild);var i=document.createElement("a");i.href=e;var o=i.href;return r.removeChild(n),o}(t,e).replace(/^(\w+:\/\/[^/]+)(\/[^?]+)/,function(t,e,n){var r=n.split("/").pop();return/\.\w+$/.test(r)?t:e+n+i})},exists:function(){return h(this,void 0,void 0,function(){return d(this,function(t){return[2,!0]})})}};var z,C,Y=function(t,e,n,r,i){this.type="notset",this.col=r,this.line=n,this.raw=t,this.value=t,this.input=e,this.file=i},$=function(s){function t(t,e,n,r,i){var o=s.call(this,t,e,n,r,i)||this;return o.type="html",o.value=t,o}return i(t,s),t}(Y),G=function(u){function t(t,e,n,r,i,o){var s=u.call(this,t,n,r,i,o)||this;return s.trimLeft="-"===e[0],s.trimRight="-"===g(e),s.value=e.slice(s.trimLeft?1:0,s.trimRight?-1:e.length).trim(),s}return i(t,u),t}(Y),B=new RegExp(/'[^']*'/.source+"|"+/"[^"]*"/.source),V=new RegExp("(?:"+B.source+"|[^'\"])*"),W=/[+-]?(?:\d+\.?\d*|\.?\d+)/,J=/[\w-]+[?]?/,X=new RegExp("\\[(?:"+B.source+"|[\\w-\\.]+)\\]"),K=new RegExp("(?:"+B.source+"|"+/true|false/.source+"|"+W.source+")"),Q=new RegExp(J.source+"(?:\\."+J.source+"|"+X.source+")*"),Z=new RegExp("(?:"+Q.source+"|"+W.source+")"),tt=new RegExp("\\("+Z.source+"\\.\\."+Z.source+"\\)"),et=new RegExp("\\(("+Z.source+")\\.\\.("+Z.source+")\\)"),nt=new RegExp("(?:"+Q.source+"|"+K.source+"|"+tt.source+")"),rt=new RegExp("(?:"+J.source+")\\s*:\\s*(?:"+nt.source+")"),it=new RegExp("("+J.source+")\\s*:\\s*("+nt.source+")","g"),ot=new RegExp("^\\s*("+J.source+")\\s*([\\s\\S]*?)\\s*$"),st=new RegExp("^"+B.source+"$"),ut=new RegExp("^"+et.source+"$"),at=[/\s+or\s+/,/\s+and\s+/,/==|!=|<=|>=|<|>|\s+contains\s+/],ct=function(a){function t(t,e,n,r,i,o){var s=a.call(this,t,e,n,r,i,o)||this;s.type="tag";var u=s.value.match(ot);if(!u)throw new T("illegal tag syntax",s);return s.name=u[1],s.args=u[2],s}return i(t,a),t}(G),lt=function(u){function t(t,e,n,r,i,o){var s=u.call(this,t,e,n,r,i,o)||this;return s.type="output",s}return i(t,u),t}(G);(C=z||(z={}))[C.HTML=0]="HTML",C[C.OUTPUT=1]="OUTPUT",C[C.TAG=2]="TAG";var ft=function(){function t(t){this.options=_(t)}return t.prototype.tokenize=function(t,e){for(var n=[],r=this.options.tagDelimiterLeft,i=this.options.tagDelimiterRight,o=this.options.outputDelimiterLeft,s=this.options.outputDelimiterRight,u=0,a=1,c=z.HTML,l="",f=0,p=1,h=1;u<t.length;){if("\n"===t[u]&&(a++,f=u+1),c===z.HTML){if(t.substr(u,o.length)===o){l&&n.push(new $(l,t,p,h,e)),p=a,h=u-f+1,u+=(l=o).length,c=z.OUTPUT;continue}if(t.substr(u,r.length)===r){l&&n.push(new $(l,t,p,h,e)),p=a,h=u-f+1,u+=(l=r).length,c=z.TAG;continue}}else{if(c===z.OUTPUT&&t.substr(u,s.length)===s){l+=s,n.push(new lt(l,l.slice(o.length,-s.length),t,p,h,e)),l="",p=a,h=(u+=s.length)-f+1,c=z.HTML;continue}if(t.substr(u,i.length)===i){l+=i,n.push(new ct(l,l.slice(r.length,-i.length),t,p,h,e)),l="",p=a,h=(u+=i.length)-f+1,c=z.HTML;continue}}l+=t[u++]}if(c===z.HTML)return l&&n.push(new $(l,t,p,h,e)),function(s,u){u=v({greedy:!0},u);var a=!1;s.forEach(function(t,e){var n,r,i,o;i=t,o=u,!a&&("tag"===i.type?i.trimLeft||o.trimTagLeft:"output"===i.type?i.trimLeft||o.trimOutputLeft:void 0)&&function(t,e){if(t&&"html"===t.type){var n=e?/\s+$/g:/[\t\r ]*$/g;t.value=t.value.replace(n,"")}}(s[e-1],u.greedy),"tag"===t.type&&"raw"===t.name&&(a=!0),"tag"===t.type&&"endraw"===t.name&&(a=!1),n=t,r=u,!a&&("tag"===n.type?n.trimRight||r.trimTagRight:"output"===n.type?n.trimRight||r.trimOutputRight:void 0)&&function(t,e){if(t&&"html"===t.type){var n=e?/^\s+/g:/^[\t\r ]*\n?/g;t.value=t.value.replace(n,"")}}(s[e+1],u.greedy)})}(n,this.options),n;var d=c===z.OUTPUT?"output":"tag",g=16<l.length?l.slice(0,13)+"...":l;throw new T(d+' "'+g+'" not closed',new Y(l,t,p,h,e))},t}(),pt=function(){function t(){}return t.prototype.renderTemplates=function(u,a){return h(this,void 0,void 0,function(){var e,n,r,i,o,s;return d(this,function(t){switch(t.label){case 0:R(a,"unable to evalTemplates: scope undefined"),e="",n=0,r=u,t.label=1;case 1:if(!(n<r.length))return[3,6];i=r[n],t.label=2;case 2:return t.trys.push([2,4,,5]),o=e,[4,i.render(a)];case 3:return e=o+t.sent(),[3,5];case 4:if("RenderBreakError"===(s=t.sent()).name)throw s.resolvedHTML=e,s;throw"RenderError"===s.name?s:new x(s,i);case 5:return n++,[3,1];case 6:return[2,e]}})})},t}();function ht(t){return t&&o(t.equals)}var dt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.equals=function(t){return l(t)||f(t)?0===t.length:!!m(t)&&0===Object.keys(t).length},e.prototype.gt=function(){return!1},e.prototype.geq=function(){return!1},e.prototype.lt=function(){return!1},e.prototype.leq=function(){return!1},e.prototype.valueOf=function(){return""},e}(b),gt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.equals=function(t){return!1===t||(!!c(t instanceof b?t.valueOf():t)||(l(t)?/^\s*$/.test(t):e.prototype.equals.call(this,t)))},t}(dt),vt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.equals=function(t){return c(t instanceof b?t.valueOf():t)||t instanceof gt},e.prototype.gt=function(){return!1},e.prototype.geq=function(){return!1},e.prototype.lt=function(){return!1},e.prototype.leq=function(){return!1},e.prototype.valueOf=function(){return null},e}(b),mt={"==":function(t,e){return ht(t)?t.equals(e):ht(e)?e.equals(t):t===e},"!=":function(t,e){return ht(t)?!t.equals(e):ht(e)?!e.equals(t):t!==e},">":function(t,e){return ht(t)?t.gt(e):ht(e)?e.lt(t):e<t},"<":function(t,e){return ht(t)?t.lt(e):ht(e)?e.gt(t):t<e},">=":function(t,e){return ht(t)?t.geq(e):ht(e)?e.leq(t):e<=t},"<=":function(t,e){return ht(t)?t.leq(e):ht(e)?e.geq(t):t<=e},contains:function(t,e){return!!t&&("function"==typeof t.indexOf&&-1<t.indexOf(e))},and:function(t,e){return Tt(t)&&Tt(e)},or:function(t,e){return Tt(t)||Tt(e)}};function yt(t,e){var n=function t(e,n){R(n,"unable to parseExp: scope undefined");for(var r,i=at,o=0;o<i.length;o++){var s=i[o],u=new RegExp("^("+V.source+")("+s.source+")("+V.source+")$");if(r=e.match(u)){var a=t(r[1],n);return(0,mt[r[2].trim()])(a,t(r[3],n))}}return(r=e.match(ut))?y(bt(r[1],n),bt(r[2],n)+1):wt(e,n)}(t,e);return n instanceof b?n.valueOf():n}function wt(t,e){return t?"true"===(t=t.trim())||"false"!==t&&("nil"===t||"null"===t?new vt:"empty"===t?new dt:"blank"===t?new gt:isNaN(Number(t))?'"'!==t[0]&&"'"!==t[0]||t[0]!==g(t)?e.get(t):t.slice(1,-1):Number(t)):null}function bt(t,e){var n=wt(t,e);return n instanceof b?n.valueOf():n}function Tt(t){return!Et(t)}function Et(t){return!1===t||null==t}var xt,kt,qt=function(t,e){var n;for(it.lastIndex=0;n=it.exec(t);){var r=n[1],i=n[2];this[r]=bt(i,e)}},Rt=function(t){this.token=t},St=function(s){function u(t,e,n){var r=s.call(this,t)||this;r.name=t.name;var i,o=u.impls[t.name];return R(o,"tag "+t.name+" not found"),r.impl=(i=o,Object.create(i)),r.impl.liquid=n,r.impl.parse&&r.impl.parse(t,e),r}return i(u,s),u.prototype.render=function(r){return h(this,void 0,void 0,function(){var e,n;return d(this,function(t){switch(t.label){case 0:return e=new qt(this.token.args,r),"function"!=typeof(n=this.impl).render?[2,""]:[4,n.render(r,e)];case 1:return[2,a(t.sent())]}})})},u.register=function(t,e){u.impls[t]=e},u.clear=function(){u.impls={}},u.impls={},u}(Rt),Ot=function(){function i(t,e,n){var r=i.impls[t];if(!r&&n)throw new TypeError("undefined filter: "+t);this.name=t,this.impl=r||function(t){return t},this.args=e}return i.prototype.render=function(t,e){var n=this.args.map(function(t){return bt(t,e)});return this.impl.apply(null,[t].concat(n))},i.register=function(t,e){i.impls[t]=e},i.clear=function(){i.impls={}},i.impls={},i}(),Mt=function(){function t(t,e){this.handlers={},this.stopRequested=!1,this.tokens=t,this.parseToken=e}return t.prototype.on=function(t,e){return this.handlers[t]=e,this},t.prototype.trigger=function(t,e){var n=this.handlers[t];return"function"==typeof n&&(n(e),!0)},t.prototype.start=function(){var t;for(this.trigger("start");!this.stopRequested&&(t=this.tokens.shift());)if(!(this.trigger("token",t)||"tag"===t.type&&this.trigger("tag:"+t.name,t))){var e=this.parseToken(t,this.tokens);this.trigger("template",e)}return this.stopRequested||this.trigger("end"),this},t.prototype.stop=function(){return this.stopRequested=!0,this},t}();(kt=xt||(xt={}))[kt.INIT=0]="INIT",kt[kt.FILTER_NAME=1]="FILTER_NAME",kt[kt.FILTER_ARG=2]="FILTER_ARG";var Lt=function(){function t(t,e){this.filters=[];for(var n="",r="",i=xt.INIT,o=!1,s="",u=[],a=0;a<t.length;a++)if(r)t[a]===r&&(o=!(r="")),n+=t[a];else if(/\s/.test(t[a])){if(!n)continue;o=!0}else if("|"===t[a])i===xt.INIT?this.initial=n:(i===xt.FILTER_NAME?s=n:u.push(n),this.filters.push(new Ot(s,u,e)),s="",u=[]),i=xt.FILTER_NAME,n="",o=!1;else if(i===xt.FILTER_NAME&&":"===t[a])s=n,i=xt.FILTER_ARG,n="",o=!1;else if(i===xt.FILTER_ARG&&","===t[a])u.push(n),n="",o=!1;else{if(o)continue;'"'!==t[a]&&"'"!==t[a]||r||(r=t[a]),n+=t[a]}n&&(i===xt.INIT?this.initial=n:i===xt.FILTER_NAME?this.filters.push(new Ot(n,[],e)):(u.push(n),this.filters.push(new Ot(s,u,e))))}return t.prototype.value=function(n){return this.filters.reduce(function(t,e){return e.render(t,n)},yt(this.initial,n))},t}(),_t=function(r){function t(t,e){var n=r.call(this,t)||this;return n.value=new Lt(t.value,e),n}return i(t,r),t.prototype.render=function(e){return h(this,void 0,void 0,function(){return d(this,function(t){switch(t.label){case 0:return[4,this.value.value(e)];case 1:return[2,a(t.sent())]}})})},t}(Rt),Ft=function(n){function t(t){var e=n.call(this,t)||this;return e.str=t.value,e}return i(t,n),t.prototype.render=function(){return h(this,void 0,void 0,function(){return d(this,function(t){return[2,this.str]})})},t}(Rt),At=function(){function t(t){this.liquid=t}return t.prototype.parse=function(t){for(var e,n=[];e=t.shift();)n.push(this.parseToken(e,t));return n},t.prototype.parseToken=function(e,t){try{return"tag"===e.type?new St(e,t,this.liquid):"output"===e.type?new _t(e,this.liquid.options.strictFilters):new Ft(e)}catch(t){throw new E(t,e)}},t.prototype.parseStream=function(t){var n=this;return new Mt(t,function(t,e){return n.parseToken(t,e)})},t}(),It=new RegExp("("+J.source+")\\s*=([^]*)"),Pt={parse:function(t){var e=t.args.match(It);R(e,"illegal token "+t.raw),this.key=e[1],this.value=e[2]},render:function(t){var e=new D;return e[this.key]=this.liquid.evalValue(this.value,t),t.push(e),Promise.resolve("")}};function Dt(n,r){var i=Promise.resolve(0),o=[];return n.forEach(function(t,e){i=i.then(function(){return r(t,e,n)}).then(function(t){return o.push(t)})}),i.then(function(){return o})}var Nt=new RegExp("^("+J.source+")\\s+in\\s+("+nt.source+")(?:\\s+"+rt.source+")*(?:\\s+(reversed))?(?:\\s+"+rt.source+")*$"),jt={type:"block",parse:function(t,e){var n,r=this,i=Nt.exec(t.args);R(i,"illegal tag: "+t.raw),this.variable=i[1],this.collection=i[2],this.reversed=!!i[3],this.templates=[],this.elseTemplates=[];var o=this.liquid.parser.parseStream(e).on("start",function(){return n=r.templates}).on("tag:else",function(){return n=r.elseTemplates}).on("tag:endfor",function(){return o.stop()}).on("template",function(t){return n.push(t)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")});o.start()},render:function(a,c){return h(this,void 0,void 0,function(){var r,e,n,i,o,s,u=this;return d(this,function(t){switch(t.label){case 0:return f(r=yt(this.collection,a))||(l(r)&&0<r.length?r=[r]:m(r)&&(r=Object.keys(r).map(function(t){return[t,r[t]]}))),f(r)&&r.length?(e=c.offset||0,n=void 0===c.limit?r.length:c.limit,r=r.slice(e,e+n),this.reversed&&r.reverse(),i=r.map(function(t,e){var n={};return n[u.variable]=t,n.forloop={first:0===e,index:e+1,index0:e,last:e===r.length-1,length:r.length,rindex:r.length-e,rindex0:r.length-e-1},n}),o="",s=!1,[4,Dt(i,function(r){return h(u,void 0,void 0,function(){var e,n;return d(this,function(t){switch(t.label){case 0:if(s)return[2];a.push(r),t.label=1;case 1:return t.trys.push([1,3,,4]),e=o,[4,this.liquid.renderer.renderTemplates(this.templates,a)];case 2:return o=e+t.sent(),[3,4];case 3:if("RenderBreakError"!==(n=t.sent()).name)throw n;return o+=n.resolvedHTML,"break"===n.message&&(s=!0),[3,4];case 4:return a.pop(r),[2]}})})})]):[2,this.liquid.renderer.renderTemplates(this.elseTemplates,a)];case 1:return t.sent(),[2,o]}})})}},Ut=new RegExp("("+J.source+")"),Ht={parse:function(t,e){var n=this,r=t.args.match(Ut);R(r,t.args+" not valid identifier"),this.variable=r[1],this.templates=[];var i=this.liquid.parser.parseStream(e);i.on("tag:endcapture",function(){return i.stop()}).on("template",function(t){return n.templates.push(t)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")}),i.start()},render:function(r){return h(this,void 0,void 0,function(){var e,n;return d(this,function(t){switch(t.label){case 0:return[4,this.liquid.renderer.renderTemplates(this.templates,r)];case 1:return e=t.sent(),(n=new P)[this.variable]=e,r.push(n),[2]}})})}},zt={parse:function(t,e){var n=this;this.cond=t.args,this.cases=[],this.elseTemplates=[];var r=[],i=this.liquid.parser.parseStream(e).on("tag:when",function(t){n.cases.push({val:t.args,templates:r=[]})}).on("tag:else",function(){return r=n.elseTemplates}).on("tag:endcase",function(){return i.stop()}).on("template",function(t){return r.push(t)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")});i.start()},render:function(t){for(var e=0;e<this.cases.length;e++){var n=this.cases[e];if(yt(n.val,t)===yt(this.cond,t))return this.liquid.renderer.renderTemplates(n.templates,t)}return this.liquid.renderer.renderTemplates(this.elseTemplates,t)}},Ct={parse:function(t,e){var n=this.liquid.parser.parseStream(e);n.on("token",function(t){"endcomment"===t.name&&n.stop()}).on("end",function(){throw new Error("tag "+t.raw+" not closed")}),n.start()}},Yt=/[^\s,]+/,$t=new RegExp("with\\s+("+nt.source+")"),Gt={parse:function(t){var e=Yt.exec(t.args);e&&(this.staticValue=e[0]),(e=nt.exec(t.args))&&(this.value=e[0]),(e=$t.exec(t.args))&&(this.with=e[1])},render:function(u,a){return h(this,void 0,void 0,function(){var e,n,r,i,o,s;return d(this,function(t){switch(t.label){case 0:return u.opts.dynamicPartials?st.exec(this.value)?(n=this.value.slice(1,-1),[4,this.liquid.parseAndRender(n,u.getAll(),u.opts)]):[3,2]:[3,4];case 1:return e=t.sent(),[3,3];case 2:e=bt(this.value,u),t.label=3;case 3:return[3,5];case 4:e=this.staticValue,t.label=5;case 5:return R(e,"cannot include with empty filename"),r=u.blocks,i=u.blockMode,u.blocks={},u.blockMode=F.OUTPUT,this.with&&(a[e]=bt(this.with,u)),[4,this.liquid.getTemplate(e,u.opts)];case 6:return o=t.sent(),u.push(a),[4,this.liquid.renderer.renderTemplates(o,u)];case 7:return s=t.sent(),u.pop(a),u.blocks=r,u.blockMode=i,[2,s]}})})}},Bt={parse:function(t){var e=t.args.match(J);R(e,"illegal identifier "+t.args),this.variable=e[0]},render:function(t){var e=t.findContextFor(this.variable,function(t){return!(t instanceof P||t instanceof D)});return e||(e=new j,t.unshift(e)),"number"!=typeof e[this.variable]&&(e[this.variable]=0),--e[this.variable]}},Vt=new RegExp("^(?:("+nt.source+")\\s*:\\s*)?(.*)$"),Wt=new RegExp(nt.source,"g"),Jt={parse:function(t){var e=Vt.exec(t.args);R(e,"illegal tag: "+t.raw),this.group=e[1]||"";var n=e[2];for(this.candidates=[];e=Wt.exec(n);)this.candidates.push(e[0]);R(this.candidates.length,"empty candidates: "+t.raw)},render:function(t){var e="cycle:"+bt(this.group,t)+":"+this.candidates.join(","),n=t.groups,r=n[e];void 0===r&&(r=n[e]=0);var i=this.candidates[r];return r=(r+1)%this.candidates.length,n[e]=r,bt(i,t)}},Xt={parse:function(t,e){var n,r=this;this.branches=[],this.elseTemplates=[];var i=this.liquid.parser.parseStream(e).on("start",function(){return r.branches.push({cond:t.args,templates:n=[]})}).on("tag:elsif",function(t){r.branches.push({cond:t.args,templates:n=[]})}).on("tag:else",function(){return n=r.elseTemplates}).on("tag:endif",function(){return i.stop()}).on("template",function(t){return n.push(t)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")});i.start()},render:function(t){for(var e=0,n=this.branches;e<n.length;e++){var r=n[e];if(Tt(yt(r.cond,t)))return this.liquid.renderer.renderTemplates(r.templates,t)}return this.liquid.renderer.renderTemplates(this.elseTemplates,t)}},Kt={parse:function(t){var e=t.args.match(J);R(e,"illegal identifier "+t.args),this.variable=e[0]},render:function(t){var e=t.findContextFor(this.variable,function(t){return!(t instanceof P||t instanceof D)});e||(e=new N,t.unshift(e)),"number"!=typeof e[this.variable]&&(e[this.variable]=0);var n=e[this.variable];return e[this.variable]++,n}},Qt=/\S+/,Zt={parse:function(t,e){var n=Qt.exec(t.args);n&&(this.staticLayout=n[0]),(n=nt.exec(t.args))&&(this.layout=n[0]),this.tpls=this.liquid.parser.parse(e)},render:function(o,s){return h(this,void 0,void 0,function(){var e,n,r,i;return d(this,function(t){switch(t.label){case 0:return R(e=o.opts.dynamicPartials?bt(this.layout,o):this.staticLayout,"cannot apply layout with empty filename"),o.blockMode=F.STORE,[4,this.liquid.renderer.renderTemplates(this.tpls,o)];case 1:return n=t.sent(),void 0===o.blocks[""]&&(o.blocks[""]=n),[4,this.liquid.getTemplate(e,o.opts)];case 2:return r=t.sent(),o.push(s),o.blockMode=F.OUTPUT,[4,this.liquid.renderer.renderTemplates(r,o)];case 3:return i=t.sent(),o.pop(s),[2,i]}})})}},te={parse:function(t,e){var n=this,r=/\w+/.exec(t.args);this.block=r?r[0]:"",this.tpls=[];var i=this.liquid.parser.parseStream(e).on("tag:endblock",function(){return i.stop()}).on("template",function(t){return n.tpls.push(t)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")});i.start()},render:function(i){return h(this,void 0,void 0,function(){var e,n,r;return d(this,function(t){switch(t.label){case 0:return void 0===(e=i.blocks[this.block])?[3,1]:(r=e,[3,3]);case 1:return[4,this.liquid.renderer.renderTemplates(this.tpls,i)];case 2:r=t.sent(),t.label=3;case 3:return n=r,i.blockMode===F.STORE?(i.blocks[this.block]=n,[2,""]):[2,n]}})})}},ee={parse:function(t,e){var n=this;this.tokens=[];var r=this.liquid.parser.parseStream(e);r.on("token",function(t){"endraw"===t.name?r.stop():n.tokens.push(t)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")}),r.start()},render:function(){return this.tokens.map(function(t){return t.raw}).join("")}},ne=new RegExp("^("+J.source+")\\s+in\\s+("+nt.source+")(?:\\s+"+rt.source+")*$"),re={assign:Pt,for:jt,capture:Ht,case:zt,comment:Ct,include:Gt,decrement:Bt,increment:Kt,cycle:Jt,if:Xt,layout:Zt,block:te,raw:ee,tablerow:{parse:function(t,e){var n,r=this,i=ne.exec(t.args);R(i,"illegal tag: "+t.raw),this.variable=i[1],this.collection=i[2],this.templates=[];var o=this.liquid.parser.parseStream(e).on("start",function(){return n=r.templates}).on("tag:endtablerow",function(){return o.stop()}).on("template",function(t){return n.push(t)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")});o.start()},render:function(c,l){return h(this,void 0,void 0,function(){var e,n,r,o,i,s,u,a=this;return d(this,function(t){switch(t.label){case 0:return e=yt(this.collection,c)||[],n=l.offset||0,r=void 0===l.limit?e.length:l.limit,e=e.slice(n,n+r),o=l.cols||e.length,i=e.map(function(t){var e={};return e[a.variable]=t,e}),s=0,u="",[4,Dt(i,function(r,i){return h(a,void 0,void 0,function(){var e,n;return d(this,function(t){switch(t.label){case 0:return s=Math.floor(i/o)+1,1===(e=i%o+1)&&(1!==s&&(u+="</tr>"),u+='<tr class="row'+s+'">'),u+='<td class="col'+e+'">',c.push(r),n=u,[4,this.liquid.renderer.renderTemplates(this.templates,c)];case 1:return u=n+t.sent(),u+="</td>",c.pop(r),[2,u]}})})})];case 1:return t.sent(),0<s&&(u+="</tr>"),[2,u]}})})}},unless:{parse:function(t,e){var n,r=this;this.templates=[],this.elseTemplates=[];var i=this.liquid.parser.parseStream(e).on("start",function(){n=r.templates,r.cond=t.args}).on("tag:else",function(){return n=r.elseTemplates}).on("tag:endunless",function(){return i.stop()}).on("template",function(t){return n.push(t)}).on("end",function(){throw new Error("tag "+t.raw+" not closed")});i.start()},render:function(t){return Et(yt(this.cond,t))?this.liquid.renderer.renderTemplates(this.templates,t):this.liquid.renderer.renderTemplates(this.elseTemplates,t)}},break:{render:function(){return h(this,void 0,void 0,function(){return d(this,function(t){throw new k("break")})})}},continue:{render:function(){return h(this,void 0,void 0,function(){return d(this,function(t){throw new k("continue")})})}}},ie={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&#34;","'":"&#39;"},oe={"&amp;":"&","&lt;":"<","&gt;":">","&#34;":'"',"&#39;":"'"};function se(t){return String(t).replace(/&|<|>|"|'/g,function(t){return ie[t]})}var ue={escape:se,escape_once:function(t){return se(String(t).replace(/&(amp|lt|gt|#34|#39);/g,function(t){return oe[t]}))},newline_to_br:function(t){return t.replace(/\n/g,"<br />")},strip_html:function(t){return t.replace(/<script.*?<\/script>|<!--.*?-->|<style.*?<\/style>|<.*?>/g,"")}},ae={append:function(t,e){return t+e},prepend:function(t,e){return e+t},capitalize:function(t){return String(t).charAt(0).toUpperCase()+t.slice(1)},lstrip:function(t){return String(t).replace(/^\s+/,"")},downcase:function(t){return t.toLowerCase()},upcase:function(t){return String(t).toUpperCase()},remove:function(t,e){return t.split(e).join("")},remove_first:function(t,e){return t.replace(e,"")},replace:function(t,e,n){return String(t).split(e).join(n)},replace_first:function(t,e,n){return String(t).replace(e,n)},rstrip:function(t){return String(t).replace(/\s+$/,"")},split:function(t,e){return String(t).split(e)},strip:function(t){return String(t).trim()},strip_newlines:function(t){return String(t).replace(/\n/g,"")},truncate:function(t,e,n){return void 0===e&&(e=50),void 0===n&&(n="..."),(t=String(t)).length<=e?t:t.substr(0,e-n.length)+n},truncatewords:function(t,e,n){void 0===e&&(e=15),void 0===n&&(n="...");var r=t.split(/\s+/),i=r.slice(0,e).join(" ");return r.length>=e&&(i+=n),i}},ce={abs:function(t){return Math.abs(t)},ceil:function(t){return Math.ceil(t)},divided_by:function(t,e){return t/e},floor:function(t){return Math.floor(t)},minus:function(t,e){return t-e},modulo:function(t,e){return t%e},round:function(t,e){void 0===e&&(e=0);var n=Math.pow(10,e);return Math.round(t*n)/n},plus:function(t,e){return Number(t)+Number(e)},times:function(t,e){return t*e}},le={url_decode:function(t){return t.split("+").map(decodeURIComponent).join(" ")},url_encode:function(t){return t.split(" ").map(encodeURIComponent).join("+")}},fe={join:function(t,e){return t.join(void 0===e?" ":e)},last:function(t){return g(t)},first:function(t){return t[0]},map:function(t,e){return t.map(function(t){return t[e]})},reverse:function(t){return t.reverse()},sort:function(t,e){return t.sort(e)},size:function(t){return t.length},concat:function(t,e){return Array.prototype.concat.call(t,e)},slice:function(t,e,n){return void 0===n&&(n=1),t.slice(e,e+n)},uniq:function(t){var e={};return(t||[]).filter(function(t){return!e.hasOwnProperty(String(t))&&(e[String(t)]=!0)})}},pe=["January","February","March","April","May","June","July","August","September","October","November","December"],he=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],de=pe.map(me),ge=he.map(me),ve={1:"st",2:"nd",3:"rd",default:"th"};function me(t){return t.slice(0,3)}var ye={daysInMonth:function(t){return[31,ye.isLeapYear(t)?29:28,31,30,31,30,31,31,30,31,30,31]},getDayOfYear:function(t){for(var e=0,n=0;n<t.getMonth();++n)e+=ye.daysInMonth(t)[n];return e+t.getDate()},getWeekOfYear:function(t,e){var n=this.getDayOfYear(t)+(e-t.getDay()),r=7-new Date(t.getFullYear(),0,1).getDay()+e;return w(String(Math.floor((n-r)/7)+1),2,"0")},isLeapYear:function(t){var e=t.getFullYear();return!(0!=(3&e)||!(e%100||e%400==0&&e))},getSuffix:function(t){var e=t.getDate().toString(),n=parseInt(e.slice(-1));return ve[n]||ve.default},century:function(t){return parseInt(t.getFullYear().toString().substring(0,2),10)}},we={a:function(t){return ge[t.getDay()]},A:function(t){return he[t.getDay()]},b:function(t){return de[t.getMonth()]},B:function(t){return pe[t.getMonth()]},c:function(t){return t.toLocaleString()},C:function(t){return ye.century(t)},d:function(t){return w(t.getDate(),2,"0")},e:function(t){return w(t.getDate(),2)},H:function(t){return w(t.getHours(),2,"0")},I:function(t){return w(String(t.getHours()%12||12),2,"0")},j:function(t){return w(ye.getDayOfYear(t),3,"0")},k:function(t){return w(t.getHours(),2)},l:function(t){return w(String(t.getHours()%12||12),2)},L:function(t){return w(t.getMilliseconds(),3,"0")},m:function(t){return w(t.getMonth()+1,2,"0")},M:function(t){return w(t.getMinutes(),2,"0")},p:function(t){return t.getHours()<12?"AM":"PM"},P:function(t){return t.getHours()<12?"am":"pm"},q:function(t){return ye.getSuffix(t)},s:function(t){return Math.round(t.valueOf()/1e3)},S:function(t){return w(t.getSeconds(),2,"0")},u:function(t){return t.getDay()||7},U:function(t){return ye.getWeekOfYear(t,0)},w:function(t){return t.getDay()},W:function(t){return ye.getWeekOfYear(t,1)},x:function(t){return t.toLocaleDateString()},X:function(t){return t.toLocaleTimeString()},y:function(t){return t.getFullYear().toString().substring(2,4)},Y:function(t){return t.getFullYear()},z:function(t){var e=t.getTimezoneOffset()/60*100;return(0<e?"-":"+")+w(String(Math.abs(e)),4,"0")},"%":function(){return"%"}};we.h=we.b,we.N=we.L;var be=v({},ue,ae,ce,le,{date:function(t,e){var n,r=t;return"now"===t?r=new Date:l(t)&&(r=new Date(t)),(n=r)instanceof Date&&!isNaN(n.getTime())?function(t,e){for(var n="",r=e;;){var i=/%./g,o=i.exec(r);if(!o)return n+r;n+=r.slice(0,i.lastIndex-2),r=r.slice(i.lastIndex);var s=o[0].charAt(1),u=we[s];n+=u?u(t):"%"+s}}(r,e):t}},{default:function(t,e){return Tt(t)?t:e}},fe);return function(){function e(t){void 0===t&&(t={});var n=this;this.cache={},this.options=_(L(t)),this.parser=new At(this),this.renderer=new pt,this.tokenizer=new ft(this.options),p(re,function(t,e){return n.registerTag(e,t)}),p(be,function(t,e){return n.registerFilter(e,t)})}return e.prototype.parse=function(t,e){var n=this.tokenizer.tokenize(t,e);return this.parser.parse(n)},e.prototype.render=function(t,e,n){var r=v({},this.options,L(n)),i=new A(e,r);return this.renderer.renderTemplates(t,i)},e.prototype.parseAndRender=function(n,r,i){return h(this,void 0,void 0,function(){var e;return d(this,function(t){switch(t.label){case 0:return[4,this.parse(n)];case 1:return e=t.sent(),[2,this.render(e,r,i)]}})})},e.prototype.getTemplate=function(f,p){return h(this,void 0,void 0,function(){var e,n,r,i,o,s,u,a,c,l=this;return d(this,function(t){switch(t.label){case 0:e=L(p),n=e.root?e.root.concat(this.options.root):this.options.root,r=n.map(function(t){return H.resolve(t,f,l.options.extname)}),i=0,o=r,t.label=1;case 1:return i<o.length?(s=o[i],[4,H.exists(s)]):[3,5];case 2:return t.sent()?this.options.cache&&this.cache[s]?[2,this.cache[s]]:(a=this.parse,[4,H.readFile(s)]):[3,4];case 3:return u=a.apply(this,[t.sent(),s]),this.options.cache&&(this.cache[s]=u),[2,u];case 4:return i++,[3,1];case 5:throw(c=new Error("ENOENT")).message='ENOENT: Failed to lookup "'+f+'" in "'+n+'"',c.code="ENOENT",c}})})},e.prototype.renderFile=function(r,i,o){return h(this,void 0,void 0,function(){var e,n;return d(this,function(t){switch(t.label){case 0:return e=L(o),[4,this.getTemplate(r,e)];case 1:return n=t.sent(),[2,this.render(n,i,o)]}})})},e.prototype.evalValue=function(t,e){return new Lt(t,this.options.strictFilters).value(e)},e.prototype.registerFilter=function(t,e){return Ot.register(t,e)},e.prototype.registerTag=function(t,e){return St.register(t,e)},e.prototype.plugin=function(t){return t.call(this,e)},e.prototype.express=function(){var i=this;return function(t,e,n){var r={root:this.root};i.renderFile(t,e,r).then(function(t){return n(null,t)},n)}},(e.default=e).isTruthy=Tt,e.isFalsy=Et,e.evalExp=yt,e.evalValue=bt,e.Types=U,e}()});
//# sourceMappingURL=liquid.min.js.map
export { AssignScope, CaptureScope, IncrementScope, DecrementScope } from './scope/scopes';
export { ParseError, TokenizationError, RenderBreakError, AssertionError } from './util/error';
export { Drop } from './drop/drop';

@@ -6,2 +6,3 @@ export declare function isString(value: any): value is string;

export declare function stringify(value: any): string;
export declare function toLiquid(value: any): any;
export declare function create<T1 extends object, T2 extends T1 = T1>(proto: T1): T2;

@@ -20,3 +21,3 @@ export declare function isNil(value: any): boolean;

export declare function isObject(value: any): value is object;
export declare function range(start: number, stop?: number, step?: number): number[];
export declare function range(start: number, stop: number, step?: number): number[];
export declare function padStart(str: any, length: number, ch?: string): any;
{
"name": "liquidjs",
"version": "7.3.1",
"version": "7.4.0",
"description": "Liquid template engine by pure JavaScript: compatible to shopify, easy to extend.",

@@ -14,3 +14,3 @@ "main": "dist/liquid.common.js",

"test": "npm run build && mocha 'test/**/*.ts'",
"benchmark": "ts-node --require tsconfig-paths/register benchmark",
"benchmark": "ts-node benchmark",
"coverage-html": "nyc --reporter=html mocha 'test/{unit,integration}/**/*.ts'",

@@ -17,0 +17,0 @@ "coverage-coveralls": "nyc mocha 'test/{unit,integration}/**/*.ts' && nyc report --reporter=text-lcov | coveralls",

@@ -27,7 +27,7 @@ # liquidjs

* Dynamic file locating (enabled by default), which means layout/partial name can be an variable in liquidjs. See [#51](https://github.com/harttle/liquidjs/issues/51).
* Dynamic file locating (enabled by default), that means layout/partial names are treated as variables in liquidjs. See [#51](https://github.com/harttle/liquidjs/issues/51).
* Truthy and Falsy. All values except `undefined`, `null`, `false` are truthy, whereas in Ruby Liquid all except `nil` and `false` are truthy. See [#26](https://github.com/harttle/liquidjs/pull/26).
* Number Rendering. Since JavaScript do not distinguish `float` and `integer`, we cannot either convert between them nor render regarding to their type. See [#59](https://github.com/harttle/liquidjs/issues/59).
* [.to_liquid()](https://github.com/Shopify/liquid/wiki/Introduction-to-Drops) has a `.toLiquid()` alias and and the JavaScript `.toString()` is aliased to `.to_s()`.
* [.to_s()](https://www.rubydoc.info/gems/liquid/Liquid/Drop) uses `JSON.prototype.stringify` as default, rather than Ruby's inspect.
* [.to_liquid()](https://github.com/Shopify/liquid/wiki/Introduction-to-Drops) is replaced by `.toLiquid()`
* [.to_s()](https://www.rubydoc.info/gems/liquid/Liquid/Drop) is replaced by JavaScript `.toString()`

@@ -186,21 +186,21 @@ ## TOC

* `strict_filters` is used to enable strict filter existence. If set to `false`, undefined filters will be rendered as empty string. Otherwise, undefined filters will cause an exception. Defaults to `false`.
* `strictFilters` is used to enable strict filter existence. If set to `false`, undefined filters will be rendered as empty string. Otherwise, undefined filters will cause an exception. Defaults to `false`.
* `strict_variables` is used to enable strict variable derivation.
* `strictVariables` is used to enable strict variable derivation.
If set to `false`, undefined variables will be rendered as empty string.
Otherwise, undefined variables will cause an exception. Defaults to `false`.
* `trim_tag_right` is used to strip blank characters (including ` `, `\t`, and `\r`) from the right of tags (`{% %}`) until `\n` (inclusive). Defaults to `false`.
* `trimTagRight` is used to strip blank characters (including ` `, `\t`, and `\r`) from the right of tags (`{% %}`) until `\n` (inclusive). Defaults to `false`.
* `trim_tag_left` is similiar to `trim_tag_right`, whereas the `\n` is exclusive. Defaults to `false`. See [Whitespace Control][whitespace control] for details.
* `trimTagLeft` is similiar to `trimTagRight`, whereas the `\n` is exclusive. Defaults to `false`. See [Whitespace Control][whitespace control] for details.
* `trim_output_right` is used to strip blank characters (including ` `, `\t`, and `\r`) from the right of values (`{{ }}`) until `\n` (inclusive). Defaults to `false`.
* `trimOutputRight` is used to strip blank characters (including ` `, `\t`, and `\r`) from the right of values (`{{ }}`) until `\n` (inclusive). Defaults to `false`.
* `trim_output_left` is similiar to `trim_output_right`, whereas the `\n` is exclusive. Defaults to `false`. See [Whitespace Control][whitespace control] for details.
* `trimOutputLeft` is similiar to `trimOutputRight`, whereas the `\n` is exclusive. Defaults to `false`. See [Whitespace Control][whitespace control] for details.
* `tag_delimiter_left` and `tag_delimiter_right` are used to override the delimiter for liquid tags.
* `tagDelimiterLeft` and `tagDelimiterRight` are used to override the delimiter for liquid tags.
* `output_delimiter_left` and `output_delimiter_right` are used to override the delimiter for liquid outputs.
* `outputDelimiterLeft` and `outputDelimiterRight` are used to override the delimiter for liquid outputs.
* `greedy` is used to specify whether `trim_left`/`trim_right` is greedy. When set to `true`, all consecutive blank characters including `\n` will be trimed regardless of line breaks. Defaults to `true`.
* `greedy` is used to specify whether `trim*Left`/`trim*Right` is greedy. When set to `true`, all consecutive blank characters including `\n` will be trimed regardless of line breaks. Defaults to `true`.

@@ -207,0 +207,0 @@ ## Register Filters

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc