-
Notifications
You must be signed in to change notification settings - Fork 97
Expand file tree
/
Copy pathreact-lite.min.js
More file actions
6 lines (6 loc) · 27.5 KB
/
react-lite.min.js
File metadata and controls
6 lines (6 loc) · 27.5 KB
1
2
3
4
5
6
/*!
* react-lite.js v0.15.37
* (c) 2017 Jade Gu
* Released under the MIT License.
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.React=t()}(this,function(){"use strict";function e(e,t,n,r,o){var i={vtype:e,type:t,props:n,refs:Xe,key:r,ref:o};return e!==je&&e!==Be||(i.uid=ie()),i}function t(e,t,n){var r=e.vtype,o=null;return r?r===Ve?o=l(e,t,n):r===Be?o=x(e,t,n):r===je?o=v(e,t,n):r===_e&&(o=document.createComment("react-text: "+(e.uid||ie()))):o=document.createTextNode(e),o}function n(e,t,n,o){var i=e.vtype;return i===Be?k(e,t,n,o):i===je?m(e,t,n,o):i!==Ve?n:(null!=(e.props[Le]&&e.props[Le].__html)?(f(e,t,n),c(t,n,o)):(r(e,t,n,o),f(e,t,n)),n)}function r(e,t,n,r){var s={removes:[],updates:[],creates:[]};d(s,e,t,n,r),re(s.removes,i),re(s.updates,o),re(s.creates,a)}function o(e){if(e){var t=e.vnode,n=e.node;e.shouldIgnore||(t.vtype?t.vtype===Ve?f(t,e.newVnode,n,e.parentContext):t.vtype===je?n=m(t,e.newVnode,n,e.parentContext):t.vtype===Be&&(n=k(t,e.newVnode,n,e.parentContext)):n.replaceData(0,n.length,e.newVnode));var r=n.parentNode.childNodes[e.index];return r!==n&&n.parentNode.insertBefore(n,r),n}}function i(e){s(e.vnode,e.node),e.node.parentNode.removeChild(e.node)}function a(e){var n=t(e.vnode,e.parentContext,e.parentNode.namespaceURI);e.parentNode.insertBefore(n,e.parentNode.childNodes[e.index])}function s(e,t){var n=e.vtype;n===Ve?h(e,t):n===Be?b(e,t):n===je&&y(e,t)}function l(e,t,n){var r=e.type,o=e.props,i=null;return"svg"===r||n===$e?(i=document.createElementNS($e,r),n=$e):i=document.createElement(r),c(e,i,t),ce(i,o,r.indexOf("-")>=0||null!=o.is),null!=e.ref&&(ne(Ge,e),ne(Ge,i)),i}function c(e,n,r){for(var o=n.vchildren=p(e),i=n.namespaceURI,a=0,s=o.length;a<s;a++)n.appendChild(t(o[a],r,i))}function p(e){var t=e.props.children,n=[];return bt(t)?re(t,u,n):u(t,n),n}function u(e,t){if(null!=e&&"boolean"!=typeof e){if(!e.vtype){if(e.toJS)return e=e.toJS(),void(bt(e)?re(e,u,t):u(e,t));e=""+e}t[t.length]=e}}function d(e,t,n,r,o){if(r.vchildren){var i=r.childNodes,a=r.vchildren,s=r.vchildren=p(n),l=a.length,c=s.length;if(0!==l)if(0!==c){for(var u=Array(c),f=null,h=null,v=0;v<l;v++)for(var m=a[v],y=0;y<c;y++)if(!u[y]){var g=s[y];if(m===g){var x=!0;o&&(m.vtype!==Be&&m.vtype!==je||m.type.contextTypes&&(x=!1)),u[y]={shouldIgnore:x,vnode:m,newVnode:g,node:i[v],parentContext:o,index:y},a[v]=null;break}}for(var v=0;v<l;v++){var k=a[v];if(null!==k){for(var b=!0,y=0;y<c;y++)if(!u[y]){var C=s[y];if(C.type===k.type&&C.key===k.key&&C.refs===k.refs){u[y]={vnode:k,newVnode:C,node:i[v],parentContext:o,index:y},b=!1;break}}b&&(f||(f=[]),ne(f,{vnode:k,node:i[v]}))}}for(var v=0;v<c;v++){var w=u[v];w?w.vnode.vtype===Ve&&d(e,w.vnode,w.newVnode,w.node,w.parentContext):(h||(h=[]),ne(h,{vnode:s[v],parentNode:r,parentContext:o,index:v}))}f&&ne(e.removes,f),h&&ne(e.creates,h),ne(e.updates,u)}else for(var v=0;v<l;v++)ne(e.removes,{vnode:a[v],node:i[v]});else if(c>0)for(var v=0;v<c;v++)ne(e.creates,{vnode:s[v],parentNode:r,parentContext:o,index:v})}}function f(e,t,n){var r=e.type.indexOf("-")>=0||null!=e.props.is;return pe(n,e.props,t.props,r),e.ref!==t.ref&&(A(e.refs,e.ref,n),E(t.refs,t.ref,n)),n}function h(e,t){var n=(e.props,t.vchildren),r=t.childNodes;if(n)for(var o=0,i=n.length;o<i;o++)s(n[o],r[o]);A(e.refs,e.ref,t),t.eventStore=t.vchildren=null}function v(e,n,r){var o=g(e,n),i=t(o,n,r);return i.cache=i.cache||{},i.cache[e.uid]=o,i}function m(e,t,n,r){var o=e.uid,i=n.cache[o];delete n.cache[o];var a=g(t,r),s=T(i,a,n,r);return s.cache=s.cache||{},s.cache[t.uid]=a,s!==n&&M(s.cache,n.cache,s),s}function y(e,t){var n=e.uid,r=t.cache[n];delete t.cache[n],s(r,t)}function g(t,n){var r=t.type,o=t.props,i=C(n,r.contextTypes),a=r(o,i);if(a&&a.render&&(a=a.render()),null===a||!1===a)a=e(_e);else if(!a||!a.vtype)throw new Error("@"+r.name+"#render:You may have returned undefined, an array or some other invalid object");return a}function x(e,n,r){var o=e.type,i=e.props,a=e.uid,s=C(n,o.contextTypes),l=new o(i,s),c=l.$updater,p=l.$cache;p.parentContext=n,c.isPending=!0,l.props=l.props||i,l.context=l.context||s,l.componentWillMount&&(l.componentWillMount(),l.state=c.getState());var u=w(l),d=t(u,P(l,n),r);return d.cache=d.cache||{},d.cache[a]=l,p.vnode=u,p.node=d,p.isMounted=!0,ne(Ye,l),null!=e.ref&&(ne(Ge,e),ne(Ge,l)),d}function k(e,t,n,r){var o=e.uid,i=n.cache[o],a=i.$updater,s=i.$cache,l=t.type,c=t.props,p=C(r,l.contextTypes);if(delete n.cache[o],n.cache[t.uid]=i,s.parentContext=r,i.componentWillReceiveProps){var u=!a.isPending;u&&(a.isPending=!0),i.componentWillReceiveProps(c,p),u&&(a.isPending=!1)}return e.ref!==t.ref&&(A(e.refs,e.ref,i),E(t.refs,t.ref,i)),a.emitUpdate(c,p),s.node}function b(e,t){var n=e.uid,r=t.cache[n],o=r.$cache;delete t.cache[n],A(e.refs,e.ref,r),r.setState=r.forceUpdate=Q,r.componentWillUnmount&&r.componentWillUnmount(),s(o.vnode,t),delete r.setState,o.isMounted=!1,o.node=o.parentContext=o.vnode=r.refs=r.context=null}function C(e,t){var n={};if(!t||!e)return n;for(var r in t)t.hasOwnProperty(r)&&(n[r]=e[r]);return n}function w(t,n){Xe=t.refs;var r=t.render();if(null===r||!1===r)r=e(_e);else if(!r||!r.vtype)throw new Error("@"+t.constructor.name+"#render:You may have returned undefined, an array or some other invalid object");return Xe=null,r}function P(e,t){if(e.getChildContext){var n=e.getChildContext();n&&(t=oe(oe({},t),n))}return t}function S(){var e=Ye.length;if(e){var t=Ye;Ye=[];for(var n=-1;e--;){var r=t[++n],o=r.$updater;r.componentDidMount&&r.componentDidMount(),o.isPending=!1,o.emitUpdate()}}}function O(){var e=Ge.length;if(e){var t=Ge;Ge=[];for(var n=0;n<e;n+=2){var r=t[n],o=t[n+1];E(r.refs,r.ref,o)}}}function N(){O(),S()}function T(e,r,o,i){var a=o;return null==r?(s(e,o),o.parentNode.removeChild(o)):e.type!==r.type||e.key!==r.key?(s(e,o),a=t(r,i,o.namespaceURI),o.parentNode.replaceChild(a,o)):(e!==r||i)&&(a=n(e,r,o,i)),a}function U(){return this}function E(e,t,n){null!=t&&n&&(n.nodeName&&!n.getDOMNode&&(n.getDOMNode=U),K(t)?t(n):e&&(e[t]=n))}function A(e,t,n){null!=t&&(K(t)?t(null):e&&e[t]===n&&delete e[t])}function M(e,t,n){for(var r in t)if(t.hasOwnProperty(r)){var o=t[r];e[r]=o,o.forceUpdate&&(o.$cache.node=n)}}function R(e){this.instance=e,this.pendingStates=[],this.pendingCallbacks=[],this.isPending=!1,this.nextProps=this.nextContext=null,this.clearCallbacks=this.clearCallbacks.bind(this)}function D(e,t){this.$updater=new R(this),this.$cache={isMounted:!1},this.props=e,this.state={},this.refs={},this.context=t}function F(e,t,n,r,o){var i=!0;if(e.shouldComponentUpdate&&(i=e.shouldComponentUpdate(t,n,r)),!1===i)return e.props=t,e.state=n,void(e.context=r||{});var a=e.$cache;a.props=t,a.state=n,a.context=r||{},e.forceUpdate(o)}function I(e){return"onDoubleClick"===e?e="ondblclick":"onTouchTap"===e&&(e="onclick"),e.toLowerCase()}function L(e,t,n){return t=I(t),(e.eventStore||(e.eventStore={}))[t]=n,1===Ke[t]?void(e[t]=V):(nt[t]||(document.addEventListener(t.substr(2),z,!1),nt[t]=!0),Qe&&t===tt?void e.addEventListener("click",et,!1):void("onchange"===t&&B(e)&&L(e,"oninput",n)))}function $(e,t){t=I(t);var n=e.eventStore||(e.eventStore={});return delete n[t],1===Ke[t]?void(e[t]=null):Qe&&t===tt?void e.removeEventListener("click",et,!1):void("onchange"===t&&B(e)&&delete n.oninput)}function z(e){var t=e.target,n=e.type,r="on"+n,o=void 0;for(Ze.isPending=!0;t;){var i=t,a=i.eventStore,s=a&&a[r];if(s){if(o||(o=j(e)),o.currentTarget=t,s.call(t,o),o.$cancelBubble)break;t=t.parentNode}else t=t.parentNode}Ze.isPending=!1,Ze.batchUpdate()}function V(e){var t=e.currentTarget||e.target,n="on"+e.type,r=j(e);r.currentTarget=t,Ze.isPending=!0;var o=t.eventStore,i=o&&o[n];i&&i.call(t,r),Ze.isPending=!1,Ze.batchUpdate()}function j(e){var t={},n=function(){return t.$cancelBubble=!0};t.nativeEvent=e,t.persist=Q;for(var r in e)"function"!=typeof e[r]?t[r]=e[r]:t[r]="stopPropagation"===r||"stopImmediatePropagation"===r?n:e[r].bind(e);return t}function B(e){var t=e.nodeName&&e.nodeName.toLowerCase();return"select"!==t&&!("input"===t&&"file"===e.type)}function _(e,t){for(var n in t)t.hasOwnProperty(n)&&X(e,n,t[n])}function W(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]="")}function q(e,t,n){if(t!==n){if(!n&&t)return void W(e,t);if(n&&!t)return void _(e,n);for(var r in t)n.hasOwnProperty(r)?n[r]!==t[r]&&X(e,r,n[r]):e[r]="";for(var r in n)t.hasOwnProperty(r)||X(e,r,n[r])}}function H(e,t){return e+t.charAt(0).toUpperCase()+t.substring(1)}function X(e,t,n){if(!rt[t]&&it.test(n))return void(e[t]=n+"px");"float"===t&&(t="cssFloat"),null!=n&&"boolean"!=typeof n||(n=""),e[t]=n}function Y(e){var t=e.props,n=e.attrNS,r=e.domAttrs,o=e.domProps;for(var i in t)if(t.hasOwnProperty(i)){var a=t[i];pt[i]={attributeName:r.hasOwnProperty(i)?r[i]:i.toLowerCase(),propertyName:o.hasOwnProperty(i)?o[i]:i,attributeNamespace:n.hasOwnProperty(i)?n[i]:null,mustUseProperty:G(a,ut),hasBooleanValue:G(a,dt),hasNumericValue:G(a,ft),hasPositiveNumericValue:G(a,ht),hasOverloadedBooleanValue:G(a,vt)}}}function G(e,t){return(e&t)===t}function Z(e,t,n){var r=pt.hasOwnProperty(t)&&pt[t];if(r)if(null==n||r.hasBooleanValue&&!n||r.hasNumericValue&&isNaN(n)||r.hasPositiveNumericValue&&n<1||r.hasOverloadedBooleanValue&&!1===n)J(e,t);else if(r.mustUseProperty){var o=r.propertyName;"value"===o&&""+e[o]==""+n||(e[o]=n)}else{var i=r.attributeName,a=r.attributeNamespace;a?e.setAttributeNS(a,i,""+n):r.hasBooleanValue||r.hasOverloadedBooleanValue&&!0===n?e.setAttribute(i,""):e.setAttribute(i,""+n)}else ct(t)&<.test(t)&&(null==n?e.removeAttribute(t):e.setAttribute(t,""+n))}function J(e,t){var n=pt.hasOwnProperty(t)&&pt[t];if(n)if(n.mustUseProperty){var r=n.propertyName;n.hasBooleanValue?e[r]=!1:"value"===r&&""+e[r]==""||(e[r]="")}else e.removeAttribute(n.attributeName);else ct(t)&&e.removeAttribute(t)}function K(e){return"function"==typeof e}function Q(){}function ee(e){return e}function te(e,t){return function(){return e.apply(this,arguments),t.apply(this,arguments)}}function ne(e,t){e[e.length]=t}function re(e,t,n){for(var r=e.length,o=-1;r--;){var i=e[++o];bt(i)?re(i,t,n):t(i,n)}}function oe(e,t){if(!t)return e;for(var n=Object.keys(t),r=n.length;r--;)e[n[r]]=t[n[r]];return e}function ie(){return++Ct}function ae(e,t,n,r){wt.test(t)?L(e,t,n):"style"===t?_(e.style,n):t===Le?n&&null!=n.__html&&(e.innerHTML=n.__html):r?null==n?e.removeAttribute(t):e.setAttribute(t,""+n):Z(e,t,n)}function se(e,t,n,r){wt.test(t)?$(e,t):"style"===t?W(e.style,n):t===Le?e.innerHTML="":r?e.removeAttribute(t):J(e,t)}function le(e,t,n,r,o){if("value"!==t&&"checked"!==t||(r=e[t]),n!==r)return void 0===n?void se(e,t,r,o):void("style"===t?q(e.style,r,n):ae(e,t,n,o))}function ce(e,t,n){for(var r in t)"children"!==r&&ae(e,r,t[r],n)}function pe(e,t,n,r){for(var o in t)"children"!==o&&(n.hasOwnProperty(o)?le(e,o,n[o],t[o],r):se(e,o,t[o],r));for(var o in n)"children"===o||t.hasOwnProperty(o)||ae(e,o,n[o],r)}function ue(e){return!(!e||e.nodeType!==We&&e.nodeType!==qe&&e.nodeType!==He)}function de(e,n,r,o){if(!e.vtype)throw new Error("cannot render "+e+" to container");if(!ue(n))throw new Error("container "+n+" is not a DOM element");var i=n[ze]||(n[ze]=ie()),a=Pt[i];if(a)return void(!0===a?Pt[i]=a={vnode:e,callback:r,parentContext:o}:(a.vnode=e,a.parentContext=o,a.callback=a.callback?te(a.callback,r):r));Pt[i]=!0;var s=null,l=null;if(s=St[i])l=T(s,e,n.firstChild,o);else{l=t(e,o,n.namespaceURI);for(var c=null;c=n.lastChild;)n.removeChild(c);n.appendChild(l)}St[i]=e;var p=Ze.isPending;Ze.isPending=!0,N(),a=Pt[i],delete Pt[i];var u=null;return"object"==typeof a?u=de(a.vnode,n,a.callback,a.parentContext):e.vtype===Ve?u=l:e.vtype===Be&&(u=l.cache[e.uid]),p||(Ze.isPending=!1,Ze.batchUpdate()),r&&r.call(u),u}function fe(e,t,n){return de(e,t,n)}function he(e,t,n,r){return de(t,n,r,e.$cache.parentContext)}function ve(e){if(!e.nodeName)throw new Error("expect node");var t=e[ze],n=null;return!!(n=St[t])&&(s(n,e.firstChild),e.removeChild(e.firstChild),delete St[t],!0)}function me(e){if(null==e)return null;if(e.nodeName)return e;var t=e;if(t.getDOMNode&&t.$cache.isMounted)return t.getDOMNode();throw new Error("findDOMNode can not find Node")}function ye(t,n,r){var o=null;if("string"==typeof t)o=Ve;else{if("function"!=typeof t)throw new Error("React.createElement: unexpect type [ "+t+" ]");o=t.prototype&&t.prototype.isReactComponent?Be:je}var i=null,a=null,s={};if(null!=n)for(var l in n)n.hasOwnProperty(l)&&("key"===l?void 0!==n.key&&(i=""+n.key):"ref"===l?void 0!==n.ref&&(a=n.ref):s[l]=n[l]);var c=t.defaultProps;if(c)for(var l in c)void 0===s[l]&&(s[l]=c[l]);var p=arguments.length,u=r;if(p>3){u=Array(p-2);for(var d=2;d<p;d++)u[d-2]=arguments[d]}return void 0!==u&&(s.children=u),e(o,t,s,i,a)}function ge(e){return null!=e&&!!e.vtype}function xe(e,t){for(var n=e.type,r=e.key,o=e.ref,i=oe(oe({key:r,ref:o},e.props),t),a=arguments.length,s=Array(a>2?a-2:0),l=2;l<a;l++)s[l-2]=arguments[l];var c=ye.apply(void 0,[n,i].concat(s));return c.ref===e.ref&&(c.refs=e.refs),c}function ke(e){var t=function(){for(var t=arguments.length,n=Array(t),r=0;r<t;r++)n[r]=arguments[r];return ye.apply(void 0,[e].concat(n))};return t.type=e,t}function be(e){if(ge(e))return e;throw new Error("expect only one child")}function Ce(e,t,n){if(null==e)return e;var r=0;if(bt(e))re(e,function(e){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null),t.call(n,e,r++)});else{var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null),t.call(n,e,r)}}function we(e,t,n){if(null==e)return e;var r=[],o={};Ce(e,function(e,i){var a={};a.child=t.call(n,e,i)||e,a.isEqual=a.child===e;var s=a.key=Oe(e,i);o.hasOwnProperty(s)?o[s]+=1:o[s]=0,a.index=o[s],ne(r,a)});var i=[];return r.forEach(function(e){var t=e.child,n=e.key,r=e.index,a=e.isEqual;if(null!=t&&"boolean"!=typeof t){if(!ge(t)||null==n)return void ne(i,t);0!==o[n]&&(n+=":"+r),a||(n=Ne(t.key||"")+"/"+n),t=xe(t,{key:n}),ne(i,t)}}),i}function Pe(e){var t=0;return Ce(e,function(){t++}),t}function Se(e){return we(e,ee)||[]}function Oe(e,t){return ge(e)&&"string"==typeof e.key?".$"+e.key:"."+t.toString(36)}function Ne(e){return(""+e).replace(Et,"//")}function Te(e,t){e.forEach(function(e){e&&(bt(e.mixins)&&Te(e.mixins,t),t(e))})}function Ue(e,t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];if("getInitialState"!==n){var o=e[n];K(o)&&K(r)?e[n]=te(o,r):e[n]=r}else ne(e.$getInitialStates,r)}}function Ee(e,t){t.propTypes&&(e.propTypes=e.propTypes||{},oe(e.propTypes,t.propTypes)),t.contextTypes&&(e.contextTypes=e.contextTypes||{},oe(e.contextTypes,t.contextTypes)),oe(e,t.statics),K(t.getDefaultProps)&&(e.defaultProps=e.defaultProps||{},oe(e.defaultProps,t.getDefaultProps()))}function Ae(e,t){for(var n in t)t.hasOwnProperty(n)&&K(t[n])&&(e[n]=t[n].bind(e))}function Me(){var e=this,t={},n=this.setState;return this.setState=Mt,this.$getInitialStates.forEach(function(n){K(n)&&oe(t,n.call(e))}),this.setState=n,t}function Re(e){function t(n,r){D.call(this,n,r),this.constructor=t,!1!==e.autobind&&Ae(this,t.prototype),this.state=this.getInitialState()||this.state}if(!K(e.render))throw new Error("createClass: spec.render is not function");var n=e.mixins||[],r=n.concat(e);e.mixins=null,t.displayName=e.displayName;var o=t.prototype=new Mt;return o.$getInitialStates=[],Te(r,function(e){Ue(o,e),Ee(t,e)}),o.getInitialState=Me,e.mixins=n,t}function De(e,t){if(e===t)return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var o=0;o<n.length;o++)if(!t.hasOwnProperty(n[o])||e[n[o]]!==t[n[o]])return!1;return!0}function Fe(e,t){D.call(this,e,t)}function Ie(e,t){return!De(this.props,e)||!De(this.state,t)}var Le="dangerouslySetInnerHTML",$e="http://www.w3.org/2000/svg",ze="liteid",Ve=2,je=3,Be=4,_e=5,We=1,qe=9,He=11,Xe=null,Ye=[],Ge=[],Ze={updaters:[],isPending:!1,add:function(e){ne(this.updaters,e)},batchUpdate:function(){if(!this.isPending){this.isPending=!0;for(var e=this.updaters,t=void 0;t=e.pop();)t.updateComponent();this.isPending=!1}}};R.prototype={emitUpdate:function(e,t){this.nextProps=e,this.nextContext=t,e||!Ze.isPending?this.updateComponent():Ze.add(this)},updateComponent:function(){var e=this.instance,t=this.pendingStates,n=this.nextProps,r=this.nextContext;(n||t.length>0)&&(n=n||e.props,r=r||e.context,this.nextProps=this.nextContext=null,F(e,n,this.getState(),r,this.clearCallbacks))},addState:function(e){e&&(ne(this.pendingStates,e),this.isPending||this.emitUpdate())},replaceState:function(e){var t=this.pendingStates;t.pop(),ne(t,[e])},getState:function(){var e=this.instance,t=this.pendingStates,n=e.state,r=e.props;return t.length&&(n=oe({},n),t.forEach(function(t){var o=bt(t);o&&(t=t[0]),K(t)&&(t=t.call(e,n,r)),o?n=oe({},t):oe(n,t)}),t.length=0),n},clearCallbacks:function(){var e=this.pendingCallbacks,t=this.instance;e.length>0&&(this.pendingCallbacks=[],e.forEach(function(e){return e.call(t)}))},addCallback:function(e){K(e)&&ne(this.pendingCallbacks,e)}};var Je={};D.prototype={constructor:D,isReactComponent:Je,forceUpdate:function(e){var t=this.$updater,n=this.$cache,r=this.props,o=this.state,i=this.context;if(n.isMounted){if(t.isPending)return void t.addState(o);var a=n.props||r,s=n.state||o,l=n.context||i,c=n.parentContext,p=n.node,u=n.vnode;n.props=n.state=n.context=null,t.isPending=!0,this.componentWillUpdate&&this.componentWillUpdate(a,s,l),this.state=s,this.props=a,this.context=l;var d=w(this),f=T(u,d,p,P(this,c));f!==p&&(f.cache=f.cache||{},M(f.cache,p.cache,f)),n.vnode=d,n.node=f,N(),this.componentDidUpdate&&this.componentDidUpdate(r,o,i),e&&e.call(this),t.isPending=!1,t.emitUpdate()}},setState:function(e,t){var n=this.$updater;n.addCallback(t),n.addState(e)},replaceState:function(e,t){var n=this.$updater;n.addCallback(t),n.replaceState(e)},getDOMNode:function(){var e=this.$cache.node;return e&&"#comment"===e.nodeName?null:e},isMounted:function(){return this.$cache.isMounted}};var Ke={onmousemove: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},Qe="ontouchstart"in document,et=function(){},tt="onclick",nt={},rt={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridColumn:1,fontWeight:1,lineClamp:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},ot=["Webkit","ms","Moz","O"];Object.keys(rt).forEach(function(e){ot.forEach(function(t){rt[H(t,e)]=1})});var it=/^-?\d+(\.\d+)?$/,at=":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",st=at+"\\-.0-9\\uB7\\u0300-\\u036F\\u203F-\\u2040",lt=new RegExp("^["+at+"]["+st+"]*$"),ct=RegExp.prototype.test.bind(new RegExp("^(data|aria)-["+st+"]*$")),pt={},ut=1,dt=4,ft=8,ht=24,vt=32,mt={props:{accept:0,acceptCharset:0,accessKey:0,action:0,allowFullScreen:dt,allowTransparency:0,alt:0,async:dt,autoComplete:0,autoFocus:dt,autoPlay:dt,capture:dt,cellPadding:0,cellSpacing:0,charSet:0,challenge:0,checked:ut|dt,cite:0,classID:0,className:0,cols:ht,colSpan:0,content:0,contentEditable:0,contextMenu:0,controls:dt,coords:0,crossOrigin:0,data:0,dateTime:0,default:dt,defaultValue:ut,defaultChecked:ut|dt,defer:dt,dir:0,disabled:dt,download:vt,draggable:0,encType:0,form:0,formAction:0,formEncType:0,formMethod:0,formNoValidate:dt,formTarget:0,frameBorder:0,headers:0,height:0,hidden:dt,high:0,href:0,hrefLang:0,htmlFor:0,httpEquiv:0,icon:0,id:0,inputMode:0,integrity:0,is:0,keyParams:0,keyType:0,kind:0,label:0,lang:0,list:0,loop:dt,low:0,manifest:0,marginHeight:0,marginWidth:0,max:0,maxLength:0,media:0,mediaGroup:0,method:0,min:0,minLength:0,multiple:ut|dt,muted:ut|dt,name:0,nonce:0,noValidate:dt,open:dt,optimum:0,pattern:0,placeholder:0,poster:0,preload:0,profile:0,radioGroup:0,readOnly:dt,referrerPolicy:0,rel:0,required:dt,reversed:dt,role:0,rows:ht,rowSpan:ft,sandbox:0,scope:0,scoped:dt,scrolling:0,seamless:dt,selected:ut|dt,shape:0,size:ht,sizes:0,span:ht,spellCheck:0,src:0,srcDoc:0,srcLang:0,srcSet:0,start:ft,step:0,style:0,summary:0,tabIndex:0,target:0,title:0,type:0,useMap:0,value:ut,width:0,wmode:0,wrap:0,about:0,datatype:0,inlist:0,prefix:0,property:0,playsInline:dt,resource:0,typeof:0,vocab:0,autoCapitalize:0,autoCorrect:0,autoSave:0,color:0,itemProp:0,itemScope:dt,itemType:0,itemID:0,itemRef:0,results:0,security:0,unselectable:0},attrNS:{},domAttrs:{acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv"},domProps:{}},yt="http://www.w3.org/1999/xlink",gt="http://www.w3.org/XML/1998/namespace",xt={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,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",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},kt={props:{},attrNS:{xlinkActuate:yt,xlinkArcrole:yt,xlinkHref:yt,xlinkRole:yt,xlinkShow:yt,xlinkTitle:yt,xlinkType:yt,xmlBase:gt,xmlLang:gt,xmlSpace:gt},domAttrs:{},domProps:{}};Object.keys(xt).map(function(e){kt.props[e]=0,xt[e]&&(kt.domAttrs[e]=xt[e])}),Y(mt),Y(kt);var bt=Array.isArray,Ct=0,wt=/^on/i;Object.freeze||(Object.freeze=ee);var Pt={},St={},Ot=Object.freeze({render:fe,unstable_renderSubtreeIntoContainer:he,unmountComponentAtNode:ve,findDOMNode:me}),Nt={};"a|abbr|address|area|article|aside|audio|b|base|bdi|bdo|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|data|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|main|map|mark|menu|menuitem|meta|meter|nav|noscript|object|ol|optgroup|option|output|p|param|picture|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|small|source|span|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|track|u|ul|var|video|wbr|circle|clipPath|defs|ellipse|g|image|line|linearGradient|mask|path|pattern|polygon|polyline|radialGradient|rect|stop|svg|text|tspan".split("|").forEach(function(e){Nt[e]=ke(e)});var Tt=function e(){return e};Tt.isRequired=Tt;var Ut={array:Tt,bool:Tt,func:Tt,number:Tt,object:Tt,string:Tt,any:Tt,arrayOf:Tt,element:Tt,instanceOf:Tt,node:Tt,objectOf:Tt,oneOf:Tt,oneOfType:Tt,shape:Tt},Et=/\/(?!\/)/g,At=Object.freeze({only:be,forEach:Ce,map:we,count:Pe,toArray:Se}),Mt=function(){};Mt.prototype=D.prototype,Fe.prototype=Object.create(D.prototype),Fe.prototype.constructor=Fe,Fe.prototype.isPureReactComponent=!0,Fe.prototype.shouldComponentUpdate=Ie;var Rt=oe({version:"0.15.1",cloneElement:xe,isValidElement:ge,createElement:ye,createFactory:ke,Component:D,PureComponent:Fe,createClass:Re,Children:At,PropTypes:Ut,DOM:Nt},Ot);return Rt.__SECRET_DOM_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ot,Rt});