| 12 |
- !function(n){"function"==typeof define&&define.amd?define(n):n()}(function(){var n,l,t,u,e,i,r,o,f,c,s,a,h,p,y="http://www.w3.org/2000/svg",v="http://www.w3.org/1999/xhtml",d=void 0,_={},w=[],m=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function b(n,l){for(var t in l)n[t]=l[t];return n}function k(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function C(l,t,u){var e,i,r,o={};for(r in t)"key"==r?e=t[r]:"ref"==r?i=t[r]:o[r]=t[r];if(arguments.length>2&&(o.children=arguments.length>3?n.call(arguments,2):u),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)o[r]===d&&(o[r]=l.defaultProps[r]);return x(l,o,e,i,null)}function x(n,u,e,i,r){var o={type:n,props:u,key:e,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:d,__v:null==r?++t:r,__i:-1,__u:0};return null==r&&null!=l.vnode&&l.vnode(o),o}function S(n){return n.children}function M(n,l){this.props=n,this.context=l}function P(n,l){if(null==l)return n.__?P(n.__,n.__i+1):null;for(var t;l<n.__k.length;l++)if(null!=(t=n.__k[l])&&null!=t.__e)return t.__e;return"function"==typeof n.type?P(n):null}function $(n){var l,t;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(t=n.__k[l])&&null!=t.__e){n.__e=n.__c.base=t.__e;break}return $(n)}}function A(n){(!n.__d&&(n.__d=!0)&&e.push(n)&&!I.__r++||i!==l.debounceRendering)&&((i=l.debounceRendering)||r)(I)}function I(){var n,t,u,i,r,f,c,s;for(e.sort(o);n=e.shift();)n.__d&&(t=e.length,i=void 0,f=(r=(u=n).__v).__e,c=[],s=[],u.__P&&((i=b({},r)).__v=r.__v+1,l.vnode&&l.vnode(i),j(u.__P,i,r,u.__n,u.__P.namespaceURI,32&r.__u?[f]:null,c,null==f?P(r):f,!!(32&r.__u),s),i.__v=r.__v,i.__.__k[i.__i]=i,z(c,i,s),i.__e!=f&&$(i)),e.length>t&&e.sort(o));I.__r=0}function E(n,l,t,u,e,i,r,o,f,c,s){var a,h,p,y,v,m,g=u&&u.__k||w,b=l.length;for(f=F(t,l,g,f,b),a=0;a<b;a++)null!=(p=t.__k[a])&&(h=-1===p.__i?_:g[p.__i]||_,p.__i=a,m=j(n,p,h,e,i,r,o,f,c,s),y=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&R(h.ref,null,p),s.push(p.ref,p.__c||y,p)),null==v&&null!=y&&(v=y),4&p.__u||h.__k===p.__k?f=H(p,f,n):"function"==typeof p.type&&m!==d?f=m:y&&(f=y.nextSibling),p.__u&=-7);return t.__e=v,f}function F(n,l,t,u,e){var i,r,o,f,c,s=t.length,a=s,h=0;for(n.__k=new Array(e),i=0;i<e;i++)null!=(r=l[i])&&"boolean"!=typeof r&&"function"!=typeof r?(f=i+h,(r=n.__k[i]="string"==typeof r||"number"==typeof r||"bigint"==typeof r||r.constructor==String?x(null,r,null,null,null):g(r)?x(S,{children:r},null,null,null):r.constructor===d&&r.__b>0?x(r.type,r.props,r.key,r.ref?r.ref:null,r.__v):r).__=n,r.__b=n.__b+1,o=null,-1!==(c=r.__i=L(r,t,f,a))&&(a--,(o=t[c])&&(o.__u|=2)),null==o||null===o.__v?(-1==c&&h--,"function"!=typeof r.type&&(r.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,r.__u|=4))):n.__k[i]=null;if(a)for(i=0;i<s;i++)null!=(o=t[i])&&0==(2&o.__u)&&(o.__e==u&&(u=P(o)),q(o,o));return u}function H(n,l,t){var u,e;if("function"==typeof n.type){for(u=n.__k,e=0;u&&e<u.length;e++)u[e]&&(u[e].__=n,l=H(u[e],l,t));return l}n.__e!=l&&(l&&n.type&&!t.contains(l)&&(l=P(n)),t.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8==l.nodeType);return l}function L(n,l,t,u){var e,i,r=n.key,o=n.type,f=l[t];if(null===f||f&&r==f.key&&o===f.type&&0==(2&f.__u))return t;if(u>(null!=f&&0==(2&f.__u)?1:0))for(e=t-1,i=t+1;e>=0||i<l.length;){if(e>=0){if((f=l[e])&&0==(2&f.__u)&&r==f.key&&o===f.type)return e;e--}if(i<l.length){if((f=l[i])&&0==(2&f.__u)&&r==f.key&&o===f.type)return i;i++}}return-1}function T(n,l,t){"-"==l[0]?n.setProperty(l,null==t?"":t):n[l]=null==t?"":"number"!=typeof t||m.test(l)?t:t+"px"}function O(n,l,t,u,e){var i;n:if("style"==l)if("string"==typeof t)n.style.cssText=t;else{if("string"==typeof u&&(n.style.cssText=u=""),u)for(l in u)t&&l in t||T(n.style,l,"");if(t)for(l in t)u&&t[l]===u[l]||T(n.style,l,t[l])}else if("o"==l[0]&&"n"==l[1])i=l!=(l=l.replace(f,"$1")),l=l.toLowerCase()in n||"onFocusOut"==l||"onFocusIn"==l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+i]=t,t?u?t.t=u.t:(t.t=c,n.addEventListener(l,i?a:s,i)):n.removeEventListener(l,i?a:s,i);else{if(e==y)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{n[l]=null==t?"":t;break n}catch(n){}"function"==typeof t||(null==t||!1===t&&"-"!=l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==t?"":t))}}function V(n){return function(t){if(this.l){var u=this.l[t.type+n];if(null==t.u)t.u=c++;else if(t.u<u.t)return;return u(l.event?l.event(t):t)}}}function j(n,t,u,e,i,r,o,f,c,s){var a,h,p,y,v,_,w,m,C,x,P,$,A,I,F,H,L,T=t.type;if(t.constructor!==d)return null;128&u.__u&&(c=!!(32&u.__u),r=[f=t.__e=u.__e]),(a=l.__b)&&a(t);n:if("function"==typeof T)try{if(m=t.props,C="prototype"in T&&T.prototype.render,x=(a=T.contextType)&&e[a.__c],P=a?x?x.props.value:a.__:e,u.__c?w=(h=t.__c=u.__c).__=h.__E:(C?t.__c=h=new T(m,P):(t.__c=h=new M(m,P),h.constructor=T,h.render=B),x&&x.sub(h),h.props=m,h.state||(h.state={}),h.context=P,h.__n=e,p=h.__d=!0,h.__h=[],h._sb=[]),C&&null==h.__s&&(h.__s=h.state),C&&null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=b({},h.__s)),b(h.__s,T.getDerivedStateFromProps(m,h.__s))),y=h.props,v=h.state,h.__v=t,p)C&&null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),C&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(C&&null==T.getDerivedStateFromProps&&m!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,P),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,P)||t.__v==u.__v)){for(t.__v!=u.__v&&(h.props=m,h.state=h.__s,h.__d=!1),t.__e=u.__e,t.__k=u.__k,t.__k.some(function(n){n&&(n.__=t)}),$=0;$<h._sb.length;$++)h.__h.push(h._sb[$]);h._sb=[],h.__h.length&&o.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,P),C&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,v,_)})}if(h.context=P,h.props=m,h.__P=n,h.__e=!1,A=l.__r,I=0,C){for(h.state=h.__s,h.__d=!1,A&&A(t),a=h.render(h.props,h.state,h.context),F=0;F<h._sb.length;F++)h.__h.push(h._sb[F]);h._sb=[]}else do{h.__d=!1,A&&A(t),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++I<25);h.state=h.__s,null!=h.getChildContext&&(e=b(b({},e),h.getChildContext())),C&&!p&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(y,v)),f=E(n,g(H=null!=a&&a.type===S&&null==a.key?a.props.children:a)?H:[H],t,u,e,i,r,o,f,c,s),h.base=t.__e,t.__u&=-161,h.__h.length&&o.push(h),w&&(h.__E=h.__=null)}catch(n){if(t.__v=null,c||null!=r)if(n.then){for(t.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;r[r.indexOf(f)]=null,t.__e=f}else for(L=r.length;L--;)k(r[L]);else t.__e=u.__e,t.__k=u.__k;l.__e(n,t,u)}else null==r&&t.__v==u.__v?(t.__k=u.__k,t.__e=u.__e):f=t.__e=N(u.__e,t,u,e,i,r,o,c,s);return(a=l.diffed)&&a(t),128&t.__u?void 0:f}function z(n,t,u){for(var e=0;e<u.length;e++)R(u[e],u[++e],u[++e]);l.__c&&l.__c(t,n),n.some(function(t){try{n=t.__h,t.__h=[],n.some(function(n){n.call(t)})}catch(n){l.__e(n,t.__v)}})}function N(t,u,e,i,r,o,f,c,s){var a,h,p,w,m,b,C,x=e.props,S=u.props,M=u.type;if("svg"==M?r=y:"math"==M?r="http://www.w3.org/1998/Math/MathML":r||(r=v),null!=o)for(a=0;a<o.length;a++)if((m=o[a])&&"setAttribute"in m==!!M&&(M?m.localName==M:3==m.nodeType)){t=m,o[a]=null;break}if(null==t){if(null==M)return document.createTextNode(S);t=document.createElementNS(r,M,S.is&&S),c&&(l.__m&&l.__m(u,o),c=!1),o=null}if(null===M)x===S||c&&t.data===S||(t.data=S);else{if(o=o&&n.call(t.childNodes),x=e.props||_,!c&&null!=o)for(x={},a=0;a<t.attributes.length;a++)x[(m=t.attributes[a]).name]=m.value;for(a in x)if(m=x[a],"children"==a);else if("dangerouslySetInnerHTML"==a)p=m;else if(!(a in S)){if("value"==a&&"defaultValue"in S||"checked"==a&&"defaultChecked"in S)continue;O(t,a,null,m,r)}for(a in S)m=S[a],"children"==a?w=m:"dangerouslySetInnerHTML"==a?h=m:"value"==a?b=m:"checked"==a?C=m:c&&"function"!=typeof m||x[a]===m||O(t,a,m,x[a],r);if(h)c||p&&(h.__html===p.__html||h.__html===t.innerHTML)||(t.innerHTML=h.__html),u.__k=[];else if(p&&(t.innerHTML=""),E(t,g(w)?w:[w],u,e,i,"foreignObject"==M?v:r,o,f,o?o[0]:e.__k&&P(e,0),c,s),null!=o)for(a=o.length;a--;)k(o[a]);c||(a="value","progress"==M&&null==b?t.removeAttribute("value"):b!==d&&(b!==t[a]||"progress"==M&&!b||"option"==M&&b!==x[a])&&O(t,a,b,x[a],r),a="checked",C!==d&&C!==t[a]&&O(t,a,C,x[a],r))}return t}function R(n,t,u){try{if("function"==typeof n){var e="function"==typeof n.__u;e&&n.__u(),e&&null==t||(n.__u=n(t))}else n.current=t}catch(n){l.__e(n,u)}}function q(n,t,u){var e,i;if(l.unmount&&l.unmount(n),(e=n.ref)&&(e.current&&e.current!==n.__e||R(e,null,t)),null!=(e=n.__c)){if(e.componentWillUnmount)try{e.componentWillUnmount()}catch(n){l.__e(n,t)}e.base=e.__P=null}if(e=n.__k)for(i=0;i<e.length;i++)e[i]&&q(e[i],t,u||"function"!=typeof n.type);u||k(n.__e),n.__c=n.__=n.__e=d}function B(n,l,t){return this.constructor(n,t)}function D(t,u,e){var i,r,o,f;u==document&&(u=document.documentElement),l.__&&l.__(t,u),r=(i="function"==typeof e)?null:e&&e.__k||u.__k,o=[],f=[],j(u,t=(!i&&e||u).__k=C(S,null,[t]),r||_,_,u.namespaceURI,!i&&e?[e]:r?null:u.firstChild?n.call(u.childNodes):null,o,!i&&e?e:r?r.__e:u.firstChild,i,f),z(o,t,f)}n=w.slice,l={__e:function(n,l,t,u){for(var e,i,r;l=l.__;)if((e=l.__c)&&!e.__)try{if((i=e.constructor)&&null!=i.getDerivedStateFromError&&(e.setState(i.getDerivedStateFromError(n)),r=e.__d),null!=e.componentDidCatch&&(e.componentDidCatch(n,u||{}),r=e.__d),r)return e.__E=e}catch(l){n=l}throw n}},t=0,u=function(n){return null!=n&&n.constructor==d},M.prototype.setState=function(n,l){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=b({},this.state),"function"==typeof n&&(n=n(b({},t),this.props)),n&&b(t,n),null!=n&&this.__v&&(l&&this._sb.push(l),A(this))},M.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),A(this))},M.prototype.render=S,e=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,o=function(n,l){return n.__v.__b-l.__v.__b},I.__r=0,f=/(PointerCapture)$|Capture$/i,c=0,s=V(!1),a=V(!0),h=0,p={__proto__:null,render:D,hydrate:function n(l,t){D(l,t,n)},createElement:C,h:C,Fragment:S,createRef:function(){return{current:null}},isValidElement:u,Component:M,cloneElement:function(l,t,u){var e,i,r,o,f=b({},l.props);for(r in l.type&&l.type.defaultProps&&(o=l.type.defaultProps),t)"key"==r?e=t[r]:"ref"==r?i=t[r]:f[r]=t[r]===d&&o!==d?o[r]:t[r];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):u),x(l.type,f,e||l.key,i||l.ref,null)},createContext:function(n,l){var t={__c:l="__cC"+h++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var t,u;return this.getChildContext||(t=new Set,(u={})[l]=this,this.getChildContext=function(){return u},this.componentWillUnmount=function(){t=null},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&t.forEach(function(n){n.__e=!0,A(n)})},this.sub=function(n){t.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){t&&t.delete(n),l&&l.call(n)}}),n.children}};return t.Provider.__=t.Consumer.contextType=t},toChildArray:function n(l,t){return t=t||[],null==l||"boolean"==typeof l||(g(l)?l.some(function(l){n(l,t)}):t.push(l)),t},options:l},typeof module<"u"?module.exports=p:self.preact=p});
- //# sourceMappingURL=preact.min.umd.js.map
|