Files
website/node_modules/preact/dist/preact.min.module.js
2024-05-06 17:15:30 -04:00

3 lines
11 KiB
JavaScript

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