devsite/node_modules/nunjucks/browser/nunjucks.min.js
2024-07-07 18:49:38 -07:00

3 lines
88 KiB
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*! Browser bundle of nunjucks 3.2.4 */
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.nunjucks=n():t.nunjucks=n()}("undefined"!=typeof self?self:this,function(){return function(t){var n={};function i(r){if(n[r])return n[r].exports;var e=n[r]={i:r,l:!1,exports:{}};return t[r].call(e.exports,e,e.exports,i),e.l=!0,e.exports}return i.m=t,i.c=n,i.d=function(t,n,r){i.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},i.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(n,"a",n),n},i.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},i.p="",i(i.s=11)}([function(t,n,i){"use strict";var r=Array.prototype,e=Object.prototype,s={"&":"&amp;",'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","\\":"&#92;"},o=/[&"'<>\\]/g;function u(t,n){return e.hasOwnProperty.call(t,n)}function h(t){return s[t]}function f(t,n,i){var r,e,s;if(t instanceof Error&&(t=(e=t).name+": "+e.message),Object.setPrototypeOf?Object.setPrototypeOf(r=Error(t),f.prototype):Object.defineProperty(r=this,"message",{enumerable:!1,writable:!0,value:t}),Object.defineProperty(r,"name",{value:"Template render error"}),Error.captureStackTrace&&Error.captureStackTrace(r,this.constructor),e){var o=Object.getOwnPropertyDescriptor(e,"stack");(s=o&&(o.get||function(){return o.value}))||(s=function(){return e.stack})}else{var u=Error(t).stack;s=function(){return u}}return Object.defineProperty(r,"stack",{get:function(){return s.call(r)}}),Object.defineProperty(r,"cause",{value:e}),r.lineno=n,r.colno=i,r.firstUpdate=!0,r.Update=function(t){var n="("+(t||"unknown path")+")";return this.firstUpdate&&(this.lineno&&this.colno?n+=" [Line "+this.lineno+", Column "+this.colno+"]":this.lineno&&(n+=" [Line "+this.lineno+"]")),n+="\n ",this.firstUpdate&&(n+=" "),this.message=n+(this.message||""),this.firstUpdate=!1,this},r}function c(t){return"[object Function]"===e.toString.call(t)}function a(t){return"[object Array]"===e.toString.call(t)}function l(t){return"[object String]"===e.toString.call(t)}function v(t){return"[object Object]"===e.toString.call(t)}function p(t){var n,i=(n=t)?"string"==typeof n?n.split("."):[n]:[];return function(t){for(var n=t,r=0;r<i.length;r++){var e=i[r];if(!u(n,e))return;n=n[e]}return n}}function d(t){return Array.prototype.slice.call(t)}function m(t,n,i){return Array.prototype.indexOf.call(t||[],n,i)}function w(t){var n=[];for(var i in t)u(t,i)&&n.push(i);return n}(n=t.exports={}).hasOwnProp=u,n.t=function(t,i,r){if(r.Update||(r=new n.TemplateError(r)),r.Update(t),!i){var e=r;(r=Error(e.message)).name=e.name}return r},Object.setPrototypeOf?Object.setPrototypeOf(f.prototype,Error.prototype):f.prototype=Object.create(Error.prototype,{constructor:{value:f}}),n.TemplateError=f,n.escape=function(t){return t.replace(o,h)},n.isFunction=c,n.isArray=a,n.isString=l,n.isObject=v,n.getAttrGetter=p,n.groupBy=function(t,n,i){for(var r={},e=c(n)?n:p(n),s=0;s<t.length;s++){var o=t[s],u=e(o,s);if(void 0===u&&!0===i)throw new TypeError('groupby: attribute "'+n+'" resolved to undefined');(r[u]||(r[u]=[])).push(o)}return r},n.toArray=d,n.without=function(t){var n=[];if(!t)return n;for(var i=t.length,r=d(arguments).slice(1),e=-1;++e<i;)-1===m(r,t[e])&&n.push(t[e]);return n},n.repeat=function(t,n){for(var i="",r=0;r<n;r++)i+=t;return i},n.each=function(t,n,i){if(null!=t)if(r.forEach&&t.forEach===r.forEach)t.forEach(n,i);else if(t.length===+t.length)for(var e=0,s=t.length;e<s;e++)n.call(i,t[e],e,t)},n.map=function(t,n){var i=[];if(null==t)return i;if(r.map&&t.map===r.map)return t.map(n);for(var e=0;e<t.length;e++)i[i.length]=n(t[e],e);return t.length===+t.length&&(i.length=t.length),i},n.asyncIter=function(t,n,i){var r=-1;!function e(){++r<t.length?n(t[r],r,e,i):i()}()},n.asyncFor=function(t,n,i){var r=w(t||{}),e=r.length,s=-1;!function o(){var u=r[++s];s<e?n(u,t[u],s,e,o):i()}()},n.indexOf=m,n.keys=w,n.r=function(t){return w(t).map(function(n){return[n,t[n]]})},n.u=function(t){return w(t).map(function(n){return t[n]})},n.h=n.extend=function(t,n){return t=t||{},w(n).forEach(function(i){t[i]=n[i]}),t},n.inOperator=function(t,n){if(a(n)||l(n))return-1!==n.indexOf(t);if(v(n))return t in n;throw Error('Cannot use "in" operator to search for "'+t+'" in unexpected types.')}},function(t,n,i){"use strict";function r(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(e=r.key,void 0,"symbol"==typeof(s=function(t,n){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(e,"string"))?s:s+""),r)}var e,s}function e(t,n,i){return n&&r(t.prototype,n),i&&r(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,o(t,n)}function o(t,n){return(o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t})(t,n)}var u=i(16),h=i(0);function f(t,n,i){i=i||{},h.keys(i).forEach(function(n){var r,e;i[n]=(r=t.prototype[n],e=i[n],"function"!=typeof r||"function"!=typeof e?e:function(){var t=this.parent;this.parent=r;var n=e.apply(this,arguments);return this.parent=t,n})});var r=function(t){function i(){return t.apply(this,arguments)||this}return s(i,t),e(i,[{key:"typename",get:function(){return n}}]),i}(t);return h.h(r.prototype,i),r}var c=function(){function t(){this.init.apply(this,arguments)}return t.prototype.init=function(){},t.extend=function(t,n){return"object"==typeof t&&(n=t,t="anonymous"),f(this,t,n)},e(t,[{key:"typename",get:function(){return this.constructor.name}}]),t}(),a=function(t){function n(){var n,i;return(n=i=t.call(this)||this).init.apply(n,arguments),i}return s(n,t),n.prototype.init=function(){},n.extend=function(t,n){return"object"==typeof t&&(n=t,t="anonymous"),f(this,t,n)},e(n,[{key:"typename",get:function(){return this.constructor.name}}]),n}(u);t.exports={Obj:c,EmitterObj:a}},function(t,n,i){"use strict";var r=i(0),e=Array.from,s="function"==typeof Symbol&&Symbol.iterator&&"function"==typeof e,o=function(){function t(t,n){this.variables=Object.create(null),this.parent=t,this.topLevel=!1,this.isolateWrites=n}var n=t.prototype;return n.set=function(t,n,i){var r=t.split("."),e=this.variables,s=this;if(i&&(s=this.resolve(r[0],!0)))s.set(t,n);else{for(var o=0;o<r.length-1;o++){var u=r[o];e[u]||(e[u]={}),e=e[u]}e[r[r.length-1]]=n}},n.get=function(t){var n=this.variables[t];return void 0!==n?n:null},n.lookup=function(t){var n=this.parent,i=this.variables[t];return void 0!==i?i:n&&n.lookup(t)},n.resolve=function(t,n){var i=n&&this.isolateWrites?void 0:this.parent;return void 0!==this.variables[t]?this:i&&i.resolve(t)},n.push=function(n){return new t(this,n)},n.pop=function(){return this.parent},t}();function u(t){return t&&Object.prototype.hasOwnProperty.call(t,"__keywords")}function h(t){var n=t.length;return 0===n?0:u(t[n-1])?n-1:n}function f(t){if("string"!=typeof t)return t;this.val=t,this.length=t.length}f.prototype=Object.create(String.prototype,{length:{writable:!0,configurable:!0,value:0}}),f.prototype.valueOf=function(){return this.val},f.prototype.toString=function(){return this.val},t.exports={Frame:o,makeMacro:function(t,n,i){return function(){for(var r=arguments.length,e=Array(r),s=0;s<r;s++)e[s]=arguments[s];var o,f=h(e),c=function(t){var n=t.length;if(n){var i=t[n-1];if(u(i))return i}return{}}(e);if(f>t.length)o=e.slice(0,t.length),e.slice(o.length,f).forEach(function(t,i){i<n.length&&(c[n[i]]=t)}),o.push(c);else if(f<t.length){o=e.slice(0,f);for(var a=f;a<t.length;a++){var l=t[a];o.push(c[l]),delete c[l]}o.push(c)}else o=e;return i.apply(this,o)}},makeKeywordArgs:function(t){return t.__keywords=!0,t},numArgs:h,suppressValue:function(t,n){return t=void 0!==t&&null!==t?t:"",!n||t instanceof f||(t=r.escape(t.toString())),t},ensureDefined:function(t,n,i){if(null===t||void 0===t)throw new r.TemplateError("attempted to output null or undefined value",n+1,i+1);return t},memberLookup:function(t,n){if(void 0!==t&&null!==t)return"function"==typeof t[n]?function(){for(var i=arguments.length,r=Array(i),e=0;e<i;e++)r[e]=arguments[e];return t[n].apply(t,r)}:t[n]},contextOrFrameLookup:function(t,n,i){var r=n.lookup(i);return void 0!==r?r:t.lookup(i)},callWrap:function(t,n,i,r){if(!t)throw Error("Unable to call `"+n+"`, which is undefined or falsey");if("function"!=typeof t)throw Error("Unable to call `"+n+"`, which is not a function");return t.apply(i,r)},handleError:function(t,n,i){return t.lineno?t:new r.TemplateError(t,n,i)},isArray:r.isArray,keys:r.keys,SafeString:f,copySafeness:function(t,n){return t instanceof f?new f(n):n.toString()},markSafe:function(t){var n=typeof t;return"string"===n?new f(t):"function"!==n?t:function(n){var i=t.apply(this,arguments);return"string"==typeof i?new f(i):i}},asyncEach:function(t,n,i,e){if(r.isArray(t)){var s=t.length;r.asyncIter(t,function(t,r,e){switch(n){case 1:i(t,r,s,e);break;case 2:i(t[0],t[1],r,s,e);break;case 3:i(t[0],t[1],t[2],r,s,e);break;default:t.push(r,s,e),i.apply(this,t)}},e)}else r.asyncFor(t,function(t,n,r,e,s){i(t,n,r,e,s)},e)},asyncAll:function(t,n,i,e){var s,o,u=0;function h(t,n){u++,o[t]=n,u===s&&e(null,o.join(""))}if(r.isArray(t))if(s=t.length,o=Array(s),0===s)e(null,"");else for(var f=0;f<t.length;f++){var c=t[f];switch(n){case 1:i(c,f,s,h);break;case 2:i(c[0],c[1],f,s,h);break;case 3:i(c[0],c[1],c[2],f,s,h);break;default:c.push(f,s,h),i.apply(this,c)}}else{var a=r.keys(t||{});if(s=a.length,o=Array(s),0===s)e(null,"");else for(var l=0;l<a.length;l++){var v=a[l];i(v,t[v],l,s,h)}}},inOperator:r.inOperator,fromIterator:function(t){return"object"!=typeof t||null===t||r.isArray(t)?t:s&&Symbol.iterator in t?e(t):t}}},function(t,n,i){"use strict";function r(t,n){for(var i=0;i<n.length;i++){var r=n[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(e=r.key,void 0,"symbol"==typeof(s=function(t,n){if("object"!=typeof t||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var r=i.call(t,n||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(t)}(e,"string"))?s:s+""),r)}var e,s}function e(t,n,i){return n&&r(t.prototype,n),i&&r(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function s(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,o(t,n)}function o(t,n){return(o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t})(t,n)}function u(t,n,i){t instanceof n&&i.push(t),t instanceof h&&t.findAll(n,i)}var h=function(t){function n(){return t.apply(this,arguments)||this}s(n,t);var i=n.prototype;return i.init=function(t,n){for(var i=arguments,r=this,e=arguments.length,s=Array(e>2?e-2:0),o=2;o<e;o++)s[o-2]=arguments[o];this.lineno=t,this.colno=n,this.fields.forEach(function(t,n){var e=i[n+2];void 0===e&&(e=null),r[t]=e})},i.findAll=function(t,n){var i=this;return n=n||[],this instanceof c?this.children.forEach(function(i){return u(i,t,n)}):this.fields.forEach(function(r){return u(i[r],t,n)}),n},i.iterFields=function(t){var n=this;this.fields.forEach(function(i){t(n[i],i)})},n}(i(1).Obj),f=function(t){function n(){return t.apply(this,arguments)||this}return s(n,t),e(n,[{key:"typename",get:function(){return"Value"}},{key:"fields",get:function(){return["value"]}}]),n}(h),c=function(t){function n(){return t.apply(this,arguments)||this}s(n,t);var i=n.prototype;return i.init=function(n,i,r){t.prototype.init.call(this,n,i,r||[])},i.addChild=function(t){this.children.push(t)},e(n,[{key:"typename",get:function(){return"NodeList"}},{key:"fields",get:function(){return["children"]}}]),n}(h),a=c.extend("Root"),l=f.extend("Literal"),v=f.extend("Symbol"),p=c.extend("Group"),d=c.extend("Array"),m=h.extend("Pair",{fields:["key","value"]}),w=c.extend("Dict"),b=h.extend("LookupVal",{fields:["target","val"]}),y=h.extend("If",{fields:["cond","body","else_"]}),g=y.extend("IfAsync"),k=h.extend("InlineIf",{fields:["cond","body","else_"]}),E=h.extend("For",{fields:["arr","name","body","else_"]}),O=E.extend("AsyncEach"),x=E.extend("AsyncAll"),j=h.extend("Macro",{fields:["name","args","body"]}),T=j.extend("Caller"),A=h.extend("Import",{fields:["template","target","withContext"]}),N=function(t){function n(){return t.apply(this,arguments)||this}return s(n,t),n.prototype.init=function(n,i,r,e,s){t.prototype.init.call(this,n,i,r,e||new c,s)},e(n,[{key:"typename",get:function(){return"FromImport"}},{key:"fields",get:function(){return["template","names","withContext"]}}]),n}(h),S=h.extend("FunCall",{fields:["name","args"]}),_=S.extend("Filter"),L=_.extend("FilterAsync",{fields:["name","args","symbol"]}),F=w.extend("KeywordArgs"),I=h.extend("Block",{fields:["name","body"]}),C=h.extend("Super",{fields:["blockName","symbol"]}),R=h.extend("TemplateRef",{fields:["template"]}).extend("Extends"),K=h.extend("Include",{fields:["template","ignoreMissing"]}),M=h.extend("Set",{fields:["targets","value"]}),P=h.extend("Switch",{fields:["expr","cases","default"]}),B=h.extend("Case",{fields:["cond","body"]}),V=c.extend("Output"),D=h.extend("Capture",{fields:["body"]}),U=l.extend("TemplateData"),$=h.extend("UnaryOp",{fields:["target"]}),G=h.extend("BinOp",{fields:["left","right"]}),W=G.extend("In"),H=G.extend("Is"),J=G.extend("Or"),z=G.extend("And"),Y=$.extend("Not"),q=G.extend("Add"),X=G.extend("Concat"),Q=G.extend("Sub"),Z=G.extend("Mul"),tt=G.extend("Div"),nt=G.extend("FloorDiv"),it=G.extend("Mod"),rt=G.extend("Pow"),et=$.extend("Neg"),st=$.extend("Pos"),ot=h.extend("Compare",{fields:["expr","ops"]}),ut=h.extend("CompareOperand",{fields:["expr","type"]}),ht=h.extend("CallExtension",{init:function(t,n,i,r){this.parent(),this.extName=t.__name||t,this.prop=n,this.args=i||new c,this.contentArgs=r||[],this.autoescape=t.autoescape},fields:["extName","prop","args","contentArgs"]}),ft=ht.extend("CallExtensionAsync");function ct(t,n,i){var r=t.split("\n");r.forEach(function(t,e){t&&(i&&e>0||!i)&&process.stdout.write(" ".repeat(n));var s=e===r.length-1?"":"\n";process.stdout.write(""+t+s)})}t.exports={Node:h,Root:a,NodeList:c,Value:f,Literal:l,Symbol:v,Group:p,Array:d,Pair:m,Dict:w,Output:V,Capture:D,TemplateData:U,If:y,IfAsync:g,InlineIf:k,For:E,AsyncEach:O,AsyncAll:x,Macro:j,Caller:T,Import:A,FromImport:N,FunCall:S,Filter:_,FilterAsync:L,KeywordArgs:F,Block:I,Super:C,Extends:R,Include:K,Set:M,Switch:P,Case:B,LookupVal:b,BinOp:G,In:W,Is:H,Or:J,And:z,Not:Y,Add:q,Concat:X,Sub:Q,Mul:Z,Div:tt,FloorDiv:nt,Mod:it,Pow:rt,Neg:et,Pos:st,Compare:ot,CompareOperand:ut,CallExtension:ht,CallExtensionAsync:ft,printNodes:function t(n,i){if(i=i||0,ct(n.typename+": ",i),n instanceof c)ct("\n"),n.children.forEach(function(n){t(n,i+2)});else if(n instanceof ht)ct(n.extName+"."+n.prop+"\n"),n.args&&t(n.args,i+2),n.contentArgs&&n.contentArgs.forEach(function(n){t(n,i+2)});else{var r=[],e=null;n.iterFields(function(t,n){t instanceof h?r.push([n,t]):(e=e||{})[n]=t}),e?ct(JSON.stringify(e,null,2)+"\n",null,!0):ct("\n"),r.forEach(function(n){var r=n[0],e=n[1];ct("["+r+"] =>",i+2),t(e,i+4)})}}}},function(t,n){},function(t,n,i){"use strict";function r(t,n){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t})(t,n)}var e=i(8),s=i(17),o=i(3),u=i(0).TemplateError,h=i(2).Frame,f={"==":"==","===":"===","!=":"!=","!==":"!==","<":"<",">":">","<=":"<=",">=":">="},c=function(t){var n,i;function e(){return t.apply(this,arguments)||this}i=t,(n=e).prototype=Object.create(i.prototype),n.prototype.constructor=n,r(n,i);var s=e.prototype;return s.init=function(t,n){this.templateName=t,this.codebuf=[],this.lastId=0,this.buffer=null,this.bufferStack=[],this.f="",this.inBlock=!1,this.throwOnUndefined=n},s.fail=function(t,n,i){throw void 0!==n&&(n+=1),void 0!==i&&(i+=1),new u(t,n,i)},s.a=function(){var t=this.v();return this.bufferStack.push(this.buffer),this.buffer=t,this.w("var "+this.buffer+' = "";'),t},s.b=function(){this.buffer=this.bufferStack.pop()},s.w=function(t){this.codebuf.push(t)},s.y=function(t){this.w(t+"\n")},s.g=function(){for(var t=this,n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];i.forEach(function(n){return t.y(n)})},s.k=function(t,n){this.buffer="output",this.f="",this.y("function "+n+"(env, context, frame, runtime, cb) {"),this.y("var lineno = "+t.lineno+";"),this.y("var colno = "+t.colno+";"),this.y("var "+this.buffer+' = "";'),this.y("try {")},s.O=function(t){t||this.y("cb(null, "+this.buffer+");"),this.x(),this.y("} catch (e) {"),this.y(" cb(runtime.handleError(e, lineno, colno));"),this.y("}"),this.y("}"),this.buffer=null},s.j=function(){this.f+="})"},s.x=function(){this.y(this.f+";"),this.f=""},s.T=function(t){var n=this.f;this.f="",t.call(this),this.x(),this.f=n},s.A=function(t){var n=this.v();return"function("+n+(t?","+t:"")+") {\nif("+n+") { cb("+n+"); return; }"},s.v=function(){return this.lastId++,"t_"+this.lastId},s.N=function(){return null==this.templateName?"undefined":JSON.stringify(this.templateName)},s.S=function(t,n){var i=this;t.children.forEach(function(t){i.compile(t,n)})},s._=function(t,n,i,r){var e=this;i&&this.w(i),t.children.forEach(function(t,i){i>0&&e.w(","),e.compile(t,n)}),r&&this.w(r)},s.L=function(t,n){this.assertType(t,o.Literal,o.Symbol,o.Group,o.Array,o.Dict,o.FunCall,o.Caller,o.Filter,o.LookupVal,o.Compare,o.InlineIf,o.In,o.Is,o.And,o.Or,o.Not,o.Add,o.Concat,o.Sub,o.Mul,o.Div,o.FloorDiv,o.Mod,o.Pow,o.Neg,o.Pos,o.Compare,o.NodeList),this.compile(t,n)},s.assertType=function(t){for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];i.some(function(n){return t instanceof n})||this.fail("assertType: invalid type: "+t.typename,t.lineno,t.colno)},s.compileCallExtension=function(t,n,i){var r=this,e=t.args,s=t.contentArgs,u="boolean"!=typeof t.autoescape||t.autoescape;if(i||this.w(this.buffer+" += runtime.suppressValue("),this.w('env.getExtension("'+t.extName+'")["'+t.prop+'"]('),this.w("context"),(e||s)&&this.w(","),e&&(e instanceof o.NodeList||this.fail("compileCallExtension: arguments must be a NodeList, use `parser.parseSignature`"),e.children.forEach(function(t,i){r.L(t,n),(i!==e.children.length-1||s.length)&&r.w(",")})),s.length&&s.forEach(function(t,i){if(i>0&&r.w(","),t){r.y("function(cb) {"),r.y("if(!cb) { cb = function(err) { if(err) { throw err; }}}");var e=r.a();r.T(function(){r.compile(t,n),r.y("cb(null, "+e+");")}),r.b(),r.y("return "+e+";"),r.y("}")}else r.w("null")}),i){var h=this.v();this.y(", "+this.A(h)),this.y(this.buffer+" += runtime.suppressValue("+h+", "+u+" && env.opts.autoescape);"),this.j()}else this.w(")"),this.w(", "+u+" && env.opts.autoescape);\n")},s.compileCallExtensionAsync=function(t,n){this.compileCallExtension(t,n,!0)},s.compileNodeList=function(t,n){this.S(t,n)},s.compileLiteral=function(t){if("string"==typeof t.value){var n=t.value.replace(/\\/g,"\\\\");n=(n=(n=(n=(n=n.replace(/"/g,'\\"')).replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t")).replace(/\u2028/g,"\\u2028"),this.w('"'+n+'"')}else null===t.value?this.w("null"):this.w(t.value.toString())},s.compileSymbol=function(t,n){var i=t.value,r=n.lookup(i);r?this.w(r):this.w('runtime.contextOrFrameLookup(context, frame, "'+i+'")')},s.compileGroup=function(t,n){this._(t,n,"(",")")},s.compileArray=function(t,n){this._(t,n,"[","]")},s.compileDict=function(t,n){this._(t,n,"{","}")},s.compilePair=function(t,n){var i=t.key,r=t.value;i instanceof o.Symbol?i=new o.Literal(i.lineno,i.colno,i.value):i instanceof o.Literal&&"string"==typeof i.value||this.fail("compilePair: Dict keys must be strings or names",i.lineno,i.colno),this.compile(i,n),this.w(": "),this.L(r,n)},s.compileInlineIf=function(t,n){this.w("("),this.compile(t.cond,n),this.w("?"),this.compile(t.body,n),this.w(":"),null!==t.else_?this.compile(t.else_,n):this.w('""'),this.w(")")},s.compileIn=function(t,n){this.w("runtime.inOperator("),this.compile(t.left,n),this.w(","),this.compile(t.right,n),this.w(")")},s.compileIs=function(t,n){var i=t.right.name?t.right.name.value:t.right.value;this.w('env.getTest("'+i+'").call(context, '),this.compile(t.left,n),t.right.args&&(this.w(","),this.compile(t.right.args,n)),this.w(") === true")},s.F=function(t,n,i){this.compile(t.left,n),this.w(i),this.compile(t.right,n)},s.compileOr=function(t,n){return this.F(t,n," || ")},s.compileAnd=function(t,n){return this.F(t,n," && ")},s.compileAdd=function(t,n){return this.F(t,n," + ")},s.compileConcat=function(t,n){return this.F(t,n,' + "" + ')},s.compileSub=function(t,n){return this.F(t,n," - ")},s.compileMul=function(t,n){return this.F(t,n," * ")},s.compileDiv=function(t,n){return this.F(t,n," / ")},s.compileMod=function(t,n){return this.F(t,n," % ")},s.compileNot=function(t,n){this.w("!"),this.compile(t.target,n)},s.compileFloorDiv=function(t,n){this.w("Math.floor("),this.compile(t.left,n),this.w(" / "),this.compile(t.right,n),this.w(")")},s.compilePow=function(t,n){this.w("Math.pow("),this.compile(t.left,n),this.w(", "),this.compile(t.right,n),this.w(")")},s.compileNeg=function(t,n){this.w("-"),this.compile(t.target,n)},s.compilePos=function(t,n){this.w("+"),this.compile(t.target,n)},s.compileCompare=function(t,n){var i=this;this.compile(t.expr,n),t.ops.forEach(function(t){i.w(" "+f[t.type]+" "),i.compile(t.expr,n)})},s.compileLookupVal=function(t,n){this.w("runtime.memberLookup(("),this.L(t.target,n),this.w("),"),this.L(t.val,n),this.w(")")},s.I=function(t){switch(t.typename){case"Symbol":return t.value;case"FunCall":return"the return value of ("+this.I(t.name)+")";case"LookupVal":return this.I(t.target)+'["'+this.I(t.val)+'"]';case"Literal":return t.value.toString();default:return"--expression--"}},s.compileFunCall=function(t,n){this.w("(lineno = "+t.lineno+", colno = "+t.colno+", "),this.w("runtime.callWrap("),this.L(t.name,n),this.w(', "'+this.I(t.name).replace(/"/g,'\\"')+'", context, '),this._(t.args,n,"[","])"),this.w(")")},s.compileFilter=function(t,n){var i=t.name;this.assertType(i,o.Symbol),this.w('env.getFilter("'+i.value+'").call(context, '),this._(t.args,n),this.w(")")},s.compileFilterAsync=function(t,n){var i=t.name,r=t.symbol.value;this.assertType(i,o.Symbol),n.set(r,r),this.w('env.getFilter("'+i.value+'").call(context, '),this._(t.args,n),this.y(", "+this.A(r)),this.j()},s.compileKeywordArgs=function(t,n){this.w("runtime.makeKeywordArgs("),this.compileDict(t,n),this.w(")")},s.compileSet=function(t,n){var i=this,r=[];t.targets.forEach(function(t){var e=t.value,s=n.lookup(e);null!==s&&void 0!==s||(s=i.v(),i.y("var "+s+";")),r.push(s)}),t.value?(this.w(r.join(" = ")+" = "),this.L(t.value,n),this.y(";")):(this.w(r.join(" = ")+" = "),this.compile(t.body,n),this.y(";")),t.targets.forEach(function(t,n){var e=r[n],s=t.value;i.y('frame.set("'+s+'", '+e+", true);"),i.y("if(frame.topLevel) {"),i.y('context.setVariable("'+s+'", '+e+");"),i.y("}"),"_"!==s.charAt(0)&&(i.y("if(frame.topLevel) {"),i.y('context.addExport("'+s+'", '+e+");"),i.y("}"))})},s.compileSwitch=function(t,n){var i=this;this.w("switch ("),this.compile(t.expr,n),this.w(") {"),t.cases.forEach(function(t,r){i.w("case "),i.compile(t.cond,n),i.w(": "),i.compile(t.body,n),t.body.children.length&&i.y("break;")}),t.default&&(this.w("default:"),this.compile(t.default,n)),this.w("}")},s.compileIf=function(t,n,i){var r=this;this.w("if("),this.L(t.cond,n),this.y(") {"),this.T(function(){r.compile(t.body,n),i&&r.w("cb()")}),t.else_?(this.y("}\nelse {"),this.T(function(){r.compile(t.else_,n),i&&r.w("cb()")})):i&&(this.y("}\nelse {"),this.w("cb()")),this.y("}")},s.compileIfAsync=function(t,n){this.w("(function(cb) {"),this.compileIf(t,n,!0),this.w("})("+this.A()),this.j()},s.C=function(t,n,i,r){var e=this;[{name:"index",val:i+" + 1"},{name:"index0",val:i},{name:"revindex",val:r+" - "+i},{name:"revindex0",val:r+" - "+i+" - 1"},{name:"first",val:i+" === 0"},{name:"last",val:i+" === "+r+" - 1"},{name:"length",val:r}].forEach(function(t){e.y('frame.set("loop.'+t.name+'", '+t.val+");")})},s.compileFor=function(t,n){var i=this,r=this.v(),e=this.v(),s=this.v();if(n=n.push(),this.y("frame = frame.push();"),this.w("var "+s+" = "),this.L(t.arr,n),this.y(";"),this.w("if("+s+") {"),this.y(s+" = runtime.fromIterator("+s+");"),t.name instanceof o.Array){this.y("var "+r+";"),this.y("if(runtime.isArray("+s+")) {"),this.y("var "+e+" = "+s+".length;"),this.y("for("+r+"=0; "+r+" < "+s+".length; "+r+"++) {"),t.name.children.forEach(function(e,o){var u=i.v();i.y("var "+u+" = "+s+"["+r+"]["+o+"];"),i.y('frame.set("'+e+'", '+s+"["+r+"]["+o+"]);"),n.set(t.name.children[o].value,u)}),this.C(t,s,r,e),this.T(function(){i.compile(t.body,n)}),this.y("}"),this.y("} else {");var u=t.name.children,h=u[0],f=u[1],c=this.v(),a=this.v();n.set(h.value,c),n.set(f.value,a),this.y(r+" = -1;"),this.y("var "+e+" = runtime.keys("+s+").length;"),this.y("for(var "+c+" in "+s+") {"),this.y(r+"++;"),this.y("var "+a+" = "+s+"["+c+"];"),this.y('frame.set("'+h.value+'", '+c+");"),this.y('frame.set("'+f.value+'", '+a+");"),this.C(t,s,r,e),this.T(function(){i.compile(t.body,n)}),this.y("}"),this.y("}")}else{var l=this.v();n.set(t.name.value,l),this.y("var "+e+" = "+s+".length;"),this.y("for(var "+r+"=0; "+r+" < "+s+".length; "+r+"++) {"),this.y("var "+l+" = "+s+"["+r+"];"),this.y('frame.set("'+t.name.value+'", '+l+");"),this.C(t,s,r,e),this.T(function(){i.compile(t.body,n)}),this.y("}")}this.y("}"),t.else_&&(this.y("if (!"+e+") {"),this.compile(t.else_,n),this.y("}")),this.y("frame = frame.pop();")},s.R=function(t,n,i){var r=this,e=this.v(),s=this.v(),u=this.v(),h=i?"asyncAll":"asyncEach";if(n=n.push(),this.y("frame = frame.push();"),this.w("var "+u+" = runtime.fromIterator("),this.L(t.arr,n),this.y(");"),t.name instanceof o.Array){var f=t.name.children.length;this.w("runtime."+h+"("+u+", "+f+", function("),t.name.children.forEach(function(t){r.w(t.value+",")}),this.w(e+","+s+",next) {"),t.name.children.forEach(function(t){var i=t.value;n.set(i,i),r.y('frame.set("'+i+'", '+i+");")})}else{var c=t.name.value;this.y("runtime."+h+"("+u+", 1, function("+c+", "+e+", "+s+",next) {"),this.y('frame.set("'+c+'", '+c+");"),n.set(c,c)}this.C(t,u,e,s),this.T(function(){var s;i&&(s=r.a()),r.compile(t.body,n),r.y("next("+e+(s?","+s:"")+");"),i&&r.b()});var a=this.v();this.y("}, "+this.A(a)),this.j(),i&&this.y(this.buffer+" += "+a+";"),t.else_&&(this.y("if (!"+u+".length) {"),this.compile(t.else_,n),this.y("}")),this.y("frame = frame.pop();")},s.compileAsyncEach=function(t,n){this.R(t,n)},s.compileAsyncAll=function(t,n){this.R(t,n,!0)},s.K=function(t,n){var i=this,r=[],e=null,s="macro_"+this.v(),u=void 0!==n;t.args.children.forEach(function(n,s){s===t.args.children.length-1&&n instanceof o.Dict?e=n:(i.assertType(n,o.Symbol),r.push(n))});var f,c=[].concat(r.map(function(t){return"l_"+t.value}),["kwargs"]),a=r.map(function(t){return'"'+t.value+'"'}),l=(e&&e.children||[]).map(function(t){return'"'+t.key.value+'"'});f=u?n.push(!0):new h,this.g("var "+s+" = runtime.makeMacro(","["+a.join(", ")+"], ","["+l.join(", ")+"], ","function ("+c.join(", ")+") {","var callerFrame = frame;","frame = "+(u?"frame.push(true);":"new runtime.Frame();"),"kwargs = kwargs || {};",'if (Object.prototype.hasOwnProperty.call(kwargs, "caller")) {','frame.set("caller", kwargs.caller); }'),r.forEach(function(t){i.y('frame.set("'+t.value+'", l_'+t.value+");"),f.set(t.value,"l_"+t.value)}),e&&e.children.forEach(function(t){var n=t.key.value;i.w('frame.set("'+n+'", '),i.w('Object.prototype.hasOwnProperty.call(kwargs, "'+n+'")'),i.w(' ? kwargs["'+n+'"] : '),i.L(t.value,f),i.w(");")});var v=this.a();return this.T(function(){i.compile(t.body,f)}),this.y("frame = "+(u?"frame.pop();":"callerFrame;")),this.y("return new runtime.SafeString("+v+");"),this.y("});"),this.b(),s},s.compileMacro=function(t,n){var i=this.K(t),r=t.name.value;n.set(r,i),n.parent?this.y('frame.set("'+r+'", '+i+");"):("_"!==t.name.value.charAt(0)&&this.y('context.addExport("'+r+'");'),this.y('context.setVariable("'+r+'", '+i+");"))},s.compileCaller=function(t,n){this.w("(function (){");var i=this.K(t,n);this.w("return "+i+";})()")},s.M=function(t,n,i,r){var e=this.v(),s=this.N(),o=this.A(e),u=i?"true":"false",h=r?"true":"false";return this.w("env.getTemplate("),this.L(t.template,n),this.y(", "+u+", "+s+", "+h+", "+o),e},s.compileImport=function(t,n){var i=t.target.value,r=this.M(t,n,!1,!1);this.j(),this.y(r+".getExported("+(t.withContext?"context.getVariables(), frame, ":"")+this.A(r)),this.j(),n.set(i,r),n.parent?this.y('frame.set("'+i+'", '+r+");"):this.y('context.setVariable("'+i+'", '+r+");")},s.compileFromImport=function(t,n){var i=this,r=this.M(t,n,!1,!1);this.j(),this.y(r+".getExported("+(t.withContext?"context.getVariables(), frame, ":"")+this.A(r)),this.j(),t.names.children.forEach(function(t){var e,s,u=i.v();t instanceof o.Pair?(e=t.key.value,s=t.value.value):s=e=t.value,i.y("if(Object.prototype.hasOwnProperty.call("+r+', "'+e+'")) {'),i.y("var "+u+" = "+r+"."+e+";"),i.y("} else {"),i.y("cb(new Error(\"cannot import '"+e+"'\")); return;"),i.y("}"),n.set(s,u),n.parent?i.y('frame.set("'+s+'", '+u+");"):i.y('context.setVariable("'+s+'", '+u+");")})},s.compileBlock=function(t){var n=this.v();this.inBlock||this.w('(parentTemplate ? function(e, c, f, r, cb) { cb(""); } : '),this.w('context.getBlock("'+t.name.value+'")'),this.inBlock||this.w(")"),this.y("(env, context, frame, runtime, "+this.A(n)),this.y(this.buffer+" += "+n+";"),this.j()},s.compileSuper=function(t,n){var i=t.blockName.value,r=t.symbol.value,e=this.A(r);this.y('context.getSuper(env, "'+i+'", b_'+i+", frame, runtime, "+e),this.y(r+" = runtime.markSafe("+r+");"),this.j(),n.set(r,r)},s.compileExtends=function(t,n){var i=this.v(),r=this.M(t,n,!0,!1);this.y("parentTemplate = "+r),this.y("for(var "+i+" in parentTemplate.blocks) {"),this.y("context.addBlock("+i+", parentTemplate.blocks["+i+"]);"),this.y("}"),this.j()},s.compileInclude=function(t,n){this.y("var tasks = [];"),this.y("tasks.push("),this.y("function(callback) {");var i=this.M(t,n,!1,t.ignoreMissing);this.y("callback(null,"+i+");});"),this.y("});");var r=this.v();this.y("tasks.push("),this.y("function(template, callback){"),this.y("template.render(context.getVariables(), frame, "+this.A(r)),this.y("callback(null,"+r+");});"),this.y("});"),this.y("tasks.push("),this.y("function(result, callback){"),this.y(this.buffer+" += result;"),this.y("callback(null);"),this.y("});"),this.y("env.waterfall(tasks, function(){"),this.j()},s.compileTemplateData=function(t,n){this.compileLiteral(t,n)},s.compileCapture=function(t,n){var i=this,r=this.buffer;this.buffer="output",this.y("(function() {"),this.y('var output = "";'),this.T(function(){i.compile(t.body,n)}),this.y("return output;"),this.y("})()"),this.buffer=r},s.compileOutput=function(t,n){var i=this;t.children.forEach(function(r){r instanceof o.TemplateData?r.value&&(i.w(i.buffer+" += "),i.compileLiteral(r,n),i.y(";")):(i.w(i.buffer+" += runtime.suppressValue("),i.throwOnUndefined&&i.w("runtime.ensureDefined("),i.compile(r,n),i.throwOnUndefined&&i.w(","+t.lineno+","+t.colno+")"),i.w(", env.opts.autoescape);\n"))})},s.compileRoot=function(t,n){var i=this;n&&this.fail("compileRoot: root node can't have frame"),n=new h,this.k(t,"root"),this.y("var parentTemplate = null;"),this.S(t,n),this.y("if(parentTemplate) {"),this.y("parentTemplate.rootRenderFunc(env, context, frame, runtime, cb);"),this.y("} else {"),this.y("cb(null, "+this.buffer+");"),this.y("}"),this.O(!0),this.inBlock=!0;var r=[],e=t.findAll(o.Block);e.forEach(function(t,n){var e=t.name.value;if(-1!==r.indexOf(e))throw Error('Block "'+e+'" defined more than once.');r.push(e),i.k(t,"b_"+e);var s=new h;i.y("var frame = frame.push(true);"),i.compile(t.body,s),i.O()}),this.y("return {"),e.forEach(function(t,n){var r="b_"+t.name.value;i.y(r+": "+r+",")}),this.y("root: root\n};")},s.compile=function(t,n){var i=this["compile"+t.typename];i?i.call(this,t,n):this.fail("compile: Cannot compile node: "+t.typename,t.lineno,t.colno)},s.getCode=function(){return this.codebuf.join("")},e}(i(1).Obj);t.exports={compile:function(t,n,i,r,o){void 0===o&&(o={});var u=new c(r,o.throwOnUndefined),h=(i||[]).map(function(t){return t.preprocess}).filter(function(t){return!!t}).reduce(function(t,n){return n(t)},t);return u.compile(s.transform(e.parse(h,i,o),n,r)),u.getCode()},Compiler:c}},function(t,n,i){"use strict";function r(t,n){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t})(t,n)}var e=i(4),s=i(1).EmitterObj;t.exports=function(t){var n,i;function s(){return t.apply(this,arguments)||this}i=t,(n=s).prototype=Object.create(i.prototype),n.prototype.constructor=n,r(n,i);var o=s.prototype;return o.resolve=function(t,n){return e.resolve(e.dirname(t),n)},o.isRelative=function(t){return 0===t.indexOf("./")||0===t.indexOf("../")},s}(s)},function(t,n,i){"use strict";function r(t,n){t.prototype=Object.create(n.prototype),t.prototype.constructor=t,e(t,n)}function e(t,n){return(e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t})(t,n)}var s=i(12),o=i(15),u=i(0),h=i(5),f=i(18),c=i(10),a=c.FileSystemLoader,l=c.WebLoader,v=c.PrecompiledLoader,p=i(20),d=i(21),m=i(1),w=m.Obj,b=m.EmitterObj,y=i(2),g=y.handleError,k=y.Frame,E=i(22);function O(t,n,i){s(function(){t(n,i)})}var x={type:"code",obj:{root:function(t,n,i,r,e){try{e(null,"")}catch(t){e(g(t,null,null))}}}},j=function(t){function n(){return t.apply(this,arguments)||this}r(n,t);var i=n.prototype;return i.init=function(t,n){var i=this;n=this.opts=n||{},this.opts.dev=!!n.dev,this.opts.autoescape=null==n.autoescape||n.autoescape,this.opts.throwOnUndefined=!!n.throwOnUndefined,this.opts.trimBlocks=!!n.trimBlocks,this.opts.lstripBlocks=!!n.lstripBlocks,this.loaders=[],t?this.loaders=u.isArray(t)?t:[t]:a?this.loaders=[new a("views")]:l&&(this.loaders=[new l("/views")]),"undefined"!=typeof window&&window.nunjucksPrecompiled&&this.loaders.unshift(new v(window.nunjucksPrecompiled)),this.P(),this.globals=d(),this.filters={},this.tests={},this.asyncFilters=[],this.extensions={},this.extensionsList=[],u.r(f).forEach(function(t){var n=t[0],r=t[1];return i.addFilter(n,r)}),u.r(p).forEach(function(t){var n=t[0],r=t[1];return i.addTest(n,r)})},i.P=function(){var t=this;this.loaders.forEach(function(n){n.cache={},"function"==typeof n.on&&(n.on("update",function(i,r){n.cache[i]=null,t.emit("update",i,r,n)}),n.on("load",function(i,r){t.emit("load",i,r,n)}))})},i.invalidateCache=function(){this.loaders.forEach(function(t){t.cache={}})},i.addExtension=function(t,n){return n.__name=t,this.extensions[t]=n,this.extensionsList.push(n),this},i.removeExtension=function(t){var n=this.getExtension(t);n&&(this.extensionsList=u.without(this.extensionsList,n),delete this.extensions[t])},i.getExtension=function(t){return this.extensions[t]},i.hasExtension=function(t){return!!this.extensions[t]},i.addGlobal=function(t,n){return this.globals[t]=n,this},i.getGlobal=function(t){if(void 0===this.globals[t])throw Error("global not found: "+t);return this.globals[t]},i.addFilter=function(t,n,i){var r=n;return i&&this.asyncFilters.push(t),this.filters[t]=r,this},i.getFilter=function(t){if(!this.filters[t])throw Error("filter not found: "+t);return this.filters[t]},i.addTest=function(t,n){return this.tests[t]=n,this},i.getTest=function(t){if(!this.tests[t])throw Error("test not found: "+t);return this.tests[t]},i.resolveTemplate=function(t,n,i){return!(!t.isRelative||!n)&&t.isRelative(i)&&t.resolve?t.resolve(n,i):i},i.getTemplate=function(t,n,i,r,e){var s,o=this,h=this,f=null;if(t&&t.raw&&(t=t.raw),u.isFunction(i)&&(e=i,i=null,n=n||!1),u.isFunction(n)&&(e=n,n=!1),t instanceof A)f=t;else{if("string"!=typeof t)throw Error("template names must be a string: "+t);for(var c=0;c<this.loaders.length;c++){var a=this.loaders[c];if(f=a.cache[this.resolveTemplate(a,i,t)])break}}if(f)return n&&f.compile(),e?void e(null,f):f;return u.asyncIter(this.loaders,function(n,r,e,s){function o(t,i){t?s(t):i?(i.loader=n,s(null,i)):e()}t=h.resolveTemplate(n,i,t),n.async?n.getSource(t,o):o(null,n.getSource(t))},function(i,u){if(u||i||r||(i=Error("template not found: "+t)),i){if(e)return void e(i);throw i}var h;u?(h=new A(u.src,o,u.path,n),u.noCache||(u.loader.cache[t]=h)):h=new A(x,o,"",n),e?e(null,h):s=h}),s},i.express=function(t){return E(this,t)},i.render=function(t,n,i){u.isFunction(n)&&(i=n,n=null);var r=null;return this.getTemplate(t,function(t,e){if(t&&i)O(i,t);else{if(t)throw t;r=e.render(n,i)}}),r},i.renderString=function(t,n,i,r){return u.isFunction(i)&&(r=i,i={}),new A(t,this,(i=i||{}).path).render(n,r)},i.waterfall=function(t,n,i){return o(t,n,i)},n}(b),T=function(t){function n(){return t.apply(this,arguments)||this}r(n,t);var i=n.prototype;return i.init=function(t,n,i){var r=this;this.env=i||new j,this.ctx=u.extend({},t),this.blocks={},this.exported=[],u.keys(n).forEach(function(t){r.addBlock(t,n[t])})},i.lookup=function(t){return t in this.env.globals&&!(t in this.ctx)?this.env.globals[t]:this.ctx[t]},i.setVariable=function(t,n){this.ctx[t]=n},i.getVariables=function(){return this.ctx},i.addBlock=function(t,n){return this.blocks[t]=this.blocks[t]||[],this.blocks[t].push(n),this},i.getBlock=function(t){if(!this.blocks[t])throw Error('unknown block "'+t+'"');return this.blocks[t][0]},i.getSuper=function(t,n,i,r,e,s){var o=u.indexOf(this.blocks[n]||[],i),h=this.blocks[n][o+1];if(-1===o||!h)throw Error('no super block available for "'+n+'"');h(t,this,r,e,s)},i.addExport=function(t){this.exported.push(t)},i.getExported=function(){var t=this,n={};return this.exported.forEach(function(i){n[i]=t.ctx[i]}),n},n}(w),A=function(t){function n(){return t.apply(this,arguments)||this}r(n,t);var i=n.prototype;return i.init=function(t,n,i,r){if(this.env=n||new j,u.isObject(t))switch(t.type){case"code":this.tmplProps=t.obj;break;case"string":this.tmplStr=t.obj;break;default:throw Error("Unexpected template object type "+t.type+"; expected 'code', or 'string'")}else{if(!u.isString(t))throw Error("src must be a string or an object describing the source");this.tmplStr=t}if(this.path=i,r)try{this.B()}catch(t){throw u.t(this.path,this.env.opts.dev,t)}else this.compiled=!1},i.render=function(t,n,i){var r=this;"function"==typeof t?(i=t,t={}):"function"==typeof n&&(i=n,n=null);var e=!n;try{this.compile()}catch(t){var s=u.t(this.path,this.env.opts.dev,t);if(i)return O(i,s);throw s}var o=new T(t||{},this.blocks,this.env),h=n?n.push(!0):new k;h.topLevel=!0;var f=null,c=!1;return this.rootRenderFunc(this.env,o,h,y,function(t,n){if(!c||!i||void 0===n)if(t&&(t=u.t(r.path,r.env.opts.dev,t),c=!0),i)e?O(i,t,n):i(t,n);else{if(t)throw t;f=n}}),f},i.getExported=function(t,n,i){"function"==typeof t&&(i=t,t={}),"function"==typeof n&&(i=n,n=null);try{this.compile()}catch(t){if(i)return i(t);throw t}var r=n?n.push():new k;r.topLevel=!0;var e=new T(t||{},this.blocks,this.env);this.rootRenderFunc(this.env,e,r,y,function(t){t?i(t,null):i(null,e.getExported())})},i.compile=function(){this.compiled||this.B()},i.B=function(){var t;if(this.tmplProps)t=this.tmplProps;else{var n=h.compile(this.tmplStr,this.env.asyncFilters,this.env.extensionsList,this.path,this.env.opts);t=Function(n)()}this.blocks=this.V(t),this.rootRenderFunc=t.root,this.compiled=!0},i.V=function(t){var n={};return u.keys(t).forEach(function(i){"b_"===i.slice(0,2)&&(n[i.slice(2)]=t[i])}),n},n}(w);t.exports={Environment:j,Template:A}},function(t,n,i){"use strict";function r(t,n){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t})(t,n)}var e=i(9),s=i(3),o=i(1).Obj,u=i(0),h=function(t){var n,i;function o(){return t.apply(this,arguments)||this}i=t,(n=o).prototype=Object.create(i.prototype),n.prototype.constructor=n,r(n,i);var h=o.prototype;return h.init=function(t){this.tokens=t,this.peeked=null,this.breakOnBlocks=null,this.dropLeadingWhitespace=!1,this.extensions=[]},h.nextToken=function(t){var n;if(this.peeked){if(t||this.peeked.type!==e.TOKEN_WHITESPACE)return n=this.peeked,this.peeked=null,n;this.peeked=null}if(n=this.tokens.nextToken(),!t)for(;n&&n.type===e.TOKEN_WHITESPACE;)n=this.tokens.nextToken();return n},h.peekToken=function(){return this.peeked=this.peeked||this.nextToken(),this.peeked},h.pushToken=function(t){if(this.peeked)throw Error("pushToken: can only push one token on between reads");this.peeked=t},h.error=function(t,n,i){if(void 0===n||void 0===i){var r=this.peekToken()||{};n=r.lineno,i=r.colno}return void 0!==n&&(n+=1),void 0!==i&&(i+=1),new u.TemplateError(t,n,i)},h.fail=function(t,n,i){throw this.error(t,n,i)},h.skip=function(t){var n=this.nextToken();return!(!n||n.type!==t)||(this.pushToken(n),!1)},h.expect=function(t){var n=this.nextToken();return n.type!==t&&this.fail("expected "+t+", got "+n.type,n.lineno,n.colno),n},h.skipValue=function(t,n){var i=this.nextToken();return!(!i||i.type!==t||i.value!==n)||(this.pushToken(i),!1)},h.skipSymbol=function(t){return this.skipValue(e.TOKEN_SYMBOL,t)},h.advanceAfterBlockEnd=function(t){var n;return t||((n=this.peekToken())||this.fail("unexpected end of file"),n.type!==e.TOKEN_SYMBOL&&this.fail("advanceAfterBlockEnd: expected symbol token or explicit name to be passed"),t=this.nextToken().value),(n=this.nextToken())&&n.type===e.TOKEN_BLOCK_END?"-"===n.value.charAt(0)&&(this.dropLeadingWhitespace=!0):this.fail("expected block end in "+t+" statement"),n},h.advanceAfterVariableEnd=function(){var t=this.nextToken();t&&t.type===e.TOKEN_VARIABLE_END?this.dropLeadingWhitespace="-"===t.value.charAt(t.value.length-this.tokens.tags.VARIABLE_END.length-1):(this.pushToken(t),this.fail("expected variable end"))},h.parseFor=function(){var t,n,i=this.peekToken();if(this.skipSymbol("for")?(t=new s.For(i.lineno,i.colno),n="endfor"):this.skipSymbol("asyncEach")?(t=new s.AsyncEach(i.lineno,i.colno),n="endeach"):this.skipSymbol("asyncAll")?(t=new s.AsyncAll(i.lineno,i.colno),n="endall"):this.fail("parseFor: expected for{Async}",i.lineno,i.colno),t.name=this.parsePrimary(),t.name instanceof s.Symbol||this.fail("parseFor: variable name expected for loop"),this.peekToken().type===e.TOKEN_COMMA){var r=t.name;for(t.name=new s.Array(r.lineno,r.colno),t.name.addChild(r);this.skip(e.TOKEN_COMMA);){var o=this.parsePrimary();t.name.addChild(o)}}return this.skipSymbol("in")||this.fail('parseFor: expected "in" keyword for loop',i.lineno,i.colno),t.arr=this.parseExpression(),this.advanceAfterBlockEnd(i.value),t.body=this.parseUntilBlocks(n,"else"),this.skipSymbol("else")&&(this.advanceAfterBlockEnd("else"),t.else_=this.parseUntilBlocks(n)),this.advanceAfterBlockEnd(),t},h.parseMacro=function(){var t=this.peekToken();this.skipSymbol("macro")||this.fail("expected macro");var n=this.parsePrimary(!0),i=this.parseSignature(),r=new s.Macro(t.lineno,t.colno,n,i);return this.advanceAfterBlockEnd(t.value),r.body=this.parseUntilBlocks("endmacro"),this.advanceAfterBlockEnd(),r},h.parseCall=function(){var t=this.peekToken();this.skipSymbol("call")||this.fail("expected call");var n=this.parseSignature(!0)||new s.NodeList,i=this.parsePrimary();this.advanceAfterBlockEnd(t.value);var r=this.parseUntilBlocks("endcall");this.advanceAfterBlockEnd();var e=new s.Symbol(t.lineno,t.colno,"caller"),o=new s.Caller(t.lineno,t.colno,e,n,r),u=i.args.children;return u[u.length-1]instanceof s.KeywordArgs||u.push(new s.KeywordArgs),u[u.length-1].addChild(new s.Pair(t.lineno,t.colno,e,o)),new s.Output(t.lineno,t.colno,[i])},h.parseWithContext=function(){var t=this.peekToken(),n=null;return this.skipSymbol("with")?n=!0:this.skipSymbol("without")&&(n=!1),null!==n&&(this.skipSymbol("context")||this.fail("parseFrom: expected context after with/without",t.lineno,t.colno)),n},h.parseImport=function(){var t=this.peekToken();this.skipSymbol("import")||this.fail("parseImport: expected import",t.lineno,t.colno);var n=this.parseExpression();this.skipSymbol("as")||this.fail('parseImport: expected "as" keyword',t.lineno,t.colno);var i=this.parseExpression(),r=this.parseWithContext(),e=new s.Import(t.lineno,t.colno,n,i,r);return this.advanceAfterBlockEnd(t.value),e},h.parseFrom=function(){var t=this.peekToken();this.skipSymbol("from")||this.fail("parseFrom: expected from");var n=this.parseExpression();this.skipSymbol("import")||this.fail("parseFrom: expected import",t.lineno,t.colno);for(var i,r=new s.NodeList;;){var o=this.peekToken();if(o.type===e.TOKEN_BLOCK_END){r.children.length||this.fail("parseFrom: Expected at least one import name",t.lineno,t.colno),"-"===o.value.charAt(0)&&(this.dropLeadingWhitespace=!0),this.nextToken();break}r.children.length>0&&!this.skip(e.TOKEN_COMMA)&&this.fail("parseFrom: expected comma",t.lineno,t.colno);var u=this.parsePrimary();if("_"===u.value.charAt(0)&&this.fail("parseFrom: names starting with an underscore cannot be imported",u.lineno,u.colno),this.skipSymbol("as")){var h=this.parsePrimary();r.addChild(new s.Pair(u.lineno,u.colno,u,h))}else r.addChild(u);i=this.parseWithContext()}return new s.FromImport(t.lineno,t.colno,n,r,i)},h.parseBlock=function(){var t=this.peekToken();this.skipSymbol("block")||this.fail("parseBlock: expected block",t.lineno,t.colno);var n=new s.Block(t.lineno,t.colno);n.name=this.parsePrimary(),n.name instanceof s.Symbol||this.fail("parseBlock: variable name expected",t.lineno,t.colno),this.advanceAfterBlockEnd(t.value),n.body=this.parseUntilBlocks("endblock"),this.skipSymbol("endblock"),this.skipSymbol(n.name.value);var i=this.peekToken();return i||this.fail("parseBlock: expected endblock, got end of file"),this.advanceAfterBlockEnd(i.value),n},h.parseExtends=function(){var t=this.peekToken();this.skipSymbol("extends")||this.fail("parseTemplateRef: expected extends");var n=new s.Extends(t.lineno,t.colno);return n.template=this.parseExpression(),this.advanceAfterBlockEnd(t.value),n},h.parseInclude=function(){var t=this.peekToken();this.skipSymbol("include")||this.fail("parseInclude: expected include");var n=new s.Include(t.lineno,t.colno);return n.template=this.parseExpression(),this.skipSymbol("ignore")&&this.skipSymbol("missing")&&(n.ignoreMissing=!0),this.advanceAfterBlockEnd(t.value),n},h.parseIf=function(){var t,n=this.peekToken();this.skipSymbol("if")||this.skipSymbol("elif")||this.skipSymbol("elseif")?t=new s.If(n.lineno,n.colno):this.skipSymbol("ifAsync")?t=new s.IfAsync(n.lineno,n.colno):this.fail("parseIf: expected if, elif, or elseif",n.lineno,n.colno),t.cond=this.parseExpression(),this.advanceAfterBlockEnd(n.value),t.body=this.parseUntilBlocks("elif","elseif","else","endif");var i=this.peekToken();switch(i&&i.value){case"elseif":case"elif":t.else_=this.parseIf();break;case"else":this.advanceAfterBlockEnd(),t.else_=this.parseUntilBlocks("endif"),this.advanceAfterBlockEnd();break;case"endif":t.else_=null,this.advanceAfterBlockEnd();break;default:this.fail("parseIf: expected elif, else, or endif, got end of file")}return t},h.parseSet=function(){var t=this.peekToken();this.skipSymbol("set")||this.fail("parseSet: expected set",t.lineno,t.colno);for(var n,i=new s.Set(t.lineno,t.colno,[]);(n=this.parsePrimary())&&(i.targets.push(n),this.skip(e.TOKEN_COMMA)););return this.skipValue(e.TOKEN_OPERATOR,"=")?(i.value=this.parseExpression(),this.advanceAfterBlockEnd(t.value)):this.skip(e.TOKEN_BLOCK_END)?(i.body=new s.Capture(t.lineno,t.colno,this.parseUntilBlocks("endset")),i.value=null,this.advanceAfterBlockEnd()):this.fail("parseSet: expected = or block end in set tag",t.lineno,t.colno),i},h.parseSwitch=function(){var t=this.peekToken();this.skipSymbol("switch")||this.skipSymbol("case")||this.skipSymbol("default")||this.fail('parseSwitch: expected "switch," "case" or "default"',t.lineno,t.colno);var n=this.parseExpression();this.advanceAfterBlockEnd("switch"),this.parseUntilBlocks("case","default","endswitch");var i,r=this.peekToken(),e=[];do{this.skipSymbol("case");var o=this.parseExpression();this.advanceAfterBlockEnd("switch");var u=this.parseUntilBlocks("case","default","endswitch");e.push(new s.Case(r.line,r.col,o,u)),r=this.peekToken()}while(r&&"case"===r.value);switch(r.value){case"default":this.advanceAfterBlockEnd(),i=this.parseUntilBlocks("endswitch"),this.advanceAfterBlockEnd();break;case"endswitch":this.advanceAfterBlockEnd();break;default:this.fail('parseSwitch: expected "case," "default" or "endswitch," got EOF.')}return new s.Switch(t.lineno,t.colno,n,e,i)},h.parseStatement=function(){var t=this.peekToken();if(t.type!==e.TOKEN_SYMBOL&&this.fail("tag name expected",t.lineno,t.colno),this.breakOnBlocks&&-1!==u.indexOf(this.breakOnBlocks,t.value))return null;switch(t.value){case"raw":return this.parseRaw();case"verbatim":return this.parseRaw("verbatim");case"if":case"ifAsync":return this.parseIf();case"for":case"asyncEach":case"asyncAll":return this.parseFor();case"block":return this.parseBlock();case"extends":return this.parseExtends();case"include":return this.parseInclude();case"set":return this.parseSet();case"macro":return this.parseMacro();case"call":return this.parseCall();case"import":return this.parseImport();case"from":return this.parseFrom();case"filter":return this.parseFilterStatement();case"switch":return this.parseSwitch();default:if(this.extensions.length)for(var n=0;n<this.extensions.length;n++){var i=this.extensions[n];if(-1!==u.indexOf(i.tags||[],t.value))return i.parse(this,s,e)}this.fail("unknown block tag: "+t.value,t.lineno,t.colno)}},h.parseRaw=function(t){for(var n="end"+(t=t||"raw"),i=RegExp("([\\s\\S]*?){%\\s*("+t+"|"+n+")\\s*(?=%})%}"),r=1,e="",o=null,u=this.advanceAfterBlockEnd();(o=this.tokens.D(i))&&r>0;){var h=o[0],f=o[1],c=o[2];c===t?r+=1:c===n&&(r-=1),0===r?(e+=f,this.tokens.backN(h.length-f.length)):e+=h}return new s.Output(u.lineno,u.colno,[new s.TemplateData(u.lineno,u.colno,e)])},h.parsePostfix=function(t){for(var n,i=this.peekToken();i;){if(i.type===e.TOKEN_LEFT_PAREN)t=new s.FunCall(i.lineno,i.colno,t,this.parseSignature());else if(i.type===e.TOKEN_LEFT_BRACKET)(n=this.parseAggregate()).children.length>1&&this.fail("invalid index"),t=new s.LookupVal(i.lineno,i.colno,t,n.children[0]);else{if(i.type!==e.TOKEN_OPERATOR||"."!==i.value)break;this.nextToken();var r=this.nextToken();r.type!==e.TOKEN_SYMBOL&&this.fail("expected name as lookup value, got "+r.value,r.lineno,r.colno),n=new s.Literal(r.lineno,r.colno,r.value),t=new s.LookupVal(i.lineno,i.colno,t,n)}i=this.peekToken()}return t},h.parseExpression=function(){return this.parseInlineIf()},h.parseInlineIf=function(){var t=this.parseOr();if(this.skipSymbol("if")){var n=this.parseOr(),i=t;(t=new s.InlineIf(t.lineno,t.colno)).body=i,t.cond=n,this.skipSymbol("else")?t.else_=this.parseOr():t.else_=null}return t},h.parseOr=function(){for(var t=this.parseAnd();this.skipSymbol("or");){var n=this.parseAnd();t=new s.Or(t.lineno,t.colno,t,n)}return t},h.parseAnd=function(){for(var t=this.parseNot();this.skipSymbol("and");){var n=this.parseNot();t=new s.And(t.lineno,t.colno,t,n)}return t},h.parseNot=function(){var t=this.peekToken();return this.skipSymbol("not")?new s.Not(t.lineno,t.colno,this.parseNot()):this.parseIn()},h.parseIn=function(){for(var t=this.parseIs();;){var n=this.nextToken();if(!n)break;var i=n.type===e.TOKEN_SYMBOL&&"not"===n.value;if(i||this.pushToken(n),!this.skipSymbol("in")){i&&this.pushToken(n);break}var r=this.parseIs();t=new s.In(t.lineno,t.colno,t,r),i&&(t=new s.Not(t.lineno,t.colno,t))}return t},h.parseIs=function(){var t=this.parseCompare();if(this.skipSymbol("is")){var n=this.skipSymbol("not"),i=this.parseCompare();t=new s.Is(t.lineno,t.colno,t,i),n&&(t=new s.Not(t.lineno,t.colno,t))}return t},h.parseCompare=function(){for(var t=["==","===","!=","!==","<",">","<=",">="],n=this.parseConcat(),i=[];;){var r=this.nextToken();if(!r)break;if(-1===t.indexOf(r.value)){this.pushToken(r);break}i.push(new s.CompareOperand(r.lineno,r.colno,this.parseConcat(),r.value))}return i.length?new s.Compare(i[0].lineno,i[0].colno,n,i):n},h.parseConcat=function(){for(var t=this.parseAdd();this.skipValue(e.TOKEN_TILDE,"~");){var n=this.parseAdd();t=new s.Concat(t.lineno,t.colno,t,n)}return t},h.parseAdd=function(){for(var t=this.parseSub();this.skipValue(e.TOKEN_OPERATOR,"+");){var n=this.parseSub();t=new s.Add(t.lineno,t.colno,t,n)}return t},h.parseSub=function(){for(var t=this.parseMul();this.skipValue(e.TOKEN_OPERATOR,"-");){var n=this.parseMul();t=new s.Sub(t.lineno,t.colno,t,n)}return t},h.parseMul=function(){for(var t=this.parseDiv();this.skipValue(e.TOKEN_OPERATOR,"*");){var n=this.parseDiv();t=new s.Mul(t.lineno,t.colno,t,n)}return t},h.parseDiv=function(){for(var t=this.parseFloorDiv();this.skipValue(e.TOKEN_OPERATOR,"/");){var n=this.parseFloorDiv();t=new s.Div(t.lineno,t.colno,t,n)}return t},h.parseFloorDiv=function(){for(var t=this.parseMod();this.skipValue(e.TOKEN_OPERATOR,"//");){var n=this.parseMod();t=new s.FloorDiv(t.lineno,t.colno,t,n)}return t},h.parseMod=function(){for(var t=this.parsePow();this.skipValue(e.TOKEN_OPERATOR,"%");){var n=this.parsePow();t=new s.Mod(t.lineno,t.colno,t,n)}return t},h.parsePow=function(){for(var t=this.parseUnary();this.skipValue(e.TOKEN_OPERATOR,"**");){var n=this.parseUnary();t=new s.Pow(t.lineno,t.colno,t,n)}return t},h.parseUnary=function(t){var n,i=this.peekToken();return n=this.skipValue(e.TOKEN_OPERATOR,"-")?new s.Neg(i.lineno,i.colno,this.parseUnary(!0)):this.skipValue(e.TOKEN_OPERATOR,"+")?new s.Pos(i.lineno,i.colno,this.parseUnary(!0)):this.parsePrimary(),t||(n=this.parseFilter(n)),n},h.parsePrimary=function(t){var n,i=this.nextToken(),r=null;if(i?i.type===e.TOKEN_STRING?n=i.value:i.type===e.TOKEN_INT?n=parseInt(i.value,10):i.type===e.TOKEN_FLOAT?n=parseFloat(i.value):i.type===e.TOKEN_BOOLEAN?"true"===i.value?n=!0:"false"===i.value?n=!1:this.fail("invalid boolean: "+i.value,i.lineno,i.colno):i.type===e.TOKEN_NONE?n=null:i.type===e.TOKEN_REGEX&&(n=RegExp(i.value.body,i.value.flags)):this.fail("expected expression, got end of file"),void 0!==n?r=new s.Literal(i.lineno,i.colno,n):i.type===e.TOKEN_SYMBOL?r=new s.Symbol(i.lineno,i.colno,i.value):(this.pushToken(i),r=this.parseAggregate()),t||(r=this.parsePostfix(r)),r)return r;throw this.error("unexpected token: "+i.value,i.lineno,i.colno)},h.parseFilterName=function(){for(var t=this.expect(e.TOKEN_SYMBOL),n=t.value;this.skipValue(e.TOKEN_OPERATOR,".");)n+="."+this.expect(e.TOKEN_SYMBOL).value;return new s.Symbol(t.lineno,t.colno,n)},h.parseFilterArgs=function(t){return this.peekToken().type===e.TOKEN_LEFT_PAREN?this.parsePostfix(t).args.children:[]},h.parseFilter=function(t){for(;this.skip(e.TOKEN_PIPE);){var n=this.parseFilterName();t=new s.Filter(n.lineno,n.colno,n,new s.NodeList(n.lineno,n.colno,[t].concat(this.parseFilterArgs(t))))}return t},h.parseFilterStatement=function(){var t=this.peekToken();this.skipSymbol("filter")||this.fail("parseFilterStatement: expected filter");var n=this.parseFilterName(),i=this.parseFilterArgs(n);this.advanceAfterBlockEnd(t.value);var r=new s.Capture(n.lineno,n.colno,this.parseUntilBlocks("endfilter"));this.advanceAfterBlockEnd();var e=new s.Filter(n.lineno,n.colno,n,new s.NodeList(n.lineno,n.colno,[r].concat(i)));return new s.Output(n.lineno,n.colno,[e])},h.parseAggregate=function(){var t,n=this.nextToken();switch(n.type){case e.TOKEN_LEFT_PAREN:t=new s.Group(n.lineno,n.colno);break;case e.TOKEN_LEFT_BRACKET:t=new s.Array(n.lineno,n.colno);break;case e.TOKEN_LEFT_CURLY:t=new s.Dict(n.lineno,n.colno);break;default:return null}for(;;){var i=this.peekToken().type;if(i===e.TOKEN_RIGHT_PAREN||i===e.TOKEN_RIGHT_BRACKET||i===e.TOKEN_RIGHT_CURLY){this.nextToken();break}if(t.children.length>0&&(this.skip(e.TOKEN_COMMA)||this.fail("parseAggregate: expected comma after expression",n.lineno,n.colno)),t instanceof s.Dict){var r=this.parsePrimary();this.skip(e.TOKEN_COLON)||this.fail("parseAggregate: expected colon after dict key",n.lineno,n.colno);var o=this.parseExpression();t.addChild(new s.Pair(r.lineno,r.colno,r,o))}else{var u=this.parseExpression();t.addChild(u)}}return t},h.parseSignature=function(t,n){var i=this.peekToken();if(!n&&i.type!==e.TOKEN_LEFT_PAREN){if(t)return null;this.fail("expected arguments",i.lineno,i.colno)}i.type===e.TOKEN_LEFT_PAREN&&(i=this.nextToken());for(var r=new s.NodeList(i.lineno,i.colno),o=new s.KeywordArgs(i.lineno,i.colno),u=!1;;){if(i=this.peekToken(),!n&&i.type===e.TOKEN_RIGHT_PAREN){this.nextToken();break}if(n&&i.type===e.TOKEN_BLOCK_END)break;if(u&&!this.skip(e.TOKEN_COMMA))this.fail("parseSignature: expected comma after expression",i.lineno,i.colno);else{var h=this.parseExpression();this.skipValue(e.TOKEN_OPERATOR,"=")?o.addChild(new s.Pair(h.lineno,h.colno,h,this.parseExpression())):r.addChild(h)}u=!0}return o.children.length&&r.addChild(o),r},h.parseUntilBlocks=function(){for(var t=this.breakOnBlocks,n=arguments.length,i=Array(n),r=0;r<n;r++)i[r]=arguments[r];this.breakOnBlocks=i;var e=this.parse();return this.breakOnBlocks=t,e},h.parseNodes=function(){for(var t,n=[];t=this.nextToken();)if(t.type===e.TOKEN_DATA){var i=t.value,r=this.peekToken(),o=r&&r.value;this.dropLeadingWhitespace&&(i=i.replace(/^\s*/,""),this.dropLeadingWhitespace=!1),r&&(r.type===e.TOKEN_BLOCK_START&&"-"===o.charAt(o.length-1)||r.type===e.TOKEN_VARIABLE_START&&"-"===o.charAt(this.tokens.tags.VARIABLE_START.length)||r.type===e.TOKEN_COMMENT&&"-"===o.charAt(this.tokens.tags.COMMENT_START.length))&&(i=i.replace(/\s*$/,"")),n.push(new s.Output(t.lineno,t.colno,[new s.TemplateData(t.lineno,t.colno,i)]))}else if(t.type===e.TOKEN_BLOCK_START){this.dropLeadingWhitespace=!1;var u=this.parseStatement();if(!u)break;n.push(u)}else if(t.type===e.TOKEN_VARIABLE_START){var h=this.parseExpression();this.dropLeadingWhitespace=!1,this.advanceAfterVariableEnd(),n.push(new s.Output(t.lineno,t.colno,[h]))}else t.type===e.TOKEN_COMMENT?this.dropLeadingWhitespace="-"===t.value.charAt(t.value.length-this.tokens.tags.COMMENT_END.length-1):this.fail("Unexpected token at top-level: "+t.type,t.lineno,t.colno);return n},h.parse=function(){return new s.NodeList(0,0,this.parseNodes())},h.parseAsRoot=function(){return new s.Root(0,0,this.parseNodes())},o}(o);t.exports={parse:function(t,n,i){var r=new h(e.lex(t,i));return void 0!==n&&(r.extensions=n),r.parseAsRoot()},Parser:h}},function(t,n,i){"use strict";var r=i(0),e="{%",s="%}",o="{{",u="}}",h="{#",f="#}";function c(t,n,i,r){return{type:t,value:n,lineno:i,colno:r}}var a=function(){function t(t,n){this.str=t,this.index=0,this.len=t.length,this.lineno=0,this.colno=0,this.in_code=!1;var i=(n=n||{}).tags||{};this.tags={BLOCK_START:i.blockStart||e,BLOCK_END:i.blockEnd||s,VARIABLE_START:i.variableStart||o,VARIABLE_END:i.variableEnd||u,COMMENT_START:i.commentStart||h,COMMENT_END:i.commentEnd||f},this.trimBlocks=!!n.trimBlocks,this.lstripBlocks=!!n.lstripBlocks}var n=t.prototype;return n.nextToken=function(){var t,n=this.lineno,i=this.colno;if(this.in_code){var e=this.current();if(this.isFinished())return null;if('"'===e||"'"===e)return c("string",this.U(e),n,i);if(t=this.$(" \n\t\r "))return c("whitespace",t,n,i);if((t=this.G(this.tags.BLOCK_END))||(t=this.G("-"+this.tags.BLOCK_END)))return this.in_code=!1,this.trimBlocks&&("\n"===(e=this.current())?this.forward():"\r"===e&&(this.forward(),"\n"===(e=this.current())?this.forward():this.back())),c("block-end",t,n,i);if((t=this.G(this.tags.VARIABLE_END))||(t=this.G("-"+this.tags.VARIABLE_END)))return this.in_code=!1,c("variable-end",t,n,i);if("r"===e&&"/"===this.str.charAt(this.index+1)){this.forwardN(2);for(var s="";!this.isFinished();){if("/"===this.current()&&"\\"!==this.previous()){this.forward();break}s+=this.current(),this.forward()}for(var o=["g","i","m","y"],u="";!this.isFinished();){if(!(-1!==o.indexOf(this.current())))break;u+=this.current(),this.forward()}return c("regex",{body:s,flags:u},n,i)}if(-1!=="()[]{}%*-+~/#,:|.<>=!".indexOf(e)){this.forward();var h,f=["==","===","!=","!==","<=",">=","//","**"],a=e+this.current();switch(-1!==r.indexOf(f,a)&&(this.forward(),e=a,-1!==r.indexOf(f,a+this.current())&&(e=a+this.current(),this.forward())),e){case"(":h="left-paren";break;case")":h="right-paren";break;case"[":h="left-bracket";break;case"]":h="right-bracket";break;case"{":h="left-curly";break;case"}":h="right-curly";break;case",":h="comma";break;case":":h="colon";break;case"~":h="tilde";break;case"|":h="pipe";break;default:h="operator"}return c(h,e,n,i)}if((t=this.W(" \n\t\r ()[]{}%*-+~/#,:|.<>=!")).match(/^[-+]?[0-9]+$/))return"."===this.current()?(this.forward(),c("float",t+"."+this.$("0123456789"),n,i)):c("int",t,n,i);if(t.match(/^(true|false)$/))return c("boolean",t,n,i);if("none"===t)return c("none",t,n,i);if("null"===t)return c("none",t,n,i);if(t)return c("symbol",t,n,i);throw Error("Unexpected value while parsing: "+t)}var l,v=this.tags.BLOCK_START.charAt(0)+this.tags.VARIABLE_START.charAt(0)+this.tags.COMMENT_START.charAt(0)+this.tags.COMMENT_END.charAt(0);if(this.isFinished())return null;if((t=this.G(this.tags.BLOCK_START+"-"))||(t=this.G(this.tags.BLOCK_START)))return this.in_code=!0,c("block-start",t,n,i);if((t=this.G(this.tags.VARIABLE_START+"-"))||(t=this.G(this.tags.VARIABLE_START)))return this.in_code=!0,c("variable-start",t,n,i);t="";var p=!1;for(this.H(this.tags.COMMENT_START)&&(p=!0,t=this.G(this.tags.COMMENT_START));null!==(l=this.W(v));){if(t+=l,(this.H(this.tags.BLOCK_START)||this.H(this.tags.VARIABLE_START)||this.H(this.tags.COMMENT_START))&&!p){if(this.lstripBlocks&&this.H(this.tags.BLOCK_START)&&this.colno>0&&this.colno<=t.length){var d=t.slice(-this.colno);if(/^\s+$/.test(d)&&!(t=t.slice(0,-this.colno)).length)return this.nextToken()}break}if(this.H(this.tags.COMMENT_END)){if(!p)throw Error("unexpected end of comment");t+=this.G(this.tags.COMMENT_END);break}t+=this.current(),this.forward()}if(null===l&&p)throw Error("expected end of comment, got end of file");return c(p?"comment":"data",t,n,i)},n.U=function(t){this.forward();for(var n="";!this.isFinished()&&this.current()!==t;){var i=this.current();if("\\"===i){switch(this.forward(),this.current()){case"n":n+="\n";break;case"t":n+="\t";break;case"r":n+="\r";break;default:n+=this.current()}this.forward()}else n+=i,this.forward()}return this.forward(),n},n.H=function(t){return this.index+t.length>this.len?null:this.str.slice(this.index,this.index+t.length)===t},n.G=function(t){return this.H(t)?(this.forwardN(t.length),t):null},n.W=function(t){return this.J(!0,t||"")},n.$=function(t){return this.J(!1,t)},n.J=function(t,n){if(this.isFinished())return null;var i=n.indexOf(this.current());if(t&&-1===i||!t&&-1!==i){var r=this.current();this.forward();for(var e=n.indexOf(this.current());(t&&-1===e||!t&&-1!==e)&&!this.isFinished();)r+=this.current(),this.forward(),e=n.indexOf(this.current());return r}return""},n.D=function(t){var n=this.currentStr().match(t);return n?(this.forwardN(n[0].length),n):null},n.isFinished=function(){return this.index>=this.len},n.forwardN=function(t){for(var n=0;n<t;n++)this.forward()},n.forward=function(){this.index++,"\n"===this.previous()?(this.lineno++,this.colno=0):this.colno++},n.backN=function(t){for(var n=0;n<t;n++)this.back()},n.back=function(){if(this.index--,"\n"===this.current()){this.lineno--;var t=this.src.lastIndexOf("\n",this.index-1);this.colno=-1===t?this.index:this.index-t}else this.colno--},n.current=function(){return this.isFinished()?"":this.str.charAt(this.index)},n.currentStr=function(){return this.isFinished()?"":this.str.substr(this.index)},n.previous=function(){return this.str.charAt(this.index-1)},t}();t.exports={lex:function(t,n){return new a(t,n)},TOKEN_STRING:"string",TOKEN_WHITESPACE:"whitespace",TOKEN_DATA:"data",TOKEN_BLOCK_START:"block-start",TOKEN_BLOCK_END:"block-end",TOKEN_VARIABLE_START:"variable-start",TOKEN_VARIABLE_END:"variable-end",TOKEN_COMMENT:"comment",TOKEN_LEFT_PAREN:"left-paren",TOKEN_RIGHT_PAREN:"right-paren",TOKEN_LEFT_BRACKET:"left-bracket",TOKEN_RIGHT_BRACKET:"right-bracket",TOKEN_LEFT_CURLY:"left-curly",TOKEN_RIGHT_CURLY:"right-curly",TOKEN_OPERATOR:"operator",TOKEN_COMMA:"comma",TOKEN_COLON:"colon",TOKEN_TILDE:"tilde",TOKEN_PIPE:"pipe",TOKEN_INT:"int",TOKEN_FLOAT:"float",TOKEN_BOOLEAN:"boolean",TOKEN_NONE:"none",TOKEN_SYMBOL:"symbol",TOKEN_SPECIAL:"special",TOKEN_REGEX:"regex"}},function(t,n,i){"use strict";function r(t,n){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t})(t,n)}var e=i(6),s=i(19).PrecompiledLoader,o=function(t){var n,i;function e(n,i){var r;return(r=t.call(this)||this).baseURL=n||".",i=i||{},r.useCache=!!i.useCache,r.async=!!i.async,r}i=t,(n=e).prototype=Object.create(i.prototype),n.prototype.constructor=n,r(n,i);var s=e.prototype;return s.resolve=function(t,n){throw Error("relative templates not support in the browser yet")},s.getSource=function(t,n){var i,r=this,e=this.useCache;return this.fetch(this.baseURL+"/"+t,function(s,o){if(s)if(n)n(s.content);else{if(404!==s.status)throw s.content;i=null}else i={src:o,path:t,noCache:!e},r.emit("load",t,i),n&&n(null,i)}),i},s.fetch=function(t,n){if("undefined"==typeof window)throw Error("WebLoader can only by used in a browser");var i=new XMLHttpRequest,r=!0;i.onreadystatechange=function(){4===i.readyState&&r&&(r=!1,0===i.status||200===i.status?n(null,i.responseText):n({status:i.status,content:i.responseText}))},t+=(-1===t.indexOf("?")?"?":"&")+"s="+(new Date).getTime(),i.open("GET",t,this.async),i.send()},e}(e);t.exports={WebLoader:o,PrecompiledLoader:s}},function(t,n,i){"use strict";var r,e=i(0),s=i(7),o=s.Environment,u=s.Template,h=i(6),f=i(10),c=i(23),a=i(5),l=i(8),v=i(9),p=i(2),d=i(3),m=i(25);function w(t,n){var i;return n=n||{},e.isObject(t)&&(n=t,t=null),f.FileSystemLoader?i=new f.FileSystemLoader(t,{watch:n.watch,noCache:n.noCache}):f.WebLoader&&(i=new f.WebLoader(t,{useCache:n.web&&n.web.useCache,async:n.web&&n.web.async})),r=new o(i,n),n&&n.express&&r.express(n.express),r}t.exports={Environment:o,Template:u,Loader:h,FileSystemLoader:f.FileSystemLoader,NodeResolveLoader:f.NodeResolveLoader,PrecompiledLoader:f.PrecompiledLoader,WebLoader:f.WebLoader,compiler:a,parser:l,lexer:v,runtime:p,lib:e,nodes:d,installJinjaCompat:m,configure:w,reset:function(){r=void 0},compile:function(t,n,i,e){return r||w(),new u(t,n,i,e)},render:function(t,n,i){return r||w(),r.render(t,n,i)},renderString:function(t,n,i){return r||w(),r.renderString(t,n,i)},precompile:c?c.precompile:void 0,precompileString:c?c.precompileString:void 0}},function(t,n,i){"use strict";var r=i(13),e=[],s=[],o=r.makeRequestCallFromTimer(function(){if(s.length)throw s.shift()});function u(t){var n;(n=e.length?e.pop():new h).task=t,r(n)}function h(){this.task=null}t.exports=u,h.prototype.call=function(){try{this.task.call()}catch(t){u.onerror?u.onerror(t):(s.push(t),o())}finally{this.task=null,e[e.length]=this}}},function(t,n,i){"use strict";!function(n){function i(t){e.length||(r(),!0),e[e.length]=t}t.exports=i;var r,e=[],s=0,o=1024;function u(){for(;s<e.length;){var t=s;if(s+=1,e[t].call(),s>o){for(var n=0,i=e.length-s;n<i;n++)e[n]=e[n+s];e.length-=s,s=0}}e.length=0,s=0,!1}var h,f,c,a=void 0!==n?n:self,l=a.MutationObserver||a.WebKitMutationObserver;function v(t){return function(){var n=setTimeout(r,0),i=setInterval(r,50);function r(){clearTimeout(n),clearInterval(i),t()}}}"function"==typeof l?(h=1,f=new l(u),c=document.createTextNode(""),f.observe(c,{characterData:!0}),r=function(){h=-h,c.data=h}):r=v(u),i.requestFlush=r,i.makeRequestCallFromTimer=v}(i(14))},function(t,n){var i;i=function(){return this}();try{i=i||Function("return this")()||(0,eval)("this")}catch(t){"object"==typeof window&&(i=window)}t.exports=i},function(t,n,i){var r;!function(i){"use strict";var e=function(){var t=Array.prototype.slice.call(arguments);"function"==typeof t[0]&&t[0].apply(null,t.splice(1))},s=function(t){"function"==typeof setImmediate?setImmediate(t):"undefined"!=typeof process&&process.nextTick?process.nextTick(t):setTimeout(t,0)},o=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},u=function(t,n,i){var r=i?s:e;if(n=n||function(){},!o(t))return n(Error("First argument to waterfall must be an array of functions"));if(!t.length)return n();var u=function(t){return function(i){if(i)n.apply(null,arguments),n=function(){};else{var e=Array.prototype.slice.call(arguments,1),s=t.next();s?e.push(u(s)):e.push(n),r(function(){t.apply(null,e)})}}};u(function(t){var n=function(i){var r=function(){return t.length&&t[i].apply(null,arguments),r.next()};return r.next=function(){return i<t.length-1?n(i+1):null},r};return n(0)}(t))()};void 0===(r=function(){return u}.apply(n,[]))||(t.exports=r)}()},function(t,n,i){"use strict";var r,e="object"==typeof Reflect?Reflect:null,s=e&&"function"==typeof e.apply?e.apply:function(t,n,i){return Function.prototype.apply.call(t,n,i)};r=e&&"function"==typeof e.ownKeys?e.ownKeys:Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.getOwnPropertyNames(t)};var o=Number.isNaN||function(t){return t!=t};function u(){u.init.call(this)}t.exports=u,t.exports.once=function(t,n){return new Promise(function(i,r){function e(i){t.removeListener(n,s),r(i)}function s(){"function"==typeof t.removeListener&&t.removeListener("error",e),i([].slice.call(arguments))}m(t,n,s,{once:!0}),"error"!==n&&function(t,n,i){"function"==typeof t.on&&m(t,"error",n,i)}(t,e,{once:!0})})},u.EventEmitter=u,u.prototype.z=void 0,u.prototype.Y=0,u.prototype.q=void 0;var h=10;function f(t){if("function"!=typeof t)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof t)}function c(t){return void 0===t.q?u.defaultMaxListeners:t.q}function a(t,n,i,r){var e,s,o;if(f(i),void 0===(s=t.z)?(s=t.z=Object.create(null),t.Y=0):(void 0!==s.newListener&&(t.emit("newListener",n,i.listener?i.listener:i),s=t.z),o=s[n]),void 0===o)o=s[n]=i,++t.Y;else if("function"==typeof o?o=s[n]=r?[i,o]:[o,i]:r?o.unshift(i):o.push(i),(e=c(t))>0&&o.length>e&&!o.warned){o.warned=!0;var u=Error("Possible EventEmitter memory leak detected. "+o.length+" "+n+" listeners added. Use emitter.setMaxListeners() to increase limit");u.name="MaxListenersExceededWarning",u.emitter=t,u.type=n,u.count=o.length,console&&console.warn&&console.warn(u)}return t}function l(t,n,i){var r={fired:!1,wrapFn:void 0,target:t,type:n,listener:i},e=function(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}.bind(r);return e.listener=i,r.wrapFn=e,e}function v(t,n,i){var r=t.z;if(void 0===r)return[];var e=r[n];return void 0===e?[]:"function"==typeof e?i?[e.listener||e]:[e]:i?function(t){for(var n=Array(t.length),i=0;i<n.length;++i)n[i]=t[i].listener||t[i];return n}(e):d(e,e.length)}function p(t){var n=this.z;if(void 0!==n){var i=n[t];if("function"==typeof i)return 1;if(void 0!==i)return i.length}return 0}function d(t,n){for(var i=Array(n),r=0;r<n;++r)i[r]=t[r];return i}function m(t,n,i,r){if("function"==typeof t.on)r.once?t.once(n,i):t.on(n,i);else{if("function"!=typeof t.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof t);t.addEventListener(n,function e(s){r.once&&t.removeEventListener(n,e),i(s)})}}Object.defineProperty(u,"defaultMaxListeners",{enumerable:!0,get:function(){return h},set:function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+t+".");h=t}}),u.init=function(){void 0!==this.z&&this.z!==Object.getPrototypeOf(this).z||(this.z=Object.create(null),this.Y=0),this.q=this.q||void 0},u.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||o(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this.q=t,this},u.prototype.getMaxListeners=function(){return c(this)},u.prototype.emit=function(t){for(var n=[],i=1;i<arguments.length;i++)n.push(arguments[i]);var r="error"===t,e=this.z;if(void 0!==e)r=r&&void 0===e.error;else if(!r)return!1;if(r){var o;if(n.length>0&&(o=n[0]),o instanceof Error)throw o;var u=Error("Unhandled error."+(o?" ("+o.message+")":""));throw u.context=o,u}var h=e[t];if(void 0===h)return!1;if("function"==typeof h)s(h,this,n);else{var f=h.length,c=d(h,f);for(i=0;i<f;++i)s(c[i],this,n)}return!0},u.prototype.addListener=function(t,n){return a(this,t,n,!1)},u.prototype.on=u.prototype.addListener,u.prototype.prependListener=function(t,n){return a(this,t,n,!0)},u.prototype.once=function(t,n){return f(n),this.on(t,l(this,t,n)),this},u.prototype.prependOnceListener=function(t,n){return f(n),this.prependListener(t,l(this,t,n)),this},u.prototype.removeListener=function(t,n){var i,r,e,s,o;if(f(n),void 0===(r=this.z))return this;if(void 0===(i=r[t]))return this;if(i===n||i.listener===n)0==--this.Y?this.z=Object.create(null):(delete r[t],r.removeListener&&this.emit("removeListener",t,i.listener||n));else if("function"!=typeof i){for(e=-1,s=i.length-1;s>=0;s--)if(i[s]===n||i[s].listener===n){o=i[s].listener,e=s;break}if(e<0)return this;0===e?i.shift():function(t,n){for(;n+1<t.length;n++)t[n]=t[n+1];t.pop()}(i,e),1===i.length&&(r[t]=i[0]),void 0!==r.removeListener&&this.emit("removeListener",t,o||n)}return this},u.prototype.off=u.prototype.removeListener,u.prototype.removeAllListeners=function(t){var n,i,r;if(void 0===(i=this.z))return this;if(void 0===i.removeListener)return 0===arguments.length?(this.z=Object.create(null),this.Y=0):void 0!==i[t]&&(0==--this.Y?this.z=Object.create(null):delete i[t]),this;if(0===arguments.length){var e,s=Object.keys(i);for(r=0;r<s.length;++r)"removeListener"!==(e=s[r])&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this.z=Object.create(null),this.Y=0,this}if("function"==typeof(n=i[t]))this.removeListener(t,n);else if(void 0!==n)for(r=n.length-1;r>=0;r--)this.removeListener(t,n[r]);return this},u.prototype.listeners=function(t){return v(this,t,!0)},u.prototype.rawListeners=function(t){return v(this,t,!1)},u.listenerCount=function(t,n){return"function"==typeof t.listenerCount?t.listenerCount(n):p.call(t,n)},u.prototype.listenerCount=p,u.prototype.eventNames=function(){return this.Y>0?r(this.z):[]}},function(t,n,i){"use strict";var r=i(3),e=i(0),s=0;function o(){return"hole_"+s++}function u(t,n){for(var i=null,r=0;r<t.length;r++){var e=n(t[r]);e!==t[r]&&(i||(i=t.slice()),i[r]=e)}return i||t}function h(t,n,i){if(!(t instanceof r.Node))return t;if(!i){var e=n(t);if(e&&e!==t)return e}if(t instanceof r.NodeList){var s=u(t.children,function(t){return h(t,n,i)});s!==t.children&&(t=new r[t.typename](t.lineno,t.colno,s))}else if(t instanceof r.CallExtension){var o=h(t.args,n,i),f=u(t.contentArgs,function(t){return h(t,n,i)});o===t.args&&f===t.contentArgs||(t=new r[t.typename](t.extName,t.prop,o,f))}else{var c=t.fields.map(function(n){return t[n]}),a=u(c,function(t){return h(t,n,i)});a!==c&&(t=new r[t.typename](t.lineno,t.colno),a.forEach(function(n,i){t[t.fields[i]]=n}))}return i&&n(t)||t}function f(t,n){return h(t,n,!0)}function c(t,n,i){var s=[],u=f(i?t[i]:t,function(t){var i;return t instanceof r.Block?t:((t instanceof r.Filter&&-1!==e.indexOf(n,t.name.value)||t instanceof r.CallExtensionAsync)&&(i=new r.Symbol(t.lineno,t.colno,o()),s.push(new r.FilterAsync(t.lineno,t.colno,t.name,t.args,i))),i)});return i?t[i]=u:t=u,s.length?(s.push(t),new r.NodeList(t.lineno,t.colno,s)):t}function a(t,n){return function(t){return f(t,function(t){if(t instanceof r.If||t instanceof r.For){var n=!1;if(h(t,function(t){if(t instanceof r.FilterAsync||t instanceof r.IfAsync||t instanceof r.AsyncEach||t instanceof r.AsyncAll||t instanceof r.CallExtensionAsync)return n=!0,t}),n){if(t instanceof r.If)return new r.IfAsync(t.lineno,t.colno,t.cond,t.body,t.else_);if(t instanceof r.For&&!(t instanceof r.AsyncAll))return new r.AsyncEach(t.lineno,t.colno,t.arr,t.name,t.body,t.else_)}}})}(function(t){return h(t,function(t){if(t instanceof r.Block){var n=!1,i=o();t.body=h(t.body,function(t){if(t instanceof r.FunCall&&"super"===t.name.value)return n=!0,new r.Symbol(t.lineno,t.colno,i)}),n&&t.body.children.unshift(new r.Super(0,0,t.name,new r.Symbol(0,0,i)))}})}(function(t,n){return f(t,function(t){return t instanceof r.Output?c(t,n):t instanceof r.Set?c(t,n,"value"):t instanceof r.For?c(t,n,"arr"):t instanceof r.If?c(t,n,"cond"):t instanceof r.CallExtension?c(t,n,"args"):void 0})}(t,n)))}t.exports={transform:function(t,n){return a(t,n||[])}}},function(t,n,i){"use strict";var r=i(0),e=i(2);function s(t,n){return null===t||void 0===t||!1===t?n:t}function o(t){return t!=t}function u(t){var n=(t=s(t,"")).toLowerCase();return e.copySafeness(t,n.charAt(0).toUpperCase()+n.slice(1))}function h(t){if(r.isString(t))return t.split("");if(r.isObject(t))return r.r(t||{}).map(function(t){return{key:t[0],value:t[1]}});if(r.isArray(t))return t;throw new r.TemplateError("list filter: type not iterable")}function f(t){return function(n,i,e){void 0===i&&(i="truthy");var s=this,o=s.env.getTest(i);return r.toArray(n).filter(function(n){return o.call(s,n,e)===t})}}function c(t){return e.copySafeness(t,t.replace(/^\s*|\s*$/g,""))}(n=t.exports={}).abs=Math.abs,n.batch=function(t,n,i){var r,e=[],s=[];for(r=0;r<t.length;r++)r%n==0&&s.length&&(e.push(s),s=[]),s.push(t[r]);if(s.length){if(i)for(r=s.length;r<n;r++)s.push(i);e.push(s)}return e},n.capitalize=u,n.center=function(t,n){if(t=s(t,""),n=n||80,t.length>=n)return t;var i=n-t.length,o=r.repeat(" ",i/2-i%2),u=r.repeat(" ",i/2);return e.copySafeness(t,o+t+u)},n.default=function(t,n,i){return i?t||n:void 0!==t?t:n},n.dictsort=function(t,n,i){if(!r.isObject(t))throw new r.TemplateError("dictsort filter: val must be an object");var e,s=[];for(var o in t)s.push([o,t[o]]);if(void 0===i||"key"===i)e=0;else{if("value"!==i)throw new r.TemplateError("dictsort filter: You can only sort by either key or value");e=1}return s.sort(function(t,i){var s=t[e],o=i[e];return n||(r.isString(s)&&(s=s.toUpperCase()),r.isString(o)&&(o=o.toUpperCase())),s>o?1:s===o?0:-1}),s},n.dump=function(t,n){return JSON.stringify(t,null,n)},n.escape=function(t){return t instanceof e.SafeString?t:(t=null===t||void 0===t?"":t,e.markSafe(r.escape(t.toString())))},n.safe=function(t){return t instanceof e.SafeString?t:(t=null===t||void 0===t?"":t,e.markSafe(t.toString()))},n.first=function(t){return t[0]},n.forceescape=function(t){return t=null===t||void 0===t?"":t,e.markSafe(r.escape(t.toString()))},n.groupby=function(t,n){return r.groupBy(t,n,this.env.opts.throwOnUndefined)},n.indent=function(t,n,i){if(""===(t=s(t,"")))return"";n=n||4;var o=t.split("\n"),u=r.repeat(" ",n),h=o.map(function(t,n){return 0!==n||i?""+u+t:t}).join("\n");return e.copySafeness(t,h)},n.join=function(t,n,i){return n=n||"",i&&(t=r.map(t,function(t){return t[i]})),t.join(n)},n.last=function(t){return t[t.length-1]},n.length=function(t){var n=s(t,"");return void 0!==n?"function"==typeof Map&&n instanceof Map||"function"==typeof Set&&n instanceof Set?n.size:!r.isObject(n)||n instanceof e.SafeString?n.length:r.keys(n).length:0},n.list=h,n.lower=function(t){return(t=s(t,"")).toLowerCase()},n.nl2br=function(t){return null===t||void 0===t?"":e.copySafeness(t,t.replace(/\r\n|\n/g,"<br />\n"))},n.random=function(t){return t[Math.floor(Math.random()*t.length)]},n.reject=f(!1),n.rejectattr=function(t,n){return t.filter(function(t){return!t[n]})},n.select=f(!0),n.selectattr=function(t,n){return t.filter(function(t){return!!t[n]})},n.replace=function(t,n,i,r){var s=t;if(n instanceof RegExp)return t.replace(n,i);void 0===r&&(r=-1);var o="";if("number"==typeof n)n=""+n;else if("string"!=typeof n)return t;if("number"==typeof t&&(t=""+t),"string"!=typeof t&&!(t instanceof e.SafeString))return t;if(""===n)return o=i+t.split("").join(i)+i,e.copySafeness(t,o);var u=t.indexOf(n);if(0===r||-1===u)return t;for(var h=0,f=0;u>-1&&(-1===r||f<r);)o+=t.substring(h,u)+i,h=u+n.length,f++,u=t.indexOf(n,h);return h<t.length&&(o+=t.substring(h)),e.copySafeness(s,o)},n.reverse=function(t){var n;return(n=r.isString(t)?h(t):r.map(t,function(t){return t})).reverse(),r.isString(t)?e.copySafeness(t,n.join("")):n},n.round=function(t,n,i){var r=Math.pow(10,n=n||0);return("ceil"===i?Math.ceil:"floor"===i?Math.floor:Math.round)(t*r)/r},n.slice=function(t,n,i){for(var r=Math.floor(t.length/n),e=t.length%n,s=[],o=0,u=0;u<n;u++){var h=o+u*r;u<e&&o++;var f=o+(u+1)*r,c=t.slice(h,f);i&&u>=e&&c.push(i),s.push(c)}return s},n.sum=function(t,n,i){return void 0===i&&(i=0),n&&(t=r.map(t,function(t){return t[n]})),i+t.reduce(function(t,n){return t+n},0)},n.sort=e.makeMacro(["value","reverse","case_sensitive","attribute"],[],function(t,n,i,e){var s=this,o=r.map(t,function(t){return t}),u=r.getAttrGetter(e);return o.sort(function(t,o){var h=e?u(t):t,f=e?u(o):o;if(s.env.opts.throwOnUndefined&&e&&(void 0===h||void 0===f))throw new TypeError('sort: attribute "'+e+'" resolved to undefined');return!i&&r.isString(h)&&r.isString(f)&&(h=h.toLowerCase(),f=f.toLowerCase()),h<f?n?1:-1:h>f?n?-1:1:0}),o}),n.string=function(t){return e.copySafeness(t,t)},n.striptags=function(t,n){var i=c((t=s(t,"")).replace(/<\/?([a-z][a-z0-9]*)\b[^>]*>|<!--[\s\S]*?-->/gi,"")),r="";return r=n?i.replace(/^ +| +$/gm,"").replace(/ +/g," ").replace(/(\r\n)/g,"\n").replace(/\n\n\n+/g,"\n\n"):i.replace(/\s+/gi," "),e.copySafeness(t,r)},n.title=function(t){var n=(t=s(t,"")).split(" ").map(function(t){return u(t)});return e.copySafeness(t,n.join(" "))},n.trim=c,n.truncate=function(t,n,i,r){var o=t;if(t=s(t,""),n=n||255,t.length<=n)return t;if(i)t=t.substring(0,n);else{var u=t.lastIndexOf(" ",n);-1===u&&(u=n),t=t.substring(0,u)}return t+=void 0!==r&&null!==r?r:"...",e.copySafeness(o,t)},n.upper=function(t){return(t=s(t,"")).toUpperCase()},n.urlencode=function(t){var n=encodeURIComponent;return r.isString(t)?n(t):(r.isArray(t)?t:r.r(t)).map(function(t){var i=t[0],r=t[1];return n(i)+"="+n(r)}).join("&")};var a=/^(?:\(|<|&lt;)?(.*?)(?:\.|,|\)|\n|&gt;)?$/,l=/^[\w.!#$%&'*+\-\/=?\^`{|}~]+@[a-z\d\-]+(\.[a-z\d\-]+)+$/i,v=/^https?:\/\/.*$/,p=/^www\./,d=/\.(?:org|net|com)(?:\:|\/|$)/;n.urlize=function(t,n,i){o(n)&&(n=1/0);var r=!0===i?' rel="nofollow"':"";return t.split(/(\s+)/).filter(function(t){return t&&t.length}).map(function(t){var i=t.match(a),e=i?i[1]:t,s=e.substr(0,n);return v.test(e)?'<a href="'+e+'"'+r+">"+s+"</a>":p.test(e)?'<a href="http://'+e+'"'+r+">"+s+"</a>":l.test(e)?'<a href="mailto:'+e+'">'+e+"</a>":d.test(e)?'<a href="http://'+e+'"'+r+">"+s+"</a>":t}).join("")},n.wordcount=function(t){var n=(t=s(t,""))?t.match(/\w+/g):null;return n?n.length:null},n.float=function(t,n){var i=parseFloat(t);return o(i)?n:i};var m=e.makeMacro(["value","default","base"],[],function(t,n,i){void 0===i&&(i=10);var r=parseInt(t,i);return o(r)?n:r});n.int=m,n.d=n.default,n.e=n.escape},function(t,n,i){"use strict";function r(t,n){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,n){return t.__proto__=n,t})(t,n)}var e=function(t){var n,i;function e(n){var i;return(i=t.call(this)||this).precompiled=n||{},i}return i=t,(n=e).prototype=Object.create(i.prototype),n.prototype.constructor=n,r(n,i),e.prototype.getSource=function(t){return this.precompiled[t]?{src:{type:"code",obj:this.precompiled[t]},path:t}:null},e}(i(6));t.exports={PrecompiledLoader:e}},function(t,n,i){"use strict";var r=i(2).SafeString;n.callable=function(t){return"function"==typeof t},n.defined=function(t){return void 0!==t},n.divisibleby=function(t,n){return t%n==0},n.escaped=function(t){return t instanceof r},n.equalto=function(t,n){return t===n},n.eq=n.equalto,n.sameas=n.equalto,n.even=function(t){return t%2==0},n.falsy=function(t){return!t},n.ge=function(t,n){return t>=n},n.greaterthan=function(t,n){return t>n},n.gt=n.greaterthan,n.le=function(t,n){return t<=n},n.lessthan=function(t,n){return t<n},n.lt=n.lessthan,n.lower=function(t){return t.toLowerCase()===t},n.ne=function(t,n){return t!==n},n.null=function(t){return null===t},n.number=function(t){return"number"==typeof t},n.odd=function(t){return t%2==1},n.string=function(t){return"string"==typeof t},n.truthy=function(t){return!!t},n.undefined=function(t){return void 0===t},n.upper=function(t){return t.toUpperCase()===t},n.iterable=function(t){return"undefined"!=typeof Symbol?!!t[Symbol.iterator]:Array.isArray(t)||"string"==typeof t},n.mapping=function(t){var n=null!==t&&void 0!==t&&"object"==typeof t&&!Array.isArray(t);return Set?n&&!(t instanceof Set):n}},function(t,n,i){"use strict";t.exports=function(){return{range:function(t,n,i){void 0===n?(n=t,t=0,i=1):i||(i=1);var r=[];if(i>0)for(var e=t;e<n;e+=i)r.push(e);else for(var s=t;s>n;s+=i)r.push(s);return r},cycler:function(){return t=Array.prototype.slice.call(arguments),n=-1,{current:null,reset:function(){n=-1,this.current=null},next:function(){return++n>=t.length&&(n=0),this.current=t[n],this.current}};var t,n},joiner:function(t){return function(t){t=t||",";var n=!0;return function(){var i=n?"":t;return n=!1,i}}(t)}}}},function(t,n,i){var r=i(4);t.exports=function(t,n){function i(t,n){if(this.name=t,this.path=t,this.defaultEngine=n.defaultEngine,this.ext=r.extname(t),!this.ext&&!this.defaultEngine)throw Error("No default engine was specified and no extension was provided.");this.ext||(this.name+=this.ext=("."!==this.defaultEngine[0]?".":"")+this.defaultEngine)}return i.prototype.render=function(n,i){t.render(this.name,n,i)},n.set("view",i),n.set("nunjucksEnv",t),t}},function(t,n,i){"use strict";var r=i(4),e=i(4),s=i(0).t,o=i(5),u=i(7).Environment,h=i(24);function f(t,n){return!!Array.isArray(n)&&n.some(function(n){return t.match(n)})}function c(t,n){(n=n||{}).isString=!0;var i=n.env||new u([]),r=n.wrapper||h;if(!n.name)throw Error('the "name" option is required when compiling a string');return r([a(t,n.name,i)],n)}function a(t,n,i){var r,e=(i=i||new u([])).asyncFilters,h=i.extensionsList;n=n.replace(/\\/g,"/");try{r=o.compile(t,e,h,n,i.opts)}catch(t){throw s(n,!1,t)}return{name:n,template:r}}t.exports={precompile:function(t,n){var i=(n=n||{}).env||new u([]),s=n.wrapper||h;if(n.isString)return c(t,n);var o=r.existsSync(t)&&r.statSync(t),l=[],v=[];if(o.isFile())l.push(a(r.readFileSync(t,"utf-8"),n.name||t,i));else if(o.isDirectory()){!function i(s){r.readdirSync(s).forEach(function(o){var u=e.join(s,o),h=u.substr(e.join(t,"/").length),c=r.statSync(u);c&&c.isDirectory()?f(h+="/",n.exclude)||i(u):f(h,n.include)&&v.push(u)})}(t);for(var p=0;p<v.length;p++){var d=v[p].replace(e.join(t,"/"),"");try{l.push(a(r.readFileSync(v[p],"utf-8"),d,i))}catch(t){if(!n.force)throw t;console.error(t)}}}return s(l,n)},precompileString:c}},function(t,n,i){"use strict";t.exports=function(t,n){var i="";n=n||{};for(var r=0;r<t.length;r++){var e=JSON.stringify(t[r].name);i+="(function() {(window.nunjucksPrecompiled = window.nunjucksPrecompiled || {})["+e+"] = (function() {\n"+t[r].template+"\n})();\n",n.asFunction&&(i+="return function(ctx, cb) { return nunjucks.render("+e+", ctx, cb); }\n"),i+="})();\n"}return i}},function(t,n,i){t.exports=function(){"use strict";var t,n,i=this.runtime,r=this.lib,e=this.compiler.Compiler,s=this.parser.Parser,o=this.nodes,u=this.lexer,h=i.contextOrFrameLookup,f=i.memberLookup;function c(t){return{index:t.index,lineno:t.lineno,colno:t.colno}}if(e&&(t=e.prototype.assertType),s&&(n=s.prototype.parseAggregate),i.contextOrFrameLookup=function(t,n,i){var r=h.apply(this,arguments);if(void 0!==r)return r;switch(i){case"True":return!0;case"False":return!1;case"None":return null;default:return}},o&&e&&s){var a=o.Node.extend("Slice",{fields:["start","stop","step"],init:function(t,n,i,r,e){i=i||new o.Literal(t,n,null),r=r||new o.Literal(t,n,null),e=e||new o.Literal(t,n,1),this.parent(t,n,i,r,e)}});e.prototype.assertType=function(n){n instanceof a||t.apply(this,arguments)},e.prototype.compileSlice=function(t,n){this.w("("),this.L(t.start,n),this.w("),("),this.L(t.stop,n),this.w("),("),this.L(t.step,n),this.w(")")},s.prototype.parseAggregate=function(){var t=this,i=c(this.tokens);i.colno--,i.index--;try{return n.apply(this)}catch(n){var e=c(this.tokens),s=function(){return r.h(t.tokens,e),n};r.h(this.tokens,i),this.peeked=!1;var h=this.peekToken();if(h.type!==u.TOKEN_LEFT_BRACKET)throw s();this.nextToken();for(var f=new a(h.lineno,h.colno),l=!1,v=0;v<=f.fields.length&&!this.skip(u.TOKEN_RIGHT_BRACKET);v++){if(v===f.fields.length){if(!l)break;this.fail("parseSlice: too many slice components",h.lineno,h.colno)}this.skip(u.TOKEN_COLON)?l=!0:(f[f.fields[v]]=this.parseExpression(),l=this.skip(u.TOKEN_COLON)||l)}if(!l)throw s();return new o.Array(h.lineno,h.colno,[f])}}}function l(t,n){return Object.prototype.hasOwnProperty.call(t,n)}var v={pop:function(t){if(void 0===t)return this.pop();if(t>=this.length||t<0)throw Error("KeyError");return this.splice(t,1)},append:function(t){return this.push(t)},remove:function(t){for(var n=0;n<this.length;n++)if(this[n]===t)return this.splice(n,1);throw Error("ValueError")},count:function(t){for(var n=0,i=0;i<this.length;i++)this[i]===t&&n++;return n},index:function(t){var n;if(-1===(n=this.indexOf(t)))throw Error("ValueError");return n},find:function(t){return this.indexOf(t)},insert:function(t,n){return this.splice(t,0,n)}},p={items:function(){return r.r(this)},values:function(){return r.u(this)},keys:function(){return r.keys(this)},get:function(t,n){var i=this[t];return void 0===i&&(i=n),i},has_key:function(t){return l(this,t)},pop:function(t,n){var i=this[t];if(void 0===i&&void 0!==n)i=n;else{if(void 0===i)throw Error("KeyError");delete this[t]}return i},popitem:function(){var t=r.keys(this);if(!t.length)throw Error("KeyError");var n=t[0],i=this[n];return delete this[n],[n,i]},setdefault:function(t,n){return void 0===n&&(n=null),t in this||(this[t]=n),this[t]},update:function(t){return r.h(this,t),null}};return p.iteritems=p.items,p.itervalues=p.values,p.iterkeys=p.keys,i.memberLookup=function(t,n,e){return 4===arguments.length?function(t,n,r,e){t=t||[],null===n&&(n=e<0?t.length-1:0),null===r?r=e<0?-1:t.length:r<0&&(r+=t.length),n<0&&(n+=t.length);for(var s=[],o=n;!(o<0||o>t.length||e>0&&o>=r||e<0&&o<=r);o+=e)s.push(i.memberLookup(t,o));return s}.apply(this,arguments):(t=t||{},r.isArray(t)&&l(v,n)?v[n].bind(t):r.isObject(t)&&l(p,n)?p[n].bind(t):f.apply(this,arguments))},function(){i.contextOrFrameLookup=h,i.memberLookup=f,e&&(e.prototype.assertType=t),s&&(s.prototype.parseAggregate=n)}}}])});
//# sourceMappingURL=nunjucks.min.js.map