1 line
247 KiB
Plaintext
1 line
247 KiB
Plaintext
{"version":3,"file":"liquid.browser.min.js","sources":["../src/tokens/token.ts","../src/drop/drop.ts","../src/util/underscore.ts","../src/util/error.ts","../src/util/character.ts","../src/util/assert.ts","../src/drop/null-drop.ts","../src/drop/empty-drop.ts","../src/drop/blank-drop.ts","../src/drop/forloop-drop.ts","../src/drop/block-drop.ts","../src/drop/comparable.ts","../src/util/literal.ts","../src/util/operator-trie.ts","../src/util/async.ts","../src/util/strftime.ts","../src/util/timezone-date.ts","../src/tokens/delimited-token.ts","../src/tokens/tag-token.ts","../src/tokens/output-token.ts","../src/tokens/html-token.ts","../src/tokens/number-token.ts","../src/tokens/identifier-token.ts","../src/tokens/literal-token.ts","../src/tokens/operator-token.ts","../src/tokens/property-access-token.ts","../src/tokens/filter-token.ts","../src/tokens/hash-token.ts","../src/render/string.ts","../src/tokens/quoted-token.ts","../src/tokens/range-token.ts","../src/tokens/liquid-tag-token.ts","../src/tokens/filtered-value-token.ts","../src/emitters/simple-emitter.ts","../src/build/streamed-emitter-browser.ts","../src/emitters/keeping-type-emitter.ts","../src/render/render.ts","../src/render/expression.ts","../src/render/boolean.ts","../src/render/operator.ts","../src/cache/lru.ts","../src/build/fs-impl-browser.ts","../src/filters/misc.ts","../src/filters/html.ts","../src/liquid-options.ts","../src/parser/whitespace-ctrl.ts","../src/parser/tokenizer.ts","../src/parser/parse-stream.ts","../src/template/template-impl.ts","../src/template/tag.ts","../src/template/hash.ts","../src/template/filter.ts","../src/parser/filter-arg.ts","../src/template/value.ts","../src/template/output.ts","../src/template/html.ts","../src/fs/loader.ts","../src/parser/parser.ts","../src/util/type-guards.ts","../src/parser/token-kind.ts","../src/context/block-mode.ts","../src/context/context.ts","../src/filters/math.ts","../src/filters/url.ts","../src/filters/array.ts","../src/filters/date.ts","../src/filters/string.ts","../src/filters/index.ts","../src/tags/assign.ts","../src/tags/for.ts","../src/tags/capture.ts","../src/tags/case.ts","../src/tags/comment.ts","../src/tags/render.ts","../src/tags/include.ts","../src/tags/decrement.ts","../src/tags/cycle.ts","../src/tags/if.ts","../src/tags/increment.ts","../src/tags/layout.ts","../src/tags/block.ts","../src/tags/raw.ts","../src/drop/tablerowloop-drop.ts","../src/tags/tablerow.ts","../src/tags/unless.ts","../src/tags/break.ts","../src/tags/continue.ts","../src/tags/echo.ts","../src/tags/liquid.ts","../src/tags/inline-comment.ts","../src/tags/index.ts","../src/liquid.ts","../src/template/tag-options-adapter.ts","../src/index.ts"],"sourcesContent":["import { TokenKind } from '../parser'\n\nexport abstract class Token {\n public constructor (\n public kind: TokenKind,\n public input: string,\n public begin: number,\n public end: number,\n public file?: string\n ) {}\n public getText () {\n return this.input.slice(this.begin, this.end)\n }\n public getPosition () {\n let [row, col] = [1, 1]\n for (let i = 0; i < this.begin; i++) {\n if (this.input[i] === '\\n') {\n row++\n col = 1\n } else col++\n }\n return [row, col]\n }\n public size () {\n return this.end - this.begin\n }\n}\n","export abstract class Drop {\n public liquidMethodMissing (key: string | number): Promise<any> | any {\n return undefined\n }\n}\n","import { Drop } from '../drop/drop'\n\nexport const toString = Object.prototype.toString\nconst toLowerCase = String.prototype.toLowerCase\n\nexport const hasOwnProperty = Object.hasOwnProperty\n\nexport function isString (value: any): value is string {\n return typeof value === 'string'\n}\n\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function isFunction (value: any): value is Function {\n return typeof value === 'function'\n}\n\nexport function isPromise<T> (val: any): val is Promise<T> {\n return val && isFunction(val.then)\n}\n\nexport function isIterator (val: any): val is IterableIterator<any> {\n return val && isFunction(val.next) && isFunction(val.throw) && isFunction(val.return)\n}\n\nexport function escapeRegex (str: string) {\n return str.replace(/[-/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&')\n}\n\nexport function promisify<T1, T2> (fn: (arg1: T1, cb: (err: Error | null, result: T2) => void) => void): (arg1: T1) => Promise<T2>;\nexport function promisify<T1, T2, T3> (fn: (arg1: T1, arg2: T2, cb: (err: Error | null, result: T3) => void) => void): (arg1: T1, arg2: T2) => Promise<T3>;\nexport function promisify (fn: any) {\n return function (...args: any[]) {\n return new Promise((resolve, reject) => {\n fn(...args, (err: Error, result: any) => {\n err ? reject(err) : resolve(result)\n })\n })\n }\n}\n\nexport function stringify (value: any): string {\n value = toValue(value)\n if (isString(value)) return value\n if (isNil(value)) return ''\n if (isArray(value)) return value.map(x => stringify(x)).join('')\n return String(value)\n}\n\nexport function toEnumerable<T = unknown> (val: any): T[] {\n val = toValue(val)\n if (isArray(val)) return val\n if (isString(val) && val.length > 0) return [val] as unknown as T[]\n if (isIterable(val)) return Array.from(val)\n if (isObject(val)) return Object.keys(val).map((key) => [key, val[key]]) as unknown as T[]\n return []\n}\n\nexport function toArray (val: any) {\n val = toValue(val)\n if (isNil(val)) return []\n if (isArray(val)) return val\n return [ val ]\n}\n\nexport function toValue (value: any): any {\n return (value instanceof Drop && isFunction(value.valueOf)) ? value.valueOf() : value\n}\n\nexport function isNumber (value: any): value is number {\n return typeof value === 'number'\n}\n\nexport function toLiquid (value: any): any {\n if (value && isFunction(value.toLiquid)) return toLiquid(value.toLiquid())\n return value\n}\n\nexport function isNil (value: any): boolean {\n return value == null\n}\n\nexport function isUndefined (value: any): boolean {\n return value === undefined\n}\n\nexport function isArray (value: any): value is any[] {\n // be compatible with IE 8\n return toString.call(value) === '[object Array]'\n}\n\nexport function isIterable (value: any): value is Iterable<any> {\n return isObject(value) && Symbol.iterator in value\n}\n\n/*\n * Iterates over own enumerable string keyed properties of an object and invokes iteratee for each property.\n * The iteratee is invoked with three arguments: (value, key, object).\n * Iteratee functions may exit iteration early by explicitly returning false.\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @return {Object} Returns object.\n */\nexport function forOwn <T> (\n obj: Record<string, T> | undefined,\n iteratee: ((val: T, key: string, obj: {[key: string]: T}) => boolean | void)\n) {\n obj = obj || {}\n for (const k in obj) {\n if (hasOwnProperty.call(obj, k)) {\n if (iteratee(obj[k], k, obj) === false) break\n }\n }\n return obj\n}\n\nexport function last <T>(arr: T[]): T;\nexport function last (arr: string): string;\nexport function last (arr: any[] | string): any | string {\n return arr[arr.length - 1]\n}\n\n/*\n * Checks if value is the language type of Object.\n * (e.g. arrays, functions, objects, regexes, new Number(0), and new String(''))\n * @param {any} value The value to check.\n * @return {Boolean} Returns true if value is an object, else false.\n */\nexport function isObject (value: any): value is object {\n const type = typeof value\n return value !== null && (type === 'object' || type === 'function')\n}\n\nexport function range (start: number, stop: number, step = 1) {\n const arr: number[] = []\n for (let i = start; i < stop; i += step) {\n arr.push(i)\n }\n return arr\n}\n\nexport function padStart (str: any, length: number, ch = ' ') {\n return pad(str, length, ch, (str, ch) => ch + str)\n}\n\nexport function padEnd (str: any, length: number, ch = ' ') {\n return pad(str, length, ch, (str, ch) => str + ch)\n}\n\nexport function pad (str: any, length: number, ch: string, add: (str: string, ch: string) => string) {\n str = String(str)\n let n = length - str.length\n while (n-- > 0) str = add(str, ch)\n return str\n}\n\nexport function identify<T> (val: T): T {\n return val\n}\n\nexport function changeCase (str: string): string {\n const hasLowerCase = [...str].some(ch => ch >= 'a' && ch <= 'z')\n return hasLowerCase ? str.toUpperCase() : str.toLowerCase()\n}\n\nexport function ellipsis (str: string, N: number): string {\n return str.length > N ? str.slice(0, N - 3) + '...' : str\n}\n\n// compare string in case-insensitive way, undefined values to the tail\nexport function caseInsensitiveCompare (a: any, b: any) {\n if (a == null && b == null) return 0\n if (a == null) return 1\n if (b == null) return -1\n a = toLowerCase.call(a)\n b = toLowerCase.call(b)\n if (a < b) return -1\n if (a > b) return 1\n return 0\n}\n\nexport function argumentsToValue<F extends (...args: any) => any> (fn: F) {\n return (...args: Parameters<F>) => fn(...args.map(toValue))\n}\n\nexport function escapeRegExp (text: string) {\n return text.replace(/[-[\\]{}()*+?.,\\\\^$|#\\s]/g, '\\\\$&')\n}\n","import * as _ from './underscore'\nimport { Token } from '../tokens/token'\nimport { Template } from '../template/template'\n\n/**\n * targeting ES5, extends Error won't create a proper prototype chain, need a trait to keep track of classes\n */\nconst TRAIT = '__liquidClass__'\n\nexport abstract class LiquidError extends Error {\n public token!: Token\n public context = ''\n private originalError?: Error\n public constructor (err: Error | string, token: Token) {\n /**\n * note: for ES5 targeting, `this` will be replaced by return value of Error(),\n * thus everything on `this` will be lost, avoid calling `LiquidError` methods here\n */\n super(typeof err === 'string' ? err : err.message)\n if (typeof err !== 'string') Object.defineProperty(this, 'originalError', { value: err, enumerable: false })\n Object.defineProperty(this, 'token', { value: token, enumerable: false })\n Object.defineProperty(this, TRAIT, { value: 'LiquidError', enumerable: false })\n }\n protected update () {\n Object.defineProperty(this, 'context', { value: mkContext(this.token), enumerable: false })\n this.message = mkMessage(this.message, this.token)\n this.stack = this.message + '\\n' + this.context +\n '\\n' + this.stack\n if (this.originalError) this.stack += '\\nFrom ' + this.originalError.stack\n }\n static is (obj: unknown): obj is LiquidError {\n return obj?.[TRAIT] === 'LiquidError'\n }\n}\n\nexport class TokenizationError extends LiquidError {\n public constructor (message: string, token: Token) {\n super(message, token)\n this.name = 'TokenizationError'\n super.update()\n }\n}\n\nexport class ParseError extends LiquidError {\n public constructor (err: Error, token: Token) {\n super(err, token)\n this.name = 'ParseError'\n this.message = err.message\n super.update()\n }\n}\n\nexport class RenderError extends LiquidError {\n public constructor (err: Error, tpl: Template) {\n super(err, tpl.token)\n this.name = 'RenderError'\n this.message = err.message\n super.update()\n }\n public static is (obj: any): obj is RenderError {\n return obj.name === 'RenderError'\n }\n}\n\nexport class LiquidErrors extends LiquidError {\n public constructor (public errors: RenderError[]) {\n super(errors[0], errors[0].token)\n this.name = 'LiquidErrors'\n const s = errors.length > 1 ? 's' : ''\n this.message = `${errors.length} error${s} found`\n super.update()\n }\n public static is (obj: any): obj is LiquidErrors {\n return obj.name === 'LiquidErrors'\n }\n}\n\nexport class UndefinedVariableError extends LiquidError {\n public constructor (err: Error, token: Token) {\n super(err, token)\n this.name = 'UndefinedVariableError'\n this.message = err.message\n super.update()\n }\n}\n\n// only used internally; raised where we don't have token information,\n// so it can't be an UndefinedVariableError.\nexport class InternalUndefinedVariableError extends Error {\n variableName: string\n\n public constructor (variableName: string) {\n super(`undefined variable: ${variableName}`)\n this.name = 'InternalUndefinedVariableError'\n this.variableName = variableName\n }\n}\n\nexport class AssertionError extends Error {\n public constructor (message: string) {\n super(message)\n this.name = 'AssertionError'\n this.message = message + ''\n }\n}\n\nfunction mkContext (token: Token) {\n const [line, col] = token.getPosition()\n const lines = token.input.split('\\n')\n const begin = Math.max(line - 2, 1)\n const end = Math.min(line + 3, lines.length)\n\n const context = _\n .range(begin, end + 1)\n .map(lineNumber => {\n const rowIndicator = (lineNumber === line) ? '>> ' : ' '\n const num = _.padStart(String(lineNumber), String(end).length)\n let text = `${rowIndicator}${num}| `\n\n const colIndicator = lineNumber === line\n ? '\\n' + _.padStart('^', col + text.length)\n : ''\n\n text += lines[lineNumber - 1]\n text += colIndicator\n return text\n })\n .join('\\n')\n\n return context\n}\n\nfunction mkMessage (msg: string, token: Token) {\n if (token.file) msg += `, file:${token.file}`\n const [line, col] = token.getPosition()\n msg += `, line:${line}, col:${col}`\n return msg\n}\n","// **DO NOT CHANGE THIS FILE**\n//\n// This file is generated by bin/character-gen.js\n// bitmask character types to boost performance\nexport const TYPES = [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]\nexport const WORD = 1\nexport const OPERATOR = 2\nexport const BLANK = 4\nexport const QUOTE = 8\nexport const INLINE_BLANK = 16\nexport const NUMBER = 32\nexport const SIGN = 64\nexport const PUNCTUATION = 128\n\nexport function isWord (char: string): boolean {\n const code = char.charCodeAt(0)\n return code >= 128 ? !TYPES[code] : !!(TYPES[code] & WORD)\n}\nTYPES[160] = TYPES[5760] = TYPES[6158] = TYPES[8192] = TYPES[8193] = TYPES[8194] = TYPES[8195] = TYPES[8196] = TYPES[8197] = TYPES[8198] = TYPES[8199] = TYPES[8200] = TYPES[8201] = TYPES[8202] = TYPES[8232] = TYPES[8233] = TYPES[8239] = TYPES[8287] = TYPES[12288] = BLANK\nTYPES[8220] = TYPES[8221] = PUNCTUATION\n","import { AssertionError } from './error'\n\nexport function assert <T> (predicate: T | null | undefined, message?: string | (() => string)) {\n if (!predicate) {\n const msg = typeof message === 'function'\n ? message()\n : (message || `expect ${predicate} to be true`)\n throw new AssertionError(msg)\n }\n}\n","import { Drop } from './drop'\nimport { Comparable } from './comparable'\nimport { isNil, toValue } from '../util'\n\nexport class NullDrop extends Drop implements Comparable {\n public equals (value: any) {\n return isNil(toValue(value))\n }\n public gt () {\n return false\n }\n public geq () {\n return false\n }\n public lt () {\n return false\n }\n public leq () {\n return false\n }\n public valueOf () {\n return null\n }\n}\n","import { Drop } from './drop'\nimport { Comparable } from './comparable'\nimport { isObject, isString, isArray, toValue } from '../util'\n\nexport class EmptyDrop extends Drop implements Comparable {\n public equals (value: any) {\n if (value instanceof EmptyDrop) return false\n value = toValue(value)\n if (isString(value) || isArray(value)) return value.length === 0\n if (isObject(value)) return Object.keys(value).length === 0\n return false\n }\n public gt () {\n return false\n }\n public geq () {\n return false\n }\n public lt () {\n return false\n }\n public leq () {\n return false\n }\n public valueOf () {\n return ''\n }\n}\n","import { isNil, isString, toValue } from '../util'\nimport { EmptyDrop } from '../drop'\n\nexport class BlankDrop extends EmptyDrop {\n public equals (value: any) {\n if (value === false) return true\n if (isNil(toValue(value))) return true\n if (isString(value)) return /^\\s*$/.test(value)\n return super.equals(value)\n }\n}\n","import { Drop } from './drop'\n\nexport class ForloopDrop extends Drop {\n protected i = 0\n public name: string\n public length: number\n public constructor (length: number, collection: string, variable: string) {\n super()\n this.length = length\n this.name = `${variable}-${collection}`\n }\n public next () {\n this.i++\n }\n public index0 () {\n return this.i\n }\n public index () {\n return this.i + 1\n }\n public first () {\n return this.i === 0\n }\n public last () {\n return this.i === this.length - 1\n }\n public rindex () {\n return this.length - this.i\n }\n public rindex0 () {\n return this.length - this.i - 1\n }\n public valueOf () {\n return JSON.stringify(this)\n }\n}\n","import { Drop } from './drop'\n\nexport class BlockDrop extends Drop {\n constructor (\n // the block render from layout template\n private superBlockRender: () => Iterable<any> = () => ''\n ) {\n super()\n }\n /**\n * Provide parent access in child block by\n * {{ block.super }}\n */\n public super () {\n return this.superBlockRender()\n }\n}\n","import { isFunction } from '../util'\n\nexport interface Comparable {\n equals: (rhs: any) => boolean;\n gt: (rhs: any) => boolean;\n geq: (rhs: any) => boolean;\n lt: (rhs: any) => boolean;\n leq: (rhs: any) => boolean;\n}\n\nexport function isComparable (arg: any): arg is Comparable {\n return (\n arg &&\n isFunction(arg.equals) &&\n isFunction(arg.gt) &&\n isFunction(arg.geq) &&\n isFunction(arg.lt) &&\n isFunction(arg.leq)\n )\n}\n","import { BlankDrop, EmptyDrop, NullDrop } from '../drop'\n\nconst nil = new NullDrop()\nexport const literalValues = {\n 'true': true,\n 'false': false,\n 'nil': nil,\n 'null': nil,\n 'empty': new EmptyDrop(),\n 'blank': new BlankDrop()\n}\n\nexport type LiteralKey = keyof typeof literalValues\nexport type LiteralValue = typeof literalValues[LiteralKey]\n","import { isWord } from '../util/character'\n\ninterface TrieInput<T> {\n [key: string]: T\n}\n\ninterface TrieLeafNode<T> {\n data: T;\n end: true;\n needBoundary?: true;\n}\n\nexport interface Trie<T> {\n [key: string]: Trie<T> | TrieLeafNode<T>;\n}\n\nexport type TrieNode<T> = Trie<T> | TrieLeafNode<T>\n\nexport function createTrie<T = any> (input: TrieInput<T>): Trie<T> {\n const trie: Trie<T> = {}\n for (const [name, data] of Object.entries(input)) {\n let node: Trie<T> | TrieLeafNode<T> = trie\n\n for (let i = 0; i < name.length; i++) {\n const c = name[i]\n node[c] = node[c] || {}\n\n if (i === name.length - 1 && isWord(name[i])) {\n node[c].needBoundary = true\n }\n\n node = node[c]\n }\n\n node.data = data\n node.end = true\n }\n return trie\n}\n","import { isPromise, isIterator } from './underscore'\n\n// convert an async iterator to a Promise\nexport async function toPromise<T> (val: Generator<unknown, T, unknown> | Promise<T> | T): Promise<T> {\n if (!isIterator(val)) return val\n let value: unknown\n let done = false\n let next = 'next'\n do {\n const state = val[next](value)\n done = state.done\n value = state.value\n next = 'next'\n try {\n if (isIterator(value)) value = toPromise(value)\n if (isPromise(value)) value = await value\n } catch (err) {\n next = 'throw'\n value = err\n }\n } while (!done)\n return value as T\n}\n\n// convert an async iterator to a value in a synchronous manner\nexport function toValueSync<T> (val: Generator<unknown, T, unknown> | T): T {\n if (!isIterator(val)) return val\n let value: any\n let done = false\n let next = 'next'\n do {\n const state = val[next](value)\n done = state.done\n value = state.value\n next = 'next'\n if (isIterator(value)) {\n try {\n value = toValueSync(value)\n } catch (err) {\n next = 'throw'\n value = err\n }\n }\n } while (!done)\n return value\n}\n","import { changeCase, padStart, padEnd } from './underscore'\nimport { LiquidDate } from './liquid-date'\n\nconst rFormat = /%([-_0^#:]+)?(\\d+)?([EO])?(.)/\nconst monthNames = [\n 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August',\n 'September', 'October', 'November', 'December'\n]\nconst dayNames = [\n 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'\n]\nconst monthNamesShort = monthNames.map(abbr)\nconst dayNamesShort = dayNames.map(abbr)\ninterface FormatOptions {\n flags: object;\n width?: string;\n modifier?: string;\n}\n\nfunction abbr (str: string) {\n return str.slice(0, 3)\n}\n\n// prototype extensions\nfunction daysInMonth (d: LiquidDate) {\n const feb = isLeapYear(d) ? 29 : 28\n return [31, feb, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]\n}\nfunction getDayOfYear (d: LiquidDate) {\n let num = 0\n for (let i = 0; i < d.getMonth(); ++i) {\n num += daysInMonth(d)[i]\n }\n return num + d.getDate()\n}\nfunction getWeekOfYear (d: LiquidDate, startDay: number) {\n // Skip to startDay of this week\n const now = getDayOfYear(d) + (startDay - d.getDay())\n // Find the first startDay of the year\n const jan1 = new Date(d.getFullYear(), 0, 1)\n const then = (7 - jan1.getDay() + startDay)\n return String(Math.floor((now - then) / 7) + 1)\n}\nfunction isLeapYear (d: LiquidDate) {\n const year = d.getFullYear()\n return !!((year & 3) === 0 && (year % 100 || (year % 400 === 0 && year)))\n}\nfunction ordinal (d: LiquidDate) {\n const date = d.getDate()\n if ([11, 12, 13].includes(date)) return 'th'\n\n switch (date % 10) {\n case 1: return 'st'\n case 2: return 'nd'\n case 3: return 'rd'\n default: return 'th'\n }\n}\nfunction century (d: LiquidDate) {\n return parseInt(d.getFullYear().toString().substring(0, 2), 10)\n}\n\n// default to 0\nconst padWidths = {\n d: 2,\n e: 2,\n H: 2,\n I: 2,\n j: 3,\n k: 2,\n l: 2,\n L: 3,\n m: 2,\n M: 2,\n S: 2,\n U: 2,\n W: 2\n}\n\n// default to '0'\nconst padChars = {\n a: ' ',\n A: ' ',\n b: ' ',\n B: ' ',\n c: ' ',\n e: ' ',\n k: ' ',\n l: ' ',\n p: ' ',\n P: ' '\n}\nfunction getTimezoneOffset (d: LiquidDate, opts: FormatOptions) {\n const nOffset = Math.abs(d.getTimezoneOffset())\n const h = Math.floor(nOffset / 60)\n const m = nOffset % 60\n return (d.getTimezoneOffset() > 0 ? '-' : '+') +\n padStart(h, 2, '0') +\n (opts.flags[':'] ? ':' : '') +\n padStart(m, 2, '0')\n}\nconst formatCodes = {\n a: (d: LiquidDate) => dayNamesShort[d.getDay()],\n A: (d: LiquidDate) => dayNames[d.getDay()],\n b: (d: LiquidDate) => monthNamesShort[d.getMonth()],\n B: (d: LiquidDate) => monthNames[d.getMonth()],\n c: (d: LiquidDate) => d.toLocaleString(),\n C: (d: LiquidDate) => century(d),\n d: (d: LiquidDate) => d.getDate(),\n e: (d: LiquidDate) => d.getDate(),\n H: (d: LiquidDate) => d.getHours(),\n I: (d: LiquidDate) => String(d.getHours() % 12 || 12),\n j: (d: LiquidDate) => getDayOfYear(d),\n k: (d: LiquidDate) => d.getHours(),\n l: (d: LiquidDate) => String(d.getHours() % 12 || 12),\n L: (d: LiquidDate) => d.getMilliseconds(),\n m: (d: LiquidDate) => d.getMonth() + 1,\n M: (d: LiquidDate) => d.getMinutes(),\n N: (d: LiquidDate, opts: FormatOptions) => {\n const width = Number(opts.width) || 9\n const str = String(d.getMilliseconds()).slice(0, width)\n return padEnd(str, width, '0')\n },\n p: (d: LiquidDate) => (d.getHours() < 12 ? 'AM' : 'PM'),\n P: (d: LiquidDate) => (d.getHours() < 12 ? 'am' : 'pm'),\n q: (d: LiquidDate) => ordinal(d),\n s: (d: LiquidDate) => Math.round(d.getTime() / 1000),\n S: (d: LiquidDate) => d.getSeconds(),\n u: (d: LiquidDate) => d.getDay() || 7,\n U: (d: LiquidDate) => getWeekOfYear(d, 0),\n w: (d: LiquidDate) => d.getDay(),\n W: (d: LiquidDate) => getWeekOfYear(d, 1),\n x: (d: LiquidDate) => d.toLocaleDateString(),\n X: (d: LiquidDate) => d.toLocaleTimeString(),\n y: (d: LiquidDate) => d.getFullYear().toString().slice(2, 4),\n Y: (d: LiquidDate) => d.getFullYear(),\n z: getTimezoneOffset,\n Z: (d: LiquidDate, opts: FormatOptions) => {\n if (d.getTimezoneName) {\n return d.getTimezoneName() || getTimezoneOffset(d, opts)\n }\n return (typeof Intl !== 'undefined' ? Intl.DateTimeFormat().resolvedOptions().timeZone : '')\n },\n 't': () => '\\t',\n 'n': () => '\\n',\n '%': () => '%'\n};\n(formatCodes as any).h = formatCodes.b\n\nexport function strftime (d: LiquidDate, formatStr: string) {\n let output = ''\n let remaining = formatStr\n let match\n while ((match = rFormat.exec(remaining))) {\n output += remaining.slice(0, match.index)\n remaining = remaining.slice(match.index + match[0].length)\n output += format(d, match)\n }\n return output + remaining\n}\n\nfunction format (d: LiquidDate, match: RegExpExecArray) {\n const [input, flagStr = '', width, modifier, conversion] = match\n const convert = formatCodes[conversion]\n if (!convert) return input\n const flags = {}\n for (const flag of flagStr) flags[flag] = true\n let ret = String(convert(d, { flags, width, modifier }))\n let padChar = padChars[conversion] || '0'\n let padWidth = width || padWidths[conversion] || 0\n if (flags['^']) ret = ret.toUpperCase()\n else if (flags['#']) ret = changeCase(ret)\n if (flags['_']) padChar = ' '\n else if (flags['0']) padChar = '0'\n if (flags['-']) padWidth = 0\n return padStart(ret, padWidth, padChar)\n}\n","import { LiquidDate } from './liquid-date'\nimport { isString } from './underscore'\n\n// one minute in milliseconds\nconst OneMinute = 60000\nconst ISO8601_TIMEZONE_PATTERN = /([zZ]|([+-])(\\d{2}):(\\d{2}))$/\n\n/**\n * A date implementation with timezone info, just like Ruby date\n *\n * Implementation:\n * - create a Date offset by it's timezone difference, avoiding overriding a bunch of methods\n * - rewrite getTimezoneOffset() to trick strftime\n */\nexport class TimezoneDate implements LiquidDate {\n private timezoneOffset: number\n private timezoneName: string\n private date: Date\n private displayDate: Date\n constructor (init: string | number | Date | TimezoneDate, timezone: number | string) {\n this.date = init instanceof TimezoneDate\n ? init.date\n : new Date(init)\n this.timezoneOffset = isString(timezone) ? TimezoneDate.getTimezoneOffset(timezone, this.date) : timezone\n this.timezoneName = isString(timezone) ? timezone : ''\n\n const diff = (this.date.getTimezoneOffset() - this.timezoneOffset) * OneMinute\n const time = this.date.getTime() + diff\n this.displayDate = new Date(time)\n }\n\n getTime () {\n return this.displayDate.getTime()\n }\n\n getMilliseconds () {\n return this.displayDate.getMilliseconds()\n }\n getSeconds () {\n return this.displayDate.getSeconds()\n }\n getMinutes () {\n return this.displayDate.getMinutes()\n }\n getHours () {\n return this.displayDate.getHours()\n }\n getDay () {\n return this.displayDate.getDay()\n }\n getDate () {\n return this.displayDate.getDate()\n }\n getMonth () {\n return this.displayDate.getMonth()\n }\n getFullYear () {\n return this.displayDate.getFullYear()\n }\n toLocaleString (locale?: string, init?: any) {\n if (init?.timeZone) {\n return this.date.toLocaleString(locale, init)\n }\n return this.displayDate.toLocaleString(locale, init)\n }\n toLocaleTimeString (locale?: string) {\n return this.displayDate.toLocaleTimeString(locale)\n }\n toLocaleDateString (locale?: string) {\n return this.displayDate.toLocaleDateString(locale)\n }\n getTimezoneOffset () {\n return this.timezoneOffset!\n }\n getTimezoneName () {\n return this.timezoneName\n }\n\n /**\n * Create a Date object fixed to it's declared Timezone. Both\n * - 2021-08-06T02:29:00.000Z and\n * - 2021-08-06T02:29:00.000+08:00\n * will always be displayed as\n * - 2021-08-06 02:29:00\n * regardless timezoneOffset in JavaScript realm\n *\n * The implementation hack:\n * Instead of calling `.getMonth()`/`.getUTCMonth()` respect to `preserveTimezones`,\n * we create a different Date to trick strftime, it's both simpler and more performant.\n * Given that a template is expected to be parsed fewer times than rendered.\n */\n static createDateFixedToTimezone (dateString: string): LiquidDate {\n const m = dateString.match(ISO8601_TIMEZONE_PATTERN)\n // representing a UTC timestamp\n if (m && m[1] === 'Z') {\n return new TimezoneDate(+new Date(dateString), 0)\n }\n // has a timezone specified\n if (m && m[2] && m[3] && m[4]) {\n const [, , sign, hours, minutes] = m\n const offset = (sign === '+' ? -1 : 1) * (parseInt(hours, 10) * 60 + parseInt(minutes, 10))\n return new TimezoneDate(+new Date(dateString), offset)\n }\n return new Date(dateString)\n }\n private static getTimezoneOffset (timezoneName: string, date = new Date()) {\n const localDateString = date.toLocaleString('en-US', { timeZone: timezoneName })\n const utcDateString = date.toLocaleString('en-US', { timeZone: 'UTC' })\n\n const localDate = new Date(localDateString)\n const utcDate = new Date(utcDateString)\n return (+utcDate - +localDate) / (60 * 1000)\n }\n}\n","import { Token } from './token'\nimport { TokenKind } from '../parser'\nimport { TYPES, BLANK } from '../util'\n\nexport abstract class DelimitedToken extends Token {\n public trimLeft = false\n public trimRight = false\n public contentRange: [number, number]\n public constructor (\n kind: TokenKind,\n [contentBegin, contentEnd]: [number, number],\n input: string,\n begin: number,\n end: number,\n trimLeft: boolean,\n trimRight: boolean,\n file?: string\n ) {\n super(kind, input, begin, end, file)\n const tl = input[contentBegin] === '-'\n const tr = input[contentEnd - 1] === '-'\n\n let l = tl ? contentBegin + 1 : contentBegin\n let r = tr ? contentEnd - 1 : contentEnd\n while (l < r && (TYPES[input.charCodeAt(l)] & BLANK)) l++\n while (r > l && (TYPES[input.charCodeAt(r - 1)] & BLANK)) r--\n\n this.contentRange = [l, r]\n this.trimLeft = tl || trimLeft\n this.trimRight = tr || trimRight\n }\n get content () {\n return this.input.slice(this.contentRange[0], this.contentRange[1])\n }\n}\n","import { DelimitedToken } from './delimited-token'\nimport { Tokenizer, TokenKind } from '../parser'\nimport type { NormalizedFullOptions } from '../liquid-options'\n\nexport class TagToken extends DelimitedToken {\n public name: string\n public tokenizer: Tokenizer\n public constructor (\n input: string,\n begin: number,\n end: number,\n options: NormalizedFullOptions,\n file?: string\n ) {\n const { trimTagLeft, trimTagRight, tagDelimiterLeft, tagDelimiterRight } = options\n const [valueBegin, valueEnd] = [begin + tagDelimiterLeft.length, end - tagDelimiterRight.length]\n super(TokenKind.Tag, [valueBegin, valueEnd], input, begin, end, trimTagLeft, trimTagRight, file)\n\n this.tokenizer = new Tokenizer(input, options.operators, file, this.contentRange)\n this.name = this.tokenizer.readTagName()\n this.tokenizer.assert(this.name, `illegal tag syntax, tag name expected`)\n this.tokenizer.skipBlank()\n }\n get args (): string {\n return this.tokenizer.input.slice(this.tokenizer.p, this.contentRange[1])\n }\n}\n","import { DelimitedToken } from './delimited-token'\nimport { NormalizedFullOptions } from '../liquid-options'\nimport { TokenKind } from '../parser'\n\nexport class OutputToken extends DelimitedToken {\n public constructor (\n input: string,\n begin: number,\n end: number,\n options: NormalizedFullOptions,\n file?: string\n ) {\n const { trimOutputLeft, trimOutputRight, outputDelimiterLeft, outputDelimiterRight } = options\n const valueRange: [number, number] = [begin + outputDelimiterLeft.length, end - outputDelimiterRight.length]\n super(TokenKind.Output, valueRange, input, begin, end, trimOutputLeft, trimOutputRight, file)\n }\n}\n","import { Token } from './token'\nimport { TokenKind } from '../parser'\n\nexport class HTMLToken extends Token {\n trimLeft = 0\n trimRight = 0\n constructor (\n public input: string,\n public begin: number,\n public end: number,\n public file?: string\n ) {\n super(TokenKind.HTML, input, begin, end, file)\n }\n public getContent () {\n return this.input.slice(this.begin + this.trimLeft, this.end - this.trimRight)\n }\n}\n","import { Token } from './token'\nimport { TokenKind } from '../parser'\n\nexport class NumberToken extends Token {\n public content: number\n constructor (\n public input: string,\n public begin: number,\n public end: number,\n public file?: string\n ) {\n super(TokenKind.Number, input, begin, end, file)\n this.content = Number(this.getText())\n }\n}\n","import { Token } from './token'\nimport { NUMBER, TYPES, SIGN } from '../util'\nimport { TokenKind } from '../parser'\n\nexport class IdentifierToken extends Token {\n public content: string\n constructor (\n public input: string,\n public begin: number,\n public end: number,\n public file?: string\n ) {\n super(TokenKind.Word, input, begin, end, file)\n this.content = this.getText()\n }\n isNumber (allowSign = false) {\n const begin = allowSign && TYPES[this.input.charCodeAt(this.begin)] & SIGN\n ? this.begin + 1\n : this.begin\n for (let i = begin; i < this.end; i++) {\n if (!(TYPES[this.input.charCodeAt(i)] & NUMBER)) return false\n }\n return true\n }\n}\n","import { Token } from './token'\nimport { TokenKind } from '../parser'\nimport { literalValues, LiteralValue } from '../util'\n\nexport class LiteralToken extends Token {\n public content: LiteralValue\n public literal: string\n public constructor (\n public input: string,\n public begin: number,\n public end: number,\n public file?: string\n ) {\n super(TokenKind.Literal, input, begin, end, file)\n this.literal = this.getText()\n this.content = literalValues[this.literal]\n }\n}\n","import { Token } from './token'\nimport { TokenKind } from '../parser'\n\nexport const enum OperatorType {\n Binary,\n Unary\n}\n\nexport const operatorPrecedences = {\n '==': 2,\n '!=': 2,\n '>': 2,\n '<': 2,\n '>=': 2,\n '<=': 2,\n 'contains': 2,\n 'not': 1,\n 'and': 0,\n 'or': 0\n}\n\nexport const operatorTypes = {\n '==': OperatorType.Binary,\n '!=': OperatorType.Binary,\n '>': OperatorType.Binary,\n '<': OperatorType.Binary,\n '>=': OperatorType.Binary,\n '<=': OperatorType.Binary,\n 'contains': OperatorType.Binary,\n 'not': OperatorType.Unary,\n 'and': OperatorType.Binary,\n 'or': OperatorType.Binary\n}\n\nexport class OperatorToken extends Token {\n public operator: string\n public constructor (\n public input: string,\n public begin: number,\n public end: number,\n public file?: string\n ) {\n super(TokenKind.Operator, input, begin, end, file)\n this.operator = this.getText()\n }\n getPrecedence () {\n const key = this.getText()\n return key in operatorPrecedences ? operatorPrecedences[key] : 1\n }\n}\n","import { Token } from './token'\nimport { LiteralToken } from './literal-token'\nimport { ValueToken } from './value-token'\nimport { IdentifierToken } from './identifier-token'\nimport { NumberToken } from './number-token'\nimport { RangeToken } from './range-token'\nimport { QuotedToken } from './quoted-token'\nimport { TokenKind } from '../parser'\n\nexport class PropertyAccessToken extends Token {\n constructor (\n public variable: QuotedToken | RangeToken | LiteralToken | NumberToken | undefined,\n public props: (ValueToken | IdentifierToken)[],\n input: string,\n begin: number,\n end: number,\n file?: string\n ) {\n super(TokenKind.PropertyAccess, input, begin, end, file)\n }\n}\n","import { Token } from './token'\nimport { FilterArg } from '../parser/filter-arg'\nimport { TokenKind } from '../parser'\n\nexport class FilterToken extends Token {\n public constructor (\n public name: string,\n public args: FilterArg[],\n input: string,\n begin: number,\n end: number,\n file?: string\n ) {\n super(TokenKind.Filter, input, begin, end, file)\n }\n}\n","import { Token } from './token'\nimport { ValueToken } from './value-token'\nimport { IdentifierToken } from './identifier-token'\nimport { TokenKind } from '../parser'\n\nexport class HashToken extends Token {\n constructor (\n public input: string,\n public begin: number,\n public end: number,\n public name: IdentifierToken,\n public value?: ValueToken,\n public file?: string\n ) {\n super(TokenKind.Hash, input, begin, end, file)\n }\n}\n","const rHex = /[\\da-fA-F]/\nconst rOct = /[0-7]/\nconst escapeChar = {\n b: '\\b',\n f: '\\f',\n n: '\\n',\n r: '\\r',\n t: '\\t',\n v: '\\x0B'\n}\n\nfunction hexVal (c: string) {\n const code = c.charCodeAt(0)\n if (code >= 97) return code - 87\n if (code >= 65) return code - 55\n return code - 48\n}\n\nexport function parseStringLiteral (str: string): string {\n let ret = ''\n for (let i = 1; i < str.length - 1; i++) {\n if (str[i] !== '\\\\') {\n ret += str[i]\n continue\n }\n if (escapeChar[str[i + 1]] !== undefined) {\n ret += escapeChar[str[++i]]\n } else if (str[i + 1] === 'u') {\n let val = 0\n let j = i + 2\n while (j <= i + 5 && rHex.test(str[j])) {\n val = val * 16 + hexVal(str[j++])\n }\n i = j - 1\n ret += String.fromCharCode(val)\n } else if (!rOct.test(str[i + 1])) {\n ret += str[++i]\n } else {\n let j = i + 1\n let val = 0\n while (j <= i + 3 && rOct.test(str[j])) {\n val = val * 8 + hexVal(str[j++])\n }\n i = j - 1\n ret += String.fromCharCode(val)\n }\n }\n return ret\n}\n","import { Token } from './token'\nimport { TokenKind } from '../parser'\nimport { parseStringLiteral } from '../render/string'\n\nexport class QuotedToken extends Token {\n public readonly content: string\n constructor (\n public input: string,\n public begin: number,\n public end: number,\n public file?: string\n ) {\n super(TokenKind.Quoted, input, begin, end, file)\n this.content = parseStringLiteral(this.getText())\n }\n}\n","import { Token } from './token'\nimport { ValueToken } from './value-token'\nimport { TokenKind } from '../parser'\n\nexport class RangeToken extends Token {\n constructor (\n public input: string,\n public begin: number,\n public end: number,\n public lhs: ValueToken,\n public rhs: ValueToken,\n public file?: string\n ) {\n super(TokenKind.Range, input, begin, end, file)\n }\n}\n","import { DelimitedToken } from './delimited-token'\nimport { NormalizedFullOptions } from '../liquid-options'\nimport { Tokenizer, TokenKind } from '../parser'\n\n/**\n * LiquidTagToken is different from TagToken by not having delimiters `{%` or `%}`\n */\nexport class LiquidTagToken extends DelimitedToken {\n public name: string\n public args: string\n public tokenizer: Tokenizer\n public constructor (\n input: string,\n begin: number,\n end: number,\n options: NormalizedFullOptions,\n file?: string\n ) {\n super(TokenKind.Tag, [begin, end], input, begin, end, false, false, file)\n\n this.tokenizer = new Tokenizer(input, options.operators, file, this.contentRange)\n this.name = this.tokenizer.readTagName()\n this.tokenizer.assert(this.name, 'illegal liquid tag syntax')\n\n this.tokenizer.skipBlank()\n this.args = this.tokenizer.remaining()\n }\n}\n","import { Token } from './token'\nimport { FilterToken } from './filter-token'\nimport { TokenKind } from '../parser'\nimport { Expression } from '../render'\n\n/**\n * value expression with optional filters\n * e.g.\n * {% assign foo=\"bar\" | append: \"coo\" %}\n */\nexport class FilteredValueToken extends Token {\n constructor (\n public initial: Expression,\n public filters: FilterToken[],\n public input: string,\n public begin: number,\n public end: number,\n public file?: string\n ) {\n super(TokenKind.FilteredValue, input, begin, end, file)\n }\n}\n","import { stringify } from '../util'\nimport { Emitter } from './emitter'\n\nexport class SimpleEmitter implements Emitter {\n public buffer = '';\n\n public write (html: any) {\n this.buffer += stringify(html)\n }\n}\n","import { Emitter } from '../emitters'\n\nexport class StreamedEmitter implements Emitter {\n public buffer = '';\n public stream: NodeJS.ReadableStream = null as any\n constructor () {\n throw new Error('streaming not supported in browser')\n }\n public write: (html: any) => void\n public error: (err: Error) => void\n public end: () => void\n}\n","import { stringify, toValue } from '../util'\nimport { Emitter } from './emitter'\n\nexport class KeepingTypeEmitter implements Emitter {\n public buffer: any = '';\n\n public write (html: any) {\n html = toValue(html)\n // This will only preserve the type if the value is isolated.\n // I.E:\n // {{ my-port }} -> 42\n // {{ my-host }}:{{ my-port }} -> 'host:42'\n if (typeof html !== 'string' && this.buffer === '') {\n this.buffer = html\n } else {\n this.buffer = stringify(this.buffer) + stringify(html)\n }\n }\n}\n","import { toPromise, RenderError, LiquidErrors, LiquidError } from '../util'\nimport { Context } from '../context'\nimport { Template } from '../template'\nimport { Emitter, KeepingTypeEmitter, StreamedEmitter, SimpleEmitter } from '../emitters'\n\nexport class Render {\n public renderTemplatesToNodeStream (templates: Template[], ctx: Context): NodeJS.ReadableStream {\n const emitter = new StreamedEmitter()\n Promise.resolve().then(() => toPromise(this.renderTemplates(templates, ctx, emitter)))\n .then(() => emitter.end(), err => emitter.error(err))\n return emitter.stream\n }\n public * renderTemplates (templates: Template[], ctx: Context, emitter?: Emitter): IterableIterator<any> {\n if (!emitter) {\n emitter = ctx.opts.keepOutputType ? new KeepingTypeEmitter() : new SimpleEmitter()\n }\n const errors = []\n for (const tpl of templates) {\n try {\n // if tpl.render supports emitter, it'll return empty `html`\n const html = yield tpl.render(ctx, emitter)\n // if not, it'll return an `html`, write to the emitter for it\n html && emitter.write(html)\n if (emitter['break'] || emitter['continue']) break\n } catch (e) {\n const err = LiquidError.is(e) ? e : new RenderError(e as Error, tpl)\n if (ctx.opts.catchAllErrors) errors.push(err)\n else throw err\n }\n }\n if (errors.length) {\n throw new LiquidErrors(errors)\n }\n return emitter.buffer\n }\n}\n","import { QuotedToken, RangeToken, OperatorToken, Token, PropertyAccessToken, OperatorType, operatorTypes } from '../tokens'\nimport { isRangeToken, isPropertyAccessToken, UndefinedVariableError, range, isOperatorToken, assert } from '../util'\nimport type { Context } from '../context'\nimport type { UnaryOperatorHandler } from '../render'\n\nexport class Expression {\n private postfix: Token[]\n\n public constructor (tokens: IterableIterator<Token>) {\n this.postfix = [...toPostfix(tokens)]\n }\n public * evaluate (ctx: Context, lenient?: boolean): Generator<unknown, unknown, unknown> {\n assert(ctx, 'unable to evaluate: context not defined')\n const operands: any[] = []\n for (const token of this.postfix) {\n if (isOperatorToken(token)) {\n const r = operands.pop()\n let result\n if (operatorTypes[token.operator] === OperatorType.Unary) {\n result = yield (ctx.opts.operators[token.operator] as UnaryOperatorHandler)(r, ctx)\n } else {\n const l = operands.pop()\n result = yield ctx.opts.operators[token.operator](l, r, ctx)\n }\n operands.push(result)\n } else {\n operands.push(yield evalToken(token, ctx, lenient))\n }\n }\n return operands[0]\n }\n public valid () {\n return !!this.postfix.length\n }\n}\n\nexport function * evalToken (token: Token | undefined, ctx: Context, lenient = false): IterableIterator<unknown> {\n if (!token) return\n if ('content' in token) return token.content\n if (isPropertyAccessToken(token)) return yield evalPropertyAccessToken(token, ctx, lenient)\n if (isRangeToken(token)) return yield evalRangeToken(token, ctx)\n}\n\nfunction * evalPropertyAccessToken (token: PropertyAccessToken, ctx: Context, lenient: boolean): IterableIterator<unknown> {\n const props: string[] = []\n for (const prop of token.props) {\n props.push((yield evalToken(prop, ctx, false)) as unknown as string)\n }\n try {\n if (token.variable) {\n const variable = yield evalToken(token.variable, ctx, lenient)\n return yield ctx._getFromScope(variable, props)\n } else {\n return yield ctx._get(props)\n }\n } catch (e) {\n if (lenient && (e as Error).name === 'InternalUndefinedVariableError') return null\n throw (new UndefinedVariableError(e as Error, token))\n }\n}\n\nexport function evalQuotedToken (token: QuotedToken) {\n return token.content\n}\n\nfunction * evalRangeToken (token: RangeToken, ctx: Context) {\n const low: number = yield evalToken(token.lhs, ctx)\n const high: number = yield evalToken(token.rhs, ctx)\n return range(+low, +high + 1)\n}\n\nfunction * toPostfix (tokens: IterableIterator<Token>): IterableIterator<Token> {\n const ops: OperatorToken[] = []\n for (const token of tokens) {\n if (isOperatorToken(token)) {\n while (ops.length && ops[ops.length - 1].getPrecedence() > token.getPrecedence()) {\n yield ops.pop()!\n }\n ops.push(token)\n } else yield token\n }\n while (ops.length) {\n yield ops.pop()!\n }\n}\n","import { Context } from '../context/context'\nimport { toValue } from '../util'\n\nexport function isTruthy (val: any, ctx: Context): boolean {\n return !isFalsy(val, ctx)\n}\n\nexport function isFalsy (val: any, ctx: Context): boolean {\n val = toValue(val)\n\n if (ctx.opts.jsTruthy) {\n return !val\n } else {\n return val === false || undefined === val || val === null\n }\n}\n","import { isComparable } from '../drop/comparable'\nimport { Context } from '../context'\nimport { toValue } from '../util'\nimport { isFalsy, isTruthy } from '../render/boolean'\nimport { isArray, isFunction } from '../util/underscore'\n\nexport type UnaryOperatorHandler = (operand: any, ctx: Context) => boolean;\nexport type BinaryOperatorHandler = (lhs: any, rhs: any, ctx: Context) => boolean;\nexport type OperatorHandler = UnaryOperatorHandler | BinaryOperatorHandler;\nexport type Operators = Record<string, OperatorHandler>\n\nexport const defaultOperators: Operators = {\n '==': equals,\n '!=': (l: any, r: any) => !equals(l, r),\n '>': (l: any, r: any) => {\n if (isComparable(l)) return l.gt(r)\n if (isComparable(r)) return r.lt(l)\n return toValue(l) > toValue(r)\n },\n '<': (l: any, r: any) => {\n if (isComparable(l)) return l.lt(r)\n if (isComparable(r)) return r.gt(l)\n return toValue(l) < toValue(r)\n },\n '>=': (l: any, r: any) => {\n if (isComparable(l)) return l.geq(r)\n if (isComparable(r)) return r.leq(l)\n return toValue(l) >= toValue(r)\n },\n '<=': (l: any, r: any) => {\n if (isComparable(l)) return l.leq(r)\n if (isComparable(r)) return r.geq(l)\n return toValue(l) <= toValue(r)\n },\n 'contains': (l: any, r: any) => {\n l = toValue(l)\n if (isArray(l)) return l.some((i) => equals(i, r))\n if (isFunction(l?.indexOf)) return l.indexOf(toValue(r)) > -1\n return false\n },\n 'not': (v: any, ctx: Context) => isFalsy(toValue(v), ctx),\n 'and': (l: any, r: any, ctx: Context) => isTruthy(toValue(l), ctx) && isTruthy(toValue(r), ctx),\n 'or': (l: any, r: any, ctx: Context) => isTruthy(toValue(l), ctx) || isTruthy(toValue(r), ctx)\n}\n\nexport function equals (lhs: any, rhs: any): boolean {\n if (isComparable(lhs)) return lhs.equals(rhs)\n if (isComparable(rhs)) return rhs.equals(lhs)\n lhs = toValue(lhs)\n rhs = toValue(rhs)\n if (isArray(lhs)) {\n return isArray(rhs) && arrayEquals(lhs, rhs)\n }\n return lhs === rhs\n}\n\nfunction arrayEquals (lhs: any[], rhs: any[]): boolean {\n if (lhs.length !== rhs.length) return false\n return !lhs.some((value, i) => !equals(value, rhs[i]))\n}\n","import { Cache } from './cache'\n\nclass Node<T> {\n constructor (\n public key: string,\n public value: T,\n public next: Node<T>,\n public prev: Node<T>\n ) {}\n}\n\nexport class LRU<T> implements Cache<T> {\n private cache: Record<string, Node<T>> = {}\n private head: Node<T>\n private tail: Node<T>\n\n constructor (\n public limit: number,\n public size = 0\n ) {\n this.head = new Node<T>('HEAD', null as any, null as any, null as any)\n this.tail = new Node<T>('TAIL', null as any, null as any, null as any)\n this.head.next = this.tail\n this.tail.prev = this.head\n }\n\n write (key: string, value: T) {\n if (this.cache[key]) {\n this.cache[key].value = value\n } else {\n const node = new Node(key, value, this.head.next, this.head)\n this.head.next.prev = node\n this.head.next = node\n\n this.cache[key] = node\n this.size++\n this.ensureLimit()\n }\n }\n\n read (key: string): T | undefined {\n if (!this.cache[key]) return\n const { value } = this.cache[key]\n this.remove(key)\n this.write(key, value)\n return value\n }\n\n remove (key: string) {\n const node = this.cache[key]\n node.prev.next = node.next\n node.next.prev = node.prev\n delete this.cache[key]\n this.size--\n }\n\n clear () {\n this.head.next = this.tail\n this.tail.prev = this.head\n this.size = 0\n this.cache = {}\n }\n\n private ensureLimit () {\n if (this.size > this.limit) this.remove(this.tail.prev.key)\n }\n}\n","import { last } from '../util'\n\nfunction domResolve (root: string, path: string) {\n const base = document.createElement('base')\n base.href = root\n\n const head = document.getElementsByTagName('head')[0]\n head.insertBefore(base, head.firstChild)\n\n const a = document.createElement('a')\n a.href = path\n const resolved = a.href\n head.removeChild(base)\n\n return resolved\n}\n\nexport function resolve (root: string, filepath: string, ext: string) {\n if (root.length && last(root) !== '/') root += '/'\n const url = domResolve(root, filepath)\n return url.replace(/^(\\w+:\\/\\/[^/]+)(\\/[^?]+)/, (str, origin, path) => {\n const last = path.split('/').pop()\n if (/\\.\\w+$/.test(last)) return str\n return origin + path + ext\n })\n}\n\nexport async function readFile (url: string): Promise<string> {\n return new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest()\n xhr.onload = () => {\n if (xhr.status >= 200 && xhr.status < 300) {\n resolve(xhr.responseText as string)\n } else {\n reject(new Error(xhr.statusText))\n }\n }\n xhr.onerror = () => {\n reject(new Error('An error occurred whilst receiving the response.'))\n }\n xhr.open('GET', url)\n xhr.send()\n })\n}\n\nexport function readFileSync (url: string): string {\n const xhr = new XMLHttpRequest()\n xhr.open('GET', url, false)\n xhr.send()\n if (xhr.status < 200 || xhr.status >= 300) {\n throw new Error(xhr.statusText)\n }\n return xhr.responseText as string\n}\n\nexport async function exists (filepath: string) {\n return true\n}\n\nexport function existsSync (filepath: string) {\n return true\n}\n\nexport function dirname (filepath: string) {\n return domResolve(filepath, '.')\n}\n\nexport const sep = '/'\n","import { isFalsy } from '../render/boolean'\nimport { identify, isArray, isString, toValue } from '../util/underscore'\nimport { FilterImpl } from '../template'\n\nfunction defaultFilter<T1 extends boolean, T2> (this: FilterImpl, value: T1, defaultValue: T2, ...args: Array<[string, any]>): T1 | T2 {\n value = toValue(value)\n if (isArray(value) || isString(value)) return value.length ? value : defaultValue\n if (value === false && (new Map(args)).get('allow_false')) return false as T1\n return isFalsy(value, this.context) ? defaultValue : value\n}\n\nfunction json (value: any, space = 0) {\n return JSON.stringify(value, null, space)\n}\n\nfunction inspect (value: any, space = 0) {\n const ancestors: object[] = []\n return JSON.stringify(value, function (this: unknown, _key: unknown, value: any) {\n if (typeof value !== 'object' || value === null) return value\n // `this` is the object that value is contained in, i.e., its direct parent.\n while (ancestors.length > 0 && ancestors[ancestors.length - 1] !== this) ancestors.pop()\n if (ancestors.includes(value)) return '[Circular]'\n ancestors.push(value)\n return value\n }, space)\n}\n\nfunction to_integer (value: any) {\n return Number(value)\n}\n\nconst raw = {\n raw: true,\n handler: identify\n}\n\nexport default {\n default: defaultFilter,\n raw,\n jsonify: json,\n to_integer,\n json,\n inspect\n}\n","import { stringify } from '../util/underscore'\n\nconst escapeMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": '''\n}\nconst unescapeMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '"': '\"',\n ''': \"'\"\n}\n\nexport function escape (str: string) {\n return stringify(str).replace(/&|<|>|\"|'/g, m => escapeMap[m])\n}\n\nexport function xml_escape (str: string) {\n return escape(str)\n}\n\nfunction unescape (str: string) {\n return stringify(str).replace(/&(amp|lt|gt|#34|#39);/g, m => unescapeMap[m])\n}\n\nexport function escape_once (str: string) {\n return escape(unescape(stringify(str)))\n}\n\nexport function newline_to_br (v: string) {\n return stringify(v).replace(/\\r?\\n/gm, '<br />\\n')\n}\n\nexport function strip_html (v: string) {\n return stringify(v).replace(/<script[\\s\\S]*?<\\/script>|<style[\\s\\S]*?<\\/style>|<.*?>|<!--[\\s\\S]*?-->/g, '')\n}\n","import { assert, isArray, isString, isFunction } from './util'\nimport { LRU, LiquidCache } from './cache'\nimport { FS, LookupType } from './fs'\nimport * as fs from './fs/fs-impl'\nimport { defaultOperators, Operators } from './render'\nimport misc from './filters/misc'\nimport { escape } from './filters/html'\n\ntype OutputEscape = (value: any) => string\ntype OutputEscapeOption = 'escape' | 'json' | OutputEscape\n\nexport interface LiquidOptions {\n /** A directory or an array of directories from where to resolve layout and include templates, and the filename passed to `.renderFile()`. If it's an array, the files are looked up in the order they occur in the array. Defaults to `[\".\"]` */\n root?: string | string[];\n /** A directory or an array of directories from where to resolve included templates. If it's an array, the files are looked up in the order they occur in the array. Defaults to `root` */\n partials?: string | string[];\n /** A directory or an array of directories from where to resolve layout templates. If it's an array, the files are looked up in the order they occur in the array. Defaults to `root` */\n layouts?: string | string[];\n /** Allow refer to layouts/partials by relative pathname. To avoid arbitrary filesystem read, paths been referenced also need to be within corresponding root, partials, layouts. Defaults to `true`. */\n relativeReference?: boolean;\n /** Use jekyll style include, pass parameters to `include` variable of current scope. Defaults to `false`. */\n jekyllInclude?: boolean;\n /** Add a extname (if filepath doesn't include one) before template file lookup. Eg: setting to `\".html\"` will allow including file by basename. Defaults to `\"\"`. */\n extname?: string;\n /** Whether or not to cache resolved templates. Defaults to `false`. */\n cache?: boolean | number | LiquidCache;\n /** Use JavaScript Truthiness. Defaults to `false`. */\n jsTruthy?: boolean;\n /** If set, treat the `filepath` parameter in `{%include filepath %}` and `{%layout filepath%}` as a variable, otherwise as a literal value. Defaults to `true`. */\n dynamicPartials?: boolean;\n /** Whether or not to assert filter existence. If set to `false`, undefined filters will be skipped. Otherwise, undefined filters will cause an exception. Defaults to `false`. */\n strictFilters?: boolean;\n /** Whether or not to assert variable existence. If set to `false`, undefined variables will be rendered as empty string. Otherwise, undefined variables will cause an exception. Defaults to `false`. */\n strictVariables?: boolean;\n /** Catch all errors instead of exit upon one. Please note that render errors won't be reached when parse fails. */\n catchAllErrors?: boolean;\n /** Hide scope variables from prototypes, useful when you're passing a not sanitized object into LiquidJS or need to hide prototypes from templates. */\n ownPropertyOnly?: boolean;\n /** Modifies the behavior of `strictVariables`. If set, a single undefined variable will *not* cause an exception in the context of the `if`/`elsif`/`unless` tag and the `default` filter. Instead, it will evaluate to `false` and `null`, respectively. Irrelevant if `strictVariables` is not set. Defaults to `false`. **/\n lenientIf?: boolean;\n /** JavaScript timezone name or timezoneOffset for `date` filter, default to local time. That means if you're in Australia (UTC+10), it'll default to `-600` or `Australia/Lindeman` */\n timezoneOffset?: number | string;\n /** Default date format to use if the date filter doesn't include a format. Defaults to `%A, %B %-e, %Y at %-l:%M %P %z`. */\n dateFormat?: string;\n /** Strip blank characters (including ` `, `\\t`, and `\\r`) from the right of tags (`{% %}`) until `\\n` (inclusive). Defaults to `false`. */\n trimTagRight?: boolean;\n /** Similar to `trimTagRight`, whereas the `\\n` is exclusive. Defaults to `false`. See Whitespace Control for details. */\n trimTagLeft?: boolean;\n /** Strip blank characters (including ` `, `\\t`, and `\\r`) from the right of values (`{{ }}`) until `\\n` (inclusive). Defaults to `false`. */\n trimOutputRight?: boolean;\n /** Similar to `trimOutputRight`, whereas the `\\n` is exclusive. Defaults to `false`. See Whitespace Control for details. */\n trimOutputLeft?: boolean;\n /** The left delimiter for liquid tags. **/\n tagDelimiterLeft?: string;\n /** The right delimiter for liquid tags. **/\n tagDelimiterRight?: string;\n /** The left delimiter for liquid outputs. **/\n outputDelimiterLeft?: string;\n /** The right delimiter for liquid outputs. **/\n outputDelimiterRight?: string;\n /** Whether input strings to date filter preserve the given timezone **/\n preserveTimezones?: boolean;\n /** Whether `trim*Left`/`trim*Right` is greedy. When set to `true`, all consecutive blank characters including `\\n` will be trimmed regardless of line breaks. Defaults to `true`. */\n greedy?: boolean;\n /** `fs` is used to override the default file-system module with a custom implementation. */\n fs?: FS;\n /** the global scope passed down to all partial and layout templates, i.e. templates included by `include`, `layout` and `render` tags. */\n globals?: object;\n /** Whether or not to keep value type when writing the Output, not working for streamed rendering. Defaults to `false`. */\n keepOutputType?: boolean;\n /** Default escape filter applied to output values, when set, you'll have to add `| raw` for values don't need to be escaped. Defaults to `undefined`. */\n outputEscape?: OutputEscapeOption;\n /** An object of operators for conditional statements. Defaults to the regular Liquid operators. */\n operators?: Operators;\n /** Respect parameter order when using filters like \"for ... reversed limit\", Defaults to `false`. */\n orderedFilterParameters?: boolean;\n}\n\nexport interface RenderOptions {\n /**\n * This call is sync or async? It's used by Liquid internal methods, you'll not need this.\n */\n sync?: boolean;\n /**\n * Same as `globals` on LiquidOptions, but only for current render() call\n */\n globals?: object;\n /**\n * Same as `strictVariables` on LiquidOptions, but only for current render() call\n */\n strictVariables?: boolean;\n /**\n * Same as `ownPropertyOnly` on LiquidOptions, but only for current render() call\n */\n ownPropertyOnly?: boolean;\n}\n\nexport interface RenderFileOptions extends RenderOptions {\n lookupType?: LookupType;\n}\n\ninterface NormalizedOptions extends LiquidOptions {\n root?: string[];\n partials?: string[];\n layouts?: string[];\n cache?: LiquidCache;\n outputEscape?: OutputEscape;\n}\n\nexport interface NormalizedFullOptions extends NormalizedOptions {\n root: string[];\n partials: string[];\n layouts: string[];\n relativeReference: boolean;\n jekyllInclude: boolean;\n extname: string;\n cache?: LiquidCache;\n jsTruthy: boolean;\n dynamicPartials: boolean;\n fs: FS;\n strictFilters: boolean;\n strictVariables: boolean;\n ownPropertyOnly: boolean;\n lenientIf: boolean;\n dateFormat: string;\n trimTagRight: boolean;\n trimTagLeft: boolean;\n trimOutputRight: boolean;\n trimOutputLeft: boolean;\n tagDelimiterLeft: string;\n tagDelimiterRight: string;\n outputDelimiterLeft: string;\n outputDelimiterRight: string;\n preserveTimezones: boolean;\n greedy: boolean;\n globals: object;\n keepOutputType: boolean;\n operators: Operators;\n}\n\nexport const defaultOptions: NormalizedFullOptions = {\n root: ['.'],\n layouts: ['.'],\n partials: ['.'],\n relativeReference: true,\n jekyllInclude: false,\n cache: undefined,\n extname: '',\n fs: fs,\n dynamicPartials: true,\n jsTruthy: false,\n dateFormat: '%A, %B %-e, %Y at %-l:%M %P %z',\n trimTagRight: false,\n trimTagLeft: false,\n trimOutputRight: false,\n trimOutputLeft: false,\n greedy: true,\n tagDelimiterLeft: '{%',\n tagDelimiterRight: '%}',\n outputDelimiterLeft: '{{',\n outputDelimiterRight: '}}',\n preserveTimezones: false,\n strictFilters: false,\n strictVariables: false,\n ownPropertyOnly: true,\n lenientIf: false,\n globals: {},\n keepOutputType: false,\n operators: defaultOperators\n}\n\nexport function normalize (options: LiquidOptions): NormalizedFullOptions {\n if (options.hasOwnProperty('root')) {\n if (!options.hasOwnProperty('partials')) options.partials = options.root\n if (!options.hasOwnProperty('layouts')) options.layouts = options.root\n }\n if (options.hasOwnProperty('cache')) {\n let cache: LiquidCache | undefined\n if (typeof options.cache === 'number') cache = options.cache > 0 ? new LRU(options.cache) : undefined\n else if (typeof options.cache === 'object') cache = options.cache\n else cache = options.cache ? new LRU(1024) : undefined\n options.cache = cache\n }\n options = { ...defaultOptions, ...(options.jekyllInclude ? { dynamicPartials: false } : {}), ...options }\n if ((!options.fs!.dirname || !options.fs!.sep) && options.relativeReference) {\n console.warn('[LiquidJS] `fs.dirname` and `fs.sep` are required for relativeReference, set relativeReference to `false` to suppress this warning')\n options.relativeReference = false\n }\n options.root = normalizeDirectoryList(options.root)\n options.partials = normalizeDirectoryList(options.partials)\n options.layouts = normalizeDirectoryList(options.layouts)\n options.outputEscape = options.outputEscape && getOutputEscapeFunction(options.outputEscape)\n return options as NormalizedFullOptions\n}\n\nfunction getOutputEscapeFunction (nameOrFunction: OutputEscapeOption): OutputEscape {\n if (nameOrFunction === 'escape') return escape\n if (nameOrFunction === 'json') return misc.json\n assert(isFunction(nameOrFunction), '`outputEscape` need to be of type string or function')\n return nameOrFunction\n}\n\nexport function normalizeDirectoryList (value: any): string[] {\n let list: string[] = []\n if (isArray(value)) list = value\n if (isString(value)) list = [value]\n return list\n}\n","import { Token } from '../tokens'\nimport { NormalizedFullOptions } from '../liquid-options'\nimport { isTagToken, isHTMLToken, isDelimitedToken, TYPES, INLINE_BLANK, BLANK } from '../util'\n\nexport function whiteSpaceCtrl (tokens: Token[], options: NormalizedFullOptions) {\n let inRaw = false\n\n for (let i = 0; i < tokens.length; i++) {\n const token = tokens[i]\n if (!isDelimitedToken(token)) continue\n if (!inRaw && token.trimLeft) {\n trimLeft(tokens[i - 1], options.greedy)\n }\n\n if (isTagToken(token)) {\n if (token.name === 'raw') inRaw = true\n else if (token.name === 'endraw') inRaw = false\n }\n\n if (!inRaw && token.trimRight) {\n trimRight(tokens[i + 1], options.greedy)\n }\n }\n}\n\nfunction trimLeft (token: Token, greedy: boolean) {\n if (!token || !isHTMLToken(token)) return\n\n const mask = greedy ? BLANK : INLINE_BLANK\n while (TYPES[token.input.charCodeAt(token.end - 1 - token.trimRight)] & mask) token.trimRight++\n}\n\nfunction trimRight (token: Token, greedy: boolean) {\n if (!token || !isHTMLToken(token)) return\n\n const mask = greedy ? BLANK : INLINE_BLANK\n while (TYPES[token.input.charCodeAt(token.begin + token.trimLeft)] & mask) token.trimLeft++\n if (token.input.charAt(token.begin + token.trimLeft) === '\\n') token.trimLeft++\n}\n","import { FilteredValueToken, TagToken, HTMLToken, HashToken, QuotedToken, LiquidTagToken, OutputToken, ValueToken, Token, RangeToken, FilterToken, TopLevelToken, PropertyAccessToken, OperatorToken, LiteralToken, IdentifierToken, NumberToken } from '../tokens'\nimport { OperatorHandler } from '../render/operator'\nimport { TrieNode, LiteralValue, Trie, createTrie, ellipsis, literalValues, TokenizationError, TYPES, QUOTE, BLANK, NUMBER, SIGN, isWord } from '../util'\nimport { Operators, Expression } from '../render'\nimport { NormalizedFullOptions, defaultOptions } from '../liquid-options'\nimport { FilterArg } from './filter-arg'\nimport { whiteSpaceCtrl } from './whitespace-ctrl'\n\nexport class Tokenizer {\n p: number\n N: number\n private rawBeginAt = -1\n private opTrie: Trie<OperatorHandler>\n private literalTrie: Trie<LiteralValue>\n\n constructor (\n public input: string,\n operators: Operators = defaultOptions.operators,\n public file?: string,\n range?: [number, number]\n ) {\n this.p = range ? range[0] : 0\n this.N = range ? range[1] : input.length\n this.opTrie = createTrie(operators)\n this.literalTrie = createTrie(literalValues)\n }\n\n readExpression () {\n return new Expression(this.readExpressionTokens())\n }\n\n * readExpressionTokens (): IterableIterator<Token> {\n while (this.p < this.N) {\n const operator = this.readOperator()\n if (operator) {\n yield operator\n continue\n }\n const operand = this.readValue()\n if (operand) {\n yield operand\n continue\n }\n return\n }\n }\n readOperator (): OperatorToken | undefined {\n this.skipBlank()\n const end = this.matchTrie(this.opTrie)\n if (end === -1) return\n return new OperatorToken(this.input, this.p, (this.p = end), this.file)\n }\n matchTrie<T> (trie: Trie<T>) {\n let node: TrieNode<T> = trie\n let i = this.p\n let info\n while (node[this.input[i]] && i < this.N) {\n node = node[this.input[i++]]\n if (node['end']) info = node\n }\n if (!info) return -1\n if (info['needBoundary'] && isWord(this.peek(i - this.p))) return -1\n return i\n }\n readFilteredValue (): FilteredValueToken {\n const begin = this.p\n const initial = this.readExpression()\n this.assert(initial.valid(), `invalid value expression: ${this.snapshot()}`)\n const filters = this.readFilters()\n return new FilteredValueToken(initial, filters, this.input, begin, this.p, this.file)\n }\n readFilters (): FilterToken[] {\n const filters = []\n while (true) {\n const filter = this.readFilter()\n if (!filter) return filters\n filters.push(filter)\n }\n }\n readFilter (): FilterToken | null {\n this.skipBlank()\n if (this.end()) return null\n this.assert(this.peek() === '|', `expected \"|\" before filter`)\n this.p++\n const begin = this.p\n const name = this.readIdentifier()\n if (!name.size()) {\n this.assert(this.end(), `expected filter name`)\n return null\n }\n const args = []\n this.skipBlank()\n if (this.peek() === ':') {\n do {\n ++this.p\n const arg = this.readFilterArg()\n arg && args.push(arg)\n this.skipBlank()\n this.assert(this.end() || this.peek() === ',' || this.peek() === '|', () => `unexpected character ${this.snapshot()}`)\n } while (this.peek() === ',')\n } else if (this.peek() === '|' || this.end()) {\n // do nothing\n } else {\n throw this.error('expected \":\" after filter name')\n }\n return new FilterToken(name.getText(), args, this.input, begin, this.p, this.file)\n }\n\n readFilterArg (): FilterArg | undefined {\n const key = this.readValue()\n if (!key) return\n this.skipBlank()\n if (this.peek() !== ':') return key\n ++this.p\n const value = this.readValue()\n return [key.getText(), value]\n }\n\n readTopLevelTokens (options: NormalizedFullOptions = defaultOptions): TopLevelToken[] {\n const tokens: TopLevelToken[] = []\n while (this.p < this.N) {\n const token = this.readTopLevelToken(options)\n tokens.push(token)\n }\n whiteSpaceCtrl(tokens, options)\n return tokens\n }\n\n readTopLevelToken (options: NormalizedFullOptions): TopLevelToken {\n const { tagDelimiterLeft, outputDelimiterLeft } = options\n if (this.rawBeginAt > -1) return this.readEndrawOrRawContent(options)\n if (this.match(tagDelimiterLeft)) return this.readTagToken(options)\n if (this.match(outputDelimiterLeft)) return this.readOutputToken(options)\n return this.readHTMLToken([tagDelimiterLeft, outputDelimiterLeft])\n }\n\n readHTMLToken (stopStrings: string[]): HTMLToken {\n const begin = this.p\n while (this.p < this.N) {\n if (stopStrings.some(str => this.match(str))) break\n ++this.p\n }\n return new HTMLToken(this.input, begin, this.p, this.file)\n }\n\n readTagToken (options: NormalizedFullOptions = defaultOptions): TagToken {\n const { file, input } = this\n const begin = this.p\n if (this.readToDelimiter(options.tagDelimiterRight) === -1) {\n throw this.error(`tag ${this.snapshot(begin)} not closed`, begin)\n }\n const token = new TagToken(input, begin, this.p, options, file)\n if (token.name === 'raw') this.rawBeginAt = begin\n return token\n }\n\n readToDelimiter (delimiter: string, respectQuoted = false) {\n this.skipBlank()\n while (this.p < this.N) {\n if (respectQuoted && (this.peekType() & QUOTE)) {\n this.readQuoted()\n continue\n }\n ++this.p\n if (this.rmatch(delimiter)) return this.p\n }\n return -1\n }\n\n readOutputToken (options: NormalizedFullOptions = defaultOptions): OutputToken {\n const { file, input } = this\n const { outputDelimiterRight } = options\n const begin = this.p\n if (this.readToDelimiter(outputDelimiterRight, true) === -1) {\n throw this.error(`output ${this.snapshot(begin)} not closed`, begin)\n }\n return new OutputToken(input, begin, this.p, options, file)\n }\n\n readEndrawOrRawContent (options: NormalizedFullOptions): HTMLToken | TagToken {\n const { tagDelimiterLeft, tagDelimiterRight } = options\n const begin = this.p\n let leftPos = this.readTo(tagDelimiterLeft) - tagDelimiterLeft.length\n while (this.p < this.N) {\n if (this.readIdentifier().getText() !== 'endraw') {\n leftPos = this.readTo(tagDelimiterLeft) - tagDelimiterLeft.length\n continue\n }\n while (this.p <= this.N) {\n if (this.rmatch(tagDelimiterRight)) {\n const end = this.p\n if (begin === leftPos) {\n this.rawBeginAt = -1\n return new TagToken(this.input, begin, end, options, this.file)\n } else {\n this.p = leftPos\n return new HTMLToken(this.input, begin, leftPos, this.file)\n }\n }\n if (this.rmatch(tagDelimiterLeft)) break\n this.p++\n }\n }\n throw this.error(`raw ${this.snapshot(this.rawBeginAt)} not closed`, begin)\n }\n\n readLiquidTagTokens (options: NormalizedFullOptions = defaultOptions): LiquidTagToken[] {\n const tokens: LiquidTagToken[] = []\n while (this.p < this.N) {\n const token = this.readLiquidTagToken(options)\n token && tokens.push(token)\n }\n return tokens\n }\n\n readLiquidTagToken (options: NormalizedFullOptions): LiquidTagToken | undefined {\n this.skipBlank()\n if (this.end()) return\n\n const begin = this.p\n this.readToDelimiter('\\n')\n const end = this.p\n return new LiquidTagToken(this.input, begin, end, options, this.file)\n }\n\n error (msg: string, pos: number = this.p) {\n return new TokenizationError(msg, new IdentifierToken(this.input, pos, this.N, this.file))\n }\n\n assert (pred: unknown, msg: string | (() => string), pos?: number) {\n if (!pred) throw this.error(typeof msg === 'function' ? msg() : msg, pos)\n }\n\n snapshot (begin: number = this.p) {\n return JSON.stringify(ellipsis(this.input.slice(begin, this.N), 32))\n }\n\n /**\n * @deprecated use #readIdentifier instead\n */\n readWord () {\n return this.readIdentifier()\n }\n\n readIdentifier (): IdentifierToken {\n this.skipBlank()\n const begin = this.p\n while (!this.end() && isWord(this.peek())) ++this.p\n return new IdentifierToken(this.input, begin, this.p, this.file)\n }\n\n readNonEmptyIdentifier (): IdentifierToken | undefined {\n const id = this.readIdentifier()\n return id.size() ? id : undefined\n }\n\n readTagName (): string {\n this.skipBlank()\n // Handle inline comment tags\n if (this.input[this.p] === '#') return this.input.slice(this.p, ++this.p)\n return this.readIdentifier().getText()\n }\n\n readHashes (jekyllStyle?: boolean) {\n const hashes = []\n while (true) {\n const hash = this.readHash(jekyllStyle)\n if (!hash) return hashes\n hashes.push(hash)\n }\n }\n\n readHash (jekyllStyle?: boolean): HashToken | undefined {\n this.skipBlank()\n if (this.peek() === ',') ++this.p\n const begin = this.p\n const name = this.readNonEmptyIdentifier()\n if (!name) return\n let value\n\n this.skipBlank()\n const sep = jekyllStyle ? '=' : ':'\n if (this.peek() === sep) {\n ++this.p\n value = this.readValue()\n }\n return new HashToken(this.input, begin, this.p, name, value, this.file)\n }\n\n remaining () {\n return this.input.slice(this.p, this.N)\n }\n\n advance (step = 1) {\n this.p += step\n }\n\n end () {\n return this.p >= this.N\n }\n\n readTo (end: string): number {\n while (this.p < this.N) {\n ++this.p\n if (this.rmatch(end)) return this.p\n }\n return -1\n }\n\n readValue (): ValueToken | undefined {\n this.skipBlank()\n const begin = this.p\n const variable = this.readLiteral() || this.readQuoted() || this.readRange() || this.readNumber()\n const props = this.readProperties(!variable)\n if (!props.length) return variable\n return new PropertyAccessToken(variable, props, this.input, begin, this.p)\n }\n\n readScopeValue (): ValueToken | undefined {\n this.skipBlank()\n const begin = this.p\n const props = this.readProperties()\n if (!props.length) return undefined\n return new PropertyAccessToken(undefined, props, this.input, begin, this.p)\n }\n\n private readProperties (isBegin = true): (ValueToken | IdentifierToken)[] {\n const props: (ValueToken | IdentifierToken)[] = []\n while (true) {\n if (this.peek() === '[') {\n this.p++\n const prop = this.readValue() || new IdentifierToken(this.input, this.p, this.p, this.file)\n this.assert(this.readTo(']') !== -1, '[ not closed')\n props.push(prop)\n continue\n }\n if (isBegin && !props.length) {\n const prop = this.readNonEmptyIdentifier()\n if (prop) {\n props.push(prop)\n continue\n }\n }\n if (this.peek() === '.' && this.peek(1) !== '.') { // skip range syntax\n this.p++\n const prop = this.readNonEmptyIdentifier()\n if (!prop) break\n props.push(prop)\n continue\n }\n break\n }\n return props\n }\n\n readNumber (): NumberToken | undefined {\n this.skipBlank()\n let decimalFound = false\n let digitFound = false\n let n = 0\n if (this.peekType() & SIGN) n++\n while (this.p + n <= this.N) {\n if (this.peekType(n) & NUMBER) {\n digitFound = true\n n++\n } else if (this.peek(n) === '.' && this.peek(n + 1) !== '.') {\n if (decimalFound || !digitFound) return\n decimalFound = true\n n++\n } else break\n }\n if (digitFound && !isWord(this.peek(n))) {\n const num = new NumberToken(this.input, this.p, this.p + n, this.file)\n this.advance(n)\n return num\n }\n }\n\n readLiteral (): LiteralToken | undefined {\n this.skipBlank()\n const end = this.matchTrie(this.literalTrie)\n if (end === -1) return\n const literal = new LiteralToken(this.input, this.p, end, this.file)\n this.p = end\n return literal\n }\n\n readRange (): RangeToken | undefined {\n this.skipBlank()\n const begin = this.p\n if (this.peek() !== '(') return\n ++this.p\n const lhs = this.readValueOrThrow()\n this.p += 2\n const rhs = this.readValueOrThrow()\n ++this.p\n return new RangeToken(this.input, begin, this.p, lhs, rhs, this.file)\n }\n\n readValueOrThrow (): ValueToken {\n const value = this.readValue()\n this.assert(value, () => `unexpected token ${this.snapshot()}, value expected`)\n return value!\n }\n\n readQuoted (): QuotedToken | undefined {\n this.skipBlank()\n const begin = this.p\n if (!(this.peekType() & QUOTE)) return\n ++this.p\n let escaped = false\n while (this.p < this.N) {\n ++this.p\n if (this.input[this.p - 1] === this.input[begin] && !escaped) break\n if (escaped) escaped = false\n else if (this.input[this.p - 1] === '\\\\') escaped = true\n }\n return new QuotedToken(this.input, begin, this.p, this.file)\n }\n\n * readFileNameTemplate (options: NormalizedFullOptions): IterableIterator<TopLevelToken> {\n const { outputDelimiterLeft } = options\n const htmlStopStrings = [',', ' ', outputDelimiterLeft]\n const htmlStopStringSet = new Set(htmlStopStrings)\n // break on ',' and ' ', outputDelimiterLeft only stops HTML token\n while (this.p < this.N && !htmlStopStringSet.has(this.peek())) {\n yield this.match(outputDelimiterLeft)\n ? this.readOutputToken(options)\n : this.readHTMLToken(htmlStopStrings)\n }\n }\n\n match (word: string) {\n for (let i = 0; i < word.length; i++) {\n if (word[i] !== this.input[this.p + i]) return false\n }\n return true\n }\n\n rmatch (pattern: string) {\n for (let i = 0; i < pattern.length; i++) {\n if (pattern[pattern.length - 1 - i] !== this.input[this.p - 1 - i]) return false\n }\n return true\n }\n\n peekType (n = 0) {\n return this.p + n >= this.N ? 0 : TYPES[this.input.charCodeAt(this.p + n)]\n }\n\n peek (n = 0): string {\n return this.p + n >= this.N ? '' : this.input[this.p + n]\n }\n\n skipBlank () {\n while (this.peekType() & BLANK) ++this.p\n }\n}\n","import { Token, TopLevelToken } from '../tokens'\nimport { Template } from '../template'\nimport { isTagToken } from '../util'\n\ntype ParseToken<T extends Token> = ((token: T, remainTokens: T[]) => Template)\n\nexport class ParseStream<T extends Token = TopLevelToken> {\n private tokens: T[]\n private handlers: Record<string, (arg: any) => void> = {}\n private stopRequested = false\n private parseToken: ParseToken<T>\n\n public constructor (tokens: T[], parseToken: ParseToken<T>) {\n this.tokens = tokens\n this.parseToken = parseToken\n }\n public on<T2 extends Template | T | undefined> (name: string, cb: (this: ParseStream, arg: T2) => void): ParseStream<T> {\n this.handlers[name] = cb\n return this\n }\n private trigger <T extends Token | Template> (event: string, arg?: T) {\n const h = this.handlers[event]\n return h ? (h.call(this, arg), true) : false\n }\n public start () {\n this.trigger('start')\n let token: T | undefined\n while (!this.stopRequested && (token = this.tokens.shift())) {\n if (this.trigger('token', token)) continue\n if (isTagToken(token) && this.trigger(`tag:${token.name}`, token)) {\n continue\n }\n const template = this.parseToken(token, this.tokens)\n this.trigger('template', template)\n }\n if (!this.stopRequested) this.trigger('end')\n return this\n }\n public stop () {\n this.stopRequested = true\n return this\n }\n}\n","export abstract class TemplateImpl<T> {\n public token: T;\n public constructor (token: T) {\n this.token = token\n }\n}\n","import { TemplateImpl } from './template-impl'\nimport type { Emitter } from '../emitters/emitter'\nimport type { Tokenizer } from '../parser'\nimport type { Context } from '../context/context'\nimport type { TopLevelToken, TagToken } from '../tokens'\nimport type { Template } from './template'\nimport type { Liquid } from '../liquid'\n\nexport type TagRenderReturn = Generator<unknown, unknown, unknown> | Promise<unknown> | unknown\n\nexport abstract class Tag extends TemplateImpl<TagToken> implements Template {\n public name: string\n public liquid: Liquid\n protected tokenizer: Tokenizer\n\n public constructor (token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(token)\n this.name = token.name\n this.liquid = liquid\n this.tokenizer = token.tokenizer\n }\n public abstract render (ctx: Context, emitter: Emitter): TagRenderReturn;\n}\n\nexport interface TagClass {\n new(token: TagToken, tokens: TopLevelToken[], liquid: Liquid): Tag\n}\n","import { evalToken } from '../render/expression'\nimport { Context } from '../context/context'\nimport { Tokenizer } from '../parser/tokenizer'\nimport { Token } from '../tokens/token'\n\ntype HashValueTokens = Record<string, Token | undefined>\n\n/**\n * Key-Value Pairs Representing Tag Arguments\n * Example:\n * For the markup `, foo:'bar', coo:2 reversed %}`,\n * hash['foo'] === 'bar'\n * hash['coo'] === 2\n * hash['reversed'] === undefined\n */\nexport class Hash {\n hash: HashValueTokens = {}\n constructor (markup: string, jekyllStyle?: boolean) {\n const tokenizer = new Tokenizer(markup, {})\n for (const hash of tokenizer.readHashes(jekyllStyle)) {\n this.hash[hash.name.content] = hash.value\n }\n }\n * render (ctx: Context): Generator<unknown, Record<string, any>, unknown> {\n const hash = {}\n for (const key of Object.keys(this.hash)) {\n hash[key] = this.hash[key] === undefined ? true : yield evalToken(this.hash[key], ctx)\n }\n return hash\n }\n}\n","import { evalToken } from '../render'\nimport { Context } from '../context'\nimport { identify, isFunction } from '../util/underscore'\nimport { FilterHandler, FilterImplOptions } from './filter-impl-options'\nimport { FilterArg, isKeyValuePair } from '../parser/filter-arg'\nimport { Liquid } from '../liquid'\n\nexport class Filter {\n public name: string\n public args: FilterArg[]\n public readonly raw: boolean\n private handler: FilterHandler\n private liquid: Liquid\n\n public constructor (name: string, options: FilterImplOptions | undefined, args: FilterArg[], liquid: Liquid) {\n this.name = name\n this.handler = isFunction(options)\n ? options\n : (isFunction(options?.handler) ? options!.handler : identify)\n this.raw = !isFunction(options) && !!options?.raw\n this.args = args\n this.liquid = liquid\n }\n public * render (value: any, context: Context): IterableIterator<unknown> {\n const argv: any[] = []\n for (const arg of this.args as FilterArg[]) {\n if (isKeyValuePair(arg)) argv.push([arg[0], yield evalToken(arg[1], context)])\n else argv.push(yield evalToken(arg, context))\n }\n return yield this.handler.apply({ context, liquid: this.liquid }, [value, ...argv])\n }\n}\n","import { isArray } from '../util/underscore'\nimport { ValueToken } from '../tokens/value-token'\n\ntype KeyValuePair = [string?, ValueToken?]\n\nexport type FilterArg = ValueToken | KeyValuePair\n\nexport function isKeyValuePair (arr: FilterArg): arr is KeyValuePair {\n return isArray(arr)\n}\n","import { Filter } from './filter'\nimport { Expression } from '../render'\nimport { Tokenizer } from '../parser'\nimport { assert } from '../util'\nimport type { FilteredValueToken } from '../tokens'\nimport type { Liquid } from '../liquid'\nimport type { Context } from '../context'\n\nexport class Value {\n public readonly filters: Filter[] = []\n public readonly initial: Expression\n\n /**\n * @param str the value to be valuated, eg.: \"foobar\" | truncate: 3\n */\n public constructor (input: string | FilteredValueToken, liquid: Liquid) {\n const token: FilteredValueToken = typeof input === 'string'\n ? new Tokenizer(input, liquid.options.operators).readFilteredValue()\n : input\n this.initial = token.initial\n this.filters = token.filters.map(({ name, args }) => new Filter(name, this.getFilter(liquid, name), args, liquid))\n }\n public * value (ctx: Context, lenient?: boolean): Generator<unknown, unknown, unknown> {\n lenient = lenient || (ctx.opts.lenientIf && this.filters.length > 0 && this.filters[0].name === 'default')\n let val = yield this.initial.evaluate(ctx, lenient)\n\n for (const filter of this.filters) {\n val = yield filter.render(val, ctx)\n }\n return val\n }\n private getFilter (liquid: Liquid, name: string) {\n const impl = liquid.filters[name]\n assert(impl || !liquid.options.strictFilters, () => `undefined filter: ${name}`)\n return impl\n }\n}\n","import { Value } from './value'\nimport { Template, TemplateImpl } from '../template'\nimport { Context } from '../context/context'\nimport { Emitter } from '../emitters/emitter'\nimport { OutputToken } from '../tokens/output-token'\nimport { Tokenizer } from '../parser'\nimport { Liquid } from '../liquid'\nimport { Filter } from './filter'\n\nexport class Output extends TemplateImpl<OutputToken> implements Template {\n value: Value\n public constructor (token: OutputToken, liquid: Liquid) {\n super(token)\n const tokenizer = new Tokenizer(token.input, liquid.options.operators, token.file, token.contentRange)\n this.value = new Value(tokenizer.readFilteredValue(), liquid)\n const filters = this.value.filters\n const outputEscape = liquid.options.outputEscape\n if (!filters[filters.length - 1]?.raw && outputEscape) {\n filters.push(new Filter(toString.call(outputEscape), outputEscape, [], liquid))\n }\n }\n public * render (ctx: Context, emitter: Emitter): IterableIterator<unknown> {\n const val = yield this.value.value(ctx, false)\n emitter.write(val)\n }\n}\n","import { TemplateImpl, Template } from '../template'\nimport { HTMLToken } from '../tokens'\nimport { Context } from '../context'\nimport { Emitter } from '../emitters'\n\nexport class HTML extends TemplateImpl<HTMLToken> implements Template {\n private str: string\n public constructor (token: HTMLToken) {\n super(token)\n this.str = token.getContent()\n }\n public * render (ctx: Context, emitter: Emitter): IterableIterator<void> {\n emitter.write(this.str)\n }\n}\n","import { FS } from './fs'\nimport { assert, escapeRegex } from '../util'\n\nexport interface LoaderOptions {\n fs: FS;\n extname: string;\n root: string[];\n partials: string[];\n layouts: string[];\n relativeReference: boolean;\n}\nexport enum LookupType {\n Partials = 'partials',\n Layouts = 'layouts',\n Root = 'root'\n}\nexport class Loader {\n public shouldLoadRelative: (referencedFile: string) => boolean\n private options: LoaderOptions\n private contains: (root: string, file: string) => boolean\n\n constructor (options: LoaderOptions) {\n this.options = options\n if (options.relativeReference) {\n const sep = options.fs.sep\n assert(sep, '`fs.sep` is required for relative reference')\n const rRelativePath = new RegExp(['.' + sep, '..' + sep, './', '../'].map(prefix => escapeRegex(prefix)).join('|'))\n this.shouldLoadRelative = (referencedFile: string) => rRelativePath.test(referencedFile)\n } else {\n this.shouldLoadRelative = (referencedFile: string) => false\n }\n this.contains = this.options.fs.contains || (() => true)\n }\n\n public * lookup (file: string, type: LookupType, sync?: boolean, currentFile?: string): Generator<unknown, string, string> {\n const { fs } = this.options\n const dirs = this.options[type]\n for (const filepath of this.candidates(file, dirs, currentFile, type !== LookupType.Root)) {\n if (sync ? fs.existsSync(filepath) : yield fs.exists(filepath)) return filepath\n }\n throw this.lookupError(file, dirs)\n }\n\n public * candidates (file: string, dirs: string[], currentFile?: string, enforceRoot?: boolean) {\n const { fs, extname } = this.options\n if (this.shouldLoadRelative(file) && currentFile) {\n const referenced = fs.resolve(this.dirname(currentFile), file, extname)\n for (const dir of dirs) {\n if (!enforceRoot || this.contains(dir, referenced)) {\n // the relatively referenced file is within one of root dirs\n yield referenced\n break\n }\n }\n }\n for (const dir of dirs) {\n const referenced = fs.resolve(dir, file, extname)\n if (!enforceRoot || this.contains(dir, referenced)) {\n yield referenced\n }\n }\n if (fs.fallback !== undefined) {\n const filepath = fs.fallback(file)\n if (filepath !== undefined) yield filepath\n }\n }\n\n private dirname (path: string) {\n const fs = this.options.fs\n assert(fs.dirname, '`fs.dirname` is required for relative reference')\n return fs.dirname!(path)\n }\n\n private lookupError (file: string, roots: string[]) {\n const err = new Error('ENOENT') as any\n err.message = `ENOENT: Failed to lookup \"${file}\" in \"${roots}\"`\n err.code = 'ENOENT'\n return err\n }\n}\n","import { toPromise, assert, isTagToken, isOutputToken, ParseError } from '../util'\nimport { Tokenizer } from './tokenizer'\nimport { ParseStream } from './parse-stream'\nimport { TopLevelToken, OutputToken } from '../tokens'\nimport { Template, Output, HTML } from '../template'\nimport { LiquidCache } from '../cache'\nimport { FS, Loader, LookupType } from '../fs'\nimport { LiquidError, LiquidErrors } from '../util/error'\nimport type { Liquid } from '../liquid'\n\nexport class Parser {\n public parseFile: (file: string, sync?: boolean, type?: LookupType, currentFile?: string) => Generator<unknown, Template[], Template[] | string>\n\n private liquid: Liquid\n private fs: FS\n private cache?: LiquidCache\n private loader: Loader\n\n public constructor (liquid: Liquid) {\n this.liquid = liquid\n this.cache = this.liquid.options.cache\n this.fs = this.liquid.options.fs\n this.parseFile = this.cache ? this._parseFileCached : this._parseFile\n this.loader = new Loader(this.liquid.options)\n }\n public parse (html: string, filepath?: string): Template[] {\n const tokenizer = new Tokenizer(html, this.liquid.options.operators, filepath)\n const tokens = tokenizer.readTopLevelTokens(this.liquid.options)\n return this.parseTokens(tokens)\n }\n public parseTokens (tokens: TopLevelToken[]) {\n let token\n const templates: Template[] = []\n const errors: LiquidError[] = []\n while ((token = tokens.shift())) {\n try {\n templates.push(this.parseToken(token, tokens))\n } catch (err) {\n if (this.liquid.options.catchAllErrors) errors.push(err as LiquidError)\n else throw err\n }\n }\n if (errors.length) throw new LiquidErrors(errors)\n return templates\n }\n public parseToken (token: TopLevelToken, remainTokens: TopLevelToken[]) {\n try {\n if (isTagToken(token)) {\n const TagClass = this.liquid.tags[token.name]\n assert(TagClass, `tag \"${token.name}\" not found`)\n return new TagClass(token, remainTokens, this.liquid)\n }\n if (isOutputToken(token)) {\n return new Output(token as OutputToken, this.liquid)\n }\n return new HTML(token)\n } catch (e) {\n if (LiquidError.is(e)) throw e\n throw new ParseError(e as Error, token)\n }\n }\n public parseStream (tokens: TopLevelToken[]) {\n return new ParseStream(tokens, (token, tokens) => this.parseToken(token, tokens))\n }\n private * _parseFileCached (file: string, sync?: boolean, type: LookupType = LookupType.Root, currentFile?: string): Generator<unknown, Template[], Template[]> {\n const cache = this.cache!\n const key = this.loader.shouldLoadRelative(file) ? currentFile + ',' + file : type + ':' + file\n const tpls = yield cache.read(key)\n if (tpls) return tpls\n\n const task = this._parseFile(file, sync, type, currentFile)\n // sync mode: exec the task and cache the result\n // async mode: cache the task before exec\n const taskOrTpl = sync ? yield task : toPromise(task)\n cache.write(key, taskOrTpl as any)\n // note: concurrent tasks will be reused, cache for failed task is removed until its end\n try { return yield taskOrTpl } catch (err) { cache.remove(key); throw err }\n }\n private * _parseFile (file: string, sync?: boolean, type: LookupType = LookupType.Root, currentFile?: string): Generator<unknown, Template[], string> {\n const filepath = yield this.loader.lookup(file, type, sync, currentFile)\n return this.liquid.parse(sync ? this.fs.readFileSync(filepath) : yield this.fs.readFile(filepath), filepath)\n }\n}\n","import { RangeToken, NumberToken, QuotedToken, LiteralToken, PropertyAccessToken, OutputToken, HTMLToken, TagToken, IdentifierToken, DelimitedToken, OperatorToken } from '../tokens'\nimport { TokenKind } from '../parser'\n\nexport function isDelimitedToken (val: any): val is DelimitedToken {\n return !!(getKind(val) & TokenKind.Delimited)\n}\n\nexport function isOperatorToken (val: any): val is OperatorToken {\n return getKind(val) === TokenKind.Operator\n}\n\nexport function isHTMLToken (val: any): val is HTMLToken {\n return getKind(val) === TokenKind.HTML\n}\n\nexport function isOutputToken (val: any): val is OutputToken {\n return getKind(val) === TokenKind.Output\n}\n\nexport function isTagToken (val: any): val is TagToken {\n return getKind(val) === TokenKind.Tag\n}\n\nexport function isQuotedToken (val: any): val is QuotedToken {\n return getKind(val) === TokenKind.Quoted\n}\n\nexport function isLiteralToken (val: any): val is LiteralToken {\n return getKind(val) === TokenKind.Literal\n}\n\nexport function isNumberToken (val: any): val is NumberToken {\n return getKind(val) === TokenKind.Number\n}\n\nexport function isPropertyAccessToken (val: any): val is PropertyAccessToken {\n return getKind(val) === TokenKind.PropertyAccess\n}\n\nexport function isWordToken (val: any): val is IdentifierToken {\n return getKind(val) === TokenKind.Word\n}\n\nexport function isRangeToken (val: any): val is RangeToken {\n return getKind(val) === TokenKind.Range\n}\n\nfunction getKind (val: any) {\n return val ? val.kind : -1\n}\n","export enum TokenKind {\n Number = 1,\n Literal = 2,\n Tag = 4,\n Output = 8,\n HTML = 16,\n Filter = 32,\n Hash = 64,\n PropertyAccess = 128,\n Word = 256,\n Range = 512,\n Quoted = 1024,\n Operator = 2048,\n FilteredValue = 4096,\n Delimited = Tag | Output\n}\n","export enum BlockMode {\n /* store rendered html into blocks */\n OUTPUT,\n /* output rendered html directly */\n STORE\n}\n","import { Drop } from '../drop/drop'\nimport { __assign } from 'tslib'\nimport { NormalizedFullOptions, defaultOptions, RenderOptions } from '../liquid-options'\nimport { Scope } from './scope'\nimport { isArray, isNil, isUndefined, isString, isFunction, toLiquid, InternalUndefinedVariableError, toValueSync, isObject } from '../util'\n\ntype PropertyKey = string | number;\n\nexport class Context {\n /**\n * insert a Context-level empty scope,\n * for tags like `{% capture %}` `{% assign %}` to operate\n */\n private scopes: Scope[] = [{}]\n private registers = {}\n /**\n * user passed in scope\n * `{% increment %}`, `{% decrement %}` changes this scope,\n * whereas `{% capture %}`, `{% assign %}` only hide this scope\n */\n public environments: Scope\n /**\n * global scope used as fallback for missing variables\n */\n public globals: Scope\n public sync: boolean\n /**\n * The normalized liquid options object\n */\n public opts: NormalizedFullOptions\n /**\n * Throw when accessing undefined variable?\n */\n public strictVariables: boolean;\n public ownPropertyOnly: boolean;\n public constructor (env: object = {}, opts: NormalizedFullOptions = defaultOptions, renderOptions: RenderOptions = {}) {\n this.sync = !!renderOptions.sync\n this.opts = opts\n this.globals = renderOptions.globals ?? opts.globals\n this.environments = isObject(env) ? env : Object(env)\n this.strictVariables = renderOptions.strictVariables ?? this.opts.strictVariables\n this.ownPropertyOnly = renderOptions.ownPropertyOnly ?? opts.ownPropertyOnly\n }\n public getRegister (key: string) {\n return (this.registers[key] = this.registers[key] || {})\n }\n public setRegister (key: string, value: any) {\n return (this.registers[key] = value)\n }\n public saveRegister (...keys: string[]): [string, any][] {\n return keys.map(key => [key, this.getRegister(key)])\n }\n public restoreRegister (keyValues: [string, any][]) {\n return keyValues.forEach(([key, value]) => this.setRegister(key, value))\n }\n public getAll () {\n return [this.globals, this.environments, ...this.scopes]\n .reduce((ctx, val) => __assign(ctx, val), {})\n }\n /**\n * @deprecated use `_get()` or `getSync()` instead\n */\n public get (paths: PropertyKey[]): unknown {\n return this.getSync(paths)\n }\n public getSync (paths: PropertyKey[]): unknown {\n return toValueSync(this._get(paths))\n }\n public * _get (paths: PropertyKey[]): IterableIterator<unknown> {\n const scope = this.findScope(paths[0])\n return yield this._getFromScope(scope, paths)\n }\n /**\n * @deprecated use `_get()` instead\n */\n public getFromScope (scope: unknown, paths: PropertyKey[] | string): IterableIterator<unknown> {\n return toValueSync(this._getFromScope(scope, paths))\n }\n public * _getFromScope (scope: unknown, paths: PropertyKey[] | string, strictVariables = this.strictVariables): IterableIterator<unknown> {\n if (isString(paths)) paths = paths.split('.')\n for (let i = 0; i < paths.length; i++) {\n scope = yield readProperty(scope as object, paths[i], this.ownPropertyOnly)\n if (strictVariables && isUndefined(scope)) {\n throw new InternalUndefinedVariableError((paths as string[]).slice(0, i + 1).join!('.'))\n }\n }\n return scope\n }\n public push (ctx: object) {\n return this.scopes.push(ctx)\n }\n public pop () {\n return this.scopes.pop()\n }\n public bottom () {\n return this.scopes[0]\n }\n private findScope (key: string | number) {\n for (let i = this.scopes.length - 1; i >= 0; i--) {\n const candidate = this.scopes[i]\n if (key in candidate) return candidate\n }\n if (key in this.environments) return this.environments\n return this.globals\n }\n}\n\nexport function readProperty (obj: Scope, key: PropertyKey, ownPropertyOnly: boolean) {\n obj = toLiquid(obj)\n if (isNil(obj)) return obj\n if (isArray(obj) && key < 0) return obj[obj.length + +key]\n const value = readJSProperty(obj, key, ownPropertyOnly)\n if (value === undefined && obj instanceof Drop) return obj.liquidMethodMissing(key)\n if (isFunction(value)) return value.call(obj)\n if (key === 'size') return readSize(obj)\n else if (key === 'first') return readFirst(obj)\n else if (key === 'last') return readLast(obj)\n return value\n}\nexport function readJSProperty (obj: Scope, key: PropertyKey, ownPropertyOnly: boolean) {\n if (ownPropertyOnly && !Object.hasOwnProperty.call(obj, key) && !(obj instanceof Drop)) return undefined\n return obj[key]\n}\n\nfunction readFirst (obj: Scope) {\n if (isArray(obj)) return obj[0]\n return obj['first']\n}\n\nfunction readLast (obj: Scope) {\n if (isArray(obj)) return obj[obj.length - 1]\n return obj['last']\n}\n\nfunction readSize (obj: Scope) {\n if (obj.hasOwnProperty('size') || obj['size'] !== undefined) return obj['size']\n if (isArray(obj) || isString(obj)) return obj.length\n if (typeof obj === 'object') return Object.keys(obj).length\n}\n","import { toValue, argumentsToValue } from '../util/underscore'\n\nexport const abs = argumentsToValue(Math.abs)\nexport const at_least = argumentsToValue(Math.max)\nexport const at_most = argumentsToValue(Math.min)\nexport const ceil = argumentsToValue(Math.ceil)\nexport const divided_by = argumentsToValue((dividend: number, divisor: number, integerArithmetic = false) => integerArithmetic ? Math.floor(dividend / divisor) : dividend / divisor)\nexport const floor = argumentsToValue(Math.floor)\nexport const minus = argumentsToValue((v: number, arg: number) => v - arg)\nexport const modulo = argumentsToValue((v: number, arg: number) => v % arg)\nexport const times = argumentsToValue((v: number, arg: number) => v * arg)\n\nexport function round (v: number, arg = 0) {\n v = toValue(v)\n arg = toValue(arg)\n const amp = Math.pow(10, arg)\n return Math.round(v * amp) / amp\n}\n\nexport function plus (v: number, arg: number) {\n v = toValue(v)\n arg = toValue(arg)\n return Number(v) + Number(arg)\n}\n","import { stringify } from '../util/underscore'\n\nexport const url_decode = (x: string) => decodeURIComponent(stringify(x)).replace(/\\+/g, ' ')\nexport const url_encode = (x: string) => encodeURIComponent(stringify(x)).replace(/%20/g, '+')\nexport const cgi_escape = (x: string) => encodeURIComponent(stringify(x))\n .replace(/%20/g, '+')\n .replace(/[!'()*]/g, c => '%' + c.charCodeAt(0).toString(16).toUpperCase())\nexport const uri_escape = (x: string) => encodeURI(stringify(x))\n .replace(/%5B/g, '[')\n .replace(/%5D/g, ']')\n\nconst rSlugifyDefault = /[^\\p{M}\\p{L}\\p{Nd}]+/ug\nconst rSlugifyReplacers = {\n 'raw': /\\s+/g,\n 'default': rSlugifyDefault,\n 'pretty': /[^\\p{M}\\p{L}\\p{Nd}._~!$&'()+,;=@]+/ug,\n 'ascii': /[^A-Za-z0-9]+/g,\n 'latin': rSlugifyDefault,\n 'none': null\n}\n\nexport function slugify (str: string, mode: keyof typeof rSlugifyReplacers = 'default', cased = false): string {\n str = stringify(str)\n\n const replacer = rSlugifyReplacers[mode]\n if (replacer) {\n if (mode === 'latin') str = removeAccents(str)\n str = str.replace(replacer, '-').replace(/^-|-$/g, '')\n }\n\n return cased ? str : str.toLowerCase()\n}\n\nfunction removeAccents (str: string): string {\n return str.replace(/[àáâãäå]/g, 'a')\n .replace(/[æ]/g, 'ae')\n .replace(/[ç]/g, 'c')\n .replace(/[èéêë]/g, 'e')\n .replace(/[ìíîï]/g, 'i')\n .replace(/[ð]/g, 'd')\n .replace(/[ñ]/g, 'n')\n .replace(/[òóôõöø]/g, 'o')\n .replace(/[ùúûü]/g, 'u')\n .replace(/[ýÿ]/g, 'y')\n .replace(/[ß]/g, 'ss')\n .replace(/[œ]/g, 'oe')\n .replace(/[þ]/g, 'th')\n .replace(/[ẞ]/g, 'SS')\n .replace(/[Œ]/g, 'OE')\n .replace(/[Þ]/g, 'TH')\n}\n","import { toArray, argumentsToValue, toValue, stringify, caseInsensitiveCompare, isArray, isNil, last as arrayLast, hasOwnProperty } from '../util'\nimport { equals, evalToken, isTruthy } from '../render'\nimport { Value, FilterImpl } from '../template'\nimport { Context, Scope } from '../context'\nimport { Tokenizer } from '../parser'\n\nexport const join = argumentsToValue((v: any[], arg: string) => toArray(v).join(arg === undefined ? ' ' : arg))\nexport const last = argumentsToValue((v: any) => isArray(v) ? arrayLast(v) : '')\nexport const first = argumentsToValue((v: any) => isArray(v) ? v[0] : '')\nexport const reverse = argumentsToValue((v: any[]) => [...toArray(v)].reverse())\n\nexport function * sort<T> (this: FilterImpl, arr: T[], property?: string): IterableIterator<unknown> {\n const values: [T, string | number][] = []\n for (const item of toArray(arr)) {\n values.push([\n item,\n property ? yield this.context._getFromScope(item, stringify(property).split('.'), false) : item\n ])\n }\n return values.sort((lhs, rhs) => {\n const lvalue = lhs[1]\n const rvalue = rhs[1]\n return lvalue < rvalue ? -1 : (lvalue > rvalue ? 1 : 0)\n }).map(tuple => tuple[0])\n}\n\nexport function sort_natural<T> (input: T[], property?: string) {\n const propertyString = stringify(property)\n const compare = property === undefined\n ? caseInsensitiveCompare\n : (lhs: T, rhs: T) => caseInsensitiveCompare(lhs[propertyString], rhs[propertyString])\n return [...toArray(input)].sort(compare)\n}\n\nexport const size = (v: string | any[]) => (v && v.length) || 0\n\nexport function * map (this: FilterImpl, arr: Scope[], property: string): IterableIterator<unknown> {\n const results = []\n for (const item of toArray(arr)) {\n results.push(yield this.context._getFromScope(item, stringify(property), false))\n }\n return results\n}\n\nexport function * sum (this: FilterImpl, arr: Scope[], property?: string): IterableIterator<unknown> {\n let sum = 0\n for (const item of toArray(arr)) {\n const data = Number(property ? yield this.context._getFromScope(item, stringify(property), false) : item)\n sum += Number.isNaN(data) ? 0 : data\n }\n return sum\n}\n\nexport function compact<T> (this: FilterImpl, arr: T[]) {\n return toArray(arr).filter(x => !isNil(toValue(x)))\n}\n\nexport function concat<T1, T2> (v: T1[], arg: T2[] = []): (T1 | T2)[] {\n return toArray(v).concat(toArray(arg))\n}\n\nexport function push<T> (v: T[], arg: T): T[] {\n return concat(v, [arg])\n}\n\nexport function unshift<T> (v: T[], arg: T): T[] {\n const clone = [...toArray(v)]\n clone.unshift(arg)\n return clone\n}\n\nexport function pop<T> (v: T[]): T[] {\n const clone = [...toArray(v)]\n clone.pop()\n return clone\n}\n\nexport function shift<T> (v: T[]): T[] {\n const clone = [...toArray(v)]\n clone.shift()\n return clone\n}\n\nexport function slice<T> (v: T[] | string, begin: number, length = 1): T[] | string {\n v = toValue(v)\n if (isNil(v)) return []\n if (!isArray(v)) v = stringify(v)\n begin = begin < 0 ? v.length + begin : begin\n return v.slice(begin, begin + length)\n}\n\nexport function * where<T extends object> (this: FilterImpl, arr: T[], property: string, expected?: any): IterableIterator<unknown> {\n const values: unknown[] = []\n arr = toArray(arr)\n const token = new Tokenizer(stringify(property)).readScopeValue()\n for (const item of arr) {\n values.push(yield evalToken(token, new Context(item)))\n }\n return arr.filter((_, i) => {\n if (expected === undefined) return isTruthy(values[i], this.context)\n return equals(values[i], expected)\n })\n}\n\nexport function * where_exp<T extends object> (this: FilterImpl, arr: T[], itemName: string, exp: string): IterableIterator<unknown> {\n const filtered: unknown[] = []\n const keyTemplate = new Value(stringify(exp), this.liquid)\n for (const item of toArray(arr)) {\n const value = yield keyTemplate.value(new Context({ [itemName]: item }))\n if (value) filtered.push(item)\n }\n return filtered\n}\n\nexport function * group_by<T extends object> (arr: T[], property: string): IterableIterator<unknown> {\n const map = new Map()\n arr = toArray(arr)\n const token = new Tokenizer(stringify(property)).readScopeValue()\n for (const item of arr) {\n const key = yield evalToken(token, new Context(item))\n if (!map.has(key)) map.set(key, [])\n map.get(key).push(item)\n }\n return [...map.entries()].map(([name, items]) => ({ name, items }))\n}\n\nexport function * group_by_exp<T extends object> (this: FilterImpl, arr: T[], itemName: string, exp: string): IterableIterator<unknown> {\n const map = new Map()\n const keyTemplate = new Value(stringify(exp), this.liquid)\n for (const item of toArray(arr)) {\n const key = yield keyTemplate.value(new Context({ [itemName]: item }))\n if (!map.has(key)) map.set(key, [])\n map.get(key).push(item)\n }\n return [...map.entries()].map(([name, items]) => ({ name, items }))\n}\n\nexport function * find<T extends object> (this: FilterImpl, arr: T[], property: string, expected: string): IterableIterator<unknown> {\n const token = new Tokenizer(stringify(property)).readScopeValue()\n for (const item of toArray(arr)) {\n const value = yield evalToken(token, new Context(item))\n if (equals(value, expected)) return item\n }\n return null\n}\n\nexport function * find_exp<T extends object> (this: FilterImpl, arr: T[], itemName: string, exp: string): IterableIterator<unknown> {\n const predicate = new Value(stringify(exp), this.liquid)\n for (const item of toArray(arr)) {\n const value = yield predicate.value(new Context({ [itemName]: item }))\n if (value) return item\n }\n return null\n}\n\nexport function uniq<T> (arr: T[]): T[] {\n arr = toValue(arr)\n const u = {}\n return (arr || []).filter(val => {\n if (hasOwnProperty.call(u, String(val))) return false\n u[String(val)] = true\n return true\n })\n}\n\nexport function sample<T> (v: T[] | string, count = 1): T | string | (T | string)[] {\n v = toValue(v)\n if (isNil(v)) return []\n if (!isArray(v)) v = stringify(v)\n const shuffled = [...v].sort(() => Math.random() - 0.5)\n if (count === 1) return shuffled[0]\n return shuffled.slice(0, count)\n}\n","import { toValue, stringify, isString, isNumber, TimezoneDate, LiquidDate, strftime, isNil } from '../util'\nimport { FilterImpl } from '../template'\nimport { LiquidOptions } from '../liquid-options'\n\nexport function date (this: FilterImpl, v: string | Date, format?: string, timezoneOffset?: number | string) {\n const date = parseDate(v, this.context.opts, timezoneOffset)\n if (!date) return v\n format = toValue(format)\n format = isNil(format) ? this.context.opts.dateFormat : stringify(format)\n return strftime(date, format)\n}\n\nexport function date_to_xmlschema (this: FilterImpl, v: string | Date) {\n return date.call(this, v, '%Y-%m-%dT%H:%M:%S%:z')\n}\n\nexport function date_to_rfc822 (this: FilterImpl, v: string | Date) {\n return date.call(this, v, '%a, %d %b %Y %H:%M:%S %z')\n}\n\nexport function date_to_string (this: FilterImpl, v: string | Date, type?: string, style?: string) {\n return stringify_date.call(this, v, '%b', type, style)\n}\n\nexport function date_to_long_string (this: FilterImpl, v: string | Date, type?: string, style?: string) {\n return stringify_date.call(this, v, '%B', type, style)\n}\n\nfunction stringify_date (this: FilterImpl, v: string | Date, month_type: string, type?: string, style?: string) {\n const date = parseDate(v, this.context.opts)\n if (!date) return v\n if (type === 'ordinal') {\n const d = date.getDate()\n return style === 'US'\n ? strftime(date, `${month_type} ${d}%q, %Y`)\n : strftime(date, `${d}%q ${month_type} %Y`)\n }\n return strftime(date, `%d ${month_type} %Y`)\n}\n\nfunction parseDate (v: string | Date, opts: LiquidOptions, timezoneOffset?: number | string): LiquidDate | undefined {\n let date: LiquidDate\n v = toValue(v)\n if (v === 'now' || v === 'today') {\n date = new Date()\n } else if (isNumber(v)) {\n date = new Date(v * 1000)\n } else if (isString(v)) {\n if (/^\\d+$/.test(v)) {\n date = new Date(+v * 1000)\n } else if (opts.preserveTimezones) {\n date = TimezoneDate.createDateFixedToTimezone(v)\n } else {\n date = new Date(v)\n }\n } else {\n date = v\n }\n if (!isValidDate(date)) return\n if (timezoneOffset !== undefined) {\n date = new TimezoneDate(date, timezoneOffset)\n } else if (!(date instanceof TimezoneDate) && opts.timezoneOffset !== undefined) {\n date = new TimezoneDate(date, opts.timezoneOffset)\n }\n return date\n}\n\nfunction isValidDate (date: any): date is Date {\n return (date instanceof Date || date instanceof TimezoneDate) && !isNaN(date.getTime())\n}\n","/**\n * String related filters\n *\n * * prefer stringify() to String() since `undefined`, `null` should eval ''\n */\n\n// Han (Chinese) characters: \\u4E00-\\u9FFF\n// Additional Han characters: \\uF900-\\uFAFF (CJK Compatibility Ideographs)\n// Additional Han characters: \\u3400-\\u4DBF (CJK Unified Ideographs Extension A)\n// Katakana (Japanese): \\u30A0-\\u30FF\n// Hiragana (Japanese): \\u3040-\\u309F\n// Hangul (Korean): \\uAC00-\\uD7AF\nimport { assert, escapeRegExp, stringify } from '../util'\n\nconst rCJKWord = /[\\u4E00-\\u9FFF\\uF900-\\uFAFF\\u3400-\\u4DBF\\u3040-\\u309F\\u30A0-\\u30FF\\uAC00-\\uD7AF]/gu\n\n// Word boundary followed by word characters (for detecting words)\nconst rNonCJKWord = /[^\\u4E00-\\u9FFF\\uF900-\\uFAFF\\u3400-\\u4DBF\\u3040-\\u309F\\u30A0-\\u30FF\\uAC00-\\uD7AF\\s]+/gu\n\nexport function append (v: string, arg: string) {\n assert(arguments.length === 2, 'append expect 2 arguments')\n return stringify(v) + stringify(arg)\n}\n\nexport function prepend (v: string, arg: string) {\n assert(arguments.length === 2, 'prepend expect 2 arguments')\n return stringify(arg) + stringify(v)\n}\n\nexport function lstrip (v: string, chars?: string) {\n if (chars) {\n chars = escapeRegExp(stringify(chars))\n return stringify(v).replace(new RegExp(`^[${chars}]+`, 'g'), '')\n }\n return stringify(v).replace(/^\\s+/, '')\n}\n\nexport function downcase (v: string) {\n return stringify(v).toLowerCase()\n}\n\nexport function upcase (str: string) {\n return stringify(str).toUpperCase()\n}\n\nexport function remove (v: string, arg: string) {\n return stringify(v).split(stringify(arg)).join('')\n}\n\nexport function remove_first (v: string, l: string) {\n return stringify(v).replace(stringify(l), '')\n}\n\nexport function remove_last (v: string, l: string) {\n const str = stringify(v)\n const pattern = stringify(l)\n const index = str.lastIndexOf(pattern)\n if (index === -1) return str\n return str.substring(0, index) + str.substring(index + pattern.length)\n}\n\nexport function rstrip (str: string, chars?: string) {\n if (chars) {\n chars = escapeRegExp(stringify(chars))\n return stringify(str).replace(new RegExp(`[${chars}]+$`, 'g'), '')\n }\n return stringify(str).replace(/\\s+$/, '')\n}\n\nexport function split (v: string, arg: string) {\n const arr = stringify(v).split(stringify(arg))\n // align to ruby split, which is the behavior of shopify/liquid\n // see: https://ruby-doc.org/core-2.4.0/String.html#method-i-split\n while (arr.length && arr[arr.length - 1] === '') arr.pop()\n return arr\n}\n\nexport function strip (v: string, chars?: string) {\n if (chars) {\n chars = escapeRegExp(stringify(chars))\n return stringify(v)\n .replace(new RegExp(`^[${chars}]+`, 'g'), '')\n .replace(new RegExp(`[${chars}]+$`, 'g'), '')\n }\n return stringify(v).trim()\n}\n\nexport function strip_newlines (v: string) {\n return stringify(v).replace(/\\r?\\n/gm, '')\n}\n\nexport function capitalize (str: string) {\n str = stringify(str)\n return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase()\n}\n\nexport function replace (v: string, pattern: string, replacement: string) {\n return stringify(v).split(stringify(pattern)).join(replacement)\n}\n\nexport function replace_first (v: string, arg1: string, arg2: string) {\n return stringify(v).replace(stringify(arg1), arg2)\n}\n\nexport function replace_last (v: string, arg1: string, arg2: string) {\n const str = stringify(v)\n const pattern = stringify(arg1)\n const index = str.lastIndexOf(pattern)\n if (index === -1) return str\n const replacement = stringify(arg2)\n return str.substring(0, index) + replacement + str.substring(index + pattern.length)\n}\n\nexport function truncate (v: string, l = 50, o = '...') {\n v = stringify(v)\n if (v.length <= l) return v\n return v.substring(0, l - o.length) + o\n}\n\nexport function truncatewords (v: string, words = 15, o = '...') {\n const arr = stringify(v).split(/\\s+/)\n if (words <= 0) words = 1\n let ret = arr.slice(0, words).join(' ')\n if (arr.length >= words) ret += o\n return ret\n}\n\nexport function normalize_whitespace (v: string) {\n v = stringify(v)\n return v.replace(/\\s+/g, ' ')\n}\n\nexport function number_of_words (input: string, mode?: 'cjk' | 'auto') {\n input = stringify(input).trim()\n if (!input) return 0\n switch (mode) {\n case 'cjk':\n // Count CJK characters and words\n return (input.match(rCJKWord) || []).length + (input.match(rNonCJKWord) || []).length\n case 'auto':\n // Count CJK characters, if none, count words\n return rCJKWord.test(input)\n ? input.match(rCJKWord)!.length + (input.match(rNonCJKWord) || []).length\n : input.split(/\\s+/).length\n default:\n // Count words only\n return input.split(/\\s+/).length\n }\n}\n\nexport function array_to_sentence_string (array: unknown[], connector = 'and') {\n switch (array.length) {\n case 0:\n return ''\n case 1:\n return array[0]\n case 2:\n return `${array[0]} ${connector} ${array[1]}`\n default:\n return `${array.slice(0, -1).join(', ')}, ${connector} ${array[array.length - 1]}`\n }\n}\n","import * as htmlFilters from './html'\nimport * as mathFilters from './math'\nimport * as urlFilters from './url'\nimport * as arrayFilters from './array'\nimport * as dateFilters from './date'\nimport * as stringFilters from './string'\nimport misc from './misc'\nimport { FilterImplOptions } from '../template'\n\nexport const filters: Record<string, FilterImplOptions> = {\n ...htmlFilters,\n ...mathFilters,\n ...urlFilters,\n ...arrayFilters,\n ...dateFilters,\n ...stringFilters,\n ...misc\n}\n","import { Value, Liquid, TopLevelToken, TagToken, Context, Tag } from '..'\nexport default class extends Tag {\n private key: string\n private value: Value\n\n constructor (token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(token, remainTokens, liquid)\n this.key = this.tokenizer.readIdentifier().content\n this.tokenizer.assert(this.key, 'expected variable name')\n\n this.tokenizer.skipBlank()\n this.tokenizer.assert(this.tokenizer.peek() === '=', 'expected \"=\"')\n\n this.tokenizer.advance()\n this.value = new Value(this.tokenizer.readFilteredValue(), this.liquid)\n }\n * render (ctx: Context): Generator<unknown, void, unknown> {\n ctx.bottom()[this.key] = yield this.value.value(ctx, this.liquid.options.lenientIf)\n }\n}\n","import { Hash, ValueToken, Liquid, Tag, evalToken, Emitter, TagToken, TopLevelToken, Context, Template, ParseStream } from '..'\nimport { toEnumerable } from '../util'\nimport { ForloopDrop } from '../drop/forloop-drop'\n\nconst MODIFIERS = ['offset', 'limit', 'reversed']\n\ntype valueof<T> = T[keyof T]\n\nexport default class extends Tag {\n variable: string\n collection: ValueToken\n hash: Hash\n templates: Template[]\n elseTemplates: Template[]\n\n constructor (token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(token, remainTokens, liquid)\n const variable = this.tokenizer.readIdentifier()\n const inStr = this.tokenizer.readIdentifier()\n const collection = this.tokenizer.readValue()\n if (!variable.size() || inStr.content !== 'in' || !collection) {\n throw new Error(`illegal tag: ${token.getText()}`)\n }\n\n this.variable = variable.content\n this.collection = collection\n this.hash = new Hash(this.tokenizer.remaining())\n this.templates = []\n this.elseTemplates = []\n\n let p\n const stream: ParseStream = this.liquid.parser.parseStream(remainTokens)\n .on('start', () => (p = this.templates))\n .on('tag:else', () => (p = this.elseTemplates))\n .on('tag:endfor', () => stream.stop())\n .on('template', (tpl: Template) => p.push(tpl))\n .on('end', () => {\n throw new Error(`tag ${token.getText()} not closed`)\n })\n\n stream.start()\n }\n * render (ctx: Context, emitter: Emitter): Generator<unknown, void | string, Template[]> {\n const r = this.liquid.renderer\n let collection = toEnumerable(yield evalToken(this.collection, ctx))\n\n if (!collection.length) {\n yield r.renderTemplates(this.elseTemplates, ctx, emitter)\n return\n }\n\n const continueKey = 'continue-' + this.variable + '-' + this.collection.getText()\n ctx.push({ continue: ctx.getRegister(continueKey) })\n const hash = yield this.hash.render(ctx)\n ctx.pop()\n\n const modifiers = this.liquid.options.orderedFilterParameters\n ? Object.keys(hash).filter(x => MODIFIERS.includes(x))\n : MODIFIERS.filter(x => hash[x] !== undefined)\n\n collection = modifiers.reduce((collection, modifier: valueof<typeof MODIFIERS>) => {\n if (modifier === 'offset') return offset(collection, hash['offset'])\n if (modifier === 'limit') return limit(collection, hash['limit'])\n return reversed(collection)\n }, collection)\n\n ctx.setRegister(continueKey, (hash['offset'] || 0) + collection.length)\n const scope = { forloop: new ForloopDrop(collection.length, this.collection.getText(), this.variable) }\n ctx.push(scope)\n for (const item of collection) {\n scope[this.variable] = item\n yield r.renderTemplates(this.templates, ctx, emitter)\n if (emitter['break']) {\n emitter['break'] = false\n break\n }\n emitter['continue'] = false\n scope.forloop.next()\n }\n ctx.pop()\n }\n}\n\nfunction reversed<T> (arr: Array<T>) {\n return [...arr].reverse()\n}\n\nfunction offset<T> (arr: Array<T>, count: number) {\n return arr.slice(count)\n}\n\nfunction limit<T> (arr: Array<T>, count: number) {\n return arr.slice(0, count)\n}\n","import { Liquid, Tag, Template, Context, TagToken, TopLevelToken } from '..'\nimport { evalQuotedToken } from '../render'\nimport { isTagToken } from '../util'\n\nexport default class extends Tag {\n variable: string\n templates: Template[] = []\n constructor (tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(tagToken, remainTokens, liquid)\n this.variable = this.readVariableName()\n\n while (remainTokens.length) {\n const token = remainTokens.shift()!\n if (isTagToken(token) && token.name === 'endcapture') return\n this.templates.push(liquid.parser.parseToken(token, remainTokens))\n }\n throw new Error(`tag ${tagToken.getText()} not closed`)\n }\n * render (ctx: Context): Generator<unknown, void, string> {\n const r = this.liquid.renderer\n const html = yield r.renderTemplates(this.templates, ctx)\n ctx.bottom()[this.variable] = html\n }\n private readVariableName () {\n const word = this.tokenizer.readIdentifier().content\n if (word) return word\n const quoted = this.tokenizer.readQuoted()\n if (quoted) return evalQuotedToken(quoted)\n throw this.tokenizer.error('invalid capture name')\n }\n}\n","import { ValueToken, Liquid, toValue, evalToken, Value, Emitter, TagToken, TopLevelToken, Context, Template, Tag, ParseStream } from '..'\nimport { equals } from '../render'\n\nexport default class extends Tag {\n value: Value\n branches: { values: ValueToken[], templates: Template[] }[] = []\n elseTemplates: Template[] = []\n constructor (tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(tagToken, remainTokens, liquid)\n this.value = new Value(this.tokenizer.readFilteredValue(), this.liquid)\n this.elseTemplates = []\n\n let p: Template[] = []\n let elseCount = 0\n const stream: ParseStream = this.liquid.parser.parseStream(remainTokens)\n .on('tag:when', (token: TagToken) => {\n if (elseCount > 0) {\n return\n }\n\n p = []\n\n const values: ValueToken[] = []\n while (!token.tokenizer.end()) {\n values.push(token.tokenizer.readValueOrThrow())\n token.tokenizer.skipBlank()\n if (token.tokenizer.peek() === ',') {\n token.tokenizer.readTo(',')\n } else {\n token.tokenizer.readTo('or')\n }\n }\n this.branches.push({\n values,\n templates: p\n })\n })\n .on('tag:else', () => {\n elseCount++\n p = this.elseTemplates\n })\n .on('tag:endcase', () => stream.stop())\n .on('template', (tpl: Template) => {\n if (p !== this.elseTemplates || elseCount === 1) {\n p.push(tpl)\n }\n })\n .on('end', () => {\n throw new Error(`tag ${tagToken.getText()} not closed`)\n })\n\n stream.start()\n }\n\n * render (ctx: Context, emitter: Emitter): Generator<unknown, void, unknown> {\n const r = this.liquid.renderer\n const target = toValue(yield this.value.value(ctx, ctx.opts.lenientIf))\n let branchHit = false\n for (const branch of this.branches) {\n for (const valueToken of branch.values) {\n const value = yield evalToken(valueToken, ctx, ctx.opts.lenientIf)\n if (equals(target, value)) {\n yield r.renderTemplates(branch.templates, ctx, emitter)\n branchHit = true\n break\n }\n }\n }\n if (!branchHit) {\n yield r.renderTemplates(this.elseTemplates, ctx, emitter)\n }\n }\n}\n","import { Liquid, TopLevelToken, TagToken, Tag } from '..'\nimport { isTagToken } from '../util'\n\nexport default class extends Tag {\n constructor (tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(tagToken, remainTokens, liquid)\n while (remainTokens.length) {\n const token = remainTokens.shift()!\n if (isTagToken(token) && token.name === 'endcomment') return\n }\n throw new Error(`tag ${tagToken.getText()} not closed`)\n }\n render () {}\n}\n","import { __assign } from 'tslib'\nimport { ForloopDrop } from '../drop'\nimport { toEnumerable } from '../util'\nimport { TopLevelToken, assert, Liquid, Token, Template, evalQuotedToken, TypeGuards, Tokenizer, evalToken, Hash, Emitter, TagToken, Context, Tag } from '..'\n\nexport type ParsedFileName = Template[] | Token | string | undefined\n\nexport default class extends Tag {\n private file: ParsedFileName\n private currentFile?: string\n private hash: Hash\n constructor (token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(token, remainTokens, liquid)\n const tokenizer = this.tokenizer\n this.file = parseFilePath(tokenizer, this.liquid)\n this.currentFile = token.file\n while (!tokenizer.end()) {\n tokenizer.skipBlank()\n const begin = tokenizer.p\n const keyword = tokenizer.readIdentifier()\n if (keyword.content === 'with' || keyword.content === 'for') {\n tokenizer.skipBlank()\n // can be normal key/value pair, like \"with: true\"\n if (tokenizer.peek() !== ':') {\n const value = tokenizer.readValue()\n // can be normal key, like \"with,\"\n if (value) {\n const beforeAs = tokenizer.p\n const asStr = tokenizer.readIdentifier()\n let alias\n if (asStr.content === 'as') alias = tokenizer.readIdentifier()\n else tokenizer.p = beforeAs\n\n this[keyword.content] = { value, alias: alias && alias.content }\n tokenizer.skipBlank()\n if (tokenizer.peek() === ',') tokenizer.advance()\n continue // matched!\n }\n }\n }\n /**\n * restore cursor if with/for not matched\n */\n tokenizer.p = begin\n break\n }\n this.hash = new Hash(tokenizer.remaining())\n }\n * render (ctx: Context, emitter: Emitter): Generator<unknown, void, unknown> {\n const { liquid, hash } = this\n const filepath = (yield renderFilePath(this['file'], ctx, liquid)) as string\n assert(filepath, () => `illegal file path \"${filepath}\"`)\n\n const childCtx = new Context({}, ctx.opts, { sync: ctx.sync, globals: ctx.globals, strictVariables: ctx.strictVariables })\n const scope = childCtx.bottom()\n __assign(scope, yield hash.render(ctx))\n if (this['with']) {\n const { value, alias } = this['with']\n scope[alias || filepath] = yield evalToken(value, ctx)\n }\n\n if (this['for']) {\n const { value, alias } = this['for']\n const collection = toEnumerable(yield evalToken(value, ctx))\n scope['forloop'] = new ForloopDrop(collection.length, value.getText(), alias)\n for (const item of collection) {\n scope[alias] = item\n const templates = (yield liquid._parsePartialFile(filepath, childCtx.sync, this['currentFile'])) as Template[]\n yield liquid.renderer.renderTemplates(templates, childCtx, emitter)\n scope['forloop'].next()\n }\n } else {\n const templates = (yield liquid._parsePartialFile(filepath, childCtx.sync, this['currentFile'])) as Template[]\n yield liquid.renderer.renderTemplates(templates, childCtx, emitter)\n }\n }\n}\n\n/**\n * @return null for \"none\",\n * @return Template[] for quoted with tags and/or filters\n * @return Token for expression (not quoted)\n * @throws TypeError if cannot read next token\n */\nexport function parseFilePath (tokenizer: Tokenizer, liquid: Liquid): ParsedFileName {\n if (liquid.options.dynamicPartials) {\n const file = tokenizer.readValue()\n tokenizer.assert(file, 'illegal file path')\n if (file!.getText() === 'none') return\n if (TypeGuards.isQuotedToken(file)) {\n // for filenames like \"files/{{file}}\", eval as liquid template\n const templates = liquid.parse(evalQuotedToken(file))\n return optimize(templates)\n }\n return file\n }\n const tokens = [...tokenizer.readFileNameTemplate(liquid.options)]\n const templates = optimize(liquid.parser.parseTokens(tokens))\n return templates === 'none' ? undefined : templates\n}\n\nfunction optimize (templates: Template[]): string | Template[] {\n // for filenames like \"files/file.liquid\", extract the string directly\n if (templates.length === 1 && TypeGuards.isHTMLToken(templates[0].token)) return templates[0].token.getContent()\n return templates\n}\n\nexport function * renderFilePath (file: ParsedFileName, ctx: Context, liquid: Liquid): IterableIterator<unknown> {\n if (typeof file === 'string') return file\n if (Array.isArray(file)) return liquid.renderer.renderTemplates(file, ctx)\n return yield evalToken(file, ctx)\n}\n","import { Template, ValueToken, TopLevelToken, Liquid, Tag, assert, evalToken, Hash, Emitter, TagToken, Context } from '..'\nimport { BlockMode, Scope } from '../context'\nimport { parseFilePath, renderFilePath } from './render'\n\nexport default class extends Tag {\n private withVar?: ValueToken\n private hash: Hash\n constructor (token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(token, remainTokens, liquid)\n const { tokenizer } = token\n this['file'] = parseFilePath(tokenizer, this.liquid)\n this['currentFile'] = token.file\n\n const begin = tokenizer.p\n const withStr = tokenizer.readIdentifier()\n if (withStr.content === 'with') {\n tokenizer.skipBlank()\n if (tokenizer.peek() !== ':') {\n this.withVar = tokenizer.readValue()\n } else tokenizer.p = begin\n } else tokenizer.p = begin\n\n this.hash = new Hash(tokenizer.remaining(), this.liquid.options.jekyllInclude)\n }\n * render (ctx: Context, emitter: Emitter): Generator<unknown, void, unknown> {\n const { liquid, hash, withVar } = this\n const { renderer } = liquid\n const filepath = (yield renderFilePath(this['file'], ctx, liquid)) as string\n assert(filepath, () => `illegal file path \"${filepath}\"`)\n\n const saved = ctx.saveRegister('blocks', 'blockMode')\n ctx.setRegister('blocks', {})\n ctx.setRegister('blockMode', BlockMode.OUTPUT)\n const scope = (yield hash.render(ctx)) as Scope\n if (withVar) scope[filepath] = yield evalToken(withVar, ctx)\n const templates = (yield liquid._parsePartialFile(filepath, ctx.sync, this['currentFile'])) as Template[]\n ctx.push(ctx.opts.jekyllInclude ? { include: scope } : scope)\n yield renderer.renderTemplates(templates, ctx, emitter)\n ctx.pop()\n ctx.restoreRegister(saved)\n }\n}\n","import { Tag, Liquid, TopLevelToken, Emitter, TagToken, Context } from '..'\nimport { isNumber, stringify } from '../util'\n\nexport default class extends Tag {\n private variable: string\n constructor (token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(token, remainTokens, liquid)\n this.variable = this.tokenizer.readIdentifier().content\n }\n render (context: Context, emitter: Emitter) {\n const scope = context.environments\n if (!isNumber(scope[this.variable])) {\n scope[this.variable] = 0\n }\n emitter.write(stringify(--scope[this.variable]))\n }\n}\n","import { TopLevelToken, Liquid, ValueToken, evalToken, Emitter, TagToken, Context, Tag } from '..'\n\nexport default class extends Tag {\n private candidates: ValueToken[] = []\n private group?: ValueToken\n constructor (token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(token, remainTokens, liquid)\n const group = this.tokenizer.readValue()\n this.tokenizer.skipBlank()\n\n if (group) {\n if (this.tokenizer.peek() === ':') {\n this.group = group\n this.tokenizer.advance()\n } else this.candidates.push(group)\n }\n\n while (!this.tokenizer.end()) {\n const value = this.tokenizer.readValue()\n if (value) this.candidates.push(value)\n this.tokenizer.readTo(',')\n }\n this.tokenizer.assert(this.candidates.length, () => `empty candidates: \"${token.getText()}\"`)\n }\n\n * render (ctx: Context, emitter: Emitter): Generator<unknown, unknown, unknown> {\n const group = (yield evalToken(this.group, ctx)) as ValueToken\n const fingerprint = `cycle:${group}:` + this.candidates.join(',')\n const groups = ctx.getRegister('cycle')\n let idx = groups[fingerprint]\n\n if (idx === undefined) {\n idx = groups[fingerprint] = 0\n }\n\n const candidate = this.candidates[idx]\n idx = (idx + 1) % this.candidates.length\n groups[fingerprint] = idx\n return yield evalToken(candidate, ctx)\n }\n}\n","import { Liquid, Tag, Value, Emitter, isTruthy, TagToken, TopLevelToken, Context, Template } from '..'\n\nexport default class extends Tag {\n branches: { value: Value, templates: Template[] }[] = []\n elseTemplates: Template[] = []\n\n constructor (tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(tagToken, remainTokens, liquid)\n let p: Template[] = []\n let elseCount = 0\n liquid.parser.parseStream(remainTokens)\n .on('start', () => this.branches.push({\n value: new Value(tagToken.args, this.liquid),\n templates: (p = [])\n }))\n .on('tag:elsif', (token: TagToken) => {\n if (elseCount > 0) {\n p = []\n return\n }\n this.branches.push({\n value: new Value(token.args, this.liquid),\n templates: (p = [])\n })\n })\n .on('tag:else', () => {\n elseCount++\n p = this.elseTemplates\n })\n .on('tag:endif', function () { this.stop() })\n .on('template', (tpl: Template) => {\n if (p !== this.elseTemplates || elseCount === 1) {\n p.push(tpl)\n }\n })\n .on('end', () => { throw new Error(`tag ${tagToken.getText()} not closed`) })\n .start()\n }\n\n * render (ctx: Context, emitter: Emitter): Generator<unknown, void, string> {\n const r = this.liquid.renderer\n\n for (const { value, templates } of this.branches) {\n const v = yield value.value(ctx, ctx.opts.lenientIf)\n if (isTruthy(v, ctx)) {\n yield r.renderTemplates(templates, ctx, emitter)\n return\n }\n }\n yield r.renderTemplates(this.elseTemplates, ctx, emitter)\n }\n}\n","import { isNumber, stringify } from '../util'\nimport { Tag, Liquid, TopLevelToken, Emitter, TagToken, Context } from '..'\n\nexport default class extends Tag {\n private variable: string\n constructor (token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(token, remainTokens, liquid)\n this.variable = this.tokenizer.readIdentifier().content\n }\n render (context: Context, emitter: Emitter) {\n const scope = context.environments\n if (!isNumber(scope[this.variable])) {\n scope[this.variable] = 0\n }\n const val = scope[this.variable]\n scope[this.variable]++\n emitter.write(stringify(val))\n }\n}\n","import { Scope, Template, Liquid, Tag, assert, Emitter, Hash, TagToken, TopLevelToken, Context } from '..'\nimport { BlockMode } from '../context'\nimport { parseFilePath, renderFilePath, ParsedFileName } from './render'\nimport { BlankDrop } from '../drop'\n\nexport default class extends Tag {\n args: Hash\n templates: Template[]\n file?: ParsedFileName\n constructor (token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(token, remainTokens, liquid)\n this.file = parseFilePath(this.tokenizer, this.liquid)\n this['currentFile'] = token.file\n this.args = new Hash(this.tokenizer.remaining())\n this.templates = this.liquid.parser.parseTokens(remainTokens)\n }\n * render (ctx: Context, emitter: Emitter): Generator<unknown, unknown, unknown> {\n const { liquid, args, file } = this\n const { renderer } = liquid\n if (file === undefined) {\n ctx.setRegister('blockMode', BlockMode.OUTPUT)\n yield renderer.renderTemplates(this.templates, ctx, emitter)\n return\n }\n const filepath = (yield renderFilePath(this.file, ctx, liquid)) as string\n assert(filepath, () => `illegal file path \"${filepath}\"`)\n const templates = (yield liquid._parseLayoutFile(filepath, ctx.sync, this['currentFile'])) as Template[]\n\n // render remaining contents and store rendered results\n ctx.setRegister('blockMode', BlockMode.STORE)\n const html = yield renderer.renderTemplates(this.templates, ctx)\n const blocks = ctx.getRegister('blocks')\n\n // set whole content to anonymous block if anonymous doesn't specified\n if (blocks[''] === undefined) blocks[''] = (parent: BlankDrop, emitter: Emitter) => emitter.write(html)\n ctx.setRegister('blockMode', BlockMode.OUTPUT)\n\n // render the layout file use stored blocks\n ctx.push((yield args.render(ctx)) as Scope)\n yield renderer.renderTemplates(templates, ctx, emitter)\n ctx.pop()\n }\n}\n","import { BlockMode } from '../context'\nimport { isTagToken } from '../util'\nimport { BlockDrop } from '../drop'\nimport { Liquid, TagToken, TopLevelToken, Template, Context, Emitter, Tag } from '..'\n\nexport default class extends Tag {\n block: string\n templates: Template[] = []\n constructor (token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(token, remainTokens, liquid)\n const match = /\\w+/.exec(token.args)\n this.block = match ? match[0] : ''\n while (remainTokens.length) {\n const token = remainTokens.shift()!\n if (isTagToken(token) && token.name === 'endblock') return\n const template = liquid.parser.parseToken(token, remainTokens)\n this.templates.push(template)\n }\n throw new Error(`tag ${token.getText()} not closed`)\n }\n\n * render (ctx: Context, emitter: Emitter) {\n const blockRender = this.getBlockRender(ctx)\n if (ctx.getRegister('blockMode') === BlockMode.STORE) {\n ctx.getRegister('blocks')[this.block] = blockRender\n } else {\n yield blockRender(new BlockDrop(), emitter)\n }\n }\n\n private getBlockRender (ctx: Context) {\n const { liquid, templates } = this\n const renderChild = ctx.getRegister('blocks')[this.block]\n const renderCurrent = function * (superBlock: BlockDrop, emitter: Emitter) {\n // add {{ block.super }} support when rendering\n ctx.push({ block: superBlock })\n yield liquid.renderer.renderTemplates(templates, ctx, emitter)\n ctx.pop()\n }\n return renderChild\n ? (superBlock: BlockDrop, emitter: Emitter) => renderChild(new BlockDrop(() => renderCurrent(superBlock, emitter)), emitter)\n : renderCurrent\n }\n}\n","import { Liquid, TagToken, TopLevelToken, Tag } from '..'\nimport { isTagToken } from '../util'\n\nexport default class extends Tag {\n private tokens: TopLevelToken[] = []\n constructor (tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(tagToken, remainTokens, liquid)\n while (remainTokens.length) {\n const token = remainTokens.shift()!\n if (isTagToken(token) && token.name === 'endraw') return\n this.tokens.push(token)\n }\n throw new Error(`tag ${tagToken.getText()} not closed`)\n }\n render () {\n return this.tokens.map((token: TopLevelToken) => token.getText()).join('')\n }\n}\n","import { ForloopDrop } from './forloop-drop'\n\nexport class TablerowloopDrop extends ForloopDrop {\n private cols: number\n public constructor (length: number, cols: number, collection: string, variable: string) {\n super(length, collection, variable)\n this.length = length\n this.cols = cols\n }\n public row () {\n return Math.floor(this.i / this.cols) + 1\n }\n public col0 () {\n return (this.i % this.cols)\n }\n public col () {\n return this.col0() + 1\n }\n public col_first () { // eslint-disable-line\n return this.col0() === 0\n }\n public col_last () { // eslint-disable-line\n return this.col() === this.cols\n }\n}\n","import { toEnumerable } from '../util'\nimport { ValueToken, Liquid, Tag, evalToken, Emitter, Hash, TagToken, TopLevelToken, Context, Template, ParseStream } from '..'\nimport { TablerowloopDrop } from '../drop/tablerowloop-drop'\n\nexport default class extends Tag {\n variable: string\n args: Hash\n templates: Template[]\n collection: ValueToken\n constructor (tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(tagToken, remainTokens, liquid)\n const variable = this.tokenizer.readIdentifier()\n this.tokenizer.skipBlank()\n\n const predicate = this.tokenizer.readIdentifier()\n const collectionToken = this.tokenizer.readValue()\n if (predicate.content !== 'in' || !collectionToken) {\n throw new Error(`illegal tag: ${tagToken.getText()}`)\n }\n\n this.variable = variable.content\n this.collection = collectionToken\n this.args = new Hash(this.tokenizer.remaining())\n this.templates = []\n\n let p\n const stream: ParseStream = this.liquid.parser.parseStream(remainTokens)\n .on('start', () => (p = this.templates))\n .on('tag:endtablerow', () => stream.stop())\n .on('template', (tpl: Template) => p.push(tpl))\n .on('end', () => {\n throw new Error(`tag ${tagToken.getText()} not closed`)\n })\n\n stream.start()\n }\n\n * render (ctx: Context, emitter: Emitter): Generator<unknown, void, unknown> {\n let collection = toEnumerable(yield evalToken(this.collection, ctx))\n const args = (yield this.args.render(ctx)) as Record<string, any>\n const offset = args.offset || 0\n const limit = (args.limit === undefined) ? collection.length : args.limit\n\n collection = collection.slice(offset, offset + limit)\n const cols = args.cols || collection.length\n\n const r = this.liquid.renderer\n const tablerowloop = new TablerowloopDrop(collection.length, cols, this.collection.getText(), this.variable)\n const scope = { tablerowloop }\n ctx.push(scope)\n\n for (let idx = 0; idx < collection.length; idx++, tablerowloop.next()) {\n scope[this.variable] = collection[idx]\n if (tablerowloop.col0() === 0) {\n if (tablerowloop.row() !== 1) emitter.write('</tr>')\n emitter.write(`<tr class=\"row${tablerowloop.row()}\">`)\n }\n emitter.write(`<td class=\"col${tablerowloop.col()}\">`)\n yield r.renderTemplates(this.templates, ctx, emitter)\n emitter.write('</td>')\n }\n if (collection.length) emitter.write('</tr>')\n ctx.pop()\n }\n}\n","import { Liquid, Tag, Value, TopLevelToken, Template, Emitter, isTruthy, isFalsy, Context, TagToken } from '..'\n\nexport default class extends Tag {\n branches: { value: Value, test: (val: any, ctx: Context) => boolean, templates: Template[] }[] = []\n elseTemplates: Template[] = []\n constructor (tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(tagToken, remainTokens, liquid)\n let p: Template[] = []\n let elseCount = 0\n this.liquid.parser.parseStream(remainTokens)\n .on('start', () => this.branches.push({\n value: new Value(tagToken.args, this.liquid),\n test: isFalsy,\n templates: (p = [])\n }))\n .on('tag:elsif', (token: TagToken) => {\n if (elseCount > 0) {\n p = []\n return\n }\n this.branches.push({\n value: new Value(token.args, this.liquid),\n test: isTruthy,\n templates: (p = [])\n })\n })\n .on('tag:else', () => {\n elseCount++\n p = this.elseTemplates\n })\n .on('tag:endunless', function () { this.stop() })\n .on('template', (tpl: Template) => {\n if (p !== this.elseTemplates || elseCount === 1) {\n p.push(tpl)\n }\n })\n .on('end', () => { throw new Error(`tag ${tagToken.getText()} not closed`) })\n .start()\n }\n\n * render (ctx: Context, emitter: Emitter): Generator<unknown, unknown, unknown> {\n const r = this.liquid.renderer\n\n for (const { value, test, templates } of this.branches) {\n const v = yield value.value(ctx, ctx.opts.lenientIf)\n if (test(v, ctx)) {\n yield r.renderTemplates(templates, ctx, emitter)\n return\n }\n }\n\n yield r.renderTemplates(this.elseTemplates, ctx, emitter)\n }\n}\n","import { Context, Emitter, Tag } from '..'\n\nexport default class extends Tag {\n render (ctx: Context, emitter: Emitter) {\n emitter['break'] = true\n }\n}\n","import { Tag, Emitter, Context } from '..'\n\nexport default class extends Tag {\n render (ctx: Context, emitter: Emitter) {\n emitter['continue'] = true\n }\n}\n","import { Liquid, TopLevelToken, Emitter, Value, TagToken, Context, Tag } from '..'\n\nexport default class extends Tag {\n private value?: Value\n\n constructor (token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(token, remainTokens, liquid)\n this.tokenizer.skipBlank()\n if (!this.tokenizer.end()) {\n this.value = new Value(this.tokenizer.readFilteredValue(), this.liquid)\n }\n }\n * render (ctx: Context, emitter: Emitter): Generator<unknown, void, unknown> {\n if (!this.value) return\n const val = yield this.value.value(ctx, false)\n emitter.write(val)\n }\n}\n","import { Template, Emitter, Liquid, TopLevelToken, TagToken, Context, Tag } from '..'\n\nexport default class extends Tag {\n templates: Template[]\n constructor (token: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(token, remainTokens, liquid)\n const tokens = this.tokenizer.readLiquidTagTokens(this.liquid.options)\n this.templates = this.liquid.parser.parseTokens(tokens)\n }\n * render (ctx: Context, emitter: Emitter): Generator<unknown, void, unknown> {\n yield this.liquid.renderer.renderTemplates(this.templates, ctx, emitter)\n }\n}\n","import { TagToken, Liquid, TopLevelToken, Tag } from '..'\n\nexport default class extends Tag {\n constructor (tagToken: TagToken, remainTokens: TopLevelToken[], liquid: Liquid) {\n super(tagToken, remainTokens, liquid)\n if (tagToken.args.search(/\\n\\s*[^#\\s]/g) !== -1) {\n throw new Error('every line of an inline comment must start with a \\'#\\' character')\n }\n }\n render () { }\n}\n","import AssignTag from './assign'\nimport ForTag from './for'\nimport CaptureTag from './capture'\nimport CaseTag from './case'\nimport CommentTag from './comment'\nimport IncludeTag from './include'\nimport RenderTag from './render'\nimport DecrementTag from './decrement'\nimport CycleTag from './cycle'\nimport IfTag from './if'\nimport IncrementTag from './increment'\nimport LayoutTag from './layout'\nimport BlockTag from './block'\nimport RawTag from './raw'\nimport TablerowTag from './tablerow'\nimport UnlessTag from './unless'\nimport BreakTag from './break'\nimport ContinueTag from './continue'\nimport EchoTag from './echo'\nimport LiquidTag from './liquid'\nimport InlineCommentTag from './inline-comment'\nimport type { TagClass } from '../template/tag'\n\nexport const tags: Record<string, TagClass> = {\n assign: AssignTag,\n 'for': ForTag,\n capture: CaptureTag,\n 'case': CaseTag,\n comment: CommentTag,\n include: IncludeTag,\n render: RenderTag,\n decrement: DecrementTag,\n increment: IncrementTag,\n cycle: CycleTag,\n 'if': IfTag,\n layout: LayoutTag,\n block: BlockTag,\n raw: RawTag,\n tablerow: TablerowTag,\n unless: UnlessTag,\n 'break': BreakTag,\n 'continue': ContinueTag,\n echo: EchoTag,\n liquid: LiquidTag,\n '#': InlineCommentTag\n}\n\nexport { AssignTag, ForTag, CaptureTag, CaseTag, CommentTag, IncludeTag, RenderTag, DecrementTag, IncrementTag, CycleTag, IfTag, LayoutTag, BlockTag, RawTag, TablerowTag, UnlessTag, BreakTag, ContinueTag, EchoTag, LiquidTag, InlineCommentTag }\n","import { Context } from './context'\nimport { toPromise, toValueSync, isFunction, forOwn } from './util'\nimport { TagClass, createTagClass, TagImplOptions, FilterImplOptions, Template, Value } from './template'\nimport { LookupType } from './fs/loader'\nimport { Render } from './render'\nimport { Parser } from './parser'\nimport { tags } from './tags'\nimport { filters } from './filters'\nimport { LiquidOptions, normalizeDirectoryList, NormalizedFullOptions, normalize, RenderOptions, RenderFileOptions } from './liquid-options'\n\nexport class Liquid {\n public readonly options: NormalizedFullOptions\n public readonly renderer = new Render()\n public readonly parser: Parser\n public readonly filters: Record<string, FilterImplOptions> = {}\n public readonly tags: Record<string, TagClass> = {}\n\n public constructor (opts: LiquidOptions = {}) {\n this.options = normalize(opts)\n this.parser = new Parser(this)\n forOwn(tags, (conf: TagClass, name: string) => this.registerTag(name, conf))\n forOwn(filters, (handler: FilterImplOptions, name: string) => this.registerFilter(name, handler))\n }\n public parse (html: string, filepath?: string): Template[] {\n return this.parser.parse(html, filepath)\n }\n\n public _render (tpl: Template[], scope: Context | object | undefined, renderOptions: RenderOptions): IterableIterator<any> {\n const ctx = scope instanceof Context ? scope : new Context(scope, this.options, renderOptions)\n return this.renderer.renderTemplates(tpl, ctx)\n }\n public async render (tpl: Template[], scope?: object, renderOptions?: RenderOptions): Promise<any> {\n return toPromise(this._render(tpl, scope, { ...renderOptions, sync: false }))\n }\n public renderSync (tpl: Template[], scope?: object, renderOptions?: RenderOptions): any {\n return toValueSync(this._render(tpl, scope, { ...renderOptions, sync: true }))\n }\n public renderToNodeStream (tpl: Template[], scope?: object, renderOptions: RenderOptions = {}): NodeJS.ReadableStream {\n const ctx = new Context(scope, this.options, renderOptions)\n return this.renderer.renderTemplatesToNodeStream(tpl, ctx)\n }\n\n public _parseAndRender (html: string, scope: Context | object | undefined, renderOptions: RenderOptions): IterableIterator<any> {\n const tpl = this.parse(html)\n return this._render(tpl, scope, renderOptions)\n }\n public async parseAndRender (html: string, scope?: Context | object, renderOptions?: RenderOptions): Promise<any> {\n return toPromise(this._parseAndRender(html, scope, { ...renderOptions, sync: false }))\n }\n public parseAndRenderSync (html: string, scope?: Context | object, renderOptions?: RenderOptions): any {\n return toValueSync(this._parseAndRender(html, scope, { ...renderOptions, sync: true }))\n }\n\n public _parsePartialFile (file: string, sync?: boolean, currentFile?: string) {\n return this.parser.parseFile(file, sync, LookupType.Partials, currentFile)\n }\n public _parseLayoutFile (file: string, sync?: boolean, currentFile?: string) {\n return this.parser.parseFile(file, sync, LookupType.Layouts, currentFile)\n }\n public _parseFile (file: string, sync?: boolean, lookupType?: LookupType, currentFile?: string): Generator<unknown, Template[]> {\n return this.parser.parseFile(file, sync, lookupType, currentFile)\n }\n public async parseFile (file: string, lookupType?: LookupType): Promise<Template[]> {\n return toPromise<Template[]>(this.parser.parseFile(file, false, lookupType))\n }\n public parseFileSync (file: string, lookupType?: LookupType): Template[] {\n return toValueSync<Template[]>(this.parser.parseFile(file, true, lookupType))\n }\n public * _renderFile (file: string, ctx: Context | object | undefined, renderFileOptions: RenderFileOptions): Generator<any> {\n const templates = (yield this._parseFile(file, renderFileOptions.sync, renderFileOptions.lookupType)) as Template[]\n return yield this._render(templates, ctx, renderFileOptions)\n }\n public async renderFile (file: string, ctx?: Context | object, renderFileOptions?: RenderFileOptions) {\n return toPromise(this._renderFile(file, ctx, { ...renderFileOptions, sync: false }))\n }\n public renderFileSync (file: string, ctx?: Context | object, renderFileOptions?: RenderFileOptions) {\n return toValueSync(this._renderFile(file, ctx, { ...renderFileOptions, sync: true }))\n }\n public async renderFileToNodeStream (file: string, scope?: object, renderOptions?: RenderOptions) {\n const templates = await this.parseFile(file)\n return this.renderToNodeStream(templates, scope, renderOptions)\n }\n\n public _evalValue (str: string, scope?: object | Context): IterableIterator<any> {\n const value = new Value(str, this)\n const ctx = scope instanceof Context ? scope : new Context(scope, this.options)\n return value.value(ctx)\n }\n public async evalValue (str: string, scope?: object | Context): Promise<any> {\n return toPromise(this._evalValue(str, scope))\n }\n public evalValueSync (str: string, scope?: object | Context): any {\n return toValueSync(this._evalValue(str, scope))\n }\n\n public registerFilter (name: string, filter: FilterImplOptions) {\n this.filters[name] = filter\n }\n public registerTag (name: string, tag: TagClass | TagImplOptions) {\n this.tags[name] = isFunction(tag) ? tag : createTagClass(tag)\n }\n public plugin (plugin: (this: Liquid, L: typeof Liquid) => void) {\n return plugin.call(this, Liquid)\n }\n public express () {\n const self = this // eslint-disable-line\n let firstCall = true\n\n return function (this: any, filePath: string, ctx: object, callback: (err: Error | null, rendered: string) => void) {\n if (firstCall) {\n firstCall = false\n const dirs = normalizeDirectoryList(this.root)\n self.options.root.unshift(...dirs)\n self.options.layouts.unshift(...dirs)\n self.options.partials.unshift(...dirs)\n }\n self.renderFile(filePath, ctx).then(html => callback(null, html) as any, callback as any)\n }\n }\n}\n","import { isFunction } from '../util'\nimport { Hash } from './hash'\nimport { Tag, TagClass, TagRenderReturn } from './tag'\nimport { TagToken, TopLevelToken } from '../tokens'\nimport { Emitter } from '../emitters'\nimport { Context } from '../context'\nimport type { Liquid } from '../liquid'\n\nexport interface TagImplOptions {\n [key: string]: any\n parse?: (this: Tag & TagImplOptions, token: TagToken, remainingTokens: TopLevelToken[]) => void;\n render: (this: Tag & TagImplOptions, ctx: Context, emitter: Emitter, hash: Record<string, any>) => TagRenderReturn;\n}\n\nexport function createTagClass (options: TagImplOptions): TagClass {\n return class extends Tag {\n constructor (token: TagToken, tokens: TopLevelToken[], liquid: Liquid) {\n super(token, tokens, liquid)\n if (isFunction(options.parse)) {\n options.parse.call(this, token, tokens)\n }\n }\n * render (ctx: Context, emitter: Emitter): TagRenderReturn {\n const hash = (yield new Hash(this.token.args).render(ctx)) as Record<string, any>\n return yield options.render.call(this, ctx, emitter, hash)\n }\n }\n}\n","/* istanbul ignore file */\nexport const version = '[VI]{version}[/VI]'\nexport * as TypeGuards from './util/type-guards'\nexport { toValue, TimezoneDate, createTrie, Trie, toPromise, toValueSync, assert, LiquidError, ParseError, RenderError, UndefinedVariableError, TokenizationError, AssertionError } from './util'\nexport { Drop } from './drop'\nexport { Emitter } from './emitters'\nexport { defaultOperators, Operators, evalToken, evalQuotedToken, Expression, isFalsy, isTruthy } from './render'\nexport { Context, Scope } from './context'\nexport { Value, Hash, Template, FilterImplOptions, Tag, Filter, Output } from './template'\nexport { Token, TopLevelToken, TagToken, ValueToken } from './tokens'\nexport { TokenKind, Tokenizer, ParseStream } from './parser'\nexport { filters } from './filters'\nexport * from './tags'\nexport { defaultOptions, LiquidOptions } from './liquid-options'\nexport { FS } from './fs'\nexport { Liquid } from './liquid'\n"],"names":["Token","this","input","slice","begin","end","_a","__read","row","col","i","kind","file","Drop","key","toString","Object","prototype","toLowerCase","String","hasOwnProperty","isString","value","isFunction","isIterator","val","next","throw","return","stringify","toValue","isNil","isArray","map","join","toEnumerable","length","isObject","Symbol","iterator","Array","from","keys","toArray","valueOf","isNumber","call","forOwn","obj","iteratee","k","last","arr","type","range","start","stop","step","push","padStart","str","ch","pad","add","n","identify","caseInsensitiveCompare","a","b","argumentsToValue","fn","_i","args","escapeRegExp","text","replace","TRAIT","__extends","Error","LiquidError","line","lines","msg","token","defineProperty","getPosition","split","Math","max","min","_\r\n .range","lineNumber","rowIndicator","num","_.padStart","colIndicator","enumerable","message","stack","context","originalError","err","_super","_this","name","update","RenderError","tpl","LiquidErrors","errors","s","variableName","TYPES","WORD","BLANK","INLINE_BLANK","isWord","char","code","charCodeAt","assert","predicate","AssertionError","NullDrop","EmptyDrop","BlankDrop","test","equals","ForloopDrop","JSON","collection","variable","BlockDrop","superBlockRender","isComparable","arg","gt","geq","lt","leq","nil","literalValues","true","false","null","empty","blank","createTrie","trie","_b","__values","entries","_d","name_1","data","node","c","needBoundary","toPromise","done","state","then","err_1","toValueSync","rFormat","monthNames","dayNames","monthNamesShort","abbr","dayNamesShort","daysInMonth","d","year","getFullYear","getDayOfYear","getMonth","getDate","getWeekOfYear","startDay","now","getDay","Date","floor","padWidths","e","H","I","j","l","L","m","M","S","U","W","padChars","A","B","p","P","getTimezoneOffset","opts","nOffset","abs","h","flags","formatCodes","toLocaleString","C","parseInt","substring","getHours","getMilliseconds","getMinutes","N","width","Number","q","date","includes","round","getTime","getSeconds","u","w","x","toLocaleDateString","X","toLocaleTimeString","y","Y","z","Z","getTimezoneName","Intl","DateTimeFormat","resolvedOptions","timeZone","t","%","strftime","formatStr","match","output","remaining","exec","index","_c","flagStr","modifier","conversion","convert","flagStr_1","flag","ret","padChar","padWidth","toUpperCase","__spreadArray","some","ISO8601_TIMEZONE_PATTERN","TimezoneDate","displayDate","locale","init","timezoneOffset","timezoneName","dateString","hours","offset","sign","minutes","localDateString","utcDateString","localDate","timezone","diff","time","DelimitedToken","contentRange","trimLeft","trimRight","contentBegin","contentEnd","tl","tr","r","TagToken","tokenizer","options","trimTagLeft","trimTagRight","tagDelimiterLeft","tagDelimiterRight","valueBegin","valueEnd","TokenKind","Tag","Tokenizer","operators","readTagName","skipBlank","trimOutputLeft","trimOutputRight","outputDelimiterLeft","outputDelimiterRight","valueRange","Output","HTMLToken","HTML","content","getText","IdentifierToken","allowSign","Word","Literal","literal","operatorPrecedences","==","!=",">","<",">=","<=","contains","not","and","or","operatorTypes","OperatorToken","Operator","operator","props","PropertyAccess","Filter","Hash","rHex","rOct","escapeChar","f","v","hexVal","Quoted","undefined","fromCharCode","lhs","rhs","Range","initial","filters","FilteredValue","SimpleEmitter","html","buffer","KeepingTypeEmitter","Render","templates","ctx","emitter","StreamedEmitter","Promise","resolve","renderTemplates","error","stream","keepOutputType","templates_1","render","write","is","e_1","catchAllErrors","Expression","lenient","operands","postfix","isOperatorToken","pop","result","_f","evalToken","tokens","ops","tokens_1","getPrecedence","isPropertyAccessToken","prop","_getFromScope","_get","e_3","UndefinedVariableError","isRangeToken","low","high","evalQuotedToken","isTruthy","isFalsy","jsTruthy","defaultOperators","indexOf","prev","LRU","cache","Node","head","size","ensureLimit","remove","tail","limit","domResolve","root","path","base","document","createElement","href","getElementsByTagName","insertBefore","firstChild","resolved","removeChild","filepath","ext","origin","url","reject","xhr","XMLHttpRequest","onload","status","responseText","statusText","onerror","open","send","json","space","default","defaultValue","Map","get","raw","handler","jsonify","to_integer","inspect","ancestors","_key","escapeMap","&","\"","'","unescapeMap","&","<",">",""","'","escape","defaultOptions","layouts","partials","relativeReference","jekyllInclude","extname","fs","dynamicPartials","dateFormat","greedy","preserveTimezones","strictFilters","strictVariables","ownPropertyOnly","lenientIf","globals","normalize","nameOrFunction","dirname","sep","console","warn","normalizeDirectoryList","outputEscape","misc","list","whiteSpaceCtrl","inRaw","isDelimitedToken","mask","isHTMLToken","isTagToken","charAt","readExpressionTokens","readOperator","operand","readValue","matchTrie","opTrie","info","peek","readExpression","valid","snapshot","readFilters","FilteredValueToken","filter","readFilter","readIdentifier","readFilterArg","FilterToken","readTopLevelToken","rawBeginAt","readEndrawOrRawContent","readTagToken","readOutputToken","readHTMLToken","stopStrings","readToDelimiter","delimiter","respectQuoted","peekType","readQuoted","rmatch","OutputToken","leftPos","readTo","readLiquidTagToken","LiquidTagToken","pos","TokenizationError","pred","id","jekyllStyle","hashes","hash","readHash","readNonEmptyIdentifier","HashToken","readLiteral","readRange","readNumber","readProperties","PropertyAccessToken","isBegin","decimalFound","digitFound","NumberToken","advance","literalTrie","LiteralToken","readValueOrThrow","RangeToken","escaped","QuotedToken","htmlStopStrings","htmlStopStringSet","Set","has","word","pattern","ParseStream","cb","handlers","event","template","trigger","stopRequested","shift","parseToken","TemplateImpl","remainTokens","liquid","_e","_g","markup","readHashes","argv","_j","apply","Value","evaluate","impl","readFilteredValue","getFilter","LookupType","getContent","Loader","sync","currentFile","dirs","candidates","Root","existsSync","exists","lookupError","enforceRoot","shouldLoadRelative","referenced","dirs_1","dir","dirs_2","fallback","roots","rRelativePath_1","RegExp","prefix","referencedFile","Parser","readTopLevelTokens","parseTokens","TagClass","tags","isOutputToken","ParseError","loader","read","tpls","task","_parseFile","taskOrTpl","lookup","parse","readFileSync","readFile","parseFile","_parseFileCached","getKind","Delimited","isQuotedToken","BlockMode","Context","registers","getRegister","keyValues","forEach","setRegister","environments","scopes","reduce","__assign","paths","getSync","scope","findScope","toLiquid","liquidMethodMissing","InternalUndefinedVariableError","candidate","env","renderOptions","at_least","at_most","ceil","divided_by","dividend","divisor","integerArithmetic","minus","modulo","times","amp","pow","rSlugifyDefault","rSlugifyReplacers","pretty","ascii","latin","none","decodeURIComponent","encodeURIComponent","encodeURI","mode","cased","replacer","arrayLast","first","reverse","concat","property","values","item","_h","sort","lvalue","rvalue","tuple","propertyString","compare","results","sum","isNaN","clone","unshift","expected","readScopeValue","arr_1","_","itemName","exp","filtered","keyTemplate","arr_2","set","items","count","shuffled","random","format","parseDate","stringify_date","month_type","style","createDateFixedToTimezone","rCJKWord","rNonCJKWord","arguments","chars","lastIndexOf","trim","replacement","arg1","arg2","o","words","array","connector","htmlFilters","mathFilters","urlFilters","arrayFilters","dateFilters","stringFilters","default_1","bottom","MODIFIERS","renderer","elseTemplates","continueKey","continue","modifiers","orderedFilterParameters","forloop","collection_1","inStr","parser","parseStream","on","quoted","tagToken","readVariableName","target","branchHit","branches","branch","elseCount","renderFilePath","_k","childCtx","alias","_parsePartialFile","parseFilePath","keyword","beforeAs","TypeGuards.isQuotedToken","optimize","readFileNameTemplate","TypeGuards.isHTMLToken","withVar","saved","saveRegister","OUTPUT","include","restoreRegister","group","fingerprint","groups","idx","_parseLayoutFile","STORE","blocks","parent","blockRender","getBlockRender","block","renderCurrent","superBlock","renderChild","token_1","TablerowloopDrop","cols","col0","tablerowloop","collectionToken","test_1","readLiquidTagTokens","search","assign","AssignTag","for","ForTag","capture","CaptureTag","case","CaseTag","comment","CommentTag","IncludeTag","RenderTag","decrement","DecrementTag","increment","IncrementTag","cycle","CycleTag","if","IfTag","layout","LayoutTag","BlockTag","RawTag","tablerow","TablerowTag","unless","UnlessTag","break","BreakTag","ContinueTag","echo","EchoTag","LiquidTag","#","InlineCommentTag","Liquid","_render","renderTemplatesToNodeStream","_parseAndRender","Partials","Layouts","lookupType","renderFileOptions","_renderFile","renderToNodeStream","_evalValue","tag","class_1","plugin","self","firstCall","filePath","callback","renderFile","conf","registerTag","registerFilter"],"mappings":"o5FAUSA,oBAAP,WACE,OAAOC,KAAKC,MAAMC,MAAMF,KAAKG,MAAOH,KAAKI,GAAG,GAEvCL,wBAAP,WAEE,IADI,IAAAM,EAAAC,EAAa,CAAC,EAAG,MAAhBC,OAAKC,OACDC,EAAI,EAAGA,EAAIT,KAAKG,MAAOM,CAAC,GACT,OAAlBT,KAAKC,MAAMQ,IACbF,CAAG,GACHC,EAAM,GACDA,CAAG,GAEZ,MAAO,CAACD,EAAKC,IAERT,iBAAP,WACE,OAAOC,KAAKI,IAAMJ,KAAKG,eArBzB,WACSO,EACAT,EACAE,EACAC,EACAO,GAJAX,UAAAU,EACAV,WAAAC,EACAD,WAAAG,EACAH,SAAAI,EACAJ,UAAAW,ECPFC,gCAAP,SAA4BC,aAD9B,cCEO,IAAMC,EAAWC,OAAOC,UAAUF,SACnCG,EAAcC,OAAOF,UAAUC,YAExBE,EAAiBJ,OAAOI,wBAErBC,EAAUC,GACxB,MAAwB,UAAjB,OAAOA,CAChB,UAGgBC,EAAYD,GAC1B,MAAwB,YAAjB,OAAOA,CAChB,UAMgBE,EAAYC,GAC1B,OAAOA,GAAOF,EAAWE,EAAIC,IAAI,GAAKH,EAAWE,EAAIE,KAAK,GAAKJ,EAAWE,EAAIG,MAAM,CACtF,UAkBgBC,EAAWP,GAEzB,OAAID,EADJC,EAAQQ,EAAQR,CAAK,CACH,EAAUA,EACxBS,EAAMT,CAAK,EAAU,GACrBU,EAAQV,CAAK,EAAUA,EAAMW,IAASJ,CAAY,EAAEK,KAAK,EAAE,EACxDf,OAAOG,CAAK,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