@fairfox/standalone-web
Version:
A single, standalone version of Preact, HTM and Preact Signals. No external dependencies, just one single file.
3 lines (2 loc) • 31.5 kB
JavaScript
var Q0,F,h0,E0,g,p0,a0,c0,l0,T0,U0,$0,o0,c={},e0=[],s1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,l=Array.isArray;function j(Y,X){for(var Z in X)Y[Z]=X[Z];return Y}function L0(Y){Y&&Y.parentNode&&Y.parentNode.removeChild(Y)}function P(Y,X,Z){var K,W,Q,G={};for(Q in X)Q=="key"?K=X[Q]:Q=="ref"?W=X[Q]:G[Q]=X[Q];if(arguments.length>2&&(G.children=arguments.length>3?Q0.call(arguments,2):Z),typeof Y=="function"&&Y.defaultProps!=null)for(Q in Y.defaultProps)G[Q]===void 0&&(G[Q]=Y.defaultProps[Q]);return Z0(Y,G,K,W,null)}function Z0(Y,X,Z,K,W){var Q={type:Y,props:X,key:Z,ref:K,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:W==null?++h0:W,__i:-1,__u:0};return W==null&&F.vnode!=null&&F.vnode(Q),Q}function P0(){return{current:null}}function R(Y){return Y.children}function L(Y,X){this.props=Y,this.context=X}function m(Y,X){if(X==null)return Y.__?m(Y.__,Y.__i+1):null;for(var Z;X<Y.__k.length;X++)if((Z=Y.__k[X])!=null&&Z.__e!=null)return Z.__e;return typeof Y.type=="function"?m(Y):null}function r0(Y){var X,Z;if((Y=Y.__)!=null&&Y.__c!=null){for(Y.__e=Y.__c.base=null,X=0;X<Y.__k.length;X++)if((Z=Y.__k[X])!=null&&Z.__e!=null){Y.__e=Y.__c.base=Z.__e;break}return r0(Y)}}function z0(Y){(!Y.__d&&(Y.__d=!0)&&g.push(Y)&&!K0.__r++||p0!=F.debounceRendering)&&((p0=F.debounceRendering)||a0)(K0)}function K0(){for(var Y,X,Z,K,W,Q,G,q=1;g.length;)g.length>q&&g.sort(c0),Y=g.shift(),q=g.length,Y.__d&&(Z=void 0,W=(K=(X=Y).__v).__e,Q=[],G=[],X.__P&&((Z=j({},K)).__v=K.__v+1,F.vnode&&F.vnode(Z),R0(X.__P,Z,K,X.__n,X.__P.namespaceURI,32&K.__u?[W]:null,Q,W==null?m(K):W,!!(32&K.__u),G),Z.__v=K.__v,Z.__.__k[Z.__i]=Z,t0(Q,Z,G),Z.__e!=W&&r0(Z)));K0.__r=0}function i0(Y,X,Z,K,W,Q,G,q,V,O,N){var J,D,A,E,w,T,U=K&&K.__k||e0,$=X.length;for(V=f1(Z,X,U,V,$),J=0;J<$;J++)(A=Z.__k[J])!=null&&(D=A.__i==-1?c:U[A.__i]||c,A.__i=J,T=R0(Y,A,D,W,Q,G,q,V,O,N),E=A.__e,A.ref&&D.ref!=A.ref&&(D.ref&&w0(D.ref,null,A),N.push(A.ref,A.__c||E,A)),w==null&&E!=null&&(w=E),4&A.__u||D.__k===A.__k?V=u0(A,V,Y):typeof A.type=="function"&&T!==void 0?V=T:E&&(V=E.nextSibling),A.__u&=-7);return Z.__e=w,V}function f1(Y,X,Z,K,W){var Q,G,q,V,O,N=Z.length,J=N,D=0;for(Y.__k=new Array(W),Q=0;Q<W;Q++)(G=X[Q])!=null&&typeof G!="boolean"&&typeof G!="function"?(V=Q+D,(G=Y.__k[Q]=typeof G=="string"||typeof G=="number"||typeof G=="bigint"||G.constructor==String?Z0(null,G,null,null,null):l(G)?Z0(R,{children:G},null,null,null):G.constructor==null&&G.__b>0?Z0(G.type,G.props,G.key,G.ref?G.ref:null,G.__v):G).__=Y,G.__b=Y.__b+1,q=null,(O=G.__i=h1(G,Z,V,J))!=-1&&(J--,(q=Z[O])&&(q.__u|=2)),q==null||q.__v==null?(O==-1&&(W>N?D--:W<N&&D++),typeof G.type!="function"&&(G.__u|=4)):O!=V&&(O==V-1?D--:O==V+1?D++:(O>V?D--:D++,G.__u|=4))):Y.__k[Q]=null;if(J)for(Q=0;Q<N;Q++)(q=Z[Q])!=null&&(2&q.__u)==0&&(q.__e==K&&(K=m(q)),X1(q,q));return K}function u0(Y,X,Z){var K,W;if(typeof Y.type=="function"){for(K=Y.__k,W=0;K&&W<K.length;W++)K[W]&&(K[W].__=Y,X=u0(K[W],X,Z));return X}Y.__e!=X&&(X&&Y.type&&!Z.contains(X)&&(X=m(Y)),Z.insertBefore(Y.__e,X||null),X=Y.__e);do X=X&&X.nextSibling;while(X!=null&&X.nodeType==8);return X}function o(Y,X){return X=X||[],Y==null||typeof Y=="boolean"||(l(Y)?Y.some(function(Z){o(Z,X)}):X.push(Y)),X}function h1(Y,X,Z,K){var W,Q,G,q=Y.key,V=Y.type,O=X[Z],N=O!=null&&(2&O.__u)==0;if(O===null&&Y.key==null||N&&q==O.key&&V==O.type)return Z;if(K>(N?1:0)){for(W=Z-1,Q=Z+1;W>=0||Q<X.length;)if((O=X[G=W>=0?W--:Q++])!=null&&(2&O.__u)==0&&q==O.key&&V==O.type)return G}return-1}function s0(Y,X,Z){X[0]=="-"?Y.setProperty(X,Z==null?"":Z):Y[X]=Z==null?"":typeof Z!="number"||s1.test(X)?Z:Z+"px"}function Y0(Y,X,Z,K,W){var Q,G;X:if(X=="style")if(typeof Z=="string")Y.style.cssText=Z;else{if(typeof K=="string"&&(Y.style.cssText=K=""),K)for(X in K)Z&&X in Z||s0(Y.style,X,"");if(Z)for(X in Z)K&&Z[X]==K[X]||s0(Y.style,X,Z[X])}else if(X[0]=="o"&&X[1]=="n")Q=X!=(X=X.replace(l0,"$1")),G=X.toLowerCase(),X=G in Y||X=="onFocusOut"||X=="onFocusIn"?G.slice(2):X.slice(2),Y.l||(Y.l={}),Y.l[X+Q]=Z,Z?K?Z.u=K.u:(Z.u=T0,Y.addEventListener(X,Q?$0:U0,Q)):Y.removeEventListener(X,Q?$0:U0,Q);else{if(W=="http://www.w3.org/2000/svg")X=X.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(X!="width"&&X!="height"&&X!="href"&&X!="list"&&X!="form"&&X!="tabIndex"&&X!="download"&&X!="rowSpan"&&X!="colSpan"&&X!="role"&&X!="popover"&&X in Y)try{Y[X]=Z==null?"":Z;break X}catch(q){}typeof Z=="function"||(Z==null||Z===!1&&X[4]!="-"?Y.removeAttribute(X):Y.setAttribute(X,X=="popover"&&Z==1?"":Z))}}function f0(Y){return function(X){if(this.l){var Z=this.l[X.type+Y];if(X.t==null)X.t=T0++;else if(X.t<Z.u)return;return Z(F.event?F.event(X):X)}}}function R0(Y,X,Z,K,W,Q,G,q,V,O){var N,J,D,A,E,w,T,U,$,f,_,n,h,d0,X0,a,H0,M=X.type;if(X.constructor!=null)return null;128&Z.__u&&(V=!!(32&Z.__u),Q=[q=X.__e=Z.__e]),(N=F.__b)&&N(X);X:if(typeof M=="function")try{if(U=X.props,$="prototype"in M&&M.prototype.render,f=(N=M.contextType)&&K[N.__c],_=N?f?f.props.value:N.__:K,Z.__c?T=(J=X.__c=Z.__c).__=J.__E:($?X.__c=J=new M(U,_):(X.__c=J=new L(U,_),J.constructor=M,J.render=c1),f&&f.sub(J),J.props=U,J.state||(J.state={}),J.context=_,J.__n=K,D=J.__d=!0,J.__h=[],J._sb=[]),$&&J.__s==null&&(J.__s=J.state),$&&M.getDerivedStateFromProps!=null&&(J.__s==J.state&&(J.__s=j({},J.__s)),j(J.__s,M.getDerivedStateFromProps(U,J.__s))),A=J.props,E=J.state,J.__v=X,D)$&&M.getDerivedStateFromProps==null&&J.componentWillMount!=null&&J.componentWillMount(),$&&J.componentDidMount!=null&&J.__h.push(J.componentDidMount);else{if($&&M.getDerivedStateFromProps==null&&U!==A&&J.componentWillReceiveProps!=null&&J.componentWillReceiveProps(U,_),!J.__e&&J.shouldComponentUpdate!=null&&J.shouldComponentUpdate(U,J.__s,_)===!1||X.__v==Z.__v){for(X.__v!=Z.__v&&(J.props=U,J.state=J.__s,J.__d=!1),X.__e=Z.__e,X.__k=Z.__k,X.__k.some(function(y){y&&(y.__=X)}),n=0;n<J._sb.length;n++)J.__h.push(J._sb[n]);J._sb=[],J.__h.length&&G.push(J);break X}J.componentWillUpdate!=null&&J.componentWillUpdate(U,J.__s,_),$&&J.componentDidUpdate!=null&&J.__h.push(function(){J.componentDidUpdate(A,E,w)})}if(J.context=_,J.props=U,J.__P=Y,J.__e=!1,h=F.__r,d0=0,$){for(J.state=J.__s,J.__d=!1,h&&h(X),N=J.render(J.props,J.state,J.context),X0=0;X0<J._sb.length;X0++)J.__h.push(J._sb[X0]);J._sb=[]}else do J.__d=!1,h&&h(X),N=J.render(J.props,J.state,J.context),J.state=J.__s;while(J.__d&&++d0<25);J.state=J.__s,J.getChildContext!=null&&(K=j(j({},K),J.getChildContext())),$&&!D&&J.getSnapshotBeforeUpdate!=null&&(w=J.getSnapshotBeforeUpdate(A,E)),a=N,N!=null&&N.type===R&&N.key==null&&(a=n0(N.props.children)),q=i0(Y,l(a)?a:[a],X,Z,K,W,Q,G,q,V,O),J.base=X.__e,X.__u&=-161,J.__h.length&&G.push(J),T&&(J.__E=J.__=null)}catch(y){if(X.__v=null,V||Q!=null)if(y.then){for(X.__u|=V?160:128;q&&q.nodeType==8&&q.nextSibling;)q=q.nextSibling;Q[Q.indexOf(q)]=null,X.__e=q}else{for(H0=Q.length;H0--;)L0(Q[H0]);B0(X)}else X.__e=Z.__e,X.__k=Z.__k,y.then||B0(X);F.__e(y,X,Z)}else Q==null&&X.__v==Z.__v?(X.__k=Z.__k,X.__e=Z.__e):q=X.__e=a1(Z.__e,X,Z,K,W,Q,G,V,O);return(N=F.diffed)&&N(X),128&X.__u?void 0:q}function B0(Y){Y&&Y.__c&&(Y.__c.__e=!0),Y&&Y.__k&&Y.__k.forEach(B0)}function t0(Y,X,Z){for(var K=0;K<Z.length;K++)w0(Z[K],Z[++K],Z[++K]);F.__c&&F.__c(X,Y),Y.some(function(W){try{Y=W.__h,W.__h=[],Y.some(function(Q){Q.call(W)})}catch(Q){F.__e(Q,W.__v)}})}function n0(Y){return typeof Y!="object"||Y==null||Y.__b&&Y.__b>0?Y:l(Y)?Y.map(n0):j({},Y)}function a1(Y,X,Z,K,W,Q,G,q,V){var O,N,J,D,A,E,w,T=Z.props,U=X.props,$=X.type;if($=="svg"?W="http://www.w3.org/2000/svg":$=="math"?W="http://www.w3.org/1998/Math/MathML":W||(W="http://www.w3.org/1999/xhtml"),Q!=null){for(O=0;O<Q.length;O++)if((A=Q[O])&&"setAttribute"in A==!!$&&($?A.localName==$:A.nodeType==3)){Y=A,Q[O]=null;break}}if(Y==null){if($==null)return document.createTextNode(U);Y=document.createElementNS(W,$,U.is&&U),q&&(F.__m&&F.__m(X,Q),q=!1),Q=null}if($==null)T===U||q&&Y.data==U||(Y.data=U);else{if(Q=Q&&Q0.call(Y.childNodes),T=Z.props||c,!q&&Q!=null)for(T={},O=0;O<Y.attributes.length;O++)T[(A=Y.attributes[O]).name]=A.value;for(O in T)if(A=T[O],O=="children");else if(O=="dangerouslySetInnerHTML")J=A;else if(!(O in U)){if(O=="value"&&"defaultValue"in U||O=="checked"&&"defaultChecked"in U)continue;Y0(Y,O,null,A,W)}for(O in U)A=U[O],O=="children"?D=A:O=="dangerouslySetInnerHTML"?N=A:O=="value"?E=A:O=="checked"?w=A:q&&typeof A!="function"||T[O]===A||Y0(Y,O,A,T[O],W);if(N)q||J&&(N.__html==J.__html||N.__html==Y.innerHTML)||(Y.innerHTML=N.__html),X.__k=[];else if(J&&(Y.innerHTML=""),i0(X.type=="template"?Y.content:Y,l(D)?D:[D],X,Z,K,$=="foreignObject"?"http://www.w3.org/1999/xhtml":W,Q,G,Q?Q[0]:Z.__k&&m(Z,0),q,V),Q!=null)for(O=Q.length;O--;)L0(Q[O]);q||(O="value",$=="progress"&&E==null?Y.removeAttribute("value"):E!=null&&(E!==Y[O]||$=="progress"&&!E||$=="option"&&E!=T[O])&&Y0(Y,O,E,T[O],W),O="checked",w!=null&&w!=Y[O]&&Y0(Y,O,w,T[O],W))}return Y}function w0(Y,X,Z){try{if(typeof Y=="function"){var K=typeof Y.__u=="function";K&&Y.__u(),K&&X==null||(Y.__u=Y(X))}else Y.current=X}catch(W){F.__e(W,Z)}}function X1(Y,X,Z){var K,W;if(F.unmount&&F.unmount(Y),(K=Y.ref)&&(K.current&&K.current!=Y.__e||w0(K,null,X)),(K=Y.__c)!=null){if(K.componentWillUnmount)try{K.componentWillUnmount()}catch(Q){F.__e(Q,X)}K.base=K.__P=null}if(K=Y.__k)for(W=0;W<K.length;W++)K[W]&&X1(K[W],X,Z||typeof Y.type!="function");Z||L0(Y.__e),Y.__c=Y.__=Y.__e=void 0}function c1(Y,X,Z){return this.constructor(Y,Z)}function e(Y,X,Z){var K,W,Q,G;X==document&&(X=document.documentElement),F.__&&F.__(Y,X),W=(K=typeof Z=="function")?null:Z&&Z.__k||X.__k,Q=[],G=[],R0(X,Y=(!K&&Z||X).__k=P(R,null,[Y]),W||c,c,X.namespaceURI,!K&&Z?[Z]:W?null:X.firstChild?Q0.call(X.childNodes):null,Q,!K&&Z?Z:W?W.__e:X.firstChild,K,G),t0(Q,Y,G)}function M0(Y,X){e(Y,X,M0)}function v0(Y){function X(Z){var K,W;return this.getChildContext||(K=new Set,(W={})[X.__c]=this,this.getChildContext=function(){return W},this.componentWillUnmount=function(){K=null},this.shouldComponentUpdate=function(Q){this.props.value!=Q.value&&K.forEach(function(G){G.__e=!0,z0(G)})},this.sub=function(Q){K.add(Q);var G=Q.componentWillUnmount;Q.componentWillUnmount=function(){K&&K.delete(Q),G&&G.call(Q)}}),Z.children}return X.__c="__cC"+o0++,X.__=Y,X.Provider=X.__l=(X.Consumer=function(Z,K){return Z.children(K)}).contextType=X,X}Q0=e0.slice,F={__e:function(Y,X,Z,K){for(var W,Q,G;X=X.__;)if((W=X.__c)&&!W.__)try{if((Q=W.constructor)&&Q.getDerivedStateFromError!=null&&(W.setState(Q.getDerivedStateFromError(Y)),G=W.__d),W.componentDidCatch!=null&&(W.componentDidCatch(Y,K||{}),G=W.__d),G)return W.__E=W}catch(q){Y=q}throw Y}},h0=0,E0=function(Y){return Y!=null&&Y.constructor==null},L.prototype.setState=function(Y,X){var Z;Z=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=j({},this.state),typeof Y=="function"&&(Y=Y(j({},Z),this.props)),Y&&j(Z,Y),Y!=null&&this.__v&&(X&&this._sb.push(X),z0(this))},L.prototype.forceUpdate=function(Y){this.__v&&(this.__e=!0,Y&&this.__h.push(Y),z0(this))},L.prototype.render=R,g=[],a0=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c0=function(Y,X){return Y.__v.__b-X.__v.__b},K0.__r=0,l0=/(PointerCapture)$|Capture$/i,T0=0,U0=f0(!1),$0=f0(!0),o0=0;var C,H,j0,Y1,r=0,q1=[],z=F,Z1=z.__b,K1=z.__r,Q1=z.diffed,W1=z.__c,G1=z.unmount,J1=z.__;function S(Y,X){z.__h&&z.__h(H,Y,r||X),r=0;var Z=H.__H||(H.__H={__:[],__h:[]});return Y>=Z.__.length&&Z.__.push({}),Z.__[Y]}function V1(Y){return r=1,N1(H1,Y)}function N1(Y,X,Z){var K=S(C++,2);if(K.t=Y,!K.__c&&(K.__=[Z?Z(X):H1(void 0,X),function(q){var V=K.__N?K.__N[0]:K.__[0],O=K.t(V,q);V!==O&&(K.__N=[O,K.__[1]],K.__c.setState({}))}],K.__c=H,!H.__f)){var W=function(q,V,O){if(!K.__c.__H)return!0;var N=K.__c.__H.__.filter(function(D){return!!D.__c});if(N.every(function(D){return!D.__N}))return!Q||Q.call(this,q,V,O);var J=K.__c.props!==q;return N.forEach(function(D){if(D.__N){var A=D.__[0];D.__=D.__N,D.__N=void 0,A!==D.__[0]&&(J=!0)}}),Q&&Q.call(this,q,V,O)||J};H.__f=!0;var{shouldComponentUpdate:Q,componentWillUpdate:G}=H;H.componentWillUpdate=function(q,V,O){if(this.__e){var N=Q;Q=void 0,W(q,V,O),Q=N}G&&G.call(this,q,V,O)},H.shouldComponentUpdate=W}return K.__N||K.__}function G0(Y,X){var Z=S(C++,3);!z.__s&&x0(Z.__H,X)&&(Z.__=Y,Z.u=X,H.__H.__h.push(Z))}function A1(Y,X){var Z=S(C++,4);!z.__s&&x0(Z.__H,X)&&(Z.__=Y,Z.u=X,H.__h.push(Z))}function i(Y){return r=5,v(function(){return{current:Y}},[])}function v(Y,X){var Z=S(C++,7);return x0(Z.__H,X)&&(Z.__=Y(),Z.__H=X,Z.__h=Y),Z.__}function D1(Y,X){return r=8,v(function(){return Y},X)}function F1(Y){var X=H.context[Y.__c],Z=S(C++,9);return Z.c=Y,X?(Z.__==null&&(Z.__=!0,X.sub(H)),X.props.value):Y.__}function l1(Y){var X=S(C++,10),Z=V1();return X.__=Y,H.componentDidCatch||(H.componentDidCatch=function(K,W){X.__&&X.__(K,W),Z[1](K)}),[Z[0],function(){Z[1](void 0)}]}function I1(){var Y=S(C++,11);if(!Y.__){for(var X=H.__v;X!==null&&!X.__m&&X.__!==null;)X=X.__;var Z=X.__m||(X.__m=[0,0]);Y.__="P"+Z[0]+"-"+Z[1]++}return Y.__}function o1(){for(var Y;Y=q1.shift();)if(Y.__P&&Y.__H)try{Y.__H.__h.forEach(W0),Y.__H.__h.forEach(C0),Y.__H.__h=[]}catch(X){Y.__H.__h=[],z.__e(X,Y.__v)}}z.__b=function(Y){H=null,Z1&&Z1(Y)},z.__=function(Y,X){Y&&X.__k&&X.__k.__m&&(Y.__m=X.__k.__m),J1&&J1(Y,X)},z.__r=function(Y){K1&&K1(Y),C=0;var X=(H=Y.__c).__H;X&&(j0===H?(X.__h=[],H.__h=[],X.__.forEach(function(Z){Z.__N&&(Z.__=Z.__N),Z.u=Z.__N=void 0})):(X.__h.forEach(W0),X.__h.forEach(C0),X.__h=[],C=0)),j0=H},z.diffed=function(Y){Q1&&Q1(Y);var X=Y.__c;X&&X.__H&&(X.__H.__h.length&&(q1.push(X)!==1&&Y1===z.requestAnimationFrame||((Y1=z.requestAnimationFrame)||e1)(o1)),X.__H.__.forEach(function(Z){Z.u&&(Z.__H=Z.u),Z.u=void 0})),j0=H=null},z.__c=function(Y,X){X.some(function(Z){try{Z.__h.forEach(W0),Z.__h=Z.__h.filter(function(K){return!K.__||C0(K)})}catch(K){X.some(function(W){W.__h&&(W.__h=[])}),X=[],z.__e(K,Z.__v)}}),W1&&W1(Y,X)},z.unmount=function(Y){G1&&G1(Y);var X,Z=Y.__c;Z&&Z.__H&&(Z.__H.__.forEach(function(K){try{W0(K)}catch(W){X=W}}),Z.__H=void 0,X&&z.__e(X,Z.__v))};var O1=typeof requestAnimationFrame=="function";function e1(Y){var X,Z=function(){clearTimeout(K),O1&&cancelAnimationFrame(X),setTimeout(Y)},K=setTimeout(Z,35);O1&&(X=requestAnimationFrame(Z))}function W0(Y){var X=H,Z=Y.__c;typeof Z=="function"&&(Y.__c=void 0,Z()),H=X}function C0(Y){var X=H;Y.__c=Y.__(),H=X}function x0(Y,X){return!Y||Y.length!==X.length||X.some(function(Z,K){return Z!==Y[K]})}function H1(Y,X){return typeof X=="function"?X(Y):X}var r1=Symbol.for("preact-signals");function O0(){if(!(k>1)){var Y,X=!1;while(u!==void 0){var Z=u;u=void 0,_0++;while(Z!==void 0){var K=Z.o;if(Z.o=void 0,Z.f&=-3,!(8&Z.f)&&$1(Z))try{Z.c()}catch(W){if(!X)Y=W,X=!0}Z=K}}if(_0=0,k--,X)throw Y}else k--}function q0(Y){if(k>0)return Y();k++;try{return Y()}finally{O0()}}var I=void 0;function V0(Y){var X=I;I=void 0;try{return Y()}finally{I=X}}var u=void 0,k=0,_0=0,J0=0;function U1(Y){if(I!==void 0){var X=Y.n;if(X===void 0||X.t!==I){if(X={i:0,S:Y,p:I.s,n:void 0,t:I,e:void 0,x:void 0,r:X},I.s!==void 0)I.s.n=X;if(I.s=X,Y.n=X,32&I.f)Y.S(X);return X}else if(X.i===-1){if(X.i=0,X.n!==void 0){if(X.n.p=X.p,X.p!==void 0)X.p.n=X.n;X.p=I.s,X.n=void 0,I.s.n=X,I.s=X}return X}}}function B(Y,X){this.v=Y,this.i=0,this.n=void 0,this.t=void 0,this.W=X==null?void 0:X.watched,this.Z=X==null?void 0:X.unwatched}B.prototype.brand=r1;B.prototype.h=function(){return!0};B.prototype.S=function(Y){var X=this,Z=this.t;if(Z!==Y&&Y.e===void 0)if(Y.x=Z,this.t=Y,Z!==void 0)Z.e=Y;else V0(function(){var K;(K=X.W)==null||K.call(X)})};B.prototype.U=function(Y){var X=this;if(this.t!==void 0){var{e:Z,x:K}=Y;if(Z!==void 0)Z.x=K,Y.e=void 0;if(K!==void 0)K.e=Z,Y.x=void 0;if(Y===this.t){if(this.t=K,K===void 0)V0(function(){var W;(W=X.Z)==null||W.call(X)})}}};B.prototype.subscribe=function(Y){var X=this;return x(function(){var Z=X.value,K=I;I=void 0;try{Y(Z)}finally{I=K}})};B.prototype.valueOf=function(){return this.value};B.prototype.toString=function(){return this.value+""};B.prototype.toJSON=function(){return this.value};B.prototype.peek=function(){var Y=I;I=void 0;try{return this.value}finally{I=Y}};Object.defineProperty(B.prototype,"value",{get:function(){var Y=U1(this);if(Y!==void 0)Y.i=this.i;return this.v},set:function(Y){if(Y!==this.v){if(_0>100)throw new Error("Cycle detected");this.v=Y,this.i++,J0++,k++;try{for(var X=this.t;X!==void 0;X=X.x)X.t.N()}finally{O0()}}}});function t(Y,X){return new B(Y,X)}function $1(Y){for(var X=Y.s;X!==void 0;X=X.n)if(X.S.i!==X.i||!X.S.h()||X.S.i!==X.i)return!0;return!1}function z1(Y){for(var X=Y.s;X!==void 0;X=X.n){var Z=X.S.n;if(Z!==void 0)X.r=Z;if(X.S.n=X,X.i=-1,X.n===void 0){Y.s=X;break}}}function B1(Y){var X=Y.s,Z=void 0;while(X!==void 0){var K=X.p;if(X.i===-1){if(X.S.U(X),K!==void 0)K.n=X.n;if(X.n!==void 0)X.n.p=K}else Z=X;if(X.S.n=X.r,X.r!==void 0)X.r=void 0;X=K}Y.s=Z}function b(Y,X){B.call(this,void 0),this.x=Y,this.s=void 0,this.g=J0-1,this.f=4,this.W=X==null?void 0:X.watched,this.Z=X==null?void 0:X.unwatched}b.prototype=new B;b.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32)return!0;if(this.f&=-5,this.g===J0)return!0;if(this.g=J0,this.f|=1,this.i>0&&!$1(this))return this.f&=-2,!0;var Y=I;try{z1(this),I=this;var X=this.x();if(16&this.f||this.v!==X||this.i===0)this.v=X,this.f&=-17,this.i++}catch(Z){this.v=Z,this.f|=16,this.i++}return I=Y,B1(this),this.f&=-2,!0};b.prototype.S=function(Y){if(this.t===void 0){this.f|=36;for(var X=this.s;X!==void 0;X=X.n)X.S.S(X)}B.prototype.S.call(this,Y)};b.prototype.U=function(Y){if(this.t!==void 0){if(B.prototype.U.call(this,Y),this.t===void 0){this.f&=-33;for(var X=this.s;X!==void 0;X=X.n)X.S.U(X)}}};b.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(var Y=this.t;Y!==void 0;Y=Y.x)Y.t.N()}};Object.defineProperty(b.prototype,"value",{get:function(){if(1&this.f)throw new Error("Cycle detected");var Y=U1(this);if(this.h(),Y!==void 0)Y.i=this.i;if(16&this.f)throw this.v;return this.v}});function d(Y,X){return new b(Y,X)}function E1(Y){var X=Y.u;if(Y.u=void 0,typeof X=="function"){k++;var Z=I;I=void 0;try{X()}catch(K){throw Y.f&=-2,Y.f|=8,k0(Y),K}finally{I=Z,O0()}}}function k0(Y){for(var X=Y.s;X!==void 0;X=X.n)X.S.U(X);Y.x=void 0,Y.s=void 0,E1(Y)}function i1(Y){if(I!==this)throw new Error("Out-of-order effect");if(B1(this),I=Y,this.f&=-2,8&this.f)k0(this);O0()}function p(Y){this.x=Y,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32}p.prototype.c=function(){var Y=this.S();try{if(8&this.f)return;if(this.x===void 0)return;var X=this.x();if(typeof X=="function")this.u=X}finally{Y()}};p.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,E1(this),z1(this),k++;var Y=I;return I=this,i1.bind(this,Y)};p.prototype.N=function(){if(!(2&this.f))this.f|=2,this.o=u,u=this};p.prototype.d=function(){if(this.f|=8,!(1&this.f))k0(this)};p.prototype.dispose=function(){this.d()};function x(Y){var X=new p(Y);try{X.c()}catch(K){throw X.d(),K}var Z=X.d.bind(X);return Z[Symbol.dispose]=Z,Z}var S0,A0,g0,T1=[],L1=[];x(function(){S0=this.N})();function s(Y,X){F[Y]=X.bind(null,F[Y]||function(){})}function N0(Y){if(g0)g0();g0=Y&&Y.S()}function P1(Y){var X=this,Z=Y.data,K=D0(Z);K.value=Z;var W=v(function(){var q=X,V=X.__v;while(V=V.__)if(V.__c){V.__c.__$f|=4;break}var O=d(function(){var A=K.value.value;return A===0?0:A===!0?"":A||""}),N=d(function(){return!Array.isArray(O.value)&&!E0(O.value)}),J=x(function(){if(this.N=R1,N.value){var A=O.value;if(q.__v&&q.__v.__e&&q.__v.__e.nodeType===3)q.__v.__e.data=A}}),D=X.__$u.d;return X.__$u.d=function(){J(),D.call(this)},[N,O]},[]),Q=W[0],G=W[1];return Q.value?G.peek():G.value}P1.displayName="_st";Object.defineProperties(B.prototype,{constructor:{configurable:!0,value:void 0},type:{configurable:!0,value:P1},props:{configurable:!0,get:function(){return{data:this}}},__b:{configurable:!0,value:1}});s("__b",function(Y,X){if(typeof X.type=="string"){var Z,K=X.props;for(var W in K)if(W!=="children"){var Q=K[W];if(Q instanceof B){if(!Z)X.__np=Z={};Z[W]=Q,K[W]=Q.peek()}}}Y(X)});s("__r",function(Y,X){if(X.type!==R){N0();var Z,K=X.__c;if(K){if(K.__$f&=-2,(Z=K.__$u)===void 0)K.__$u=Z=function(W){var Q;return x(function(){Q=this}),Q.c=function(){K.__$f|=1,K.setState({})},Q}()}A0=K,N0(Z)}Y(X)});s("__e",function(Y,X,Z,K){N0(),A0=void 0,Y(X,Z,K)});s("diffed",function(Y,X){N0(),A0=void 0;var Z;if(typeof X.type=="string"&&(Z=X.__e)){var{__np:K,props:W}=X;if(K){var Q=Z.U;if(Q)for(var G in Q){var q=Q[G];if(q!==void 0&&!(G in K))q.d(),Q[G]=void 0}else Q={},Z.U=Q;for(var V in K){var O=Q[V],N=K[V];if(O===void 0)O=u1(Z,V,N,W),Q[V]=O;else O.o(N,W)}}}Y(X)});function u1(Y,X,Z,K){var W=X in Y&&Y.ownerSVGElement===void 0,Q=t(Z);return{o:function(G,q){Q.value=G,K=q},d:x(function(){this.N=R1;var G=Q.value.value;if(K[X]!==G)if(K[X]=G,W)Y[X]=G;else if(G)Y.setAttribute(X,G);else Y.removeAttribute(X)})}}s("unmount",function(Y,X){if(typeof X.type=="string"){var Z=X.__e;if(Z){var K=Z.U;if(K){Z.U=void 0;for(var W in K){var Q=K[W];if(Q)Q.d()}}}}else{var G=X.__c;if(G){var q=G.__$u;if(q)G.__$u=void 0,q.d()}}Y(X)});s("__h",function(Y,X,Z,K){if(K<3||K===9)X.__$f|=2;Y(X,Z,K)});L.prototype.shouldComponentUpdate=function(Y,X){var Z=this.__$u,K=Z&&Z.s!==void 0;for(var W in X)return!0;if(this.__f||typeof this.u=="boolean"&&this.u===!0){var Q=2&this.__$f;if(!(K||Q||4&this.__$f))return!0;if(1&this.__$f)return!0}else{if(!(K||4&this.__$f))return!0;if(3&this.__$f)return!0}for(var G in Y)if(G!=="__source"&&Y[G]!==this.props[G])return!0;for(var q in this.props)if(!(q in Y))return!0;return!1};function D0(Y,X){return v(function(){return t(Y,X)},[])}function t1(Y,X){var Z=i(Y);return Z.current=Y,A0.__$f|=4,v(function(){return d(function(){return Z.current()},X)},[])}var n1=typeof requestAnimationFrame=="undefined"?setTimeout:function(Y){var X=function(){clearTimeout(Z),cancelAnimationFrame(K),Y()},Z=setTimeout(X,35),K=requestAnimationFrame(X)},X2=function(Y){queueMicrotask(function(){queueMicrotask(Y)})};function Y2(){q0(function(){var Y;while(Y=T1.shift())S0.call(Y)})}function Z2(){if(T1.push(this)===1)(F.requestAnimationFrame||n1)(Y2)}function K2(){q0(function(){var Y;while(Y=L1.shift())S0.call(Y)})}function R1(){if(L1.push(this)===1)(F.requestAnimationFrame||X2)(K2)}function Q2(Y){var X=i(Y);X.current=Y,G0(function(){return x(function(){return this.N=Z2,X.current()})},[])}function W2(Y){var X=Y.when.value;if(!X)return Y.fallback||null;else return typeof Y.children=="function"?Y.children(X):Y.children}function G2(Y){var X=v(function(){return new Map},[]),Z=(typeof Y.each=="function"?Y.each():Y.each).value;if(!Z.length)return Y.fallback||null;var K=Z.map(function(W,Q){if(!X.has(W))X.set(W,Y.children(W,Q));return X.get(W)});return P(R,null,K)}function J2(Y){var X=D0(Y);if(!("current"in X))Object.defineProperty(X,"current",O2);return X}var O2={configurable:!0,get:function(){return this.value},set:function(Y){this.value=Y}};var M1=function(Y,X,Z,K){var W;X[0]=0;for(var Q=1;Q<X.length;Q++){var G=X[Q++],q=X[Q]?(X[0]|=G?1:2,Z[X[Q++]]):X[++Q];G===3?K[0]=q:G===4?K[1]=Object.assign(K[1]||{},q):G===5?(K[1]=K[1]||{})[X[++Q]]=q:G===6?K[1][X[++Q]]+=q+"":G?(W=Y.apply(q,M1(Y,q,Z,["",null])),K.push(W),q[0]?X[0]|=2:(X[Q-2]=0,X[Q]=W)):K.push(q)}return K},w1=new Map;function b0(Y){var X=w1.get(this);return X||(X=new Map,w1.set(this,X)),(X=M1(this,X.get(Y)||(X.set(Y,X=function(Z){for(var K,W,Q=1,G="",q="",V=[0],O=function(D){Q===1&&(D||(G=G.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?V.push(0,D,G):Q===3&&(D||G)?(V.push(3,D,G),Q=2):Q===2&&G==="..."&&D?V.push(4,D,0):Q===2&&G&&!D?V.push(5,0,!0,G):Q>=5&&((G||!D&&Q===5)&&(V.push(Q,0,G,W),Q=6),D&&(V.push(Q,D,0,W),Q=6)),G=""},N=0;N<Z.length;N++){N&&(Q===1&&O(),O(N));for(var J=0;J<Z[N].length;J++)K=Z[N][J],Q===1?K==="<"?(O(),V=[V],Q=3):G+=K:Q===4?G==="--"&&K===">"?(Q=1,G=""):G=K+G[0]:q?K===q?q="":G+=K:K==='"'||K==="'"?q=K:K===">"?(O(),Q=1):Q&&(K==="="?(Q=5,W=G,G=""):K==="/"&&(Q<5||Z[N][J+1]===">")?(O(),Q===3&&(V=V[0]),Q=V,(V=V[0]).push(2,0,Q),Q=0):K===" "||K==="\t"||K===`
`||K==="\r"?(O(),Q=2):G+=K),Q===3&&G==="!--"&&(Q=4,V=V[0])}return O(),V}(Y)),X),arguments,[])).length>1?X:X[0]}function S1(Y,X){for(var Z in X)Y[Z]=X[Z];return Y}function y0(Y,X){for(var Z in Y)if(Z!=="__source"&&!(Z in X))return!0;for(var K in X)if(K!=="__source"&&Y[K]!==X[K])return!0;return!1}function b1(Y){Y()}function q2(Y){return Y}function V2(){return[!1,b1]}function m0(Y,X){this.props=Y,this.context=X}function N2(Y,X){function Z(W){var Q=this.props.ref,G=Q==W.ref;return!G&&Q&&(Q.call?Q(null):Q.current=null),X?!X(this.props,W)||!G:y0(this.props,W)}function K(W){return this.shouldComponentUpdate=Z,P(Y,W)}return K.displayName="Memo("+(Y.displayName||Y.name)+")",K.prototype.isReactComponent=!0,K.__f=!0,K}(m0.prototype=new L).isPureReactComponent=!0,m0.prototype.shouldComponentUpdate=function(Y,X){return y0(this.props,Y)||y0(this.state,X)};var v1=F.__b;F.__b=function(Y){Y.type&&Y.type.__f&&Y.ref&&(Y.props.ref=Y.ref,Y.ref=null),v1&&v1(Y)};var A2=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function D2(Y){function X(Z){var K=S1({},Z);return delete K.ref,Y(K,Z.ref||null)}return X.$$typeof=A2,X.render=X,X.prototype.isReactComponent=X.__f=!0,X.displayName="ForwardRef("+(Y.displayName||Y.name)+")",X}var F2=F.__e;F.__e=function(Y,X,Z,K){if(Y.then){for(var W,Q=X;Q=Q.__;)if((W=Q.__c)&&W.__c)return X.__e==null&&(X.__e=Z.__e,X.__k=Z.__k),W.__c(Y,X)}F2(Y,X,Z,K)};var j1=F.unmount;function y1(Y,X,Z){return Y&&(Y.__c&&Y.__c.__H&&(Y.__c.__H.__.forEach(function(K){typeof K.__c=="function"&&K.__c()}),Y.__c.__H=null),(Y=S1({},Y)).__c!=null&&(Y.__c.__P===Z&&(Y.__c.__P=X),Y.__c.__e=!0,Y.__c=null),Y.__k=Y.__k&&Y.__k.map(function(K){return y1(K,X,Z)})),Y}function m1(Y,X,Z){return Y&&Z&&(Y.__v=null,Y.__k=Y.__k&&Y.__k.map(function(K){return m1(K,X,Z)}),Y.__c&&Y.__c.__P===X&&(Y.__e&&Z.appendChild(Y.__e),Y.__c.__e=!0,Y.__c.__P=Z)),Y}function I0(){this.__u=0,this.o=null,this.__b=null}function d1(Y){var X=Y.__.__c;return X&&X.__a&&X.__a(Y)}function I2(Y){var X,Z,K;function W(Q){if(X||(X=Y()).then(function(G){Z=G.default||G},function(G){K=G}),K)throw K;if(!Z)throw X;return P(Z,Q)}return W.displayName="Lazy",W.__f=!0,W}function F0(){this.i=null,this.l=null}F.unmount=function(Y){var X=Y.__c;X&&X.__R&&X.__R(),X&&32&Y.__u&&(Y.type=null),j1&&j1(Y)},(I0.prototype=new L).__c=function(Y,X){var Z=X.__c,K=this;K.o==null&&(K.o=[]),K.o.push(Z);var W=d1(K.__v),Q=!1,G=function(){Q||(Q=!0,Z.__R=null,W?W(q):q())};Z.__R=G;var q=function(){if(!--K.__u){if(K.state.__a){var V=K.state.__a;K.__v.__k[0]=m1(V,V.__c.__P,V.__c.__O)}var O;for(K.setState({__a:K.__b=null});O=K.o.pop();)O.forceUpdate()}};K.__u++||32&X.__u||K.setState({__a:K.__b=K.__v.__k[0]}),Y.then(G,G)},I0.prototype.componentWillUnmount=function(){this.o=[]},I0.prototype.render=function(Y,X){if(this.__b){if(this.__v.__k){var Z=document.createElement("div"),K=this.__v.__k[0].__c;this.__v.__k[0]=y1(this.__b,Z,K.__O=K.__P)}this.__b=null}var W=X.__a&&P(R,null,Y.fallback);return W&&(W.__u&=-33),[P(R,null,X.__a?null:Y.children),W]};var C1=function(Y,X,Z){if(++Z[1]===Z[0]&&Y.l.delete(X),Y.props.revealOrder&&(Y.props.revealOrder[0]!=="t"||!Y.l.size))for(Z=Y.i;Z;){for(;Z.length>3;)Z.pop()();if(Z[1]<Z[0])break;Y.i=Z=Z[2]}};function H2(Y){return this.getChildContext=function(){return Y.context},Y.children}function U2(Y){var X=this,Z=Y.h;if(X.componentWillUnmount=function(){e(null,X.v),X.v=null,X.h=null},X.h&&X.h!==Z&&X.componentWillUnmount(),!X.v){for(var K=X.__v;K!==null&&!K.__m&&K.__!==null;)K=K.__;X.h=Z,X.v={nodeType:1,parentNode:Z,childNodes:[],__k:{__m:K.__m},contains:function(){return!0},insertBefore:function(W,Q){this.childNodes.push(W),X.h.insertBefore(W,Q)},removeChild:function(W){this.childNodes.splice(this.childNodes.indexOf(W)>>>1,1),X.h.removeChild(W)}}}e(P(H2,{context:X.context},Y.__v),X.v)}function $2(Y,X){var Z=P(U2,{__v:Y,h:X});return Z.containerInfo=X,Z}(F0.prototype=new L).__a=function(Y){var X=this,Z=d1(X.__v),K=X.l.get(Y);return K[0]++,function(W){var Q=function(){X.props.revealOrder?(K.push(W),C1(X,Y,K)):W()};Z?Z(Q):Q()}},F0.prototype.render=function(Y){this.i=null,this.l=new Map;var X=o(Y.children);Y.revealOrder&&Y.revealOrder[0]==="b"&&X.reverse();for(var Z=X.length;Z--;)this.l.set(X[Z],this.i=[1,0,this.i]);return Y.children},F0.prototype.componentDidUpdate=F0.prototype.componentDidMount=function(){var Y=this;this.l.forEach(function(X,Z){C1(Y,Z,X)})};var z2=typeof Symbol!="undefined"&&Symbol.for&&Symbol.for("react.element")||60103,B2=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,E2=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,T2=/[A-Z0-9]/g,L2=typeof document!="undefined",P2=function(Y){return(typeof Symbol!="undefined"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(Y)};L.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(Y){Object.defineProperty(L.prototype,Y,{configurable:!0,get:function(){return this["UNSAFE_"+Y]},set:function(X){Object.defineProperty(this,Y,{configurable:!0,writable:!0,value:X})}})});var x1=F.event;function R2(){}function w2(){return this.cancelBubble}function M2(){return this.defaultPrevented}F.event=function(Y){return x1&&(Y=x1(Y)),Y.persist=R2,Y.isPropagationStopped=w2,Y.isDefaultPrevented=M2,Y.nativeEvent=Y};var p1,v2={enumerable:!1,configurable:!0,get:function(){return this.class}},_1=F.vnode;F.vnode=function(Y){typeof Y.type=="string"&&function(X){var{props:Z,type:K}=X,W={},Q=K.indexOf("-")===-1;for(var G in Z){var q=Z[G];if(!(G==="value"&&("defaultValue"in Z)&&q==null||L2&&G==="children"&&K==="noscript"||G==="class"||G==="className")){var V=G.toLowerCase();G==="defaultValue"&&"value"in Z&&Z.value==null?G="value":G==="download"&&q===!0?q="":V==="translate"&&q==="no"?q=!1:V[0]==="o"&&V[1]==="n"?V==="ondoubleclick"?G="ondblclick":V!=="onchange"||K!=="input"&&K!=="textarea"||P2(Z.type)?V==="onfocus"?G="onfocusin":V==="onblur"?G="onfocusout":E2.test(G)&&(G=V):V=G="oninput":Q&&B2.test(G)?G=G.replace(T2,"-$&").toLowerCase():q===null&&(q=void 0),V==="oninput"&&W[G=V]&&(G="oninputCapture"),W[G]=q}}K=="select"&&W.multiple&&Array.isArray(W.value)&&(W.value=o(Z.children).forEach(function(O){O.props.selected=W.value.indexOf(O.props.value)!=-1})),K=="select"&&W.defaultValue!=null&&(W.value=o(Z.children).forEach(function(O){O.props.selected=W.multiple?W.defaultValue.indexOf(O.props.value)!=-1:W.defaultValue==O.props.value})),Z.class&&!Z.className?(W.class=Z.class,Object.defineProperty(W,"className",v2)):(Z.className&&!Z.class||Z.class&&Z.className)&&(W.class=W.className=Z.className),X.props=W}(Y),Y.$$typeof=z2,_1&&_1(Y)};var k1=F.__r;F.__r=function(Y){k1&&k1(Y),p1=Y.__c};var g1=F.diffed;F.diffed=function(Y){g1&&g1(Y);var{props:X,__e:Z}=Y;Z!=null&&Y.type==="textarea"&&"value"in X&&X.value!==Z.value&&(Z.value=X.value==null?"":X.value),p1=null};var j2=R;var Q3=b0.bind(P);export{V2 as useTransition,J2 as useSignalRef,Q2 as useSignalEffect,D0 as useSignal,i as useRef,v as useMemo,A1 as useLayoutEffect,I1 as useId,l1 as useErrorBoundary,G0 as useEffect,q2 as useDeferredValue,F1 as useContext,t1 as useComputed,D1 as useCallback,V0 as untracked,b1 as startTransition,t as signal,e as render,N2 as memo,I2 as lazy,M0 as hydrate,Q3 as html,P as h,D2 as forwardRef,x as effect,P0 as createRef,$2 as createPortal,P as createElement,v0 as createContext,d as computed,I0 as Suspense,j2 as StrictMode,W2 as Show,m0 as PureComponent,R as Fragment,G2 as For,L as Component};