!function(a,b){"object"===typeof exports&&exports?b(exports):"function"===typeof define&&define.amd?define(["exports"],b):b(a.Mustache={})}(this,function(a){function d(a){return"function"===typeof a}function e(a){return a.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function g(a,b){return f.call(a,b)}function i(a){return!g(h,a)}function k(a){return String(a).replace(/[&<>"'\/]/g,function(a){return j[a]})}function q(b,d){function q(){if(j&&!k)for(;h.length;)delete g[h.pop()];else h=[];j=!1,k=!1}function x(a){if("string"===typeof a&&(a=a.split(m,2)),!c(a)||2!==a.length)throw new Error("Invalid tags: "+a);u=new RegExp(e(a[0])+"\\s*"),v=new RegExp("\\s*"+e(a[1])),w=new RegExp("\\s*"+e("}"+a[1]))}if(!b)return[];var u,v,w,f=[],g=[],h=[],j=!1,k=!1;x(d||a.tags);for(var z,A,B,C,D,E,y=new t(b);!y.eos();){if(z=y.pos,B=y.scanUntil(u))for(var F=0,G=B.length;F0?d[d.length-1][4]:b;break;default:c.push(e)}return b}function t(a){this.string=a,this.tail=a,this.pos=0}function u(a,b){this.view=null==a?{}:a,this.cache={".":this.view},this.parent=b}function v(){this.cache={}}var b=Object.prototype.toString,c=Array.isArray||function(a){return"[object Array]"===b.call(a)},f=RegExp.prototype.test,h=/\S/,j={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},l=/\s*/,m=/\s+/,n=/\s*=/,o=/\s*\}/,p=/#|\^|\/|>|\{|&|=|!/;t.prototype.eos=function(){return""===this.tail},t.prototype.scan=function(a){var b=this.tail.match(a);if(!b||0!==b.index)return"";var c=b[0];return this.tail=this.tail.substring(c.length),this.pos+=c.length,c},t.prototype.scanUntil=function(a){var c,b=this.tail.search(a);switch(b){case-1:c=this.tail,this.tail="";break;case 0:c="";break;default:c=this.tail.substring(0,b),this.tail=this.tail.substring(b)}return this.pos+=c.length,c},u.prototype.push=function(a){return new u(a,this)},u.prototype.lookup=function(a){var c,b=this.cache;if(a in b)c=b[a];else{for(var f,g,e=this;e;){if(a.indexOf(".")>0)for(c=e.view,f=a.split("."),g=0;null!=c&&g"===g?h=this._renderPartial(f,b,c,d):"&"===g?h=this._unescapedValue(f,b):"name"===g?h=this._escapedValue(f,b):"text"===g&&(h=this._rawValue(f)),void 0!==h&&(e+=h);return e},v.prototype._renderSection=function(a,b,e,f){function j(a){return g.render(a,b,e)}var g=this,h="",i=b.lookup(a[1]);if(i){if(c(i))for(var k=0,l=i.length;k