Comparing version 8.1.0-alpha.2 to 8.1.0-alpha.3
@@ -1,2 +0,2 @@ | ||
/*! DIO 8.1.0-alpha.2 @license MIT */ | ||
/*! DIO 8.1.0-alpha.3 @license MIT */ | ||
@@ -296,7 +296,7 @@ module.exports = function (exports, Element, getComponentChildren, getComponentElement, getElementDefinition, mountComponentElement, invokeErrorBoundary) {/* eslint-disable */'use strict' | ||
/** | ||
* @param {function=} | ||
* @param {function=} callback | ||
* @return {Stream} | ||
*/ | ||
function toStream (callback) { | ||
var readable = new Stream(this) | ||
var readable = new Stream(this, this.host) | ||
@@ -318,6 +318,7 @@ switch (typeof callback) { | ||
* @constructor | ||
* @param {Element} | ||
* @param {Element} element | ||
* @param {Element?} host | ||
*/ | ||
function Stream (element) { | ||
this.host = null | ||
function Stream (element, host) { | ||
this.host = host | ||
this.stack = [element] | ||
@@ -324,0 +325,0 @@ |
@@ -1,2 +0,2 @@ | ||
!function(e){"use strict";function t(e,n,r){function o(){this.next=this,this.prev=this,this.length=0}function i(){this.hash=""}function c(){}function u(e,t){for(var n in t)e[n]=t[n];return e}function a(e,t,n){for(var r in t)e[r]=t[r];for(var r in n)e[r]=n[r];return e}function f(e,t){for(var n=0;n<e.length;++n)nn(e[n])?f(e[n],t):t.push(e[n]);return t}function s(e,t,n){if("function"==typeof e.find)return e.find(t,n);for(var r=0;r<e.length;++r)if(t.call(n,e[r],r,e))return e[r]}function l(e,t){if("function"==typeof e.forEach)return e.forEach(t);for(var n=0,r=e.next(r,n++);!r.done;)r=e.next(r.value,n=t(r.value,n))}function p(e,t){throw new Error("#"+e+"(...): "+t+".")}function h(e,t){for(var n in e)if(!tn.call(t,n))return!0;for(var n in t)if(!d(e[n],t[n]))return!0;return!1}function d(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function v(e){for(var t=0,n=0;t<e.length;++t)n=(n<<5)-n+e.charCodeAt(t);return n>>>0}function y(e){this.id=e,this.work=Ct,this.active=!1,this.xmlns="",this.key=null,this.ref=null,this.type=null,this.props=null,this.state=null,this.children=null,this.owner=null,this.instance=null,this.event=null,this.DOM=null,this.context=null,this.parent=null,this.host=null,this.next=null,this.prev=null}function m(e){var t=new y(e.id);return t.type=e.type,t.props=e.props,t.xmlns=e.xmlns,t.key=e.key,t.ref=e.ref,t.children=e.children,t}function w(){return new y(ot)}function x(e,t){var n=new y(ut);return n.type=It,n.key=Ut+t,n.children=e+"",n}function b(e){var t=new y(at);return t.type=Ft,t.key=Ut+e,t.children="",t}function k(e){var t=new y(nt),n=new o,r=0;if(t.type=ln,t.children=n,E(e))N(n,e,r);else for(;r<e.length;++r)N(n,e[r],r);return M(n),t}function g(e,t){if("function"==typeof e[an])return k(Ue(e));switch(typeof e){case"boolean":return b(t);case"object":if("function"!=typeof e.then)break;case"function":return C(e)}p(Tt,"Invalid element [object "+P(e)+"]")}function E(e){return null!=e&&e.constructor===sn}function C(e,t){var n=null!=t?1:2,r=0,i=0,c="function"!=typeof e?ct:it,u=arguments.length,f=new y(c),s={},l=c!==it?new o:null;if(1===n&&"object"==typeof t&&void 0===t[an])switch(t.constructor){case sn:break;default:if(nn(t))break;case Object:if("function"==typeof t.then)break;j(f,(n++,s=t)),void 0!==s.children&&c!==it&&(s.children=void(i=N(l,s.children,i)))}if((r=u-n)>0)if(c!==it)for(;n<u;++n)i=N(l,arguments[n],i);else{if(r>1)for(l=[];n<u;++n)l.push(arguments[n]);else l=arguments[n];s.children=l}switch(typeof e){case"function":e.defaultProps&&(s=O(f,e,s));break;case"number":case"symbol":e===ln&&M((f.id=nt,l));break;case"object":E(e)?(j(f,s=a({},e.props,s)),f.id=e.id,e=e.type):"function"==typeof e.then&&M((f.id=tt,l))}return f.type=e,f.props=s,f.children=l,f}function j(e,t){void 0!==t.key&&(e.key=t.key),void 0!==t.ref&&(e.ref=t.ref),void 0!==t.xmlns&&(e.xmlns=t.xmlns)}function N(e,t,n){if(null!=t)if(t.constructor===sn)null===t.key&&(t.key=Ut+n),e.insert(!1===t.active?t:m(t),e);else switch(typeof t){case"string":case"number":e.insert(x(t,n),e);break;case"object":if(nn(t)){for(var r=0;r<t.length;++r)N(e,t[r],n+r);return n+r}default:return N(e,g(t,n),n)}else e.insert(b(n),e);return n+1}function M(e){e.insert(b(Vt),e.next),e.insert(b(Bt),e)}function O(e,t,n){return"function"==typeof t.defaultProps&&$t(t,"defaultProps",{value:oe(e,t.defaultProps)}),a({},t.defaultProps,n)}function P(e){switch(typeof e){case"function":return P(e.displayName||e.name);case"number":case"symbol":return P(e.toString());case"string":if(e)return e;default:return e&&e.constructor.name||"anonymous"}}function D(e,t,n){return E(e[n])?e[n].id===rt?D(e[n],t,n):e[n]:e.host&&A(e.host)===e?D(e.host,t,n):t.id<ot?D(t,t.parent,n):w()}function S(e){return e.id<rt?S(e.parent):e}function T(e,t){return e.id<ot?T(e.children[t]):e}function A(e){return e.id===it?A(e.children):e}function L(e){if(null==e)return b(Ut);if(e.constructor===sn)return e;switch(typeof e){case"string":case"number":return x(e,Ut);case"object":if(nn(e))return k(e);default:return g(e,Ut)}}function _(e){return!E(e)&&"object"==typeof e&&e&&tn.call(e,"default")?_(e.default):k(L(e))}function q(e,t){this.refs=null,this.state=null,this.props=e,this.context=t}function H(e,t){q.call(this,e,t)}function U(e){return $t(en(e,{forceUpdate:{value:B},setState:{value:V}}),pn,{value:pn}),tn.call(e,Tt)||$t(e,Tt,{value:c,writable:!0}),e}function V(e,t){R(Y(this),this,e,t)}function B(e){G(Y(this),this,e,ht)}function F(e){var t,n,r,o=e.type,i=e.props,c=e.context||{},u=o.prototype;return u&&u.render?(u[pn]!==pn&&U(u),t=o=K(e,o)):(t=new q).render=o,e.owner=o,e.instance=t,e.context=c,t[sn]=e,t.refs={},t.props=i,t.context=c,t.state=r=t.state||{},o[Zt]&&(e.state=$(e,Zt,i,r,c))&&"function"==typeof(r=t.state=e.state).then&&(e.work===kt&&z(e,t,r),n=null),o[Wt]&&e.work!==Ct&&ee(e,Wt),n=null!==n?X(e,t):L(n),o[Yt]&&(e.context=Z(e,i,r,c)),e.children=n}function I(e,t,n){switch(e.work){case gt:cn(Q(e,t,n));case Et:return}e.work=Et;var r=e.instance,o=e.owner,i=r.context,c=e.props,f=t.props,s=e.state,l=r.state,p=n===vt?a({},l,s):l;switch(o[Yt]&&u(e.context,Z(e,f,p,i)),n){case ht:break;case dt:o[Qt]&&te(e,Qt,f,i);case vt:if(o[Rt]&&!te(e,Rt,f,p,i))return void(e.work=Ct)}e.work=gt,s!==e.state&&u(p,e.state),o[zt]&&te(e,zt,f,p,i),n===dt&&(r.props=e.props=f),n===vt&&(r.state=p),je(e.children,X(e,r)),o[Jt]&&te(e,Jt,c,l,i),e.ref!==t.ref&&ve(e,t.ref,pt),e.work=Ct}function W(e){e.state=null,e.owner[Kt]&&(e.state=ee(e,Kt))}function G(e,t,n,r){e?e.work!==gt?(e.active?e.id===it&&I(e,e,r):t.state=a({},t.state,e.state),n&&J(e,t,n)):cn(function(){G(e,t,n,r)}):cn(function(){G(Y(t),t,n,r)})}function Q(e,t,n){return function(){I(e,t,n)}}function R(e,t,n,r){if(n)if(e){if("function"==typeof n.then)return z(e,t,n,r);switch(typeof n){case"function":return R(e,t,J(e,t,n),r);case"object":e.state=n}G(e,t,r,vt)}else cn(function(){R(t[sn],t,n,r)})}function z(e,t,n,r){n.then(function(n){cn(function(){R(e,t,n,r)})}).catch(function(t){Oe(e,t,_t+":"+qt,Nt)})}function J(e,t,n){try{if("function"==typeof n)return n.call(t,t.state,t.props,t.context)}catch(t){Oe(e,t,qt+":"+St,Nt)}}function K(e,t){try{return new t(e.props,e.context)}catch(t){Oe(e,t,Lt,Nt)}return new q}function X(e,t){try{return L(t.render(t.props,t.state,e.context))}catch(t){return L(Oe(e,t,Tt,Nt))}}function Y(e){return e[sn]}function Z(e,t,n,r){return $(e,Yt,t,n,r)||r}function $(e,t,n,r,o){try{return e.owner[t].call(e.instance,n,r,o)}catch(n){Oe(e,n,t,Nt)}}function ee(e,t){try{var n=e.owner[t].call(e.instance,e.active&&gn(e));if(t!==Kt)re(e,n);else if(n&&"function"==typeof n.then)return n}catch(n){Oe(e,n,t,Nt)}}function te(e,t,n,r,o){try{var r=e.owner[t].call(e.instance,n,r,o);if(t===Rt)return r;re(e,r)}catch(n){Oe(e,n,t,Nt)}}function ne(e,t,n,r){try{re(e,e.owner[t].call(e.instance,n,r))}catch(t){Oe(e.host,t,Xt,Nt)}}function re(e,t){switch(typeof t){case"object":case"function":R(e,e.instance,t)}}function oe(e,t,n,r,o){try{if("function"==typeof t)return t.call(e.instance,n,r,o)}catch(t){Oe(e,t,St,jt)}}function ie(e,t,n){t!==n.ref&&delete this.refs[n.ref],this.refs[t]=e}function ce(e,t,n,r,o){for(var i=e.children,c=i.length,u=i.next;c-- >0;)ue(u,t,e,n,r,o),u=u.next}function ue(e,t,n,r,o,i){switch(e.host=r,e.parent=n,e.context=r.context,e.id){case it:return e.work=kt,ue(F(e),t,n,e,o,i),ye(e),e.work=Ct,e.ref&&ve(e,e.ref,lt),void(e.owner[Gt]&&ee(e,Gt));case tt:le(e,e);case rt:case nt:return yn(e,e.id!==rt?gn(n):Mn(e)),ce(e,t,r,o,i),void ye(e);case ct:e.xmlns=jn(e,n.xmlns);default:switch(i){case yt:if(we(e,n))break;default:ye(e),o===xt?ge(e,n):ke(e,t,n)}if(e.id!==ct)return}ce(e,t,r,xt,i),he(e,Nn(e),Mt)}function ae(e,t,n){switch(e.id){case it:ae(e.children,t,-n),W(e);case ut:case at:break;case rt:n<ot&&t.id>ot&&be(e,t);default:for(var r=e.children,o=r.length;o-- >0;)ae(r=r.next,e,-n)}e.ref&&ve(e,e.ref,ft),e.active=!1}function fe(e,t,n){return n>ot&&ae(e,t,n),e.id!==it?be(e,t):e.state?e.state=void e.state.then(se(e,t,e,jt)).catch(se(e,t,e,Nt)):void fe(e.children,t,ot)}function se(e,t,n,r){return e.id===it?se(e.children,t,u({},n),r):(yn(e,gn(n)),function(n){fe(e,t,wt),r===Nt&&Oe(e.host,n,_t+":"+Kt,r)})}function le(e,t){t.type.then(function(t){e.active&&Ne(e,_(t))}).catch(function(t){Oe(e,t,_t+":"+Tt,Nt)})}function pe(e,t,n,r){ue(t,e,n,r,bt,mt),fe(e,n,wt);for(var o in t)switch(o){case"DOM":u(e[o],t[o]);case Dt:case Pt:break;default:e[o]=t[o]}}function he(e,t,n){for(var r in t)switch(r){case"ref":ve(e,t[r],n);case"key":case"xmlns":case"children":break;default:111===r.charCodeAt(0)&&110===r.charCodeAt(1)&&r.length>2?de(e,r.substring(2).toLowerCase(),t[r]):bn(e,r,t[r],e.xmlns)}}function de(e,t,n){e.event||(e.event={}),e.event[t]||xn(e,t),e.event[t]=n}function ve(e,t,n,r){switch(typeof t){case"string":return n===ft?ve(e,ie,ft,t):ve(e,ie,lt,t);case"function":switch(n){case ft:return oe(e.host,t,e.ref=null,r,e);case st:e.ref=t;case lt:return oe(e.host,t,e.instance||gn(e),r,e);case pt:ve(e,t,ft,r),ve(e,t,st,r)}break;default:ve(e,e.ref===t?c:e.ref,ft,r)}}function ye(e){try{switch(e.active=!0,e.id){case ct:return yn(e,_n(e));case ut:return yn(e,qn(e));case at:return yn(e,Hn(e));case it:e.DOM=e.children.DOM;case rt:break;default:e.DOM=T(e,Dt).DOM}}catch(t){return ye(me(e,Oe(e,t,At,Nt)))}}function me(e,t){return a(e,t,{key:e.key,prev:e.prev,next:e.next,host:e.host,parent:e.parent})}function we(e,t){return yn(e,On(e,t,D(e,t,Pt),D(e,t,Dt))),e.active=!!gn(e)}function xe(e,t){wn(e,t)}function be(e,t){if(t.id<rt)return be(e,S(t));e.id>ot?Tn(e,t):e.children.forEach(function(t){be(A(t),e)})}function ke(e,t,n){if(n.id<ot){if(n.id<rt)return ke(e,t,S(n));if(!n.active)return ge(e,n)}switch(t.id){case it:return ke(e,A(t),n);case rt:return ke(e,D(t,n,Dt),n);case ot:return ge(e,n)}switch(e.id){case ct:case ut:case at:return An(e,t,n);case it:return ke(A(e),t,n);case rt:return}e.children.forEach(function(e){ke(A(e),t,n)})}function ge(e,t){if(t.id<rt)return ge(e,S(t));switch(e.id){case ct:case ut:case at:return Ln(e,t);case it:return ge(A(e),t);case rt:return}e.children.forEach(function(e){ge(A(e),t)})}function Ee(e,t){he(e,Ce(e.props,e.props=t.props),Ot)}function Ce(e,t){if(e!==t){var n=0,r={};for(var o in e)tn.call(t,o)||(r[(++n,o)]=null);for(var o in t){var i=t[o],c=e[o];i!==c&&("object"!=typeof i||null===i?r[(++n,o)]=i:(i=Ce(c||{},i))&&(r[(++n,o)]=i))}return n>0?r:void 0}}function je(e,t){if(e.id===tt&&t.id===tt)return le(e,t);if(e.key!==t.key||e.type!==t.type)return pe(e,t,e.parent,e.host);switch(e.id){case rt:case nt:return Ne(e,t);case it:return I(e,t,dt);case ut:e.children!==t.children&&xe(e,e.children=t.children);break;case ct:Ne(e,t),Ee(e,t)}}function Ne(e,t){var n=xt,r=e.host,o=e.children,i=t.children,c=o.length,u=i.length;if(c+u!==0){var a=0,f=0,s=c-1,l=u-1,p=o.next,h=i.next,d=o.prev,v=i.prev;e:for(;;){for(;p.key===h.key;){if(je(p,h),++a,++f,a>s||f>l)break e;p=p.next,h=h.next}for(;d.key===v.key;){if(je(d,v),--s,--l,a>s||f>l)break e;d=d.prev,v=v.prev}break}if(a>s++){if(f<=l++)for(l<u?n=bt:(d=o,c>0&&(h=h.next));f++<l;)h=(p=h).next,ue(o.insert(p,d),d,e,r,n,mt)}else if(f>l++)for(l===u&&u>0&&(p=p.next);a++<s;)p=(h=p).next,fe(o.remove(h),e,wt);else Me(e,r,o,p,h,a,f,s,l,c)}}function Me(e,t,n,r,o,i,c,u,a,f){for(var s=i,l=c,p=r,h=o,d=p,v=p,y=p,m=p,w={},x={};s<u||l<a;)s<u&&(w[p.key]=p,++s!==f)&&(p=p.next),l<a&&(x[h.key]=h,++l!==a)&&(h=h.next);for(;l-- >c;)d=h.prev,v=h.next,y=w[h.key],m=w[v.key],E(y)?E(v)?d.key!==y.prev.key&&(v=v.active?v:m||p).key!==y.next.key&&ke(n.insert(n.remove(y),v),v,e):E(v=y.next)&&E(x[v.key])&&(d.key===p.key?ge(n.insert(n.remove(y),n),e):v!==p&&(E(x[p.key])||v.key!==p.prev.key)&&ke(n.insert(n.remove(y),p),p,e)):E(v)?(v=v.active?v:m||p,ue(n.insert(h,v),v,e,t,bt,mt)):ue(n.insert(h,n),h,e,t,xt,mt),h=d;for(var b in w)E((p=w[b],h=x[b]))?je(p,h):fe(n.remove(p),e,wt)}function Oe(e,t,n,r){return L(Pe(e,Le(e,t,n),n,r))}function Pe(e,t,n,r){if(r===jt)return Se(t);var o=e.host,i=e.owner,c=e.instance,u=c&&!c[fn]&&i&&i[Xt];return cn(function(){e.active&&De(e,L(null))}),u&&(e.work=gt,ne(e,Xt,t,c[fn]=t),e.work=Ct),!u&&E(o)&&e.id!==ot?Pe(o,t,n,r):Pe(e,t,n,jt)}function De(e,t){je(e.id===it?e.children:e,t)}function Se(e){e.defaultPrevented||Te(e.inspect())}function Te(e){return"undefined"!=typeof console?(console.error||console.log).call(console,e):"function"==typeof printErr?printErr(e):void 0}function Ae(e){return{enumerable:!0,configurable:!0,value:e}}function Le(e,t,n){if(!(t instanceof Error))return Le(e,new Error(t),n);for(var r="",o=" ",i=e;i&&i.type;)r+=o+"<"+P(i.type)+">\n",o+=" ",i=i.host;var c="The above error occurred in `\n"+r+'` from "'+n+'"',u=t.stack+"\n\n"+c;return en(t,{errorLocation:Ae(n),errorStack:Ae(u),errorMessage:Ae(c),componentStack:Ae(r),defaultPrevented:Ae(!1),preventDefault:Ae(function(){return!!$t(t,"defaultPrevented",Ae(!0))}),inspect:Ae(function(){return u})})}function _e(e){return e||p(Ht,"Expected to receive a component"),E(Y(e))?_e(Y(e)):E(e)&&e.active?gn(e):Sn(e)?Cn(e):Dn(e)?e:void p(Ht,"Called on an unmounted component")}function qe(e){return C.bind(null,e)}function He(e,t){return n?("function"!=typeof n[e]&&(n[e]=t),n[e]):t}function Ue(e){var t=[];if(null==e)return t;if(E(e)||"object"!=typeof e)return[e];if(nn(e))return f(e,t);if("function"==typeof e.next||"function"==typeof e.forEach)l(e,function(e){return t.push(e)});else{if("function"==typeof e[an])return Ue(e[an]());t.push(e)}return f(t,[])}function Ve(e,t,n){if(!t)return Ve(e,En(),n);Pn(t)?Fe(kn(t),L(e),n):Ie(e,w(),t,n,mt)}function Be(e,t,n){if(!t)return Be(e,En(),n);Ie(e,w(),t,n,yt)}function Fe(e,t,n){je(e,t),n&&oe(e,n)}function Ie(e,t,n,r,o){if(!E(e))return Ie(L(e),t,n,r,o);Dn(n)||p(Tt,"Target container is not a DOM element"),yn(t,n),vn(e,n),o===mt&&mn(t,e),ue(e,e,t,t,xt,o),r&&oe(e,r)}function We(e,t){for(var n in t){var r=t[n];n.indexOf("-")<0?Je(e).style[n]=!1!==r&&void 0!==r?r:"":Je(e).style.setProperty(n,r)}}function Ge(e,t,n){switch(n){case null:case!1:case void 0:return Qe(e,t,n,Je(e)[t]="");default:Je(e)[t]=n}}function Qe(e,t,n,r){switch(n){case null:case!1:case void 0:return r&&Je(e).removeAttributeNS(r,t),Je(e).removeAttribute(t);case!0:return Qe(e,t,"",r);default:r?Je(e).setAttributeNS(r,t,n):Je(e).setAttribute(t,n)}}function Re(e,t,n,r){switch(t){case"className":if(!r&&n)return Ge(e,t,n);case"class":return Qe(e,"class",n,"");case"style":return"object"==typeof n?We(e,n):Qe(e,t,n,"");case"xlink:href":return Qe(e,t,n,"http://www.w3.org/1999/xlink");case"innerHTML":return ze(e,t,n||"",[]);case"dangerouslySetInnerHTML":return Re(e,"innerHTML",n&&n.__html,r);case"acceptCharset":return Re(e,"accept-charset",n,r);case"httpEquiv":return Re(e,"http-equiv",n,r);case"tabIndex":return Re(e,t.toLowerCase(),n,r);case"autofocus":case"autoFocus":return Je(e)[n?"focus":"blur"]();case"width":case"height":if("img"===e.type)return Qe(e,t,n,"")}switch(typeof n){case"object":return Ge(e,t,n&&Xe(e)[t]);case"string":case"number":case"boolean":if(r||!(t in Je(e)))return Qe(e,t,n,"");default:Ge(e,t,n)}}function ze(e,t,n,r){Je(e)[t]&&e.children.forEach(function(e){r.push(Je(e))}),(Je(e)[t]=n)&&r.push.apply(r,Je(e).childNodes),r.forEach(function(t){Je(e).appendChild(t)})}function Je(e){return e.DOM.node}function Ke(){return document.documentElement}function Xe(e){switch(e.type){case"input":return u({type:null,step:null,min:null,max:null},e.props);default:return e.props}}function Ye(e){return"string"==typeof e.type?Ke().querySelector(e.type):Ze(e.type)?e.type:Ke()}function Ze(e){return!(!e||!e.ELEMENT_NODE)}function $e(e){return document.createTextNode(e.children)}var et={version:"8.1.0-alpha.2"},tt=-3,nt=-2,rt=-1,ot=0,it=1,ct=2,ut=3,at=4,ft=-1,st=0,lt=1,pt=2,ht=0,dt=1,vt=2,yt=0,mt=1,wt=2,xt=3,bt=4,kt=-2,gt=-1,Et=0,Ct=1,jt=-2,Nt=-1,Mt=1,Ot=2,Pt="prev",Dt="next",St="callback",Tt="render",At="element",Lt="constructor",_t="async",qt="setState",Ht="findDOMNode",Ut="&|",Vt="&head",Bt="&tail",Ft="#empty",It="#text",Wt="componentWillMount",Gt="componentDidMount",Qt="componentWillReceiveProps",Rt="shouldComponentUpdate",zt="componentWillUpdate",Jt="componentDidUpdate",Kt="componentWillUnmount",Xt="componentDidCatch",Yt="getChildContext",Zt="getInitialState",$t=Object.defineProperty,en=Object.defineProperties,tn=Object.hasOwnProperty,nn=Array.isArray,rn=e.WeakMap||i,on=e.Symbol||function(e){return v(e)},cn=e.requestAnimationFrame||function(e){setTimeout(e,16)},un=on.for||on,an=on.iterator||"@@iterator",fn=un("dio.Error"),sn=un("dio.Element"),ln=un("dio.Fragment"),pn=un("dio.Component");en(o.prototype,{insert:{value:function(e,t){return e.next=t,e.prev=t.prev,t.prev.next=e,t.prev=e,this.length++,e}},remove:{value:function(e){return 0===this.length?e:(e.next.prev=e.prev,e.prev.next=e.next,this.length--,e)}},forEach:{value:function(e){for(var t=0,n=this;t<this.length;++t)e(n=n.next,t)}}}),en(i.prototype,{set:{value:function(e,t){e[this.hash]=t}},get:{value:function(e){return e[this.hash]}},has:{value:function(e){return this.hash in e}}}),en(y.prototype,{constructor:{value:sn},handleEvent:{value:function(e){try{var t,n=e.type,r=this,o=r.event[n],i=r.host,c=i.instance,u=c||r,a=u.props,f=u.state,s=u.context;if(!o)return;"function"==typeof o?t=o.call(c,e,a,f,s):"function"==typeof o.handleEvent&&(c!==o&&o[pn]===pn&&(i=Y(c=o)),t=o.handleEvent(e,a,f,s)),t&&c&&re(i,t)}catch(e){Oe(i,e,"on"+n+":"+P(o.handleEvent||o),jt)}}}}),H.prototype=Object.create(U(q.prototype),{shouldComponentUpdate:{value:function(e,t){return h(this.props,e)||h(this.state,t)}}});var hn={toArray:Ue,forEach:function(e,t,n){null!=e&&Ue(e).forEach(t,n)},map:function(e,t,n){return null!=e?Ue(e).map(t,n):e},filter:function(e,t,n){return null!=e?Ue(e).filter(t,n):e},find:function(e,t,n){return null!=e?s(Ue(e),t,n):e},count:function(e){return Ue(e).length},only:function(e){if(E(e))return e;p("Children.only","Expected to receive a single element")}},dn=new rn,vn=He("setHost",function(e,t){dn.set(t,e)}),yn=He("setNode",function(e,t){e.DOM={node:t}}),mn=He("setContent",function(e,t){Je(e).textContent=""}),wn=He("setText",function(e,t){Je(e).nodeValue=t}),xn=He("setEvent",function(e,t){Je(e).addEventListener(t,e,!1)}),bn=He("setProps",Re),kn=He("getHost",function(e){return dn.get(e)}),gn=He("getNode",Je),En=He("getDocument",Ke),Cn=He("getTarget",function(e){return e.currentTarget}),jn=He("getType",function(e,t){switch(e.type){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";case"foreignObject":return""}return t}),Nn=He("getProps",Xe),Mn=He("getPortal",Ye),On=He("getQuery",function(e,t,n,r){for(var o=e.id,i=o>ct?"#text":e.type.toLowerCase(),c=e.props,u=e.children,a=u.length,f=n.active?Je(n).nextSibling:Je(t).firstChild,s=f,l=null;f&&(f.nodeName.toLowerCase()!==i||(o>ct?(r.id>ct&&f.splitText(0),f.nodeValue!==u&&(f.nodeValue=u)):0===a&&f.firstChild&&(f.textContent=""),t.id===rt&&Ye(t).appendChild(f),l=f,i=null,(f=f.nextSibling)&&!r.type));){if(o>ct&&0===a){if(f.parentNode.insertBefore(l=$e(e),f),r.type)break;i=null}f=(s=f).nextSibling,s.parentNode.removeChild(s)}if(l&&!l.splitText)for(var p=l.attributes,h=p.length-1;h>=0;--h){var d=p[h].name;void 0===c[d]&&l.removeAttribute(d)}return l}),Pn=He("isValidHost",function(e){return dn.has(e)}),Dn=He("isValidNode",Ze),Sn=He("isValidEvent",function(e){return!(!e||!e.BUBBLING_PHASE)}),Tn=He("removeNode",function(e,t){Je(t).removeChild(Je(e))}),An=He("insertNode",function(e,t,n){Je(n).insertBefore(Je(e),Je(t))}),Ln=He("appendNode",function(e,t){Je(t).appendChild(Je(e))}),_n=He("createElement",function(e){return e.xmlns?document.createElementNS(e.xmlns,e.type):document.createElement(e.type)}),qn=He("createText",$e),Hn=He("createEmpty",function(e){return document.createTextNode("")});return et.render=Ve,et.hydrate=Be,et.Component=q,et.Fragment=ln,et.PureComponent=H,et.Children=hn,et.findDOMNode=_e,et.unmountComponentAtNode=function(e){return Pn(e)&&!Ve(null,e)},et.createFactory=function(n){return"object"!=typeof n||null===n||E(n)?qe(n):t(e,n,r)},et.cloneElement=function(){return C.apply(null,arguments)},et.isValidElement=E,et.createPortal=function(e,t,n){var r=new y(rt),i=new o;return r.type=t,r.children=i,void 0!==n&&(r.key=n),N(i,e,0),M(i),r},et.createElement=C,et.h=C,"function"==typeof r&&function(){try{r("./cjs")(et,y,X,Y,L,F,Oe)}catch(e){Te(e),Te("Something went wrong trying to import the server module")}}(),"object"==typeof n&&"function"==typeof n.createExport?n.createExport(et,y,X,Y,L,F,Oe)||et:et}"object"==typeof exports&&"object"==typeof module&&null!==module?"undefined"==typeof __webpack_require__&&"function"==typeof require&&e.global===e&&e.process?module.exports=t(e,void 0,require):module.exports=t(e):"function"==typeof define&&define.amd?define(t(e)):e.dio=t(e)}("object"==typeof window?window:"object"==typeof global?global:this); | ||
!function(e){"use strict";function t(e,n,r){function o(){this.next=this,this.prev=this,this.length=0}function i(){this.hash=""}function c(){}function u(e,t){for(var n in t)e[n]=t[n];return e}function a(e,t,n){for(var r in t)e[r]=t[r];for(var r in n)e[r]=n[r];return e}function f(e,t){for(var n=0;n<e.length;++n)on(e[n])?f(e[n],t):t.push(e[n]);return t}function s(e,t,n){if("function"==typeof e.find)return e.find(t,n);for(var r=0;r<e.length;++r)if(t.call(n,e[r],r,e))return e[r]}function l(e,t){if("function"==typeof e.forEach)return e.forEach(t);for(var n=0,r=e.next(r,n++);!r.done;)r=e.next(r.value,n=t(r.value,n))}function p(e,t){throw new Error("#"+e+"(...): "+t+".")}function h(e,t){for(var n in e)if(!rn.call(t,n))return!0;for(var n in t)if(!d(e[n],t[n]))return!0;return!1}function d(e,t){return e===t?0!==e||1/e==1/t:e!==e&&t!==t}function v(e){for(var t=0,n=0;t<e.length;++t)n=(n<<5)-n+e.charCodeAt(t);return n>>>0}function y(e){this.id=e,this.work=Nt,this.active=!1,this.xmlns="",this.key=null,this.ref=null,this.type=null,this.props=null,this.state=null,this.children=null,this.owner=null,this.instance=null,this.event=null,this.DOM=null,this.context=null,this.parent=null,this.host=null,this.next=null,this.prev=null}function m(e){var t=new y(e.id);return t.type=e.type,t.props=e.props,t.xmlns=e.xmlns,t.key=e.key,t.ref=e.ref,t.children=e.children,t}function w(e){var t=new y(ct);return t.children=e,t}function x(e,t){var n=new y(ft);return n.type=Gt,n.key=Bt+t,n.children=e+"",n}function b(e){var t=new y(st);return t.type=Wt,t.key=Bt+e,t.children="",t}function k(e){var t=new y(ot),n=new o,r=0;if(t.type=hn,t.children=n,E(e))N(n,e,r);else for(;r<e.length;++r)N(n,e[r],r);return P(n),t}function g(e,t){if("function"==typeof e[sn])return k(Ve(e));switch(typeof e){case"boolean":return b(t);case"object":if("function"!=typeof e.then)break;case"function":return C(e)}p(Lt,"Invalid element [object "+T(e)+"]")}function E(e){return null!=e&&e.constructor===pn}function C(e,t){var n=null!=t?1:2,r=0,i=0,c="function"!=typeof e?at:ut,u=arguments.length,f=new y(c),s={},l=c!==ut?new o:null;if(1===n&&"object"==typeof t&&void 0===t[sn])switch(t.constructor){case pn:break;default:if(on(t))break;case Object:if("function"==typeof t.then)break;j(f,(n++,s=t)),void 0!==s.children&&c!==ut&&(s.children=void(i=N(l,s.children,i)))}if((r=u-n)>0)if(c!==ut)for(;n<u;++n)i=N(l,arguments[n],i);else{if(r>1)for(l=[];n<u;++n)l.push(arguments[n]);else l=arguments[n];s.children=l}switch(typeof e){case"function":e.defaultProps&&(s=S(f,e,s));break;case"number":case"symbol":e===hn&&P((f.id=ot,l));break;case"object":E(e)?(j(f,s=a({},e.props,s)),f.id=e.id,e=e.type):"function"==typeof e.then&&P((f.id=rt,l))}return f.type=e,f.props=s,f.children=l,f}function j(e,t){void 0!==t.key&&(e.key=t.key),void 0!==t.ref&&(e.ref=t.ref),void 0!==t.xmlns&&(e.xmlns=t.xmlns)}function N(e,t,n){if(null!=t)if(t.constructor===pn)null===t.key&&(t.key=Bt+n),e.insert(null===t.next?t:m(t),e);else switch(typeof t){case"string":case"number":e.insert(x(t,n),e);break;case"object":if(on(t)){for(var r=0;r<t.length;++r)N(e,t[r],n+r);return n+r}default:return N(e,g(t,n),n)}else e.insert(b(n),e);return n+1}function P(e){e.insert(b(Ft),e.next),e.insert(b(It),e)}function M(e,t,n){e.insert(n,t),e.remove(t)}function S(e,t,n){return"function"==typeof t.defaultProps&&tn(t,"defaultProps",{value:ie(e,t.defaultProps)}),a({},t.defaultProps,n)}function T(e){switch(typeof e){case"function":return T(e.displayName||e.name);case"number":case"symbol":return T(e.toString());case"string":if(e)return e;default:return e&&e.constructor.name||"anonymous"}}function O(e,t,n){return E(e[n])?e[n].id===it?O(e[n],t,n):e[n]:e.host&&L(e.host)===e?O(e.host,t,n):t.id<ct?O(t,t.parent,n):w(e)}function A(e){return e.id<it?A(e.parent):e}function D(e,t){return e.id<ct?D(e.children[t]):e}function L(e){return e.id===ut?L(e.children):e}function _(e){if(null==e)return b(Bt);if(e.constructor===pn)return e;switch(typeof e){case"string":case"number":return x(e,Bt);case"object":if(on(e))return k(e);default:return g(e,Bt)}}function q(e){return!E(e)&&"object"==typeof e&&e&&rn.call(e,"default")?q(e.default):k(_(e))}function H(e,t){this.refs=null,this.state=null,this.props=e,this.context=t}function U(e,t){H.call(this,e,t)}function V(e){return tn(nn(e,{forceUpdate:{value:F},setState:{value:B}}),dn,{value:dn}),rn.call(e,Lt)||tn(e,Lt,{value:c}),e}function B(e,t){z(Z(this),this,e,t)}function F(e){Q(Z(this),this,e,vt)}function I(e){var t,n,r,o=e.type,i=e.props,c=e.context||{},u=o.prototype;return u&&u.render?(u[dn]!==dn&&V(u),t=o=X(e,o)):tn(t=new H,Lt,{value:o}),e.owner=o,e.instance=t,e.context=c,t[pn]=e,t.refs={},t.props=i,t.context=c,t.state=r=t.state||{},o[en]&&(e.state=ee(e,en,i,r,c))&&"function"==typeof(r=t.state=e.state).then&&(e.work===Et&&J(e,t,r),n=null),o[Qt]&&e.work!==Nt&&te(e,Qt),n=null!==n?Y(e,t):_(n),o[$t]&&(e.context=$(e,i,r,c)),e.children=n}function W(e,t,n){switch(e.work){case Ct:an(R(e,t,n));case jt:return}e.work=jt;var r=e.instance,o=e.owner,i=r.context,c=e.props,f=t.props,s=e.state,l=r.state,p=n===mt?a({},l,s):l;switch(o[$t]&&u(e.context,$(e,f,p,i)),n){case vt:break;case yt:o[zt]&&ne(e,zt,f,i);case mt:if(o[Jt]&&!ne(e,Jt,f,p,i))return void(e.work=Nt)}e.work=Ct,s!==e.state&&u(p,e.state),o[Kt]&&ne(e,Kt,f,p,i),n===yt&&(r.props=e.props=f),n===mt&&(r.state=p),Ne(e.children,Y(e,r)),o[Xt]&&ne(e,Xt,c,l,i),e.ref!==t.ref&&ye(e,t.ref,dt),e.work=Nt}function G(e){e.state=null,e.owner[Yt]&&(e.state=te(e,Yt))}function Q(e,t,n,r){e?e.work!==Ct?(e.active?W(e,e,r):t.state=a({},t.state,e.state),n&&K(e,t,n)):an(function(){Q(e,t,n,r)}):an(function(){Q(Z(t),t,n,r)})}function R(e,t,n){return function(){W(e,t,n)}}function z(e,t,n,r){if(n)if(e){if("function"==typeof n.then)return J(e,t,n,r);switch(typeof n){case"function":return z(e,t,K(e,t,n),r);case"object":e.state=n}Q(e,t,r,mt)}else an(function(){z(t[pn],t,n,r)})}function J(e,t,n,r){n.then(function(n){an(function(){z(e,t,n,r)})}).catch(function(t){Se(e,t,Ht+":"+Ut,Mt)})}function K(e,t,n){try{if("function"==typeof n)return n.call(t,t.state,t.props,t.context)}catch(t){Se(e,t,Ut+":"+Dt,Mt)}}function X(e,t){try{return new t(e.props,e.context)}catch(t){Se(e,t,qt,Mt)}return new H}function Y(e,t){try{return _(t.render(t.props,t.state,e.context))}catch(t){return _(Se(e,t,Lt,Mt))}}function Z(e){return e[pn]}function $(e,t,n,r){return ee(e,$t,t,n,r)||r}function ee(e,t,n,r,o){try{return e.owner[t].call(e.instance,n,r,o)}catch(n){Se(e,n,t,Mt)}}function te(e,t){try{var n=e.owner[t].call(e.instance,e.active&&Cn(e));if(t!==Yt)oe(e,n);else if(n&&"function"==typeof n.then)return n}catch(n){Se(e,n,t,Mt)}}function ne(e,t,n,r,o){try{var r=e.owner[t].call(e.instance,n,r,o);if(t===Jt)return r;oe(e,r)}catch(n){Se(e,n,t,Mt)}}function re(e,t,n,r){try{oe(e,e.owner[t].call(e.instance,n,r))}catch(t){Se(e.host,t,Zt,Mt)}}function oe(e,t){switch(typeof t){case"object":case"function":z(e,e.instance,t)}}function ie(e,t,n,r,o){try{if("function"==typeof t)return t.call(e.instance,n,r,o)}catch(t){Se(e,t,Dt,Pt)}}function ce(e,t,n){t!==n.ref&&delete this.refs[n.ref],this.refs[t]=e}function ue(e,t){var n=e.host,r=e.parent;if(fe(t,e,r,n,gt,xt),le(e,r,bt),n.children!==e)M(r.children,e,t);else for(n.children=t;Cn(n)===Cn(e);)wn(n,Cn(t)),n=n.host}function ae(e,t,n,r,o){for(var i=e.children,c=i.length,u=i.next;c-- >0;)fe(u,t,e,n,r,o),u=u.next}function fe(e,t,n,r,o,i){switch(e.host=r,e.parent=n,e.context=r.context,e.id){case ut:return e.work=Et,fe(I(e),t,n,e,o,i),me(e),e.work=Nt,e.ref&&ye(e,e.ref,ht),void(e.owner[Rt]&&te(e,Rt));case rt:he(e,e);case it:case ot:return wn(e,e.id!==it?Cn(n):Sn(e)),ae(e,t,r,o,i),void me(e);case at:e.xmlns=Pn(e,n.xmlns);default:switch(i){case wt:if(xe(e,n))break;default:me(e),o===kt?Ee(e,n):ge(e,t,n)}if(e.id!==at)return}ae(e,t,r,kt,i),de(e,Mn(e),St)}function se(e,t,n){switch(e.id){case ut:se(e.children,t,-n),G(e);case ft:case st:break;case it:n<ct&&t.id>ct&&ke(e,t);default:for(var r=e.children,o=r.length;o-- >0;)se(r=r.next,e,-n)}e.ref&&ye(e,e.ref,lt),e.active=!1}function le(e,t,n){return n>ct&&se(e,t,n),e.id!==ut?ke(e,t):e.state?e.state=void e.state.then(pe(e,t,e,Pt)).catch(pe(e,t,e,Mt)):void le(e.children,t,ct)}function pe(e,t,n,r){return e.id===ut?pe(e.children,t,n,r):function(o){le(e,t,bt),r===Mt&&Se(n,o,Ht+":"+Yt,r)}}function he(e,t){t.type.then(function(t){e.active&&Pe(e,q(t))}).catch(function(t){Se(e,t,Ht+":"+Lt,Mt)})}function de(e,t,n){for(var r in t)switch(r){case"ref":ye(e,t[r],n);case"key":case"xmlns":case"children":break;default:111===r.charCodeAt(0)&&110===r.charCodeAt(1)&&r.length>2?ve(e,r.substring(2).toLowerCase(),t[r]):gn(e,r,t[r],e.xmlns)}}function ve(e,t,n){e.event||(e.event={}),e.event[t]||kn(e,t),e.event[t]=n}function ye(e,t,n,r){switch(typeof t){case"string":return n===lt?ye(e,ce,lt,t):ye(e,ce,ht,t);case"function":switch(n){case lt:return ie(e.host,t,e.ref=null,r,e);case pt:e.ref=t;case ht:return ie(e.host,t,e.instance||Cn(e),r,e);case dt:ye(e,t,lt,r),ye(e,t,pt,r)}break;default:ye(e,e.ref===t?c:e.ref,lt,r)}}function me(e){try{switch(e.active=!0,e.id){case at:return wn(e,Hn(e));case ft:return wn(e,Un(e));case st:return wn(e,Vn(e));case ut:return wn(e,Cn(e.children));case it:break;default:wn(e,Cn(D(e,At)))}}catch(t){return me(we(e,Se(e,t,_t,Mt)))}}function we(e,t){return a(e,t,{key:e.key,prev:e.prev,next:e.next,host:e.host,parent:e.parent})}function xe(e,t){return wn(e,Tn(e,t,O(e,t,Ot),O(e,t,At))),e.active=!!Cn(e)}function be(e,t){bn(e,t)}function ke(e,t){return t.id<it?ke(e,A(t)):e.id>ct?Ln(e,t):void e.children.forEach(function(t){ke(L(t),e)})}function ge(e,t,n){if(n.id<ct){if(n.id<it)return ge(e,t,A(n));if(!n.active)return Ee(e,n)}switch(t.id){case ut:return ge(e,L(t),n);case it:return ge(e,O(t,n,At),n);case ot:case rt:return ge(e,D(t,At),n);case ct:return Ee(e,n)}switch(e.id){case at:case ft:case st:return _n(e,t,n);case ut:return ge(L(e),t,n);case it:return}e.children.forEach(function(e){ge(L(e),t,n)})}function Ee(e,t){if(t.id<it)return Ee(e,A(t));switch(e.id){case at:case ft:case st:return qn(e,t);case ut:return Ee(L(e),t);case it:return}e.children.forEach(function(e){Ee(L(e),t)})}function Ce(e,t){de(e,je(e.props,e.props=t.props),Tt)}function je(e,t){if(e!==t){var n=0,r={};for(var o in e)rn.call(t,o)||(r[(++n,o)]=null);for(var o in t){var i=t[o],c=e[o];i!==c&&("object"!=typeof i||null===i?r[(++n,o)]=i:(i=je(c||{},i))&&(r[(++n,o)]=i))}return n>0?r:void 0}}function Ne(e,t){if(e.id===rt&&t.id===rt)return he(e,t);if(e.key!==t.key||e.type!==t.type)return ue(e,t);switch(e.id){case it:case ot:return Pe(e,t);case ut:return W(e,t,yt);case ft:e.children!==t.children&&be(e,e.children=t.children);break;case at:Pe(e,t),Ce(e,t)}}function Pe(e,t){var n=kt,r=e.host,o=e.children,i=t.children,c=o.length,u=i.length;if(c+u!==0){var a=0,f=0,s=c-1,l=u-1,p=o.next,h=i.next,d=o.prev,v=i.prev,y=p,m=h,w=d,x=v;e:for(;;){for(;p.key===h.key;){if(y=p.next,m=h.next,Ne(p,h),++a,++f,a>s||f>l)break e;p=y,h=m}for(;d.key===v.key;){if(w=d.prev,x=v.prev,Ne(d,v),--s,--l,a>s||f>l)break e;d=w,v=x}break}if(a>s++){if(f<=l++)for(l<u?n=gt:(d=o,c>0&&(h=m));f++<l;)h=(p=h).next,fe(o.insert(p,d),d,e,r,n,xt)}else if(f>l++)for(l===u&&u>0&&(p=y);a++<s;)p=(h=p).next,le(o.remove(h),e,bt);else Me(e,r,o,p,h,a,f,s,l,c)}}function Me(e,t,n,r,o,i,c,u,a,f){for(var s=i,l=c,p=r,h=o,d=p,v=p,y=p,m=p,w={},x={};s<u||l<a;)s<u&&(w[p.key]=p,++s!==f)&&(p=p.next),l<a&&(x[h.key]=h,++l!==a)&&(h=h.next);for(;l-- >c;)d=h.prev,v=h.next,y=w[h.key],m=w[v.key],E(y)?E(v)?d.key!==y.prev.key&&(v=v.active?v:m||p).key!==y.next.key&&ge(n.insert(n.remove(y),v),v,e):E(v=y.next)&&E(x[v.key])&&(d.key===p.key?Ee(n.insert(n.remove(y),n),e):v!==p&&(E(x[p.key])||v.key!==p.prev.key)&&ge(n.insert(n.remove(y),p),p,e)):E(v)?(v=v.active?v:m||p,fe(n.insert(h,v),v,e,t,gt,xt)):fe(n.insert(h,n),h,e,t,kt,xt),h=d;for(var b in w)E((p=w[b],h=x[b]))?Ne(p,h):le(n.remove(p),e,bt)}function Se(e,t,n,r){return _(Te(e,_e(e,t,n),n,r))}function Te(e,t,n,r){if(r===Pt)return Ae(t);var o=e.host,i=e.owner,c=e.instance,u=c&&!c[ln]&&i&&i[Zt];return an(function(){e.active&&Oe(e,_(null))}),u&&(e.work=Ct,re(e,Zt,t,c[ln]=t),e.work=Nt),!u&&E(o)&&e.id!==ct?Te(o,t,n,r):Te(e,t,n,Pt)}function Oe(e,t){Ne(e.id===ut?e.children:e,t)}function Ae(e){e.defaultPrevented||De(e.inspect())}function De(e){return"undefined"!=typeof console?(console.error||console.log).call(console,e):"function"==typeof printErr?printErr(e):void 0}function Le(e){return{enumerable:!0,configurable:!0,value:e}}function _e(e,t,n){if(!(t instanceof Error))return _e(e,new Error(t),n);for(var r="",o=" ",i=e;i&&i.type;)r+=o+"<"+T(i.type)+">\n",o+=" ",i=i.host;var c="The above error occurred in `\n"+r+'` from "'+n+'"',u=t.stack+"\n\n"+c;return nn(t,{errorLocation:Le(n),errorStack:Le(u),errorMessage:Le(c),componentStack:Le(r),defaultPrevented:Le(!1),preventDefault:Le(function(){return!!tn(t,"defaultPrevented",Le(!0))}),inspect:Le(function(){return u})})}function qe(e){return e||p(Vt,"Expected to receive a component"),E(Z(e))?qe(Z(e)):E(e)&&e.active?Cn(e):Dn(e)?Nn(e):An(e)?e:void p(Vt,"Called on an unmounted component")}function He(e){return C.bind(null,e)}function Ue(e,t){return n?("function"!=typeof n[e]&&(n[e]=t),n[e]):t}function Ve(e){var t=[];if(null==e)return t;if(E(e)||"object"!=typeof e)return[e];if(on(e))return f(e,t);if("function"==typeof e.next||"function"==typeof e.forEach)l(e,function(e){return t.push(e)});else{if("function"==typeof e[sn])return Ve(e[sn]());t.push(e)}return f(t,[])}function Be(e,t,n){return t?On(t)?We(En(t),_(e),n):void Ie(e,t,n,xt):Be(e,jn(),n)}function Fe(e,t,n){if(!t)return Fe(e,jn(),n);Ie(e,t,n,wt)}function Ie(e,t,n,r){if(!E(e))return Ie(_(e),t,n,r);An(t)||p(Lt,"Target container is not a DOM element"),Ge(e,w(e),t,r),n&&ie(e,n)}function We(e,t,n){Ne(e,t),n&&ie(e,n)}function Ge(e,t,n,r){wn(t,n),mn(t,n),r===xt&&xn(t),fe(e,e,t,t,kt,r)}function Qe(e,t){for(var n in t){var r=t[n];n.indexOf("-")<0?Xe(e).style[n]=!1!==r&&void 0!==r?r:"":Xe(e).style.setProperty(n,r)}}function Re(e,t,n){switch(n){case null:case!1:case void 0:return ze(e,t,n,Xe(e)[t]="");default:Xe(e)[t]=n}}function ze(e,t,n,r){switch(n){case null:case!1:case void 0:return r&&Xe(e).removeAttributeNS(r,t),Xe(e).removeAttribute(t);case!0:return ze(e,t,"",r);default:r?Xe(e).setAttributeNS(r,t,n):Xe(e).setAttribute(t,n)}}function Je(e,t,n,r){switch(t){case"className":if(!r&&n)return Re(e,t,n);case"class":return ze(e,"class",n,"");case"style":return"object"==typeof n?Qe(e,n):ze(e,t,n,"");case"xlink:href":return ze(e,t,n,"http://www.w3.org/1999/xlink");case"innerHTML":return Ke(e,t,n||"",[]);case"dangerouslySetInnerHTML":return Je(e,"innerHTML",n&&n.__html,r);case"acceptCharset":return Je(e,"accept-charset",n,r);case"httpEquiv":return Je(e,"http-equiv",n,r);case"tabIndex":return Je(e,t.toLowerCase(),n,r);case"autofocus":case"autoFocus":return Xe(e)[n?"focus":"blur"]();case"width":case"height":if("img"===e.type)return ze(e,t,n,"")}switch(typeof n){case"object":return Re(e,t,n&&Ze(e)[t]);case"string":case"number":case"boolean":if(r||!(t in Xe(e)))return ze(e,t,n,"");default:Re(e,t,n)}}function Ke(e,t,n,r){Xe(e)[t]&&e.children.forEach(function(e){r.push(Xe(e))}),(Xe(e)[t]=n)&&r.push.apply(r,Xe(e).childNodes),r.forEach(function(t){Xe(e).appendChild(t)})}function Xe(e){return e.DOM}function Ye(){return document.documentElement}function Ze(e){switch(e.type){case"input":return u({type:null,step:null,min:null,max:null},e.props);default:return e.props}}function $e(e){return"string"==typeof e.type?Ye().querySelector(e.type):et(e.type)?e.type:Ye()}function et(e){return!(!e||!e.ELEMENT_NODE)}function tt(e){return document.createTextNode(e.children)}var nt={version:"8.1.0-alpha.3"},rt=-3,ot=-2,it=-1,ct=0,ut=1,at=2,ft=3,st=4,lt=-1,pt=0,ht=1,dt=2,vt=0,yt=1,mt=2,wt=0,xt=1,bt=2,kt=3,gt=4,Et=-2,Ct=-1,jt=0,Nt=1,Pt=-2,Mt=-1,St=1,Tt=2,Ot="prev",At="next",Dt="callback",Lt="render",_t="element",qt="constructor",Ht="async",Ut="setState",Vt="findDOMNode",Bt="&|",Ft="&head",It="&tail",Wt="#empty",Gt="#text",Qt="componentWillMount",Rt="componentDidMount",zt="componentWillReceiveProps",Jt="shouldComponentUpdate",Kt="componentWillUpdate",Xt="componentDidUpdate",Yt="componentWillUnmount",Zt="componentDidCatch",$t="getChildContext",en="getInitialState",tn=Object.defineProperty,nn=Object.defineProperties,rn=Object.hasOwnProperty,on=Array.isArray,cn=e.WeakMap||i,un=e.Symbol||function(e){return v(e)},an=e.requestAnimationFrame||function(e){setTimeout(e,16)},fn=un.for||un,sn=un.iterator||"@@iterator",ln=fn("dio.Error"),pn=fn("dio.Element"),hn=fn("dio.Fragment"),dn=fn("dio.Component");nn(o.prototype,{insert:{value:function(e,t){return e.next=t,e.prev=t.prev,t.prev.next=e,t.prev=e,this.length++,e}},remove:{value:function(e){return 0===this.length?e:(e.next.prev=e.prev,e.prev.next=e.next,this.length--,e)}},forEach:{value:function(e){for(var t=0,n=this;t<this.length;++t)e(n=n.next,t)}}}),nn(i.prototype,{set:{value:function(e,t){e[this.hash]=t}},get:{value:function(e){return e[this.hash]}},has:{value:function(e){return this.hash in e}}}),nn(y.prototype,{constructor:{value:pn},handleEvent:{value:function(e){try{var t,n=e.type,r=this,o=r.event[n],i=r.host,c=i.instance,u=c||r,a=u.props,f=u.state,s=u.context;if(!o)return;"function"==typeof o?t=o.call(c,e,a,f,s):"function"==typeof o.handleEvent&&(c!==o&&o[dn]===dn&&(i=Z(c=o)),t=o.handleEvent(e,a,f,s)),t&&c&&oe(i,t)}catch(e){Se(i,e,"on"+n+":"+T(o.handleEvent||o),Pt)}}}}),U.prototype=Object.create(V(H.prototype),{shouldComponentUpdate:{value:function(e,t){return h(this.props,e)||h(this.state,t)}}});var vn={toArray:Ve,forEach:function(e,t,n){null!=e&&Ve(e).forEach(t,n)},map:function(e,t,n){return null!=e?Ve(e).map(t,n):e},filter:function(e,t,n){return null!=e?Ve(e).filter(t,n):e},find:function(e,t,n){return null!=e?s(Ve(e),t,n):e},count:function(e){return Ve(e).length},only:function(e){if(E(e))return e;p("Children.only","Expected to receive a single element")}},yn=new cn,mn=Ue("setHost",function(e,t){yn.set(t,e)}),wn=Ue("setNode",function(e,t){e.DOM=t}),xn=Ue("setContent",function(e){Xe(e).textContent=""}),bn=Ue("setText",function(e,t){Xe(e).nodeValue=t}),kn=Ue("setEvent",function(e,t){Xe(e).addEventListener(t,e,!1)}),gn=Ue("setProps",Je),En=Ue("getHost",function(e){return yn.get(e).children}),Cn=Ue("getNode",Xe),jn=Ue("getDocument",Ye),Nn=Ue("getTarget",function(e){return e.currentTarget}),Pn=Ue("getType",function(e,t){switch(e.type){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";case"foreignObject":return""}return t}),Mn=Ue("getProps",Ze),Sn=Ue("getPortal",$e),Tn=Ue("getQuery",function(e,t,n,r){for(var o=e.id,i=o>at?"#text":e.type.toLowerCase(),c=e.props,u=e.children,a=u.length,f=n.active?Xe(n).nextSibling:Xe(t).firstChild,s=f,l=null;f&&(f.nodeName.toLowerCase()!==i||(o>at?(r.id>at&&f.splitText(0),f.nodeValue!==u&&(f.nodeValue=u)):0===a&&f.firstChild&&(f.textContent=""),t.id===it&&$e(t).appendChild(f),l=f,i=null,(f=f.nextSibling)&&!r.type));){if(o>at&&0===a){if(f.parentNode.insertBefore(l=tt(e),f),r.type)break;i=null}f=(s=f).nextSibling,s.parentNode.removeChild(s)}if(l&&!l.splitText)for(var p=l.attributes,h=p.length-1;h>=0;--h){var d=p[h].name;void 0===c[d]&&l.removeAttribute(d)}return l}),On=Ue("isValidHost",function(e){return yn.has(e)}),An=Ue("isValidNode",et),Dn=Ue("isValidEvent",function(e){return!(!e||!e.BUBBLING_PHASE)}),Ln=Ue("removeNode",function(e,t){Xe(t).removeChild(Xe(e))}),_n=Ue("insertNode",function(e,t,n){Xe(n).insertBefore(Xe(e),Xe(t))}),qn=Ue("appendNode",function(e,t){Xe(t).appendChild(Xe(e))}),Hn=Ue("createElement",function(e){return e.xmlns?document.createElementNS(e.xmlns,e.type):document.createElement(e.type)}),Un=Ue("createText",tt),Vn=Ue("createEmpty",function(e){return document.createTextNode("")});return nt.render=Be,nt.hydrate=Fe,nt.Component=H,nt.Fragment=hn,nt.PureComponent=U,nt.Children=vn,nt.findDOMNode=qe,nt.unmountComponentAtNode=function(e){return On(e)&&!Be(null,e)},nt.createFactory=function(n){return"object"!=typeof n||null===n||E(n)?He(n):t(e,n,r)},nt.cloneElement=function(){return C.apply(null,arguments)},nt.isValidElement=E,nt.createPortal=function(e,t,n){var r=new y(it),i=new o;return r.type=t,r.children=i,void 0!==n&&(r.key=n),N(i,e,0),P(i),r},nt.createElement=C,nt.h=C,"function"==typeof r&&function(){try{r("./cjs")(nt,y,Y,Z,_,I,Se)}catch(e){De(e),De("Something went wrong trying to import the server module")}}(),"object"==typeof n&&"function"==typeof n.createExport?n.createExport(nt,y,Y,Z,_,I,Se)||nt:nt}"object"==typeof exports&&"object"==typeof module&&null!==module?"undefined"==typeof __webpack_require__&&"function"==typeof require&&e.global===e&&e.process?module.exports=t(e,void 0,require):module.exports=t(e):"function"==typeof define&&define.amd?define(t(e)):e.dio=t(e)}("object"==typeof window?window:"object"==typeof global?global:this); | ||
//# sourceMappingURL=umd.min.js.map |
{ | ||
"name": "dio.js", | ||
"version": "8.1.0-alpha.2", | ||
"version": "8.1.0-alpha.3", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "A Library For Building User Interfaces.", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
174324
3045