/*! art-template@4.12.2 for browser | https://github.com/aui/art-template */ !(function (e, t) { typeof exports === 'object' && typeof module === 'object' ? module.exports = t() : typeof define === 'function' && define.amd ? define([], t) : typeof exports === 'object' ? exports.template = t() : e.template = t() }(this, function () { return (function (e) { function t (r) { if (n[r]) return n[r].exports; const i = n[r] = { i: r, l: !1, exports: {} }; return e[r].call(i.exports, i, i.exports, t), i.l = !0, i.exports } var n = {}; return t.m = e, t.c = n, t.d = function (e, n, r) { t.o(e, n) || Object.defineProperty(e, n, { configurable: !1, enumerable: !0, get: r }) }, t.n = function (e) { const n = e && e.__esModule ? function () { return e.default } : function () { return e }; return t.d(n, 'a', n), n }, t.o = function (e, t) { return Object.prototype.hasOwnProperty.call(e, t) }, t.p = '', t(t.s = 6) }([function (e, t, n) { (function (t) { e.exports = !1; try { e.exports = Object.prototype.toString.call(t.process) === '[object process]' } catch (n) {} }).call(t, n(4)) }, function (e, t, n) { 'use strict'; const r = n(8); const i = n(3); const o = n(23); const s = function (e, t) { t.onerror(e, t); const n = function () { return '{Template Error}' }; return n.mappings = [], n.sourcesContent = [], n }; const a = function c (e) { let t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; typeof e !== 'string' ? t = e : t.source = e, t = i.$extend(t), e = t.source, !0 === t.debug && (t.cache = !1, t.minimize = !1, t.compileDebug = !0), t.compileDebug && (t.minimize = !1), t.filename && (t.filename = t.resolveFilename(t.filename, t)); const n = t.filename; const a = t.cache; const u = t.caches; if (a && n) { const p = u.get(n); if (p) return p } if (!e) try { e = t.loader(n, t), t.source = e } catch (d) { const l = new o({ name: 'CompileError', path: n, message: 'template not found: ' + d.message, stack: d.stack }); if (t.bail) throw l; return s(l, t) } let f = void 0; const h = new r(t); try { f = h.build() } catch (l) { if (l = new o(l), t.bail) throw l; return s(l, t) } const m = function (e, n) { try { return f(e, n) } catch (l) { if (!t.compileDebug) return t.cache = !1, t.compileDebug = !0, c(t)(e, n); if (l = new o(l), t.bail) throw l; return s(l, t)() } }; return m.mappings = f.mappings, m.sourcesContent = f.sourcesContent, m.toString = function () { return f.toString() }, a && n && u.set(n, m), m }; a.Compiler = r, e.exports = a }, function (e, t) { Object.defineProperty(t, '__esModule', { value: !0 }), t.default = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|(0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?)|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]+\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-\/%&|^]|\*{1,2}|<{1,2}|>{1,3}|!=?|={1,2})=?|[?~.,:;[\](){}])|(\s+)|(^$|[\s\S])/g, t.matchToToken = function (e) { const t = { type: 'invalid', value: e[0] }; return e[1] ? (t.type = 'string', t.closed = !(!e[3] && !e[4])) : e[5] ? t.type = 'comment' : e[6] ? (t.type = 'comment', t.closed = !!e[7]) : e[8] ? t.type = 'regex' : e[9] ? t.type = 'number' : e[10] ? t.type = 'name' : e[11] ? t.type = 'punctuator' : e[12] && (t.type = 'whitespace'), t } }, function (e, t, n) { 'use strict'; function r () { this.$extend = function (e) { return e = e || {}, s(e, e instanceof r ? e : this) } } const i = n(0); const o = n(12); var s = n(13); const a = n(14); const c = n(15); const u = n(16); const p = n(17); const l = n(18); const f = n(19); const h = n(20); const m = n(22); const d = { source: null, filename: null, rules: [f, l], escape: !0, debug: !!i && process.env.NODE_ENV !== 'production', bail: !0, cache: !0, minimize: !0, compileDebug: !1, resolveFilename: m, include: a, htmlMinifier: h, htmlMinifierOptions: { collapseWhitespace: !0, minifyCSS: !0, minifyJS: !0, ignoreCustomFragments: [] }, onerror: c, loader: p, caches: u, root: '/', extname: '.art', ignore: [], imports: o }; r.prototype = d, e.exports = new r() }, function (e, t) { let n; n = (function () { return this }()); try { n = n || Function('return this')() || (0, eval)('this') } catch (r) { typeof window === 'object' && (n = window) }e.exports = n }, function (e, t) {}, function (e, t, n) { 'use strict'; const r = n(7); const i = n(1); const o = n(24); const s = function (e, t) { return t instanceof Object ? r({ filename: e }, t) : i({ filename: e, source: t }) }; s.render = r, s.compile = i, s.defaults = o, e.exports = s }, function (e, t, n) { 'use strict'; const r = n(1); const i = function (e, t, n) { return r(e, n)(t) }; e.exports = i }, function (e, t, n) { 'use strict'; function r (e, t) { if (!(e instanceof t)) throw new TypeError('Cannot call a class as a function') } const i = n(9); const o = n(11); const s = '$data'; const a = '$imports'; const c = 'print'; const u = 'include'; const p = 'extend'; const l = 'block'; const f = '$$out'; const h = '$$line'; const m = '$$blocks'; const d = '$$slice'; const v = '$$from'; const g = '$$options'; const y = function (e, t) { return Object.hasOwnProperty.call(e, t) }; const b = JSON.stringify; const x = (function () { function e (t) { let n; let i; const y = this; r(this, e); let b = t.source; const x = t.minimize; const w = t.htmlMinifier; if (this.options = t, this.stacks = [], this.context = [], this.scripts = [], this.CONTEXT_MAP = {}, this.ignore = [s, a, g].concat(t.ignore), this.internal = (n = {}, n[f] = "''", n[h] = '[0,0]', n[m] = 'arguments[1]||{}', n[v] = 'null', n[c] = "function(){var s=''.concat.apply('',arguments);" + f + '+=s;return s}', n[u] = 'function(src,data){var s=' + g + '.include(src,data||' + s + ',arguments[2]||' + m + ',' + g + ');' + f + '+=s;return s}', n[p] = 'function(from){' + v + '=from}', n[d] = 'function(c,p,s){p=' + f + ';' + f + "='';c();s=" + f + ';' + f + '=p+s;return s}', n[l] = "function(){var a=arguments,s;if(typeof a[0]==='function'){return " + d + '(a[0])}else if(' + v + '){if(!' + m + '[a[0]]){' + m + '[a[0]]=' + d + '(a[1])}else{' + f + '+=' + m + '[a[0]]}}else{s=' + m + "[a[0]];if(typeof s==='string'){" + f + '+=s}else{s=' + d + '(a[1])}return s}}', n), this.dependencies = (i = {}, i[c] = [f], i[u] = [f, g, s, m], i[p] = [v, u], i[l] = [d, v, f, m], i), this.importContext(f), t.compileDebug && this.importContext(h), x) try { b = w(b, t) } catch (E) {} this.source = b, this.getTplTokens(b, t.rules, this).forEach(function (e) { e.type === o.TYPE_STRING ? y.parseString(e) : y.parseExpression(e) }) } return e.prototype.getTplTokens = function () { return o.apply(undefined, arguments) }, e.prototype.getEsTokens = function (e) { return i(e) }, e.prototype.getVariables = function (e) { let t = !1; return e.filter(function (e) { return e.type !== 'whitespace' && e.type !== 'comment' }).filter(function (e) { return e.type === 'name' && !t || (t = e.type === 'punctuator' && e.value === '.', !1) }).map(function (e) { return e.value }) }, e.prototype.importContext = function (e) { const t = this; let n = ''; const r = this.internal; const i = this.dependencies; const o = this.ignore; const c = this.context; const u = this.options; const p = u.imports; const l = this.CONTEXT_MAP; y(l, e) || o.indexOf(e) !== -1 || (y(r, e) ? (n = r[e], y(i, e) && i[e].forEach(function (e) { return t.importContext(e) })) : n = e === '$escape' || e === '$each' || y(p, e) ? a + '.' + e : s + '.' + e, l[e] = n, c.push({ name: e, value: n })) }, e.prototype.parseString = function (e) { const t = e.value; if (t) { const n = f + '+=' + b(t); this.scripts.push({ source: t, tplToken: e, code: n }) } }, e.prototype.parseExpression = function (e) { const t = this; const n = e.value; const r = e.script; const i = r.output; const s = this.options.escape; let a = r.code; i && (a = !1 === s || i === o.TYPE_RAW ? f + '+=' + r.code : f + '+=$escape(' + r.code + ')'); const c = this.getEsTokens(a); this.getVariables(c).forEach(function (e) { return t.importContext(e) }), this.scripts.push({ source: n, tplToken: e, code: a }) }, e.prototype.checkExpression = function (e) { for (let t = [[/^\s*}[\w\W]*?{?[\s;]*$/, ''], [/(^[\w\W]*?\([\w\W]*?(?:=>|\([\w\W]*?\))\s*{[\s;]*$)/, '$1})'], [/(^[\w\W]*?\([\w\W]*?\)\s*{[\s;]*$)/, '$1}']], n = 0; n < t.length;) { if (t[n][0].test(e)) { var r; e = (r = e).replace.apply(r, t[n]); break }n++ } try { return new Function(e), !0 } catch (i) { return !1 } }, e.prototype.build = function () { const e = this.options; const t = this.context; const n = this.scripts; const r = this.stacks; const i = this.source; const c = e.filename; const l = e.imports; const d = []; const x = y(this.CONTEXT_MAP, p); let w = 0; const E = function (e, t) { const n = t.line; const i = t.start; const o = { generated: { line: r.length + w + 1, column: 1 }, original: { line: n + 1, column: i + 1 } }; return w += e.split(/\n/).length - 1, o }; const k = function (e) { return e.replace(/^[\t ]+|[\t ]$/g, '') }; r.push('function(' + s + '){'), r.push("'use strict'"), r.push(s + '=' + s + '||{}'), r.push('var ' + t.map(function (e) { return e.name + '=' + e.value }).join(',')), e.compileDebug ? (r.push('try{'), n.forEach(function (e) { e.tplToken.type === o.TYPE_EXPRESSION && r.push(h + '=[' + [e.tplToken.line, e.tplToken.start].join(',') + ']'), d.push(E(e.code, e.tplToken)), r.push(k(e.code)) }), r.push('}catch(error){'), r.push('throw {' + ["name:'RuntimeError'", 'path:' + b(c), 'message:error.message', 'line:' + h + '[0]+1', 'column:' + h + '[1]+1', 'source:' + b(i), 'stack:error.stack'].join(',') + '}'), r.push('}')) : n.forEach(function (e) { d.push(E(e.code, e.tplToken)), r.push(k(e.code)) }), x && (r.push(f + "=''"), r.push(u + '(' + v + ',' + s + ',' + m + ')')), r.push('return ' + f), r.push('}'); const T = r.join('\n'); try { const O = new Function(a, g, 'return ' + T)(l, e); return O.mappings = d, O.sourcesContent = [i], O } catch (F) { for (var $ = 0, j = 0, S = 0, _ = void 0; $ < n.length;) { const C = n[$]; if (!this.checkExpression(C.code)) { j = C.tplToken.line, S = C.tplToken.start, _ = C.code; break }$++ } throw { name: 'CompileError', path: c, message: F.message, line: j + 1, column: S + 1, source: i, generated: _, stack: F.stack } } }, e }()); x.CONSTS = { DATA: s, IMPORTS: a, PRINT: c, INCLUDE: u, EXTEND: p, BLOCK: l, OPTIONS: g, OUT: f, LINE: h, BLOCKS: m, SLICE: d, FROM: v, ESCAPE: '$escape', EACH: '$each' }, e.exports = x }, function (e, t, n) { 'use strict'; const r = n(10); const i = n(2).default; const o = n(2).matchToToken; const s = function (e) { return e.match(i).map(function (e) { return i.lastIndex = 0, o(i.exec(e)) }).map(function (e) { return e.type === 'name' && r(e.value) && (e.type = 'keyword'), e }) }; e.exports = s }, function (e, t, n) { 'use strict'; const r = { abstract: !0, await: !0, boolean: !0, break: !0, byte: !0, case: !0, catch: !0, char: !0, class: !0, const: !0, continue: !0, debugger: !0, default: !0, delete: !0, do: !0, double: !0, else: !0, enum: !0, export: !0, extends: !0, false: !0, final: !0, finally: !0, float: !0, for: !0, function: !0, goto: !0, if: !0, implements: !0, import: !0, in: !0, instanceof: !0, int: !0, interface: !0, let: !0, long: !0, native: !0, new: !0, null: !0, package: !0, private: !0, protected: !0, public: !0, return: !0, short: !0, static: !0, super: !0, switch: !0, synchronized: !0, this: !0, throw: !0, transient: !0, true: !0, try: !0, typeof: !0, var: !0, void: !0, volatile: !0, while: !0, with: !0, yield: !0 }; e.exports = function (e) { return r.hasOwnProperty(e) } }, function (e, t, n) { 'use strict'; function r (e, t, n, r) { const i = new String(e); return i.line = t, i.start = n, i.end = r, i } const i = function (e, t) { for (var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, i = [{ type: 'string', value: e, line: 0, start: 0, end: e.length }], o = 0; o < t.length; o++)!(function (e) { for (let t = e.test.ignoreCase ? 'ig' : 'g', o = e.test.source + '|^$|[\\w\\W]', s = new RegExp(o, t), a = 0; a < i.length; a++) if (i[a].type === 'string') { for (var c = i[a].line, u = i[a].start, p = i[a].end, l = i[a].value.match(s), f = [], h = 0; h < l.length; h++) { const m = l[h]; e.test.lastIndex = 0; const d = e.test.exec(m); const v = d ? 'expression' : 'string'; const g = f[f.length - 1]; const y = g || i[a]; const b = y.value; u = y.line === c ? g ? g.end : u : b.length - b.lastIndexOf('\n') - 1, p = u + m.length; const x = { type: v, value: m, line: c, start: u, end: p }; if (v === 'string')g && g.type === 'string' ? (g.value += m, g.end += m.length) : f.push(x); else { d[0] = new r(d[0], c, u, p); const w = e.use.apply(n, d); x.script = w, f.push(x) }c += m.split(/\n/).length - 1 }i.splice.apply(i, [a, 1].concat(f)), a += f.length - 1 } }(t[o])); return i }; i.TYPE_STRING = 'string', i.TYPE_EXPRESSION = 'expression', i.TYPE_RAW = 'raw', i.TYPE_ESCAPE = 'escape', e.exports = i }, function (e, t, n) { 'use strict'; (function (t) { function r (e) { return typeof e !== 'string' && (e = e === undefined || e === null ? '' : typeof e === 'function' ? r(e.call(e)) : JSON.stringify(e)), e } function i (e) { const t = '' + e; const n = a.exec(t); if (!n) return e; let r = ''; let i = void 0; let o = void 0; let s = void 0; for (i = n.index, o = 0; i < t.length; i++) { switch (t.charCodeAt(i)) { case 34:s = '"'; break; case 38:s = '&'; break; case 39:s = '''; break; case 60:s = '<'; break; case 62:s = '>'; break; default:continue }o !== i && (r += t.substring(o, i)), o = i + 1, r += s } return o !== i ? r + t.substring(o, i) : r }/*! art-template@runtime | https://github.com/aui/art-template */ const o = n(0); const s = Object.create(o ? t : window); var a = /["&'<>]/; s.$escape = function (e) { return i(r(e)) }, s.$each = function (e, t) { if (Array.isArray(e)) for (let n = 0, r = e.length; n < r; n++)t(e[n], n); else for (const i in e)t(e[i], i) }, e.exports = s }).call(t, n(4)) }, function (e, t, n) { 'use strict'; const r = Object.prototype.toString; const i = function (e) { return e === null ? 'Null' : r.call(e).slice(8, -1) }; const o = function s (e, t) { let n = void 0; const r = i(e); if (r === 'Object' ? n = Object.create(t || {}) : r === 'Array' && (n = [].concat(t || [])), n) { for (const o in e)Object.hasOwnProperty.call(e, o) && (n[o] = s(e[o], n[o])); return n } return e }; e.exports = o }, function (e, t, n) { 'use strict'; const r = function (e, t, r, i) { const o = n(1); return i = i.$extend({ filename: i.resolveFilename(e, i), bail: !0, source: null }), o(i)(t, r) }; e.exports = r }, function (e, t, n) { 'use strict'; const r = function (e) { console.error(e.name, e.message) }; e.exports = r }, function (e, t, n) { 'use strict'; const r = { __data: Object.create(null), set: function (e, t) { this.__data[e] = t }, get: function (e) { return this.__data[e] }, reset: function () { this.__data = {} } }; e.exports = r }, function (e, t, n) { 'use strict'; const r = n(0); const i = function (e) { if (r) { return n(5).readFileSync(e, 'utf8') } const t = document.getElementById(e); return t.value || t.innerHTML }; e.exports = i }, function (e, t, n) { 'use strict'; var r = { test: /{{([@#]?)[ \t]*(\/?)([\w\W]*?)[ \t]*}}/, use: function (e, t, n, i) { const o = this; const s = o.options; const a = o.getEsTokens(i); const c = a.map(function (e) { return e.value }); const u = {}; let p = void 0; let l = !!t && 'raw'; let f = n + c.shift(); const h = function (t, n) { console.warn((s.filename || 'anonymous') + ':' + (e.line + 1) + ':' + (e.start + 1) + '\nTemplate upgrade: {{' + t + '}} -> {{' + n + '}}') }; switch (t === '#' && h('#value', '@value'), f) { case 'set':i = 'var ' + c.join('').trim(); break; case 'if':i = 'if(' + c.join('').trim() + '){'; break; case 'else':var m = c.indexOf('if'); ~m ? (c.splice(0, m + 1), i = '}else if(' + c.join('').trim() + '){') : i = '}else{'; break; case '/if':i = '}'; break; case 'each':p = r._split(a), p.shift(), p[1] === 'as' && (h('each object as value index', 'each object value index'), p.splice(1, 1)); i = '$each(' + (p[0] || '$data') + ',function(' + (p[1] || '$value') + ',' + (p[2] || '$index') + '){'; break; case '/each':i = '})'; break; case 'block':p = r._split(a), p.shift(), i = 'block(' + p.join(',').trim() + ',function(){'; break; case '/block':i = '})'; break; case 'echo':f = 'print', h('echo value', 'value'); case 'print':case 'include':case 'extend':if (c.join('').trim().indexOf('(') !== 0) { p = r._split(a), p.shift(), i = f + '(' + p.join(',') + ')'; break } default:if (~c.indexOf('|')) { const d = a.reduce(function (e, t) { const n = t.value; const r = t.type; return n === '|' ? e.push([]) : r !== 'whitespace' && r !== 'comment' && (e.length || e.push([]), n === ':' && e[e.length - 1].length === 1 ? h('value | filter: argv', 'value | filter argv') : e[e.length - 1].push(t)), e }, []).map(function (e) { return r._split(e) }); i = d.reduce(function (e, t) { const n = t.shift(); return t.unshift(e), '$imports.' + n + '(' + t.join(',') + ')' }, d.shift().join(' ').trim()) }l = l || 'escape' } return u.code = i, u.output = l, u }, _split: function (e) { e = e.filter(function (e) { const t = e.type; return t !== 'whitespace' && t !== 'comment' }); for (var t = 0, n = e.shift(), r = /\]|\)/, i = [[n]]; t < e.length;) { const o = e[t]; o.type === 'punctuator' || n.type === 'punctuator' && !r.test(n.value) ? i[i.length - 1].push(o) : i.push([o]), n = o, t++ } return i.map(function (e) { return e.map(function (e) { return e.value }).join('') }) } }; e.exports = r }, function (e, t, n) { 'use strict'; const r = { test: /<%(#?)((?:==|=#|[=-])?)[ \t]*([\w\W]*?)[ \t]*(-?)%>/, use: function (e, t, n, r) { return n = { '-': 'raw', '=': 'escape', '': !1, '==': 'raw', '=#': 'raw' }[n], t && (r = '/*' + r + '*/', n = !1), { code: r, output: n } } }; e.exports = r }, function (e, t, n) { 'use strict'; const r = n(0); const i = function (e, t) { if (r) { let i; const o = n(21).minify; const s = t.htmlMinifierOptions; const a = t.rules.map(function (e) { return e.test }); (i = s.ignoreCustomFragments).push.apply(i, a), e = o(e, s) } return e }; e.exports = i }, function (e, t) { !(function (e) { e.noop = function () {} }(typeof e === 'object' && typeof e.exports === 'object' ? e.exports : window)) }, function (e, t, n) { 'use strict'; const r = n(0); const i = /^\.+\//; const o = function (e, t) { if (r) { const o = n(5); const s = t.root; const a = t.extname; if (i.test(e)) { const c = t.filename; const u = !c || e === c; const p = u ? s : o.dirname(c); e = o.resolve(p, e) } else e = o.resolve(s, e); o.extname(e) || (e += a) } return e }; e.exports = o }, function (e, t, n) { 'use strict'; function r (e, t) { if (!(e instanceof t)) throw new TypeError('Cannot call a class as a function') } function i (e, t) { if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return !t || typeof t !== 'object' && typeof t !== 'function' ? e : t } function o (e, t) { if (typeof t !== 'function' && t !== null) throw new TypeError('Super expression must either be null or a function, not ' + typeof t); e.prototype = Object.create(t && t.prototype, { constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t) } function s (e) { const t = e.name; const n = e.source; const r = e.path; const i = e.line; const o = e.column; const s = e.generated; const a = e.message; if (!n) return a; const c = n.split(/\n/); const u = Math.max(i - 3, 0); const p = Math.min(c.length, i + 3); const l = c.slice(u, p).map(function (e, t) { const n = t + u + 1; return (n === i ? ' >> ' : ' ') + n + '| ' + e }).join('\n'); return (r || 'anonymous') + ':' + i + ':' + o + '\n' + l + '\n\n' + t + ': ' + a + (s ? '\n generated: ' + s : '') } const a = (function (e) { function t (n) { r(this, t); const o = i(this, e.call(this, n.message)); return o.name = 'TemplateError', o.message = s(n), Error.captureStackTrace && Error.captureStackTrace(o, o.constructor), o } return o(t, e), t }(Error)); e.exports = a }, function (e, t, n) { 'use strict'; e.exports = n(3) }])) }))