Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

nervjs

Package Overview
Dependencies
Maintainers
2
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nervjs - npm Package Compare versions

Comparing version 0.1.17 to 0.1.18

2

dist/nerv.min.js

@@ -1,1 +0,1 @@

!(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.Nerv={})})(this,(function(e){"use strict";function t(e){return"number"==typeof e}function n(e){return"string"==typeof e}function r(e){return"function"==typeof e}function o(e){return!0===e||!1===e}function i(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor.prototype}function a(e){return e===Object(e)&&!r(e)}function s(e){return r(e)&&/native code/.test(e.toString())}function l(e,t){if(!t)return e;for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function u(e){return l({},e)}function c(){Me=!1;var e=Re.slice(0);Re=[],e.forEach((function(e){return e()}))}function p(e,t){var n;if(Re.push((function(){if(e)try{e.call(t)}catch(r){console.error(r)}else n&&n(t)})),Me||(Me=!0,Se()),!e&&De)return new Promise(function(e){n=e})}function f(e){return e&&"VirtualNode"===e.type}function h(e){return e&&"VirtualText"===e.type}function d(e){return e&&"Widget"===e.type}function v(e){return!!(e&&"function"==typeof e.hook&&!e.hasOwnProperty("hook")||e&&"function"==typeof e.unhook&&!e.hasOwnProperty("unhook"))}function m(e,r){if(d(e))return e.init();if(n(e)||t(e))return je.createTextNode(e);if(h(e))return je.createTextNode(e.text);if(null===e||!1===e)return je.createComment("Empty dom node");if(f(e)){e.isSvg?r=!0:"svg"===e.tagName?r=!0:"foreignObject"===e.tagName&&(r=!1),r&&(e.namespace=Le);var o=null===e.namespace?je.createElement(e.tagName):je.createElementNS?je.createElementNS(e.namespace,e.tagName):je.createElement(e.tagName);g(o,e.props,r),He.debug&&(o._props=e.props),r&&(e.isSvg=r);var i=e.children;return i.length&&i.forEach((function(t){if(t!==undefined&&null!==t&&!1!==t&&o.appendChild){(d(t)||f(t))&&(t.parentContext=e.parentContext||{});var n=m(t,r);n&&o.appendChild(n)}})),o}if(Array.isArray(e)){var a=je.createDocumentFragment();return e.forEach((function(e){if(e!==undefined&&null!==e&&!1!==e&&a.appendChild){var t=m(e,r);return t&&a.appendChild(t),a.appendChild(t)}})),a}return null}function g(e,t,o){for(var i in t)if("children"!==i){var s=t[i];if(v(s))s.hook&&s.hook(e,i);else if("style"!==i)if(a(s))if(i in e)try{e[i]=s}catch(c){console.warn("set prop failed, prop value:",s)}else e.setAttribute(i,s);else if("list"!==i&&"type"!==i&&!o&&i in e){try{e[i]=null==s?"":s}catch(c){console.warn("set prop failed, prop value:",s)}null!=s&&!1!==s||e.removeAttribute(i)}else null==s||!1===s?e.removeAttribute(i):r(s)||e.setAttribute(i,s);else if(n(s))e.setAttribute(i,s);else if(a(s))for(var l in s){var u=s[l];if(u!==undefined)try{e[i][l]=u}catch(c){console.warn("Can't set empty style")}}}}function y(e){return new ze(e)}function k(e,t){var n={old:e};return x(e,t,n,0),n}function x(e,t,n,r){if(e!==t){var o=n[r],i=!1;if(t)if(h(t))h(e)?e.text!==t.text&&(o=S(o,new We(We.VTEXT,e,t))):(i=!0,o=S(o,new We(We.VTEXT,e,t)));else if(f(t))if(f(e))if(e.tagName===t.tagName&&e.key===t.key){var a=b(e.props,t.props);a&&(o=S(o,new We(We.PROPS,e,a))),o=w(e,t,o,n,r)}else o=S(o,new We(We.VNODE,e,t)),i=!0;else o=S(o,new We(We.VNODE,e,t)),i=!0;else d(t)?(d(e)||(i=!0),o=S(o,new We(We.WIDGET,e,t))):Array.isArray(t)&&(i=!0,t.forEach((function(e){x(null,e,n,r),r++})));else d(e)||(C(e,n,r),o=n[r]),o=S(o,new We(We.REMOVE,e,null));o&&(n[r]=o),i&&C(e,n,r)}}function b(e,t){var n=null;for(var r in e)if("children"!==r){t.hasOwnProperty(r)||((n=n||{})[r]=undefined);var o=e[r],s=t[r];if(o!==s)if(a(o)&&a(s))if(i(o)!==i(s))(n=n||{})[r]=s;else if(v(s))(n=n||{})[r]=s;else{var l=b(o,s);l&&((n=n||{})[r]=l)}else(n=n||{})[r]=s}for(var u in t)e.hasOwnProperty(u)||((n=n||{})[u]=t[u]);return n}function w(e,t,n,r,o){for(var i=e.children,a=E(i,t.children,"key"),s=a.list,l=Math.max(i.length,s.length),u=0;u<l;u++){var c=i[u],p=s[u];o+=1,c?x(c,p,r,o):p&&(n=S(n,new We(We.INSERT,null,p))),f(c)&&c.count&&(o+=c.count)}return a.moves&&(n=S(n,new We(We.ORDER,e,a.moves))),n}function E(e,t,n){var r=A(t,n),o=r.keyMap,i=r.free;if(i.length===t.length)return{list:t,moves:null};var a=A(e,n),s=a.keyMap;if(a.free.length===e.length)return{list:t,moves:null};var l=0,u=0,c=e.map((function(e){var r=e[n];if(r)return o.hasOwnProperty(r)?t[o[r]]:(u++,null);var a=i[l++],s=t[a];return s||(u++,null)})),p=l>=i.length?t.length:i[l];t.forEach((function(e,t){var r=e[n];r?s.hasOwnProperty(r)||c.push(e):t>=p&&c.push(e)}));for(var f,h=c.slice(0),d=0,v=[],m=[],g=0;g<t.length;){for(f=h[d];null===f&&h.length;)v.push(O(h,d,null)),f=h[d];var y=t[g],k=y[n],x=f[n];f&&x===k?(d++,g++):y[n]?(f&&x&&o[x]!==g+1?(v.push(O(h,d,x)),(f=h[d])&&x===k?d++:m.push({key:k,to:g})):m.push({key:k,to:g}),g++):f&&x&&v.push(O(h,d,x))}for(;d<h.length;)f=h[d],v.push(O(h,d,f&&f.key));return v.length!==u||m.length?{list:c,moves:{removes:v,inserts:m}}:{list:c,moves:null}}function O(e,t,n){return e.splice(t,1),{from:t,key:n}}function C(e,t,n){N(e,t,n),T(e,t,n)}function N(e,t,n){if(f(e)&&(e.hooks&&(t[n]=S(t[n],new We(We.PROPS,e,P(e.hooks)))),e.descendantHooks))for(var r=e.children,o=r.length,i=0;i<o;i++){var a=r[i];N(a,t,n+=1),f(a)&&a.count&&(n+=a.count)}}function T(e,t,n){d(e)?r(e.destroy)&&(t[n]=S(t[n],new We(We.REMOVE,e,null))):f(e)&&e.hasWidgets&&e.children.forEach((function(e){T(e,t,n+=1),f(e)&&e.count&&(n+=e.count)}))}function A(e,t){var n={},r=[];return e.forEach((function(e,o){e[t]?n[e[t]]=o:r.push(o)})),{keyMap:n,free:r}}function P(e){var t={};for(var n in e)t[n]=undefined;return t}function S(e,t){return e?(Array.isArray(e)?e.push(t):e=[e,t],e):[t]}function _(e,t,n,r){return n&&0!==n.length?(n.sort((function(e,t){return e-t})),R(e,t,n,r)):{}}function R(e,t,n,r,o){if(void 0===r&&(r={}),void 0===o&&(o=0),e){M(n,o,o)&&(r[o]=e);var i=t.children;if(i){var a=e.childNodes;i.forEach((function(e,t){var i=++o+((e=e||{}).count||0);M(n,o,i)&&R(a[t],e,n,r,o),o=i}))}}return r}function M(e,t,n){if(0===e.length)return!1;for(var r,o,i=0,a=e.length-1;i<=a;){if(r=(a+i)/2>>0,o=e[r],i===a)return o>=t&&o<=n;if(o<t)i=r+1;else{if(!(o>n))return!0;a=r-1}}return!1}function D(e,t,n){var r=F(t);if(0===r.length)return e;var o=t.old,i=_(e,o,r);return r.forEach((function(r){e=U(e,i[r],t[r],n)})),e}function U(e,t,n,r){if(!t)return e;var o;return Array.isArray(n)||(n=[n]),n.forEach((function(n){o=V(t,n,r),t===e&&(e=o)})),e}function V(e,t,n){var r=t.type,o=t.vnode,i=t.patch;switch(r){case We.VTEXT:return H(e,i);case We.VNODE:return L(e,i,n);case We.INSERT:return j(e,i,n);case We.WIDGET:return z(e,o,i);case We.PROPS:return I(e,i,o.props,o.isSvg);case We.ORDER:return X(e,i);case We.REMOVE:return B(e,o);default:return e}}function H(e,t){if(null===e)return m(t);if(e.splitText!==undefined)return e.nodeValue=t.text,e;var n=e.parentNode,r=m(t);return n&&n.replaceChild(r,e),r}function L(e,t,n){if((d(t)||f(t))&&(t.parentContext=n),null===e)return m(t);var r=e.parentNode,o=m(t);return r&&o!==e&&r.replaceChild(o,e),o}function j(e,t,n){(d(t)||f(t))&&(t.parentContext=n);var r=m(t);return e&&r&&e.appendChild(r),e}function z(e,t,n){var r=q(t,n);t&&(n.parentContext=t.parentContext);var o=r?n.update(t,n,e)||e:m(n),i=e.parentNode;return i&&e!==o&&i.replaceChild(o,e),!r&&t&&W(e,t),o}function W(e,t){r(t.destroy)&&d(t)&&t.destroy(e)}function I(e,t,o,s){for(var l in t)if("children"!==l){var u=t[l],c=o[l];if(null==u||!1===u){if(v(c)&&c.unhook){c.unhook(e,l,u);continue}if("style"===l){n(c)||e.removeAttribute(l);continue}l in e?(e[l]=n(c)?"":null,e.removeAttribute(l)):e.removeAttribute(l)}else{if(v(u)){v(c)&&c.unhook&&c.unhook(e,l,u),u&&u.hook&&u.hook(e,l,c);continue}if("style"===l){if(n(u))e.setAttribute(l,u);else for(var p in u){var f=u[p];if(null!=f&&!1!==f)try{e[l][p]=f}catch(h){}}continue}if(a(u)){if(c&&a(c)&&i(c)!==i(u))if(l in e)try{e[l]=u}catch(h){}else e.setAttribute(l,u);continue}if("list"!==l&&"type"!==l&&!s&&l in e){try{e[l]=u}catch(h){}continue}r(u)||e.setAttribute(l,u)}}return e}function X(e,t){for(var n,r,o,i=t.removes,a=t.inserts,s=e.childNodes,l={},u=0;u<i.length;u++)n=s[(r=i[u]).from],r.key&&(l[r.key]=n),e.removeChild(n);for(var c=s.length,p=0;p<a.length;p++)n=l[(o=a[p]).key],e.insertBefore(n,o.to>=c++?null:s[o.to]);return e}function B(e,t){var n=e.parentNode;return n&&n.removeChild(e),d(t)&&W(e,t),null}function q(e,t){if(d(e)&&d(t)){var n=e.props.key,r=t.props.key;return"name"in e&&"name"in t?e.name===t.name&&n===r:e.init===t.init&&n===r}return!1}function F(e){var t=[];if(e)for(var n in e)"old"!==n&&e.hasOwnProperty(n)&&t.push(Number(n));return t}function Y(e,t){return a(e)&&(e.parentContext=t),m(e)}function G(e){var t=e.parentContext,n=e.tagName.prototype;n&&r(n.render)&&(e.component=new e.tagName(e.props,t));var o=e.component;r(o.componentWillMount)&&(o.componentWillMount(),o.state=o.getState()),o._dirty=!1;var i=J(o);o._rendered=i,r(o.componentDidMount)&&Xe.push(o),r(e.props.ref)&&Xe.push((function(){return e.props.ref(o)}));var a=Y(i,$(o,t));return He.debug&&(a._component=o),o.dom=a,o._disable=!1,null!==He.afterMount&&He.afterMount(e),a}function Z(e){var t=e.props.ref;delete e.props.ref,e._rendered=e.tagName(e.props,e.parentContext);var n=e._rendered;f(n)&&r(t)&&(t=new Ie(t),n.props.ref=t);var o=Y(n,e.parentContext);return e.dom=o,o}function $(e,t){return e.getChildContext?l(t,e.getChildContext()):t}function J(e){Ve.current=e;var r=e.render();return(t(r)||n(r))&&(r=y(r)),Ve.current=null,r}function K(){if(Xe.length){var e=Xe.slice(0);Xe.length=0,e.forEach((function(e){r(e)?e():e.componentDidMount&&e.componentDidMount()}))}}function Q(e,t){var n=t.component=e.component,o=t.props,i=n.context;return n._disable=!0,r(n.componentWillReceiveProps)&&n.componentWillReceiveProps(o,i),n._disable=!1,n.prevProps=n.props,n.prevState=n.state,n.prevContext=n.context,n.props=o,n.context=i,r(t.props.ref)&&t.props.ref(n),te(n),n.dom}function ee(e,t){var n=e._rendered,r=t.tagName(t.props,t.parentContext);t._rendered=r;var o=ne(r,n,e.dom,e.parentContext);return t.dom=o,o}function te(e,t){void 0===t&&(t=!1);var n=e.dom,o=e.props,i=e.getState(),a=e.context,s=e.prevProps||o,l=e.prevContext||a;e.props=s,e.context=l;var u=!1;if(!t&&r(e.shouldComponentUpdate)&&!1===e.shouldComponentUpdate(o,i,a)?u=!0:r(e.componentWillUpdate)&&e.componentWillUpdate(o,i,a),e.props=o,e.state=i,e.context=a,e._dirty=!1,!u){var c=e._rendered,p=J(e),f=$(e,a);e._rendered=p,e.dom=ne(p,c,n,f),e.componentDidUpdate&&e.componentDidUpdate(o,i,a)}if(e.prevProps=e.props,e.prevState=e.state,e.prevContext=e.context,e._pendingCallbacks)for(;e._pendingCallbacks.length;)e._pendingCallbacks.pop().call(e);null!==He.afterUpdate&&He.afterUpdate(e),K()}function ne(e,t,n,r){return a(e)&&(e.parentContext=r),D(n,k(t,e),r)}function re(e){var t=e.component;null!==He.beforeUnmount&&He.beforeUnmount(t),r(t.componentWillUnmount)&&t.componentWillUnmount(),ne(null,t._rendered,t.dom,t.context),t.dom=t._rendered=null,r(e.props.ref)&&e.props.ref(null)}function oe(e){ne(null,e._rendered,e.dom,e.parentContext),e.dom=e._rendered=null,r(e.props.ref)&&e.props.ref(null)}function ie(e){!e._dirty&&(e._dirty=!0)&&1===Be.push(e)&&p(ae)}function ae(){var e,t=Be;for(Be=[];e=t.pop();)e._dirty&&te(e)}function se(e,t){if(null===e||null===t)return!1;if(Object.is(e,t))return!0;var n=e?Object.keys(e):[],r=t?Object.keys(t):[];if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(!t.hasOwnProperty(i)||!Object.is(e[i],t[i]))return!1}return!0}function le(e){return f(e)||n(e)||t(e)}function ue(e,t,n){if(!le(e)&&!d(e))return null;if(!t||1!==t.nodeType)throw new Error(t+" should be a DOM Element");var r=Y(e,{});return r&&t.appendChild(r),K(),n&&n(),e.component||r}function ce(e,t,n){var r,o,i,a=[];return!n&&he(t)&&(n=t,t={}),(t=t||{}).hasOwnProperty("key")&&t.key&&(r=t.key,delete t.key),t.hasOwnProperty("namespace")&&t.namespace&&(o=t.namespace,delete t.namespace),t.hasOwnProperty("owner")&&(i=t.owner,delete t.owner),t.hasOwnProperty("children")&&t.children&&(n&&n.length||(n=t.children),delete t.children),n&&pe(a,n,e),new Ye(e,t,a,r,o,i)}function pe(e,r,o){n(r)||t(r)?(r=String(r),e.push(y(r))):fe(r)?e.push(r):_e(r)&&r.forEach((function(t){return pe(e,t,o)}))}function fe(e){return f(e)||h(e)||d(e)}function he(e){return n(e)||_e(e)||fe(e)}function de(e){return"onDoubleClick"===e?e="ondblclick":"onTouchTap"===e&&(e="onclick"),e.toLowerCase()}function ve(e){if("value"===e.propertyName){var t=e.target||e.srcElement,n=t.value;n!==ut&&(ut=n,r(pt)&&pt.call(t,e))}}function me(e,t){pt=t,at||(at=!0,document.addEventListener("focusin",(function(){ye(),ge(e)}),!1),document.addEventListener("focusout",ye,!1))}function ge(e){lt=e,ut=e.value,ct=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(lt,"value",{get:function(){return ct.get.call(this)},set:function(e){ut=e,ct.set.call(this,e)}}),lt.addEventListener("propertychange",ve,!1)}function ye(){lt&&(delete lt.value,lt.removeEventListener("propertychange",ve,!1),lt=null,ut=null,ct=null)}function ke(e){var t=e.nodeName&&e.nodeName.toLowerCase(),n=e.type;return"input"===t&&/text|password/.test(n)||"textarea"===t}function xe(e,t){return ke(e)&&"onchange"===t&&(t=tt in window?tt:nt),t}function be(e){return e.substr(2)}function we(){this.cancelBubble=!0,this.stopImmediatePropagation()}function Ee(e,t,n,r,o){var i=n.get(t);if((!i||(r--,o.currentTarget=t,i(e),!e.cancelBubble))&&r>0){var a=t.parentNode;if(null===a||"click"===e.type&&1===a.nodeType&&a.disabled)return;Ee(e,a,n,r,o)}}function Oe(e,t,n){var r=function(e){var t=n.items.size;if(t>0){var r={currentTarget:e.target};Object.defineProperties(e,{currentTarget:{configurable:!0,get:function(){return r.currentTarget}},stopPropagation:{value:we}}),Ee(e,e.target,n.items,t,r)}};return e.addEventListener(be(t),r,!1),r}function Ce(e,t,n){var r=function(t){var r=n.get(e);if(r&&r.eventHandler){var o={currentTarget:e};Object.defineProperties(t,{currentTarget:{configurable:!0,get:function(){return o.currentTarget}}}),r.eventHandler(t)}};return e.addEventListener(be(t),r,!1),r}function Ne(e,r){var i={},s=$e.DOMAttributeNamespaces;for(var l in r){var u=r[l],c=l;if("id"!==(l=$e.DOMAttributeNames[l]||l)&&"className"!==l&&"namespace"!==l||u===undefined)if("ref"!==l)if("dangerouslySetInnerHTML"!==l)if("o"!==l.charAt(0)||"n"!==l.charAt(1))if(s.hasOwnProperty(c)&&(n(u)||t(u)||o(u))){var p=s[c];i[l]=u instanceof ft?u:new ft(p,u)}else if("defaultValue"!==l){if("style"!==l)i[l]=u;else if(n(u))i[l]=u;else if(a(u))for(var f in u){var h=u[f];h===undefined||!n(h)&&isNaN(h)||(h=t(h)&&!1===ht.test(f)?h+"px":h,i[l]=i[l]||{},i[l][f]=h)}}else i.value=r.value||r.defaultValue;else i[l]=u instanceof st?u:new st(l,u);else i[l]=u instanceof Qe?u:new Qe(u);else i[l]=u instanceof Ie?u:new Ie(u);else i[l]=u}return i}function Te(e,t){var n={};for(var r in e){var o=e[r];n[r]=o}if(t)for(var i in t)n[i]===undefined&&(n[i]=t[i]);return n}function Ae(e,t){for(var o=arguments,i=[],a=arguments.length-2;a-- >0;)i[a]=arguments[a+2];for(var s=dt,l=2,u=arguments.length;l<u;l++){var c=o[l];Array.isArray(c)?c.forEach((function(e){s===dt?s=[e]:s.push(e)})):s===dt?s=[c]:s.push(c)}var p;return n(e)?(p=Ne(e,t),p.owner=Ve.current,ce(e,p,s)):r(e)?((p=Te(t,e.defaultProps)).children?Array.isArray(p.children)||(p.children=[p.children]):p.children=s,p.owner=Ve.current,e.prototype&&e.prototype.render?new Je(e,p):new Ke(e,p)):e}function Pe(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];var o=l(u(e.props),t);return e.namespace&&(o.namespace=e.namespace),Ae(e.tagName,o,0===n.length?e.children:n)}var Se,_e=Array.isArray,Re=[],Me=!1,De="Promise"in window&&s(Promise),Ue="MutationObserver"in window&&(s(MutationObserver)||"[object MutationObserverConstructor]"===MutationObserver.toString());De?(function(){var e=Promise.resolve();Se=function(){e.then(c)}})():Ue?(function(){var e=1,t=document.createTextNode(e);new MutationObserver(c).observe(t,{characterData:!0}),Se=function(){e=(e+1)%2,t.data=e}})():Se=function(){setTimeout(c,0)};var Ve={current:null},He={afterMount:null,afterUpdate:null,beforeUnmount:null,roots:{},debug:!1},Le="http://www.w3.org/2000/svg",je=document,ze=function(e){this.type="VirtualText",this.text=e||""},We=function(e,t,n){void 0===e&&(e="VirtualPatch"),this.type=e,this.vnode=t,this.patch=n};We.NODE="NODE",We.VTEXT="VTEXT",We.VNODE="VNODE",We.WIDGET="WIDGET",We.STATELESS="STATELESS",We.PROPS="PROPS",We.ORDER="ORDER",We.INSERT="INSERT",We.REMOVE="REMOVE";var Ie=function(e){this.callback=e};Ie.prototype.hook=function(e){this.callback(e)},Ie.prototype.unhook=function(){this.callback(null)};var Xe=[],Be=[],qe=function(e,t){this._dirty=!0,this._disable=!0,this._pendingStates=[],this.state||(this.state={}),this.props=e||{},this.context=t||{}};qe.prototype.setState=function(e,t){e&&(this._pendingStates=this._pendingStates||[]).push(e),r(t)&&(this._pendingCallbacks=this._pendingCallbacks||[]).push(t),this._disable||ie(this)},qe.prototype.getState=function(){var e=this,t=this,n=t._pendingStates,o=t.state,i=t.props;if(!n.length)return o;var a=u(o),s=n.concat();return this._pendingStates.length=0,s.forEach((function(t){r(t)&&(t=t.call(e,o,i)),l(a,t)})),a},qe.prototype.forceUpdate=function(e){r(e)&&(this._pendingCallbacks=this._pendingCallbacks||[]).push(e),te(this,!0)},qe.prototype.render=function(e,t,n){},Object.is=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t};var Fe=(function(e){function t(){e.apply(this,arguments),this.isPureComponent=!0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.shouldComponentUpdate=function(e,t){return!se(this.props,e)||!se(this.state,t)},t})(qe),Ye=function(e,t,o,i,a,s){this.type="VirtualNode",this.tagName=e||"DIV",this.props=t||{},this.children=o||[],this.key=i||null,this.namespace=n(a)?a:null,this._owner=s;var l,u=this.children.length||0,c=0,p=!1,h=!1;for(var m in t)if(t.hasOwnProperty(m)){var g=t[m];v(g)&&g.unhook&&(l||(l={}),l[m]=g)}u&&this.children.forEach((function(e){f(e)?(c+=e.count||0,!p&&e.hasWidgets&&(p=!0),h||!e.hooks&&!e.descendantHooks||(h=!0)):!p&&d(e)&&r(e.destroy)&&(p=!0)})),this.count=u+c,this.hasWidgets=p,this.hooks=l,this.descendantHooks=h},Ge={ev:"http://www.w3.org/2001/xml-events",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Ze={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,evEvent:"ev:event",exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering","in":0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlId:"xml:id",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},$e={Properties:{},DOMAttributeNamespaces:{evEvent:Ge.ev,xlinkActuate:Ge.xlink,xlinkArcrole:Ge.xlink,xlinkHref:Ge.xlink,xlinkRole:Ge.xlink,xlinkShow:Ge.xlink,xlinkTitle:Ge.xlink,xlinkType:Ge.xlink,xmlBase:Ge.xml,xmlId:Ge.xml,xmlLang:Ge.xml,xmlSpace:Ge.xml},DOMAttributeNames:{}};Object.keys(Ze).forEach((function(e){$e.Properties[e]=0,Ze[e]&&($e.DOMAttributeNames[e]=Ze[e])}));var Je=function(e,t){this.type="Widget",this.tagName=e,this.name=e.name||e.toString().match(/^function\s*([^\s(]+)/)[1],e.displayName=this.name,this._owner=t.owner,delete t.owner,this.props=t};Je.prototype.init=function(){return G(this)},Je.prototype.update=function(e,t,n){return Q(e,this)},Je.prototype.destroy=function(e){re(this)};var Ke=function(e,t){this.type="Widget",this.tagName=e,this._owner=t.owner,delete t.owner,this.props=t};Ke.prototype.init=function(){return Z(this)},Ke.prototype.update=function(e,t,n){var r=e.props,o=t.props;return e.tagName===t.tagName&&se(r,o)?n:ee(e,this)},Ke.prototype.destroy=function(e){oe(this)};var Qe=function(e){this.type="HtmlHook",this.value=e};Qe.prototype.hook=function(e,t,n){n&&"HtmlHook"===n.type&&n.value.__html===this.value.__html||(e.innerHTML=this.value.__html||"")};var et=function(){this.cache=[],this.size=0};et.prototype.set=function(e,t){var n=this,r=this.cache.length;if(!r)return this.cache.push({k:e,v:t}),void(this.size+=1);for(var o=0;o<r;o++){var i=n.cache[o];if(i.k===e)return void(i.v=t)}this.cache.push({k:e,v:t}),this.size+=1},et.prototype.get=function(e){var t=this,n=this.cache.length;if(n)for(var r=0;r<n;r++){var o=t.cache[r];if(o.k===e)return o.v}},et.prototype.has=function(e){var t=this,n=this.cache.length;if(!n)return!1;for(var r=0;r<n;r++)if(t.cache[r].k===e)return!0;return!1},et.prototype["delete"]=function(e){for(var t=this,n=this.cache.length,r=0;r<n;r++)if(t.cache[r].k===e)return t.cache.splice(r,1),t.size-=1,!0;return!1},et.prototype.clear=function(){var e=this,t=this.cache.length;if(this.size=0,t)for(;t;)e.cache.pop(),t--};var tt="oninput",nt="onpropertychange",rt="Map"in window&&s(Map)?Map:et,ot=new rt,it={onmousemove:1,ontouchmove:1,onmouseleave:1,onmouseenter:1,onload:1,onunload:1,onscroll:1,onfocus:1,onblur:1,onrowexit:1,onbeforeunload:1,onstop:1,ondragdrop:1,ondragenter:1,ondragexit:1,ondraggesture:1,ondragover:1,oncontextmenu:1,onerror:1,onabort:1,oncanplay:1,oncanplaythrough:1,ondurationchange:1,onemptied:1,onended:1,onloadeddata:1,onloadedmetadata:1,onloadstart:1,onencrypted:1,onpause:1,onplay:1,onplaying:1,onprogress:1,onratechange:1,onseeking:1,onseeked:1,onstalled:1,onsuspend:1,ontimeupdate:1,onvolumechange:1,onwaiting:1};it[nt]=1;var at=!1,st=function(e,t){this.type="EventHook",this.eventName=de(e),this.handler=t};st.prototype.hook=function(e,t,n){if(!n||"EventHook"!==n.type||n.handler!==this.handler||n.eventName!==this.eventName){var o=xe(e,this.eventName);if(this.eventName=o,o!==nt){var i=ot.get(o);if(1===it[o]){i||(i=new rt);var a=Ce(e,o,i);ot.set(o,i),r(this.handler)&&i.set(e,{eventHandler:this.handler,event:a})}else i||((i={items:new rt}).event=Oe(document,o,i),ot.set(o,i)),r(this.handler)&&i.items.set(e,this.handler)}else me(e,this.handler)}},st.prototype.unhook=function(e,t,n){if(!n||"EventHook"!==n.type||n.handler!==this.handler||n.eventName!==n.eventName){var r=xe(e,this.eventName);if(r!==nt){var o=ot.get(r);if(1===it[r]&&o){var i=o.get(e);e.removeEventListener(be(r),i.event,!1);var a=o.size;o["delete"](e)&&0===a&&ot["delete"](r)}else if(o&&o.items){var s=o.items;s["delete"](e)&&0===s.size&&(document.removeEventListener(be(r),o.event,!1),ot["delete"](r))}}}};var lt,ut,ct,pt,ft=function(e,t){this.type="AttributeHook",this.namespace=e,this.value=t};ft.prototype.hook=function(e,t,n){n&&"AttributeHook"===n.type&&n.value===this.value&&n.namespace===this.namespace||e.setAttributeNS(this.namespace,t,this.value)},ft.prototype.unhook=function(e,t,n){if(!n||"AttributeHook"!==n.type||n.namespace!==this.namespace){var r=t.indexOf(":"),o=r>-1?t.substr(r+1):t;e.removeAttributeNS(this.namespace,o)}};var ht=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,dt=[],vt={Component:qe,PureComponent:Fe,createElement:Ae,cloneElement:Pe,render:ue,nextTick:p,options:He};e.Component=qe,e.PureComponent=Fe,e.createElement=Ae,e.cloneElement=Pe,e.render=ue,e.nextTick=p,e.options=He,e["default"]=vt}));
!(function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t(e.Nerv={})})(this,(function(e){"use strict";function t(e){return"number"==typeof e}function n(e){return"string"==typeof e}function r(e){return"function"==typeof e}function o(e){return!0===e||!1===e}function i(e){return Object.getPrototypeOf?Object.getPrototypeOf(e):e.__proto__?e.__proto__:e.constructor.prototype}function a(e){return e===Object(e)&&!r(e)}function s(e){return r(e)&&/native code/.test(e.toString())}function l(e,t){if(!t)return e;for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function u(e){return l({},e)}function c(){Me=!1;var e=Re.slice(0);Re=[],e.forEach((function(e){return e()}))}function p(e,t){var n;if(Re.push((function(){if(e)try{e.call(t)}catch(r){console.error(r)}else n&&n(t)})),Me||(Me=!0,Se()),!e&&De)return new Promise(function(e){n=e})}function f(e){return e&&"VirtualNode"===e.type}function h(e){return e&&"VirtualText"===e.type}function d(e){return e&&"Widget"===e.type}function v(e){return!!(e&&"function"==typeof e.hook&&!e.hasOwnProperty("hook")||e&&"function"==typeof e.unhook&&!e.hasOwnProperty("unhook"))}function m(e,r){if(d(e))return e.init();if(n(e)||t(e))return je.createTextNode(e);if(h(e))return je.createTextNode(e.text);if(null===e||!1===e)return je.createComment("Empty dom node");if(f(e)){e.isSvg?r=!0:"svg"===e.tagName?r=!0:"foreignObject"===e.tagName&&(r=!1),r&&(e.namespace=Le);var o=null===e.namespace?je.createElement(e.tagName):je.createElementNS?je.createElementNS(e.namespace,e.tagName):je.createElement(e.tagName);g(o,e.props,r),He.debug&&(o._props=e.props),r&&(e.isSvg=r);var i=e.children;return i.length&&i.forEach((function(t){if(t!==undefined&&null!==t&&!1!==t&&o.appendChild){(d(t)||f(t))&&(t.parentContext=e.parentContext||{});var n=m(t,r);n&&o.appendChild(n)}})),o}if(Array.isArray(e)){var a=je.createDocumentFragment();return e.forEach((function(e){if(e!==undefined&&null!==e&&!1!==e&&a.appendChild){var t=m(e,r);return t&&a.appendChild(t),a.appendChild(t)}})),a}return null}function g(e,t,o){for(var i in t)if("children"!==i){var s=t[i];if(v(s))s.hook&&s.hook(e,i);else if("style"!==i)if(a(s))if(i in e)try{e[i]=s}catch(c){console.warn("set prop failed, prop value:",s)}else e.setAttribute(i,s);else if("list"!==i&&"type"!==i&&!o&&i in e){try{e[i]=null==s?"":s}catch(c){console.warn("set prop failed, prop value:",s)}null!=s&&!1!==s||e.removeAttribute(i)}else null==s||!1===s?e.removeAttribute(i):r(s)||e.setAttribute(i,s);else if(n(s))e.setAttribute(i,s);else if(a(s))for(var l in s){var u=s[l];if(u!==undefined)try{e[i][l]=u}catch(c){console.warn("Can't set empty style")}}}}function y(e){return new ze(e)}function k(e,t){var n={old:e};return x(e,t,n,0),n}function x(e,t,n,r){if(e!==t){var o=n[r],i=!1;if(t)if(h(t))h(e)?e.text!==t.text&&(o=S(o,new We(We.VTEXT,e,t))):(i=!0,o=S(o,new We(We.VTEXT,e,t)));else if(f(t))if(f(e))if(e.tagName===t.tagName&&e.key===t.key){var a=b(e.props,t.props);a&&(o=S(o,new We(We.PROPS,e,a))),o=w(e,t,o,n,r)}else o=S(o,new We(We.VNODE,e,t)),i=!0;else o=S(o,new We(We.VNODE,e,t)),i=!0;else d(t)?(d(e)||(i=!0),o=S(o,new We(We.WIDGET,e,t))):Array.isArray(t)&&(i=!0,t.forEach((function(e){x(null,e,n,r),r++})));else d(e)||(C(e,n,r),o=n[r]),o=S(o,new We(We.REMOVE,e,null));o&&(n[r]=o),i&&C(e,n,r)}}function b(e,t){var n=null;for(var r in e)if("children"!==r){t.hasOwnProperty(r)||((n=n||{})[r]=undefined);var o=e[r],s=t[r];if(o!==s)if(a(o)&&a(s))if(i(o)!==i(s))(n=n||{})[r]=s;else if(v(s))(n=n||{})[r]=s;else{var l=b(o,s);l&&((n=n||{})[r]=l)}else(n=n||{})[r]=s}for(var u in t)e.hasOwnProperty(u)||((n=n||{})[u]=t[u]);return n}function w(e,t,n,r,o){for(var i=e.children,a=E(i,t.children,"key"),s=a.list,l=Math.max(i.length,s.length),u=0;u<l;u++){var c=i[u],p=s[u];o+=1,c?x(c,p,r,o):p&&(n=S(n,new We(We.INSERT,null,p))),f(c)&&c.count&&(o+=c.count)}return a.moves&&(n=S(n,new We(We.ORDER,e,a.moves))),n}function E(e,t,n){var r=A(t,n),o=r.keyMap,i=r.free;if(i.length===t.length)return{list:t,moves:null};var a=A(e,n),s=a.keyMap;if(a.free.length===e.length)return{list:t,moves:null};var l=0,u=0,c=e.map((function(e){var r=e[n];if(r)return o.hasOwnProperty(r)?t[o[r]]:(u++,null);var a=i[l++],s=t[a];return s||(u++,null)})),p=l>=i.length?t.length:i[l];t.forEach((function(e,t){var r=e[n];r?s.hasOwnProperty(r)||c.push(e):t>=p&&c.push(e)}));for(var f,h=c.slice(0),d=0,v=[],m=[],g=0;g<t.length;){for(f=h[d];null===f&&h.length;)v.push(O(h,d,null)),f=h[d];var y=t[g],k=y[n],x=f[n];f&&x===k?(d++,g++):y[n]?(f&&x&&o[x]!==g+1?(v.push(O(h,d,x)),(f=h[d])&&x===k?d++:m.push({key:k,to:g})):m.push({key:k,to:g}),g++):f&&x&&v.push(O(h,d,x))}for(;d<h.length;)f=h[d],v.push(O(h,d,f&&f.key));return v.length!==u||m.length?{list:c,moves:{removes:v,inserts:m}}:{list:c,moves:null}}function O(e,t,n){return e.splice(t,1),{from:t,key:n}}function C(e,t,n){N(e,t,n),T(e,t,n)}function N(e,t,n){if(f(e)&&(e.hooks&&(t[n]=S(t[n],new We(We.PROPS,e,P(e.hooks)))),e.descendantHooks))for(var r=e.children,o=r.length,i=0;i<o;i++){var a=r[i];N(a,t,n+=1),f(a)&&a.count&&(n+=a.count)}}function T(e,t,n){d(e)?r(e.destroy)&&(t[n]=S(t[n],new We(We.REMOVE,e,null))):f(e)&&e.hasWidgets&&e.children.forEach((function(e){T(e,t,n+=1),f(e)&&e.count&&(n+=e.count)}))}function A(e,t){var n={},r=[];return e.forEach((function(e,o){e[t]?n[e[t]]=o:r.push(o)})),{keyMap:n,free:r}}function P(e){var t={};for(var n in e)t[n]=undefined;return t}function S(e,t){return e?(Array.isArray(e)?e.push(t):e=[e,t],e):[t]}function _(e,t,n,r){return n&&0!==n.length?(n.sort((function(e,t){return e-t})),R(e,t,n,r)):{}}function R(e,t,n,r,o){if(void 0===r&&(r={}),void 0===o&&(o=0),e){M(n,o,o)&&(r[o]=e);var i=t&&t.children;if(i){var a=e.childNodes;i.forEach((function(e,t){var i=++o+((e=e||{}).count||0);M(n,o,i)&&R(a[t],e,n,r,o),o=i}))}}return r}function M(e,t,n){if(0===e.length)return!1;for(var r,o,i=0,a=e.length-1;i<=a;){if(r=(a+i)/2>>0,o=e[r],i===a)return o>=t&&o<=n;if(o<t)i=r+1;else{if(!(o>n))return!0;a=r-1}}return!1}function D(e,t,n){var r=F(t);if(0===r.length)return e;var o=t.old,i=_(e,o,r);return r.forEach((function(r){e=U(e,i[r],t[r],n)})),e}function U(e,t,n,r){if(!t)return e;var o;return Array.isArray(n)||(n=[n]),n.forEach((function(n){o=V(t,n,r),t===e&&(e=o)})),e}function V(e,t,n){var r=t.type,o=t.vnode,i=t.patch;switch(r){case We.VTEXT:return H(e,i);case We.VNODE:return L(e,i,n);case We.INSERT:return j(e,i,n);case We.WIDGET:return z(e,o,i);case We.PROPS:return I(e,i,o.props,o.isSvg);case We.ORDER:return X(e,i);case We.REMOVE:return B(e,o);default:return e}}function H(e,t){if(null===e)return m(t);if(e.splitText!==undefined)return e.nodeValue=t.text,e;var n=e.parentNode,r=m(t);return n&&n.replaceChild(r,e),r}function L(e,t,n){if((d(t)||f(t))&&(t.parentContext=n),null===e)return m(t);var r=e.parentNode,o=m(t);return r&&o!==e&&r.replaceChild(o,e),o}function j(e,t,n){(d(t)||f(t))&&(t.parentContext=n);var r=m(t);return e&&r&&e.appendChild(r),e}function z(e,t,n){var r=q(t,n);t&&(n.parentContext=t.parentContext);var o=r?n.update(t,n,e)||e:m(n),i=e.parentNode;return i&&e!==o&&i.replaceChild(o,e),!r&&t&&W(e,t),o}function W(e,t){r(t.destroy)&&d(t)&&t.destroy(e)}function I(e,t,o,s){for(var l in t)if("children"!==l){var u=t[l],c=o[l];if(null==u||!1===u){if(v(c)&&c.unhook){c.unhook(e,l,u);continue}if("style"===l){n(c)||e.removeAttribute(l);continue}l in e?(e[l]=n(c)?"":null,e.removeAttribute(l)):e.removeAttribute(l)}else{if(v(u)){v(c)&&c.unhook&&c.unhook(e,l,u),u&&u.hook&&u.hook(e,l,c);continue}if("style"===l){if(n(u))e.setAttribute(l,u);else for(var p in u){var f=u[p];if(null!=f&&!1!==f)try{e[l][p]=f}catch(h){}}continue}if(a(u)){if(c&&a(c)&&i(c)!==i(u))if(l in e)try{e[l]=u}catch(h){}else e.setAttribute(l,u);continue}if("list"!==l&&"type"!==l&&!s&&l in e){try{e[l]=u}catch(h){}continue}r(u)||e.setAttribute(l,u)}}return e}function X(e,t){for(var n,r,o,i=t.removes,a=t.inserts,s=e.childNodes,l={},u=0;u<i.length;u++)n=s[(r=i[u]).from],r.key&&(l[r.key]=n),e.removeChild(n);for(var c=s.length,p=0;p<a.length;p++)n=l[(o=a[p]).key],e.insertBefore(n,o.to>=c++?null:s[o.to]);return e}function B(e,t){var n=e.parentNode;return n&&n.removeChild(e),d(t)&&W(e,t),null}function q(e,t){if(d(e)&&d(t)){var n=e.props.key,r=t.props.key;return"name"in e&&"name"in t?e.name===t.name&&n===r:e.init===t.init&&n===r}return!1}function F(e){var t=[];if(e)for(var n in e)"old"!==n&&e.hasOwnProperty(n)&&t.push(Number(n));return t}function Y(e,t){return a(e)&&(e.parentContext=t),m(e)}function G(e){var t=e.parentContext,n=e.tagName.prototype;n&&r(n.render)&&(e.component=new e.tagName(e.props,t));var o=e.component;r(o.componentWillMount)&&(o.componentWillMount(),o.state=o.getState()),o._dirty=!1;var i=J(o);o._rendered=i,r(o.componentDidMount)&&Xe.push(o),r(e.props.ref)&&Xe.push((function(){return e.props.ref(o)}));var a=Y(i,$(o,t));return He.debug&&(a._component=o),o.dom=a,o._disable=!1,null!==He.afterMount&&He.afterMount(e),a}function Z(e){var t=e.props.ref;delete e.props.ref,e._rendered=e.tagName(e.props,e.parentContext);var n=e._rendered;return f(n)&&r(t)&&(t=new Ie(t),n.props.ref=t),Y(n,e.parentContext)}function $(e,t){return e.getChildContext?l(t,e.getChildContext()):t}function J(e){Ve.current=e;var r=e.render();return(t(r)||n(r))&&(r=y(r)),Ve.current=null,r}function K(){if(Xe.length){var e=Xe.slice(0);Xe.length=0,e.forEach((function(e){r(e)?e():e.componentDidMount&&e.componentDidMount()}))}}function Q(e,t){var n=t.component=e.component,o=t.props,i=n.context;return n._disable=!0,r(n.componentWillReceiveProps)&&n.componentWillReceiveProps(o,i),n._disable=!1,n.prevProps=n.props,n.prevState=n.state,n.prevContext=n.context,n.props=o,n.context=i,r(t.props.ref)&&t.props.ref(n),te(n),n.dom}function ee(e,t,n){var r=e._rendered,o=t.tagName(t.props,t.parentContext);return t._rendered=o,ne(o,r,n,e.parentContext)}function te(e,t){void 0===t&&(t=!1);var n=e.dom,o=e.props,i=e.getState(),a=e.context,s=e.prevProps||o,l=e.prevContext||a;e.props=s,e.context=l;var u=!1;if(!t&&r(e.shouldComponentUpdate)&&!1===e.shouldComponentUpdate(o,i,a)?u=!0:r(e.componentWillUpdate)&&e.componentWillUpdate(o,i,a),e.props=o,e.state=i,e.context=a,e._dirty=!1,!u){var c=e._rendered,p=J(e),f=$(e,a);e._rendered=p,e.dom=ne(p,c,n,f),e.componentDidUpdate&&e.componentDidUpdate(o,i,a)}if(e.prevProps=e.props,e.prevState=e.state,e.prevContext=e.context,e._pendingCallbacks)for(;e._pendingCallbacks.length;)e._pendingCallbacks.pop().call(e);null!==He.afterUpdate&&He.afterUpdate(e),K()}function ne(e,t,n,r){return a(e)&&(e.parentContext=r),D(n,k(t,e),r)}function re(e){var t=e.component;null!==He.beforeUnmount&&He.beforeUnmount(t),r(t.componentWillUnmount)&&t.componentWillUnmount(),ne(null,t._rendered,t.dom,t.context),t.dom=t._rendered=null,r(e.props.ref)&&e.props.ref(null)}function oe(e,t){ne(null,e._rendered,t,e.parentContext),e._rendered=null,r(e.props.ref)&&e.props.ref(null)}function ie(e){!e._dirty&&(e._dirty=!0)&&1===Be.push(e)&&p(ae)}function ae(){var e,t=Be;for(Be=[];e=t.pop();)e._dirty&&te(e)}function se(e,t){if(null===e||null===t)return!1;if(Object.is(e,t))return!0;var n=e?Object.keys(e):[],r=t?Object.keys(t):[];if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++){var i=n[o];if(!t.hasOwnProperty(i)||!Object.is(e[i],t[i]))return!1}return!0}function le(e){return f(e)||n(e)||t(e)}function ue(e,t,n){if(!le(e)&&!d(e))return null;if(!t||1!==t.nodeType)throw new Error(t+" should be a DOM Element");var r=Y(e,{});return r&&t.appendChild(r),K(),n&&n(),e.component||r}function ce(e,t,n){var r,o,i,a=[];return!n&&he(t)&&(n=t,t={}),(t=t||{}).hasOwnProperty("key")&&t.key&&(r=t.key,delete t.key),t.hasOwnProperty("namespace")&&t.namespace&&(o=t.namespace,delete t.namespace),t.hasOwnProperty("owner")&&(i=t.owner,delete t.owner),t.hasOwnProperty("children")&&t.children&&(n&&n.length||(n=t.children),delete t.children),n&&pe(a,n,e),new Ye(e,t,a,r,o,i)}function pe(e,r,o){n(r)||t(r)?(r=String(r),e.push(y(r))):fe(r)?e.push(r):_e(r)&&r.forEach((function(t){return pe(e,t,o)}))}function fe(e){return f(e)||h(e)||d(e)}function he(e){return n(e)||_e(e)||fe(e)}function de(e){return"onDoubleClick"===e?e="ondblclick":"onTouchTap"===e&&(e="onclick"),e.toLowerCase()}function ve(e){if("value"===e.propertyName){var t=e.target||e.srcElement,n=t.value;n!==ut&&(ut=n,r(pt)&&pt.call(t,e))}}function me(e,t){pt=t,at||(at=!0,document.addEventListener("focusin",(function(){ye(),ge(e)}),!1),document.addEventListener("focusout",ye,!1))}function ge(e){lt=e,ut=e.value,ct=Object.getOwnPropertyDescriptor(e.constructor.prototype,"value"),Object.defineProperty(lt,"value",{get:function(){return ct.get.call(this)},set:function(e){ut=e,ct.set.call(this,e)}}),lt.addEventListener("propertychange",ve,!1)}function ye(){lt&&(delete lt.value,lt.removeEventListener("propertychange",ve,!1),lt=null,ut=null,ct=null)}function ke(e){var t=e.nodeName&&e.nodeName.toLowerCase(),n=e.type;return"input"===t&&/text|password/.test(n)||"textarea"===t}function xe(e,t){return ke(e)&&"onchange"===t&&(t=tt in window?tt:nt),t}function be(e){return e.substr(2)}function we(){this.cancelBubble=!0,this.stopImmediatePropagation()}function Ee(e,t,n,r,o){var i=n.get(t);if((!i||(r--,o.currentTarget=t,i(e),!e.cancelBubble))&&r>0){var a=t.parentNode;if(null===a||"click"===e.type&&1===a.nodeType&&a.disabled)return;Ee(e,a,n,r,o)}}function Oe(e,t,n){var r=function(e){var t=n.items.size;if(t>0){var r={currentTarget:e.target};Object.defineProperties(e,{currentTarget:{configurable:!0,get:function(){return r.currentTarget}},stopPropagation:{value:we}}),Ee(e,e.target,n.items,t,r)}};return e.addEventListener(be(t),r,!1),r}function Ce(e,t,n){var r=function(t){var r=n.get(e);if(r&&r.eventHandler){var o={currentTarget:e};Object.defineProperties(t,{currentTarget:{configurable:!0,get:function(){return o.currentTarget}}}),r.eventHandler(t)}};return e.addEventListener(be(t),r,!1),r}function Ne(e,r){var i={},s=$e.DOMAttributeNamespaces;for(var l in r){var u=r[l],c=l;if("id"!==(l=$e.DOMAttributeNames[l]||l)&&"className"!==l&&"namespace"!==l||u===undefined)if("ref"!==l)if("dangerouslySetInnerHTML"!==l)if("o"!==l.charAt(0)||"n"!==l.charAt(1))if(s.hasOwnProperty(c)&&(n(u)||t(u)||o(u))){var p=s[c];i[l]=u instanceof ft?u:new ft(p,u)}else if("defaultValue"!==l){if("style"!==l)i[l]=u;else if(n(u))i[l]=u;else if(a(u))for(var f in u){var h=u[f];h===undefined||!n(h)&&isNaN(h)||(h=t(h)&&!1===ht.test(f)?h+"px":h,i[l]=i[l]||{},i[l][f]=h)}}else i.value=r.value||r.defaultValue;else i[l]=u instanceof st?u:new st(l,u);else i[l]=u instanceof Qe?u:new Qe(u);else i[l]=u instanceof Ie?u:new Ie(u);else i[l]=u}return i}function Te(e,t){var n={};for(var r in e){var o=e[r];n[r]=o}if(t)for(var i in t)n[i]===undefined&&(n[i]=t[i]);return n}function Ae(e,t){for(var o=arguments,i=[],a=arguments.length-2;a-- >0;)i[a]=arguments[a+2];for(var s=dt,l=2,u=arguments.length;l<u;l++){var c=o[l];Array.isArray(c)?c.forEach((function(e){s===dt?s=[e]:s.push(e)})):s===dt?s=[c]:s.push(c)}var p;return n(e)?(p=Ne(e,t),p.owner=Ve.current,ce(e,p,s)):r(e)?((p=Te(t,e.defaultProps)).children?Array.isArray(p.children)||(p.children=[p.children]):p.children=s,p.owner=Ve.current,e.prototype&&e.prototype.render?new Je(e,p):new Ke(e,p)):e}function Pe(e,t){for(var n=[],r=arguments.length-2;r-- >0;)n[r]=arguments[r+2];var o=l(u(e.props),t);return e.namespace&&(o.namespace=e.namespace),Ae(e.tagName,o,0===n.length?e.children:n)}var Se,_e=Array.isArray,Re=[],Me=!1,De="Promise"in window&&s(Promise),Ue="MutationObserver"in window&&(s(MutationObserver)||"[object MutationObserverConstructor]"===MutationObserver.toString());De?(function(){var e=Promise.resolve();Se=function(){e.then(c)}})():Ue?(function(){var e=1,t=document.createTextNode(e);new MutationObserver(c).observe(t,{characterData:!0}),Se=function(){e=(e+1)%2,t.data=e}})():Se=function(){setTimeout(c,0)};var Ve={current:null},He={afterMount:null,afterUpdate:null,beforeUnmount:null,roots:{},debug:!1},Le="http://www.w3.org/2000/svg",je=document,ze=function(e){this.type="VirtualText",this.text=e||""},We=function(e,t,n){void 0===e&&(e="VirtualPatch"),this.type=e,this.vnode=t,this.patch=n};We.NODE="NODE",We.VTEXT="VTEXT",We.VNODE="VNODE",We.WIDGET="WIDGET",We.STATELESS="STATELESS",We.PROPS="PROPS",We.ORDER="ORDER",We.INSERT="INSERT",We.REMOVE="REMOVE";var Ie=function(e){this.callback=e};Ie.prototype.hook=function(e){this.callback(e)},Ie.prototype.unhook=function(){this.callback(null)};var Xe=[],Be=[],qe=function(e,t){this._dirty=!0,this._disable=!0,this._pendingStates=[],this.state||(this.state={}),this.props=e||{},this.context=t||{}};qe.prototype.setState=function(e,t){e&&(this._pendingStates=this._pendingStates||[]).push(e),r(t)&&(this._pendingCallbacks=this._pendingCallbacks||[]).push(t),this._disable||ie(this)},qe.prototype.getState=function(){var e=this,t=this,n=t._pendingStates,o=t.state,i=t.props;if(!n.length)return o;var a=u(o),s=n.concat();return this._pendingStates.length=0,s.forEach((function(t){r(t)&&(t=t.call(e,o,i)),l(a,t)})),a},qe.prototype.forceUpdate=function(e){r(e)&&(this._pendingCallbacks=this._pendingCallbacks||[]).push(e),te(this,!0)},qe.prototype.render=function(e,t,n){},Object.is=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t};var Fe=(function(e){function t(){e.apply(this,arguments),this.isPureComponent=!0}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.shouldComponentUpdate=function(e,t){return!se(this.props,e)||!se(this.state,t)},t})(qe),Ye=function(e,t,o,i,a,s){this.type="VirtualNode",this.tagName=e||"DIV",this.props=t||{},this.children=o||[],this.key=i||null,this.namespace=n(a)?a:null,this._owner=s;var l,u=this.children.length||0,c=0,p=!1,h=!1;for(var m in t)if(t.hasOwnProperty(m)){var g=t[m];v(g)&&g.unhook&&(l||(l={}),l[m]=g)}u&&this.children.forEach((function(e){f(e)?(c+=e.count||0,!p&&e.hasWidgets&&(p=!0),h||!e.hooks&&!e.descendantHooks||(h=!0)):!p&&d(e)&&r(e.destroy)&&(p=!0)})),this.count=u+c,this.hasWidgets=p,this.hooks=l,this.descendantHooks=h},Ge={ev:"http://www.w3.org/2001/xml-events",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},Ze={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,evEvent:"ev:event",exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering","in":0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlId:"xml:id",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},$e={Properties:{},DOMAttributeNamespaces:{evEvent:Ge.ev,xlinkActuate:Ge.xlink,xlinkArcrole:Ge.xlink,xlinkHref:Ge.xlink,xlinkRole:Ge.xlink,xlinkShow:Ge.xlink,xlinkTitle:Ge.xlink,xlinkType:Ge.xlink,xmlBase:Ge.xml,xmlId:Ge.xml,xmlLang:Ge.xml,xmlSpace:Ge.xml},DOMAttributeNames:{}};Object.keys(Ze).forEach((function(e){$e.Properties[e]=0,Ze[e]&&($e.DOMAttributeNames[e]=Ze[e])}));var Je=function(e,t){this.type="Widget",this.tagName=e,this.name=e.name||e.toString().match(/^function\s*([^\s(]+)/)[1],e.displayName=this.name,this._owner=t.owner,delete t.owner,this.props=t};Je.prototype.init=function(){return G(this)},Je.prototype.update=function(e,t,n){return Q(e,this)},Je.prototype.destroy=function(e){re(this)};var Ke=function(e,t){this.type="Widget",this.tagName=e,this._owner=t.owner,delete t.owner,this.props=t};Ke.prototype.init=function(){return Z(this)},Ke.prototype.update=function(e,t,n){var r=e.props,o=t.props;return e.tagName===t.tagName&&se(r,o)?n:ee(e,this,n)},Ke.prototype.destroy=function(e){oe(this,e)};var Qe=function(e){this.type="HtmlHook",this.value=e};Qe.prototype.hook=function(e,t,n){n&&"HtmlHook"===n.type&&n.value.__html===this.value.__html||(e.innerHTML=this.value.__html||"")};var et=function(){this.cache=[],this.size=0};et.prototype.set=function(e,t){var n=this,r=this.cache.length;if(!r)return this.cache.push({k:e,v:t}),void(this.size+=1);for(var o=0;o<r;o++){var i=n.cache[o];if(i.k===e)return void(i.v=t)}this.cache.push({k:e,v:t}),this.size+=1},et.prototype.get=function(e){var t=this,n=this.cache.length;if(n)for(var r=0;r<n;r++){var o=t.cache[r];if(o.k===e)return o.v}},et.prototype.has=function(e){var t=this,n=this.cache.length;if(!n)return!1;for(var r=0;r<n;r++)if(t.cache[r].k===e)return!0;return!1},et.prototype["delete"]=function(e){for(var t=this,n=this.cache.length,r=0;r<n;r++)if(t.cache[r].k===e)return t.cache.splice(r,1),t.size-=1,!0;return!1},et.prototype.clear=function(){var e=this,t=this.cache.length;if(this.size=0,t)for(;t;)e.cache.pop(),t--};var tt="oninput",nt="onpropertychange",rt="Map"in window&&s(Map)?Map:et,ot=new rt,it={onmousemove:1,ontouchmove:1,onmouseleave:1,onmouseenter:1,onload:1,onunload:1,onscroll:1,onfocus:1,onblur:1,onrowexit:1,onbeforeunload:1,onstop:1,ondragdrop:1,ondragenter:1,ondragexit:1,ondraggesture:1,ondragover:1,oncontextmenu:1,onerror:1,onabort:1,oncanplay:1,oncanplaythrough:1,ondurationchange:1,onemptied:1,onended:1,onloadeddata:1,onloadedmetadata:1,onloadstart:1,onencrypted:1,onpause:1,onplay:1,onplaying:1,onprogress:1,onratechange:1,onseeking:1,onseeked:1,onstalled:1,onsuspend:1,ontimeupdate:1,onvolumechange:1,onwaiting:1};it[nt]=1;var at=!1,st=function(e,t){this.type="EventHook",this.eventName=de(e),this.handler=t};st.prototype.hook=function(e,t,n){if(!n||"EventHook"!==n.type||n.handler!==this.handler||n.eventName!==this.eventName){var o=xe(e,this.eventName);if(this.eventName=o,o!==nt){var i=ot.get(o);if(1===it[o]){i||(i=new rt);var a=Ce(e,o,i);ot.set(o,i),r(this.handler)&&i.set(e,{eventHandler:this.handler,event:a})}else i||((i={items:new rt}).event=Oe(document,o,i),ot.set(o,i)),r(this.handler)&&i.items.set(e,this.handler)}else me(e,this.handler)}},st.prototype.unhook=function(e,t,n){if(!n||"EventHook"!==n.type||n.handler!==this.handler||n.eventName!==n.eventName){var r=xe(e,this.eventName);if(r!==nt){var o=ot.get(r);if(1===it[r]&&o){var i=o.get(e);e.removeEventListener(be(r),i.event,!1);var a=o.size;o["delete"](e)&&0===a&&ot["delete"](r)}else if(o&&o.items){var s=o.items;s["delete"](e)&&0===s.size&&(document.removeEventListener(be(r),o.event,!1),ot["delete"](r))}}}};var lt,ut,ct,pt,ft=function(e,t){this.type="AttributeHook",this.namespace=e,this.value=t};ft.prototype.hook=function(e,t,n){n&&"AttributeHook"===n.type&&n.value===this.value&&n.namespace===this.namespace||e.setAttributeNS(this.namespace,t,this.value)},ft.prototype.unhook=function(e,t,n){if(!n||"AttributeHook"!==n.type||n.namespace!==this.namespace){var r=t.indexOf(":"),o=r>-1?t.substr(r+1):t;e.removeAttributeNS(this.namespace,o)}};var ht=/acit|ex(?:s|g|n|p|$)|rph|ows|mnc|ntw|ine[ch]|zoo|^ord/i,dt=[],vt={Component:qe,PureComponent:Fe,createElement:Ae,cloneElement:Pe,render:ue,nextTick:p,options:He};e.Component=qe,e.PureComponent=Fe,e.createElement=Ae,e.cloneElement=Pe,e.render=ue,e.nextTick=p,e.options=He,e["default"]=vt}));

@@ -10,5 +10,5 @@ import FullComponent from './full-component';

export declare function reRenderComponent(prev: any, current: any): any;
export declare function reRenderStatelessComponent(prev: any, current: any): Element;
export declare function reRenderStatelessComponent(prev: any, current: any, domNode: any): Element;
export declare function updateComponent(component: any, isForce?: boolean): void;
export declare function unmountComponent(vnode: FullComponent): void;
export declare function unmountStatelessComponent(vnode: Stateless): void;
export declare function unmountStatelessComponent(vnode: Stateless, dom: any): void;

@@ -9,3 +9,2 @@ declare class StateLessComponent {

parentContext: any;
dom: any;
constructor(tagName: any, props: any);

@@ -12,0 +11,0 @@ init(): Element | Text | Comment | DocumentFragment | null;

{
"name": "nervjs",
"version": "0.1.17",
"version": "0.1.18",
"description": "A react-like framework based on virtual-dom",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -63,5 +63,3 @@ import { extend, isFunction, isNumber, isString, isObject } from './util'

}
const dom = mountVNode(rendered, vnode.parentContext)
vnode.dom = dom
return dom
return mountVNode(rendered, vnode.parentContext)
}

@@ -122,9 +120,7 @@

export function reRenderStatelessComponent (prev, current) {
export function reRenderStatelessComponent (prev, current, domNode) {
const lastRendered = prev._rendered
const rendered = current.tagName(current.props, current.parentContext)
current._rendered = rendered
const dom = updateVNode(rendered, lastRendered, prev.dom, prev.parentContext)
current.dom = dom
return dom
return updateVNode(rendered, lastRendered, domNode, prev.parentContext)
}

@@ -201,5 +197,5 @@

export function unmountStatelessComponent (vnode: Stateless) {
updateVNode(null, vnode._rendered, vnode.dom, vnode.parentContext)
vnode.dom = vnode._rendered = null
export function unmountStatelessComponent (vnode: Stateless, dom) {
updateVNode(null, vnode._rendered, dom, vnode.parentContext)
vnode._rendered = null
if (isFunction(vnode.props.ref)) {

@@ -206,0 +202,0 @@ vnode.props.ref(null)

@@ -12,3 +12,2 @@ import shallowEqual from './util/shallow-equal'

parentContext: any
dom: any
constructor (tagName, props) {

@@ -31,7 +30,7 @@ this.tagName = tagName

}
return reRenderStatelessComponent(previous, this)
return reRenderStatelessComponent(previous, this, domNode)
}
destroy (dom?: Element) {
unmountStatelessComponent(this)
unmountStatelessComponent(this, dom)
}

@@ -38,0 +37,0 @@ }

@@ -14,3 +14,3 @@ function domIndex (rootNode: Element, tree, patchIndices: number[], nodes?) {

}
const vChildren = tree.children
const vChildren = tree && tree.children
if (vChildren) {

@@ -17,0 +17,0 @@ const childNodes = rootNode.childNodes

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc