mirror of
https://github.com/imezx/Warp.git
synced 2025-04-24 23:20:02 +00:00
2 lines
11 KiB
JavaScript
2 lines
11 KiB
JavaScript
var n,l,t,u,i,o,r,e,f,c,a={},s=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,v=Array.isArray;function p(n,l){for(var t in l)n[t]=l[t];return n}function y(n){var l=n.parentNode;l&&l.removeChild(n)}function d(l,t,u){var i,o,r,e={};for(r in t)"key"==r?i=t[r]:"ref"==r?o=t[r]:e[r]=t[r];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):u),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===e[r]&&(e[r]=l.defaultProps[r]);return _(l,e,i,o,null)}function _(n,u,i,o,r){var e={type:n,props:u,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++t:r,__i:-1,__u:0};return null==r&&null!=l.vnode&&l.vnode(e),e}function m(n){return n.children}function g(n,l){this.props=n,this.context=l}function b(n,l){if(null==l)return n.__?b(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?b(n):null}function k(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 k(n)}}function w(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!C.__r++||o!==l.debounceRendering)&&((o=l.debounceRendering)||r)(C)}function C(){var n,t,u,o,r,f,c,a,s;for(i.sort(e);n=i.shift();)n.__d&&(t=i.length,o=void 0,f=(r=(u=n).__v).__e,a=[],s=[],(c=u.__P)&&((o=p({},r)).__v=r.__v+1,l.vnode&&l.vnode(o),T(c,o,r,u.__n,void 0!==c.ownerSVGElement,32&r.__u?[f]:null,a,null==f?b(r):f,!!(32&r.__u),s),o.__.__k[o.__i]=o,D(a,o,s),o.__e!=f&&k(o)),i.length>t&&i.sort(e));C.__r=0}function x(n,l,t,u,i,o,r,e,f,c,h){var v,p,y,d,_,m=u&&u.__k||s,g=l.length;for(t.__d=f,P(t,l,m),f=t.__d,v=0;v<g;v++)null!=(y=t.__k[v])&&"boolean"!=typeof y&&"function"!=typeof y&&(p=-1===y.__i?a:m[y.__i]||a,y.__i=v,T(n,y,p,i,o,r,e,f,c,h),d=y.__e,y.ref&&p.ref!=y.ref&&(p.ref&&M(p.ref,null,y),h.push(y.ref,y.__c||d,y)),null==_&&null!=d&&(_=d),65536&y.__u||p.__k===y.__k?f=S(y,f,n):"function"==typeof y.type&&void 0!==y.__d?f=y.__d:d&&(f=d.nextSibling),y.__d=void 0,y.__u&=-196609);t.__d=f,t.__e=_}function P(n,l,t){var u,i,o,r,e,f=l.length,c=t.length,a=c,s=0;for(n.__k=[],u=0;u<f;u++)null!=(i=n.__k[u]=null==(i=l[u])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?_(null,i,null,null,i):v(i)?_(m,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?_(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=n,i.__b=n.__b+1,e=$(i,t,r=u+s,a),i.__i=e,o=null,-1!==e&&(a--,(o=t[e])&&(o.__u|=131072)),null==o||null===o.__v?(-1==e&&s--,"function"!=typeof i.type&&(i.__u|=65536)):e!==r&&(e===r+1?s++:e>r?a>f-r?s+=e-r:s--:s=e<r&&e==r-1?e-r:0,e!==u+s&&(i.__u|=65536))):(o=t[u])&&null==o.key&&o.__e&&(o.__e==n.__d&&(n.__d=b(o)),j(o,o,!1),t[u]=null,a--);if(a)for(u=0;u<c;u++)null!=(o=t[u])&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=b(o)),j(o,o))}function S(n,l,t){var u,i;if("function"==typeof n.type){for(u=n.__k,i=0;u&&i<u.length;i++)u[i]&&(u[i].__=n,l=S(u[i],l,t));return l}return n.__e!=l&&(t.insertBefore(n.__e,l||null),l=n.__e),l&&l.nextSibling}function $(n,l,t,u){var i=n.key,o=n.type,r=t-1,e=t+1,f=l[t];if(null===f||f&&i==f.key&&o===f.type)return t;if(u>(null!=f&&0==(131072&f.__u)?1:0))for(;r>=0||e<l.length;){if(r>=0){if((f=l[r])&&0==(131072&f.__u)&&i==f.key&&o===f.type)return r;r--}if(e<l.length){if((f=l[e])&&0==(131072&f.__u)&&i==f.key&&o===f.type)return e;e++}}return-1}function A(n,l,t){"-"===l[0]?n.setProperty(l,null==t?"":t):n[l]=null==t?"":"number"!=typeof t||h.test(l)?t:t+"px"}function E(n,l,t,u,i){var o;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||A(n.style,l,"");if(t)for(l in t)u&&t[l]===u[l]||A(n.style,l,t[l])}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/(PointerCapture)$|Capture$/,"$1")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=t,t?u?t.t=u.t:(t.t=Date.now(),n.addEventListener(l,o?I:H,o)):n.removeEventListener(l,o?I:H,o);else{if(i)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&&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,t))}}function H(n){var t=this.l[n.type+!1];if(n.u){if(n.u<=t.t)return}else n.u=Date.now();return t(l.event?l.event(n):n)}function I(n){return this.l[n.type+!0](l.event?l.event(n):n)}function T(n,t,u,i,o,r,e,f,c,a){var s,h,y,d,_,b,k,w,C,P,S,$,A,E,H,I=t.type;if(void 0!==t.constructor)return null;128&u.__u&&(c=!!(32&u.__u),r=[f=t.__e=u.__e]),(s=l.__b)&&s(t);n:if("function"==typeof I)try{if(w=t.props,C=(s=I.contextType)&&i[s.__c],P=s?C?C.props.value:s.__:i,u.__c?k=(h=t.__c=u.__c).__=h.__E:("prototype"in I&&I.prototype.render?t.__c=h=new I(w,P):(t.__c=h=new g(w,P),h.constructor=I,h.render=z),C&&C.sub(h),h.props=w,h.state||(h.state={}),h.context=P,h.__n=i,y=h.__d=!0,h.__h=[],h._sb=[]),null==h.__s&&(h.__s=h.state),null!=I.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=p({},h.__s)),p(h.__s,I.getDerivedStateFromProps(w,h.__s))),d=h.props,_=h.state,h.__v=t,y)null==I.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==I.getDerivedStateFromProps&&w!==d&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(w,P),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(w,h.__s,P)||t.__v===u.__v)){for(t.__v!==u.__v&&(h.props=w,h.state=h.__s,h.__d=!1),t.__e=u.__e,t.__k=u.__k,t.__k.forEach(function(n){n&&(n.__=t)}),S=0;S<h._sb.length;S++)h.__h.push(h._sb[S]);h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(w,h.__s,P),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(d,_,b)})}if(h.context=P,h.props=w,h.__P=n,h.__e=!1,$=l.__r,A=0,"prototype"in I&&I.prototype.render){for(h.state=h.__s,h.__d=!1,$&&$(t),s=h.render(h.props,h.state,h.context),E=0;E<h._sb.length;E++)h.__h.push(h._sb[E]);h._sb=[]}else do{h.__d=!1,$&&$(t),s=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++A<25);h.state=h.__s,null!=h.getChildContext&&(i=p(p({},i),h.getChildContext())),y||null==h.getSnapshotBeforeUpdate||(b=h.getSnapshotBeforeUpdate(d,_)),x(n,v(H=null!=s&&s.type===m&&null==s.key?s.props.children:s)?H:[H],t,u,i,o,r,e,f,c,a),h.base=t.__e,t.__u&=-161,h.__h.length&&e.push(h),k&&(h.__E=h.__=null)}catch(n){t.__v=null,c||null!=r?(t.__e=f,t.__u|=c?160:32,r[r.indexOf(f)]=null):(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):t.__e=L(u.__e,t,u,i,o,r,e,c,a);(s=l.diffed)&&s(t)}function D(n,t,u){t.__d=void 0;for(var i=0;i<u.length;i++)M(u[i],u[++i],u[++i]);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 L(l,t,u,i,o,r,e,f,c){var s,h,p,d,_,m,g,k=u.props,w=t.props,C=t.type;if("svg"===C&&(o=!0),null!=r)for(s=0;s<r.length;s++)if((_=r[s])&&"setAttribute"in _==!!C&&(C?_.localName===C:3===_.nodeType)){l=_,r[s]=null;break}if(null==l){if(null===C)return document.createTextNode(w);l=o?document.createElementNS("http://www.w3.org/2000/svg",C):document.createElement(C,w.is&&w),r=null,f=!1}if(null===C)k===w||f&&l.data===w||(l.data=w);else{if(r=r&&n.call(l.childNodes),k=u.props||a,!f&&null!=r)for(k={},s=0;s<l.attributes.length;s++)k[(_=l.attributes[s]).name]=_.value;for(s in k)_=k[s],"children"==s||("dangerouslySetInnerHTML"==s?p=_:"key"===s||s in w||E(l,s,null,_,o));for(s in w)_=w[s],"children"==s?d=_:"dangerouslySetInnerHTML"==s?h=_:"value"==s?m=_:"checked"==s?g=_:"key"===s||f&&"function"!=typeof _||k[s]===_||E(l,s,_,k[s],o);if(h)f||p&&(h.__html===p.__html||h.__html===l.innerHTML)||(l.innerHTML=h.__html),t.__k=[];else if(p&&(l.innerHTML=""),x(l,v(d)?d:[d],t,u,i,o&&"foreignObject"!==C,r,e,r?r[0]:u.__k&&b(u,0),f,c),null!=r)for(s=r.length;s--;)null!=r[s]&&y(r[s]);f||(s="value",void 0!==m&&(m!==l[s]||"progress"===C&&!m||"option"===C&&m!==k[s])&&E(l,s,m,k[s],!1),s="checked",void 0!==g&&g!==l[s]&&E(l,s,g,k[s],!1))}return l}function M(n,t,u){try{"function"==typeof n?n(t):n.current=t}catch(n){l.__e(n,u)}}function j(n,t,u){var i,o;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||M(i,null,t)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,t)}i.base=i.__P=null,n.__c=void 0}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&j(i[o],t,u||"function"!=typeof n.type);u||null==n.__e||y(n.__e),n.__=n.__e=n.__d=void 0}function z(n,l,t){return this.constructor(n,t)}function F(t,u,i){var o,r,e,f;l.__&&l.__(t,u),r=(o="function"==typeof i)?null:i&&i.__k||u.__k,e=[],f=[],T(u,t=(!o&&i||u).__k=d(m,null,[t]),r||a,a,void 0!==u.ownerSVGElement,!o&&i?[i]:r?null:u.firstChild?n.call(u.childNodes):null,e,!o&&i?i:r?r.__e:u.firstChild,o,f),D(e,t,f)}n=s.slice,l={__e:function(n,l,t,u){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,u||{}),r=i.__d),r)return i.__E=i}catch(l){n=l}throw n}},t=0,u=function(n){return null!=n&&null==n.constructor},g.prototype.setState=function(n,l){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=p({},this.state),"function"==typeof n&&(n=n(p({},t),this.props)),n&&p(t,n),null!=n&&this.__v&&(l&&this._sb.push(l),w(this))},g.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),w(this))},g.prototype.render=m,i=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},C.__r=0,f=0,c={__proto__:null,render:F,hydrate:function n(l,t){F(l,t,n)},createElement:d,h:d,Fragment:m,createRef:function(){return{current:null}},isValidElement:u,Component:g,cloneElement:function(l,t,u){var i,o,r,e,f=p({},l.props);for(r in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),t)"key"==r?i=t[r]:"ref"==r?o=t[r]:f[r]=void 0===t[r]&&void 0!==e?e[r]:t[r];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):u),_(l.type,f,i||l.key,o||l.ref,null)},createContext:function(n,l){var t={__c:l="__cC"+f++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var t,u;return this.getChildContext||(t=[],(u={})[l]=this,this.getChildContext=function(){return u},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&t.some(function(n){n.__e=!0,w(n)})},this.sub=function(n){t.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){t.splice(t.indexOf(n),1),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||(v(l)?l.some(function(l){n(l,t)}):t.push(l)),t},options:l},typeof module<"u"?module.exports=c:self.preact=c;
|
|
//# sourceMappingURL=preact.min.module.js.map
|