preact.module-8c2bd209.js 9.6 KB

1
  1. var L,a,O,w,V,j,A,C={},q=[],tn=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,$=Array.isArray;function S(n,e){for(var _ in e)n[_]=e[_];return n}function z(n){var e=n.parentNode;e&&e.removeChild(n)}function J(n,e,_){var r,o,l,s={};for(l in e)l=="key"?r=e[l]:l=="ref"?o=e[l]:s[l]=e[l];if(arguments.length>2&&(s.children=arguments.length>3?L.call(arguments,2):_),typeof n=="function"&&n.defaultProps!=null)for(l in n.defaultProps)s[l]===void 0&&(s[l]=n.defaultProps[l]);return M(n,s,r,o,null)}function M(n,e,_,r,o){var l={type:n,props:e,key:_,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o!=null?o:++O,__i:-1,__u:0};return o==null&&a.vnode!=null&&a.vnode(l),l}function W(n){return n.children}function D(n,e){this.props=n,this.context=e}function x(n,e){if(e==null)return n.__?x(n.__,n.__i+1):null;for(var _;e<n.__k.length;e++)if((_=n.__k[e])!=null&&_.__e!=null)return _.__e;return typeof n.type=="function"?x(n):null}function K(n){var e,_;if((n=n.__)!=null&&n.__c!=null){for(n.__e=n.__c.base=null,e=0;e<n.__k.length;e++)if((_=n.__k[e])!=null&&_.__e!=null){n.__e=n.__c.base=_.__e;break}return K(n)}}function Q(n){(!n.__d&&(n.__d=!0)&&w.push(n)&&!N.__r++||V!==a.debounceRendering)&&((V=a.debounceRendering)||j)(N)}function N(){var n,e,_,r,o,l,s,f,p;for(w.sort(A);n=w.shift();)n.__d&&(e=w.length,r=void 0,l=(o=(_=n).__v).__e,f=[],p=[],(s=_.__P)&&((r=S({},o)).__v=o.__v+1,a.vnode&&a.vnode(r),R(s,r,o,_.__n,s.ownerSVGElement!==void 0,32&o.__u?[l]:null,f,l!=null?l:x(o),!!(32&o.__u),p),r.__.__k[r.__i]=r,_n(f,r,p),r.__e!=l&&K(r)),w.length>e&&w.sort(A));N.__r=0}function X(n,e,_,r,o,l,s,f,p,u,c){var t,m,i,h,k,v=r&&r.__k||q,d=e.length;for(_.__d=p,on(_,e,v),p=_.__d,t=0;t<d;t++)(i=_.__k[t])!=null&&typeof i!="boolean"&&typeof i!="function"&&(m=i.__i===-1?C:v[i.__i]||C,i.__i=t,R(n,i,m,o,l,s,f,p,u,c),h=i.__e,i.ref&&m.ref!=i.ref&&(m.ref&&B(m.ref,null,i),c.push(i.ref,i.__c||h,i)),k==null&&h!=null&&(k=h),65536&i.__u||m.__k===i.__k?p=Y(i,p,n):typeof i.type=="function"&&i.__d!==void 0?p=i.__d:h&&(p=h.nextSibling),i.__d=void 0,i.__u&=-196609);_.__d=p,_.__e=k}function on(n,e,_){var r,o,l,s,f,p=e.length,u=_.length,c=u,t=0;for(n.__k=[],r=0;r<p;r++)(o=n.__k[r]=(o=e[r])==null||typeof o=="boolean"||typeof o=="function"?null:typeof o=="string"||typeof o=="number"||typeof o=="bigint"||o.constructor==String?M(null,o,null,null,o):$(o)?M(W,{children:o},null,null,null):o.constructor===void 0&&o.__b>0?M(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):o)!=null?(o.__=n,o.__b=n.__b+1,f=ln(o,_,s=r+t,c),o.__i=f,l=null,f!==-1&&(c--,(l=_[f])&&(l.__u|=131072)),l==null||l.__v===null?(f==-1&&t--,typeof o.type!="function"&&(o.__u|=65536)):f!==s&&(f===s+1?t++:f>s?c>p-s?t+=f-s:t--:t=f<s&&f==s-1?f-s:0,f!==r+t&&(o.__u|=65536))):(l=_[r])&&l.key==null&&l.__e&&(l.__e==n.__d&&(n.__d=x(l)),I(l,l,!1),_[r]=null,c--);if(c)for(r=0;r<u;r++)(l=_[r])!=null&&!(131072&l.__u)&&(l.__e==n.__d&&(n.__d=x(l)),I(l,l))}function Y(n,e,_){var r,o;if(typeof n.type=="function"){for(r=n.__k,o=0;r&&o<r.length;o++)r[o]&&(r[o].__=n,e=Y(r[o],e,_));return e}return n.__e!=e&&(_.insertBefore(n.__e,e||null),e=n.__e),e&&e.nextSibling}function ln(n,e,_,r){var o=n.key,l=n.type,s=_-1,f=_+1,p=e[_];if(p===null||p&&o==p.key&&l===p.type)return _;if(r>(p!=null&&!(131072&p.__u)?1:0))for(;s>=0||f<e.length;){if(s>=0){if((p=e[s])&&!(131072&p.__u)&&o==p.key&&l===p.type)return s;s--}if(f<e.length){if((p=e[f])&&!(131072&p.__u)&&o==p.key&&l===p.type)return f;f++}}return-1}function Z(n,e,_){e[0]==="-"?n.setProperty(e,_!=null?_:""):n[e]=_==null?"":typeof _!="number"||tn.test(e)?_:_+"px"}function F(n,e,_,r,o){var l;n:if(e==="style")if(typeof _=="string")n.style.cssText=_;else{if(typeof r=="string"&&(n.style.cssText=r=""),r)for(e in r)_&&e in _||Z(n.style,e,"");if(_)for(e in _)r&&_[e]===r[e]||Z(n.style,e,_[e])}else if(e[0]==="o"&&e[1]==="n")l=e!==(e=e.replace(/(PointerCapture)$|Capture$/,"$1")),e=e.toLowerCase()in n?e.toLowerCase().slice(2):e.slice(2),n.l||(n.l={}),n.l[e+l]=_,_?r?_.u=r.u:(_.u=Date.now(),n.addEventListener(e,l?en:nn,l)):n.removeEventListener(e,l?en:nn,l);else{if(o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(e!=="width"&&e!=="height"&&e!=="href"&&e!=="list"&&e!=="form"&&e!=="tabIndex"&&e!=="download"&&e!=="rowSpan"&&e!=="colSpan"&&e!=="role"&&e in n)try{n[e]=_!=null?_:"";break n}catch(s){}typeof _=="function"||(_==null||_===!1&&e[4]!=="-"?n.removeAttribute(e):n.setAttribute(e,_))}}function nn(n){var e=this.l[n.type+!1];if(n.t){if(n.t<=e.u)return}else n.t=Date.now();return e(a.event?a.event(n):n)}function en(n){return this.l[n.type+!0](a.event?a.event(n):n)}function R(n,e,_,r,o,l,s,f,p,u){var c,t,m,i,h,k,v,d,y,b,E,P,G,T,H,g=e.type;if(e.constructor!==void 0)return null;128&_.__u&&(p=!!(32&_.__u),l=[f=e.__e=_.__e]),(c=a.__b)&&c(e);n:if(typeof g=="function")try{if(d=e.props,y=(c=g.contextType)&&r[c.__c],b=c?y?y.props.value:c.__:r,_.__c?v=(t=e.__c=_.__c).__=t.__E:("prototype"in g&&g.prototype.render?e.__c=t=new g(d,b):(e.__c=t=new D(d,b),t.constructor=g,t.render=un),y&&y.sub(t),t.props=d,t.state||(t.state={}),t.context=b,t.__n=r,m=t.__d=!0,t.__h=[],t._sb=[]),t.__s==null&&(t.__s=t.state),g.getDerivedStateFromProps!=null&&(t.__s==t.state&&(t.__s=S({},t.__s)),S(t.__s,g.getDerivedStateFromProps(d,t.__s))),i=t.props,h=t.state,t.__v=e,m)g.getDerivedStateFromProps==null&&t.componentWillMount!=null&&t.componentWillMount(),t.componentDidMount!=null&&t.__h.push(t.componentDidMount);else{if(g.getDerivedStateFromProps==null&&d!==i&&t.componentWillReceiveProps!=null&&t.componentWillReceiveProps(d,b),!t.__e&&(t.shouldComponentUpdate!=null&&t.shouldComponentUpdate(d,t.__s,b)===!1||e.__v===_.__v)){for(e.__v!==_.__v&&(t.props=d,t.state=t.__s,t.__d=!1),e.__e=_.__e,e.__k=_.__k,e.__k.forEach(function(U){U&&(U.__=e)}),E=0;E<t._sb.length;E++)t.__h.push(t._sb[E]);t._sb=[],t.__h.length&&s.push(t);break n}t.componentWillUpdate!=null&&t.componentWillUpdate(d,t.__s,b),t.componentDidUpdate!=null&&t.__h.push(function(){t.componentDidUpdate(i,h,k)})}if(t.context=b,t.props=d,t.__P=n,t.__e=!1,P=a.__r,G=0,"prototype"in g&&g.prototype.render){for(t.state=t.__s,t.__d=!1,P&&P(e),c=t.render(t.props,t.state,t.context),T=0;T<t._sb.length;T++)t.__h.push(t._sb[T]);t._sb=[]}else do t.__d=!1,P&&P(e),c=t.render(t.props,t.state,t.context),t.state=t.__s;while(t.__d&&++G<25);t.state=t.__s,t.getChildContext!=null&&(r=S(S({},r),t.getChildContext())),m||t.getSnapshotBeforeUpdate==null||(k=t.getSnapshotBeforeUpdate(i,h)),X(n,$(H=c!=null&&c.type===W&&c.key==null?c.props.children:c)?H:[H],e,_,r,o,l,s,f,p,u),t.base=e.__e,e.__u&=-161,t.__h.length&&s.push(t),v&&(t.__E=t.__=null)}catch(U){e.__v=null,p||l!=null?(e.__e=f,e.__u|=p?160:32,l[l.indexOf(f)]=null):(e.__e=_.__e,e.__k=_.__k),a.__e(U,e,_)}else l==null&&e.__v===_.__v?(e.__k=_.__k,e.__e=_.__e):e.__e=rn(_.__e,e,_,r,o,l,s,p,u);(c=a.diffed)&&c(e)}function _n(n,e,_){e.__d=void 0;for(var r=0;r<_.length;r++)B(_[r],_[++r],_[++r]);a.__c&&a.__c(e,n),n.some(function(o){try{n=o.__h,o.__h=[],n.some(function(l){l.call(o)})}catch(l){a.__e(l,o.__v)}})}function rn(n,e,_,r,o,l,s,f,p){var u,c,t,m,i,h,k,v=_.props,d=e.props,y=e.type;if(y==="svg"&&(o=!0),l!=null){for(u=0;u<l.length;u++)if((i=l[u])&&"setAttribute"in i==!!y&&(y?i.localName===y:i.nodeType===3)){n=i,l[u]=null;break}}if(n==null){if(y===null)return document.createTextNode(d);n=o?document.createElementNS("http://www.w3.org/2000/svg",y):document.createElement(y,d.is&&d),l=null,f=!1}if(y===null)v===d||f&&n.data===d||(n.data=d);else{if(l=l&&L.call(n.childNodes),v=_.props||C,!f&&l!=null)for(v={},u=0;u<n.attributes.length;u++)v[(i=n.attributes[u]).name]=i.value;for(u in v)i=v[u],u=="children"||(u=="dangerouslySetInnerHTML"?t=i:u==="key"||u in d||F(n,u,null,i,o));for(u in d)i=d[u],u=="children"?m=i:u=="dangerouslySetInnerHTML"?c=i:u=="value"?h=i:u=="checked"?k=i:u==="key"||f&&typeof i!="function"||v[u]===i||F(n,u,i,v[u],o);if(c)f||t&&(c.__html===t.__html||c.__html===n.innerHTML)||(n.innerHTML=c.__html),e.__k=[];else if(t&&(n.innerHTML=""),X(n,$(m)?m:[m],e,_,r,o&&y!=="foreignObject",l,s,l?l[0]:_.__k&&x(_,0),f,p),l!=null)for(u=l.length;u--;)l[u]!=null&&z(l[u]);f||(u="value",h!==void 0&&(h!==n[u]||y==="progress"&&!h||y==="option"&&h!==v[u])&&F(n,u,h,v[u],!1),u="checked",k!==void 0&&k!==n[u]&&F(n,u,k,v[u],!1))}return n}function B(n,e,_){try{typeof n=="function"?n(e):n.current=e}catch(r){a.__e(r,_)}}function I(n,e,_){var r,o;if(a.unmount&&a.unmount(n),(r=n.ref)&&(r.current&&r.current!==n.__e||B(r,null,e)),(r=n.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(l){a.__e(l,e)}r.base=r.__P=null,n.__c=void 0}if(r=n.__k)for(o=0;o<r.length;o++)r[o]&&I(r[o],e,_||typeof n.type!="function");_||n.__e==null||z(n.__e),n.__=n.__e=n.__d=void 0}function un(n,e,_){return this.constructor(n,_)}function sn(n,e,_){var r,o,l,s;a.__&&a.__(n,e),o=(r=typeof _=="function")?null:_&&_.__k||e.__k,l=[],s=[],R(e,n=(!r&&_||e).__k=J(W,null,[n]),o||C,C,e.ownerSVGElement!==void 0,!r&&_?[_]:o?null:e.firstChild?L.call(e.childNodes):null,l,!r&&_?_:o?o.__e:e.firstChild,r,s),_n(l,n,s)}L=q.slice,a={__e:function(n,e,_,r){for(var o,l,s;e=e.__;)if((o=e.__c)&&!o.__)try{if((l=o.constructor)&&l.getDerivedStateFromError!=null&&(o.setState(l.getDerivedStateFromError(n)),s=o.__d),o.componentDidCatch!=null&&(o.componentDidCatch(n,r||{}),s=o.__d),s)return o.__E=o}catch(f){n=f}throw n}},O=0,D.prototype.setState=function(n,e){var _;_=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=S({},this.state),typeof n=="function"&&(n=n(S({},_),this.props)),n&&S(_,n),n!=null&&this.__v&&(e&&this._sb.push(e),Q(this))},D.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),Q(this))},D.prototype.render=W,w=[],j=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,A=function(n,e){return n.__v.__b-e.__v.__b},N.__r=0;export{D as b,a as l,sn as q,J as y};