You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

3 lines
17 KiB

2 years ago
  1. /*! JsRender v0.9.71 (Beta): http://jsviews.com/#jsrender */
  2. /*! **VERSION FOR WEB** (For NODE.JS see http://jsviews.com/download/jsrender-node.js) */
  3. !function(e){var t=(0,eval)("this"),n=t.jQuery;"function"==typeof define&&define.amd?define(e):"object"==typeof exports?module.exports=n?e(n):function(t){if(t&&!t.fn)throw"Provide jQuery or null";return e(t)}:e(!1)}(function(e){"use strict";function t(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 n(e,n){return G(n)&&(n=t(e?e._d?e:t(a,e):a,n),n._d=1),n}function r(e,t){for(var r in t.props)_e.test(r)&&(e[r]=n(e[r],t.props[r]))}function i(e){return e}function a(){return""}function s(e){try{throw"dbg breakpoint"}catch(t){}return this.base?this.baseApply(arguments):e}function o(e){re._dbgMode=e!==!1}function d(t){this.name=(e.link?"JsViews":"JsRender")+" Error",this.message=t||this.name}function p(e,t){var n;for(n in t)e[n]=t[n];return e}function l(e,t,n){return(0!==this||e)&&(se=e?e.charAt(0):se,oe=e?e.charAt(1):oe,de=t?t.charAt(0):de,pe=t?t.charAt(1):pe,le=n||le,e="\\"+se+"(\\"+le+")?\\"+oe,t="\\"+de+"\\"+pe,D="(?:(\\w+(?=[\\/\\s\\"+de+"]))|(\\w+)?(:)|(>)|(\\*))\\s*((?:[^\\"+de+"]|\\"+de+"(?!\\"+pe+"))*?)(:\\w*)?",ne.rTag="(?:"+D+")",D=new RegExp("(?:"+e+D+"(\\/)?|\\"+se+"\\"+oe+"(?:(?:\\/(\\w+))|!--[\\s\\S]*?--))"+t,"g"),P=new RegExp("<.*>|([^\\\\]|^)[{}]|"+e+".*"+t)),[se,oe,de,pe,le]}function u(e,t){t||e===!0||(t=e,e=void 0);var n,r,i,a,s=this,o=!t||"root"===t;if(e){if(a=t&&s.type===t&&s,!a)if(n=s.views,s._.useKey){for(r in n)if(a=t?n[r].get(e,t):n[r])break}else for(r=0,i=n.length;!a&&i>r;r++)a=t?n[r].get(e,t):n[r]}else if(o)for(;s.parent;)a=s,s=s.parent;else for(;s&&!a;)a=s.type===t?s:void 0,s=s.parent;return a}function c(){var e=this.get("item");return e?e.index:void 0}function f(){return this.index}function g(e){var t,n=this,r=n.linkCtx,i=(n.ctx||{})[e];return void 0===i&&r&&r.ctx&&(i=r.ctx[e]),void 0===i&&(i=ee[e]),i&&G(i)&&!i._wrp&&(t=function(){return i.apply(this&&this!==L?this:n,arguments)},t._wrp=n,p(t,i)),t||i}function v(e){return e&&(e.fn?e:this.getRsc("templates",e)||X(e))}function m(e,t,n,i){var a,s,o="number"==typeof n&&t.tmpl.bnds[n-1],d=t.linkCtx;return void 0!==i?n=i={props:{},args:[i]}:o&&(n=o(t.data,t,z)),s=n.args[0],(e||o)&&(a=d&&d.tag,a||(a=p(new ne._tg,{_:{inline:!d,bnd:o,unlinked:!0},tagName:":",cvt:e,flow:!0,tagCtx:n}),d&&(d.tag=a,a.linkCtx=d),n.ctx=K(n.ctx,(d?d.view:t).ctx)),a._er=i&&s,r(a,n),n.view=t,a.ctx=n.ctx||{},n.ctx=void 0,s=a.cvtArgs(a.convert||"true"!==e&&e)[0],s=o&&t._.onRender?t._.onRender(s,t,a):s),void 0!=s?s:""}function h(e){var t=this,n=t.tagCtx,r=n.view,i=n.args;return e=t.convert||e,e=e&&(""+e===e?r.getRsc("converters",e)||M("Unknown converter: '"+e+"'"):e),i=i.length||n.index?e?i.slice():i:[r.data],e&&(e.depends&&(t.depends=ne.getDeps(t.depends,t,e.depends,e)),i[0]=e.apply(t,i)),i}function w(e,t){for(var n,r,i=this;void 0===n&&i;)r=i.tmpl&&i.tmpl[e],n=r&&r[t],i=i.parent;return n||z[e][t]}function x(e,t,n,i,a,s){t=t||Z;var o,d,p,l,u,c,f,g,v,m,h,w,x,b,_,y,k,j,C,T="",A=t.linkCtx||0,V=t.ctx,$=n||t.tmpl,N="number"==typeof i&&t.tmpl.bnds[i-1];for("tag"===e._is?(o=e,e=o.tagName,i=o.tagCtxs,p=o.template):(d=t.getRsc("tags",e)||M("Unknown tag: {{"+e+"}} "),p=d.template),void 0!==s?(T+=s,i=s=[{props:{},args:[]}]):N&&(i=N(t.data,t,z)),g=i.length,f=0;g>f;f++)m=i[f],(!A||!A.tag||f&&!A.tag._.inline||o._er)&&((w=$.tmpls&&m.tmpl)&&(w=m.content=$.tmpls[w-1]),m.index=f,m.tmpl=w,m.render=R,m.view=t,m.ctx=K(m.ctx,V)),(n=m.props.tmpl)&&(m.tmpl=t.getTmpl(n)),o||(o=new d._ctr,x=!!o.init,o.parent=c=V&&V.tag,o.tagCtxs=i,C=o.dataMap,A&&(o._.inline=!1,A.tag=o,o.linkCtx=A),(o._.bnd=N||A.fn)?o._.arrVws={}:o.dataBoundOnly&&M("{^{"+e+"}} tag must be data-bound")),i=o.tagCtxs,C=o.dataMap,m.tag=o,C&&i&&(m.map=i[f].map),o.flow||(h=m.ctx=m.ctx||{},l=o.parents=h.parentTags=V&&K(h.parentTags,V.parentTags)||{},c&&(l[c.tagName]=c),l[o.tagName]=h.tag=o);if(!(o._er=s)){for(r(o,i[0]),o.rendering={},f=0;g>f;f++)m=o.tagCtx=i[f],k=m.props,y=o.cvtArgs(),(b=k.dataMap||C)&&(y.length||k.dataMap)&&(_=m.map,(!_||_.src!==y[0]||a)&&(_&&_.src&&_.unmap(),_=m.map=b.map(y[0],k,void 0,!o._.bnd)),y=[_.tgt]),o.ctx=m.ctx,f||(x&&(j=o.template,o.init(m,A,o.ctx),x=void 0),A&&(A.attr=
  4. //# sourceMappingURL=jsrender.min.js.map