text: function getGlobal(){return function(){return this.dust}.call(null)}var dust={};!function(dust){function Context(n,l,t){this.stack=n,this.global=l,this.blocks=t}function Stack(n,l,t,u){this.tail=l,this.isObject=!dust.isArray(n)&&n&&"object"==typeof n,this.head=n,this.index=t,this.of=u}function Stub(n){this.head=new Chunk(this),this.callback=n,this.out=""}function Stream(){this.head=new Chunk(this)}function Chunk(n,l,t){this.root=n,this.next=l,this.data=[],this.flushable=!1,this.taps=t}function Tap(n,l){this.head=n,this.tail=l}dust.helpers={},dust.cache={},dust.register=function(n,l){n&&(dust.cache[n]=l)},dust.render=function(n,l,t){var u=new Stub(t).head;dust.load(n,u,Context.wrap(l,n)).end()},dust.stream=function(n,l){var t=new Stream;return dust.nextTick(function(){dust.load(n,t.head,Context.wrap(l,n)).end()}),t},dust.renderSource=function(n,l,t){return dust.compileFn(n)(l,t)},dust.compileFn=function(n,l){var t=dust.loadSource(dust.compile(n,l));return function(n,u){var e=u?new Stub(u):new Stream;return dust.nextTick(function(){t(e.head,Context.wrap(n,l)).end()}),e}},dust.load=function(n,l,t){var u=dust.cache[n];return u?u(l,t):dust.onLoad?l.map(function(l){dust.onLoad(n,function(u,e){return u?l.setError(u):(dust.cache[n]||dust.loadSource(dust.compile(e,n)),void dust.cache[n](l,t).end())})}):l.setError(new Error("Template Not Found: "+n))},dust.loadSource=function(source,path){return eval(source)},dust.isArray=Array.isArray?Array.isArray:function(n){return"[object Array]"==Object.prototype.toString.call(n)},dust.nextTick=function(){return"undefined"!=typeof process?process.nextTick:function(n){setTimeout(n,0)}}(),dust.isEmpty=function(n){return dust.isArray(n)&&!n.length?!0:0===n?!1:!n},dust.filter=function(n,l,t){if(t)for(var u=0,e=t.length;e>u;u++){var r=t[u];"s"===r?l=null:"function"==typeof dust.filters[r]&&(n=dust.filters[r](n))}return l&&(n=dust.filters[l](n)),n},dust.filters={h:function(n){return dust.escapeHtml(n)},j:function(n){return dust.escapeJs(n)},u:encodeURI,uc:encodeURIComponent,js:function(n){return JSON?JSON.stringify(n):n},jp:function(n){return JSON?JSON.parse(n):n}},dust.makeBase=function(n){return new Context(new Stack,n)},Context.wrap=function(n,l){if(n instanceof Context)return n;var t={};return t.__templates__=[],t.__templates__.push(l),new Context(new Stack(n),t)},Context.prototype.get=function(n){for(var l,t=this.stack;t;){if(t.isObject&&(l=t.head[n],void 0!==l))return l;t=t.tail}return this.global?this.global[n]:void 0},Context.prototype.getPath=function(n,l){var t,u=this.stack,e=l.length,r=n?void 0:this.stack.tail;if(n&&0===e)return u.head;u=u.head;for(var o=0;u&&e>o;)for(t=u,u=u[l[o]],o++;!u&&!n;){if(o>1)return void 0;r?(u=r.head,r=r.tail,o=0):n||(u=this.global,n=!0,o=0)}return"function"==typeof u?function(){return u.apply(t,arguments)}:u},Context.prototype.push=function(n,l,t){return new Context(new Stack(n,this.stack,l,t),this.global,this.blocks)},Context.prototype.rebase=function(n){return new Context(new Stack(n),this.global,this.blocks)},Context.prototype.current=function(){return this.stack.head},Context.prototype.getBlock=function(n,l,t){"function"==typeof n&&(n=n(l,t).data.join(""),l.data=[]);var u=this.blocks;if(u)for(var e,r=u.length;r--;)if(e=u[r][n])return e},Context.prototype.shiftBlocks=function(n){var l,t=this.blocks;return n?(l=t?t.concat([n]):[n],new Context(this.stack,this.global,l)):this},Stub.prototype.flush=function(){for(var n=this.head;n;){if(!n.flushable)return n.error?(this.callback(n.error),void(this.flush=function(){})):void 0;this.out+=n.data.join(""),n=n.next,this.head=n}this.callback(null,this.out)},Stream.prototype.flush=function(){for(var n=this.head;n;){if(!n.flushable)return n.error?(this.emit("error",n.error),void(this.flush=function(){})):void 0;this.emit("data",n.data.join("")),n=n.next,this.head=n}this.emit("end")},Stream.prototype.emit=function(n,l){if(!this.events)return!1;var t=this.events[n];if(!t)return!1;if("function"==typeof t)t(l);else for(var u=t.slice(0),e=0,r=u.length;r>e;e++)u[e](l)},Stream.prototype.on=function(n,l){return this.events||(this.events={}),this.events[n]?"function"==typeof this.events[n]?this.events[n]=[this.events[n],l]:this.events[n].push(l):this.events[n]=l,this},Stream.prototype.pipe=function(n){return this.on("data",function(l){n.write(l,"utf8")}).on("end",function(){n.end()}).on("error",function(l){n.error(l)}),this},Chunk.prototype.write=function(n){var l=this.taps;return l&&(n=l.go(n)),this.data.push(n),this},Chunk.prototype.end=function(n){return n&&this.write(n),this.flushable=!0,this.root.flush(),this},Chunk.prototype.map=function(n){var l=new Chunk(this.root,this.next,this.taps),t=new Chunk(this.root,l,this.taps);return this.next=t,this.flushable=!0,n(t),l},Chunk.prototype.tap=function(n){var l=this.taps;return this.taps=l?l.push(n):new Tap(n),this},Chunk.prototype.untap=function(){return this.taps=this.taps.tail,this},Chunk.prototype.render=function(n,l){return n(this,l)},Chunk.prototype.reference=function(n,l,t,u){return"function"==typeof n&&(n.isFunction=!0,n=n.apply(l.current(),[this,l,null,{auto:t,filters:u}]),n instanceof Chunk)?n:dust.isEmpty(n)?this:this.write(dust.filter(n,t,u))},Chunk.prototype.section=function(n,l,t,u){if("function"==typeof n&&(n=n.apply(l.current(),[this,l,t,u]),n instanceof Chunk))return n;var e=t.block,r=t["else"];if(u&&(l=l.push(u)),dust.isArray(n)){if(e){var o=n.length,f=this;if(o>0){l.stack.head&&(l.stack.head.$len=o);for(var i=0;o>i;i++)l.stack.head&&(l.stack.head.$idx=i),f=e(f,l.push(n[i],i,o));return l.stack.head&&(l.stack.head.$idx=void 0,l.stack.head.$len=void 0),f}if(r)return r(this,l)}}else if(n===!0){if(e)return e(this,l)}else if(n||0===n){if(e)return e(this,l.push(n))}else if(r)return r(this,l);return this},Chunk.prototype.exists=function(n,l,t){var u=t.block,e=t["else"];if(dust.isEmpty(n)){if(e)return e(this,l)}else if(u)return u(this,l);return this},Chunk.prototype.notexists=function(n,l,t){var u=t.block,e=t["else"];if(dust.isEmpty(n)){if(u)return u(this,l)}else if(e)return e(this,l);return this},Chunk.prototype.block=function(n,l,t){var u=t.block;return n&&(u=n),u?u(this,l):this},Chunk.prototype.partial=function(n,l,t){var u;l.global&&l.global.__templates__&&l.global.__templates__.push(n),t?(u=dust.makeBase(l.global),u.blocks=l.blocks,l.stack&&l.stack.tail&&(u.stack=l.stack.tail),u=u.push(t),u=u.push(l.stack.head)):u=l;var e;return e="function"==typeof n?this.capture(n,u,function(n,l){dust.load(n,l,u).end()}):dust.load(n,this,u),l.global&&l.global.__templates__&&l.global.__templates__.pop(),e},Chunk.prototype.helper=function(n,l,t,u){return dust.helpers[n]?dust.helpers[n](this,l,t,u):this},Chunk.prototype.capture=function(n,l,t){return this.map(function(u){var e=new Stub(function(n,l){n?u.setError(n):t(l,u)});n(e.head,l).end()})},Chunk.prototype.setError=function(n){return this.error=n,this.root.flush(),this},Tap.prototype.push=function(n){return new Tap(n,this)},Tap.prototype.go=function(n){for(var l=this;l;)n=l.head(n),l=l.tail;return n};var HCHARS=new RegExp(/[&<>\"\']/),AMP=/&/g,LT=/</g,GT=/>/g,QUOT=/\"/g,SQUOT=/\'/g;dust.escapeHtml=function(n){return"string"==typeof n&&HCHARS.test(n)?n.replace(AMP,"&amp;").replace(LT,"&lt;").replace(GT,"&gt;").replace(QUOT,"&quot;").replace(SQUOT,"&#39;"):n};var BS=/\\/g,FS=/\//g,CR=/\r/g,LS=/\u2028/g,PS=/\u2029/g,NL=/\n/g,LF=/\f/g,SQ=/'/g,DQ=/"/g,TB=/\t/g;dust.escapeJs=function(n){return"string"==typeof n?n.replace(BS,"\\\\").replace(FS,"\\/").replace(DQ,'\\"').replace(SQ,"\\'").replace(CR,"\\r").replace(LS,"\\u2028").replace(PS,"\\u2029").replace(NL,"\\n").replace(LF,"\\f").replace(TB,"\\t"):n}}(dust),"undefined"!=typeof exports&&("undefined"!=typeof process&&require("./server")(dust),module.exports=dust);var dustCompiler=function(n){function l(l){var t={};return n.filterNode(t,l)}function t(l,t){for(var u=[t[0]],e=1,r=t.length;r>e;e++){var o=n.filterNode(l,t[e]);o&&u.push(o)}return u}function u(l,t){for(var u,e=[t[0]],r=1,o=t.length;o>r;r++){var f=n.filterNode(l,t[r]);f&&("buffer"===f[0]?u?u[1]+=f[1]:(u=f,e.push(f)):(u=null,e.push(f)))}return e}function e(n,l){return["buffer",h[l[1]]]}function r(n,l){return l}function o(){}function f(l,t){var u={name:t,bodies:[],blocks:{},index:0,auto:"h"};return"(function(){dust.register("+(t?'"'+t+'"':"null")+","+n.compileNode(u,l)+");"+i(u)+s(u)+"return body_0;})();"}function i(n){var l=[],t=n.blocks;for(var u in t)l.push("'"+u+"':"+t[u]);return l.length?(n.blocks="ctx=ctx.shiftBlocks(blocks);","var blocks={"+l.join(",")+"};"):n.blocks=""}function s(n){for(var l=[],t=n.bodies,u=n.blocks,e=0,r=t.length;r>e;e++)l[e]="function body_"+e+"(chk,ctx){"+u+"return chk"+t[e]+";}";return l.join("")}function c(l,t){for(var u="",e=1,r=t.length;r>e;e++)u+=n.compileNode(l,t[e]);return u}function a(l,t,u){return"."+u+"("+n.compileNode(l,t[1])+","+n.compileNode(l,t[2])+","+n.compileNode(l,t[4])+","+n.compileNode(l,t[3])+")"}n.compile=function(t,u){try{var e=l(n.parse(t));return f(e,u)}catch(r){if(!r.line||!r.column)throw r;throw new SyntaxError(r.message+" At line : "+r.line+", column : "+r.column)}},n.filterNode=function(l,t){return n.optimizers[t[0]](l,t)},n.optimizers={body:u,buffer:r,special:e,format:o,reference:t,"#":t,"?":t,"^":t,"<":t,"+":t,"@":t,"%":t,partial:t,context:t,params:t,bodies:t,param:t,filters:r,key:r,path:r,literal:r,comment:o,line:o,col:o},n.pragmas={esc:function(n,l,t){var u=n.auto;l||(l="h"),n.auto="s"===l?"":l;var e=c(n,t.block);return n.auto=u,e}};var h={s:" ",n:"\n",r:"\r",lb:"{",rb:"}"};n.compileNode=function(l,t){return n.nodes[t[0]](l,t)},n.nodes={body:function(n,l){var t=n.index++,u="body_"+t;return n.bodies[t]=c(n,l),u},buffer:function(n,l){return".write("+p(l[1])+")"},format:function(n,l){return".write("+p(l[1]+l[2])+")"},reference:function(l,t){return".reference("+n.compileNode(l,t[1])+",ctx,"+n.compileNode(l,t[2])+")"},"#":function(n,l){return a(n,l,"section")},"?":function(n,l){return a(n,l,"exists")},"^":function(n,l){return a(n,l,"notexists")},"<":function(l,t){for(var u=t[4],e=1,r=u.length;r>e;e++){var o=u[e],f=o[1][1];if("block"===f)return l.blocks[t[1].text]=n.compileNode(l,o[2]),""}return""},"+":function(l,t){return"undefined"==typeof t[1].text&&"undefined"==typeof t[4]?".block(ctx.getBlock("+n.compileNode(l,t[1])+",chk, ctx),"+n.compileNode(l,t[2])+", {},"+n.compileNode(l,t[3])+")":".block(ctx.getBlock("+p(t[1].text)+"),"+n.compileNode(l,t[2])+","+n.compileNode(l,t[4])+","+n.compileNode(l,t[3])+")"},"@":function(l,t){return".helper("+p(t[1].text)+","+n.compileNode(l,t[2])+","+n.compileNode(l,t[4])+","+n.compileNode(l,t[3])+")"},"%":function(l,t){var u=t[1][1];if(!n.pragmas[u])return"";for(var e=t[4],r={},o=1,f=e.length;f>o;o++){var i=e[o];r[i[1][1]]=i[2]}for(var s=t[3],c={},o=1,f=s.length;f>o;o++){var a=s[o];c[a[1][1]]=a[2][1]}var h=t[2][1]?t[2][1].text:null;return n.pragmas[u](l,h,r,c)},partial:function(l,t){return".partial("+n.compileNode(l,t[1])+","+n.compileNode(l,t[2])+","+n.compileNode(l,t[3])+")"},context:function(l,t){return t[1]?"ctx.rebase("+n.compileNode(l,t[1])+")":"ctx"},params:function(l,t){for(var u=[],e=1,r=t.length;r>e;e++)u.push(n.compileNode(l,t[e]));return u.length?"{"+u.join(",")+"}":"null"},bodies:function(l,t){for(var u=[],e=1,r=t.length;r>e;e++)u.push(n.compileNode(l,t[e]));return"{"+u.join(",")+"}"},param:function(l,t){return n.compileNode(l,t[1])+":"+n.compileNode(l,t[2])},filters:function(n,l){for(var t=[],u=1,e=l.length;e>u;u++){var r=l[u];t.push('"'+r+'"')}return'"'+n.auto+'"'+(t.length?",["+t.join(",")+"]":"")},key:function(n,l){return'ctx.get("'+l[1]+'")'},path:function(l,t){for(var u=t[1],e=t[2],r=[],o=0,f=e.length;f>o;o++)r.push(n.isArray(e[o])?n.compileNode(l,e[o]):'"'+e[o]+'"');return"ctx.getPath("+u+",["+r.join(",")+"])"},literal:function(n,l){return p(l[1])}};var p="undefined"==typeof JSON?function(l){return'"'+n.escapeJs(l)+'"'}:JSON.stringify;return n};"undefined"!=typeof exports?module.exports=dustCompiler:dustCompiler(getGlobal()),function(n){var l=function(){function n(n){return'"'+n.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var t={parse:function(t,u){function e(n){var l={};for(var t in n)l[t]=n[t];return l}function r(n,l){for(var u=n.offset+l,e=n.offset;u>e;e++){var r=t.charAt(e);"\n"===r?(n.seenCR||n.line++,n.column=1,n.seenCR=!1):"\r"===r||"\u2028"===r||"\u2029"===r?(n.line++,n.column=1,n.seenCR=!0):(n.column++,n.seenCR=!1)}n.offset+=l}function o(n){U.offset<G.offset||(U.offset>G.offset&&(G=e(U),I=[]),I.push(n))}function f(){var n,l,t;for(t=e(U),n=[],l=i();null!==l;)n.push(l),l=i();return null!==n&&(n=function(n,l,t,u){return["body"].concat(u).concat([["line",l],["col",t]])}(t.offset,t.line,t.column,n)),null===n&&(U=e(t)),n}function i(){var n;return n=B(),null===n&&(n=s(),null===n&&(n=v(),null===n&&(n=g(),null===n&&(n=m(),null===n&&(n=E()))))),n}function s(){var n,l,u,i,s,h,p,m,v;if(Z++,m=e(U),v=e(U),n=c(),null!==n){for(l=[],u=Q();null!==u;)l.push(u),u=Q();null!==l?(u=L(),null!==u?(i=f(),null!==i?(s=d(),null!==s?(h=a(),h=null!==h?h:"",null!==h?(p=function(n,l,t,u,e,r,o){if(!o||u[1].text!==o.text)throw new Error("Expected end tag for "+u[1].text+" but it was not found. At line : "+l+", column : "+t);return!0}(U.offset,U.line,U.column,n,i,s,h)?"":null,null!==p?n=[n,l,u,i,s,h,p]:(n=null,U=e(v))):(n=null,U=e(v))):(n=null,U=e(v))):(n=null,U=e(v))):(n=null,U=e(v))):(n=null,U=e(v))}else n=null,U=e(v);if(null!==n&&(n=function(n,l,t,u,e,r){return r.push(["param",["literal","block"],e]),u.push(r),u.concat([["line",l],["col",t]])}(m.offset,m.line,m.column,n[0],n[3],n[4],n[5])),null===n&&(U=e(m)),null===n){if(m=e(U),v=e(U),n=c(),null!==n){for(l=[],u=Q();null!==u;)l.push(u),u=Q();null!==l?(47===t.charCodeAt(U.offset)?(u="/",r(U,1)):(u=null,0===Z&&o('"/"')),null!==u?(i=L(),null!==i?n=[n,l,u,i]:(n=null,U=e(v))):(n=null,U=e(v))):(n=null,U=e(v))}else n=null,U=e(v);null!==n&&(n=function(n,l,t,u){return u.push(["bodies"]),u.concat([["line",l],["col",t]])}(m.offset,m.line,m.column,n[0])),null===n&&(U=e(m))}return Z--,0===Z&&null===n&&o("section"),n}function c(){var n,l,u,f,i,s,c,a;if(c=e(U),a=e(U),n=R(),null!==n)if(/^[#?^<+@%]/.test(t.charAt(U.offset))?(l=t.charAt(U.offset),r(U,1)):(l=null,0===Z&&o("[#?^<+@%]")),null!==l){for(u=[],f=Q();null!==f;)u.push(f),f=Q();null!==u?(f=y(),null!==f?(i=h(),null!==i?(s=p(),null!==s?n=[n,l,u,f,i,s]:(n=null,U=e(a))):(n=null,U=e(a))):(n=null,U=e(a))):(n=null,U=e(a))}else n=null,U=e(a);else n=null,U=e(a);return null!==n&&(n=function(n,l,t,u,e,r,o){return[u,e,r,o]}(c.offset,c.line,c.column,n[1],n[3],n[4],n[5])),null===n&&(U=e(c)),n}function a(){var n,l,u,f,i,s,c,a;if(Z++,c=e(U),a=e(U),n=R(),null!==n)if(47===t.charCodeAt(U.offset)?(l="/",r(U,1)):(l=null,0===Z&&o('"/"')),null!==l){for(u=[],f=Q();null!==f;)u.push(f),f=Q();if(null!==u)if(f=y(),null!==f){for(i=[],s=Q();null!==s;)i.push(s),s=Q();null!==i?(s=L(),null!==s?n=[n,l,u,f,i,s]:(n=null,U=e(a))):(n=null,U=e(a))}else n=null,U=e(a);else n=null,U=e(a)}else n=null,U=e(a);else n=null,U=e(a);return null!==n&&(n=function(n,l,t,u){return u}(c.offset,c.line,c.column,n[3])),null===n&&(U=e(c)),Z--,0===Z&&null===n&&o("end tag"),n}function h(){var n,l,u,f,i;return u=e(U),f=e(U),i=e(U),58===t.charCodeAt(U.offset)?(n=":",r(U,1)):(n=null,0===Z&&o('":"')),null!==n?(l=y(),null!==l?n=[n,l]:(n=null,U=e(i))):(n=null,U=e(i)),null!==n&&(n=function(n,l,t,u){return u}(f.offset,f.line,f.column,n[1])),null===n&&(U=e(f)),n=null!==n?n:"",null!==n&&(n=function(n,l,t,u){return u?["context",u]:["context"]}(u.offset,u.line,u.column,n)),null===n&&(U=e(u)),n}function p(){var n,l,u,f,i,s,c,a;if(Z++,s=e(U),n=[],c=e(U),a=e(U),u=Q(),null!==u)for(l=[];null!==u;)l.push(u),u=Q();else l=null;for(null!==l?(u=S(),null!==u?(61===t.charCodeAt(U.offset)?(f="=",r(U,1)):(f=null,0===Z&&o('"="')),null!==f?(i=k(),null===i&&(i=y(),null===i&&(i=_())),null!==i?l=[l,u,f,i]:(l=null,U=e(a))):(l=null,U=e(a))):(l=null,U=e(a))):(l=null,U=e(a)),null!==l&&(l=function(n,l,t,u,e){return["param",["literal",u],e]}(c.offset,c.line,c.column,l[1],l[3])),null===l&&(U=e(c));null!==l;){if(n.push(l),c=e(U),a=e(U),u=Q(),null!==u)for(l=[];null!==u;)l.push(u),u=Q();else l=null;null!==l?(u=S(),null!==u?(61===t.charCodeAt(U.offset)?(f="=",r(U,1)):(f=null,0===Z&&o('"="')),null!==f?(i=k(),null===i&&(i=y(),null===i&&(i=_())),null!==i?l=[l,u,f,i]:(l=null,U=e(a))):(l=null,U=e(a))):(l=null,U=e(a))):(l=null,U=e(a)),null!==l&&(l=function(n,l,t,u,e){return["param",["literal",u],e]}(c.offset,c.line,c.column,l[1],l[3])),null===l&&(U=e(c))}return null!==n&&(n=function(n,l,t,u){return["params"].concat(u)}(s.offset,s.line,s.column,n)),null===n&&(U=e(s)),Z--,0===Z&&null===n&&o("params"),n}function d(){var n,l,u,i,s,c,a,h,p;for(Z++,a=e(U),n=[],h=e(U),p=e(U),l=R(),null!==l?(58===t.charCodeAt(U.offset)?(u=":",r(U,1)):(u=null,0===Z&&o('":"')),null!==u?(i=S(),null!==i?(s=L(),null!==s?(c=f(),null!==c?l=[l,u,i,s,c]:(l=null,U=e(p))):(l=null,U=e(p))):(l=null,U=e(p))):(l=null,U=e(p))):(l=null,U=e(p)),null!==l&&(l=function(n,l,t,u,e){return["param",["literal",u],e]}(h.offset,h.line,h.column,l[2],l[4])),null===l&&(U=e(h));null!==l;)n.push(l),h=e(U),p=e(U),l=R(),null!==l?(58===t.charCodeAt(U.offset)?(u=":",r(U,1)):(u=null,0===Z&&o('":"')),null!==u?(i=S(),null!==i?(s=L(),null!==s?(c=f(),null!==c?l=[l,u,i,s,c]:(l=null,U=e(p))):(l=null,U=e(p))):(l=null,U=e(p))):(l=null,U=e(p))):(l=null,U=e(p)),null!==l&&(l=function(n,l,t,u,e){return["param",["literal",u],e]}(h.offset,h.line,h.column,l[2],l[4])),null===l&&(U=e(h));return null!==n&&(n=function(n,l,t,u){return["bodies"].concat(u)}(a.offset,a.line,a.column,n)),null===n&&(U=e(a)),Z--,0===Z&&null===n&&o("bodies"),n}function m(){var n,l,t,u,r,f;return Z++,r=e(U),f=e(U),n=R(),null!==n?(l=y(),null!==l?(t=b(),null!==t?(u=L(),null!==u?n=[n,l,t,u]:(n=null,U=e(f))):(n=null,U=e(f))):(n=null,U=e(f))):(n=null,U=e(f)),null!==n&&(n=function(n,l,t,u,e){return["reference",u,e].concat([["line",l],["col",t]])}(r.offset,r.line,r.column,n[1],n[2])),null===n&&(U=e(r)),Z--,0===Z&&null===n&&o("reference"),n}function v(){var n,l,u,f,i,s,c,a,d,m,v,b;if(Z++,m=e(U),v=e(U),n=R(),null!==n)if(62===t.charCodeAt(U.offset)?(l=">",r(U,1)):(l=null,0===Z&&o('">"')),null===l&&(43===t.charCodeAt(U.offset)?(l="+",r(U,1)):(l=null,0===Z&&o('"+"'))),null!==l){for(u=[],f=Q();null!==f;)u.push(f),f=Q();if(null!==u)if(b=e(U),f=S(),null!==f&&(f=function(n,l,t,u){return["literal",u]}(b.offset,b.line,b.column,f)),null===f&&(U=e(b)),null===f&&(f=_()),null!==f)if(i=h(),null!==i)if(s=p(),null!==s){for(c=[],a=Q();null!==a;)c.push(a),a=Q();null!==c?(47===t.charCodeAt(U.offset)?(a="/",r(U,1)):(a=null,0===Z&&o('"/"')),null!==a?(d=L(),null!==d?n=[n,l,u,f,i,s,c,a,d]:(n=null,U=e(v))):(n=null,U=e(v))):(n=null,U=e(v))}else n=null,U=e(v);else n=null,U=e(v);else n=null,U=e(v);else n=null,U=e(v)}else n=null,U=e(v);else n=null,U=e(v);return null!==n&&(n=function(n,l,t,u,e,r,o){var f=">"===u?"partial":u;return[f,e,r,o].concat([["line",l],["col",t]])}(m.offset,m.line,m.column,n[1],n[3],n[4],n[5])),null===n&&(U=e(m)),Z--,0===Z&&null===n&&o("partial"),n}function b(){var n,l,u,f,i,s;for(Z++,f=e(U),n=[],i=e(U),s=e(U),124===t.charCodeAt(U.offset)?(l="|",r(U,1)):(l=null,0===Z&&o('"|"')),null!==l?(u=S(),null!==u?l=[l,u]:(l=null,U=e(s))):(l=null,U=e(s)),null!==l&&(l=function(n,l,t,u){return u}(i.offset,i.line,i.column,l[1])),null===l&&(U=e(i));null!==l;)n.push(l),i=e(U),s=e(U),124===t.charCodeAt(U.offset)?(l="|",r(U,1)):(l=null,0===Z&&o('"|"')),null!==l?(u=S(),null!==u?l=[l,u]:(l=null,U=e(s))):(l=null,U=e(s)),null!==l&&(l=function(n,l,t,u){return u}(i.offset,i.line,i.column,l[1])),null===l&&(U=e(i));return null!==n&&(n=function(n,l,t,u){return["filters"].concat(u)}(f.offset,f.line,f.column,n)),null===n&&(U=e(f)),Z--,0===Z&&null===n&&o("filters"),n}function g(){var n,l,u,f,i,s;return Z++,i=e(U),s=e(U),n=R(),null!==n?(126===t.charCodeAt(U.offset)?(l="~",r(U,1)):(l=null,0===Z&&o('"~"')),null!==l?(u=S(),null!==u?(f=L(),null!==f?n=[n,l,u,f]:(n=null,U=e(s))):(n=null,U=e(s))):(n=null,U=e(s))):(n=null,U=e(s)),null!==n&&(n=function(n,l,t,u){return["special",u].concat([["line",l],["col",t]])}(i.offset,i.line,i.column,n[2])),null===n&&(U=e(i)),Z--,0===Z&&null===n&&o("special"),n}function y(){var n,l;return Z++,l=e(U),n=C(),null!==n&&(n=function(n,l,t,u){var e=["path"].concat(u);return e.text=u[1].join("."),e}(l.offset,l.line,l.column,n)),null===n&&(U=e(l)),null===n&&(l=e(U),n=S(),null!==n&&(n=function(n,l,t,u){var e=["key",u];return e.text=u,e}(l.offset,l.line,l.column,n)),null===n&&(U=e(l))),Z--,0===Z&&null===n&&o("identifier"),n}function k(){var n,l;return Z++,l=e(U),n=x(),null===n&&(n=A()),null!==n&&(n=function(n,l,t,u){return["literal",u]}(l.offset,l.line,l.column,n)),null===n&&(U=e(l)),Z--,0===Z&&null===n&&o("number"),n}function x(){var n,l,u,f,i,s;if(Z++,i=e(U),s=e(U),n=A(),null!==n)if(46===t.charCodeAt(U.offset)?(l=".",r(U,1)):(l=null,0===Z&&o('"."')),null!==l){if(f=A(),null!==f)for(u=[];null!==f;)u.push(f),f=A();else u=null;null!==u?n=[n,l,u]:(n=null,U=e(s))}else n=null,U=e(s);else n=null,U=e(s);return null!==n&&(n=function(n,l,t,u,e){return parseFloat(u+"."+e.join(""))}(i.offset,i.line,i.column,n[0],n[2])),null===n&&(U=e(i)),Z--,0===Z&&null===n&&o("float"),n}function A(){var n,l,u;if(Z++,u=e(U),/^[0-9]/.test(t.charAt(U.offset))?(l=t.charAt(U.offset),r(U,1)):(l=null,0===Z&&o("[0-9]")),null!==l)for(n=[];null!==l;)n.push(l),/^[0-9]/.test(t.charAt(U.offset))?(l=t.charAt(U.offset),r(U,1)):(l=null,0===Z&&o("[0-9]"));else n=null;return null!==n&&(n=function(n,l,t,u){return parseInt(u.join(""),10)}(u.offset,u.line,u.column,n)),null===n&&(U=e(u)),Z--,0===Z&&null===n&&o("integer"),n}function C(){var n,l,u,f,i;if(Z++,f=e(U),i=e(U),n=S(),n=null!==n?n:"",null!==n){if(u=N(),null===u&&(u=w()),null!==u)for(l=[];null!==u;)l.push(u),u=N(),null===u&&(u=w());else l=null;null!==l?n=[n,l]:(n=null,U=e(i))}else n=null,U=e(i);if(null!==n&&(n=function(n,l,t,u,e){return e=e[0],u&&e?(e.unshift(u),[!1,e].concat([["line",l],["col",t]])):[!0,e].concat([["line",l],["col",t]])}(f.offset,f.line,f.column,n[0],n[1])),null===n&&(U=e(f)),null===n){if(f=e(U),i=e(U),46===t.charCodeAt(U.offset)?(n=".",r(U,1)):(n=null,0===Z&&o('"."')),null!==n){for(l=[],u=N(),null===u&&(u=w());null!==u;)l.push(u),u=N(),null===u&&(u=w());null!==l?n=[n,l]:(n=null,U=e(i))}else n=null,U=e(i);null!==n&&(n=function(n,l,t,u){return u.length>0?[!0,u[0]].concat([["line",l],["col",t]]):[!0,[]].concat([["line",l],["col",t]])}(f.offset,f.line,f.column,n[1])),null===n&&(U=e(f))}return Z--,0===Z&&null===n&&o("path"),n}function S(){var n,l,u,f,i;if(Z++,f=e(U),i=e(U),/^[a-zA-Z_$]/.test(t.charAt(U.offset))?(n=t.charAt(U.offset),r(U,1)):(n=null,0===Z&&o("[a-zA-Z_$]")),null!==n){for(l=[],/^[0-9a-zA-Z_$\-]/.test(t.charAt(U.offset))?(u=t.charAt(U.offset),r(U,1)):(u=null,0===Z&&o("[0-9a-zA-Z_$\\-]"));null!==u;)l.push(u),/^[0-9a-zA-Z_$\-]/.test(t.charAt(U.offset))?(u=t.charAt(U.offset),r(U,1)):(u=null,0===Z&&o("[0-9a-zA-Z_$\\-]"));null!==l?n=[n,l]:(n=null,U=e(i))}else n=null,U=e(i);return null!==n&&(n=function(n,l,t,u,e){return u+e.join("")}(f.offset,f.line,f.column,n[0],n[1])),null===n&&(U=e(f)),Z--,0===Z&&null===n&&o("key"),n}function w(){var n,l,u,f,i,s,c,a;if(Z++,f=e(U),i=e(U),s=e(U),c=e(U),n=$(),null!==n){if(a=e(U),/^[0-9]/.test(t.charAt(U.offset))?(u=t.charAt(U.offset),r(U,1)):(u=null,0===Z&&o("[0-9]")),null!==u)for(l=[];null!==u;)l.push(u),/^[0-9]/.test(t.charAt(U.offset))?(u=t.charAt(U.offset),r(U,1)):(u=null,0===Z&&o("[0-9]"));else l=null;null!==l&&(l=function(n,l,t,u){return u.join("")}(a.offset,a.line,a.column,l)),null===l&&(U=e(a)),null===l&&(l=y()),null!==l?(u=J(),null!==u?n=[n,l,u]:(n=null,U=e(c))):(n=null,U=e(c))}else n=null,U=e(c);return null!==n&&(n=function(n,l,t,u){return u}(s.offset,s.line,s.column,n[1])),null===n&&(U=e(s)),null!==n?(l=N(),l=null!==l?l:"",null!==l?n=[n,l]:(n=null,U=e(i))):(n=null,U=e(i)),null!==n&&(n=function(n,l,t,u,e){return e?e.unshift(u):e=[u],e}(f.offset,f.line,f.column,n[0],n[1])),null===n&&(U=e(f)),Z--,0===Z&&null===n&&o("array"),n}function N(){var n,l,u,f,i,s,c;if(Z++,f=e(U),i=e(U),s=e(U),c=e(U),46===t.charCodeAt(U.offset)?(l=".",r(U,1)):(l=null,0===Z&&o('"."')),null!==l?(u=S(),null!==u?l=[l,u]:(l=null,U=e(c))):(l=null,U=e(c)),null!==l&&(l=function(n,l,t,u){return u}(s.offset,s.line,s.column,l[1])),null===l&&(U=e(s)),null!==l)for(n=[];null!==l;)n.push(l),s=e(U),c=e(U),46===t.charCodeAt(U.offset)?(l=".",r(U,1)):(l=null,0===Z&&o('"."')),null!==l?(u=S(),null!==u?l=[l,u]:(l=null,U=e(c))):(l=null,U=e(c)),null!==l&&(l=function(n,l,t,u){return u}(s.offset,s.line,s.column,l[1])),null===l&&(U=e(s));else n=null;return null!==n?(l=w(),l=null!==l?l:"",null!==l?n=[n,l]:(n=null,U=e(i))):(n=null,U=e(i)),null!==n&&(n=function(n,l,t,u,e){return e?u.concat(e):u}(f.offset,f.line,f.column,n[0],n[1])),null===n&&(U=e(f)),Z--,0===Z&&null===n&&o("array_part"),n}function _(){var n,l,u,f,i;if(Z++,f=e(U),i=e(U),34===t.charCodeAt(U.offset)?(n='"',r(U,1)):(n=null,0===Z&&o('"\\""')),null!==n?(34===t.charCodeAt(U.offset)?(l='"',r(U,1)):(l=null,0===Z&&o('"\\""')),null!==l?n=[n,l]:(n=null,U=e(i))):(n=null,U=e(i)),null!==n&&(n=function(n,l,t){return["literal",""].concat([["line",l],["col",t]])}(f.offset,f.line,f.column)),null===n&&(U=e(f)),null===n&&(f=e(U),i=e(U),34===t.charCodeAt(U.offset)?(n='"',r(U,1)):(n=null,0===Z&&o('"\\""')),null!==n?(l=T(),null!==l?(34===t.charCodeAt(U.offset)?(u='"',r(U,1)):(u=null,0===Z&&o('"\\""')),null!==u?n=[n,l,u]:(n=null,U=e(i))):(n=null,U=e(i))):(n=null,U=e(i)),null!==n&&(n=function(n,l,t,u){return["literal",u].concat([["line",l],["col",t]])}(f.offset,f.line,f.column,n[1])),null===n&&(U=e(f)),null===n)){if(f=e(U),i=e(U),34===t.charCodeAt(U.offset)?(n='"',r(U,1)):(n=null,0===Z&&o('"\\""')),null!==n){if(u=j(),null!==u)for(l=[];null!==u;)l.push(u),u=j();else l=null;null!==l?(34===t.charCodeAt(U.offset)?(u='"',r(U,1)):(u=null,0===Z&&o('"\\""')),null!==u?n=[n,l,u]:(n=null,U=e(i))):(n=null,U=e(i))}else n=null,U=e(i);null!==n&&(n=function(n,l,t,u){return["body"].concat(u).concat([["line",l],["col",t]])}(f.offset,f.line,f.column,n[1])),null===n&&(U=e(f))}return Z--,0===Z&&null===n&&o("inline"),n}function j(){var n,l;return n=g(),null===n&&(n=m(),null===n&&(l=e(U),n=T(),null!==n&&(n=function(n,l,t,u){return["buffer",u]}(l.offset,l.line,l.column,n)),null===n&&(U=e(l)))),n}function E(){var n,l,u,f,i,s,c,a,h;if(Z++,s=e(U),c=e(U),n=z(),null!==n){for(l=[],u=Q();null!==u;)l.push(u),u=Q();null!==l?n=[n,l]:(n=null,U=e(c))}else n=null,U=e(c);if(null!==n&&(n=function(n,l,t,u,e){return["format",u,e.join("")].concat([["line",l],["col",t]])}(s.offset,s.line,s.column,n[0],n[1])),null===n&&(U=e(s)),null===n){if(s=e(U),c=e(U),a=e(U),h=e(U),Z++,l=O(),Z--,null===l?l="":(l=null,U=e(h)),null!==l?(h=e(U),Z++,u=B(),Z--,null===u?u="":(u=null,U=e(h)),null!==u?(h=e(U),Z++,f=z(),Z--,null===f?f="":(f=null,U=e(h)),null!==f?(t.length>U.offset?(i=t.charAt(U.offset),r(U,1)):(i=null,0===Z&&o("any character")),null!==i?l=[l,u,f,i]:(l=null,U=e(a))):(l=null,U=e(a))):(l=null,U=e(a))):(l=null,U=e(a)),null!==l&&(l=function(n,l,t,u){return u}(c.offset,c.line,c.column,l[3])),null===l&&(U=e(c)),null!==l)for(n=[];null!==l;)n.push(l),c=e(U),a=e(U),h=e(U),Z++,l=O(),Z--,null===l?l="":(l=null,U=e(h)),null!==l?(h=e(U),Z++,u=B(),Z--,null===u?u="":(u=null,U=e(h)),null!==u?(h=e(U),Z++,f=z(),Z--,null===f?f="":(f=null,U=e(h)),null!==f?(t.length>U.offset?(i=t.charAt(U.offset),r(U,1)):(i=null,0===Z&&o("any character")),null!==i?l=[l,u,f,i]:(l=null,U=e(a))):(l=null,U=e(a))):(l=null,U=e(a))):(l=null,U=e(a)),null!==l&&(l=function(n,l,t,u){return u}(c.offset,c.line,c.column,l[3])),null===l&&(U=e(c));else n=null;null!==n&&(n=function(n,l,t,u){return["buffer",u.join("")].concat([["line",l],["col",t]])}(s.offset,s.line,s.column,n)),null===n&&(U=e(s))}return Z--,0===Z&&null===n&&o("buffer"),n}function T(){var n,l,u,f,i,s,c;if(Z++,f=e(U),i=e(U),s=e(U),c=e(U),Z++,l=O(),Z--,null===l?l="":(l=null,U=e(c)),null!==l?(u=F(),null===u&&(/^[^"]/.test(t.charAt(U.offset))?(u=t.charAt(U.offset),r(U,1)):(u=null,0===Z&&o('[^"]'))),null!==u?l=[l,u]:(l=null,U=e(s))):(l=null,U=e(s)),null!==l&&(l=function(n,l,t,u){return u}(i.offset,i.line,i.column,l[1])),null===l&&(U=e(i)),null!==l)for(n=[];null!==l;)n.push(l),i=e(U),s=e(U),c=e(U),Z++,l=O(),Z--,null===l?l="":(l=null,U=e(c)),null!==l?(u=F(),null===u&&(/^[^"]/.test(t.charAt(U.offset))?(u=t.charAt(U.offset),r(U,1)):(u=null,0===Z&&o('[^"]'))),null!==u?l=[l,u]:(l=null,U=e(s))):(l=null,U=e(s)),null!==l&&(l=function(n,l,t,u){return u}(i.offset,i.line,i.column,l[1])),null===l&&(U=e(i));else n=null;return null!==n&&(n=function(n,l,t,u){return u.join("")}(f.offset,f.line,f.column,n)),null===n&&(U=e(f)),Z--,0===Z&&null===n&&o("literal"),n}function F(){var n,l;return l=e(U),'\\"'===t.substr(U.offset,2)?(n='\\"',r(U,2)):(n=null,0===Z&&o('"\\\\\\""')),null!==n&&(n=function(){return'"'}(l.offset,l.line,l.column)),null===n&&(U=e(l)),n}function B(){var n,l,u,f,i,s,c,a,h;if(Z++,i=e(U),s=e(U),"{!"===t.substr(U.offset,2)?(n="{!",r(U,2)):(n=null,0===Z&&o('"{!"')),null!==n){for(l=[],c=e(U),a=e(U),h=e(U),Z++,"!}"===t.substr(U.offset,2)?(u="!}",r(U,2)):(u=null,0===Z&&o('"!}"')),Z--,null===u?u="":(u=null,U=e(h)),null!==u?(t.length>U.offset?(f=t.charAt(U.offset),r(U,1)):(f=null,0===Z&&o("any character")),null!==f?u=[u,f]:(u=null,U=e(a))):(u=null,U=e(a)),null!==u&&(u=function(n,l,t,u){return u}(c.offset,c.line,c.column,u[1])),null===u&&(U=e(c));null!==u;)l.push(u),c=e(U),a=e(U),h=e(U),Z++,"!}"===t.substr(U.offset,2)?(u="!}",r(U,2)):(u=null,0===Z&&o('"!}"')),Z--,null===u?u="":(u=null,U=e(h)),null!==u?(t.length>U.offset?(f=t.charAt(U.offset),r(U,1)):(f=null,0===Z&&o("any character")),null!==f?u=[u,f]:(u=null,U=e(a))):(u=null,U=e(a)),null!==u&&(u=function(n,l,t,u){return u}(c.offset,c.line,c.column,u[1])),null===u&&(U=e(c));null!==l?("!}"===t.substr(U.offset,2)?(u="!}",r(U,2)):(u=null,0===Z&&o('"!}"')),null!==u?n=[n,l,u]:(n=null,U=e(s))):(n=null,U=e(s))}else n=null,U=e(s);return null!==n&&(n=function(n,l,t,u){return["comment",u.join("")].concat([["line",l],["col",t]])}(i.offset,i.line,i.column,n[1])),null===n&&(U=e(i)),Z--,0===Z&&null===n&&o("comment"),n}function O(){var n,l,u,f,i,s,c,a,h,p,d;if(h=e(U),n=R(),null!==n){for(l=[],u=Q();null!==u;)l.push(u),u=Q();if(null!==l)if(/^[#?^><+%:@\/~%]/.test(t.charAt(U.offset))?(u=t.charAt(U.offset),r(U,1)):(u=null,0===Z&&o("[#?^><+%:@\\/~%]")),null!==u){for(f=[],i=Q();null!==i;)f.push(i),i=Q();if(null!==f){if(p=e(U),d=e(U),Z++,s=L(),Z--,null===s?s="":(s=null,U=e(d)),null!==s?(d=e(U),Z++,c=z(),Z--,null===c?c="":(c=null,U=e(d)),null!==c?(t.length>U.offset?(a=t.charAt(U.offset),r(U,1)):(a=null,0===Z&&o("any character")),null!==a?s=[s,c,a]:(s=null,U=e(p))):(s=null,U=e(p))):(s=null,U=e(p)),null!==s)for(i=[];null!==s;)i.push(s),p=e(U),d=e(U),Z++,s=L(),Z--,null===s?s="":(s=null,U=e(d)),null!==s?(d=e(U),Z++,c=z(),Z--,null===c?c="":(c=null,U=e(d)),null!==c?(t.length>U.offset?(a=t.charAt(U.offset),r(U,1)):(a=null,0===Z&&o("any character")),null!==a?s=[s,c,a]:(s=null,U=e(p))):(s=null,U=e(p))):(s=null,U=e(p));else i=null;if(null!==i){for(s=[],c=Q();null!==c;)s.push(c),c=Q();null!==s?(c=L(),null!==c?n=[n,l,u,f,i,s,c]:(n=null,U=e(h))):(n=null,U=e(h))}else n=null,U=e(h)}else n=null,U=e(h)}else n=null,U=e(h);else n=null,U=e(h)}else n=null,U=e(h);return null===n&&(n=m()),n}function R(){var n;return 123===t.charCodeAt(U.offset)?(n="{",r(U,1)):(n=null,0===Z&&o('"{"')),n}function L(){var n;return 125===t.charCodeAt(U.offset)?(n="}",r(U,1)):(n=null,0===Z&&o('"}"')),n}function $(){var n;return 91===t.charCodeAt(U.offset)?(n="[",r(U,1)):(n=null,0===Z&&o('"["')),n}function J(){var n;return 93===t.charCodeAt(U.offset)?(n="]",r(U,1)):(n=null,0===Z&&o('"]"')),n}function z(){var n;return 10===t.charCodeAt(U.offset)?(n="\n",r(U,1)):(n=null,0===Z&&o('"\\n"')),null===n&&("\r\n"===t.substr(U.offset,2)?(n="\r\n",r(U,2)):(n=null,0===Z&&o('"\\r\\n"')),null===n&&(13===t.charCodeAt(U.offset)?(n="\r",r(U,1)):(n=null,0===Z&&o('"\\r"')),null===n&&(8232===t.charCodeAt(U.offset)?(n="\u2028",r(U,1)):(n=null,0===Z&&o('"\\u2028"')),null===n&&(8233===t.charCodeAt(U.offset)?(n="\u2029",r(U,1)):(n=null,0===Z&&o('"\\u2029"')))))),n
  }function Q(){var n;return/^[\t\x0B\f \xA0\uFEFF]/.test(t.charAt(U.offset))?(n=t.charAt(U.offset),r(U,1)):(n=null,0===Z&&o("[\\t\\x0B\\f \\xA0\\uFEFF]")),null===n&&(n=z()),n}function H(n){n.sort();for(var l=null,t=[],u=0;u<n.length;u++)n[u]!==l&&(t.push(n[u]),l=n[u]);return t}var P={body:f,part:i,section:s,sec_tag_start:c,end_tag:a,context:h,params:p,bodies:d,reference:m,partial:v,filters:b,special:g,identifier:y,number:k,"float":x,integer:A,path:C,key:S,array:w,array_part:N,inline:_,inline_part:j,buffer:E,literal:T,esc:F,comment:B,tag:O,ld:R,rd:L,lb:$,rb:J,eol:z,ws:Q};if(void 0!==u){if(void 0===P[u])throw new Error("Invalid rule name: "+n(u)+".")}else u="body";var U={offset:0,line:1,column:1,seenCR:!1},Z=0,G={offset:0,line:1,column:1,seenCR:!1},I=[],M=P[u]();if(null===M||U.offset!==t.length){var q=Math.max(U.offset,G.offset),D=q<t.length?t.charAt(q):null,K=U.offset>G.offset?U:G;throw new l.SyntaxError(H(I),D,q,K.line,K.column)}return M},toSource:function(){return this._source}};return t.SyntaxError=function(l,t,u,e,r){function o(l,t){var u,e;switch(l.length){case 0:u="end of input";break;case 1:u=l[0];break;default:u=l.slice(0,l.length-1).join(", ")+" or "+l[l.length-1]}return e=t?n(t):"end of input","Expected "+u+" but "+e+" found."}this.name="SyntaxError",this.expected=l,this.found=t,this.message=o(l,t),this.offset=u,this.line=e,this.column=r},t.SyntaxError.prototype=Error.prototype,t}();n.parse=l.parse}("undefined"!=typeof exports?exports:getGlobal());