From 5661bae86bdcfc60f38462d0d15dadc29b93f3c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=A3=8A?= Date: Wed, 9 Sep 2015 08:47:52 +0800 Subject: [PATCH] fix bug --- dist/nuclear.js | 6 ++++-- dist/nuclear.min.js | 2 +- src/core.js | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/dist/nuclear.js b/dist/nuclear.js index 43135dc73..ebc3fb554 100644 --- a/dist/nuclear.js +++ b/dist/nuclear.js @@ -2023,8 +2023,10 @@ Nuclear._mixObj = function (obj) { this.node = newNode; } } else { - item.parent.insertAdjacentHTML("beforeEnd", Nuclear.Tpl.render(Nuclear._fixEvent(Nuclear._fixTplIndex(item.tpl), this._ncInstanceId), item.data)); - this.node = item.parent.lastChild; + if (!Nuclear.isUndefined(item.tpl)) { + item.parent.insertAdjacentHTML("beforeEnd", Nuclear.Tpl.render(Nuclear._fixEvent(Nuclear._fixTplIndex(item.tpl), this._ncInstanceId), item.data)); + this.node = item.parent.lastChild; + } } window["_nuclearIndex"] = null; if (this.node) { diff --git a/dist/nuclear.min.js b/dist/nuclear.min.js index 20927eede..aef3eedb1 100644 --- a/dist/nuclear.min.js +++ b/dist/nuclear.min.js @@ -3,5 +3,5 @@ * Github: https://github.com/AlloyTeam/Nuclear * MIT Licensed. */ -!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():"function"==typeof define&&define.cmd&&define(function(t,n,r){r.exports=e()}),t.$=t.Nuclear=e()}(this,function(){var t=function(){function t(t){return null==t?String(t):W[X.call(t)]||"object"}function e(e){return"function"==t(e)}function n(t){return null!=t&&t==t.window}function r(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function i(e){return"object"==t(e)}function o(t){return i(t)&&!n(t)&&Object.getPrototypeOf(t)==Object.prototype}function s(t){return"number"==typeof t.length}function a(t){return O.call(t,function(t){return null!=t})}function c(t){return t.length>0?E.fn.concat.apply([],t):t}function u(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function l(t){return t in L?L[t]:L[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function f(t,e){return"number"!=typeof e||R[u(t)]?e:e+"px"}function h(t){var e,n;return A[t]||(e=N.createElement(t),N.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),A[t]=n),A[t]}function p(t){return"children"in t?S.call(t.children):E.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function d(t,e,n){for(T in e)n&&(o(e[T])||J(e[T]))?(o(e[T])&&!o(t[T])&&(t[T]={}),J(e[T])&&!J(t[T])&&(t[T]=[]),d(t[T],e[T],n)):e[T]!==w&&(t[T]=e[T])}function m(t,e){return null==e?E(t):E(t).filter(e)}function v(t,n,r,i){return e(n)?n.call(t,r,i):n}function g(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function y(t,e){var n=t.className||"",r=n&&n.baseVal!==w;return e===w?r?n.baseVal:n:void(r?n.baseVal=e:t.className=e)}function x(t){try{return t?"true"==t||("false"==t?!1:"null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?E.parseJSON(t):t):t}catch(e){return t}}function b(t,e){e(t);for(var n=0,r=t.childNodes.length;r>n;n++)b(t.childNodes[n],e)}var w,T,E,_,P,C,j=[],S=j.slice,O=j.filter,N=window.document,A={},L={},R={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},M=/^\s*<(\w+|!)[^>]*>/,I=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,$=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,k=/^(?:body|html)$/i,D=/([A-Z])/g,H=["val","css","html","text","data","width","height","offset"],F=["after","prepend","before","append"],q=N.createElement("table"),U=N.createElement("tr"),z={tr:N.createElement("tbody"),tbody:q,thead:q,tfoot:q,td:U,th:U,"*":N.createElement("div")},V=/complete|loaded|interactive/,Z=/^[\w-]*$/,W={},X=W.toString,B={},Y=N.createElement("div"),G={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},J=Array.isArray||function(t){return t instanceof Array};return B.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=Y).appendChild(t),r=~B.qsa(i,e).indexOf(t),o&&Y.removeChild(t),r},P=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},C=function(t){return O.call(t,function(e,n){return t.indexOf(e)==n})},B.fragment=function(t,e,n){var r,i,s;return I.test(t)&&(r=E(N.createElement(RegExp.$1))),r||(t.replace&&(t=t.replace($,"<$1>")),e===w&&(e=M.test(t)&&RegExp.$1),e in z||(e="*"),s=z[e],s.innerHTML=""+t,r=E.each(S.call(s.childNodes),function(){s.removeChild(this)})),o(n)&&(i=E(r),E.each(n,function(t,e){H.indexOf(t)>-1?i[t](e):i.attr(t,e)})),r},B.Z=function(t,e){return t=t||[],t.__proto__=E.fn,t.selector=e||"",t},B.isZ=function(t){return t instanceof B.Z},B.init=function(t,n){var r;if(!t)return B.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&M.test(t))r=B.fragment(t,RegExp.$1,n),t=null;else{if(n!==w)return E(n).find(t);r=B.qsa(N,t)}else{if(e(t))return E(N).ready(t);if(B.isZ(t))return t;if(J(t))r=a(t);else if(i(t))r=[t],t=null;else if(M.test(t))r=B.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==w)return E(n).find(t);r=B.qsa(N,t)}}return B.Z(r,t)},E=function(t,e){return B.init(t,e)},E.extend=function(t){var e,n=S.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){d(t,n,e)}),t},B.qsa=function(t,e){var n,i="#"==e[0],o=!i&&"."==e[0],s=i||o?e.slice(1):e,a=Z.test(s);return r(t)&&a&&i?(n=t.getElementById(s))?[n]:[]:1!==t.nodeType&&9!==t.nodeType?[]:S.call(a&&!i?o?t.getElementsByClassName(s):t.getElementsByTagName(e):t.querySelectorAll(e))},E.contains=N.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},E.type=t,E.isFunction=e,E.isWindow=n,E.isArray=J,E.isPlainObject=o,E.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},E.inArray=function(t,e,n){return j.indexOf.call(e,t,n)},E.camelCase=P,E.trim=function(t){return null==t?"":String.prototype.trim.call(t)},E.uuid=0,E.support={},E.expr={},E.map=function(t,e){var n,r,i,o=[];if(s(t))for(r=0;r=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return j.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return e(t)?this.not(this.not(t)):E(O.call(this,function(e){return B.matches(e,t)}))},add:function(t,e){return E(C(this.concat(E(t,e))))},is:function(t){return this.length>0&&B.matches(this[0],t)},not:function(t){var n=[];if(e(t)&&t.call!==w)this.each(function(e){t.call(this,e)||n.push(this)});else{var r="string"==typeof t?this.filter(t):s(t)&&e(t.item)?S.call(t):E(t);this.forEach(function(t){r.indexOf(t)<0&&n.push(t)})}return E(n)},has:function(t){return this.filter(function(){return i(t)?E.contains(this,t):E(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!i(t)?t:E(t)},last:function(){var t=this[this.length-1];return t&&!i(t)?t:E(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?E(t).filter(function(){var t=this;return j.some.call(n,function(e){return E.contains(e,t)})}):1==this.length?E(B.qsa(this[0],t)):this.map(function(){return B.qsa(this,t)}):E()},closest:function(t,e){var n=this[0],i=!1;for("object"==typeof t&&(i=E(t));n&&!(i?i.indexOf(n)>=0:B.matches(n,t));)n=n!==e&&!r(n)&&n.parentNode;return E(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=E.map(n,function(t){return(t=t.parentNode)&&!r(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return m(e,t)},parent:function(t){return m(C(this.pluck("parentNode")),t)},children:function(t){return m(this.map(function(){return p(this)}),t)},contents:function(){return this.map(function(){return S.call(this.childNodes)})},siblings:function(t){return m(this.map(function(t,e){return O.call(p(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return E.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=h(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var n=e(t);if(this[0]&&!n)var r=E(t).get(0),i=r.parentNode||this.length>1;return this.each(function(e){E(this).wrapAll(n?t.call(this,e):i?r.cloneNode(!0):r)})},wrapAll:function(t){if(this[0]){E(this[0]).before(t=E(t));for(var e;(e=t.children()).length;)t=e.first();E(t).append(this)}return this},wrapInner:function(t){var n=e(t);return this.each(function(e){var r=E(this),i=r.contents(),o=n?t.call(this,e):t;i.length?i.wrapAll(o):r.append(o)})},unwrap:function(){return this.parent().each(function(){E(this).replaceWith(E(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=E(this);(t===w?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return E(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return E(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;E(this).empty().append(v(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=v(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this[0].textContent:null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(i(t))for(T in t)g(this,T,t[T]);else g(this,t,v(this,e,n,this.getAttribute(t)))}):this.length&&1===this[0].nodeType?!(n=this[0].getAttribute(t))&&t in this[0]?this[0][t]:n:w},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){g(this,t)},this)})},prop:function(t,e){return t=G[t]||t,1 in arguments?this.each(function(n){this[t]=v(this,e,n,this[t])}):this[0]&&this[0][t]},data:function(t,e){var n="data-"+t.replace(D,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,e):this.attr(n);return null!==r?x(r):w},val:function(t){return 0 in arguments?this.each(function(e){this.value=v(this,t,e,this.value)}):this[0]&&(this[0].multiple?E(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var n=E(this),r=v(this,t,e,n.offset()),i=n.offsetParent().offset(),o={top:r.top-i.top,left:r.left-i.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,n){if(arguments.length<2){var r,i=this[0];if(!i)return;if(r=getComputedStyle(i,""),"string"==typeof e)return i.style[P(e)]||r.getPropertyValue(e);if(J(e)){var o={};return E.each(e,function(t,e){o[e]=i.style[P(e)]||r.getPropertyValue(e)}),o}}var s="";if("string"==t(e))n||0===n?s=u(e)+":"+f(e,n):this.each(function(){this.style.removeProperty(u(e))});else for(T in e)e[T]||0===e[T]?s+=u(T)+":"+f(T,e[T])+";":this.each(function(){this.style.removeProperty(u(T))});return this.each(function(){this.style.cssText+=";"+s})},index:function(t){return t?this.indexOf(E(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?j.some.call(this,function(t){return this.test(y(t))},l(t)):!1},addClass:function(t){return t?this.each(function(e){if("className"in this){_=[];var n=y(this),r=v(this,t,e,n);r.split(/\s+/g).forEach(function(t){E(this).hasClass(t)||_.push(t)},this),_.length&&y(this,n+(n?" ":"")+_.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===w)return y(this,"");_=y(this),v(this,t,e,_).split(/\s+/g).forEach(function(t){_=_.replace(l(t)," ")}),y(this,_.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var r=E(this),i=v(this,t,n,y(this));i.split(/\s+/g).forEach(function(t){(e===w?!r.hasClass(t):e)?r.addClass(t):r.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===w?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===w?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),r=k.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(E(t).css("margin-top"))||0,n.left-=parseFloat(E(t).css("margin-left"))||0,r.top+=parseFloat(E(e[0]).css("border-top-width"))||0,r.left+=parseFloat(E(e[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||N.body;t&&!k.test(t.nodeName)&&"static"==E(t).css("position");)t=t.offsetParent;return t})}},E.fn.detach=E.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});E.fn[t]=function(i){var o,s=this[0];return i===w?n(s)?s["inner"+e]:r(s)?s.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){s=E(this),s.css(t,v(this,i,e,s[t]()))})}}),F.forEach(function(e,n){var r=n%2;E.fn[e]=function(){var e,i,o=E.map(arguments,function(n){return e=t(n),"object"==e||"array"==e||null==n?n:B.fragment(n)}),s=this.length>1;return o.length<1?this:this.each(function(t,e){i=r?e:e.parentNode,e=0==n?e.nextSibling:1==n?e.firstChild:2==n?e:null;var a=E.contains(N.documentElement,i);o.forEach(function(t){if(s)t=t.cloneNode(!0);else if(!i)return E(t).remove();i.insertBefore(t,e),a&&b(t,function(t){null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src||window.eval.call(window,t.innerHTML)})})})},E.fn[r?e+"To":"insert"+(n?"Before":"After")]=function(t){return E(t)[e](this),this}}),B.Z.prototype=E.fn,B.uniq=C,B.deserializeValue=x,E.nuclear=B,E}();return function(t){function e(t){return t._zid||(t._zid=h++)}function n(t,n,o,s){if(n=r(n),n.ns)var a=i(n.ns);return(v[e(t)]||[]).filter(function(t){return!(!t||n.e&&t.e!=n.e||n.ns&&!a.test(t.ns)||o&&e(t.fn)!==e(o)||s&&t.sel!=s)})}function r(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function i(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function o(t,e){return t.del&&!y&&t.e in x||!!e}function s(t){return b[t]||y&&x[t]||t}function a(n,i,a,c,l,h,p){var d=e(n),m=v[d]||(v[d]=[]);i.split(/\s/).forEach(function(e){if("ready"==e)return t(document).ready(a);var i=r(e);i.fn=a,i.sel=l,i.e in b&&(a=function(e){var n=e.relatedTarget;return!n||n!==this&&!t.contains(this,n)?i.fn.apply(this,arguments):void 0}),i.del=h;var d=h||a;i.proxy=function(t){if(t=u(t),!t.isImmediatePropagationStopped()){t.data=c;var e=d.apply(n,t._args==f?[t]:[t].concat(t._args));return e===!1&&(t.preventDefault(),t.stopPropagation()),e}},i.i=m.length,m.push(i),"addEventListener"in n&&n.addEventListener(s(i.e),i.proxy,o(i,p))})}function c(t,r,i,a,c){var u=e(t);(r||"").split(/\s/).forEach(function(e){n(t,e,i,a).forEach(function(e){delete v[u][e.i],"removeEventListener"in t&&t.removeEventListener(s(e.e),e.proxy,o(e,c))})})}function u(e,n){return(n||!e.isDefaultPrevented)&&(n||(n=e),t.each(_,function(t,r){var i=n[t];e[t]=function(){return this[r]=w,i&&i.apply(n,arguments)},e[r]=T}),(n.defaultPrevented!==f?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=w)),e}function l(t){var e,n={originalEvent:t};for(e in t)E.test(e)||t[e]===f||(n[e]=t[e]);return u(n,t)}var f,h=1,p=Array.prototype.slice,d=t.isFunction,m=function(t){return"string"==typeof t},v={},g={},y="onfocusin"in window,x={focus:"focusin",blur:"focusout"},b={mouseenter:"mouseover",mouseleave:"mouseout"};g.click=g.mousedown=g.mouseup=g.mousemove="MouseEvents",t.event={add:a,remove:c},t.proxy=function(n,r){var i=2 in arguments&&p.call(arguments,2);if(d(n)){var o=function(){return n.apply(r,i?i.concat(p.call(arguments)):arguments)};return o._zid=e(n),o}if(m(r))return i?(i.unshift(n[r],n),t.proxy.apply(null,i)):t.proxy(n[r],n);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var w=function(){return!0},T=function(){return!1},E=/^([A-Z]|returnValue$|layer[XY]$)/,_={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,n,r,i,o){var s,u,h=this;return e&&!m(e)?(t.each(e,function(t,e){h.on(t,n,r,e,o)}),h):(m(n)||d(i)||i===!1||(i=r,r=n,n=f),(d(r)||r===!1)&&(i=r,r=f),i===!1&&(i=T),h.each(function(f,h){o&&(s=function(t){return c(h,t.type,i),i.apply(this,arguments)}),n&&(u=function(e){var r,o=t(e.target).closest(n,h).get(0);return o&&o!==h?(r=t.extend(l(e),{currentTarget:o,liveFired:h}),(s||i).apply(o,[r].concat(p.call(arguments,1)))):void 0}),a(h,e,i,r,n,u||s)}))},t.fn.off=function(e,n,r){var i=this;return e&&!m(e)?(t.each(e,function(t,e){i.off(t,n,e)}),i):(m(n)||d(r)||r===!1||(r=n,n=f),r===!1&&(r=T),i.each(function(){c(this,e,r,n)}))},t.fn.trigger=function(e,n){return e=m(e)||t.isPlainObject(e)?t.Event(e):u(e),e._args=n,this.each(function(){e.type in x&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,r){var i,o;return this.each(function(s,a){i=l(m(e)?t.Event(e):e),i._args=r,i.target=a,t.each(n(a,e.type||e),function(t,e){return o=e.proxy(i),i.isImmediatePropagationStopped()?!1:void 0})}),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){m(t)||(e=t,t=e.type);var n=document.createEvent(g[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),u(n)}}(t),function(t){"__proto__"in{}||t.extend(t.nuclear,{Z:function(e,n){return e=e||[],t.extend(e,t.fn),e.selector=n||"",e.__Z=!0,e},isZ:function(e){return"array"===t.type(e)&&"__Z"in e}});try{getComputedStyle(void 0)}catch(e){var n=getComputedStyle;window.getComputedStyle=function(t){try{return n(t)}catch(e){return null}}}}(t),function(t){function e(t,e,n,r){return Math.abs(t-e)>=Math.abs(n-r)?t-e>0?"Left":"Right":n-r>0?"Up":"Down"}function n(){l=null,h.last&&(h.el.trigger("longTap"),h={})}function r(){l&&clearTimeout(l),l=null}function i(){a&&clearTimeout(a),c&&clearTimeout(c),u&&clearTimeout(u),l&&clearTimeout(l),a=c=u=l=null,h={}}function o(t){return("touch"==t.pointerType||t.pointerType==t.MSPOINTER_TYPE_TOUCH)&&t.isPrimary}function s(t,e){return t.type=="pointer"+e||t.type.toLowerCase()=="mspointer"+e}var a,c,u,l,f,h={},p=750;t(document).ready(function(){var d,m,v,g,y=0,x=0;"MSGesture"in window&&(f=new MSGesture,f.target=document.body),t(document).bind("MSGestureEnd",function(t){var e=t.velocityX>1?"Right":t.velocityX<-1?"Left":t.velocityY>1?"Down":t.velocityY<-1?"Up":null;e&&(h.el.trigger("swipe"),h.el.trigger("swipe"+e))}).on("touchstart MSPointerDown pointerdown",function(e){(!(g=s(e,"down"))||o(e))&&(v=g?e:e.touches[0],e.touches&&1===e.touches.length&&h.x2&&(h.x2=void 0,h.y2=void 0),d=Date.now(),m=d-(h.last||d),h.el=t("tagName"in v.target?v.target:v.target.parentNode),a&&clearTimeout(a),h.x1=v.pageX,h.y1=v.pageY,m>0&&250>=m&&(h.isDoubleTap=!0),h.last=d,l=setTimeout(n,p),f&&g&&f.addPointer(e.pointerId))}).on("touchmove MSPointerMove pointermove",function(t){(!(g=s(t,"move"))||o(t))&&(v=g?t:t.touches[0],r(),h.x2=v.pageX,h.y2=v.pageY,y+=Math.abs(h.x1-h.x2),x+=Math.abs(h.y1-h.y2))}).on("touchend MSPointerUp pointerup",function(n){(!(g=s(n,"up"))||o(n))&&(r(),h.x2&&Math.abs(h.x1-h.x2)>30||h.y2&&Math.abs(h.y1-h.y2)>30?u=setTimeout(function(){h.el.trigger("swipe"),h.el.trigger("swipe"+e(h.x1,h.x2,h.y1,h.y2)),h={}},0):"last"in h&&(30>y&&30>x?c=setTimeout(function(){var e=t.Event("tap");e.cancelTouch=i,h.el.trigger(e),h.isDoubleTap?(h.el&&h.el.trigger("doubleTap"),h={}):a=setTimeout(function(){a=null,h.el&&h.el.trigger("singleTap"),h={}},250)},0):h={}),y=x=0)}).on("touchcancel MSPointerCancel pointercancel",i),t(window).on("scroll",i)}),["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap","singleTap","longTap"].forEach(function(e){t.fn[e]=function(t){return this.on(e,t)}})}(t),function(t){function e(e,n,r){var i=t.Event(n);return t(e).trigger(i,r),!i.isDefaultPrevented()}function n(t,n,r,i){return t.global?e(n||y,r,i):void 0}function r(e){e.global&&0===t.active++&&n(e,null,"ajaxStart")}function i(e){e.global&&!--t.active&&n(e,null,"ajaxStop")}function o(t,e){var r=e.context;return e.beforeSend.call(r,t,e)===!1||n(e,r,"ajaxBeforeSend",[t,e])===!1?!1:void n(e,r,"ajaxSend",[t,e])}function s(t,e,r,i){var o=r.context,s="success";r.success.call(o,t,s,e),i&&i.resolveWith(o,[t,s,e]),n(r,o,"ajaxSuccess",[e,r,t]),c(s,e,r)}function a(t,e,r,i,o){var s=i.context;i.error.call(s,r,e,t),o&&o.rejectWith(s,[r,e,t]),n(i,s,"ajaxError",[r,i,t||e]),c(e,r,i)}function c(t,e,r){var o=r.context;r.complete.call(o,e,t),n(r,o,"ajaxComplete",[e,r]),i(r)}function u(){}function l(t){return t&&(t=t.split(";",2)[0]),t&&(t==E?"html":t==T?"json":b.test(t)?"script":w.test(t)&&"xml")||"text"}function f(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function h(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()||(e.url=f(e.url,e.data),e.data=void 0)}function p(e,n,r,i){return t.isFunction(n)&&(i=r,r=n,n=void 0),t.isFunction(r)||(i=r,r=void 0),{url:e,data:n,success:r,dataType:i}}function d(e,n,r,i){var o,s=t.isArray(n),a=t.isPlainObject(n);t.each(n,function(n,c){o=t.type(c),i&&(n=r?i:i+"["+(a||"object"==o||"array"==o?n:"")+"]"),!i&&s?e.add(c.name,c.value):"array"==o||!r&&"object"==o?d(e,c,r,n):e.add(n,c)})}var m,v,g=0,y=window.document,x=/)<[^<]*)*<\/script>/gi,b=/^(?:text|application)\/javascript/i,w=/^(?:text|application)\/xml/i,T="application/json",E="text/html",_=/^\s*$/,P=y.createElement("a");P.href=window.location.href,t.active=0,t.ajaxJSONP=function(e,n){if(!("type"in e))return t.ajax(e);var r,i,c=e.jsonpCallback,u=(t.isFunction(c)?c():c)||"jsonp"+ ++g,l=y.createElement("script"),f=window[u],h=function(e){t(l).triggerHandler("error",e||"abort")},p={abort:h};return n&&n.promise(p),t(l).on("load error",function(o,c){clearTimeout(i),t(l).off().remove(),"error"!=o.type&&r?s(r[0],p,e,n):a(null,c||"error",p,e,n),window[u]=f,r&&t.isFunction(f)&&f(r[0]),f=r=void 0}),o(p,e)===!1?(h("abort"),p):(window[u]=function(){r=arguments},l.src=e.url.replace(/\?(.+)=\?/,"?$1="+u),y.head.appendChild(l),e.timeout>0&&(i=setTimeout(function(){h("timeout")},e.timeout)),p)},t.ajaxSettings={type:"GET",beforeSend:u,success:u,error:u,complete:u,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:T,xml:"application/xml, text/xml",html:E,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},t.ajax=function(e){var n,i,c=t.extend({},e||{}),p=t.Deferred&&t.Deferred();for(m in t.ajaxSettings)void 0===c[m]&&(c[m]=t.ajaxSettings[m]);r(c),c.crossDomain||(n=y.createElement("a"),n.href=c.url,n.href=n.href,c.crossDomain=P.protocol+"//"+P.host!=n.protocol+"//"+n.host),c.url||(c.url=window.location.toString()),(i=c.url.indexOf("#"))>-1&&(c.url=c.url.slice(0,i)),h(c);var d=c.dataType,g=/\?.+=\?/.test(c.url);if(g&&(d="jsonp"),c.cache!==!1&&(e&&e.cache===!0||"script"!=d&&"jsonp"!=d)||(c.url=f(c.url,"_="+Date.now())),"jsonp"==d)return g||(c.url=f(c.url,c.jsonp?c.jsonp+"=?":c.jsonp===!1?"":"callback=?")),t.ajaxJSONP(c,p);var x,b=c.accepts[d],w={},T=function(t,e){w[t.toLowerCase()]=[t,e]},E=/^([\w-]+:)\/\//.test(c.url)?RegExp.$1:window.location.protocol,C=c.xhr(),j=C.setRequestHeader;if(p&&p.promise(C),c.crossDomain||T("X-Requested-With","XMLHttpRequest"),T("Accept",b||"*/*"),(b=c.mimeType||b)&&(b.indexOf(",")>-1&&(b=b.split(",",2)[0]),C.overrideMimeType&&C.overrideMimeType(b)),(c.contentType||c.contentType!==!1&&c.data&&"GET"!=c.type.toUpperCase())&&T("Content-Type",c.contentType||"application/x-www-form-urlencoded"),c.headers)for(v in c.headers)T(v,c.headers[v]);if(C.setRequestHeader=T,C.onreadystatechange=function(){if(4==C.readyState){C.onreadystatechange=u,clearTimeout(x);var e,n=!1;if(C.status>=200&&C.status<300||304==C.status||0==C.status&&"file:"==E){d=d||l(c.mimeType||C.getResponseHeader("content-type")),e=C.responseText;try{"script"==d?(1,eval)(e):"xml"==d?e=C.responseXML:"json"==d&&(e=_.test(e)?null:t.parseJSON(e))}catch(r){n=r}n?a(n,"parsererror",C,c,p):s(e,C,c,p)}else a(C.statusText||null,C.status?"error":"abort",C,c,p)}},o(C,c)===!1)return C.abort(),a(null,"abort",C,c,p),C;if(c.xhrFields)for(v in c.xhrFields)C[v]=c.xhrFields[v];var S="async"in c?c.async:!0;C.open(c.type,c.url,S,c.username,c.password);for(v in w)j.apply(C,w[v]);return c.timeout>0&&(x=setTimeout(function(){C.onreadystatechange=u,C.abort(),a(null,"timeout",C,c,p)},c.timeout)),C.send(c.data?c.data:null),C},t.get=function(){return t.ajax(p.apply(null,arguments))},t.post=function(){var e=p.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=p.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,r){if(!this.length)return this;var i,o=this,s=e.split(/\s/),a=p(e,n,r),c=a.success;return s.length>1&&(a.url=s[0],i=s[1]),a.success=function(e){o.html(i?t("
").html(e.replace(x,"")).find(i):e),c&&c.apply(o,arguments)},t.ajax(a),this};var C=encodeURIComponent;t.param=function(e,n){var r=[];return r.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(C(e)+"="+C(n))},d(r,e,n),r.join("&").replace(/%20/g,"+")}}(t),function(t,e){function n(t){return t.replace(/([a-z])([A-Z])/,"$1-$2").toLowerCase()}function r(t){return i?i+t:t.toLowerCase()}var i,o,s,a,c,u,l,f,h,p,d="",m={Webkit:"webkit",Moz:"",O:"o"},v=document.createElement("div"),g=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,y={};t.each(m,function(t,n){return v.style[t+"TransitionProperty"]!==e?(d="-"+t.toLowerCase()+"-",i=n,!1):void 0}),o=d+"transform",y[s=d+"transition-property"]=y[a=d+"transition-duration"]=y[u=d+"transition-delay"]=y[c=d+"transition-timing-function"]=y[l=d+"animation-name"]=y[f=d+"animation-duration"]=y[p=d+"animation-delay"]=y[h=d+"animation-timing-function"]="",t.fx={off:i===e&&v.style.transitionProperty===e,speeds:{_default:400,fast:200,slow:600},cssPrefix:d,transitionEnd:r("TransitionEnd"),animationEnd:r("AnimationEnd")},t.fn.animate=function(n,r,i,o,s){return t.isFunction(r)&&(o=r,i=e,r=e),t.isFunction(i)&&(o=i,i=e),t.isPlainObject(r)&&(i=r.easing,o=r.complete,s=r.delay,r=r.duration),r&&(r=("number"==typeof r?r:t.fx.speeds[r]||t.fx.speeds._default)/1e3),s&&(s=parseFloat(s)/1e3),this.anim(n,r,i,o,s)},t.fn.anim=function(r,i,d,m,v){var x,b,w,T={},E="",_=this,P=t.fx.transitionEnd,C=!1;if(i===e&&(i=t.fx.speeds._default/1e3),v===e&&(v=0),t.fx.off&&(i=0),"string"==typeof r)T[l]=r,T[f]=i+"s",T[p]=v+"s",T[h]=d||"linear",P=t.fx.animationEnd;else{b=[];for(x in r)g.test(x)?E+=x+"("+r[x]+") ":(T[x]=r[x],b.push(n(x)));E&&(T[o]=E,b.push(o)),i>0&&"object"==typeof r&&(T[s]=b.join(", "),T[a]=i+"s",T[u]=v+"s",T[c]=d||"linear")}return w=function(e){if("undefined"!=typeof e){if(e.target!==e.currentTarget)return;t(e.target).unbind(P,w)}else t(this).unbind(P,w);C=!0,t(this).css(y),m&&m.call(this)},i>0&&(this.bind(P,w),setTimeout(function(){C||w.call(_)},1e3*(i+v)+25)),this.size()&&this.get(0).clientLeft,this.css(T),0>=i&&setTimeout(function(){_.each(function(){w.call(this)})},0),this},v=null}(t),function(t){var e=!1;t.fn.scrollToTop=function(t){function n(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)}function r(){a.off("touchstart",d),e=!1}var i,o,s,a=this,c=t||0,u=a.scrollTop(),l=u,f=c-u,h=Math.min(750,Math.min(1500,Math.abs(u-c))),p=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){setTimeout(t,15)},d=function(){r()};e||0!=f&&(a.on("touchstart",d),e=!0,p(function m(t){e&&(i||(i=t),o=Math.min(1,Math.max((t-i)/h,0)),s=Math.round(u+f*n(o)),f>0&&s>c&&(s=c),0>f&&c>s&&(s=c),l!=s&&a.scrollTop(s),l=s,s!==c?p(m):r())}))}}(t),t.create=function(e){return t._mixObj(e),e.statics||(e.statics={}),e.statics.create=function(e){return t._mixObj(e),this.extend(e)},t.Class.extend(e)},t._mixObj=function(e){e.ctor=function(e,n){this._ncInstanceId=t.getInstanceId(),t.instances[this._ncInstanceId]=this,this._nuclearParentEmpty=!n,this.HTML="",this.option=e,this.parent=this._nuclearParentEmpty?document.createElement("div"):"string"==typeof n?document.querySelector(n):n,this.install&&this.install(),this._nuclearRef=[];for(var r in this)this.hasOwnProperty(r)&&this[r]&&this[r]._nuclearLocalRefresh&&(this[r]._nuclearParent=this,this._nuclearRef.push(this[r]));this._nuclearTimer=null,this._preNuclearTime=new Date,this.option&&t.observe(this.option,function(t,e,n,r){(!this.onOptionChange||this.onOptionChange&&this.onOptionChange(t,e,n,r)!==!1)&&(clearTimeout(this._nuclearTimer),new Date-this._preNuclearTime>40?(this._nuclearLocalRefresh(),this._preNuclearTime=new Date):this._nuclearTimer=setTimeout(function(){this._nuclearLocalRefresh()}.bind(this),40))}.bind(this)),this._nuclearRenderInfo={tpl:this._nuclearTplGenerator(),data:this.option,parent:this.parent},this.option._nuclearIndex=function(){return++window._nuclearIndex||(window._nuclearIndex=0)},this.option._resetNuclearIndex=function(){window._nuclearIndex=-1},this._nuclearRender(this._nuclearRenderInfo),this.installed&&this.installed()},e.refresh=function(){this._nuclearLocalRefresh()},e.render&&(e._nuclearTplGenerator=e.render),e.render=function(){return this._nuclearParentEmpty?this.HTML:this._nuclearTplGenerator()},e._nuclearRender=function(e){if(this.node)if(t.isUndefined(e.tpl))e.parent.removeChild(this.node),this.node=null,this.HTML="";else{var n=t.str2Dom(t.Tpl.render(t._fixEvent(t._fixTplIndex(e.tpl),this._ncInstanceId),e.data));e.parent.replaceChild(n,this.node),this.node=n}else e.parent.insertAdjacentHTML("beforeEnd",t.Tpl.render(t._fixEvent(t._fixTplIndex(e.tpl),this._ncInstanceId),e.data)),this.node=e.parent.lastChild;window._nuclearIndex=null,this.node&&(this._nuclearId=t.getId(),this.node.setAttribute("data-nuclearId",this._nuclearId),this._mixNode(),e.refreshPart=this.node.querySelectorAll("*[nc-refresh]"),this.HTML=this.node.outerHTML,this._nuclearFix(),this.onRefresh&&this.onRefresh())},e._mixNode=function(){var t=this.node.querySelectorAll("*[nc-id]"),e=t.length;if(e>0)for(var n=0;e>n;n++){var r=t[n];this[r.getAttribute("nc-id")]=r}var i=this.node.querySelectorAll("*[nc-class]"),o=i.length;if(o>0)for(var s=0;o>s;s++){var a=i[s],c=a.getAttribute("nc-class");this[c]||(this[c]=[]),this[c].push(a)}},e._nuclearFix=function(){this._nuclearParent||this._nuclearFixOne(this)},e._nuclearFixOne=function(t){var e=t._nuclearRef.length;if(e>0)for(var n=0;e>n;n++){var r=t._nuclearRef[n];r.node=t.node.querySelector('*[data-nuclearId="'+r._nuclearId+'"]'), +!function(t,e){"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?module.exports=e():"function"==typeof define&&define.cmd&&define(function(t,n,r){r.exports=e()}),t.$=t.Nuclear=e()}(this,function(){var t=function(){function t(t){return null==t?String(t):W[X.call(t)]||"object"}function e(e){return"function"==t(e)}function n(t){return null!=t&&t==t.window}function r(t){return null!=t&&t.nodeType==t.DOCUMENT_NODE}function i(e){return"object"==t(e)}function o(t){return i(t)&&!n(t)&&Object.getPrototypeOf(t)==Object.prototype}function s(t){return"number"==typeof t.length}function a(t){return O.call(t,function(t){return null!=t})}function c(t){return t.length>0?E.fn.concat.apply([],t):t}function u(t){return t.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()}function l(t){return t in L?L[t]:L[t]=new RegExp("(^|\\s)"+t+"(\\s|$)")}function f(t,e){return"number"!=typeof e||R[u(t)]?e:e+"px"}function h(t){var e,n;return A[t]||(e=N.createElement(t),N.body.appendChild(e),n=getComputedStyle(e,"").getPropertyValue("display"),e.parentNode.removeChild(e),"none"==n&&(n="block"),A[t]=n),A[t]}function p(t){return"children"in t?S.call(t.children):E.map(t.childNodes,function(t){return 1==t.nodeType?t:void 0})}function d(t,e,n){for(T in e)n&&(o(e[T])||J(e[T]))?(o(e[T])&&!o(t[T])&&(t[T]={}),J(e[T])&&!J(t[T])&&(t[T]=[]),d(t[T],e[T],n)):e[T]!==w&&(t[T]=e[T])}function m(t,e){return null==e?E(t):E(t).filter(e)}function v(t,n,r,i){return e(n)?n.call(t,r,i):n}function g(t,e,n){null==n?t.removeAttribute(e):t.setAttribute(e,n)}function y(t,e){var n=t.className||"",r=n&&n.baseVal!==w;return e===w?r?n.baseVal:n:void(r?n.baseVal=e:t.className=e)}function x(t){try{return t?"true"==t||("false"==t?!1:"null"==t?null:+t+""==t?+t:/^[\[\{]/.test(t)?E.parseJSON(t):t):t}catch(e){return t}}function b(t,e){e(t);for(var n=0,r=t.childNodes.length;r>n;n++)b(t.childNodes[n],e)}var w,T,E,_,P,C,j=[],S=j.slice,O=j.filter,N=window.document,A={},L={},R={"column-count":1,columns:1,"font-weight":1,"line-height":1,opacity:1,"z-index":1,zoom:1},M=/^\s*<(\w+|!)[^>]*>/,I=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,$=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,k=/^(?:body|html)$/i,D=/([A-Z])/g,H=["val","css","html","text","data","width","height","offset"],F=["after","prepend","before","append"],q=N.createElement("table"),U=N.createElement("tr"),z={tr:N.createElement("tbody"),tbody:q,thead:q,tfoot:q,td:U,th:U,"*":N.createElement("div")},V=/complete|loaded|interactive/,Z=/^[\w-]*$/,W={},X=W.toString,B={},Y=N.createElement("div"),G={tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},J=Array.isArray||function(t){return t instanceof Array};return B.matches=function(t,e){if(!e||!t||1!==t.nodeType)return!1;var n=t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.matchesSelector;if(n)return n.call(t,e);var r,i=t.parentNode,o=!i;return o&&(i=Y).appendChild(t),r=~B.qsa(i,e).indexOf(t),o&&Y.removeChild(t),r},P=function(t){return t.replace(/-+(.)?/g,function(t,e){return e?e.toUpperCase():""})},C=function(t){return O.call(t,function(e,n){return t.indexOf(e)==n})},B.fragment=function(t,e,n){var r,i,s;return I.test(t)&&(r=E(N.createElement(RegExp.$1))),r||(t.replace&&(t=t.replace($,"<$1>")),e===w&&(e=M.test(t)&&RegExp.$1),e in z||(e="*"),s=z[e],s.innerHTML=""+t,r=E.each(S.call(s.childNodes),function(){s.removeChild(this)})),o(n)&&(i=E(r),E.each(n,function(t,e){H.indexOf(t)>-1?i[t](e):i.attr(t,e)})),r},B.Z=function(t,e){return t=t||[],t.__proto__=E.fn,t.selector=e||"",t},B.isZ=function(t){return t instanceof B.Z},B.init=function(t,n){var r;if(!t)return B.Z();if("string"==typeof t)if(t=t.trim(),"<"==t[0]&&M.test(t))r=B.fragment(t,RegExp.$1,n),t=null;else{if(n!==w)return E(n).find(t);r=B.qsa(N,t)}else{if(e(t))return E(N).ready(t);if(B.isZ(t))return t;if(J(t))r=a(t);else if(i(t))r=[t],t=null;else if(M.test(t))r=B.fragment(t.trim(),RegExp.$1,n),t=null;else{if(n!==w)return E(n).find(t);r=B.qsa(N,t)}}return B.Z(r,t)},E=function(t,e){return B.init(t,e)},E.extend=function(t){var e,n=S.call(arguments,1);return"boolean"==typeof t&&(e=t,t=n.shift()),n.forEach(function(n){d(t,n,e)}),t},B.qsa=function(t,e){var n,i="#"==e[0],o=!i&&"."==e[0],s=i||o?e.slice(1):e,a=Z.test(s);return r(t)&&a&&i?(n=t.getElementById(s))?[n]:[]:1!==t.nodeType&&9!==t.nodeType?[]:S.call(a&&!i?o?t.getElementsByClassName(s):t.getElementsByTagName(e):t.querySelectorAll(e))},E.contains=N.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},E.type=t,E.isFunction=e,E.isWindow=n,E.isArray=J,E.isPlainObject=o,E.isEmptyObject=function(t){var e;for(e in t)return!1;return!0},E.inArray=function(t,e,n){return j.indexOf.call(e,t,n)},E.camelCase=P,E.trim=function(t){return null==t?"":String.prototype.trim.call(t)},E.uuid=0,E.support={},E.expr={},E.map=function(t,e){var n,r,i,o=[];if(s(t))for(r=0;r=0?t:t+this.length]},toArray:function(){return this.get()},size:function(){return this.length},remove:function(){return this.each(function(){null!=this.parentNode&&this.parentNode.removeChild(this)})},each:function(t){return j.every.call(this,function(e,n){return t.call(e,n,e)!==!1}),this},filter:function(t){return e(t)?this.not(this.not(t)):E(O.call(this,function(e){return B.matches(e,t)}))},add:function(t,e){return E(C(this.concat(E(t,e))))},is:function(t){return this.length>0&&B.matches(this[0],t)},not:function(t){var n=[];if(e(t)&&t.call!==w)this.each(function(e){t.call(this,e)||n.push(this)});else{var r="string"==typeof t?this.filter(t):s(t)&&e(t.item)?S.call(t):E(t);this.forEach(function(t){r.indexOf(t)<0&&n.push(t)})}return E(n)},has:function(t){return this.filter(function(){return i(t)?E.contains(this,t):E(this).find(t).size()})},eq:function(t){return-1===t?this.slice(t):this.slice(t,+t+1)},first:function(){var t=this[0];return t&&!i(t)?t:E(t)},last:function(){var t=this[this.length-1];return t&&!i(t)?t:E(t)},find:function(t){var e,n=this;return e=t?"object"==typeof t?E(t).filter(function(){var t=this;return j.some.call(n,function(e){return E.contains(e,t)})}):1==this.length?E(B.qsa(this[0],t)):this.map(function(){return B.qsa(this,t)}):E()},closest:function(t,e){var n=this[0],i=!1;for("object"==typeof t&&(i=E(t));n&&!(i?i.indexOf(n)>=0:B.matches(n,t));)n=n!==e&&!r(n)&&n.parentNode;return E(n)},parents:function(t){for(var e=[],n=this;n.length>0;)n=E.map(n,function(t){return(t=t.parentNode)&&!r(t)&&e.indexOf(t)<0?(e.push(t),t):void 0});return m(e,t)},parent:function(t){return m(C(this.pluck("parentNode")),t)},children:function(t){return m(this.map(function(){return p(this)}),t)},contents:function(){return this.map(function(){return S.call(this.childNodes)})},siblings:function(t){return m(this.map(function(t,e){return O.call(p(e.parentNode),function(t){return t!==e})}),t)},empty:function(){return this.each(function(){this.innerHTML=""})},pluck:function(t){return E.map(this,function(e){return e[t]})},show:function(){return this.each(function(){"none"==this.style.display&&(this.style.display=""),"none"==getComputedStyle(this,"").getPropertyValue("display")&&(this.style.display=h(this.nodeName))})},replaceWith:function(t){return this.before(t).remove()},wrap:function(t){var n=e(t);if(this[0]&&!n)var r=E(t).get(0),i=r.parentNode||this.length>1;return this.each(function(e){E(this).wrapAll(n?t.call(this,e):i?r.cloneNode(!0):r)})},wrapAll:function(t){if(this[0]){E(this[0]).before(t=E(t));for(var e;(e=t.children()).length;)t=e.first();E(t).append(this)}return this},wrapInner:function(t){var n=e(t);return this.each(function(e){var r=E(this),i=r.contents(),o=n?t.call(this,e):t;i.length?i.wrapAll(o):r.append(o)})},unwrap:function(){return this.parent().each(function(){E(this).replaceWith(E(this).children())}),this},clone:function(){return this.map(function(){return this.cloneNode(!0)})},hide:function(){return this.css("display","none")},toggle:function(t){return this.each(function(){var e=E(this);(t===w?"none"==e.css("display"):t)?e.show():e.hide()})},prev:function(t){return E(this.pluck("previousElementSibling")).filter(t||"*")},next:function(t){return E(this.pluck("nextElementSibling")).filter(t||"*")},html:function(t){return 0 in arguments?this.each(function(e){var n=this.innerHTML;E(this).empty().append(v(this,t,e,n))}):0 in this?this[0].innerHTML:null},text:function(t){return 0 in arguments?this.each(function(e){var n=v(this,t,e,this.textContent);this.textContent=null==n?"":""+n}):0 in this?this[0].textContent:null},attr:function(t,e){var n;return"string"!=typeof t||1 in arguments?this.each(function(n){if(1===this.nodeType)if(i(t))for(T in t)g(this,T,t[T]);else g(this,t,v(this,e,n,this.getAttribute(t)))}):this.length&&1===this[0].nodeType?!(n=this[0].getAttribute(t))&&t in this[0]?this[0][t]:n:w},removeAttr:function(t){return this.each(function(){1===this.nodeType&&t.split(" ").forEach(function(t){g(this,t)},this)})},prop:function(t,e){return t=G[t]||t,1 in arguments?this.each(function(n){this[t]=v(this,e,n,this[t])}):this[0]&&this[0][t]},data:function(t,e){var n="data-"+t.replace(D,"-$1").toLowerCase(),r=1 in arguments?this.attr(n,e):this.attr(n);return null!==r?x(r):w},val:function(t){return 0 in arguments?this.each(function(e){this.value=v(this,t,e,this.value)}):this[0]&&(this[0].multiple?E(this[0]).find("option").filter(function(){return this.selected}).pluck("value"):this[0].value)},offset:function(t){if(t)return this.each(function(e){var n=E(this),r=v(this,t,e,n.offset()),i=n.offsetParent().offset(),o={top:r.top-i.top,left:r.left-i.left};"static"==n.css("position")&&(o.position="relative"),n.css(o)});if(!this.length)return null;var e=this[0].getBoundingClientRect();return{left:e.left+window.pageXOffset,top:e.top+window.pageYOffset,width:Math.round(e.width),height:Math.round(e.height)}},css:function(e,n){if(arguments.length<2){var r,i=this[0];if(!i)return;if(r=getComputedStyle(i,""),"string"==typeof e)return i.style[P(e)]||r.getPropertyValue(e);if(J(e)){var o={};return E.each(e,function(t,e){o[e]=i.style[P(e)]||r.getPropertyValue(e)}),o}}var s="";if("string"==t(e))n||0===n?s=u(e)+":"+f(e,n):this.each(function(){this.style.removeProperty(u(e))});else for(T in e)e[T]||0===e[T]?s+=u(T)+":"+f(T,e[T])+";":this.each(function(){this.style.removeProperty(u(T))});return this.each(function(){this.style.cssText+=";"+s})},index:function(t){return t?this.indexOf(E(t)[0]):this.parent().children().indexOf(this[0])},hasClass:function(t){return t?j.some.call(this,function(t){return this.test(y(t))},l(t)):!1},addClass:function(t){return t?this.each(function(e){if("className"in this){_=[];var n=y(this),r=v(this,t,e,n);r.split(/\s+/g).forEach(function(t){E(this).hasClass(t)||_.push(t)},this),_.length&&y(this,n+(n?" ":"")+_.join(" "))}}):this},removeClass:function(t){return this.each(function(e){if("className"in this){if(t===w)return y(this,"");_=y(this),v(this,t,e,_).split(/\s+/g).forEach(function(t){_=_.replace(l(t)," ")}),y(this,_.trim())}})},toggleClass:function(t,e){return t?this.each(function(n){var r=E(this),i=v(this,t,n,y(this));i.split(/\s+/g).forEach(function(t){(e===w?!r.hasClass(t):e)?r.addClass(t):r.removeClass(t)})}):this},scrollTop:function(t){if(this.length){var e="scrollTop"in this[0];return t===w?e?this[0].scrollTop:this[0].pageYOffset:this.each(e?function(){this.scrollTop=t}:function(){this.scrollTo(this.scrollX,t)})}},scrollLeft:function(t){if(this.length){var e="scrollLeft"in this[0];return t===w?e?this[0].scrollLeft:this[0].pageXOffset:this.each(e?function(){this.scrollLeft=t}:function(){this.scrollTo(t,this.scrollY)})}},position:function(){if(this.length){var t=this[0],e=this.offsetParent(),n=this.offset(),r=k.test(e[0].nodeName)?{top:0,left:0}:e.offset();return n.top-=parseFloat(E(t).css("margin-top"))||0,n.left-=parseFloat(E(t).css("margin-left"))||0,r.top+=parseFloat(E(e[0]).css("border-top-width"))||0,r.left+=parseFloat(E(e[0]).css("border-left-width"))||0,{top:n.top-r.top,left:n.left-r.left}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||N.body;t&&!k.test(t.nodeName)&&"static"==E(t).css("position");)t=t.offsetParent;return t})}},E.fn.detach=E.fn.remove,["width","height"].forEach(function(t){var e=t.replace(/./,function(t){return t[0].toUpperCase()});E.fn[t]=function(i){var o,s=this[0];return i===w?n(s)?s["inner"+e]:r(s)?s.documentElement["scroll"+e]:(o=this.offset())&&o[t]:this.each(function(e){s=E(this),s.css(t,v(this,i,e,s[t]()))})}}),F.forEach(function(e,n){var r=n%2;E.fn[e]=function(){var e,i,o=E.map(arguments,function(n){return e=t(n),"object"==e||"array"==e||null==n?n:B.fragment(n)}),s=this.length>1;return o.length<1?this:this.each(function(t,e){i=r?e:e.parentNode,e=0==n?e.nextSibling:1==n?e.firstChild:2==n?e:null;var a=E.contains(N.documentElement,i);o.forEach(function(t){if(s)t=t.cloneNode(!0);else if(!i)return E(t).remove();i.insertBefore(t,e),a&&b(t,function(t){null==t.nodeName||"SCRIPT"!==t.nodeName.toUpperCase()||t.type&&"text/javascript"!==t.type||t.src||window.eval.call(window,t.innerHTML)})})})},E.fn[r?e+"To":"insert"+(n?"Before":"After")]=function(t){return E(t)[e](this),this}}),B.Z.prototype=E.fn,B.uniq=C,B.deserializeValue=x,E.nuclear=B,E}();return function(t){function e(t){return t._zid||(t._zid=h++)}function n(t,n,o,s){if(n=r(n),n.ns)var a=i(n.ns);return(v[e(t)]||[]).filter(function(t){return!(!t||n.e&&t.e!=n.e||n.ns&&!a.test(t.ns)||o&&e(t.fn)!==e(o)||s&&t.sel!=s)})}function r(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function i(t){return new RegExp("(?:^| )"+t.replace(" "," .* ?")+"(?: |$)")}function o(t,e){return t.del&&!y&&t.e in x||!!e}function s(t){return b[t]||y&&x[t]||t}function a(n,i,a,c,l,h,p){var d=e(n),m=v[d]||(v[d]=[]);i.split(/\s/).forEach(function(e){if("ready"==e)return t(document).ready(a);var i=r(e);i.fn=a,i.sel=l,i.e in b&&(a=function(e){var n=e.relatedTarget;return!n||n!==this&&!t.contains(this,n)?i.fn.apply(this,arguments):void 0}),i.del=h;var d=h||a;i.proxy=function(t){if(t=u(t),!t.isImmediatePropagationStopped()){t.data=c;var e=d.apply(n,t._args==f?[t]:[t].concat(t._args));return e===!1&&(t.preventDefault(),t.stopPropagation()),e}},i.i=m.length,m.push(i),"addEventListener"in n&&n.addEventListener(s(i.e),i.proxy,o(i,p))})}function c(t,r,i,a,c){var u=e(t);(r||"").split(/\s/).forEach(function(e){n(t,e,i,a).forEach(function(e){delete v[u][e.i],"removeEventListener"in t&&t.removeEventListener(s(e.e),e.proxy,o(e,c))})})}function u(e,n){return(n||!e.isDefaultPrevented)&&(n||(n=e),t.each(_,function(t,r){var i=n[t];e[t]=function(){return this[r]=w,i&&i.apply(n,arguments)},e[r]=T}),(n.defaultPrevented!==f?n.defaultPrevented:"returnValue"in n?n.returnValue===!1:n.getPreventDefault&&n.getPreventDefault())&&(e.isDefaultPrevented=w)),e}function l(t){var e,n={originalEvent:t};for(e in t)E.test(e)||t[e]===f||(n[e]=t[e]);return u(n,t)}var f,h=1,p=Array.prototype.slice,d=t.isFunction,m=function(t){return"string"==typeof t},v={},g={},y="onfocusin"in window,x={focus:"focusin",blur:"focusout"},b={mouseenter:"mouseover",mouseleave:"mouseout"};g.click=g.mousedown=g.mouseup=g.mousemove="MouseEvents",t.event={add:a,remove:c},t.proxy=function(n,r){var i=2 in arguments&&p.call(arguments,2);if(d(n)){var o=function(){return n.apply(r,i?i.concat(p.call(arguments)):arguments)};return o._zid=e(n),o}if(m(r))return i?(i.unshift(n[r],n),t.proxy.apply(null,i)):t.proxy(n[r],n);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,r){return this.on(t,e,n,r,1)};var w=function(){return!0},T=function(){return!1},E=/^([A-Z]|returnValue$|layer[XY]$)/,_={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(e,n,r,i,o){var s,u,h=this;return e&&!m(e)?(t.each(e,function(t,e){h.on(t,n,r,e,o)}),h):(m(n)||d(i)||i===!1||(i=r,r=n,n=f),(d(r)||r===!1)&&(i=r,r=f),i===!1&&(i=T),h.each(function(f,h){o&&(s=function(t){return c(h,t.type,i),i.apply(this,arguments)}),n&&(u=function(e){var r,o=t(e.target).closest(n,h).get(0);return o&&o!==h?(r=t.extend(l(e),{currentTarget:o,liveFired:h}),(s||i).apply(o,[r].concat(p.call(arguments,1)))):void 0}),a(h,e,i,r,n,u||s)}))},t.fn.off=function(e,n,r){var i=this;return e&&!m(e)?(t.each(e,function(t,e){i.off(t,n,e)}),i):(m(n)||d(r)||r===!1||(r=n,n=f),r===!1&&(r=T),i.each(function(){c(this,e,r,n)}))},t.fn.trigger=function(e,n){return e=m(e)||t.isPlainObject(e)?t.Event(e):u(e),e._args=n,this.each(function(){e.type in x&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,r){var i,o;return this.each(function(s,a){i=l(m(e)?t.Event(e):e),i._args=r,i.target=a,t.each(n(a,e.type||e),function(t,e){return o=e.proxy(i),i.isImmediatePropagationStopped()?!1:void 0})}),o},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){m(t)||(e=t,t=e.type);var n=document.createEvent(g[t]||"Events"),r=!0;if(e)for(var i in e)"bubbles"==i?r=!!e[i]:n[i]=e[i];return n.initEvent(t,r,!0),u(n)}}(t),function(t){"__proto__"in{}||t.extend(t.nuclear,{Z:function(e,n){return e=e||[],t.extend(e,t.fn),e.selector=n||"",e.__Z=!0,e},isZ:function(e){return"array"===t.type(e)&&"__Z"in e}});try{getComputedStyle(void 0)}catch(e){var n=getComputedStyle;window.getComputedStyle=function(t){try{return n(t)}catch(e){return null}}}}(t),function(t){function e(t,e,n,r){return Math.abs(t-e)>=Math.abs(n-r)?t-e>0?"Left":"Right":n-r>0?"Up":"Down"}function n(){l=null,h.last&&(h.el.trigger("longTap"),h={})}function r(){l&&clearTimeout(l),l=null}function i(){a&&clearTimeout(a),c&&clearTimeout(c),u&&clearTimeout(u),l&&clearTimeout(l),a=c=u=l=null,h={}}function o(t){return("touch"==t.pointerType||t.pointerType==t.MSPOINTER_TYPE_TOUCH)&&t.isPrimary}function s(t,e){return t.type=="pointer"+e||t.type.toLowerCase()=="mspointer"+e}var a,c,u,l,f,h={},p=750;t(document).ready(function(){var d,m,v,g,y=0,x=0;"MSGesture"in window&&(f=new MSGesture,f.target=document.body),t(document).bind("MSGestureEnd",function(t){var e=t.velocityX>1?"Right":t.velocityX<-1?"Left":t.velocityY>1?"Down":t.velocityY<-1?"Up":null;e&&(h.el.trigger("swipe"),h.el.trigger("swipe"+e))}).on("touchstart MSPointerDown pointerdown",function(e){(!(g=s(e,"down"))||o(e))&&(v=g?e:e.touches[0],e.touches&&1===e.touches.length&&h.x2&&(h.x2=void 0,h.y2=void 0),d=Date.now(),m=d-(h.last||d),h.el=t("tagName"in v.target?v.target:v.target.parentNode),a&&clearTimeout(a),h.x1=v.pageX,h.y1=v.pageY,m>0&&250>=m&&(h.isDoubleTap=!0),h.last=d,l=setTimeout(n,p),f&&g&&f.addPointer(e.pointerId))}).on("touchmove MSPointerMove pointermove",function(t){(!(g=s(t,"move"))||o(t))&&(v=g?t:t.touches[0],r(),h.x2=v.pageX,h.y2=v.pageY,y+=Math.abs(h.x1-h.x2),x+=Math.abs(h.y1-h.y2))}).on("touchend MSPointerUp pointerup",function(n){(!(g=s(n,"up"))||o(n))&&(r(),h.x2&&Math.abs(h.x1-h.x2)>30||h.y2&&Math.abs(h.y1-h.y2)>30?u=setTimeout(function(){h.el.trigger("swipe"),h.el.trigger("swipe"+e(h.x1,h.x2,h.y1,h.y2)),h={}},0):"last"in h&&(30>y&&30>x?c=setTimeout(function(){var e=t.Event("tap");e.cancelTouch=i,h.el.trigger(e),h.isDoubleTap?(h.el&&h.el.trigger("doubleTap"),h={}):a=setTimeout(function(){a=null,h.el&&h.el.trigger("singleTap"),h={}},250)},0):h={}),y=x=0)}).on("touchcancel MSPointerCancel pointercancel",i),t(window).on("scroll",i)}),["swipe","swipeLeft","swipeRight","swipeUp","swipeDown","doubleTap","tap","singleTap","longTap"].forEach(function(e){t.fn[e]=function(t){return this.on(e,t)}})}(t),function(t){function e(e,n,r){var i=t.Event(n);return t(e).trigger(i,r),!i.isDefaultPrevented()}function n(t,n,r,i){return t.global?e(n||y,r,i):void 0}function r(e){e.global&&0===t.active++&&n(e,null,"ajaxStart")}function i(e){e.global&&!--t.active&&n(e,null,"ajaxStop")}function o(t,e){var r=e.context;return e.beforeSend.call(r,t,e)===!1||n(e,r,"ajaxBeforeSend",[t,e])===!1?!1:void n(e,r,"ajaxSend",[t,e])}function s(t,e,r,i){var o=r.context,s="success";r.success.call(o,t,s,e),i&&i.resolveWith(o,[t,s,e]),n(r,o,"ajaxSuccess",[e,r,t]),c(s,e,r)}function a(t,e,r,i,o){var s=i.context;i.error.call(s,r,e,t),o&&o.rejectWith(s,[r,e,t]),n(i,s,"ajaxError",[r,i,t||e]),c(e,r,i)}function c(t,e,r){var o=r.context;r.complete.call(o,e,t),n(r,o,"ajaxComplete",[e,r]),i(r)}function u(){}function l(t){return t&&(t=t.split(";",2)[0]),t&&(t==E?"html":t==T?"json":b.test(t)?"script":w.test(t)&&"xml")||"text"}function f(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function h(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()||(e.url=f(e.url,e.data),e.data=void 0)}function p(e,n,r,i){return t.isFunction(n)&&(i=r,r=n,n=void 0),t.isFunction(r)||(i=r,r=void 0),{url:e,data:n,success:r,dataType:i}}function d(e,n,r,i){var o,s=t.isArray(n),a=t.isPlainObject(n);t.each(n,function(n,c){o=t.type(c),i&&(n=r?i:i+"["+(a||"object"==o||"array"==o?n:"")+"]"),!i&&s?e.add(c.name,c.value):"array"==o||!r&&"object"==o?d(e,c,r,n):e.add(n,c)})}var m,v,g=0,y=window.document,x=/)<[^<]*)*<\/script>/gi,b=/^(?:text|application)\/javascript/i,w=/^(?:text|application)\/xml/i,T="application/json",E="text/html",_=/^\s*$/,P=y.createElement("a");P.href=window.location.href,t.active=0,t.ajaxJSONP=function(e,n){if(!("type"in e))return t.ajax(e);var r,i,c=e.jsonpCallback,u=(t.isFunction(c)?c():c)||"jsonp"+ ++g,l=y.createElement("script"),f=window[u],h=function(e){t(l).triggerHandler("error",e||"abort")},p={abort:h};return n&&n.promise(p),t(l).on("load error",function(o,c){clearTimeout(i),t(l).off().remove(),"error"!=o.type&&r?s(r[0],p,e,n):a(null,c||"error",p,e,n),window[u]=f,r&&t.isFunction(f)&&f(r[0]),f=r=void 0}),o(p,e)===!1?(h("abort"),p):(window[u]=function(){r=arguments},l.src=e.url.replace(/\?(.+)=\?/,"?$1="+u),y.head.appendChild(l),e.timeout>0&&(i=setTimeout(function(){h("timeout")},e.timeout)),p)},t.ajaxSettings={type:"GET",beforeSend:u,success:u,error:u,complete:u,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:T,xml:"application/xml, text/xml",html:E,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0},t.ajax=function(e){var n,i,c=t.extend({},e||{}),p=t.Deferred&&t.Deferred();for(m in t.ajaxSettings)void 0===c[m]&&(c[m]=t.ajaxSettings[m]);r(c),c.crossDomain||(n=y.createElement("a"),n.href=c.url,n.href=n.href,c.crossDomain=P.protocol+"//"+P.host!=n.protocol+"//"+n.host),c.url||(c.url=window.location.toString()),(i=c.url.indexOf("#"))>-1&&(c.url=c.url.slice(0,i)),h(c);var d=c.dataType,g=/\?.+=\?/.test(c.url);if(g&&(d="jsonp"),c.cache!==!1&&(e&&e.cache===!0||"script"!=d&&"jsonp"!=d)||(c.url=f(c.url,"_="+Date.now())),"jsonp"==d)return g||(c.url=f(c.url,c.jsonp?c.jsonp+"=?":c.jsonp===!1?"":"callback=?")),t.ajaxJSONP(c,p);var x,b=c.accepts[d],w={},T=function(t,e){w[t.toLowerCase()]=[t,e]},E=/^([\w-]+:)\/\//.test(c.url)?RegExp.$1:window.location.protocol,C=c.xhr(),j=C.setRequestHeader;if(p&&p.promise(C),c.crossDomain||T("X-Requested-With","XMLHttpRequest"),T("Accept",b||"*/*"),(b=c.mimeType||b)&&(b.indexOf(",")>-1&&(b=b.split(",",2)[0]),C.overrideMimeType&&C.overrideMimeType(b)),(c.contentType||c.contentType!==!1&&c.data&&"GET"!=c.type.toUpperCase())&&T("Content-Type",c.contentType||"application/x-www-form-urlencoded"),c.headers)for(v in c.headers)T(v,c.headers[v]);if(C.setRequestHeader=T,C.onreadystatechange=function(){if(4==C.readyState){C.onreadystatechange=u,clearTimeout(x);var e,n=!1;if(C.status>=200&&C.status<300||304==C.status||0==C.status&&"file:"==E){d=d||l(c.mimeType||C.getResponseHeader("content-type")),e=C.responseText;try{"script"==d?(1,eval)(e):"xml"==d?e=C.responseXML:"json"==d&&(e=_.test(e)?null:t.parseJSON(e))}catch(r){n=r}n?a(n,"parsererror",C,c,p):s(e,C,c,p)}else a(C.statusText||null,C.status?"error":"abort",C,c,p)}},o(C,c)===!1)return C.abort(),a(null,"abort",C,c,p),C;if(c.xhrFields)for(v in c.xhrFields)C[v]=c.xhrFields[v];var S="async"in c?c.async:!0;C.open(c.type,c.url,S,c.username,c.password);for(v in w)j.apply(C,w[v]);return c.timeout>0&&(x=setTimeout(function(){C.onreadystatechange=u,C.abort(),a(null,"timeout",C,c,p)},c.timeout)),C.send(c.data?c.data:null),C},t.get=function(){return t.ajax(p.apply(null,arguments))},t.post=function(){var e=p.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=p.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,r){if(!this.length)return this;var i,o=this,s=e.split(/\s/),a=p(e,n,r),c=a.success;return s.length>1&&(a.url=s[0],i=s[1]),a.success=function(e){o.html(i?t("
").html(e.replace(x,"")).find(i):e),c&&c.apply(o,arguments)},t.ajax(a),this};var C=encodeURIComponent;t.param=function(e,n){var r=[];return r.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(C(e)+"="+C(n))},d(r,e,n),r.join("&").replace(/%20/g,"+")}}(t),function(t,e){function n(t){return t.replace(/([a-z])([A-Z])/,"$1-$2").toLowerCase()}function r(t){return i?i+t:t.toLowerCase()}var i,o,s,a,c,u,l,f,h,p,d="",m={Webkit:"webkit",Moz:"",O:"o"},v=document.createElement("div"),g=/^((translate|rotate|scale)(X|Y|Z|3d)?|matrix(3d)?|perspective|skew(X|Y)?)$/i,y={};t.each(m,function(t,n){return v.style[t+"TransitionProperty"]!==e?(d="-"+t.toLowerCase()+"-",i=n,!1):void 0}),o=d+"transform",y[s=d+"transition-property"]=y[a=d+"transition-duration"]=y[u=d+"transition-delay"]=y[c=d+"transition-timing-function"]=y[l=d+"animation-name"]=y[f=d+"animation-duration"]=y[p=d+"animation-delay"]=y[h=d+"animation-timing-function"]="",t.fx={off:i===e&&v.style.transitionProperty===e,speeds:{_default:400,fast:200,slow:600},cssPrefix:d,transitionEnd:r("TransitionEnd"),animationEnd:r("AnimationEnd")},t.fn.animate=function(n,r,i,o,s){return t.isFunction(r)&&(o=r,i=e,r=e),t.isFunction(i)&&(o=i,i=e),t.isPlainObject(r)&&(i=r.easing,o=r.complete,s=r.delay,r=r.duration),r&&(r=("number"==typeof r?r:t.fx.speeds[r]||t.fx.speeds._default)/1e3),s&&(s=parseFloat(s)/1e3),this.anim(n,r,i,o,s)},t.fn.anim=function(r,i,d,m,v){var x,b,w,T={},E="",_=this,P=t.fx.transitionEnd,C=!1;if(i===e&&(i=t.fx.speeds._default/1e3),v===e&&(v=0),t.fx.off&&(i=0),"string"==typeof r)T[l]=r,T[f]=i+"s",T[p]=v+"s",T[h]=d||"linear",P=t.fx.animationEnd;else{b=[];for(x in r)g.test(x)?E+=x+"("+r[x]+") ":(T[x]=r[x],b.push(n(x)));E&&(T[o]=E,b.push(o)),i>0&&"object"==typeof r&&(T[s]=b.join(", "),T[a]=i+"s",T[u]=v+"s",T[c]=d||"linear")}return w=function(e){if("undefined"!=typeof e){if(e.target!==e.currentTarget)return;t(e.target).unbind(P,w)}else t(this).unbind(P,w);C=!0,t(this).css(y),m&&m.call(this)},i>0&&(this.bind(P,w),setTimeout(function(){C||w.call(_)},1e3*(i+v)+25)),this.size()&&this.get(0).clientLeft,this.css(T),0>=i&&setTimeout(function(){_.each(function(){w.call(this)})},0),this},v=null}(t),function(t){var e=!1;t.fn.scrollToTop=function(t){function n(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)}function r(){a.off("touchstart",d),e=!1}var i,o,s,a=this,c=t||0,u=a.scrollTop(),l=u,f=c-u,h=Math.min(750,Math.min(1500,Math.abs(u-c))),p=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){setTimeout(t,15)},d=function(){r()};e||0!=f&&(a.on("touchstart",d),e=!0,p(function m(t){e&&(i||(i=t),o=Math.min(1,Math.max((t-i)/h,0)),s=Math.round(u+f*n(o)),f>0&&s>c&&(s=c),0>f&&c>s&&(s=c),l!=s&&a.scrollTop(s),l=s,s!==c?p(m):r())}))}}(t),t.create=function(e){return t._mixObj(e),e.statics||(e.statics={}),e.statics.create=function(e){return t._mixObj(e),this.extend(e)},t.Class.extend(e)},t._mixObj=function(e){e.ctor=function(e,n){this._ncInstanceId=t.getInstanceId(),t.instances[this._ncInstanceId]=this,this._nuclearParentEmpty=!n,this.HTML="",this.option=e,this.parent=this._nuclearParentEmpty?document.createElement("div"):"string"==typeof n?document.querySelector(n):n,this.install&&this.install(),this._nuclearRef=[];for(var r in this)this.hasOwnProperty(r)&&this[r]&&this[r]._nuclearLocalRefresh&&(this[r]._nuclearParent=this,this._nuclearRef.push(this[r]));this._nuclearTimer=null,this._preNuclearTime=new Date,this.option&&t.observe(this.option,function(t,e,n,r){(!this.onOptionChange||this.onOptionChange&&this.onOptionChange(t,e,n,r)!==!1)&&(clearTimeout(this._nuclearTimer),new Date-this._preNuclearTime>40?(this._nuclearLocalRefresh(),this._preNuclearTime=new Date):this._nuclearTimer=setTimeout(function(){this._nuclearLocalRefresh()}.bind(this),40))}.bind(this)),this._nuclearRenderInfo={tpl:this._nuclearTplGenerator(),data:this.option,parent:this.parent},this.option._nuclearIndex=function(){return++window._nuclearIndex||(window._nuclearIndex=0)},this.option._resetNuclearIndex=function(){window._nuclearIndex=-1},this._nuclearRender(this._nuclearRenderInfo),this.installed&&this.installed()},e.refresh=function(){this._nuclearLocalRefresh()},e.render&&(e._nuclearTplGenerator=e.render),e.render=function(){return this._nuclearParentEmpty?this.HTML:this._nuclearTplGenerator()},e._nuclearRender=function(e){if(this.node)if(t.isUndefined(e.tpl))e.parent.removeChild(this.node),this.node=null,this.HTML="";else{var n=t.str2Dom(t.Tpl.render(t._fixEvent(t._fixTplIndex(e.tpl),this._ncInstanceId),e.data));e.parent.replaceChild(n,this.node),this.node=n}else t.isUndefined(e.tpl)||(e.parent.insertAdjacentHTML("beforeEnd",t.Tpl.render(t._fixEvent(t._fixTplIndex(e.tpl),this._ncInstanceId),e.data)),this.node=e.parent.lastChild);window._nuclearIndex=null,this.node&&(this._nuclearId=t.getId(),this.node.setAttribute("data-nuclearId",this._nuclearId),this._mixNode(),e.refreshPart=this.node.querySelectorAll("*[nc-refresh]"),this.HTML=this.node.outerHTML,this._nuclearFix(),this.onRefresh&&this.onRefresh())},e._mixNode=function(){var t=this.node.querySelectorAll("*[nc-id]"),e=t.length;if(e>0)for(var n=0;e>n;n++){var r=t[n];this[r.getAttribute("nc-id")]=r}var i=this.node.querySelectorAll("*[nc-class]"),o=i.length;if(o>0)for(var s=0;o>s;s++){var a=i[s],c=a.getAttribute("nc-class");this[c]||(this[c]=[]),this[c].push(a)}},e._nuclearFix=function(){this._nuclearParent||this._nuclearFixOne(this)},e._nuclearFixOne=function(t){var e=t._nuclearRef.length;if(e>0)for(var n=0;e>n;n++){var r=t._nuclearRef[n];r.node=t.node.querySelector('*[data-nuclearId="'+r._nuclearId+'"]'), r.node&&(r._mixNode(),r._nuclearRenderInfo.refreshPart=r.node.querySelectorAll("*[nc-refresh]"),r._nuclearRenderInfo.parent=r.node.parentNode,this._nuclearFixOne(r),r.onRefresh&&r.onRefresh(),r.installed&&r.installed())}},e._nuclearLocalRefresh=function(){var e=this._nuclearRenderInfo,n=e.refreshPart.length;if(e.tpl=this._nuclearTplGenerator(),n>0){var r=t.str2Dom(t.Tpl.render(t._fixEvent(t._fixTplIndex(e.tpl),this._ncInstanceId),e.data)).querySelectorAll("*[nc-refresh]");window._nuclearIndex=null;for(var i=0;n>i;i++){var o=e.refreshPart[i];o.parentNode&&o.parentNode.replaceChild(r[i],o)}e.refreshPart=r,this._mixNode(),this.HTML=this.node.outerHTML,this._nuclearFix(),this.onRefresh&&this.onRefresh()}else this._nuclearRender(e)}},t._fixEvent=function(t,e){return t.replace(/<[\s\S]*?>/g,function(t){return t.replace(/(onabort|onblur|oncancel|oncanplay|oncanplaythrough|onchange|onclick|onclose|oncontextmenu|oncuechange|ondblclick|ondrag|ondragend|ondragenter|ondragleave|ondragover|ondragstart|ondrop|ondurationchange|onemptied|onended|onerror|onfocus|oninput|oninvalid|onkeydown|onkeypress|onkeyup|onload|onloadeddata|onloadedmetadata|onloadstart|onmousedown|onmouseenter|onmouseleave|onmousemove|onmouseout|onmouseover|onmouseup|onmousewheel|onpause|onplay|onplaying|onprogress|onratechange|onreset|onresize|onscroll|onseeked|onseeking|onselect|onshow|onstalled|onsubmit|onsuspend|ontimeupdate|ontoggle|onvolumechange|onwaiting|onautocomplete|onautocompleteerror|onbeforecopy|onbeforecut|onbeforepaste|oncopy|oncut|onpaste|onsearch|onselectstart|onwheel|onwebkitfullscreenchange|onwebkitfullscreenerror)=('|")/g,function(t,n,r,i,o){return"Nuclear.instances["===o.substr(t.length+i,18)?t:t+="Nuclear.instances["+e+"]."})})},t._fixTplIndex=function(t){return t.replace(/{{#[\s\S]*?{{@index}}/g,function(t){return"{{_resetNuclearIndex}}"+t.replace("{{@index}}","{{_nuclearIndex}}")})},t._minActionObj=function(t){t.ctor=function(t){this.option=t,this.install&&this.install()}},t.createAction=function(e){return t._minActionObj(e),e.statics||(e.statics={}),e.statics.createAction=function(e){return t._minActionObj(e),this.extend(e)},t.Class.extend(e)},t.throttle=function(t,e,n){var r,i,o,s=null,a=0;n||(n={});var c=function(){a=n.leading===!1?0:Date.now(),s=null,o=t.apply(r,i),s||(r=i=null)};return function(){var u=Date.now();a||n.leading!==!1||(a=u);var l=e-(u-a);return r=this,i=arguments,0>=l||l>e?(clearTimeout(s),s=null,a=u,o=t.apply(r,i),s||(r=i=null)):s||n.trailing===!1||(s=setTimeout(c,l)),o}},t.isElement=function(t){return"object"==typeof HTMLElement?t instanceof HTMLElement:t&&"object"==typeof t&&null!==t&&1===t.nodeType&&"string"==typeof t.nodeName},t.str2Dom=function(t){var e={option:[1,""],legend:[1,"
","
"],area:[1,"",""],param:[1,"",""],thead:[1,"","
"],tr:[2,"","
"],col:[2,"","
"],td:[3,"","
"],body:[0,"",""],_default:[1,"
","
"]};e.optgroup=e.option,e.tbody=e.tfoot=e.colgroup=e.caption=e.thead,e.th=e.td;var n=/<\s*\w.*?>/g.exec(t),r=document.createElement("div");if(null!=n){var i=n[0].replace(//g,"").split(" ")[0];if("body"===i.toLowerCase()){var o=(document.implementation.createDocument("http://www.w3.org/1999/xhtml","html",null),document.createElement("body"));r.innerHTML=t.replace(//g,"
");var s=r.firstChild.attributes;o.innerHTML=t;for(var a=0;a=0?t.removeClass(e,n):t.addClass(e,n)},t.trim=function(t){return t.replace(/^\s\s*/,"").replace(/\s\s*$/,"")},t._iteration=function(e,n){var n=Array.prototype.slice.call(n);t.foreach(n[0],function(r){var i=n[0];n[0]=n[0][r],t[e].apply(t,n),n[0]=i})},t.css=function(e,n,r){return e?t.isNodeList(e)?void t._iteration("css",arguments):(3==arguments.length&&e.style&&(e.style[n]=r),window.getComputedStyle(e,null)[n]):void 0},t.foreach=function(t,e){for(var n=0,r=t.length;r>n;n++)e.call(t[n],n)},t.offset=function(t){var e=0,n=0;if(!document.documentElement.getBoundingClientRect||!t.getBoundingClientRect){for(;t.offsetParent;)e+=t.offsetTop,n+=t.offsetLeft,t=t.offsetParent;return{left:n,top:e}}var r=t.getBoundingClientRect();return n=r.left,e=r.top,{left:n+Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),top:e+Math.max(document.documentElement.scrollTop,document.body.scrollTop)}},t.getViewport=function(){var t=document.documentElement,e=document.body,n=window,r=document.createElement("div");r.innerHTML=" ";var i=3!==r.firstChild.nodeType?{left:e.scrollLeft||t.scrollLeft,top:e.scrollTop||t.scrollTop}:{left:n.pageXOffset,top:n.pageYOffset},o=n.innerWidth?{width:n.innerWidth,height:n.innerHeight}:t&&t.clientWidth&&0!=t.clientWidth?{width:t.clientWidth,height:t.clientHeight}:{width:e.clientWidth,height:e.clientHeight};return{left:i.left,top:i.top,width:o.width,height:o.height}},t.getLastNode=function(t,e){var n=t.querySelectorAll(e),r=n.length;return n[r-1]},t.isUndefined=function(t){return"undefined"==typeof t},t.domready=function(){var t,e=[],n=document,r=n.documentElement.doScroll,i="DOMContentLoaded",o=(r?/^loaded|^c/:/^loaded|^i|^c/).test(n.readyState);return o||n.addEventListener(i,t=function(){for(n.removeEventListener(i,t),o=1;t=e.shift();)t()}),function(t){o?setTimeout(t,0):e.push(t)}}(),function(){var e={},n=Object.prototype.toString;"Boolean Number String Function Array Date RegExp Object Error NodeList".split(" ").forEach(function(t){e["[object "+t+"]"]=t.toLowerCase()});var r=Object.prototype.hasOwnProperty,i=function(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?e[n.call(t)]||"object":typeof t},o=function(t){return"nodelist"===i(t)},s=function(t){return"function"===i(t)},a=function(t){return"array"===i(t)},c=function(t){return null!=t&&t===t.window},u=function(t){return"object"!==i(t)||t.nodeType||c(t)?!1:t.constructor&&!r.call(t.constructor.prototype,"isPrototypeOf")?!1:!0};t.type=i,t.isFunction=s,t.isArray=a,t.isWindow=c,t.isPlainObject=u,t.isNodeList=o}(),t.merge=function(){var e,n,r,i,o,s,a=arguments[0]||{},c=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[c]||{},c++),"object"==typeof a||t.isFunction(a)||(a={}),c===u&&(a=this,c--);u>c;c++)if(null!=(e=arguments[c]))for(n in e)r=a[n],i=e[n],a!==i&&(l&&i&&(t.isPlainObject(i)||(o=t.isArray(i)))?(o?(o=!1,s=r&&t.isArray(r)?r:[]):s=r&&t.isPlainObject(r)?r:{},a[n]=t.merge(l,s,i)):void 0!==i&&(a[n]=i));return a},t.uuid=function(){var t=(new Date).getTime(),e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"==e?n:3&n|8).toString(16)});return e},t.createCanvas=function(e){return t._minCanvasObj(e),e.statics||(e.statics={}),e.statics.create=function(e){return t._minCanvasObj(e),this.extend(e)},t.Class.extend(e)},t._minCanvasObj=function(e){e.ctor=function(e,n,r,i){this.canvas=document.createElement("canvas"),this.ctx=this.canvas.getContext("2d"),this.canvas.width=e,this.canvas.height=n,this.parent="string"==typeof i?document.querySelector(i):i,this.option=r,this.install&&this.install(),this.option&&t.observe(this.option,t.throttle(this._nuclearRender.bind(this),15)),this._nuclearRender(),this.installed&&this.installed(),this.parent.appendChild(this.canvas)},e._nuclearRender=function(t){this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),this.render()}},t._nextID=0,t.getId=function(){return t._nextID++},t._instanceId=0,t.getInstanceId=function(){return t._instanceId++},t.instances={},function(e,n){t.Tpl={},n(t.Tpl)}(this,function(t){function e(t){return"function"==typeof t}function n(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function r(t,e){return d.call(t,e)}function i(t){return!r(m,t)}function o(t){return String(t).replace(/[&<>"'\/]/g,function(t){return v[t]})}function s(e,r){function o(){if(T&&!E)for(;v.length;)delete m[v.pop()];else v=[];T=!1,E=!1}function s(t){if("string"==typeof t&&(t=t.split(y,2)),!p(t)||2!==t.length)throw new Error("Invalid tags: "+t);l=new RegExp(n(t[0])+"\\s*"),f=new RegExp("\\s*"+n(t[1])),h=new RegExp("\\s*"+n("}"+t[1]))}if(!e)return[];var l,f,h,d=[],m=[],v=[],T=!1,E=!1;s(r||t.tags);for(var _,P,C,j,S,O,N=new u(e);!N.eos();){if(_=N.pos,C=N.scanUntil(l))for(var A=0,L=C.length;L>A;++A)j=C.charAt(A),i(j)?v.push(m.length):E=!0,m.push(["text",j,_,_+1]),_+=1,"\n"===j&&o();if(!N.scan(l))break;if(T=!0,P=N.scan(w)||"name",N.scan(g),"="===P?(C=N.scanUntil(x),N.scan(x),N.scanUntil(f)):"{"===P?(C=N.scanUntil(h),N.scan(b),N.scanUntil(f),P="&"):C=N.scanUntil(f),!N.scan(f))throw new Error("Unclosed tag at "+N.pos);if(S=[P,C,_,N.pos],m.push(S),"#"===P||"^"===P)d.push(S);else if("/"===P){if(O=d.pop(),!O)throw new Error('Unopened section "'+C+'" at '+_);if(O[1]!==C)throw new Error('Unclosed section "'+O[1]+'" at '+_)}else"name"===P||"{"===P||"&"===P?E=!0:"="===P&&s(C)}if(O=d.pop())throw new Error('Unclosed section "'+O[1]+'" at '+N.pos);return c(a(m))}function a(t){for(var e,n,r=[],i=0,o=t.length;o>i;++i)e=t[i],e&&("text"===e[0]&&n&&"text"===n[0]?(n[1]+=e[1],n[3]=e[3]):(r.push(e),n=e));return r}function c(t){for(var e,n,r=[],i=r,o=[],s=0,a=t.length;a>s;++s)switch(e=t[s],e[0]){case"#":case"^":i.push(e),o.push(e),i=e[4]=[];break;case"/":n=o.pop(),n[5]=e[2],i=o.length>0?o[o.length-1][4]:r;break;default:i.push(e)}return r}function u(t){this.string=t,this.tail=t,this.pos=0}function l(t,e){this.view=t,this.cache={".":this.view},this.parent=e}function f(){this.cache={}}var h=Object.prototype.toString,p=Array.isArray||function(t){return"[object Array]"===h.call(t)},d=RegExp.prototype.test,m=/\S/,v={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},g=/\s*/,y=/\s+/,x=/\s*=/,b=/\s*\}/,w=/#|\^|\/|>|\{|&|=|!/;u.prototype.eos=function(){return""===this.tail},u.prototype.scan=function(t){var e=this.tail.match(t);if(!e||0!==e.index)return"";var n=e[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},u.prototype.scanUntil=function(t){var e,n=this.tail.search(t);switch(n){case-1:e=this.tail,this.tail="";break;case 0:e="";break;default:e=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=e.length,e},l.prototype.push=function(t){return new l(t,this)},l.prototype.lookup=function(t){var n,r=this.cache;if(t in r)n=r[t];else{for(var i,o,s=this,a=!1;s;){if(t.indexOf(".")>0)for(n=s.view,i=t.split("."),o=0;null!=n&&oc;++c)s=void 0,i=t[c],o=i[0],"#"===o?s=this.renderSection(i,e,n,r):"^"===o?s=this.renderInverted(i,e,n,r):">"===o?s=this.renderPartial(i,e,n,r):"&"===o?s=this.unescapedValue(i,e):"name"===o?s=this.escapedValue(i,e):"text"===o&&(s=this.rawValue(i)),void 0!==s&&(a+=s);return a},f.prototype.renderSection=function(t,n,r,i){function o(t){return s.render(t,n,r)}var s=this,a="",c=n.lookup(t[1]);if(c){if(p(c))for(var u=0,l=c.length;l>u;++u)a+=this.renderTokens(t[4],n.push(c[u]),r,i);else if("object"==typeof c||"string"==typeof c||"number"==typeof c)a+=this.renderTokens(t[4],n.push(c),r,i);else if(e(c)){if("string"!=typeof i)throw new Error("Cannot use higher-order sections without the original template");c=c.call(n.view,i.slice(t[3],t[5]),o),null!=c&&(a+=c)}else a+=this.renderTokens(t[4],n,r,i);return a}},f.prototype.renderInverted=function(t,e,n,r){var i=e.lookup(t[1]);return!i||p(i)&&0===i.length?this.renderTokens(t[4],e,n,r):void 0},f.prototype.renderPartial=function(t,n,r){if(r){var i=e(r)?r(t[1]):r[t[1]];return null!=i?this.renderTokens(this.parse(i),n,r,i):void 0}},f.prototype.unescapedValue=function(t,e){var n=e.lookup(t[1]);return null!=n?n:void 0},f.prototype.escapedValue=function(e,n){var r=n.lookup(e[1]);return null!=r?t.escape(r):void 0},f.prototype.rawValue=function(t){return t[1]},t.name="mustache.js",t.version="2.0.0",t.tags=["{{","}}"];var T=new f;t.clearCache=function(){return T.clearCache()},t.parse=function(t,e){return T.parse(t,e)},t.render=function(t,e,n){return T.render(t,e,n)},t.to_html=function(n,r,i,o){var s=t.render(n,r,i);return e(o)?void o(s):s},t.escape=o,t.Scanner=u,t.Context=l,t.Writer=f}),function(){var e=function(t,n,r){var i=function(t,n,r){t.$observer||(t.$observer=this);var i=t.$observer,o=[];e.isArray(t)&&(0===t.length&&(t.$observeProps={},t.$observeProps.$observerPath="#"),i.mock(t));for(var s in t)t.hasOwnProperty(s)&&(r?e.isArray(n)&&e.isInArray(n,s)?(o.push(s),i.watch(t,s)):e.isString(n)&&s==n&&(o.push(s),i.watch(t,s)):(o.push(s),i.watch(t,s)));i.target=t,i.propertyChangedHandler||(i.propertyChangedHandler=[]);var a=r?r:n;i.propertyChangedHandler.push({all:!r,propChanged:a,eventPropArr:o})};return i.prototype={onPropertyChanged:function(t,n,r,i,o){if(n!==r&&this.propertyChangedHandler)for(var s=e._getRootName(t,o),a=0,c=this.propertyChangedHandler.length;c>a;a++){var u=this.propertyChangedHandler[a];(u.all||e.isInArray(u.eventPropArr,s)||0===s.indexOf("Array-"))&&u.propChanged.call(this.target,t,n,r,o)}0!==t.indexOf("Array-")&&"object"==typeof n&&this.watch(i,t,i.$observeProps.$observerPath)},mock:function(t){var n=this;e.methods.forEach(function(r){t[r]=function(){var t=Array.prototype.slice.call(this,0),i=Array.prototype[r].apply(this,Array.prototype.slice.call(arguments));if(new RegExp("\\b"+r+"\\b").test(e.triggerStr)){for(var o in this)this.hasOwnProperty(o)&&!e.isFunction(this[o])&&n.watch(this,o,this.$observeProps.$observerPath);n.onPropertyChanged("Array-"+r,this,t,this,this.$observeProps.$observerPath)}return i}})},watch:function(t,n,r){if("$observeProps"!==n&&"$observer"!==n&&!e.isFunction(t[n])){t.$observeProps||(t.$observeProps={}),t.$observeProps.$observerPath=void 0!==r?r:"#";var i=this,o=t.$observeProps[n]=t[n];if(Object.defineProperty(t,n,{get:function(){return this.$observeProps[n]},set:function(e){var r=this.$observeProps[n];this.$observeProps[n]=e,i.onPropertyChanged(n,e,r,this,t.$observeProps.$observerPath)}}),"object"==typeof o){e.isArray(o)&&(this.mock(o),0===o.length&&(o.$observeProps||(o.$observeProps={}),o.$observeProps.$observerPath=void 0!==r?r:"#"));for(var s in o)o.hasOwnProperty(s)&&this.watch(o,s,t.$observeProps.$observerPath+"-"+n)}}}},new i(t,n,r)};e.methods=["concat","every","filter","forEach","indexOf","join","lastIndexOf","map","pop","push","reduce","reduceRight","reverse","shift","slice","some","sort","splice","unshift","toLocaleString","toString","size"],e.triggerStr=["concat","pop","push","reverse","shift","sort","splice","unshift","size"].join(","),e.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},e.isString=function(t){return"string"==typeof t},e.isInArray=function(t,e){for(var n=t.length;--n>-1;)if(e===t[n])return!0;return!1},e.isFunction=function(t){return"[object Function]"==Object.prototype.toString.call(t)},e.twoWay=function(t,n,r,i){"object"==typeof t[n]&&"object"==typeof r[i]?(e(t,n,function(t,e){r[i]=this[n]}),e(r,i,function(e,r){t[n]=this[i]})):(e(t,n,function(t,e){r[i]=e}),e(r,i,function(e,r){t[n]=r}))},e._getRootName=function(t,e){return"#"===e?t:e.split("-")[1]},e.add=function(t,e,n){t[e]=n;var r=t.$observer;r.watch(t,e)},Array.prototype.size=function(t){this.length=t},t.observe=e}(),function(){var e=!1,n=/xyz/.test(function(){xyz})?/\b_super\b/:/.*/,r=function(){};r.extend=function(t){function i(){!e&&this.ctor&&this.ctor.apply(this,arguments)}var o=this.prototype;e=!0;var s=new this;e=!1;for(var a in t)"statics"!=a&&(s[a]="function"==typeof t[a]&&"function"==typeof o[a]&&n.test(t[a])?function(t,e){return function(){var n=this._super;this._super=o[t];var r=e.apply(this,arguments);return this._super=n,r}}(a,t[a]):t[a]);for(var c in this)this.hasOwnProperty(c)&&"extend"!=c&&(i[c]=this[c]);if(i.prototype=s,t.statics)for(var a in t.statics)t.statics.hasOwnProperty(a)&&(i[a]=t.statics[a],"ctor"==a&&i[a]());return i.prototype.constructor=i,i.extend=r.extend,i.implement=function(t){for(var e in t)s[e]=t[e]},i},t.Class=r}(),t}); \ No newline at end of file diff --git a/src/core.js b/src/core.js index 1b9ee22ae..683d095c9 100644 --- a/src/core.js +++ b/src/core.js @@ -111,8 +111,10 @@ Nuclear._mixObj = function (obj) { this.node = newNode; } } else { - item.parent.insertAdjacentHTML("beforeEnd", Nuclear.Tpl.render(Nuclear._fixEvent(Nuclear._fixTplIndex(item.tpl), this._ncInstanceId), item.data)); - this.node = item.parent.lastChild; + if (!Nuclear.isUndefined(item.tpl)) { + item.parent.insertAdjacentHTML("beforeEnd", Nuclear.Tpl.render(Nuclear._fixEvent(Nuclear._fixTplIndex(item.tpl), this._ncInstanceId), item.data)); + this.node = item.parent.lastChild; + } } window["_nuclearIndex"] = null; if (this.node) {