diff --git a/jquery.observable.js b/jquery.observable.js index 055eab7..8ee6e4e 100644 --- a/jquery.observable.js +++ b/jquery.observable.js @@ -1,4 +1,4 @@ -/*! JsObservable v0.9.89 (Beta): http://jsviews.com/#jsobservable */ +/*! JsObservable v0.9.90 (Beta): http://jsviews.com/#jsobservable */ /* * Subcomponent of JsViews * Data change events for data-linking @@ -44,7 +44,7 @@ if (!$ || !$.fn) { throw "JsObservable requires jQuery"; // We require jQuery } -var versionNumber = "v0.9.89", +var versionNumber = "v0.9.90", _ocp = "_ocp", // Observable contextual parameter $observe, $observable, @@ -136,11 +136,11 @@ if (!$.observe) { for (i = 0; i < l; i++) { path = paths[i]; - if ($isFunction(path)) { - rt = root._ocp - ? root.view.data // observable contextual parameter - : root; - out = out.concat(dependsPaths(path.call(rt, rt, callback), root, callback)); + if ($isFunction(path)) { // path is a depends function, returning [path1, ...] + rt = root.tagName + ? root.linkCtx.data // root is tag instance. rt is current data context of tag + : root; // rt = root = current data context of computed prop + out = out.concat(dependsPaths(path.call(root, rt, callback), rt, callback)); continue; } else if ("" + path !== path) { root = nextObj = path; @@ -451,7 +451,7 @@ if (!$.observe) { function bindArray(arr, unbind, isArray, relPath) { if (allowArray) { - // allowArray is 1 if this is a call to observe that does not come from observeAndBind (tag binding), or is from a `depends` path, + // allowArray is 1 if this is a call to observe that does not come from observeAndBind (tag binding), or is from a 'depends' path, // so we allow arrayChange binding. Otherwise allowArray is zero. var prevObj = object, prevAllPath = allPath; @@ -484,7 +484,6 @@ if (!$.observe) { object = root, l = paths.length; - origRoots.unshift(root); if (lastArg + "" === lastArg) { // If last arg is a string then this observe call is part of an observeAll call, allPath = lastArg; // and the last three args are the parentObs array, the filter, and the allPath string. parentObs = paths.pop(); @@ -509,7 +508,6 @@ if (!$.observe) { } if (unobserve && callback && !callback._cId) { - origRoots.shift(); return; } @@ -703,7 +701,7 @@ if (!$.observe) { if (dep = prop.depends) { // This is a computed observable. We will observe any declared dependencies. // Pass {_ar: ...} objects to switch on allowArray, for depends paths, then return to contextual allowArray value - innerObserve([object._ocp ? object.view.data : object], dependsPaths(dep, object, callback), callback, contextCb, unobserve); + innerObserve([object], dependsPaths(dep, object, callback), callback, contextCb, unobserve); } break; } @@ -717,7 +715,6 @@ if (!$.observe) { } // Return the cbBindings to the top-level caller, along with the cbId - origRoots.shift(); return {cbId: cbId, bnd: cbBindings, s: cbBindingsStore}; } @@ -726,8 +723,7 @@ if (!$.observe) { // arrayChange events in this scenario. Instead, {^{for}} and similar do specific arrayChange binding to the tagCtx.args[0] value, in onAfterLink. // Note deliberately using this == 1, rather than this === 1 because of IE<10 bug- see jsviews/issues/237 paths = slice.call(arguments), - origRoot = paths[0], - origRoots = [origRoot]; + origRoot = paths[0]; if (origRoot + "" === origRoot && allowArray) { initialNs = origRoot; // The first arg is a namespace, since it is a string, and this call is not from observeAndBind diff --git a/jquery.observable.min.js b/jquery.observable.min.js index d0edc91..f268f51 100644 --- a/jquery.observable.min.js +++ b/jquery.observable.min.js @@ -1,3 +1,3 @@ -/*! JsObservable v0.9.89 (Beta): http://jsviews.com/#jsobservable */ -!function(t,e){var n=e.jQuery;"object"==typeof exports?module.exports=n?t(e,n):function(n){return t(e,n)}:"function"==typeof define&&define.amd?define(["jquery"],function(n){return t(e,n)}):t(e,!1)}(function(t,e){"use strict";var n=e===!1;if(e=e||t.jQuery,!e||!e.fn)throw"JsObservable requires jQuery";var r,i,o="v0.9.89",s="_ocp",a=e.views=e.views||n&&t.jsrender&&jsrender.views||{jsviews:o,sub:{settings:{}},settings:{advanced:function(t){return l=f.advanced=f.advanced||{_jsv:!0},t?("_jsv"in t&&(l._jsv=t._jsv),c.advSet(),a.settings):l}}},c=a.sub,f=c.settings,l=f.advanced,u=e.isFunction,p=e.expando,d=e.isArray,h="object";if(!e.observe){var v=e.event.special,_=[].slice,g=[].splice,b=[].concat,y=parseInt,m=/\S+/g,I=c.propChng=c.propChng||"propertyChange",j=c.arrChng=c.arrChng||"arrayChange",w={},A=I+".observe",x=1,F=1,P=1,S=e.hasData,k=e.data,C={},O=function(t){return t._cId=t._cId||".obs"+F++},T=function(t,e){return this._data=e,this._ns=t,this},V=function(t,e){return this._data=e,this._ns=t,this},D=function(t){return d(t)?[t]:t},H=function(t,e,n){t=t?d(t)?t:[t]:[];var r,i,o,s,a=o=e,c=t&&t.length,f=[];for(r=0;r1;)c=c[o.shift()];c&&a._setProperty(c,o[0],e,n)}return a},removeProperty:function(t){return this.setProperty(t,C),this},_setProperty:function(t,e,n,r){var i,o,s,a=e?t[e]:t;u(a)&&a.set&&(t=t._vw||t,o=a,i=o.set===!0?o:o.set,a=o.call(t)),(a!==n||r&&a!=n)&&(!(a instanceof Date&&n instanceof Date)||a>n||a-1&&(e=d(e)?e:[e],e.length&&this._insert(t,e)),this},_insert:function(t,e){var n=this._data,r=n.length;t>r&&(t=r),g.apply(n,[t,0].concat(e)),this._trigger({change:"insert",index:t,items:e},r)},remove:function(t,e){var n,r=this._data;return void 0===t&&(t=r.length-1),t=y(t),e=e?y(e):0===e?0:1,e>0&&t>-1&&(n=r.slice(t,t+e),(e=n.length)&&this._remove(t,e,n)),this},_remove:function(t,e,n){var r=this._data,i=r.length;r.splice(t,e),this._trigger({change:"remove",index:t,items:n},i)},move:function(t,e,n){return n=n?y(n):0===n?0:1,t=y(t),e=y(e),n>0&&t>-1&&e>-1&&t!==e&&this._move(t,e,n),this},_move:function(t,e,n){var r,i=this._data,o=i.length,s=t+n-o;s>0&&(n-=s),n&&(r=i.splice(t,n),e>i.length&&(e=i.length),g.apply(i,[e,0].concat(r)),e!==t&&this._trigger({change:"move",oldIndex:t,index:e,items:r},o))},refresh:function(t){function e(){i&&(a.insert(r-i,c),p+=i,n+=i,i=0,c=[])}var n,r,i,o,s,a=this,c=[],f=a._data,l=f.slice(),u=f.length,p=u,d=t.length;for(a._srt=!0,r=i=0;rr&&a.remove(r,p-r),a._srt=void 0,a._trigger({change:"refresh",oldItems:l},u),a},_trigger:function(t,n){var r=this,i=r._data,o=i.length,s=e([i]);r._srt?t.refresh=!0:o!==n&&s.triggerHandler(I,{change:"set",path:"length",value:o,oldValue:n}),s.triggerHandler(j+(r._ns?"."+/^\S+/.exec(r._ns)[0]:""),t)}},v[I]=v[j]={remove:function(t){var n,r,i,o,s,a=t.data;if(a&&(a.off=!0,a=a.cb)&&(n=w[a._cId])){for(i=e._data(this).events[t.type],o=i.length;o--&&!r;)r=(s=i[o].data)&&s.cb&&s.cb._cId===a._cId;r||(delete n[k(this).obId],Q(n,a._cId))}}},a.map=function(t){function n(e,n,r,o){var s,a=this;this.src&&this.unmap(),typeof e===h&&(a.src=e,a.tgt=r||a.tgt||[],a.options=n||a.options,a.update(),o||(t.obsSrc&&i(a.src).observeAll(a.obs=function(e,n){s||(s=!0,t.obsSrc(a,e,n),s=void 0)},a.srcFlt),t.obsTgt&&i(a.tgt).observeAll(a.obt=function(e,n){s||(s=!0,t.obsTgt(a,e,n),s=void 0)},a.tgtFlt)))}return u(t)&&(t={getTgt:t}),t.baseMap&&(t=e.extend({},t.baseMap,t)),t.map=function(t,e,r,i){return new n(t,e,r,i)},(n.prototype={srcFlt:t.srcFlt||E,tgtFlt:t.tgtFlt||E,update:function(e){var n=this;i(n.tgt).refresh(t.getTgt(n.src,n.options=e||n.options))},unmap:function(){var t=this;t.src&&(t.obs&&i(t.src).unobserveAll(t.obs,t.srcFlt),t.obt&&i(t.tgt).unobserveAll(t.obt,t.tgtFlt),t.src=void 0)},map:n,_def:t}).constructor=n,t},c.advSet=function(){c._gccb=this._gccb,t._jsv=f.advanced._jsv?{cbBindings:w}:void 0},c._dp=H}return e},window); +/*! JsObservable v0.9.90 (Beta): http://jsviews.com/#jsobservable */ +!function(t,e){var n=e.jQuery;"object"==typeof exports?module.exports=n?t(e,n):function(n){return t(e,n)}:"function"==typeof define&&define.amd?define(["jquery"],function(n){return t(e,n)}):t(e,!1)}(function(t,e){"use strict";var n=e===!1;if(e=e||t.jQuery,!e||!e.fn)throw"JsObservable requires jQuery";var r,i,o="v0.9.90",s="_ocp",a=e.views=e.views||n&&t.jsrender&&jsrender.views||{jsviews:o,sub:{settings:{}},settings:{advanced:function(t){return f=l.advanced=l.advanced||{_jsv:!0},t?("_jsv"in t&&(f._jsv=t._jsv),c.advSet(),a.settings):f}}},c=a.sub,l=c.settings,f=l.advanced,u=e.isFunction,p=e.expando,d=e.isArray,h="object";if(!e.observe){var v=e.event.special,_=[].slice,g=[].splice,b=[].concat,y=parseInt,m=/\S+/g,I=c.propChng=c.propChng||"propertyChange",j=c.arrChng=c.arrChng||"arrayChange",w={},A=I+".observe",x=1,F=1,P=1,k=e.hasData,C=e.data,S={},O=function(t){return t._cId=t._cId||".obs"+F++},T=function(t,e){return this._data=e,this._ns=t,this},V=function(t,e){return this._data=e,this._ns=t,this},D=function(t){return d(t)?[t]:t},H=function(t,e,n){t=t?d(t)?t:[t]:[];var r,i,o,s,a=o=e,c=t&&t.length,l=[];for(r=0;r1;)c=c[o.shift()];c&&a._setProperty(c,o[0],e,n)}return a},removeProperty:function(t){return this.setProperty(t,S),this},_setProperty:function(t,e,n,r){var i,o,s,a=e?t[e]:t;u(a)&&a.set&&(t=t._vw||t,o=a,i=o.set===!0?o:o.set,a=o.call(t)),(a!==n||r&&a!=n)&&(!(a instanceof Date&&n instanceof Date)||a>n||a-1&&(e=d(e)?e:[e],e.length&&this._insert(t,e)),this},_insert:function(t,e){var n=this._data,r=n.length;t>r&&(t=r),g.apply(n,[t,0].concat(e)),this._trigger({change:"insert",index:t,items:e},r)},remove:function(t,e){var n,r=this._data;return void 0===t&&(t=r.length-1),t=y(t),e=e?y(e):0===e?0:1,e>0&&t>-1&&(n=r.slice(t,t+e),(e=n.length)&&this._remove(t,e,n)),this},_remove:function(t,e,n){var r=this._data,i=r.length;r.splice(t,e),this._trigger({change:"remove",index:t,items:n},i)},move:function(t,e,n){return n=n?y(n):0===n?0:1,t=y(t),e=y(e),n>0&&t>-1&&e>-1&&t!==e&&this._move(t,e,n),this},_move:function(t,e,n){var r,i=this._data,o=i.length,s=t+n-o;s>0&&(n-=s),n&&(r=i.splice(t,n),e>i.length&&(e=i.length),g.apply(i,[e,0].concat(r)),e!==t&&this._trigger({change:"move",oldIndex:t,index:e,items:r},o))},refresh:function(t){function e(){i&&(a.insert(r-i,c),p+=i,n+=i,i=0,c=[])}var n,r,i,o,s,a=this,c=[],l=a._data,f=l.slice(),u=l.length,p=u,d=t.length;for(a._srt=!0,r=i=0;rr&&a.remove(r,p-r),a._srt=void 0,a._trigger({change:"refresh",oldItems:f},u),a},_trigger:function(t,n){var r=this,i=r._data,o=i.length,s=e([i]);r._srt?t.refresh=!0:o!==n&&s.triggerHandler(I,{change:"set",path:"length",value:o,oldValue:n}),s.triggerHandler(j+(r._ns?"."+/^\S+/.exec(r._ns)[0]:""),t)}},v[I]=v[j]={remove:function(t){var n,r,i,o,s,a=t.data;if(a&&(a.off=!0,a=a.cb)&&(n=w[a._cId])){for(i=e._data(this).events[t.type],o=i.length;o--&&!r;)r=(s=i[o].data)&&s.cb&&s.cb._cId===a._cId;r||(delete n[C(this).obId],Q(n,a._cId))}}},a.map=function(t){function n(e,n,r,o){var s,a=this;this.src&&this.unmap(),typeof e===h&&(a.src=e,a.tgt=r||a.tgt||[],a.options=n||a.options,a.update(),o||(t.obsSrc&&i(a.src).observeAll(a.obs=function(e,n){s||(s=!0,t.obsSrc(a,e,n),s=void 0)},a.srcFlt),t.obsTgt&&i(a.tgt).observeAll(a.obt=function(e,n){s||(s=!0,t.obsTgt(a,e,n),s=void 0)},a.tgtFlt)))}return u(t)&&(t={getTgt:t}),t.baseMap&&(t=e.extend({},t.baseMap,t)),t.map=function(t,e,r,i){return new n(t,e,r,i)},(n.prototype={srcFlt:t.srcFlt||z,tgtFlt:t.tgtFlt||z,update:function(e){var n=this;i(n.tgt).refresh(t.getTgt(n.src,n.options=e||n.options))},unmap:function(){var t=this;t.src&&(t.obs&&i(t.src).unobserveAll(t.obs,t.srcFlt),t.obt&&i(t.tgt).unobserveAll(t.obt,t.tgtFlt),t.src=void 0)},map:n,_def:t}).constructor=n,t},c.advSet=function(){c._gccb=this._gccb,t._jsv=l.advanced._jsv?{cbBindings:w}:void 0},c._dp=H}return e},window); //# sourceMappingURL=jquery.observable.min.js.map diff --git a/jquery.observable.min.js.map b/jquery.observable.min.js.map index f1834fc..5be1f1c 100644 --- a/jquery.observable.min.js.map +++ b/jquery.observable.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["jquery.observable.js"],"names":["factory","global","$","jQuery","exports","module","define","amd","setGlobals","fn","$observe","$observable","versionNumber","_ocp","$views","views","jsrender","jsviews","sub","settings","advanced","value","$subSettingsAdvanced","$subSettings","_jsv","$sub","advSet","$isFunction","isFunction","$expando","expando","$isArray","isArray","OBJECT","observe","$eventSpecial","event","special","slice","splice","concat","PARSEINT","parseInt","rNotWhite","propertyChangeStr","propChng","arrayChangeStr","arrChng","cbBindingsStore","observeStr","observeObjKey","observeCbKey","observeInnerCbKey","$hasData","hasData","$data","data","remove","getCbKey","cb","_cId","ObjectObservable","ns","this","_data","_ns","ArrayObservable","wrapArray","dependsPaths","paths","root","callback","i","path","object","rt","nextObj","l","length","out","view","call","push","unshift","_ar","removeCbBindings","cbBindings","cbBindingsId","onDataChange","ev","eventArgs","isOb","val","allowArray","off","allPath","filter","parentObs","oldValue","ctx","observeAll","arOk","type","array","prop","_path","target","parents","observe_apply","undefined","args","apply","arguments","shift","$observeAll","unobserve","$unobserveAll","namespace","objMap","observeArrayItems","arr","unobs","newAllPath","filterAndObserveAll","obj","nestedArray","newObject","newParentObs","_fltr","nextParentObs","updatedTgt","wrappedCb","change","items","_wrp","isObject","obId","notRemoving","un","shallowFilter","indexOf","$unobserve","innerObserve","observeOnOff","pathStr","isArrayBinding","j","evData","obIdExpando","boundObOrArr","prntObs","allPth","initialNs","events","el","fullPath","replace","all","inArray","on","getInnerCb","exprOb","origRt","ob","contextCb","sb","newObj","bindArray","unbind","relPath","prevObj","prevAllPath","p","skip","parts","dep","cbId","inId","innerContextCb","depth","innerCb","initNsArr","initNsArrLen","cbItemCount","lastArg","pop","origRoots","_inId","match","split","join","_cxp","_gccb","origRoot","_cpfn","bnd","prm","nodeType","observable","depends","s","set","Object","Array","_apply","prototype","unobserveAll","setProperty","nonStrict","key","pair","multi","_is","self","name","_setProperty","removeProperty","leaf","setter","getter","removeProp","property","_vw","Date","_trigger","triggerHandler","exec","insert","index","_insert","oldLength","numToRemove","_remove","move","oldIndex","newIndex","numToMove","_move","excess","refresh","newItems","insertAdded","k","addedItems","dataLength","newItem","num","oldItems","newLength","_srt","$_data","handleObj","found","map","mapDef","Map","source","options","unbound","changing","src","unmap","tgt","update","obsSrc","obs","srcFlt","obsTgt","obt","tgtFlt","getTgt","baseMap","extend","_def","constructor","_dp","window"],"mappings":";CAWC,SAASA,EAASC,GAElB,GAAIC,GAAID,EAAOE,MAEQ,iBAAZC,SACVC,OAAOD,QAAUF,EACdF,EAAQC,EAAQC,GAChB,SAASA,GACV,MAAOF,GAAQC,EAAQC,IAEG,kBAAXI,SAAyBA,OAAOC,IACjDD,QAAQ,UAAW,SAASJ,GAC3B,MAAOF,GAAQC,EAAQC,KAGxBF,EAAQC,GAAQ,IAKlB,SAASA,EAAQC,GACjB,YAKA,IAAIM,GAAaN,KAAM,CAIvB,IAFAA,EAAIA,GAAKD,EAAOE,QAEXD,IAAMA,EAAEO,GAEZ,KAAM,8BAGP,IAECC,GAAUC,EAFPC,EAAgB,UACnBC,EAAO,OAGPC,EAASZ,EAAEa,MACVb,EAAEa,OACFP,GAAcP,EAAOe,UAAYA,SAASD,QAEzCE,QAASL,EACTM,KAECC,aAEDA,UACCC,SAAU,SAASC,GAElB,MADAC,GAAuBC,EAAaH,SAAWG,EAAaH,WAAaI,MAAM,GACxEH,GAEL,QAAUA,KAAUC,EAAqBE,KAAOH,EAAMG,MACtDC,EAAKC,SACLZ,EAAOK,UAENG,KAIPG,EAAOX,EAAOI,IACdK,EAAeE,EAAKN,SACpBG,EAAuBC,EAAaH,SACpCO,E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GZgJ,IAAKE,EACLkB,KAAMnB,IACJoB,YAAcnB,EAEVD,GAGRrO,EAAKC,OAAS,WACbD,EAAKuK,MAAQjI,KAAKiI,MAClB/L,EAAOuB,KAAOD,EAAaH,SAASI,MAEjC8D,WAAYtC,GAEZ6D,QAEJpF,EAAK0P,IAAM/M,EAGZ,MAAOlE,IACJkR","file":"jquery.observable.min.js","sourcesContent":["/*! JsObservable v0.9.89 (Beta): http://jsviews.com/#jsobservable */\n/*\n * Subcomponent of JsViews\n * Data change events for data-linking\n *\n * Copyright 2017, Boris Moore\n * Released under the MIT License.\n */\n\n//jshint -W018, -W041, -W120\n\n(function(factory, global) {\n\t// global var is the this object, which is window when running in the usual browser environment\n\tvar $ = global.jQuery;\n\n\tif (typeof exports === \"object\") { // CommonJS e.g. Browserify\n\t\tmodule.exports = $\n\t\t\t? factory(global, $)\n\t\t\t: function($) { // If no global jQuery, take jQuery passed as parameter: require(\"jsobservable\")(jQuery)\n\t\t\t\treturn factory(global, $);\n\t\t\t};\n\t} else if (typeof define === \"function\" && define.amd) { // AMD script loader, e.g. RequireJS\n\t\tdefine([\"jquery\"], function($) {\n\t\t\treturn factory(global, $); // Require jQuery\n\t\t});\n\t} else { // Browser using plain ',He='',He='',\n\topenScript = ' - data-linked tag, close marker\n\t\t\t// We validate with inTag so no script markers are inserted in attribute context e.g. for:\n\t\t\t// \"\" or \"
...{{/if}}...\"\n\t\t\tpreceding = id\n\t\t\t\t? (preceding + endOfElCnt + spaceBefore + (inTag ? \"\" : openScript + id + closeScript)+ spaceAfter + tag)\n\t\t\t\t: endOfElCnt || all;\n\t\t}\n\n\t\tif (validate && boundId) {\n\t\t\tif (inTag) {\n\t\t\t\t// JsViews data-linking tags are not allowed within element markup.\n\t\t\t\t// See jsviews/issues/303\n\t\t\t\tsyntaxError('{^{ within elem markup (' + inTag + ' ). Use data-link=\"...\"');\n\t\t\t}\n\t\t\tif (id.charAt(0) === \"#\") {\n\t\t\t\ttagStack.unshift(id.slice(1));\n\t\t\t} else if (id.slice(1) !== (bndId = tagStack.shift())) {\n\t\t\t\t// See jsviews/issues/213\n\t\t\t\tsyntaxError('Closing tag for {^{...}} under different elem: <' + bndId + '>');\n\t\t\t}\n\t\t}\n\t\tif (tag) {\n\t\t\tinTag = tag;\n\t\t\t// If there are ids (markers since the last tag), move them to the defer string\n\t\t\ttagStack.unshift(parentTag);\n\t\t\tparentTag = tag.slice(1);\n\t\t\tif (validate && tagStack[0] && tagStack[0] === badParent[parentTag]) {\n\t\t\t\t// Missing \n\t\t\t\t// TODO: replace this by smart insertion of tags\n\t\t\t\terror('Parent of must be ');\n\t\t\t}\n\t\t\tisVoid = voidElems[parentTag];\n\t\t\tif ((elCnt = elContent[parentTag]) && !prevElCnt) {\n\t\t\t\tdeferStack.unshift(defer);\n\t\t\t\tdefer = \"\";\n\t\t\t}\n\t\t\tprevElCnt = elCnt;\n//TODO Consider providing validation which throws if you place as child of , etc. - since if not caught,\n//this can cause errors subsequently which are difficult to debug.\n//\t\t\t\tif (elContent[tagStack[0]]>2 && !elCnt) {\n//\t\t\t\t\terror(parentTag + \" in \" + tagStack[0]);\n//\t\t\t\t}\n\t\t\tif (defer && elCnt) {\n\t\t\t\tdefer += \"+\"; // Will be used for stepping back through deferred tokens\n\t\t\t}\n\t\t}\n\t\treturn preceding;\n\t}\n\n\tfunction processViewInfos(vwInfos, targetParent) {\n\t\t// If targetParent, we are processing viewInfos (which may include navigation through '+-' paths) and hooking up to the right parentElem etc.\n\t\t// (and elem may also be defined - the next node)\n\t\t// If no targetParent, then we are processing viewInfos on newly inserted content\n\t\tvar deferPath, deferChar, bindChar, parentElem, id, onAftCr, deep,\n\t\t\taddedBindEls = [];\n\n\t\t// In elCnt context (element-only content model), prevNode is the first node after the open, nextNode is the first node after the close.\n\t\t// If both are null/undefined, then open and close are at end of parent content, so the view is empty, and its placeholder is the\n\t\t// 'lastChild' of the parentNode. If there is a prevNode, then it is either the first node in the view, or the view is empty and\n\t\t// its placeholder is the 'previousSibling' of the prevNode, which is also the nextNode.\n\t\tif (vwInfos) {\n\t\t\tif (vwInfos._tkns.charAt(0) === \"@\") {\n\t\t\t\t// We are processing newly inserted content. This is a special script element that was created in convertMarkers() to process deferred bindings,\n\t\t\t\t// and inserted following the target parent element - because no element tags (outside elCnt) were encountered to carry those binding tokens.\n\t\t\t\t// We will step back from the preceding sibling of this element, looking at targetParent elements until we find the one that the current binding\n\t\t\t\t// token belongs to. Set elem to null (the special script element), and remove it from the DOM.\n\t\t\t\ttargetParent = elem.previousSibling;\n\t\t\t\telem.parentNode.removeChild(elem);\n\t\t\t\telem = undefined;\n\t\t\t}\n\t\t\tlen = vwInfos.length;\n\t\t\twhile (len--) {\n\t\t\t\tvwInfo = vwInfos[len];\n//if (prevIds.indexOf(vwInfo.token) < 0) { // This token is a newly created view or tag binding\n\t\t\t\tbindChar = vwInfo.ch;\n\t\t\t\tif (deferPath = vwInfo.path) {\n\t\t\t\t\t// We have a 'deferred path'\n\t\t\t\t\tj = deferPath.length - 1;\n\t\t\t\t\twhile (deferChar = deferPath.charAt(j--)) {\n\t\t\t\t\t\t// Use the \"+\" and\"-\" characters to navigate the path back to the original parent node where the deferred bindings ocurred\n\t\t\t\t\t\tif (deferChar === \"+\") {\n\t\t\t\t\t\t\tif (deferPath.charAt(j) === \"-\") {\n\t\t\t\t\t\t\t\tj--;\n\t\t\t\t\t\t\t\ttargetParent = targetParent.previousSibling;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttargetParent = targetParent.parentNode;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttargetParent = targetParent.lastChild;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Note: Can use previousSibling and lastChild, not previousElementSibling and lastElementChild,\n\t\t\t\t\t\t// since we have removed white space within elCnt. Hence support IE < 9\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (bindChar === \"^\") {\n\t\t\t\t\tif (tag = bindingStore[id = vwInfo.id]) {\n\t\t\t\t\t\t// The binding may have been deleted, for example in a different handler to an array collectionChange event\n\t\t\t\t\t\t// This is a tag binding\n\t\t\t\t\t\tdeep = targetParent && (!elem || elem.parentNode !== targetParent); // We are stepping back looking for the right targetParent,\n\t\t\t\t\t\t// or we are linking existing content and this element is in elCnt, not an immediate child of the targetParent.\n\t\t\t\t\t\tif (!elem || deep) {\n\t\t\t\t\t\t\ttag.parentElem = targetParent;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (vwInfo.elCnt && deep) {\n\t\t\t\t\t\t\t// With element only content, if there is no following element, or if the binding is deeper than the following element\n\t\t\t\t\t\t\t// then we need to set the open or close token as a deferred binding annotation on the parent\n\t\t\t\t\t\t\tsetDefer(targetParent, (vwInfo.open ? \"#\" : \"/\") + id + bindChar + (targetParent._df || \"\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// This is an open or close marker for a data-linked tag {^{...}}. Add it to bindEls.\n\t\t\t\t\t\taddedBindEls.push([deep ? null : elem, vwInfo]);\n\t\t\t\t\t}\n\t\t\t\t} else if (view = viewStore[id = vwInfo.id]) {\n\t\t\t\t\t// The view may have been deleted, for example in a different handler to an array collectionChange event\n\t\t\t\t\tif (!view.parentElem) {\n\t\t\t\t\t\t// If view is not already extended for JsViews, extend and initialize the view object created in JsRender, as a JsViews view\n\t\t\t\t\t\tview.parentElem = targetParent || elem && elem.parentNode || parentNode;\n\t\t\t\t\t\tview._.onRender = addBindingMarkers;\n\t\t\t\t\t\tview._.onArrayChange = arrayChangeHandler;\n\t\t\t\t\t\tsetArrayChangeLink(view);\n\t\t\t\t\t}\n\t\t\t\t\tparentElem = view.parentElem;\n\t\t\t\t\tif (vwInfo.open) {\n\t\t\t\t\t\t// This is an 'open view' node (preceding script marker node,\n\t\t\t\t\t\t// or if elCnt, the first element in the view, with a data-jsv annotation) for binding\n\t\t\t\t\t\tview._elCnt = vwInfo.elCnt;\n\t\t\t\t\t\tif (targetParent && !elem) {\n\t\t\t\t\t\t\tsetDefer(targetParent, \"#\" + id + bindChar + (targetParent._df || \"\"));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// No targetParent, so there is a ._nxt elem (and this is processing tokens on the elem)\n\t\t\t\t\t\t\tif (!view._prv) {\n\t\t\t\t\t\t\t\tsetDefer(parentElem, removeSubStr(parentElem._df, \"#\" + id + bindChar));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tview._prv = elem;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// This is a 'close view' marker node for binding\n\t\t\t\t\t\tif (targetParent && (!elem || elem.parentNode !== targetParent)) {\n\t\t\t\t\t\t\t// There is no ._nxt so add token to _df. It is deferred.\n\t\t\t\t\t\t\tsetDefer(targetParent, \"/\" + id + bindChar + (targetParent._df || \"\"));\n\t\t\t\t\t\t\tview._nxt = undefined;\n\t\t\t\t\t\t} else if (elem) {\n\t\t\t\t\t\t\t// This view did not have a ._nxt, but has one now, so token may be in _df, and must be removed. (No longer deferred)\n\t\t\t\t\t\t\tif (!view._nxt) {\n\t\t\t\t\t\t\t\tsetDefer(parentElem, removeSubStr(parentElem._df, \"/\" + id + bindChar));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tview._nxt = elem;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (onAftCr = view.ctx && view.ctx[onAfterCreateStr] || onAfterCreate) {\n\t\t\t\t\t\t\tonAftCr.call(view.ctx.tag, view);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n//}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlen = addedBindEls.length;\n\t\t\twhile (len--) {\n\t\t\t\t// These were added in reverse order to addedBindEls. We push them in BindEls in the correct order.\n\t\t\t\tbindEls.push(addedBindEls[len]);\n\t\t\t}\n\t\t}\n\t\treturn !vwInfos || vwInfos.elCnt;\n\t}\n\n\tfunction getViewInfos(vwInfos) {\n\t\t// Used by view.childTags() and tag.childTags()\n\t\t// Similar to processViewInfos in how it steps through bindings to find tags. Only finds data-linked tags.\n\t\tvar level, parentTag, named;\n\n\t\tif (vwInfos) {\n\t\t\tlen = vwInfos.length;\n\t\t\tfor (j = 0; j < len; j++) {\n\t\t\t\tvwInfo = vwInfos[j];\n\t\t\t\t// This is an open marker for a data-linked tag {^{...}}, within the content of the tag whose id is get.id. Add it to bindEls.\n\t\t\t\t// Note - if bindingStore[vwInfo.id]._is === \"tag\" then getViewInfos is being called too soon - during first linking pass\n\t\t\t\ttag = bindingStore[vwInfo.id];\n\t\t\t\tif (!tag._is && tag.linkCtx) {\n\t\t\t\t\tparentTag = tag = tag.linkCtx.tag;\n\t\t\t\t\tnamed = tag.tagName === tagName;\n\t\t\t\t\tif (!tag.flow || named) {\n\t\t\t\t\t\tif (!deep) {\n\t\t\t\t\t\t\tlevel = 1;\n\t\t\t\t\t\t\twhile (parentTag = parentTag.parent) {\n\t\t\t\t\t\t\t\tlevel++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttagDepth = tagDepth || level; // The level of the first tag encountered.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ((deep || level === tagDepth) && (!tagName || named)) {\n\t\t\t\t\t\t\t// Filter on top-level or tagName as appropriate\n\t\t\t\t\t\t\ttags.push(tag);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction dataLink(late) {\n\t\t//================ Data-link and fixup of data-jsv annotations ================\n\t\tvar j, index,\n\t\t\ttokens = \"\",\n\t\t\twrap = {},\n\t\t\tselector = linkViewsSel + (get ? \",[\" + deferAttr + \"]\" : \"\");\n\t\t\t// If a childTags() call, get = \",[\" + deferAttr + \"]\" - since we need to include elements that have a ._df expando for deferred tokens\n\n\t\telems = qsa ? parentNode.querySelectorAll(selector) : $(selector, parentNode).get();\n\t\tl = elems.length;\n\n\t\t// The prevNode will be in the returned query, since we called markPrevOrNextNode() on it.\n\t\t// But it may have contained nodes that satisfy the selector also.\n\t\tif (prevNode && prevNode.innerHTML) {\n\t\t\t// Find the last contained node of prevNode, to use as the prevNode - so we only link subsequent elems in the query\n\t\t\tprevNodes = qsa ? prevNode.querySelectorAll(selector) : $(selector, prevNode).get();\n\t\t\tprevNode = prevNodes.length ? prevNodes[prevNodes.length - 1] : prevNode;\n\t\t}\n\n\t\ttagDepth = 0;\n\t\tfor (i = 0; i < l; i++) {\n\t\t\telem = elems[i];\n\t\t\tif (prevNode && !found) {\n\t\t\t\t// If prevNode is set, not false, skip linking. If this element is the prevNode, set to false so subsequent elements will link.\n\t\t\t\tfound = (elem === prevNode);\n\t\t\t} else if (nextNode && elem === nextNode) {\n\t\t\t\t// If nextNode is set then break when we get to nextNode\n\t\t\t\tif (get) {\n\t\t\t\t\ttokens += markerNodeInfo(elem);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t} else if (elem.parentNode) {\n\t\t\t\t// elem has not been removed from DOM\n\t\t\t\tif (get) {\n\t\t\t\t\ttokens += markerNodeInfo(elem);\n\t\t\t\t\tif (elem._df) {\n\t\t\t\t\t\tj = i + 1;\n\t\t\t\t\t\twhile (j < l && elem.contains(elems[j])) {\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Add deferred tokens after any tokens on descendant elements of this one\n\t\t\t\t\t\twrap[j-1] = elem._df;\n\t\t\t\t\t}\n\t\t\t\t\tif (wrap[i]) {\n\t\t\t\t\t\ttokens += wrap[i] || \"\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (isLink && (vwInfo = viewInfos(elem, undefined, rViewMarkers)) && (vwInfo = vwInfo[0])) {\n\t\t\t\t\t\t// If this is a link(trueOrString ...) call we will avoid re-binding to elems that are within template-rendered views\n\t\t\t\t\t\tskip = skip ? (vwInfo.id !== skip && skip) : vwInfo.open && vwInfo.id;\n\t\t\t\t\t}\n\t\t\t\t\tif (!skip && processInfos(viewInfos(elem))\n\t\t\t\t\t\t// If a link() call, processViewInfos() adds bindings to bindEls, and returns true for non-script nodes, for adding data-link bindings\n\t\t\t\t\t\t// If a childTags() call, getViewInfos returns array of tag bindings.\n\t\t\t\t\t\t\t&& elem.getAttribute($viewsLinkAttr)) {\n\t\t\t\t\t\tbindEls.push([elem]); // A data-linked element so add to bindEls too\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (get) {\n\t\t\ttokens += parentNode._df || \"\";\n\t\t\tif (index = tokens.indexOf(\"#\" + get.id) + 1) {\n\t\t\t\t// We are looking for view.childTags() or tag.childTags() - so start after the open token of the parent view or tag.\n\t\t\t\ttokens = tokens.slice(index + get.id.length);\n\t\t\t}\n\t\t\tindex = tokens.indexOf(\"/\" + get.id);\n\t\t\tif (index + 1) {\n\t\t\t\t// We are looking for view.childTags() or tag.childTags() - so don't look beyond the close token of the parent view or tag.\n\t\t\t\ttokens = tokens.slice(0, index);\n\t\t\t}\n\t\t\t// Call getViewInfos to add the found childTags to the tags array\n\t\t\tgetViewInfos(viewInfos(tokens, undefined, rOpenTagMarkers));\n\t\t}\n\n\t\tif (html === undefined && parentNode.getAttribute($viewsLinkAttr)) {\n\t\t\tbindEls.push([parentNode]); // Support data-linking top-level element directly (not within a data-linked container)\n\t\t}\n\n\t\t// Remove temporary marker script nodes they were added by markPrevOrNextNode\n\t\tunmarkPrevOrNextNode(prevNode, elCnt);\n\t\tunmarkPrevOrNextNode(nextNode, elCnt);\n\n\t\tif (get) {\n\t\t\treturn; // We have added childTags to the tags array, so we are done\n\t\t}\n\n\t\tif (elCnt && defer + ids) {\n\t\t\t// There are some views with elCnt, for which the open or close did not precede any HTML tag - so they have not been processed yet\n\t\t\telem = nextNode;\n\t\t\tif (defer) {\n\t\t\t\tif (nextNode) {\n\t\t\t\t\tprocessViewInfos(viewInfos(defer + \"+\", true), nextNode);\n\t\t\t\t} else {\n\t\t\t\t\tprocessViewInfos(viewInfos(defer, true), parentNode);\n\t\t\t\t}\n\t\t\t}\n\t\t\tprocessViewInfos(viewInfos(ids, true), parentNode);\n\t\t\t// If there were any tokens on nextNode which have now been associated with inserted HTML tags, remove them from nextNode\n\t\t\tif (nextNode) {\n\t\t\t\ttokens = nextNode.getAttribute(jsvAttrStr);\n\t\t\t\tif (l = tokens.indexOf(prevIds) + 1) {\n\t\t\t\t\ttokens = tokens.slice(l + prevIds.length - 1);\n\t\t\t\t}\n\t\t\t\tnextNode.setAttribute(jsvAttrStr, ids + tokens);\n\t\t\t}\n\t\t}\n\n// if (context.lazyLink) {\n// setTimeout(doLinking) (doLinking is function wrapper of following lines)\n// See Future tasks, and https://github.com/BorisMoore/jsviews/issues/368.\n// Could call context.lazyLink as callback, on async completion - or return promise.\n\t\t//================ Bind the data-linked elements and tags ================\n\t\tl = bindEls.length;\n\t\tfor (i = 0; i < l; i++) {\n\t\t\telem = bindEls[i];\n\t\t\tlinkInfo = elem[1];\n\t\t\telem = elem[0];\n\t\t\tif (linkInfo) {\n\t\t\t\tif (tag = bindingStore[linkInfo.id]) {\n\t\t\t\t\tif (linkCtx = tag.linkCtx) {\n\t\t\t\t\t\t// The tag may have been stored temporarily on the bindingStore - or may have already been replaced by the actual binding\n\t\t\t\t\t\ttag = linkCtx.tag;\n\t\t\t\t\t\ttag.linkCtx = linkCtx;\n\t\t\t\t\t}\n\t\t\t\t\tif (linkInfo.open) {\n\t\t\t\t\t\t// This is an 'open linked tag' binding annotation for a data-linked tag {^{...}}\n\t\t\t\t\t\tif (elem) {\n\t\t\t\t\t\t\ttag.parentElem = elem.parentNode;\n\t\t\t\t\t\t\ttag._prv = elem;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttag._elCnt = linkInfo.elCnt;\n\t\t\t\t\t\t// We data-link depth-first (\"on the way in\"), which is better for perf - and allows setting parent tags etc.\n\t\t\t\t\t\tview = tag.tagCtx.view;\n\n\t\t\t\t\t\t// Add data binding (unless skipped due to lateRender)\n\t\t\t\t\t\taddDataBinding(late, undefined, tag._prv, view, linkInfo.id);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttag._nxt = elem;\n\t\t\t\t\t\tif (tag._.unlinked && !tag._toLk) {\n\t\t\t\t\t\t\t// This is a 'close linked tag' binding annotation (and data-binding was not skipped due to lateRender)\n\t\t\t\t\t\t\ttagCtx = tag.tagCtx;\n\t\t\t\t\t\t\tview = tagCtx.view;\n\t\t\t\t\t\t\tcallAfterLink(tag);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Add data binding for a data-linked element (with data-link attribute)\n\t\t\t\taddDataBinding(late, elem.getAttribute($viewsLinkAttr), elem, $view(elem), undefined, isLink, outerData, context);\n\t\t\t}\n\t\t}\n//});\n\t}\n\t//==== /end of nested functions ====\n\n\tvar inTag, linkCtx, tag, i, l, j, len, elems, elem, view, vwInfo, linkInfo, prevNodes, token, prevView, nextView,\n\t\tnode, tags, deep, tagName, tagCtx, validate, tagDepth, depth, fragment, copiedNode, firstTag, parentTag,\n\t\tisVoid, wrapper, div, tokens, elCnt, prevElCnt, htmlTag, ids, prevIds, found, skip, isLink, get,\n\t\tself = this,\n\t\tthisId = self._.id + \"_\",\n\t\tdefer = \"\",\n\t\t// The marker ids for which no tag was encountered (empty views or final closing markers) which we carry over to container tag\n\t\tbindEls = [],\n\t\ttagStack = [],\n\t\tdeferStack = [],\n\t\tlate = [],\n\t\tonAfterCreate = changeHandler(self, onAfterCreateStr),\n\t\tprocessInfos = processViewInfos;\n\n\tif (refresh) {\n\t\tif (refresh.tmpl) {\n\t\t\t// refresh is the prevView, passed in from addViews()\n\t\t\tprevView = \"/\" + refresh._.id + \"_\";\n\t\t} else {\n\t\t\tisLink = refresh.lnk; // Top-level linking\n\t\t\tif (refresh.tag) {\n\t\t\t\tthisId = refresh.tag + \"^\";\n\t\t\t\trefresh = true;\n\t\t\t}\n\t\t\tif (get = refresh.get) {\n\t\t\t\tprocessInfos = getViewInfos;\n\t\t\t\ttags = get.tags;\n\t\t\t\tdeep = get.deep;\n\t\t\t\ttagName = get.name;\n\t\t\t}\n\t\t}\n\t\trefresh = refresh === true;\n\t}\n\n\tparentNode = parentNode\n\t\t? (\"\" + parentNode === parentNode\n\t\t\t? $(parentNode)[0] // It is a string, so treat as selector\n\t\t\t: parentNode.jquery\n\t\t\t\t? parentNode[0] // A jQuery object - take first element.\n\t\t\t\t: parentNode)\n\t\t: (self.parentElem // view.link()\n\t\t\t|| document.body); // link(null, data) to link the whole document\n\n\tvalidate = !$subSettingsAdvanced.noValidate && parentNode.contentEditable !== TRUE;\n\tparentTag = parentNode.tagName.toLowerCase();\n\telCnt = !!elContent[parentTag];\n\n\tprevNode = prevNode && markPrevOrNextNode(prevNode, elCnt);\n\tnextNode = nextNode && markPrevOrNextNode(nextNode, elCnt) || null;\n\n\tif (html != undefined) {\n\t\t//================ Insert html into DOM using documentFragments (and wrapping HTML appropriately). ================\n\t\t// Also convert markers to DOM annotations, based on content model.\n\t\t// Corresponds to nextNode ? $(nextNode).before(html) : $(parentNode).html(html);\n\t\t// but allows insertion to wrap correctly even with inserted script nodes. jQuery version will fail e.g. under tbody or select.\n\t\t// This version should also be slightly faster\n\t\tdiv = document.createElement(\"div\");\n\t\twrapper = div;\n\t\tprevIds = ids = \"\";\n\t\thtmlTag = parentNode.namespaceURI === \"http://www.w3.org/2000/svg\" ? \"svg_ns\" : (firstTag = rFirstElem.exec(html)) && firstTag[1] || \"\";\n\t\tif (elCnt) {\n\t\t\t// Now look for following view, and find its tokens, or if not found, get the parentNode._df tokens\n\t\t\tnode = nextNode;\n\t\t\twhile (node && !(nextView = viewInfos(node))) {\n\t\t\t\tnode = node.nextSibling;\n\t\t\t}\n\t\t\tif (tokens = nextView ? nextView._tkns : parentNode._df) {\n\t\t\t\ttoken = prevView || \"\";\n\t\t\t\tif (refresh || !prevView) {\n\t\t\t\t\ttoken += \"#\" + thisId;\n\t\t\t\t}\n\t\t\t\tj = tokens.indexOf(token);\n\t\t\t\tif (j + 1) {\n\t\t\t\t\tj += token.length;\n\t\t\t\t\t// Transfer the initial tokens to inserted nodes, by setting them as the ids variable, picked up in convertMarkers\n\t\t\t\t\tprevIds = ids = tokens.slice(0, j);\n\t\t\t\t\ttokens = tokens.slice(j);\n\t\t\t\t\tif (nextView) {\n\t\t\t\t\t\tnode.setAttribute(jsvAttrStr, tokens);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetDefer(parentNode, tokens);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//================ Convert the markers to DOM annotations, based on content model. ================\n//\t\t\toldElCnt = elCnt;\n\t\tisVoid = undefined;\n\t\thtml = (\"\" + html).replace(rConvertMarkers, convertMarkers);\n//\t\t\tif (!!oldElCnt !== !!elCnt) {\n//\t\t\t\terror(\"Parse: \" + html); // Parse error. Content not well-formed?\n//\t\t\t}\n\t\tif (validate && tagStack.length) {\n\t\t\tsyntaxError(\"Mismatched '<\" + parentTag + \"...>' in:\\n\" + html); // Unmatched tag\n\t\t}\n\t\tif (validateOnly) {\n\t\t\treturn;\n\t\t}\n\t\t// Append wrapper element to doc fragment\n\t\tsafeFragment.appendChild(div);\n\n\t\t// Go to html and back, then peel off extra wrappers\n\t\t// Corresponds to jQuery $(nextNode).before(html) or $(parentNode).html(html);\n\t\t// but supports svg elements, and other features missing from jQuery version (and this version should also be slightly faster)\n\t\thtmlTag = wrapMap[htmlTag] || wrapMap.div;\n\t\tdepth = htmlTag[0];\n\t\twrapper.innerHTML = htmlTag[1] + html + htmlTag[2];\n\t\twhile (depth--) {\n\t\t\twrapper = wrapper.lastChild;\n\t\t}\n\t\tsafeFragment.removeChild(div);\n\t\tfragment = document.createDocumentFragment();\n\t\twhile (copiedNode = wrapper.firstChild) {\n\t\t\tfragment.appendChild(copiedNode);\n\t\t}\n\t\t// Insert into the DOM\n\t\tparentNode.insertBefore(fragment, nextNode);\n\t}\n\tdataLink(late);\n\n\treturn late;\n}\n\nfunction addDataBinding(late, linkMarkup, node, currentView, boundTagId, isLink, data, context) {\n\t// Add data binding for data-linked elements or {^{...}} data-linked tags\n\tvar tmpl, tokens, attr, convertBack, tagExpr, linkFn, linkCtx, tag, rTagIndex, hasElse, lastIndex,\n\t\tlinkExpressions = [];\n\n\tif (boundTagId) {\n\t\t// boundTagId is a string for {^{...}} data-linked tag. So only one linkTag in linkMarkup\n\t\t// data and context arguments are undefined\n\t\ttag = bindingStore[boundTagId];\n\t\ttag = tag.linkCtx ? tag.linkCtx.tag : tag;\n\n\t\tlinkCtx = tag.linkCtx || {\n\t\t\ttype: \"inline\",\n\t\t\tdata: currentView.data, // source\n\t\t\telem: tag._elCnt ? tag.parentElem : node, // target\n\t\t\tview: currentView,\n\t\t\tctx: currentView.ctx,\n\t\t\tattr: HTML, // Script marker nodes are associated with {^{ and always target HTML.\n\t\t\tfn: tag._.bnd,\n\t\t\ttag: tag,\n\t\t\t// Pass the boundTagId in the linkCtx, so that it can be picked up in observeAndBind\n\t\t\t_bndId: boundTagId\n\t\t};\n\t\ttag.linkCtx = linkCtx;\n\t\tbindDataLinkTarget(linkCtx, late);\n\t\ttag._toLk = linkCtx._bndId; // If data binding happened, remove _toLk flag from tag\n\t} else if (linkMarkup && node) {\n\t\t// Data-linked element\n\n\t\t// If isLink then this is a top-level linking: .link(expression, target, data, ....) or\n\t\t// .link(true, target, data, ....) scenario - and data and context are passed in separately from the view\n\t\tdata = isLink ? data : currentView.data;\n\n\t\t// Compiled linkFn expressions could be stored in the tmpl.links array of the template\n\t\t// TODO - consider also caching globally so that if {{:foo}} or data-link=\"foo\" occurs in different places,\n\t\t// the compiled template for this is cached and only compiled once...\n\t\t//links = currentView.links || currentView.tmpl.links;\n\n\t\ttmpl = currentView.tmpl;\n\n//\t\t\tif (!(linkTags = links[linkMarkup])) {\n\t\t// This is the first time this view template has been linked, so we compile the data-link expressions, and store them on the template.\n\n\t\tlinkMarkup = normalizeLinkTag(linkMarkup, defaultAttr(node));\n\t\tlastIndex = rTagDatalink.lastIndex = 0;\n\t\twhile (tokens = rTagDatalink.exec(linkMarkup)) { // TODO require } to be followed by whitespace or $, and remove the \\}(!\\}) option.\n\t\t\tlinkExpressions.push(tokens);\n\t\t\tlastIndex = rTagDatalink.lastIndex;\n\t\t}\n\t\tif (lastIndex < linkMarkup.length) {\n\t\t\tsyntaxError(linkMarkup);\n\t\t}\n\t\twhile (tokens = linkExpressions.shift()) {\n\t\t\t// Iterate over the data-link expressions, for different target attrs,\n\t\t\t// e.g. ~description(firstName, lastName)}\"\n\t\t\t// tokens: [all, attr, bindOnly, tagExpr, tagName, converter, colon, html, comment, code, params]\n\t\t\trTagIndex = rTagDatalink.lastIndex;\n\t\t\tattr = tokens[1];\n\t\t\ttagExpr = tokens[3];\n\t\t\twhile (linkExpressions[0] && linkExpressions[0][4] === \"else\") { // If this is {sometag...} and is followed by an {else...} add to tagExpr\n\t\t\t\ttagExpr += delimCloseChar1 + delimOpenChar0 + linkExpressions.shift()[3];\n\t\t\t\thasElse = true;\n\t\t\t}\n\t\t\tif (hasElse) { // If an {else} has been added, need also to add closing {{/sometag}}\n\t\t\t\ttagExpr += delimCloseChar1 + delimOpenChar0 + delimOpenChar1 + \"/\" + tokens[4] + delimCloseChar0;\n\t\t\t}\n\t\t\tlinkCtx = {\n\t\t\t\ttype: isLink ? \"top\" : \"link\",\n\t\t\t\tdata: data, // source\n\t\t\t\telem: node, // target\n\t\t\t\tview: currentView,\n\t\t\t\tctx: context,\n\t\t\t\tattr: attr,\n\t\t\t\tisLk: isLink, // top-level linking?\n\t\t\t\t_toLk : 1, // Flag to data-link on initial data-link call rendering call\n\t\t\t\t_noUpd : tokens[2] // Flag for data-link=\"^{...}\" so on initial data-link call will bind, but not render)\n\t\t\t};\n\n\t\t\tconvertBack = undefined;\n\t\t\tif (tokens[6]) {\n\t\t\t\tconvertBack = tokens[10] || undefined;\n\t\t\t\tlinkCtx.convert = tokens[5] || \"\";\n\t\t\t\tif (convertBack !== undefined && defaultAttr(node)) {\n\t\t\t\t\tif (attr) {\n\t\t\t\t\t\tsyntaxError(tagExpr + \"- Remove target: \" + attr);\n\t\t\t\t\t}\n\t\t\t\t\t// Default target, so allow 2 way binding\n\t\t\t\t\tlinkCtx.convertBack = convertBack = convertBack.slice(1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Compile the linkFn expression which evaluates and binds a data-link expression\n\t\t\t// TODO - optimize for the case of simple data path with no conversion, helpers, etc.:\n\t\t\t// i.e. data-link=\"a.b.c\". Avoid creating new instances of Function every time. Can use a default function for all of these...\n\n\t\t\tlinkCtx.expr = attr + tagExpr;\n\t\t\tlinkFn = tmpl.links[tagExpr];\n\t\t\tif (!linkFn) {\n\t\t\t\ttmpl.links[tagExpr] = linkFn = $sub.tmplFn(tagExpr, tmpl, true, convertBack, hasElse);\n\t\t\t}\n\t\t\tlinkCtx.fn = linkFn;\n\t\t\tbindDataLinkTarget(linkCtx, late);\n\t\t\t// We store rTagIndex in local scope, since this addDataBinding method can sometimes be called recursively,\n\t\t\t// and each is using the same rTagDatalink instance.\n\t\t\trTagDatalink.lastIndex = rTagIndex;\n\t\t}\n//\t\t}\n\t}\n}\n\nfunction bindDataLinkTarget(linkCtx, late) {\n\t// Add data link bindings for a link expression in data-link attribute markup\n\tfunction handler(ev, eventArgs) {\n\t\tonDataLinkedTagChange.call(linkCtx, ev, eventArgs);\n\t\t// If the link expression uses a custom tag, the onDataLinkedTagChange call will call renderTag, which will set tagCtx on linkCtx\n\t}\n\tif (linkCtx.isLk) {\n\t\t// Top-level linking: .link(expressionOrTrue, data, context) - so we need to create a view for the linking, with the data and ctx\n\t\t// which may be different than the current context of the target. Note that this view is not a standard data-linked view, so it will\n\t\t// be disposed only when its parent view is disposed.\n\t\tlinkCtx.view = new $sub.View(\n\t\t\t$sub.extendCtx(linkCtx.ctx, linkCtx.view.ctx),\n\t\t\t\"link\", linkCtx.view, linkCtx.data, linkCtx.expr, undefined, addBindingMarkers);\n\t}\n\tlinkCtx._ctxCb = $sub._gccb(linkCtx.view); // getContextCallback: _ctxCb, for filtering/appending to dependency paths: function(path, object) { return [(object|path)*]}\n\tlinkCtx._hdl = handler;\n\t// handler._ctx = linkCtx; Could pass linkCtx for use in a depends = function() {} call, so depends is different for different linkCtx's\n\tif (linkCtx.fn._lr) {\n\t\tlinkCtx._toLk = 1;\n\t\tlate.push(linkCtx); // lateRender - defer rendering and linking (sync but after first linking pass)\n\t} else {\n\t\thandler(true);\n\t}\n}\n\n//=====================\n// Data-linking helpers\n//=====================\n\nfunction removeSubStr(str, substr) {\n\tvar k;\n\treturn str\n\t\t? (k = str.indexOf(substr),\n\t\t\t(k + 1\n\t\t\t\t? str.slice(0, k) + str.slice(k + substr.length)\n\t\t\t\t: str))\n\t\t: \"\";\n}\n\nfunction markerNodeInfo(node) {\n\treturn node &&\n\t\t(\"\" + node === node\n\t\t\t? node\n\t\t\t: node.tagName === SCRIPT\n\t\t\t\t? node.type.slice(3)\n\t\t\t\t: node.nodeType === 1 && node.getAttribute(jsvAttrStr) || \"\");\n}\n\nfunction viewInfos(node, isVal, rBinding) {\n\t// Test whether node is a script marker node, and if so, return metadata\n\tfunction getInfos(all, open, close, id, ch, elPath) {\n\t\tinfos.push({\n\t\t\telCnt: elCnt,\n\t\t\tid: id,\n\t\t\tch: ch,\n\t\t\topen: open,\n\t\t\tclose: close,\n\t\t\tpath: elPath,\n\t\t\ttoken: all\n\t\t});\n\t}\n\tvar elCnt, tokens,\n\t\tinfos = [];\n\tif (tokens = isVal ? node : markerNodeInfo(node)) {\n\t\telCnt = infos.elCnt = node.tagName !== SCRIPT;\n\t\telCnt = tokens.charAt(0) === \"@\" || elCnt;\n\t\tinfos._tkns = tokens;\n\t\t// rMarkerTokens = /(?:(#)|(\\/))(\\d+)([_^])([-+@\\d]+)?/g;\n\t\ttokens.replace(rBinding || rMarkerTokens, getInfos);\n\t\treturn infos;\n\t}\n}\n\nfunction unmarkPrevOrNextNode(node, elCnt) {\n\tif (node) {\n\t\tif (node.type === \"jsv\") {\n\t\t\tnode.parentNode.removeChild(node);\n\t\t} else if (elCnt && node.getAttribute($viewsLinkAttr) === \"\") {\n\t\t\tnode.removeAttribute($viewsLinkAttr);\n\t\t}\n\t}\n}\n\nfunction markPrevOrNextNode(node, elCnt) {\n\tvar marker = node;\n\twhile (elCnt && marker && marker.nodeType !== 1) {\n\t\tmarker = marker.previousSibling;\n\t}\n\tif (marker) {\n\t\tif (marker.nodeType !== 1) {\n\t\t\t// For text nodes, we will add a script node before\n\t\t\tmarker = document.createElement(SCRIPT);\n\t\t\tmarker.type = \"jsv\";\n\t\t\tnode.parentNode.insertBefore(marker, node);\n\t\t} else if (!markerNodeInfo(marker) && !marker.getAttribute($viewsLinkAttr)) {\n\t\t\t// For element nodes, we will add a data-link attribute (unless there is already one)\n\t\t\t// so that this node gets included in the node linking process.\n\t\t\tmarker.setAttribute($viewsLinkAttr, \"\");\n\t\t}\n\t}\n\treturn marker;\n}\n\nfunction normalizeLinkTag(linkMarkup, twoway) {\n\tlinkMarkup = $.trim(linkMarkup).replace(rEscapeQuotes, \"\\\\$&\");\n\treturn linkMarkup.slice(-1) !== delimCloseChar0\n\t// If simplified syntax is used: data-link=\"expression\", convert to data-link=\"{:expression}\",\n\t// or for inputs, data-link=\"{:expression:}\" for (default) two-way binding\n\t\t? linkMarkup = delimOpenChar1 + \":\" + linkMarkup + (twoway ? \":\" : \"\") + delimCloseChar0\n\t\t: linkMarkup;\n}\n\n//===========================\n// Methods for views and tags\n//===========================\n\nfunction callAfterLink(tag, ev, eventArgs) {\n\tvar linkedElems, linkedElements, linkedElem, l, m, $linkCtxElem, tagCtxElse,\n\t\ttagCtx = tag.tagCtx,\n\t\tlinkCtx = tag.linkCtx,\n\t\tbindTo = tag.bindTo;\n\n\tif (tag._.unlinked) { // First call to onAfterLink, or first call after onUpdate: updateContent. Initialize and call onBind and set properties\n\t\t$linkCtxElem = $(linkCtx.elem);\n\t\tif (linkedElements = tag.linkedElement) {\n\t\t\t// tag.linkedElement: - selector, or array of selectors, for identifying linked elements in template/rendered content.\n\t\t\t// (But for tag bindings on data-linked elements, defaults to data-linked element)\n\t\t\tm = tag.tagCtxs.length;\n\t\t\twhile (m--) {\n\t\t\t\ttagCtxElse = tag.tagCtxs[m];\n\t\t\t\tl = linkedElements.length;\n\t\t\t\tlinkedElems = tagCtxElse.linkedElems = tagCtxElse.linkedElems || new Array(l);\n\t\t\t\twhile (l--) {\n\t\t\t\t\tif (linkedElements[l]) {\n\t\t\t\t\t\tlinkedElem = tag.inline ? tagCtxElse.contents(true, linkedElements[l]) : $linkCtxElem;\n\t\t\t\t\t\tif ((linkedElem[0]) && linkedElem[0].type !== RADIO) {\n\t\t\t\t\t\t\tlinkedElem = linkedElem.first();\n\t\t\t\t\t\t\tif (!linkedElem[0]._jsvLkEl) {\n\t\t\t\t\t\t\t\tlinkedElems[l] = linkedElem;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttag.linkedElems = tagCtx.linkedElems;\n\t\t\ttag.linkedElem = tag.linkedElems[0];\n\t\t}\n\t\tif (tag.onBind) {\n\t\t\ttag.onBind(tagCtx, linkCtx, tag.ctx, ev, eventArgs);\n\t\t}\n\t}\n\n\tif (tag.onAfterLink) {\n\t\ttag.onAfterLink(tagCtx, linkCtx, tag.ctx, ev, eventArgs);\n\t}\n\n\t// linkedElems may be set programmatically in onBind or onAfterLink, rather than declaratively, via tag.linkedElements\n\tif (linkedElems = tagCtx.linkedElems || tag.linkedElems || tag.linkedElem && [tag.linkedElem]) {\n\t\ttag.linkedElems = tagCtx.linkedElems = linkedElems;\n\t\ttag.linkedElem = linkedElems[0] = tag.linkedElem || tag.linkedElems[0];\n\t}\n\tif (!tag.flow && !linkCtx.elem._jsvChg) {\n\t\tif (tag.inline && tag._.unlinked && (tag.linkedElems || bindTo)) {\n\t\t\tdefineBindToDataTargets(bindingStore[tag._tgId], tag);\n\t\t}\n\n\t\tbindTo = bindTo || {};\n\t\ttag.setValue();\n\t}\n\ttag._.unlinked = undefined;\n}\n\nfunction asyncOnElemChange(ev) {\n\tvar which = ev.which;\n\tif (!(which > 15 && which < 21 || which > 32 && which < 41 || which > 111 && which < 131 || which === 27 || which === 144)) {\n\t\t// Shift, Ctrl, Alt, Pause, Caplock, Page up/down End, Home, Left, Up, Right, Down, Function keys, Escape, Numlock\n\t\tsetTimeout(function() {\n\t\t\tonElemChange(ev);\n\t\t});\n\t}\n}\n\nfunction bindTriggerEvent($elem, trig, onoff) {\n\t// Bind keydown, or other trigger - (rather than use the default change event bubbled to activeBody)\n\tif (trig === true && useInput) {\n\t\t$elem[onoff](\"input.jsv\", onElemChange); // For HTML5 browser with \"oninput\" support - for mouse editing of text\n\t} else {\n\t\ttrig = \"\" + trig === trig ? trig : \"keydown.jsv\"; // Set trigger to (true || truey non-string (e.g. 1) || 'keydown')\n\t\t$elem[onoff](trig, trig.indexOf(\"keydown\") >= 0 ? asyncOnElemChange : onElemChange); // Get 'keydown' with async\n\t}\n}\n\nfunction bindLinkedElChange(tag, linkedElem) {\n\t// Two-way binding for linkedElem - in the case of input, textarea or contentEditable elements.\n\t// Trigger setting may have changed. Unbind previous trigger binding (if any) and bind new one.\n\n\tvar $linkedElem, newTrig,\n\t\toldTrig = linkedElem._jsvTr || false;\n\n\tif (tag) {\n\t\tnewTrig = tag.tagCtx.props.trigger;\n\t}\n\tif (newTrig === undefined) {\n\t\tnewTrig = $subSettings.trigger;\n\t}\n\t// Trigger is noop except for text box, textarea, contenteditable...\n\tnewTrig = newTrig && (linkedElem.tagName === \"INPUT\" && linkedElem.type !== CHECKBOX && linkedElem.type !== RADIO\n\t\t|| linkedElem.type === \"textarea\" || linkedElem.contentEditable === TRUE) && newTrig || false;\n\n\tif (oldTrig !== newTrig) {\n\t\t$linkedElem = $(linkedElem);\n\t\tbindTriggerEvent($linkedElem, oldTrig, \"off\");\n\t\tbindTriggerEvent($linkedElem, linkedElem._jsvTr = newTrig, \"on\");\n\t}\n}\n\nfunction defineBindToDataTargets(binding, tag, cvtBk) {\n\t// Two-way binding.\n\t// We set the binding.to[1] to be the cvtBack, and binding.to[0] to be either the path to the target, or [object, path] where the target is the\n\t// path on the provided object. So for a computed path with an object call: a.b.getObject().d.e, we set to[0] to be [exprOb, \"d.e\"], and\n\t// we bind to the path on the returned object, exprOb.ob, as target. Otherwise our target is the first path, paths[0], which we will convert\n\t// with contextCb() for paths like ~a.b.c or #x.y.z\n\n\tvar pathIndex, path, lastPath, bindtoOb, to, bindTo, paths, k, l, obsCtxPrm, linkedCtxParam, contextCb, targetPaths, bindTos,\n\t\ttagElse = 1,\n\t\ttos = [],\n\t\tlinkCtx = binding.linkCtx,\n\t\tsource = linkCtx.data,\n\t\ttargetPathsElses = linkCtx.fn.paths;\n\n\tif (binding && !binding.to) {\n\t\tif (tag) {\n\t\t\ttag.convertBack = tag.convertBack || cvtBk;\n\t\t\tbindTo = tag.bindTo;\n\t\t\ttagElse = tag.tagCtxs ? tag.tagCtxs.length : 1;\n\t\t}\n\t\twhile (tagElse--) {\n\t\t\tbindTos = [];\n\t\t\tif (targetPaths = targetPathsElses[tagElse]) {\n\t\t\t\tbindTo = targetPaths._jsvto ? [\"_jsvto\"] : (bindTo || [0]);\n\t\t\t\tk = bindTo.length;\n\t\t\t\twhile (k--) {\n\t\t\t\t\tpath = \"\";\n\t\t\t\t\tcontextCb = linkCtx._ctxCb;\n\t\t\t\t\tpaths = targetPaths[bindTo[k]];\n\t\t\t\t\tif (pathIndex = paths && paths.length) {\n\t\t\t\t\t\tlastPath = paths[pathIndex - 1];\n\t\t\t\t\t\tif (lastPath._cpfn) { // Computed property exprOb\n\n\t\t\t\t\t\t\tbindtoOb = lastPath;\n\t\t\t\t\t\t\twhile (lastPath.sb && lastPath.sb._cpfn) {\n\t\t\t\t\t\t\t\tpath = lastPath = lastPath.sb;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpath = lastPath.sb || path && path.path;\n\t\t\t\t\t\t\tlastPath = path ? path.slice(1) : bindtoOb.path;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tto = path\n\t\t\t\t\t\t\t? [bindtoOb, // 'exprOb' for this expression and view-binding. So bindtoOb.ob is current object returned by expression.\n\t\t\t\t\t\t\t\t\tlastPath]\n\t\t\t\t\t\t\t: resolveDataTargetPath(lastPath, source, contextCb); // Get 'to' for target path: lastPath\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Contextual parameter ~foo with no external binding - has ctx.foo = [{_ocp: xxx}] and binds to ctx.foo._ocp\n\t\t\t\t\t\tlinkedCtxParam = tag.linkedCtxParam;\n\t\t\t\t\t\tto = [];\n\t\t\t\t\t\tif (linkedCtxParam && linkedCtxParam[k]) {\n\t\t\t\t\t\t\t// This is a tag binding, with linked tag contextual parameters\n\t\t\t\t\t\t\tto = [tag.tagCtxs[tagElse].ctx[linkedCtxParam[k]][0], _ocp];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ((obsCtxPrm = to._cxp) && obsCtxPrm.tag) {\n\t\t\t\t\t\t// This is a binding for a tag contextual parameter (e.g. within a tag block content\n\t\t\t\t\t\tto = obsCtxPrm;\n\t\t\t\t\t}\n\t\t\t\t\tbindTos.unshift(to);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttos.unshift(bindTos);\n\t\t}\n\t\tbinding.to = tos;\n\t}\n}\n\nfunction resolveDataTargetPath(targetPath, source, contextCb) {\n\t// Iteratively process targetPath, resolving ~a.b.c paths for contextual parameters\n\tvar path, bindtoOb, to, l, obsCtxPrm, view, topCp, data;\n\n\twhile (targetPath && targetPath !== _ocp && (to = contextCb(path = targetPath.split(\"^\").join(\".\"), source)) && (l = to.length)) {\n\t\tif (obsCtxPrm = to[0]._cxp) { // Two-way binding to a contextual parameter reference, ~foo (declared as ~foo=expr on a parent tag)\n\t\t\ttopCp = topCp || obsCtxPrm;\n\t\t\tview = to[0][0];\n\t\t\tif (_ocp in view) {\n\t\t\t\tdata = view;\n\t\t\t\tview = view._vw;\n\t\t\t} else {\n\t\t\t\tdata = view.data;\n\t\t\t}\n\t\t\ttopCp.path = targetPath = to[0][1];\n\t\t\tto = [topCp.data = data, targetPath];\n\t\t\t\tcontextCb = $sub._gccb(view);\n\t\t\t\tif (targetPath._cpfn) { // computed property\n\t\t\t\t\tbindtoOb = targetPath;\n\t\t\t\t\tbindtoOb.data = to[0];\n\t\t\t\t\tbindtoOb._cpCtx = contextCb;\n\t\t\t\t\twhile (targetPath.sb && targetPath.sb._cpfn) {\n\t\t\t\t\t\tpath = targetPath = targetPath.sb;\n\t\t\t\t\t}\n\t\t\t\t\tpath = targetPath.sb || path && path.path;\n\t\t\t\t\ttargetPath = path ? path.slice(1) : bindtoOb.path;\n\t\t\t\t\tto = [\n\t\t\t\t\t\tbindtoOb, // 'exprOb' for this expression and view-binding. So bindtoOb.ob is current object returned by expression.\n\t\t\t\t\t\ttargetPath\n\t\t\t\t\t];\n\t\t\t\t} else if (obsCtxPrm.tag && obsCtxPrm.path === _ocp) {\n\t\t\t\t\tto = obsCtxPrm;\n\t\t\t\t}\n\t\t} else { // Two-way binding to a helper - e.g. ~address.street, or computed, e.g. ~fullName(), or view property e.g. #data.foo\n\t\t\tto = l>2\n\t\t\t\t? [to[l-3], to[l-2]] // With path: [object, path]\n\t\t\t\t: [to[l-2]]; // No path, (e.g. [function] for computed with setter)\n\t\t}\n\t\tsource = to[0];\n\t\ttargetPath = to[1];\n\t}\n\tto = to || [source, path];\n\tto._cxp = topCp;\n\treturn to;\n}\n\nfunction mergeCtxs(tag, newCtxs, replace) { // Merge updated tagCtxs into tag.tagCtxs\n\tvar tagCtx, newTagCtx,\n\t\tview = tag.tagCtx.view,\n\t\ttagCtxs = tag.tagCtxs || [tag.tagCtx],\n\t\tl = tagCtxs.length,\n\t\trefresh = !newCtxs;\n\n\tnewCtxs = newCtxs || tag._.bnd.call(view.tmpl, (tag.linkCtx || view).data, view, $sub);\n\n\tif (replace) {\n\t\t// Replace previous tagCtxs by new ones, rather than merging\n\t\ttagCtxs = tag.tagCtxs = newCtxs;\n\t\ttag.tagCtx = tagCtxs[0];\n\t} else {\n\t\twhile (l--) {\n\t\t\ttagCtx = tagCtxs[l];\n\t\t\tnewTagCtx = newCtxs[l];\n\t\t\t$observable(tagCtx.props).setProperty(newTagCtx.props);\n\t\t\t$extend(tagCtx.ctx, newTagCtx.ctx); // We don't support propagating ctx variables, ~foo, observably, to nested views. So extend, not setProperty...\n\t\t\ttagCtx.args = newTagCtx.args;\n\t\t\tif (refresh) {\n\t\t\t\ttagCtx.tmpl = newTagCtx.tmpl;\n\t\t\t}\n\t\t}\n\t}\n\t$sub._ths(tag, tagCtxs[0]); // tagHandlersFromProps\n\treturn tagCtxs;\n}\n\n//=========\n// Disposal\n//=========\n\nfunction clean(elems) {\n\t// Remove data-link bindings, or contained views\n\tvar l, elem, bindings,\n\t\telemArray = [],\n\t\tlen = elems.length,\n\t\ti = len;\n\twhile (i--) {\n\t\t// Copy into an array, so that deletion of nodes from DOM will not cause our 'i' counter to get shifted\n\t\t// (Note: This seems as fast or faster than elemArray = [].slice.call(elems); ...)\n\t\telemArray.push(elems[i]);\n\t}\n\ti = len;\n\twhile (i--) {\n\t\telem = elemArray[i];\n\t\tif (elem.parentNode) {\n\t\t\t// Has not already been removed from the DOM\n\t\t\tif (bindings = elem._jsvBnd) {\n\t\t\t\t// Get propertyChange bindings for this element\n\t\t\t\t// This may be an element with data-link, or the opening script marker node for a data-linked tag {^{...}}\n\t\t\t\t// bindings is a string with the syntax: \"(&bindingId)*\"\n\t\t\t\tbindings = bindings.slice(1).split(\"&\");\n\t\t\t\telem._jsvBnd = \"\";\n\t\t\t\tl = bindings.length;\n\t\t\t\twhile (l--) {\n\t\t\t\t\t// Remove associated bindings\n\t\t\t\t\tremoveViewBinding(bindings[l], elem._jsvLkEl, elem); // unbind bindings with this bindingId on this view\n\t\t\t\t}\n\t\t\t}\n\t\t\tdisposeTokens(markerNodeInfo(elem) + (elem._df || \"\"), elem);\n\t\t}\n\t}\n}\n\nfunction removeViewBinding(bindId, linkedElemTag, elem) {\n\t// Unbind\n\tvar objId, linkCtx, tag, object, obsId, tagCtxs, l, map, linkedElem, trigger, view, tagCtx, linkedElems, allLinkedElems,\n\t\tbinding = bindingStore[bindId];\n\n\tif (linkedElemTag) {\n\t\telem._jsvLkEl = undefined;\n\t} else if (binding && (!elem || elem === binding.elem)) { // Test that elem is actually binding.elem, since cloned elements can have inappropriate markerNode info\n\t\tdelete bindingStore[bindId]; // Delete already, so call to onDispose handler below cannot trigger recursive deletion (through recursive call to jQuery cleanData)\n\t\tfor (objId in binding.bnd) {\n\t\t\tobject = binding.bnd[objId];\n\t\t\tobsId = binding.cbId;\n\t\t\tif ($isArray(object)) {\n\t\t\t\t$([object]).off(arrayChangeStr + obsId).off(propertyChangeStr + obsId); // There may be either or both of arrayChange and propertyChange\n\t\t\t} else {\n\t\t\t\t$(object).off(propertyChangeStr + obsId);\n\t\t\t}\n\t\t\tdelete binding.bnd[objId];\n\t\t}\n\n\t\tif (linkCtx = binding.linkCtx) {\n\t\t\tif (tag = linkCtx.tag) {\n\t\t\t\tif (tagCtxs = tag.tagCtxs) {\n\t\t\t\t\tl = tagCtxs.length;\n\t\t\t\t\twhile (l--) {\n\t\t\t\t\t\ttagCtx = tagCtxs[l];\n\t\t\t\t\t\tif (map = tagCtx.map) {\n\t\t\t\t\t\t\tmap.unmap(); //unobserve\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Copy linkedElems in case tag.linkedElem or tag.linkedElems are undefined in onUnbind\n\t\t\t\t\t\tif (linkedElems = tagCtx.linkedElems) {\n\t\t\t\t\t\t\tallLinkedElems = (allLinkedElems || []).concat(linkedElems);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (tag.onUnbind) {\n\t\t\t\t\ttag.onUnbind(tag.tagCtx, linkCtx, tag.ctx, true);\n\t\t\t\t}\n\t\t\t\tif (tag.onDispose) {\n\t\t\t\t\ttag.onDispose();\n\t\t\t\t}\n\n\t\t\t\tif (!tag._elCnt) {\n\t\t\t\t\tif (tag._prv) {\n\t\t\t\t\t\ttag._prv.parentNode.removeChild(tag._prv);\n\t\t\t\t\t}\n\t\t\t\t\tif (tag._nxt) {\n\t\t\t\t\t\ttag._nxt.parentNode.removeChild(tag._nxt);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlinkedElems = allLinkedElems || [$(linkCtx.elem)];\n\t\t\tl = linkedElems.length;\n\t\t\twhile (l--) {\n\t\t\t\tlinkedElem = linkedElems[l];\n\t\t\t\tif (trigger = linkedElem && linkedElem[0] && linkedElem[0]._jsvTr) {\n\t\t\t\t\tbindTriggerEvent(linkedElem, trigger, \"off\");\n\t\t\t\t\tlinkedElem[0]._jsvTr = undefined;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tview = linkCtx.view;\n\t\t\tif (view.type === \"link\") {\n\t\t\t\tview.parent.removeViews(view._.key, undefined, true); // A \"link\" view is associated with the binding, so should be disposed with binding.\n\t\t\t} else {\n\t\t\t\tdelete view._.bnds[bindId];\n\t\t\t}\n\t\t}\n\t\tdelete binding.s[binding.cbId];\n\t}\n}\n\nfunction $unlink(to) {\n\tif (to) {\n\t\tto = to.jquery ? to : $(to);\n\t\tto.each(function() {\n\t\t\tvar innerView;\n\t\t\t//TODO fix this for better perf. Rather that calling inner view multiple times which does querySelectorAll each time, consider a single querySelectorAll\n\t\t\t// or simply call view.removeViews() on the top-level views under the target 'to' node, then clean(...)\n\t\t\twhile ((innerView = $view(this, true)) && innerView.parent) {\n\t\t\t\tinnerView.parent.removeViews(innerView._.key, undefined, true);\n\t\t\t}\n\t\t\tclean(this.getElementsByTagName(\"*\"));\n\t\t});\n\t\tclean(to);\n\t} else {\n\t\t// Call to $.unlink() is equivalent to $.unlink(true, \"body\")\n\t\tif (activeBody) {\n\t\t\t$(activeBody)\n\t\t\t\t.off(elementChangeStr, onElemChange)\n\t\t\t\t.off('blur.jsv', '[contenteditable]', onElemChange);\n\t\t\tactiveBody = undefined;\n\t\t}\n\t\ttopView.removeViews();\n\t\tclean(document.body.getElementsByTagName(\"*\"));\n\t}\n}\n\n//========\n// Helpers\n//========\n\nfunction inputAttrib(elem) {\n\treturn elem.type === CHECKBOX ? elem[CHECKED] : elem.value;\n}\n\nfunction changeHandler(view, name, tag) {\n\t// Get onBeforeChange, onAfterChange, onAfterCreate handler - if there is one;\n\treturn tag && tag[name] || view.ctx[name] && view.ctxPrm(name) || $views.helpers[name];\n}\n\n//========================== Initialize ==========================\n\n//=====================\n// JsRender integration\n//=====================\n\naddLinkMethods($sub.View.prototype); // Modify the View prototype to include link methods\n\n$sub.onStore.template = function(name, item, parentTmpl) {\n\tif (item === null) {\n\t\tdelete $.link[name];\n\t\tdelete $.render[name];\n\t} else {\n\t\titem.link = tmplLink;\n\n\t\tif (name && !parentTmpl && name !== \"jsvTmpl\") {\n\t\t\t$.render[name] = item;\n\t\t\t$.link[name] = function() {\n\t\t\t\treturn tmplLink.apply(item, arguments);\n\t\t\t};\n\t\t}\n\t}\n};\n\n$sub.viewInfos = viewInfos; // Expose viewInfos() as public helper method\n\n// Define JsViews version of delimiters(), and initialize\n($viewsSettings.delimiters = function() {\n\t// Run delimiters initialization in context of jsrender.js\n\tvar ret = oldJsvDelimiters.apply(0, arguments),\n\t\t// Now set also delimOpenChar0 etc. in context of jquery.views.js...\n\t\tdelimChars = $subSettings.delimiters;\n\n\tdelimOpenChar0 = delimChars[0].charAt(0);\n\tdelimOpenChar1 = delimChars[0].charAt(1);\n\tdelimCloseChar0 = delimChars[1].charAt(0);\n\tdelimCloseChar1 = delimChars[1].charAt(1);\n\tlinkChar = delimChars[2];\n\n\t// Data-linking must use new delimiters\n\trTagDatalink = new RegExp(\"(?:^|\\\\s*)([\\\\w-]*)(\\\\\" + linkChar + \")?(\\\\\" + delimOpenChar1 + $sub.rTag + \"(:\\\\w*)?\\\\\" + delimCloseChar0 + \")\", \"g\");\n\treturn ret;\n})(); // jshint ignore:line\n\n$sub.addSetting(\"trigger\");\n\n//====================================\n// Additional members for linked views\n//====================================\n\nfunction transferViewTokens(prevNode, nextNode, parentElem, id, viewOrTagChar, refresh) {\n\t// Transfer tokens on prevNode of viewToRemove/viewToRefresh to nextNode or parentElem._df\n\t// view marker tokens: #m_...VIEW.../m_\n\t// tag marker tokens: #m^...TAG..../m^\n\n\tvar i, l, vwInfos, vwInfo, viewOrTag, viewId, tokens,\n\t\tprecedingLength = 0,\n\t\temptyView = prevNode === nextNode;\n\n\tif (prevNode) {\n\t\t// prevNode is either the first node in the viewOrTag, or has been replaced by the vwInfos tokens string\n\t\tvwInfos = viewInfos(prevNode) || [];\n\t\tfor (i = 0, l = vwInfos.length; i < l; i++) {\n\t\t\t// Step through views or tags on the prevNode\n\t\t\tvwInfo = vwInfos[i];\n\t\t\tviewId = vwInfo.id;\n\t\t\tif (viewId === id && vwInfo.ch === viewOrTagChar) {\n\t\t\t\tif (refresh) {\n\t\t\t\t\t// This is viewOrTagToRefresh, this is the last viewOrTag to process...\n\t\t\t\t\tl = 0;\n\t\t\t\t} else {\n\t\t\t\t\t// This is viewOrTagToRemove, so we are done...\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!emptyView) {\n\t\t\t\tviewOrTag = vwInfo.ch === \"_\"\n\t\t\t\t\t? viewStore[viewId] // A view: \"#m_\" or \"/m_\"\n\t\t\t\t\t: bindingStore[viewId].linkCtx.tag; // A tag \"#m^\" or \"/m^\"\n\t\t\t\tif (vwInfo.open) { // A \"#m_\" or \"#m^\" token\n\t\t\t\t\tviewOrTag._prv = nextNode;\n\t\t\t\t} else if (vwInfo.close) { // A \"/m_\" or \"/m^\" token\n\t\t\t\t\tviewOrTag._nxt = nextNode;\n\t\t\t\t}\n\t\t\t}\n\t\t\tprecedingLength += viewId.length + 2;\n\t\t}\n\n\t\tif (precedingLength) {\n\t\t\tprevNode.setAttribute(jsvAttrStr, prevNode.getAttribute(jsvAttrStr).slice(precedingLength));\n\t\t}\n\t\ttokens = nextNode ? nextNode.getAttribute(jsvAttrStr) : parentElem._df;\n\t\tif (l = tokens.indexOf(\"/\" + id + viewOrTagChar) + 1) {\n\t\t\ttokens = vwInfos._tkns.slice(0, precedingLength) + tokens.slice(l + (refresh ? -1 : id.length + 1));\n\t\t}\n\t\tif (tokens) {\n\t\t\tif (nextNode) {\n\t\t\t\t// If viewOrTagToRemove was an empty viewOrTag, we will remove both #n and /n\n\t\t\t\t// (and any intervening tokens) from the nextNode (=== prevNode)\n\t\t\t\t// If viewOrTagToRemove was not empty, we will take tokens preceding #n from prevNode,\n\t\t\t\t// and concatenate with tokens following /n on nextNode\n\t\t\t\tnextNode.setAttribute(jsvAttrStr, tokens);\n\t\t\t} else {\n\t\t\t\tsetDefer(parentElem, tokens);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// !prevNode, so there may be a deferred nodes token on the parentElem. Remove it.\n\t\tsetDefer(parentElem, removeSubStr(parentElem._df, \"#\" + id + viewOrTagChar));\n\t\tif (!refresh && !nextNode) {\n\t\t\t// If this viewOrTag is being removed, and there was no .nxt, remove closing token from deferred tokens\n\t\t\tsetDefer(parentElem, removeSubStr(parentElem._df, \"/\" + id + viewOrTagChar));\n\t\t}\n\t}\n}\n\nfunction disposeTokens(tokens, elem) {\n\tvar i, l, vwItem, vwInfos;\n\tif (vwInfos = viewInfos(tokens, true, rOpenMarkers)) {\n\t\tfor (i = 0, l = vwInfos.length; i < l; i++) {\n\t\t\tvwItem = vwInfos[i];\n\t\t\tif (vwItem.ch === \"_\") {\n\t\t\t\tif ((vwItem = viewStore[vwItem.id]) && vwItem.type && (!elem || vwItem._prv === elem || vwItem.parentElem === elem )) {\n\t\t\t\t\t// If this is the _prv (prevNode) for a view, remove the view\n\t\t\t\t\t// - unless view.type is undefined, in which case it is already being removed\n\t\t\t\t\t// (or unless the elem is not related - e.g. a cloned element which 'accidentally' picked up the data-jsv atttribute of the ._df expando)\n\t\t\t\t\tvwItem.parent.removeViews(vwItem._.key, undefined, true);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveViewBinding(vwItem.id, undefined, elem); // unbind bindings with this bindingId on this view\n\t\t\t}\n\t\t}\n\t}\n}\n\n//============================================\n// Add link methods to data-linked view or tag\n//============================================\n\nfunction updateValue(val, index, tagElse, bindId, ev) {\n// Observably update a data value targeted by bindTo\n// Called when linkedElem changes: called as updateValue(val, index, tagElse, bindId, ev) - this: undefined\n// Called directly as tag.updateValue(val, index, tagElse) - this: tag\n\tvar values = [];\n\tif (this && this._tgId) {\n\t\tbindId = this;\n\t}\n\tvalues[index||0] = val;\n\tupdateValues(values, tagElse, bindId, ev);\n\treturn this;\n}\n\nfunction setValues() {\n\tvar args = arguments,\n\t\tm = args.length;\n\n\tif (!m) {\n\t\targs = this.tag.cvtArgs(undefined, 1, this.index); // setValues() with no arguments calls setValue with boundArgs values\n\t\tm = args.length;\n\t}\n\twhile (m--) {\n\t\tthis.tag.setValue(args[m], m, this.index);\n\t}\n}\n\nfunction addLinkMethods(tagOrView) { // tagOrView is View prototype or tag instance\n\n\tvar l, m, tagCtx, boundProps, bindTo, key, theTag, theView;\n\n\ttagOrView.contents = function(deep, select) {\n\t\t// For a view, a tag or a tagCtx, return jQuery object with the content nodes,\n\t\tif (deep !== !!deep) {\n\t\t\t// deep not boolean, so this is contents(selector)\n\t\t\tselect = deep;\n\t\t\tdeep = undefined;\n\t\t}\n\t\tvar filtered,\n\t\t\tnodes = $(this.nodes());\n\t\tif (nodes[0]) {\n\t\t\tfiltered = select ? nodes.filter(select) : nodes;\n\t\t\tnodes = deep && select ? filtered.add(nodes.find(select)) : filtered;\n\t\t}\n\t\treturn nodes;\n\t};\n\n\ttagOrView.nodes = function(withMarkers, prevNode, nextNode) {\n\t\t// For a view, a tag or a tagCtx, return top-level nodes\n\t\t// Do not return any script marker nodes, unless withMarkers is true\n\t\t// Optionally limit range, by passing in prevNode or nextNode parameters\n\n\t\tvar node,\n\t\t\tself = this.contentView || this, // If tagCtx, use tagCtx.contentView\n\t\t\telCnt = self._elCnt,\n\t\t\tprevIsFirstNode = !prevNode && elCnt,\n\t\t\tnodes = [];\n\n\t\tif (!self.args) { // If tagCtx with no content (so no contentView) self is tagCtx: return empty [];\n\t\t\tprevNode = prevNode || self._prv;\n\t\t\tnextNode = nextNode || self._nxt;\n\n\t\t\tnode = prevIsFirstNode\n\t\t\t\t? (prevNode === self._nxt\n\t\t\t\t\t? self.parentElem.lastSibling\n\t\t\t\t\t: prevNode)\n\t\t\t\t: (self.inline === false\n\t\t\t\t\t? prevNode || self.linkCtx.elem.firstChild\n\t\t\t\t\t: prevNode && prevNode.nextSibling);\n\n\t\t\twhile (node && (!nextNode || node !== nextNode)) {\n\t\t\t\tif (withMarkers || elCnt || node.tagName !== SCRIPT) {\n\t\t\t\t\t// All the top-level nodes in the view\n\t\t\t\t\t// (except script marker nodes, unless withMarkers = true)\n\t\t\t\t\t// (Note: If a script marker node, viewInfo.elCnt undefined)\n\t\t\t\t\tnodes.push(node);\n\t\t\t\t}\n\t\t\t\tnode = node.nextSibling;\n\t\t\t}\n\t\t}\n\t\treturn nodes;\n\t};\n\n\ttagOrView.childTags = function(deep, tagName) {\n\t\t// For a view, a tagor a tagCtx, return child tags - at any depth, or as immediate children only.\n\t\tif (deep !== !!deep) {\n\t\t\t// deep not boolean, so this is childTags(tagName) - which looks for top-level tags of given tagName\n\t\t\ttagName = deep;\n\t\t\tdeep = undefined;\n\t\t}\n\n\t\tvar self = this.contentView || this, // If tagCtx, use tagCtx.contentView\n\t\t\tview = self.link ? self : self.tagCtx.view, // This may be a view or a tag. If a tag, get the view from tag.tagCtx.view\n\t\t\tprevNode = self._prv,\n\t\t\telCnt = self._elCnt,\n\t\t\ttags = [];\n\n\t\tif (!self.args) { // If tagCtx with no content (so no contentView) self is tagCtx: return empty [];\n\t\t\tview.link(\n\t\t\t\tundefined,\n\t\t\t\tself.parentElem,\n\t\t\t\telCnt ? prevNode && prevNode.previousSibling : prevNode,\n\t\t\t\tself._nxt,\n\t\t\t\tundefined,\n\t\t\t\t{get:{\n\t\t\t\t\ttags: tags,\n\t\t\t\t\tdeep: deep,\n\t\t\t\t\tname: tagName,\n\t\t\t\t\tid: self.link ? self._.id + \"_\" : self._tgId + \"^\"\n\t\t\t\t}}\n\t\t\t);\n\t\t}\n\t\treturn tags;\n\t};\n\n\tif (tagOrView._is === \"tag\") {\n\t\t//=======================\n\t\t// This is a TAG instance\n\t\t//=======================\n\n\t\ttheTag = tagOrView;\n\n\t\tm = theTag.tagCtxs.length;\n\t\twhile (m--) {\n\t\t\ttagCtx = theTag.tagCtxs[m];\n\n\t\t\ttagCtx.setValues = setValues;\n\t\t\ttagCtx.cvtArgs = $sub._tg.prototype.cvtArgs;\n\t\t\ttagCtx.bndArgs = $sub._tg.prototype.bndArgs;\n\t\t\ttagCtx.contents = tagOrView.contents;\n\t\t\ttagCtx.childTags = tagOrView.childTags;\n\t\t\ttagCtx.nodes = tagOrView.nodes;\n\t\t}\n\n\t\tboundProps = theTag.boundProps = theTag.boundProps || [];\n\t\tif (bindTo = theTag.linkTo ? [\"linkTo\"] : theTag.bindTo) {\n\t\t\tl = bindTo.length;\n\t\t\twhile (l--) {\n\t\t\t\tkey = bindTo[l];\n\t\t\t\tif (key + \"\" === key) {\n\t\t\t\t\tbindTo[key] = 1;\n\t\t\t\t\tif ($.inArray(key, boundProps) < 0) {\n\t\t\t\t\t\tboundProps.push(key); // Add any 'bindTo' props to boundProps array. (So two-way binding works without writing ^foo=expression)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttheTag.setValue = $sub._gm(theTag.constructor.prototype.setValue, function(val, index, tagElse) {\n\t\t\tif (!theTag._.chg) { // if the tag is not updating itself\n\t\t\t\tif (!arguments.length) { // tag.setValue() calls setValue(val, index) for each parameter in bindTo array\n\t\t\t\t\ttheTag.setValues(); // = theTag.bndArgs()\n\t\t\t\t\treturn theTag;\n\t\t\t\t}\n\t\t\t\tvar linkedElem, linkedEl, linkedTag,\n\t\t\t\t\tlinkedCtxParam = theTag.linkedCtxParam,\n\t\t\t\t\ttagCtx = theTag.tagCtxs[tagElse || 0],\n\t\t\t\t\tprops = tagCtx.props,\n\t\t\t\t\tlinkCtx = theTag.linkCtx,\n\t\t\t\t\tlinkedElems = tagCtx.linkedElems || theTag.linkedElem && [theTag.linkedElem];\n\n\t\t\t\tif (val !== undefined) {\n\t\t\t\t\ttheTag.base.call(theTag , val, index, tagElse);\n\t\t\t\t} else if (theTag.getValue && (val = theTag.getValue(tagElse)) && val !== undefined) {\n\t\t\t\t\t// If bound args are not initialized, and getValue is defined, use getValue to initialize\n\t\t\t\t\tif (theTag.bindTo.length > 1) {\n\t\t\t\t\t\tval = val[index]; // getVal returns value if tag.bndArgs() (and bindTo) length is 1, or array of values if bindTo.length > 1\n\t\t\t\t\t}\n\t\t\t\t\tif (linkedCtxParam && linkedCtxParam[index]) {\n\t\t\t\t\t\t// Values of tag contextual param were already intialized (during rendering) so need to observably update to values from tag.getValue()\n\t\t\t\t\t\t$.observable(tagCtx.ctx[linkedCtxParam[index]][0]).setProperty(_ocp, val);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((linkedElem = linkedElems && linkedElems[index]) && linkedElem[0]) {\n\t\t\t\t\tl = linkedElem.length;\n\t\t\t\t\twhile (l--) {\n\t\t\t\t\t\tlinkedEl = linkedElem[l];\n\t\t\t\t\t\tif (theTag._.unlinked && linkedEl !== linkCtx.elem) {\n\t\t\t\t\t\t\tlinkedTag = linkedEl._jsvLkEl;\n\t\t\t\t\t\t\tif (theTag.inline && (!linkedTag || linkedTag !== theTag)) {\n\t\t\t\t\t\t\t\tif (linkedTag) {\n\t\t\t\t\t\t\t\t\tval = linkedTag.cvtArgs(undefined, 1, tagElse)[index]; // Need to use converter of linked tag\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// For data-linked tags, identify the linkedEl with the tag, for \"to\" binding\n\t\t\t\t\t\t\t\t// (For data-linked elements, if not yet bound, we identify later when the linkCtx.elem is bound)\n\t\t\t\t\t\t\t\tlinkedEl._jsvLkEl = theTag;\n\t\t\t\t\t\t\t\tlinkedEl._jsvInd = index;\n\t\t\t\t\t\t\t\tlinkedEl._jsvElse = tagElse;\n\t\t\t\t\t\t\t\tbindLinkedElChange(theTag, linkedEl);\n\t\t\t\t\t\t\t\tlinkedEl._jsvBnd = \"&\" + theTag._tgId + \"+\"; // Add a \"+\" for cloned binding - so removing\n\t\t\t\t\t\t\t\t// elems with cloned bindings will not remove the 'parent' binding from the bindingStore.\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (val !== undefined && !linkedEl._jsvChg && linkCtx._val !== val) {\n\t\t\t\t\t\t\tif (linkedEl.value !== undefined) {\n\t\t\t\t\t\t\t\tif (linkedEl.type === CHECKBOX) {\n\t\t\t\t\t\t\t\t\tlinkedEl[CHECKED] = val && val !== \"false\";\n\t\t\t\t\t\t\t\t} else if (linkedEl.type === RADIO) {\n\t\t\t\t\t\t\t\t\tlinkedEl[CHECKED] = (linkedEl.value === val);\n\t\t\t\t\t\t\t\t} else if ($isArray(val)) {\n\t\t\t\t\t\t\t\t\tlinkedEl.value = val; // Don't use jQuery since it replaces array by mapped clone\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$(linkedEl).val(val); // Use jQuery for attrHooks - can't just set value (on select, for example)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (linkedEl.contentEditable === TRUE) {\n\t\t\t\t\t\t\t\tlinkedEl.innerHTML = val;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (props.name) {\n\t\t\t\t\t\t\tlinkedEl.name = linkedEl.name || props.name;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn theTag;\n\t\t});\n\n\t\ttheTag.updateValue = updateValue;\n\n\t\ttheTag.updateValues = function() {\n\t\t\treturn updateValues(arguments, undefined, this);\n\t\t};\n\n\t\ttheTag.setValues = function() {\n\t\t\tvar m = arguments.length ? 1 : theTag.tagCtxs.length;\n\t\t\twhile (m--) {\n\t\t\t\tsetValues.apply(theTag.tagCtxs[m], arguments);\n\t\t\t}\n\t\t};\n\n\t\ttheTag.refresh = function(sourceValue) {\n\t\t\tvar attr,\n\t\t\t\tlinkCtx = theTag.linkCtx,\n\t\t\t\tview = theTag.tagCtx.view;\n\n\t\t\tif (theTag.onUnbind) {\n\t\t\t\ttheTag.onUnbind(theTag.tagCtx, linkCtx, theTag.ctx);\n\t\t\t}\n\t\t\tattr = theTag.inline ? HTML : (linkCtx.attr || defaultAttr(theTag.parentElem, true));\n\t\t\tsourceValue = $sub._tag(theTag, view, view.tmpl, mergeCtxs(theTag), true); // Get rendered HTML for tag, based on refreshed tagCtxs\n\t\t\tupdateContent(sourceValue, linkCtx, attr, theTag);\n\t\t\tcallAfterLink(theTag);\n\t\t\treturn theTag;\n\t\t};\n\n\t\ttheTag.domChange = function() { // domChange notification support\n\t\t\tvar elem = this.parentElem,\n\t\t\t\thasListener = $.hasData(elem) && $._data(elem).events,\n\t\t\t\tdomChangeNotification = \"jsv-domchange\";\n\n\t\t\tif (hasListener && hasListener[domChangeNotification]) {\n\t\t\t\t// Only trigger handler if there is a handler listening for this event. (Note using triggerHandler - so no event bubbling.)\n\t\t\t\t$(elem).triggerHandler(domChangeNotification, arguments);\n\t\t\t}\n\t\t};\n\n\t\t//====================================\n\t\t// End of added link methods for TAG\n\t\t//====================================\n\t} else {\n\t\t//=========================\n\t\t// This is a VIEW prototype\n\t\t//=========================\n\n\t\ttheView = tagOrView;\n\n\t\t// Note: a linked view will also, after linking have nodes[], _prv (prevNode), _nxt (nextNode) ...\n\t\ttheView.addViews = function(index, dataItems) {\n\t\t\t// if view is not an array view, do nothing\n\t\t\tvar i, viewsCount,\n\t\t\t\tview = this,\n\t\t\t\titemsCount = dataItems.length,\n\t\t\t\tviews = view.views;\n\n\t\t\tif (!view._.useKey && itemsCount) {\n\t\t\t\t// view is of type \"array\"\n\t\t\t\tviewsCount = views.length + itemsCount;\n\n\t\t\t\tif (viewsCount === view.data.length // If views not already synced to array (e.g. triggered by array.length propertyChange - jsviews/issues/301)\n\t\t\t\t\t\t&& renderAndLink(view, index, view.tmpl, views, dataItems, view.ctx) !== false) {\n\t\t\t\t\tif (!view._.srt) { // Not part of a 'sort' on refresh\n\t\t\t\t\t\tview.fixIndex(index + itemsCount);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\ttheView.removeViews = function(index, itemsCount, keepNodes, isMove) {\n\t\t\t// view.removeViews() removes all the child views\n\t\t\t// view.removeViews(index) removes the child view with specified index or key\n\t\t\t// view.removeViews(index, count) removes the specified nummber of child views, starting with the specified index\n\t\t\tfunction removeView(index) {\n\t\t\t\tvar id, bindId, parentElem, prevNode, nextNode, nodesToRemove,\n\t\t\t\t\tviewToRemove = views[index];\n\n\t\t\t\tif (viewToRemove && viewToRemove.link) {\n\t\t\t\t\tid = viewToRemove._.id;\n\t\t\t\t\tif (!keepNodes) {\n\t\t\t\t\t\t// Remove the HTML nodes from the DOM, unless they have already been removed, including nodes of child views\n\t\t\t\t\t\tnodesToRemove = viewToRemove.nodes();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove child views, without removing nodes\n\t\t\t\t\tviewToRemove.removeViews(undefined, undefined, true);\n\n\t\t\t\t\tviewToRemove.type = undefined; // Set type to undefined: used as a flag that this view is being removed\n\t\t\t\t\tprevNode = viewToRemove._prv;\n\t\t\t\t\tnextNode = viewToRemove._nxt;\n\t\t\t\t\tparentElem = viewToRemove.parentElem;\n\t\t\t\t\t// If prevNode and nextNode are the same, the view is empty\n\t\t\t\t\tif (!keepNodes) {\n\t\t\t\t\t\t// Remove the HTML nodes from the DOM, unless they have already been removed, including nodes of child views\n\t\t\t\t\t\tif (viewToRemove._elCnt) {\n\t\t\t\t\t\t\t// if keepNodes is false (and transferring of tokens has not already been done at a higher level)\n\t\t\t\t\t\t\t// then transfer tokens from prevNode which is being removed, to nextNode.\n\t\t\t\t\t\t\ttransferViewTokens(prevNode, nextNode, parentElem, id, \"_\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$(nodesToRemove).remove();\n\t\t\t\t\t}\n\t\t\t\t\tif (!viewToRemove._elCnt) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tprevNode.parentNode.removeChild(prevNode); // (prevNode.parentNode is parentElem, except if jQuery Mobile or similar has inserted an intermediate wrapper\n\t\t\t\t\t\t\tnextNode.parentNode.removeChild(nextNode);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\t\t\t\t\tsetArrayChangeLink(viewToRemove);\n\t\t\t\t\tfor (bindId in viewToRemove._.bnds) {\n\t\t\t\t\t\tremoveViewBinding(bindId);\n\t\t\t\t\t}\n\t\t\t\t\tdelete viewStore[id];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar current, childView, viewsCount,\n\t\t\t\tview = this,\n\t\t\t\tisArray = !view._.useKey,\n\t\t\t\tviews = view.views;\n\n\t\t\tif (isArray) {\n\t\t\t\tviewsCount = views.length;\n\t\t\t}\n\t\t\tif (index === undefined) {\n\t\t\t\t// Remove all child views\n\t\t\t\tif (isArray) {\n\t\t\t\t\t// views and data are arrays\n\t\t\t\t\tcurrent = viewsCount;\n\t\t\t\t\twhile (current--) {\n\t\t\t\t\t\tremoveView(current);\n\t\t\t\t\t}\n\t\t\t\t\tview.views = [];\n\t\t\t\t} else {\n\t\t\t\t\t// views and data are objects\n\t\t\t\t\tfor (childView in views) {\n\t\t\t\t\t\t// Remove by key\n\t\t\t\t\t\tremoveView(childView);\n\t\t\t\t\t}\n\t\t\t\t\tview.views = {};\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (itemsCount === undefined) {\n\t\t\t\t\tif (isArray) {\n\t\t\t\t\t\t// The parentView is data array view.\n\t\t\t\t\t\t// Set itemsCount to 1, to remove this item\n\t\t\t\t\t\titemsCount = 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Remove child view with key 'index'\n\t\t\t\t\t\tremoveView(index);\n\t\t\t\t\t\tdelete views[index];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isArray && itemsCount\n\t\t\t\t\t&& (isMove || viewsCount - itemsCount === view.data.length)) { // If views not already synced to array (e.g. triggered by array.length propertyChange - jsviews/issues/301)\n\t\t\t\t\tcurrent = index + itemsCount;\n\t\t\t\t\t// Remove indexed items (parentView is data array view);\n\t\t\t\t\twhile (current-- > index) {\n\t\t\t\t\t\tremoveView(current);\n\t\t\t\t\t}\n\t\t\t\t\tviews.splice(index, itemsCount);\n\t\t\t\t\tif (!view._.srt) {\n\t\t\t\t\t\tview.fixIndex(index);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\ttheView.moveViews = function(oldIndex, index, itemsCount) {\n\t\t\tfunction parts(itemView, str) {\n\t\t\t\treturn RegExp(\"^(.*)(\" + (str ? \"\\\\/\" : \"#\") + itemView._.id + \"_.*)$\").exec(str || itemView._prv.getAttribute(jsvAttrStr));\n\t\t\t}\n\t\t\tfunction setPrv(itemView, tokens) {\n\t\t\t\titemView._prv.setAttribute(jsvAttrStr, tokens);\n\t\t\t}\n\t\t\tvar nodes, childView, nxtView, insertBefore, viewId,\n\t\t\t\tview = this,\n\t\t\t\tselfNxt = view._nxt,\n\t\t\t\tviews = view.views,\n\t\t\t\tbackwards = index < oldIndex,\n\t\t\t\tfirstChange = backwards ? index : oldIndex,\n\t\t\t\tlastChange = backwards ? oldIndex : index,\n\t\t\t\ti = index,\n\t\t\t\tmovedNodes = [],\n\n\t\t\t\tviewsToMove = views.splice(oldIndex, itemsCount); // remove\n\n\t\t\tif (index > views.length) {\n\t\t\t\tindex = views.length;\n\t\t\t}\n\t\t\tviews.splice.apply(views, [index, 0].concat(viewsToMove)); //re-insert\n\n\t\t\titemsCount = viewsToMove.length;\n\t\t\tinsertBefore = index + itemsCount;\n\t\t\tlastChange += itemsCount;\n\n\t\t\tfor (i; i < insertBefore; i++) {\n\t\t\t\tchildView = views[i];\n\t\t\t\tnodes = childView.nodes(true);\n\t\t\t\tmovedNodes = view._elCnt ? movedNodes.concat(nodes) : movedNodes.concat(childView._prv, nodes, childView._nxt);\n\t\t\t}\n\t\t\tmovedNodes = $(movedNodes);\n\n\t\t\tif (insertBefore < views.length) {\n\t\t\t\tmovedNodes.insertBefore(views[insertBefore]._prv);\n\t\t\t} else if (selfNxt) {\n\t\t\t\tmovedNodes.insertBefore(selfNxt);\n\t\t\t} else {\n\t\t\t\tmovedNodes.appendTo(view.parentElem);\n\t\t\t}\n\n\t\t\tif (view._elCnt) {\n\t\t\t\tvar afterParts,\n\t\t\t\t\tendChange = backwards ? firstChange + itemsCount : lastChange - itemsCount,\n\t\t\t\t\tbeforeView = views[firstChange-1],\n\t\t\t\t\tstartView = views[firstChange],\n\t\t\t\t\tendView = views[endChange],\n\t\t\t\t\tafterView = views[lastChange],\n\t\t\t\t\tstartParts = parts(startView),\n\t\t\t\t\tendParts = parts(endView);\n\n\t\t\t\tsetPrv(startView, endParts[1] + startParts[2]);\n\t\t\t\tif (afterView) {\n\t\t\t\t\tafterParts = parts(afterView);\n\t\t\t\t\tsetPrv(afterView, startParts[1] + afterParts[2]);\n\t\t\t\t} else {\n\t\t\t\t\tif (selfNxt) {\n\t\t\t\t\t\tafterParts = parts(view, selfNxt.getAttribute(jsvAttrStr));\n\t\t\t\t\t\tselfNxt.setAttribute(jsvAttrStr, startParts[1] + afterParts[2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tafterParts = parts(view, view.parentElem._df);\n\t\t\t\t\t\tsetDefer(view.parentElem, startParts[1] + afterParts[2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsetPrv(endView, afterParts[1] + endParts[2]);\n\t\t\t\tif (beforeView) {\n\t\t\t\t\tbeforeView._nxt = startView._prv;\n\t\t\t\t} else {\n\t\t\t\t\tview._prv = startView._prv;\n\t\t\t\t}\n\t\t\t\tviews[endChange-1]._nxt = endView._prv;\n\t\t\t\tviews[lastChange-1]._nxt = afterView ? afterView._prv : selfNxt;\n\t\t\t}\n\t\t\tview.fixIndex(firstChange);\n\t\t};\n\n\t\ttheView.refresh = function() {\n\t\t\tvar view = this,\n\t\t\t\tparent = view.parent;\n\n\t\t\tif (parent) {\n\t\t\t\trenderAndLink(view, view.index, view.tmpl, parent.views, view.data, undefined, true);\n\t\t\t\tsetArrayChangeLink(view);\n\t\t\t}\n\t\t};\n\n\t\ttheView.fixIndex = function(fromIndex) {\n\t\t\t// Fixup index on following view items...\n\t\t\tvar views = this.views,\n\t\t\t\tindex = views.length;\n\t\t\twhile (fromIndex < index--) {\n\t\t\t\tif (views[index].index !== index) {\n\t\t\t\t\t$observable(views[index]).setProperty(\"index\", index);\n\t\t\t\t\t// This is fixing up index, but not key, and not index on child views. From child views, use view.getIndex()\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\ttheView.link = viewLink;\n\n\t\t//====================================\n\t\t// End of added link methods for VIEW\n\t\t//====================================\n\t}\n}\n\n//========================\n// JsViews-specific converters\n//========================\n\n$converters.merge = function(val) {\n\t// Special converter used in data-linking to space-separated lists, such as className:\n\t// Currently only supports toggle semantics - and has no effect if toggle string is not specified\n\t// data-link=\"class{merge:boolExpr toggle=className}\"\n\tvar regularExpression,\n\t\tcurrentValue = this.linkCtx.elem.className,\n\t\ttoggle = this.tagCtx.props.toggle;\n\n\tif (toggle) {\n\t\t// We are toggling the class specified by the toggle property,\n\t\t// and the boolean val binding is driving the insert/remove toggle\n\n\t\tregularExpression = toggle.replace(/[\\\\^$.|?*+()[{]/g, \"\\\\$&\");\n\t\t// Escape any regular expression special characters (metacharacters) within the toggle string\n\t\tregularExpression = \"(\\\\s(?=\" + regularExpression + \"$)|(\\\\s)|^)(\" + regularExpression + \"(\\\\s|$))\";\n\t\t// Example: /(\\s(?=myclass$)|(\\s)|^)?(myclass(\\s|$))/ - so matches (\" myclass\" or \" \" or ^ ) followed by (\"myclass \" or \"myclass$\") where ^/$ are beginning/end of string\n\t\tcurrentValue = currentValue.replace(new RegExp(regularExpression), \"$2\");\n\t\tval = currentValue + (val ? (currentValue && \" \") + toggle : \"\");\n\t}\n\treturn val;\n};\n\n//========================\n// JsViews-specific tags\n//========================\n\n$tags({\n\ton: {\n\t\tattr: NONE,\n\t\tinit: function(tagCtx) {\n\t\t\tvar content,\n\t\t\t\ttag = this,\n\t\t\t\ti = 0,\n\t\t\t\targs = tagCtx.args, // [events,] [selector,] handler\n\t\t\t\tl = args.length;\n\n\t\t\tfor (; ii && i+1; // handler index\n\t\t\tif (tag.inline) {\n\t\t\t\tif (!$sub.rTmpl.exec(content = $.trim(tagCtx.tmpl.markup))) {\n\t\t\t\t\t// Inline {^{on}} tag with no content (or external template content) or with content containing\n\t\t\t\t\t// no HTML or JsRender tags: We will wrap the (text) content, or the operation name in a \";\n\t\t\t\t}\n\t\t\t\ttag.attr = HTML;\n\t\t\t}\n\t\t},\n\t\tonBeforeBind: function() {\n\t\t\tif (this.template) { // {^{on/}} with no content has template rendering
\", \"
\"],\n\t\ttr: [2, \"\", \"
\"],\n\t\ttd: [3, \"\", \"
\"],\n\t\tcol: [2, \"\", \"
\"],\n\t\tsvg_ns: [1, \"\", \"\"],\n\t\t// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,\n\t\t// unless wrapped in a div with non-breaking characters in front of it.\n\t\tdiv: $.support.htmlSerialize ? [0, \"\", \"\"] : [1, \"X
\", \"
\"]\n\t},\n\t_fe: {\n\t\tinput: {\n\t\t\tfrom: inputAttrib, to: VALUE\n\t\t},\n\t\ttextarea: valueBinding,\n\t\tselect: valueBinding,\n\t\toptgroup: {\n\t\t\tto: \"label\"\n\t\t}\n\t}\n});\n\n\treturn $;\n}, window));\n"]} \ No newline at end of file +{"version":3,"sources":["jquery.views.js"],"names":["factory","global","$","jQuery","exports","module","define","amd","jsr","jso","updateValues","sourceValues","tagElse","bindId","ev","linkCtx","cvtBack","cnvtName","target","view","binding","sourceValue","origVals","sourceElem","sourceEl","oldLinkCtx","tos","to","tcpTag","exprOb","contextCb","l","tag","_tgId","bindingStore","elem","_cxp","path","_ocp","ind","_","chg","convertBack","$isFunction","getRsc","nodeName","multiple","_jsvSel","apply","undefined","$isArray","length","data","onBeforeUpdateVal","change","index","value","updateValue","setValue","_jsvInd","_jsvLkEl","_jsvElse","_cpfn","_ctxCb","_cpCtx","sb","$observable","setProperty","onElemChange","val","source","fromAttr","defaultAttr","setter","fnSetters","_jsvTr","delegateTarget","activeBody","type","attr","_jsvChg","rSplitBindings","lastIndex","exec","_jsvBnd","onDataLinkedTagChange","eventArgs","noUpdate","forceUpdate","hasError","onError","bindEarly","this","linkFn","fn","cvt","convert","parentElem","parentNode","onEvent","changeHandler","onBeforeChangeStr","call","prop","_toLk","_er","$sub","e","onRenderError","Function","props","args","VALUE","CHECKBOX","CHECKED","onUpdate","mergeCtxs","HTML","NONE","callAfterLink","observeAndBind","onAfterChangeStr","onUnbind","tagCtx","ctx","tagName","_cnvt","_tag","tmpl","TRUE","addLinkMethods","inline","template","updateContent","_noUpd","setDefer","_df","deferAttr","prevNode","nextNode","late","nodesToRemove","useProp","tokens","id","openIndex","closeIndex","testElem","cStyle","jsvSel","renders","targetParent","$target","targetVal","_val","unlinked","expr","_elCnt","_prv","_nxt","test","currentStyle","getComputedStyle","display","_jsvd","displayStyles","document","createElement","body","appendChild","removeChild","style","slice","RADIO","nodes","transferViewTokens","indexOf","disposeTokens","previousSibling","lastChild","remove","link","empty","children","textContent","innerText","selected","inArray","lateLink","arrayChangeHandler","self","onBeforeChange","onAfterChange","action","items","srt","refresh","addViews","removeViews","moveViews","oldIndex","fixIndex","setArrayChangeLink","handler","arrayBinding","bound","bnd","useKey","bndArr","off","arrayChangeStr","arrVws","arguments","on","linkGetVal","toLowerCase","$subSettingsAdvanced","_fe","contentEditable","from","renderAndLink","views","context","html","linkToNode","prevView","elCnt","error","bnds","removeViewBinding","nextSibling","render","addBindingMarkers","end","bindingKey","viewStore","k","linkedElem","exprFnDeps","propDeps","depends","tagDepends","linkedElems","cvtBk","_hdl","_dp","concat","_depends","deps","bdId","_apply","boundProps","paths","skp","$extend","_bndId","bindTo","linkedElement","linkedCtxParam","defineBindToDataTargets","bindLinkedElChange","flow","setAttribute","jsvAttrStr","getAttribute","lnkCtx","pop","tmplLink","noIteration","parentView","$link","tmplOrLinkExpr","jquery","useInput","elementChangeStr","i","vwInfos","placeholderParent","targetEl","topLevelCall","onRender","replaceMode","$view","topView","root","addDataBinding","markup","scp","cleanData","lnk","viewInfos","rOpenViewMarkers","parent","key","viewLink","outerData","validateOnly","convertMarkers","all","preceding","selfClose","closeTag","spaceBefore","boundId","spaceAfter","tag1","tag2","closeTag2","spaceAfterClose","selfClose2","endOpenTag","errorMsg","bndId","endOfElCnt","inTag","isVoid","parentTag","tagStack","shift","validate","voidElems","join","syntaxError","prevElCnt","elContent","defer","ids","openScript","closeScript","deferStack","charAt","unshift","badParent","processViewInfos","deferPath","deferChar","bindChar","onAftCr","deep","addedBindEls","_tkns","len","vwInfo","ch","j","open","push","onArrayChange","removeSubStr","onAfterCreateStr","onAfterCreate","bindEls","getViewInfos","level","named","_is","tagDepth","tags","dataLink","wrap","selector","linkViewsSel","get","elems","qsa","querySelectorAll","innerHTML","prevNodes","found","markerNodeInfo","contains","isLink","rViewMarkers","skip","processInfos","$viewsLinkAttr","rOpenTagMarkers","unmarkPrevOrNextNode","prevIds","linkInfo","token","nextView","node","depth","fragment","copiedNode","firstTag","wrapper","div","htmlTag","thisId","name","noValidate","markPrevOrNextNode","namespaceURI","rFirstElem","replace","rConvertMarkers","safeFragment","wrapMap","createDocumentFragment","firstChild","insertBefore","linkMarkup","currentView","boundTagId","tagExpr","rTagIndex","hasElse","linkExpressions","bindDataLinkTarget","normalizeLinkTag","rTagDatalink","delimCloseChar1","delimOpenChar0","delimOpenChar1","delimCloseChar0","isLk","links","tmplFn","View","extendCtx","_gccb","_lr","str","substr","SCRIPT","nodeType","isVal","rBinding","getInfos","close","elPath","infos","rMarkerTokens","removeAttribute","marker","twoway","trim","rEscapeQuotes","copyFromTagCtxToTag","mainElem","displayElem","linkedElements","m","$linkCtxElem","linkCtxElem","tagCtxElse","oldVal","tagCtxs","tagCtxslength","mainElement","displayElement","filter","Array","contents","eq","onBind","setSize","height","width","className","_jsvCl","hasClass","removeClass","addClass","onAfterLink","asyncOnElemChange","which","setTimeout","bindTriggerEvent","$elem","trig","onoff","$linkedElem","newTrig","oldTrig","trigger","$subSettings","pathIndex","lastPath","bindtoOb","obsCtxPrm","targetPaths","bindTos","targetPathsElses","_jsvto","resolveDataTargetPath","targetPath","topCp","split","_vw","newCtxs","newTagCtx","_ths","clean","bindings","elemArray","linkedElemTag","objId","object","obsId","map","allLinkedElems","cbId","propertyChangeStr","unmap","onDispose","s","$unlink","each","innerView","getElementsByTagName","inputAttrib","ctxPrm","$views","helpers","viewOrTagChar","viewOrTag","viewId","precedingLength","emptyView","vwItem","rOpenMarkers","values","setValues","cvtArgs","tagOrView","theTag","theView","select","filtered","add","find","withMarkers","contentView","prevIsFirstNode","lastSibling","childTags","_tg","prototype","bndArgs","linkTo","_gm","constructor","linkedEl","linkedTag","base","getValue","observable","domChange","hasListener","hasData","_data","events","domChangeNotification","triggerHandler","dataItems","viewsCount","itemsCount","keepNodes","isMove","removeView","viewToRemove","current","childView","isArray","splice","parts","itemView","RegExp","setPrv","selfNxt","backwards","firstChange","lastChange","movedNodes","viewsToMove","appendTo","afterParts","endChange","beforeView","startView","endView","afterView","startParts","endParts","fromIndex","observeProps","tgt","insert","observeMappedProps","item","src","removeProperty","oldValue","shallowArrayFilter","allPath","setGlobals","jsrender","requiresStr","sub","_jq","$observe","linkChar","$viewsSettings","settings","extend","isFunction","$converters","expando","converters","$tags","advanced","propChng","arrChng","syntaxErr","_err","oldAdvSet","bindElsSel","input","text","valueBinding","isCleanCall","oldCleanData","oldJsvDelimiters","delimiters","querySelector","ol","ul","table","tbody","thead","tfoot","tr","colgroup","dl","optgroup","svg","svg_ns","br","img","hr","area","col","meta","command","embed","keygen","param","track","wbr","rViewPath","observe","onStore","parentTmpl","ret","delimChars","rTag","addSetting","merge","regularExpression","currentValue","toggle","init","content","_hi","rTmpl","params","activeElem","contextOb","_sel","_evs","_hlr","contentCtx","dataBoundOnly","radiogroup","Math","random","domChngCntnr","forOrIfTagCtx","parentTags","checked","arrayView","targetLength","noVws","done","arrHandler","arrBinding","arrayBindings","_ars","tagCt","newTagCtxs","prevArg","different","tci","baseTag","dataMap","getTgt","obsSrc","obsTgt","tgtFlt","inner","getInnerView","nd","isVl","unlink","oldFn","result","0","_glt","regEx","linkCtxs","helper","last","nextPath","addedTagCpDep","_cp","paramVal","paramExpr","tagCtxPrm","linked","_crcp","res","storeView","store","_ocps","_ucp","_ceo","cloneExprObjects","obs","ob","clones","prm","advSet","_jsv","linkAttr","_wm","option","caption","th","td","useViews","legend","support","htmlSerialize","textarea","window"],"mappings":";CAeC,SAASA,EAASC,GAElB,GAAIC,GAAID,EAAOE,MAEQ,iBAAZC,SACVC,OAAOD,QAAUF,EACdF,EAAQC,EAAQC,GAChB,SAASA,GACV,MAAOF,GAAQC,EAAQC,IAEG,kBAAXI,SAAyBA,OAAOC,IACjDD,QAAQ,SAAU,aAAc,uBAAwB,SAASJ,EAAGM,EAAKC,GACxE,MAAOT,GAAQC,EAAQC,EAAGM,EAAKC,KAGhCT,EAAQC,GAAQ,IAKlB,SAASA,EAAQC,EAAGM,EAAKC,GACzB,YAwHA,SAASC,GAAaC,EAAcC,EAASC,EAAQC,GAIpD,GAAIC,GAASC,EAASC,EAAUC,EAAQC,EAAMC,EAASC,EAAaC,EAAUC,EAAYC,EACzFC,EAAYC,EAAKC,EAAIC,EAAQC,EAAQC,EAAWC,EAAGC,CAMpD,IAJInB,GAAUA,EAAOoB,QACpBD,EAAMnB,EACNA,EAASmB,EAAIC,QAEVb,E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AAQqV,GAAKrV,GAAQsV,IAGtBxI,GAAeQ,UACd2H,SAAU,YACVM,UAAU,EACV9V,YAAY,EAIZyV,KACCC,QAAS,EAAG,+BAAgC,aAC5CK,QAAS,EAAG,aAAc,eAC1BpG,MAAO,EAAG,QAAS,UACnBM,OAAQ,EAAG,WAAY,aACvBjB,OAAQ,EAAG,UAAW,YACtBE,IAAK,EAAG,iBAAkB,oBAC1B2G,IAAK,EAAG,qBAAsB,yBAC9BjG,KAAM,EAAG,mCAAoC,uBAC7CL,QAAS,EAAG,QAAS,UAGrB3P,IAAKlY,EAAEsuB,QAAQC,eAAiB,EAAG,GAAI,KAAO,EAAG,SAAU,WAE5DhhB,KACCmZ,OACCjZ,KAAMsS,EAAate,GAAIqF,IAExB0nB,SAAU5H,GACV5F,OAAQ4F,GACRe,UACClmB,GAAI,YAKCzB,GACLyuB","file":"jquery.views.min.js","sourcesContent":["/*! jquery.views.js v0.9.90 (Beta): http://jsviews.com/ */\n/*\n * Interactive data-driven views using JsRender templates.\n * Subcomponent of JsViews\n * Requires jQuery and jsrender.js (Best-of-breed templating in browser or on Node.js)\n * See JsRender at http://jsviews.com/#download and http://github.com/BorisMoore/jsrender\n * Also requires jquery.observable.js\n * See JsObservable at http://jsviews.com/#download and http://github.com/BorisMoore/jsviews\n *\n * Copyright 2017, Boris Moore\n * Released under the MIT License.\n */\n\n//jshint -W018, -W041, -W120\n\n(function(factory, global) {\n\t// global var is the this object, which is window when running in the usual browser environment\n\tvar $ = global.jQuery;\n\n\tif (typeof exports === \"object\") { // CommonJS e.g. Browserify\n\t\tmodule.exports = $\n\t\t\t? factory(global, $)\n\t\t\t: function($) { // If no global jQuery, take jQuery passed as parameter (with JsRender and JsObservable): require(\"jquery.views\")(jQuery)\n\t\t\t\treturn factory(global, $);\n\t\t\t};\n\t} else if (typeof define === \"function\" && define.amd) { // AMD script loader, e.g. RequireJS\n\t\tdefine([\"jquery\", \"./jsrender\", \"./jquery.observable\"], function($, jsr, jso) {\n\t\t\treturn factory(global, $, jsr, jso);\n\t\t}); // Require jQuery, JsRender, JsObservable\n\t} else { // Browser using plain ',\n\topenScript = ' - data-linked tag, close marker\n\t\t\t// We validate with inTag so no script markers are inserted in attribute context e.g. for:\n\t\t\t// \"\" or \"
...{{/if}}...\"\n\t\t\tpreceding = id\n\t\t\t\t? (preceding + endOfElCnt + spaceBefore + (inTag ? \"\" : openScript + id + closeScript)+ spaceAfter + tag)\n\t\t\t\t: endOfElCnt || all;\n\t\t}\n\n\t\tif (validate && boundId) {\n\t\t\tif (inTag) {\n\t\t\t\t// JsViews data-linking tags are not allowed within element markup.\n\t\t\t\t// See jsviews/issues/303\n\t\t\t\tsyntaxError('{^{ within elem markup (' + inTag + ' ). Use data-link=\"...\"');\n\t\t\t}\n\t\t\tif (id.charAt(0) === \"#\") {\n\t\t\t\ttagStack.unshift(id.slice(1));\n\t\t\t} else if (id.slice(1) !== (bndId = tagStack.shift())) {\n\t\t\t\t// See jsviews/issues/213\n\t\t\t\tsyntaxError('Closing tag for {^{...}} under different elem: <' + bndId + '>');\n\t\t\t}\n\t\t}\n\t\tif (tag) {\n\t\t\tinTag = tag;\n\t\t\t// If there are ids (markers since the last tag), move them to the defer string\n\t\t\ttagStack.unshift(parentTag);\n\t\t\tparentTag = tag.slice(1);\n\t\t\tif (validate && tagStack[0] && tagStack[0] === badParent[parentTag]) {\n\t\t\t\t// Missing \n\t\t\t\t// TODO: replace this by smart insertion of tags\n\t\t\t\terror('Parent of must be ');\n\t\t\t}\n\t\t\tisVoid = voidElems[parentTag];\n\t\t\tif ((elCnt = elContent[parentTag]) && !prevElCnt) {\n\t\t\t\tdeferStack.unshift(defer);\n\t\t\t\tdefer = \"\";\n\t\t\t}\n\t\t\tprevElCnt = elCnt;\n//TODO Consider providing validation which throws if you place as child of , etc. - since if not caught,\n//this can cause errors subsequently which are difficult to debug.\n//\t\t\t\tif (elContent[tagStack[0]]>2 && !elCnt) {\n//\t\t\t\t\terror(parentTag + \" in \" + tagStack[0]);\n//\t\t\t\t}\n\t\t\tif (defer && elCnt) {\n\t\t\t\tdefer += \"+\"; // Will be used for stepping back through deferred tokens\n\t\t\t}\n\t\t}\n\t\treturn preceding;\n\t}\n\n\tfunction processViewInfos(vwInfos, targetParent) {\n\t\t// If targetParent, we are processing viewInfos (which may include navigation through '+-' paths) and hooking up to the right parentElem etc.\n\t\t// (and elem may also be defined - the next node)\n\t\t// If no targetParent, then we are processing viewInfos on newly inserted content\n\t\tvar deferPath, deferChar, bindChar, parentElem, id, onAftCr, deep,\n\t\t\taddedBindEls = [];\n\n\t\t// In elCnt context (element-only content model), prevNode is the first node after the open, nextNode is the first node after the close.\n\t\t// If both are null/undefined, then open and close are at end of parent content, so the view is empty, and its placeholder is the\n\t\t// 'lastChild' of the parentNode. If there is a prevNode, then it is either the first node in the view, or the view is empty and\n\t\t// its placeholder is the 'previousSibling' of the prevNode, which is also the nextNode.\n\t\tif (vwInfos) {\n\t\t\tif (vwInfos._tkns.charAt(0) === \"@\") {\n\t\t\t\t// We are processing newly inserted content. This is a special script element that was created in convertMarkers() to process deferred bindings,\n\t\t\t\t// and inserted following the target parent element - because no element tags (outside elCnt) were encountered to carry those binding tokens.\n\t\t\t\t// We will step back from the preceding sibling of this element, looking at targetParent elements until we find the one that the current binding\n\t\t\t\t// token belongs to. Set elem to null (the special script element), and remove it from the DOM.\n\t\t\t\ttargetParent = elem.previousSibling;\n\t\t\t\telem.parentNode.removeChild(elem);\n\t\t\t\telem = undefined;\n\t\t\t}\n\t\t\tlen = vwInfos.length;\n\t\t\twhile (len--) {\n\t\t\t\tvwInfo = vwInfos[len];\n//if (prevIds.indexOf(vwInfo.token) < 0) { // This token is a newly created view or tag binding\n\t\t\t\tbindChar = vwInfo.ch;\n\t\t\t\tif (deferPath = vwInfo.path) {\n\t\t\t\t\t// We have a 'deferred path'\n\t\t\t\t\tj = deferPath.length - 1;\n\t\t\t\t\twhile (deferChar = deferPath.charAt(j--)) {\n\t\t\t\t\t\t// Use the \"+\" and\"-\" characters to navigate the path back to the original parent node where the deferred bindings ocurred\n\t\t\t\t\t\tif (deferChar === \"+\") {\n\t\t\t\t\t\t\tif (deferPath.charAt(j) === \"-\") {\n\t\t\t\t\t\t\t\tj--;\n\t\t\t\t\t\t\t\ttargetParent = targetParent.previousSibling;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttargetParent = targetParent.parentNode;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttargetParent = targetParent.lastChild;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Note: Can use previousSibling and lastChild, not previousElementSibling and lastElementChild,\n\t\t\t\t\t\t// since we have removed white space within elCnt. Hence support IE < 9\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (bindChar === \"^\") {\n\t\t\t\t\tif (tag = bindingStore[id = vwInfo.id]) {\n\t\t\t\t\t\t// The binding may have been deleted, for example in a different handler to an array collectionChange event\n\t\t\t\t\t\t// This is a tag binding\n\t\t\t\t\t\tdeep = targetParent && (!elem || elem.parentNode !== targetParent); // We are stepping back looking for the right targetParent,\n\t\t\t\t\t\t// or we are linking existing content and this element is in elCnt, not an immediate child of the targetParent.\n\t\t\t\t\t\tif (!elem || deep) {\n\t\t\t\t\t\t\ttag.parentElem = targetParent;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (vwInfo.elCnt && deep) {\n\t\t\t\t\t\t\t// With element only content, if there is no following element, or if the binding is deeper than the following element\n\t\t\t\t\t\t\t// then we need to set the open or close token as a deferred binding annotation on the parent\n\t\t\t\t\t\t\tsetDefer(targetParent, (vwInfo.open ? \"#\" : \"/\") + id + bindChar + (targetParent._df || \"\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// This is an open or close marker for a data-linked tag {^{...}}. Add it to bindEls.\n\t\t\t\t\t\taddedBindEls.push([deep ? null : elem, vwInfo]);\n\t\t\t\t\t}\n\t\t\t\t} else if (view = viewStore[id = vwInfo.id]) {\n\t\t\t\t\t// The view may have been deleted, for example in a different handler to an array collectionChange event\n\t\t\t\t\tif (!view.parentElem) {\n\t\t\t\t\t\t// If view is not already extended for JsViews, extend and initialize the view object created in JsRender, as a JsViews view\n\t\t\t\t\t\tview.parentElem = targetParent || elem && elem.parentNode || parentNode;\n\t\t\t\t\t\tview._.onRender = addBindingMarkers;\n\t\t\t\t\t\tview._.onArrayChange = arrayChangeHandler;\n\t\t\t\t\t\tsetArrayChangeLink(view);\n\t\t\t\t\t}\n\t\t\t\t\tparentElem = view.parentElem;\n\t\t\t\t\tif (vwInfo.open) {\n\t\t\t\t\t\t// This is an 'open view' node (preceding script marker node,\n\t\t\t\t\t\t// or if elCnt, the first element in the view, with a data-jsv annotation) for binding\n\t\t\t\t\t\tview._elCnt = vwInfo.elCnt;\n\t\t\t\t\t\tif (targetParent && !elem) {\n\t\t\t\t\t\t\tsetDefer(targetParent, \"#\" + id + bindChar + (targetParent._df || \"\"));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// No targetParent, so there is a ._nxt elem (and this is processing tokens on the elem)\n\t\t\t\t\t\t\tif (!view._prv) {\n\t\t\t\t\t\t\t\tsetDefer(parentElem, removeSubStr(parentElem._df, \"#\" + id + bindChar));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tview._prv = elem;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// This is a 'close view' marker node for binding\n\t\t\t\t\t\tif (targetParent && (!elem || elem.parentNode !== targetParent)) {\n\t\t\t\t\t\t\t// There is no ._nxt so add token to _df. It is deferred.\n\t\t\t\t\t\t\tsetDefer(targetParent, \"/\" + id + bindChar + (targetParent._df || \"\"));\n\t\t\t\t\t\t\tview._nxt = undefined;\n\t\t\t\t\t\t} else if (elem) {\n\t\t\t\t\t\t\t// This view did not have a ._nxt, but has one now, so token may be in _df, and must be removed. (No longer deferred)\n\t\t\t\t\t\t\tif (!view._nxt) {\n\t\t\t\t\t\t\t\tsetDefer(parentElem, removeSubStr(parentElem._df, \"/\" + id + bindChar));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tview._nxt = elem;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (onAftCr = view.ctx && view.ctx[onAfterCreateStr] || onAfterCreate) {\n\t\t\t\t\t\t\tonAftCr.call(view.ctx.tag, view);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n//}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlen = addedBindEls.length;\n\t\t\twhile (len--) {\n\t\t\t\t// These were added in reverse order to addedBindEls. We push them in BindEls in the correct order.\n\t\t\t\tbindEls.push(addedBindEls[len]);\n\t\t\t}\n\t\t}\n\t\treturn !vwInfos || vwInfos.elCnt;\n\t}\n\n\tfunction getViewInfos(vwInfos) {\n\t\t// Used by view.childTags() and tag.childTags()\n\t\t// Similar to processViewInfos in how it steps through bindings to find tags. Only finds data-linked tags.\n\t\tvar level, parentTag, named;\n\n\t\tif (vwInfos) {\n\t\t\tlen = vwInfos.length;\n\t\t\tfor (j = 0; j < len; j++) {\n\t\t\t\tvwInfo = vwInfos[j];\n\t\t\t\t// This is an open marker for a data-linked tag {^{...}}, within the content of the tag whose id is get.id. Add it to bindEls.\n\t\t\t\t// Note - if bindingStore[vwInfo.id]._is === \"tag\" then getViewInfos is being called too soon - during first linking pass\n\t\t\t\ttag = bindingStore[vwInfo.id];\n\t\t\t\tif (!tag._is && tag.linkCtx) {\n\t\t\t\t\tparentTag = tag = tag.linkCtx.tag;\n\t\t\t\t\tnamed = tag.tagName === tagName;\n\t\t\t\t\tif (!tag.flow || named) {\n\t\t\t\t\t\tif (!deep) {\n\t\t\t\t\t\t\tlevel = 1;\n\t\t\t\t\t\t\twhile (parentTag = parentTag.parent) {\n\t\t\t\t\t\t\t\tlevel++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttagDepth = tagDepth || level; // The level of the first tag encountered.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ((deep || level === tagDepth) && (!tagName || named)) {\n\t\t\t\t\t\t\t// Filter on top-level or tagName as appropriate\n\t\t\t\t\t\t\ttags.push(tag);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction dataLink() {\n\t\t//================ Data-link and fixup of data-jsv annotations ================\n\t\tvar j, index,\n\t\t\ttokens = \"\",\n\t\t\twrap = {},\n\t\t\tselector = linkViewsSel + (get ? \",[\" + deferAttr + \"]\" : \"\");\n\t\t\t// If a childTags() call, get = \",[\" + deferAttr + \"]\" - since we need to include elements that have a ._df expando for deferred tokens\n\n\t\telems = qsa ? parentNode.querySelectorAll(selector) : $(selector, parentNode).get();\n\t\tl = elems.length;\n\n\t\t// The prevNode will be in the returned query, since we called markPrevOrNextNode() on it.\n\t\t// But it may have contained nodes that satisfy the selector also.\n\t\tif (prevNode && prevNode.innerHTML) {\n\t\t\t// Find the last contained node of prevNode, to use as the prevNode - so we only link subsequent elems in the query\n\t\t\tprevNodes = qsa ? prevNode.querySelectorAll(selector) : $(selector, prevNode).get();\n\t\t\tprevNode = prevNodes.length ? prevNodes[prevNodes.length - 1] : prevNode;\n\t\t}\n\n\t\ttagDepth = 0;\n\t\tfor (i = 0; i < l; i++) {\n\t\t\telem = elems[i];\n\t\t\tif (prevNode && !found) {\n\t\t\t\t// If prevNode is set, not false, skip linking. If this element is the prevNode, set to false so subsequent elements will link.\n\t\t\t\tfound = (elem === prevNode);\n\t\t\t} else if (nextNode && elem === nextNode) {\n\t\t\t\t// If nextNode is set then break when we get to nextNode\n\t\t\t\tif (get) {\n\t\t\t\t\ttokens += markerNodeInfo(elem);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t} else if (elem.parentNode) {\n\t\t\t\t// elem has not been removed from DOM\n\t\t\t\tif (get) {\n\t\t\t\t\ttokens += markerNodeInfo(elem);\n\t\t\t\t\tif (elem._df) {\n\t\t\t\t\t\tj = i + 1;\n\t\t\t\t\t\twhile (j < l && elem.contains(elems[j])) {\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Add deferred tokens after any tokens on descendant elements of this one\n\t\t\t\t\t\twrap[j-1] = elem._df;\n\t\t\t\t\t}\n\t\t\t\t\tif (wrap[i]) {\n\t\t\t\t\t\ttokens += wrap[i] || \"\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (isLink && (vwInfo = viewInfos(elem, undefined, rViewMarkers)) && (vwInfo = vwInfo[0])) {\n\t\t\t\t\t\t// If this is a link(trueOrString ...) call we will avoid re-binding to elems that are within template-rendered views\n\t\t\t\t\t\tskip = skip ? (vwInfo.id !== skip && skip) : vwInfo.open && vwInfo.id;\n\t\t\t\t\t}\n\t\t\t\t\tif (!skip && processInfos(viewInfos(elem))\n\t\t\t\t\t\t// If a link() call, processViewInfos() adds bindings to bindEls, and returns true for non-script nodes, for adding data-link bindings\n\t\t\t\t\t\t// If a childTags() call, getViewInfos returns array of tag bindings.\n\t\t\t\t\t\t\t&& elem.getAttribute($viewsLinkAttr)) {\n\t\t\t\t\t\tbindEls.push([elem]); // A data-linked element so add to bindEls too\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (get) {\n\t\t\ttokens += parentNode._df || \"\";\n\t\t\tif (index = tokens.indexOf(\"#\" + get.id) + 1) {\n\t\t\t\t// We are looking for view.childTags() or tag.childTags() - so start after the open token of the parent view or tag.\n\t\t\t\ttokens = tokens.slice(index + get.id.length);\n\t\t\t}\n\t\t\tindex = tokens.indexOf(\"/\" + get.id);\n\t\t\tif (index + 1) {\n\t\t\t\t// We are looking for view.childTags() or tag.childTags() - so don't look beyond the close token of the parent view or tag.\n\t\t\t\ttokens = tokens.slice(0, index);\n\t\t\t}\n\t\t\t// Call getViewInfos to add the found childTags to the tags array\n\t\t\tgetViewInfos(viewInfos(tokens, undefined, rOpenTagMarkers));\n\t\t}\n\n\t\tif (html === undefined && parentNode.getAttribute($viewsLinkAttr)) {\n\t\t\tbindEls.push([parentNode]); // Support data-linking top-level element directly (not within a data-linked container)\n\t\t}\n\n\t\t// Remove temporary marker script nodes they were added by markPrevOrNextNode\n\t\tunmarkPrevOrNextNode(prevNode, elCnt);\n\t\tunmarkPrevOrNextNode(nextNode, elCnt);\n\n\t\tif (get) {\n\t\t\treturn; // We have added childTags to the tags array, so we are done\n\t\t}\n\n\t\tif (elCnt && defer + ids) {\n\t\t\t// There are some views with elCnt, for which the open or close did not precede any HTML tag - so they have not been processed yet\n\t\t\telem = nextNode;\n\t\t\tif (defer) {\n\t\t\t\tif (nextNode) {\n\t\t\t\t\tprocessViewInfos(viewInfos(defer + \"+\", true), nextNode);\n\t\t\t\t} else {\n\t\t\t\t\tprocessViewInfos(viewInfos(defer, true), parentNode);\n\t\t\t\t}\n\t\t\t}\n\t\t\tprocessViewInfos(viewInfos(ids, true), parentNode);\n\t\t\t// If there were any tokens on nextNode which have now been associated with inserted HTML tags, remove them from nextNode\n\t\t\tif (nextNode) {\n\t\t\t\ttokens = nextNode.getAttribute(jsvAttrStr);\n\t\t\t\tif (l = tokens.indexOf(prevIds) + 1) {\n\t\t\t\t\ttokens = tokens.slice(l + prevIds.length - 1);\n\t\t\t\t}\n\t\t\t\tnextNode.setAttribute(jsvAttrStr, ids + tokens);\n\t\t\t}\n\t\t}\n\n// if (context.lazyLink) {\n// setTimeout(doLinking) (doLinking is function wrapper of following lines)\n// See Future tasks, and https://github.com/BorisMoore/jsviews/issues/368.\n// Could call context.lazyLink as callback, on async completion - or return promise.\n\t\t//================ Bind the data-linked elements and tags ================\n\t\tl = bindEls.length;\n\t\tfor (i = 0; i < l; i++) {\n\t\t\telem = bindEls[i];\n\t\t\tlinkInfo = elem[1];\n\t\t\telem = elem[0];\n\t\t\tif (linkInfo) {\n\t\t\t\tif (tag = bindingStore[linkInfo.id]) {\n\t\t\t\t\tif (linkCtx = tag.linkCtx) {\n\t\t\t\t\t\t// The tag may have been stored temporarily on the bindingStore - or may have already been replaced by the actual binding\n\t\t\t\t\t\ttag = linkCtx.tag;\n\t\t\t\t\t\ttag.linkCtx = linkCtx;\n\t\t\t\t\t}\n\t\t\t\t\tif (linkInfo.open) {\n\t\t\t\t\t\t// This is an 'open linked tag' binding annotation for a data-linked tag {^{...}}\n\t\t\t\t\t\tif (elem) {\n\t\t\t\t\t\t\ttag.parentElem = elem.parentNode;\n\t\t\t\t\t\t\ttag._prv = elem;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttag._elCnt = linkInfo.elCnt;\n\t\t\t\t\t\t// We data-link depth-first (\"on the way in\"), which is better for perf - and allows setting parent tags etc.\n\t\t\t\t\t\tview = tag.tagCtx.view;\n\n\t\t\t\t\t\t// Add data binding (unless skipped due to lateRender)\n\t\t\t\t\t\taddDataBinding(late, undefined, tag._prv, view, linkInfo.id);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttag._nxt = elem;\n\t\t\t\t\t\tif (tag._.unlinked && !tag._toLk) {\n\t\t\t\t\t\t\t// This is a 'close linked tag' binding annotation (and data-binding was not skipped due to lateRender)\n\t\t\t\t\t\t\ttagCtx = tag.tagCtx;\n\t\t\t\t\t\t\tview = tagCtx.view;\n\t\t\t\t\t\t\tcallAfterLink(tag);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Add data binding for a data-linked element (with data-link attribute)\n\t\t\t\taddDataBinding(late, elem.getAttribute($viewsLinkAttr), elem, $view(elem), undefined, isLink, outerData, context);\n\t\t\t}\n\t\t}\n//});\n\t}\n\t//==== /end of nested functions ====\n\n\tvar inTag, linkCtx, tag, i, l, j, len, elems, elem, view, vwInfo, linkInfo, prevNodes, token, prevView, nextView,\n\t\tnode, tags, deep, tagName, tagCtx, validate, tagDepth, depth, fragment, copiedNode, firstTag, parentTag,\n\t\tisVoid, wrapper, div, tokens, elCnt, prevElCnt, htmlTag, ids, prevIds, found, skip, isLink, get,\n\t\tself = this,\n\t\tthisId = self._.id + \"_\",\n\t\tdefer = \"\",\n\t\t// The marker ids for which no tag was encountered (empty views or final closing markers) which we carry over to container tag\n\t\tbindEls = [],\n\t\ttagStack = [],\n\t\tdeferStack = [],\n\t\tlate = [],\n\t\tonAfterCreate = changeHandler(self, onAfterCreateStr),\n\t\tprocessInfos = processViewInfos;\n\n\tif (refresh) {\n\t\tif (refresh.tmpl) {\n\t\t\t// refresh is the prevView, passed in from addViews()\n\t\t\tprevView = \"/\" + refresh._.id + \"_\";\n\t\t} else {\n\t\t\tisLink = refresh.lnk; // Top-level linking\n\t\t\tif (refresh.tag) {\n\t\t\t\tthisId = refresh.tag + \"^\";\n\t\t\t\trefresh = true;\n\t\t\t}\n\t\t\tif (get = refresh.get) {\n\t\t\t\tprocessInfos = getViewInfos;\n\t\t\t\ttags = get.tags;\n\t\t\t\tdeep = get.deep;\n\t\t\t\ttagName = get.name;\n\t\t\t}\n\t\t}\n\t\trefresh = refresh === true;\n\t}\n\n\tparentNode = parentNode\n\t\t? (\"\" + parentNode === parentNode\n\t\t\t? $(parentNode)[0] // It is a string, so treat as selector\n\t\t\t: parentNode.jquery\n\t\t\t\t? parentNode[0] // A jQuery object - take first element.\n\t\t\t\t: parentNode)\n\t\t: (self.parentElem // view.link()\n\t\t\t|| document.body); // link(null, data) to link the whole document\n\n\tvalidate = !$subSettingsAdvanced.noValidate && parentNode.contentEditable !== TRUE;\n\tparentTag = parentNode.tagName.toLowerCase();\n\telCnt = !!elContent[parentTag];\n\n\tprevNode = prevNode && markPrevOrNextNode(prevNode, elCnt);\n\tnextNode = nextNode && markPrevOrNextNode(nextNode, elCnt) || null;\n\n\tif (html != undefined) {\n\t\t//================ Insert html into DOM using documentFragments (and wrapping HTML appropriately). ================\n\t\t// Also convert markers to DOM annotations, based on content model.\n\t\t// Corresponds to nextNode ? $(nextNode).before(html) : $(parentNode).html(html);\n\t\t// but allows insertion to wrap correctly even with inserted script nodes. jQuery version will fail e.g. under tbody or select.\n\t\t// This version should also be slightly faster\n\t\tdiv = document.createElement(\"div\");\n\t\twrapper = div;\n\t\tprevIds = ids = \"\";\n\t\thtmlTag = parentNode.namespaceURI === \"http://www.w3.org/2000/svg\" ? \"svg_ns\" : (firstTag = rFirstElem.exec(html)) && firstTag[1] || \"\";\n\t\tif (elCnt) {\n\t\t\t// Now look for following view, and find its tokens, or if not found, get the parentNode._df tokens\n\t\t\tnode = nextNode;\n\t\t\twhile (node && !(nextView = viewInfos(node))) {\n\t\t\t\tnode = node.nextSibling;\n\t\t\t}\n\t\t\tif (tokens = nextView ? nextView._tkns : parentNode._df) {\n\t\t\t\ttoken = prevView || \"\";\n\t\t\t\tif (refresh || !prevView) {\n\t\t\t\t\ttoken += \"#\" + thisId;\n\t\t\t\t}\n\t\t\t\tj = tokens.indexOf(token);\n\t\t\t\tif (j + 1) {\n\t\t\t\t\tj += token.length;\n\t\t\t\t\t// Transfer the initial tokens to inserted nodes, by setting them as the ids variable, picked up in convertMarkers\n\t\t\t\t\tprevIds = ids = tokens.slice(0, j);\n\t\t\t\t\ttokens = tokens.slice(j);\n\t\t\t\t\tif (nextView) {\n\t\t\t\t\t\tnode.setAttribute(jsvAttrStr, tokens);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetDefer(parentNode, tokens);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//================ Convert the markers to DOM annotations, based on content model. ================\n//\t\t\toldElCnt = elCnt;\n\t\tisVoid = undefined;\n\t\thtml = (\"\" + html).replace(rConvertMarkers, convertMarkers);\n//\t\t\tif (!!oldElCnt !== !!elCnt) {\n//\t\t\t\terror(\"Parse: \" + html); // Parse error. Content not well-formed?\n//\t\t\t}\n\t\tif (validate && tagStack.length) {\n\t\t\tsyntaxError(\"Mismatched '<\" + parentTag + \"...>' in:\\n\" + html); // Unmatched tag\n\t\t}\n\t\tif (validateOnly) {\n\t\t\treturn;\n\t\t}\n\t\t// Append wrapper element to doc fragment\n\t\tsafeFragment.appendChild(div);\n\n\t\t// Go to html and back, then peel off extra wrappers\n\t\t// Corresponds to jQuery $(nextNode).before(html) or $(parentNode).html(html);\n\t\t// but supports svg elements, and other features missing from jQuery version (and this version should also be slightly faster)\n\t\thtmlTag = wrapMap[htmlTag] || wrapMap.div;\n\t\tdepth = htmlTag[0];\n\t\twrapper.innerHTML = htmlTag[1] + html + htmlTag[2];\n\t\twhile (depth--) {\n\t\t\twrapper = wrapper.lastChild;\n\t\t}\n\t\tsafeFragment.removeChild(div);\n\t\tfragment = document.createDocumentFragment();\n\t\twhile (copiedNode = wrapper.firstChild) {\n\t\t\tfragment.appendChild(copiedNode);\n\t\t}\n\t\t// Insert into the DOM\n\t\tparentNode.insertBefore(fragment, nextNode);\n\t}\n\tdataLink();\n\n\treturn late;\n}\n\nfunction addDataBinding(late, linkMarkup, node, currentView, boundTagId, isLink, data, context) {\n\t// Add data binding for data-linked elements or {^{...}} data-linked tags\n\tvar tmpl, tokens, attr, convertBack, tagExpr, linkFn, linkCtx, tag, rTagIndex, hasElse, lastIndex,\n\t\tlinkExpressions = [];\n\n\tif (boundTagId) {\n\t\t// boundTagId is a string for {^{...}} data-linked tag. So only one linkTag in linkMarkup\n\t\t// data and context arguments are undefined\n\t\ttag = bindingStore[boundTagId];\n\t\ttag = tag.linkCtx ? tag.linkCtx.tag : tag;\n\n\t\tlinkCtx = tag.linkCtx || {\n\t\t\ttype: \"inline\",\n\t\t\tdata: currentView.data, // source\n\t\t\telem: tag._elCnt ? tag.parentElem : node, // target\n\t\t\tview: currentView,\n\t\t\tctx: currentView.ctx,\n\t\t\tattr: HTML, // Script marker nodes are associated with {^{ and always target HTML.\n\t\t\tfn: tag._.bnd,\n\t\t\ttag: tag,\n\t\t\t// Pass the boundTagId in the linkCtx, so that it can be picked up in observeAndBind\n\t\t\t_bndId: boundTagId\n\t\t};\n\t\ttag.linkCtx = linkCtx;\n\t\tbindDataLinkTarget(linkCtx, late);\n\t\ttag._toLk = linkCtx._bndId; // If data binding happened, remove _toLk flag from tag\n\t} else if (linkMarkup && node) {\n\t\t// Data-linked element\n\n\t\t// If isLink then this is a top-level linking: .link(expression, target, data, ....) or\n\t\t// .link(true, target, data, ....) scenario - and data and context are passed in separately from the view\n\t\tdata = isLink ? data : currentView.data;\n\n\t\t// Compiled linkFn expressions could be stored in the tmpl.links array of the template\n\t\t// TODO - consider also caching globally so that if {{:foo}} or data-link=\"foo\" occurs in different places,\n\t\t// the compiled template for this is cached and only compiled once...\n\t\t//links = currentView.links || currentView.tmpl.links;\n\n\t\ttmpl = currentView.tmpl;\n\n//\t\t\tif (!(linkTags = links[linkMarkup])) {\n\t\t// This is the first time this view template has been linked, so we compile the data-link expressions, and store them on the template.\n\n\t\tlinkMarkup = normalizeLinkTag(linkMarkup, defaultAttr(node));\n\t\tlastIndex = rTagDatalink.lastIndex = 0;\n\t\twhile (tokens = rTagDatalink.exec(linkMarkup)) { // TODO require } to be followed by whitespace or $, and remove the \\}(!\\}) option.\n\t\t\tlinkExpressions.push(tokens);\n\t\t\tlastIndex = rTagDatalink.lastIndex;\n\t\t}\n\t\tif (lastIndex < linkMarkup.length) {\n\t\t\tsyntaxError(linkMarkup);\n\t\t}\n\t\twhile (tokens = linkExpressions.shift()) {\n\t\t\t// Iterate over the data-link expressions, for different target attrs,\n\t\t\t// e.g. ~description(firstName, lastName)}\"\n\t\t\t// tokens: [all, attr, bindOnly, tagExpr, tagName, converter, colon, html, comment, code, params]\n\t\t\trTagIndex = rTagDatalink.lastIndex;\n\t\t\tattr = tokens[1];\n\t\t\ttagExpr = tokens[3];\n\t\t\twhile (linkExpressions[0] && linkExpressions[0][4] === \"else\") { // If this is {sometag...} and is followed by an {else...} add to tagExpr\n\t\t\t\ttagExpr += delimCloseChar1 + delimOpenChar0 + linkExpressions.shift()[3];\n\t\t\t\thasElse = true;\n\t\t\t}\n\t\t\tif (hasElse) { // If an {else} has been added, need also to add closing {{/sometag}}\n\t\t\t\ttagExpr += delimCloseChar1 + delimOpenChar0 + delimOpenChar1 + \"/\" + tokens[4] + delimCloseChar0;\n\t\t\t}\n\t\t\tlinkCtx = {\n\t\t\t\ttype: isLink ? \"top\" : \"link\",\n\t\t\t\tdata: data, // source\n\t\t\t\telem: node, // target\n\t\t\t\tview: currentView,\n\t\t\t\tctx: context,\n\t\t\t\tattr: attr,\n\t\t\t\tisLk: isLink, // top-level linking?\n\t\t\t\t_toLk : 1, // Flag to data-link on initial data-link call rendering call\n\t\t\t\t_noUpd : tokens[2] // Flag for data-link=\"^{...}\" so on initial data-link call will bind, but not render)\n\t\t\t};\n\n\t\t\tconvertBack = undefined;\n\t\t\tif (tokens[6]) {\n\t\t\t\tconvertBack = tokens[10] || undefined;\n\t\t\t\tlinkCtx.convert = tokens[5] || \"\";\n\t\t\t\tif (convertBack !== undefined && defaultAttr(node)) {\n\t\t\t\t\tif (attr) {\n\t\t\t\t\t\tsyntaxError(tagExpr + \"- Remove target: \" + attr);\n\t\t\t\t\t}\n\t\t\t\t\t// Default target, so allow 2 way binding\n\t\t\t\t\tlinkCtx.convertBack = convertBack = convertBack.slice(1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Compile the linkFn expression which evaluates and binds a data-link expression\n\t\t\t// TODO - optimize for the case of simple data path with no conversion, helpers, etc.:\n\t\t\t// i.e. data-link=\"a.b.c\". Avoid creating new instances of Function every time. Can use a default function for all of these...\n\n\t\t\tlinkCtx.expr = attr + tagExpr;\n\t\t\tlinkFn = tmpl.links[tagExpr];\n\t\t\tif (!linkFn) {\n\t\t\t\ttmpl.links[tagExpr] = linkFn = $sub.tmplFn(tagExpr, tmpl, true, convertBack, hasElse);\n\t\t\t}\n\t\t\tlinkCtx.fn = linkFn;\n\t\t\tbindDataLinkTarget(linkCtx, late);\n\t\t\t// We store rTagIndex in local scope, since this addDataBinding method can sometimes be called recursively,\n\t\t\t// and each is using the same rTagDatalink instance.\n\t\t\trTagDatalink.lastIndex = rTagIndex;\n\t\t}\n//\t\t}\n\t}\n}\n\nfunction bindDataLinkTarget(linkCtx, late) {\n\t// Add data link bindings for a link expression in data-link attribute markup\n\tfunction handler(ev, eventArgs) {\n\t\tonDataLinkedTagChange.call(linkCtx, ev, eventArgs);\n\t\t// If the link expression uses a custom tag, the onDataLinkedTagChange call will call renderTag, which will set tagCtx on linkCtx\n\t}\n\tif (linkCtx.isLk) {\n\t\t// Top-level linking: .link(expressionOrTrue, data, context) - so we need to create a view for the linking, with the data and ctx\n\t\t// which may be different than the current context of the target. Note that this view is not a standard data-linked view, so it will\n\t\t// be disposed only when its parent view is disposed.\n\t\tlinkCtx.view = new $sub.View(\n\t\t\t$sub.extendCtx(linkCtx.ctx, linkCtx.view.ctx),\n\t\t\t\"link\", linkCtx.view, linkCtx.data, linkCtx.expr, undefined, addBindingMarkers);\n\t}\n\tlinkCtx._ctxCb = $sub._gccb(linkCtx.view); // getContextCallback: _ctxCb, for filtering/appending to dependency paths: function(path, object) { return [(object|path)*]}\n\tlinkCtx._hdl = handler;\n\t// handler._ctx = linkCtx; Could pass linkCtx for use in a depends = function() {} call, so depends is different for different linkCtx's\n\tif (linkCtx.fn._lr) {\n\t\tlinkCtx._toLk = 1;\n\t\tlate.push(linkCtx); // lateRender - defer rendering and linking (sync but after first linking pass)\n\t} else {\n\t\thandler(true);\n\t}\n}\n\n//=====================\n// Data-linking helpers\n//=====================\n\nfunction removeSubStr(str, substr) {\n\tvar k;\n\treturn str\n\t\t? (k = str.indexOf(substr),\n\t\t\t(k + 1\n\t\t\t\t? str.slice(0, k) + str.slice(k + substr.length)\n\t\t\t\t: str))\n\t\t: \"\";\n}\n\nfunction markerNodeInfo(node) {\n\treturn node &&\n\t\t(\"\" + node === node\n\t\t\t? node\n\t\t\t: node.tagName === SCRIPT\n\t\t\t\t? node.type.slice(3)\n\t\t\t\t: node.nodeType === 1 && node.getAttribute(jsvAttrStr) || \"\");\n}\n\nfunction viewInfos(node, isVal, rBinding) {\n\t// Test whether node is a script marker node, and if so, return metadata\n\tfunction getInfos(all, open, close, id, ch, elPath) {\n\t\tinfos.push({\n\t\t\telCnt: elCnt,\n\t\t\tid: id,\n\t\t\tch: ch,\n\t\t\topen: open,\n\t\t\tclose: close,\n\t\t\tpath: elPath,\n\t\t\ttoken: all\n\t\t});\n\t}\n\tvar elCnt, tokens,\n\t\tinfos = [];\n\tif (tokens = isVal ? node : markerNodeInfo(node)) {\n\t\telCnt = infos.elCnt = node.tagName !== SCRIPT;\n\t\telCnt = tokens.charAt(0) === \"@\" || elCnt;\n\t\tinfos._tkns = tokens;\n\t\t// rMarkerTokens = /(?:(#)|(\\/))(\\d+)([_^])([-+@\\d]+)?/g;\n\t\ttokens.replace(rBinding || rMarkerTokens, getInfos);\n\t\treturn infos;\n\t}\n}\n\nfunction unmarkPrevOrNextNode(node, elCnt) {\n\tif (node) {\n\t\tif (node.type === \"jsv\") {\n\t\t\tnode.parentNode.removeChild(node);\n\t\t} else if (elCnt && node.getAttribute($viewsLinkAttr) === \"\") {\n\t\t\tnode.removeAttribute($viewsLinkAttr);\n\t\t}\n\t}\n}\n\nfunction markPrevOrNextNode(node, elCnt) {\n\tvar marker = node;\n\twhile (elCnt && marker && marker.nodeType !== 1) {\n\t\tmarker = marker.previousSibling;\n\t}\n\tif (marker) {\n\t\tif (marker.nodeType !== 1) {\n\t\t\t// For text nodes, we will add a script node before\n\t\t\tmarker = document.createElement(SCRIPT);\n\t\t\tmarker.type = \"jsv\";\n\t\t\tnode.parentNode.insertBefore(marker, node);\n\t\t} else if (!markerNodeInfo(marker) && !marker.getAttribute($viewsLinkAttr)) {\n\t\t\t// For element nodes, we will add a data-link attribute (unless there is already one)\n\t\t\t// so that this node gets included in the node linking process.\n\t\t\tmarker.setAttribute($viewsLinkAttr, \"\");\n\t\t}\n\t}\n\treturn marker;\n}\n\nfunction normalizeLinkTag(linkMarkup, twoway) {\n\tlinkMarkup = $.trim(linkMarkup).replace(rEscapeQuotes, \"\\\\$&\");\n\treturn linkMarkup.slice(-1) !== delimCloseChar0\n\t// If simplified syntax is used: data-link=\"expression\", convert to data-link=\"{:expression}\",\n\t// or for inputs, data-link=\"{:expression:}\" for (default) two-way binding\n\t\t? linkMarkup = delimOpenChar1 + \":\" + linkMarkup + (twoway ? \":\" : \"\") + delimCloseChar0\n\t\t: linkMarkup;\n}\n\n//===========================\n// Methods for views and tags\n//===========================\n\nfunction callAfterLink(tag, ev, eventArgs) {\n\tfunction copyFromTagCtxToTag() {\n\t\tlinkedElems = tagCtx.linkedElems || tag.linkedElems || tag.linkedElem && [tag.linkedElem];\n\t\tif (linkedElems) {\n\t\t\ttag.linkedElems = tagCtx.linkedElems = linkedElems;\n\t\t\ttag.linkedElem = linkedElems[0] = tag.linkedElem || linkedElems[0];\n\t\t}\n\t\tif (linkedElem = tagCtx.mainElem || tag.mainElem) {\n\t\t\ttagCtx.mainElem = tag.mainElem = linkedElem;\n\t\t}\n\t\tif (linkedElem = tagCtx.displayElem || tag.displayElem) {\n\t\t\ttagCtx.displayElem = tag.displayElem = linkedElem;\n\t\t}\n\t}\n\n\tvar linkedElems, linkedElements, linkedElem, l, m, $linkCtxElem, linkCtxElem, tagCtxElse, props, val, oldVal,\n\t\ttagCtx = tag.tagCtx,\n\t\ttagCtxs = tag.tagCtxs,\n\t\ttagCtxslength = tagCtxs && tagCtxs.length,\n\t\tlinkCtx = tag.linkCtx,\n\t\tbindTo = tag.bindTo || {};\n\n\tif (tag._.unlinked) { // First call to onAfterLink, or first call after onUpdate: updateContent. Initialize and call onBind and set properties\n\t\t$linkCtxElem = $(linkCtx.elem);\n\t\tif (tag.linkedElement || tag.mainElement || tag.displayElement) {\n\t\t\tif (linkedElements = tag.linkedElement) {\n\t\t\t\t// tag.linkedElement: - selector, or array of selectors, for identifying linked elements in template/rendered content.\n\t\t\t\t// (But for tag bindings on data-linked elements, defaults to data-linked element)\n\t\t\t\ttag.linkedElem = undefined;\n\t\t\t\tl = linkedElements.length;\n\t\t\t\twhile (l--) {\n\t\t\t\t\tif (linkedElements[l]) {\n\t\t\t\t\t\tm = tagCtxslength;\n\t\t\t\t\t\twhile (m--) {\n\t\t\t\t\t\t\tlinkCtxElem = !m && !tag.inline && $linkCtxElem.filter(linkedElements[l]);\n\t\t\t\t\t\t\ttagCtxElse = tagCtxs[m];\n\t\t\t\t\t\t\tlinkedElems = tagCtxElse.linkedElems = tagCtxElse.linkedElems || new Array(l);\n\t\t\t\t\t\t\tlinkedElem = linkCtxElem[0] ? linkCtxElem : tagCtxElse.contents(true, linkedElements[l]);\n\t\t\t\t\t\t\tif (linkedElem[0] && linkedElem[0].type !== RADIO) {\n\t\t\t\t\t\t\t\tlinkedElems[l] = linkedElem.eq(0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (linkedElements = tag.mainElement) {\n\t\t\t\t// tag.mainElement: - selector for identifying mainElem in template/rendered content\n\t\t\t\t// (But for tag bindings on data-linked elements, defaults to data-linked element)\n\t\t\t\tm = tagCtxslength;\n\t\t\t\twhile (m--) {\n\t\t\t\t\tlinkCtxElem = !m && !tag.inline && $linkCtxElem.filter(linkedElements);\n\t\t\t\t\ttagCtxElse = tagCtxs[m];\n\t\t\t\t\tlinkedElem = linkCtxElem[0] ? linkCtxElem : tagCtxElse.contents(true, linkedElements).eq(0);\n\t\t\t\t\tif (linkedElem[0]) {\n\t\t\t\t\t\ttagCtxElse.mainElem = linkedElem;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (linkedElements = tag.displayElement) {\n\t\t\t\t// tag.mainElement: - selector for identifying mainElem in template/rendered content\n\t\t\t\t// (But for tag bindings on data-linked elements, defaults to data-linked element)\n\t\t\t\tm = tagCtxslength;\n\t\t\t\twhile (m--) {\n\t\t\t\t\tlinkCtxElem = !m && !tag.inline && $linkCtxElem.filter(linkedElements);\n\t\t\t\t\ttagCtxElse = tagCtxs[m];\n\t\t\t\t\tlinkedElem = linkCtxElem[0] ? linkCtxElem : tagCtxElse.contents(true, linkedElements).eq(0);\n\t\t\t\t\tif (linkedElem[0]) {\n\t\t\t\t\t\ttagCtxElse.displayElem = linkedElem;\n\t\t\t\t\t\tif (!m) {\n\t\t\t\t\t\t\ttag.displayElem = linkedElem;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcopyFromTagCtxToTag();\n\t\t}\n\t\tif (tag.onBind) {\n\t\t\ttag.onBind(tagCtx, linkCtx, tag.ctx, ev, eventArgs);\n\t\t\tcopyFromTagCtxToTag();\n\t\t}\n\t}\n\n\tm = tagCtxslength;\n\twhile (m--) {\n\t\ttagCtxElse = tagCtxs[m];\n\t\tprops = tagCtxElse.props;\n\n\t\tif (linkedElem = tagCtxElse.mainElem || !tag.mainElement && tagCtxElse.linkedElems && tagCtxElse.linkedElems[0]) {\n\t\t\t// linkedElem is the mainElem (defaulting to linkedElem)\n\t\t\tif (linkedElem[0] && props.id && !linkedElem[0].id) {\n\t\t\t\tlinkedElem[0].id = props.id;\n\t\t\t}\n\t\t\tif (tag.setSize) {\n\t\t\t\tif (val = !bindTo.height && props.height || tag.height) {\n\t\t\t\t\tlinkedElem.height(val);\n\t\t\t\t}\n\t\t\t\tif (val = !bindTo.width && props.width || tag.width) {\n\t\t\t\t\tlinkedElem.width(val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (val = (linkedElem = tagCtxElse.displayElem || linkedElem) && (!bindTo[\"class\"] && props[\"class\"] || tag.className)) {\n\t\t\t// This code supports dynamic binding to class - where it adds the class if absent, and removes/adds if a previous value is present\n\t\t\toldVal = linkedElem[0]._jsvCl;\n\t\t\tif (val !== oldVal) {\n\t\t\t\tif (linkedElem.hasClass(oldVal)) {\n\t\t\t\t\tlinkedElem.removeClass(oldVal);\n\t\t\t\t}\n\t\t\t\tlinkedElem.addClass(val);\n\t\t\t\tlinkedElem[0]._jsvCl = val;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (tag.onAfterLink) {\n\t\ttag.onAfterLink(tagCtx, linkCtx, tag.ctx, ev, eventArgs);\n\t\tcopyFromTagCtxToTag();\n\t}\n\n\tif (!tag.flow && !tag._.chg) {\n\t\tif (tag.inline && tag._.unlinked && (tag.linkedElems || bindTo)) {\n\t\t\tdefineBindToDataTargets(bindingStore[tag._tgId], tag);\n\t\t}\n\t\ttag.setValue();\n\t}\n\ttag._.unlinked = undefined;\n}\n\nfunction asyncOnElemChange(ev) {\n\tvar which = ev.which;\n\tif (!(which > 15 && which < 21 || which > 32 && which < 41 || which > 111 && which < 131 || which === 27 || which === 144)) {\n\t\t// Shift, Ctrl, Alt, Pause, Caplock, Page up/down End, Home, Left, Up, Right, Down, Function keys, Escape, Numlock\n\t\tsetTimeout(function() {\n\t\t\tonElemChange(ev);\n\t\t});\n\t}\n}\n\nfunction bindTriggerEvent($elem, trig, onoff) {\n\t// Bind keydown, or other trigger - (rather than use the default change event bubbled to activeBody)\n\tif (trig === true && useInput) {\n\t\t$elem[onoff](\"input.jsv\", onElemChange); // For HTML5 browser with \"oninput\" support - for mouse editing of text\n\t} else {\n\t\ttrig = \"\" + trig === trig ? trig : \"keydown.jsv\"; // Set trigger to (true || truey non-string (e.g. 1) || 'keydown')\n\t\t$elem[onoff](trig, trig.indexOf(\"keydown\") >= 0 ? asyncOnElemChange : onElemChange); // Get 'keydown' with async\n\t}\n}\n\nfunction bindLinkedElChange(tag, linkedElem) {\n\t// Two-way binding for linkedElem - in the case of input, textarea or contentEditable elements.\n\t// Trigger setting may have changed. Unbind previous trigger binding (if any) and bind new one.\n\n\tvar $linkedElem, newTrig,\n\t\toldTrig = linkedElem._jsvTr || false;\n\n\tif (tag) {\n\t\tnewTrig = tag.tagCtx.props.trigger;\n\t\tif (newTrig === undefined) {\n\t\t\tnewTrig = tag.trigger;\n\t\t}\n\t}\n\tif (newTrig === undefined) {\n\t\tnewTrig = $subSettings.trigger;\n\t}\n\t// Trigger is noop except for text box, textarea, contenteditable...\n\tnewTrig = newTrig && (linkedElem.tagName === \"INPUT\" && linkedElem.type !== CHECKBOX && linkedElem.type !== RADIO\n\t\t|| linkedElem.type === \"textarea\" || linkedElem.contentEditable === TRUE) && newTrig || false;\n\n\tif (oldTrig !== newTrig) {\n\t\t$linkedElem = $(linkedElem);\n\t\tbindTriggerEvent($linkedElem, oldTrig, \"off\");\n\t\tbindTriggerEvent($linkedElem, linkedElem._jsvTr = newTrig, \"on\");\n\t}\n}\n\nfunction defineBindToDataTargets(binding, tag, cvtBk) {\n\t// Two-way binding.\n\t// We set the binding.to[1] to be the cvtBack, and binding.to[0] to be either the path to the target, or [object, path] where the target is the\n\t// path on the provided object. So for a computed path with an object call: a.b.getObject().d.e, we set to[0] to be [exprOb, \"d.e\"], and\n\t// we bind to the path on the returned object, exprOb.ob, as target. Otherwise our target is the first path, paths[0], which we will convert\n\t// with contextCb() for paths like ~a.b.c or #x.y.z\n\n\tvar pathIndex, path, lastPath, bindtoOb, to, bindTo, paths, k, l, obsCtxPrm, linkedCtxParam, contextCb, targetPaths, bindTos,\n\t\ttagElse = 1,\n\t\ttos = [],\n\t\tlinkCtx = binding.linkCtx,\n\t\tsource = linkCtx.data,\n\t\ttargetPathsElses = linkCtx.fn.paths;\n\n\tif (binding && !binding.to) {\n\t\tif (tag) {\n\t\t\ttag.convertBack = tag.convertBack || cvtBk;\n\t\t\tbindTo = tag.bindTo;\n\t\t\ttagElse = tag.tagCtxs ? tag.tagCtxs.length : 1;\n\t\t}\n\t\twhile (tagElse--) {\n\t\t\tbindTos = [];\n\t\t\tif (targetPaths = targetPathsElses[tagElse]) {\n\t\t\t\tbindTo = targetPaths._jsvto ? [\"_jsvto\"] : (bindTo || [0]);\n\t\t\t\tk = bindTo.length;\n\t\t\t\twhile (k--) {\n\t\t\t\t\tpath = \"\";\n\t\t\t\t\tcontextCb = linkCtx._ctxCb;\n\t\t\t\t\tpaths = targetPaths[bindTo[k]];\n\t\t\t\t\tif (pathIndex = paths && paths.length) {\n\t\t\t\t\t\tlastPath = paths[pathIndex - 1];\n\t\t\t\t\t\tif (lastPath._cpfn) { // Computed property exprOb\n\n\t\t\t\t\t\t\tbindtoOb = lastPath;\n\t\t\t\t\t\t\twhile (lastPath.sb && lastPath.sb._cpfn) {\n\t\t\t\t\t\t\t\tpath = lastPath = lastPath.sb;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpath = lastPath.sb || path && path.path;\n\t\t\t\t\t\t\tlastPath = path ? path.slice(1) : bindtoOb.path;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tto = path\n\t\t\t\t\t\t\t? [bindtoOb, // 'exprOb' for this expression and view-binding. So bindtoOb.ob is current object returned by expression.\n\t\t\t\t\t\t\t\t\tlastPath]\n\t\t\t\t\t\t\t: resolveDataTargetPath(lastPath, source, contextCb); // Get 'to' for target path: lastPath\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Contextual parameter ~foo with no external binding - has ctx.foo = [{_ocp: xxx}] and binds to ctx.foo._ocp\n\t\t\t\t\t\tlinkedCtxParam = tag.linkedCtxParam;\n\t\t\t\t\t\tto = [];\n\t\t\t\t\t\tif (linkedCtxParam && linkedCtxParam[k]) {\n\t\t\t\t\t\t\t// This is a tag binding, with linked tag contextual parameters\n\t\t\t\t\t\t\tto = [tag.tagCtxs[tagElse].ctx[linkedCtxParam[k]][0], _ocp];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ((obsCtxPrm = to._cxp) && obsCtxPrm.tag && lastPath.indexOf(\".\")<0) {\n\t\t\t\t\t\t// This is a binding for a tag contextual parameter (e.g. within a tag block content\n\t\t\t\t\t\tto = obsCtxPrm;\n\t\t\t\t\t}\n\t\t\t\t\tbindTos.unshift(to);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttos.unshift(bindTos);\n\t\t}\n\t\tbinding.to = tos;\n\t}\n}\n\nfunction resolveDataTargetPath(targetPath, source, contextCb) {\n\t// Iteratively process targetPath, resolving ~a.b.c paths for contextual parameters\n\tvar path, bindtoOb, to, l, obsCtxPrm, view, topCp, data;\n\n\twhile (targetPath && targetPath !== _ocp && (to = contextCb(path = targetPath.split(\"^\").join(\".\"), source)) && (l = to.length)) {\n\t\tif (obsCtxPrm = to[0]._cxp) { // Two-way binding to a contextual parameter reference, ~foo (declared as ~foo=expr on a parent tag)\n\t\t\ttopCp = topCp || obsCtxPrm;\n\t\t\tview = to[0][0];\n\t\t\tif (_ocp in view) {\n\t\t\t\tdata = view;\n\t\t\t\tview = view._vw;\n\t\t\t} else {\n\t\t\t\tdata = view.data;\n\t\t\t}\n\t\t\ttopCp.path = targetPath = to[0][1];\n\t\t\tto = [topCp.data = data, targetPath];\n\t\t\t\tcontextCb = $sub._gccb(view);\n\t\t\t\tif (targetPath._cpfn) { // computed property\n\t\t\t\t\tbindtoOb = targetPath;\n\t\t\t\t\tbindtoOb.data = to[0];\n\t\t\t\t\tbindtoOb._cpCtx = contextCb;\n\t\t\t\t\twhile (targetPath.sb && targetPath.sb._cpfn) {\n\t\t\t\t\t\tpath = targetPath = targetPath.sb;\n\t\t\t\t\t}\n\t\t\t\t\tpath = targetPath.sb || path && path.path;\n\t\t\t\t\ttargetPath = path ? path.slice(1) : bindtoOb.path;\n\t\t\t\t\tto = [\n\t\t\t\t\t\tbindtoOb, // 'exprOb' for this expression and view-binding. So bindtoOb.ob is current object returned by expression.\n\t\t\t\t\t\ttargetPath\n\t\t\t\t\t];\n\t\t\t\t} else if (obsCtxPrm.tag && obsCtxPrm.path === _ocp) {\n\t\t\t\t\tto = obsCtxPrm;\n\t\t\t\t}\n\t\t} else { // Two-way binding to a helper - e.g. ~address.street, or computed, e.g. ~fullName(), or view property e.g. #data.foo\n\t\t\tto = l>2\n\t\t\t\t? [to[l-3], to[l-2]] // With path: [object, path]\n\t\t\t\t: [to[l-2]]; // No path, (e.g. [function] for computed with setter)\n\t\t}\n\t\tsource = to[0];\n\t\ttargetPath = to[1];\n\t}\n\tto = to || [source, path];\n\tto._cxp = topCp;\n\treturn to;\n}\n\nfunction mergeCtxs(tag, newCtxs, replace) { // Merge updated tagCtxs into tag.tagCtxs\n\tvar tagCtx, newTagCtx,\n\t\tview = tag.tagCtx.view,\n\t\ttagCtxs = tag.tagCtxs || [tag.tagCtx],\n\t\tl = tagCtxs.length,\n\t\trefresh = !newCtxs;\n\n\tnewCtxs = newCtxs || tag._.bnd.call(view.tmpl, (tag.linkCtx || view).data, view, $sub);\n\n\tif (replace) {\n\t\t// Replace previous tagCtxs by new ones, rather than merging\n\t\ttagCtxs = tag.tagCtxs = newCtxs;\n\t\ttag.tagCtx = tagCtxs[0];\n\t\taddLinkMethods(tag);\n\t} else {\n\t\twhile (l--) {\n\t\t\ttagCtx = tagCtxs[l];\n\t\t\tnewTagCtx = newCtxs[l];\n\t\t\t$observable(tagCtx.props).setProperty(newTagCtx.props);\n\t\t\t$extend(tagCtx.ctx, newTagCtx.ctx); // We don't support propagating ctx variables, ~foo, observably, to nested views. So extend, not setProperty...\n\t\t\ttagCtx.args = newTagCtx.args;\n\t\t\tif (refresh) {\n\t\t\t\ttagCtx.tmpl = newTagCtx.tmpl;\n\t\t\t}\n\t\t}\n\t}\n\t$sub._ths(tag, tagCtxs[0]); // tagHandlersFromProps\n\treturn tagCtxs;\n}\n\n//=========\n// Disposal\n//=========\n\nfunction clean(elems) {\n\t// Remove data-link bindings, or contained views\n\tvar l, elem, bindings,\n\t\telemArray = [],\n\t\tlen = elems.length,\n\t\ti = len;\n\twhile (i--) {\n\t\t// Copy into an array, so that deletion of nodes from DOM will not cause our 'i' counter to get shifted\n\t\t// (Note: This seems as fast or faster than elemArray = [].slice.call(elems); ...)\n\t\telemArray.push(elems[i]);\n\t}\n\ti = len;\n\twhile (i--) {\n\t\telem = elemArray[i];\n\t\tif (elem.parentNode) {\n\t\t\t// Has not already been removed from the DOM\n\t\t\tif (bindings = elem._jsvBnd) {\n\t\t\t\t// Get propertyChange bindings for this element\n\t\t\t\t// This may be an element with data-link, or the opening script marker node for a data-linked tag {^{...}}\n\t\t\t\t// bindings is a string with the syntax: \"(&bindingId)*\"\n\t\t\t\tbindings = bindings.slice(1).split(\"&\");\n\t\t\t\telem._jsvBnd = \"\";\n\t\t\t\tl = bindings.length;\n\t\t\t\twhile (l--) {\n\t\t\t\t\t// Remove associated bindings\n\t\t\t\t\tremoveViewBinding(bindings[l], elem._jsvLkEl, elem); // unbind bindings with this bindingId on this view\n\t\t\t\t}\n\t\t\t}\n\t\t\tdisposeTokens(markerNodeInfo(elem) + (elem._df || \"\"), elem);\n\t\t}\n\t}\n}\n\nfunction removeViewBinding(bindId, linkedElemTag, elem) {\n\t// Unbind\n\tvar objId, linkCtx, tag, object, obsId, tagCtxs, l, map, linkedElem, trigger, view, tagCtx, linkedElems, allLinkedElems,\n\t\tbinding = bindingStore[bindId];\n\n\tif (linkedElemTag) {\n\t\telem._jsvLkEl = undefined;\n\t} else if (binding && (!elem || elem === binding.elem)) { // Test that elem is actually binding.elem, since cloned elements can have inappropriate markerNode info\n\t\tdelete bindingStore[bindId]; // Delete already, so call to onDispose handler below cannot trigger recursive deletion (through recursive call to jQuery cleanData)\n\t\tfor (objId in binding.bnd) {\n\t\t\tobject = binding.bnd[objId];\n\t\t\tobsId = binding.cbId;\n\t\t\tif ($isArray(object)) {\n\t\t\t\t$([object]).off(arrayChangeStr + obsId).off(propertyChangeStr + obsId); // There may be either or both of arrayChange and propertyChange\n\t\t\t} else {\n\t\t\t\t$(object).off(propertyChangeStr + obsId);\n\t\t\t}\n\t\t\tdelete binding.bnd[objId];\n\t\t}\n\n\t\tif (linkCtx = binding.linkCtx) {\n\t\t\tif (tag = linkCtx.tag) {\n\t\t\t\tif (tagCtxs = tag.tagCtxs) {\n\t\t\t\t\tl = tagCtxs.length;\n\t\t\t\t\twhile (l--) {\n\t\t\t\t\t\ttagCtx = tagCtxs[l];\n\t\t\t\t\t\tif (map = tagCtx.map) {\n\t\t\t\t\t\t\tmap.unmap(); //unobserve\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Copy linkedElems in case tag.linkedElem or tag.linkedElems are undefined in onUnbind\n\t\t\t\t\t\tif (linkedElems = tagCtx.linkedElems) {\n\t\t\t\t\t\t\tallLinkedElems = (allLinkedElems || []).concat(linkedElems);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (tag.onUnbind) {\n\t\t\t\t\ttag.onUnbind(tag.tagCtx, linkCtx, tag.ctx, true);\n\t\t\t\t}\n\t\t\t\tif (tag.onDispose) {\n\t\t\t\t\ttag.onDispose();\n\t\t\t\t}\n\n\t\t\t\tif (!tag._elCnt) {\n\t\t\t\t\tif (tag._prv) {\n\t\t\t\t\t\ttag._prv.parentNode.removeChild(tag._prv);\n\t\t\t\t\t}\n\t\t\t\t\tif (tag._nxt) {\n\t\t\t\t\t\ttag._nxt.parentNode.removeChild(tag._nxt);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlinkedElems = allLinkedElems || [$(linkCtx.elem)];\n\t\t\tl = linkedElems.length;\n\t\t\twhile (l--) {\n\t\t\t\tlinkedElem = linkedElems[l];\n\t\t\t\tif (trigger = linkedElem && linkedElem[0] && linkedElem[0]._jsvTr) {\n\t\t\t\t\tbindTriggerEvent(linkedElem, trigger, \"off\");\n\t\t\t\t\tlinkedElem[0]._jsvTr = undefined;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tview = linkCtx.view;\n\t\t\tif (view.type === \"link\") {\n\t\t\t\tview.parent.removeViews(view._.key, undefined, true); // A \"link\" view is associated with the binding, so should be disposed with binding.\n\t\t\t} else {\n\t\t\t\tdelete view._.bnds[bindId];\n\t\t\t}\n\t\t}\n\t\tdelete binding.s[binding.cbId];\n\t}\n}\n\nfunction $unlink(to) {\n\tif (to) {\n\t\tto = to.jquery ? to : $(to);\n\t\tto.each(function() {\n\t\t\tvar innerView;\n\t\t\t//TODO fix this for better perf. Rather that calling inner view multiple times which does querySelectorAll each time, consider a single querySelectorAll\n\t\t\t// or simply call view.removeViews() on the top-level views under the target 'to' node, then clean(...)\n\t\t\twhile ((innerView = $view(this, true)) && innerView.parent) {\n\t\t\t\tinnerView.parent.removeViews(innerView._.key, undefined, true);\n\t\t\t}\n\t\t\tclean(this.getElementsByTagName(\"*\"));\n\t\t});\n\t\tclean(to);\n\t} else {\n\t\t// Call to $.unlink() is equivalent to $.unlink(true, \"body\")\n\t\tif (activeBody) {\n\t\t\t$(activeBody)\n\t\t\t\t.off(elementChangeStr, onElemChange)\n\t\t\t\t.off('blur.jsv', '[contenteditable]', onElemChange);\n\t\t\tactiveBody = undefined;\n\t\t}\n\t\ttopView.removeViews();\n\t\tclean(document.body.getElementsByTagName(\"*\"));\n\t}\n}\n\n//========\n// Helpers\n//========\n\nfunction inputAttrib(elem) {\n\treturn elem.type === CHECKBOX ? elem[CHECKED] : elem.value;\n}\n\nfunction changeHandler(view, name, tag) {\n\t// Get onBeforeChange, onAfterChange, onAfterCreate handler - if there is one;\n\treturn tag && tag[name] || view.ctx[name] && view.ctxPrm(name) || $views.helpers[name];\n}\n\n//========================== Initialize ==========================\n\n//=====================\n// JsRender integration\n//=====================\n\naddLinkMethods($sub.View.prototype); // Modify the View prototype to include link methods\n\n$sub.onStore.template = function(name, item, parentTmpl) {\n\tif (item === null) {\n\t\tdelete $.link[name];\n\t\tdelete $.render[name];\n\t} else {\n\t\titem.link = tmplLink;\n\n\t\tif (name && !parentTmpl && name !== \"jsvTmpl\") {\n\t\t\t$.render[name] = item;\n\t\t\t$.link[name] = function() {\n\t\t\t\treturn tmplLink.apply(item, arguments);\n\t\t\t};\n\t\t}\n\t}\n};\n\n$sub.viewInfos = viewInfos; // Expose viewInfos() as public helper method\n\n// Define JsViews version of delimiters(), and initialize\n($viewsSettings.delimiters = function() {\n\t// Run delimiters initialization in context of jsrender.js\n\tvar ret = oldJsvDelimiters.apply(0, arguments),\n\t\t// Now set also delimOpenChar0 etc. in context of jquery.views.js...\n\t\tdelimChars = $subSettings.delimiters;\n\n\tdelimOpenChar0 = delimChars[0].charAt(0);\n\tdelimOpenChar1 = delimChars[0].charAt(1);\n\tdelimCloseChar0 = delimChars[1].charAt(0);\n\tdelimCloseChar1 = delimChars[1].charAt(1);\n\tlinkChar = delimChars[2];\n\n\t// Data-linking must use new delimiters\n\trTagDatalink = new RegExp(\"(?:^|\\\\s*)([\\\\w-]*)(\\\\\" + linkChar + \")?(\\\\\" + delimOpenChar1 + $sub.rTag + \"(:\\\\w*)?\\\\\" + delimCloseChar0 + \")\", \"g\");\n\treturn ret;\n})(); // jshint ignore:line\n\n$sub.addSetting(\"trigger\");\n\n//====================================\n// Additional members for linked views\n//====================================\n\nfunction transferViewTokens(prevNode, nextNode, parentElem, id, viewOrTagChar, refresh) {\n\t// Transfer tokens on prevNode of viewToRemove/viewToRefresh to nextNode or parentElem._df\n\t// view marker tokens: #m_...VIEW.../m_\n\t// tag marker tokens: #m^...TAG..../m^\n\n\tvar i, l, vwInfos, vwInfo, viewOrTag, viewId, tokens,\n\t\tprecedingLength = 0,\n\t\temptyView = prevNode === nextNode;\n\n\tif (prevNode) {\n\t\t// prevNode is either the first node in the viewOrTag, or has been replaced by the vwInfos tokens string\n\t\tvwInfos = viewInfos(prevNode) || [];\n\t\tfor (i = 0, l = vwInfos.length; i < l; i++) {\n\t\t\t// Step through views or tags on the prevNode\n\t\t\tvwInfo = vwInfos[i];\n\t\t\tviewId = vwInfo.id;\n\t\t\tif (viewId === id && vwInfo.ch === viewOrTagChar) {\n\t\t\t\tif (refresh) {\n\t\t\t\t\t// This is viewOrTagToRefresh, this is the last viewOrTag to process...\n\t\t\t\t\tl = 0;\n\t\t\t\t} else {\n\t\t\t\t\t// This is viewOrTagToRemove, so we are done...\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!emptyView) {\n\t\t\t\tviewOrTag = vwInfo.ch === \"_\"\n\t\t\t\t\t? viewStore[viewId] // A view: \"#m_\" or \"/m_\"\n\t\t\t\t\t: bindingStore[viewId].linkCtx.tag; // A tag \"#m^\" or \"/m^\"\n\t\t\t\tif (vwInfo.open) { // A \"#m_\" or \"#m^\" token\n\t\t\t\t\tviewOrTag._prv = nextNode;\n\t\t\t\t} else if (vwInfo.close) { // A \"/m_\" or \"/m^\" token\n\t\t\t\t\tviewOrTag._nxt = nextNode;\n\t\t\t\t}\n\t\t\t}\n\t\t\tprecedingLength += viewId.length + 2;\n\t\t}\n\n\t\tif (precedingLength) {\n\t\t\tprevNode.setAttribute(jsvAttrStr, prevNode.getAttribute(jsvAttrStr).slice(precedingLength));\n\t\t}\n\t\ttokens = nextNode ? nextNode.getAttribute(jsvAttrStr) : parentElem._df;\n\t\tif (l = tokens.indexOf(\"/\" + id + viewOrTagChar) + 1) {\n\t\t\ttokens = vwInfos._tkns.slice(0, precedingLength) + tokens.slice(l + (refresh ? -1 : id.length + 1));\n\t\t}\n\t\tif (tokens) {\n\t\t\tif (nextNode) {\n\t\t\t\t// If viewOrTagToRemove was an empty viewOrTag, we will remove both #n and /n\n\t\t\t\t// (and any intervening tokens) from the nextNode (=== prevNode)\n\t\t\t\t// If viewOrTagToRemove was not empty, we will take tokens preceding #n from prevNode,\n\t\t\t\t// and concatenate with tokens following /n on nextNode\n\t\t\t\tnextNode.setAttribute(jsvAttrStr, tokens);\n\t\t\t} else {\n\t\t\t\tsetDefer(parentElem, tokens);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// !prevNode, so there may be a deferred nodes token on the parentElem. Remove it.\n\t\tsetDefer(parentElem, removeSubStr(parentElem._df, \"#\" + id + viewOrTagChar));\n\t\tif (!refresh && !nextNode) {\n\t\t\t// If this viewOrTag is being removed, and there was no .nxt, remove closing token from deferred tokens\n\t\t\tsetDefer(parentElem, removeSubStr(parentElem._df, \"/\" + id + viewOrTagChar));\n\t\t}\n\t}\n}\n\nfunction disposeTokens(tokens, elem) {\n\tvar i, l, vwItem, vwInfos;\n\tif (vwInfos = viewInfos(tokens, true, rOpenMarkers)) {\n\t\tfor (i = 0, l = vwInfos.length; i < l; i++) {\n\t\t\tvwItem = vwInfos[i];\n\t\t\tif (vwItem.ch === \"_\") {\n\t\t\t\tif ((vwItem = viewStore[vwItem.id]) && vwItem.type && (!elem || vwItem._prv === elem || vwItem.parentElem === elem )) {\n\t\t\t\t\t// If this is the _prv (prevNode) for a view, remove the view\n\t\t\t\t\t// - unless view.type is undefined, in which case it is already being removed\n\t\t\t\t\t// (or unless the elem is not related - e.g. a cloned element which 'accidentally' picked up the data-jsv atttribute of the ._df expando)\n\t\t\t\t\tvwItem.parent.removeViews(vwItem._.key, undefined, true);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveViewBinding(vwItem.id, undefined, elem); // unbind bindings with this bindingId on this view\n\t\t\t}\n\t\t}\n\t}\n}\n\n//============================================\n// Add link methods to data-linked view or tag\n//============================================\n\nfunction updateValue(val, index, tagElse, bindId, ev) {\n// Observably update a data value targeted by bindTo\n// Called when linkedElem changes: called as updateValue(val, index, tagElse, bindId, ev) - this: undefined\n// Called directly as tag.updateValue(val, index, tagElse) - this: tag\n\tvar values = [];\n\tif (this && this._tgId) {\n\t\tbindId = this;\n\t}\n\tvalues[index||0] = val;\n\tupdateValues(values, tagElse, bindId, ev);\n\treturn this;\n}\n\nfunction setValues() {\n\tvar args = arguments,\n\t\tm = args.length;\n\n\tif (!m) {\n\t\targs = this.tag.cvtArgs(true, this.index); // setValues() with no arguments calls setValue with boundArgs values\n\t\tm = args.length;\n\t}\n\twhile (m--) {\n\t\tthis.tag.setValue(args[m], m, this.index);\n\t}\n}\n\nfunction addLinkMethods(tagOrView) { // tagOrView is View prototype or tag instance\n\n\tvar l, m, tagCtx, boundProps, bindTo, key, theTag, theView;\n\n\ttagOrView.contents = function(deep, select) {\n\t\t// For a view, a tag or a tagCtx, return jQuery object with the content nodes,\n\t\tif (deep !== !!deep) {\n\t\t\t// deep not boolean, so this is contents(selector)\n\t\t\tselect = deep;\n\t\t\tdeep = undefined;\n\t\t}\n\t\tvar filtered,\n\t\t\tnodes = $(this.nodes());\n\t\tif (nodes[0]) {\n\t\t\tfiltered = select ? nodes.filter(select) : nodes;\n\t\t\tnodes = deep && select ? filtered.add(nodes.find(select)) : filtered;\n\t\t}\n\t\treturn nodes;\n\t};\n\n\ttagOrView.nodes = function(withMarkers, prevNode, nextNode) {\n\t\t// For a view, a tag or a tagCtx, return top-level nodes\n\t\t// Do not return any script marker nodes, unless withMarkers is true\n\t\t// Optionally limit range, by passing in prevNode or nextNode parameters\n\n\t\tvar node,\n\t\t\tself = this.contentView || this, // If tagCtx, use tagCtx.contentView\n\t\t\telCnt = self._elCnt,\n\t\t\tprevIsFirstNode = !prevNode && elCnt,\n\t\t\tnodes = [];\n\n\t\tif (!self.args) { // If tagCtx with no content (so no contentView) self is tagCtx: return empty [];\n\t\t\tprevNode = prevNode || self._prv;\n\t\t\tnextNode = nextNode || self._nxt;\n\n\t\t\tnode = prevIsFirstNode\n\t\t\t\t? (prevNode === self._nxt\n\t\t\t\t\t? self.parentElem.lastSibling\n\t\t\t\t\t: prevNode)\n\t\t\t\t: (self.inline === false\n\t\t\t\t\t? prevNode || self.linkCtx.elem.firstChild\n\t\t\t\t\t: prevNode && prevNode.nextSibling);\n\n\t\t\twhile (node && (!nextNode || node !== nextNode)) {\n\t\t\t\tif (withMarkers || elCnt || node.tagName !== SCRIPT) {\n\t\t\t\t\t// All the top-level nodes in the view\n\t\t\t\t\t// (except script marker nodes, unless withMarkers = true)\n\t\t\t\t\t// (Note: If a script marker node, viewInfo.elCnt undefined)\n\t\t\t\t\tnodes.push(node);\n\t\t\t\t}\n\t\t\t\tnode = node.nextSibling;\n\t\t\t}\n\t\t}\n\t\treturn nodes;\n\t};\n\n\ttagOrView.childTags = function(deep, tagName) {\n\t\t// For a view, a tagor a tagCtx, return child tags - at any depth, or as immediate children only.\n\t\tif (deep !== !!deep) {\n\t\t\t// deep not boolean, so this is childTags(tagName) - which looks for top-level tags of given tagName\n\t\t\ttagName = deep;\n\t\t\tdeep = undefined;\n\t\t}\n\n\t\tvar self = this.contentView || this, // If tagCtx, use tagCtx.contentView\n\t\t\tview = self.link ? self : self.tagCtx.view, // This may be a view or a tag. If a tag, get the view from tag.tagCtx.view\n\t\t\tprevNode = self._prv,\n\t\t\telCnt = self._elCnt,\n\t\t\ttags = [];\n\n\t\tif (!self.args) { // If tagCtx with no content (so no contentView) self is tagCtx: return empty [];\n\t\t\tview.link(\n\t\t\t\tundefined,\n\t\t\t\tself.parentElem,\n\t\t\t\telCnt ? prevNode && prevNode.previousSibling : prevNode,\n\t\t\t\tself._nxt,\n\t\t\t\tundefined,\n\t\t\t\t{get:{\n\t\t\t\t\ttags: tags,\n\t\t\t\t\tdeep: deep,\n\t\t\t\t\tname: tagName,\n\t\t\t\t\tid: self.link ? self._.id + \"_\" : self._tgId + \"^\"\n\t\t\t\t}}\n\t\t\t);\n\t\t}\n\t\treturn tags;\n\t};\n\n\tif (tagOrView._is === \"tag\") {\n\t\t//=======================\n\t\t// This is a TAG instance\n\t\t//=======================\n\n\t\ttheTag = tagOrView;\n\n\t\tm = theTag.tagCtxs.length;\n\t\twhile (m--) {\n\t\t\ttagCtx = theTag.tagCtxs[m];\n\n\t\t\ttagCtx.setValues = setValues;\n\t\t\ttagCtx.cvtArgs = $sub._tg.prototype.cvtArgs;\n\t\t\ttagCtx.bndArgs = $sub._tg.prototype.bndArgs;\n\t\t\ttagCtx.contents = tagOrView.contents;\n\t\t\ttagCtx.childTags = tagOrView.childTags;\n\t\t\ttagCtx.nodes = tagOrView.nodes;\n\t\t}\n\n\t\tboundProps = theTag.boundProps = theTag.boundProps || [];\n\t\tif (bindTo = theTag.linkTo ? [\"linkTo\"] : theTag.bindTo) {\n\t\t\tl = bindTo.length;\n\t\t\twhile (l--) {\n\t\t\t\tkey = bindTo[l];\n\t\t\t\tif (key + \"\" === key) {\n\t\t\t\t\tbindTo[key] = 1;\n\t\t\t\t\tif ($.inArray(key, boundProps) < 0) {\n\t\t\t\t\t\tboundProps.push(key); // Add any 'bindTo' props to boundProps array. (So two-way binding works without writing ^foo=expression)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttheTag.setValue = $sub._gm(theTag.constructor.prototype.setValue, function(val, index, tagElse) {\n\t\t\tif (!arguments.length) { // tag.setValue() calls setValue(val, index) for each parameter in bindTo array\n\t\t\t\ttheTag.setValues(); // = theTag.bndArgs()\n\t\t\t\treturn theTag;\n\t\t\t}\n\t\t\tvar linkedElem, linkedEl, linkedTag,\n\t\t\t\tlinkedCtxParam = theTag.linkedCtxParam,\n\t\t\t\ttagCtx = theTag.tagCtxs[tagElse || 0],\n\t\t\t\tprops = tagCtx.props,\n\t\t\t\tlinkCtx = theTag.linkCtx,\n\t\t\t\tlinkedElems = tagCtx.linkedElems || theTag.linkedElem && [theTag.linkedElem];\n\n\t\t\tif (val !== undefined) {\n\t\t\t\ttheTag.base.call(theTag , val, index, tagElse);\n\t\t\t} else if (theTag.getValue && (val = theTag.getValue(tagElse)) && val !== undefined) {\n\t\t\t\t// If bound args are not initialized, and getValue is defined, use getValue to initialize\n\t\t\t\tif (theTag.bindTo.length > 1) {\n\t\t\t\t\tval = val[index]; // getVal returns value if tag.bndArgs() (and bindTo) length is 1, or array of values if bindTo.length > 1\n\t\t\t\t}\n\t\t\t\tif (linkedCtxParam && linkedCtxParam[index]) {\n\t\t\t\t\t// Values of tag contextual param were already intialized (during rendering) so need to observably update to values from tag.getValue()\n\t\t\t\t\t$.observable(tagCtx.ctx[linkedCtxParam[index]][0]).setProperty(_ocp, val);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((linkedElem = linkedElems && linkedElems[index]) && linkedElem[0]) {\n\t\t\t\tl = linkedElem.length;\n\t\t\t\twhile (l--) {\n\t\t\t\t\tlinkedEl = linkedElem[l];\n\t\t\t\t\tif (theTag._.unlinked) {\n\t\t\t\t\t\tlinkedTag = linkedEl._jsvLkEl;\n\t\t\t\t\t\tif (!linkedTag || linkedTag !== theTag) {\n\t\t\t\t\t\t\tif (linkedTag) {\n\t\t\t\t\t\t\t\tval = linkedTag.cvtArgs(true, tagElse)[index]; // Need to use converter of linked tag\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// For data-linked tags, identify the linkedEl with the tag, for \"to\" binding\n\t\t\t\t\t\t\t// (For data-linked elements, if not yet bound, we identify later when the linkCtx.elem is bound)\n\t\t\t\t\t\t\tlinkedEl._jsvLkEl = theTag;\n\t\t\t\t\t\t\tlinkedEl._jsvInd = index;\n\t\t\t\t\t\t\tlinkedEl._jsvElse = tagElse;\n\t\t\t\t\t\t\tbindLinkedElChange(theTag, linkedEl);\n\t\t\t\t\t\t\tlinkedEl._jsvBnd = \"&\" + theTag._tgId + \"+\"; // Add a \"+\" for cloned binding - so removing\n\t\t\t\t\t\t\t// elems with cloned bindings will not remove the 'parent' binding from the bindingStore.\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (val !== undefined && !linkedEl._jsvChg && linkCtx._val !== val) {\n\t\t\t\t\t\tif (linkedEl.value !== undefined) {\n\t\t\t\t\t\t\tif (linkedEl.type === CHECKBOX) {\n\t\t\t\t\t\t\t\tlinkedEl[CHECKED] = val && val !== \"false\";\n\t\t\t\t\t\t\t} else if (linkedEl.type === RADIO) {\n\t\t\t\t\t\t\t\tlinkedEl[CHECKED] = (linkedEl.value === val);\n\t\t\t\t\t\t\t} else if ($isArray(val)) {\n\t\t\t\t\t\t\t\tlinkedEl.value = val; // Don't use jQuery since it replaces array by mapped clone\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$(linkedEl).val(val); // Use jQuery for attrHooks - can't just set value (on select, for example)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (linkedEl.contentEditable === TRUE) {\n\t\t\t\t\t\t\tlinkedEl.innerHTML = val;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (props.name) {\n\t\t\t\t\t\tlinkedEl.name = linkedEl.name || props.name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn theTag;\n\t\t});\n\n\t\ttheTag.updateValue = updateValue;\n\n\t\ttheTag.updateValues = function() {\n\t\t\treturn updateValues(arguments, undefined, this);\n\t\t};\n\n\t\ttheTag.setValues = function() {\n\t\t\tvar m = arguments.length ? 1 : theTag.tagCtxs.length;\n\t\t\twhile (m--) {\n\t\t\t\tsetValues.apply(theTag.tagCtxs[m], arguments);\n\t\t\t}\n\t\t};\n\n\t\ttheTag.refresh = function(sourceValue) {\n\t\t\tvar attr,\n\t\t\t\tlinkCtx = theTag.linkCtx,\n\t\t\t\tview = theTag.tagCtx.view;\n\n\t\t\tif (theTag.onUnbind) {\n\t\t\t\ttheTag.onUnbind(theTag.tagCtx, linkCtx, theTag.ctx);\n\t\t\t}\n\t\t\tattr = theTag.inline ? HTML : (linkCtx.attr || defaultAttr(theTag.parentElem, true));\n\t\t\tsourceValue = $sub._tag(theTag, view, view.tmpl, mergeCtxs(theTag), true); // Get rendered HTML for tag, based on refreshed tagCtxs\n\t\t\tupdateContent(sourceValue, linkCtx, attr, theTag);\n\t\t\tcallAfterLink(theTag);\n\t\t\treturn theTag;\n\t\t};\n\n\t\ttheTag.domChange = function() { // domChange notification support\n\t\t\tvar elem = this.parentElem,\n\t\t\t\thasListener = $.hasData(elem) && $._data(elem).events,\n\t\t\t\tdomChangeNotification = \"jsv-domchange\";\n\n\t\t\tif (hasListener && hasListener[domChangeNotification]) {\n\t\t\t\t// Only trigger handler if there is a handler listening for this event. (Note using triggerHandler - so no event bubbling.)\n\t\t\t\t$(elem).triggerHandler(domChangeNotification, arguments);\n\t\t\t}\n\t\t};\n\n\t\t//====================================\n\t\t// End of added link methods for TAG\n\t\t//====================================\n\t} else {\n\t\t//=========================\n\t\t// This is a VIEW prototype\n\t\t//=========================\n\n\t\ttheView = tagOrView;\n\n\t\t// Note: a linked view will also, after linking have nodes[], _prv (prevNode), _nxt (nextNode) ...\n\t\ttheView.addViews = function(index, dataItems) {\n\t\t\t// if view is not an array view, do nothing\n\t\t\tvar i, viewsCount,\n\t\t\t\tview = this,\n\t\t\t\titemsCount = dataItems.length,\n\t\t\t\tviews = view.views;\n\n\t\t\tif (!view._.useKey && itemsCount) {\n\t\t\t\t// view is of type \"array\"\n\t\t\t\tviewsCount = views.length + itemsCount;\n\n\t\t\t\tif (viewsCount === view.data.length // If views not already synced to array (e.g. triggered by array.length propertyChange - jsviews/issues/301)\n\t\t\t\t\t\t&& renderAndLink(view, index, view.tmpl, views, dataItems, view.ctx) !== false) {\n\t\t\t\t\tif (!view._.srt) { // Not part of a 'sort' on refresh\n\t\t\t\t\t\tview.fixIndex(index + itemsCount);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\ttheView.removeViews = function(index, itemsCount, keepNodes, isMove) {\n\t\t\t// view.removeViews() removes all the child views\n\t\t\t// view.removeViews(index) removes the child view with specified index or key\n\t\t\t// view.removeViews(index, count) removes the specified nummber of child views, starting with the specified index\n\t\t\tfunction removeView(index) {\n\t\t\t\tvar id, bindId, parentElem, prevNode, nextNode, nodesToRemove,\n\t\t\t\t\tviewToRemove = views[index];\n\n\t\t\t\tif (viewToRemove && viewToRemove.link) {\n\t\t\t\t\tid = viewToRemove._.id;\n\t\t\t\t\tif (!keepNodes) {\n\t\t\t\t\t\t// Remove the HTML nodes from the DOM, unless they have already been removed, including nodes of child views\n\t\t\t\t\t\tnodesToRemove = viewToRemove.nodes();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove child views, without removing nodes\n\t\t\t\t\tviewToRemove.removeViews(undefined, undefined, true);\n\n\t\t\t\t\tviewToRemove.type = undefined; // Set type to undefined: used as a flag that this view is being removed\n\t\t\t\t\tprevNode = viewToRemove._prv;\n\t\t\t\t\tnextNode = viewToRemove._nxt;\n\t\t\t\t\tparentElem = viewToRemove.parentElem;\n\t\t\t\t\t// If prevNode and nextNode are the same, the view is empty\n\t\t\t\t\tif (!keepNodes) {\n\t\t\t\t\t\t// Remove the HTML nodes from the DOM, unless they have already been removed, including nodes of child views\n\t\t\t\t\t\tif (viewToRemove._elCnt) {\n\t\t\t\t\t\t\t// if keepNodes is false (and transferring of tokens has not already been done at a higher level)\n\t\t\t\t\t\t\t// then transfer tokens from prevNode which is being removed, to nextNode.\n\t\t\t\t\t\t\ttransferViewTokens(prevNode, nextNode, parentElem, id, \"_\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$(nodesToRemove).remove();\n\t\t\t\t\t}\n\t\t\t\t\tif (!viewToRemove._elCnt) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tprevNode.parentNode.removeChild(prevNode); // (prevNode.parentNode is parentElem, except if jQuery Mobile or similar has inserted an intermediate wrapper\n\t\t\t\t\t\t\tnextNode.parentNode.removeChild(nextNode);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\t\t\t\t\tsetArrayChangeLink(viewToRemove);\n\t\t\t\t\tfor (bindId in viewToRemove._.bnds) {\n\t\t\t\t\t\tremoveViewBinding(bindId);\n\t\t\t\t\t}\n\t\t\t\t\tdelete viewStore[id];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar current, childView, viewsCount,\n\t\t\t\tview = this,\n\t\t\t\tisArray = !view._.useKey,\n\t\t\t\tviews = view.views;\n\n\t\t\tif (isArray) {\n\t\t\t\tviewsCount = views.length;\n\t\t\t}\n\t\t\tif (index === undefined) {\n\t\t\t\t// Remove all child views\n\t\t\t\tif (isArray) {\n\t\t\t\t\t// views and data are arrays\n\t\t\t\t\tcurrent = viewsCount;\n\t\t\t\t\twhile (current--) {\n\t\t\t\t\t\tremoveView(current);\n\t\t\t\t\t}\n\t\t\t\t\tview.views = [];\n\t\t\t\t} else {\n\t\t\t\t\t// views and data are objects\n\t\t\t\t\tfor (childView in views) {\n\t\t\t\t\t\t// Remove by key\n\t\t\t\t\t\tremoveView(childView);\n\t\t\t\t\t}\n\t\t\t\t\tview.views = {};\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (itemsCount === undefined) {\n\t\t\t\t\tif (isArray) {\n\t\t\t\t\t\t// The parentView is data array view.\n\t\t\t\t\t\t// Set itemsCount to 1, to remove this item\n\t\t\t\t\t\titemsCount = 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Remove child view with key 'index'\n\t\t\t\t\t\tremoveView(index);\n\t\t\t\t\t\tdelete views[index];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isArray && itemsCount\n\t\t\t\t\t&& (isMove || viewsCount - itemsCount === view.data.length)) { // If views not already synced to array (e.g. triggered by array.length propertyChange - jsviews/issues/301)\n\t\t\t\t\tcurrent = index + itemsCount;\n\t\t\t\t\t// Remove indexed items (parentView is data array view);\n\t\t\t\t\twhile (current-- > index) {\n\t\t\t\t\t\tremoveView(current);\n\t\t\t\t\t}\n\t\t\t\t\tviews.splice(index, itemsCount);\n\t\t\t\t\tif (!view._.srt) {\n\t\t\t\t\t\tview.fixIndex(index);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\ttheView.moveViews = function(oldIndex, index, itemsCount) {\n\t\t\tfunction parts(itemView, str) {\n\t\t\t\treturn RegExp(\"^(.*)(\" + (str ? \"\\\\/\" : \"#\") + itemView._.id + \"_.*)$\").exec(str || itemView._prv.getAttribute(jsvAttrStr));\n\t\t\t}\n\t\t\tfunction setPrv(itemView, tokens) {\n\t\t\t\titemView._prv.setAttribute(jsvAttrStr, tokens);\n\t\t\t}\n\t\t\tvar nodes, childView, nxtView, insertBefore, viewId,\n\t\t\t\tview = this,\n\t\t\t\tselfNxt = view._nxt,\n\t\t\t\tviews = view.views,\n\t\t\t\tbackwards = index < oldIndex,\n\t\t\t\tfirstChange = backwards ? index : oldIndex,\n\t\t\t\tlastChange = backwards ? oldIndex : index,\n\t\t\t\ti = index,\n\t\t\t\tmovedNodes = [],\n\n\t\t\t\tviewsToMove = views.splice(oldIndex, itemsCount); // remove\n\n\t\t\tif (index > views.length) {\n\t\t\t\tindex = views.length;\n\t\t\t}\n\t\t\tviews.splice.apply(views, [index, 0].concat(viewsToMove)); //re-insert\n\n\t\t\titemsCount = viewsToMove.length;\n\t\t\tinsertBefore = index + itemsCount;\n\t\t\tlastChange += itemsCount;\n\n\t\t\tfor (i; i < insertBefore; i++) {\n\t\t\t\tchildView = views[i];\n\t\t\t\tnodes = childView.nodes(true);\n\t\t\t\tmovedNodes = view._elCnt ? movedNodes.concat(nodes) : movedNodes.concat(childView._prv, nodes, childView._nxt);\n\t\t\t}\n\t\t\tmovedNodes = $(movedNodes);\n\n\t\t\tif (insertBefore < views.length) {\n\t\t\t\tmovedNodes.insertBefore(views[insertBefore]._prv);\n\t\t\t} else if (selfNxt) {\n\t\t\t\tmovedNodes.insertBefore(selfNxt);\n\t\t\t} else {\n\t\t\t\tmovedNodes.appendTo(view.parentElem);\n\t\t\t}\n\n\t\t\tif (view._elCnt) {\n\t\t\t\tvar afterParts,\n\t\t\t\t\tendChange = backwards ? firstChange + itemsCount : lastChange - itemsCount,\n\t\t\t\t\tbeforeView = views[firstChange-1],\n\t\t\t\t\tstartView = views[firstChange],\n\t\t\t\t\tendView = views[endChange],\n\t\t\t\t\tafterView = views[lastChange],\n\t\t\t\t\tstartParts = parts(startView),\n\t\t\t\t\tendParts = parts(endView);\n\n\t\t\t\tsetPrv(startView, endParts[1] + startParts[2]);\n\t\t\t\tif (afterView) {\n\t\t\t\t\tafterParts = parts(afterView);\n\t\t\t\t\tsetPrv(afterView, startParts[1] + afterParts[2]);\n\t\t\t\t} else {\n\t\t\t\t\tif (selfNxt) {\n\t\t\t\t\t\tafterParts = parts(view, selfNxt.getAttribute(jsvAttrStr));\n\t\t\t\t\t\tselfNxt.setAttribute(jsvAttrStr, startParts[1] + afterParts[2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tafterParts = parts(view, view.parentElem._df);\n\t\t\t\t\t\tsetDefer(view.parentElem, startParts[1] + afterParts[2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsetPrv(endView, afterParts[1] + endParts[2]);\n\t\t\t\tif (beforeView) {\n\t\t\t\t\tbeforeView._nxt = startView._prv;\n\t\t\t\t} else {\n\t\t\t\t\tview._prv = startView._prv;\n\t\t\t\t}\n\t\t\t\tviews[endChange-1]._nxt = endView._prv;\n\t\t\t\tviews[lastChange-1]._nxt = afterView ? afterView._prv : selfNxt;\n\t\t\t}\n\t\t\tview.fixIndex(firstChange);\n\t\t};\n\n\t\ttheView.refresh = function() {\n\t\t\tvar view = this,\n\t\t\t\tparent = view.parent;\n\n\t\t\tif (parent) {\n\t\t\t\trenderAndLink(view, view.index, view.tmpl, parent.views, view.data, undefined, true);\n\t\t\t\tsetArrayChangeLink(view);\n\t\t\t}\n\t\t};\n\n\t\ttheView.fixIndex = function(fromIndex) {\n\t\t\t// Fixup index on following view items...\n\t\t\tvar views = this.views,\n\t\t\t\tindex = views.length;\n\t\t\twhile (fromIndex < index--) {\n\t\t\t\tif (views[index].index !== index) {\n\t\t\t\t\t$observable(views[index]).setProperty(\"index\", index);\n\t\t\t\t\t// This is fixing up index, but not key, and not index on child views. From child views, use view.getIndex()\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\ttheView.link = viewLink;\n\n\t\t//====================================\n\t\t// End of added link methods for VIEW\n\t\t//====================================\n\t}\n}\n\n//========================\n// JsViews-specific converters\n//========================\n\n$converters.merge = function(val) {\n\t// Special converter used in data-linking to space-separated lists, such as className:\n\t// Currently only supports toggle semantics - and has no effect if toggle string is not specified\n\t// data-link=\"class{merge:boolExpr toggle=className}\"\n\tvar regularExpression,\n\t\tcurrentValue = this.linkCtx.elem.className,\n\t\ttoggle = this.tagCtx.props.toggle;\n\n\tif (toggle) {\n\t\t// We are toggling the class specified by the toggle property,\n\t\t// and the boolean val binding is driving the insert/remove toggle\n\n\t\tregularExpression = toggle.replace(/[\\\\^$.|?*+()[{]/g, \"\\\\$&\");\n\t\t// Escape any regular expression special characters (metacharacters) within the toggle string\n\t\tregularExpression = \"(\\\\s(?=\" + regularExpression + \"$)|(\\\\s)|^)(\" + regularExpression + \"(\\\\s|$))\";\n\t\t// Example: /(\\s(?=myclass$)|(\\s)|^)?(myclass(\\s|$))/ - so matches (\" myclass\" or \" \" or ^ ) followed by (\"myclass \" or \"myclass$\") where ^/$ are beginning/end of string\n\t\tcurrentValue = currentValue.replace(new RegExp(regularExpression), \"$2\");\n\t\tval = currentValue + (val ? (currentValue && \" \") + toggle : \"\");\n\t}\n\treturn val;\n};\n\n//========================\n// JsViews-specific tags\n//========================\n\n$tags({\n\ton: {\n\t\tattr: NONE,\n\t\tinit: function(tagCtx) {\n\t\t\tvar content,\n\t\t\t\ttag = this,\n\t\t\t\ti = 0,\n\t\t\t\targs = tagCtx.args, // [events,] [selector,] handler\n\t\t\t\tl = args.length;\n\n\t\t\tfor (; ii && i+1; // handler index\n\t\t\tif (tag.inline) {\n\t\t\t\tif (!$sub.rTmpl.exec(content = $.trim(tagCtx.tmpl.markup))) {\n\t\t\t\t\t// Inline {^{on}} tag with no content (or external template content) or with content containing\n\t\t\t\t\t// no HTML or JsRender tags: We will wrap the (text) content, or the operation name in a \";\n\t\t\t\t}\n\t\t\t\ttag.attr = HTML;\n\t\t\t}\n\t\t},\n\t\tonBind: function() {\n\t\t\tif (this.template) { // {^{on/}} with no content has template rendering
\", \"
\"],\n\t\ttr: [2, \"\", \"
\"],\n\t\ttd: [3, \"\", \"
\"],\n\t\tcol: [2, \"\", \"
\"],\n\t\tsvg_ns: [1, \"\", \"\"],\n\t\t// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,\n\t\t// unless wrapped in a div with non-breaking characters in front of it.\n\t\tdiv: $.support.htmlSerialize ? [0, \"\", \"\"] : [1, \"X
\", \"
\"]\n\t},\n\t_fe: {\n\t\tinput: {\n\t\t\tfrom: inputAttrib, to: VALUE\n\t\t},\n\t\ttextarea: valueBinding,\n\t\tselect: valueBinding,\n\t\toptgroup: {\n\t\t\tto: \"label\"\n\t\t}\n\t}\n});\n\n\treturn $;\n}, window));\n"]} \ No newline at end of file diff --git a/jsrender.js b/jsrender.js index 81ddfa9..9500ad3 100644 --- a/jsrender.js +++ b/jsrender.js @@ -1,4 +1,4 @@ -/*! JsRender v0.9.89 (Beta): http://jsviews.com/#jsrender */ +/*! JsRender v0.9.90 (Beta): http://jsviews.com/#jsrender */ /*! **VERSION FOR WEB** (For NODE.JS see http://jsviews.com/download/jsrender-node.js) */ /* * Best-of-breed templating in browser or on Node.js. @@ -44,7 +44,7 @@ var setGlobals = $ === false; // Only set globals if script block in browser (no $ = $ && $.fn ? $ : global.jQuery; // $ is jQuery passed in by CommonJS loader (Browserify), or global jQuery. -var versionNumber = "v0.9.89", +var versionNumber = "v0.9.90", jsvStoreName, rTag, rTmplString, topView, $views, $expando, _ocp = "_ocp", // Observable contextual parameter @@ -192,9 +192,11 @@ function getMethod(baseMethod, method) { } function tagHandlersFromProps(tag, tagCtx) { - for (var prop in tagCtx.props) { + var prop, + props = tagCtx.props; + for (prop in props) { if (rHasHandlers.test(prop) && !(tag[prop] && tag[prop].fix)) { // Don't override handlers with fix expando (used in datepicker and spinner) - tag[prop] = getMethod(tag.constructor.prototype[prop], tagCtx.props[prop]); + tag[prop] = prop !== "convert" ? getMethod(tag.constructor.prototype[prop], props[prop]) : props[prop]; // Copy over the onFoo props, convert and convertBack from tagCtx.props to tag (overrides values in tagDef). // Note: unsupported scenario: if handlers are dynamically added ^onFoo=expression this will work, but dynamically removing will not work. } @@ -366,9 +368,9 @@ function contextParameter(key, value, isContextCb) { // Not a contextual parameter if (store !== $helpers) { // Set storeView to tag (if this is a tag.ctxPrm() call) or to root view ("data" view of linked template) - storeView = storeView.views // Is a view, not a tag? - ? (storeView = storeView.scope || storeView, !storeView.isTop && storeView.ctx.tag || storeView) - : storeView.ctx.tag; + storeView = storeView.tagCtx + ? storeView // Is a tag, not a view + : (storeView = storeView.scope || storeView, !storeView.isTop && storeView.ctx.tag || storeView); store = storeView._ocps; res = store && store[key] || res; } @@ -389,7 +391,7 @@ function contextParameter(key, value, isContextCb) { } res = res[1] // linkFn for compiled expression ? obsCtxPrm.tag && obsCtxPrm.tag.cvtArgs - ? obsCtxPrm.tag.cvtArgs(undefined, 1, obsCtxPrm.tagElse)[obsCtxPrm.ind] // = tag.bndArgs() - for tag contextual parameter + ? obsCtxPrm.tag.cvtArgs(true, obsCtxPrm.tagElse)[obsCtxPrm.ind] // = tag.bndArgs() - for tag contextual parameter : res[1](res[0].data, res[0], $sub) // = fn(data, view, $sub) for compiled binding expression : res[0]._ocp; // Observable contextual parameter (uninitialized, or initialized as static expression, so no path dependencies) } @@ -419,6 +421,7 @@ function getTemplate(tmpl) { //============== function convertVal(converter, view, tagCtx, onError) { + // Called from compiled template code for {{:}} // self is template object or linkCtx object var tag, value, argsLen, bindTo, // If tagCtx is an integer, then it is the key for the compiled function to return the boundTag tagCtx @@ -446,7 +449,7 @@ function convertVal(converter, view, tagCtx, onError) { }, inline: !linkCtx, tagName: ":", - cvt: converter, + convert: converter, flow: true, tagCtx: tagCtx }); @@ -468,7 +471,7 @@ function convertVal(converter, view, tagCtx, onError) { tag.ctx = tagCtx.ctx || tag.ctx || {}; tagCtx.ctx = undefined; - value = tag.cvtArgs(converter !== "true" && converter)[0]; // If there is a convertBack but no convert, converter will be "true" + value = tag.cvtArgs()[0]; // If there is a convertBack but no convert, converter will be "true" } // Call onRender (used by JsViews if present, to add binding annotations around rendered content) @@ -478,8 +481,8 @@ function convertVal(converter, view, tagCtx, onError) { return value != undefined ? value : ""; } -function convertArgs(converter, bound, tagElse) { // tag.cvtArgs() - var l, key, boundArgs, args, bindTo, tag, +function convertArgs(bound, tagElse) { // tag.cvtArgs() + var l, key, boundArgs, args, bindTo, tag, converter, tagCtx = this; if (tagCtx.tagName) { @@ -487,35 +490,35 @@ function convertArgs(converter, bound, tagElse) { // tag.cvtArgs() tagCtx = tag.tagCtxs ? tag.tagCtxs[tagElse || 0] : tag.tagCtx; } else { tag = tagCtx.tag; - tagElse = tagCtx.index; } bindTo = tag.bindTo; args = tagCtx.args; - converter = converter || tag.convert; - if ("" + converter === converter) { - converter = tagCtx.view.getRsc("converters", converter) || error("Unknown converter: '" + converter + "'"); + if ((converter = tag.convert) && "" + converter === converter) { + converter = converter === "true" + ? undefined + : (tagCtx.view.getRsc("converters", converter) || error("Unknown converter: '" + converter + "'")); } - if (!args.length && tag.argDefault !== false && !tagCtx.index) { - args = [tagCtx.view.data]; // Missing first arg defaults to the current data context - } else if (converter && !bound) { // If there is a converter, use a copy of the tagCtx.args array for rendering, and replace the args[0] in - args = args.slice(); // the copied array with the converted value. But we do not modify the value of tag.tagCtx.args[0] (the original args array) - } - - if (bindTo) { // Get the values of the boundArgs - boundArgs = []; - l = bindTo.length; - while (l--) { - key = bindTo[l]; - boundArgs.unshift(argOrProp(tagCtx, key)); + if (bound && bound.length) { + args = bound; + } else { + if (converter && !bound) { // If there is a converter, use a copy of the tagCtx.args array for rendering, and replace the args[0] in + args = args.slice(); // the copied array with the converted value. But we do not modify the value of tag.tagCtx.args[0] (the original args array) } - if (bound) { - args = boundArgs; // Call to convertBoundArgs() - returns the boundArgs + if (bindTo) { // Get the values of the boundArgs + boundArgs = []; + l = bindTo.length; + while (l--) { + key = bindTo[l]; + boundArgs.unshift(argOrProp(tagCtx, key)); + } + if (bound) { + args = boundArgs; // Call to convertBoundArgs() - returns the boundArgs + } } } - if (converter) { bindTo = bindTo || [0]; l = bindTo.length; @@ -545,7 +548,7 @@ function argOrProp(context, key) { } function convertBoundArgs(tagElse) { // tag.bndArgs() - return this.cvtArgs(undefined, true, tagElse); + return this.cvtArgs(true, tagElse); } //============= @@ -555,18 +558,31 @@ function convertBoundArgs(tagElse) { // tag.bndArgs() function getResource(resourceType, itemName) { var res, store, view = this; - while ((res === undefined) && view) { - store = view.tmpl && view.tmpl[resourceType]; - res = store && store[itemName]; - view = view.parent; + if ("" + itemName === itemName) { + while ((res === undefined) && view) { + store = view.tmpl && view.tmpl[resourceType]; + res = store && store[itemName]; + view = view.parent; + } + return res || $views[resourceType][itemName]; } - return res || $views[resourceType][itemName]; } function renderTag(tagName, parentView, tmpl, tagCtxs, isUpdate, onError) { + function makeArray(type) { + var linkedElement; + if (linkedElement = tag[type]) { + tag[type] = linkedElement = $isArray(linkedElement) ? linkedElement: [linkedElement]; + + if (bindToLength !== linkedElement.length) { + error(type + " length not same as bindTo "); + } + } + } + parentView = parentView || topView; var tag, tag_, tagDef, template, tags, attr, parentTag, l, m, n, itemRet, tagCtx, tagCtxCtx, ctxPrm, bindTo, - content, callInit, mapDef, thisMap, args, props, tagDataMap, contentCtx, key, + content, callInit, mapDef, thisMap, args, props, tagDataMap, contentCtx, key, bindToLength, i = 0, ret = "", linkCtx = parentView.linkCtx || 0, @@ -584,13 +600,14 @@ function renderTag(tagName, parentView, tmpl, tagCtxs, isUpdate, onError) { tagDef = parentView.getRsc("tags", tagName) || error("Unknown tag: {{" + tagName + "}} "); template = tagDef.template; } - - if (onError === undefined && boundTag && boundTag._lr) { - onError = ""; + if (onError === undefined && boundTag) { + if (boundTag._lr = (tagDef.lateRender || boundTag._lr) && boundTag._lr !== "false") { + onError = ""; // If lateRender, set temporary onError, to skip initial rendering (and render just "") + } } if (onError !== undefined) { ret += onError; - tagCtxs = onError = [{props: {}, args: []}]; + tagCtxs = onError = [{props: {}, args: [], params: {}}]; } else if (boundTag) { tagCtxs = boundTag(parentView.data, parentView, $sub); } @@ -613,6 +630,7 @@ function renderTag(tagName, parentView, tmpl, tagCtxs, isUpdate, onError) { if (tmpl = tagCtx.props.tmpl) { // If the tmpl property is overridden, set the value (when initializing, or, in case of binding: ^tmpl=..., when updating) tagCtx.tmpl = parentView.getTmpl(tmpl); + tagCtx.content = tagCtx.content || tagCtx.tmpl; } if (!tag) { @@ -641,7 +659,6 @@ function renderTag(tagName, parentView, tmpl, tagCtxs, isUpdate, onError) { //TODO better perf for childTags() - keep child tag.tags array, (and remove child, when disposed) // tag.tags = []; } - bindTo = tag.bindTo || [0]; tagCtxs = tag.tagCtxs; tagDataMap = tag.dataMap; @@ -674,6 +691,32 @@ function renderTag(tagName, parentView, tmpl, tagCtxs, isUpdate, onError) { tag.init(tagCtx, linkCtx, tag.ctx); callInit = undefined; } + if (!tagCtx.args.length && tag.argDefault !== false) { + tagCtx.args = args = [tagCtx.view.data]; // Missing first arg defaults to the current data context + tagCtx.params.args = ["#data"]; + } + + bindTo = tag.bindTo; + + if (bindTo !== undefined) { + bindTo = tag.bindTo = $isArray(bindTo) ? bindTo : [bindTo]; + m = bindTo.length; + while (m--) { + key = bindTo[m]; + if (!isNaN(parseInt(key))) { + key = parseInt(key); // Convert "0" to 0, etc. + } + bindTo[m] = key; + } + } + + bindTo = tag.bindTo || [0]; + bindToLength = bindTo.length; + if (tag._.bnd){ + makeArray("linkedElement"); + makeArray("linkedCtxParam"); + } + if (linkCtx) { // Set attr on linkCtx to ensure outputting to the correct target attribute. // Setting either linkCtx.attr or this.attr in the init() allows per-instance choice of target attrib. @@ -682,9 +725,9 @@ function renderTag(tagName, parentView, tmpl, tagCtxs, isUpdate, onError) { attr = tag.attr; tag._.noVws = attr && attr !== HTML; } - args = tag.cvtArgs(undefined, undefined, i); + args = tag.cvtArgs(undefined, i); if (tag.linkedCtxParam) { - m = bindTo.length; + m = bindToLength; while (m--) { if (ctxPrm = tag.linkedCtxParam[m]) { key = bindTo[m]; @@ -849,16 +892,6 @@ function compileTag(name, tagDef, parentTmpl) { tag.tagName = name; } - function makeArray(type) { - var linkedElement; - if (linkedElement = tagDef[type]) { - tagDef[type] = linkedElement = $isArray(linkedElement) ? linkedElement: [linkedElement]; - if ((bindToLength || 1) !== linkedElement.length) { - error(type + " length not same as bindTo "); - } - } - } - if ($isFunction(tagDef)) { // Simple tag declared as function. No presenter instantation. tagDef = { @@ -869,21 +902,6 @@ function compileTag(name, tagDef, parentTmpl) { tagDef = {template: tagDef}; } - if (bindTo !== undefined) { - bindTo = tagDef.bindTo = $isArray(bindTo) ? bindTo : [bindTo]; - l = bindToLength = bindTo.length; - while (l--) { - key = bindTo[l]; - if (!isNaN(parseInt(key))) { - key = parseInt(key); // Convert "0" to 0, etc. - } - bindTo[l] = key; - } - } - - makeArray("linkedElement"); - makeArray("linkedCtxParam"); - if (baseTag = tagDef.baseTag) { tagDef.flow = !!tagDef.flow; // Set flow property, so defaults to false even if baseTag has flow=true tagDef.baseTag = baseTag = "" + baseTag === baseTag @@ -1350,16 +1368,15 @@ function registerStore(storeName, storeSettings) { } } else { if (compile) { - item = compile.call(thisStore, name, item, parentTmpl, 0); + item = compile.call(thisStore, name, item, parentTmpl, 0) || {}; item._is = storeName; // Only do this for compiled objects (tags, templates...) } - // e.g. JsViews integration - if (name) { thisStore[name] = item; } } if (onStore) { + // e.g. JsViews integration onStore(name, item, parentTmpl, compile); } return item; @@ -1437,12 +1454,9 @@ function renderContent(data, context, noIteration, parentView, key, onRender) { view = data; // When passing in a view to render or link (and not passing in a parent view) use the passed-in view as parentView } - if (view) { - if (data === view) { - // Inherit the data from the parent view. - // This may be the contents of an {{if}} block - data = view.data; - } + if (view && data === view) { + // Inherit the data from the parent view. + data = view.data; } isTopRenderCall = !view; @@ -1459,6 +1473,7 @@ function renderContent(data, context, noIteration, parentView, key, onRender) { view.index = indexStr; } else { view = topView; + prevData = view.data; view.data = data; view.ctx = context; } @@ -1750,7 +1765,7 @@ function tmplFn(markup, tmpl, isLinkExpr, convertBack, hasElse) { useTrigger += keyValue; } if (keyToken === "lateRender") { - late = 1; // Render after first pass + late = param; // Render after first pass } props += key + keyValue + ","; paramsProps += key + "'" + param + "',"; @@ -2106,7 +2121,6 @@ function buildCode(ast, tmpl, isLinkExpr) { converter = node[1]; content = !isLinkExpr && node[2]; tagCtx = paramStructure(node[3], 'params') + '},' + paramStructure(params = node[4]); - onError = node[5] || $subSettings.debugMode !== false && "undefined"; // If debugMode not false, set default onError handler on tag to "undefined" (see onRenderError) trigger = node[6]; lateRender = node[7]; markup = node[9] && node[9].replace(rUnescapeQuotes, "$1"); @@ -2114,9 +2128,12 @@ function buildCode(ast, tmpl, isLinkExpr) { if (pathBindings) { pathBindings.push(node[8]); } - } else if (tmplBindings && (pathBindings = node[8])) { // Array of paths, or false if not data-bound - pathBindings = [pathBindings]; - tmplBindingKey = tmplBindings.push(1); // Add placeholder in tmplBindings for compiled function + } else { + onError = node[5] || $subSettings.debugMode !== false && "undefined"; // If debugMode not false, set default onError handler on tag to "undefined" (see onRenderError) + if (tmplBindings && (pathBindings = node[8])) { // Array of paths, or false if not data-bound + pathBindings = [pathBindings]; + tmplBindingKey = tmplBindings.push(1); // Add placeholder in tmplBindings for compiled function + } } useViews = useViews || params[1] || params[2] || pathBindings || /view.(?!index)/.test(params[0]); // useViews is for perf optimization. For render() we only use views if necessary - for the more advanced scenarios. @@ -2214,7 +2231,7 @@ function buildCode(ast, tmpl, isLinkExpr) { pathBindings = 0; tagAndElses = 0; } - if (onError) { + if (onError && !nextIsElse) { useViews = true; code += ';\n}catch(e){ret' + (isLinkExpr ? "urn " : "+=") + boundOnErrStart + 'j._err(e,view,' + onError + ')' + boundOnErrEnd + ';}' + (isLinkExpr ? "" : 'ret=ret'); } @@ -2411,12 +2428,12 @@ if (!(jsr || $ && $.render)) { tagCtx = self.tagCtx, ret = (self.rendering.done || !val && (arguments.length || !tagCtx.index)) ? "" - : (self.rendering.done = true, self.selected = tagCtx.index, - // Test is satisfied, so render content on current context. We call tagCtx.render() rather than return undefined - // (which would also render the tmpl/content on the current context but would iterate if it is an array) - tagCtx.render(tagCtx.view, true)); // no arg, so renders against parentView.data + : (self.rendering.done = true, + self.selected = tagCtx.index, + undefined); // Test is satisfied, so render content on current context return ret; }, + contentCtx: true, // Inherit parent view data context flow: true }, "for": { diff --git a/jsrender.min.js b/jsrender.min.js index 14dae64..1c0437c 100644 --- a/jsrender.min.js +++ b/jsrender.min.js @@ -1,4 +1,4 @@ -/*! JsRender v0.9.89 (Beta): http://jsviews.com/#jsrender */ +/*! JsRender v0.9.90 (Beta): 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 ne(t)&&(t=n(e?e._d?e:n(a,e):a,t),t._d=1),t}function i(e,t){for(var n in t.props)!Ee.test(n)||e[n]&&e[n].fix||(e[n]=r(e.constructor.prototype[n],t.props[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 d(e){this.name=(t.link?"JsViews":"JsRender")+" Error",this.message=e||this.name}function l(e,t){if(e){for(var n in t)e[n]=t[n];return e}}function u(e,t,n){return e?re(e)?u.apply(ee,e):(le.delimiters=[e,t,he=n?n.charAt(0):he],ce=e.charAt(0),fe=e.charAt(1),ge=t.charAt(0),ve=t.charAt(1),e="\\"+ce+"(\\"+he+")?\\"+fe,t="\\"+ge+"\\"+ve,X="(?:(\\w+(?=[\\/\\s\\"+ge+"]))|(\\w+)?(:)|(>)|(\\*))\\s*((?:[^\\"+ge+"]|\\"+ge+"(?!\\"+ve+"))*?)",de.rTag="(?:"+X+")",X=new RegExp("(?:"+e+X+"(\\/)?|\\"+ce+"(\\"+he+")?\\"+fe+"(?:(?:\\/(\\w+))\\s*|!--[\\s\\S]*?--))"+t,"g"),de.rTmpl=new RegExp("^\\s|\\s$|<.*>|([^\\\\]|^)[{}]|"+e+".*"+t),pe):le.delimiters}function p(e,t){t||e===!0||(t=e,e=void 0);var n,r,i,o,a=this,s=!t||"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&&r1)for(d=o.bindTo=[];s--;)d.unshift(s);p&&(p.tag=o,o.linkCtx=p),n.ctx=Q(n.ctx,(p?p.view:t).ctx),i(o,n)}o._er=r&&a,o.ctx=n.ctx||o.ctx||{},n.ctx=void 0,a=o.cvtArgs("true"!==e&&e)[0]}return a=u&&t._.onRender?t._.onRender(a,t,o):a,void 0!=a?a:""}function m(e,t,n){var r,i,o,a,s,d,l=this;if(l.tagName?(d=l,l=d.tagCtxs?d.tagCtxs[n||0]:d.tagCtx):(d=l.tag,n=l.index),s=d.bindTo,a=l.args,e=e||d.convert,""+e===e&&(e=l.view.getRsc("converters",e)||I("Unknown converter: '"+e+"'")),a.length||d.argDefault===!1||l.index?e&&!t&&(a=a.slice()):a=[l.view.data],s){for(o=[],r=s.length;r--;)i=s[r],o.unshift(w(l,i));t&&(a=o)}if(e)if(s=s||[0],r=s.length,e=e.apply(d,o||a),re(e)&&e.length===r||(e=[e],s=[0],r=1),t)a=e;else for(;r--;)i=s[r],+i===i&&(a[i]=e[r]);return a}function w(e,t){return e=e[+t===t?"args":"props"],e&&e[t]}function x(e){return this.cvtArgs(void 0,!0,e)}function _(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||ee[e][t]}function b(e,t,n,r,o,a){t=t||Y;var s,d,l,u,p,c,f,g,v,h,m,x,_,b,y,k,C,T,j,A,V,R,$=0,E="",M=t.linkCtx||0,N=t.ctx,P=n||t.tmpl,O="number"==typeof r&&t.tmpl.bnds[r-1];for("tag"===e._is?(s=e,e=s.tagName,r=s.tagCtxs,l=s.template):(d=t.getRsc("tags",e)||I("Unknown tag: {{"+e+"}} "),l=d.template),void 0===a&&O&&O._lr&&(a=""),void 0!==a?(E+=a,r=a=[{props:{},args:[]}]):O&&(r=O(t.data,t,de)),f=r.length;$0&&(a=n)){if(!a)if(/^\.\/[^\\:*?"<>]*$/.test(n))(s=ie[e=e||n])?n=s:a=document.getElementById(n);else if(t.fn&&!de.rTmpl.test(n))try{a=t(n,document)[0]}catch(d){}a&&(i?n=a.innerHTML:(o=a.getAttribute(Oe),o&&(o!==Ue?(n=ie[o],delete ie[o]):t.fn&&(n=t.data(a)[Ue])),o&&n||(e=e||(t.fn?Ue:n),n=j(e,a.innerHTML,r,i)),n.tmplName=e=e||o,e!==Ue&&(ie[e]=n),a.setAttribute(Oe,e),t.fn&&t.data(a,Ue,n))),a=void 0}else n.fn||(n=void 0);return n}var a,s,d=n=n||"";if(de._html=oe.html,0===i&&(i=void 0,d=o(d)),i=i||(n.markup?n:{}),i.tmplName=e,r&&(i._parentTmpl=r),!d&&n.markup&&(d=o(n.markup))&&d.fn&&(d=d.markup),void 0!==d)return d.fn||n.fn?d.fn&&(s=d):(n=$(d,i),U(d.replace(Te,"\\$&"),n)),s||(s=l(function(){return s.render.apply(s,arguments)},n),k(s)),s}function A(e,t){return ne(e)?e.call(t):e}function V(e){for(var t=[],n=0,r=e.length;nS-(I||0))){if(I=F.slice(I,S+r.length),q!==!0)if(J=o||p[g-1].bd,K=J[J.length-1],K&&K.prm){for(;K.sb&&K.sb.prm;)K=K.sb;B=K.sb={path:K.sb,bnd:K.bnd}}else J.push(B={path:J.pop()});E=fe+":"+I+" onerror=''"+ge,q=f[E],q||(f[E]=!0,f[E]=q=U(E,n,!0)),q!==!0&&B&&(B._cpfn=q,B.prm=u.bd,B.bnd=B.bnd||B.path&&B.path.indexOf("^")>=0)}return d?(d=!V,d?r:A+'"'):s?(s=!R,s?r:A+'"'):(w?(h[g]=S++,u=p[++g]={bd:[]},w):"")+(N?g?"":(c=F.slice(c,S),(i?(i=a=o=!1,"\b"):"\b,")+c+(c=S+r.length,l&&t.push(u.bd=[]),"\b")):k?(g&&O(e),l&&t.pop(),i=_,a=x,c=S+r.length,l&&(l=u.bd=t[i]=[],l.skp=!x),_+":"):_?_.split("^").join(".").replace(be,P)+(T?(u=p[++g]={bd:[]},v[g]=L,T):b):b?b:$?($=v[g]||$,v[g]=!1,u=p[--g],$+(T?(u=p[++g],v[g]=L,T):"")):j?(v[g]||O(e),","):m?"":(d=V,s=R,'"'))}O(e)}var i,o,a,s,d,l=t&&t[0],u={bd:l},p={0:u},c=0,f=(n?n.links:l&&(l.links=l.links||{}))||Y.tmpl.links,g=0,v={},h={},m=(e+(n?" ":"")).replace(ye,r);return!g&&m||O(e)}function L(e,t,n){var r,i,o,a,s,d,l,u,p,c,f,g,v,h,m,w,x,_,b,y,k,C,T,j,A,V,R,E,M,N,S,F=0,P=ue.useViews||t.useViews||t.tags||t.templates||t.helpers||t.converters,I="",U={},J=e.length;for(""+t===t?(_=n?'data-link="'+t.replace(ke," ").slice(1,-1)+'"':t,t=0):(_=t.tmplName||"unnamed",t.allowCode&&(U.allowCode=!0),t.debug&&(U.debug=!0),f=t.bnds,x=t.tmpls),r=0;r":a+o):(k&&(b=$(C,U),b.tmplName=_+"/"+o,b.useViews=b.useViews||P,L(k,b),P=b.useViews,x.push(b)),A||(y=o,P=P||o&&(!se[o]||!se[o].flow),j=I,I=""),T=e[r+1],T=T&&"else"===T[0]),M=E?";\ntry{\nret+=":"\n+",h="",m="",V&&(g||N||a&&a!==Pe||S)){if(R=new Function("data,view,j,u","// "+_+" "+ ++F+" "+o+"\nreturn {"+s+"};"),R._er=E,R._tag=o,R._bd=!!g,R._lr=S,n)return R;q(R,g),w='c("'+a+'",view,',c=!0,h=w+F+",",m=")"}if(I+=V?(n?(E?"try{\n":"")+"return ":M)+(c?(c=void 0,P=p=!0,w+(R?(f[F-1]=R,F):"{"+s+"}")+")"):">"===o?(l=!0,"h("+v[0]+")"):(u=!0,"((v="+v[0]+")!=null?v:"+(n?"null)":'"")'))):(d=!0,"\n{view:view,tmpl:"+(k?x.length:"0")+","+s+"},"),y&&!T){if(I="["+I.slice(0,-1)+"]",w='t("'+y+'",view,this,',n||g){if(I=new Function("data,view,j,u"," // "+_+" "+F+" "+y+"\nreturn "+I+";"),I._er=E,I._tag=y,g&&q(f[F-1]=I,g),I._lr=S,n)return I;h=w+F+",undefined,",m=")"}I=j+M+w+(I.deps&&F||I)+")",g=0,y=0}E&&(P=!0,I+=";\n}catch(e){ret"+(n?"urn ":"+=")+h+"j._err(e,view,"+E+")"+m+";}"+(n?"":"ret=ret"))}I="// "+_+"\nvar v"+(d?",t=j._tag":"")+(p?",c=j._cnvt":"")+(l?",h=j._html":"")+(n?";\n":',ret=""\n')+(U.debug?"debugger;":"")+I+(n?"\n":";\nreturn ret;");try{I=new Function("data,view,j,u",I)}catch(B){O("Compiled template code:\n\n"+I+'\n: "'+(B.message||B)+'"')}return t&&(t.fn=I,t.useViews=!!P),I}function Q(e,t){return e&&e!==t?t?l(l({},t),e):e:t&&l({},t)}function H(e){return Fe[e]||(Fe[e]="&#"+e.charCodeAt(0)+";")}function D(e){var t,n,r=[];if(typeof e===Ie)for(t in e)n=e[t],t!==te&&e.hasOwnProperty(t)&&!ne(n)&&r.push({key:t,prop:n});return r}function Z(e,n,r){var i=this.jquery&&(this[0]||I("Unknown template")),o=i.getAttribute(Oe);return S.call(o&&t.data(i)[Ue]||ie(i),e,n,r)}function z(e){return void 0!=e?$e.test(e)&&(""+e).replace(Ne,H)||e:""}var G=t===!1;t=t&&t.fn?t:e.jQuery;var W,X,Y,ee,te,ne,re,ie,oe,ae,se,de,le,ue,pe,ce,fe,ge,ve,he,me,we,xe="v0.9.89",_e="_ocp",be=/^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,ye=/(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(!*?[#~]?[\w$.^]+)?\s*((\+\+|--)|\+|-|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=\s*[.^]|\s*$|[^([])|[)\]])([([]?))|(\s+)/g,ke=/[ \t]*(\r\n|\n|\r)/g,Ce=/\\(['"])/g,Te=/['"\\]/g,je=/(?:\x08|^)(onerror:)?(?:(~?)(([\w$_\.]+):)?([^\x08]+))\x08(,)?([^\x08]+)/gi,Ae=/^if\s/,Ve=/<(\w+)[>\s]/,Re=/[\x00`><"'&=]/g,$e=/[\x00`><\"'&=]/,Ee=/^on[A-Z]|^convert(Back)?$/,Me=/^\#\d+_`[\s\S]*\/\d+_`$/,Ne=Re,Se=0,Fe={"&":"&","<":"<",">":">","\0":"�","'":"'",'"':""","`":"`","=":"="},Pe="html",Ie="object",Oe="data-jsv-tmpl",Ue="jsvTmpl",qe="For #index in nested block use #getIndex().",Je={},Ke=e.jsrender,Be=Ke&&t&&!t.render,Le={template:{compile:j},tag:{compile:C},viewModel:{compile:R},helper:{},converter:{}};if(ee={jsviews:xe,sub:{View:y,Err:d,tmplFn:U,parse:B,extend:l,extendCtx:Q,syntaxErr:O,onStore:{template:function(e,t){null===t?delete Je[e]:Je[e]=t}},addSetting:M,settings:{allowCode:!1},advSet:a,_ths:i,_gm:r,_tg:function(){},_cnvt:h,_tag:b,_er:I,_err:P,_cp:o,_sq:function(e){return"constructor"===e&&O(""),e}},settings:{delimiters:u,advanced:function(e){return e?(l(ue,e),de.advSet(),pe):ue}},map:N},(d.prototype=new Error).constructor=d,c.depends=function(){return[this.get("item"),"index"]},f.depends="index",y.prototype={get:p,getIndex:f,getRsc:_,getTmpl:v,ctxPrm:g,_is:"view"},de=ee.sub,pe=ee.settings,!(Ke||t&&t.render)){for(W in Le)E(W,Le[W]);oe=ee.converters,ae=ee.helpers,se=ee.tags,de._tg.prototype={baseApply:T,cvtArgs:m,bndArgs:x,ctxPrm:g},Y=de.topView=new y,t?(t.fn.render=Z,te=t.expando,t.observable&&(l(de,t.views.sub),ee.map=t.views.map)):(t={},G&&(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)},de._jq=function(e){e!==t&&(l(e,t),t=e,t.fn.render=Z,delete t.jsrender,te=t.expando)},t.jsrender=xe),le=de.settings,le.allowCode=!1,ne=t.isFunction,t.render=Je,t.views=ee,t.templates=ie=ee.templates;for(me in le)M(me);(pe.debugMode=function(e){return void 0===e?le.debugMode:(le.debugMode=e,le.onError=e+""===e?new Function("","return '"+e+"';"):ne(e)?e:void 0,pe)})(!1),ue=le.advanced={useViews:!1,_jsv:!1},se({"if":{render:function(e){var t=this,n=t.tagCtx,r=t.rendering.done||!e&&(arguments.length||!n.index)?"":(t.rendering.done=!0,t.selected=n.index,n.render(n.view,!0));return r},flow:!0},"for":{render:function(e){var t,n=!arguments.length,r=this,i=r.tagCtx,o="",a=0;return r.rendering.done||(t=n?i.view.data:e,void 0!==t&&(o+=i.render(t,n),a+=re(t)?t.length:1),(r.rendering.done=a)&&(r.selected=i.index)),o},flow:!0},props:{baseTag:"for",dataMap:N(D),flow:!0},include:{flow:!0},"*":{render:o,flow:!0},":*":{render:o,flow:!0},dbg:ae.dbg=oe.dbg=s}),oe({html:z,attr:z,url:function(e){return void 0!=e?encodeURI(""+e):null===e?e:""}})}return le=de.settings,re=(t||Ke).isArray,pe.delimiters("{{","}}","^"),Be&&Ke.views.sub._jq(t),t||Ke},window); +!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 ne(t)&&(t=n(e?e._d?e:n(a,e):a,t),t._d=1),t}function i(e,t){var n,i=t.props;for(n in i)!Ee.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 d(e){this.name=(t.link?"JsViews":"JsRender")+" Error",this.message=e||this.name}function l(e,t){if(e){for(var n in t)e[n]=t[n];return e}}function u(e,t,n){return e?re(e)?u.apply(ee,e):(le.delimiters=[e,t,he=n?n.charAt(0):he],ce=e.charAt(0),fe=e.charAt(1),ge=t.charAt(0),ve=t.charAt(1),e="\\"+ce+"(\\"+he+")?\\"+fe,t="\\"+ge+"\\"+ve,X="(?:(\\w+(?=[\\/\\s\\"+ge+"]))|(\\w+)?(:)|(>)|(\\*))\\s*((?:[^\\"+ge+"]|\\"+ge+"(?!\\"+ve+"))*?)",de.rTag="(?:"+X+")",X=new RegExp("(?:"+e+X+"(\\/)?|\\"+ce+"(\\"+he+")?\\"+fe+"(?:(?:\\/(\\w+))\\s*|!--[\\s\\S]*?--))"+t,"g"),de.rTmpl=new RegExp("^\\s|\\s$|<.*>|([^\\\\]|^)[{}]|"+e+".*"+t),pe):le.delimiters}function p(e,t){t||e===!0||(t=e,e=void 0);var n,r,i,o,a=this,s=!t||"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&&r1)for(d=o.bindTo=[];s--;)d.unshift(s);p&&(p.tag=o,o.linkCtx=p),n.ctx=Q(n.ctx,(p?p.view:t).ctx),i(o,n)}o._er=r&&a,o.ctx=n.ctx||o.ctx||{},n.ctx=void 0,a=o.cvtArgs()[0]}return a=u&&t._.onRender?t._.onRender(a,t,o):a,void 0!=a?a:""}function m(e,t){var n,r,i,o,a,s,d,l=this;if(l.tagName?(s=l,l=s.tagCtxs?s.tagCtxs[t||0]:s.tagCtx):s=l.tag,a=s.bindTo,o=l.args,(d=s.convert)&&""+d===d&&(d="true"===d?void 0:l.view.getRsc("converters",d)||I("Unknown converter: '"+d+"'")),e&&e.length)o=e;else if(d&&!e&&(o=o.slice()),a){for(i=[],n=a.length;n--;)r=a[n],i.unshift(w(l,r));e&&(o=i)}if(d)if(a=a||[0],n=a.length,d=d.apply(s,i||o),re(d)&&d.length===n||(d=[d],a=[0],n=1),e)o=d;else for(;n--;)r=a[n],+r===r&&(o[r]=d[n]);return o}function w(e,t){return e=e[+t===t?"args":"props"],e&&e[t]}function x(e){return this.cvtArgs(!0,e)}function _(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||ee[e][t]}}function b(e,t,n,r,o,a){function s(e){var t;(t=d[e])&&(d[e]=t=re(t)?t:[t],E!==t.length&&I(e+" length not same as bindTo "))}t=t||Y;var d,l,u,p,c,f,g,v,h,m,x,_,b,y,k,C,T,j,A,R,V,$,E,M=0,N="",P=t.linkCtx||0,O=t.ctx,U=n||t.tmpl,q="number"==typeof r&&t.tmpl.bnds[r-1];for("tag"===e._is?(d=e,e=d.tagName,r=d.tagCtxs,u=d.template):(l=t.getRsc("tags",e)||I("Unknown tag: {{"+e+"}} "),u=l.template),void 0===a&&q&&(q._lr=(l.lateRender||q._lr)&&"false"!==q._lr)&&(a=""),void 0!==a?(N+=a,r=a=[{props:{},args:[],params:{}}]):q&&(r=q(t.data,t,de)),g=r.length;M0&&(a=n)){if(!a)if(/^\.\/[^\\:*?"<>]*$/.test(n))(s=ie[e=e||n])?n=s:a=document.getElementById(n);else if(t.fn&&!de.rTmpl.test(n))try{a=t(n,document)[0]}catch(d){}a&&(i?n=a.innerHTML:(o=a.getAttribute(Oe),o&&(o!==Ue?(n=ie[o],delete ie[o]):t.fn&&(n=t.data(a)[Ue])),o&&n||(e=e||(t.fn?Ue:n),n=j(e,a.innerHTML,r,i)),n.tmplName=e=e||o,e!==Ue&&(ie[e]=n),a.setAttribute(Oe,e),t.fn&&t.data(a,Ue,n))),a=void 0}else n.fn||(n=void 0);return n}var a,s,d=n=n||"";if(de._html=oe.html,0===i&&(i=void 0,d=o(d)),i=i||(n.markup?n:{}),i.tmplName=e,r&&(i._parentTmpl=r),!d&&n.markup&&(d=o(n.markup))&&d.fn&&(d=d.markup),void 0!==d)return d.fn||n.fn?d.fn&&(s=d):(n=$(d,i),U(d.replace(Te,"\\$&"),n)),s||(s=l(function(){return s.render.apply(s,arguments)},n),k(s)),s}function A(e,t){return ne(e)?e.call(t):e}function R(e){for(var t=[],n=0,r=e.length;nS-(I||0))){if(I=F.slice(I,S+r.length),q!==!0)if(J=o||p[g-1].bd,K=J[J.length-1],K&&K.prm){for(;K.sb&&K.sb.prm;)K=K.sb;B=K.sb={path:K.sb,bnd:K.bnd}}else J.push(B={path:J.pop()});E=fe+":"+I+" onerror=''"+ge,q=f[E],q||(f[E]=!0,f[E]=q=U(E,n,!0)),q!==!0&&B&&(B._cpfn=q,B.prm=u.bd,B.bnd=B.bnd||B.path&&B.path.indexOf("^")>=0)}return d?(d=!R,d?r:A+'"'):s?(s=!V,s?r:A+'"'):(w?(h[g]=S++,u=p[++g]={bd:[]},w):"")+(N?g?"":(c=F.slice(c,S),(i?(i=a=o=!1,"\b"):"\b,")+c+(c=S+r.length,l&&t.push(u.bd=[]),"\b")):k?(g&&O(e),l&&t.pop(),i=_,a=x,c=S+r.length,l&&(l=u.bd=t[i]=[],l.skp=!x),_+":"):_?_.split("^").join(".").replace(be,P)+(T?(u=p[++g]={bd:[]},v[g]=L,T):b):b?b:$?($=v[g]||$,v[g]=!1,u=p[--g],$+(T?(u=p[++g],v[g]=L,T):"")):j?(v[g]||O(e),","):m?"":(d=R,s=V,'"'))}O(e)}var i,o,a,s,d,l=t&&t[0],u={bd:l},p={0:u},c=0,f=(n?n.links:l&&(l.links=l.links||{}))||Y.tmpl.links,g=0,v={},h={},m=(e+(n?" ":"")).replace(ye,r);return!g&&m||O(e)}function L(e,t,n){var r,i,o,a,s,d,l,u,p,c,f,g,v,h,m,w,x,_,b,y,k,C,T,j,A,R,V,E,M,N,S,F=0,P=ue.useViews||t.useViews||t.tags||t.templates||t.helpers||t.converters,I="",U={},J=e.length;for(""+t===t?(_=n?'data-link="'+t.replace(ke," ").slice(1,-1)+'"':t,t=0):(_=t.tmplName||"unnamed",t.allowCode&&(U.allowCode=!0),t.debug&&(U.debug=!0),f=t.bnds,x=t.tmpls),r=0;r":a+o):(k&&(b=$(C,U),b.tmplName=_+"/"+o,b.useViews=b.useViews||P,L(k,b),P=b.useViews,x.push(b)),A||(y=o,P=P||o&&(!se[o]||!se[o].flow),j=I,I=""),T=e[r+1],T=T&&"else"===T[0]),M=E?";\ntry{\nret+=":"\n+",h="",m="",R&&(g||N||a&&a!==Pe||S)){if(V=new Function("data,view,j,u","// "+_+" "+ ++F+" "+o+"\nreturn {"+s+"};"),V._er=E,V._tag=o,V._bd=!!g,V._lr=S,n)return V;q(V,g),w='c("'+a+'",view,',c=!0,h=w+F+",",m=")"}if(I+=R?(n?(E?"try{\n":"")+"return ":M)+(c?(c=void 0,P=p=!0,w+(V?(f[F-1]=V,F):"{"+s+"}")+")"):">"===o?(l=!0,"h("+v[0]+")"):(u=!0,"((v="+v[0]+")!=null?v:"+(n?"null)":'"")'))):(d=!0,"\n{view:view,tmpl:"+(k?x.length:"0")+","+s+"},"),y&&!T){if(I="["+I.slice(0,-1)+"]",w='t("'+y+'",view,this,',n||g){if(I=new Function("data,view,j,u"," // "+_+" "+F+" "+y+"\nreturn "+I+";"),I._er=E,I._tag=y,g&&q(f[F-1]=I,g),I._lr=S,n)return I;h=w+F+",undefined,",m=")"}I=j+M+w+(I.deps&&F||I)+")",g=0,y=0}E&&!T&&(P=!0,I+=";\n}catch(e){ret"+(n?"urn ":"+=")+h+"j._err(e,view,"+E+")"+m+";}"+(n?"":"ret=ret"))}I="// "+_+"\nvar v"+(d?",t=j._tag":"")+(p?",c=j._cnvt":"")+(l?",h=j._html":"")+(n?";\n":',ret=""\n')+(U.debug?"debugger;":"")+I+(n?"\n":";\nreturn ret;");try{I=new Function("data,view,j,u",I)}catch(B){O("Compiled template code:\n\n"+I+'\n: "'+(B.message||B)+'"')}return t&&(t.fn=I,t.useViews=!!P),I}function Q(e,t){return e&&e!==t?t?l(l({},t),e):e:t&&l({},t)}function H(e){return Fe[e]||(Fe[e]="&#"+e.charCodeAt(0)+";")}function D(e){var t,n,r=[];if(typeof e===Ie)for(t in e)n=e[t],t!==te&&e.hasOwnProperty(t)&&!ne(n)&&r.push({key:t,prop:n});return r}function Z(e,n,r){var i=this.jquery&&(this[0]||I("Unknown template")),o=i.getAttribute(Oe);return S.call(o&&t.data(i)[Ue]||ie(i),e,n,r)}function z(e){return void 0!=e?$e.test(e)&&(""+e).replace(Ne,H)||e:""}var G=t===!1;t=t&&t.fn?t:e.jQuery;var W,X,Y,ee,te,ne,re,ie,oe,ae,se,de,le,ue,pe,ce,fe,ge,ve,he,me,we,xe="v0.9.90",_e="_ocp",be=/^(!*?)(?:null|true|false|\d[\d.]*|([\w$]+|\.|~([\w$]+)|#(view|([\w$]+))?)([\w$.^]*?)(?:[.[^]([\w$]+)\]?)?)$/g,ye=/(\()(?=\s*\()|(?:([([])\s*)?(?:(\^?)(!*?[#~]?[\w$.^]+)?\s*((\+\+|--)|\+|-|&&|\|\||===|!==|==|!=|<=|>=|[<>%*:?\/]|(=))\s*|(!*?[#~]?[\w$.^]+)([([])?)|(,\s*)|(\(?)\\?(?:(')|("))|(?:\s*(([)\]])(?=\s*[.^]|\s*$|[^([])|[)\]])([([]?))|(\s+)/g,ke=/[ \t]*(\r\n|\n|\r)/g,Ce=/\\(['"])/g,Te=/['"\\]/g,je=/(?:\x08|^)(onerror:)?(?:(~?)(([\w$_\.]+):)?([^\x08]+))\x08(,)?([^\x08]+)/gi,Ae=/^if\s/,Re=/<(\w+)[>\s]/,Ve=/[\x00`><"'&=]/g,$e=/[\x00`><\"'&=]/,Ee=/^on[A-Z]|^convert(Back)?$/,Me=/^\#\d+_`[\s\S]*\/\d+_`$/,Ne=Ve,Se=0,Fe={"&":"&","<":"<",">":">","\0":"�","'":"'",'"':""","`":"`","=":"="},Pe="html",Ie="object",Oe="data-jsv-tmpl",Ue="jsvTmpl",qe="For #index in nested block use #getIndex().",Je={},Ke=e.jsrender,Be=Ke&&t&&!t.render,Le={template:{compile:j},tag:{compile:C},viewModel:{compile:V},helper:{},converter:{}};if(ee={jsviews:xe,sub:{View:y,Err:d,tmplFn:U,parse:B,extend:l,extendCtx:Q,syntaxErr:O,onStore:{template:function(e,t){null===t?delete Je[e]:Je[e]=t}},addSetting:M,settings:{allowCode:!1},advSet:a,_ths:i,_gm:r,_tg:function(){},_cnvt:h,_tag:b,_er:I,_err:P,_cp:o,_sq:function(e){return"constructor"===e&&O(""),e}},settings:{delimiters:u,advanced:function(e){return e?(l(ue,e),de.advSet(),pe):ue}},map:N},(d.prototype=new Error).constructor=d,c.depends=function(){return[this.get("item"),"index"]},f.depends="index",y.prototype={get:p,getIndex:f,getRsc:_,getTmpl:v,ctxPrm:g,_is:"view"},de=ee.sub,pe=ee.settings,!(Ke||t&&t.render)){for(W in Le)E(W,Le[W]);oe=ee.converters,ae=ee.helpers,se=ee.tags,de._tg.prototype={baseApply:T,cvtArgs:m,bndArgs:x,ctxPrm:g},Y=de.topView=new y,t?(t.fn.render=Z,te=t.expando,t.observable&&(l(de,t.views.sub),ee.map=t.views.map)):(t={},G&&(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)},de._jq=function(e){e!==t&&(l(e,t),t=e,t.fn.render=Z,delete t.jsrender,te=t.expando)},t.jsrender=xe),le=de.settings,le.allowCode=!1,ne=t.isFunction,t.render=Je,t.views=ee,t.templates=ie=ee.templates;for(me in le)M(me);(pe.debugMode=function(e){return void 0===e?le.debugMode:(le.debugMode=e,le.onError=e+""===e?new Function("","return '"+e+"';"):ne(e)?e:void 0,pe)})(!1),ue=le.advanced={useViews:!1,_jsv:!1},se({"if":{render:function(e){var t=this,n=t.tagCtx,r=t.rendering.done||!e&&(arguments.length||!n.index)?"":(t.rendering.done=!0,void(t.selected=n.index));return r},contentCtx:!0,flow:!0},"for":{render:function(e){var t,n=!arguments.length,r=this,i=r.tagCtx,o="",a=0;return r.rendering.done||(t=n?i.view.data:e,void 0!==t&&(o+=i.render(t,n),a+=re(t)?t.length:1),(r.rendering.done=a)&&(r.selected=i.index)),o},flow:!0},props:{baseTag:"for",dataMap:N(D),flow:!0},include:{flow:!0},"*":{render:o,flow:!0},":*":{render:o,flow:!0},dbg:ae.dbg=oe.dbg=s}),oe({html:z,attr:z,url:function(e){return void 0!=e?encodeURI(""+e):null===e?e:""}})}return le=de.settings,re=(t||Ke).isArray,pe.delimiters("{{","}}","^"),Be&&Ke.views.sub._jq(t),t||Ke},window); //# sourceMappingURL=jsrender.min.js.map diff --git a/jsrender.min.js.map b/jsrender.min.js.map index 5e06bdc..e857189 100644 --- a/jsrender.min.js.map +++ b/jsrender.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["jsrender.js"],"names":["factory","global","$","jQuery","exports","module","fn","define","amd","getDerivedMethod","baseMethod","method","ret","tag","this","prevBase","base","apply","arguments","getMethod","$isFunction","_d","noop","tagHandlersFromProps","tagCtx","prop","props","rHasHandlers","test","fix","constructor","prototype","retVal","val","dbgBreak","console","log","e","baseApply","JsViewsError","message","name","link","$extend","target","source","$viewsDelimiters","openChars","closeChars","$isArray","$views","$subSettings","delimiters","linkChar","charAt","delimOpenChar0","delimOpenChar1","delimCloseChar0","delimCloseChar1","rTag","$sub","RegExp","rTmpl","$viewsSettings","getView","inner","type","undefined","views","i","l","found","view","root","_","useKey","get","length","parent","getNestedIndex","index","getIndex","contextParameter","key","value","isContextCb","wrapped","deps","res","obsCtxPrm","storeView","isUpdate","isRenderCall","store","ctx","$helpers","it","linked","_cxp","scope","isTop","_ocps","_crcp","_ucp","_ceo","_ocp","unshift","cvtArgs","tagElse","ind","data","_vw","getTemplate","tmpl","getRsc","$templates","convertVal","converter","onError","argsLen","bindTo","boundTag","bnds","linkCtx","_lr","args","_bd","_tg","bnd","unlinked","inline","tagName","cvt","flow","extendCtx","_er","onRender","convertArgs","bound","boundArgs","tagCtxs","convert","error","argDefault","slice","argOrProp","context","convertBoundArgs","getResource","resourceType","itemName","renderTag","parentView","topView","tagDef","template","tags","attr","parentTag","m","itemRet","tagCtxCtx","ctxPrm","content","callInit","mapDef","thisMap","tagDataMap","contentCtx","parentTmpl","_is","tmpls","render","renderContent","getTmpl","_ctr","init","dataMap","arrVws","dataBoundOnly","map","parents","parentTags","rendering","noVws","HTML","linkedCtxParam","_cp","params","src","unmap","tgt","rWrappedInViewMarker","links","renderWithViews","$converters","html","View","contentTmpl","parentView_","self_","self","isArray","id","viewId","scp","indexStr","push","splice","compileChildResources","storeName","storeNames","resources","jsvStores","compileTag","Tag","makeArray","linkedElement","bindToLength","baseTag","compiledDef","depends","isNaN","parseInt","$tags","_parentTmpl","compileTmpl","options","lookupTemplate","currentName","nodeType","elem","document","getElementById","innerHTML","getAttribute","tmplAttr","jsvTmpl","tmplName","setAttribute","compiledTmpl","tmplOrMarkup","_html","markup","tmplObject","tmplFn","replace","rEscapeQuotes","getDefaultVal","defaultVal","call","unmapArray","modelArr","arr","compileViewModel","GetNew","vm","iterate","action","getterType","ob","j","g","getters","getter","viewModels","JSON","parse","merge","viewModel","$expando","getterNames","mod","assigned","newModArr","k","model","$observable","refresh","concat","extend","proto","body","observable","privField","setProperty","set","Function","htmlTag","wrapMap","$subSettingsAdvanced","_wm","rFirstElem","exec","toLowerCase","div","trim","registerStore","storeSettings","theStore","item","compile","thisStore","onStore","OBJECT","getTgt","addSetting","st","Map","baseMap","noIteration","isTopRenderCall","prevData","prevIndex","result","useViews","setItemVar","newCtx","itemVar","newView","childView","itemResult","swapContent","outerOnRender","_wrp","syntaxError","helpers","contentView","onRenderError","fallback","Err","isLinkExpr","convertBack","hasElse","pushprecedingContent","shift","loc","substr","rNewLine","blockTagCheck","block","parseTag","all","bind","colon","codeTag","slash","bind2","closeBlock","late","pathBindings","ctxProps","paramsArgs","paramsProps","paramsCtxProps","useTrigger","allowCode","rUnescapeQuotes","rTestElseIf","current","substring","stack","pop","parseParams","rBuildHash","onerror","isCtx","keyToken","keyValue","arg","param","hasHandlers","newNode","parsedParam","bindings","astTop","buildCode","setPaths","pathsArr","paths","hasOwnProperty","skp","paramStructure","parts","parseTokens","lftPrn0","lftPrn","path","operator","err","eq","path2","prn","comma","lftPrn2","apos","quot","rtPrn","rtPrnDot","prn2","space","full","parsePath","allPath","not","object","helper","viewProperty","pathTokens","leafToken","subPath","binds","named","bindto","_jsvto","bndCtx","bd","theOb","_cpfn","sb","pathStart","parenDepth","expr","exprFn","newOb","rtSq","aposed","quoted","boundName","bndStack","prm","tmplLinks","indexOf","paramIndex","split","join","rPath","fnCall","0","rParams","ast","node","hasTag","hasEncoder","getsVal","hasCnvt","useCnvt","tmplBindings","boundOnErrStart","boundOnErrEnd","tagRender","nestedTmpls","nestedTmpl","tagAndElses","nextIsElse","oldCode","isElse","isGetVal","tagCtxFn","tagStart","trigger","lateRender","tmplBindingKey","templates","converters","code","tmplOptions","debug","debugMode","_tag","parentContext","getCharEntity","ch","charEntities","charCodeAt","getTargetProps","$fnRender","tmplElem","jquery","htmlEncode","text","rIsHtml","rHtmlEncode","setGlobals","jsvStoreName","setting","versionNumber","rAttrEncode","&","<",">","\u0000","'","\"","`","=","$render","jsr","jsrender","jsrToJq","jsviews","sub","syntaxErr","settings","advSet","_ths","_gm","_cnvt","_err","_sq","token","advanced","Error","bndArgs","expando","renderFile","__express","isFunction","Array","obj","_jq","jq","_jsv","if","done","selected","for","finalElse","include","*",":*","dbg","url","encodeURI","window"],"mappings":";;CAaC,SAASA,EAASC,GAElB,GAAIC,GAAID,EAAOE,MAEQ,iBAAZC,SACVC,OAAOD,QAAUF,EACdF,EAAQC,EAAQC,GAChB,SAASA,GACV,GAAIA,IAAMA,EAAEI,GACX,KAAM,wBAEP,OAAON,GAAQC,EAAQC,IAEG,kBAAXK,SAAyBA,OAAOC,IACjDD,OAA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IAAImB,IAAItgB,GAEZA,GAAK+e,IACTqC","file":"jsrender.min.js","sourcesContent":["/*! JsRender v0.9.89 (Beta): http://jsviews.com/#jsrender */\n/*! **VERSION FOR WEB** (For NODE.JS see http://jsviews.com/download/jsrender-node.js) */\n/*\n * Best-of-breed templating in browser or on Node.js.\n * Does not require jQuery, or HTML DOM\n * Integrates with JsViews (http://jsviews.com/#jsviews)\n *\n * Copyright 2017, Boris Moore\n * Released under the MIT License.\n */\n\n//jshint -W018, -W041, -W120\n\n(function(factory, global) {\n\t// global var is the this object, which is window when running in the usual browser environment\n\tvar $ = global.jQuery;\n\n\tif (typeof exports === \"object\") { // CommonJS e.g. Browserify\n\t\tmodule.exports = $\n\t\t\t? factory(global, $)\n\t\t\t: function($) { // If no global jQuery, take optional jQuery passed as parameter: require('jsrender')(jQuery)\n\t\t\t\tif ($ && !$.fn) {\n\t\t\t\t\tthrow \"Provide jQuery or null\";\n\t\t\t\t}\n\t\t\t\treturn factory(global, $);\n\t\t\t};\n\t} else if (typeof define === \"function\" && define.amd) { // AMD script loader, e.g. RequireJS\n\t\tdefine(function() {\n\t\t\treturn factory(global);\n\t\t});\n\t} else { // Browser using plain ',Bn='',Bn='',\n\topenScript = ' - data-linked tag, close marker\n\t\t\t// We validate with inTag so no script markers are inserted in attribute context e.g. for:\n\t\t\t// \"\" or \"
...{{/if}}...\"\n\t\t\tpreceding = id\n\t\t\t\t? (preceding + endOfElCnt + spaceBefore + (inTag ? \"\" : openScript + id + closeScript)+ spaceAfter + tag)\n\t\t\t\t: endOfElCnt || all;\n\t\t}\n\n\t\tif (validate && boundId) {\n\t\t\tif (inTag) {\n\t\t\t\t// JsViews data-linking tags are not allowed within element markup.\n\t\t\t\t// See jsviews/issues/303\n\t\t\t\tsyntaxError('{^{ within elem markup (' + inTag + ' ). Use data-link=\"...\"');\n\t\t\t}\n\t\t\tif (id.charAt(0) === \"#\") {\n\t\t\t\ttagStack.unshift(id.slice(1));\n\t\t\t} else if (id.slice(1) !== (bndId = tagStack.shift())) {\n\t\t\t\t// See jsviews/issues/213\n\t\t\t\tsyntaxError('Closing tag for {^{...}} under different elem: <' + bndId + '>');\n\t\t\t}\n\t\t}\n\t\tif (tag) {\n\t\t\tinTag = tag;\n\t\t\t// If there are ids (markers since the last tag), move them to the defer string\n\t\t\ttagStack.unshift(parentTag);\n\t\t\tparentTag = tag.slice(1);\n\t\t\tif (validate && tagStack[0] && tagStack[0] === badParent[parentTag]) {\n\t\t\t\t// Missing \n\t\t\t\t// TODO: replace this by smart insertion of tags\n\t\t\t\terror('Parent of must be ');\n\t\t\t}\n\t\t\tisVoid = voidElems[parentTag];\n\t\t\tif ((elCnt = elContent[parentTag]) && !prevElCnt) {\n\t\t\t\tdeferStack.unshift(defer);\n\t\t\t\tdefer = \"\";\n\t\t\t}\n\t\t\tprevElCnt = elCnt;\n//TODO Consider providing validation which throws if you place as child of , etc. - since if not caught,\n//this can cause errors subsequently which are difficult to debug.\n//\t\t\t\tif (elContent[tagStack[0]]>2 && !elCnt) {\n//\t\t\t\t\terror(parentTag + \" in \" + tagStack[0]);\n//\t\t\t\t}\n\t\t\tif (defer && elCnt) {\n\t\t\t\tdefer += \"+\"; // Will be used for stepping back through deferred tokens\n\t\t\t}\n\t\t}\n\t\treturn preceding;\n\t}\n\n\tfunction processViewInfos(vwInfos, targetParent) {\n\t\t// If targetParent, we are processing viewInfos (which may include navigation through '+-' paths) and hooking up to the right parentElem etc.\n\t\t// (and elem may also be defined - the next node)\n\t\t// If no targetParent, then we are processing viewInfos on newly inserted content\n\t\tvar deferPath, deferChar, bindChar, parentElem, id, onAftCr, deep,\n\t\t\taddedBindEls = [];\n\n\t\t// In elCnt context (element-only content model), prevNode is the first node after the open, nextNode is the first node after the close.\n\t\t// If both are null/undefined, then open and close are at end of parent content, so the view is empty, and its placeholder is the\n\t\t// 'lastChild' of the parentNode. If there is a prevNode, then it is either the first node in the view, or the view is empty and\n\t\t// its placeholder is the 'previousSibling' of the prevNode, which is also the nextNode.\n\t\tif (vwInfos) {\n\t\t\tif (vwInfos._tkns.charAt(0) === \"@\") {\n\t\t\t\t// We are processing newly inserted content. This is a special script element that was created in convertMarkers() to process deferred bindings,\n\t\t\t\t// and inserted following the target parent element - because no element tags (outside elCnt) were encountered to carry those binding tokens.\n\t\t\t\t// We will step back from the preceding sibling of this element, looking at targetParent elements until we find the one that the current binding\n\t\t\t\t// token belongs to. Set elem to null (the special script element), and remove it from the DOM.\n\t\t\t\ttargetParent = elem.previousSibling;\n\t\t\t\telem.parentNode.removeChild(elem);\n\t\t\t\telem = undefined;\n\t\t\t}\n\t\t\tlen = vwInfos.length;\n\t\t\twhile (len--) {\n\t\t\t\tvwInfo = vwInfos[len];\n//if (prevIds.indexOf(vwInfo.token) < 0) { // This token is a newly created view or tag binding\n\t\t\t\tbindChar = vwInfo.ch;\n\t\t\t\tif (deferPath = vwInfo.path) {\n\t\t\t\t\t// We have a 'deferred path'\n\t\t\t\t\tj = deferPath.length - 1;\n\t\t\t\t\twhile (deferChar = deferPath.charAt(j--)) {\n\t\t\t\t\t\t// Use the \"+\" and\"-\" characters to navigate the path back to the original parent node where the deferred bindings ocurred\n\t\t\t\t\t\tif (deferChar === \"+\") {\n\t\t\t\t\t\t\tif (deferPath.charAt(j) === \"-\") {\n\t\t\t\t\t\t\t\tj--;\n\t\t\t\t\t\t\t\ttargetParent = targetParent.previousSibling;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttargetParent = targetParent.parentNode;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttargetParent = targetParent.lastChild;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Note: Can use previousSibling and lastChild, not previousElementSibling and lastElementChild,\n\t\t\t\t\t\t// since we have removed white space within elCnt. Hence support IE < 9\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (bindChar === \"^\") {\n\t\t\t\t\tif (tag = bindingStore[id = vwInfo.id]) {\n\t\t\t\t\t\t// The binding may have been deleted, for example in a different handler to an array collectionChange event\n\t\t\t\t\t\t// This is a tag binding\n\t\t\t\t\t\tdeep = targetParent && (!elem || elem.parentNode !== targetParent); // We are stepping back looking for the right targetParent,\n\t\t\t\t\t\t// or we are linking existing content and this element is in elCnt, not an immediate child of the targetParent.\n\t\t\t\t\t\tif (!elem || deep) {\n\t\t\t\t\t\t\ttag.parentElem = targetParent;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (vwInfo.elCnt && deep) {\n\t\t\t\t\t\t\t// With element only content, if there is no following element, or if the binding is deeper than the following element\n\t\t\t\t\t\t\t// then we need to set the open or close token as a deferred binding annotation on the parent\n\t\t\t\t\t\t\tsetDefer(targetParent, (vwInfo.open ? \"#\" : \"/\") + id + bindChar + (targetParent._df || \"\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// This is an open or close marker for a data-linked tag {^{...}}. Add it to bindEls.\n\t\t\t\t\t\taddedBindEls.push([deep ? null : elem, vwInfo]);\n\t\t\t\t\t}\n\t\t\t\t} else if (view = viewStore[id = vwInfo.id]) {\n\t\t\t\t\t// The view may have been deleted, for example in a different handler to an array collectionChange event\n\t\t\t\t\tif (!view.parentElem) {\n\t\t\t\t\t\t// If view is not already extended for JsViews, extend and initialize the view object created in JsRender, as a JsViews view\n\t\t\t\t\t\tview.parentElem = targetParent || elem && elem.parentNode || parentNode;\n\t\t\t\t\t\tview._.onRender = addBindingMarkers;\n\t\t\t\t\t\tview._.onArrayChange = arrayChangeHandler;\n\t\t\t\t\t\tsetArrayChangeLink(view);\n\t\t\t\t\t}\n\t\t\t\t\tparentElem = view.parentElem;\n\t\t\t\t\tif (vwInfo.open) {\n\t\t\t\t\t\t// This is an 'open view' node (preceding script marker node,\n\t\t\t\t\t\t// or if elCnt, the first element in the view, with a data-jsv annotation) for binding\n\t\t\t\t\t\tview._elCnt = vwInfo.elCnt;\n\t\t\t\t\t\tif (targetParent && !elem) {\n\t\t\t\t\t\t\tsetDefer(targetParent, \"#\" + id + bindChar + (targetParent._df || \"\"));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// No targetParent, so there is a ._nxt elem (and this is processing tokens on the elem)\n\t\t\t\t\t\t\tif (!view._prv) {\n\t\t\t\t\t\t\t\tsetDefer(parentElem, removeSubStr(parentElem._df, \"#\" + id + bindChar));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tview._prv = elem;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// This is a 'close view' marker node for binding\n\t\t\t\t\t\tif (targetParent && (!elem || elem.parentNode !== targetParent)) {\n\t\t\t\t\t\t\t// There is no ._nxt so add token to _df. It is deferred.\n\t\t\t\t\t\t\tsetDefer(targetParent, \"/\" + id + bindChar + (targetParent._df || \"\"));\n\t\t\t\t\t\t\tview._nxt = undefined;\n\t\t\t\t\t\t} else if (elem) {\n\t\t\t\t\t\t\t// This view did not have a ._nxt, but has one now, so token may be in _df, and must be removed. (No longer deferred)\n\t\t\t\t\t\t\tif (!view._nxt) {\n\t\t\t\t\t\t\t\tsetDefer(parentElem, removeSubStr(parentElem._df, \"/\" + id + bindChar));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tview._nxt = elem;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (onAftCr = view.ctx && view.ctx[onAfterCreateStr] || onAfterCreate) {\n\t\t\t\t\t\t\tonAftCr.call(view.ctx.tag, view);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n//}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlen = addedBindEls.length;\n\t\t\twhile (len--) {\n\t\t\t\t// These were added in reverse order to addedBindEls. We push them in BindEls in the correct order.\n\t\t\t\tbindEls.push(addedBindEls[len]);\n\t\t\t}\n\t\t}\n\t\treturn !vwInfos || vwInfos.elCnt;\n\t}\n\n\tfunction getViewInfos(vwInfos) {\n\t\t// Used by view.childTags() and tag.childTags()\n\t\t// Similar to processViewInfos in how it steps through bindings to find tags. Only finds data-linked tags.\n\t\tvar level, parentTag, named;\n\n\t\tif (vwInfos) {\n\t\t\tlen = vwInfos.length;\n\t\t\tfor (j = 0; j < len; j++) {\n\t\t\t\tvwInfo = vwInfos[j];\n\t\t\t\t// This is an open marker for a data-linked tag {^{...}}, within the content of the tag whose id is get.id. Add it to bindEls.\n\t\t\t\t// Note - if bindingStore[vwInfo.id]._is === \"tag\" then getViewInfos is being called too soon - during first linking pass\n\t\t\t\ttag = bindingStore[vwInfo.id];\n\t\t\t\tif (!tag._is && tag.linkCtx) {\n\t\t\t\t\tparentTag = tag = tag.linkCtx.tag;\n\t\t\t\t\tnamed = tag.tagName === tagName;\n\t\t\t\t\tif (!tag.flow || named) {\n\t\t\t\t\t\tif (!deep) {\n\t\t\t\t\t\t\tlevel = 1;\n\t\t\t\t\t\t\twhile (parentTag = parentTag.parent) {\n\t\t\t\t\t\t\t\tlevel++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttagDepth = tagDepth || level; // The level of the first tag encountered.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ((deep || level === tagDepth) && (!tagName || named)) {\n\t\t\t\t\t\t\t// Filter on top-level or tagName as appropriate\n\t\t\t\t\t\t\ttags.push(tag);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction dataLink(late) {\n\t\t//================ Data-link and fixup of data-jsv annotations ================\n\t\tvar j, index,\n\t\t\ttokens = \"\",\n\t\t\twrap = {},\n\t\t\tselector = linkViewsSel + (get ? \",[\" + deferAttr + \"]\" : \"\");\n\t\t\t// If a childTags() call, get = \",[\" + deferAttr + \"]\" - since we need to include elements that have a ._df expando for deferred tokens\n\n\t\telems = qsa ? parentNode.querySelectorAll(selector) : $(selector, parentNode).get();\n\t\tl = elems.length;\n\n\t\t// The prevNode will be in the returned query, since we called markPrevOrNextNode() on it.\n\t\t// But it may have contained nodes that satisfy the selector also.\n\t\tif (prevNode && prevNode.innerHTML) {\n\t\t\t// Find the last contained node of prevNode, to use as the prevNode - so we only link subsequent elems in the query\n\t\t\tprevNodes = qsa ? prevNode.querySelectorAll(selector) : $(selector, prevNode).get();\n\t\t\tprevNode = prevNodes.length ? prevNodes[prevNodes.length - 1] : prevNode;\n\t\t}\n\n\t\ttagDepth = 0;\n\t\tfor (i = 0; i < l; i++) {\n\t\t\telem = elems[i];\n\t\t\tif (prevNode && !found) {\n\t\t\t\t// If prevNode is set, not false, skip linking. If this element is the prevNode, set to false so subsequent elements will link.\n\t\t\t\tfound = (elem === prevNode);\n\t\t\t} else if (nextNode && elem === nextNode) {\n\t\t\t\t// If nextNode is set then break when we get to nextNode\n\t\t\t\tif (get) {\n\t\t\t\t\ttokens += markerNodeInfo(elem);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t} else if (elem.parentNode) {\n\t\t\t\t// elem has not been removed from DOM\n\t\t\t\tif (get) {\n\t\t\t\t\ttokens += markerNodeInfo(elem);\n\t\t\t\t\tif (elem._df) {\n\t\t\t\t\t\tj = i + 1;\n\t\t\t\t\t\twhile (j < l && elem.contains(elems[j])) {\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Add deferred tokens after any tokens on descendant elements of this one\n\t\t\t\t\t\twrap[j-1] = elem._df;\n\t\t\t\t\t}\n\t\t\t\t\tif (wrap[i]) {\n\t\t\t\t\t\ttokens += wrap[i] || \"\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (isLink && (vwInfo = viewInfos(elem, undefined, rViewMarkers)) && (vwInfo = vwInfo[0])) {\n\t\t\t\t\t\t// If this is a link(trueOrString ...) call we will avoid re-binding to elems that are within template-rendered views\n\t\t\t\t\t\tskip = skip ? (vwInfo.id !== skip && skip) : vwInfo.open && vwInfo.id;\n\t\t\t\t\t}\n\t\t\t\t\tif (!skip && processInfos(viewInfos(elem))\n\t\t\t\t\t\t// If a link() call, processViewInfos() adds bindings to bindEls, and returns true for non-script nodes, for adding data-link bindings\n\t\t\t\t\t\t// If a childTags() call, getViewInfos returns array of tag bindings.\n\t\t\t\t\t\t\t&& elem.getAttribute($viewsLinkAttr)) {\n\t\t\t\t\t\tbindEls.push([elem]); // A data-linked element so add to bindEls too\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (get) {\n\t\t\ttokens += parentNode._df || \"\";\n\t\t\tif (index = tokens.indexOf(\"#\" + get.id) + 1) {\n\t\t\t\t// We are looking for view.childTags() or tag.childTags() - so start after the open token of the parent view or tag.\n\t\t\t\ttokens = tokens.slice(index + get.id.length);\n\t\t\t}\n\t\t\tindex = tokens.indexOf(\"/\" + get.id);\n\t\t\tif (index + 1) {\n\t\t\t\t// We are looking for view.childTags() or tag.childTags() - so don't look beyond the close token of the parent view or tag.\n\t\t\t\ttokens = tokens.slice(0, index);\n\t\t\t}\n\t\t\t// Call getViewInfos to add the found childTags to the tags array\n\t\t\tgetViewInfos(viewInfos(tokens, undefined, rOpenTagMarkers));\n\t\t}\n\n\t\tif (html === undefined && parentNode.getAttribute($viewsLinkAttr)) {\n\t\t\tbindEls.push([parentNode]); // Support data-linking top-level element directly (not within a data-linked container)\n\t\t}\n\n\t\t// Remove temporary marker script nodes they were added by markPrevOrNextNode\n\t\tunmarkPrevOrNextNode(prevNode, elCnt);\n\t\tunmarkPrevOrNextNode(nextNode, elCnt);\n\n\t\tif (get) {\n\t\t\treturn; // We have added childTags to the tags array, so we are done\n\t\t}\n\n\t\tif (elCnt && defer + ids) {\n\t\t\t// There are some views with elCnt, for which the open or close did not precede any HTML tag - so they have not been processed yet\n\t\t\telem = nextNode;\n\t\t\tif (defer) {\n\t\t\t\tif (nextNode) {\n\t\t\t\t\tprocessViewInfos(viewInfos(defer + \"+\", true), nextNode);\n\t\t\t\t} else {\n\t\t\t\t\tprocessViewInfos(viewInfos(defer, true), parentNode);\n\t\t\t\t}\n\t\t\t}\n\t\t\tprocessViewInfos(viewInfos(ids, true), parentNode);\n\t\t\t// If there were any tokens on nextNode which have now been associated with inserted HTML tags, remove them from nextNode\n\t\t\tif (nextNode) {\n\t\t\t\ttokens = nextNode.getAttribute(jsvAttrStr);\n\t\t\t\tif (l = tokens.indexOf(prevIds) + 1) {\n\t\t\t\t\ttokens = tokens.slice(l + prevIds.length - 1);\n\t\t\t\t}\n\t\t\t\tnextNode.setAttribute(jsvAttrStr, ids + tokens);\n\t\t\t}\n\t\t}\n\n// if (context.lazyLink) {\n// setTimeout(doLinking) (doLinking is function wrapper of following lines)\n// See Future tasks, and https://github.com/BorisMoore/jsviews/issues/368.\n// Could call context.lazyLink as callback, on async completion - or return promise.\n\t\t//================ Bind the data-linked elements and tags ================\n\t\tl = bindEls.length;\n\t\tfor (i = 0; i < l; i++) {\n\t\t\telem = bindEls[i];\n\t\t\tlinkInfo = elem[1];\n\t\t\telem = elem[0];\n\t\t\tif (linkInfo) {\n\t\t\t\tif (tag = bindingStore[linkInfo.id]) {\n\t\t\t\t\tif (linkCtx = tag.linkCtx) {\n\t\t\t\t\t\t// The tag may have been stored temporarily on the bindingStore - or may have already been replaced by the actual binding\n\t\t\t\t\t\ttag = linkCtx.tag;\n\t\t\t\t\t\ttag.linkCtx = linkCtx;\n\t\t\t\t\t}\n\t\t\t\t\tif (linkInfo.open) {\n\t\t\t\t\t\t// This is an 'open linked tag' binding annotation for a data-linked tag {^{...}}\n\t\t\t\t\t\tif (elem) {\n\t\t\t\t\t\t\ttag.parentElem = elem.parentNode;\n\t\t\t\t\t\t\ttag._prv = elem;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttag._elCnt = linkInfo.elCnt;\n\t\t\t\t\t\t// We data-link depth-first (\"on the way in\"), which is better for perf - and allows setting parent tags etc.\n\t\t\t\t\t\tview = tag.tagCtx.view;\n\n\t\t\t\t\t\t// Add data binding (unless skipped due to lateRender)\n\t\t\t\t\t\taddDataBinding(late, undefined, tag._prv, view, linkInfo.id);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttag._nxt = elem;\n\t\t\t\t\t\tif (tag._.unlinked && !tag._toLk) {\n\t\t\t\t\t\t\t// This is a 'close linked tag' binding annotation (and data-binding was not skipped due to lateRender)\n\t\t\t\t\t\t\ttagCtx = tag.tagCtx;\n\t\t\t\t\t\t\tview = tagCtx.view;\n\t\t\t\t\t\t\tcallAfterLink(tag);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Add data binding for a data-linked element (with data-link attribute)\n\t\t\t\taddDataBinding(late, elem.getAttribute($viewsLinkAttr), elem, $view(elem), undefined, isLink, outerData, context);\n\t\t\t}\n\t\t}\n//});\n\t}\n\t//==== /end of nested functions ====\n\n\tvar inTag, linkCtx, tag, i, l, j, len, elems, elem, view, vwInfo, linkInfo, prevNodes, token, prevView, nextView,\n\t\tnode, tags, deep, tagName, tagCtx, validate, tagDepth, depth, fragment, copiedNode, firstTag, parentTag,\n\t\tisVoid, wrapper, div, tokens, elCnt, prevElCnt, htmlTag, ids, prevIds, found, skip, isLink, get,\n\t\tself = this,\n\t\tthisId = self._.id + \"_\",\n\t\tdefer = \"\",\n\t\t// The marker ids for which no tag was encountered (empty views or final closing markers) which we carry over to container tag\n\t\tbindEls = [],\n\t\ttagStack = [],\n\t\tdeferStack = [],\n\t\tlate = [],\n\t\tonAfterCreate = changeHandler(self, onAfterCreateStr),\n\t\tprocessInfos = processViewInfos;\n\n\tif (refresh) {\n\t\tif (refresh.tmpl) {\n\t\t\t// refresh is the prevView, passed in from addViews()\n\t\t\tprevView = \"/\" + refresh._.id + \"_\";\n\t\t} else {\n\t\t\tisLink = refresh.lnk; // Top-level linking\n\t\t\tif (refresh.tag) {\n\t\t\t\tthisId = refresh.tag + \"^\";\n\t\t\t\trefresh = true;\n\t\t\t}\n\t\t\tif (get = refresh.get) {\n\t\t\t\tprocessInfos = getViewInfos;\n\t\t\t\ttags = get.tags;\n\t\t\t\tdeep = get.deep;\n\t\t\t\ttagName = get.name;\n\t\t\t}\n\t\t}\n\t\trefresh = refresh === true;\n\t}\n\n\tparentNode = parentNode\n\t\t? (\"\" + parentNode === parentNode\n\t\t\t? $(parentNode)[0] // It is a string, so treat as selector\n\t\t\t: parentNode.jquery\n\t\t\t\t? parentNode[0] // A jQuery object - take first element.\n\t\t\t\t: parentNode)\n\t\t: (self.parentElem // view.link()\n\t\t\t|| document.body); // link(null, data) to link the whole document\n\n\tvalidate = !$subSettingsAdvanced.noValidate && parentNode.contentEditable !== TRUE;\n\tparentTag = parentNode.tagName.toLowerCase();\n\telCnt = !!elContent[parentTag];\n\n\tprevNode = prevNode && markPrevOrNextNode(prevNode, elCnt);\n\tnextNode = nextNode && markPrevOrNextNode(nextNode, elCnt) || null;\n\n\tif (html != undefined) {\n\t\t//================ Insert html into DOM using documentFragments (and wrapping HTML appropriately). ================\n\t\t// Also convert markers to DOM annotations, based on content model.\n\t\t// Corresponds to nextNode ? $(nextNode).before(html) : $(parentNode).html(html);\n\t\t// but allows insertion to wrap correctly even with inserted script nodes. jQuery version will fail e.g. under tbody or select.\n\t\t// This version should also be slightly faster\n\t\tdiv = document.createElement(\"div\");\n\t\twrapper = div;\n\t\tprevIds = ids = \"\";\n\t\thtmlTag = parentNode.namespaceURI === \"http://www.w3.org/2000/svg\" ? \"svg_ns\" : (firstTag = rFirstElem.exec(html)) && firstTag[1] || \"\";\n\t\tif (elCnt) {\n\t\t\t// Now look for following view, and find its tokens, or if not found, get the parentNode._df tokens\n\t\t\tnode = nextNode;\n\t\t\twhile (node && !(nextView = viewInfos(node))) {\n\t\t\t\tnode = node.nextSibling;\n\t\t\t}\n\t\t\tif (tokens = nextView ? nextView._tkns : parentNode._df) {\n\t\t\t\ttoken = prevView || \"\";\n\t\t\t\tif (refresh || !prevView) {\n\t\t\t\t\ttoken += \"#\" + thisId;\n\t\t\t\t}\n\t\t\t\tj = tokens.indexOf(token);\n\t\t\t\tif (j + 1) {\n\t\t\t\t\tj += token.length;\n\t\t\t\t\t// Transfer the initial tokens to inserted nodes, by setting them as the ids variable, picked up in convertMarkers\n\t\t\t\t\tprevIds = ids = tokens.slice(0, j);\n\t\t\t\t\ttokens = tokens.slice(j);\n\t\t\t\t\tif (nextView) {\n\t\t\t\t\t\tnode.setAttribute(jsvAttrStr, tokens);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetDefer(parentNode, tokens);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//================ Convert the markers to DOM annotations, based on content model. ================\n//\t\t\toldElCnt = elCnt;\n\t\tisVoid = undefined;\n\t\thtml = (\"\" + html).replace(rConvertMarkers, convertMarkers);\n//\t\t\tif (!!oldElCnt !== !!elCnt) {\n//\t\t\t\terror(\"Parse: \" + html); // Parse error. Content not well-formed?\n//\t\t\t}\n\t\tif (validate && tagStack.length) {\n\t\t\tsyntaxError(\"Mismatched '<\" + parentTag + \"...>' in:\\n\" + html); // Unmatched tag\n\t\t}\n\t\tif (validateOnly) {\n\t\t\treturn;\n\t\t}\n\t\t// Append wrapper element to doc fragment\n\t\tsafeFragment.appendChild(div);\n\n\t\t// Go to html and back, then peel off extra wrappers\n\t\t// Corresponds to jQuery $(nextNode).before(html) or $(parentNode).html(html);\n\t\t// but supports svg elements, and other features missing from jQuery version (and this version should also be slightly faster)\n\t\thtmlTag = wrapMap[htmlTag] || wrapMap.div;\n\t\tdepth = htmlTag[0];\n\t\twrapper.innerHTML = htmlTag[1] + html + htmlTag[2];\n\t\twhile (depth--) {\n\t\t\twrapper = wrapper.lastChild;\n\t\t}\n\t\tsafeFragment.removeChild(div);\n\t\tfragment = document.createDocumentFragment();\n\t\twhile (copiedNode = wrapper.firstChild) {\n\t\t\tfragment.appendChild(copiedNode);\n\t\t}\n\t\t// Insert into the DOM\n\t\tparentNode.insertBefore(fragment, nextNode);\n\t}\n\tdataLink(late);\n\n\treturn late;\n}\n\nfunction addDataBinding(late, linkMarkup, node, currentView, boundTagId, isLink, data, context) {\n\t// Add data binding for data-linked elements or {^{...}} data-linked tags\n\tvar tmpl, tokens, attr, convertBack, tagExpr, linkFn, linkCtx, tag, rTagIndex, hasElse, lastIndex,\n\t\tlinkExpressions = [];\n\n\tif (boundTagId) {\n\t\t// boundTagId is a string for {^{...}} data-linked tag. So only one linkTag in linkMarkup\n\t\t// data and context arguments are undefined\n\t\ttag = bindingStore[boundTagId];\n\t\ttag = tag.linkCtx ? tag.linkCtx.tag : tag;\n\n\t\tlinkCtx = tag.linkCtx || {\n\t\t\ttype: \"inline\",\n\t\t\tdata: currentView.data, // source\n\t\t\telem: tag._elCnt ? tag.parentElem : node, // target\n\t\t\tview: currentView,\n\t\t\tctx: currentView.ctx,\n\t\t\tattr: HTML, // Script marker nodes are associated with {^{ and always target HTML.\n\t\t\tfn: tag._.bnd,\n\t\t\ttag: tag,\n\t\t\t// Pass the boundTagId in the linkCtx, so that it can be picked up in observeAndBind\n\t\t\t_bndId: boundTagId\n\t\t};\n\t\ttag.linkCtx = linkCtx;\n\t\tbindDataLinkTarget(linkCtx, late);\n\t\ttag._toLk = linkCtx._bndId; // If data binding happened, remove _toLk flag from tag\n\t} else if (linkMarkup && node) {\n\t\t// Data-linked element\n\n\t\t// If isLink then this is a top-level linking: .link(expression, target, data, ....) or\n\t\t// .link(true, target, data, ....) scenario - and data and context are passed in separately from the view\n\t\tdata = isLink ? data : currentView.data;\n\n\t\t// Compiled linkFn expressions could be stored in the tmpl.links array of the template\n\t\t// TODO - consider also caching globally so that if {{:foo}} or data-link=\"foo\" occurs in different places,\n\t\t// the compiled template for this is cached and only compiled once...\n\t\t//links = currentView.links || currentView.tmpl.links;\n\n\t\ttmpl = currentView.tmpl;\n\n//\t\t\tif (!(linkTags = links[linkMarkup])) {\n\t\t// This is the first time this view template has been linked, so we compile the data-link expressions, and store them on the template.\n\n\t\tlinkMarkup = normalizeLinkTag(linkMarkup, defaultAttr(node));\n\t\tlastIndex = rTagDatalink.lastIndex = 0;\n\t\twhile (tokens = rTagDatalink.exec(linkMarkup)) { // TODO require } to be followed by whitespace or $, and remove the \\}(!\\}) option.\n\t\t\tlinkExpressions.push(tokens);\n\t\t\tlastIndex = rTagDatalink.lastIndex;\n\t\t}\n\t\tif (lastIndex < linkMarkup.length) {\n\t\t\tsyntaxError(linkMarkup);\n\t\t}\n\t\twhile (tokens = linkExpressions.shift()) {\n\t\t\t// Iterate over the data-link expressions, for different target attrs,\n\t\t\t// e.g. ~description(firstName, lastName)}\"\n\t\t\t// tokens: [all, attr, bindOnly, tagExpr, tagName, converter, colon, html, comment, code, params]\n\t\t\trTagIndex = rTagDatalink.lastIndex;\n\t\t\tattr = tokens[1];\n\t\t\ttagExpr = tokens[3];\n\t\t\twhile (linkExpressions[0] && linkExpressions[0][4] === \"else\") { // If this is {sometag...} and is followed by an {else...} add to tagExpr\n\t\t\t\ttagExpr += delimCloseChar1 + delimOpenChar0 + linkExpressions.shift()[3];\n\t\t\t\thasElse = true;\n\t\t\t}\n\t\t\tif (hasElse) { // If an {else} has been added, need also to add closing {{/sometag}}\n\t\t\t\ttagExpr += delimCloseChar1 + delimOpenChar0 + delimOpenChar1 + \"/\" + tokens[4] + delimCloseChar0;\n\t\t\t}\n\t\t\tlinkCtx = {\n\t\t\t\ttype: isLink ? \"top\" : \"link\",\n\t\t\t\tdata: data, // source\n\t\t\t\telem: node, // target\n\t\t\t\tview: currentView,\n\t\t\t\tctx: context,\n\t\t\t\tattr: attr,\n\t\t\t\tisLk: isLink, // top-level linking?\n\t\t\t\t_toLk : 1, // Flag to data-link on initial data-link call rendering call\n\t\t\t\t_noUpd : tokens[2] // Flag for data-link=\"^{...}\" so on initial data-link call will bind, but not render)\n\t\t\t};\n\n\t\t\tconvertBack = undefined;\n\t\t\tif (tokens[6]) {\n\t\t\t\tconvertBack = tokens[10] || undefined;\n\t\t\t\tlinkCtx.convert = tokens[5] || \"\";\n\t\t\t\tif (convertBack !== undefined && defaultAttr(node)) {\n\t\t\t\t\tif (attr) {\n\t\t\t\t\t\tsyntaxError(tagExpr + \"- Remove target: \" + attr);\n\t\t\t\t\t}\n\t\t\t\t\t// Default target, so allow 2 way binding\n\t\t\t\t\tlinkCtx.convertBack = convertBack = convertBack.slice(1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Compile the linkFn expression which evaluates and binds a data-link expression\n\t\t\t// TODO - optimize for the case of simple data path with no conversion, helpers, etc.:\n\t\t\t// i.e. data-link=\"a.b.c\". Avoid creating new instances of Function every time. Can use a default function for all of these...\n\n\t\t\tlinkCtx.expr = attr + tagExpr;\n\t\t\tlinkFn = tmpl.links[tagExpr];\n\t\t\tif (!linkFn) {\n\t\t\t\ttmpl.links[tagExpr] = linkFn = $sub.tmplFn(tagExpr, tmpl, true, convertBack, hasElse);\n\t\t\t}\n\t\t\tlinkCtx.fn = linkFn;\n\t\t\tbindDataLinkTarget(linkCtx, late);\n\t\t\t// We store rTagIndex in local scope, since this addDataBinding method can sometimes be called recursively,\n\t\t\t// and each is using the same rTagDatalink instance.\n\t\t\trTagDatalink.lastIndex = rTagIndex;\n\t\t}\n//\t\t}\n\t}\n}\n\nfunction bindDataLinkTarget(linkCtx, late) {\n\t// Add data link bindings for a link expression in data-link attribute markup\n\tfunction handler(ev, eventArgs) {\n\t\tonDataLinkedTagChange.call(linkCtx, ev, eventArgs);\n\t\t// If the link expression uses a custom tag, the onDataLinkedTagChange call will call renderTag, which will set tagCtx on linkCtx\n\t}\n\tif (linkCtx.isLk) {\n\t\t// Top-level linking: .link(expressionOrTrue, data, context) - so we need to create a view for the linking, with the data and ctx\n\t\t// which may be different than the current context of the target. Note that this view is not a standard data-linked view, so it will\n\t\t// be disposed only when its parent view is disposed.\n\t\tlinkCtx.view = new $sub.View(\n\t\t\t$sub.extendCtx(linkCtx.ctx, linkCtx.view.ctx),\n\t\t\t\"link\", linkCtx.view, linkCtx.data, linkCtx.expr, undefined, addBindingMarkers);\n\t}\n\tlinkCtx._ctxCb = $sub._gccb(linkCtx.view); // getContextCallback: _ctxCb, for filtering/appending to dependency paths: function(path, object) { return [(object|path)*]}\n\tlinkCtx._hdl = handler;\n\t// handler._ctx = linkCtx; Could pass linkCtx for use in a depends = function() {} call, so depends is different for different linkCtx's\n\tif (linkCtx.fn._lr) {\n\t\tlinkCtx._toLk = 1;\n\t\tlate.push(linkCtx); // lateRender - defer rendering and linking (sync but after first linking pass)\n\t} else {\n\t\thandler(true);\n\t}\n}\n\n//=====================\n// Data-linking helpers\n//=====================\n\nfunction removeSubStr(str, substr) {\n\tvar k;\n\treturn str\n\t\t? (k = str.indexOf(substr),\n\t\t\t(k + 1\n\t\t\t\t? str.slice(0, k) + str.slice(k + substr.length)\n\t\t\t\t: str))\n\t\t: \"\";\n}\n\nfunction markerNodeInfo(node) {\n\treturn node &&\n\t\t(\"\" + node === node\n\t\t\t? node\n\t\t\t: node.tagName === SCRIPT\n\t\t\t\t? node.type.slice(3)\n\t\t\t\t: node.nodeType === 1 && node.getAttribute(jsvAttrStr) || \"\");\n}\n\nfunction viewInfos(node, isVal, rBinding) {\n\t// Test whether node is a script marker node, and if so, return metadata\n\tfunction getInfos(all, open, close, id, ch, elPath) {\n\t\tinfos.push({\n\t\t\telCnt: elCnt,\n\t\t\tid: id,\n\t\t\tch: ch,\n\t\t\topen: open,\n\t\t\tclose: close,\n\t\t\tpath: elPath,\n\t\t\ttoken: all\n\t\t});\n\t}\n\tvar elCnt, tokens,\n\t\tinfos = [];\n\tif (tokens = isVal ? node : markerNodeInfo(node)) {\n\t\telCnt = infos.elCnt = node.tagName !== SCRIPT;\n\t\telCnt = tokens.charAt(0) === \"@\" || elCnt;\n\t\tinfos._tkns = tokens;\n\t\t// rMarkerTokens = /(?:(#)|(\\/))(\\d+)([_^])([-+@\\d]+)?/g;\n\t\ttokens.replace(rBinding || rMarkerTokens, getInfos);\n\t\treturn infos;\n\t}\n}\n\nfunction unmarkPrevOrNextNode(node, elCnt) {\n\tif (node) {\n\t\tif (node.type === \"jsv\") {\n\t\t\tnode.parentNode.removeChild(node);\n\t\t} else if (elCnt && node.getAttribute($viewsLinkAttr) === \"\") {\n\t\t\tnode.removeAttribute($viewsLinkAttr);\n\t\t}\n\t}\n}\n\nfunction markPrevOrNextNode(node, elCnt) {\n\tvar marker = node;\n\twhile (elCnt && marker && marker.nodeType !== 1) {\n\t\tmarker = marker.previousSibling;\n\t}\n\tif (marker) {\n\t\tif (marker.nodeType !== 1) {\n\t\t\t// For text nodes, we will add a script node before\n\t\t\tmarker = document.createElement(SCRIPT);\n\t\t\tmarker.type = \"jsv\";\n\t\t\tnode.parentNode.insertBefore(marker, node);\n\t\t} else if (!markerNodeInfo(marker) && !marker.getAttribute($viewsLinkAttr)) {\n\t\t\t// For element nodes, we will add a data-link attribute (unless there is already one)\n\t\t\t// so that this node gets included in the node linking process.\n\t\t\tmarker.setAttribute($viewsLinkAttr, \"\");\n\t\t}\n\t}\n\treturn marker;\n}\n\nfunction normalizeLinkTag(linkMarkup, twoway) {\n\tlinkMarkup = $.trim(linkMarkup).replace(rEscapeQuotes, \"\\\\$&\");\n\treturn linkMarkup.slice(-1) !== delimCloseChar0\n\t// If simplified syntax is used: data-link=\"expression\", convert to data-link=\"{:expression}\",\n\t// or for inputs, data-link=\"{:expression:}\" for (default) two-way binding\n\t\t? linkMarkup = delimOpenChar1 + \":\" + linkMarkup + (twoway ? \":\" : \"\") + delimCloseChar0\n\t\t: linkMarkup;\n}\n\n//===========================\n// Methods for views and tags\n//===========================\n\nfunction callAfterLink(tag, ev, eventArgs) {\n\tvar linkedElems, linkedElements, linkedElem, l, m, $linkCtxElem, tagCtxElse,\n\t\ttagCtx = tag.tagCtx,\n\t\tlinkCtx = tag.linkCtx,\n\t\tbindTo = tag.bindTo;\n\n\tif (tag._.unlinked) { // First call to onAfterLink, or first call after onUpdate: updateContent. Initialize and call onBind and set properties\n\t\t$linkCtxElem = $(linkCtx.elem);\n\t\tif (linkedElements = tag.linkedElement) {\n\t\t\t// tag.linkedElement: - selector, or array of selectors, for identifying linked elements in template/rendered content.\n\t\t\t// (But for tag bindings on data-linked elements, defaults to data-linked element)\n\t\t\tm = tag.tagCtxs.length;\n\t\t\twhile (m--) {\n\t\t\t\ttagCtxElse = tag.tagCtxs[m];\n\t\t\t\tl = linkedElements.length;\n\t\t\t\tlinkedElems = tagCtxElse.linkedElems = tagCtxElse.linkedElems || new Array(l);\n\t\t\t\twhile (l--) {\n\t\t\t\t\tif (linkedElements[l]) {\n\t\t\t\t\t\tlinkedElem = tag.inline ? tagCtxElse.contents(true, linkedElements[l]) : $linkCtxElem;\n\t\t\t\t\t\tif ((linkedElem[0]) && linkedElem[0].type !== RADIO) {\n\t\t\t\t\t\t\tlinkedElem = linkedElem.first();\n\t\t\t\t\t\t\tif (!linkedElem[0]._jsvLkEl) {\n\t\t\t\t\t\t\t\tlinkedElems[l] = linkedElem;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttag.linkedElems = tagCtx.linkedElems;\n\t\t\ttag.linkedElem = tag.linkedElems[0];\n\t\t}\n\t\tif (tag.onBind) {\n\t\t\ttag.onBind(tagCtx, linkCtx, tag.ctx, ev, eventArgs);\n\t\t}\n\t}\n\n\tif (tag.onAfterLink) {\n\t\ttag.onAfterLink(tagCtx, linkCtx, tag.ctx, ev, eventArgs);\n\t}\n\n\t// linkedElems may be set programmatically in onBind or onAfterLink, rather than declaratively, via tag.linkedElements\n\tif (linkedElems = tagCtx.linkedElems || tag.linkedElems || tag.linkedElem && [tag.linkedElem]) {\n\t\ttag.linkedElems = tagCtx.linkedElems = linkedElems;\n\t\ttag.linkedElem = linkedElems[0] = tag.linkedElem || tag.linkedElems[0];\n\t}\n\tif (!tag.flow && !linkCtx.elem._jsvChg) {\n\t\tif (tag.inline && tag._.unlinked && (tag.linkedElems || bindTo)) {\n\t\t\tdefineBindToDataTargets(bindingStore[tag._tgId], tag);\n\t\t}\n\n\t\tbindTo = bindTo || {};\n\t\ttag.setValue();\n\t}\n\ttag._.unlinked = undefined;\n}\n\nfunction asyncOnElemChange(ev) {\n\tvar which = ev.which;\n\tif (!(which > 15 && which < 21 || which > 32 && which < 41 || which > 111 && which < 131 || which === 27 || which === 144)) {\n\t\t// Shift, Ctrl, Alt, Pause, Caplock, Page up/down End, Home, Left, Up, Right, Down, Function keys, Escape, Numlock\n\t\tsetTimeout(function() {\n\t\t\tonElemChange(ev);\n\t\t});\n\t}\n}\n\nfunction bindTriggerEvent($elem, trig, onoff) {\n\t// Bind keydown, or other trigger - (rather than use the default change event bubbled to activeBody)\n\tif (trig === true && useInput) {\n\t\t$elem[onoff](\"input.jsv\", onElemChange); // For HTML5 browser with \"oninput\" support - for mouse editing of text\n\t} else {\n\t\ttrig = \"\" + trig === trig ? trig : \"keydown.jsv\"; // Set trigger to (true || truey non-string (e.g. 1) || 'keydown')\n\t\t$elem[onoff](trig, trig.indexOf(\"keydown\") >= 0 ? asyncOnElemChange : onElemChange); // Get 'keydown' with async\n\t}\n}\n\nfunction bindLinkedElChange(tag, linkedElem) {\n\t// Two-way binding for linkedElem - in the case of input, textarea or contentEditable elements.\n\t// Trigger setting may have changed. Unbind previous trigger binding (if any) and bind new one.\n\n\tvar $linkedElem, newTrig,\n\t\toldTrig = linkedElem._jsvTr || false;\n\n\tif (tag) {\n\t\tnewTrig = tag.tagCtx.props.trigger;\n\t}\n\tif (newTrig === undefined) {\n\t\tnewTrig = $subSettings.trigger;\n\t}\n\t// Trigger is noop except for text box, textarea, contenteditable...\n\tnewTrig = newTrig && (linkedElem.tagName === \"INPUT\" && linkedElem.type !== CHECKBOX && linkedElem.type !== RADIO\n\t\t|| linkedElem.type === \"textarea\" || linkedElem.contentEditable === TRUE) && newTrig || false;\n\n\tif (oldTrig !== newTrig) {\n\t\t$linkedElem = $(linkedElem);\n\t\tbindTriggerEvent($linkedElem, oldTrig, \"off\");\n\t\tbindTriggerEvent($linkedElem, linkedElem._jsvTr = newTrig, \"on\");\n\t}\n}\n\nfunction defineBindToDataTargets(binding, tag, cvtBk) {\n\t// Two-way binding.\n\t// We set the binding.to[1] to be the cvtBack, and binding.to[0] to be either the path to the target, or [object, path] where the target is the\n\t// path on the provided object. So for a computed path with an object call: a.b.getObject().d.e, we set to[0] to be [exprOb, \"d.e\"], and\n\t// we bind to the path on the returned object, exprOb.ob, as target. Otherwise our target is the first path, paths[0], which we will convert\n\t// with contextCb() for paths like ~a.b.c or #x.y.z\n\n\tvar pathIndex, path, lastPath, bindtoOb, to, bindTo, paths, k, l, obsCtxPrm, linkedCtxParam, contextCb, targetPaths, bindTos,\n\t\ttagElse = 1,\n\t\ttos = [],\n\t\tlinkCtx = binding.linkCtx,\n\t\tsource = linkCtx.data,\n\t\ttargetPathsElses = linkCtx.fn.paths;\n\n\tif (binding && !binding.to) {\n\t\tif (tag) {\n\t\t\ttag.convertBack = tag.convertBack || cvtBk;\n\t\t\tbindTo = tag.bindTo;\n\t\t\ttagElse = tag.tagCtxs ? tag.tagCtxs.length : 1;\n\t\t}\n\t\twhile (tagElse--) {\n\t\t\tbindTos = [];\n\t\t\tif (targetPaths = targetPathsElses[tagElse]) {\n\t\t\t\tbindTo = targetPaths._jsvto ? [\"_jsvto\"] : (bindTo || [0]);\n\t\t\t\tk = bindTo.length;\n\t\t\t\twhile (k--) {\n\t\t\t\t\tpath = \"\";\n\t\t\t\t\tcontextCb = linkCtx._ctxCb;\n\t\t\t\t\tpaths = targetPaths[bindTo[k]];\n\t\t\t\t\tif (pathIndex = paths && paths.length) {\n\t\t\t\t\t\tlastPath = paths[pathIndex - 1];\n\t\t\t\t\t\tif (lastPath._cpfn) { // Computed property exprOb\n\n\t\t\t\t\t\t\tbindtoOb = lastPath;\n\t\t\t\t\t\t\twhile (lastPath.sb && lastPath.sb._cpfn) {\n\t\t\t\t\t\t\t\tpath = lastPath = lastPath.sb;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpath = lastPath.sb || path && path.path;\n\t\t\t\t\t\t\tlastPath = path ? path.slice(1) : bindtoOb.path;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tto = path\n\t\t\t\t\t\t\t? [bindtoOb, // 'exprOb' for this expression and view-binding. So bindtoOb.ob is current object returned by expression.\n\t\t\t\t\t\t\t\t\tlastPath]\n\t\t\t\t\t\t\t: resolveDataTargetPath(lastPath, source, contextCb); // Get 'to' for target path: lastPath\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Contextual parameter ~foo with no external binding - has ctx.foo = [{_ocp: xxx}] and binds to ctx.foo._ocp\n\t\t\t\t\t\tlinkedCtxParam = tag.linkedCtxParam;\n\t\t\t\t\t\tto = [];\n\t\t\t\t\t\tif (linkedCtxParam && linkedCtxParam[k]) {\n\t\t\t\t\t\t\t// This is a tag binding, with linked tag contextual parameters\n\t\t\t\t\t\t\tto = [tag.tagCtxs[tagElse].ctx[linkedCtxParam[k]][0], _ocp];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ((obsCtxPrm = to._cxp) && obsCtxPrm.tag) {\n\t\t\t\t\t\t// This is a binding for a tag contextual parameter (e.g. within a tag block content\n\t\t\t\t\t\tto = obsCtxPrm;\n\t\t\t\t\t}\n\t\t\t\t\tbindTos.unshift(to);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttos.unshift(bindTos);\n\t\t}\n\t\tbinding.to = tos;\n\t}\n}\n\nfunction resolveDataTargetPath(targetPath, source, contextCb) {\n\t// Iteratively process targetPath, resolving ~a.b.c paths for contextual parameters\n\tvar path, bindtoOb, to, l, obsCtxPrm, view, topCp, data;\n\n\twhile (targetPath && targetPath !== _ocp && (to = contextCb(path = targetPath.split(\"^\").join(\".\"), source)) && (l = to.length)) {\n\t\tif (obsCtxPrm = to[0]._cxp) { // Two-way binding to a contextual parameter reference, ~foo (declared as ~foo=expr on a parent tag)\n\t\t\ttopCp = topCp || obsCtxPrm;\n\t\t\tview = to[0][0];\n\t\t\tif (_ocp in view) {\n\t\t\t\tdata = view;\n\t\t\t\tview = view._vw;\n\t\t\t} else {\n\t\t\t\tdata = view.data;\n\t\t\t}\n\t\t\ttopCp.path = targetPath = to[0][1];\n\t\t\tto = [topCp.data = data, targetPath];\n\t\t\t\tcontextCb = $sub._gccb(view);\n\t\t\t\tif (targetPath._cpfn) { // computed property\n\t\t\t\t\tbindtoOb = targetPath;\n\t\t\t\t\tbindtoOb.data = to[0];\n\t\t\t\t\tbindtoOb._cpCtx = contextCb;\n\t\t\t\t\twhile (targetPath.sb && targetPath.sb._cpfn) {\n\t\t\t\t\t\tpath = targetPath = targetPath.sb;\n\t\t\t\t\t}\n\t\t\t\t\tpath = targetPath.sb || path && path.path;\n\t\t\t\t\ttargetPath = path ? path.slice(1) : bindtoOb.path;\n\t\t\t\t\tto = [\n\t\t\t\t\t\tbindtoOb, // 'exprOb' for this expression and view-binding. So bindtoOb.ob is current object returned by expression.\n\t\t\t\t\t\ttargetPath\n\t\t\t\t\t];\n\t\t\t\t} else if (obsCtxPrm.tag && obsCtxPrm.path === _ocp) {\n\t\t\t\t\tto = obsCtxPrm;\n\t\t\t\t}\n\t\t} else { // Two-way binding to a helper - e.g. ~address.street, or computed, e.g. ~fullName(), or view property e.g. #data.foo\n\t\t\tto = l>2\n\t\t\t\t? [to[l-3], to[l-2]] // With path: [object, path]\n\t\t\t\t: [to[l-2]]; // No path, (e.g. [function] for computed with setter)\n\t\t}\n\t\tsource = to[0];\n\t\ttargetPath = to[1];\n\t}\n\tto = to || [source, path];\n\tto._cxp = topCp;\n\treturn to;\n}\n\nfunction mergeCtxs(tag, newCtxs, replace) { // Merge updated tagCtxs into tag.tagCtxs\n\tvar tagCtx, newTagCtx,\n\t\tview = tag.tagCtx.view,\n\t\ttagCtxs = tag.tagCtxs || [tag.tagCtx],\n\t\tl = tagCtxs.length,\n\t\trefresh = !newCtxs;\n\n\tnewCtxs = newCtxs || tag._.bnd.call(view.tmpl, (tag.linkCtx || view).data, view, $sub);\n\n\tif (replace) {\n\t\t// Replace previous tagCtxs by new ones, rather than merging\n\t\ttagCtxs = tag.tagCtxs = newCtxs;\n\t\ttag.tagCtx = tagCtxs[0];\n\t} else {\n\t\twhile (l--) {\n\t\t\ttagCtx = tagCtxs[l];\n\t\t\tnewTagCtx = newCtxs[l];\n\t\t\t$observable(tagCtx.props).setProperty(newTagCtx.props);\n\t\t\t$extend(tagCtx.ctx, newTagCtx.ctx); // We don't support propagating ctx variables, ~foo, observably, to nested views. So extend, not setProperty...\n\t\t\ttagCtx.args = newTagCtx.args;\n\t\t\tif (refresh) {\n\t\t\t\ttagCtx.tmpl = newTagCtx.tmpl;\n\t\t\t}\n\t\t}\n\t}\n\t$sub._ths(tag, tagCtxs[0]); // tagHandlersFromProps\n\treturn tagCtxs;\n}\n\n//=========\n// Disposal\n//=========\n\nfunction clean(elems) {\n\t// Remove data-link bindings, or contained views\n\tvar l, elem, bindings,\n\t\telemArray = [],\n\t\tlen = elems.length,\n\t\ti = len;\n\twhile (i--) {\n\t\t// Copy into an array, so that deletion of nodes from DOM will not cause our 'i' counter to get shifted\n\t\t// (Note: This seems as fast or faster than elemArray = [].slice.call(elems); ...)\n\t\telemArray.push(elems[i]);\n\t}\n\ti = len;\n\twhile (i--) {\n\t\telem = elemArray[i];\n\t\tif (elem.parentNode) {\n\t\t\t// Has not already been removed from the DOM\n\t\t\tif (bindings = elem._jsvBnd) {\n\t\t\t\t// Get propertyChange bindings for this element\n\t\t\t\t// This may be an element with data-link, or the opening script marker node for a data-linked tag {^{...}}\n\t\t\t\t// bindings is a string with the syntax: \"(&bindingId)*\"\n\t\t\t\tbindings = bindings.slice(1).split(\"&\");\n\t\t\t\telem._jsvBnd = \"\";\n\t\t\t\tl = bindings.length;\n\t\t\t\twhile (l--) {\n\t\t\t\t\t// Remove associated bindings\n\t\t\t\t\tremoveViewBinding(bindings[l], elem._jsvLkEl, elem); // unbind bindings with this bindingId on this view\n\t\t\t\t}\n\t\t\t}\n\t\t\tdisposeTokens(markerNodeInfo(elem) + (elem._df || \"\"), elem);\n\t\t}\n\t}\n}\n\nfunction removeViewBinding(bindId, linkedElemTag, elem) {\n\t// Unbind\n\tvar objId, linkCtx, tag, object, obsId, tagCtxs, l, map, linkedElem, trigger, view, tagCtx, linkedElems, allLinkedElems,\n\t\tbinding = bindingStore[bindId];\n\n\tif (linkedElemTag) {\n\t\telem._jsvLkEl = undefined;\n\t} else if (binding && (!elem || elem === binding.elem)) { // Test that elem is actually binding.elem, since cloned elements can have inappropriate markerNode info\n\t\tdelete bindingStore[bindId]; // Delete already, so call to onDispose handler below cannot trigger recursive deletion (through recursive call to jQuery cleanData)\n\t\tfor (objId in binding.bnd) {\n\t\t\tobject = binding.bnd[objId];\n\t\t\tobsId = binding.cbId;\n\t\t\tif ($isArray(object)) {\n\t\t\t\t$([object]).off(arrayChangeStr + obsId).off(propertyChangeStr + obsId); // There may be either or both of arrayChange and propertyChange\n\t\t\t} else {\n\t\t\t\t$(object).off(propertyChangeStr + obsId);\n\t\t\t}\n\t\t\tdelete binding.bnd[objId];\n\t\t}\n\n\t\tif (linkCtx = binding.linkCtx) {\n\t\t\tif (tag = linkCtx.tag) {\n\t\t\t\tif (tagCtxs = tag.tagCtxs) {\n\t\t\t\t\tl = tagCtxs.length;\n\t\t\t\t\twhile (l--) {\n\t\t\t\t\t\ttagCtx = tagCtxs[l];\n\t\t\t\t\t\tif (map = tagCtx.map) {\n\t\t\t\t\t\t\tmap.unmap(); //unobserve\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Copy linkedElems in case tag.linkedElem or tag.linkedElems are undefined in onUnbind\n\t\t\t\t\t\tif (linkedElems = tagCtx.linkedElems) {\n\t\t\t\t\t\t\tallLinkedElems = (allLinkedElems || []).concat(linkedElems);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (tag.onUnbind) {\n\t\t\t\t\ttag.onUnbind(tag.tagCtx, linkCtx, tag.ctx, true);\n\t\t\t\t}\n\t\t\t\tif (tag.onDispose) {\n\t\t\t\t\ttag.onDispose();\n\t\t\t\t}\n\n\t\t\t\tif (!tag._elCnt) {\n\t\t\t\t\tif (tag._prv) {\n\t\t\t\t\t\ttag._prv.parentNode.removeChild(tag._prv);\n\t\t\t\t\t}\n\t\t\t\t\tif (tag._nxt) {\n\t\t\t\t\t\ttag._nxt.parentNode.removeChild(tag._nxt);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlinkedElems = allLinkedElems || [$(linkCtx.elem)];\n\t\t\tl = linkedElems.length;\n\t\t\twhile (l--) {\n\t\t\t\tlinkedElem = linkedElems[l];\n\t\t\t\tif (trigger = linkedElem && linkedElem[0] && linkedElem[0]._jsvTr) {\n\t\t\t\t\tbindTriggerEvent(linkedElem, trigger, \"off\");\n\t\t\t\t\tlinkedElem[0]._jsvTr = undefined;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tview = linkCtx.view;\n\t\t\tif (view.type === \"link\") {\n\t\t\t\tview.parent.removeViews(view._.key, undefined, true); // A \"link\" view is associated with the binding, so should be disposed with binding.\n\t\t\t} else {\n\t\t\t\tdelete view._.bnds[bindId];\n\t\t\t}\n\t\t}\n\t\tdelete cbBindingsStore[binding.cbId];\n\t}\n}\n\nfunction $unlink(to) {\n\tif (to) {\n\t\tto = to.jquery ? to : $(to);\n\t\tto.each(function() {\n\t\t\tvar innerView;\n\t\t\t//TODO fix this for better perf. Rather that calling inner view multiple times which does querySelectorAll each time, consider a single querySelectorAll\n\t\t\t// or simply call view.removeViews() on the top-level views under the target 'to' node, then clean(...)\n\t\t\twhile ((innerView = $view(this, true)) && innerView.parent) {\n\t\t\t\tinnerView.parent.removeViews(innerView._.key, undefined, true);\n\t\t\t}\n\t\t\tclean(this.getElementsByTagName(\"*\"));\n\t\t});\n\t\tclean(to);\n\t} else {\n\t\t// Call to $.unlink() is equivalent to $.unlink(true, \"body\")\n\t\tif (activeBody) {\n\t\t\t$(activeBody)\n\t\t\t\t.off(elementChangeStr, onElemChange)\n\t\t\t\t.off('blur.jsv', '[contenteditable]', onElemChange);\n\t\t\tactiveBody = undefined;\n\t\t}\n\t\ttopView.removeViews();\n\t\tclean(document.body.getElementsByTagName(\"*\"));\n\t}\n}\n\n//========\n// Helpers\n//========\n\nfunction inputAttrib(elem) {\n\treturn elem.type === CHECKBOX ? elem[CHECKED] : elem.value;\n}\n\nfunction changeHandler(view, name, tag) {\n\t// Get onBeforeChange, onAfterChange, onAfterCreate handler - if there is one;\n\treturn tag && tag[name] || view.ctx[name] && view.ctxPrm(name) || $views.helpers[name];\n}\n\n//========================== Initialize ==========================\n\n//=====================\n// JsRender integration\n//=====================\n\naddLinkMethods($sub.View.prototype); // Modify the View prototype to include link methods\n\n$sub.onStore.template = function(name, item, parentTmpl) {\n\tif (item === null) {\n\t\tdelete $.link[name];\n\t\tdelete $.render[name];\n\t} else {\n\t\titem.link = tmplLink;\n\n\t\tif (name && !parentTmpl && name !== \"jsvTmpl\") {\n\t\t\t$.render[name] = item;\n\t\t\t$.link[name] = function() {\n\t\t\t\treturn tmplLink.apply(item, arguments);\n\t\t\t};\n\t\t}\n\t}\n};\n\n$sub.viewInfos = viewInfos; // Expose viewInfos() as public helper method\n\n// Define JsViews version of delimiters(), and initialize\n($viewsSettings.delimiters = function() {\n\t// Run delimiters initialization in context of jsrender.js\n\tvar ret = oldJsvDelimiters.apply(0, arguments);\n\n\tif (oldJsvDelimiters !== $viewsDelimiters) {\n\t\t// If JsRender was loaded before JsViews, then need also to initialize and set globals in that JsRender instance\n\t\tret = $viewsDelimiters.apply(0, arguments);\n\t}\n\n\t// Data-linking must use new delimiters\n\trTagDatalink = new RegExp(\"(?:^|\\\\s*)([\\\\w-]*)(\\\\\" + linkChar + \")?(\\\\\" + delimOpenChar1 + $sub.rTag + \"(:\\\\w*)?\\\\\" + delimCloseChar0 + \")\", \"g\");\n\treturn ret;\n})(); // jshint ignore:line\n\n$sub.addSetting(\"trigger\");\n\n//====================================\n// Additional members for linked views\n//====================================\n\nfunction transferViewTokens(prevNode, nextNode, parentElem, id, viewOrTagChar, refresh) {\n\t// Transfer tokens on prevNode of viewToRemove/viewToRefresh to nextNode or parentElem._df\n\t// view marker tokens: #m_...VIEW.../m_\n\t// tag marker tokens: #m^...TAG..../m^\n\n\tvar i, l, vwInfos, vwInfo, viewOrTag, viewId, tokens,\n\t\tprecedingLength = 0,\n\t\temptyView = prevNode === nextNode;\n\n\tif (prevNode) {\n\t\t// prevNode is either the first node in the viewOrTag, or has been replaced by the vwInfos tokens string\n\t\tvwInfos = viewInfos(prevNode) || [];\n\t\tfor (i = 0, l = vwInfos.length; i < l; i++) {\n\t\t\t// Step through views or tags on the prevNode\n\t\t\tvwInfo = vwInfos[i];\n\t\t\tviewId = vwInfo.id;\n\t\t\tif (viewId === id && vwInfo.ch === viewOrTagChar) {\n\t\t\t\tif (refresh) {\n\t\t\t\t\t// This is viewOrTagToRefresh, this is the last viewOrTag to process...\n\t\t\t\t\tl = 0;\n\t\t\t\t} else {\n\t\t\t\t\t// This is viewOrTagToRemove, so we are done...\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!emptyView) {\n\t\t\t\tviewOrTag = vwInfo.ch === \"_\"\n\t\t\t\t\t? viewStore[viewId] // A view: \"#m_\" or \"/m_\"\n\t\t\t\t\t: bindingStore[viewId].linkCtx.tag; // A tag \"#m^\" or \"/m^\"\n\t\t\t\tif (vwInfo.open) { // A \"#m_\" or \"#m^\" token\n\t\t\t\t\tviewOrTag._prv = nextNode;\n\t\t\t\t} else if (vwInfo.close) { // A \"/m_\" or \"/m^\" token\n\t\t\t\t\tviewOrTag._nxt = nextNode;\n\t\t\t\t}\n\t\t\t}\n\t\t\tprecedingLength += viewId.length + 2;\n\t\t}\n\n\t\tif (precedingLength) {\n\t\t\tprevNode.setAttribute(jsvAttrStr, prevNode.getAttribute(jsvAttrStr).slice(precedingLength));\n\t\t}\n\t\ttokens = nextNode ? nextNode.getAttribute(jsvAttrStr) : parentElem._df;\n\t\tif (l = tokens.indexOf(\"/\" + id + viewOrTagChar) + 1) {\n\t\t\ttokens = vwInfos._tkns.slice(0, precedingLength) + tokens.slice(l + (refresh ? -1 : id.length + 1));\n\t\t}\n\t\tif (tokens) {\n\t\t\tif (nextNode) {\n\t\t\t\t// If viewOrTagToRemove was an empty viewOrTag, we will remove both #n and /n\n\t\t\t\t// (and any intervening tokens) from the nextNode (=== prevNode)\n\t\t\t\t// If viewOrTagToRemove was not empty, we will take tokens preceding #n from prevNode,\n\t\t\t\t// and concatenate with tokens following /n on nextNode\n\t\t\t\tnextNode.setAttribute(jsvAttrStr, tokens);\n\t\t\t} else {\n\t\t\t\tsetDefer(parentElem, tokens);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// !prevNode, so there may be a deferred nodes token on the parentElem. Remove it.\n\t\tsetDefer(parentElem, removeSubStr(parentElem._df, \"#\" + id + viewOrTagChar));\n\t\tif (!refresh && !nextNode) {\n\t\t\t// If this viewOrTag is being removed, and there was no .nxt, remove closing token from deferred tokens\n\t\t\tsetDefer(parentElem, removeSubStr(parentElem._df, \"/\" + id + viewOrTagChar));\n\t\t}\n\t}\n}\n\nfunction disposeTokens(tokens, elem) {\n\tvar i, l, vwItem, vwInfos;\n\tif (vwInfos = viewInfos(tokens, true, rOpenMarkers)) {\n\t\tfor (i = 0, l = vwInfos.length; i < l; i++) {\n\t\t\tvwItem = vwInfos[i];\n\t\t\tif (vwItem.ch === \"_\") {\n\t\t\t\tif ((vwItem = viewStore[vwItem.id]) && vwItem.type && (!elem || vwItem._prv === elem || vwItem.parentElem === elem )) {\n\t\t\t\t\t// If this is the _prv (prevNode) for a view, remove the view\n\t\t\t\t\t// - unless view.type is undefined, in which case it is already being removed\n\t\t\t\t\t// (or unless the elem is not related - e.g. a cloned element which 'accidentally' picked up the data-jsv atttribute of the ._df expando)\n\t\t\t\t\tvwItem.parent.removeViews(vwItem._.key, undefined, true);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveViewBinding(vwItem.id, undefined, elem); // unbind bindings with this bindingId on this view\n\t\t\t}\n\t\t}\n\t}\n}\n\n//============================================\n// Add link methods to data-linked view or tag\n//============================================\n\nfunction updateValue(val, index, tagElse, bindId, ev) {\n// Observably update a data value targeted by bindTo\n// Called when linkedElem changes: called as updateValue(val, index, tagElse, bindId, ev) - this: undefined\n// Called directly as tag.updateValue(val, index, tagElse) - this: tag\n\tvar values = [];\n\tif (this && this._tgId) {\n\t\tbindId = this;\n\t}\n\tvalues[index||0] = val;\n\tupdateValues(values, tagElse, bindId, ev);\n\treturn this;\n}\n\nfunction setValues() {\n\tvar args = arguments,\n\t\tm = args.length;\n\n\tif (!m) {\n\t\targs = this.tag.cvtArgs(undefined, 1, this.index); // setValues() with no arguments calls setValue with boundArgs values\n\t\tm = args.length;\n\t}\n\twhile (m--) {\n\t\tthis.tag.setValue(args[m], m, this.index);\n\t}\n}\n\nfunction addLinkMethods(tagOrView) { // tagOrView is View prototype or tag instance\n\n\tvar l, m, tagCtx, boundProps, bindTo, key, theTag, theView;\n\n\ttagOrView.contents = function(deep, select) {\n\t\t// For a view, a tag or a tagCtx, return jQuery object with the content nodes,\n\t\tif (deep !== !!deep) {\n\t\t\t// deep not boolean, so this is contents(selector)\n\t\t\tselect = deep;\n\t\t\tdeep = undefined;\n\t\t}\n\t\tvar filtered,\n\t\t\tnodes = $(this.nodes());\n\t\tif (nodes[0]) {\n\t\t\tfiltered = select ? nodes.filter(select) : nodes;\n\t\t\tnodes = deep && select ? filtered.add(nodes.find(select)) : filtered;\n\t\t}\n\t\treturn nodes;\n\t};\n\n\ttagOrView.nodes = function(withMarkers, prevNode, nextNode) {\n\t\t// For a view, a tag or a tagCtx, return top-level nodes\n\t\t// Do not return any script marker nodes, unless withMarkers is true\n\t\t// Optionally limit range, by passing in prevNode or nextNode parameters\n\n\t\tvar node,\n\t\t\tself = this.contentView || this, // If tagCtx, use tagCtx.contentView\n\t\t\telCnt = self._elCnt,\n\t\t\tprevIsFirstNode = !prevNode && elCnt,\n\t\t\tnodes = [];\n\n\t\tif (!self.args) { // If tagCtx with no content (so no contentView) self is tagCtx: return empty [];\n\t\t\tprevNode = prevNode || self._prv;\n\t\t\tnextNode = nextNode || self._nxt;\n\n\t\t\tnode = prevIsFirstNode\n\t\t\t\t? (prevNode === self._nxt\n\t\t\t\t\t? self.parentElem.lastSibling\n\t\t\t\t\t: prevNode)\n\t\t\t\t: (self.inline === false\n\t\t\t\t\t? prevNode || self.linkCtx.elem.firstChild\n\t\t\t\t\t: prevNode && prevNode.nextSibling);\n\n\t\t\twhile (node && (!nextNode || node !== nextNode)) {\n\t\t\t\tif (withMarkers || elCnt || node.tagName !== SCRIPT) {\n\t\t\t\t\t// All the top-level nodes in the view\n\t\t\t\t\t// (except script marker nodes, unless withMarkers = true)\n\t\t\t\t\t// (Note: If a script marker node, viewInfo.elCnt undefined)\n\t\t\t\t\tnodes.push(node);\n\t\t\t\t}\n\t\t\t\tnode = node.nextSibling;\n\t\t\t}\n\t\t}\n\t\treturn nodes;\n\t};\n\n\ttagOrView.childTags = function(deep, tagName) {\n\t\t// For a view, a tagor a tagCtx, return child tags - at any depth, or as immediate children only.\n\t\tif (deep !== !!deep) {\n\t\t\t// deep not boolean, so this is childTags(tagName) - which looks for top-level tags of given tagName\n\t\t\ttagName = deep;\n\t\t\tdeep = undefined;\n\t\t}\n\n\t\tvar self = this.contentView || this, // If tagCtx, use tagCtx.contentView\n\t\t\tview = self.link ? self : self.tagCtx.view, // This may be a view or a tag. If a tag, get the view from tag.tagCtx.view\n\t\t\tprevNode = self._prv,\n\t\t\telCnt = self._elCnt,\n\t\t\ttags = [];\n\n\t\tif (!self.args) { // If tagCtx with no content (so no contentView) self is tagCtx: return empty [];\n\t\t\tview.link(\n\t\t\t\tundefined,\n\t\t\t\tself.parentElem,\n\t\t\t\telCnt ? prevNode && prevNode.previousSibling : prevNode,\n\t\t\t\tself._nxt,\n\t\t\t\tundefined,\n\t\t\t\t{get:{\n\t\t\t\t\ttags: tags,\n\t\t\t\t\tdeep: deep,\n\t\t\t\t\tname: tagName,\n\t\t\t\t\tid: self.link ? self._.id + \"_\" : self._tgId + \"^\"\n\t\t\t\t}}\n\t\t\t);\n\t\t}\n\t\treturn tags;\n\t};\n\n\tif (tagOrView._is === \"tag\") {\n\t\t//=======================\n\t\t// This is a TAG instance\n\t\t//=======================\n\n\t\ttheTag = tagOrView;\n\n\t\tm = theTag.tagCtxs.length;\n\t\twhile (m--) {\n\t\t\ttagCtx = theTag.tagCtxs[m];\n\n\t\t\ttagCtx.setValues = setValues;\n\t\t\ttagCtx.cvtArgs = convertArgs;\n\t\t\ttagCtx.bndArgs = convertBoundArgs;\n\t\t\ttagCtx.contents = tagOrView.contents;\n\t\t\ttagCtx.childTags = tagOrView.childTags;\n\t\t\ttagCtx.nodes = tagOrView.nodes;\n\t\t}\n\n\t\tboundProps = theTag.boundProps = theTag.boundProps || [];\n\t\tif (bindTo = theTag.linkTo ? [\"linkTo\"] : theTag.bindTo) {\n\t\t\tl = bindTo.length;\n\t\t\twhile (l--) {\n\t\t\t\tkey = bindTo[l];\n\t\t\t\tif (key + \"\" === key) {\n\t\t\t\t\tbindTo[key] = 1;\n\t\t\t\t\tif ($.inArray(key, boundProps) < 0) {\n\t\t\t\t\t\tboundProps.push(key); // Add any 'bindTo' props to boundProps array. (So two-way binding works without writing ^foo=expression)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttheTag.setValue = $sub._gm(theTag.constructor.prototype.setValue, function(val, index, tagElse) {\n\t\t\tif (!theTag._.chg) { // if the tag is not updating itself\n\t\t\t\tif (!arguments.length) { // tag.setValue() calls setValue(val, index) for each parameter in bindTo array\n\t\t\t\t\ttheTag.setValues(); // = theTag.bndArgs()\n\t\t\t\t\treturn theTag;\n\t\t\t\t}\n\t\t\t\tvar linkedElem, linkedEl, linkedTag,\n\t\t\t\t\tlinkedCtxParam = theTag.linkedCtxParam,\n\t\t\t\t\ttagCtx = theTag.tagCtxs[tagElse || 0],\n\t\t\t\t\tprops = tagCtx.props,\n\t\t\t\t\tlinkCtx = theTag.linkCtx,\n\t\t\t\t\tlinkedElems = tagCtx.linkedElems || theTag.linkedElem && [theTag.linkedElem];\n\n\t\t\t\tif (val !== undefined) {\n\t\t\t\t\ttheTag.base.call(theTag , val, index, tagElse);\n\t\t\t\t} else if (theTag.getValue && (val = theTag.getValue(tagElse)) && val !== undefined) {\n\t\t\t\t\t// If bound args are not initialized, and getValue is defined, use getValue to initialize\n\t\t\t\t\tif (theTag.bindTo.length > 1) {\n\t\t\t\t\t\tval = val[index]; // getVal returns value if tag.bndArgs() (and bindTo) length is 1, or array of values if bindTo.length > 1\n\t\t\t\t\t}\n\t\t\t\t\tif (linkedCtxParam && linkedCtxParam[index]) {\n\t\t\t\t\t\t// Values of tag contextual param were already intialized (during rendering) so need to observably update to values from tag.getValue()\n\t\t\t\t\t\t$.observable(tagCtx.ctx[linkedCtxParam[index]][0]).setProperty(_ocp, val);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ((linkedElem = linkedElems && linkedElems[index]) && linkedElem[0]) {\n\t\t\t\t\tl = linkedElem.length;\n\t\t\t\t\twhile (l--) {\n\t\t\t\t\t\tlinkedEl = linkedElem[l];\n\t\t\t\t\t\tif (theTag._.unlinked && linkedEl !== linkCtx.elem) {\n\t\t\t\t\t\t\tlinkedTag = linkedEl._jsvLkEl;\n\t\t\t\t\t\t\tif (theTag.inline && (!linkedTag || linkedTag !== theTag)) {\n\t\t\t\t\t\t\t\tif (linkedTag) {\n\t\t\t\t\t\t\t\t\tval = linkedTag.cvtArgs(undefined, 1, tagElse)[index]; // Need to use converter of linked tag\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t// For data-linked tags, identify the linkedEl with the tag, for \"to\" binding\n\t\t\t\t\t\t\t\t// (For data-linked elements, if not yet bound, we identify later when the linkCtx.elem is bound)\n\t\t\t\t\t\t\t\tlinkedEl._jsvLkEl = theTag;\n\t\t\t\t\t\t\t\tlinkedEl._jsvInd = index;\n\t\t\t\t\t\t\t\tlinkedEl._jsvElse = tagElse;\n\t\t\t\t\t\t\t\tbindLinkedElChange(theTag, linkedEl);\n\t\t\t\t\t\t\t\tlinkedEl._jsvBnd = \"&\" + theTag._tgId + \"+\"; // Add a \"+\" for cloned binding - so removing\n\t\t\t\t\t\t\t\t// elems with cloned bindings will not remove the 'parent' binding from the bindingStore.\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (val !== undefined && !linkedEl._jsvChg && linkCtx._val !== val) {\n\t\t\t\t\t\t\tif (linkedEl.value !== undefined) {\n\t\t\t\t\t\t\t\tif (linkedEl.type === CHECKBOX) {\n\t\t\t\t\t\t\t\t\tlinkedEl[CHECKED] = val && val !== \"false\";\n\t\t\t\t\t\t\t\t} else if (linkedEl.type === RADIO) {\n\t\t\t\t\t\t\t\t\tlinkedEl[CHECKED] = (linkedEl.value === val);\n\t\t\t\t\t\t\t\t} else if ($isArray(val)) {\n\t\t\t\t\t\t\t\t\tlinkedEl.value = val; // Don't use jQuery since it replaces array by mapped clone\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t$(linkedEl).val(val); // Use jQuery for attrHooks - can't just set value (on select, for example)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if (linkedEl.contentEditable === TRUE) {\n\t\t\t\t\t\t\t\tlinkedEl.innerHTML = val;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (props.name) {\n\t\t\t\t\t\t\tlinkedEl.name = linkedEl.name || props.name;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn theTag;\n\t\t});\n\n\t\ttheTag.updateValue = updateValue;\n\n\t\ttheTag.updateValues = function() {\n\t\t\treturn updateValues(arguments, undefined, this);\n\t\t};\n\n\t\ttheTag.setValues = function() {\n\t\t\tvar m = arguments.length ? 1 : theTag.tagCtxs.length;\n\t\t\twhile (m--) {\n\t\t\t\tsetValues.apply(theTag.tagCtxs[m], arguments);\n\t\t\t}\n\t\t};\n\n\t\ttheTag.refresh = function(sourceValue) {\n\t\t\tvar attr,\n\t\t\t\tlinkCtx = theTag.linkCtx,\n\t\t\t\tview = theTag.tagCtx.view;\n\n\t\t\tif (theTag.onUnbind) {\n\t\t\t\ttheTag.onUnbind(theTag.tagCtx, linkCtx, theTag.ctx);\n\t\t\t}\n\t\t\tattr = theTag.inline ? HTML : (linkCtx.attr || defaultAttr(theTag.parentElem, true));\n\t\t\tsourceValue = $sub._tag(theTag, view, view.tmpl, mergeCtxs(theTag), true); // Get rendered HTML for tag, based on refreshed tagCtxs\n\t\t\tupdateContent(sourceValue, linkCtx, attr, theTag);\n\t\t\tcallAfterLink(theTag);\n\t\t\treturn theTag;\n\t\t};\n\n\t\ttheTag.domChange = function() { // domChange notification support\n\t\t\tvar elem = this.parentElem,\n\t\t\t\thasListener = $.hasData(elem) && $._data(elem).events,\n\t\t\t\tdomChangeNotification = \"jsv-domchange\";\n\n\t\t\tif (hasListener && hasListener[domChangeNotification]) {\n\t\t\t\t// Only trigger handler if there is a handler listening for this event. (Note using triggerHandler - so no event bubbling.)\n\t\t\t\t$(elem).triggerHandler(domChangeNotification, arguments);\n\t\t\t}\n\t\t};\n\n\t\t//====================================\n\t\t// End of added link methods for TAG\n\t\t//====================================\n\t} else {\n\t\t//=========================\n\t\t// This is a VIEW prototype\n\t\t//=========================\n\n\t\ttheView = tagOrView;\n\n\t\t// Note: a linked view will also, after linking have nodes[], _prv (prevNode), _nxt (nextNode) ...\n\t\ttheView.addViews = function(index, dataItems) {\n\t\t\t// if view is not an array view, do nothing\n\t\t\tvar i, viewsCount,\n\t\t\t\tview = this,\n\t\t\t\titemsCount = dataItems.length,\n\t\t\t\tviews = view.views;\n\n\t\t\tif (!view._.useKey && itemsCount) {\n\t\t\t\t// view is of type \"array\"\n\t\t\t\tviewsCount = views.length + itemsCount;\n\n\t\t\t\tif (viewsCount === view.data.length // If views not already synced to array (e.g. triggered by array.length propertyChange - jsviews/issues/301)\n\t\t\t\t\t\t&& renderAndLink(view, index, view.tmpl, views, dataItems, view.ctx) !== false) {\n\t\t\t\t\tif (!view._.srt) { // Not part of a 'sort' on refresh\n\t\t\t\t\t\tview.fixIndex(index + itemsCount);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\ttheView.removeViews = function(index, itemsCount, keepNodes, isMove) {\n\t\t\t// view.removeViews() removes all the child views\n\t\t\t// view.removeViews(index) removes the child view with specified index or key\n\t\t\t// view.removeViews(index, count) removes the specified nummber of child views, starting with the specified index\n\t\t\tfunction removeView(index) {\n\t\t\t\tvar id, bindId, parentElem, prevNode, nextNode, nodesToRemove,\n\t\t\t\t\tviewToRemove = views[index];\n\n\t\t\t\tif (viewToRemove && viewToRemove.link) {\n\t\t\t\t\tid = viewToRemove._.id;\n\t\t\t\t\tif (!keepNodes) {\n\t\t\t\t\t\t// Remove the HTML nodes from the DOM, unless they have already been removed, including nodes of child views\n\t\t\t\t\t\tnodesToRemove = viewToRemove.nodes();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove child views, without removing nodes\n\t\t\t\t\tviewToRemove.removeViews(undefined, undefined, true);\n\n\t\t\t\t\tviewToRemove.type = undefined; // Set type to undefined: used as a flag that this view is being removed\n\t\t\t\t\tprevNode = viewToRemove._prv;\n\t\t\t\t\tnextNode = viewToRemove._nxt;\n\t\t\t\t\tparentElem = viewToRemove.parentElem;\n\t\t\t\t\t// If prevNode and nextNode are the same, the view is empty\n\t\t\t\t\tif (!keepNodes) {\n\t\t\t\t\t\t// Remove the HTML nodes from the DOM, unless they have already been removed, including nodes of child views\n\t\t\t\t\t\tif (viewToRemove._elCnt) {\n\t\t\t\t\t\t\t// if keepNodes is false (and transferring of tokens has not already been done at a higher level)\n\t\t\t\t\t\t\t// then transfer tokens from prevNode which is being removed, to nextNode.\n\t\t\t\t\t\t\ttransferViewTokens(prevNode, nextNode, parentElem, id, \"_\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$(nodesToRemove).remove();\n\t\t\t\t\t}\n\t\t\t\t\tif (!viewToRemove._elCnt) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tprevNode.parentNode.removeChild(prevNode); // (prevNode.parentNode is parentElem, except if jQuery Mobile or similar has inserted an intermediate wrapper\n\t\t\t\t\t\t\tnextNode.parentNode.removeChild(nextNode);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\t\t\t\t\tsetArrayChangeLink(viewToRemove);\n\t\t\t\t\tfor (bindId in viewToRemove._.bnds) {\n\t\t\t\t\t\tremoveViewBinding(bindId);\n\t\t\t\t\t}\n\t\t\t\t\tdelete viewStore[id];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar current, childView, viewsCount,\n\t\t\t\tview = this,\n\t\t\t\tisArray = !view._.useKey,\n\t\t\t\tviews = view.views;\n\n\t\t\tif (isArray) {\n\t\t\t\tviewsCount = views.length;\n\t\t\t}\n\t\t\tif (index === undefined) {\n\t\t\t\t// Remove all child views\n\t\t\t\tif (isArray) {\n\t\t\t\t\t// views and data are arrays\n\t\t\t\t\tcurrent = viewsCount;\n\t\t\t\t\twhile (current--) {\n\t\t\t\t\t\tremoveView(current);\n\t\t\t\t\t}\n\t\t\t\t\tview.views = [];\n\t\t\t\t} else {\n\t\t\t\t\t// views and data are objects\n\t\t\t\t\tfor (childView in views) {\n\t\t\t\t\t\t// Remove by key\n\t\t\t\t\t\tremoveView(childView);\n\t\t\t\t\t}\n\t\t\t\t\tview.views = {};\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (itemsCount === undefined) {\n\t\t\t\t\tif (isArray) {\n\t\t\t\t\t\t// The parentView is data array view.\n\t\t\t\t\t\t// Set itemsCount to 1, to remove this item\n\t\t\t\t\t\titemsCount = 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Remove child view with key 'index'\n\t\t\t\t\t\tremoveView(index);\n\t\t\t\t\t\tdelete views[index];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isArray && itemsCount\n\t\t\t\t\t&& (isMove || viewsCount - itemsCount === view.data.length)) { // If views not already synced to array (e.g. triggered by array.length propertyChange - jsviews/issues/301)\n\t\t\t\t\tcurrent = index + itemsCount;\n\t\t\t\t\t// Remove indexed items (parentView is data array view);\n\t\t\t\t\twhile (current-- > index) {\n\t\t\t\t\t\tremoveView(current);\n\t\t\t\t\t}\n\t\t\t\t\tviews.splice(index, itemsCount);\n\t\t\t\t\tif (!view._.srt) {\n\t\t\t\t\t\tview.fixIndex(index);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\ttheView.moveViews = function(oldIndex, index, itemsCount) {\n\t\t\tfunction parts(itemView, str) {\n\t\t\t\treturn RegExp(\"^(.*)(\" + (str ? \"\\\\/\" : \"#\") + itemView._.id + \"_.*)$\").exec(str || itemView._prv.getAttribute(jsvAttrStr));\n\t\t\t}\n\t\t\tfunction setPrv(itemView, tokens) {\n\t\t\t\titemView._prv.setAttribute(jsvAttrStr, tokens);\n\t\t\t}\n\t\t\tvar nodes, childView, nxtView, insertBefore, viewId,\n\t\t\t\tview = this,\n\t\t\t\tselfNxt = view._nxt,\n\t\t\t\tviews = view.views,\n\t\t\t\tbackwards = index < oldIndex,\n\t\t\t\tfirstChange = backwards ? index : oldIndex,\n\t\t\t\tlastChange = backwards ? oldIndex : index,\n\t\t\t\ti = index,\n\t\t\t\tmovedNodes = [],\n\n\t\t\t\tviewsToMove = views.splice(oldIndex, itemsCount); // remove\n\n\t\t\tif (index > views.length) {\n\t\t\t\tindex = views.length;\n\t\t\t}\n\t\t\tviews.splice.apply(views, [index, 0].concat(viewsToMove)); //re-insert\n\n\t\t\titemsCount = viewsToMove.length;\n\t\t\tinsertBefore = index + itemsCount;\n\t\t\tlastChange += itemsCount;\n\n\t\t\tfor (i; i < insertBefore; i++) {\n\t\t\t\tchildView = views[i];\n\t\t\t\tnodes = childView.nodes(true);\n\t\t\t\tmovedNodes = view._elCnt ? movedNodes.concat(nodes) : movedNodes.concat(childView._prv, nodes, childView._nxt);\n\t\t\t}\n\t\t\tmovedNodes = $(movedNodes);\n\n\t\t\tif (insertBefore < views.length) {\n\t\t\t\tmovedNodes.insertBefore(views[insertBefore]._prv);\n\t\t\t} else if (selfNxt) {\n\t\t\t\tmovedNodes.insertBefore(selfNxt);\n\t\t\t} else {\n\t\t\t\tmovedNodes.appendTo(view.parentElem);\n\t\t\t}\n\n\t\t\tif (view._elCnt) {\n\t\t\t\tvar afterParts,\n\t\t\t\t\tendChange = backwards ? firstChange + itemsCount : lastChange - itemsCount,\n\t\t\t\t\tbeforeView = views[firstChange-1],\n\t\t\t\t\tstartView = views[firstChange],\n\t\t\t\t\tendView = views[endChange],\n\t\t\t\t\tafterView = views[lastChange],\n\t\t\t\t\tstartParts = parts(startView),\n\t\t\t\t\tendParts = parts(endView);\n\n\t\t\t\tsetPrv(startView, endParts[1] + startParts[2]);\n\t\t\t\tif (afterView) {\n\t\t\t\t\tafterParts = parts(afterView);\n\t\t\t\t\tsetPrv(afterView, startParts[1] + afterParts[2]);\n\t\t\t\t} else {\n\t\t\t\t\tif (selfNxt) {\n\t\t\t\t\t\tafterParts = parts(view, selfNxt.getAttribute(jsvAttrStr));\n\t\t\t\t\t\tselfNxt.setAttribute(jsvAttrStr, startParts[1] + afterParts[2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tafterParts = parts(view, view.parentElem._df);\n\t\t\t\t\t\tsetDefer(view.parentElem, startParts[1] + afterParts[2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsetPrv(endView, afterParts[1] + endParts[2]);\n\t\t\t\tif (beforeView) {\n\t\t\t\t\tbeforeView._nxt = startView._prv;\n\t\t\t\t} else {\n\t\t\t\t\tview._prv = startView._prv;\n\t\t\t\t}\n\t\t\t\tviews[endChange-1]._nxt = endView._prv;\n\t\t\t\tviews[lastChange-1]._nxt = afterView ? afterView._prv : selfNxt;\n\t\t\t}\n\t\t\tview.fixIndex(firstChange);\n\t\t};\n\n\t\ttheView.refresh = function() {\n\t\t\tvar view = this,\n\t\t\t\tparent = view.parent;\n\n\t\t\tif (parent) {\n\t\t\t\trenderAndLink(view, view.index, view.tmpl, parent.views, view.data, undefined, true);\n\t\t\t\tsetArrayChangeLink(view);\n\t\t\t}\n\t\t};\n\n\t\ttheView.fixIndex = function(fromIndex) {\n\t\t\t// Fixup index on following view items...\n\t\t\tvar views = this.views,\n\t\t\t\tindex = views.length;\n\t\t\twhile (fromIndex < index--) {\n\t\t\t\tif (views[index].index !== index) {\n\t\t\t\t\t$observable(views[index]).setProperty(\"index\", index);\n\t\t\t\t\t// This is fixing up index, but not key, and not index on child views. From child views, use view.getIndex()\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\ttheView.link = viewLink;\n\n\t\t//====================================\n\t\t// End of added link methods for VIEW\n\t\t//====================================\n\t}\n}\n\n//========================\n// JsViews-specific converters\n//========================\n\n$converters.merge = function(val) {\n\t// Special converter used in data-linking to space-separated lists, such as className:\n\t// Currently only supports toggle semantics - and has no effect if toggle string is not specified\n\t// data-link=\"class{merge:boolExpr toggle=className}\"\n\tvar regularExpression,\n\t\tcurrentValue = this.linkCtx.elem.className,\n\t\ttoggle = this.tagCtx.props.toggle;\n\n\tif (toggle) {\n\t\t// We are toggling the class specified by the toggle property,\n\t\t// and the boolean val binding is driving the insert/remove toggle\n\n\t\tregularExpression = toggle.replace(/[\\\\^$.|?*+()[{]/g, \"\\\\$&\");\n\t\t// Escape any regular expression special characters (metacharacters) within the toggle string\n\t\tregularExpression = \"(\\\\s(?=\" + regularExpression + \"$)|(\\\\s)|^)(\" + regularExpression + \"(\\\\s|$))\";\n\t\t// Example: /(\\s(?=myclass$)|(\\s)|^)?(myclass(\\s|$))/ - so matches (\" myclass\" or \" \" or ^ ) followed by (\"myclass \" or \"myclass$\") where ^/$ are beginning/end of string\n\t\tcurrentValue = currentValue.replace(new RegExp(regularExpression), \"$2\");\n\t\tval = currentValue + (val ? (currentValue && \" \") + toggle : \"\");\n\t}\n\treturn val;\n};\n\n//========================\n// JsViews-specific tags\n//========================\n\n$tags({\n\ton: {\n\t\tattr: NONE,\n\t\tinit: function(tagCtx) {\n\t\t\tvar content,\n\t\t\t\ttag = this,\n\t\t\t\ti = 0,\n\t\t\t\targs = tagCtx.args, // [events,] [selector,] handler\n\t\t\t\tl = args.length;\n\n\t\t\tfor (; ii && i+1; // handler index\n\t\t\tif (tag.inline) {\n\t\t\t\tif (!$sub.rTmpl.exec(content = $.trim(tagCtx.tmpl.markup))) {\n\t\t\t\t\t// Inline {^{on}} tag with no content (or external template content) or with content containing\n\t\t\t\t\t// no HTML or JsRender tags: We will wrap the (text) content, or the operation name in a \";\n\t\t\t\t}\n\t\t\t\ttag.attr = HTML;\n\t\t\t}\n\t\t},\n\t\tonBeforeBind: function() {\n\t\t\tif (this.template) { // {^{on/}} with no content has template rendering
\", \"
\"],\n\t\ttr: [2, \"\", \"
\"],\n\t\ttd: [3, \"\", \"
\"],\n\t\tcol: [2, \"\", \"
\"],\n\t\tsvg_ns: [1, \"\", \"\"],\n\t\t// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,\n\t\t// unless wrapped in a div with non-breaking characters in front of it.\n\t\tdiv: $.support.htmlSerialize ? [0, \"\", \"\"] : [1, \"X
\", \"
\"]\n\t},\n\t_fe: {\n\t\tinput: {\n\t\t\tfrom: inputAttrib, to: VALUE\n\t\t},\n\t\ttextarea: valueBinding,\n\t\tselect: valueBinding,\n\t\toptgroup: {\n\t\t\tto: \"label\"\n\t\t}\n\t}\n});\n\nreturn $;\n}, window));\n"]} \ No newline at end of file +{"version":3,"sources":["jsviews.js"],"names":["factory","global","$","jQuery","exports","module","define","amd","getDerivedMethod","baseMethod","method","ret","tag","this","prevBase","base","apply","arguments","getMethod","$isFunction","_d","noop","tagHandlersFromProps","tagCtx","prop","props","rHasHandlers","test","fix","constructor","prototype","retVal","val","dbgBreak","console","log","e","baseApply","JsViewsError","message","name","link","$extend","target","source","$viewsDelimiters","openChars","closeChars","$isArray","$views","$subSettings","delimiters","linkChar","charAt","delimOpenChar0","delimOpenChar1","delimCloseChar0","delimCloseChar1","rTag","$sub","RegExp","rTmpl","$viewsSettings","getView","inner","type","undefined","views","i","l","found","view","root","_","useKey","get","length","parent","getNestedIndex","index","getIndex","contextParameter","key","value","isContextCb","wrapped","deps","res","obsCtxPrm","storeView","isUpdate","isRenderCall","store","ctx","$helpers","it","linked","_cxp","scope","isTop","_ocps","_crcp","_ucp","_ceo","_ocp","unshift","cvtArgs","tagElse","ind","data","_vw","getTemplate","tmpl","fn","getRsc","$templates","convertVal","converter","onError","argsLen","bindTo","boundTag","bnds","linkCtx","_lr","args","_bd","_tg","bnd","unlinked","inline","tagName","convert","flow","extendCtx","_er","onRender","convertArgs","bound","boundArgs","tagCtxs","error","slice","argOrProp","context","convertBoundArgs","getResource","resourceType","itemName","renderTag","parentView","makeArray","linkedElement","bindToLength","topView","tagDef","template","tags","attr","parentTag","m","itemRet","tagCtxCtx","ctxPrm","content","callInit","mapDef","thisMap","tagDataMap","contentCtx","parentTmpl","_is","lateRender","params","tmpls","render","renderContent","getTmpl","_ctr","init","dataMap","arrVws","dataBoundOnly","map","parents","parentTags","rendering","argDefault","isNaN","parseInt","noVws","HTML","linkedCtxParam","_cp","src","unmap","tgt","rWrappedInViewMarker","links","renderWithViews","$converters","html","View","contentTmpl","parentView_","self_","self","isArray","id","viewId","scp","indexStr","push","splice","compileChildResources","storeName","storeNames","resources","jsvStores","compileTag","Tag","baseTag","compiledDef","depends","$tags","_parentTmpl","compileTmpl","options","lookupTemplate","currentName","nodeType","elem","document","getElementById","innerHTML","getAttribute","tmplAttr","jsvTmpl","tmplName","setAttribute","compiledTmpl","tmplOrMarkup","_html","markup","tmplObject","tmplFn","replace","rEscapeQuotes","getDefaultVal","defaultVal","call","unmapArray","modelArr","arr","compileViewModel","GetNew","vm","iterate","action","getterType","ob","j","g","getters","getter","viewModels","JSON","parse","merge","viewModel","$expando","getterNames","mod","assigned","newModArr","k","model","$observable","refresh","concat","extend","proto","body","observable","privField","setProperty","set","Function","htmlTag","wrapMap","$subSettingsAdvanced","_wm","rFirstElem","exec","toLowerCase","div","trim","registerStore","storeSettings","theStore","item","compile","thisStore","onStore","OBJECT","getTgt","addSetting","st","Map","baseMap","noIteration","isTopRenderCall","prevData","prevIndex","result","useViews","setItemVar","newCtx","itemVar","newView","childView","itemResult","swapContent","outerOnRender","_wrp","syntaxError","helpers","contentView","onRenderError","fallback","Err","isLinkExpr","convertBack","hasElse","pushprecedingContent","shift","loc","substr","rNewLine","blockTagCheck","block","parseTag","all","bind","colon","codeTag","slash","bind2","closeBlock","late","pathBindings","ctxProps","paramsArgs","paramsProps","paramsCtxProps","useTrigger","allowCode","rUnescapeQuotes","rTestElseIf","current","substring","stack","pop","parseParams","rBuildHash","onerror","isCtx","keyToken","keyValue","arg","param","hasHandlers","newNode","parsedParam","bindings","astTop","buildCode","setPaths","pathsArr","paths","hasOwnProperty","skp","paramStructure","parts","parseTokens","lftPrn0","lftPrn","path","operator","err","eq","path2","prn","comma","lftPrn2","apos","quot","rtPrn","rtPrnDot","prn2","space","full","parsePath","allPath","not","object","helper","viewProperty","pathTokens","leafToken","subPath","binds","named","bindto","_jsvto","bndCtx","bd","theOb","_cpfn","sb","pathStart","parenDepth","expr","exprFn","newOb","rtSq","aposed","quoted","boundName","bndStack","prm","tmplLinks","indexOf","paramIndex","split","join","rPath","fnCall","0","rParams","ast","node","hasTag","hasEncoder","getsVal","hasCnvt","useCnvt","tmplBindings","boundOnErrStart","boundOnErrEnd","tagRender","nestedTmpls","nestedTmpl","tagAndElses","nextIsElse","oldCode","isElse","isGetVal","tagCtxFn","tagStart","trigger","tmplBindingKey","templates","converters","code","tmplOptions","debug","debugMode","_tag","parentContext","getCharEntity","ch","charEntities","charCodeAt","getTargetProps","$fnRender","tmplElem","jquery","htmlEncode","text","rIsHtml","rHtmlEncode","updateValues","sourceValues","bindId","ev","cvtBack","cnvtName","binding","sourceValue","origVals","sourceElem","sourceEl","oldLinkCtx","tos","to","tcpTag","exprOb","contextCb","_tgId","bindingStore","chg","nodeName","multiple","_jsvSel","onBeforeUpdateVal","change","updateValue","setValue","_jsvInd","_jsvLkEl","_jsvElse","_ctxCb","_cpCtx","onElemChange","fromAttr","defaultAttr","setter","fnSetters","_jsvTr","delegateTarget","activeBody","_jsvChg","rSplitBindings","lastIndex","_jsvBnd","onDataLinkedTagChange","eventArgs","noUpdate","forceUpdate","hasError","bindEarly","linkFn","cvt","parentElem","parentNode","onEvent","changeHandler","onBeforeChangeStr","_toLk","VALUE","CHECKBOX","CHECKED","onUpdate","mergeCtxs","NONE","callAfterLink","observeAndBind","onAfterChangeStr","onUnbind","_cnvt","TRUE","addLinkMethods","updateContent","_noUpd","setDefer","_df","deferAttr","prevNode","nextNode","nodesToRemove","useProp","tokens","openIndex","closeIndex","testElem","cStyle","jsvSel","renders","targetParent","$target","targetVal","_val","_elCnt","_prv","_nxt","currentStyle","getComputedStyle","display","_jsvd","displayStyles","createElement","appendChild","removeChild","style","RADIO","nodes","transferViewTokens","disposeTokens","previousSibling","lastChild","remove","empty","children","textContent","innerText","selected","inArray","lateLink","arrayChangeHandler","onBeforeChange","onAfterChange","items","srt","addViews","removeViews","moveViews","oldIndex","fixIndex","setArrayChangeLink","handler","arrayBinding","bndArr","off","arrayChangeStr","on","linkGetVal","_fe","contentEditable","from","renderAndLink","linkToNode","prevView","elCnt","removeViewBinding","nextSibling","addBindingMarkers","end","bindingKey","viewStore","linkedElem","exprFnDeps","propDeps","tagDepends","linkedElems","cvtBk","_hdl","_dp","_depends","bdId","_apply","boundProps","_bndId","defineBindToDataTargets","bindLinkedElChange","jsvAttrStr","lnkCtx","tmplLink","$link","tmplOrLinkExpr","useInput","elementChangeStr","vwInfos","placeholderParent","targetEl","topLevelCall","replaceMode","$view","addDataBinding","cleanData","lnk","viewInfos","rOpenViewMarkers","viewLink","outerData","validateOnly","convertMarkers","preceding","selfClose","closeTag","spaceBefore","boundId","spaceAfter","tag1","tag2","closeTag2","spaceAfterClose","selfClose2","endOpenTag","errorMsg","bndId","endOfElCnt","inTag","isVoid","tagStack","validate","voidElems","prevElCnt","elContent","defer","ids","openScript","closeScript","deferStack","badParent","processViewInfos","deferPath","deferChar","bindChar","onAftCr","deep","addedBindEls","_tkns","len","vwInfo","open","onArrayChange","removeSubStr","onAfterCreateStr","onAfterCreate","bindEls","getViewInfos","level","tagDepth","dataLink","wrap","selector","linkViewsSel","elems","qsa","querySelectorAll","prevNodes","markerNodeInfo","contains","isLink","rViewMarkers","skip","processInfos","$viewsLinkAttr","rOpenTagMarkers","unmarkPrevOrNextNode","prevIds","linkInfo","token","nextView","depth","fragment","copiedNode","firstTag","wrapper","thisId","noValidate","markPrevOrNextNode","namespaceURI","rConvertMarkers","safeFragment","createDocumentFragment","firstChild","insertBefore","linkMarkup","currentView","boundTagId","tagExpr","rTagIndex","linkExpressions","bindDataLinkTarget","normalizeLinkTag","rTagDatalink","isLk","_gccb","str","SCRIPT","isVal","rBinding","getInfos","close","elPath","infos","rMarkerTokens","removeAttribute","marker","twoway","copyFromTagCtxToTag","mainElem","displayElem","linkedElements","$linkCtxElem","linkCtxElem","tagCtxElse","oldVal","tagCtxslength","mainElement","displayElement","filter","Array","contents","onBind","setSize","height","width","className","_jsvCl","hasClass","removeClass","addClass","onAfterLink","asyncOnElemChange","which","setTimeout","bindTriggerEvent","$elem","trig","onoff","$linkedElem","newTrig","oldTrig","pathIndex","lastPath","bindtoOb","targetPaths","bindTos","targetPathsElses","resolveDataTargetPath","targetPath","topCp","newCtxs","newTagCtx","_ths","clean","elemArray","linkedElemTag","objId","obsId","allLinkedElems","cbId","propertyChangeStr","onDispose","cbBindingsStore","$unlink","each","innerView","getElementsByTagName","inputAttrib","viewOrTagChar","viewOrTag","precedingLength","emptyView","vwItem","rOpenMarkers","values","setValues","tagOrView","theTag","theView","select","filtered","add","find","withMarkers","prevIsFirstNode","lastSibling","childTags","bndArgs","linkTo","_gm","linkedEl","linkedTag","getValue","domChange","hasListener","hasData","_data","events","domChangeNotification","triggerHandler","dataItems","viewsCount","itemsCount","keepNodes","isMove","removeView","viewToRemove","itemView","setPrv","selfNxt","backwards","firstChange","lastChange","movedNodes","viewsToMove","appendTo","afterParts","endChange","beforeView","startView","endView","afterView","startParts","endParts","fromIndex","observeProps","insert","observeMappedProps","removeProperty","oldValue","shallowArrayFilter","setGlobals","jsvStoreName","$observe","setting","versionNumber","rAttrEncode","&","<",">","\u0000","'","\"","`","=","$render","jsr","jsrender","jsrToJq","jsviews","sub","syntaxErr","settings","advSet","_err","_sq","advanced","Error","expando","renderFile","__express","isFunction","obj","_jq","jq","_jsv","if","done","for","finalElse","include","*",":*","dbg","url","encodeURI","observe","$eventSpecial","event","special","PARSEINT","rNotWhite","propChng","arrChng","observeStr","observeObjKey","observeCbKey","observeInnerCbKey","$hasData","$data","getCbKey","cb","_cId","ObjectObservable","ns","_ns","ArrayObservable","wrapArray","dependsPaths","callback","rt","nextObj","out","_ar","removeCbBindings","cbBindings","cbBindingsId","onDataChange","isOb","allowArray","parentObs","observeAll","arOk","array","_path","observe_apply","$observeAll","unobserve","$unobserveAll","namespace","objMap","observeArrayItems","unobs","newAllPath","filterAndObserveAll","nestedArray","newObject","newParentObs","_fltr","nextParentObs","updatedTgt","wrappedCb","isObject","obId","notRemoving","un","shallowFilter","$unobserve","innerObserve","observeOnOff","pathStr","isArrayBinding","evData","obIdExpando","boundObOrArr","prntObs","allPth","initialNs","el","fullPath","getInnerCb","origRt","newObj","bindArray","unbind","relPath","prevObj","prevAllPath","p","dep","inId","innerContextCb","innerCb","initNsArr","initNsArrLen","cbItemCount","lastArg","_inId","match","origRoot","Object","unobserveAll","nonStrict","pair","multi","_setProperty","leaf","removeProp","property","Date","_trigger","_insert","oldLength","numToRemove","_remove","move","newIndex","numToMove","_move","excess","newItems","insertAdded","addedItems","dataLength","newItem","num","oldItems","newLength","_srt","$_data","handleObj","unbound","changing","update","obsSrc","obs","srcFlt","obsTgt","obt","tgtFlt","_def","oldAdvSet","bindElsSel","input","valueBinding","isCleanCall","oldCleanData","oldJsvDelimiters","querySelector","ol","ul","table","tbody","thead","tfoot","tr","colgroup","dl","optgroup","svg","svg_ns","br","img","hr","area","col","meta","command","embed","keygen","track","wbr","rViewPath","requiresStr","regularExpression","currentValue","toggle","_hi","activeElem","contextOb","_sel","_evs","_hlr","radiogroup","Math","random","domChngCntnr","forOrIfTagCtx","checked","arrayView","targetLength","arrHandler","arrBinding","arrayBindings","_ars","tagCt","newTagCtxs","prevArg","different","tci","getInnerView","nd","isVl","unlink","oldFn","_glt","regEx","linkCtxs","last","nextPath","addedTagCpDep","paramVal","paramExpr","tagCtxPrm","cloneExprObjects","clones","linkAttr","option","caption","th","td","legend","support","htmlSerialize","textarea","window"],"mappings":";;CAcC,SAASA,EAASC,GAElB,GAAIC,GAAID,EAAOE,MAEQ,iBAAZC,SACVC,OAAOD,QAAUF,EACdF,EAAQC,EAAQC,GAChB,SAASA,GACV,MAAOF,GAAQC,EAAQC,IAEG,kBAAXI,SAAyBA,OAAOC,IACjDD,QAAQ,UAAW,SAASJ,GAC3B,MAAOF,GAAQC,EAAQC,KAGxBF,EAAQC,GAAQ,IAKlB,SAASA,EAAQC,GACjB,YAoIA,SAASM,GAAiBC,EAAYC,GACrC,MAAO,YACN,GAAIC,GACHC,EAAMC,KACNC,EAAWF,EAAIG,IAKhB,OAHAH,GAAIG,KAAON,EACXE,EAAMD,EAAOM,MAAMJ,EAAKK,WACxBL,EAAIG,KAAOD,EACJH,GAIT,QAASO,GAAUT,EAAYC,GAc9B,MAXIS,IAAYT,KACfA,EAASF,EACNC,EAEEA,EAAWW,GACVX,EACAD,EAAiBa,EAAMZ,GAHxBY,EAIHX,GAEFA,EAAOU,GAAK,GAENV,EAGR,QAASY,GAAqBV,EAAKW,GAClC,GAAIC,GACHC,EAAQF,EAAOE,KAChB,KAAKD,IAAQC,IACRC,GA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EAAG,mCAAoC,uBAC7CL,QAAS,EAAG,QAAS,UAGrBhyB,IAAKrS,EAAEmoC,QAAQC,eAAiB,EAAG,GAAI,KAAO,EAAG,SAAU,WAE5D7hB,KACC6c,OACC3c,KAAMqN,GAAajV,GAAI6C,IAExB2mB,SAAUhF,GACV3O,OAAQ2O,GACRc,UACCtlB,GAAI,YAKA7e,GACJsoC","file":"jsviews.min.js","sourcesContent":["/*! jsviews.js v0.9.90 (Beta) single-file version: http://jsviews.com/ */\n/*! includes JsRender, JsObservable and JsViews - see: http://jsviews.com/#download */\n\n/* Interactive data-driven views using JsRender templates */\n\n//<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< JsRender >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n/* JsRender:\n * See http://jsviews.com/#jsrender and http://github.com/BorisMoore/jsrender\n * Copyright 2017, Boris Moore\n * Released under the MIT License.\n */\n\n//jshint -W018, -W041, -W120\n\n(function(factory, global) {\n\t// global var is the this object, which is window when running in the usual browser environment\n\tvar $ = global.jQuery;\n\n\tif (typeof exports === \"object\") { // CommonJS e.g. Browserify\n\t\tmodule.exports = $\n\t\t\t? factory(global, $)\n\t\t\t: function($) { // If no global jQuery, take jQuery passed as parameter: require(\"jsviews\")(jQuery)\n\t\t\t\treturn factory(global, $);\n\t\t\t};\n\t} else if (typeof define === \"function\" && define.amd) { // AMD script loader, e.g. RequireJS\n\t\tdefine([\"jquery\"], function($) {\n\t\t\treturn factory(global, $);\n\t\t}); // Require jQuery\n\t} else { // Browser using plain ',\n\topenScript = ' - data-linked tag, close marker\n\t\t\t// We validate with inTag so no script markers are inserted in attribute context e.g. for:\n\t\t\t// \"\" or \"
...{{/if}}...\"\n\t\t\tpreceding = id\n\t\t\t\t? (preceding + endOfElCnt + spaceBefore + (inTag ? \"\" : openScript + id + closeScript)+ spaceAfter + tag)\n\t\t\t\t: endOfElCnt || all;\n\t\t}\n\n\t\tif (validate && boundId) {\n\t\t\tif (inTag) {\n\t\t\t\t// JsViews data-linking tags are not allowed within element markup.\n\t\t\t\t// See jsviews/issues/303\n\t\t\t\tsyntaxError('{^{ within elem markup (' + inTag + ' ). Use data-link=\"...\"');\n\t\t\t}\n\t\t\tif (id.charAt(0) === \"#\") {\n\t\t\t\ttagStack.unshift(id.slice(1));\n\t\t\t} else if (id.slice(1) !== (bndId = tagStack.shift())) {\n\t\t\t\t// See jsviews/issues/213\n\t\t\t\tsyntaxError('Closing tag for {^{...}} under different elem: <' + bndId + '>');\n\t\t\t}\n\t\t}\n\t\tif (tag) {\n\t\t\tinTag = tag;\n\t\t\t// If there are ids (markers since the last tag), move them to the defer string\n\t\t\ttagStack.unshift(parentTag);\n\t\t\tparentTag = tag.slice(1);\n\t\t\tif (validate && tagStack[0] && tagStack[0] === badParent[parentTag]) {\n\t\t\t\t// Missing \n\t\t\t\t// TODO: replace this by smart insertion of tags\n\t\t\t\terror('Parent of must be ');\n\t\t\t}\n\t\t\tisVoid = voidElems[parentTag];\n\t\t\tif ((elCnt = elContent[parentTag]) && !prevElCnt) {\n\t\t\t\tdeferStack.unshift(defer);\n\t\t\t\tdefer = \"\";\n\t\t\t}\n\t\t\tprevElCnt = elCnt;\n//TODO Consider providing validation which throws if you place as child of , etc. - since if not caught,\n//this can cause errors subsequently which are difficult to debug.\n//\t\t\t\tif (elContent[tagStack[0]]>2 && !elCnt) {\n//\t\t\t\t\terror(parentTag + \" in \" + tagStack[0]);\n//\t\t\t\t}\n\t\t\tif (defer && elCnt) {\n\t\t\t\tdefer += \"+\"; // Will be used for stepping back through deferred tokens\n\t\t\t}\n\t\t}\n\t\treturn preceding;\n\t}\n\n\tfunction processViewInfos(vwInfos, targetParent) {\n\t\t// If targetParent, we are processing viewInfos (which may include navigation through '+-' paths) and hooking up to the right parentElem etc.\n\t\t// (and elem may also be defined - the next node)\n\t\t// If no targetParent, then we are processing viewInfos on newly inserted content\n\t\tvar deferPath, deferChar, bindChar, parentElem, id, onAftCr, deep,\n\t\t\taddedBindEls = [];\n\n\t\t// In elCnt context (element-only content model), prevNode is the first node after the open, nextNode is the first node after the close.\n\t\t// If both are null/undefined, then open and close are at end of parent content, so the view is empty, and its placeholder is the\n\t\t// 'lastChild' of the parentNode. If there is a prevNode, then it is either the first node in the view, or the view is empty and\n\t\t// its placeholder is the 'previousSibling' of the prevNode, which is also the nextNode.\n\t\tif (vwInfos) {\n\t\t\tif (vwInfos._tkns.charAt(0) === \"@\") {\n\t\t\t\t// We are processing newly inserted content. This is a special script element that was created in convertMarkers() to process deferred bindings,\n\t\t\t\t// and inserted following the target parent element - because no element tags (outside elCnt) were encountered to carry those binding tokens.\n\t\t\t\t// We will step back from the preceding sibling of this element, looking at targetParent elements until we find the one that the current binding\n\t\t\t\t// token belongs to. Set elem to null (the special script element), and remove it from the DOM.\n\t\t\t\ttargetParent = elem.previousSibling;\n\t\t\t\telem.parentNode.removeChild(elem);\n\t\t\t\telem = undefined;\n\t\t\t}\n\t\t\tlen = vwInfos.length;\n\t\t\twhile (len--) {\n\t\t\t\tvwInfo = vwInfos[len];\n//if (prevIds.indexOf(vwInfo.token) < 0) { // This token is a newly created view or tag binding\n\t\t\t\tbindChar = vwInfo.ch;\n\t\t\t\tif (deferPath = vwInfo.path) {\n\t\t\t\t\t// We have a 'deferred path'\n\t\t\t\t\tj = deferPath.length - 1;\n\t\t\t\t\twhile (deferChar = deferPath.charAt(j--)) {\n\t\t\t\t\t\t// Use the \"+\" and\"-\" characters to navigate the path back to the original parent node where the deferred bindings ocurred\n\t\t\t\t\t\tif (deferChar === \"+\") {\n\t\t\t\t\t\t\tif (deferPath.charAt(j) === \"-\") {\n\t\t\t\t\t\t\t\tj--;\n\t\t\t\t\t\t\t\ttargetParent = targetParent.previousSibling;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\ttargetParent = targetParent.parentNode;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\ttargetParent = targetParent.lastChild;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Note: Can use previousSibling and lastChild, not previousElementSibling and lastElementChild,\n\t\t\t\t\t\t// since we have removed white space within elCnt. Hence support IE < 9\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (bindChar === \"^\") {\n\t\t\t\t\tif (tag = bindingStore[id = vwInfo.id]) {\n\t\t\t\t\t\t// The binding may have been deleted, for example in a different handler to an array collectionChange event\n\t\t\t\t\t\t// This is a tag binding\n\t\t\t\t\t\tdeep = targetParent && (!elem || elem.parentNode !== targetParent); // We are stepping back looking for the right targetParent,\n\t\t\t\t\t\t// or we are linking existing content and this element is in elCnt, not an immediate child of the targetParent.\n\t\t\t\t\t\tif (!elem || deep) {\n\t\t\t\t\t\t\ttag.parentElem = targetParent;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (vwInfo.elCnt && deep) {\n\t\t\t\t\t\t\t// With element only content, if there is no following element, or if the binding is deeper than the following element\n\t\t\t\t\t\t\t// then we need to set the open or close token as a deferred binding annotation on the parent\n\t\t\t\t\t\t\tsetDefer(targetParent, (vwInfo.open ? \"#\" : \"/\") + id + bindChar + (targetParent._df || \"\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// This is an open or close marker for a data-linked tag {^{...}}. Add it to bindEls.\n\t\t\t\t\t\taddedBindEls.push([deep ? null : elem, vwInfo]);\n\t\t\t\t\t}\n\t\t\t\t} else if (view = viewStore[id = vwInfo.id]) {\n\t\t\t\t\t// The view may have been deleted, for example in a different handler to an array collectionChange event\n\t\t\t\t\tif (!view.parentElem) {\n\t\t\t\t\t\t// If view is not already extended for JsViews, extend and initialize the view object created in JsRender, as a JsViews view\n\t\t\t\t\t\tview.parentElem = targetParent || elem && elem.parentNode || parentNode;\n\t\t\t\t\t\tview._.onRender = addBindingMarkers;\n\t\t\t\t\t\tview._.onArrayChange = arrayChangeHandler;\n\t\t\t\t\t\tsetArrayChangeLink(view);\n\t\t\t\t\t}\n\t\t\t\t\tparentElem = view.parentElem;\n\t\t\t\t\tif (vwInfo.open) {\n\t\t\t\t\t\t// This is an 'open view' node (preceding script marker node,\n\t\t\t\t\t\t// or if elCnt, the first element in the view, with a data-jsv annotation) for binding\n\t\t\t\t\t\tview._elCnt = vwInfo.elCnt;\n\t\t\t\t\t\tif (targetParent && !elem) {\n\t\t\t\t\t\t\tsetDefer(targetParent, \"#\" + id + bindChar + (targetParent._df || \"\"));\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// No targetParent, so there is a ._nxt elem (and this is processing tokens on the elem)\n\t\t\t\t\t\t\tif (!view._prv) {\n\t\t\t\t\t\t\t\tsetDefer(parentElem, removeSubStr(parentElem._df, \"#\" + id + bindChar));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tview._prv = elem;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// This is a 'close view' marker node for binding\n\t\t\t\t\t\tif (targetParent && (!elem || elem.parentNode !== targetParent)) {\n\t\t\t\t\t\t\t// There is no ._nxt so add token to _df. It is deferred.\n\t\t\t\t\t\t\tsetDefer(targetParent, \"/\" + id + bindChar + (targetParent._df || \"\"));\n\t\t\t\t\t\t\tview._nxt = undefined;\n\t\t\t\t\t\t} else if (elem) {\n\t\t\t\t\t\t\t// This view did not have a ._nxt, but has one now, so token may be in _df, and must be removed. (No longer deferred)\n\t\t\t\t\t\t\tif (!view._nxt) {\n\t\t\t\t\t\t\t\tsetDefer(parentElem, removeSubStr(parentElem._df, \"/\" + id + bindChar));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tview._nxt = elem;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (onAftCr = view.ctx && view.ctx[onAfterCreateStr] || onAfterCreate) {\n\t\t\t\t\t\t\tonAftCr.call(view.ctx.tag, view);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n//}\n\t\t\t\t}\n\t\t\t}\n\t\t\tlen = addedBindEls.length;\n\t\t\twhile (len--) {\n\t\t\t\t// These were added in reverse order to addedBindEls. We push them in BindEls in the correct order.\n\t\t\t\tbindEls.push(addedBindEls[len]);\n\t\t\t}\n\t\t}\n\t\treturn !vwInfos || vwInfos.elCnt;\n\t}\n\n\tfunction getViewInfos(vwInfos) {\n\t\t// Used by view.childTags() and tag.childTags()\n\t\t// Similar to processViewInfos in how it steps through bindings to find tags. Only finds data-linked tags.\n\t\tvar level, parentTag, named;\n\n\t\tif (vwInfos) {\n\t\t\tlen = vwInfos.length;\n\t\t\tfor (j = 0; j < len; j++) {\n\t\t\t\tvwInfo = vwInfos[j];\n\t\t\t\t// This is an open marker for a data-linked tag {^{...}}, within the content of the tag whose id is get.id. Add it to bindEls.\n\t\t\t\t// Note - if bindingStore[vwInfo.id]._is === \"tag\" then getViewInfos is being called too soon - during first linking pass\n\t\t\t\ttag = bindingStore[vwInfo.id];\n\t\t\t\tif (!tag._is && tag.linkCtx) {\n\t\t\t\t\tparentTag = tag = tag.linkCtx.tag;\n\t\t\t\t\tnamed = tag.tagName === tagName;\n\t\t\t\t\tif (!tag.flow || named) {\n\t\t\t\t\t\tif (!deep) {\n\t\t\t\t\t\t\tlevel = 1;\n\t\t\t\t\t\t\twhile (parentTag = parentTag.parent) {\n\t\t\t\t\t\t\t\tlevel++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttagDepth = tagDepth || level; // The level of the first tag encountered.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ((deep || level === tagDepth) && (!tagName || named)) {\n\t\t\t\t\t\t\t// Filter on top-level or tagName as appropriate\n\t\t\t\t\t\t\ttags.push(tag);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction dataLink() {\n\t\t//================ Data-link and fixup of data-jsv annotations ================\n\t\tvar j, index,\n\t\t\ttokens = \"\",\n\t\t\twrap = {},\n\t\t\tselector = linkViewsSel + (get ? \",[\" + deferAttr + \"]\" : \"\");\n\t\t\t// If a childTags() call, get = \",[\" + deferAttr + \"]\" - since we need to include elements that have a ._df expando for deferred tokens\n\n\t\telems = qsa ? parentNode.querySelectorAll(selector) : $(selector, parentNode).get();\n\t\tl = elems.length;\n\n\t\t// The prevNode will be in the returned query, since we called markPrevOrNextNode() on it.\n\t\t// But it may have contained nodes that satisfy the selector also.\n\t\tif (prevNode && prevNode.innerHTML) {\n\t\t\t// Find the last contained node of prevNode, to use as the prevNode - so we only link subsequent elems in the query\n\t\t\tprevNodes = qsa ? prevNode.querySelectorAll(selector) : $(selector, prevNode).get();\n\t\t\tprevNode = prevNodes.length ? prevNodes[prevNodes.length - 1] : prevNode;\n\t\t}\n\n\t\ttagDepth = 0;\n\t\tfor (i = 0; i < l; i++) {\n\t\t\telem = elems[i];\n\t\t\tif (prevNode && !found) {\n\t\t\t\t// If prevNode is set, not false, skip linking. If this element is the prevNode, set to false so subsequent elements will link.\n\t\t\t\tfound = (elem === prevNode);\n\t\t\t} else if (nextNode && elem === nextNode) {\n\t\t\t\t// If nextNode is set then break when we get to nextNode\n\t\t\t\tif (get) {\n\t\t\t\t\ttokens += markerNodeInfo(elem);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t} else if (elem.parentNode) {\n\t\t\t\t// elem has not been removed from DOM\n\t\t\t\tif (get) {\n\t\t\t\t\ttokens += markerNodeInfo(elem);\n\t\t\t\t\tif (elem._df) {\n\t\t\t\t\t\tj = i + 1;\n\t\t\t\t\t\twhile (j < l && elem.contains(elems[j])) {\n\t\t\t\t\t\t\tj++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Add deferred tokens after any tokens on descendant elements of this one\n\t\t\t\t\t\twrap[j-1] = elem._df;\n\t\t\t\t\t}\n\t\t\t\t\tif (wrap[i]) {\n\t\t\t\t\t\ttokens += wrap[i] || \"\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (isLink && (vwInfo = viewInfos(elem, undefined, rViewMarkers)) && (vwInfo = vwInfo[0])) {\n\t\t\t\t\t\t// If this is a link(trueOrString ...) call we will avoid re-binding to elems that are within template-rendered views\n\t\t\t\t\t\tskip = skip ? (vwInfo.id !== skip && skip) : vwInfo.open && vwInfo.id;\n\t\t\t\t\t}\n\t\t\t\t\tif (!skip && processInfos(viewInfos(elem))\n\t\t\t\t\t\t// If a link() call, processViewInfos() adds bindings to bindEls, and returns true for non-script nodes, for adding data-link bindings\n\t\t\t\t\t\t// If a childTags() call, getViewInfos returns array of tag bindings.\n\t\t\t\t\t\t\t&& elem.getAttribute($viewsLinkAttr)) {\n\t\t\t\t\t\tbindEls.push([elem]); // A data-linked element so add to bindEls too\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (get) {\n\t\t\ttokens += parentNode._df || \"\";\n\t\t\tif (index = tokens.indexOf(\"#\" + get.id) + 1) {\n\t\t\t\t// We are looking for view.childTags() or tag.childTags() - so start after the open token of the parent view or tag.\n\t\t\t\ttokens = tokens.slice(index + get.id.length);\n\t\t\t}\n\t\t\tindex = tokens.indexOf(\"/\" + get.id);\n\t\t\tif (index + 1) {\n\t\t\t\t// We are looking for view.childTags() or tag.childTags() - so don't look beyond the close token of the parent view or tag.\n\t\t\t\ttokens = tokens.slice(0, index);\n\t\t\t}\n\t\t\t// Call getViewInfos to add the found childTags to the tags array\n\t\t\tgetViewInfos(viewInfos(tokens, undefined, rOpenTagMarkers));\n\t\t}\n\n\t\tif (html === undefined && parentNode.getAttribute($viewsLinkAttr)) {\n\t\t\tbindEls.push([parentNode]); // Support data-linking top-level element directly (not within a data-linked container)\n\t\t}\n\n\t\t// Remove temporary marker script nodes they were added by markPrevOrNextNode\n\t\tunmarkPrevOrNextNode(prevNode, elCnt);\n\t\tunmarkPrevOrNextNode(nextNode, elCnt);\n\n\t\tif (get) {\n\t\t\treturn; // We have added childTags to the tags array, so we are done\n\t\t}\n\n\t\tif (elCnt && defer + ids) {\n\t\t\t// There are some views with elCnt, for which the open or close did not precede any HTML tag - so they have not been processed yet\n\t\t\telem = nextNode;\n\t\t\tif (defer) {\n\t\t\t\tif (nextNode) {\n\t\t\t\t\tprocessViewInfos(viewInfos(defer + \"+\", true), nextNode);\n\t\t\t\t} else {\n\t\t\t\t\tprocessViewInfos(viewInfos(defer, true), parentNode);\n\t\t\t\t}\n\t\t\t}\n\t\t\tprocessViewInfos(viewInfos(ids, true), parentNode);\n\t\t\t// If there were any tokens on nextNode which have now been associated with inserted HTML tags, remove them from nextNode\n\t\t\tif (nextNode) {\n\t\t\t\ttokens = nextNode.getAttribute(jsvAttrStr);\n\t\t\t\tif (l = tokens.indexOf(prevIds) + 1) {\n\t\t\t\t\ttokens = tokens.slice(l + prevIds.length - 1);\n\t\t\t\t}\n\t\t\t\tnextNode.setAttribute(jsvAttrStr, ids + tokens);\n\t\t\t}\n\t\t}\n\n// if (context.lazyLink) {\n// setTimeout(doLinking) (doLinking is function wrapper of following lines)\n// See Future tasks, and https://github.com/BorisMoore/jsviews/issues/368.\n// Could call context.lazyLink as callback, on async completion - or return promise.\n\t\t//================ Bind the data-linked elements and tags ================\n\t\tl = bindEls.length;\n\t\tfor (i = 0; i < l; i++) {\n\t\t\telem = bindEls[i];\n\t\t\tlinkInfo = elem[1];\n\t\t\telem = elem[0];\n\t\t\tif (linkInfo) {\n\t\t\t\tif (tag = bindingStore[linkInfo.id]) {\n\t\t\t\t\tif (linkCtx = tag.linkCtx) {\n\t\t\t\t\t\t// The tag may have been stored temporarily on the bindingStore - or may have already been replaced by the actual binding\n\t\t\t\t\t\ttag = linkCtx.tag;\n\t\t\t\t\t\ttag.linkCtx = linkCtx;\n\t\t\t\t\t}\n\t\t\t\t\tif (linkInfo.open) {\n\t\t\t\t\t\t// This is an 'open linked tag' binding annotation for a data-linked tag {^{...}}\n\t\t\t\t\t\tif (elem) {\n\t\t\t\t\t\t\ttag.parentElem = elem.parentNode;\n\t\t\t\t\t\t\ttag._prv = elem;\n\t\t\t\t\t\t}\n\t\t\t\t\t\ttag._elCnt = linkInfo.elCnt;\n\t\t\t\t\t\t// We data-link depth-first (\"on the way in\"), which is better for perf - and allows setting parent tags etc.\n\t\t\t\t\t\tview = tag.tagCtx.view;\n\n\t\t\t\t\t\t// Add data binding (unless skipped due to lateRender)\n\t\t\t\t\t\taddDataBinding(late, undefined, tag._prv, view, linkInfo.id);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttag._nxt = elem;\n\t\t\t\t\t\tif (tag._.unlinked && !tag._toLk) {\n\t\t\t\t\t\t\t// This is a 'close linked tag' binding annotation (and data-binding was not skipped due to lateRender)\n\t\t\t\t\t\t\ttagCtx = tag.tagCtx;\n\t\t\t\t\t\t\tview = tagCtx.view;\n\t\t\t\t\t\t\tcallAfterLink(tag);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Add data binding for a data-linked element (with data-link attribute)\n\t\t\t\taddDataBinding(late, elem.getAttribute($viewsLinkAttr), elem, $view(elem), undefined, isLink, outerData, context);\n\t\t\t}\n\t\t}\n//});\n\t}\n\t//==== /end of nested functions ====\n\n\tvar inTag, linkCtx, tag, i, l, j, len, elems, elem, view, vwInfo, linkInfo, prevNodes, token, prevView, nextView,\n\t\tnode, tags, deep, tagName, tagCtx, validate, tagDepth, depth, fragment, copiedNode, firstTag, parentTag,\n\t\tisVoid, wrapper, div, tokens, elCnt, prevElCnt, htmlTag, ids, prevIds, found, skip, isLink, get,\n\t\tself = this,\n\t\tthisId = self._.id + \"_\",\n\t\tdefer = \"\",\n\t\t// The marker ids for which no tag was encountered (empty views or final closing markers) which we carry over to container tag\n\t\tbindEls = [],\n\t\ttagStack = [],\n\t\tdeferStack = [],\n\t\tlate = [],\n\t\tonAfterCreate = changeHandler(self, onAfterCreateStr),\n\t\tprocessInfos = processViewInfos;\n\n\tif (refresh) {\n\t\tif (refresh.tmpl) {\n\t\t\t// refresh is the prevView, passed in from addViews()\n\t\t\tprevView = \"/\" + refresh._.id + \"_\";\n\t\t} else {\n\t\t\tisLink = refresh.lnk; // Top-level linking\n\t\t\tif (refresh.tag) {\n\t\t\t\tthisId = refresh.tag + \"^\";\n\t\t\t\trefresh = true;\n\t\t\t}\n\t\t\tif (get = refresh.get) {\n\t\t\t\tprocessInfos = getViewInfos;\n\t\t\t\ttags = get.tags;\n\t\t\t\tdeep = get.deep;\n\t\t\t\ttagName = get.name;\n\t\t\t}\n\t\t}\n\t\trefresh = refresh === true;\n\t}\n\n\tparentNode = parentNode\n\t\t? (\"\" + parentNode === parentNode\n\t\t\t? $(parentNode)[0] // It is a string, so treat as selector\n\t\t\t: parentNode.jquery\n\t\t\t\t? parentNode[0] // A jQuery object - take first element.\n\t\t\t\t: parentNode)\n\t\t: (self.parentElem // view.link()\n\t\t\t|| document.body); // link(null, data) to link the whole document\n\n\tvalidate = !$subSettingsAdvanced.noValidate && parentNode.contentEditable !== TRUE;\n\tparentTag = parentNode.tagName.toLowerCase();\n\telCnt = !!elContent[parentTag];\n\n\tprevNode = prevNode && markPrevOrNextNode(prevNode, elCnt);\n\tnextNode = nextNode && markPrevOrNextNode(nextNode, elCnt) || null;\n\n\tif (html != undefined) {\n\t\t//================ Insert html into DOM using documentFragments (and wrapping HTML appropriately). ================\n\t\t// Also convert markers to DOM annotations, based on content model.\n\t\t// Corresponds to nextNode ? $(nextNode).before(html) : $(parentNode).html(html);\n\t\t// but allows insertion to wrap correctly even with inserted script nodes. jQuery version will fail e.g. under tbody or select.\n\t\t// This version should also be slightly faster\n\t\tdiv = document.createElement(\"div\");\n\t\twrapper = div;\n\t\tprevIds = ids = \"\";\n\t\thtmlTag = parentNode.namespaceURI === \"http://www.w3.org/2000/svg\" ? \"svg_ns\" : (firstTag = rFirstElem.exec(html)) && firstTag[1] || \"\";\n\t\tif (elCnt) {\n\t\t\t// Now look for following view, and find its tokens, or if not found, get the parentNode._df tokens\n\t\t\tnode = nextNode;\n\t\t\twhile (node && !(nextView = viewInfos(node))) {\n\t\t\t\tnode = node.nextSibling;\n\t\t\t}\n\t\t\tif (tokens = nextView ? nextView._tkns : parentNode._df) {\n\t\t\t\ttoken = prevView || \"\";\n\t\t\t\tif (refresh || !prevView) {\n\t\t\t\t\ttoken += \"#\" + thisId;\n\t\t\t\t}\n\t\t\t\tj = tokens.indexOf(token);\n\t\t\t\tif (j + 1) {\n\t\t\t\t\tj += token.length;\n\t\t\t\t\t// Transfer the initial tokens to inserted nodes, by setting them as the ids variable, picked up in convertMarkers\n\t\t\t\t\tprevIds = ids = tokens.slice(0, j);\n\t\t\t\t\ttokens = tokens.slice(j);\n\t\t\t\t\tif (nextView) {\n\t\t\t\t\t\tnode.setAttribute(jsvAttrStr, tokens);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsetDefer(parentNode, tokens);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t//================ Convert the markers to DOM annotations, based on content model. ================\n//\t\t\toldElCnt = elCnt;\n\t\tisVoid = undefined;\n\t\thtml = (\"\" + html).replace(rConvertMarkers, convertMarkers);\n//\t\t\tif (!!oldElCnt !== !!elCnt) {\n//\t\t\t\terror(\"Parse: \" + html); // Parse error. Content not well-formed?\n//\t\t\t}\n\t\tif (validate && tagStack.length) {\n\t\t\tsyntaxError(\"Mismatched '<\" + parentTag + \"...>' in:\\n\" + html); // Unmatched tag\n\t\t}\n\t\tif (validateOnly) {\n\t\t\treturn;\n\t\t}\n\t\t// Append wrapper element to doc fragment\n\t\tsafeFragment.appendChild(div);\n\n\t\t// Go to html and back, then peel off extra wrappers\n\t\t// Corresponds to jQuery $(nextNode).before(html) or $(parentNode).html(html);\n\t\t// but supports svg elements, and other features missing from jQuery version (and this version should also be slightly faster)\n\t\thtmlTag = wrapMap[htmlTag] || wrapMap.div;\n\t\tdepth = htmlTag[0];\n\t\twrapper.innerHTML = htmlTag[1] + html + htmlTag[2];\n\t\twhile (depth--) {\n\t\t\twrapper = wrapper.lastChild;\n\t\t}\n\t\tsafeFragment.removeChild(div);\n\t\tfragment = document.createDocumentFragment();\n\t\twhile (copiedNode = wrapper.firstChild) {\n\t\t\tfragment.appendChild(copiedNode);\n\t\t}\n\t\t// Insert into the DOM\n\t\tparentNode.insertBefore(fragment, nextNode);\n\t}\n\tdataLink();\n\n\treturn late;\n}\n\nfunction addDataBinding(late, linkMarkup, node, currentView, boundTagId, isLink, data, context) {\n\t// Add data binding for data-linked elements or {^{...}} data-linked tags\n\tvar tmpl, tokens, attr, convertBack, tagExpr, linkFn, linkCtx, tag, rTagIndex, hasElse, lastIndex,\n\t\tlinkExpressions = [];\n\n\tif (boundTagId) {\n\t\t// boundTagId is a string for {^{...}} data-linked tag. So only one linkTag in linkMarkup\n\t\t// data and context arguments are undefined\n\t\ttag = bindingStore[boundTagId];\n\t\ttag = tag.linkCtx ? tag.linkCtx.tag : tag;\n\n\t\tlinkCtx = tag.linkCtx || {\n\t\t\ttype: \"inline\",\n\t\t\tdata: currentView.data, // source\n\t\t\telem: tag._elCnt ? tag.parentElem : node, // target\n\t\t\tview: currentView,\n\t\t\tctx: currentView.ctx,\n\t\t\tattr: HTML, // Script marker nodes are associated with {^{ and always target HTML.\n\t\t\tfn: tag._.bnd,\n\t\t\ttag: tag,\n\t\t\t// Pass the boundTagId in the linkCtx, so that it can be picked up in observeAndBind\n\t\t\t_bndId: boundTagId\n\t\t};\n\t\ttag.linkCtx = linkCtx;\n\t\tbindDataLinkTarget(linkCtx, late);\n\t\ttag._toLk = linkCtx._bndId; // If data binding happened, remove _toLk flag from tag\n\t} else if (linkMarkup && node) {\n\t\t// Data-linked element\n\n\t\t// If isLink then this is a top-level linking: .link(expression, target, data, ....) or\n\t\t// .link(true, target, data, ....) scenario - and data and context are passed in separately from the view\n\t\tdata = isLink ? data : currentView.data;\n\n\t\t// Compiled linkFn expressions could be stored in the tmpl.links array of the template\n\t\t// TODO - consider also caching globally so that if {{:foo}} or data-link=\"foo\" occurs in different places,\n\t\t// the compiled template for this is cached and only compiled once...\n\t\t//links = currentView.links || currentView.tmpl.links;\n\n\t\ttmpl = currentView.tmpl;\n\n//\t\t\tif (!(linkTags = links[linkMarkup])) {\n\t\t// This is the first time this view template has been linked, so we compile the data-link expressions, and store them on the template.\n\n\t\tlinkMarkup = normalizeLinkTag(linkMarkup, defaultAttr(node));\n\t\tlastIndex = rTagDatalink.lastIndex = 0;\n\t\twhile (tokens = rTagDatalink.exec(linkMarkup)) { // TODO require } to be followed by whitespace or $, and remove the \\}(!\\}) option.\n\t\t\tlinkExpressions.push(tokens);\n\t\t\tlastIndex = rTagDatalink.lastIndex;\n\t\t}\n\t\tif (lastIndex < linkMarkup.length) {\n\t\t\tsyntaxError(linkMarkup);\n\t\t}\n\t\twhile (tokens = linkExpressions.shift()) {\n\t\t\t// Iterate over the data-link expressions, for different target attrs,\n\t\t\t// e.g. ~description(firstName, lastName)}\"\n\t\t\t// tokens: [all, attr, bindOnly, tagExpr, tagName, converter, colon, html, comment, code, params]\n\t\t\trTagIndex = rTagDatalink.lastIndex;\n\t\t\tattr = tokens[1];\n\t\t\ttagExpr = tokens[3];\n\t\t\twhile (linkExpressions[0] && linkExpressions[0][4] === \"else\") { // If this is {sometag...} and is followed by an {else...} add to tagExpr\n\t\t\t\ttagExpr += delimCloseChar1 + delimOpenChar0 + linkExpressions.shift()[3];\n\t\t\t\thasElse = true;\n\t\t\t}\n\t\t\tif (hasElse) { // If an {else} has been added, need also to add closing {{/sometag}}\n\t\t\t\ttagExpr += delimCloseChar1 + delimOpenChar0 + delimOpenChar1 + \"/\" + tokens[4] + delimCloseChar0;\n\t\t\t}\n\t\t\tlinkCtx = {\n\t\t\t\ttype: isLink ? \"top\" : \"link\",\n\t\t\t\tdata: data, // source\n\t\t\t\telem: node, // target\n\t\t\t\tview: currentView,\n\t\t\t\tctx: context,\n\t\t\t\tattr: attr,\n\t\t\t\tisLk: isLink, // top-level linking?\n\t\t\t\t_toLk : 1, // Flag to data-link on initial data-link call rendering call\n\t\t\t\t_noUpd : tokens[2] // Flag for data-link=\"^{...}\" so on initial data-link call will bind, but not render)\n\t\t\t};\n\n\t\t\tconvertBack = undefined;\n\t\t\tif (tokens[6]) {\n\t\t\t\tconvertBack = tokens[10] || undefined;\n\t\t\t\tlinkCtx.convert = tokens[5] || \"\";\n\t\t\t\tif (convertBack !== undefined && defaultAttr(node)) {\n\t\t\t\t\tif (attr) {\n\t\t\t\t\t\tsyntaxError(tagExpr + \"- Remove target: \" + attr);\n\t\t\t\t\t}\n\t\t\t\t\t// Default target, so allow 2 way binding\n\t\t\t\t\tlinkCtx.convertBack = convertBack = convertBack.slice(1);\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Compile the linkFn expression which evaluates and binds a data-link expression\n\t\t\t// TODO - optimize for the case of simple data path with no conversion, helpers, etc.:\n\t\t\t// i.e. data-link=\"a.b.c\". Avoid creating new instances of Function every time. Can use a default function for all of these...\n\n\t\t\tlinkCtx.expr = attr + tagExpr;\n\t\t\tlinkFn = tmpl.links[tagExpr];\n\t\t\tif (!linkFn) {\n\t\t\t\ttmpl.links[tagExpr] = linkFn = $sub.tmplFn(tagExpr, tmpl, true, convertBack, hasElse);\n\t\t\t}\n\t\t\tlinkCtx.fn = linkFn;\n\t\t\tbindDataLinkTarget(linkCtx, late);\n\t\t\t// We store rTagIndex in local scope, since this addDataBinding method can sometimes be called recursively,\n\t\t\t// and each is using the same rTagDatalink instance.\n\t\t\trTagDatalink.lastIndex = rTagIndex;\n\t\t}\n//\t\t}\n\t}\n}\n\nfunction bindDataLinkTarget(linkCtx, late) {\n\t// Add data link bindings for a link expression in data-link attribute markup\n\tfunction handler(ev, eventArgs) {\n\t\tonDataLinkedTagChange.call(linkCtx, ev, eventArgs);\n\t\t// If the link expression uses a custom tag, the onDataLinkedTagChange call will call renderTag, which will set tagCtx on linkCtx\n\t}\n\tif (linkCtx.isLk) {\n\t\t// Top-level linking: .link(expressionOrTrue, data, context) - so we need to create a view for the linking, with the data and ctx\n\t\t// which may be different than the current context of the target. Note that this view is not a standard data-linked view, so it will\n\t\t// be disposed only when its parent view is disposed.\n\t\tlinkCtx.view = new $sub.View(\n\t\t\t$sub.extendCtx(linkCtx.ctx, linkCtx.view.ctx),\n\t\t\t\"link\", linkCtx.view, linkCtx.data, linkCtx.expr, undefined, addBindingMarkers);\n\t}\n\tlinkCtx._ctxCb = $sub._gccb(linkCtx.view); // getContextCallback: _ctxCb, for filtering/appending to dependency paths: function(path, object) { return [(object|path)*]}\n\tlinkCtx._hdl = handler;\n\t// handler._ctx = linkCtx; Could pass linkCtx for use in a depends = function() {} call, so depends is different for different linkCtx's\n\tif (linkCtx.fn._lr) {\n\t\tlinkCtx._toLk = 1;\n\t\tlate.push(linkCtx); // lateRender - defer rendering and linking (sync but after first linking pass)\n\t} else {\n\t\thandler(true);\n\t}\n}\n\n//=====================\n// Data-linking helpers\n//=====================\n\nfunction removeSubStr(str, substr) {\n\tvar k;\n\treturn str\n\t\t? (k = str.indexOf(substr),\n\t\t\t(k + 1\n\t\t\t\t? str.slice(0, k) + str.slice(k + substr.length)\n\t\t\t\t: str))\n\t\t: \"\";\n}\n\nfunction markerNodeInfo(node) {\n\treturn node &&\n\t\t(\"\" + node === node\n\t\t\t? node\n\t\t\t: node.tagName === SCRIPT\n\t\t\t\t? node.type.slice(3)\n\t\t\t\t: node.nodeType === 1 && node.getAttribute(jsvAttrStr) || \"\");\n}\n\nfunction viewInfos(node, isVal, rBinding) {\n\t// Test whether node is a script marker node, and if so, return metadata\n\tfunction getInfos(all, open, close, id, ch, elPath) {\n\t\tinfos.push({\n\t\t\telCnt: elCnt,\n\t\t\tid: id,\n\t\t\tch: ch,\n\t\t\topen: open,\n\t\t\tclose: close,\n\t\t\tpath: elPath,\n\t\t\ttoken: all\n\t\t});\n\t}\n\tvar elCnt, tokens,\n\t\tinfos = [];\n\tif (tokens = isVal ? node : markerNodeInfo(node)) {\n\t\telCnt = infos.elCnt = node.tagName !== SCRIPT;\n\t\telCnt = tokens.charAt(0) === \"@\" || elCnt;\n\t\tinfos._tkns = tokens;\n\t\t// rMarkerTokens = /(?:(#)|(\\/))(\\d+)([_^])([-+@\\d]+)?/g;\n\t\ttokens.replace(rBinding || rMarkerTokens, getInfos);\n\t\treturn infos;\n\t}\n}\n\nfunction unmarkPrevOrNextNode(node, elCnt) {\n\tif (node) {\n\t\tif (node.type === \"jsv\") {\n\t\t\tnode.parentNode.removeChild(node);\n\t\t} else if (elCnt && node.getAttribute($viewsLinkAttr) === \"\") {\n\t\t\tnode.removeAttribute($viewsLinkAttr);\n\t\t}\n\t}\n}\n\nfunction markPrevOrNextNode(node, elCnt) {\n\tvar marker = node;\n\twhile (elCnt && marker && marker.nodeType !== 1) {\n\t\tmarker = marker.previousSibling;\n\t}\n\tif (marker) {\n\t\tif (marker.nodeType !== 1) {\n\t\t\t// For text nodes, we will add a script node before\n\t\t\tmarker = document.createElement(SCRIPT);\n\t\t\tmarker.type = \"jsv\";\n\t\t\tnode.parentNode.insertBefore(marker, node);\n\t\t} else if (!markerNodeInfo(marker) && !marker.getAttribute($viewsLinkAttr)) {\n\t\t\t// For element nodes, we will add a data-link attribute (unless there is already one)\n\t\t\t// so that this node gets included in the node linking process.\n\t\t\tmarker.setAttribute($viewsLinkAttr, \"\");\n\t\t}\n\t}\n\treturn marker;\n}\n\nfunction normalizeLinkTag(linkMarkup, twoway) {\n\tlinkMarkup = $.trim(linkMarkup).replace(rEscapeQuotes, \"\\\\$&\");\n\treturn linkMarkup.slice(-1) !== delimCloseChar0\n\t// If simplified syntax is used: data-link=\"expression\", convert to data-link=\"{:expression}\",\n\t// or for inputs, data-link=\"{:expression:}\" for (default) two-way binding\n\t\t? linkMarkup = delimOpenChar1 + \":\" + linkMarkup + (twoway ? \":\" : \"\") + delimCloseChar0\n\t\t: linkMarkup;\n}\n\n//===========================\n// Methods for views and tags\n//===========================\n\nfunction callAfterLink(tag, ev, eventArgs) {\n\tfunction copyFromTagCtxToTag() {\n\t\tlinkedElems = tagCtx.linkedElems || tag.linkedElems || tag.linkedElem && [tag.linkedElem];\n\t\tif (linkedElems) {\n\t\t\ttag.linkedElems = tagCtx.linkedElems = linkedElems;\n\t\t\ttag.linkedElem = linkedElems[0] = tag.linkedElem || linkedElems[0];\n\t\t}\n\t\tif (linkedElem = tagCtx.mainElem || tag.mainElem) {\n\t\t\ttagCtx.mainElem = tag.mainElem = linkedElem;\n\t\t}\n\t\tif (linkedElem = tagCtx.displayElem || tag.displayElem) {\n\t\t\ttagCtx.displayElem = tag.displayElem = linkedElem;\n\t\t}\n\t}\n\n\tvar linkedElems, linkedElements, linkedElem, l, m, $linkCtxElem, linkCtxElem, tagCtxElse, props, val, oldVal,\n\t\ttagCtx = tag.tagCtx,\n\t\ttagCtxs = tag.tagCtxs,\n\t\ttagCtxslength = tagCtxs && tagCtxs.length,\n\t\tlinkCtx = tag.linkCtx,\n\t\tbindTo = tag.bindTo || {};\n\n\tif (tag._.unlinked) { // First call to onAfterLink, or first call after onUpdate: updateContent. Initialize and call onBind and set properties\n\t\t$linkCtxElem = $(linkCtx.elem);\n\t\tif (tag.linkedElement || tag.mainElement || tag.displayElement) {\n\t\t\tif (linkedElements = tag.linkedElement) {\n\t\t\t\t// tag.linkedElement: - selector, or array of selectors, for identifying linked elements in template/rendered content.\n\t\t\t\t// (But for tag bindings on data-linked elements, defaults to data-linked element)\n\t\t\t\ttag.linkedElem = undefined;\n\t\t\t\tl = linkedElements.length;\n\t\t\t\twhile (l--) {\n\t\t\t\t\tif (linkedElements[l]) {\n\t\t\t\t\t\tm = tagCtxslength;\n\t\t\t\t\t\twhile (m--) {\n\t\t\t\t\t\t\tlinkCtxElem = !m && !tag.inline && $linkCtxElem.filter(linkedElements[l]);\n\t\t\t\t\t\t\ttagCtxElse = tagCtxs[m];\n\t\t\t\t\t\t\tlinkedElems = tagCtxElse.linkedElems = tagCtxElse.linkedElems || new Array(l);\n\t\t\t\t\t\t\tlinkedElem = linkCtxElem[0] ? linkCtxElem : tagCtxElse.contents(true, linkedElements[l]);\n\t\t\t\t\t\t\tif (linkedElem[0] && linkedElem[0].type !== RADIO) {\n\t\t\t\t\t\t\t\tlinkedElems[l] = linkedElem.eq(0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (linkedElements = tag.mainElement) {\n\t\t\t\t// tag.mainElement: - selector for identifying mainElem in template/rendered content\n\t\t\t\t// (But for tag bindings on data-linked elements, defaults to data-linked element)\n\t\t\t\tm = tagCtxslength;\n\t\t\t\twhile (m--) {\n\t\t\t\t\tlinkCtxElem = !m && !tag.inline && $linkCtxElem.filter(linkedElements);\n\t\t\t\t\ttagCtxElse = tagCtxs[m];\n\t\t\t\t\tlinkedElem = linkCtxElem[0] ? linkCtxElem : tagCtxElse.contents(true, linkedElements).eq(0);\n\t\t\t\t\tif (linkedElem[0]) {\n\t\t\t\t\t\ttagCtxElse.mainElem = linkedElem;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (linkedElements = tag.displayElement) {\n\t\t\t\t// tag.mainElement: - selector for identifying mainElem in template/rendered content\n\t\t\t\t// (But for tag bindings on data-linked elements, defaults to data-linked element)\n\t\t\t\tm = tagCtxslength;\n\t\t\t\twhile (m--) {\n\t\t\t\t\tlinkCtxElem = !m && !tag.inline && $linkCtxElem.filter(linkedElements);\n\t\t\t\t\ttagCtxElse = tagCtxs[m];\n\t\t\t\t\tlinkedElem = linkCtxElem[0] ? linkCtxElem : tagCtxElse.contents(true, linkedElements).eq(0);\n\t\t\t\t\tif (linkedElem[0]) {\n\t\t\t\t\t\ttagCtxElse.displayElem = linkedElem;\n\t\t\t\t\t\tif (!m) {\n\t\t\t\t\t\t\ttag.displayElem = linkedElem;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tcopyFromTagCtxToTag();\n\t\t}\n\t\tif (tag.onBind) {\n\t\t\ttag.onBind(tagCtx, linkCtx, tag.ctx, ev, eventArgs);\n\t\t\tcopyFromTagCtxToTag();\n\t\t}\n\t}\n\n\tm = tagCtxslength;\n\twhile (m--) {\n\t\ttagCtxElse = tagCtxs[m];\n\t\tprops = tagCtxElse.props;\n\n\t\tif (linkedElem = tagCtxElse.mainElem || !tag.mainElement && tagCtxElse.linkedElems && tagCtxElse.linkedElems[0]) {\n\t\t\t// linkedElem is the mainElem (defaulting to linkedElem)\n\t\t\tif (linkedElem[0] && props.id && !linkedElem[0].id) {\n\t\t\t\tlinkedElem[0].id = props.id;\n\t\t\t}\n\t\t\tif (tag.setSize) {\n\t\t\t\tif (val = !bindTo.height && props.height || tag.height) {\n\t\t\t\t\tlinkedElem.height(val);\n\t\t\t\t}\n\t\t\t\tif (val = !bindTo.width && props.width || tag.width) {\n\t\t\t\t\tlinkedElem.width(val);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (val = (linkedElem = tagCtxElse.displayElem || linkedElem) && (!bindTo[\"class\"] && props[\"class\"] || tag.className)) {\n\t\t\t// This code supports dynamic binding to class - where it adds the class if absent, and removes/adds if a previous value is present\n\t\t\toldVal = linkedElem[0]._jsvCl;\n\t\t\tif (val !== oldVal) {\n\t\t\t\tif (linkedElem.hasClass(oldVal)) {\n\t\t\t\t\tlinkedElem.removeClass(oldVal);\n\t\t\t\t}\n\t\t\t\tlinkedElem.addClass(val);\n\t\t\t\tlinkedElem[0]._jsvCl = val;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (tag.onAfterLink) {\n\t\ttag.onAfterLink(tagCtx, linkCtx, tag.ctx, ev, eventArgs);\n\t\tcopyFromTagCtxToTag();\n\t}\n\n\tif (!tag.flow && !tag._.chg) {\n\t\tif (tag.inline && tag._.unlinked && (tag.linkedElems || bindTo)) {\n\t\t\tdefineBindToDataTargets(bindingStore[tag._tgId], tag);\n\t\t}\n\t\ttag.setValue();\n\t}\n\ttag._.unlinked = undefined;\n}\n\nfunction asyncOnElemChange(ev) {\n\tvar which = ev.which;\n\tif (!(which > 15 && which < 21 || which > 32 && which < 41 || which > 111 && which < 131 || which === 27 || which === 144)) {\n\t\t// Shift, Ctrl, Alt, Pause, Caplock, Page up/down End, Home, Left, Up, Right, Down, Function keys, Escape, Numlock\n\t\tsetTimeout(function() {\n\t\t\tonElemChange(ev);\n\t\t});\n\t}\n}\n\nfunction bindTriggerEvent($elem, trig, onoff) {\n\t// Bind keydown, or other trigger - (rather than use the default change event bubbled to activeBody)\n\tif (trig === true && useInput) {\n\t\t$elem[onoff](\"input.jsv\", onElemChange); // For HTML5 browser with \"oninput\" support - for mouse editing of text\n\t} else {\n\t\ttrig = \"\" + trig === trig ? trig : \"keydown.jsv\"; // Set trigger to (true || truey non-string (e.g. 1) || 'keydown')\n\t\t$elem[onoff](trig, trig.indexOf(\"keydown\") >= 0 ? asyncOnElemChange : onElemChange); // Get 'keydown' with async\n\t}\n}\n\nfunction bindLinkedElChange(tag, linkedElem) {\n\t// Two-way binding for linkedElem - in the case of input, textarea or contentEditable elements.\n\t// Trigger setting may have changed. Unbind previous trigger binding (if any) and bind new one.\n\n\tvar $linkedElem, newTrig,\n\t\toldTrig = linkedElem._jsvTr || false;\n\n\tif (tag) {\n\t\tnewTrig = tag.tagCtx.props.trigger;\n\t\tif (newTrig === undefined) {\n\t\t\tnewTrig = tag.trigger;\n\t\t}\n\t}\n\tif (newTrig === undefined) {\n\t\tnewTrig = $subSettings.trigger;\n\t}\n\t// Trigger is noop except for text box, textarea, contenteditable...\n\tnewTrig = newTrig && (linkedElem.tagName === \"INPUT\" && linkedElem.type !== CHECKBOX && linkedElem.type !== RADIO\n\t\t|| linkedElem.type === \"textarea\" || linkedElem.contentEditable === TRUE) && newTrig || false;\n\n\tif (oldTrig !== newTrig) {\n\t\t$linkedElem = $(linkedElem);\n\t\tbindTriggerEvent($linkedElem, oldTrig, \"off\");\n\t\tbindTriggerEvent($linkedElem, linkedElem._jsvTr = newTrig, \"on\");\n\t}\n}\n\nfunction defineBindToDataTargets(binding, tag, cvtBk) {\n\t// Two-way binding.\n\t// We set the binding.to[1] to be the cvtBack, and binding.to[0] to be either the path to the target, or [object, path] where the target is the\n\t// path on the provided object. So for a computed path with an object call: a.b.getObject().d.e, we set to[0] to be [exprOb, \"d.e\"], and\n\t// we bind to the path on the returned object, exprOb.ob, as target. Otherwise our target is the first path, paths[0], which we will convert\n\t// with contextCb() for paths like ~a.b.c or #x.y.z\n\n\tvar pathIndex, path, lastPath, bindtoOb, to, bindTo, paths, k, l, obsCtxPrm, linkedCtxParam, contextCb, targetPaths, bindTos,\n\t\ttagElse = 1,\n\t\ttos = [],\n\t\tlinkCtx = binding.linkCtx,\n\t\tsource = linkCtx.data,\n\t\ttargetPathsElses = linkCtx.fn.paths;\n\n\tif (binding && !binding.to) {\n\t\tif (tag) {\n\t\t\ttag.convertBack = tag.convertBack || cvtBk;\n\t\t\tbindTo = tag.bindTo;\n\t\t\ttagElse = tag.tagCtxs ? tag.tagCtxs.length : 1;\n\t\t}\n\t\twhile (tagElse--) {\n\t\t\tbindTos = [];\n\t\t\tif (targetPaths = targetPathsElses[tagElse]) {\n\t\t\t\tbindTo = targetPaths._jsvto ? [\"_jsvto\"] : (bindTo || [0]);\n\t\t\t\tk = bindTo.length;\n\t\t\t\twhile (k--) {\n\t\t\t\t\tpath = \"\";\n\t\t\t\t\tcontextCb = linkCtx._ctxCb;\n\t\t\t\t\tpaths = targetPaths[bindTo[k]];\n\t\t\t\t\tif (pathIndex = paths && paths.length) {\n\t\t\t\t\t\tlastPath = paths[pathIndex - 1];\n\t\t\t\t\t\tif (lastPath._cpfn) { // Computed property exprOb\n\n\t\t\t\t\t\t\tbindtoOb = lastPath;\n\t\t\t\t\t\t\twhile (lastPath.sb && lastPath.sb._cpfn) {\n\t\t\t\t\t\t\t\tpath = lastPath = lastPath.sb;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tpath = lastPath.sb || path && path.path;\n\t\t\t\t\t\t\tlastPath = path ? path.slice(1) : bindtoOb.path;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tto = path\n\t\t\t\t\t\t\t? [bindtoOb, // 'exprOb' for this expression and view-binding. So bindtoOb.ob is current object returned by expression.\n\t\t\t\t\t\t\t\t\tlastPath]\n\t\t\t\t\t\t\t: resolveDataTargetPath(lastPath, source, contextCb); // Get 'to' for target path: lastPath\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Contextual parameter ~foo with no external binding - has ctx.foo = [{_ocp: xxx}] and binds to ctx.foo._ocp\n\t\t\t\t\t\tlinkedCtxParam = tag.linkedCtxParam;\n\t\t\t\t\t\tto = [];\n\t\t\t\t\t\tif (linkedCtxParam && linkedCtxParam[k]) {\n\t\t\t\t\t\t\t// This is a tag binding, with linked tag contextual parameters\n\t\t\t\t\t\t\tto = [tag.tagCtxs[tagElse].ctx[linkedCtxParam[k]][0], _ocp];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ((obsCtxPrm = to._cxp) && obsCtxPrm.tag && lastPath.indexOf(\".\")<0) {\n\t\t\t\t\t\t// This is a binding for a tag contextual parameter (e.g. within a tag block content\n\t\t\t\t\t\tto = obsCtxPrm;\n\t\t\t\t\t}\n\t\t\t\t\tbindTos.unshift(to);\n\t\t\t\t}\n\t\t\t}\n\t\t\ttos.unshift(bindTos);\n\t\t}\n\t\tbinding.to = tos;\n\t}\n}\n\nfunction resolveDataTargetPath(targetPath, source, contextCb) {\n\t// Iteratively process targetPath, resolving ~a.b.c paths for contextual parameters\n\tvar path, bindtoOb, to, l, obsCtxPrm, view, topCp, data;\n\n\twhile (targetPath && targetPath !== _ocp && (to = contextCb(path = targetPath.split(\"^\").join(\".\"), source)) && (l = to.length)) {\n\t\tif (obsCtxPrm = to[0]._cxp) { // Two-way binding to a contextual parameter reference, ~foo (declared as ~foo=expr on a parent tag)\n\t\t\ttopCp = topCp || obsCtxPrm;\n\t\t\tview = to[0][0];\n\t\t\tif (_ocp in view) {\n\t\t\t\tdata = view;\n\t\t\t\tview = view._vw;\n\t\t\t} else {\n\t\t\t\tdata = view.data;\n\t\t\t}\n\t\t\ttopCp.path = targetPath = to[0][1];\n\t\t\tto = [topCp.data = data, targetPath];\n\t\t\t\tcontextCb = $sub._gccb(view);\n\t\t\t\tif (targetPath._cpfn) { // computed property\n\t\t\t\t\tbindtoOb = targetPath;\n\t\t\t\t\tbindtoOb.data = to[0];\n\t\t\t\t\tbindtoOb._cpCtx = contextCb;\n\t\t\t\t\twhile (targetPath.sb && targetPath.sb._cpfn) {\n\t\t\t\t\t\tpath = targetPath = targetPath.sb;\n\t\t\t\t\t}\n\t\t\t\t\tpath = targetPath.sb || path && path.path;\n\t\t\t\t\ttargetPath = path ? path.slice(1) : bindtoOb.path;\n\t\t\t\t\tto = [\n\t\t\t\t\t\tbindtoOb, // 'exprOb' for this expression and view-binding. So bindtoOb.ob is current object returned by expression.\n\t\t\t\t\t\ttargetPath\n\t\t\t\t\t];\n\t\t\t\t} else if (obsCtxPrm.tag && obsCtxPrm.path === _ocp) {\n\t\t\t\t\tto = obsCtxPrm;\n\t\t\t\t}\n\t\t} else { // Two-way binding to a helper - e.g. ~address.street, or computed, e.g. ~fullName(), or view property e.g. #data.foo\n\t\t\tto = l>2\n\t\t\t\t? [to[l-3], to[l-2]] // With path: [object, path]\n\t\t\t\t: [to[l-2]]; // No path, (e.g. [function] for computed with setter)\n\t\t}\n\t\tsource = to[0];\n\t\ttargetPath = to[1];\n\t}\n\tto = to || [source, path];\n\tto._cxp = topCp;\n\treturn to;\n}\n\nfunction mergeCtxs(tag, newCtxs, replace) { // Merge updated tagCtxs into tag.tagCtxs\n\tvar tagCtx, newTagCtx,\n\t\tview = tag.tagCtx.view,\n\t\ttagCtxs = tag.tagCtxs || [tag.tagCtx],\n\t\tl = tagCtxs.length,\n\t\trefresh = !newCtxs;\n\n\tnewCtxs = newCtxs || tag._.bnd.call(view.tmpl, (tag.linkCtx || view).data, view, $sub);\n\n\tif (replace) {\n\t\t// Replace previous tagCtxs by new ones, rather than merging\n\t\ttagCtxs = tag.tagCtxs = newCtxs;\n\t\ttag.tagCtx = tagCtxs[0];\n\t\taddLinkMethods(tag);\n\t} else {\n\t\twhile (l--) {\n\t\t\ttagCtx = tagCtxs[l];\n\t\t\tnewTagCtx = newCtxs[l];\n\t\t\t$observable(tagCtx.props).setProperty(newTagCtx.props);\n\t\t\t$extend(tagCtx.ctx, newTagCtx.ctx); // We don't support propagating ctx variables, ~foo, observably, to nested views. So extend, not setProperty...\n\t\t\ttagCtx.args = newTagCtx.args;\n\t\t\tif (refresh) {\n\t\t\t\ttagCtx.tmpl = newTagCtx.tmpl;\n\t\t\t}\n\t\t}\n\t}\n\t$sub._ths(tag, tagCtxs[0]); // tagHandlersFromProps\n\treturn tagCtxs;\n}\n\n//=========\n// Disposal\n//=========\n\nfunction clean(elems) {\n\t// Remove data-link bindings, or contained views\n\tvar l, elem, bindings,\n\t\telemArray = [],\n\t\tlen = elems.length,\n\t\ti = len;\n\twhile (i--) {\n\t\t// Copy into an array, so that deletion of nodes from DOM will not cause our 'i' counter to get shifted\n\t\t// (Note: This seems as fast or faster than elemArray = [].slice.call(elems); ...)\n\t\telemArray.push(elems[i]);\n\t}\n\ti = len;\n\twhile (i--) {\n\t\telem = elemArray[i];\n\t\tif (elem.parentNode) {\n\t\t\t// Has not already been removed from the DOM\n\t\t\tif (bindings = elem._jsvBnd) {\n\t\t\t\t// Get propertyChange bindings for this element\n\t\t\t\t// This may be an element with data-link, or the opening script marker node for a data-linked tag {^{...}}\n\t\t\t\t// bindings is a string with the syntax: \"(&bindingId)*\"\n\t\t\t\tbindings = bindings.slice(1).split(\"&\");\n\t\t\t\telem._jsvBnd = \"\";\n\t\t\t\tl = bindings.length;\n\t\t\t\twhile (l--) {\n\t\t\t\t\t// Remove associated bindings\n\t\t\t\t\tremoveViewBinding(bindings[l], elem._jsvLkEl, elem); // unbind bindings with this bindingId on this view\n\t\t\t\t}\n\t\t\t}\n\t\t\tdisposeTokens(markerNodeInfo(elem) + (elem._df || \"\"), elem);\n\t\t}\n\t}\n}\n\nfunction removeViewBinding(bindId, linkedElemTag, elem) {\n\t// Unbind\n\tvar objId, linkCtx, tag, object, obsId, tagCtxs, l, map, linkedElem, trigger, view, tagCtx, linkedElems, allLinkedElems,\n\t\tbinding = bindingStore[bindId];\n\n\tif (linkedElemTag) {\n\t\telem._jsvLkEl = undefined;\n\t} else if (binding && (!elem || elem === binding.elem)) { // Test that elem is actually binding.elem, since cloned elements can have inappropriate markerNode info\n\t\tdelete bindingStore[bindId]; // Delete already, so call to onDispose handler below cannot trigger recursive deletion (through recursive call to jQuery cleanData)\n\t\tfor (objId in binding.bnd) {\n\t\t\tobject = binding.bnd[objId];\n\t\t\tobsId = binding.cbId;\n\t\t\tif ($isArray(object)) {\n\t\t\t\t$([object]).off(arrayChangeStr + obsId).off(propertyChangeStr + obsId); // There may be either or both of arrayChange and propertyChange\n\t\t\t} else {\n\t\t\t\t$(object).off(propertyChangeStr + obsId);\n\t\t\t}\n\t\t\tdelete binding.bnd[objId];\n\t\t}\n\n\t\tif (linkCtx = binding.linkCtx) {\n\t\t\tif (tag = linkCtx.tag) {\n\t\t\t\tif (tagCtxs = tag.tagCtxs) {\n\t\t\t\t\tl = tagCtxs.length;\n\t\t\t\t\twhile (l--) {\n\t\t\t\t\t\ttagCtx = tagCtxs[l];\n\t\t\t\t\t\tif (map = tagCtx.map) {\n\t\t\t\t\t\t\tmap.unmap(); //unobserve\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Copy linkedElems in case tag.linkedElem or tag.linkedElems are undefined in onUnbind\n\t\t\t\t\t\tif (linkedElems = tagCtx.linkedElems) {\n\t\t\t\t\t\t\tallLinkedElems = (allLinkedElems || []).concat(linkedElems);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (tag.onUnbind) {\n\t\t\t\t\ttag.onUnbind(tag.tagCtx, linkCtx, tag.ctx, true);\n\t\t\t\t}\n\t\t\t\tif (tag.onDispose) {\n\t\t\t\t\ttag.onDispose();\n\t\t\t\t}\n\n\t\t\t\tif (!tag._elCnt) {\n\t\t\t\t\tif (tag._prv) {\n\t\t\t\t\t\ttag._prv.parentNode.removeChild(tag._prv);\n\t\t\t\t\t}\n\t\t\t\t\tif (tag._nxt) {\n\t\t\t\t\t\ttag._nxt.parentNode.removeChild(tag._nxt);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tlinkedElems = allLinkedElems || [$(linkCtx.elem)];\n\t\t\tl = linkedElems.length;\n\t\t\twhile (l--) {\n\t\t\t\tlinkedElem = linkedElems[l];\n\t\t\t\tif (trigger = linkedElem && linkedElem[0] && linkedElem[0]._jsvTr) {\n\t\t\t\t\tbindTriggerEvent(linkedElem, trigger, \"off\");\n\t\t\t\t\tlinkedElem[0]._jsvTr = undefined;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tview = linkCtx.view;\n\t\t\tif (view.type === \"link\") {\n\t\t\t\tview.parent.removeViews(view._.key, undefined, true); // A \"link\" view is associated with the binding, so should be disposed with binding.\n\t\t\t} else {\n\t\t\t\tdelete view._.bnds[bindId];\n\t\t\t}\n\t\t}\n\t\tdelete cbBindingsStore[binding.cbId];\n\t}\n}\n\nfunction $unlink(to) {\n\tif (to) {\n\t\tto = to.jquery ? to : $(to);\n\t\tto.each(function() {\n\t\t\tvar innerView;\n\t\t\t//TODO fix this for better perf. Rather that calling inner view multiple times which does querySelectorAll each time, consider a single querySelectorAll\n\t\t\t// or simply call view.removeViews() on the top-level views under the target 'to' node, then clean(...)\n\t\t\twhile ((innerView = $view(this, true)) && innerView.parent) {\n\t\t\t\tinnerView.parent.removeViews(innerView._.key, undefined, true);\n\t\t\t}\n\t\t\tclean(this.getElementsByTagName(\"*\"));\n\t\t});\n\t\tclean(to);\n\t} else {\n\t\t// Call to $.unlink() is equivalent to $.unlink(true, \"body\")\n\t\tif (activeBody) {\n\t\t\t$(activeBody)\n\t\t\t\t.off(elementChangeStr, onElemChange)\n\t\t\t\t.off('blur.jsv', '[contenteditable]', onElemChange);\n\t\t\tactiveBody = undefined;\n\t\t}\n\t\ttopView.removeViews();\n\t\tclean(document.body.getElementsByTagName(\"*\"));\n\t}\n}\n\n//========\n// Helpers\n//========\n\nfunction inputAttrib(elem) {\n\treturn elem.type === CHECKBOX ? elem[CHECKED] : elem.value;\n}\n\nfunction changeHandler(view, name, tag) {\n\t// Get onBeforeChange, onAfterChange, onAfterCreate handler - if there is one;\n\treturn tag && tag[name] || view.ctx[name] && view.ctxPrm(name) || $views.helpers[name];\n}\n\n//========================== Initialize ==========================\n\n//=====================\n// JsRender integration\n//=====================\n\naddLinkMethods($sub.View.prototype); // Modify the View prototype to include link methods\n\n$sub.onStore.template = function(name, item, parentTmpl) {\n\tif (item === null) {\n\t\tdelete $.link[name];\n\t\tdelete $.render[name];\n\t} else {\n\t\titem.link = tmplLink;\n\n\t\tif (name && !parentTmpl && name !== \"jsvTmpl\") {\n\t\t\t$.render[name] = item;\n\t\t\t$.link[name] = function() {\n\t\t\t\treturn tmplLink.apply(item, arguments);\n\t\t\t};\n\t\t}\n\t}\n};\n\n$sub.viewInfos = viewInfos; // Expose viewInfos() as public helper method\n\n// Define JsViews version of delimiters(), and initialize\n($viewsSettings.delimiters = function() {\n\t// Run delimiters initialization in context of jsrender.js\n\tvar ret = oldJsvDelimiters.apply(0, arguments);\n\n\tif (oldJsvDelimiters !== $viewsDelimiters) {\n\t\t// If JsRender was loaded before JsViews, then need also to initialize and set globals in that JsRender instance\n\t\tret = $viewsDelimiters.apply(0, arguments);\n\t}\n\n\t// Data-linking must use new delimiters\n\trTagDatalink = new RegExp(\"(?:^|\\\\s*)([\\\\w-]*)(\\\\\" + linkChar + \")?(\\\\\" + delimOpenChar1 + $sub.rTag + \"(:\\\\w*)?\\\\\" + delimCloseChar0 + \")\", \"g\");\n\treturn ret;\n})(); // jshint ignore:line\n\n$sub.addSetting(\"trigger\");\n\n//====================================\n// Additional members for linked views\n//====================================\n\nfunction transferViewTokens(prevNode, nextNode, parentElem, id, viewOrTagChar, refresh) {\n\t// Transfer tokens on prevNode of viewToRemove/viewToRefresh to nextNode or parentElem._df\n\t// view marker tokens: #m_...VIEW.../m_\n\t// tag marker tokens: #m^...TAG..../m^\n\n\tvar i, l, vwInfos, vwInfo, viewOrTag, viewId, tokens,\n\t\tprecedingLength = 0,\n\t\temptyView = prevNode === nextNode;\n\n\tif (prevNode) {\n\t\t// prevNode is either the first node in the viewOrTag, or has been replaced by the vwInfos tokens string\n\t\tvwInfos = viewInfos(prevNode) || [];\n\t\tfor (i = 0, l = vwInfos.length; i < l; i++) {\n\t\t\t// Step through views or tags on the prevNode\n\t\t\tvwInfo = vwInfos[i];\n\t\t\tviewId = vwInfo.id;\n\t\t\tif (viewId === id && vwInfo.ch === viewOrTagChar) {\n\t\t\t\tif (refresh) {\n\t\t\t\t\t// This is viewOrTagToRefresh, this is the last viewOrTag to process...\n\t\t\t\t\tl = 0;\n\t\t\t\t} else {\n\t\t\t\t\t// This is viewOrTagToRemove, so we are done...\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!emptyView) {\n\t\t\t\tviewOrTag = vwInfo.ch === \"_\"\n\t\t\t\t\t? viewStore[viewId] // A view: \"#m_\" or \"/m_\"\n\t\t\t\t\t: bindingStore[viewId].linkCtx.tag; // A tag \"#m^\" or \"/m^\"\n\t\t\t\tif (vwInfo.open) { // A \"#m_\" or \"#m^\" token\n\t\t\t\t\tviewOrTag._prv = nextNode;\n\t\t\t\t} else if (vwInfo.close) { // A \"/m_\" or \"/m^\" token\n\t\t\t\t\tviewOrTag._nxt = nextNode;\n\t\t\t\t}\n\t\t\t}\n\t\t\tprecedingLength += viewId.length + 2;\n\t\t}\n\n\t\tif (precedingLength) {\n\t\t\tprevNode.setAttribute(jsvAttrStr, prevNode.getAttribute(jsvAttrStr).slice(precedingLength));\n\t\t}\n\t\ttokens = nextNode ? nextNode.getAttribute(jsvAttrStr) : parentElem._df;\n\t\tif (l = tokens.indexOf(\"/\" + id + viewOrTagChar) + 1) {\n\t\t\ttokens = vwInfos._tkns.slice(0, precedingLength) + tokens.slice(l + (refresh ? -1 : id.length + 1));\n\t\t}\n\t\tif (tokens) {\n\t\t\tif (nextNode) {\n\t\t\t\t// If viewOrTagToRemove was an empty viewOrTag, we will remove both #n and /n\n\t\t\t\t// (and any intervening tokens) from the nextNode (=== prevNode)\n\t\t\t\t// If viewOrTagToRemove was not empty, we will take tokens preceding #n from prevNode,\n\t\t\t\t// and concatenate with tokens following /n on nextNode\n\t\t\t\tnextNode.setAttribute(jsvAttrStr, tokens);\n\t\t\t} else {\n\t\t\t\tsetDefer(parentElem, tokens);\n\t\t\t}\n\t\t}\n\t} else {\n\t\t// !prevNode, so there may be a deferred nodes token on the parentElem. Remove it.\n\t\tsetDefer(parentElem, removeSubStr(parentElem._df, \"#\" + id + viewOrTagChar));\n\t\tif (!refresh && !nextNode) {\n\t\t\t// If this viewOrTag is being removed, and there was no .nxt, remove closing token from deferred tokens\n\t\t\tsetDefer(parentElem, removeSubStr(parentElem._df, \"/\" + id + viewOrTagChar));\n\t\t}\n\t}\n}\n\nfunction disposeTokens(tokens, elem) {\n\tvar i, l, vwItem, vwInfos;\n\tif (vwInfos = viewInfos(tokens, true, rOpenMarkers)) {\n\t\tfor (i = 0, l = vwInfos.length; i < l; i++) {\n\t\t\tvwItem = vwInfos[i];\n\t\t\tif (vwItem.ch === \"_\") {\n\t\t\t\tif ((vwItem = viewStore[vwItem.id]) && vwItem.type && (!elem || vwItem._prv === elem || vwItem.parentElem === elem )) {\n\t\t\t\t\t// If this is the _prv (prevNode) for a view, remove the view\n\t\t\t\t\t// - unless view.type is undefined, in which case it is already being removed\n\t\t\t\t\t// (or unless the elem is not related - e.g. a cloned element which 'accidentally' picked up the data-jsv atttribute of the ._df expando)\n\t\t\t\t\tvwItem.parent.removeViews(vwItem._.key, undefined, true);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tremoveViewBinding(vwItem.id, undefined, elem); // unbind bindings with this bindingId on this view\n\t\t\t}\n\t\t}\n\t}\n}\n\n//============================================\n// Add link methods to data-linked view or tag\n//============================================\n\nfunction updateValue(val, index, tagElse, bindId, ev) {\n// Observably update a data value targeted by bindTo\n// Called when linkedElem changes: called as updateValue(val, index, tagElse, bindId, ev) - this: undefined\n// Called directly as tag.updateValue(val, index, tagElse) - this: tag\n\tvar values = [];\n\tif (this && this._tgId) {\n\t\tbindId = this;\n\t}\n\tvalues[index||0] = val;\n\tupdateValues(values, tagElse, bindId, ev);\n\treturn this;\n}\n\nfunction setValues() {\n\tvar args = arguments,\n\t\tm = args.length;\n\n\tif (!m) {\n\t\targs = this.tag.cvtArgs(true, this.index); // setValues() with no arguments calls setValue with boundArgs values\n\t\tm = args.length;\n\t}\n\twhile (m--) {\n\t\tthis.tag.setValue(args[m], m, this.index);\n\t}\n}\n\nfunction addLinkMethods(tagOrView) { // tagOrView is View prototype or tag instance\n\n\tvar l, m, tagCtx, boundProps, bindTo, key, theTag, theView;\n\n\ttagOrView.contents = function(deep, select) {\n\t\t// For a view, a tag or a tagCtx, return jQuery object with the content nodes,\n\t\tif (deep !== !!deep) {\n\t\t\t// deep not boolean, so this is contents(selector)\n\t\t\tselect = deep;\n\t\t\tdeep = undefined;\n\t\t}\n\t\tvar filtered,\n\t\t\tnodes = $(this.nodes());\n\t\tif (nodes[0]) {\n\t\t\tfiltered = select ? nodes.filter(select) : nodes;\n\t\t\tnodes = deep && select ? filtered.add(nodes.find(select)) : filtered;\n\t\t}\n\t\treturn nodes;\n\t};\n\n\ttagOrView.nodes = function(withMarkers, prevNode, nextNode) {\n\t\t// For a view, a tag or a tagCtx, return top-level nodes\n\t\t// Do not return any script marker nodes, unless withMarkers is true\n\t\t// Optionally limit range, by passing in prevNode or nextNode parameters\n\n\t\tvar node,\n\t\t\tself = this.contentView || this, // If tagCtx, use tagCtx.contentView\n\t\t\telCnt = self._elCnt,\n\t\t\tprevIsFirstNode = !prevNode && elCnt,\n\t\t\tnodes = [];\n\n\t\tif (!self.args) { // If tagCtx with no content (so no contentView) self is tagCtx: return empty [];\n\t\t\tprevNode = prevNode || self._prv;\n\t\t\tnextNode = nextNode || self._nxt;\n\n\t\t\tnode = prevIsFirstNode\n\t\t\t\t? (prevNode === self._nxt\n\t\t\t\t\t? self.parentElem.lastSibling\n\t\t\t\t\t: prevNode)\n\t\t\t\t: (self.inline === false\n\t\t\t\t\t? prevNode || self.linkCtx.elem.firstChild\n\t\t\t\t\t: prevNode && prevNode.nextSibling);\n\n\t\t\twhile (node && (!nextNode || node !== nextNode)) {\n\t\t\t\tif (withMarkers || elCnt || node.tagName !== SCRIPT) {\n\t\t\t\t\t// All the top-level nodes in the view\n\t\t\t\t\t// (except script marker nodes, unless withMarkers = true)\n\t\t\t\t\t// (Note: If a script marker node, viewInfo.elCnt undefined)\n\t\t\t\t\tnodes.push(node);\n\t\t\t\t}\n\t\t\t\tnode = node.nextSibling;\n\t\t\t}\n\t\t}\n\t\treturn nodes;\n\t};\n\n\ttagOrView.childTags = function(deep, tagName) {\n\t\t// For a view, a tagor a tagCtx, return child tags - at any depth, or as immediate children only.\n\t\tif (deep !== !!deep) {\n\t\t\t// deep not boolean, so this is childTags(tagName) - which looks for top-level tags of given tagName\n\t\t\ttagName = deep;\n\t\t\tdeep = undefined;\n\t\t}\n\n\t\tvar self = this.contentView || this, // If tagCtx, use tagCtx.contentView\n\t\t\tview = self.link ? self : self.tagCtx.view, // This may be a view or a tag. If a tag, get the view from tag.tagCtx.view\n\t\t\tprevNode = self._prv,\n\t\t\telCnt = self._elCnt,\n\t\t\ttags = [];\n\n\t\tif (!self.args) { // If tagCtx with no content (so no contentView) self is tagCtx: return empty [];\n\t\t\tview.link(\n\t\t\t\tundefined,\n\t\t\t\tself.parentElem,\n\t\t\t\telCnt ? prevNode && prevNode.previousSibling : prevNode,\n\t\t\t\tself._nxt,\n\t\t\t\tundefined,\n\t\t\t\t{get:{\n\t\t\t\t\ttags: tags,\n\t\t\t\t\tdeep: deep,\n\t\t\t\t\tname: tagName,\n\t\t\t\t\tid: self.link ? self._.id + \"_\" : self._tgId + \"^\"\n\t\t\t\t}}\n\t\t\t);\n\t\t}\n\t\treturn tags;\n\t};\n\n\tif (tagOrView._is === \"tag\") {\n\t\t//=======================\n\t\t// This is a TAG instance\n\t\t//=======================\n\n\t\ttheTag = tagOrView;\n\n\t\tm = theTag.tagCtxs.length;\n\t\twhile (m--) {\n\t\t\ttagCtx = theTag.tagCtxs[m];\n\n\t\t\ttagCtx.setValues = setValues;\n\t\t\ttagCtx.cvtArgs = convertArgs;\n\t\t\ttagCtx.bndArgs = convertBoundArgs;\n\t\t\ttagCtx.contents = tagOrView.contents;\n\t\t\ttagCtx.childTags = tagOrView.childTags;\n\t\t\ttagCtx.nodes = tagOrView.nodes;\n\t\t}\n\n\t\tboundProps = theTag.boundProps = theTag.boundProps || [];\n\t\tif (bindTo = theTag.linkTo ? [\"linkTo\"] : theTag.bindTo) {\n\t\t\tl = bindTo.length;\n\t\t\twhile (l--) {\n\t\t\t\tkey = bindTo[l];\n\t\t\t\tif (key + \"\" === key) {\n\t\t\t\t\tbindTo[key] = 1;\n\t\t\t\t\tif ($.inArray(key, boundProps) < 0) {\n\t\t\t\t\t\tboundProps.push(key); // Add any 'bindTo' props to boundProps array. (So two-way binding works without writing ^foo=expression)\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\ttheTag.setValue = $sub._gm(theTag.constructor.prototype.setValue, function(val, index, tagElse) {\n\t\t\tif (!arguments.length) { // tag.setValue() calls setValue(val, index) for each parameter in bindTo array\n\t\t\t\ttheTag.setValues(); // = theTag.bndArgs()\n\t\t\t\treturn theTag;\n\t\t\t}\n\t\t\tvar linkedElem, linkedEl, linkedTag,\n\t\t\t\tlinkedCtxParam = theTag.linkedCtxParam,\n\t\t\t\ttagCtx = theTag.tagCtxs[tagElse || 0],\n\t\t\t\tprops = tagCtx.props,\n\t\t\t\tlinkCtx = theTag.linkCtx,\n\t\t\t\tlinkedElems = tagCtx.linkedElems || theTag.linkedElem && [theTag.linkedElem];\n\n\t\t\tif (val !== undefined) {\n\t\t\t\ttheTag.base.call(theTag , val, index, tagElse);\n\t\t\t} else if (theTag.getValue && (val = theTag.getValue(tagElse)) && val !== undefined) {\n\t\t\t\t// If bound args are not initialized, and getValue is defined, use getValue to initialize\n\t\t\t\tif (theTag.bindTo.length > 1) {\n\t\t\t\t\tval = val[index]; // getVal returns value if tag.bndArgs() (and bindTo) length is 1, or array of values if bindTo.length > 1\n\t\t\t\t}\n\t\t\t\tif (linkedCtxParam && linkedCtxParam[index]) {\n\t\t\t\t\t// Values of tag contextual param were already intialized (during rendering) so need to observably update to values from tag.getValue()\n\t\t\t\t\t$.observable(tagCtx.ctx[linkedCtxParam[index]][0]).setProperty(_ocp, val);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((linkedElem = linkedElems && linkedElems[index]) && linkedElem[0]) {\n\t\t\t\tl = linkedElem.length;\n\t\t\t\twhile (l--) {\n\t\t\t\t\tlinkedEl = linkedElem[l];\n\t\t\t\t\tif (theTag._.unlinked) {\n\t\t\t\t\t\tlinkedTag = linkedEl._jsvLkEl;\n\t\t\t\t\t\tif (!linkedTag || linkedTag !== theTag) {\n\t\t\t\t\t\t\tif (linkedTag) {\n\t\t\t\t\t\t\t\tval = linkedTag.cvtArgs(true, tagElse)[index]; // Need to use converter of linked tag\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// For data-linked tags, identify the linkedEl with the tag, for \"to\" binding\n\t\t\t\t\t\t\t// (For data-linked elements, if not yet bound, we identify later when the linkCtx.elem is bound)\n\t\t\t\t\t\t\tlinkedEl._jsvLkEl = theTag;\n\t\t\t\t\t\t\tlinkedEl._jsvInd = index;\n\t\t\t\t\t\t\tlinkedEl._jsvElse = tagElse;\n\t\t\t\t\t\t\tbindLinkedElChange(theTag, linkedEl);\n\t\t\t\t\t\t\tlinkedEl._jsvBnd = \"&\" + theTag._tgId + \"+\"; // Add a \"+\" for cloned binding - so removing\n\t\t\t\t\t\t\t// elems with cloned bindings will not remove the 'parent' binding from the bindingStore.\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (val !== undefined && !linkedEl._jsvChg && linkCtx._val !== val) {\n\t\t\t\t\t\tif (linkedEl.value !== undefined) {\n\t\t\t\t\t\t\tif (linkedEl.type === CHECKBOX) {\n\t\t\t\t\t\t\t\tlinkedEl[CHECKED] = val && val !== \"false\";\n\t\t\t\t\t\t\t} else if (linkedEl.type === RADIO) {\n\t\t\t\t\t\t\t\tlinkedEl[CHECKED] = (linkedEl.value === val);\n\t\t\t\t\t\t\t} else if ($isArray(val)) {\n\t\t\t\t\t\t\t\tlinkedEl.value = val; // Don't use jQuery since it replaces array by mapped clone\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$(linkedEl).val(val); // Use jQuery for attrHooks - can't just set value (on select, for example)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else if (linkedEl.contentEditable === TRUE) {\n\t\t\t\t\t\t\tlinkedEl.innerHTML = val;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (props.name) {\n\t\t\t\t\t\tlinkedEl.name = linkedEl.name || props.name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn theTag;\n\t\t});\n\n\t\ttheTag.updateValue = updateValue;\n\n\t\ttheTag.updateValues = function() {\n\t\t\treturn updateValues(arguments, undefined, this);\n\t\t};\n\n\t\ttheTag.setValues = function() {\n\t\t\tvar m = arguments.length ? 1 : theTag.tagCtxs.length;\n\t\t\twhile (m--) {\n\t\t\t\tsetValues.apply(theTag.tagCtxs[m], arguments);\n\t\t\t}\n\t\t};\n\n\t\ttheTag.refresh = function(sourceValue) {\n\t\t\tvar attr,\n\t\t\t\tlinkCtx = theTag.linkCtx,\n\t\t\t\tview = theTag.tagCtx.view;\n\n\t\t\tif (theTag.onUnbind) {\n\t\t\t\ttheTag.onUnbind(theTag.tagCtx, linkCtx, theTag.ctx);\n\t\t\t}\n\t\t\tattr = theTag.inline ? HTML : (linkCtx.attr || defaultAttr(theTag.parentElem, true));\n\t\t\tsourceValue = $sub._tag(theTag, view, view.tmpl, mergeCtxs(theTag), true); // Get rendered HTML for tag, based on refreshed tagCtxs\n\t\t\tupdateContent(sourceValue, linkCtx, attr, theTag);\n\t\t\tcallAfterLink(theTag);\n\t\t\treturn theTag;\n\t\t};\n\n\t\ttheTag.domChange = function() { // domChange notification support\n\t\t\tvar elem = this.parentElem,\n\t\t\t\thasListener = $.hasData(elem) && $._data(elem).events,\n\t\t\t\tdomChangeNotification = \"jsv-domchange\";\n\n\t\t\tif (hasListener && hasListener[domChangeNotification]) {\n\t\t\t\t// Only trigger handler if there is a handler listening for this event. (Note using triggerHandler - so no event bubbling.)\n\t\t\t\t$(elem).triggerHandler(domChangeNotification, arguments);\n\t\t\t}\n\t\t};\n\n\t\t//====================================\n\t\t// End of added link methods for TAG\n\t\t//====================================\n\t} else {\n\t\t//=========================\n\t\t// This is a VIEW prototype\n\t\t//=========================\n\n\t\ttheView = tagOrView;\n\n\t\t// Note: a linked view will also, after linking have nodes[], _prv (prevNode), _nxt (nextNode) ...\n\t\ttheView.addViews = function(index, dataItems) {\n\t\t\t// if view is not an array view, do nothing\n\t\t\tvar i, viewsCount,\n\t\t\t\tview = this,\n\t\t\t\titemsCount = dataItems.length,\n\t\t\t\tviews = view.views;\n\n\t\t\tif (!view._.useKey && itemsCount) {\n\t\t\t\t// view is of type \"array\"\n\t\t\t\tviewsCount = views.length + itemsCount;\n\n\t\t\t\tif (viewsCount === view.data.length // If views not already synced to array (e.g. triggered by array.length propertyChange - jsviews/issues/301)\n\t\t\t\t\t\t&& renderAndLink(view, index, view.tmpl, views, dataItems, view.ctx) !== false) {\n\t\t\t\t\tif (!view._.srt) { // Not part of a 'sort' on refresh\n\t\t\t\t\t\tview.fixIndex(index + itemsCount);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\ttheView.removeViews = function(index, itemsCount, keepNodes, isMove) {\n\t\t\t// view.removeViews() removes all the child views\n\t\t\t// view.removeViews(index) removes the child view with specified index or key\n\t\t\t// view.removeViews(index, count) removes the specified nummber of child views, starting with the specified index\n\t\t\tfunction removeView(index) {\n\t\t\t\tvar id, bindId, parentElem, prevNode, nextNode, nodesToRemove,\n\t\t\t\t\tviewToRemove = views[index];\n\n\t\t\t\tif (viewToRemove && viewToRemove.link) {\n\t\t\t\t\tid = viewToRemove._.id;\n\t\t\t\t\tif (!keepNodes) {\n\t\t\t\t\t\t// Remove the HTML nodes from the DOM, unless they have already been removed, including nodes of child views\n\t\t\t\t\t\tnodesToRemove = viewToRemove.nodes();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Remove child views, without removing nodes\n\t\t\t\t\tviewToRemove.removeViews(undefined, undefined, true);\n\n\t\t\t\t\tviewToRemove.type = undefined; // Set type to undefined: used as a flag that this view is being removed\n\t\t\t\t\tprevNode = viewToRemove._prv;\n\t\t\t\t\tnextNode = viewToRemove._nxt;\n\t\t\t\t\tparentElem = viewToRemove.parentElem;\n\t\t\t\t\t// If prevNode and nextNode are the same, the view is empty\n\t\t\t\t\tif (!keepNodes) {\n\t\t\t\t\t\t// Remove the HTML nodes from the DOM, unless they have already been removed, including nodes of child views\n\t\t\t\t\t\tif (viewToRemove._elCnt) {\n\t\t\t\t\t\t\t// if keepNodes is false (and transferring of tokens has not already been done at a higher level)\n\t\t\t\t\t\t\t// then transfer tokens from prevNode which is being removed, to nextNode.\n\t\t\t\t\t\t\ttransferViewTokens(prevNode, nextNode, parentElem, id, \"_\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$(nodesToRemove).remove();\n\t\t\t\t\t}\n\t\t\t\t\tif (!viewToRemove._elCnt) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tprevNode.parentNode.removeChild(prevNode); // (prevNode.parentNode is parentElem, except if jQuery Mobile or similar has inserted an intermediate wrapper\n\t\t\t\t\t\t\tnextNode.parentNode.removeChild(nextNode);\n\t\t\t\t\t\t} catch (e) {}\n\t\t\t\t\t}\n\t\t\t\t\tsetArrayChangeLink(viewToRemove);\n\t\t\t\t\tfor (bindId in viewToRemove._.bnds) {\n\t\t\t\t\t\tremoveViewBinding(bindId);\n\t\t\t\t\t}\n\t\t\t\t\tdelete viewStore[id];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tvar current, childView, viewsCount,\n\t\t\t\tview = this,\n\t\t\t\tisArray = !view._.useKey,\n\t\t\t\tviews = view.views;\n\n\t\t\tif (isArray) {\n\t\t\t\tviewsCount = views.length;\n\t\t\t}\n\t\t\tif (index === undefined) {\n\t\t\t\t// Remove all child views\n\t\t\t\tif (isArray) {\n\t\t\t\t\t// views and data are arrays\n\t\t\t\t\tcurrent = viewsCount;\n\t\t\t\t\twhile (current--) {\n\t\t\t\t\t\tremoveView(current);\n\t\t\t\t\t}\n\t\t\t\t\tview.views = [];\n\t\t\t\t} else {\n\t\t\t\t\t// views and data are objects\n\t\t\t\t\tfor (childView in views) {\n\t\t\t\t\t\t// Remove by key\n\t\t\t\t\t\tremoveView(childView);\n\t\t\t\t\t}\n\t\t\t\t\tview.views = {};\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (itemsCount === undefined) {\n\t\t\t\t\tif (isArray) {\n\t\t\t\t\t\t// The parentView is data array view.\n\t\t\t\t\t\t// Set itemsCount to 1, to remove this item\n\t\t\t\t\t\titemsCount = 1;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Remove child view with key 'index'\n\t\t\t\t\t\tremoveView(index);\n\t\t\t\t\t\tdelete views[index];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (isArray && itemsCount\n\t\t\t\t\t&& (isMove || viewsCount - itemsCount === view.data.length)) { // If views not already synced to array (e.g. triggered by array.length propertyChange - jsviews/issues/301)\n\t\t\t\t\tcurrent = index + itemsCount;\n\t\t\t\t\t// Remove indexed items (parentView is data array view);\n\t\t\t\t\twhile (current-- > index) {\n\t\t\t\t\t\tremoveView(current);\n\t\t\t\t\t}\n\t\t\t\t\tviews.splice(index, itemsCount);\n\t\t\t\t\tif (!view._.srt) {\n\t\t\t\t\t\tview.fixIndex(index);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\ttheView.moveViews = function(oldIndex, index, itemsCount) {\n\t\t\tfunction parts(itemView, str) {\n\t\t\t\treturn RegExp(\"^(.*)(\" + (str ? \"\\\\/\" : \"#\") + itemView._.id + \"_.*)$\").exec(str || itemView._prv.getAttribute(jsvAttrStr));\n\t\t\t}\n\t\t\tfunction setPrv(itemView, tokens) {\n\t\t\t\titemView._prv.setAttribute(jsvAttrStr, tokens);\n\t\t\t}\n\t\t\tvar nodes, childView, nxtView, insertBefore, viewId,\n\t\t\t\tview = this,\n\t\t\t\tselfNxt = view._nxt,\n\t\t\t\tviews = view.views,\n\t\t\t\tbackwards = index < oldIndex,\n\t\t\t\tfirstChange = backwards ? index : oldIndex,\n\t\t\t\tlastChange = backwards ? oldIndex : index,\n\t\t\t\ti = index,\n\t\t\t\tmovedNodes = [],\n\n\t\t\t\tviewsToMove = views.splice(oldIndex, itemsCount); // remove\n\n\t\t\tif (index > views.length) {\n\t\t\t\tindex = views.length;\n\t\t\t}\n\t\t\tviews.splice.apply(views, [index, 0].concat(viewsToMove)); //re-insert\n\n\t\t\titemsCount = viewsToMove.length;\n\t\t\tinsertBefore = index + itemsCount;\n\t\t\tlastChange += itemsCount;\n\n\t\t\tfor (i; i < insertBefore; i++) {\n\t\t\t\tchildView = views[i];\n\t\t\t\tnodes = childView.nodes(true);\n\t\t\t\tmovedNodes = view._elCnt ? movedNodes.concat(nodes) : movedNodes.concat(childView._prv, nodes, childView._nxt);\n\t\t\t}\n\t\t\tmovedNodes = $(movedNodes);\n\n\t\t\tif (insertBefore < views.length) {\n\t\t\t\tmovedNodes.insertBefore(views[insertBefore]._prv);\n\t\t\t} else if (selfNxt) {\n\t\t\t\tmovedNodes.insertBefore(selfNxt);\n\t\t\t} else {\n\t\t\t\tmovedNodes.appendTo(view.parentElem);\n\t\t\t}\n\n\t\t\tif (view._elCnt) {\n\t\t\t\tvar afterParts,\n\t\t\t\t\tendChange = backwards ? firstChange + itemsCount : lastChange - itemsCount,\n\t\t\t\t\tbeforeView = views[firstChange-1],\n\t\t\t\t\tstartView = views[firstChange],\n\t\t\t\t\tendView = views[endChange],\n\t\t\t\t\tafterView = views[lastChange],\n\t\t\t\t\tstartParts = parts(startView),\n\t\t\t\t\tendParts = parts(endView);\n\n\t\t\t\tsetPrv(startView, endParts[1] + startParts[2]);\n\t\t\t\tif (afterView) {\n\t\t\t\t\tafterParts = parts(afterView);\n\t\t\t\t\tsetPrv(afterView, startParts[1] + afterParts[2]);\n\t\t\t\t} else {\n\t\t\t\t\tif (selfNxt) {\n\t\t\t\t\t\tafterParts = parts(view, selfNxt.getAttribute(jsvAttrStr));\n\t\t\t\t\t\tselfNxt.setAttribute(jsvAttrStr, startParts[1] + afterParts[2]);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tafterParts = parts(view, view.parentElem._df);\n\t\t\t\t\t\tsetDefer(view.parentElem, startParts[1] + afterParts[2]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsetPrv(endView, afterParts[1] + endParts[2]);\n\t\t\t\tif (beforeView) {\n\t\t\t\t\tbeforeView._nxt = startView._prv;\n\t\t\t\t} else {\n\t\t\t\t\tview._prv = startView._prv;\n\t\t\t\t}\n\t\t\t\tviews[endChange-1]._nxt = endView._prv;\n\t\t\t\tviews[lastChange-1]._nxt = afterView ? afterView._prv : selfNxt;\n\t\t\t}\n\t\t\tview.fixIndex(firstChange);\n\t\t};\n\n\t\ttheView.refresh = function() {\n\t\t\tvar view = this,\n\t\t\t\tparent = view.parent;\n\n\t\t\tif (parent) {\n\t\t\t\trenderAndLink(view, view.index, view.tmpl, parent.views, view.data, undefined, true);\n\t\t\t\tsetArrayChangeLink(view);\n\t\t\t}\n\t\t};\n\n\t\ttheView.fixIndex = function(fromIndex) {\n\t\t\t// Fixup index on following view items...\n\t\t\tvar views = this.views,\n\t\t\t\tindex = views.length;\n\t\t\twhile (fromIndex < index--) {\n\t\t\t\tif (views[index].index !== index) {\n\t\t\t\t\t$observable(views[index]).setProperty(\"index\", index);\n\t\t\t\t\t// This is fixing up index, but not key, and not index on child views. From child views, use view.getIndex()\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\ttheView.link = viewLink;\n\n\t\t//====================================\n\t\t// End of added link methods for VIEW\n\t\t//====================================\n\t}\n}\n\n//========================\n// JsViews-specific converters\n//========================\n\n$converters.merge = function(val) {\n\t// Special converter used in data-linking to space-separated lists, such as className:\n\t// Currently only supports toggle semantics - and has no effect if toggle string is not specified\n\t// data-link=\"class{merge:boolExpr toggle=className}\"\n\tvar regularExpression,\n\t\tcurrentValue = this.linkCtx.elem.className,\n\t\ttoggle = this.tagCtx.props.toggle;\n\n\tif (toggle) {\n\t\t// We are toggling the class specified by the toggle property,\n\t\t// and the boolean val binding is driving the insert/remove toggle\n\n\t\tregularExpression = toggle.replace(/[\\\\^$.|?*+()[{]/g, \"\\\\$&\");\n\t\t// Escape any regular expression special characters (metacharacters) within the toggle string\n\t\tregularExpression = \"(\\\\s(?=\" + regularExpression + \"$)|(\\\\s)|^)(\" + regularExpression + \"(\\\\s|$))\";\n\t\t// Example: /(\\s(?=myclass$)|(\\s)|^)?(myclass(\\s|$))/ - so matches (\" myclass\" or \" \" or ^ ) followed by (\"myclass \" or \"myclass$\") where ^/$ are beginning/end of string\n\t\tcurrentValue = currentValue.replace(new RegExp(regularExpression), \"$2\");\n\t\tval = currentValue + (val ? (currentValue && \" \") + toggle : \"\");\n\t}\n\treturn val;\n};\n\n//========================\n// JsViews-specific tags\n//========================\n\n$tags({\n\ton: {\n\t\tattr: NONE,\n\t\tinit: function(tagCtx) {\n\t\t\tvar content,\n\t\t\t\ttag = this,\n\t\t\t\ti = 0,\n\t\t\t\targs = tagCtx.args, // [events,] [selector,] handler\n\t\t\t\tl = args.length;\n\n\t\t\tfor (; ii && i+1; // handler index\n\t\t\tif (tag.inline) {\n\t\t\t\tif (!$sub.rTmpl.exec(content = $.trim(tagCtx.tmpl.markup))) {\n\t\t\t\t\t// Inline {^{on}} tag with no content (or external template content) or with content containing\n\t\t\t\t\t// no HTML or JsRender tags: We will wrap the (text) content, or the operation name in a \";\n\t\t\t\t}\n\t\t\t\ttag.attr = HTML;\n\t\t\t}\n\t\t},\n\t\tonBind: function() {\n\t\t\tif (this.template) { // {^{on/}} with no content has template rendering
\", \"
\"],\n\t\ttr: [2, \"\", \"
\"],\n\t\ttd: [3, \"\", \"
\"],\n\t\tcol: [2, \"\", \"
\"],\n\t\tsvg_ns: [1, \"\", \"\"],\n\t\t// IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags,\n\t\t// unless wrapped in a div with non-breaking characters in front of it.\n\t\tdiv: $.support.htmlSerialize ? [0, \"\", \"\"] : [1, \"X
\", \"
\"]\n\t},\n\t_fe: {\n\t\tinput: {\n\t\t\tfrom: inputAttrib, to: VALUE\n\t\t},\n\t\ttextarea: valueBinding,\n\t\tselect: valueBinding,\n\t\toptgroup: {\n\t\t\tto: \"label\"\n\t\t}\n\t}\n});\n\nreturn $;\n}, window));\n"]} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index f18a5ec..0000000 --- a/package-lock.json +++ /dev/null @@ -1,3612 +0,0 @@ -{ - "name": "jsviews", - "version": "v0.9.86", - "lockfileVersion": 1, - "dependencies": { - "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", - "dev": true - }, - "acorn": { - "version": "4.0.13", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-4.0.13.tgz", - "integrity": "sha1-EFSVrlNh1pe9GVyCUZLhrX8lN4c=", - "dev": true - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", - "dev": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, - "argparse": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.9.tgz", - "integrity": "sha1-c9g7wmP4bpf4zE9rrhsOkKfSLIY=", - "dev": true, - "optional": true - }, - "argsparser": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/argsparser/-/argsparser-0.0.6.tgz", - "integrity": "sha1-/0XrW5LABCJc8UalHTOdzLJlvmM=", - "dev": true - }, - "arr-diff": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-2.0.0.tgz", - "integrity": "sha1-jzuCf5Vai9ZpaX5KQlasPOrjVs8=", - "dev": true - }, - "arr-flatten": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.0.3.tgz", - "integrity": "sha1-onTthawIhJtr14R8RYB0XcUa37E=", - "dev": true - }, - "array-differ": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-1.0.0.tgz", - "integrity": "sha1-7/UuN1gknTO+QCuLuOVkuytdQDE=", - "dev": true - }, - "array-uniq": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/array-uniq/-/array-uniq-1.0.3.tgz", - "integrity": "sha1-r2rId6Jcx/dOBYiUdThY39sk/bY=", - "dev": true - }, - "array-unique": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.2.1.tgz", - "integrity": "sha1-odl8yvy8JiXMcPrc6zalDFiwGlM=", - "dev": true - }, - "asn1.js": { - "version": "4.9.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-4.9.1.tgz", - "integrity": "sha1-SLokC0WpKA6UdImQull9IWYX/UA=", - "dev": true - }, - "assert": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.3.0.tgz", - "integrity": "sha1-A5OaYiWCqBLMICMgoLmlbJuBWEk=", - "dev": true - }, - "astw": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/astw/-/astw-2.2.0.tgz", - "integrity": "sha1-e9QXhNMkk5h66yOba04cV6hzuRc=", - "dev": true - }, - "async": { - "version": "0.2.10", - "resolved": "https://registry.npmjs.org/async/-/async-0.2.10.tgz", - "integrity": "sha1-trvgsGdLnXGXCMo43owjfLUmw9E=", - "dev": true, - "optional": true - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", - "dev": true - }, - "base64-js": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-0.0.8.tgz", - "integrity": "sha1-EQHpVE9KdrG8OybUUsqW16NeeXg=", - "dev": true - }, - "beeper": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/beeper/-/beeper-1.1.1.tgz", - "integrity": "sha1-5tXqjF2tABMEpwsiY4RH9pyy+Ak=", - "dev": true - }, - "bn.js": { - "version": "4.11.6", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", - "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", - "dev": true - }, - "brace-expansion": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.8.tgz", - "integrity": "sha1-wHshHHyVLsH479Uad+8NHTmQopI=", - "dev": true - }, - "braces": { - "version": "1.8.5", - "resolved": "https://registry.npmjs.org/braces/-/braces-1.8.5.tgz", - "integrity": "sha1-uneWLhLf+WnWt2cR6RS3N4V79qc=", - "dev": true - }, - "brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "browser-pack": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-5.0.1.tgz", - "integrity": "sha1-QZdxmyDG4KqglFHFER5T77b7wY0=", - "dev": true - }, - "browser-resolve": { - "version": "1.11.2", - "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.2.tgz", - "integrity": "sha1-j/CbCixCFxihBRwmCzLkj0QpOM4=", - "dev": true, - "dependencies": { - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", - "dev": true - } - } - }, - "browserify": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/browserify/-/browserify-11.2.0.tgz", - "integrity": "sha1-oRu53SCdeVcrgT9+7q+Cil9cDk4=", - "dev": true - }, - "browserify-aes": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.6.tgz", - "integrity": "sha1-Xncl297x/Vkw1OurSFZ85FHEigo=", - "dev": true - }, - "browserify-cipher": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.0.tgz", - "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=", - "dev": true - }, - "browserify-des": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.0.tgz", - "integrity": "sha1-2qJ3cXRwki7S/hhZQRihdUOXId0=", - "dev": true - }, - "browserify-rsa": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", - "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", - "dev": true - }, - "browserify-sign": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.0.4.tgz", - "integrity": "sha1-qk62jl17ZYuqa/alfmMMvXqT0pg=", - "dev": true - }, - "browserify-zlib": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", - "integrity": "sha1-uzX4pRn2AOD6a4SFJByXnQFB+y0=", - "dev": true - }, - "buffer": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-3.6.0.tgz", - "integrity": "sha1-pyyTb3e5a/UvX357RnGAYoVR3vs=", - "dev": true, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - } - } - }, - "buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "builtin-status-codes": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-1.0.0.tgz", - "integrity": "sha1-MGN+4mKXisBxdOFtf4LwrQbgha0=", - "dev": true - }, - "builtins": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/builtins/-/builtins-0.0.7.tgz", - "integrity": "sha1-NVIZzWzxjb58Acx/0tznZc/cVJo=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true - }, - "cipher-base": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.3.tgz", - "integrity": "sha1-7qvxlEGc6QDaMBjCB9IS8qbfCgc=", - "dev": true - }, - "cli-table": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz", - "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", - "dev": true - }, - "clone": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-1.0.2.tgz", - "integrity": "sha1-Jgt6meux7f4kdTgXX3gyQ8sZ0Uk=", - "dev": true - }, - "clone-stats": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-0.0.1.tgz", - "integrity": "sha1-uI+UqCzzi4eR1YBG6kAprYjKmdE=", - "dev": true - }, - "co": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/co/-/co-3.1.0.tgz", - "integrity": "sha1-TqVOpaCJOBUxheFSEMaNkJK8G3g=", - "dev": true - }, - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", - "dev": true - }, - "combine-source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.6.1.tgz", - "integrity": "sha1-m0oJwxYDPXaODxHgKfonMOB5rZY=", - "dev": true - }, - "commondir": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-0.0.1.tgz", - "integrity": "sha1-ifAP3NUbUZxXhzP+xWPmptp/W+I=", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "concat-stream": { - "version": "1.4.10", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.4.10.tgz", - "integrity": "sha1-rMO79WAsuMyYDGrIQPp9hgPj7zY=", - "dev": true, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true - } - } - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha1-8CQcRXMKn8YyOyBtvzjtx0HQuxA=", - "dev": true - }, - "constants-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-0.0.1.tgz", - "integrity": "sha1-kld9tSe6bEzwpFaNhLwDH0QeIfI=", - "dev": true - }, - "convert-source-map": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", - "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", - "dev": true - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", - "dev": true - }, - "create-ecdh": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.0.tgz", - "integrity": "sha1-iIxyNZbN92EvZJgjPuvXo1MBc30=", - "dev": true - }, - "create-hash": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.1.3.tgz", - "integrity": "sha1-YGBCrIuSYnUPSDyt2rD1gZFy2P0=", - "dev": true - }, - "create-hmac": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.6.tgz", - "integrity": "sha1-rLniIaThe9sHbpBlfEK5PjcmzwY=", - "dev": true - }, - "crypto-browserify": { - "version": "3.11.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.11.0.tgz", - "integrity": "sha1-NlKgkGq5sqfgw85mpAjpV6JIVSI=", - "dev": true - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha1-6vQ5/U1ISK105cx9vvIAZyueNFs=", - "dev": true - }, - "dateformat": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-2.0.0.tgz", - "integrity": "sha1-J0Pjq7XD/CRi5SfcpEXgTp9N7hc=", - "dev": true - }, - "defaults": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/defaults/-/defaults-1.0.3.tgz", - "integrity": "sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=", - "dev": true - }, - "defined": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", - "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", - "dev": true - }, - "deprecated": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/deprecated/-/deprecated-0.0.1.tgz", - "integrity": "sha1-+cmvVGSvoeepcUWKi97yqpTVuxk=", - "dev": true - }, - "deps-sort": { - "version": "1.3.9", - "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-1.3.9.tgz", - "integrity": "sha1-Kd//U+F7Nq7K51MK27v2IsLtGnE=", - "dev": true - }, - "des.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.0.tgz", - "integrity": "sha1-wHTS4qpqipoH29YfmhXCzYPsjsw=", - "dev": true - }, - "detect-file": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-0.1.0.tgz", - "integrity": "sha1-STXe39lIhkjgBrASlWbpOGcR6mM=", - "dev": true - }, - "detective": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/detective/-/detective-4.5.0.tgz", - "integrity": "sha1-blqMaybmx6JUsca210kNmOyR7dE=", - "dev": true - }, - "diffie-hellman": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.2.tgz", - "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", - "dev": true - }, - "domain-browser": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", - "integrity": "sha1-hnqksJP6oF8d4IwG9NeyH9+GmLw=", - "dev": true - }, - "duplexer2": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", - "integrity": "sha1-xhTc9n4vsUmVqRcR5aYX6KYKMds=", - "dev": true, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true - } - } - }, - "elliptic": { - "version": "6.4.0", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.0.tgz", - "integrity": "sha1-ysmvh2LIWDYYcAPI3+GT5eLq5d8=", - "dev": true - }, - "end-of-stream": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-0.1.5.tgz", - "integrity": "sha1-jhdyBsPICDfYVjLouTWd/osvbq8=", - "dev": true, - "dependencies": { - "once": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/once/-/once-1.3.3.tgz", - "integrity": "sha1-suJhVXzkwxTsgwTz+oJmPkKXyiA=", - "dev": true - } - } - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true - }, - "escodegen": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.2.0.tgz", - "integrity": "sha1-Cd55Z3kcyVi3+Jot220jRRrzJ+E=", - "dev": true, - "optional": true, - "dependencies": { - "esprima": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", - "integrity": "sha1-n1V+CPw7TSbs6d00+Pv0drYlha0=", - "dev": true, - "optional": true - }, - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "dev": true, - "optional": true - } - } - }, - "esprima": { - "version": "git://github.com/ariya/esprima.git#a65a3eb93b9a5dce9a1184ca2d1bd0b184c6b8fd", - "dev": true, - "optional": true - }, - "estraverse": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.5.1.tgz", - "integrity": "sha1-hno+jlip+EYYr7bC3bzZFrfLr3E=", - "dev": true, - "optional": true - }, - "esutils": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-1.0.0.tgz", - "integrity": "sha1-gVHTWOIMisx/t0XnRywAJf5JZXA=", - "dev": true, - "optional": true - }, - "events": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/events/-/events-1.0.2.tgz", - "integrity": "sha1-dYSdz+k9EPsFfDAFWv29UdBqjiQ=", - "dev": true - }, - "evp_bytestokey": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.0.tgz", - "integrity": "sha1-SXtmrZ/vZc18CKYYCCS6FHa2blM=", - "dev": true - }, - "expand-brackets": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-0.1.5.tgz", - "integrity": "sha1-3wcoTjQqgHzXM6xa9yQR5YHRF3s=", - "dev": true - }, - "expand-range": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/expand-range/-/expand-range-1.8.2.tgz", - "integrity": "sha1-opnv/TNf4nIeuujiV+x5ZE/IUzc=", - "dev": true - }, - "expand-tilde": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-1.2.2.tgz", - "integrity": "sha1-C4HrqJflo9MdHD0QL48BRB5VlEk=", - "dev": true - }, - "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=", - "dev": true - }, - "extend-shallow": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", - "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", - "dev": true - }, - "extglob": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/extglob/-/extglob-0.3.2.tgz", - "integrity": "sha1-Lhj/PS9JqydlzskCPwEdqo2DSaE=", - "dev": true, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - } - } - }, - "fancy-log": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.0.tgz", - "integrity": "sha1-Rb4X0Cu5kX1gzP/UmVyZnmyMmUg=", - "dev": true - }, - "filename-regex": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/filename-regex/-/filename-regex-2.0.1.tgz", - "integrity": "sha1-wcS5vuPglyXdsQa3XB4wH+LxiyY=", - "dev": true - }, - "fileset": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/fileset/-/fileset-0.1.8.tgz", - "integrity": "sha1-UGuRqTluqn4y+0KoQHfHoMc2t0E=", - "dev": true, - "optional": true, - "dependencies": { - "glob": { - "version": "3.2.11", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", - "integrity": "sha1-Spc/Y1uRkPcV0QmH1cAP0oFevj0=", - "dev": true, - "optional": true, - "dependencies": { - "minimatch": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.3.0.tgz", - "integrity": "sha1-J12O2qxPG7MyZHIInnlJyDlGmd0=", - "dev": true, - "optional": true - } - } - }, - "minimatch": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.4.0.tgz", - "integrity": "sha1-vSx9Bg0sjI/Xzefx8u0tWycP2xs=", - "dev": true, - "optional": true - } - } - }, - "fill-range": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-2.2.3.tgz", - "integrity": "sha1-ULd9/X5Gm8dJJHCWNpn+eoSFpyM=", - "dev": true - }, - "find-index": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/find-index/-/find-index-0.1.1.tgz", - "integrity": "sha1-Z101iyyjiS15Whq0cjL4tuLg3eQ=", - "dev": true - }, - "findup-sync": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.4.3.tgz", - "integrity": "sha1-QAQ5Kee8YK3wt/SCfExudaDeyhI=", - "dev": true, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true - } - } - }, - "fined": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.0.2.tgz", - "integrity": "sha1-WyhCS3YNdZiWC374SA3/itNmDpc=", - "dev": true - }, - "first-chunk-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz", - "integrity": "sha1-Wb+1DNkF9g18OUzT2ayqtOatk04=", - "dev": true - }, - "flagged-respawn": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-0.3.2.tgz", - "integrity": "sha1-/xke3c1wiKZ1smEP/8l2vpuAdLU=", - "dev": true - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", - "dev": true - }, - "for-own": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-0.1.5.tgz", - "integrity": "sha1-UmXGgaTylNq78XyVCbZ2OqhFEM4=", - "dev": true - }, - "foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, - "fs-exists-sync": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/fs-exists-sync/-/fs-exists-sync-0.1.0.tgz", - "integrity": "sha1-mC1ok6+RjnLQjeyehnP/K1qNat0=", - "dev": true - }, - "function-bind": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", - "integrity": "sha1-FhdnFMgBeY5Ojyz391KUZ7tKV3E=", - "dev": true - }, - "gaze": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/gaze/-/gaze-0.5.2.tgz", - "integrity": "sha1-QLcJU30k0dRXZ9takIaJ3+aaxE8=", - "dev": true - }, - "glob": { - "version": "4.5.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-4.5.3.tgz", - "integrity": "sha1-xstz0yJsHv7wTePFbQEvAzd+4V8=", - "dev": true - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "dev": true, - "dependencies": { - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "dev": true - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true - } - } - }, - "glob-parent": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", - "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", - "dev": true - }, - "glob-stream": { - "version": "5.3.5", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-5.3.5.tgz", - "integrity": "sha1-pVZlqajM3EGRWofHAeMtTgFvrSI=", - "dev": true, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true - }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "dev": true - } - } - }, - "glob-watcher": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-0.0.6.tgz", - "integrity": "sha1-uVtKjfdLOcgymLDAXJeLTZo7cQs=", - "dev": true - }, - "glob2base": { - "version": "0.0.12", - "resolved": "https://registry.npmjs.org/glob2base/-/glob2base-0.0.12.tgz", - "integrity": "sha1-nUGbPijxLoOjYhZKJ3BVkiycDVY=", - "dev": true - }, - "global-modules": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-0.2.3.tgz", - "integrity": "sha1-6lo77ULG1s6ZWk+KEmm12uIjgo0=", - "dev": true - }, - "global-prefix": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-0.1.5.tgz", - "integrity": "sha1-jTvGuNo8qBEqFg2NSW/wRiv+948=", - "dev": true - }, - "globule": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/globule/-/globule-0.1.0.tgz", - "integrity": "sha1-2cjt3h2nnRJaFRt5UzuXhnY0auU=", - "dev": true, - "dependencies": { - "glob": { - "version": "3.1.21", - "resolved": "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz", - "integrity": "sha1-0p4KBV3qUTj00H7UDomC6DwgZs0=", - "dev": true - }, - "graceful-fs": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.2.3.tgz", - "integrity": "sha1-FaSAaldUfLLS2/J/QuiajDRRs2Q=", - "dev": true - }, - "inherits": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-1.0.2.tgz", - "integrity": "sha1-ykMJ2t7mtUzAuNJH6NfHoJdb3Js=", - "dev": true - }, - "minimatch": { - "version": "0.2.14", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-0.2.14.tgz", - "integrity": "sha1-x054BXT2PG+aCQ6Q775u9TpqdWo=", - "dev": true - } - } - }, - "glogg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.0.tgz", - "integrity": "sha1-f+DxmfV6yQbPUS/urY+Q7kooT8U=", - "dev": true - }, - "graceful-fs": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-3.0.11.tgz", - "integrity": "sha1-dhPHeKGv6mLyXGMKCG1/Osu92Bg=", - "dev": true - }, - "gulp": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/gulp/-/gulp-3.9.1.tgz", - "integrity": "sha1-VxzkWSjdQK9lFPxAEYZgFsE4RbQ=", - "dev": true - }, - "gulp-util": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/gulp-util/-/gulp-util-3.0.8.tgz", - "integrity": "sha1-AFTh50RQLifATBh8PsxQXdVLu08=", - "dev": true, - "dependencies": { - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true - } - } - }, - "gulplog": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", - "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", - "dev": true - }, - "handlebars": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-1.3.0.tgz", - "integrity": "sha1-npsTCpPjiUkTItl1zz7BgYw3zjQ=", - "dev": true, - "optional": true - }, - "has": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", - "integrity": "sha1-hGFzP1OLCDfJNh45qauelwTcLyg=", - "dev": true - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE=", - "dev": true - }, - "has-gulplog": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/has-gulplog/-/has-gulplog-0.1.0.tgz", - "integrity": "sha1-ZBTIKRNpfaUVkDl9r7EvIpZ4Ec4=", - "dev": true - }, - "hash-base": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-2.0.2.tgz", - "integrity": "sha1-ZuodhW206KVHDK32/OI65SRO8uE=", - "dev": true - }, - "hash.js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.0.3.tgz", - "integrity": "sha1-EzL/ABVsCg/92CNgE9B7d6BFFXM=", - "dev": true - }, - "hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true - }, - "homedir-polyfill": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz", - "integrity": "sha1-TCu8inWJmP7r9e1oWA921GdotLw=", - "dev": true - }, - "htmlescape": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", - "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", - "dev": true - }, - "https-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", - "integrity": "sha1-P5E2XKvmC3ftDruiS0VOPgnZWoI=", - "dev": true - }, - "ieee754": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", - "integrity": "sha1-vjPUCsEO8ZJnAfbwii2G+/0a0+Q=", - "dev": true - }, - "indexof": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", - "integrity": "sha1-gtwzbSMrkGIXnQWrMpOmYFn9Q10=", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "ini": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.4.tgz", - "integrity": "sha1-BTfLedr1m1mhpRff9wbIbsA5Fi4=", - "dev": true - }, - "inline-source-map": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.5.0.tgz", - "integrity": "sha1-Skxd2OT7Xps82mDIIt+tyu5m4K8=", - "dev": true - }, - "insert-module-globals": { - "version": "6.6.3", - "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-6.6.3.tgz", - "integrity": "sha1-IGOOKaMPntHKLjqCX7wsulJG3fw=", - "dev": true - }, - "interpret": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.0.3.tgz", - "integrity": "sha1-y8NcYu7uc/Gat7EKgBURQBr8D5A=", - "dev": true - }, - "is-absolute": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-0.2.6.tgz", - "integrity": "sha1-IN5p89uULvLYe5wto28XIjWxtes=", - "dev": true - }, - "is-buffer": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.5.tgz", - "integrity": "sha1-Hzsm72E7IUuIy8ojzGwB2Hlh7sw=", - "dev": true - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", - "dev": true - }, - "is-equal-shallow": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/is-equal-shallow/-/is-equal-shallow-0.1.3.tgz", - "integrity": "sha1-IjgJj8Ih3gvPpdnqxMRdY4qhxTQ=", - "dev": true - }, - "is-extendable": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", - "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", - "dev": true - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", - "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", - "dev": true - }, - "is-number": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-2.1.0.tgz", - "integrity": "sha1-Afy7s5NGOlSPL0ZszhbezknbkI8=", - "dev": true - }, - "is-posix-bracket": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/is-posix-bracket/-/is-posix-bracket-0.1.1.tgz", - "integrity": "sha1-MzTceXdDaOkvAW5vvAqI9c1ua8Q=", - "dev": true - }, - "is-primitive": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-primitive/-/is-primitive-2.0.0.tgz", - "integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU=", - "dev": true - }, - "is-relative": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-0.2.1.tgz", - "integrity": "sha1-0n9MfVFtF1+2ENuEu+7yPDvJeqU=", - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true - }, - "is-unc-path": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-0.1.2.tgz", - "integrity": "sha1-arBTpyVzwQJQ/0FqOBTDUXivObk=", - "dev": true - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", - "dev": true - }, - "is-windows": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-0.2.0.tgz", - "integrity": "sha1-3hqm1j6indJIc3tp8f+LgALSEIw=", - "dev": true - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "isobject": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", - "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", - "dev": true, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - } - } - }, - "istanbul": { - "version": "https://github.com/gotwarlost/istanbul/tarball/harmony", - "integrity": "sha1-Atq/03Q7aVlC0XCoCRcdOSRGYzE=", - "dev": true, - "optional": true, - "dependencies": { - "mkdirp": { - "version": "0.3.5", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.5.tgz", - "integrity": "sha1-3j5fiWHIjHh+4TaN+EmsRBPsqNc=", - "dev": true, - "optional": true - }, - "resolve": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-0.6.3.tgz", - "integrity": "sha1-3ZV5gufnNt699TtYpN2RdUV13UY=", - "dev": true, - "optional": true - }, - "which": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/which/-/which-1.0.9.tgz", - "integrity": "sha1-RgwdoPgQED0DIam2M6+eV15kSG8=", - "dev": true, - "optional": true - } - } - }, - "jquery": { - "version": "2.2.4", - "resolved": "https://registry.npmjs.org/jquery/-/jquery-2.2.4.tgz", - "integrity": "sha1-LInWiJterFIqfuoywUUhVZxsvwI=", - "dev": true - }, - "js-yaml": { - "version": "3.8.4", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.8.4.tgz", - "integrity": "sha1-UgtFZPhlc7qWZir4Woyvp7S1pvY=", - "dev": true, - "optional": true, - "dependencies": { - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=", - "dev": true, - "optional": true - } - } - }, - "json-stable-stringify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", - "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", - "dev": true - }, - "jsonify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", - "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", - "dev": true - }, - "jsonparse": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", - "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", - "dev": true - }, - "JSONStream": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.1.tgz", - "integrity": "sha1-cH92HgHa6eFvG8+TcDt4xwlmV5o=", - "dev": true - }, - "jsrender": { - "version": "0.9.84", - "resolved": "https://registry.npmjs.org/jsrender/-/jsrender-0.9.84.tgz", - "integrity": "sha1-EhoMYxFJu26w1oru3j1eeycVCfs=", - "dev": true, - "dependencies": { - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true - } - } - }, - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true - }, - "labeled-stream-splicer": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-1.0.2.tgz", - "integrity": "sha1-RhUzFTd4SYHo/SZOHzpDTE4N3WU=", - "dev": true - }, - "lexical-scope": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/lexical-scope/-/lexical-scope-1.2.0.tgz", - "integrity": "sha1-/Ope3HBKSzqHls3KQZw6CvryLfQ=", - "dev": true - }, - "liftoff": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-2.3.0.tgz", - "integrity": "sha1-qY8v9nGD2Lp8+soQVIvX/wVQs4U=", - "dev": true - }, - "lodash": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz", - "integrity": "sha1-j1dWDIO1n8JwvT1WG2kAQ0MOJVE=", - "dev": true - }, - "lodash._basecopy": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz", - "integrity": "sha1-jaDmqHbPNEwK2KVIghEd08XHyjY=", - "dev": true - }, - "lodash._basetostring": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz", - "integrity": "sha1-0YYdh3+CSlL2aYMtyvPuFVZqB9U=", - "dev": true - }, - "lodash._basevalues": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz", - "integrity": "sha1-W3dXYoAr3j0yl1A+JjAIIP32Ybc=", - "dev": true - }, - "lodash._getnative": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/lodash._getnative/-/lodash._getnative-3.9.1.tgz", - "integrity": "sha1-VwvH3t5G1hzc3mh9ZdPuy6o6r/U=", - "dev": true - }, - "lodash._isiterateecall": { - "version": "3.0.9", - "resolved": "https://registry.npmjs.org/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz", - "integrity": "sha1-UgOte6Ql+uhCRg5pbbnPPmqsBXw=", - "dev": true - }, - "lodash._reescape": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reescape/-/lodash._reescape-3.0.0.tgz", - "integrity": "sha1-Kx1vXf4HyKNVdT5fJ/rH8c3hYWo=", - "dev": true - }, - "lodash._reevaluate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz", - "integrity": "sha1-WLx0xAZklTrgsSTYBpltrKQx4u0=", - "dev": true - }, - "lodash._reinterpolate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz", - "integrity": "sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0=", - "dev": true - }, - "lodash._root": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/lodash._root/-/lodash._root-3.0.1.tgz", - "integrity": "sha1-+6HEUkwZ7ppfgTa0YJ8BfPTe1pI=", - "dev": true - }, - "lodash.assignwith": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/lodash.assignwith/-/lodash.assignwith-4.2.0.tgz", - "integrity": "sha1-EnqX8CrcQXUalU0ksN4X4QDgOOs=", - "dev": true - }, - "lodash.escape": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/lodash.escape/-/lodash.escape-3.2.0.tgz", - "integrity": "sha1-mV7g3BjBtIzJLv+ucaEKq1tIdpg=", - "dev": true - }, - "lodash.isarguments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz", - "integrity": "sha1-L1c9hcaiQon/AGY7SRwdM4/zRYo=", - "dev": true - }, - "lodash.isarray": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.isarray/-/lodash.isarray-3.0.4.tgz", - "integrity": "sha1-eeTriMNqgSKvhvhEqpvNhRtfu1U=", - "dev": true - }, - "lodash.isempty": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz", - "integrity": "sha1-b4bL7di+TsmHvpqvM8loTbGzHn4=", - "dev": true - }, - "lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=", - "dev": true - }, - "lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=", - "dev": true - }, - "lodash.keys": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/lodash.keys/-/lodash.keys-3.1.2.tgz", - "integrity": "sha1-TbwEcrFWvlCgsoaFXRvQsMZWCYo=", - "dev": true - }, - "lodash.mapvalues": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/lodash.mapvalues/-/lodash.mapvalues-4.6.0.tgz", - "integrity": "sha1-G6+lAF3p3W9PJmaMMMo3IwzJaJw=", - "dev": true - }, - "lodash.memoize": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", - "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", - "dev": true - }, - "lodash.pick": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/lodash.pick/-/lodash.pick-4.4.0.tgz", - "integrity": "sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=", - "dev": true - }, - "lodash.restparam": { - "version": "3.6.1", - "resolved": "https://registry.npmjs.org/lodash.restparam/-/lodash.restparam-3.6.1.tgz", - "integrity": "sha1-k2pOMJ7zMKdkXtQUWYbIWuWyCAU=", - "dev": true - }, - "lodash.template": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-3.6.2.tgz", - "integrity": "sha1-+M3sxhaaJVvpCYrosMU9N4kx0U8=", - "dev": true - }, - "lodash.templatesettings": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz", - "integrity": "sha1-+zB4RHU7Zrnxr6VOJix0UwfbqOU=", - "dev": true - }, - "lru-cache": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-2.7.3.tgz", - "integrity": "sha1-bUUk6LlV+V1PW1iFHOId1y+06VI=", - "dev": true - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", - "dev": true - }, - "micromatch": { - "version": "2.3.11", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-2.3.11.tgz", - "integrity": "sha1-hmd8l9FyCzY0MdBNDRUpO9OMFWU=", - "dev": true, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true - } - } - }, - "miller-rabin": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.0.tgz", - "integrity": "sha1-SmL7HUKTPAVYOYL0xxb2+55sbT0=", - "dev": true - }, - "minimalistic-assert": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", - "integrity": "sha1-cCvi3aazf0g2vLP121ZkG2Sh09M=", - "dev": true - }, - "minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "minimatch": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-2.0.10.tgz", - "integrity": "sha1-jQh8OcazjAAbl/ynzm0OHoCvusc=", - "dev": true - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "dependencies": { - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - } - } - }, - "module-deps": { - "version": "3.9.1", - "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-3.9.1.tgz", - "integrity": "sha1-6nXK+RmQkNJbDVUStaysuW5/h/M=", - "dev": true, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true - } - } - }, - "multipipe": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/multipipe/-/multipipe-0.1.2.tgz", - "integrity": "sha1-Ko8t33Du1WTf8tV/HhoTfZ8FB4s=", - "dev": true - }, - "natives": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/natives/-/natives-1.1.0.tgz", - "integrity": "sha1-6f+EFBimsux6SV6TmYT3jxY+bjE=", - "dev": true - }, - "nopt": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-2.2.1.tgz", - "integrity": "sha1-KqCbfRdoSHs7ianFqlIzW/8Lrqc=", - "dev": true, - "optional": true - }, - "normalize-path": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", - "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", - "dev": true - }, - "npm": { - "version": "4.6.1", - "resolved": "https://registry.npmjs.org/npm/-/npm-4.6.1.tgz", - "integrity": "sha1-+Osa0A3FilUUNjtBylNCgX8L1kY=", - "dependencies": { - "abbrev": { - "version": "1.1.0", - "bundled": true - }, - "ansi-regex": { - "version": "2.1.1", - "bundled": true - }, - "ansicolors": { - "version": "0.3.2", - "bundled": true - }, - "ansistyles": { - "version": "0.1.3", - "bundled": true - }, - "aproba": { - "version": "1.1.1", - "bundled": true - }, - "archy": { - "version": "1.0.0", - "bundled": true - }, - "asap": { - "version": "2.0.5", - "bundled": true - }, - "bluebird": { - "version": "3.5.0", - "bundled": true - }, - "call-limit": { - "version": "1.1.0", - "bundled": true - }, - "chownr": { - "version": "1.0.1", - "bundled": true - }, - "cmd-shim": { - "version": "2.0.2", - "bundled": true - }, - "columnify": { - "version": "1.5.4", - "bundled": true, - "dependencies": { - "wcwidth": { - "version": "1.0.0", - "bundled": true, - "dependencies": { - "defaults": { - "version": "1.0.3", - "bundled": true, - "dependencies": { - "clone": { - "version": "1.0.2", - "bundled": true - } - } - } - } - } - } - }, - "config-chain": { - "version": "1.1.11", - "bundled": true, - "dependencies": { - "proto-list": { - "version": "1.2.4", - "bundled": true - } - } - }, - "debuglog": { - "version": "1.0.1", - "bundled": true - }, - "dezalgo": { - "version": "1.0.3", - "bundled": true - }, - "editor": { - "version": "1.0.0", - "bundled": true - }, - "fs-vacuum": { - "version": "1.2.10", - "bundled": true - }, - "fs-write-stream-atomic": { - "version": "1.0.10", - "bundled": true - }, - "fstream": { - "version": "1.0.11", - "bundled": true - }, - "fstream-npm": { - "version": "1.2.0", - "bundled": true, - "dependencies": { - "fstream-ignore": { - "version": "1.0.5", - "bundled": true, - "dependencies": { - "minimatch": { - "version": "3.0.3", - "bundled": true, - "dependencies": { - "brace-expansion": { - "version": "1.1.6", - "bundled": true, - "dependencies": { - "balanced-match": { - "version": "0.4.2", - "bundled": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - } - } - } - } - } - } - } - } - }, - "glob": { - "version": "7.1.1", - "bundled": true, - "dependencies": { - "fs.realpath": { - "version": "1.0.0", - "bundled": true - }, - "minimatch": { - "version": "3.0.3", - "bundled": true, - "dependencies": { - "brace-expansion": { - "version": "1.1.6", - "bundled": true, - "dependencies": { - "balanced-match": { - "version": "0.4.2", - "bundled": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - } - } - } - } - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true - } - } - }, - "graceful-fs": { - "version": "4.1.11", - "bundled": true - }, - "has-unicode": { - "version": "2.0.1", - "bundled": true - }, - "hosted-git-info": { - "version": "2.4.2", - "bundled": true - }, - "iferr": { - "version": "0.1.5", - "bundled": true - }, - "imurmurhash": { - "version": "0.1.4", - "bundled": true - }, - "inflight": { - "version": "1.0.6", - "bundled": true - }, - "inherits": { - "version": "2.0.3", - "bundled": true - }, - "ini": { - "version": "1.3.4", - "bundled": true - }, - "init-package-json": { - "version": "1.10.1", - "bundled": true, - "dependencies": { - "promzard": { - "version": "0.3.0", - "bundled": true - } - } - }, - "JSONStream": { - "version": "1.3.1", - "bundled": true, - "dependencies": { - "jsonparse": { - "version": "1.3.0", - "bundled": true - }, - "through": { - "version": "2.3.8", - "bundled": true - } - } - }, - "lazy-property": { - "version": "1.0.0", - "bundled": true - }, - "lockfile": { - "version": "1.0.3", - "bundled": true - }, - "lodash._baseindexof": { - "version": "3.1.0", - "bundled": true - }, - "lodash._baseuniq": { - "version": "4.6.0", - "bundled": true, - "dependencies": { - "lodash._createset": { - "version": "4.0.3", - "bundled": true - }, - "lodash._root": { - "version": "3.0.1", - "bundled": true - } - } - }, - "lodash._bindcallback": { - "version": "3.0.1", - "bundled": true - }, - "lodash._cacheindexof": { - "version": "3.0.2", - "bundled": true - }, - "lodash._createcache": { - "version": "3.1.2", - "bundled": true - }, - "lodash._getnative": { - "version": "3.9.1", - "bundled": true - }, - "lodash.clonedeep": { - "version": "4.5.0", - "bundled": true - }, - "lodash.restparam": { - "version": "3.6.1", - "bundled": true - }, - "lodash.union": { - "version": "4.6.0", - "bundled": true - }, - "lodash.uniq": { - "version": "4.5.0", - "bundled": true - }, - "lodash.without": { - "version": "4.4.0", - "bundled": true - }, - "mississippi": { - "version": "1.3.0", - "bundled": true, - "dependencies": { - "concat-stream": { - "version": "1.6.0", - "bundled": true, - "dependencies": { - "typedarray": { - "version": "0.0.6", - "bundled": true - } - } - }, - "duplexify": { - "version": "3.5.0", - "bundled": true, - "dependencies": { - "end-of-stream": { - "version": "1.0.0", - "bundled": true, - "dependencies": { - "once": { - "version": "1.3.3", - "bundled": true - } - } - }, - "stream-shift": { - "version": "1.0.0", - "bundled": true - } - } - }, - "end-of-stream": { - "version": "1.1.0", - "bundled": true, - "dependencies": { - "once": { - "version": "1.3.3", - "bundled": true - } - } - }, - "flush-write-stream": { - "version": "1.0.2", - "bundled": true - }, - "from2": { - "version": "2.3.0", - "bundled": true - }, - "parallel-transform": { - "version": "1.1.0", - "bundled": true, - "dependencies": { - "cyclist": { - "version": "0.2.2", - "bundled": true - } - } - }, - "pump": { - "version": "1.0.2", - "bundled": true - }, - "pumpify": { - "version": "1.3.5", - "bundled": true - }, - "stream-each": { - "version": "1.2.0", - "bundled": true, - "dependencies": { - "stream-shift": { - "version": "1.0.0", - "bundled": true - } - } - }, - "through2": { - "version": "2.0.3", - "bundled": true, - "dependencies": { - "xtend": { - "version": "4.0.1", - "bundled": true - } - } - } - } - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dependencies": { - "minimist": { - "version": "0.0.8", - "bundled": true - } - } - }, - "move-concurrently": { - "version": "1.0.1", - "bundled": true, - "dependencies": { - "copy-concurrently": { - "version": "1.0.3", - "bundled": true - }, - "run-queue": { - "version": "1.0.3", - "bundled": true - } - } - }, - "node-gyp": { - "version": "3.6.0", - "bundled": true, - "dependencies": { - "minimatch": { - "version": "3.0.3", - "bundled": true, - "dependencies": { - "brace-expansion": { - "version": "1.1.6", - "bundled": true, - "dependencies": { - "balanced-match": { - "version": "0.4.2", - "bundled": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true - } - } - } - } - }, - "nopt": { - "version": "3.0.6", - "bundled": true - } - } - }, - "nopt": { - "version": "4.0.1", - "bundled": true, - "dependencies": { - "osenv": { - "version": "0.1.4", - "bundled": true, - "dependencies": { - "os-homedir": { - "version": "1.0.2", - "bundled": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true - } - } - } - } - }, - "normalize-git-url": { - "version": "3.0.2", - "bundled": true - }, - "normalize-package-data": { - "version": "2.3.8", - "bundled": true, - "dependencies": { - "is-builtin-module": { - "version": "1.0.0", - "bundled": true, - "dependencies": { - "builtin-modules": { - "version": "1.1.1", - "bundled": true - } - } - } - } - }, - "npm-cache-filename": { - "version": "1.0.2", - "bundled": true - }, - "npm-install-checks": { - "version": "3.0.0", - "bundled": true - }, - "npm-package-arg": { - "version": "4.2.1", - "bundled": true - }, - "npm-registry-client": { - "version": "8.1.1", - "bundled": true, - "dependencies": { - "concat-stream": { - "version": "1.6.0", - "bundled": true, - "dependencies": { - "typedarray": { - "version": "0.0.6", - "bundled": true - } - } - } - } - }, - "npm-user-validate": { - "version": "0.1.5", - "bundled": true - }, - "npmlog": { - "version": "4.0.2", - "bundled": true, - "dependencies": { - "are-we-there-yet": { - "version": "1.1.4", - "bundled": true, - "dependencies": { - "delegates": { - "version": "1.0.0", - "bundled": true - } - } - }, - "console-control-strings": { - "version": "1.1.0", - "bundled": true - }, - "gauge": { - "version": "2.7.4", - "bundled": true, - "dependencies": { - "object-assign": { - "version": "4.1.1", - "bundled": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dependencies": { - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dependencies": { - "number-is-nan": { - "version": "1.0.1", - "bundled": true - } - } - } - } - }, - "wide-align": { - "version": "1.1.0", - "bundled": true - } - } - }, - "set-blocking": { - "version": "2.0.0", - "bundled": true - } - } - }, - "once": { - "version": "1.4.0", - "bundled": true - }, - "opener": { - "version": "1.4.3", - "bundled": true - }, - "osenv": { - "version": "0.1.4", - "bundled": true, - "dependencies": { - "os-homedir": { - "version": "1.0.2", - "bundled": true - }, - "os-tmpdir": { - "version": "1.0.2", - "bundled": true - } - } - }, - "path-is-inside": { - "version": "1.0.2", - "bundled": true - }, - "read": { - "version": "1.0.7", - "bundled": true, - "dependencies": { - "mute-stream": { - "version": "0.0.5", - "bundled": true - } - } - }, - "read-cmd-shim": { - "version": "1.0.1", - "bundled": true - }, - "read-installed": { - "version": "4.0.3", - "bundled": true, - "dependencies": { - "util-extend": { - "version": "1.0.3", - "bundled": true - } - } - }, - "read-package-json": { - "version": "2.0.5", - "bundled": true, - "dependencies": { - "json-parse-helpfulerror": { - "version": "1.0.3", - "bundled": true, - "dependencies": { - "jju": { - "version": "1.3.0", - "bundled": true - } - } - } - } - }, - "read-package-tree": { - "version": "5.1.5", - "bundled": true - }, - "readable-stream": { - "version": "2.2.9", - "bundled": true, - "dependencies": { - "buffer-shims": { - "version": "1.0.0", - "bundled": true - }, - "core-util-is": { - "version": "1.0.2", - "bundled": true - }, - "isarray": { - "version": "1.0.0", - "bundled": true - }, - "process-nextick-args": { - "version": "1.0.7", - "bundled": true - }, - "string_decoder": { - "version": "1.0.0", - "bundled": true - }, - "util-deprecate": { - "version": "1.0.2", - "bundled": true - } - } - }, - "readdir-scoped-modules": { - "version": "1.0.2", - "bundled": true - }, - "realize-package-specifier": { - "version": "3.0.3", - "bundled": true - }, - "request": { - "version": "2.81.0", - "bundled": true, - "dependencies": { - "aws-sign2": { - "version": "0.6.0", - "bundled": true - }, - "aws4": { - "version": "1.6.0", - "bundled": true - }, - "caseless": { - "version": "0.12.0", - "bundled": true - }, - "combined-stream": { - "version": "1.0.5", - "bundled": true, - "dependencies": { - "delayed-stream": { - "version": "1.0.0", - "bundled": true - } - } - }, - "extend": { - "version": "3.0.0", - "bundled": true - }, - "forever-agent": { - "version": "0.6.1", - "bundled": true - }, - "form-data": { - "version": "2.1.2", - "bundled": true, - "dependencies": { - "asynckit": { - "version": "0.4.0", - "bundled": true - } - } - }, - "har-validator": { - "version": "4.2.1", - "bundled": true, - "dependencies": { - "ajv": { - "version": "4.11.4", - "bundled": true, - "dependencies": { - "co": { - "version": "4.6.0", - "bundled": true - }, - "json-stable-stringify": { - "version": "1.0.1", - "bundled": true, - "dependencies": { - "jsonify": { - "version": "0.0.0", - "bundled": true - } - } - } - } - }, - "har-schema": { - "version": "1.0.5", - "bundled": true - } - } - }, - "hawk": { - "version": "3.1.3", - "bundled": true, - "dependencies": { - "boom": { - "version": "2.10.1", - "bundled": true - }, - "cryptiles": { - "version": "2.0.5", - "bundled": true - }, - "hoek": { - "version": "2.16.3", - "bundled": true - }, - "sntp": { - "version": "1.0.9", - "bundled": true - } - } - }, - "http-signature": { - "version": "1.1.1", - "bundled": true, - "dependencies": { - "assert-plus": { - "version": "0.2.0", - "bundled": true - }, - "jsprim": { - "version": "1.3.1", - "bundled": true, - "dependencies": { - "extsprintf": { - "version": "1.0.2", - "bundled": true - }, - "json-schema": { - "version": "0.2.3", - "bundled": true - }, - "verror": { - "version": "1.3.6", - "bundled": true - } - } - }, - "sshpk": { - "version": "1.11.0", - "bundled": true, - "dependencies": { - "asn1": { - "version": "0.2.3", - "bundled": true - }, - "assert-plus": { - "version": "1.0.0", - "bundled": true - }, - "bcrypt-pbkdf": { - "version": "1.0.1", - "bundled": true, - "optional": true - }, - "dashdash": { - "version": "1.14.1", - "bundled": true - }, - "ecc-jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true - }, - "getpass": { - "version": "0.1.6", - "bundled": true - }, - "jodid25519": { - "version": "1.0.2", - "bundled": true, - "optional": true - }, - "jsbn": { - "version": "0.1.1", - "bundled": true, - "optional": true - }, - "tweetnacl": { - "version": "0.14.5", - "bundled": true, - "optional": true - } - } - } - } - }, - "is-typedarray": { - "version": "1.0.0", - "bundled": true - }, - "isstream": { - "version": "0.1.2", - "bundled": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "bundled": true - }, - "mime-types": { - "version": "2.1.14", - "bundled": true, - "dependencies": { - "mime-db": { - "version": "1.26.0", - "bundled": true - } - } - }, - "oauth-sign": { - "version": "0.8.2", - "bundled": true - }, - "performance-now": { - "version": "0.2.0", - "bundled": true - }, - "qs": { - "version": "6.4.0", - "bundled": true - }, - "safe-buffer": { - "version": "5.0.1", - "bundled": true - }, - "stringstream": { - "version": "0.0.5", - "bundled": true - }, - "tough-cookie": { - "version": "2.3.2", - "bundled": true, - "dependencies": { - "punycode": { - "version": "1.4.1", - "bundled": true - } - } - }, - "tunnel-agent": { - "version": "0.6.0", - "bundled": true - } - } - }, - "retry": { - "version": "0.10.1", - "bundled": true - }, - "rimraf": { - "version": "2.6.1", - "bundled": true - }, - "semver": { - "version": "5.3.0", - "bundled": true - }, - "sha": { - "version": "2.0.1", - "bundled": true - }, - "slide": { - "version": "1.1.6", - "bundled": true - }, - "sorted-object": { - "version": "2.0.1", - "bundled": true - }, - "sorted-union-stream": { - "version": "2.1.3", - "bundled": true, - "dependencies": { - "from2": { - "version": "1.3.0", - "bundled": true, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "bundled": true, - "dependencies": { - "core-util-is": { - "version": "1.0.2", - "bundled": true - }, - "isarray": { - "version": "0.0.1", - "bundled": true - }, - "string_decoder": { - "version": "0.10.31", - "bundled": true - } - } - } - } - }, - "stream-iterate": { - "version": "1.1.1", - "bundled": true - } - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true - }, - "tar": { - "version": "2.2.1", - "bundled": true, - "dependencies": { - "block-stream": { - "version": "0.0.8", - "bundled": true - } - } - }, - "text-table": { - "version": "0.2.0", - "bundled": true - }, - "uid-number": { - "version": "0.0.6", - "bundled": true - }, - "umask": { - "version": "1.1.0", - "bundled": true - }, - "unique-filename": { - "version": "1.1.0", - "bundled": true, - "dependencies": { - "unique-slug": { - "version": "2.0.0", - "bundled": true - } - } - }, - "unpipe": { - "version": "1.0.0", - "bundled": true - }, - "update-notifier": { - "version": "2.1.0", - "bundled": true, - "dependencies": { - "boxen": { - "version": "1.0.0", - "bundled": true, - "dependencies": { - "ansi-align": { - "version": "1.1.0", - "bundled": true, - "dependencies": { - "string-width": { - "version": "1.0.2", - "bundled": true, - "dependencies": { - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dependencies": { - "number-is-nan": { - "version": "1.0.1", - "bundled": true - } - } - } - } - } - } - }, - "camelcase": { - "version": "4.0.0", - "bundled": true - }, - "cli-boxes": { - "version": "1.0.0", - "bundled": true - }, - "string-width": { - "version": "2.0.0", - "bundled": true, - "dependencies": { - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true - } - } - }, - "term-size": { - "version": "0.1.1", - "bundled": true, - "dependencies": { - "execa": { - "version": "0.4.0", - "bundled": true, - "dependencies": { - "cross-spawn-async": { - "version": "2.2.5", - "bundled": true, - "dependencies": { - "lru-cache": { - "version": "4.0.2", - "bundled": true, - "dependencies": { - "pseudomap": { - "version": "1.0.2", - "bundled": true - }, - "yallist": { - "version": "2.0.0", - "bundled": true - } - } - } - } - }, - "is-stream": { - "version": "1.1.0", - "bundled": true - }, - "npm-run-path": { - "version": "1.0.0", - "bundled": true - }, - "object-assign": { - "version": "4.1.1", - "bundled": true - }, - "path-key": { - "version": "1.0.0", - "bundled": true - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true - } - } - } - } - }, - "widest-line": { - "version": "1.0.0", - "bundled": true, - "dependencies": { - "string-width": { - "version": "1.0.2", - "bundled": true, - "dependencies": { - "code-point-at": { - "version": "1.1.0", - "bundled": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dependencies": { - "number-is-nan": { - "version": "1.0.1", - "bundled": true - } - } - } - } - } - } - } - } - }, - "chalk": { - "version": "1.1.3", - "bundled": true, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "bundled": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "bundled": true - }, - "has-ansi": { - "version": "2.0.0", - "bundled": true - }, - "supports-color": { - "version": "2.0.0", - "bundled": true - } - } - }, - "configstore": { - "version": "3.0.0", - "bundled": true, - "dependencies": { - "dot-prop": { - "version": "4.1.1", - "bundled": true, - "dependencies": { - "is-obj": { - "version": "1.0.1", - "bundled": true - } - } - }, - "unique-string": { - "version": "1.0.0", - "bundled": true, - "dependencies": { - "crypto-random-string": { - "version": "1.0.0", - "bundled": true - } - } - } - } - }, - "is-npm": { - "version": "1.0.0", - "bundled": true - }, - "latest-version": { - "version": "3.0.0", - "bundled": true, - "dependencies": { - "package-json": { - "version": "3.1.0", - "bundled": true, - "dependencies": { - "got": { - "version": "6.7.1", - "bundled": true, - "dependencies": { - "create-error-class": { - "version": "3.0.2", - "bundled": true, - "dependencies": { - "capture-stack-trace": { - "version": "1.0.0", - "bundled": true - } - } - }, - "duplexer3": { - "version": "0.1.4", - "bundled": true - }, - "get-stream": { - "version": "3.0.0", - "bundled": true - }, - "is-redirect": { - "version": "1.0.0", - "bundled": true - }, - "is-retry-allowed": { - "version": "1.1.0", - "bundled": true - }, - "is-stream": { - "version": "1.1.0", - "bundled": true - }, - "lowercase-keys": { - "version": "1.0.0", - "bundled": true - }, - "safe-buffer": { - "version": "5.0.1", - "bundled": true - }, - "timed-out": { - "version": "4.0.1", - "bundled": true - }, - "unzip-response": { - "version": "2.0.1", - "bundled": true - }, - "url-parse-lax": { - "version": "1.0.0", - "bundled": true, - "dependencies": { - "prepend-http": { - "version": "1.0.4", - "bundled": true - } - } - } - } - }, - "registry-auth-token": { - "version": "3.1.0", - "bundled": true, - "dependencies": { - "rc": { - "version": "1.1.7", - "bundled": true, - "dependencies": { - "deep-extend": { - "version": "0.4.1", - "bundled": true - }, - "minimist": { - "version": "1.2.0", - "bundled": true - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true - } - } - } - } - }, - "registry-url": { - "version": "3.1.0", - "bundled": true, - "dependencies": { - "rc": { - "version": "1.1.7", - "bundled": true, - "dependencies": { - "deep-extend": { - "version": "0.4.1", - "bundled": true - }, - "minimist": { - "version": "1.2.0", - "bundled": true - }, - "strip-json-comments": { - "version": "2.0.1", - "bundled": true - } - } - } - } - } - } - } - } - }, - "lazy-req": { - "version": "2.0.0", - "bundled": true - }, - "semver-diff": { - "version": "2.1.0", - "bundled": true - }, - "xdg-basedir": { - "version": "3.0.0", - "bundled": true - } - } - }, - "uuid": { - "version": "3.0.1", - "bundled": true - }, - "validate-npm-package-license": { - "version": "3.0.1", - "bundled": true, - "dependencies": { - "spdx-correct": { - "version": "1.0.2", - "bundled": true, - "dependencies": { - "spdx-license-ids": { - "version": "1.2.0", - "bundled": true - } - } - }, - "spdx-expression-parse": { - "version": "1.0.2", - "bundled": true, - "dependencies": { - "spdx-exceptions": { - "version": "1.0.4", - "bundled": true - }, - "spdx-license-ids": { - "version": "1.2.0", - "bundled": true - } - } - } - } - }, - "validate-npm-package-name": { - "version": "3.0.0", - "bundled": true, - "dependencies": { - "builtins": { - "version": "1.0.3", - "bundled": true - } - } - }, - "which": { - "version": "1.2.14", - "bundled": true, - "dependencies": { - "isexe": { - "version": "2.0.0", - "bundled": true - } - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true - }, - "write-file-atomic": { - "version": "1.3.3", - "bundled": true - } - } - }, - "object-assign": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-3.0.0.tgz", - "integrity": "sha1-m+3VygiXlJvKR+f/QIBi1Un1h/I=", - "dev": true - }, - "object-keys": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.0.11.tgz", - "integrity": "sha1-xUYBd4rVYPEULODgG8yotW0TQm0=", - "dev": true - }, - "object.omit": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/object.omit/-/object.omit-2.0.1.tgz", - "integrity": "sha1-Gpx0SCnznbuFjHbKNXmuKlTr0fo=", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true - }, - "optimist": { - "version": "0.3.7", - "resolved": "https://registry.npmjs.org/optimist/-/optimist-0.3.7.tgz", - "integrity": "sha1-yQlBrVnkJzMokjB00s8ufLxuwNk=", - "dev": true, - "optional": true - }, - "orchestrator": { - "version": "0.3.8", - "resolved": "https://registry.npmjs.org/orchestrator/-/orchestrator-0.3.8.tgz", - "integrity": "sha1-FOfp4nZPcxX7rBhOUGx6pt+UrX4=", - "dev": true - }, - "ordered-read-streams": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.3.0.tgz", - "integrity": "sha1-cTfmmzKYuzQiR6G77jiByA4v14s=", - "dev": true - }, - "os-browserify": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.1.2.tgz", - "integrity": "sha1-ScoCk+CxlZCl9d4Qx/JlphfY/lQ=", - "dev": true - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", - "dev": true - }, - "pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha1-8/dSL073gjSNqBYbrZ7P1Rv4OnU=", - "dev": true - }, - "parents": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", - "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", - "dev": true - }, - "parse-asn1": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.0.tgz", - "integrity": "sha1-N8T5t+06tlx0gXtfJICTf7+XxxI=", - "dev": true - }, - "parse-filepath": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.1.tgz", - "integrity": "sha1-FZ1hVdQ5BNFsEO9piRHaHpGWm3M=", - "dev": true - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "dev": true, - "dependencies": { - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "dev": true - } - } - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", - "dev": true - }, - "path-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.0.tgz", - "integrity": "sha1-oLhwcpquIUAFt9UDLsLLuw+0RRo=", - "dev": true - }, - "path-dirname": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", - "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true - }, - "path-parse": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.5.tgz", - "integrity": "sha1-PBrfhx6pzWyUMbbqK9dKD/BVxME=", - "dev": true - }, - "path-platform": { - "version": "0.11.15", - "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", - "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", - "dev": true - }, - "path-root": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", - "dev": true - }, - "path-root-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", - "dev": true - }, - "pbkdf2": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.0.12.tgz", - "integrity": "sha1-vjZ4XFBn6kjYBv+SMojF91C2uKI=", - "dev": true - }, - "preserve": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/preserve/-/preserve-0.2.0.tgz", - "integrity": "sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=", - "dev": true - }, - "pretty-hrtime": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", - "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", - "dev": true - }, - "process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true - }, - "process-nextick-args": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-1.0.7.tgz", - "integrity": "sha1-FQ4gt1ZZCtP5EJPyWk8q2L/zC6M=", - "dev": true - }, - "public-encrypt": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.0.tgz", - "integrity": "sha1-OfaZ86RlYN1eusvKaTyvfGXBjMY=", - "dev": true - }, - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", - "dev": true - }, - "querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "dev": true - }, - "querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true - }, - "qunit": { - "version": "0.7.7", - "resolved": "https://registry.npmjs.org/qunit/-/qunit-0.7.7.tgz", - "integrity": "sha1-8ABvYLMakcQeWKupIUdXaHm0Jb0=", - "dev": true - }, - "qunitjs": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/qunitjs/-/qunitjs-1.10.0.tgz", - "integrity": "sha1-oBkY2tA0dlVyVPQLwCovxm12r3g=", - "dev": true - }, - "randomatic": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/randomatic/-/randomatic-1.1.7.tgz", - "integrity": "sha512-D5JUjPyJbaJDkuAazpVnSfVkLlpeO3wDlPROTMLGKG1zMFNFRgrciKo1ltz/AzNTkqE0HzDx655QOL51N06how==", - "dev": true, - "dependencies": { - "is-number": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", - "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", - "dev": true, - "dependencies": { - "kind-of": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", - "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", - "dev": true - } - } - }, - "kind-of": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", - "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", - "dev": true - } - } - }, - "randombytes": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz", - "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==", - "dev": true - }, - "read-only-stream": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-1.1.1.tgz", - "integrity": "sha1-Xad8eZ7ROI0++IoYRxu1kk+KC6E=", - "dev": true, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true - } - } - }, - "readable-stream": { - "version": "2.2.11", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.11.tgz", - "integrity": "sha512-h+8+r3MKEhkiVrwdKL8aWs1oc1VvBu33ueshOvS26RsZQ3Amhx/oO3TKe4lApSV9ueY6as8EAh7mtuFjdlhg9Q==", - "dev": true, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "safe-buffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", - "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=", - "dev": true - }, - "string_decoder": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.2.tgz", - "integrity": "sha1-sp4fThEl+pehA4K4pTNze3SR4Xk=", - "dev": true - } - } - }, - "readable-wrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/readable-wrap/-/readable-wrap-1.0.0.tgz", - "integrity": "sha1-O1ohHGMeEjA6VJkcgGwX564ga/8=", - "dev": true, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true - } - } - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", - "dev": true - }, - "regex-cache": { - "version": "0.4.3", - "resolved": "https://registry.npmjs.org/regex-cache/-/regex-cache-0.4.3.tgz", - "integrity": "sha1-mxpsNdTQ3871cRrmUejp09cRQUU=", - "dev": true - }, - "remove-trailing-separator": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.0.2.tgz", - "integrity": "sha1-abBi2XhyetFNxrVrpKt3L9jXBRE=", - "dev": true - }, - "repeat-element": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.2.tgz", - "integrity": "sha1-7wiaF40Ug7quTZPrmLT55OEdmQo=", - "dev": true - }, - "repeat-string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", - "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", - "dev": true - }, - "replace-ext": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-0.0.1.tgz", - "integrity": "sha1-KbvZIHinOfC8zitO5B6DeVNSKSQ=", - "dev": true - }, - "resolve": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz", - "integrity": "sha1-ZVkHw0aahoDcLeOidaj91paR8OU=", - "dev": true - }, - "resolve-dir": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-0.1.1.tgz", - "integrity": "sha1-shklmlYC+sXFxJatiUpujMQwJh4=", - "dev": true - }, - "ripemd160": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.1.tgz", - "integrity": "sha1-D0WEKVxTo2KK9+bXmsohzlfRxuc=", - "dev": true - }, - "safe-buffer": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.0.tgz", - "integrity": "sha512-aSLEDudu6OoRr/2rU609gRmnYboRLxgDG1z9o2Q0os7236FwvcqIOO8r8U5JUEwivZOhDaKlFO4SbPTJYyBEyQ==", - "dev": true - }, - "semver": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", - "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=", - "dev": true - }, - "sequencify": { - "version": "0.0.7", - "resolved": "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz", - "integrity": "sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=", - "dev": true - }, - "sha.js": { - "version": "2.4.8", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.8.tgz", - "integrity": "sha1-NwaMLEdra69ALRSknGf1l5IfY08=", - "dev": true - }, - "shasum": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", - "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", - "dev": true - }, - "shell-quote": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-0.0.1.tgz", - "integrity": "sha1-GkEZbzwDM8SCMjWT1ohuzxU92YY=", - "dev": true - }, - "sigmund": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/sigmund/-/sigmund-1.0.1.tgz", - "integrity": "sha1-P/IfGYytIXX587eBhT/ZTQ0ZtZA=", - "dev": true - }, - "source-map": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz", - "integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=", - "dev": true - }, - "sparkles": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.0.tgz", - "integrity": "sha1-Gsu/tZJDbRC76PeFt8xvgoFQEsM=", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true, - "optional": true - }, - "stream-browserify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.1.tgz", - "integrity": "sha1-ZiZu5fm9uZQKTkUUyvtDu3Hlyds=", - "dev": true - }, - "stream-combiner2": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.0.2.tgz", - "integrity": "sha1-unKmtQy/q/qVD8i8h2BL0B62BnE=", - "dev": true, - "dependencies": { - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true - }, - "through2": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.5.1.tgz", - "integrity": "sha1-390BLrnHAOIyP9M084rGIqs3Lac=", - "dev": true - }, - "xtend": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-3.0.0.tgz", - "integrity": "sha1-XM50B7r2Qsunvs2laBEcST9ZZlo=", - "dev": true - } - } - }, - "stream-consume": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/stream-consume/-/stream-consume-0.1.0.tgz", - "integrity": "sha1-pB6tGm1ggc63n2WwYZAbbY89HQ8=", - "dev": true - }, - "stream-http": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-1.7.1.tgz", - "integrity": "sha1-09Km4Uw2o4udr7GZrue7xXBRmXg=", - "dev": true - }, - "stream-splicer": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-1.3.2.tgz", - "integrity": "sha1-PARBvhW5v04iYnXm3IOWR0VUZmE=", - "dev": true, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true - } - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true - }, - "strip-bom": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-1.0.0.tgz", - "integrity": "sha1-hbiGLzhEtabV7IRnqTWYFzo295Q=", - "dev": true - }, - "subarg": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", - "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", - "dev": true - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - }, - "syntax-error": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.3.0.tgz", - "integrity": "sha1-HtkmbE1AvnXcVb+bsct3Biu5bKE=", - "dev": true - }, - "through": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", - "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", - "dev": true - }, - "through2": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/through2/-/through2-1.1.1.tgz", - "integrity": "sha1-CEfLxESfNAVXTb3M2buEG4OsNUU=", - "dev": true, - "dependencies": { - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true - } - } - }, - "through2-filter": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-2.0.0.tgz", - "integrity": "sha1-YLxVoNrLdghdsfna6Zq0P4PWIuw=", - "dev": true, - "dependencies": { - "through2": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", - "integrity": "sha1-AARWmzfHx0ujnEPzzteNGtlBQL4=", - "dev": true - } - } - }, - "tildify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/tildify/-/tildify-1.2.0.tgz", - "integrity": "sha1-3OwD9V3Km3qj5bBPIYF+tW5jWIo=", - "dev": true - }, - "time-stamp": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", - "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", - "dev": true - }, - "timers-browserify": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", - "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", - "dev": true - }, - "to-absolute-glob": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-0.1.1.tgz", - "integrity": "sha1-HN+kcqnvUMI57maZm2YsoOs5k38=", - "dev": true - }, - "tracejs": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/tracejs/-/tracejs-0.1.8.tgz", - "integrity": "sha1-bCZ4exhT8TcWNGIsHIC8RAJsXXA=", - "dev": true - }, - "tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "dev": true - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", - "dev": true - }, - "uglify-js": { - "version": "2.3.6", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.3.6.tgz", - "integrity": "sha1-+gmEdwtCi3qbKoBY9GNV0U/vIRo=", - "dev": true, - "optional": true, - "dependencies": { - "source-map": { - "version": "0.1.43", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.1.43.tgz", - "integrity": "sha1-wkvBRspRfBRx9drL4lcbK3+eM0Y=", - "dev": true, - "optional": true - } - } - }, - "umd": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.1.tgz", - "integrity": "sha1-iuVW4RAR9jwllnCKiDclnwGz1g4=", - "dev": true - }, - "unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", - "dev": true - }, - "underscore": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", - "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", - "dev": true - }, - "unique-stream": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.2.1.tgz", - "integrity": "sha1-WqADz76Uxf+GbE59ZouxxNuts2k=", - "dev": true, - "dependencies": { - "json-stable-stringify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz", - "integrity": "sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8=", - "dev": true - } - } - }, - "url": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", - "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", - "dev": true, - "dependencies": { - "punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - } - } - }, - "user-home": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/user-home/-/user-home-1.1.1.tgz", - "integrity": "sha1-K1viOjK2Onyd640PKNSFcko98ZA=", - "dev": true - }, - "util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "dependencies": { - "inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - } - } - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "v8flags": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-2.1.1.tgz", - "integrity": "sha1-qrGh+jDUX4jdMhFIh1rALAtV5bQ=", - "dev": true - }, - "vinyl": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.5.3.tgz", - "integrity": "sha1-sEVbOPxeDPMNQyUTLkYZcMIJHN4=", - "dev": true - }, - "vinyl-fs": { - "version": "0.3.14", - "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-0.3.14.tgz", - "integrity": "sha1-mmhRzhysHBzqX+hsCTHWIMLPqeY=", - "dev": true, - "dependencies": { - "clone": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/clone/-/clone-0.2.0.tgz", - "integrity": "sha1-xhJqkK1Pctv1rNskPMN3JP6T/B8=", - "dev": true - }, - "glob-stream": { - "version": "3.1.18", - "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-3.1.18.tgz", - "integrity": "sha1-kXCl8St5Awb9/lmPMT+PeVT9FDs=", - "dev": true - }, - "ordered-read-streams": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz", - "integrity": "sha1-/VZamvjrRHO6abbtijQ1LLVS8SY=", - "dev": true - }, - "readable-stream": { - "version": "1.0.34", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", - "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", - "dev": true - }, - "through2": { - "version": "0.6.5", - "resolved": "https://registry.npmjs.org/through2/-/through2-0.6.5.tgz", - "integrity": "sha1-QaucZ7KdVyCQcUEOHXp6lozTrUg=", - "dev": true - }, - "unique-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-1.0.0.tgz", - "integrity": "sha1-1ZpKdUJ0R9mqbJHnAmP40mpLEEs=", - "dev": true - }, - "vinyl": { - "version": "0.4.6", - "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-0.4.6.tgz", - "integrity": "sha1-LzVsh6VQolVGHza76ypbqL94SEc=", - "dev": true - } - } - }, - "vm-browserify": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-0.0.4.tgz", - "integrity": "sha1-XX6kW7755Kb/ZflUOOCofDV9WnM=", - "dev": true - }, - "which": { - "version": "1.2.14", - "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", - "integrity": "sha1-mofEN48D6CfOyvGs31bHNsAcFOU=", - "dev": true - }, - "wordwrap": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", - "integrity": "sha1-o9XabNXAvAAI03I0u68b7WMFkQc=", - "dev": true - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "xtend": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", - "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=", - "dev": true - } - } -} diff --git a/package.json b/package.json index d5ef744..7b065d9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jsviews", - "version": "v0.9.89", + "version": "v0.9.90", "description": "Next-generation MVVM and MVP framework - built on top of JsRender templates. Bringing templates to life...", "main": "./jsviews.js", "author": { @@ -35,7 +35,7 @@ "glob-stream": "^5.0.0", "gulp": "^3.9.0", "jquery": "^2.1.4", - "jsrender": "^0.9.89", + "jsrender": "^0.9.90", "qunit": "^0.7.6" }, "dependencies": {} diff --git a/test/browserify/bundles/1-bundle.js b/test/browserify/bundles/1-bundle.js index 9e4a523..b2b4e90 100644 --- a/test/browserify/bundles/1-bundle.js +++ b/test/browserify/bundles/1-bundle.js @@ -1,5 +1,5 @@ (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o to string or (multiselect) array of strings if (sourceElem.multiple && sourceValues[0] === null) { @@ -1366,7 +1364,6 @@ function updateValues(sourceValues, tagElse, bindId, ev) { // Set linkCtx on view, dynamically, just during this handler call oldLinkCtx = view.linkCtx; view.linkCtx = linkCtx; - sourceElem._jsvChg = 1; // Set 'changing' marker to prevent tag change event triggering its own refresh l = tos.length; while (l--) { if (to = tos[l]) { @@ -1378,7 +1375,7 @@ function updateValues(sourceValues, tagElse, bindId, ev) { // binding to tag.ctx.foo._ocp - and we use original values, without applying cvtBack converter : sourceValues // Otherwise use the converted value )[l]; - if (sourceValue !== undefined && (!ev || !tag || !tag.onBeforeUpdateVal || tag.onBeforeUpdateVal(ev, { + if (sourceValue !== undefined && (!tag || !tag.onBeforeUpdateVal || tag.onBeforeUpdateVal(ev, { change: "change", data: target, path: to[1], @@ -1414,7 +1411,6 @@ function updateValues(sourceValues, tagElse, bindId, ev) { } } } - sourceElem._jsvChg = linkCtx.ev = undefined; // Clear marker view.linkCtx = oldLinkCtx; } } @@ -1449,50 +1445,6 @@ function onElemChange(ev) { } function onDataLinkedTagChange(ev, eventArgs) { - function callBeforeLink() { - // This code is executed depth last, e.g. for setting class or size of container tags/elements before data-linking the contents - // so that offsets on sliders, etc. are correct based on container geometry - and so dynamic sizing happens as soon as possible - // ater the elements have been instantiated. - if (!tag.flow) { - var mainElem, - props = tag.tagCtx.props, - bindTo = tag.bindTo || {}, - displayElem; - - if (tag.mainElement) { - // mainElement: - selector for identifying 'main' element in template/rendered content - e.g. for jQueryUI widget controls: the widget element. - // (But for tag bindings on data-linked elements, defaults to data-linked element) - tag.mainElem = tag.inline ? tag.contents(true, tag.mainElement).first() : $(target); - } - - if (tag.onBeforeBind && tag._.unlinked) { - tag.onBeforeBind(tag.tagCtx, linkCtx, tag.ctx, ev, eventArgs); - } - - if (mainElem = tag.mainElem || tag.linkedElem) { // tag.mainElem, tag.linkedElem and tag.displayElem can be set in tag.onBeforeBind - if (props.id && !mainElem[0].id) { - mainElem[0].id = props.id; - } - if (tag.setSize) { - if (props.height && !bindTo.height) { - mainElem.height(props.height); - } - if (props.width && !bindTo.width) { - mainElem.width(props.width); - } - } - } - - if (props["class"] && !bindTo["class"] && (displayElem = tag.displayElem || mainElem)) { - // This code supports dynamic binding to class - where it adds the class if absent, and removes/adds if a previous value is present - if (eventArgs && displayElem.hasClass(eventArgs.oldValue)) { - displayElem.removeClass(eventArgs.oldValue); - } - displayElem.addClass(props["class"]); - } - } - } - // Update or initial rendering of any tag (including {{:}}) whether inline or data-linked element. var attr, sourceValue, noUpdate, forceUpdate, hasError, onError, bindEarly, linkCtx = this, @@ -1508,7 +1460,7 @@ function onDataLinkedTagChange(ev, eventArgs) { // Set linkCtx on view, dynamically, just during this handler call view.linkCtx = linkCtx; - if (parentElem && (!onEvent || onEvent.call(linkCtx, ev, eventArgs) !== false) + if (parentElem && (!onEvent || onEvent.call(tag || linkCtx, ev, eventArgs) !== false) // If data changed, the ev.data is set to be the path. Use that to filter the handler action... && (!eventArgs || ev.data.prop === "*" || ev.data.prop === eventArgs.path)) { @@ -1550,18 +1502,17 @@ function onDataLinkedTagChange(ev, eventArgs) { mergeCtxs(tag, sourceValue, forceUpdate); // Merge new tagCtxs (in sourceValue var) with current tagCtxs on tag instance - callBeforeLink(); - if (target._jsvChg && (attr === HTML || attr === VALUE) || noUpdate || attr === NONE) { + if (tag._.chg && (attr === HTML || attr === VALUE) || noUpdate || attr === NONE) { // This is an update coming from the tag itself (linkedElem change), or else onUpdate returned false, or attr === "none" callAfterLink(tag, ev, eventArgs); - if (!target._jsvChg) { + if (!tag._.chg) { // onUpdate returned false, or attr === "none" - so don't refresh the tag: we just use the new tagCtxs merged // from the sourceValue (which may optionally have been modifed in onUpdate()...) and then bind, and we are done observeAndBind(linkCtx, source, target); } view.linkCtx = oldLinkCtx; if (eventArgs && (onEvent = changeHandler(view, onAfterChangeStr, tag))) { - onEvent.call(linkCtx, ev, eventArgs); + onEvent.call(tag || linkCtx, ev, eventArgs); } return; } @@ -1571,7 +1522,7 @@ function onDataLinkedTagChange(ev, eventArgs) { } sourceValue = tag.tagName === ":" // Call convertVal if it is a {{cvt:...}} - otherwise call renderTag - ? $sub._cnvt(tag.cvt, view, sourceValue[0]) // convertVal() // convertVal(converter, view, tagCtx, onError) + ? $sub._cnvt(tag.convert, view, sourceValue[0]) // convertVal() // convertVal(converter, view, tagCtx, onError) : $sub._tag(tag, view, view.tmpl, sourceValue, true, onError); // renderTag(tagName, parentView, tmpl, tagCtxs, isUpdate, onError) } else if (linkFn._tag) { // For {{: ...}} with either cvt or cvtBack we call convertVal to get the sourceValue and instantiate the tag @@ -1582,7 +1533,6 @@ function onDataLinkedTagChange(ev, eventArgs) { : $sub._tag(linkFn._tag, view, view.tmpl, sourceValue, true, onError); // renderTag(tagName, parentView, tmpl, tagCtxs, isUpdate, onError) addLinkMethods(tag = linkCtx.tag); // In both convertVal and renderTag we have instantiated a tag - callBeforeLink(); attr = linkCtx.attr || attr; // linkCtx.attr may have been set to tag.attr during tag instantiation in renderTag } if (bindEarly = tag && !tag.inline && tag.template) { @@ -1597,8 +1547,6 @@ function onDataLinkedTagChange(ev, eventArgs) { tag._er = hasError; callAfterLink(tag, ev, eventArgs); } - } else { - callBeforeLink(); } if (!bindEarly) { @@ -1606,7 +1554,7 @@ function onDataLinkedTagChange(ev, eventArgs) { } if (eventArgs && (onEvent = changeHandler(view, onAfterChangeStr, tag))) { - onEvent.call(linkCtx, ev, eventArgs); + onEvent.call(tag || linkCtx, ev, eventArgs); } // Remove dynamically added linkCtx from view view.linkCtx = oldLinkCtx; @@ -1623,7 +1571,7 @@ function updateContent(sourceValue, linkCtx, attr, tag) { // When called (in onDataLinkedTagChange) for target HTML returns true // When called (in onDataLinkedTagChange) for other targets returns boolean for "changed" var setter, prevNode, nextNode, late, nodesToRemove, useProp, tokens, id, openIndex, closeIndex, testElem, nodeName, cStyle, jsvSel, - renders = attr !== NONE && sourceValue !== undefined && !linkCtx._noUpd && !(linkCtx.elem._jsvChg && (attr === VALUE || attr === HTML)), + renders = attr !== NONE && sourceValue !== undefined && !linkCtx._noUpd && !((attr === VALUE || attr === HTML) && (tag ? tag._.chg : linkCtx.elem._jsvChg)), // For data-link="^{...}", don't update the first time (no initial render) - e.g. to leave server rendered values. source = linkCtx.data, target = tag && tag.parentElem || linkCtx.elem, @@ -1724,7 +1672,6 @@ function updateContent(sourceValue, linkCtx, attr, tag) { view.linkCtx = linkCtx; if (tag && tag.inline) { nodesToRemove = tag.nodes(true); - bindingStore[tag._tgId].to = undefined; if (tag._elCnt) { if (prevNode && prevNode !== nextNode) { // This prevNode will be removed from the DOM, so transfer the view tokens on prevNode to nextNode of this 'viewToRefresh' @@ -2002,24 +1949,25 @@ function addBindingMarkers(value, view, tag) { //--------------- function observeAndBind(linkCtx, source, target) { - var binding, l, k, linkedElem, exprFnDeps, exprOb, prop, propDeps, depends, bindId, linkedElems, + var binding, l, k, linkedElem, exprFnDeps, exprOb, prop, propDeps, depends, tagDepends, bindId, linkedElems, tag = linkCtx.tag, cvtBk = linkCtx.convertBack, handler = linkCtx._hdl; + source = typeof source === "object" && source; // If not an object set to false if (tag) { // Use the 'depends' paths set on linkCtx.tag, or on the converter // - which may have been set on declaration or in events: init, render, onAfterLink etc. - if (depends = tag.cvt) { - depends = depends === "true" ? tag.tagCtx.props.convert : linkCtx.view.getRsc("converters", depends); + if (depends = tag.convert) { + depends = depends === TRUE ? tag.tagCtx.props.convert : depends; + depends = linkCtx.view.getRsc("converters", depends) || depends; depends = depends && depends.depends; + depends = depends && $sub._dp(depends, source, handler); // dependsPaths + } + if (tagDepends = tag.depends) { + tagDepends = $sub._dp(tagDepends, tag, handler); + depends = depends ? depends.concat(tagDepends) : tagDepends; } - depends = tag.depends - ? depends - ? tag.depends.concat(depends) - : tag.depends - : depends; - depends = depends && $sub._dp(depends, tag, handler); // dependsPaths linkedElems = tag.linkedElems; } depends = depends || []; @@ -2537,7 +2485,7 @@ function viewLink(outerData, parentNode, prevNode, nextNode, html, refresh, cont } } - function dataLink(late) { + function dataLink() { //================ Data-link and fixup of data-jsv annotations ================ var j, index, tokens = "", @@ -2813,7 +2761,7 @@ function viewLink(outerData, parentNode, prevNode, nextNode, html, refresh, cont // Insert into the DOM parentNode.insertBefore(fragment, nextNode); } - dataLink(late); + dataLink(); return late; } @@ -3044,56 +2992,129 @@ function normalizeLinkTag(linkMarkup, twoway) { //=========================== function callAfterLink(tag, ev, eventArgs) { - var linkedElems, linkedElements, linkedElem, l, m, $linkCtxElem, tagCtxElse, + function copyFromTagCtxToTag() { + linkedElems = tagCtx.linkedElems || tag.linkedElems || tag.linkedElem && [tag.linkedElem]; + if (linkedElems) { + tag.linkedElems = tagCtx.linkedElems = linkedElems; + tag.linkedElem = linkedElems[0] = tag.linkedElem || linkedElems[0]; + } + if (linkedElem = tagCtx.mainElem || tag.mainElem) { + tagCtx.mainElem = tag.mainElem = linkedElem; + } + if (linkedElem = tagCtx.displayElem || tag.displayElem) { + tagCtx.displayElem = tag.displayElem = linkedElem; + } + } + + var linkedElems, linkedElements, linkedElem, l, m, $linkCtxElem, linkCtxElem, tagCtxElse, props, val, oldVal, tagCtx = tag.tagCtx, + tagCtxs = tag.tagCtxs, + tagCtxslength = tagCtxs && tagCtxs.length, linkCtx = tag.linkCtx, - bindTo = tag.bindTo; + bindTo = tag.bindTo || {}; if (tag._.unlinked) { // First call to onAfterLink, or first call after onUpdate: updateContent. Initialize and call onBind and set properties $linkCtxElem = $(linkCtx.elem); - if (linkedElements = tag.linkedElement) { - // tag.linkedElement: - selector, or array of selectors, for identifying linked elements in template/rendered content. - // (But for tag bindings on data-linked elements, defaults to data-linked element) - m = tag.tagCtxs.length; - while (m--) { - tagCtxElse = tag.tagCtxs[m]; + if (tag.linkedElement || tag.mainElement || tag.displayElement) { + if (linkedElements = tag.linkedElement) { + // tag.linkedElement: - selector, or array of selectors, for identifying linked elements in template/rendered content. + // (But for tag bindings on data-linked elements, defaults to data-linked element) + tag.linkedElem = undefined; l = linkedElements.length; - linkedElems = tagCtxElse.linkedElems = tagCtxElse.linkedElems || new Array(l); while (l--) { if (linkedElements[l]) { - linkedElem = tag.inline ? tagCtxElse.contents(true, linkedElements[l]) : $linkCtxElem; - if ((linkedElem[0]) && linkedElem[0].type !== RADIO) { - linkedElem = linkedElem.first(); - if (!linkedElem[0]._jsvLkEl) { - linkedElems[l] = linkedElem; + m = tagCtxslength; + while (m--) { + linkCtxElem = !m && !tag.inline && $linkCtxElem.filter(linkedElements[l]); + tagCtxElse = tagCtxs[m]; + linkedElems = tagCtxElse.linkedElems = tagCtxElse.linkedElems || new Array(l); + linkedElem = linkCtxElem[0] ? linkCtxElem : tagCtxElse.contents(true, linkedElements[l]); + if (linkedElem[0] && linkedElem[0].type !== RADIO) { + linkedElems[l] = linkedElem.eq(0); } } } } } - tag.linkedElems = tagCtx.linkedElems; - tag.linkedElem = tag.linkedElems[0]; + if (linkedElements = tag.mainElement) { + // tag.mainElement: - selector for identifying mainElem in template/rendered content + // (But for tag bindings on data-linked elements, defaults to data-linked element) + m = tagCtxslength; + while (m--) { + linkCtxElem = !m && !tag.inline && $linkCtxElem.filter(linkedElements); + tagCtxElse = tagCtxs[m]; + linkedElem = linkCtxElem[0] ? linkCtxElem : tagCtxElse.contents(true, linkedElements).eq(0); + if (linkedElem[0]) { + tagCtxElse.mainElem = linkedElem; + } + } + } + if (linkedElements = tag.displayElement) { + // tag.mainElement: - selector for identifying mainElem in template/rendered content + // (But for tag bindings on data-linked elements, defaults to data-linked element) + m = tagCtxslength; + while (m--) { + linkCtxElem = !m && !tag.inline && $linkCtxElem.filter(linkedElements); + tagCtxElse = tagCtxs[m]; + linkedElem = linkCtxElem[0] ? linkCtxElem : tagCtxElse.contents(true, linkedElements).eq(0); + if (linkedElem[0]) { + tagCtxElse.displayElem = linkedElem; + if (!m) { + tag.displayElem = linkedElem; + } + } + } + } + copyFromTagCtxToTag(); } if (tag.onBind) { tag.onBind(tagCtx, linkCtx, tag.ctx, ev, eventArgs); + copyFromTagCtxToTag(); + } + } + + m = tagCtxslength; + while (m--) { + tagCtxElse = tagCtxs[m]; + props = tagCtxElse.props; + + if (linkedElem = tagCtxElse.mainElem || !tag.mainElement && tagCtxElse.linkedElems && tagCtxElse.linkedElems[0]) { + // linkedElem is the mainElem (defaulting to linkedElem) + if (linkedElem[0] && props.id && !linkedElem[0].id) { + linkedElem[0].id = props.id; + } + if (tag.setSize) { + if (val = !bindTo.height && props.height || tag.height) { + linkedElem.height(val); + } + if (val = !bindTo.width && props.width || tag.width) { + linkedElem.width(val); + } + } + } + + if (val = (linkedElem = tagCtxElse.displayElem || linkedElem) && (!bindTo["class"] && props["class"] || tag.className)) { + // This code supports dynamic binding to class - where it adds the class if absent, and removes/adds if a previous value is present + oldVal = linkedElem[0]._jsvCl; + if (val !== oldVal) { + if (linkedElem.hasClass(oldVal)) { + linkedElem.removeClass(oldVal); + } + linkedElem.addClass(val); + linkedElem[0]._jsvCl = val; + } } } if (tag.onAfterLink) { tag.onAfterLink(tagCtx, linkCtx, tag.ctx, ev, eventArgs); + copyFromTagCtxToTag(); } - // linkedElems may be set programmatically in onBind or onAfterLink, rather than declaratively, via tag.linkedElements - if (linkedElems = tagCtx.linkedElems || tag.linkedElems || tag.linkedElem && [tag.linkedElem]) { - tag.linkedElems = tagCtx.linkedElems = linkedElems; - tag.linkedElem = linkedElems[0] = tag.linkedElem || tag.linkedElems[0]; - } - if (!tag.flow && !linkCtx.elem._jsvChg) { + if (!tag.flow && !tag._.chg) { if (tag.inline && tag._.unlinked && (tag.linkedElems || bindTo)) { defineBindToDataTargets(bindingStore[tag._tgId], tag); } - - bindTo = bindTo || {}; tag.setValue(); } tag._.unlinked = undefined; @@ -3128,6 +3149,9 @@ function bindLinkedElChange(tag, linkedElem) { if (tag) { newTrig = tag.tagCtx.props.trigger; + if (newTrig === undefined) { + newTrig = tag.trigger; + } } if (newTrig === undefined) { newTrig = $subSettings.trigger; @@ -3196,7 +3220,7 @@ function defineBindToDataTargets(binding, tag, cvtBk) { to = [tag.tagCtxs[tagElse].ctx[linkedCtxParam[k]][0], _ocp]; } } - if ((obsCtxPrm = to._cxp) && obsCtxPrm.tag) { + if ((obsCtxPrm = to._cxp) && obsCtxPrm.tag && lastPath.indexOf(".")<0) { // This is a binding for a tag contextual parameter (e.g. within a tag block content to = obsCtxPrm; } @@ -3268,6 +3292,7 @@ function mergeCtxs(tag, newCtxs, replace) { // Merge updated tagCtxs into tag.ta // Replace previous tagCtxs by new ones, rather than merging tagCtxs = tag.tagCtxs = newCtxs; tag.tagCtx = tagCtxs[0]; + addLinkMethods(tag); } else { while (l--) { tagCtx = tagCtxs[l]; @@ -3591,7 +3616,7 @@ function setValues() { m = args.length; if (!m) { - args = this.tag.cvtArgs(undefined, 1, this.index); // setValues() with no arguments calls setValue with boundArgs values + args = this.tag.cvtArgs(true, this.index); // setValues() with no arguments calls setValue with boundArgs values m = args.length; } while (m--) { @@ -3721,68 +3746,66 @@ function addLinkMethods(tagOrView) { // tagOrView is View prototype or tag insta } theTag.setValue = $sub._gm(theTag.constructor.prototype.setValue, function(val, index, tagElse) { - if (!theTag._.chg) { // if the tag is not updating itself - if (!arguments.length) { // tag.setValue() calls setValue(val, index) for each parameter in bindTo array - theTag.setValues(); // = theTag.bndArgs() - return theTag; - } - var linkedElem, linkedEl, linkedTag, - linkedCtxParam = theTag.linkedCtxParam, - tagCtx = theTag.tagCtxs[tagElse || 0], - props = tagCtx.props, - linkCtx = theTag.linkCtx, - linkedElems = tagCtx.linkedElems || theTag.linkedElem && [theTag.linkedElem]; - - if (val !== undefined) { - theTag.base.call(theTag , val, index, tagElse); - } else if (theTag.getValue && (val = theTag.getValue(tagElse)) && val !== undefined) { - // If bound args are not initialized, and getValue is defined, use getValue to initialize - if (theTag.bindTo.length > 1) { - val = val[index]; // getVal returns value if tag.bndArgs() (and bindTo) length is 1, or array of values if bindTo.length > 1 - } - if (linkedCtxParam && linkedCtxParam[index]) { - // Values of tag contextual param were already intialized (during rendering) so need to observably update to values from tag.getValue() - $.observable(tagCtx.ctx[linkedCtxParam[index]][0]).setProperty(_ocp, val); - } + if (!arguments.length) { // tag.setValue() calls setValue(val, index) for each parameter in bindTo array + theTag.setValues(); // = theTag.bndArgs() + return theTag; + } + var linkedElem, linkedEl, linkedTag, + linkedCtxParam = theTag.linkedCtxParam, + tagCtx = theTag.tagCtxs[tagElse || 0], + props = tagCtx.props, + linkCtx = theTag.linkCtx, + linkedElems = tagCtx.linkedElems || theTag.linkedElem && [theTag.linkedElem]; + + if (val !== undefined) { + theTag.base.call(theTag , val, index, tagElse); + } else if (theTag.getValue && (val = theTag.getValue(tagElse)) && val !== undefined) { + // If bound args are not initialized, and getValue is defined, use getValue to initialize + if (theTag.bindTo.length > 1) { + val = val[index]; // getVal returns value if tag.bndArgs() (and bindTo) length is 1, or array of values if bindTo.length > 1 } - if ((linkedElem = linkedElems && linkedElems[index]) && linkedElem[0]) { - l = linkedElem.length; - while (l--) { - linkedEl = linkedElem[l]; - if (theTag._.unlinked && linkedEl !== linkCtx.elem) { - linkedTag = linkedEl._jsvLkEl; - if (theTag.inline && (!linkedTag || linkedTag !== theTag)) { - if (linkedTag) { - val = linkedTag.cvtArgs(undefined, 1, tagElse)[index]; // Need to use converter of linked tag - } - // For data-linked tags, identify the linkedEl with the tag, for "to" binding - // (For data-linked elements, if not yet bound, we identify later when the linkCtx.elem is bound) - linkedEl._jsvLkEl = theTag; - linkedEl._jsvInd = index; - linkedEl._jsvElse = tagElse; - bindLinkedElChange(theTag, linkedEl); - linkedEl._jsvBnd = "&" + theTag._tgId + "+"; // Add a "+" for cloned binding - so removing - // elems with cloned bindings will not remove the 'parent' binding from the bindingStore. + if (linkedCtxParam && linkedCtxParam[index]) { + // Values of tag contextual param were already intialized (during rendering) so need to observably update to values from tag.getValue() + $.observable(tagCtx.ctx[linkedCtxParam[index]][0]).setProperty(_ocp, val); + } + } + if ((linkedElem = linkedElems && linkedElems[index]) && linkedElem[0]) { + l = linkedElem.length; + while (l--) { + linkedEl = linkedElem[l]; + if (theTag._.unlinked) { + linkedTag = linkedEl._jsvLkEl; + if (!linkedTag || linkedTag !== theTag) { + if (linkedTag) { + val = linkedTag.cvtArgs(true, tagElse)[index]; // Need to use converter of linked tag } + // For data-linked tags, identify the linkedEl with the tag, for "to" binding + // (For data-linked elements, if not yet bound, we identify later when the linkCtx.elem is bound) + linkedEl._jsvLkEl = theTag; + linkedEl._jsvInd = index; + linkedEl._jsvElse = tagElse; + bindLinkedElChange(theTag, linkedEl); + linkedEl._jsvBnd = "&" + theTag._tgId + "+"; // Add a "+" for cloned binding - so removing + // elems with cloned bindings will not remove the 'parent' binding from the bindingStore. } - if (val !== undefined && !linkedEl._jsvChg && linkCtx._val !== val) { - if (linkedEl.value !== undefined) { - if (linkedEl.type === CHECKBOX) { - linkedEl[CHECKED] = val && val !== "false"; - } else if (linkedEl.type === RADIO) { - linkedEl[CHECKED] = (linkedEl.value === val); - } else if ($isArray(val)) { - linkedEl.value = val; // Don't use jQuery since it replaces array by mapped clone - } else { - $(linkedEl).val(val); // Use jQuery for attrHooks - can't just set value (on select, for example) - } - } else if (linkedEl.contentEditable === TRUE) { - linkedEl.innerHTML = val; + } + if (val !== undefined && !linkedEl._jsvChg && linkCtx._val !== val) { + if (linkedEl.value !== undefined) { + if (linkedEl.type === CHECKBOX) { + linkedEl[CHECKED] = val && val !== "false"; + } else if (linkedEl.type === RADIO) { + linkedEl[CHECKED] = (linkedEl.value === val); + } else if ($isArray(val)) { + linkedEl.value = val; // Don't use jQuery since it replaces array by mapped clone + } else { + $(linkedEl).val(val); // Use jQuery for attrHooks - can't just set value (on select, for example) } + } else if (linkedEl.contentEditable === TRUE) { + linkedEl.innerHTML = val; } - if (props.name) { - linkedEl.name = linkedEl.name || props.name; - } + } + if (props.name) { + linkedEl.name = linkedEl.name || props.name; } } } @@ -4117,7 +4140,7 @@ $tags({ tag.attr = HTML; } }, - onBeforeBind: function() { + onBind: function() { if (this.template) { // {^{on/}} with no content has template rendering