????

Your IP : 3.15.149.254


Current Path : C:/inetpub/vhost/sdoc.gdtsolutions.vn/package/public/js/plugin/jsrender/
Upload File :
Current File : C:/inetpub/vhost/sdoc.gdtsolutions.vn/package/public/js/plugin/jsrender/jsrender.min.js

/*! JsRender v1.0.3: http://jsviews.com/#jsrender */
/*! **VERSION FOR WEB** (For NODE.JS see http://jsviews.com/download/jsrender-node.js) */
!function(e,t){var n=t.jQuery;"object"==typeof exports?module.exports=n?e(t,n):function(n){if(n&&!n.fn)throw"Provide jQuery or null";return e(t,n)}:"function"==typeof define&&define.amd?define(function(){return e(t)}):e(t,!1)}(function(e,t){"use strict";function n(e,t){return function(){var n,r=this,i=r.base;return r.base=e,n=t.apply(r,arguments),r.base=i,n}}function r(e,t){return se(t)&&(t=n(e?e._d?e:n(a,e):a,t),t._d=(e&&e._d||0)+1),t}function i(e,t){var n,i=t.props;for(n in i)!$e.test(n)||e[n]&&e[n].fix||(e[n]="convert"!==n?r(e.constructor.prototype[n],i[n]):i[n])}function o(e){return e}function a(){return""}function s(e){try{throw console.log("JsRender dbg breakpoint: "+e),"dbg breakpoint"}catch(t){}return this.base?this.baseApply(arguments):e}function l(e){this.name=(t.link?"JsViews":"JsRender")+" Error",this.message=e||this.name}function d(e,t){if(e){for(var n in t)e[n]=t[n];return e}}function p(e,t,n){return e?le(e)?p.apply(oe,e):(we=n?n[0]:we,/^(\W|_){5}$/.test(e+t+we)||S("Invalid delimiters"),he=e[0],_e=e[1],be=t[0],xe=t[1],ge.delimiters=[he+_e,be+xe,we],e="\\"+he+"(\\"+we+")?\\"+_e,t="\\"+be+"\\"+xe,re="(?:(\\w+(?=[\\/\\s\\"+be+"]))|(\\w+)?(:)|(>)|(\\*))\\s*((?:[^\\"+be+"]|\\"+be+"(?!\\"+xe+"))*?)",fe.rTag="(?:"+re+")",re=new RegExp("(?:"+e+re+"(\\/)?|\\"+he+"(\\"+we+")?\\"+_e+"(?:(?:\\/(\\w+))\\s*|!--[\\s\\S]*?--))"+t,"g"),fe.rTmpl=new RegExp("^\\s|\\s$|<.*>|([^\\\\]|^)[{}]|"+e+".*"+t),me):ge.delimiters}function u(e,t){t||e===!0||(t=e,e=void 0);var n,r,i,o,a=this,s="root"===t;if(e){if(o=t&&a.type===t&&a,!o)if(n=a.views,a._.useKey){for(r in n)if(o=t?n[r].get(e,t):n[r])break}else for(r=0,i=n.length;!o&&r<i;r++)o=t?n[r].get(e,t):n[r]}else if(s)o=a.root;else if(t)for(;a&&!o;)o=a.type===t?a:void 0,a=a.parent;else o=a.parent;return o||void 0}function c(){var e=this.get("item");return e?e.index:void 0}function f(){return this.index}function g(e,t,n,r){var i,o,s,l=0;if(1===n&&(r=1,n=void 0),t)for(o=t.split("."),s=o.length;e&&l<s;l++)i=e,e=o[l]?e[o[l]]:e;return n&&(n.lt=n.lt||l<s),void 0===e?r?a:"":r?function(){return e.apply(i,arguments)}:e}function v(n,r,i){var o,a,s,l,p,u,c,f=this,g=!ke&&arguments.length>1,v=f.ctx;if(n){if(f._||(p=f.index,f=f.tag),u=f,v&&v.hasOwnProperty(n)||(v=ue).hasOwnProperty(n)){if(s=v[n],"tag"===n||"tagCtx"===n||"root"===n||"parentTags"===n||f._.it===n)return s}else v=void 0;if((!ke&&f.tagCtx||f.linked)&&(s&&s._cxp||(f=f.tagCtx||se(s)?f:(f=f.scope||f,!f.isTop&&f.ctx.tag||f),void 0!==s&&f.tagCtx&&(f=f.tagCtx.view.scope),v=f._ocps,s=v&&v.hasOwnProperty(n)&&v[n]||s,s&&s._cxp||!i&&!g||((v||(f._ocps=f._ocps||{}))[n]=s=[{_ocp:s,_vw:u,_key:n}],s._cxp={path:Te,ind:0,updateValue:function(e,n){return t.observable(s[0]).setProperty(Te,e),this}})),l=s&&s._cxp)){if(arguments.length>2)return a=s[1]?fe._ceo(s[1].deps):[Te],a.unshift(s[0]),a._cxp=l,a;if(p=l.tagElse,c=s[1]?l.tag&&l.tag.cvtArgs?l.tag.cvtArgs(p,1)[l.ind]:s[1](s[0].data,s[0],fe):s[0]._ocp,g)return s&&c!==r&&fe._ucp(n,r,f,l),f;s=c}return s&&se(s)&&(o=function(){return s.apply(this&&this!==e?this:u,arguments)},d(o,s)),o||s}}function m(e){return e&&(e.fn?e:this.getRsc("templates",e)||de(e))}function h(e,t,n,r){var o,a,s,l,p,u="number"==typeof n&&t.tmpl.bnds[n-1];if(void 0===r&&u&&u._lr&&(r=""),void 0!==r?n=r={props:{},args:[r]}:u&&(n=u(t.data,t,fe)),u=u._bd&&u,e||u){if(a=t._lc,o=a&&a.tag,n.view=t,!o){if(o=d(new fe._tg,{_:{bnd:u,unlinked:!0,lt:n.lt},inline:!a,tagName:":",convert:e,onArrayChange:!0,flow:!0,tagCtx:n,tagCtxs:[n],_is:"tag"}),l=n.args.length,l>1)for(p=o.bindTo=[];l--;)p.unshift(l);a&&(a.tag=o,o.linkCtx=a),n.ctx=Q(n.ctx,(a?a.view:t).ctx),i(o,n)}o._er=r&&s,o.ctx=n.ctx||o.ctx||{},n.ctx=void 0,s=o.cvtArgs()[0],o._er=r&&s}else s=n.args[0];return s=u&&t._.onRender?t._.onRender(s,t,o):s,void 0!=s?s:""}function _(e,t){var n,r,i,o,a,s,l,d=this;if(d.tagName){if(s=d,d=(s.tagCtxs||[d])[e||0],!d)return}else s=d.tag;if(a=s.bindFrom,o=d.args,(l=s.convert)&&""+l===l&&(l="true"===l?void 0:d.view.getRsc("converters",l)||S("Unknown converter: '"+l+"'")),l&&!t&&(o=o.slice()),a){for(i=[],n=a.length;n--;)r=a[n],i.unshift(b(d,r));t&&(o=i)}if(l){if(l=l.apply(s,i||o),void 0===l)return o;if(a=a||[0],n=a.length,le(l)&&l.length===n||(l=[l],a=[0],n=1),t)o=l;else for(;n--;)r=a[n],+r===r&&(o[r]=l[n])}return o}function b(e,t){return e=e[+t===t?"args":"props"],e&&e[t]}function x(e){return this.cvtArgs(e,1)}function w(e,t){var n,r,i=this;if(""+t===t){for(;void 0===n&&i;)r=i.tmpl&&i.tmpl[e],n=r&&r[t],i=i.parent;return n||oe[e][t]}}function y(e,t,n,r,o,a){function s(e){var t=l[e];if(void 0!==t)for(t=le(t)?t:[t],m=t.length;m--;)J=t[m],isNaN(parseInt(J))||(t[m]=parseInt(J));return t||[0]}t=t||ie;var l,d,p,u,c,f,g,m,h,w,y,k,C,T,j,A,P,R,N,M,F,V,$,I,D,J,U,q,K,L,B=0,H="",W=t._lc||!1,Z=t.ctx,z=n||t.tmpl,G="number"==typeof r&&t.tmpl.bnds[r-1];for("tag"===e._is?(l=e,e=l.tagName,r=l.tagCtxs,p=l.template):(d=t.getRsc("tags",e)||S("Unknown tag: {{"+e+"}} "),p=d.template),void 0===a&&G&&(G._lr=d.lateRender&&G._lr!==!1||G._lr)&&(a=""),void 0!==a?(H+=a,r=a=[{props:{},args:[],params:{props:{}}}]):G&&(r=G(t.data,t,fe)),g=r.length;B<g;B++)y=r[B],P=y.tmpl,(!W||!W.tag||B&&!W.tag.inline||l._er||P&&+P===P)&&(P&&z.tmpls&&(y.tmpl=y.content=z.tmpls[P-1]),y.index=B,y.ctxPrm=v,y.render=O,y.cvtArgs=_,y.bndArgs=x,y.view=t,y.ctx=Q(Q(y.ctx,d&&d.ctx),Z)),(n=y.props.tmpl)&&(y.tmpl=t._getTmpl(n),y.content=y.content||y.tmpl),l?W&&W.fn._lr&&(R=!!l.init):(l=new d._ctr,R=!!l.init,l.parent=f=Z&&Z.tag,l.tagCtxs=r,W&&(l.inline=!1,W.tag=l),l.linkCtx=W,(l._.bnd=G||W.fn)?(l._.ths=y.params.props["this"],l._.lt=r.lt,l._.arrVws={}):l.dataBoundOnly&&S(e+" must be data-bound:\n{^{"+e+"}}")),I=l.dataMap,y.tag=l,I&&r&&(y.map=r[B].map),l.flow||(k=y.ctx=y.ctx||{},u=l.parents=k.parentTags=Z&&Q(k.parentTags,Z.parentTags)||{},f&&(u[f.tagName]=f),u[l.tagName]=k.tag=l,k.tagCtx=y);if(!(l._er=a)){for(i(l,r[0]),l.rendering={rndr:l.rendering},B=0;B<g;B++){if(y=l.tagCtx=r[B],$=y.props,l.ctx=y.ctx,!B){if(R&&(l.init(y,W,l.ctx),R=void 0),y.args.length||y.argDefault===!1||l.argDefault===!1||(y.args=F=[y.view.data],y.params.args=["#data"]),T=s("bindTo"),void 0!==l.bindTo&&(l.bindTo=T),void 0!==l.bindFrom?l.bindFrom=s("bindFrom"):l.bindTo&&(l.bindFrom=l.bindTo=T),j=l.bindFrom||T,q=T.length,U=j.length,l._.bnd&&(K=l.linkedElement)&&(l.linkedElement=K=le(K)?K:[K],q!==K.length&&S("linkedElement not same length as bindTo")),(K=l.linkedCtxParam)&&(l.linkedCtxParam=K=le(K)?K:[K],U!==K.length&&S("linkedCtxParam not same length as bindFrom/bindTo")),j)for(l._.fromIndex={},l._.toIndex={},h=U;h--;)for(J=j[h],m=q;m--;)J===T[m]&&(l._.fromIndex[m]=h,l._.toIndex[h]=m);W&&(W.attr=l.attr=W.attr||l.attr||W._dfAt),c=l.attr,l._.noVws=c&&c!==Ke}if(F=l.cvtArgs(B),l.linkedCtxParam)for(V=l.cvtArgs(B,1),m=U,L=l.constructor.prototype.ctx;m--;)(C=l.linkedCtxParam[m])&&(J=j[m],A=V[m],y.ctx[C]=fe._cp(L&&void 0===A?L[C]:A,void 0!==A&&b(y.params,J),y.view,l._.bnd&&{tag:l,cvt:l.convert,ind:m,tagElse:B}));(N=$.dataMap||I)&&(F.length||$.dataMap)&&(M=y.map,M&&M.src===F[0]&&!o||(M&&M.src&&M.unmap(),N.map(F[0],y,M,!l._.bnd),M=y.map),F=[M.tgt]),w=void 0,l.render&&(w=l.render.apply(l,F),t.linked&&w&&!Oe.test(w)&&(n={links:[]},n.render=n.fn=function(){return w},w=E(n,t.data,void 0,!0,t,void 0,void 0,l))),F.length||(F=[t]),void 0===w&&(D=F[0],l.contentCtx&&(D=l.contentCtx===!0?t:l.contentCtx(D)),w=y.render(D,!0)||(o?void 0:"")),H=H?H+(w||""):void 0!==w?""+w:void 0}l.rendering=l.rendering.rndr}return l.tagCtx=r[0],l.ctx=l.tagCtx.ctx,l._.noVws&&l.inline&&(H="text"===c?pe.html(H):""),G&&t._.onRender?t._.onRender(H,t,l):H}function k(e,t,n,r,i,o,a,s){var l,d,p,u=this,f="array"===t;u.content=s,u.views=f?[]:{},u.data=r,u.tmpl=i,p=u._={key:0,useKey:f?0:1,id:""+Je++,onRender:a,bnds:{}},u.linked=!!a,u.type=t||"top",(u.parent=n)?(u.root=n.root||u,l=n.views,d=n._,u.isTop=d.scp,u.scope=(!e.tag||e.tag===n.ctx.tag)&&!u.isTop&&n.scope||u,d.useKey?(l[p.key="_"+d.useKey++]=u,u.index=He,u.getIndex=c):l.length===(p.key=u.index=o)?l.push(u):l.splice(o,0,u),u.ctx=e||n.ctx):(u.ctx=e||{},t&&(u.root=u))}function C(e){var t,n,r;for(t in Ge)n=t+"s",e[n]&&(r=e[n],e[n]={},oe[n](r,e))}function T(e,t,n){function i(){var t=this;t._={unlinked:!0},t.inline=!0,t.tagName=e}var o,a,s,l=new fe._tg;if(se(t)?t={depends:t.depends,render:t}:""+t===t&&(t={template:t}),a=t.baseTag){t.flow=!!t.flow,a=""+a===a?n&&n.tags[a]||ce[a]:a,a||S('baseTag: "'+t.baseTag+'" not found'),l=d(l,a);for(s in t)l[s]=r(a[s],t[s])}else l=d(l,t);return void 0!==(o=l.template)&&(l.template=""+o===o?de[o]||de(o):o),(i.prototype=l).constructor=l._ctr=i,n&&(l._parentTmpl=n),l}function j(e){return this.base.apply(this,e)}function A(e,n,r,i){function o(n){var o,s;if(""+n===n||n.nodeType>0&&(a=n)){if(!a)if(/^\.\/[^\\:*?"<>]*$/.test(n))(s=de[e=e||n])?n=s:a=document.getElementById(n);else if(t.fn&&!fe.rTmpl.test(n))try{a=t(n,document)[0]}catch(l){}a&&("SCRIPT"!==a.tagName&&S(n+": Use script block, not "+a.tagName),i?n=a.innerHTML:(o=a.getAttribute(Be),o&&(o!==Qe?(n=de[o],delete de[o]):t.fn&&(n=t.data(a)[Qe])),o&&n||(e=e||(t.fn?Qe:n),n=A(e,a.innerHTML,r,i)),n.tmplName=e=e||o,e!==Qe&&(de[e]=n),a.setAttribute(Be,e),t.fn&&t.data(a,Qe,n))),a=void 0}else n.fn||(n=void 0);return n}var a,s,l=n=n||"";if(fe._html=pe.html,0===i&&(i=void 0,l=o(l)),i=i||(n.markup?n.bnds?d({},n):n:{}),i.tmplName=i.tmplName||e||"unnamed",r&&(i._parentTmpl=r),!l&&n.markup&&(l=o(n.markup))&&l.fn&&(l=l.markup),void 0!==l)return l.render||n.render?l.tmpls&&(s=l):(n=M(l,i),J(l.replace(Pe,"\\$&"),n)),s||(s=d(function(){return s.render.apply(s,arguments)},n),C(s)),s}function P(e,t){return se(e)?e.call(t):e}function R(e,t,n){Object.defineProperty(e,t,{value:n,configurable:!0})}function N(e,n){function r(e){p.apply(this,e)}function i(){return new r(arguments)}function o(e,t){for(var n,r,i,o,a,s=0;s<b;s++)i=f[s],n=void 0,i+""!==i&&(n=i,i=n.getter,a=n.parentRef),void 0===(o=e[i])&&n&&void 0!==(r=n.defaultVal)&&(o=P(r,e)),t(o,n&&c[n.type],i,a)}function a(t){t=t+""===t?JSON.parse(t):t;var n,r,i,a,d=0,p=t,u=[];if(le(t)){for(t=t||[],n=t.length;d<n;d++)u.push(this.map(t[d]));return u._is=e,u.unmap=l,u.merge=s,u}if(t){for(o(t,function(e,t){t&&(e=t.map(e)),u.push(e)}),p=this.apply(this,u),d=b;d--;)if(i=u[d],a=f[d].parentRef,a&&i&&i.unmap)if(le(i))for(n=i.length;n--;)R(i[n],a,p);else R(i,a,p);for(r in t)r===ae||w[r]||(p[r]=t[r])}return p}function s(e,t,n){e=e+""===e?JSON.parse(e):e;var r,a,s,l,d,p,u,c,f,g,m=0,h=this;if(le(h)){for(u={},f=[],a=e.length,s=h.length;m<a;m++){for(c=e[m],p=!1,r=0;r<s&&!p;r++)u[r]||(d=h[r],v&&(u[r]=p=v+""===v?c[v]&&(w[v]?d[v]():d[v])===c[v]:v(d,c)));p?(d.merge(c),f.push(d)):(f.push(g=i.map(c)),n&&R(g,n,t))}return void(x?x(h).refresh(f,!0):h.splice.apply(h,[0,h.length].concat(f)))}o(e,function(e,t,n,r){t?h[n]().merge(e,h,r):h[n]()!==e&&h[n](e)});for(l in e)l===ae||w[l]||(h[l]=e[l])}function l(){function e(e){for(var t=[],n=0,r=e.length;n<r;n++)t.push(e[n].unmap());return t}var t,n,r,i,o=0,a=this;if(le(a))return e(a);for(t={};o<b;o++)n=f[o],r=void 0,n+""!==n&&(r=n,n=r.getter),i=a[n](),t[n]=r&&i&&c[r.type]?le(i)?e(i):i.unmap():i;for(n in a)!a.hasOwnProperty(n)||"_"===n.charAt(0)&&w[n.slice(1)]||n===ae||se(a[n])||(t[n]=a[n]);return t}var d,p,u,c=this,f=n.getters,g=n.extend,v=n.id,m=t.extend({_is:e||"unnamed",unmap:l,merge:s},g),h="",_="",b=f?f.length:0,x=t.observable,w={};for(r.prototype=m,d=0;d<b;d++)!function(e){e=e.getter||e,w[e]=d+1;var t="_"+e;h+=(h?",":"")+e,_+="this."+t+" = "+e+";\n",m[e]=m[e]||function(n){return arguments.length?void(x?x(this).setProperty(e,n):this[t]=n):this[t]},x&&(m[e].set=m[e].set||function(e){this[t]=e})}(f[d]);return _=new Function(h,_),p=function(){_.apply(this,arguments),(u=arguments[b+1])&&R(this,arguments[b],u)},p.prototype=m,m.constructor=p,i.map=a,i.getters=f,i.extend=g,i.id=v,i}function M(e,n){var r,i=ve._wm||{},o={tmpls:[],links:{},bnds:[],_is:"template",render:O};return n&&(o=d(o,n)),o.markup=e,o.htmlTag||(r=Me.exec(e),o.htmlTag=r?r[1].toLowerCase():""),r=i[o.htmlTag],r&&r!==i.div&&(o.markup=t.trim(o.markup)),o}function F(e,t){function n(i,o,a){var s,l,d,p=fe.onStore[e];if(i&&typeof i===Le&&!i.nodeType&&!i.markup&&!i.getTgt&&!("viewModel"===e&&i.getters||i.extend)){for(l in i)n(l,i[l],o);return o||oe}return i&&""+i!==i&&(a=o,o=i,i=void 0),d=a?"viewModel"===e?a:a[r]=a[r]||{}:n,s=t.compile,void 0===o&&(o=s?i:d[i],i=void 0),null===o?i&&delete d[i]:(s&&(o=s.call(d,i,o,a,0)||{},o._is=e),i&&(d[i]=o)),p&&p(i,o,a,s),o}var r=e+"s";oe[r]=n}function V(e){me[e]=me[e]||function(t){return arguments.length?(ge[e]=t,me):ge[e]}}function $(e){function t(t,n){this.tgt=e.getTgt(t,n),n.map=this}return se(e)&&(e={getTgt:e}),e.baseMap&&(e=d(d({},e.baseMap),e)),e.map=function(e,n){return new t(e,n)},e}function O(e,t,n,r,i,o){var a,s,l,d,p,u,c,f,g=r,v="";if(t===!0?(n=t,t=void 0):typeof t!==Le&&(t=void 0),(l=this.tag)?(p=this,g=g||p.view,d=g._getTmpl(l.template||p.tmpl),arguments.length||(e=l.contentCtx&&se(l.contentCtx)?e=l.contentCtx(e):g)):d=this,d){if(!r&&e&&"view"===e._is&&(g=e),g&&e===g&&(e=g.data),u=!g,ke=ke||u,g||((t=t||{}).root=e),!ke||ve.useViews||d.useViews||g&&g!==ie)v=E(d,e,t,n,g,i,o,l);else{if(g?(c=g.data,f=g.index,g.index=He):(g=ie,c=g.data,g.data=e,g.ctx=t),le(e)&&!n)for(a=0,s=e.length;a<s;a++)g.index=a,g.data=e[a],v+=d.fn(e[a],g,fe);else g.data=e,v+=d.fn(e,g,fe);g.data=c,g.index=f}u&&(ke=void 0)}return v}function E(e,t,n,r,i,o,a,s){function l(e){x=d({},n),x[b]=e}var p,u,c,f,g,v,m,h,_,b,x,w,y,C="";if(s&&(_=s.tagName,w=s.tagCtx,n=n?Q(n,s.ctx):s.ctx,e===i.content?m=e!==i.ctx._wrp?i.ctx._wrp:void 0:e!==w.content?e===s.template?(m=w.tmpl,n._wrp=w.content):m=w.content||i.content:m=i.content,w.props.link===!1&&(n=n||{},n.link=!1),(b=w.props.itemVar)&&("~"!==b[0]&&D("Use itemVar='~myItem'"),b=b.slice(1))),i&&(a=a||i._.onRender,y=n&&n.link===!1,y&&i._.nl&&(a=void 0),n=Q(n,i.ctx)),o===!0&&(v=!0,o=0),a&&s&&s._.noVws&&(a=void 0),h=a,a===!0&&(h=void 0,a=i._.onRender),n=e.helpers?Q(e.helpers,n):n,x=n,le(t)&&!r)for(c=v?i:void 0!==o&&i||new k(n,"array",i,t,e,o,a,m),c._.nl=y,i&&i._.useKey&&(c._.bnd=!s||s._.bnd&&s,c.tag=s),p=0,u=t.length;p<u;p++)b&&l(t[p]),f=new k(x,"item",c,t[p],e,(o||0)+p,a,c.content),f._.it=b,g=e.fn(t[p],f,fe),C+=c._.onRender?c._.onRender(g,f):g;else b&&l(t),c=v?i:new k(x,_||"data",i,t,e,o,a,m),c._.it=b,c.tag=s,c._.nl=y,C+=e.fn(t,c,fe);return s&&(c.tagElse=w.index,w.contentView=c),h?h(C,c):C}function I(e,t,n){var r=void 0!==n?se(n)?n.call(t.data,e,t):n||"":"{Error: "+(e.message||e)+"}";return ge.onError&&void 0!==(n=ge.onError.call(t.data,e,n&&r,t))&&(r=n),t&&!t._lc?pe.html(r):r}function S(e){throw new fe.Err(e)}function D(e){S("Syntax error\n"+e)}function J(e,t,n,r,i){function o(t){t-=v,t&&h.push(e.substr(v,t).replace(je,"\\n"))}function a(t,n){t&&(t+="}}",D((n?"{{"+n+"}} block has {{/"+t+" without {{"+t:"Unmatched or missing {{/"+t)+", in template:\n"+e))}function s(s,l,d,c,g,b,x,w,y,k,C,T){(x&&l||y&&!d||w&&":"===w.slice(-1)||k)&&D(s),b&&(g=":",c=Ke),y=y||n&&!i;var j,A,P,R=(l||n)&&[[]],N="",M="",F="",V="",$="",O="",E="",I="",S=!y&&!g;d=d||(w=w||"#data",g),o(T),v=T+s.length,x?f&&h.push(["*","\n"+w.replace(/^:/,"ret+= ").replace(Ae,"$1")+";\n"]):d?("else"===d&&(Ne.test(w)&&D('For "{{else if expr}}" use "{{else expr}}"'),R=_[9]&&[[]],_[10]=e.substring(_[10],T),A=_[11]||_[0]||D("Mismatched: "+s),_=m.pop(),h=_[2],S=!0),w&&L(w.replace(je," "),R,t,n).replace(Re,function(e,t,n,r,i,o,a,s){return"this:"===r&&(o="undefined"),s&&(P=P||"@"===s[0]),r="'"+i+"':",a?(M+=n+o+",",V+="'"+s+"',"):n?(F+=r+"j._cp("+o+',"'+s+'",view),',O+=r+"'"+s+"',"):t?E+=o:("trigger"===i&&(I+=o),"lateRender"===i&&(j="false"!==s),N+=r+o+",",$+=r+"'"+s+"',",u=u||$e.test(i)),""}).slice(0,-1),R&&R[0]&&R.pop(),p=[d,c||!!r||u||"",S&&[],q(V||(":"===d?"'#data',":""),$,O),q(M||(":"===d?"data,":""),N,F),E,I,j,P,R||0],h.push(p),S&&(m.push(_),_=p,_[10]=v,_[11]=A)):C&&(a(C!==_[0]&&C!==_[11]&&C,_[0]),_[10]=e.substring(_[10],T),_=m.pop()),a(!_&&C),h=_[2]}var l,d,p,u,c,f=ge.allowCode||t&&t.allowCode||me.allowCode===!0,g=[],v=0,m=[],h=g,_=[,,g];if(f&&t._is&&(t.allowCode=f),n&&(void 0!==r&&(e=e.slice(0,-r.length-2)+be),e=he+e+xe),a(m[0]&&m[0][2].pop()[0]),e.replace(re,s),o(e.length),(v=g[g.length-1])&&a(""+v!==v&&+v[10]===v[10]&&v[0]),n){for(d=B(g,e,n),c=[],l=g.length;l--;)c.unshift(g[l][9]);U(d,c)}else d=B(g,t);return d}function U(e,t){var n,r,i=0,o=t.length;for(e.deps=[],e.paths=[];i<o;i++){e.paths.push(r=t[i]);for(n in r)"_jsvto"!==n&&r.hasOwnProperty(n)&&r[n].length&&!r[n].skp&&(e.deps=e.deps.concat(r[n]))}}function q(e,t,n){return[e.slice(0,-1),t.slice(0,-1),n.slice(0,-1)]}function K(e,t){return"\n\t"+(t?t+":{":"")+"args:["+e[0]+"],\n\tprops:{"+e[1]+"}"+(e[2]?",\n\tctx:{"+e[2]+"}":"")}function L(e,t,n,r){function i(i,p,b,x,w,y,k,C,T,j,A,P,R,N,M,F,V,$,O,E,I){function S(e,n,i,s,l,d,p,f){var g="."===i;if(i&&(w=w.slice(n.length),/^\.?constructor$/.test(f||w)&&D(e),g||(e=(j?(r?"":"(ltOb.lt=ltOb.lt||")+"(ob=":"")+(s?'view.ctxPrm("'+s+'")':l?"view":"data")+(j?")===undefined"+(r?"":")")+'?"":view._getOb(ob,"':"")+(f?(d?"."+d:s?"":l?"":"."+i)+(p||""):(f=s?"":l?d||"":i,"")),e+=f?"."+f:"",e=n+("view.data"===e.slice(0,9)?e.slice(5):e)+(j?(r?'"':'",ltOb')+(A?",1)":")"):"")),u)){if(K="_linkTo"===o?a=t._jsvto=t._jsvto||[]:c.bd,L=g&&K[K.length-1]){if(L._cpfn){for(;L.sb;)L=L.sb;L.bnd&&(w="^"+w.slice(1)),L.sb=w,L.bnd=L.bnd||"^"===w[0]}}else K.push(w);_[m]=E+(g?1:0)}return e}x&&!C&&(w=x+w),y=y||"",b=b||p||R,w=w||T,j&&(j=!/\)|]/.test(I[E-1]))&&(w=w.slice(1).split(".").join("^")),A=A||$||"";var U,q,K,L,B,Q=")";if("["===A&&(A="[j._sq(",Q=")]"),!k||d||l){if(u&&V&&!d&&!l&&m&&(U=_[m-1],I.length-1>E-(U||0))){if(U=I.slice(U,E+i.length),q!==!0)if(K=a||f[m-1].bd,L=K[K.length-1],L&&L.prm){for(;L.sb&&L.sb.prm;)L=L.sb;B=L.sb={path:L.sb,bnd:L.bnd}}else K.push(B={path:K.pop()});V=_e+":"+U+" onerror=''"+be,q=v[V],q||(v[V]=!0,v[V]=q=J(V,n,!0)),q!==!0&&B&&(B._cpfn=q,B.prm=c.bd,B.bnd=B.bnd||B.path&&B.path.indexOf("^")>=0)}return d?(d=!N,d?i:R+'"'):l?(l=!M,l?i:R+'"'):(b?(_[m]=E++,c=f[++m]={bd:[]},b):"")+(O?m?"":(g=I.slice(g,E),(o?(o=s=a=!1,"\b"):"\b,")+g+(g=E+i.length,u&&t.push(c.bd=[]),"\b")):C?(m&&D(e),u&&t.pop(),o="_"+w,s=x,g=E+i.length,u&&(u=c.bd=t[o]=[],u.skp=!x),w+":"):w?w.split("^").join(".").replace(fe.rPath,S)+(A?(c=f[++m]={bd:[]},h[m]=Q,A):y):y?y:F?(F=h[m]||F,h[m]=!1,c=f[--m],F+(A?(c=f[++m],h[m]=Q,A):"")):P?(h[m]||D(e),","):p?"":(d=N,l=M,'"'))}D(e)}var o,a,s,l,d,p,u=t&&t[0],c={bd:u},f={0:c},g=0,v=(n?n.links:u&&(u.links=u.links||{}))||ie.tmpl.links,m=0,h={},_={};return"@"===e[0]&&(e=e.replace(De,".")),p=(e+(n?" ":"")).replace(fe.rPrm,i),!m&&p||D(e)}function B(e,t,n){var r,i,o,a,s,l,d,p,u,c,f,g,v,m,h,_,b,x,w,y,k,C,T,j,A,P,R,N,F,V,$,O,E,I=0,S=ve.useViews||t.useViews||t.tags||t.templates||t.helpers||t.converters,J="",q={},L=e.length;for(""+t===t?(x=n?'data-link="'+t.replace(je," ").slice(1,-1)+'"':t,t=0):(x=t.tmplName||"unnamed",t.allowCode&&(q.allowCode=!0),t.debug&&(q.debug=!0),f=t.bnds,b=t.tmpls),r=0;r<L;r++)if(i=e[r],""+i===i)J+='\n+"'+i+'"';else if(o=i[0],"*"===o)J+=";\n"+i[1]+"\nret=ret";else{if(a=i[1],k=!n&&i[2],s=K(i[3],"params")+"},"+K(v=i[4]),V=i[6],$=i[7],i[8]?(O="\nvar ob,ltOb={},ctxs=",E=";\nctxs.lt=ltOb.lt;\nreturn ctxs;"):(O="\nreturn ",E=""),C=i[10]&&i[10].replace(Ae,"$1"),(A="else"===o)?g&&g.push(i[9]):(N=i[5]||ge.debugMode!==!1&&"undefined",f&&(g=i[9])&&(g=[g],I=f.push(1))),S=S||v[1]||v[2]||g||/view.(?!index)/.test(v[0]),(P=":"===o)?a&&(o=a===Ke?">":a+o):(k&&(w=M(C,q),w.tmplName=x+"/"+o,w.useViews=w.useViews||S,B(k,w),S=w.useViews,b.push(w)),A||(y=o,S=S||o&&(!ce[o]||!ce[o].flow),j=J,J=""),T=e[r+1],T=T&&"else"===T[0]),F=N?";\ntry{\nret+=":"\n+",m="",h="",P&&(g||V||a&&a!==Ke||$)){if(R=new Function("data,view,j,u","// "+x+" "+ ++I+" "+o+O+"{"+s+"};"+E),R._er=N,R._tag=o,R._bd=!!g,R._lr=$,n)return R;U(R,g),_='c("'+a+'",view,',c=!0,m=_+I+",",h=")"}if(J+=P?(n?(N?"try{\n":"")+"return ":F)+(c?(c=void 0,S=u=!0,_+(R?(f[I-1]=R,I):"{"+s+"}")+")"):">"===o?(d=!0,"h("+v[0]+")"):(p=!0,"((v="+v[0]+")!=null?v:"+(n?"null)":'"")'))):(l=!0,"\n{view:view,content:false,tmpl:"+(k?b.length:"false")+","+s+"},"),y&&!T){if(J="["+J.slice(0,-1)+"]",_='t("'+y+'",view,this,',n||g){if(J=new Function("data,view,j,u"," // "+x+" "+I+" "+y+O+J+E),J._er=N,J._tag=y,g&&U(f[I-1]=J,g),J._lr=$,n)return J;m=_+I+",undefined,",h=")"}J=j+F+_+(g&&I||J)+")",g=0,y=0}N&&!T&&(S=!0,J+=";\n}catch(e){ret"+(n?"urn ":"+=")+m+"j._err(e,view,"+N+")"+h+";}"+(n?"":"ret=ret"))}J="// "+x+(q.debug?"\ndebugger;":"")+"\nvar v"+(l?",t=j._tag":"")+(u?",c=j._cnvt":"")+(d?",h=j._html":"")+(n?(i[8]?", ob":"")+";\n":',ret=""')+J+(n?"\n":";\nreturn ret;");try{J=new Function("data,view,j,u",J)}catch(Q){D("Compiled template code:\n\n"+J+'\n: "'+(Q.message||Q)+'"')}return t&&(t.fn=J,t.useViews=!!S),J}function Q(e,t){return e&&e!==t?t?d(d({},t),e):e:t&&d({},t)}function H(e,n){var r,i,o=n.map,a=o&&o.propsArr;if(!a){if(a=[],typeof e===Le||se(e))for(r in e)i=e[r],r===ae||!e.hasOwnProperty(r)||n.props.noFunctions&&t.isFunction(i)||a.push({key:r,prop:i});o&&(o.propsArr=o.options&&a)}return W(a,n)}function W(e,n){var r,i,o,a=n.tag,s=n.props,l=n.params.props,d=s.filter,p=s.sort,u=p===!0,c=parseInt(s.step),f=s.reverse?-1:1;if(!le(e))return e;if(u||p&&""+p===p?(r=e.map(function(e,t){return e=u?e:g(e,p),{i:t,v:""+e===e?e.toLowerCase():e}}),r.sort(function(e,t){return e.v>t.v?f:e.v<t.v?-f:0}),e=r.map(function(t){return e[t.i]})):(p||f<0)&&!a.dataMap&&(e=e.slice()),se(p)&&(e=e.sort(function(){return p.apply(n,arguments)})),f<0&&(!p||se(p))&&(e=e.reverse()),e.filter&&d&&(e=e.filter(d,n),n.tag.onFilter&&n.tag.onFilter(n)),l.sorted&&(r=p||f<0?e:e.slice(),a.sorted?t.observable(a.sorted).refresh(r):n.map.sorted=r),i=s.start,o=s.end,(l.start&&void 0===i||l.end&&void 0===o)&&(i=o=0),isNaN(i)&&isNaN(o)||(i=+i||0,o=void 0===o||o>e.length?e.length:+o,e=e.slice(i,o)),c>1){for(i=0,o=e.length,r=[];i<o;i+=c)r.push(e[i]);e=r}return l.paged&&a.paged&&$observable(a.paged).refresh(e),e}function Z(e,n,r){var i=this.jquery&&(this[0]||S("Unknown template")),o=i.getAttribute(Be);return O.call(o&&t.data(i)[Qe]||de(i),e,n,r)}function z(e){return Ue[e]||(Ue[e]="&#"+e.charCodeAt(0)+";")}function G(e,t){return qe[t]||""}function X(e){return void 0!=e?Ve.test(e)&&(""+e).replace(Ee,z)||e:""}function Y(e){return""+e===e?e.replace(Ie,z):e}function ee(e){return""+e===e?e.replace(Se,G):e}var te=t===!1;t=t&&t.fn?t:e.jQuery;var ne,re,ie,oe,ae,se,le,de,pe,ue,ce,fe,ge,ve,me,he,_e,be,xe,we,ye,ke,Ce="v1.0.3",Te="_ocp",je=/[ \t]*(\r\n|\n|\r)/g,Ae=/\\(['"])/g,Pe=/['"\\]/g,Re=/(?:\x08|^)(onerror:)?(?:(~?)(([\w$.]+):)?([^\x08]+))\x08(,)?([^\x08]+)/gi,Ne=/^if\s/,Me=/<(\w+)[>\s]/,Fe=/[\x00`><"'&=]/g,Ve=/[\x00`><\"'&=]/,$e=/^on[A-Z]|^convert(Back)?$/,Oe=/^\#\d+_`[\s\S]*\/\d+_`$/,Ee=Fe,Ie=/[&<>]/g,Se=/&(amp|gt|lt);/g,De=/\[['"]?|['"]?\]/g,Je=0,Ue={"&":"&amp;","<":"&lt;",">":"&gt;","\0":"&#0;","'":"&#39;",'"':"&#34;","`":"&#96;","=":"&#61;"},qe={amp:"&",gt:">",lt:"<"},Ke="html",Le="object",Be="data-jsv-tmpl",Qe="jsvTmpl",He="For #index in nested block use #getIndex().",We={},Ze=e.jsrender,ze=Ze&&t&&!t.render,Ge={template:{compile:A},tag:{compile:T},viewModel:{compile:N},helper:{},converter:{}};if(oe={jsviews:Ce,sub:{rPath:/^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,rPrm:/(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(~?[\w$.^]+)?\s*((\+\+|--)|\+|-|~(?![\w$])|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?(@)?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=[.^]|\s*$|[^([])|[)\]])([([]?))|(\s+)/g,View:k,Err:l,tmplFn:J,parse:L,extend:d,extendCtx:Q,syntaxErr:D,onStore:{template:function(e,t){null===t?delete We[e]:e&&(We[e]=t)}},addSetting:V,settings:{allowCode:!1},advSet:a,_thp:i,_gm:r,_tg:function(){},_cnvt:h,_tag:y,_er:S,_err:I,_cp:o,_sq:function(e){return"constructor"===e&&D(""),e}},settings:{delimiters:p,advanced:function(e){return e?(d(ve,e),fe.advSet(),me):ve}},map:$},(l.prototype=new Error).constructor=l,c.depends=function(){return[this.get("item"),"index"]},f.depends="index",k.prototype={get:u,getIndex:f,ctxPrm:v,getRsc:w,_getTmpl:m,_getOb:g,_is:"view"},fe=oe.sub,me=oe.settings,!(Ze||t&&t.render)){for(ne in Ge)F(ne,Ge[ne]);if(pe=oe.converters,ue=oe.helpers,ce=oe.tags,fe._tg.prototype={baseApply:j,cvtArgs:_,bndArgs:x,ctxPrm:v},ie=fe.topView=new k,t){if(t.fn.render=Z,ae=t.expando,t.observable){if(Ce!==(Ce=t.views.jsviews))throw"JsObservable requires JsRender "+Ce;d(fe,t.views.sub),oe.map=t.views.map}}else t={},te&&(e.jsrender=t),t.renderFile=t.__express=t.compile=function(){throw"Node.js: use npm jsrender, or jsrender-node.js"},t.isFunction=function(e){return"function"==typeof e},t.isArray=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},fe._jq=function(e){e!==t&&(d(e,t),t=e,t.fn.render=Z,delete t.jsrender,ae=t.expando)},t.jsrender=Ce;ge=fe.settings,ge.allowCode=!1,se=t.isFunction,t.render=We,t.views=oe,t.templates=de=oe.templates;for(ye in ge)V(ye);(me.debugMode=function(e){return void 0===e?ge.debugMode:(ge.debugMode=e,ge.onError=e+""===e?function(){return e}:se(e)?e:void 0,me)})(!1),ve=ge.advanced={useViews:!1,_jsv:!1},ce({"if":{render:function(e){var t=this,n=t.tagCtx,r=t.rendering.done||!e&&(n.args.length||!n.index)?"":(t.rendering.done=!0,void(t.selected=n.index));return r},contentCtx:!0,flow:!0},"for":{sortDataMap:$(W),init:function(e,t){this.setDataMap(this.tagCtxs)},render:function(e){var t,n,r,i,o,a=this,s=a.tagCtx,l=s.argDefault===!1,d=s.props,p=l||s.args.length,u="",c=0;if(!a.rendering.done){if(t=p?e:s.view.data,l)for(l=d.reverse?"unshift":"push",i=+d.end,o=+d.step||1,t=[],r=+d.start||0;(i-r)*o>0;r+=o)t[l](r);void 0!==t&&(n=le(t),u+=s.render(t,!p||d.noIteration),c+=n?t.length:1),(a.rendering.done=c)&&(a.selected=s.index)}return u},setDataMap:function(e){for(var t,n,r,i=this,o=e.length;o--;)t=e[o],n=t.props,r=t.params.props,t.argDefault=void 0===n.end||t.args.length>0,n.dataMap=t.argDefault!==!1&&le(t.args[0])&&(r.sort||r.start||r.end||r.step||r.filter||r.reverse||n.sort||n.start||n.end||n.step||n.filter||n.reverse)&&i.sortDataMap},flow:!0},props:{baseTag:"for",dataMap:$(H),init:a,flow:!0},include:{flow:!0},"*":{render:o,flow:!0},":*":{render:o,flow:!0},dbg:ue.dbg=pe.dbg=s}),pe({html:X,attr:X,encode:Y,unencode:ee,url:function(e){return void 0!=e?encodeURI(""+e):null===e?e:""}})}return ge=fe.settings,le=(t||Ze).isArray,me.delimiters("{{","}}","^"),ze&&Ze.views.sub._jq(t),t||Ze},window);
//# sourceMappingURL=jsrender.min.js.map