@gallop.software/studio 2.3.49 → 2.3.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,85 @@
1
+ function Hm(o,s){for(var h=0;h<s.length;h++){const u=s[h];if(typeof u!="string"&&!Array.isArray(u)){for(const m in u)if(m!=="default"&&!(m in o)){const p=Object.getOwnPropertyDescriptor(u,m);p&&Object.defineProperty(o,m,p.get?p:{enumerable:!0,get:()=>u[m]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const m of document.querySelectorAll('link[rel="modulepreload"]'))u(m);new MutationObserver(m=>{for(const p of m)if(p.type==="childList")for(const D of p.addedNodes)D.tagName==="LINK"&&D.rel==="modulepreload"&&u(D)}).observe(document,{childList:!0,subtree:!0});function h(m){const p={};return m.integrity&&(p.integrity=m.integrity),m.referrerPolicy&&(p.referrerPolicy=m.referrerPolicy),m.crossOrigin==="use-credentials"?p.credentials="include":m.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function u(m){if(m.ep)return;m.ep=!0;const p=h(m);fetch(m.href,p)}})();function Bm(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Ns={exports:{}},Bi={};var G0;function jm(){if(G0)return Bi;G0=1;var o=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function h(u,m,p){var D=null;if(p!==void 0&&(D=""+p),m.key!==void 0&&(D=""+m.key),"key"in m){p={};for(var _ in m)_!=="key"&&(p[_]=m[_])}else p=m;return m=p.ref,{$$typeof:o,type:u,key:D,ref:m!==void 0?m:null,props:p}}return Bi.Fragment=s,Bi.jsx=h,Bi.jsxs=h,Bi}var V0;function qm(){return V0||(V0=1,Ns.exports=jm()),Ns.exports}var Gi=qm(),Hs={exports:{}},Le={};var X0;function Ym(){if(X0)return Le;X0=1;var o=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),D=Symbol.for("react.context"),_=Symbol.for("react.forward_ref"),O=Symbol.for("react.suspense"),S=Symbol.for("react.memo"),X=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),K=Symbol.iterator;function oe(y){return y===null||typeof y!="object"?null:(y=K&&y[K]||y["@@iterator"],typeof y=="function"?y:null)}var L={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},q=Object.assign,Se={};function P(y,k,V){this.props=y,this.context=k,this.refs=Se,this.updater=V||L}P.prototype.isReactComponent={},P.prototype.setState=function(y,k){if(typeof y!="object"&&typeof y!="function"&&y!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,y,k,"setState")},P.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function me(){}me.prototype=P.prototype;function ae(y,k,V){this.props=y,this.context=k,this.refs=Se,this.updater=V||L}var ue=ae.prototype=new me;ue.constructor=ae,q(ue,P.prototype),ue.isPureReactComponent=!0;var Y=Array.isArray;function J(){}var U={H:null,A:null,T:null,S:null},be=Object.prototype.hasOwnProperty;function ge(y,k,V){var W=V.ref;return{$$typeof:o,type:y,key:k,ref:W!==void 0?W:null,props:V}}function Ee(y,k){return ge(y.type,k,y.props)}function Re(y){return typeof y=="object"&&y!==null&&y.$$typeof===o}function Ue(y){var k={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(V){return k[V]})}var ut=/\/+/g;function Qe(y,k){return typeof y=="object"&&y!==null&&y.key!=null?Ue(""+y.key):k.toString(36)}function Xe(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(J,J):(y.status="pending",y.then(function(k){y.status==="pending"&&(y.status="fulfilled",y.value=k)},function(k){y.status==="pending"&&(y.status="rejected",y.reason=k)})),y.status){case"fulfilled":return y.value;case"rejected":throw y.reason}}throw y}function T(y,k,V,W,G){var Ce=typeof y;(Ce==="undefined"||Ce==="boolean")&&(y=null);var pe=!1;if(y===null)pe=!0;else switch(Ce){case"bigint":case"string":case"number":pe=!0;break;case"object":switch(y.$$typeof){case o:case s:pe=!0;break;case X:return pe=y._init,T(pe(y._payload),k,V,W,G)}}if(pe)return G=G(y),pe=W===""?"."+Qe(y,0):W,Y(G)?(V="",pe!=null&&(V=pe.replace(ut,"$&/")+"/"),T(G,k,V,"",function(Kt){return Kt})):G!=null&&(Re(G)&&(G=Ee(G,V+(G.key==null||y&&y.key===G.key?"":(""+G.key).replace(ut,"$&/")+"/")+pe)),k.push(G)),1;pe=0;var rt=W===""?".":W+":";if(Y(y))for(var Ze=0;Ze<y.length;Ze++)W=y[Ze],Ce=rt+Qe(W,Ze),pe+=T(W,k,V,Ce,G);else if(Ze=oe(y),typeof Ze=="function")for(y=Ze.call(y),Ze=0;!(W=y.next()).done;)W=W.value,Ce=rt+Qe(W,Ze++),pe+=T(W,k,V,Ce,G);else if(Ce==="object"){if(typeof y.then=="function")return T(Xe(y),k,V,W,G);throw k=String(y),Error("Objects are not valid as a React child (found: "+(k==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":k)+"). If you meant to render a collection of children, use an array instead.")}return pe}function B(y,k,V){if(y==null)return y;var W=[],G=0;return T(y,W,"","",function(Ce){return k.call(V,Ce,G++)}),W}function ee(y){if(y._status===-1){var k=y._result;k=k(),k.then(function(V){(y._status===0||y._status===-1)&&(y._status=1,y._result=V)},function(V){(y._status===0||y._status===-1)&&(y._status=2,y._result=V)}),y._status===-1&&(y._status=0,y._result=k)}if(y._status===1)return y._result.default;throw y._result}var ke=typeof reportError=="function"?reportError:function(y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var k=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof y=="object"&&y!==null&&typeof y.message=="string"?String(y.message):String(y),error:y});if(!window.dispatchEvent(k))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",y);return}console.error(y)},He={map:B,forEach:function(y,k,V){B(y,function(){k.apply(this,arguments)},V)},count:function(y){var k=0;return B(y,function(){k++}),k},toArray:function(y){return B(y,function(k){return k})||[]},only:function(y){if(!Re(y))throw Error("React.Children.only expected to receive a single React element child.");return y}};return Le.Activity=H,Le.Children=He,Le.Component=P,Le.Fragment=h,Le.Profiler=m,Le.PureComponent=ae,Le.StrictMode=u,Le.Suspense=O,Le.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,Le.__COMPILER_RUNTIME={__proto__:null,c:function(y){return U.H.useMemoCache(y)}},Le.cache=function(y){return function(){return y.apply(null,arguments)}},Le.cacheSignal=function(){return null},Le.cloneElement=function(y,k,V){if(y==null)throw Error("The argument must be a React element, but you passed "+y+".");var W=q({},y.props),G=y.key;if(k!=null)for(Ce in k.key!==void 0&&(G=""+k.key),k)!be.call(k,Ce)||Ce==="key"||Ce==="__self"||Ce==="__source"||Ce==="ref"&&k.ref===void 0||(W[Ce]=k[Ce]);var Ce=arguments.length-2;if(Ce===1)W.children=V;else if(1<Ce){for(var pe=Array(Ce),rt=0;rt<Ce;rt++)pe[rt]=arguments[rt+2];W.children=pe}return ge(y.type,G,W)},Le.createContext=function(y){return y={$$typeof:D,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null},y.Provider=y,y.Consumer={$$typeof:p,_context:y},y},Le.createElement=function(y,k,V){var W,G={},Ce=null;if(k!=null)for(W in k.key!==void 0&&(Ce=""+k.key),k)be.call(k,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(G[W]=k[W]);var pe=arguments.length-2;if(pe===1)G.children=V;else if(1<pe){for(var rt=Array(pe),Ze=0;Ze<pe;Ze++)rt[Ze]=arguments[Ze+2];G.children=rt}if(y&&y.defaultProps)for(W in pe=y.defaultProps,pe)G[W]===void 0&&(G[W]=pe[W]);return ge(y,Ce,G)},Le.createRef=function(){return{current:null}},Le.forwardRef=function(y){return{$$typeof:_,render:y}},Le.isValidElement=Re,Le.lazy=function(y){return{$$typeof:X,_payload:{_status:-1,_result:y},_init:ee}},Le.memo=function(y,k){return{$$typeof:S,type:y,compare:k===void 0?null:k}},Le.startTransition=function(y){var k=U.T,V={};U.T=V;try{var W=y(),G=U.S;G!==null&&G(V,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(J,ke)}catch(Ce){ke(Ce)}finally{k!==null&&V.types!==null&&(k.types=V.types),U.T=k}},Le.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},Le.use=function(y){return U.H.use(y)},Le.useActionState=function(y,k,V){return U.H.useActionState(y,k,V)},Le.useCallback=function(y,k){return U.H.useCallback(y,k)},Le.useContext=function(y){return U.H.useContext(y)},Le.useDebugValue=function(){},Le.useDeferredValue=function(y,k){return U.H.useDeferredValue(y,k)},Le.useEffect=function(y,k){return U.H.useEffect(y,k)},Le.useEffectEvent=function(y){return U.H.useEffectEvent(y)},Le.useId=function(){return U.H.useId()},Le.useImperativeHandle=function(y,k,V){return U.H.useImperativeHandle(y,k,V)},Le.useInsertionEffect=function(y,k){return U.H.useInsertionEffect(y,k)},Le.useLayoutEffect=function(y,k){return U.H.useLayoutEffect(y,k)},Le.useMemo=function(y,k){return U.H.useMemo(y,k)},Le.useOptimistic=function(y,k){return U.H.useOptimistic(y,k)},Le.useReducer=function(y,k,V){return U.H.useReducer(y,k,V)},Le.useRef=function(y){return U.H.useRef(y)},Le.useState=function(y){return U.H.useState(y)},Le.useSyncExternalStore=function(y,k,V){return U.H.useSyncExternalStore(y,k,V)},Le.useTransition=function(){return U.H.useTransition()},Le.version="19.2.4",Le}var Q0;function $s(){return Q0||(Q0=1,Hs.exports=Ym()),Hs.exports}var w=$s();const dh=Bm(w),Z0=Hm({__proto__:null,default:dh},[w]);function Gm(o){if(o.sheet)return o.sheet;for(var s=0;s<document.styleSheets.length;s++)if(document.styleSheets[s].ownerNode===o)return document.styleSheets[s]}function Vm(o){var s=document.createElement("style");return s.setAttribute("data-emotion",o.key),o.nonce!==void 0&&s.setAttribute("nonce",o.nonce),s.appendChild(document.createTextNode("")),s.setAttribute("data-s",""),s}var Xm=(function(){function o(h){var u=this;this._insertTag=function(m){var p;u.tags.length===0?u.insertionPoint?p=u.insertionPoint.nextSibling:u.prepend?p=u.container.firstChild:p=u.before:p=u.tags[u.tags.length-1].nextSibling,u.container.insertBefore(m,p),u.tags.push(m)},this.isSpeedy=h.speedy===void 0?!0:h.speedy,this.tags=[],this.ctr=0,this.nonce=h.nonce,this.key=h.key,this.container=h.container,this.prepend=h.prepend,this.insertionPoint=h.insertionPoint,this.before=null}var s=o.prototype;return s.hydrate=function(u){u.forEach(this._insertTag)},s.insert=function(u){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Vm(this));var m=this.tags[this.tags.length-1];if(this.isSpeedy){var p=Gm(m);try{p.insertRule(u,p.cssRules.length)}catch{}}else m.appendChild(document.createTextNode(u));this.ctr++},s.flush=function(){this.tags.forEach(function(u){var m;return(m=u.parentNode)==null?void 0:m.removeChild(u)}),this.tags=[],this.ctr=0},o})(),Vt="-ms-",yr="-moz-",$e="-webkit-",hh="comm",Ws="rule",Is="decl",Qm="@import",ph="@keyframes",Zm="@layer",Km=Math.abs,br=String.fromCharCode,Jm=Object.assign;function Fm(o,s){return Ht(o,0)^45?(((s<<2^Ht(o,0))<<2^Ht(o,1))<<2^Ht(o,2))<<2^Ht(o,3):0}function mh(o){return o.trim()}function $m(o,s){return(o=s.exec(o))?o[0]:o}function We(o,s,h){return o.replace(s,h)}function Ks(o,s){return o.indexOf(s)}function Ht(o,s){return o.charCodeAt(s)|0}function Vi(o,s,h){return o.slice(s,h)}function Nn(o){return o.length}function Ps(o){return o.length}function dr(o,s){return s.push(o),o}function Wm(o,s){return o.map(s).join("")}var xr=1,Xa=1,gh=0,tn=0,At=0,Za="";function Sr(o,s,h,u,m,p,D){return{value:o,root:s,parent:h,type:u,props:m,children:p,line:xr,column:Xa,length:D,return:""}}function ji(o,s){return Jm(Sr("",null,null,"",null,null,0),o,{length:-o.length},s)}function Im(){return At}function Pm(){return At=tn>0?Ht(Za,--tn):0,Xa--,At===10&&(Xa=1,xr--),At}function un(){return At=tn<gh?Ht(Za,tn++):0,Xa++,At===10&&(Xa=1,xr++),At}function Bn(){return Ht(Za,tn)}function hr(){return tn}function Zi(o,s){return Vi(Za,o,s)}function Xi(o){switch(o){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function yh(o){return xr=Xa=1,gh=Nn(Za=o),tn=0,[]}function vh(o){return Za="",o}function pr(o){return mh(Zi(tn-1,Js(o===91?o+2:o===40?o+1:o)))}function e1(o){for(;(At=Bn())&&At<33;)un();return Xi(o)>2||Xi(At)>3?"":" "}function t1(o,s){for(;--s&&un()&&!(At<48||At>102||At>57&&At<65||At>70&&At<97););return Zi(o,hr()+(s<6&&Bn()==32&&un()==32))}function Js(o){for(;un();)switch(At){case o:return tn;case 34:case 39:o!==34&&o!==39&&Js(At);break;case 40:o===41&&Js(o);break;case 92:un();break}return tn}function n1(o,s){for(;un()&&o+At!==57;)if(o+At===84&&Bn()===47)break;return"/*"+Zi(s,tn-1)+"*"+br(o===47?o:un())}function l1(o){for(;!Xi(Bn());)un();return Zi(o,tn)}function a1(o){return vh(mr("",null,null,null,[""],o=yh(o),0,[0],o))}function mr(o,s,h,u,m,p,D,_,O){for(var S=0,X=0,H=D,K=0,oe=0,L=0,q=1,Se=1,P=1,me=0,ae="",ue=m,Y=p,J=u,U=ae;Se;)switch(L=me,me=un()){case 40:if(L!=108&&Ht(U,H-1)==58){Ks(U+=We(pr(me),"&","&\f"),"&\f")!=-1&&(P=-1);break}case 34:case 39:case 91:U+=pr(me);break;case 9:case 10:case 13:case 32:U+=e1(L);break;case 92:U+=t1(hr()-1,7);continue;case 47:switch(Bn()){case 42:case 47:dr(i1(n1(un(),hr()),s,h),O);break;default:U+="/"}break;case 123*q:_[S++]=Nn(U)*P;case 125*q:case 59:case 0:switch(me){case 0:case 125:Se=0;case 59+X:P==-1&&(U=We(U,/\f/g,"")),oe>0&&Nn(U)-H&&dr(oe>32?J0(U+";",u,h,H-1):J0(We(U," ","")+";",u,h,H-2),O);break;case 59:U+=";";default:if(dr(J=K0(U,s,h,S,X,m,_,ae,ue=[],Y=[],H),p),me===123)if(X===0)mr(U,s,J,J,ue,p,H,_,Y);else switch(K===99&&Ht(U,3)===110?100:K){case 100:case 108:case 109:case 115:mr(o,J,J,u&&dr(K0(o,J,J,0,0,m,_,ae,m,ue=[],H),Y),m,Y,H,_,u?ue:Y);break;default:mr(U,J,J,J,[""],Y,0,_,Y)}}S=X=oe=0,q=P=1,ae=U="",H=D;break;case 58:H=1+Nn(U),oe=L;default:if(q<1){if(me==123)--q;else if(me==125&&q++==0&&Pm()==125)continue}switch(U+=br(me),me*q){case 38:P=X>0?1:(U+="\f",-1);break;case 44:_[S++]=(Nn(U)-1)*P,P=1;break;case 64:Bn()===45&&(U+=pr(un())),K=Bn(),X=H=Nn(ae=U+=l1(hr())),me++;break;case 45:L===45&&Nn(U)==2&&(q=0)}}return p}function K0(o,s,h,u,m,p,D,_,O,S,X){for(var H=m-1,K=m===0?p:[""],oe=Ps(K),L=0,q=0,Se=0;L<u;++L)for(var P=0,me=Vi(o,H+1,H=Km(q=D[L])),ae=o;P<oe;++P)(ae=mh(q>0?K[P]+" "+me:We(me,/&\f/g,K[P])))&&(O[Se++]=ae);return Sr(o,s,h,m===0?Ws:_,O,S,X)}function i1(o,s,h){return Sr(o,s,h,hh,br(Im()),Vi(o,2,-2),0)}function J0(o,s,h,u){return Sr(o,s,h,Is,Vi(o,0,u),Vi(o,u+1,-1),u)}function Va(o,s){for(var h="",u=Ps(o),m=0;m<u;m++)h+=s(o[m],m,o,s)||"";return h}function o1(o,s,h,u){switch(o.type){case Zm:if(o.children.length)break;case Qm:case Is:return o.return=o.return||o.value;case hh:return"";case ph:return o.return=o.value+"{"+Va(o.children,u)+"}";case Ws:o.value=o.props.join(",")}return Nn(h=Va(o.children,u))?o.return=o.value+"{"+h+"}":""}function r1(o){var s=Ps(o);return function(h,u,m,p){for(var D="",_=0;_<s;_++)D+=o[_](h,u,m,p)||"";return D}}function c1(o){return function(s){s.root||(s=s.return)&&o(s)}}function s1(o){var s=Object.create(null);return function(h){return s[h]===void 0&&(s[h]=o(h)),s[h]}}var u1=function(s,h,u){for(var m=0,p=0;m=p,p=Bn(),m===38&&p===12&&(h[u]=1),!Xi(p);)un();return Zi(s,tn)},f1=function(s,h){var u=-1,m=44;do switch(Xi(m)){case 0:m===38&&Bn()===12&&(h[u]=1),s[u]+=u1(tn-1,h,u);break;case 2:s[u]+=pr(m);break;case 4:if(m===44){s[++u]=Bn()===58?"&\f":"",h[u]=s[u].length;break}default:s[u]+=br(m)}while(m=un());return s},d1=function(s,h){return vh(f1(yh(s),h))},F0=new WeakMap,h1=function(s){if(!(s.type!=="rule"||!s.parent||s.length<1)){for(var h=s.value,u=s.parent,m=s.column===u.column&&s.line===u.line;u.type!=="rule";)if(u=u.parent,!u)return;if(!(s.props.length===1&&h.charCodeAt(0)!==58&&!F0.get(u))&&!m){F0.set(s,!0);for(var p=[],D=d1(h,p),_=u.props,O=0,S=0;O<D.length;O++)for(var X=0;X<_.length;X++,S++)s.props[S]=p[O]?D[O].replace(/&\f/g,_[X]):_[X]+" "+D[O]}}},p1=function(s){if(s.type==="decl"){var h=s.value;h.charCodeAt(0)===108&&h.charCodeAt(2)===98&&(s.return="",s.value="")}};function bh(o,s){switch(Fm(o,s)){case 5103:return $e+"print-"+o+o;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return $e+o+o;case 5349:case 4246:case 4810:case 6968:case 2756:return $e+o+yr+o+Vt+o+o;case 6828:case 4268:return $e+o+Vt+o+o;case 6165:return $e+o+Vt+"flex-"+o+o;case 5187:return $e+o+We(o,/(\w+).+(:[^]+)/,$e+"box-$1$2"+Vt+"flex-$1$2")+o;case 5443:return $e+o+Vt+"flex-item-"+We(o,/flex-|-self/,"")+o;case 4675:return $e+o+Vt+"flex-line-pack"+We(o,/align-content|flex-|-self/,"")+o;case 5548:return $e+o+Vt+We(o,"shrink","negative")+o;case 5292:return $e+o+Vt+We(o,"basis","preferred-size")+o;case 6060:return $e+"box-"+We(o,"-grow","")+$e+o+Vt+We(o,"grow","positive")+o;case 4554:return $e+We(o,/([^-])(transform)/g,"$1"+$e+"$2")+o;case 6187:return We(We(We(o,/(zoom-|grab)/,$e+"$1"),/(image-set)/,$e+"$1"),o,"")+o;case 5495:case 3959:return We(o,/(image-set\([^]*)/,$e+"$1$`$1");case 4968:return We(We(o,/(.+:)(flex-)?(.*)/,$e+"box-pack:$3"+Vt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+$e+o+o;case 4095:case 3583:case 4068:case 2532:return We(o,/(.+)-inline(.+)/,$e+"$1$2")+o;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Nn(o)-1-s>6)switch(Ht(o,s+1)){case 109:if(Ht(o,s+4)!==45)break;case 102:return We(o,/(.+:)(.+)-([^]+)/,"$1"+$e+"$2-$3$1"+yr+(Ht(o,s+3)==108?"$3":"$2-$3"))+o;case 115:return~Ks(o,"stretch")?bh(We(o,"stretch","fill-available"),s)+o:o}break;case 4949:if(Ht(o,s+1)!==115)break;case 6444:switch(Ht(o,Nn(o)-3-(~Ks(o,"!important")&&10))){case 107:return We(o,":",":"+$e)+o;case 101:return We(o,/(.+:)([^;!]+)(;|!.+)?/,"$1"+$e+(Ht(o,14)===45?"inline-":"")+"box$3$1"+$e+"$2$3$1"+Vt+"$2box$3")+o}break;case 5936:switch(Ht(o,s+11)){case 114:return $e+o+Vt+We(o,/[svh]\w+-[tblr]{2}/,"tb")+o;case 108:return $e+o+Vt+We(o,/[svh]\w+-[tblr]{2}/,"tb-rl")+o;case 45:return $e+o+Vt+We(o,/[svh]\w+-[tblr]{2}/,"lr")+o}return $e+o+Vt+o+o}return o}var m1=function(s,h,u,m){if(s.length>-1&&!s.return)switch(s.type){case Is:s.return=bh(s.value,s.length);break;case ph:return Va([ji(s,{value:We(s.value,"@","@"+$e)})],m);case Ws:if(s.length)return Wm(s.props,function(p){switch($m(p,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Va([ji(s,{props:[We(p,/:(read-\w+)/,":"+yr+"$1")]})],m);case"::placeholder":return Va([ji(s,{props:[We(p,/:(plac\w+)/,":"+$e+"input-$1")]}),ji(s,{props:[We(p,/:(plac\w+)/,":"+yr+"$1")]}),ji(s,{props:[We(p,/:(plac\w+)/,Vt+"input-$1")]})],m)}return""})}},g1=[m1],y1=function(s){var h=s.key;if(h==="css"){var u=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(u,function(q){var Se=q.getAttribute("data-emotion");Se.indexOf(" ")!==-1&&(document.head.appendChild(q),q.setAttribute("data-s",""))})}var m=s.stylisPlugins||g1,p={},D,_=[];D=s.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+h+' "]'),function(q){for(var Se=q.getAttribute("data-emotion").split(" "),P=1;P<Se.length;P++)p[Se[P]]=!0;_.push(q)});var O,S=[h1,p1];{var X,H=[o1,c1(function(q){X.insert(q)})],K=r1(S.concat(m,H)),oe=function(Se){return Va(a1(Se),K)};O=function(Se,P,me,ae){X=me,oe(Se?Se+"{"+P.styles+"}":P.styles),ae&&(L.inserted[P.name]=!0)}}var L={key:h,sheet:new Xm({key:h,container:D,nonce:s.nonce,speedy:s.speedy,prepend:s.prepend,insertionPoint:s.insertionPoint}),nonce:s.nonce,inserted:p,registered:{},insert:O};return L.sheet.hydrate(_),L},Bs={exports:{}},Ie={};var $0;function v1(){if($0)return Ie;$0=1;var o=typeof Symbol=="function"&&Symbol.for,s=o?Symbol.for("react.element"):60103,h=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,m=o?Symbol.for("react.strict_mode"):60108,p=o?Symbol.for("react.profiler"):60114,D=o?Symbol.for("react.provider"):60109,_=o?Symbol.for("react.context"):60110,O=o?Symbol.for("react.async_mode"):60111,S=o?Symbol.for("react.concurrent_mode"):60111,X=o?Symbol.for("react.forward_ref"):60112,H=o?Symbol.for("react.suspense"):60113,K=o?Symbol.for("react.suspense_list"):60120,oe=o?Symbol.for("react.memo"):60115,L=o?Symbol.for("react.lazy"):60116,q=o?Symbol.for("react.block"):60121,Se=o?Symbol.for("react.fundamental"):60117,P=o?Symbol.for("react.responder"):60118,me=o?Symbol.for("react.scope"):60119;function ae(Y){if(typeof Y=="object"&&Y!==null){var J=Y.$$typeof;switch(J){case s:switch(Y=Y.type,Y){case O:case S:case u:case p:case m:case H:return Y;default:switch(Y=Y&&Y.$$typeof,Y){case _:case X:case L:case oe:case D:return Y;default:return J}}case h:return J}}}function ue(Y){return ae(Y)===S}return Ie.AsyncMode=O,Ie.ConcurrentMode=S,Ie.ContextConsumer=_,Ie.ContextProvider=D,Ie.Element=s,Ie.ForwardRef=X,Ie.Fragment=u,Ie.Lazy=L,Ie.Memo=oe,Ie.Portal=h,Ie.Profiler=p,Ie.StrictMode=m,Ie.Suspense=H,Ie.isAsyncMode=function(Y){return ue(Y)||ae(Y)===O},Ie.isConcurrentMode=ue,Ie.isContextConsumer=function(Y){return ae(Y)===_},Ie.isContextProvider=function(Y){return ae(Y)===D},Ie.isElement=function(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===s},Ie.isForwardRef=function(Y){return ae(Y)===X},Ie.isFragment=function(Y){return ae(Y)===u},Ie.isLazy=function(Y){return ae(Y)===L},Ie.isMemo=function(Y){return ae(Y)===oe},Ie.isPortal=function(Y){return ae(Y)===h},Ie.isProfiler=function(Y){return ae(Y)===p},Ie.isStrictMode=function(Y){return ae(Y)===m},Ie.isSuspense=function(Y){return ae(Y)===H},Ie.isValidElementType=function(Y){return typeof Y=="string"||typeof Y=="function"||Y===u||Y===S||Y===p||Y===m||Y===H||Y===K||typeof Y=="object"&&Y!==null&&(Y.$$typeof===L||Y.$$typeof===oe||Y.$$typeof===D||Y.$$typeof===_||Y.$$typeof===X||Y.$$typeof===Se||Y.$$typeof===P||Y.$$typeof===me||Y.$$typeof===q)},Ie.typeOf=ae,Ie}var W0;function b1(){return W0||(W0=1,Bs.exports=v1()),Bs.exports}var js,I0;function x1(){if(I0)return js;I0=1;var o=b1(),s={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},h={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},u={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},m={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},p={};p[o.ForwardRef]=u,p[o.Memo]=m;function D(L){return o.isMemo(L)?m:p[L.$$typeof]||s}var _=Object.defineProperty,O=Object.getOwnPropertyNames,S=Object.getOwnPropertySymbols,X=Object.getOwnPropertyDescriptor,H=Object.getPrototypeOf,K=Object.prototype;function oe(L,q,Se){if(typeof q!="string"){if(K){var P=H(q);P&&P!==K&&oe(L,P,Se)}var me=O(q);S&&(me=me.concat(S(q)));for(var ae=D(L),ue=D(q),Y=0;Y<me.length;++Y){var J=me[Y];if(!h[J]&&!(Se&&Se[J])&&!(ue&&ue[J])&&!(ae&&ae[J])){var U=X(q,J);try{_(L,J,U)}catch{}}}}return L}return js=oe,js}x1();var S1=!0;function C1(o,s,h){var u="";return h.split(" ").forEach(function(m){o[m]!==void 0?s.push(o[m]+";"):m&&(u+=m+" ")}),u}var xh=function(s,h,u){var m=s.key+"-"+h.name;(u===!1||S1===!1)&&s.registered[m]===void 0&&(s.registered[m]=h.styles)},w1=function(s,h,u){xh(s,h,u);var m=s.key+"-"+h.name;if(s.inserted[h.name]===void 0){var p=h;do s.insert(h===p?"."+m:"",p,s.sheet,!0),p=p.next;while(p!==void 0)}};function z1(o){for(var s=0,h,u=0,m=o.length;m>=4;++u,m-=4)h=o.charCodeAt(u)&255|(o.charCodeAt(++u)&255)<<8|(o.charCodeAt(++u)&255)<<16|(o.charCodeAt(++u)&255)<<24,h=(h&65535)*1540483477+((h>>>16)*59797<<16),h^=h>>>24,s=(h&65535)*1540483477+((h>>>16)*59797<<16)^(s&65535)*1540483477+((s>>>16)*59797<<16);switch(m){case 3:s^=(o.charCodeAt(u+2)&255)<<16;case 2:s^=(o.charCodeAt(u+1)&255)<<8;case 1:s^=o.charCodeAt(u)&255,s=(s&65535)*1540483477+((s>>>16)*59797<<16)}return s^=s>>>13,s=(s&65535)*1540483477+((s>>>16)*59797<<16),((s^s>>>15)>>>0).toString(36)}var M1={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},T1=/[A-Z]|^ms/g,A1=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Sh=function(s){return s.charCodeAt(1)===45},P0=function(s){return s!=null&&typeof s!="boolean"},qs=s1(function(o){return Sh(o)?o:o.replace(T1,"-$&").toLowerCase()}),eh=function(s,h){switch(s){case"animation":case"animationName":if(typeof h=="string")return h.replace(A1,function(u,m,p){return Hn={name:m,styles:p,next:Hn},m})}return M1[s]!==1&&!Sh(s)&&typeof h=="number"&&h!==0?h+"px":h};function Qi(o,s,h){if(h==null)return"";var u=h;if(u.__emotion_styles!==void 0)return u;switch(typeof h){case"boolean":return"";case"object":{var m=h;if(m.anim===1)return Hn={name:m.name,styles:m.styles,next:Hn},m.name;var p=h;if(p.styles!==void 0){var D=p.next;if(D!==void 0)for(;D!==void 0;)Hn={name:D.name,styles:D.styles,next:Hn},D=D.next;var _=p.styles+";";return _}return E1(o,s,h)}case"function":{if(o!==void 0){var O=Hn,S=h(o);return Hn=O,Qi(o,s,S)}break}}var X=h;return X}function E1(o,s,h){var u="";if(Array.isArray(h))for(var m=0;m<h.length;m++)u+=Qi(o,s,h[m])+";";else for(var p in h){var D=h[p];if(typeof D!="object"){var _=D;P0(_)&&(u+=qs(p)+":"+eh(p,_)+";")}else if(Array.isArray(D)&&typeof D[0]=="string"&&s==null)for(var O=0;O<D.length;O++)P0(D[O])&&(u+=qs(p)+":"+eh(p,D[O])+";");else{var S=Qi(o,s,D);switch(p){case"animation":case"animationName":{u+=qs(p)+":"+S+";";break}default:u+=p+"{"+S+"}"}}}return u}var th=/label:\s*([^\s;{]+)\s*(;|$)/g,Hn;function Ch(o,s,h){if(o.length===1&&typeof o[0]=="object"&&o[0]!==null&&o[0].styles!==void 0)return o[0];var u=!0,m="";Hn=void 0;var p=o[0];if(p==null||p.raw===void 0)u=!1,m+=Qi(h,s,p);else{var D=p;m+=D[0]}for(var _=1;_<o.length;_++)if(m+=Qi(h,s,o[_]),u){var O=p;m+=O[_]}th.lastIndex=0;for(var S="",X;(X=th.exec(m))!==null;)S+="-"+X[1];var H=z1(m)+S;return{name:H,styles:m,next:Hn}}var D1=function(s){return s()},k1=Z0.useInsertionEffect?Z0.useInsertionEffect:!1,_1=k1||D1,wh=w.createContext(typeof HTMLElement<"u"?y1({key:"css"}):null);wh.Provider;var R1=function(s){return w.forwardRef(function(h,u){var m=w.useContext(wh);return s(h,m,u)})},O1=w.createContext({}),Ki={}.hasOwnProperty,Fs="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",eu=function(s,h){var u={};for(var m in h)Ki.call(h,m)&&(u[m]=h[m]);return u[Fs]=s,u},L1=function(s){var h=s.cache,u=s.serialized,m=s.isStringTag;return xh(h,u,m),_1(function(){return w1(h,u,m)}),null},U1=R1(function(o,s,h){var u=o.css;typeof u=="string"&&s.registered[u]!==void 0&&(u=s.registered[u]);var m=o[Fs],p=[u],D="";typeof o.className=="string"?D=C1(s.registered,p,o.className):o.className!=null&&(D=o.className+" ");var _=Ch(p,void 0,w.useContext(O1));D+=s.key+"-"+_.name;var O={};for(var S in o)Ki.call(o,S)&&S!=="css"&&S!==Fs&&(O[S]=o[S]);return O.className=D,h&&(O.ref=h),w.createElement(w.Fragment,null,w.createElement(L1,{cache:s,serialized:_,isStringTag:typeof m=="string"}),w.createElement(m,O))}),tu=U1,xt=Gi.Fragment,c=function(s,h,u){return Ki.call(h,"css")?Gi.jsx(tu,eu(s,h),u):Gi.jsx(s,h,u)},x=function(s,h,u){return Ki.call(h,"css")?Gi.jsxs(tu,eu(s,h),u):Gi.jsxs(s,h,u)},Ys={exports:{}},qi={},Gs={exports:{}},Vs={};var nh;function N1(){return nh||(nh=1,(function(o){function s(T,B){var ee=T.length;T.push(B);e:for(;0<ee;){var ke=ee-1>>>1,He=T[ke];if(0<m(He,B))T[ke]=B,T[ee]=He,ee=ke;else break e}}function h(T){return T.length===0?null:T[0]}function u(T){if(T.length===0)return null;var B=T[0],ee=T.pop();if(ee!==B){T[0]=ee;e:for(var ke=0,He=T.length,y=He>>>1;ke<y;){var k=2*(ke+1)-1,V=T[k],W=k+1,G=T[W];if(0>m(V,ee))W<He&&0>m(G,V)?(T[ke]=G,T[W]=ee,ke=W):(T[ke]=V,T[k]=ee,ke=k);else if(W<He&&0>m(G,ee))T[ke]=G,T[W]=ee,ke=W;else break e}}return B}function m(T,B){var ee=T.sortIndex-B.sortIndex;return ee!==0?ee:T.id-B.id}if(o.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;o.unstable_now=function(){return p.now()}}else{var D=Date,_=D.now();o.unstable_now=function(){return D.now()-_}}var O=[],S=[],X=1,H=null,K=3,oe=!1,L=!1,q=!1,Se=!1,P=typeof setTimeout=="function"?setTimeout:null,me=typeof clearTimeout=="function"?clearTimeout:null,ae=typeof setImmediate<"u"?setImmediate:null;function ue(T){for(var B=h(S);B!==null;){if(B.callback===null)u(S);else if(B.startTime<=T)u(S),B.sortIndex=B.expirationTime,s(O,B);else break;B=h(S)}}function Y(T){if(q=!1,ue(T),!L)if(h(O)!==null)L=!0,J||(J=!0,Ue());else{var B=h(S);B!==null&&Xe(Y,B.startTime-T)}}var J=!1,U=-1,be=5,ge=-1;function Ee(){return Se?!0:!(o.unstable_now()-ge<be)}function Re(){if(Se=!1,J){var T=o.unstable_now();ge=T;var B=!0;try{e:{L=!1,q&&(q=!1,me(U),U=-1),oe=!0;var ee=K;try{t:{for(ue(T),H=h(O);H!==null&&!(H.expirationTime>T&&Ee());){var ke=H.callback;if(typeof ke=="function"){H.callback=null,K=H.priorityLevel;var He=ke(H.expirationTime<=T);if(T=o.unstable_now(),typeof He=="function"){H.callback=He,ue(T),B=!0;break t}H===h(O)&&u(O),ue(T)}else u(O);H=h(O)}if(H!==null)B=!0;else{var y=h(S);y!==null&&Xe(Y,y.startTime-T),B=!1}}break e}finally{H=null,K=ee,oe=!1}B=void 0}}finally{B?Ue():J=!1}}}var Ue;if(typeof ae=="function")Ue=function(){ae(Re)};else if(typeof MessageChannel<"u"){var ut=new MessageChannel,Qe=ut.port2;ut.port1.onmessage=Re,Ue=function(){Qe.postMessage(null)}}else Ue=function(){P(Re,0)};function Xe(T,B){U=P(function(){T(o.unstable_now())},B)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(T){T.callback=null},o.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):be=0<T?Math.floor(1e3/T):5},o.unstable_getCurrentPriorityLevel=function(){return K},o.unstable_next=function(T){switch(K){case 1:case 2:case 3:var B=3;break;default:B=K}var ee=K;K=B;try{return T()}finally{K=ee}},o.unstable_requestPaint=function(){Se=!0},o.unstable_runWithPriority=function(T,B){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var ee=K;K=T;try{return B()}finally{K=ee}},o.unstable_scheduleCallback=function(T,B,ee){var ke=o.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?ke+ee:ke):ee=ke,T){case 1:var He=-1;break;case 2:He=250;break;case 5:He=1073741823;break;case 4:He=1e4;break;default:He=5e3}return He=ee+He,T={id:X++,callback:B,priorityLevel:T,startTime:ee,expirationTime:He,sortIndex:-1},ee>ke?(T.sortIndex=ee,s(S,T),h(O)===null&&T===h(S)&&(q?(me(U),U=-1):q=!0,Xe(Y,ee-ke))):(T.sortIndex=He,s(O,T),L||oe||(L=!0,J||(J=!0,Ue()))),T},o.unstable_shouldYield=Ee,o.unstable_wrapCallback=function(T){var B=K;return function(){var ee=K;K=B;try{return T.apply(this,arguments)}finally{K=ee}}}})(Vs)),Vs}var lh;function H1(){return lh||(lh=1,Gs.exports=N1()),Gs.exports}var Xs={exports:{}},Gt={};var ah;function B1(){if(ah)return Gt;ah=1;var o=$s();function s(O){var S="https://react.dev/errors/"+O;if(1<arguments.length){S+="?args[]="+encodeURIComponent(arguments[1]);for(var X=2;X<arguments.length;X++)S+="&args[]="+encodeURIComponent(arguments[X])}return"Minified React error #"+O+"; visit "+S+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(){}var u={d:{f:h,r:function(){throw Error(s(522))},D:h,C:h,L:h,m:h,X:h,S:h,M:h},p:0,findDOMNode:null},m=Symbol.for("react.portal");function p(O,S,X){var H=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:m,key:H==null?null:""+H,children:O,containerInfo:S,implementation:X}}var D=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function _(O,S){if(O==="font")return"";if(typeof S=="string")return S==="use-credentials"?S:""}return Gt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Gt.createPortal=function(O,S){var X=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!S||S.nodeType!==1&&S.nodeType!==9&&S.nodeType!==11)throw Error(s(299));return p(O,S,null,X)},Gt.flushSync=function(O){var S=D.T,X=u.p;try{if(D.T=null,u.p=2,O)return O()}finally{D.T=S,u.p=X,u.d.f()}},Gt.preconnect=function(O,S){typeof O=="string"&&(S?(S=S.crossOrigin,S=typeof S=="string"?S==="use-credentials"?S:"":void 0):S=null,u.d.C(O,S))},Gt.prefetchDNS=function(O){typeof O=="string"&&u.d.D(O)},Gt.preinit=function(O,S){if(typeof O=="string"&&S&&typeof S.as=="string"){var X=S.as,H=_(X,S.crossOrigin),K=typeof S.integrity=="string"?S.integrity:void 0,oe=typeof S.fetchPriority=="string"?S.fetchPriority:void 0;X==="style"?u.d.S(O,typeof S.precedence=="string"?S.precedence:void 0,{crossOrigin:H,integrity:K,fetchPriority:oe}):X==="script"&&u.d.X(O,{crossOrigin:H,integrity:K,fetchPriority:oe,nonce:typeof S.nonce=="string"?S.nonce:void 0})}},Gt.preinitModule=function(O,S){if(typeof O=="string")if(typeof S=="object"&&S!==null){if(S.as==null||S.as==="script"){var X=_(S.as,S.crossOrigin);u.d.M(O,{crossOrigin:X,integrity:typeof S.integrity=="string"?S.integrity:void 0,nonce:typeof S.nonce=="string"?S.nonce:void 0})}}else S==null&&u.d.M(O)},Gt.preload=function(O,S){if(typeof O=="string"&&typeof S=="object"&&S!==null&&typeof S.as=="string"){var X=S.as,H=_(X,S.crossOrigin);u.d.L(O,X,{crossOrigin:H,integrity:typeof S.integrity=="string"?S.integrity:void 0,nonce:typeof S.nonce=="string"?S.nonce:void 0,type:typeof S.type=="string"?S.type:void 0,fetchPriority:typeof S.fetchPriority=="string"?S.fetchPriority:void 0,referrerPolicy:typeof S.referrerPolicy=="string"?S.referrerPolicy:void 0,imageSrcSet:typeof S.imageSrcSet=="string"?S.imageSrcSet:void 0,imageSizes:typeof S.imageSizes=="string"?S.imageSizes:void 0,media:typeof S.media=="string"?S.media:void 0})}},Gt.preloadModule=function(O,S){if(typeof O=="string")if(S){var X=_(S.as,S.crossOrigin);u.d.m(O,{as:typeof S.as=="string"&&S.as!=="script"?S.as:void 0,crossOrigin:X,integrity:typeof S.integrity=="string"?S.integrity:void 0})}else u.d.m(O)},Gt.requestFormReset=function(O){u.d.r(O)},Gt.unstable_batchedUpdates=function(O,S){return O(S)},Gt.useFormState=function(O,S,X){return D.H.useFormState(O,S,X)},Gt.useFormStatus=function(){return D.H.useHostTransitionStatus()},Gt.version="19.2.4",Gt}var ih;function j1(){if(ih)return Xs.exports;ih=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(s){console.error(s)}}return o(),Xs.exports=B1(),Xs.exports}var oh;function q1(){if(oh)return qi;oh=1;var o=H1(),s=$s(),h=j1();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function m(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function p(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function D(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function _(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function O(e){if(p(e)!==e)throw Error(u(188))}function S(e){var t=e.alternate;if(!t){if(t=p(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,l=t;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return O(a),e;if(i===l)return O(a),t;i=i.sibling}throw Error(u(188))}if(n.return!==l.return)n=a,l=i;else{for(var r=!1,d=a.child;d;){if(d===n){r=!0,n=a,l=i;break}if(d===l){r=!0,l=a,n=i;break}d=d.sibling}if(!r){for(d=i.child;d;){if(d===n){r=!0,n=i,l=a;break}if(d===l){r=!0,l=i,n=a;break}d=d.sibling}if(!r)throw Error(u(189))}}if(n.alternate!==l)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function X(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=X(e),t!==null)return t;e=e.sibling}return null}var H=Object.assign,K=Symbol.for("react.element"),oe=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),Se=Symbol.for("react.strict_mode"),P=Symbol.for("react.profiler"),me=Symbol.for("react.consumer"),ae=Symbol.for("react.context"),ue=Symbol.for("react.forward_ref"),Y=Symbol.for("react.suspense"),J=Symbol.for("react.suspense_list"),U=Symbol.for("react.memo"),be=Symbol.for("react.lazy"),ge=Symbol.for("react.activity"),Ee=Symbol.for("react.memo_cache_sentinel"),Re=Symbol.iterator;function Ue(e){return e===null||typeof e!="object"?null:(e=Re&&e[Re]||e["@@iterator"],typeof e=="function"?e:null)}var ut=Symbol.for("react.client.reference");function Qe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ut?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case q:return"Fragment";case P:return"Profiler";case Se:return"StrictMode";case Y:return"Suspense";case J:return"SuspenseList";case ge:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case L:return"Portal";case ae:return e.displayName||"Context";case me:return(e._context.displayName||"Context")+".Consumer";case ue:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case U:return t=e.displayName||null,t!==null?t:Qe(e.type)||"Memo";case be:t=e._payload,e=e._init;try{return Qe(e(t))}catch{}}return null}var Xe=Array.isArray,T=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=h.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},ke=[],He=-1;function y(e){return{current:e}}function k(e){0>He||(e.current=ke[He],ke[He]=null,He--)}function V(e,t){He++,ke[He]=e.current,e.current=t}var W=y(null),G=y(null),Ce=y(null),pe=y(null);function rt(e,t){switch(V(Ce,t),V(G,e),V(W,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?f0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=f0(t),e=d0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}k(W),V(W,e)}function Ze(){k(W),k(G),k(Ce)}function Kt(e){e.memoizedState!==null&&V(pe,e);var t=W.current,n=d0(t,e.type);t!==n&&(V(G,e),V(W,n))}function te(e){G.current===e&&(k(W),k(G)),pe.current===e&&(k(pe),Li._currentValue=ee)}var Bt,ft;function Me(e){if(Bt===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Bt=t&&t[1]||"",ft=-1<n.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Bt+e+ft}var pt=!1;function jt(e,t){if(!e||pt)return"";pt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var j=function(){throw Error()};if(Object.defineProperty(j.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(j,[])}catch(E){var A=E}Reflect.construct(e,[],j)}else{try{j.call()}catch(E){A=E}e.call(j.prototype)}}else{try{throw Error()}catch(E){A=E}(j=e())&&typeof j.catch=="function"&&j.catch(function(){})}}catch(E){if(E&&A&&typeof E.stack=="string")return[E.stack,A.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),r=i[0],d=i[1];if(r&&d){var g=r.split(`
4
+ `),M=d.split(`
5
+ `);for(a=l=0;l<g.length&&!g[l].includes("DetermineComponentFrameRoot");)l++;for(;a<M.length&&!M[a].includes("DetermineComponentFrameRoot");)a++;if(l===g.length||a===M.length)for(l=g.length-1,a=M.length-1;1<=l&&0<=a&&g[l]!==M[a];)a--;for(;1<=l&&0<=a;l--,a--)if(g[l]!==M[a]){if(l!==1||a!==1)do if(l--,a--,0>a||g[l]!==M[a]){var R=`
6
+ `+g[l].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),R}while(1<=l&&0<=a);break}}}finally{pt=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Me(n):""}function fn(e,t){switch(e.tag){case 26:case 27:case 5:return Me(e.type);case 16:return Me("Lazy");case 13:return e.child!==t&&t!==null?Me("Suspense Fallback"):Me("Suspense");case 19:return Me("SuspenseList");case 0:case 15:return jt(e.type,!1);case 11:return jt(e.type.render,!1);case 1:return jt(e.type,!0);case 31:return Me("Activity");default:return""}}function qn(e){try{var t="",n=null;do t+=fn(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
7
+ Error generating stack: `+l.message+`
8
+ `+l.stack}}var ta=Object.prototype.hasOwnProperty,rl=o.unstable_scheduleCallback,qt=o.unstable_cancelCallback,Ll=o.unstable_shouldYield,En=o.unstable_requestPaint,_t=o.unstable_now,Ka=o.unstable_getCurrentPriorityLevel,cl=o.unstable_ImmediatePriority,na=o.unstable_UserBlockingPriority,la=o.unstable_NormalPriority,Fi=o.unstable_LowPriority,$i=o.unstable_IdlePriority,wr=o.log,zr=o.unstable_setDisableYieldValue,Ul=null,Xt=null;function Dn(e){if(typeof wr=="function"&&zr(e),Xt&&typeof Xt.setStrictMode=="function")try{Xt.setStrictMode(Ul,e)}catch{}}var Yt=Math.clz32?Math.clz32:Tr,Mr=Math.log,aa=Math.LN2;function Tr(e){return e>>>=0,e===0?32:31-(Mr(e)/aa|0)|0}var ia=256,Nl=262144,oa=4194304;function Yn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ra(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var a=0,i=e.suspendedLanes,r=e.pingedLanes;e=e.warmLanes;var d=l&134217727;return d!==0?(l=d&~i,l!==0?a=Yn(l):(r&=d,r!==0?a=Yn(r):n||(n=d&~e,n!==0&&(a=Yn(n))))):(d=l&~i,d!==0?a=Yn(d):r!==0?a=Yn(r):n||(n=l&~e,n!==0&&(a=Yn(n)))),a===0?0:t!==0&&t!==a&&(t&i)===0&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function Hl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ar(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Wi(){var e=oa;return oa<<=1,(oa&62914560)===0&&(oa=4194304),e}function ca(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function wn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Er(e,t,n,l,a,i){var r=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var d=e.entanglements,g=e.expirationTimes,M=e.hiddenUpdates;for(n=r&~n;0<n;){var R=31-Yt(n),j=1<<R;d[R]=0,g[R]=-1;var A=M[R];if(A!==null)for(M[R]=null,R=0;R<A.length;R++){var E=A[R];E!==null&&(E.lane&=-536870913)}n&=~j}l!==0&&Ii(e,l,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(r&~t))}function Ii(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-Yt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function zn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-Yt(n),a=1<<l;a&t|e[l]&t&&(e[l]|=t),n&=~a}}function Pi(e,t){var n=t&-t;return n=(n&42)!==0?1:kn(n),(n&(e.suspendedLanes|t))!==0?0:n}function kn(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function _n(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Gn(){var e=B.p;return e!==0?e:(e=window.event,e===void 0?32:U0(e.type))}function Ja(e,t){var n=B.p;try{return B.p=e,t()}finally{B.p=n}}var Qt=Math.random().toString(36).slice(2),mt="__reactFiber$"+Qt,Rt="__reactProps$"+Qt,sl="__reactContainer$"+Qt,Fa="__reactEvents$"+Qt,eo="__reactListeners$"+Qt,ne="__reactHandles$"+Qt,Q="__reactResources$"+Qt,I="__reactMarker$"+Qt;function re(e){delete e[mt],delete e[Rt],delete e[Fa],delete e[eo],delete e[ne]}function fe(e){var t=e[mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[sl]||n[mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=b0(e);e!==null;){if(n=e[mt])return n;e=b0(e)}return t}e=n,n=e.parentNode}return null}function ie(e){if(e=e[mt]||e[sl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Te(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function we(e){var t=e[Q];return t||(t=e[Q]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Z(e){e[I]=!0}var De=new Set,Oe={};function it(e,t){ye(e,t),ye(e+"Capture",t)}function ye(e,t){for(Oe[e]=t,e=0;e<t.length;e++)De.add(t[e])}var ct=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Pe={},dn={};function $a(e){return ta.call(dn,e)?!0:ta.call(Pe,e)?!1:ct.test(e)?dn[e]=!0:(Pe[e]=!0,!1)}function Jt(e,t,n){if($a(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function sa(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Vn(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function hn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function nu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function kh(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var a=l.get,i=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(r){n=""+r,i.call(this,r)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(r){n=""+r},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Dr(e){if(!e._valueTracker){var t=nu(e)?"checked":"value";e._valueTracker=kh(e,t,""+e[t])}}function lu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=nu(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function to(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var _h=/[\n"\\]/g;function pn(e){return e.replace(_h,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function kr(e,t,n,l,a,i,r,d){e.name="",r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.type=r:e.removeAttribute("type"),t!=null?r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+hn(t)):e.value!==""+hn(t)&&(e.value=""+hn(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?_r(e,r,hn(t)):n!=null?_r(e,r,hn(n)):l!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+hn(d):e.removeAttribute("name")}function au(e,t,n,l,a,i,r,d){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Dr(e);return}n=n!=null?""+hn(n):"",t=t!=null?""+hn(t):n,d||t===e.value||(e.value=t),e.defaultValue=t}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=d?e.checked:!!l,e.defaultChecked=!!l,r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.name=r),Dr(e)}function _r(e,t,n){t==="number"&&to(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function ua(e,t,n,l){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&l&&(e[n].defaultSelected=!0)}else{for(n=""+hn(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,l&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function iu(e,t,n){if(t!=null&&(t=""+hn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+hn(n):""}function ou(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(u(92));if(Xe(l)){if(1<l.length)throw Error(u(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=hn(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),Dr(e)}function fa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Rh=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ru(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||Rh.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function cu(e,t,n){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var a in t)l=t[a],t.hasOwnProperty(a)&&n[a]!==l&&ru(e,a,l)}else for(var i in t)t.hasOwnProperty(i)&&ru(e,i,t[i])}function Rr(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Oh=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Lh=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function no(e){return Lh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Xn(){}var Or=null;function Lr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var da=null,ha=null;function su(e){var t=ie(e);if(t&&(e=t.stateNode)){var n=e[Rt]||null;e:switch(e=t.stateNode,t.type){case"input":if(kr(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+pn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var a=l[Rt]||null;if(!a)throw Error(u(90));kr(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&lu(l)}break e;case"textarea":iu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&ua(e,!!n.multiple,t,!1)}}}var Ur=!1;function uu(e,t,n){if(Ur)return e(t,n);Ur=!0;try{var l=e(t);return l}finally{if(Ur=!1,(da!==null||ha!==null)&&(Xo(),da&&(t=da,e=ha,ha=da=null,su(t),e)))for(t=0;t<e.length;t++)su(e[t])}}function Wa(e,t){var n=e.stateNode;if(n===null)return null;var l=n[Rt]||null;if(l===null)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(u(231,t,typeof n));return n}var Qn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nr=!1;if(Qn)try{var Ia={};Object.defineProperty(Ia,"passive",{get:function(){Nr=!0}}),window.addEventListener("test",Ia,Ia),window.removeEventListener("test",Ia,Ia)}catch{Nr=!1}var ul=null,Hr=null,lo=null;function fu(){if(lo)return lo;var e,t=Hr,n=t.length,l,a="value"in ul?ul.value:ul.textContent,i=a.length;for(e=0;e<n&&t[e]===a[e];e++);var r=n-e;for(l=1;l<=r&&t[n-l]===a[i-l];l++);return lo=a.slice(e,1<l?1-l:void 0)}function ao(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function io(){return!0}function du(){return!1}function Ft(e){function t(n,l,a,i,r){this._reactName=n,this._targetInst=a,this.type=l,this.nativeEvent=i,this.target=r,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(n=e[d],this[d]=n?n(i):i[d]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?io:du,this.isPropagationStopped=du,this}return H(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=io)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=io)},persist:function(){},isPersistent:io}),t}var Bl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},oo=Ft(Bl),Pa=H({},Bl,{view:0,detail:0}),Uh=Ft(Pa),Br,jr,ei,ro=H({},Pa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Yr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ei&&(ei&&e.type==="mousemove"?(Br=e.screenX-ei.screenX,jr=e.screenY-ei.screenY):jr=Br=0,ei=e),Br)},movementY:function(e){return"movementY"in e?e.movementY:jr}}),hu=Ft(ro),Nh=H({},ro,{dataTransfer:0}),Hh=Ft(Nh),Bh=H({},Pa,{relatedTarget:0}),qr=Ft(Bh),jh=H({},Bl,{animationName:0,elapsedTime:0,pseudoElement:0}),qh=Ft(jh),Yh=H({},Bl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gh=Ft(Yh),Vh=H({},Bl,{data:0}),pu=Ft(Vh),Xh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Qh={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Zh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Kh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Zh[e])?!!t[e]:!1}function Yr(){return Kh}var Jh=H({},Pa,{key:function(e){if(e.key){var t=Xh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ao(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Qh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Yr,charCode:function(e){return e.type==="keypress"?ao(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ao(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Fh=Ft(Jh),$h=H({},ro,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),mu=Ft($h),Wh=H({},Pa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yr}),Ih=Ft(Wh),Ph=H({},Bl,{propertyName:0,elapsedTime:0,pseudoElement:0}),ep=Ft(Ph),tp=H({},ro,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),np=Ft(tp),lp=H({},Bl,{newState:0,oldState:0}),ap=Ft(lp),ip=[9,13,27,32],Gr=Qn&&"CompositionEvent"in window,ti=null;Qn&&"documentMode"in document&&(ti=document.documentMode);var op=Qn&&"TextEvent"in window&&!ti,gu=Qn&&(!Gr||ti&&8<ti&&11>=ti),yu=" ",vu=!1;function bu(e,t){switch(e){case"keyup":return ip.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pa=!1;function rp(e,t){switch(e){case"compositionend":return xu(t);case"keypress":return t.which!==32?null:(vu=!0,yu);case"textInput":return e=t.data,e===yu&&vu?null:e;default:return null}}function cp(e,t){if(pa)return e==="compositionend"||!Gr&&bu(e,t)?(e=fu(),lo=Hr=ul=null,pa=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return gu&&t.locale!=="ko"?null:t.data;default:return null}}var sp={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Su(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!sp[e.type]:t==="textarea"}function Cu(e,t,n,l){da?ha?ha.push(l):ha=[l]:da=l,t=Wo(t,"onChange"),0<t.length&&(n=new oo("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var ni=null,li=null;function up(e){i0(e,0)}function co(e){var t=Te(e);if(lu(t))return e}function wu(e,t){if(e==="change")return t}var zu=!1;if(Qn){var Vr;if(Qn){var Xr="oninput"in document;if(!Xr){var Mu=document.createElement("div");Mu.setAttribute("oninput","return;"),Xr=typeof Mu.oninput=="function"}Vr=Xr}else Vr=!1;zu=Vr&&(!document.documentMode||9<document.documentMode)}function Tu(){ni&&(ni.detachEvent("onpropertychange",Au),li=ni=null)}function Au(e){if(e.propertyName==="value"&&co(li)){var t=[];Cu(t,li,e,Lr(e)),uu(up,t)}}function fp(e,t,n){e==="focusin"?(Tu(),ni=t,li=n,ni.attachEvent("onpropertychange",Au)):e==="focusout"&&Tu()}function dp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return co(li)}function hp(e,t){if(e==="click")return co(t)}function pp(e,t){if(e==="input"||e==="change")return co(t)}function mp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var nn=typeof Object.is=="function"?Object.is:mp;function ai(e,t){if(nn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var a=n[l];if(!ta.call(t,a)||!nn(e[a],t[a]))return!1}return!0}function Eu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Du(e,t){var n=Eu(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Eu(n)}}function ku(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ku(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _u(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=to(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=to(e.document)}return t}function Qr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var gp=Qn&&"documentMode"in document&&11>=document.documentMode,ma=null,Zr=null,ii=null,Kr=!1;function Ru(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kr||ma==null||ma!==to(l)||(l=ma,"selectionStart"in l&&Qr(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),ii&&ai(ii,l)||(ii=l,l=Wo(Zr,"onSelect"),0<l.length&&(t=new oo("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=ma)))}function jl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ga={animationend:jl("Animation","AnimationEnd"),animationiteration:jl("Animation","AnimationIteration"),animationstart:jl("Animation","AnimationStart"),transitionrun:jl("Transition","TransitionRun"),transitionstart:jl("Transition","TransitionStart"),transitioncancel:jl("Transition","TransitionCancel"),transitionend:jl("Transition","TransitionEnd")},Jr={},Ou={};Qn&&(Ou=document.createElement("div").style,"AnimationEvent"in window||(delete ga.animationend.animation,delete ga.animationiteration.animation,delete ga.animationstart.animation),"TransitionEvent"in window||delete ga.transitionend.transition);function ql(e){if(Jr[e])return Jr[e];if(!ga[e])return e;var t=ga[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ou)return Jr[e]=t[n];return e}var Lu=ql("animationend"),Uu=ql("animationiteration"),Nu=ql("animationstart"),yp=ql("transitionrun"),vp=ql("transitionstart"),bp=ql("transitioncancel"),Hu=ql("transitionend"),Bu=new Map,Fr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Fr.push("scrollEnd");function Mn(e,t){Bu.set(e,t),it(t,[e])}var so=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},mn=[],ya=0,$r=0;function uo(){for(var e=ya,t=$r=ya=0;t<e;){var n=mn[t];mn[t++]=null;var l=mn[t];mn[t++]=null;var a=mn[t];mn[t++]=null;var i=mn[t];if(mn[t++]=null,l!==null&&a!==null){var r=l.pending;r===null?a.next=a:(a.next=r.next,r.next=a),l.pending=a}i!==0&&ju(n,a,i)}}function fo(e,t,n,l){mn[ya++]=e,mn[ya++]=t,mn[ya++]=n,mn[ya++]=l,$r|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Wr(e,t,n,l){return fo(e,t,n,l),ho(e)}function Yl(e,t){return fo(e,null,null,t),ho(e)}function ju(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var a=!1,i=e.return;i!==null;)i.childLanes|=n,l=i.alternate,l!==null&&(l.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(a=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,a&&t!==null&&(a=31-Yt(n),e=i.hiddenUpdates,l=e[a],l===null?e[a]=[t]:l.push(t),t.lane=n|536870912),i):null}function ho(e){if(50<Ai)throw Ai=0,os=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var va={};function xp(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ln(e,t,n,l){return new xp(e,t,n,l)}function Ir(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Zn(e,t){var n=e.alternate;return n===null?(n=ln(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function qu(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function po(e,t,n,l,a,i){var r=0;if(l=e,typeof e=="function")Ir(e)&&(r=1);else if(typeof e=="string")r=Mm(e,n,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ge:return e=ln(31,n,t,a),e.elementType=ge,e.lanes=i,e;case q:return Gl(n.children,a,i,t);case Se:r=8,a|=24;break;case P:return e=ln(12,n,t,a|2),e.elementType=P,e.lanes=i,e;case Y:return e=ln(13,n,t,a),e.elementType=Y,e.lanes=i,e;case J:return e=ln(19,n,t,a),e.elementType=J,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ae:r=10;break e;case me:r=9;break e;case ue:r=11;break e;case U:r=14;break e;case be:r=16,l=null;break e}r=29,n=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=ln(r,n,t,a),t.elementType=e,t.type=l,t.lanes=i,t}function Gl(e,t,n,l){return e=ln(7,e,l,t),e.lanes=n,e}function Pr(e,t,n){return e=ln(6,e,null,t),e.lanes=n,e}function Yu(e){var t=ln(18,null,null,0);return t.stateNode=e,t}function ec(e,t,n){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Gu=new WeakMap;function gn(e,t){if(typeof e=="object"&&e!==null){var n=Gu.get(e);return n!==void 0?n:(t={value:e,source:t,stack:qn(t)},Gu.set(e,t),t)}return{value:e,source:t,stack:qn(t)}}var ba=[],xa=0,mo=null,oi=0,yn=[],vn=0,fl=null,Rn=1,On="";function Kn(e,t){ba[xa++]=oi,ba[xa++]=mo,mo=e,oi=t}function Vu(e,t,n){yn[vn++]=Rn,yn[vn++]=On,yn[vn++]=fl,fl=e;var l=Rn;e=On;var a=32-Yt(l)-1;l&=~(1<<a),n+=1;var i=32-Yt(t)+a;if(30<i){var r=a-a%5;i=(l&(1<<r)-1).toString(32),l>>=r,a-=r,Rn=1<<32-Yt(t)+a|n<<a|l,On=i+e}else Rn=1<<i|n<<a|l,On=e}function tc(e){e.return!==null&&(Kn(e,1),Vu(e,1,0))}function nc(e){for(;e===mo;)mo=ba[--xa],ba[xa]=null,oi=ba[--xa],ba[xa]=null;for(;e===fl;)fl=yn[--vn],yn[vn]=null,On=yn[--vn],yn[vn]=null,Rn=yn[--vn],yn[vn]=null}function Xu(e,t){yn[vn++]=Rn,yn[vn++]=On,yn[vn++]=fl,Rn=t.id,On=t.overflow,fl=e}var Ot=null,dt=null,Ve=!1,dl=null,bn=!1,lc=Error(u(519));function hl(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ri(gn(t,e)),lc}function Qu(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[mt]=e,t[Rt]=l,n){case"dialog":qe("cancel",t),qe("close",t);break;case"iframe":case"object":case"embed":qe("load",t);break;case"video":case"audio":for(n=0;n<Di.length;n++)qe(Di[n],t);break;case"source":qe("error",t);break;case"img":case"image":case"link":qe("error",t),qe("load",t);break;case"details":qe("toggle",t);break;case"input":qe("invalid",t),au(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":qe("invalid",t);break;case"textarea":qe("invalid",t),ou(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||s0(t.textContent,n)?(l.popover!=null&&(qe("beforetoggle",t),qe("toggle",t)),l.onScroll!=null&&qe("scroll",t),l.onScrollEnd!=null&&qe("scrollend",t),l.onClick!=null&&(t.onclick=Xn),t=!0):t=!1,t||hl(e,!0)}function Zu(e){for(Ot=e.return;Ot;)switch(Ot.tag){case 5:case 31:case 13:bn=!1;return;case 27:case 3:bn=!0;return;default:Ot=Ot.return}}function Sa(e){if(e!==Ot)return!1;if(!Ve)return Zu(e),Ve=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Ss(e.type,e.memoizedProps)),n=!n),n&&dt&&hl(e),Zu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));dt=v0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));dt=v0(e)}else t===27?(t=dt,Al(e.type)?(e=Ts,Ts=null,dt=e):dt=t):dt=Ot?Sn(e.stateNode.nextSibling):null;return!0}function Vl(){dt=Ot=null,Ve=!1}function ac(){var e=dl;return e!==null&&(Pt===null?Pt=e:Pt.push.apply(Pt,e),dl=null),e}function ri(e){dl===null?dl=[e]:dl.push(e)}var ic=y(null),Xl=null,Jn=null;function pl(e,t,n){V(ic,t._currentValue),t._currentValue=n}function Fn(e){e._currentValue=ic.current,k(ic)}function oc(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function rc(e,t,n,l){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var i=a.dependencies;if(i!==null){var r=a.child;i=i.firstContext;e:for(;i!==null;){var d=i;i=a;for(var g=0;g<t.length;g++)if(d.context===t[g]){i.lanes|=n,d=i.alternate,d!==null&&(d.lanes|=n),oc(i.return,n,e),l||(r=null);break e}i=d.next}}else if(a.tag===18){if(r=a.return,r===null)throw Error(u(341));r.lanes|=n,i=r.alternate,i!==null&&(i.lanes|=n),oc(r,n,e),r=null}else r=a.child;if(r!==null)r.return=a;else for(r=a;r!==null;){if(r===e){r=null;break}if(a=r.sibling,a!==null){a.return=r.return,r=a;break}r=r.return}a=r}}function Ca(e,t,n,l){e=null;for(var a=t,i=!1;a!==null;){if(!i){if((a.flags&524288)!==0)i=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var r=a.alternate;if(r===null)throw Error(u(387));if(r=r.memoizedProps,r!==null){var d=a.type;nn(a.pendingProps.value,r.value)||(e!==null?e.push(d):e=[d])}}else if(a===pe.current){if(r=a.alternate,r===null)throw Error(u(387));r.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(Li):e=[Li])}a=a.return}e!==null&&rc(t,e,n,l),t.flags|=262144}function go(e){for(e=e.firstContext;e!==null;){if(!nn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ql(e){Xl=e,Jn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Lt(e){return Ku(Xl,e)}function yo(e,t){return Xl===null&&Ql(e),Ku(e,t)}function Ku(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Jn===null){if(e===null)throw Error(u(308));Jn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Jn=Jn.next=t;return n}var Sp=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Cp=o.unstable_scheduleCallback,wp=o.unstable_NormalPriority,wt={$$typeof:ae,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function cc(){return{controller:new Sp,data:new Map,refCount:0}}function ci(e){e.refCount--,e.refCount===0&&Cp(wp,function(){e.controller.abort()})}var si=null,sc=0,wa=0,za=null;function zp(e,t){if(si===null){var n=si=[];sc=0,wa=ds(),za={status:"pending",value:void 0,then:function(l){n.push(l)}}}return sc++,t.then(Ju,Ju),t}function Ju(){if(--sc===0&&si!==null){za!==null&&(za.status="fulfilled");var e=si;si=null,wa=0,za=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Mp(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(l.status="rejected",l.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),l}var Fu=T.S;T.S=function(e,t){Od=_t(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&zp(e,t),Fu!==null&&Fu(e,t)};var Zl=y(null);function uc(){var e=Zl.current;return e!==null?e:ot.pooledCache}function vo(e,t){t===null?V(Zl,Zl.current):V(Zl,t.pool)}function $u(){var e=uc();return e===null?null:{parent:wt._currentValue,pool:e}}var Ma=Error(u(460)),fc=Error(u(474)),bo=Error(u(542)),xo={then:function(){}};function Wu(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Iu(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Xn,Xn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ef(e),e;default:if(typeof t.status=="string")t.then(Xn,Xn);else{if(e=ot,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=l}},function(l){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ef(e),e}throw Jl=t,Ma}}function Kl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Jl=n,Ma):n}}var Jl=null;function Pu(){if(Jl===null)throw Error(u(459));var e=Jl;return Jl=null,e}function ef(e){if(e===Ma||e===bo)throw Error(u(483))}var Ta=null,ui=0;function So(e){var t=ui;return ui+=1,Ta===null&&(Ta=[]),Iu(Ta,e,t)}function fi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Co(e,t){throw t.$$typeof===K?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function tf(e){function t(C,v){if(e){var z=C.deletions;z===null?(C.deletions=[v],C.flags|=16):z.push(v)}}function n(C,v){if(!e)return null;for(;v!==null;)t(C,v),v=v.sibling;return null}function l(C){for(var v=new Map;C!==null;)C.key!==null?v.set(C.key,C):v.set(C.index,C),C=C.sibling;return v}function a(C,v){return C=Zn(C,v),C.index=0,C.sibling=null,C}function i(C,v,z){return C.index=z,e?(z=C.alternate,z!==null?(z=z.index,z<v?(C.flags|=67108866,v):z):(C.flags|=67108866,v)):(C.flags|=1048576,v)}function r(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function d(C,v,z,N){return v===null||v.tag!==6?(v=Pr(z,C.mode,N),v.return=C,v):(v=a(v,z),v.return=C,v)}function g(C,v,z,N){var xe=z.type;return xe===q?R(C,v,z.props.children,N,z.key):v!==null&&(v.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===be&&Kl(xe)===v.type)?(v=a(v,z.props),fi(v,z),v.return=C,v):(v=po(z.type,z.key,z.props,null,C.mode,N),fi(v,z),v.return=C,v)}function M(C,v,z,N){return v===null||v.tag!==4||v.stateNode.containerInfo!==z.containerInfo||v.stateNode.implementation!==z.implementation?(v=ec(z,C.mode,N),v.return=C,v):(v=a(v,z.children||[]),v.return=C,v)}function R(C,v,z,N,xe){return v===null||v.tag!==7?(v=Gl(z,C.mode,N,xe),v.return=C,v):(v=a(v,z),v.return=C,v)}function j(C,v,z){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return v=Pr(""+v,C.mode,z),v.return=C,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case oe:return z=po(v.type,v.key,v.props,null,C.mode,z),fi(z,v),z.return=C,z;case L:return v=ec(v,C.mode,z),v.return=C,v;case be:return v=Kl(v),j(C,v,z)}if(Xe(v)||Ue(v))return v=Gl(v,C.mode,z,null),v.return=C,v;if(typeof v.then=="function")return j(C,So(v),z);if(v.$$typeof===ae)return j(C,yo(C,v),z);Co(C,v)}return null}function A(C,v,z,N){var xe=v!==null?v.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return xe!==null?null:d(C,v,""+z,N);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case oe:return z.key===xe?g(C,v,z,N):null;case L:return z.key===xe?M(C,v,z,N):null;case be:return z=Kl(z),A(C,v,z,N)}if(Xe(z)||Ue(z))return xe!==null?null:R(C,v,z,N,null);if(typeof z.then=="function")return A(C,v,So(z),N);if(z.$$typeof===ae)return A(C,v,yo(C,z),N);Co(C,z)}return null}function E(C,v,z,N,xe){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return C=C.get(z)||null,d(v,C,""+N,xe);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case oe:return C=C.get(N.key===null?z:N.key)||null,g(v,C,N,xe);case L:return C=C.get(N.key===null?z:N.key)||null,M(v,C,N,xe);case be:return N=Kl(N),E(C,v,z,N,xe)}if(Xe(N)||Ue(N))return C=C.get(z)||null,R(v,C,N,xe,null);if(typeof N.then=="function")return E(C,v,z,So(N),xe);if(N.$$typeof===ae)return E(C,v,z,yo(v,N),xe);Co(v,N)}return null}function ce(C,v,z,N){for(var xe=null,Ke=null,de=v,Be=v=0,Ge=null;de!==null&&Be<z.length;Be++){de.index>Be?(Ge=de,de=null):Ge=de.sibling;var Je=A(C,de,z[Be],N);if(Je===null){de===null&&(de=Ge);break}e&&de&&Je.alternate===null&&t(C,de),v=i(Je,v,Be),Ke===null?xe=Je:Ke.sibling=Je,Ke=Je,de=Ge}if(Be===z.length)return n(C,de),Ve&&Kn(C,Be),xe;if(de===null){for(;Be<z.length;Be++)de=j(C,z[Be],N),de!==null&&(v=i(de,v,Be),Ke===null?xe=de:Ke.sibling=de,Ke=de);return Ve&&Kn(C,Be),xe}for(de=l(de);Be<z.length;Be++)Ge=E(de,C,Be,z[Be],N),Ge!==null&&(e&&Ge.alternate!==null&&de.delete(Ge.key===null?Be:Ge.key),v=i(Ge,v,Be),Ke===null?xe=Ge:Ke.sibling=Ge,Ke=Ge);return e&&de.forEach(function(Rl){return t(C,Rl)}),Ve&&Kn(C,Be),xe}function ze(C,v,z,N){if(z==null)throw Error(u(151));for(var xe=null,Ke=null,de=v,Be=v=0,Ge=null,Je=z.next();de!==null&&!Je.done;Be++,Je=z.next()){de.index>Be?(Ge=de,de=null):Ge=de.sibling;var Rl=A(C,de,Je.value,N);if(Rl===null){de===null&&(de=Ge);break}e&&de&&Rl.alternate===null&&t(C,de),v=i(Rl,v,Be),Ke===null?xe=Rl:Ke.sibling=Rl,Ke=Rl,de=Ge}if(Je.done)return n(C,de),Ve&&Kn(C,Be),xe;if(de===null){for(;!Je.done;Be++,Je=z.next())Je=j(C,Je.value,N),Je!==null&&(v=i(Je,v,Be),Ke===null?xe=Je:Ke.sibling=Je,Ke=Je);return Ve&&Kn(C,Be),xe}for(de=l(de);!Je.done;Be++,Je=z.next())Je=E(de,C,Be,Je.value,N),Je!==null&&(e&&Je.alternate!==null&&de.delete(Je.key===null?Be:Je.key),v=i(Je,v,Be),Ke===null?xe=Je:Ke.sibling=Je,Ke=Je);return e&&de.forEach(function(Nm){return t(C,Nm)}),Ve&&Kn(C,Be),xe}function at(C,v,z,N){if(typeof z=="object"&&z!==null&&z.type===q&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case oe:e:{for(var xe=z.key;v!==null;){if(v.key===xe){if(xe=z.type,xe===q){if(v.tag===7){n(C,v.sibling),N=a(v,z.props.children),N.return=C,C=N;break e}}else if(v.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===be&&Kl(xe)===v.type){n(C,v.sibling),N=a(v,z.props),fi(N,z),N.return=C,C=N;break e}n(C,v);break}else t(C,v);v=v.sibling}z.type===q?(N=Gl(z.props.children,C.mode,N,z.key),N.return=C,C=N):(N=po(z.type,z.key,z.props,null,C.mode,N),fi(N,z),N.return=C,C=N)}return r(C);case L:e:{for(xe=z.key;v!==null;){if(v.key===xe)if(v.tag===4&&v.stateNode.containerInfo===z.containerInfo&&v.stateNode.implementation===z.implementation){n(C,v.sibling),N=a(v,z.children||[]),N.return=C,C=N;break e}else{n(C,v);break}else t(C,v);v=v.sibling}N=ec(z,C.mode,N),N.return=C,C=N}return r(C);case be:return z=Kl(z),at(C,v,z,N)}if(Xe(z))return ce(C,v,z,N);if(Ue(z)){if(xe=Ue(z),typeof xe!="function")throw Error(u(150));return z=xe.call(z),ze(C,v,z,N)}if(typeof z.then=="function")return at(C,v,So(z),N);if(z.$$typeof===ae)return at(C,v,yo(C,z),N);Co(C,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,v!==null&&v.tag===6?(n(C,v.sibling),N=a(v,z),N.return=C,C=N):(n(C,v),N=Pr(z,C.mode,N),N.return=C,C=N),r(C)):n(C,v)}return function(C,v,z,N){try{ui=0;var xe=at(C,v,z,N);return Ta=null,xe}catch(de){if(de===Ma||de===bo)throw de;var Ke=ln(29,de,null,C.mode);return Ke.lanes=N,Ke.return=C,Ke}}}var Fl=tf(!0),nf=tf(!1),ml=!1;function dc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function hc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function gl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function yl(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Fe&2)!==0){var a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,t=ho(e),ju(e,null,n),t}return fo(e,l,t,n),ho(e)}function di(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,zn(e,n)}}function pc(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var r={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=r:i=i.next=r,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var mc=!1;function hi(){if(mc){var e=za;if(e!==null)throw e}}function pi(e,t,n,l){mc=!1;var a=e.updateQueue;ml=!1;var i=a.firstBaseUpdate,r=a.lastBaseUpdate,d=a.shared.pending;if(d!==null){a.shared.pending=null;var g=d,M=g.next;g.next=null,r===null?i=M:r.next=M,r=g;var R=e.alternate;R!==null&&(R=R.updateQueue,d=R.lastBaseUpdate,d!==r&&(d===null?R.firstBaseUpdate=M:d.next=M,R.lastBaseUpdate=g))}if(i!==null){var j=a.baseState;r=0,R=M=g=null,d=i;do{var A=d.lane&-536870913,E=A!==d.lane;if(E?(Ye&A)===A:(l&A)===A){A!==0&&A===wa&&(mc=!0),R!==null&&(R=R.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var ce=e,ze=d;A=t;var at=n;switch(ze.tag){case 1:if(ce=ze.payload,typeof ce=="function"){j=ce.call(at,j,A);break e}j=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=ze.payload,A=typeof ce=="function"?ce.call(at,j,A):ce,A==null)break e;j=H({},j,A);break e;case 2:ml=!0}}A=d.callback,A!==null&&(e.flags|=64,E&&(e.flags|=8192),E=a.callbacks,E===null?a.callbacks=[A]:E.push(A))}else E={lane:A,tag:d.tag,payload:d.payload,callback:d.callback,next:null},R===null?(M=R=E,g=j):R=R.next=E,r|=A;if(d=d.next,d===null){if(d=a.shared.pending,d===null)break;E=d,d=E.next,E.next=null,a.lastBaseUpdate=E,a.shared.pending=null}}while(!0);R===null&&(g=j),a.baseState=g,a.firstBaseUpdate=M,a.lastBaseUpdate=R,i===null&&(a.shared.lanes=0),Cl|=r,e.lanes=r,e.memoizedState=j}}function lf(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function af(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)lf(n[e],t)}var Aa=y(null),wo=y(0);function of(e,t){e=al,V(wo,e),V(Aa,t),al=e|t.baseLanes}function gc(){V(wo,al),V(Aa,Aa.current)}function yc(){al=wo.current,k(Aa),k(wo)}var an=y(null),xn=null;function vl(e){var t=e.alternate;V(St,St.current&1),V(an,e),xn===null&&(t===null||Aa.current!==null||t.memoizedState!==null)&&(xn=e)}function vc(e){V(St,St.current),V(an,e),xn===null&&(xn=e)}function rf(e){e.tag===22?(V(St,St.current),V(an,e),xn===null&&(xn=e)):bl()}function bl(){V(St,St.current),V(an,an.current)}function on(e){k(an),xn===e&&(xn=null),k(St)}var St=y(0);function zo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||zs(n)||Ms(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var $n=0,Ne=null,nt=null,zt=null,Mo=!1,Ea=!1,$l=!1,To=0,mi=0,Da=null,Tp=0;function yt(){throw Error(u(321))}function bc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!nn(e[n],t[n]))return!1;return!0}function xc(e,t,n,l,a,i){return $n=i,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?Xf:Uc,$l=!1,i=n(l,a),$l=!1,Ea&&(i=sf(t,n,l,a)),cf(e),i}function cf(e){T.H=vi;var t=nt!==null&&nt.next!==null;if($n=0,zt=nt=Ne=null,Mo=!1,mi=0,Da=null,t)throw Error(u(300));e===null||Mt||(e=e.dependencies,e!==null&&go(e)&&(Mt=!0))}function sf(e,t,n,l){Ne=e;var a=0;do{if(Ea&&(Da=null),mi=0,Ea=!1,25<=a)throw Error(u(301));if(a+=1,zt=nt=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}T.H=Qf,i=t(n,l)}while(Ea);return i}function Ap(){var e=T.H,t=e.useState()[0];return t=typeof t.then=="function"?gi(t):t,e=e.useState()[0],(nt!==null?nt.memoizedState:null)!==e&&(Ne.flags|=1024),t}function Sc(){var e=To!==0;return To=0,e}function Cc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function wc(e){if(Mo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Mo=!1}$n=0,zt=nt=Ne=null,Ea=!1,mi=To=0,Da=null}function Zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zt===null?Ne.memoizedState=zt=e:zt=zt.next=e,zt}function Ct(){if(nt===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=nt.next;var t=zt===null?Ne.memoizedState:zt.next;if(t!==null)zt=t,nt=e;else{if(e===null)throw Ne.alternate===null?Error(u(467)):Error(u(310));nt=e,e={memoizedState:nt.memoizedState,baseState:nt.baseState,baseQueue:nt.baseQueue,queue:nt.queue,next:null},zt===null?Ne.memoizedState=zt=e:zt=zt.next=e}return zt}function Ao(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function gi(e){var t=mi;return mi+=1,Da===null&&(Da=[]),e=Iu(Da,e,t),t=Ne,(zt===null?t.memoizedState:zt.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?Xf:Uc),e}function Eo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return gi(e);if(e.$$typeof===ae)return Lt(e)}throw Error(u(438,String(e)))}function zc(e){var t=null,n=Ne.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=Ne.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Ao(),Ne.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=Ee;return t.index++,n}function Wn(e,t){return typeof t=="function"?t(e):t}function Do(e){var t=Ct();return Mc(t,nt,e)}function Mc(e,t,n){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=n;var a=e.baseQueue,i=l.pending;if(i!==null){if(a!==null){var r=a.next;a.next=i.next,i.next=r}t.baseQueue=a=i,l.pending=null}if(i=e.baseState,a===null)e.memoizedState=i;else{t=a.next;var d=r=null,g=null,M=t,R=!1;do{var j=M.lane&-536870913;if(j!==M.lane?(Ye&j)===j:($n&j)===j){var A=M.revertLane;if(A===0)g!==null&&(g=g.next={lane:0,revertLane:0,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null}),j===wa&&(R=!0);else if(($n&A)===A){M=M.next,A===wa&&(R=!0);continue}else j={lane:0,revertLane:M.revertLane,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},g===null?(d=g=j,r=i):g=g.next=j,Ne.lanes|=A,Cl|=A;j=M.action,$l&&n(i,j),i=M.hasEagerState?M.eagerState:n(i,j)}else A={lane:j,revertLane:M.revertLane,gesture:M.gesture,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},g===null?(d=g=A,r=i):g=g.next=A,Ne.lanes|=j,Cl|=j;M=M.next}while(M!==null&&M!==t);if(g===null?r=i:g.next=d,!nn(i,e.memoizedState)&&(Mt=!0,R&&(n=za,n!==null)))throw n;e.memoizedState=i,e.baseState=r,e.baseQueue=g,l.lastRenderedState=i}return a===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Tc(e){var t=Ct(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var l=n.dispatch,a=n.pending,i=t.memoizedState;if(a!==null){n.pending=null;var r=a=a.next;do i=e(i,r.action),r=r.next;while(r!==a);nn(i,t.memoizedState)||(Mt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,l]}function uf(e,t,n){var l=Ne,a=Ct(),i=Ve;if(i){if(n===void 0)throw Error(u(407));n=n()}else n=t();var r=!nn((nt||a).memoizedState,n);if(r&&(a.memoizedState=n,Mt=!0),a=a.queue,Dc(hf.bind(null,l,a,e),[e]),a.getSnapshot!==t||r||zt!==null&&zt.memoizedState.tag&1){if(l.flags|=2048,ka(9,{destroy:void 0},df.bind(null,l,a,n,t),null),ot===null)throw Error(u(349));i||($n&127)!==0||ff(l,t,n)}return n}function ff(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ne.updateQueue,t===null?(t=Ao(),Ne.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function df(e,t,n,l){t.value=n,t.getSnapshot=l,pf(t)&&mf(e)}function hf(e,t,n){return n(function(){pf(t)&&mf(e)})}function pf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!nn(e,n)}catch{return!0}}function mf(e){var t=Yl(e,2);t!==null&&en(t,e,2)}function Ac(e){var t=Zt();if(typeof e=="function"){var n=e;if(e=n(),$l){Dn(!0);try{n()}finally{Dn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:e},t}function gf(e,t,n,l){return e.baseState=n,Mc(e,nt,typeof l=="function"?l:Wn)}function Ep(e,t,n,l,a){if(Ro(e))throw Error(u(485));if(e=t.action,e!==null){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(r){i.listeners.push(r)}};T.T!==null?n(!0):i.isTransition=!1,l(i),n=t.pending,n===null?(i.next=t.pending=i,yf(t,i)):(i.next=n.next,t.pending=n.next=i)}}function yf(e,t){var n=t.action,l=t.payload,a=e.state;if(t.isTransition){var i=T.T,r={};T.T=r;try{var d=n(a,l),g=T.S;g!==null&&g(r,d),vf(e,t,d)}catch(M){Ec(e,t,M)}finally{i!==null&&r.types!==null&&(i.types=r.types),T.T=i}}else try{i=n(a,l),vf(e,t,i)}catch(M){Ec(e,t,M)}}function vf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){bf(e,t,l)},function(l){return Ec(e,t,l)}):bf(e,t,n)}function bf(e,t,n){t.status="fulfilled",t.value=n,xf(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,yf(e,n)))}function Ec(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,xf(t),t=t.next;while(t!==l)}e.action=null}function xf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Sf(e,t){return t}function Cf(e,t){if(Ve){var n=ot.formState;if(n!==null){e:{var l=Ne;if(Ve){if(dt){t:{for(var a=dt,i=bn;a.nodeType!==8;){if(!i){a=null;break t}if(a=Sn(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){dt=Sn(a.nextSibling),l=a.data==="F!";break e}}hl(l)}l=!1}l&&(t=n[0])}}return n=Zt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sf,lastRenderedState:t},n.queue=l,n=Yf.bind(null,Ne,l),l.dispatch=n,l=Ac(!1),i=Lc.bind(null,Ne,!1,l.queue),l=Zt(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=Ep.bind(null,Ne,a,i,n),a.dispatch=n,l.memoizedState=e,[t,n,!1]}function wf(e){var t=Ct();return zf(t,nt,e)}function zf(e,t,n){if(t=Mc(e,t,Sf)[0],e=Do(Wn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=gi(t)}catch(r){throw r===Ma?bo:r}else l=t;t=Ct();var a=t.queue,i=a.dispatch;return n!==t.memoizedState&&(Ne.flags|=2048,ka(9,{destroy:void 0},Dp.bind(null,a,n),null)),[l,i,e]}function Dp(e,t){e.action=t}function Mf(e){var t=Ct(),n=nt;if(n!==null)return zf(t,n,e);Ct(),t=t.memoizedState,n=Ct();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function ka(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=Ne.updateQueue,t===null&&(t=Ao(),Ne.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function Tf(){return Ct().memoizedState}function ko(e,t,n,l){var a=Zt();Ne.flags|=e,a.memoizedState=ka(1|t,{destroy:void 0},n,l===void 0?null:l)}function _o(e,t,n,l){var a=Ct();l=l===void 0?null:l;var i=a.memoizedState.inst;nt!==null&&l!==null&&bc(l,nt.memoizedState.deps)?a.memoizedState=ka(t,i,n,l):(Ne.flags|=e,a.memoizedState=ka(1|t,i,n,l))}function Af(e,t){ko(8390656,8,e,t)}function Dc(e,t){_o(2048,8,e,t)}function kp(e){Ne.flags|=4;var t=Ne.updateQueue;if(t===null)t=Ao(),Ne.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ef(e){var t=Ct().memoizedState;return kp({ref:t,nextImpl:e}),function(){if((Fe&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Df(e,t){return _o(4,2,e,t)}function kf(e,t){return _o(4,4,e,t)}function _f(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Rf(e,t,n){n=n!=null?n.concat([e]):null,_o(4,4,_f.bind(null,t,e),n)}function kc(){}function Of(e,t){var n=Ct();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&bc(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Lf(e,t){var n=Ct();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&bc(t,l[1]))return l[0];if(l=e(),$l){Dn(!0);try{e()}finally{Dn(!1)}}return n.memoizedState=[l,t],l}function _c(e,t,n){return n===void 0||($n&1073741824)!==0&&(Ye&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Ud(),Ne.lanes|=e,Cl|=e,n)}function Uf(e,t,n,l){return nn(n,t)?n:Aa.current!==null?(e=_c(e,n,l),nn(e,t)||(Mt=!0),e):($n&42)===0||($n&1073741824)!==0&&(Ye&261930)===0?(Mt=!0,e.memoizedState=n):(e=Ud(),Ne.lanes|=e,Cl|=e,t)}function Nf(e,t,n,l,a){var i=B.p;B.p=i!==0&&8>i?i:8;var r=T.T,d={};T.T=d,Lc(e,!1,t,n);try{var g=a(),M=T.S;if(M!==null&&M(d,g),g!==null&&typeof g=="object"&&typeof g.then=="function"){var R=Mp(g,l);yi(e,t,R,sn(e))}else yi(e,t,l,sn(e))}catch(j){yi(e,t,{then:function(){},status:"rejected",reason:j},sn())}finally{B.p=i,r!==null&&d.types!==null&&(r.types=d.types),T.T=r}}function _p(){}function Rc(e,t,n,l){if(e.tag!==5)throw Error(u(476));var a=Hf(e).queue;Nf(e,a,t,ee,n===null?_p:function(){return Bf(e),n(l)})}function Hf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:ee},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Bf(e){var t=Hf(e);t.next===null&&(t=e.alternate.memoizedState),yi(e,t.next.queue,{},sn())}function Oc(){return Lt(Li)}function jf(){return Ct().memoizedState}function qf(){return Ct().memoizedState}function Rp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=sn();e=gl(n);var l=yl(t,e,n);l!==null&&(en(l,t,n),di(l,t,n)),t={cache:cc()},e.payload=t;return}t=t.return}}function Op(e,t,n){var l=sn();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ro(e)?Gf(t,n):(n=Wr(e,t,n,l),n!==null&&(en(n,e,l),Vf(n,t,l)))}function Yf(e,t,n){var l=sn();yi(e,t,n,l)}function yi(e,t,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ro(e))Gf(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var r=t.lastRenderedState,d=i(r,n);if(a.hasEagerState=!0,a.eagerState=d,nn(d,r))return fo(e,t,a,0),ot===null&&uo(),!1}catch{}if(n=Wr(e,t,a,l),n!==null)return en(n,e,l),Vf(n,t,l),!0}return!1}function Lc(e,t,n,l){if(l={lane:2,revertLane:ds(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ro(e)){if(t)throw Error(u(479))}else t=Wr(e,n,l,2),t!==null&&en(t,e,2)}function Ro(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function Gf(e,t){Ea=Mo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Vf(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,zn(e,n)}}var vi={readContext:Lt,use:Eo,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useLayoutEffect:yt,useInsertionEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useSyncExternalStore:yt,useId:yt,useHostTransitionStatus:yt,useFormState:yt,useActionState:yt,useOptimistic:yt,useMemoCache:yt,useCacheRefresh:yt};vi.useEffectEvent=yt;var Xf={readContext:Lt,use:Eo,useCallback:function(e,t){return Zt().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:Af,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ko(4194308,4,_f.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ko(4194308,4,e,t)},useInsertionEffect:function(e,t){ko(4,2,e,t)},useMemo:function(e,t){var n=Zt();t=t===void 0?null:t;var l=e();if($l){Dn(!0);try{e()}finally{Dn(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Zt();if(n!==void 0){var a=n(t);if($l){Dn(!0);try{n(t)}finally{Dn(!1)}}}else a=t;return l.memoizedState=l.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},l.queue=e,e=e.dispatch=Op.bind(null,Ne,e),[l.memoizedState,e]},useRef:function(e){var t=Zt();return e={current:e},t.memoizedState=e},useState:function(e){e=Ac(e);var t=e.queue,n=Yf.bind(null,Ne,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:kc,useDeferredValue:function(e,t){var n=Zt();return _c(n,e,t)},useTransition:function(){var e=Ac(!1);return e=Nf.bind(null,Ne,e.queue,!0,!1),Zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=Ne,a=Zt();if(Ve){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),ot===null)throw Error(u(349));(Ye&127)!==0||ff(l,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,Af(hf.bind(null,l,i,e),[e]),l.flags|=2048,ka(9,{destroy:void 0},df.bind(null,l,i,n,t),null),n},useId:function(){var e=Zt(),t=ot.identifierPrefix;if(Ve){var n=On,l=Rn;n=(l&~(1<<32-Yt(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=To++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Tp++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Oc,useFormState:Cf,useActionState:Cf,useOptimistic:function(e){var t=Zt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Lc.bind(null,Ne,!0,n),n.dispatch=t,[e,t]},useMemoCache:zc,useCacheRefresh:function(){return Zt().memoizedState=Rp.bind(null,Ne)},useEffectEvent:function(e){var t=Zt(),n={impl:e};return t.memoizedState=n,function(){if((Fe&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}},Uc={readContext:Lt,use:Eo,useCallback:Of,useContext:Lt,useEffect:Dc,useImperativeHandle:Rf,useInsertionEffect:Df,useLayoutEffect:kf,useMemo:Lf,useReducer:Do,useRef:Tf,useState:function(){return Do(Wn)},useDebugValue:kc,useDeferredValue:function(e,t){var n=Ct();return Uf(n,nt.memoizedState,e,t)},useTransition:function(){var e=Do(Wn)[0],t=Ct().memoizedState;return[typeof e=="boolean"?e:gi(e),t]},useSyncExternalStore:uf,useId:jf,useHostTransitionStatus:Oc,useFormState:wf,useActionState:wf,useOptimistic:function(e,t){var n=Ct();return gf(n,nt,e,t)},useMemoCache:zc,useCacheRefresh:qf};Uc.useEffectEvent=Ef;var Qf={readContext:Lt,use:Eo,useCallback:Of,useContext:Lt,useEffect:Dc,useImperativeHandle:Rf,useInsertionEffect:Df,useLayoutEffect:kf,useMemo:Lf,useReducer:Tc,useRef:Tf,useState:function(){return Tc(Wn)},useDebugValue:kc,useDeferredValue:function(e,t){var n=Ct();return nt===null?_c(n,e,t):Uf(n,nt.memoizedState,e,t)},useTransition:function(){var e=Tc(Wn)[0],t=Ct().memoizedState;return[typeof e=="boolean"?e:gi(e),t]},useSyncExternalStore:uf,useId:jf,useHostTransitionStatus:Oc,useFormState:Mf,useActionState:Mf,useOptimistic:function(e,t){var n=Ct();return nt!==null?gf(n,nt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:zc,useCacheRefresh:qf};Qf.useEffectEvent=Ef;function Nc(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:H({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Hc={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=sn(),a=gl(l);a.payload=t,n!=null&&(a.callback=n),t=yl(e,a,l),t!==null&&(en(t,e,l),di(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=sn(),a=gl(l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=yl(e,a,l),t!==null&&(en(t,e,l),di(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=sn(),l=gl(n);l.tag=2,t!=null&&(l.callback=t),t=yl(e,l,n),t!==null&&(en(t,e,n),di(t,e,n))}};function Zf(e,t,n,l,a,i,r){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,r):t.prototype&&t.prototype.isPureReactComponent?!ai(n,l)||!ai(a,i):!0}function Kf(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&Hc.enqueueReplaceState(t,t.state,null)}function Wl(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=H({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function Jf(e){so(e)}function Ff(e){console.error(e)}function $f(e){so(e)}function Oo(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Wf(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Bc(e,t,n){return n=gl(n),n.tag=3,n.payload={element:null},n.callback=function(){Oo(e,t)},n}function If(e){return e=gl(e),e.tag=3,e}function Pf(e,t,n,l){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var i=l.value;e.payload=function(){return a(i)},e.callback=function(){Wf(t,n,l)}}var r=n.stateNode;r!==null&&typeof r.componentDidCatch=="function"&&(e.callback=function(){Wf(t,n,l),typeof a!="function"&&(wl===null?wl=new Set([this]):wl.add(this));var d=l.stack;this.componentDidCatch(l.value,{componentStack:d!==null?d:""})})}function Lp(e,t,n,l,a){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&Ca(t,n,a,!0),n=an.current,n!==null){switch(n.tag){case 31:case 13:return xn===null?Qo():n.alternate===null&&vt===0&&(vt=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===xo?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),ss(e,l,a)),!1;case 22:return n.flags|=65536,l===xo?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),ss(e,l,a)),!1}throw Error(u(435,n.tag))}return ss(e,l,a),Qo(),!1}if(Ve)return t=an.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,l!==lc&&(e=Error(u(422),{cause:l}),ri(gn(e,n)))):(l!==lc&&(t=Error(u(423),{cause:l}),ri(gn(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=gn(l,n),a=Bc(e.stateNode,l,a),pc(e,a),vt!==4&&(vt=2)),!1;var i=Error(u(520),{cause:l});if(i=gn(i,n),Ti===null?Ti=[i]:Ti.push(i),vt!==4&&(vt=2),t===null)return!0;l=gn(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Bc(n.stateNode,l,e),pc(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(wl===null||!wl.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,a=If(a),Pf(a,e,n,l),pc(n,a),!1}n=n.return}while(n!==null);return!1}var jc=Error(u(461)),Mt=!1;function Ut(e,t,n,l){t.child=e===null?nf(t,null,n,l):Fl(t,e.child,n,l)}function ed(e,t,n,l,a){n=n.render;var i=t.ref;if("ref"in l){var r={};for(var d in l)d!=="ref"&&(r[d]=l[d])}else r=l;return Ql(t),l=xc(e,t,n,r,i,a),d=Sc(),e!==null&&!Mt?(Cc(e,t,a),In(e,t,a)):(Ve&&d&&tc(t),t.flags|=1,Ut(e,t,l,a),t.child)}function td(e,t,n,l,a){if(e===null){var i=n.type;return typeof i=="function"&&!Ir(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,nd(e,t,i,l,a)):(e=po(n.type,null,l,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Kc(e,a)){var r=i.memoizedProps;if(n=n.compare,n=n!==null?n:ai,n(r,l)&&e.ref===t.ref)return In(e,t,a)}return t.flags|=1,e=Zn(i,l),e.ref=t.ref,e.return=t,t.child=e}function nd(e,t,n,l,a){if(e!==null){var i=e.memoizedProps;if(ai(i,l)&&e.ref===t.ref)if(Mt=!1,t.pendingProps=l=i,Kc(e,a))(e.flags&131072)!==0&&(Mt=!0);else return t.lanes=e.lanes,In(e,t,a)}return qc(e,t,n,l,a)}function ld(e,t,n,l){var a=l.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|n:n,e!==null){for(l=t.child=e.child,a=0;l!==null;)a=a|l.lanes|l.childLanes,l=l.sibling;l=a&~i}else l=0,t.child=null;return ad(e,t,i,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vo(t,i!==null?i.cachePool:null),i!==null?of(t,i):gc(),rf(t);else return l=t.lanes=536870912,ad(e,t,i!==null?i.baseLanes|n:n,n,l)}else i!==null?(vo(t,i.cachePool),of(t,i),bl(),t.memoizedState=null):(e!==null&&vo(t,null),gc(),bl());return Ut(e,t,a,n),t.child}function bi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ad(e,t,n,l,a){var i=uc();return i=i===null?null:{parent:wt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&vo(t,null),gc(),rf(t),e!==null&&Ca(e,t,l,!0),t.childLanes=a,null}function Lo(e,t){return t=No({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function id(e,t,n){return Fl(t,e.child,null,n),e=Lo(t,t.pendingProps),e.flags|=2,on(t),t.memoizedState=null,e}function Up(e,t,n){var l=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ve){if(l.mode==="hidden")return e=Lo(t,l),t.lanes=536870912,bi(null,e);if(vc(t),(e=dt)?(e=y0(e,bn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:fl!==null?{id:Rn,overflow:On}:null,retryLane:536870912,hydrationErrors:null},n=Yu(e),n.return=t,t.child=n,Ot=t,dt=null)):e=null,e===null)throw hl(t);return t.lanes=536870912,null}return Lo(t,l)}var i=e.memoizedState;if(i!==null){var r=i.dehydrated;if(vc(t),a)if(t.flags&256)t.flags&=-257,t=id(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(Mt||Ca(e,t,n,!1),a=(n&e.childLanes)!==0,Mt||a){if(l=ot,l!==null&&(r=Pi(l,n),r!==0&&r!==i.retryLane))throw i.retryLane=r,Yl(e,r),en(l,e,r),jc;Qo(),t=id(e,t,n)}else e=i.treeContext,dt=Sn(r.nextSibling),Ot=t,Ve=!0,dl=null,bn=!1,e!==null&&Xu(t,e),t=Lo(t,l),t.flags|=4096;return t}return e=Zn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Uo(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(u(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function qc(e,t,n,l,a){return Ql(t),n=xc(e,t,n,l,void 0,a),l=Sc(),e!==null&&!Mt?(Cc(e,t,a),In(e,t,a)):(Ve&&l&&tc(t),t.flags|=1,Ut(e,t,n,a),t.child)}function od(e,t,n,l,a,i){return Ql(t),t.updateQueue=null,n=sf(t,l,n,a),cf(e),l=Sc(),e!==null&&!Mt?(Cc(e,t,i),In(e,t,i)):(Ve&&l&&tc(t),t.flags|=1,Ut(e,t,n,i),t.child)}function rd(e,t,n,l,a){if(Ql(t),t.stateNode===null){var i=va,r=n.contextType;typeof r=="object"&&r!==null&&(i=Lt(r)),i=new n(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Hc,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},dc(t),r=n.contextType,i.context=typeof r=="object"&&r!==null?Lt(r):va,i.state=t.memoizedState,r=n.getDerivedStateFromProps,typeof r=="function"&&(Nc(t,n,r,l),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(r=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),r!==i.state&&Hc.enqueueReplaceState(i,i.state,null),pi(t,l,i,a),hi(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var d=t.memoizedProps,g=Wl(n,d);i.props=g;var M=i.context,R=n.contextType;r=va,typeof R=="object"&&R!==null&&(r=Lt(R));var j=n.getDerivedStateFromProps;R=typeof j=="function"||typeof i.getSnapshotBeforeUpdate=="function",d=t.pendingProps!==d,R||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(d||M!==r)&&Kf(t,i,l,r),ml=!1;var A=t.memoizedState;i.state=A,pi(t,l,i,a),hi(),M=t.memoizedState,d||A!==M||ml?(typeof j=="function"&&(Nc(t,n,j,l),M=t.memoizedState),(g=ml||Zf(t,n,g,l,A,M,r))?(R||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=M),i.props=l,i.state=M,i.context=r,l=g):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,hc(e,t),r=t.memoizedProps,R=Wl(n,r),i.props=R,j=t.pendingProps,A=i.context,M=n.contextType,g=va,typeof M=="object"&&M!==null&&(g=Lt(M)),d=n.getDerivedStateFromProps,(M=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(r!==j||A!==g)&&Kf(t,i,l,g),ml=!1,A=t.memoizedState,i.state=A,pi(t,l,i,a),hi();var E=t.memoizedState;r!==j||A!==E||ml||e!==null&&e.dependencies!==null&&go(e.dependencies)?(typeof d=="function"&&(Nc(t,n,d,l),E=t.memoizedState),(R=ml||Zf(t,n,R,l,A,E,g)||e!==null&&e.dependencies!==null&&go(e.dependencies))?(M||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,E,g),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,E,g)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||r===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=E),i.props=l,i.state=E,i.context=g,l=R):(typeof i.componentDidUpdate!="function"||r===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||r===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,Uo(e,t),l=(t.flags&128)!==0,i||l?(i=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&l?(t.child=Fl(t,e.child,null,a),t.child=Fl(t,null,n,a)):Ut(e,t,n,a),t.memoizedState=i.state,e=t.child):e=In(e,t,a),e}function cd(e,t,n,l){return Vl(),t.flags|=256,Ut(e,t,n,l),t.child}var Yc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Gc(e){return{baseLanes:e,cachePool:$u()}}function Vc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=cn),e}function sd(e,t,n){var l=t.pendingProps,a=!1,i=(t.flags&128)!==0,r;if((r=i)||(r=e!==null&&e.memoizedState===null?!1:(St.current&2)!==0),r&&(a=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ve){if(a?vl(t):bl(),(e=dt)?(e=y0(e,bn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:fl!==null?{id:Rn,overflow:On}:null,retryLane:536870912,hydrationErrors:null},n=Yu(e),n.return=t,t.child=n,Ot=t,dt=null)):e=null,e===null)throw hl(t);return Ms(e)?t.lanes=32:t.lanes=536870912,null}var d=l.children;return l=l.fallback,a?(bl(),a=t.mode,d=No({mode:"hidden",children:d},a),l=Gl(l,a,n,null),d.return=t,l.return=t,d.sibling=l,t.child=d,l=t.child,l.memoizedState=Gc(n),l.childLanes=Vc(e,r,n),t.memoizedState=Yc,bi(null,l)):(vl(t),Xc(t,d))}var g=e.memoizedState;if(g!==null&&(d=g.dehydrated,d!==null)){if(i)t.flags&256?(vl(t),t.flags&=-257,t=Qc(e,t,n)):t.memoizedState!==null?(bl(),t.child=e.child,t.flags|=128,t=null):(bl(),d=l.fallback,a=t.mode,l=No({mode:"visible",children:l.children},a),d=Gl(d,a,n,null),d.flags|=2,l.return=t,d.return=t,l.sibling=d,t.child=l,Fl(t,e.child,null,n),l=t.child,l.memoizedState=Gc(n),l.childLanes=Vc(e,r,n),t.memoizedState=Yc,t=bi(null,l));else if(vl(t),Ms(d)){if(r=d.nextSibling&&d.nextSibling.dataset,r)var M=r.dgst;r=M,l=Error(u(419)),l.stack="",l.digest=r,ri({value:l,source:null,stack:null}),t=Qc(e,t,n)}else if(Mt||Ca(e,t,n,!1),r=(n&e.childLanes)!==0,Mt||r){if(r=ot,r!==null&&(l=Pi(r,n),l!==0&&l!==g.retryLane))throw g.retryLane=l,Yl(e,l),en(r,e,l),jc;zs(d)||Qo(),t=Qc(e,t,n)}else zs(d)?(t.flags|=192,t.child=e.child,t=null):(e=g.treeContext,dt=Sn(d.nextSibling),Ot=t,Ve=!0,dl=null,bn=!1,e!==null&&Xu(t,e),t=Xc(t,l.children),t.flags|=4096);return t}return a?(bl(),d=l.fallback,a=t.mode,g=e.child,M=g.sibling,l=Zn(g,{mode:"hidden",children:l.children}),l.subtreeFlags=g.subtreeFlags&65011712,M!==null?d=Zn(M,d):(d=Gl(d,a,n,null),d.flags|=2),d.return=t,l.return=t,l.sibling=d,t.child=l,bi(null,l),l=t.child,d=e.child.memoizedState,d===null?d=Gc(n):(a=d.cachePool,a!==null?(g=wt._currentValue,a=a.parent!==g?{parent:g,pool:g}:a):a=$u(),d={baseLanes:d.baseLanes|n,cachePool:a}),l.memoizedState=d,l.childLanes=Vc(e,r,n),t.memoizedState=Yc,bi(e.child,l)):(vl(t),n=e.child,e=n.sibling,n=Zn(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Xc(e,t){return t=No({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function No(e,t){return e=ln(22,e,null,t),e.lanes=0,e}function Qc(e,t,n){return Fl(t,e.child,null,n),e=Xc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function ud(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),oc(e.return,t,n)}function Zc(e,t,n,l,a,i){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:a,treeForkCount:i}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=l,r.tail=n,r.tailMode=a,r.treeForkCount=i)}function fd(e,t,n){var l=t.pendingProps,a=l.revealOrder,i=l.tail;l=l.children;var r=St.current,d=(r&2)!==0;if(d?(r=r&1|2,t.flags|=128):r&=1,V(St,r),Ut(e,t,l,n),l=Ve?oi:0,!d&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ud(e,n,t);else if(e.tag===19)ud(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&zo(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Zc(t,!1,a,n,i,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&zo(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Zc(t,!0,n,null,i,l);break;case"together":Zc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function In(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Cl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ca(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=Zn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Zn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Kc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&go(e)))}function Np(e,t,n){switch(t.tag){case 3:rt(t,t.stateNode.containerInfo),pl(t,wt,e.memoizedState.cache),Vl();break;case 27:case 5:Kt(t);break;case 4:rt(t,t.stateNode.containerInfo);break;case 10:pl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,vc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(vl(t),t.flags|=128,null):(n&t.child.childLanes)!==0?sd(e,t,n):(vl(t),e=In(e,t,n),e!==null?e.sibling:null);vl(t);break;case 19:var a=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(Ca(e,t,n,!1),l=(n&t.childLanes)!==0),a){if(l)return fd(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),V(St,St.current),l)break;return null;case 22:return t.lanes=0,ld(e,t,n,t.pendingProps);case 24:pl(t,wt,e.memoizedState.cache)}return In(e,t,n)}function dd(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Mt=!0;else{if(!Kc(e,n)&&(t.flags&128)===0)return Mt=!1,Np(e,t,n);Mt=(e.flags&131072)!==0}else Mt=!1,Ve&&(t.flags&1048576)!==0&&Vu(t,oi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Kl(t.elementType),t.type=e,typeof e=="function")Ir(e)?(l=Wl(e,l),t.tag=1,t=rd(null,t,e,l,n)):(t.tag=0,t=qc(null,t,e,l,n));else{if(e!=null){var a=e.$$typeof;if(a===ue){t.tag=11,t=ed(null,t,e,l,n);break e}else if(a===U){t.tag=14,t=td(null,t,e,l,n);break e}}throw t=Qe(e)||e,Error(u(306,t,""))}}return t;case 0:return qc(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,a=Wl(l,t.pendingProps),rd(e,t,l,a,n);case 3:e:{if(rt(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var i=t.memoizedState;a=i.element,hc(e,t),pi(t,l,null,n);var r=t.memoizedState;if(l=r.cache,pl(t,wt,l),l!==i.cache&&rc(t,[wt],n,!0),hi(),l=r.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:r.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=cd(e,t,l,n);break e}else if(l!==a){a=gn(Error(u(424)),t),ri(a),t=cd(e,t,l,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,dt=Sn(e.firstChild),Ot=t,Ve=!0,dl=null,bn=!0,n=nf(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Vl(),l===a){t=In(e,t,n);break e}Ut(e,t,l,n)}t=t.child}return t;case 26:return Uo(e,t),e===null?(n=w0(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ve||(n=t.type,e=t.pendingProps,l=Io(Ce.current).createElement(n),l[mt]=t,l[Rt]=e,Nt(l,n,e),Z(l),t.stateNode=l):t.memoizedState=w0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Kt(t),e===null&&Ve&&(l=t.stateNode=x0(t.type,t.pendingProps,Ce.current),Ot=t,bn=!0,a=dt,Al(t.type)?(Ts=a,dt=Sn(l.firstChild)):dt=a),Ut(e,t,t.pendingProps.children,n),Uo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ve&&((a=l=dt)&&(l=dm(l,t.type,t.pendingProps,bn),l!==null?(t.stateNode=l,Ot=t,dt=Sn(l.firstChild),bn=!1,a=!0):a=!1),a||hl(t)),Kt(t),a=t.type,i=t.pendingProps,r=e!==null?e.memoizedProps:null,l=i.children,Ss(a,i)?l=null:r!==null&&Ss(a,r)&&(t.flags|=32),t.memoizedState!==null&&(a=xc(e,t,Ap,null,null,n),Li._currentValue=a),Uo(e,t),Ut(e,t,l,n),t.child;case 6:return e===null&&Ve&&((e=n=dt)&&(n=hm(n,t.pendingProps,bn),n!==null?(t.stateNode=n,Ot=t,dt=null,e=!0):e=!1),e||hl(t)),null;case 13:return sd(e,t,n);case 4:return rt(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Fl(t,null,l,n):Ut(e,t,l,n),t.child;case 11:return ed(e,t,t.type,t.pendingProps,n);case 7:return Ut(e,t,t.pendingProps,n),t.child;case 8:return Ut(e,t,t.pendingProps.children,n),t.child;case 12:return Ut(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,pl(t,t.type,l.value),Ut(e,t,l.children,n),t.child;case 9:return a=t.type._context,l=t.pendingProps.children,Ql(t),a=Lt(a),l=l(a),t.flags|=1,Ut(e,t,l,n),t.child;case 14:return td(e,t,t.type,t.pendingProps,n);case 15:return nd(e,t,t.type,t.pendingProps,n);case 19:return fd(e,t,n);case 31:return Up(e,t,n);case 22:return ld(e,t,n,t.pendingProps);case 24:return Ql(t),l=Lt(wt),e===null?(a=uc(),a===null&&(a=ot,i=cc(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=n),a=i),t.memoizedState={parent:l,cache:a},dc(t),pl(t,wt,a)):((e.lanes&n)!==0&&(hc(e,t),pi(t,null,null,n),hi()),a=e.memoizedState,i=t.memoizedState,a.parent!==l?(a={parent:l,cache:l},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),pl(t,wt,l)):(l=i.cache,pl(t,wt,l),l!==a.cache&&rc(t,[wt],n,!0))),Ut(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Pn(e){e.flags|=4}function Jc(e,t,n,l,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(jd())e.flags|=8192;else throw Jl=xo,fc}else e.flags&=-16777217}function hd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!E0(t))if(jd())e.flags|=8192;else throw Jl=xo,fc}function Ho(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Wi():536870912,e.lanes|=t,La|=t)}function xi(e,t){if(!Ve)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags&65011712,l|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function Hp(e,t,n){var l=t.pendingProps;switch(nc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(t),null;case 1:return ht(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Fn(wt),Ze(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Sa(t)?Pn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ac())),ht(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(Pn(t),i!==null?(ht(t),hd(t,i)):(ht(t),Jc(t,a,null,l,n))):i?i!==e.memoizedState?(Pn(t),ht(t),hd(t,i)):(ht(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Pn(t),ht(t),Jc(t,a,e,l,n)),null;case 27:if(te(t),n=Ce.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Pn(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return ht(t),null}e=W.current,Sa(t)?Qu(t):(e=x0(a,l,n),t.stateNode=e,Pn(t))}return ht(t),null;case 5:if(te(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Pn(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return ht(t),null}if(i=W.current,Sa(t))Qu(t);else{var r=Io(Ce.current);switch(i){case 1:i=r.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=r.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=r.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=r.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=r.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?r.createElement("select",{is:l.is}):r.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?r.createElement(a,{is:l.is}):r.createElement(a)}}i[mt]=t,i[Rt]=l;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)i.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=i;e:switch(Nt(i,a,l),a){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Pn(t)}}return ht(t),Jc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Pn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=Ce.current,Sa(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=Ot,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[mt]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||s0(e.nodeValue,n)),e||hl(t,!0)}else e=Io(e).createTextNode(l),e[mt]=t,t.stateNode=e}return ht(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=Sa(t),n!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[mt]=t}else Vl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),e=!1}else n=ac(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(on(t),t):(on(t),null);if((t.flags&128)!==0)throw Error(u(558))}return ht(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Sa(t),l!==null&&l.dehydrated!==null){if(e===null){if(!a)throw Error(u(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(u(317));a[mt]=t}else Vl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),a=!1}else a=ac(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(on(t),t):(on(t),null)}return on(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==a&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ho(t,t.updateQueue),ht(t),null);case 4:return Ze(),e===null&&gs(t.stateNode.containerInfo),ht(t),null;case 10:return Fn(t.type),ht(t),null;case 19:if(k(St),l=t.memoizedState,l===null)return ht(t),null;if(a=(t.flags&128)!==0,i=l.rendering,i===null)if(a)xi(l,!1);else{if(vt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=zo(e),i!==null){for(t.flags|=128,xi(l,!1),e=i.updateQueue,t.updateQueue=e,Ho(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)qu(n,e),n=n.sibling;return V(St,St.current&1|2),Ve&&Kn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&_t()>Go&&(t.flags|=128,a=!0,xi(l,!1),t.lanes=4194304)}else{if(!a)if(e=zo(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ho(t,e),xi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!Ve)return ht(t),null}else 2*_t()-l.renderingStartTime>Go&&n!==536870912&&(t.flags|=128,a=!0,xi(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=_t(),e.sibling=null,n=St.current,V(St,a?n&1|2:n&1),Ve&&Kn(t,l.treeForkCount),e):(ht(t),null);case 22:case 23:return on(t),yc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),n=t.updateQueue,n!==null&&Ho(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&k(Zl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Fn(wt),ht(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Bp(e,t){switch(nc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Fn(wt),Ze(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return te(t),null;case 31:if(t.memoizedState!==null){if(on(t),t.alternate===null)throw Error(u(340));Vl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(on(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Vl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return k(St),null;case 4:return Ze(),null;case 10:return Fn(t.type),null;case 22:case 23:return on(t),yc(),e!==null&&k(Zl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Fn(wt),null;case 25:return null;default:return null}}function pd(e,t){switch(nc(t),t.tag){case 3:Fn(wt),Ze();break;case 26:case 27:case 5:te(t);break;case 4:Ze();break;case 31:t.memoizedState!==null&&on(t);break;case 13:on(t);break;case 19:k(St);break;case 10:Fn(t.type);break;case 22:case 23:on(t),yc(),e!==null&&k(Zl);break;case 24:Fn(wt)}}function Si(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&e)===e){l=void 0;var i=n.create,r=n.inst;l=i(),r.destroy=l}n=n.next}while(n!==a)}}catch(d){tt(t,t.return,d)}}function xl(e,t,n){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var i=a.next;l=i;do{if((l.tag&e)===e){var r=l.inst,d=r.destroy;if(d!==void 0){r.destroy=void 0,a=t;var g=n,M=d;try{M()}catch(R){tt(a,g,R)}}}l=l.next}while(l!==i)}}catch(R){tt(t,t.return,R)}}function md(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{af(t,n)}catch(l){tt(e,e.return,l)}}}function gd(e,t,n){n.props=Wl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){tt(e,t,l)}}function Ci(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(a){tt(e,t,a)}}function Ln(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){tt(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){tt(e,t,a)}else n.current=null}function yd(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(a){tt(e,e.return,a)}}function Fc(e,t,n){try{var l=e.stateNode;om(l,e.type,n,t),l[Rt]=t}catch(a){tt(e,e.return,a)}}function vd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Al(e.type)||e.tag===4}function $c(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vd(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Al(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Wc(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xn));else if(l!==4&&(l===27&&Al(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Wc(e,t,n),e=e.sibling;e!==null;)Wc(e,t,n),e=e.sibling}function Bo(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&Al(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Bo(e,t,n),e=e.sibling;e!==null;)Bo(e,t,n),e=e.sibling}function bd(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Nt(t,l,n),t[mt]=e,t[Rt]=n}catch(i){tt(e,e.return,i)}}var el=!1,Tt=!1,Ic=!1,xd=typeof WeakSet=="function"?WeakSet:Set,Dt=null;function jp(e,t){if(e=e.containerInfo,bs=ir,e=_u(e),Qr(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var a=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var r=0,d=-1,g=-1,M=0,R=0,j=e,A=null;t:for(;;){for(var E;j!==n||a!==0&&j.nodeType!==3||(d=r+a),j!==i||l!==0&&j.nodeType!==3||(g=r+l),j.nodeType===3&&(r+=j.nodeValue.length),(E=j.firstChild)!==null;)A=j,j=E;for(;;){if(j===e)break t;if(A===n&&++M===a&&(d=r),A===i&&++R===l&&(g=r),(E=j.nextSibling)!==null)break;j=A,A=j.parentNode}j=E}n=d===-1||g===-1?null:{start:d,end:g}}else n=null}n=n||{start:0,end:0}}else n=null;for(xs={focusedElem:e,selectionRange:n},ir=!1,Dt=t;Dt!==null;)if(t=Dt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Dt=e;else for(;Dt!==null;){switch(t=Dt,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,n=t,a=i.memoizedProps,i=i.memoizedState,l=n.stateNode;try{var ce=Wl(n.type,a);e=l.getSnapshotBeforeUpdate(ce,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(ze){tt(n,n.return,ze)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ws(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ws(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,Dt=e;break}Dt=t.return}}function Sd(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:nl(e,n),l&4&&Si(5,n);break;case 1:if(nl(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(r){tt(n,n.return,r)}else{var a=Wl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){tt(n,n.return,r)}}l&64&&md(n),l&512&&Ci(n,n.return);break;case 3:if(nl(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{af(e,t)}catch(r){tt(n,n.return,r)}}break;case 27:t===null&&l&4&&bd(n);case 26:case 5:nl(e,n),t===null&&l&4&&yd(n),l&512&&Ci(n,n.return);break;case 12:nl(e,n);break;case 31:nl(e,n),l&4&&zd(e,n);break;case 13:nl(e,n),l&4&&Md(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Jp.bind(null,n),pm(e,n))));break;case 22:if(l=n.memoizedState!==null||el,!l){t=t!==null&&t.memoizedState!==null||Tt,a=el;var i=Tt;el=l,(Tt=t)&&!i?ll(e,n,(n.subtreeFlags&8772)!==0):nl(e,n),el=a,Tt=i}break;case 30:break;default:nl(e,n)}}function Cd(e){var t=e.alternate;t!==null&&(e.alternate=null,Cd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&re(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var gt=null,$t=!1;function tl(e,t,n){for(n=n.child;n!==null;)wd(e,t,n),n=n.sibling}function wd(e,t,n){if(Xt&&typeof Xt.onCommitFiberUnmount=="function")try{Xt.onCommitFiberUnmount(Ul,n)}catch{}switch(n.tag){case 26:Tt||Ln(n,t),tl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Tt||Ln(n,t);var l=gt,a=$t;Al(n.type)&&(gt=n.stateNode,$t=!1),tl(e,t,n),_i(n.stateNode),gt=l,$t=a;break;case 5:Tt||Ln(n,t);case 6:if(l=gt,a=$t,gt=null,tl(e,t,n),gt=l,$t=a,gt!==null)if($t)try{(gt.nodeType===9?gt.body:gt.nodeName==="HTML"?gt.ownerDocument.body:gt).removeChild(n.stateNode)}catch(i){tt(n,t,i)}else try{gt.removeChild(n.stateNode)}catch(i){tt(n,t,i)}break;case 18:gt!==null&&($t?(e=gt,m0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Ga(e)):m0(gt,n.stateNode));break;case 4:l=gt,a=$t,gt=n.stateNode.containerInfo,$t=!0,tl(e,t,n),gt=l,$t=a;break;case 0:case 11:case 14:case 15:xl(2,n,t),Tt||xl(4,n,t),tl(e,t,n);break;case 1:Tt||(Ln(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&gd(n,t,l)),tl(e,t,n);break;case 21:tl(e,t,n);break;case 22:Tt=(l=Tt)||n.memoizedState!==null,tl(e,t,n),Tt=l;break;default:tl(e,t,n)}}function zd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ga(e)}catch(n){tt(t,t.return,n)}}}function Md(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ga(e)}catch(n){tt(t,t.return,n)}}function qp(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new xd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new xd),t;default:throw Error(u(435,e.tag))}}function jo(e,t){var n=qp(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var a=Fp.bind(null,e,l);l.then(a,a)}})}function Wt(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l],i=e,r=t,d=r;e:for(;d!==null;){switch(d.tag){case 27:if(Al(d.type)){gt=d.stateNode,$t=!1;break e}break;case 5:gt=d.stateNode,$t=!1;break e;case 3:case 4:gt=d.stateNode.containerInfo,$t=!0;break e}d=d.return}if(gt===null)throw Error(u(160));wd(i,r,a),gt=null,$t=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Td(t,e),t=t.sibling}var Tn=null;function Td(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Wt(t,e),It(e),l&4&&(xl(3,e,e.return),Si(3,e),xl(5,e,e.return));break;case 1:Wt(t,e),It(e),l&512&&(Tt||n===null||Ln(n,n.return)),l&64&&el&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var a=Tn;if(Wt(t,e),It(e),l&512&&(Tt||n===null||Ln(n,n.return)),l&4){var i=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(l){case"title":i=a.getElementsByTagName("title")[0],(!i||i[I]||i[mt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(l),a.head.insertBefore(i,a.querySelector("head > title"))),Nt(i,l,n),i[mt]=e,Z(i),l=i;break e;case"link":var r=T0("link","href",a).get(l+(n.href||""));if(r){for(var d=0;d<r.length;d++)if(i=r[d],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){r.splice(d,1);break t}}i=a.createElement(l),Nt(i,l,n),a.head.appendChild(i);break;case"meta":if(r=T0("meta","content",a).get(l+(n.content||""))){for(d=0;d<r.length;d++)if(i=r[d],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){r.splice(d,1);break t}}i=a.createElement(l),Nt(i,l,n),a.head.appendChild(i);break;default:throw Error(u(468,l))}i[mt]=e,Z(i),l=i}e.stateNode=l}else A0(a,e.type,e.stateNode);else e.stateNode=M0(a,l,e.memoizedProps);else i!==l?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,l===null?A0(a,e.type,e.stateNode):M0(a,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Fc(e,e.memoizedProps,n.memoizedProps)}break;case 27:Wt(t,e),It(e),l&512&&(Tt||n===null||Ln(n,n.return)),n!==null&&l&4&&Fc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Wt(t,e),It(e),l&512&&(Tt||n===null||Ln(n,n.return)),e.flags&32){a=e.stateNode;try{fa(a,"")}catch(ce){tt(e,e.return,ce)}}l&4&&e.stateNode!=null&&(a=e.memoizedProps,Fc(e,a,n!==null?n.memoizedProps:a)),l&1024&&(Ic=!0);break;case 6:if(Wt(t,e),It(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(ce){tt(e,e.return,ce)}}break;case 3:if(tr=null,a=Tn,Tn=Po(t.containerInfo),Wt(t,e),Tn=a,It(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Ga(t.containerInfo)}catch(ce){tt(e,e.return,ce)}Ic&&(Ic=!1,Ad(e));break;case 4:l=Tn,Tn=Po(e.stateNode.containerInfo),Wt(t,e),It(e),Tn=l;break;case 12:Wt(t,e),It(e);break;case 31:Wt(t,e),It(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,jo(e,l)));break;case 13:Wt(t,e),It(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Yo=_t()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,jo(e,l)));break;case 22:a=e.memoizedState!==null;var g=n!==null&&n.memoizedState!==null,M=el,R=Tt;if(el=M||a,Tt=R||g,Wt(t,e),Tt=R,el=M,It(e),l&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||g||el||Tt||Il(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){g=n=t;try{if(i=g.stateNode,a)r=i.style,typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none";else{d=g.stateNode;var j=g.memoizedProps.style,A=j!=null&&j.hasOwnProperty("display")?j.display:null;d.style.display=A==null||typeof A=="boolean"?"":(""+A).trim()}}catch(ce){tt(g,g.return,ce)}}}else if(t.tag===6){if(n===null){g=t;try{g.stateNode.nodeValue=a?"":g.memoizedProps}catch(ce){tt(g,g.return,ce)}}}else if(t.tag===18){if(n===null){g=t;try{var E=g.stateNode;a?g0(E,!0):g0(g.stateNode,!1)}catch(ce){tt(g,g.return,ce)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,jo(e,n))));break;case 19:Wt(t,e),It(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,jo(e,l)));break;case 30:break;case 21:break;default:Wt(t,e),It(e)}}function It(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(vd(l)){n=l;break}l=l.return}if(n==null)throw Error(u(160));switch(n.tag){case 27:var a=n.stateNode,i=$c(e);Bo(e,i,a);break;case 5:var r=n.stateNode;n.flags&32&&(fa(r,""),n.flags&=-33);var d=$c(e);Bo(e,d,r);break;case 3:case 4:var g=n.stateNode.containerInfo,M=$c(e);Wc(e,M,g);break;default:throw Error(u(161))}}catch(R){tt(e,e.return,R)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Ad(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Ad(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function nl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Sd(e,t.alternate,t),t=t.sibling}function Il(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:xl(4,t,t.return),Il(t);break;case 1:Ln(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&gd(t,t.return,n),Il(t);break;case 27:_i(t.stateNode);case 26:case 5:Ln(t,t.return),Il(t);break;case 22:t.memoizedState===null&&Il(t);break;case 30:Il(t);break;default:Il(t)}e=e.sibling}}function ll(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,a=e,i=t,r=i.flags;switch(i.tag){case 0:case 11:case 15:ll(a,i,n),Si(4,i);break;case 1:if(ll(a,i,n),l=i,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(M){tt(l,l.return,M)}if(l=i,a=l.updateQueue,a!==null){var d=l.stateNode;try{var g=a.shared.hiddenCallbacks;if(g!==null)for(a.shared.hiddenCallbacks=null,a=0;a<g.length;a++)lf(g[a],d)}catch(M){tt(l,l.return,M)}}n&&r&64&&md(i),Ci(i,i.return);break;case 27:bd(i);case 26:case 5:ll(a,i,n),n&&l===null&&r&4&&yd(i),Ci(i,i.return);break;case 12:ll(a,i,n);break;case 31:ll(a,i,n),n&&r&4&&zd(a,i);break;case 13:ll(a,i,n),n&&r&4&&Md(a,i);break;case 22:i.memoizedState===null&&ll(a,i,n),Ci(i,i.return);break;case 30:break;default:ll(a,i,n)}t=t.sibling}}function Pc(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ci(n))}function es(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ci(e))}function An(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ed(e,t,n,l),t=t.sibling}function Ed(e,t,n,l){var a=t.flags;switch(t.tag){case 0:case 11:case 15:An(e,t,n,l),a&2048&&Si(9,t);break;case 1:An(e,t,n,l);break;case 3:An(e,t,n,l),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ci(e)));break;case 12:if(a&2048){An(e,t,n,l),e=t.stateNode;try{var i=t.memoizedProps,r=i.id,d=i.onPostCommit;typeof d=="function"&&d(r,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(g){tt(t,t.return,g)}}else An(e,t,n,l);break;case 31:An(e,t,n,l);break;case 13:An(e,t,n,l);break;case 23:break;case 22:i=t.stateNode,r=t.alternate,t.memoizedState!==null?i._visibility&2?An(e,t,n,l):wi(e,t):i._visibility&2?An(e,t,n,l):(i._visibility|=2,_a(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),a&2048&&Pc(r,t);break;case 24:An(e,t,n,l),a&2048&&es(t.alternate,t);break;default:An(e,t,n,l)}}function _a(e,t,n,l,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,r=t,d=n,g=l,M=r.flags;switch(r.tag){case 0:case 11:case 15:_a(i,r,d,g,a),Si(8,r);break;case 23:break;case 22:var R=r.stateNode;r.memoizedState!==null?R._visibility&2?_a(i,r,d,g,a):wi(i,r):(R._visibility|=2,_a(i,r,d,g,a)),a&&M&2048&&Pc(r.alternate,r);break;case 24:_a(i,r,d,g,a),a&&M&2048&&es(r.alternate,r);break;default:_a(i,r,d,g,a)}t=t.sibling}}function wi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,a=l.flags;switch(l.tag){case 22:wi(n,l),a&2048&&Pc(l.alternate,l);break;case 24:wi(n,l),a&2048&&es(l.alternate,l);break;default:wi(n,l)}t=t.sibling}}var zi=8192;function Ra(e,t,n){if(e.subtreeFlags&zi)for(e=e.child;e!==null;)Dd(e,t,n),e=e.sibling}function Dd(e,t,n){switch(e.tag){case 26:Ra(e,t,n),e.flags&zi&&e.memoizedState!==null&&Tm(n,Tn,e.memoizedState,e.memoizedProps);break;case 5:Ra(e,t,n);break;case 3:case 4:var l=Tn;Tn=Po(e.stateNode.containerInfo),Ra(e,t,n),Tn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=zi,zi=16777216,Ra(e,t,n),zi=l):Ra(e,t,n));break;default:Ra(e,t,n)}}function kd(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Mi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Dt=l,Rd(l,e)}kd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)_d(e),e=e.sibling}function _d(e){switch(e.tag){case 0:case 11:case 15:Mi(e),e.flags&2048&&xl(9,e,e.return);break;case 3:Mi(e);break;case 12:Mi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qo(e)):Mi(e);break;default:Mi(e)}}function qo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];Dt=l,Rd(l,e)}kd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:xl(8,t,t.return),qo(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,qo(t));break;default:qo(t)}e=e.sibling}}function Rd(e,t){for(;Dt!==null;){var n=Dt;switch(n.tag){case 0:case 11:case 15:xl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ci(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,Dt=l;else e:for(n=e;Dt!==null;){l=Dt;var a=l.sibling,i=l.return;if(Cd(l),l===n){Dt=null;break e}if(a!==null){a.return=i,Dt=a;break e}Dt=i}}}var Yp={getCacheForType:function(e){var t=Lt(wt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Lt(wt).controller.signal}},Gp=typeof WeakMap=="function"?WeakMap:Map,Fe=0,ot=null,je=null,Ye=0,et=0,rn=null,Sl=!1,Oa=!1,ts=!1,al=0,vt=0,Cl=0,Pl=0,ns=0,cn=0,La=0,Ti=null,Pt=null,ls=!1,Yo=0,Od=0,Go=1/0,Vo=null,wl=null,Et=0,zl=null,Ua=null,il=0,as=0,is=null,Ld=null,Ai=0,os=null;function sn(){return(Fe&2)!==0&&Ye!==0?Ye&-Ye:T.T!==null?ds():Gn()}function Ud(){if(cn===0)if((Ye&536870912)===0||Ve){var e=Nl;Nl<<=1,(Nl&3932160)===0&&(Nl=262144),cn=e}else cn=536870912;return e=an.current,e!==null&&(e.flags|=32),cn}function en(e,t,n){(e===ot&&(et===2||et===9)||e.cancelPendingCommit!==null)&&(Na(e,0),Ml(e,Ye,cn,!1)),wn(e,n),((Fe&2)===0||e!==ot)&&(e===ot&&((Fe&2)===0&&(Pl|=n),vt===4&&Ml(e,Ye,cn,!1)),Un(e))}function Nd(e,t,n){if((Fe&6)!==0)throw Error(u(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Hl(e,t),a=l?Qp(e,t):cs(e,t,!0),i=l;do{if(a===0){Oa&&!l&&Ml(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!Vp(n)){a=cs(e,t,!1),i=!1;continue}if(a===2){if(i=t,e.errorRecoveryDisabledLanes&i)var r=0;else r=e.pendingLanes&-536870913,r=r!==0?r:r&536870912?536870912:0;if(r!==0){t=r;e:{var d=e;a=Ti;var g=d.current.memoizedState.isDehydrated;if(g&&(Na(d,r).flags|=256),r=cs(d,r,!1),r!==2){if(ts&&!g){d.errorRecoveryDisabledLanes|=i,Pl|=i,a=4;break e}i=Pt,Pt=a,i!==null&&(Pt===null?Pt=i:Pt.push.apply(Pt,i))}a=r}if(i=!1,a!==2)continue}}if(a===1){Na(e,0),Ml(e,t,0,!0);break}e:{switch(l=e,i=a,i){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Ml(l,t,cn,!Sl);break e;case 2:Pt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(a=Yo+300-_t(),10<a)){if(Ml(l,t,cn,!Sl),ra(l,0,!0)!==0)break e;il=t,l.timeoutHandle=h0(Hd.bind(null,l,n,Pt,Vo,ls,t,cn,Pl,La,Sl,i,"Throttled",-0,0),a);break e}Hd(l,n,Pt,Vo,ls,t,cn,Pl,La,Sl,i,null,-0,0)}}break}while(!0);Un(e)}function Hd(e,t,n,l,a,i,r,d,g,M,R,j,A,E){if(e.timeoutHandle=-1,j=t.subtreeFlags,j&8192||(j&16785408)===16785408){j={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Xn},Dd(t,i,j);var ce=(i&62914560)===i?Yo-_t():(i&4194048)===i?Od-_t():0;if(ce=Am(j,ce),ce!==null){il=i,e.cancelPendingCommit=ce(Qd.bind(null,e,t,i,n,l,a,r,d,g,R,j,null,A,E)),Ml(e,i,r,!M);return}}Qd(e,t,i,n,l,a,r,d,g)}function Vp(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var a=n[l],i=a.getSnapshot;a=a.value;try{if(!nn(i(),a))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Ml(e,t,n,l){t&=~ns,t&=~Pl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var a=t;0<a;){var i=31-Yt(a),r=1<<i;l[i]=-1,a&=~r}n!==0&&Ii(e,n,t)}function Xo(){return(Fe&6)===0?(Ei(0),!1):!0}function rs(){if(je!==null){if(et===0)var e=je.return;else e=je,Jn=Xl=null,wc(e),Ta=null,ui=0,e=je;for(;e!==null;)pd(e.alternate,e),e=e.return;je=null}}function Na(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,sm(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),il=0,rs(),ot=e,je=n=Zn(e.current,null),Ye=t,et=0,rn=null,Sl=!1,Oa=Hl(e,t),ts=!1,La=cn=ns=Pl=Cl=vt=0,Pt=Ti=null,ls=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-Yt(l),i=1<<a;t|=e[a],l&=~i}return al=t,uo(),n}function Bd(e,t){Ne=null,T.H=vi,t===Ma||t===bo?(t=Pu(),et=3):t===fc?(t=Pu(),et=4):et=t===jc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,rn=t,je===null&&(vt=1,Oo(e,gn(t,e.current)))}function jd(){var e=an.current;return e===null?!0:(Ye&4194048)===Ye?xn===null:(Ye&62914560)===Ye||(Ye&536870912)!==0?e===xn:!1}function qd(){var e=T.H;return T.H=vi,e===null?vi:e}function Yd(){var e=T.A;return T.A=Yp,e}function Qo(){vt=4,Sl||(Ye&4194048)!==Ye&&an.current!==null||(Oa=!0),(Cl&134217727)===0&&(Pl&134217727)===0||ot===null||Ml(ot,Ye,cn,!1)}function cs(e,t,n){var l=Fe;Fe|=2;var a=qd(),i=Yd();(ot!==e||Ye!==t)&&(Vo=null,Na(e,t)),t=!1;var r=vt;e:do try{if(et!==0&&je!==null){var d=je,g=rn;switch(et){case 8:rs(),r=6;break e;case 3:case 2:case 9:case 6:an.current===null&&(t=!0);var M=et;if(et=0,rn=null,Ha(e,d,g,M),n&&Oa){r=0;break e}break;default:M=et,et=0,rn=null,Ha(e,d,g,M)}}Xp(),r=vt;break}catch(R){Bd(e,R)}while(!0);return t&&e.shellSuspendCounter++,Jn=Xl=null,Fe=l,T.H=a,T.A=i,je===null&&(ot=null,Ye=0,uo()),r}function Xp(){for(;je!==null;)Gd(je)}function Qp(e,t){var n=Fe;Fe|=2;var l=qd(),a=Yd();ot!==e||Ye!==t?(Vo=null,Go=_t()+500,Na(e,t)):Oa=Hl(e,t);e:do try{if(et!==0&&je!==null){t=je;var i=rn;t:switch(et){case 1:et=0,rn=null,Ha(e,t,i,1);break;case 2:case 9:if(Wu(i)){et=0,rn=null,Vd(t);break}t=function(){et!==2&&et!==9||ot!==e||(et=7),Un(e)},i.then(t,t);break e;case 3:et=7;break e;case 4:et=5;break e;case 7:Wu(i)?(et=0,rn=null,Vd(t)):(et=0,rn=null,Ha(e,t,i,7));break;case 5:var r=null;switch(je.tag){case 26:r=je.memoizedState;case 5:case 27:var d=je;if(r?E0(r):d.stateNode.complete){et=0,rn=null;var g=d.sibling;if(g!==null)je=g;else{var M=d.return;M!==null?(je=M,Zo(M)):je=null}break t}}et=0,rn=null,Ha(e,t,i,5);break;case 6:et=0,rn=null,Ha(e,t,i,6);break;case 8:rs(),vt=6;break e;default:throw Error(u(462))}}Zp();break}catch(R){Bd(e,R)}while(!0);return Jn=Xl=null,T.H=l,T.A=a,Fe=n,je!==null?0:(ot=null,Ye=0,uo(),vt)}function Zp(){for(;je!==null&&!Ll();)Gd(je)}function Gd(e){var t=dd(e.alternate,e,al);e.memoizedProps=e.pendingProps,t===null?Zo(e):je=t}function Vd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=od(n,t,t.pendingProps,t.type,void 0,Ye);break;case 11:t=od(n,t,t.pendingProps,t.type.render,t.ref,Ye);break;case 5:wc(t);default:pd(n,t),t=je=qu(t,al),t=dd(n,t,al)}e.memoizedProps=e.pendingProps,t===null?Zo(e):je=t}function Ha(e,t,n,l){Jn=Xl=null,wc(t),Ta=null,ui=0;var a=t.return;try{if(Lp(e,a,t,n,Ye)){vt=1,Oo(e,gn(n,e.current)),je=null;return}}catch(i){if(a!==null)throw je=a,i;vt=1,Oo(e,gn(n,e.current)),je=null;return}t.flags&32768?(Ve||l===1?e=!0:Oa||(Ye&536870912)!==0?e=!1:(Sl=e=!0,(l===2||l===9||l===3||l===6)&&(l=an.current,l!==null&&l.tag===13&&(l.flags|=16384))),Xd(t,e)):Zo(t)}function Zo(e){var t=e;do{if((t.flags&32768)!==0){Xd(t,Sl);return}e=t.return;var n=Hp(t.alternate,t,al);if(n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);vt===0&&(vt=5)}function Xd(e,t){do{var n=Bp(e.alternate,e);if(n!==null){n.flags&=32767,je=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=n}while(e!==null);vt=6,je=null}function Qd(e,t,n,l,a,i,r,d,g){e.cancelPendingCommit=null;do Ko();while(Et!==0);if((Fe&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(i=t.lanes|t.childLanes,i|=$r,Er(e,n,i,r,d,g),e===ot&&(je=ot=null,Ye=0),Ua=t,zl=e,il=n,as=i,is=a,Ld=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,$p(la,function(){return $d(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=T.T,T.T=null,a=B.p,B.p=2,r=Fe,Fe|=4;try{jp(e,t,n)}finally{Fe=r,B.p=a,T.T=l}}Et=1,Zd(),Kd(),Jd()}}function Zd(){if(Et===1){Et=0;var e=zl,t=Ua,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=T.T,T.T=null;var l=B.p;B.p=2;var a=Fe;Fe|=4;try{Td(t,e);var i=xs,r=_u(e.containerInfo),d=i.focusedElem,g=i.selectionRange;if(r!==d&&d&&d.ownerDocument&&ku(d.ownerDocument.documentElement,d)){if(g!==null&&Qr(d)){var M=g.start,R=g.end;if(R===void 0&&(R=M),"selectionStart"in d)d.selectionStart=M,d.selectionEnd=Math.min(R,d.value.length);else{var j=d.ownerDocument||document,A=j&&j.defaultView||window;if(A.getSelection){var E=A.getSelection(),ce=d.textContent.length,ze=Math.min(g.start,ce),at=g.end===void 0?ze:Math.min(g.end,ce);!E.extend&&ze>at&&(r=at,at=ze,ze=r);var C=Du(d,ze),v=Du(d,at);if(C&&v&&(E.rangeCount!==1||E.anchorNode!==C.node||E.anchorOffset!==C.offset||E.focusNode!==v.node||E.focusOffset!==v.offset)){var z=j.createRange();z.setStart(C.node,C.offset),E.removeAllRanges(),ze>at?(E.addRange(z),E.extend(v.node,v.offset)):(z.setEnd(v.node,v.offset),E.addRange(z))}}}}for(j=[],E=d;E=E.parentNode;)E.nodeType===1&&j.push({element:E,left:E.scrollLeft,top:E.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<j.length;d++){var N=j[d];N.element.scrollLeft=N.left,N.element.scrollTop=N.top}}ir=!!bs,xs=bs=null}finally{Fe=a,B.p=l,T.T=n}}e.current=t,Et=2}}function Kd(){if(Et===2){Et=0;var e=zl,t=Ua,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=T.T,T.T=null;var l=B.p;B.p=2;var a=Fe;Fe|=4;try{Sd(e,t.alternate,t)}finally{Fe=a,B.p=l,T.T=n}}Et=3}}function Jd(){if(Et===4||Et===3){Et=0,En();var e=zl,t=Ua,n=il,l=Ld;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Et=5:(Et=0,Ua=zl=null,Fd(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(wl=null),_n(n),t=t.stateNode,Xt&&typeof Xt.onCommitFiberRoot=="function")try{Xt.onCommitFiberRoot(Ul,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=T.T,a=B.p,B.p=2,T.T=null;try{for(var i=e.onRecoverableError,r=0;r<l.length;r++){var d=l[r];i(d.value,{componentStack:d.stack})}}finally{T.T=t,B.p=a}}(il&3)!==0&&Ko(),Un(e),a=e.pendingLanes,(n&261930)!==0&&(a&42)!==0?e===os?Ai++:(Ai=0,os=e):Ai=0,Ei(0)}}function Fd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ci(t)))}function Ko(){return Zd(),Kd(),Jd(),$d()}function $d(){if(Et!==5)return!1;var e=zl,t=as;as=0;var n=_n(il),l=T.T,a=B.p;try{B.p=32>n?32:n,T.T=null,n=is,is=null;var i=zl,r=il;if(Et=0,Ua=zl=null,il=0,(Fe&6)!==0)throw Error(u(331));var d=Fe;if(Fe|=4,_d(i.current),Ed(i,i.current,r,n),Fe=d,Ei(0,!1),Xt&&typeof Xt.onPostCommitFiberRoot=="function")try{Xt.onPostCommitFiberRoot(Ul,i)}catch{}return!0}finally{B.p=a,T.T=l,Fd(e,t)}}function Wd(e,t,n){t=gn(n,t),t=Bc(e.stateNode,t,2),e=yl(e,t,2),e!==null&&(wn(e,2),Un(e))}function tt(e,t,n){if(e.tag===3)Wd(e,e,n);else for(;t!==null;){if(t.tag===3){Wd(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(wl===null||!wl.has(l))){e=gn(n,e),n=If(2),l=yl(t,n,2),l!==null&&(Pf(n,l,t,e),wn(l,2),Un(l));break}}t=t.return}}function ss(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new Gp;var a=new Set;l.set(t,a)}else a=l.get(t),a===void 0&&(a=new Set,l.set(t,a));a.has(n)||(ts=!0,a.add(n),e=Kp.bind(null,e,t,n),t.then(e,e))}function Kp(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ot===e&&(Ye&n)===n&&(vt===4||vt===3&&(Ye&62914560)===Ye&&300>_t()-Yo?(Fe&2)===0&&Na(e,0):ns|=n,La===Ye&&(La=0)),Un(e)}function Id(e,t){t===0&&(t=Wi()),e=Yl(e,t),e!==null&&(wn(e,t),Un(e))}function Jp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Id(e,n)}function Fp(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),Id(e,n)}function $p(e,t){return rl(e,t)}var Jo=null,Ba=null,us=!1,Fo=!1,fs=!1,Tl=0;function Un(e){e!==Ba&&e.next===null&&(Ba===null?Jo=Ba=e:Ba=Ba.next=e),Fo=!0,us||(us=!0,Ip())}function Ei(e,t){if(!fs&&Fo){fs=!0;do for(var n=!1,l=Jo;l!==null;){if(e!==0){var a=l.pendingLanes;if(a===0)var i=0;else{var r=l.suspendedLanes,d=l.pingedLanes;i=(1<<31-Yt(42|e)+1)-1,i&=a&~(r&~d),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,n0(l,i))}else i=Ye,i=ra(l,l===ot?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||Hl(l,i)||(n=!0,n0(l,i));l=l.next}while(n);fs=!1}}function Wp(){Pd()}function Pd(){Fo=us=!1;var e=0;Tl!==0&&cm()&&(e=Tl);for(var t=_t(),n=null,l=Jo;l!==null;){var a=l.next,i=e0(l,t);i===0?(l.next=null,n===null?Jo=a:n.next=a,a===null&&(Ba=n)):(n=l,(e!==0||(i&3)!==0)&&(Fo=!0)),l=a}Et!==0&&Et!==5||Ei(e),Tl!==0&&(Tl=0)}function e0(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var r=31-Yt(i),d=1<<r,g=a[r];g===-1?((d&n)===0||(d&l)!==0)&&(a[r]=Ar(d,t)):g<=t&&(e.expiredLanes|=d),i&=~d}if(t=ot,n=Ye,n=ra(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(et===2||et===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&qt(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Hl(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&qt(l),_n(n)){case 2:case 8:n=na;break;case 32:n=la;break;case 268435456:n=$i;break;default:n=la}return l=t0.bind(null,e),n=rl(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&qt(l),e.callbackPriority=2,e.callbackNode=null,2}function t0(e,t){if(Et!==0&&Et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ko()&&e.callbackNode!==n)return null;var l=Ye;return l=ra(e,e===ot?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Nd(e,l,t),e0(e,_t()),e.callbackNode!=null&&e.callbackNode===n?t0.bind(null,e):null)}function n0(e,t){if(Ko())return null;Nd(e,t,!0)}function Ip(){um(function(){(Fe&6)!==0?rl(cl,Wp):Pd()})}function ds(){if(Tl===0){var e=wa;e===0&&(e=ia,ia<<=1,(ia&261888)===0&&(ia=256)),Tl=e}return Tl}function l0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:no(""+e)}function a0(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Pp(e,t,n,l,a){if(t==="submit"&&n&&n.stateNode===a){var i=l0((a[Rt]||null).action),r=l.submitter;r&&(t=(t=r[Rt]||null)?l0(t.formAction):r.getAttribute("formAction"),t!==null&&(i=t,r=null));var d=new oo("action","action",null,l,a);e.push({event:d,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Tl!==0){var g=r?a0(a,r):new FormData(a);Rc(n,{pending:!0,data:g,method:a.method,action:i},null,g)}}else typeof i=="function"&&(d.preventDefault(),g=r?a0(a,r):new FormData(a),Rc(n,{pending:!0,data:g,method:a.method,action:i},i,g))},currentTarget:a}]})}}for(var hs=0;hs<Fr.length;hs++){var ps=Fr[hs],em=ps.toLowerCase(),tm=ps[0].toUpperCase()+ps.slice(1);Mn(em,"on"+tm)}Mn(Lu,"onAnimationEnd"),Mn(Uu,"onAnimationIteration"),Mn(Nu,"onAnimationStart"),Mn("dblclick","onDoubleClick"),Mn("focusin","onFocus"),Mn("focusout","onBlur"),Mn(yp,"onTransitionRun"),Mn(vp,"onTransitionStart"),Mn(bp,"onTransitionCancel"),Mn(Hu,"onTransitionEnd"),ye("onMouseEnter",["mouseout","mouseover"]),ye("onMouseLeave",["mouseout","mouseover"]),ye("onPointerEnter",["pointerout","pointerover"]),ye("onPointerLeave",["pointerout","pointerover"]),it("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),it("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),it("onBeforeInput",["compositionend","keypress","textInput","paste"]),it("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),it("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),it("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Di="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),nm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Di));function i0(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],a=l.event;l=l.listeners;e:{var i=void 0;if(t)for(var r=l.length-1;0<=r;r--){var d=l[r],g=d.instance,M=d.currentTarget;if(d=d.listener,g!==i&&a.isPropagationStopped())break e;i=d,a.currentTarget=M;try{i(a)}catch(R){so(R)}a.currentTarget=null,i=g}else for(r=0;r<l.length;r++){if(d=l[r],g=d.instance,M=d.currentTarget,d=d.listener,g!==i&&a.isPropagationStopped())break e;i=d,a.currentTarget=M;try{i(a)}catch(R){so(R)}a.currentTarget=null,i=g}}}}function qe(e,t){var n=t[Fa];n===void 0&&(n=t[Fa]=new Set);var l=e+"__bubble";n.has(l)||(o0(t,e,2,!1),n.add(l))}function ms(e,t,n){var l=0;t&&(l|=4),o0(n,e,l,t)}var $o="_reactListening"+Math.random().toString(36).slice(2);function gs(e){if(!e[$o]){e[$o]=!0,De.forEach(function(n){n!=="selectionchange"&&(nm.has(n)||ms(n,!1,e),ms(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[$o]||(t[$o]=!0,ms("selectionchange",!1,t))}}function o0(e,t,n,l){switch(U0(t)){case 2:var a=km;break;case 8:a=_m;break;default:a=_s}n=a.bind(null,t,n,e),a=void 0,!Nr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),l?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function ys(e,t,n,l,a){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var r=l.tag;if(r===3||r===4){var d=l.stateNode.containerInfo;if(d===a)break;if(r===4)for(r=l.return;r!==null;){var g=r.tag;if((g===3||g===4)&&r.stateNode.containerInfo===a)return;r=r.return}for(;d!==null;){if(r=fe(d),r===null)return;if(g=r.tag,g===5||g===6||g===26||g===27){l=i=r;continue e}d=d.parentNode}}l=l.return}uu(function(){var M=i,R=Lr(n),j=[];e:{var A=Bu.get(e);if(A!==void 0){var E=oo,ce=e;switch(e){case"keypress":if(ao(n)===0)break e;case"keydown":case"keyup":E=Fh;break;case"focusin":ce="focus",E=qr;break;case"focusout":ce="blur",E=qr;break;case"beforeblur":case"afterblur":E=qr;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":E=hu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":E=Hh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":E=Ih;break;case Lu:case Uu:case Nu:E=qh;break;case Hu:E=ep;break;case"scroll":case"scrollend":E=Uh;break;case"wheel":E=np;break;case"copy":case"cut":case"paste":E=Gh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":E=mu;break;case"toggle":case"beforetoggle":E=ap}var ze=(t&4)!==0,at=!ze&&(e==="scroll"||e==="scrollend"),C=ze?A!==null?A+"Capture":null:A;ze=[];for(var v=M,z;v!==null;){var N=v;if(z=N.stateNode,N=N.tag,N!==5&&N!==26&&N!==27||z===null||C===null||(N=Wa(v,C),N!=null&&ze.push(ki(v,N,z))),at)break;v=v.return}0<ze.length&&(A=new E(A,ce,null,n,R),j.push({event:A,listeners:ze}))}}if((t&7)===0){e:{if(A=e==="mouseover"||e==="pointerover",E=e==="mouseout"||e==="pointerout",A&&n!==Or&&(ce=n.relatedTarget||n.fromElement)&&(fe(ce)||ce[sl]))break e;if((E||A)&&(A=R.window===R?R:(A=R.ownerDocument)?A.defaultView||A.parentWindow:window,E?(ce=n.relatedTarget||n.toElement,E=M,ce=ce?fe(ce):null,ce!==null&&(at=p(ce),ze=ce.tag,ce!==at||ze!==5&&ze!==27&&ze!==6)&&(ce=null)):(E=null,ce=M),E!==ce)){if(ze=hu,N="onMouseLeave",C="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(ze=mu,N="onPointerLeave",C="onPointerEnter",v="pointer"),at=E==null?A:Te(E),z=ce==null?A:Te(ce),A=new ze(N,v+"leave",E,n,R),A.target=at,A.relatedTarget=z,N=null,fe(R)===M&&(ze=new ze(C,v+"enter",ce,n,R),ze.target=z,ze.relatedTarget=at,N=ze),at=N,E&&ce)t:{for(ze=lm,C=E,v=ce,z=0,N=C;N;N=ze(N))z++;N=0;for(var xe=v;xe;xe=ze(xe))N++;for(;0<z-N;)C=ze(C),z--;for(;0<N-z;)v=ze(v),N--;for(;z--;){if(C===v||v!==null&&C===v.alternate){ze=C;break t}C=ze(C),v=ze(v)}ze=null}else ze=null;E!==null&&r0(j,A,E,ze,!1),ce!==null&&at!==null&&r0(j,at,ce,ze,!0)}}e:{if(A=M?Te(M):window,E=A.nodeName&&A.nodeName.toLowerCase(),E==="select"||E==="input"&&A.type==="file")var Ke=wu;else if(Su(A))if(zu)Ke=pp;else{Ke=dp;var de=fp}else E=A.nodeName,!E||E.toLowerCase()!=="input"||A.type!=="checkbox"&&A.type!=="radio"?M&&Rr(M.elementType)&&(Ke=wu):Ke=hp;if(Ke&&(Ke=Ke(e,M))){Cu(j,Ke,n,R);break e}de&&de(e,A,M),e==="focusout"&&M&&A.type==="number"&&M.memoizedProps.value!=null&&_r(A,"number",A.value)}switch(de=M?Te(M):window,e){case"focusin":(Su(de)||de.contentEditable==="true")&&(ma=de,Zr=M,ii=null);break;case"focusout":ii=Zr=ma=null;break;case"mousedown":Kr=!0;break;case"contextmenu":case"mouseup":case"dragend":Kr=!1,Ru(j,n,R);break;case"selectionchange":if(gp)break;case"keydown":case"keyup":Ru(j,n,R)}var Be;if(Gr)e:{switch(e){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else pa?bu(e,n)&&(Ge="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ge="onCompositionStart");Ge&&(gu&&n.locale!=="ko"&&(pa||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&pa&&(Be=fu()):(ul=R,Hr="value"in ul?ul.value:ul.textContent,pa=!0)),de=Wo(M,Ge),0<de.length&&(Ge=new pu(Ge,e,null,n,R),j.push({event:Ge,listeners:de}),Be?Ge.data=Be:(Be=xu(n),Be!==null&&(Ge.data=Be)))),(Be=op?rp(e,n):cp(e,n))&&(Ge=Wo(M,"onBeforeInput"),0<Ge.length&&(de=new pu("onBeforeInput","beforeinput",null,n,R),j.push({event:de,listeners:Ge}),de.data=Be)),Pp(j,e,M,n,R)}i0(j,t)})}function ki(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Wo(e,t){for(var n=t+"Capture",l=[];e!==null;){var a=e,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=Wa(e,n),a!=null&&l.unshift(ki(e,a,i)),a=Wa(e,t),a!=null&&l.push(ki(e,a,i))),e.tag===3)return l;e=e.return}return[]}function lm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function r0(e,t,n,l,a){for(var i=t._reactName,r=[];n!==null&&n!==l;){var d=n,g=d.alternate,M=d.stateNode;if(d=d.tag,g!==null&&g===l)break;d!==5&&d!==26&&d!==27||M===null||(g=M,a?(M=Wa(n,i),M!=null&&r.unshift(ki(n,M,g))):a||(M=Wa(n,i),M!=null&&r.push(ki(n,M,g)))),n=n.return}r.length!==0&&e.push({event:t,listeners:r})}var am=/\r\n?/g,im=/\u0000|\uFFFD/g;function c0(e){return(typeof e=="string"?e:""+e).replace(am,`
9
+ `).replace(im,"")}function s0(e,t){return t=c0(t),c0(e)===t}function lt(e,t,n,l,a,i){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||fa(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&fa(e,""+l);break;case"className":sa(e,"class",l);break;case"tabIndex":sa(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":sa(e,n,l);break;case"style":cu(e,l,i);break;case"data":if(t!=="object"){sa(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=no(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&lt(e,t,"name",a.name,a,null),lt(e,t,"formEncType",a.formEncType,a,null),lt(e,t,"formMethod",a.formMethod,a,null),lt(e,t,"formTarget",a.formTarget,a,null)):(lt(e,t,"encType",a.encType,a,null),lt(e,t,"method",a.method,a,null),lt(e,t,"target",a.target,a,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=no(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Xn);break;case"onScroll":l!=null&&qe("scroll",e);break;case"onScrollEnd":l!=null&&qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=no(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":qe("beforetoggle",e),qe("toggle",e),Jt(e,"popover",l);break;case"xlinkActuate":Vn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Vn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Vn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Vn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Vn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Vn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Vn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Jt(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Oh.get(n)||n,Jt(e,n,l))}}function vs(e,t,n,l,a,i){switch(n){case"style":cu(e,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"children":typeof l=="string"?fa(e,l):(typeof l=="number"||typeof l=="bigint")&&fa(e,""+l);break;case"onScroll":l!=null&&qe("scroll",e);break;case"onScrollEnd":l!=null&&qe("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Xn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Oe.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),i=e[Rt]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,a),typeof l=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,a);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):Jt(e,n,l)}}}function Nt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",e),qe("load",e);var l=!1,a=!1,i;for(i in n)if(n.hasOwnProperty(i)){var r=n[i];if(r!=null)switch(i){case"src":l=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:lt(e,t,i,r,n,null)}}a&&lt(e,t,"srcSet",n.srcSet,n,null),l&&lt(e,t,"src",n.src,n,null);return;case"input":qe("invalid",e);var d=i=r=a=null,g=null,M=null;for(l in n)if(n.hasOwnProperty(l)){var R=n[l];if(R!=null)switch(l){case"name":a=R;break;case"type":r=R;break;case"checked":g=R;break;case"defaultChecked":M=R;break;case"value":i=R;break;case"defaultValue":d=R;break;case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(u(137,t));break;default:lt(e,t,l,R,n,null)}}au(e,i,d,g,M,r,a,!1);return;case"select":qe("invalid",e),l=r=i=null;for(a in n)if(n.hasOwnProperty(a)&&(d=n[a],d!=null))switch(a){case"value":i=d;break;case"defaultValue":r=d;break;case"multiple":l=d;default:lt(e,t,a,d,n,null)}t=i,n=r,e.multiple=!!l,t!=null?ua(e,!!l,t,!1):n!=null&&ua(e,!!l,n,!0);return;case"textarea":qe("invalid",e),i=a=l=null;for(r in n)if(n.hasOwnProperty(r)&&(d=n[r],d!=null))switch(r){case"value":l=d;break;case"defaultValue":a=d;break;case"children":i=d;break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(u(91));break;default:lt(e,t,r,d,n,null)}ou(e,l,a,i);return;case"option":for(g in n)n.hasOwnProperty(g)&&(l=n[g],l!=null)&&(g==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":lt(e,t,g,l,n,null));return;case"dialog":qe("beforetoggle",e),qe("toggle",e),qe("cancel",e),qe("close",e);break;case"iframe":case"object":qe("load",e);break;case"video":case"audio":for(l=0;l<Di.length;l++)qe(Di[l],e);break;case"image":qe("error",e),qe("load",e);break;case"details":qe("toggle",e);break;case"embed":case"source":case"link":qe("error",e),qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(M in n)if(n.hasOwnProperty(M)&&(l=n[M],l!=null))switch(M){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:lt(e,t,M,l,n,null)}return;default:if(Rr(t)){for(R in n)n.hasOwnProperty(R)&&(l=n[R],l!==void 0&&vs(e,t,R,l,n,void 0));return}}for(d in n)n.hasOwnProperty(d)&&(l=n[d],l!=null&&lt(e,t,d,l,n,null))}function om(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,r=null,d=null,g=null,M=null,R=null;for(E in n){var j=n[E];if(n.hasOwnProperty(E)&&j!=null)switch(E){case"checked":break;case"value":break;case"defaultValue":g=j;default:l.hasOwnProperty(E)||lt(e,t,E,null,l,j)}}for(var A in l){var E=l[A];if(j=n[A],l.hasOwnProperty(A)&&(E!=null||j!=null))switch(A){case"type":i=E;break;case"name":a=E;break;case"checked":M=E;break;case"defaultChecked":R=E;break;case"value":r=E;break;case"defaultValue":d=E;break;case"children":case"dangerouslySetInnerHTML":if(E!=null)throw Error(u(137,t));break;default:E!==j&&lt(e,t,A,E,l,j)}}kr(e,r,d,g,M,R,i,a);return;case"select":E=r=d=A=null;for(i in n)if(g=n[i],n.hasOwnProperty(i)&&g!=null)switch(i){case"value":break;case"multiple":E=g;default:l.hasOwnProperty(i)||lt(e,t,i,null,l,g)}for(a in l)if(i=l[a],g=n[a],l.hasOwnProperty(a)&&(i!=null||g!=null))switch(a){case"value":A=i;break;case"defaultValue":d=i;break;case"multiple":r=i;default:i!==g&&lt(e,t,a,i,l,g)}t=d,n=r,l=E,A!=null?ua(e,!!n,A,!1):!!l!=!!n&&(t!=null?ua(e,!!n,t,!0):ua(e,!!n,n?[]:"",!1));return;case"textarea":E=A=null;for(d in n)if(a=n[d],n.hasOwnProperty(d)&&a!=null&&!l.hasOwnProperty(d))switch(d){case"value":break;case"children":break;default:lt(e,t,d,null,l,a)}for(r in l)if(a=l[r],i=n[r],l.hasOwnProperty(r)&&(a!=null||i!=null))switch(r){case"value":A=a;break;case"defaultValue":E=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(u(91));break;default:a!==i&&lt(e,t,r,a,l,i)}iu(e,A,E);return;case"option":for(var ce in n)A=n[ce],n.hasOwnProperty(ce)&&A!=null&&!l.hasOwnProperty(ce)&&(ce==="selected"?e.selected=!1:lt(e,t,ce,null,l,A));for(g in l)A=l[g],E=n[g],l.hasOwnProperty(g)&&A!==E&&(A!=null||E!=null)&&(g==="selected"?e.selected=A&&typeof A!="function"&&typeof A!="symbol":lt(e,t,g,A,l,E));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ze in n)A=n[ze],n.hasOwnProperty(ze)&&A!=null&&!l.hasOwnProperty(ze)&&lt(e,t,ze,null,l,A);for(M in l)if(A=l[M],E=n[M],l.hasOwnProperty(M)&&A!==E&&(A!=null||E!=null))switch(M){case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(u(137,t));break;default:lt(e,t,M,A,l,E)}return;default:if(Rr(t)){for(var at in n)A=n[at],n.hasOwnProperty(at)&&A!==void 0&&!l.hasOwnProperty(at)&&vs(e,t,at,void 0,l,A);for(R in l)A=l[R],E=n[R],!l.hasOwnProperty(R)||A===E||A===void 0&&E===void 0||vs(e,t,R,A,l,E);return}}for(var C in n)A=n[C],n.hasOwnProperty(C)&&A!=null&&!l.hasOwnProperty(C)&&lt(e,t,C,null,l,A);for(j in l)A=l[j],E=n[j],!l.hasOwnProperty(j)||A===E||A==null&&E==null||lt(e,t,j,A,l,E)}function u0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function rm(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var a=n[l],i=a.transferSize,r=a.initiatorType,d=a.duration;if(i&&d&&u0(r)){for(r=0,d=a.responseEnd,l+=1;l<n.length;l++){var g=n[l],M=g.startTime;if(M>d)break;var R=g.transferSize,j=g.initiatorType;R&&u0(j)&&(g=g.responseEnd,r+=R*(g<d?1:(d-M)/(g-M)))}if(--l,t+=8*(i+r)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var bs=null,xs=null;function Io(e){return e.nodeType===9?e:e.ownerDocument}function f0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function d0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Ss(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Cs=null;function cm(){var e=window.event;return e&&e.type==="popstate"?e===Cs?!1:(Cs=e,!0):(Cs=null,!1)}var h0=typeof setTimeout=="function"?setTimeout:void 0,sm=typeof clearTimeout=="function"?clearTimeout:void 0,p0=typeof Promise=="function"?Promise:void 0,um=typeof queueMicrotask=="function"?queueMicrotask:typeof p0<"u"?function(e){return p0.resolve(null).then(e).catch(fm)}:h0;function fm(e){setTimeout(function(){throw e})}function Al(e){return e==="head"}function m0(e,t){var n=t,l=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(a),Ga(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")_i(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,_i(n);for(var i=n.firstChild;i;){var r=i.nextSibling,d=i.nodeName;i[I]||d==="SCRIPT"||d==="STYLE"||d==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=r}}else n==="body"&&_i(e.ownerDocument.body);n=a}while(n);Ga(t)}function g0(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function ws(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":ws(n),re(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function dm(e,t,n,l){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[I])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Sn(e.nextSibling),e===null)break}return null}function hm(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Sn(e.nextSibling),e===null))return null;return e}function y0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Sn(e.nextSibling),e===null))return null;return e}function zs(e){return e.data==="$?"||e.data==="$~"}function Ms(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function pm(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Sn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Ts=null;function v0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Sn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function b0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function x0(e,t,n){switch(t=Io(n),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function _i(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);re(e)}var Cn=new Map,S0=new Set;function Po(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ol=B.d;B.d={f:mm,r:gm,D:ym,C:vm,L:bm,m:xm,X:Cm,S:Sm,M:wm};function mm(){var e=ol.f(),t=Xo();return e||t}function gm(e){var t=ie(e);t!==null&&t.tag===5&&t.type==="form"?Bf(t):ol.r(e)}var ja=typeof document>"u"?null:document;function C0(e,t,n){var l=ja;if(l&&typeof t=="string"&&t){var a=pn(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),S0.has(a)||(S0.add(a),e={rel:e,crossOrigin:n,href:t},l.querySelector(a)===null&&(t=l.createElement("link"),Nt(t,"link",e),Z(t),l.head.appendChild(t)))}}function ym(e){ol.D(e),C0("dns-prefetch",e,null)}function vm(e,t){ol.C(e,t),C0("preconnect",e,t)}function bm(e,t,n){ol.L(e,t,n);var l=ja;if(l&&e&&t){var a='link[rel="preload"][as="'+pn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+pn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+pn(n.imageSizes)+'"]')):a+='[href="'+pn(e)+'"]';var i=a;switch(t){case"style":i=qa(e);break;case"script":i=Ya(e)}Cn.has(i)||(e=H({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Cn.set(i,e),l.querySelector(a)!==null||t==="style"&&l.querySelector(Ri(i))||t==="script"&&l.querySelector(Oi(i))||(t=l.createElement("link"),Nt(t,"link",e),Z(t),l.head.appendChild(t)))}}function xm(e,t){ol.m(e,t);var n=ja;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+pn(l)+'"][href="'+pn(e)+'"]',i=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ya(e)}if(!Cn.has(i)&&(e=H({rel:"modulepreload",href:e},t),Cn.set(i,e),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Oi(i)))return}l=n.createElement("link"),Nt(l,"link",e),Z(l),n.head.appendChild(l)}}}function Sm(e,t,n){ol.S(e,t,n);var l=ja;if(l&&e){var a=we(l).hoistableStyles,i=qa(e);t=t||"default";var r=a.get(i);if(!r){var d={loading:0,preload:null};if(r=l.querySelector(Ri(i)))d.loading=5;else{e=H({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Cn.get(i))&&As(e,n);var g=r=l.createElement("link");Z(g),Nt(g,"link",e),g._p=new Promise(function(M,R){g.onload=M,g.onerror=R}),g.addEventListener("load",function(){d.loading|=1}),g.addEventListener("error",function(){d.loading|=2}),d.loading|=4,er(r,t,l)}r={type:"stylesheet",instance:r,count:1,state:d},a.set(i,r)}}}function Cm(e,t){ol.X(e,t);var n=ja;if(n&&e){var l=we(n).hoistableScripts,a=Ya(e),i=l.get(a);i||(i=n.querySelector(Oi(a)),i||(e=H({src:e,async:!0},t),(t=Cn.get(a))&&Es(e,t),i=n.createElement("script"),Z(i),Nt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function wm(e,t){ol.M(e,t);var n=ja;if(n&&e){var l=we(n).hoistableScripts,a=Ya(e),i=l.get(a);i||(i=n.querySelector(Oi(a)),i||(e=H({src:e,async:!0,type:"module"},t),(t=Cn.get(a))&&Es(e,t),i=n.createElement("script"),Z(i),Nt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function w0(e,t,n,l){var a=(a=Ce.current)?Po(a):null;if(!a)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=qa(n.href),n=we(a).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=qa(n.href);var i=we(a).hoistableStyles,r=i.get(e);if(r||(a=a.ownerDocument||a,r={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,r),(i=a.querySelector(Ri(e)))&&!i._p&&(r.instance=i,r.state.loading=5),Cn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Cn.set(e,n),i||zm(a,e,n,r.state))),t&&l===null)throw Error(u(528,""));return r}if(t&&l!==null)throw Error(u(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ya(n),n=we(a).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function qa(e){return'href="'+pn(e)+'"'}function Ri(e){return'link[rel="stylesheet"]['+e+"]"}function z0(e){return H({},e,{"data-precedence":e.precedence,precedence:null})}function zm(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Nt(t,"link",n),Z(t),e.head.appendChild(t))}function Ya(e){return'[src="'+pn(e)+'"]'}function Oi(e){return"script[async]"+e}function M0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+pn(n.href)+'"]');if(l)return t.instance=l,Z(l),l;var a=H({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),Z(l),Nt(l,"style",a),er(l,n.precedence,e),t.instance=l;case"stylesheet":a=qa(n.href);var i=e.querySelector(Ri(a));if(i)return t.state.loading|=4,t.instance=i,Z(i),i;l=z0(n),(a=Cn.get(a))&&As(l,a),i=(e.ownerDocument||e).createElement("link"),Z(i);var r=i;return r._p=new Promise(function(d,g){r.onload=d,r.onerror=g}),Nt(i,"link",l),t.state.loading|=4,er(i,n.precedence,e),t.instance=i;case"script":return i=Ya(n.src),(a=e.querySelector(Oi(i)))?(t.instance=a,Z(a),a):(l=n,(a=Cn.get(i))&&(l=H({},n),Es(l,a)),e=e.ownerDocument||e,a=e.createElement("script"),Z(a),Nt(a,"link",l),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,er(l,n.precedence,e));return t.instance}function er(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,i=a,r=0;r<l.length;r++){var d=l[r];if(d.dataset.precedence===t)i=d;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function As(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Es(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var tr=null;function T0(e,t,n){if(tr===null){var l=new Map,a=tr=new Map;a.set(n,l)}else a=tr,l=a.get(n),l||(l=new Map,a.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var i=n[a];if(!(i[I]||i[mt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var r=i.getAttribute(t)||"";r=e+r;var d=l.get(r);d?d.push(i):l.set(r,[i])}}return l}function A0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Mm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function E0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Tm(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var a=qa(l.href),i=t.querySelector(Ri(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=nr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,Z(i);return}i=t.ownerDocument||t,l=z0(l),(a=Cn.get(a))&&As(l,a),i=i.createElement("link"),Z(i);var r=i;r._p=new Promise(function(d,g){r.onload=d,r.onerror=g}),Nt(i,"link",l),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=nr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Ds=0;function Am(e,t){return e.stylesheets&&e.count===0&&ar(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&ar(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Ds===0&&(Ds=62500*rm());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ar(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Ds?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function nr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ar(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var lr=null;function ar(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,lr=new Map,t.forEach(Em,e),lr=null,nr.call(e))}function Em(e,t){if(!(t.state.loading&4)){var n=lr.get(e);if(n)var l=n.get(null);else{n=new Map,lr.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var r=a[i];(r.nodeName==="LINK"||r.getAttribute("media")!=="not all")&&(n.set(r.dataset.precedence,r),l=r)}l&&n.set(null,l)}a=t.instance,r=a.getAttribute("data-precedence"),i=n.get(r)||l,i===l&&n.set(null,a),n.set(r,a),this.count++,l=nr.bind(this),a.addEventListener("load",l),a.addEventListener("error",l),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var Li={$$typeof:ae,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function Dm(e,t,n,l,a,i,r,d,g){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ca(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ca(0),this.hiddenUpdates=ca(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=r,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=g,this.incompleteTransitions=new Map}function D0(e,t,n,l,a,i,r,d,g,M,R,j){return e=new Dm(e,t,n,r,g,M,R,j,d),t=1,i===!0&&(t|=24),i=ln(3,null,null,t),e.current=i,i.stateNode=e,t=cc(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:n,cache:t},dc(i),e}function k0(e){return e?(e=va,e):va}function _0(e,t,n,l,a,i){a=k0(a),l.context===null?l.context=a:l.pendingContext=a,l=gl(t),l.payload={element:n},i=i===void 0?null:i,i!==null&&(l.callback=i),n=yl(e,l,t),n!==null&&(en(n,e,t),di(n,e,t))}function R0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ks(e,t){R0(e,t),(e=e.alternate)&&R0(e,t)}function O0(e){if(e.tag===13||e.tag===31){var t=Yl(e,67108864);t!==null&&en(t,e,67108864),ks(e,67108864)}}function L0(e){if(e.tag===13||e.tag===31){var t=sn();t=kn(t);var n=Yl(e,t);n!==null&&en(n,e,t),ks(e,t)}}var ir=!0;function km(e,t,n,l){var a=T.T;T.T=null;var i=B.p;try{B.p=2,_s(e,t,n,l)}finally{B.p=i,T.T=a}}function _m(e,t,n,l){var a=T.T;T.T=null;var i=B.p;try{B.p=8,_s(e,t,n,l)}finally{B.p=i,T.T=a}}function _s(e,t,n,l){if(ir){var a=Rs(l);if(a===null)ys(e,t,l,or,n),N0(e,l);else if(Om(a,e,t,n,l))l.stopPropagation();else if(N0(e,l),t&4&&-1<Rm.indexOf(e)){for(;a!==null;){var i=ie(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var r=Yn(i.pendingLanes);if(r!==0){var d=i;for(d.pendingLanes|=2,d.entangledLanes|=2;r;){var g=1<<31-Yt(r);d.entanglements[1]|=g,r&=~g}Un(i),(Fe&6)===0&&(Go=_t()+500,Ei(0))}}break;case 31:case 13:d=Yl(i,2),d!==null&&en(d,i,2),Xo(),ks(i,2)}if(i=Rs(l),i===null&&ys(e,t,l,or,n),i===a)break;a=i}a!==null&&l.stopPropagation()}else ys(e,t,l,null,n)}}function Rs(e){return e=Lr(e),Os(e)}var or=null;function Os(e){if(or=null,e=fe(e),e!==null){var t=p(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=D(t),e!==null)return e;e=null}else if(n===31){if(e=_(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return or=e,null}function U0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Ka()){case cl:return 2;case na:return 8;case la:case Fi:return 32;case $i:return 268435456;default:return 32}default:return 32}}var Ls=!1,El=null,Dl=null,kl=null,Ui=new Map,Ni=new Map,_l=[],Rm="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function N0(e,t){switch(e){case"focusin":case"focusout":El=null;break;case"dragenter":case"dragleave":Dl=null;break;case"mouseover":case"mouseout":kl=null;break;case"pointerover":case"pointerout":Ui.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ni.delete(t.pointerId)}}function Hi(e,t,n,l,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:i,targetContainers:[a]},t!==null&&(t=ie(t),t!==null&&O0(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Om(e,t,n,l,a){switch(t){case"focusin":return El=Hi(El,e,t,n,l,a),!0;case"dragenter":return Dl=Hi(Dl,e,t,n,l,a),!0;case"mouseover":return kl=Hi(kl,e,t,n,l,a),!0;case"pointerover":var i=a.pointerId;return Ui.set(i,Hi(Ui.get(i)||null,e,t,n,l,a)),!0;case"gotpointercapture":return i=a.pointerId,Ni.set(i,Hi(Ni.get(i)||null,e,t,n,l,a)),!0}return!1}function H0(e){var t=fe(e.target);if(t!==null){var n=p(t);if(n!==null){if(t=n.tag,t===13){if(t=D(n),t!==null){e.blockedOn=t,Ja(e.priority,function(){L0(n)});return}}else if(t===31){if(t=_(n),t!==null){e.blockedOn=t,Ja(e.priority,function(){L0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function rr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Rs(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);Or=l,n.target.dispatchEvent(l),Or=null}else return t=ie(n),t!==null&&O0(t),e.blockedOn=n,!1;t.shift()}return!0}function B0(e,t,n){rr(e)&&n.delete(t)}function Lm(){Ls=!1,El!==null&&rr(El)&&(El=null),Dl!==null&&rr(Dl)&&(Dl=null),kl!==null&&rr(kl)&&(kl=null),Ui.forEach(B0),Ni.forEach(B0)}function cr(e,t){e.blockedOn===t&&(e.blockedOn=null,Ls||(Ls=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Lm)))}var sr=null;function j0(e){sr!==e&&(sr=e,o.unstable_scheduleCallback(o.unstable_NormalPriority,function(){sr===e&&(sr=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],a=e[t+2];if(typeof l!="function"){if(Os(l||n)===null)continue;break}var i=ie(n);i!==null&&(e.splice(t,3),t-=3,Rc(i,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function Ga(e){function t(g){return cr(g,e)}El!==null&&cr(El,e),Dl!==null&&cr(Dl,e),kl!==null&&cr(kl,e),Ui.forEach(t),Ni.forEach(t);for(var n=0;n<_l.length;n++){var l=_l[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<_l.length&&(n=_l[0],n.blockedOn===null);)H0(n),n.blockedOn===null&&_l.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var a=n[l],i=n[l+1],r=a[Rt]||null;if(typeof i=="function")r||j0(n);else if(r){var d=null;if(i&&i.hasAttribute("formAction")){if(a=i,r=i[Rt]||null)d=r.formAction;else if(Os(a)!==null)continue}else d=r.action;typeof d=="function"?n[l+1]=d:(n.splice(l,3),l-=3),j0(n)}}}function q0(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(r){return a=r})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function Us(e){this._internalRoot=e}ur.prototype.render=Us.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var n=t.current,l=sn();_0(n,l,e,t,null,null)},ur.prototype.unmount=Us.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;_0(e.current,2,null,e,null,null),Xo(),t[sl]=null}};function ur(e){this._internalRoot=e}ur.prototype.unstable_scheduleHydration=function(e){if(e){var t=Gn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<_l.length&&t!==0&&t<_l[n].priority;n++);_l.splice(n,0,e),n===0&&H0(e)}};var Y0=s.version;if(Y0!=="19.2.4")throw Error(u(527,Y0,"19.2.4"));B.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=S(t),e=e!==null?X(e):null,e=e===null?null:e.stateNode,e};var Um={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fr.isDisabled&&fr.supportsFiber)try{Ul=fr.inject(Um),Xt=fr}catch{}}return qi.createRoot=function(e,t){if(!m(e))throw Error(u(299));var n=!1,l="",a=Jf,i=Ff,r=$f;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(r=t.onRecoverableError)),t=D0(e,1,!1,null,null,n,l,null,a,i,r,q0),e[sl]=t.current,gs(e),new Us(t)},qi.hydrateRoot=function(e,t,n){if(!m(e))throw Error(u(299));var l=!1,a="",i=Jf,r=Ff,d=$f,g=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(r=n.onCaughtError),n.onRecoverableError!==void 0&&(d=n.onRecoverableError),n.formState!==void 0&&(g=n.formState)),t=D0(e,1,!0,t,n??null,l,a,g,i,r,d,q0),t.context=k0(null),n=t.current,l=sn(),l=kn(l),a=gl(l),a.callback=null,yl(n,a,l),n=l,t.current.lanes=n,wn(t,n),Un(t),e[sl]=t.current,gs(e),new ur(t)},qi.version="19.2.4",qi}var rh;function Y1(){if(rh)return Ys.exports;rh=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(s){console.error(s)}}return o(),Ys.exports=q1(),Ys.exports}var G1=Y1(),ch=function(s,h){var u=arguments;if(h==null||!Ki.call(h,"css"))return w.createElement.apply(void 0,u);var m=u.length,p=new Array(m);p[0]=tu,p[1]=eu(s,h);for(var D=2;D<m;D++)p[D]=u[D];return w.createElement.apply(null,p)};(function(o){var s;s||(s=o.JSX||(o.JSX={}))})(ch||(ch={}));function b(){for(var o=arguments.length,s=new Array(o),h=0;h<o;h++)s[h]=arguments[h];return Ch(s)}function jn(){var o=b.apply(void 0,arguments),s="animation-"+o.name;return{name:s,styles:"@keyframes "+s+"{"+o.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const V1={showProgress:!1,progressTitle:"",progressState:{current:0,total:0,percent:0,status:"processing"},showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,actionPaths:[],syncImageCount:0,syncHasRemote:!1,syncHasLocal:!1,processMode:"generate"},X1={isOpen:!1,openStudio:()=>{},closeStudio:()=>{},toggleStudio:()=>{},currentPath:"public",setCurrentPath:()=>{},navigateUp:()=>{},selectedItems:new Set,toggleSelection:()=>{},selectRange:()=>{},selectAll:()=>{},clearSelection:()=>{},lastSelectedPath:null,viewMode:"grid",setViewMode:()=>{},focusedItem:null,setFocusedItem:()=>{},meta:null,setMeta:()=>{},isLoading:!1,setIsLoading:()=>{},refreshKey:0,triggerRefresh:()=>{},scanRequested:!1,triggerScan:()=>{},clearScanRequest:()=>{},searchQuery:"",setSearchQuery:()=>{},error:null,showError:()=>{},clearError:()=>{},fileItems:[],setFileItems:()=>{},actionState:V1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestDownload:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},abortController:null,deleteOrphans:async()=>{}},zh=w.createContext(X1);function Qa(){return w.useContext(zh)}const Cr="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Ubuntu, sans-serif",f={primary:"#635bff",primaryHover:"#5851e5",primaryLight:"#f0f0ff",background:"#f6f9fc",surface:"#ffffff",surfaceHover:"#f6f9fc",border:"#d8dee4",borderLight:"#e3e8ee",borderHover:"#c1c9d2",text:"#1a1f36",textSecondary:"#697386",textMuted:"#8792a2",success:"#0d7d4d",danger:"#df1b41",dangerHover:"#c41535",dangerLight:"#fff5f7",imagesFolder:"#8b5cf6"},$={xs:"13px",sm:"14px",base:"16px",lg:"19px",xl:"22px"},Ji=b("font-family:",Cr,";font-size:",$.base,";line-height:1.5;color:",f.text,";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;*,*::before,*::after{box-sizing:border-box;}button,input,select,textarea{font-family:inherit;font-size:inherit;}",""),Q1=jn`
10
+ from { opacity: 0; }
11
+ to { opacity: 1; }
12
+ `,Z1=jn`
13
+ from {
14
+ opacity: 0;
15
+ transform: translateY(-8px) scale(0.98);
16
+ }
17
+ to {
18
+ opacity: 1;
19
+ transform: translateY(0) scale(1);
20
+ }
21
+ `,K1=jn`
22
+ from { transform: rotate(0deg); }
23
+ to { transform: rotate(360deg); }
24
+ `,Ae={overlay:b("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",Q1," 0.15s ease-out;font-family:",Cr,";",""),modal:b(Ji," background-color:",f.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);max-width:420px;width:90%;animation:",Z1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:b("font-size:",$.lg,";font-weight:600;color:",f.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"5e7rpo",styles:"padding:12px 24px 24px"},message:b("font-size:",$.base,";color:",f.textSecondary,";margin:0;line-height:1.6;",""),footer:b("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",f.border,";background-color:",f.background,";",""),btn:b("padding:10px 18px;font-size:",$.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:b("background-color:",f.surface,";border:1px solid ",f.border,";color:",f.text,";&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),btnConfirm:b("background-color:",f.primary,";border:1px solid ",f.primary,";color:white;&:hover{background-color:",f.primaryHover,";border-color:",f.primaryHover,";}",""),btnDanger:b("background-color:",f.danger,";border:1px solid ",f.danger,";color:white;&:hover{background-color:",f.dangerHover,";border-color:",f.dangerHover,";}","")};function Yi({title:o,message:s,confirmLabel:h="Confirm",cancelLabel:u="Cancel",variant:m="default",onConfirm:p,onCancel:D}){return c("div",{css:Ae.overlay,onClick:D,children:x("div",{css:Ae.modal,onClick:_=>_.stopPropagation(),children:[c("div",{css:Ae.header,children:c("h3",{css:Ae.title,children:o})}),c("div",{css:Ae.body,children:c("p",{css:Ae.message,children:s})}),x("div",{css:Ae.footer,children:[c("button",{css:[Ae.btn,Ae.btnCancel,"",""],onClick:D,children:u}),c("button",{css:[Ae.btn,m==="danger"?Ae.btnDanger:Ae.btnConfirm,"",""],onClick:p,children:h})]})]})})}const J1={input:b("width:100%;padding:10px 12px;font-size:",$.base,";border:1px solid ",f.border,";border-radius:6px;background:",f.surface,";color:",f.text,";margin-top:12px;transition:all 0.15s ease;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 2px ",f.primaryLight,";}&::placeholder{color:",f.textMuted,";}","")};function gr({title:o,message:s,inputLabel:h,defaultValue:u="",placeholder:m,confirmLabel:p="Confirm",cancelLabel:D="Cancel",isLoading:_=!1,loadingLabel:O="Processing...",onConfirm:S,onCancel:X}){const[H,K]=dh.useState(u),oe=L=>{L.preventDefault(),H.trim()&&!_&&S(H.trim())};return c("div",{css:Ae.overlay,onClick:_?void 0:X,children:c("div",{css:Ae.modal,onClick:L=>L.stopPropagation(),children:x("form",{onSubmit:oe,children:[c("div",{css:Ae.header,children:c("h3",{css:Ae.title,children:o})}),x("div",{css:Ae.body,children:[s&&c("p",{css:Ae.message,children:s}),h&&c("label",{css:Ae.message,children:h}),c("input",{css:J1.input,type:"text",value:H,onChange:L=>K(L.target.value),placeholder:m,autoFocus:!0,disabled:_})]}),x("div",{css:Ae.footer,children:[c("button",{type:"button",css:[Ae.btn,Ae.btnCancel,"",""],onClick:X,disabled:_,children:D}),c("button",{type:"submit",css:[Ae.btn,Ae.btnConfirm,"",""],disabled:!H.trim()||_,children:_?x(xt,{children:[c("span",{css:b("display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:",K1," 0.75s linear infinite;margin-right:6px;","")}),O]}):p})]})]})})})}function Mh({title:o,message:s,buttonLabel:h="OK",onClose:u}){return c("div",{css:Ae.overlay,onClick:u,children:x("div",{css:Ae.modal,onClick:m=>m.stopPropagation(),children:[c("div",{css:Ae.header,children:c("h3",{css:Ae.title,children:o})}),c("div",{css:Ae.body,children:c("p",{css:Ae.message,children:s})}),c("div",{css:Ae.footer,children:c("button",{css:[Ae.btn,Ae.btnConfirm,"",""],onClick:u,children:h})})]})})}const Ol={progressContainer:{name:"yz1nei",styles:"margin-top:16px"},progressBar:b("width:100%;height:8px;background-color:",f.background,";border-radius:4px;overflow:hidden;margin-bottom:12px;",""),progressFill:b("height:100%;background:linear-gradient(90deg, ",f.primary,", ",f.primaryHover,");border-radius:4px;transition:width 0.3s ease;",""),progressText:b("font-size:",$.sm,";color:",f.textSecondary,";margin:0;display:flex;justify-content:space-between;align-items:center;",""),currentFile:b("font-size:",$.xs,";color:",f.textMuted,";margin:8px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),errorList:{name:"1lw22n1",styles:"margin-top:12px;padding:12px;background:#fef2f2;border:1px solid #fecaca;border-radius:6px;max-height:200px;overflow-y:auto"},errorItem:b("font-size:",$.xs,";color:#991b1b;margin:0 0 4px;&:last-child{margin-bottom:0;}","")};function vr({title:o,progress:s,onClose:h,onDeleteOrphans:u,onStop:m}){const p=s.status==="complete",D=s.status==="error",_=s.status==="stopped",O=s.status==="stopping",S=p||D||_,X=!S||O;return c("div",{css:Ae.overlay,children:x("div",{css:Ae.modal,onClick:H=>H.stopPropagation(),children:[c("div",{css:Ae.header,children:c("h3",{css:Ae.title,children:o})}),c("div",{css:Ae.body,children:D?c("p",{css:Ae.message,children:s.message||"An error occurred"}):_?x("p",{css:Ae.message,children:["Processing stopped. Processed ",s.processed??s.current," image",(s.processed??s.current)!==1?"s":""," before stopping."]}):p?x(xt,{children:[x("p",{css:Ae.message,children:[s.message?s.message:s.isMove?x(xt,{children:["Moved ",s.processed," file",s.processed!==1?"s":"",".",s.errors!==void 0&&s.errors>0?x(xt,{children:[" ",s.errors," error",s.errors!==1?"s":""," occurred."]}):null]}):s.isScan?x(xt,{children:[s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?x(xt,{children:[s.alreadyProcessed," image",s.alreadyProcessed!==1?"s":""," already exist. "]}):null,"Scanned ",s.processed," new image",s.processed!==1?"s":"",".",s.orphanedEntries!==void 0&&s.orphanedEntries>0?x(xt,{children:[" Removed ",s.orphanedEntries," orphaned entr",s.orphanedEntries!==1?"ies":"y","."]}):null,s.pendingUpdates!==void 0&&s.pendingUpdates>0?x(xt,{children:[" ",s.pendingUpdates," file",s.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):x(xt,{children:["Processed ",s.processed," new image",s.processed!==1?"s":"",".",s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?x(xt,{children:[" ",s.alreadyProcessed," already processed."]}):null]}),s.orphansRemoved!==void 0&&s.orphansRemoved>0?x(xt,{children:[" Removed ",s.orphansRemoved," orphaned thumbnail",s.orphansRemoved!==1?"s":"","."]}):null]}),s.errorMessages&&s.errorMessages.length>0&&x("div",{css:Ol.errorList,children:[s.errorMessages.slice(0,10).map((H,K)=>c("p",{css:Ol.errorItem,children:H},K)),s.errorMessages.length>10&&x("p",{css:Ol.errorItem,children:["...and ",s.errorMessages.length-10," more"]})]})]}):x(xt,{children:[c("p",{css:Ae.message,children:s.status==="cleanup"?s.message||"Cleaning up...":s.message||"Processing..."}),x("div",{css:Ol.progressContainer,children:[c("div",{css:Ol.progressBar,children:c("div",{css:Ol.progressFill,style:{width:`${s.percent}%`}})}),x("div",{css:Ol.progressText,children:[x("span",{children:[s.current," of ",s.total]}),x("span",{children:[s.percent,"%"]})]}),s.currentFile&&c("p",{css:Ol.currentFile,title:s.currentFile,children:s.currentFile})]})]})}),x("div",{css:Ae.footer,children:[X&&m&&c("button",{css:[Ae.btn,Ae.btnDanger,"",""],onClick:m,disabled:s.status==="stopping",children:s.status==="stopping"?"Stopping...":"Stop"}),S&&s.orphanedFiles&&s.orphanedFiles.length>0&&u&&x("button",{css:[Ae.btn,Ae.btnDanger,"",""],onClick:u,children:["Delete ",s.orphanedFiles.length," Orphan",s.orphanedFiles.length!==1?"s":""]}),S&&c("button",{css:[Ae.btn,Ae.btnConfirm,"",""],onClick:h,children:"Done"})]})]})})}const F1=jn`
25
+ from { opacity: 0; }
26
+ to { opacity: 1; }
27
+ `,$1=jn`
28
+ from {
29
+ opacity: 0;
30
+ transform: translateY(-8px) scale(0.98);
31
+ }
32
+ to {
33
+ opacity: 1;
34
+ transform: translateY(0) scale(1);
35
+ }
36
+ `,bt={overlay:b("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",F1," 0.15s ease-out;font-family:",Cr,";",""),modal:b(Ji," background-color:",f.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);max-width:480px;width:90%;max-height:80vh;display:flex;flex-direction:column;animation:",$1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:b("font-size:",$.lg,";font-weight:600;color:",f.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"zizupt",styles:"padding:12px 24px 24px;flex:1;overflow-y:auto;min-height:200px;max-height:400px"},message:b("font-size:",$.base,";color:",f.textSecondary,";margin:0 0 16px;line-height:1.6;",""),folderList:{name:"1axgfg3",styles:"display:flex;flex-direction:column;gap:0"},folderItem:b("display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:6px;cursor:pointer;transition:all 0.15s ease;border:1px solid transparent;position:relative;&:hover{background-color:",f.surfaceHover,";}",""),treeIndent:{name:"197dxto",styles:"display:flex;align-items:center;height:100%"},treeLine:b("width:16px;height:100%;position:relative;flex-shrink:0;&::before{content:'';position:absolute;left:8px;top:0;bottom:50%;width:0;border-left:1px dashed ",f.textSecondary,";}&::after{content:'';position:absolute;left:8px;top:50%;width:8px;height:0;border-top:1px dashed ",f.textSecondary,";}",""),folderItemSelected:b("background-color:",f.primaryLight,";border-color:",f.primary,";&:hover{background-color:",f.primaryLight,";}",""),folderItemDisabled:{name:"181lhkw",styles:"opacity:0.5;cursor:not-allowed;&:hover{background-color:transparent;}"},folderIcon:{name:"17bs1oo",styles:"width:20px;height:20px;color:#f9935e;flex-shrink:0"},folderName:b("font-size:",$.base,";color:",f.text,";flex:1;",""),footer:b("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",f.border,";background-color:",f.background,";",""),btn:b("padding:10px 18px;font-size:",$.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:b("background-color:",f.surface,";border:1px solid ",f.border,";color:",f.text,";&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),btnConfirm:b("background-color:",f.primary,";border:1px solid ",f.primary,";color:white;&:hover:not(:disabled){background-color:",f.primaryHover,";border-color:",f.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),loading:b("display:flex;align-items:center;justify-content:center;padding:40px;color:",f.textSecondary,";",""),spinner:b("width:24px;height:24px;border-radius:50%;border:3px solid ",f.border,";border-top-color:",f.primary,";animation:spin 0.8s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}","")};function Th({selectedItems:o,currentPath:s,onMove:h,onCancel:u}){const[m,p]=w.useState([]),[D,_]=w.useState(!0),[O,S]=w.useState(null);w.useEffect(()=>{async function L(){try{const q=await fetch("/api/studio/list-folders");if(q.ok){const Se=await q.json();console.log("Loaded folders:",Se),p(Se.folders||[])}else console.error("Failed to load folders:",q.status,await q.text())}catch(q){console.error("Failed to load folders:",q)}finally{_(!1)}}L()},[]);const X=Array.from(o),H=m.filter(L=>!X.some(q=>L.path===q||L.path.startsWith(q+"/"))),K=L=>L===s,oe=()=>{O&&h(O)};return c("div",{css:bt.overlay,onClick:u,children:x("div",{css:bt.modal,onClick:L=>L.stopPropagation(),children:[c("div",{css:bt.header,children:c("h3",{css:bt.title,children:"Move Items"})}),x("div",{css:bt.body,children:[x("p",{css:bt.message,children:["Select a destination folder for ",o.size," item",o.size!==1?"s":"",":"]}),D?c("div",{css:bt.loading,children:c("div",{css:bt.spinner})}):H.length===0?c("div",{css:bt.loading,children:"No available folders to move to."}):c("div",{css:bt.folderList,children:H.map(L=>{const q=K(L.path);return x("div",{css:[bt.folderItem,O===L.path&&bt.folderItemSelected,q&&bt.folderItemDisabled,"",""],style:{paddingLeft:12},onClick:()=>!q&&S(L.path),children:[L.depth>0&&c("div",{css:bt.treeIndent,children:Array.from({length:L.depth}).map((Se,P)=>c("div",{css:bt.treeLine},P))}),c("svg",{css:bt.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:c("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),x("span",{css:bt.folderName,children:[L.name,q&&" (current)"]})]},L.path)})})]}),x("div",{css:bt.footer,children:[c("button",{css:[bt.btn,bt.btnCancel,"",""],onClick:u,children:"Cancel"}),c("button",{css:[bt.btn,bt.btnConfirm,"",""],onClick:oe,disabled:!O,children:"Move Here"})]})]})})}const W1=`CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
37
+ CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key
38
+ CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_key
39
+ CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
40
+ CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev
41
+ NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev`,se={overlay:{name:"8ivopw",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.6);display:flex;align-items:center;justify-content:center;z-index:1100;padding:20px"},modal:b("background:",f.surface,";border-radius:12px;max-width:560px;width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 20px 40px rgba(0, 0, 0, 0.3);",""),header:b("display:flex;align-items:center;gap:12px;padding:20px 24px;border-bottom:1px solid ",f.border,";",""),icon:b("width:32px;height:32px;color:",f.primary,";flex-shrink:0;",""),title:b("font-size:",$.xl,";font-weight:600;color:",f.text,";margin:0;",""),closeBtn:b("margin-left:auto;background:none;border:none;padding:4px;cursor:pointer;color:",f.textMuted,";border-radius:4px;&:hover{color:",f.text,";background:",f.surfaceHover,";}",""),closeIcon:{name:"1aynuae",styles:"width:20px;height:20px"},content:{name:"vxuddk",styles:"padding:24px"},intro:b("font-size:",$.base,";color:",f.textSecondary,";margin:0 0 20px 0;line-height:1.6;",""),steps:{name:"1fs2p21",styles:"list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:16px"},step:{name:"1wesxqa",styles:"display:flex;gap:12px"},stepNumber:b("width:28px;height:28px;border-radius:50%;background:",f.primaryLight,";color:",f.primary,";font-size:",$.sm,";font-weight:600;display:flex;align-items:center;justify-content:center;flex-shrink:0;",""),stepContent:{name:"pkc2k3",styles:"flex:1;padding-top:3px"},stepTitle:b("font-size:",$.base,";font-weight:500;color:",f.text,";margin:0 0 4px 0;",""),stepDesc:b("font-size:",$.sm,";color:",f.textSecondary,";margin:0;line-height:1.5;",""),link:b("color:",f.primary,";text-decoration:none;font-weight:500;&:hover{text-decoration:underline;}",""),envVarsWrapper:{name:"1ksolcl",styles:"position:relative;margin-top:20px"},envVars:b("background:",f.background,";border:1px solid ",f.border,";border-radius:8px;padding:16px;padding-right:48px;font-family:'SF Mono',Monaco,'Cascadia Code',monospace;font-size:13px;line-height:1.8;color:",f.text,";overflow-x:auto;",""),envVar:{name:"4zleql",styles:"display:block"},envKey:b("color:",f.primary,";",""),envValue:b("color:",f.textSecondary,";",""),copyBtn:b("position:absolute;top:8px;right:8px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;color:",f.textMuted,";transition:all 0.15s ease;&:hover{background:",f.surfaceHover,";color:",f.text,";border-color:#d0d5dd;}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},copiedTooltip:{name:"9a5yd1",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;&::before{content:'';position:absolute;right:-4px;top:50%;transform:translateY(-50%);border-left:4px solid #1a1f36;border-top:4px solid transparent;border-bottom:4px solid transparent;}"},footer:b("padding:16px 24px;border-top:1px solid ",f.border,";display:flex;justify-content:flex-end;gap:12px;",""),docsBtn:b("padding:10px 16px;border-radius:6px;font-size:",$.base,";font-weight:500;border:1px solid ",f.border,";background:",f.surface,";color:",f.text,";cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:all 0.15s ease;&:hover{background:",f.surfaceHover,";border-color:#d0d5dd;}",""),doneBtn:b("padding:10px 20px;border-radius:6px;font-size:",$.base,";font-weight:500;border:none;background:",f.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",f.primaryHover,";}",""),externalIcon:{name:"1djxupe",styles:"width:14px;height:14px"}};function Ah({isOpen:o,onClose:s}){const[h,u]=w.useState(!1),m=async()=>{try{await navigator.clipboard.writeText(W1),u(!0),setTimeout(()=>u(!1),2e3)}catch(p){console.error("Failed to copy:",p)}};return o?c("div",{css:se.overlay,onClick:s,children:x("div",{css:se.modal,onClick:p=>p.stopPropagation(),children:[x("div",{css:se.header,children:[c("svg",{css:se.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),c("h2",{css:se.title,children:"Set Up CDN Storage"}),c("button",{css:se.closeBtn,onClick:s,children:c("svg",{css:se.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),x("div",{css:se.content,children:[c("p",{css:se.intro,children:"Sync your images to Cloudflare R2 for faster global delivery. R2 offers generous free tier with no egress fees."}),x("ol",{css:se.steps,children:[x("li",{css:se.step,children:[c("span",{css:se.stepNumber,children:"1"}),x("div",{css:se.stepContent,children:[c("h4",{css:se.stepTitle,children:"Create a Cloudflare account"}),x("p",{css:se.stepDesc,children:["Sign up at"," ",c("a",{css:se.link,href:"https://dash.cloudflare.com/sign-up",target:"_blank",rel:"noopener noreferrer",children:"dash.cloudflare.com"})," ","if you don't have one already."]})]})]}),x("li",{css:se.step,children:[c("span",{css:se.stepNumber,children:"2"}),x("div",{css:se.stepContent,children:[c("h4",{css:se.stepTitle,children:"Create an R2 bucket"}),x("p",{css:se.stepDesc,children:["Go to R2 in your Cloudflare dashboard and create a new bucket. Choose a name like ",c("code",{children:"my-images"}),"."]})]})]}),x("li",{css:se.step,children:[c("span",{css:se.stepNumber,children:"3"}),x("div",{css:se.stepContent,children:[c("h4",{css:se.stepTitle,children:"Enable public access"}),x("p",{css:se.stepDesc,children:['In bucket settings, enable "Public Access" and copy the public URL (e.g., ',c("code",{children:"https://pub-xxx.r2.dev"}),")."]})]})]}),x("li",{css:se.step,children:[c("span",{css:se.stepNumber,children:"4"}),x("div",{css:se.stepContent,children:[c("h4",{css:se.stepTitle,children:"Create API token"}),c("p",{css:se.stepDesc,children:'Go to R2 → Manage R2 API Tokens → Create API Token. Select "Object Read & Write" permissions for your bucket.'})]})]}),x("li",{css:se.step,children:[c("span",{css:se.stepNumber,children:"5"}),x("div",{css:se.stepContent,children:[c("h4",{css:se.stepTitle,children:"Add environment variables"}),x("p",{css:se.stepDesc,children:["Add these to your ",c("code",{children:".env.local"})," file:"]})]})]})]}),x("div",{css:se.envVarsWrapper,children:[x("div",{css:se.envVars,children:[x("span",{css:se.envVar,children:[c("span",{css:se.envKey,children:"CLOUDFLARE_R2_ACCOUNT_ID"}),"=",c("span",{css:se.envValue,children:"your_account_id"})]}),x("span",{css:se.envVar,children:[c("span",{css:se.envKey,children:"CLOUDFLARE_R2_ACCESS_KEY_ID"}),"=",c("span",{css:se.envValue,children:"your_access_key"})]}),x("span",{css:se.envVar,children:[c("span",{css:se.envKey,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY"}),"=",c("span",{css:se.envValue,children:"your_secret_key"})]}),x("span",{css:se.envVar,children:[c("span",{css:se.envKey,children:"CLOUDFLARE_R2_BUCKET_NAME"}),"=",c("span",{css:se.envValue,children:"your_bucket_name"})]}),x("span",{css:se.envVar,children:[c("span",{css:se.envKey,children:"CLOUDFLARE_R2_PUBLIC_URL"}),"=",c("span",{css:se.envValue,children:"https://pub-xxx.r2.dev"})]}),x("span",{css:se.envVar,children:[c("span",{css:se.envKey,children:"NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL"}),"=",c("span",{css:se.envValue,children:"https://pub-xxx.r2.dev"})]})]}),x("button",{css:se.copyBtn,onClick:m,title:"Copy to clipboard",children:[h&&c("span",{css:se.copiedTooltip,children:"Copied!"}),c("svg",{css:se.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})]})]})]}),x("div",{css:se.footer,children:[x("a",{css:se.docsBtn,href:"https://developers.cloudflare.com/r2/get-started/",target:"_blank",rel:"noopener noreferrer",children:["R2 Documentation",c("svg",{css:se.externalIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]}),c("button",{css:se.doneBtn,onClick:s,children:"Got it"})]})]})}):null}const I1=jn`
42
+ from { opacity: 0; }
43
+ to { opacity: 1; }
44
+ `,P1=jn`
45
+ from {
46
+ opacity: 0;
47
+ transform: translateY(-8px) scale(0.98);
48
+ }
49
+ to {
50
+ opacity: 1;
51
+ transform: translateY(0) scale(1);
52
+ }
53
+ `,st={overlay:b("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",I1," 0.15s ease-out;font-family:",Cr,";",""),modal:b(Ji," background-color:",f.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);max-width:520px;width:90%;animation:",P1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:b("font-size:",$.lg,";font-weight:600;color:",f.text,";margin:0;letter-spacing:-0.02em;",""),tabs:b("display:flex;gap:0;margin-top:16px;border-bottom:1px solid ",f.border,";",""),tab:b("padding:12px 20px;font-size:",$.base,";font-weight:500;color:",f.textSecondary,";background:none;border:none;cursor:pointer;position:relative;transition:color 0.15s;&:hover{color:",f.text,";}",""),tabActive:b("color:",f.primary,";&::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background-color:",f.primary,";}",""),body:{name:"1po9b7e",styles:"padding:24px;min-height:200px"},dropzone:b("border:2px dashed ",f.border,";border-radius:8px;padding:40px 24px;text-align:center;cursor:pointer;transition:all 0.15s;&:hover{border-color:",f.primary,";background-color:",f.primaryLight,";}",""),dropzoneActive:b("border-color:",f.primary,";background-color:",f.primaryLight,";",""),dropzoneIcon:b("width:48px;height:48px;margin:0 auto 16px;color:",f.textMuted,";",""),dropzoneText:b("font-size:",$.base,";color:",f.text,";margin:0 0 4px;",""),dropzoneHint:b("font-size:",$.sm,";color:",f.textSecondary,";margin:0;",""),textarea:b("width:100%;min-height:150px;padding:12px;font-size:",$.sm,";font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;border:1px solid ",f.border,";border-radius:8px;resize:vertical;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 3px ",f.primaryLight,";}&::placeholder{color:",f.textMuted,";}",""),textareaLabel:b("font-size:",$.sm,";color:",f.textSecondary,";margin:0 0 8px;",""),footer:b("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",f.border,";background-color:",f.background,";",""),btn:b("padding:10px 18px;font-size:",$.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:b("background-color:",f.surface,";border:1px solid ",f.border,";color:",f.text,";&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),btnConfirm:b("background-color:",f.primary,";border:1px solid ",f.primary,";color:white;&:hover:not(:disabled){background-color:",f.primaryHover,";border-color:",f.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),fileInput:{name:"eivff4",styles:"display:none"},selectedFiles:b("margin-top:16px;padding:12px;background-color:",f.background,";border-radius:6px;font-size:",$.sm,";color:",f.text,";","")};function eg({currentPath:o,onClose:s,onUploadComplete:h}){const[u,m]=w.useState("upload"),[p,D]=w.useState([]),[_,O]=w.useState(""),[S,X]=w.useState(!1),[H,K]=w.useState(!1),[oe,L]=w.useState(!1),q=w.useRef(null),Se=w.useCallback(ue=>{ue&&D(Array.from(ue))},[]),P=w.useCallback(ue=>{ue.preventDefault(),X(!1),Se(ue.dataTransfer.files)},[Se]),me=w.useCallback(async()=>{if(p.length!==0){K(!0);try{for(const ue of p){const Y=new FormData;Y.append("file",ue),Y.append("path",o),await fetch("/api/studio/upload",{method:"POST",body:Y})}h(),s()}catch(ue){console.error("Upload failed:",ue)}finally{K(!1)}}},[p,o,h,s]),ae=w.useCallback(async()=>{const ue=_.split(`
54
+ `).map(Y=>Y.trim()).filter(Y=>Y.length>0);if(ue.length!==0){L(!0);try{const J=(await fetch("/api/studio/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:ue})})).body?.getReader();if(!J)throw new Error("No reader");const U=new TextDecoder;for(;;){const{done:be,value:ge}=await J.read();if(be)break;const Re=U.decode(ge).split(`
55
+
56
+ `).filter(Ue=>Ue.startsWith("data: "));for(const Ue of Re)JSON.parse(Ue.replace("data: ","")).type==="complete"&&(h(),s())}}catch(Y){console.error("Import failed:",Y)}finally{L(!1)}}},[_,h,s]);return c("div",{css:st.overlay,onClick:s,children:x("div",{css:st.modal,onClick:ue=>ue.stopPropagation(),children:[x("div",{css:st.header,children:[c("h3",{css:st.title,children:"Add New"}),x("div",{css:st.tabs,children:[c("button",{css:[st.tab,u==="upload"&&st.tabActive,"",""],onClick:()=>m("upload"),children:"Upload Files"}),c("button",{css:[st.tab,u==="import"&&st.tabActive,"",""],onClick:()=>m("import"),children:"Import URLs"})]})]}),c("div",{css:st.body,children:u==="upload"?x(xt,{children:[x("div",{css:[st.dropzone,S&&st.dropzoneActive,"",""],onClick:()=>q.current?.click(),onDragOver:ue=>{ue.preventDefault(),X(!0)},onDragLeave:()=>X(!1),onDrop:P,children:[c("svg",{css:st.dropzoneIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),c("p",{css:st.dropzoneText,children:"Drop files here or click to browse"}),c("p",{css:st.dropzoneHint,children:"Supports images and other media files"})]}),c("input",{ref:q,type:"file",multiple:!0,css:st.fileInput,onChange:ue=>Se(ue.target.files)}),p.length>0&&x("div",{css:st.selectedFiles,children:[p.length," file",p.length!==1?"s":""," selected"]})]}):x(xt,{children:[c("p",{css:st.textareaLabel,children:"Paste image URLs (one per line)"}),c("textarea",{css:st.textarea,value:_,onChange:ue=>O(ue.target.value),placeholder:`https://cdn.example.com/photos/image1.jpg
57
+ https://cdn.example.com/photos/image2.jpg`})]})}),x("div",{css:st.footer,children:[c("button",{css:[st.btn,st.btnCancel,"",""],onClick:s,children:"Cancel"}),u==="upload"?c("button",{css:[st.btn,st.btnConfirm,"",""],onClick:me,disabled:p.length===0||H,children:H?"Uploading...":"Upload"}):c("button",{css:[st.btn,st.btnConfirm,"",""],onClick:ae,disabled:!_.trim()||oe,children:oe?"Importing...":"Import"})]})]})})}const Qs="36px",tg=jn`
58
+ to { transform: rotate(360deg); }
59
+ `,ve={toolbar:b("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",f.surface,";border-bottom:1px solid ",f.border,";overflow:visible;min-width:0;@media (min-width: 768px){padding:12px 24px;}",""),left:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},right:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},btn:b("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",Qs,";padding:0 14px;border-radius:6px;font-size:",$.base,";font-weight:500;background:",f.surface,";border:1px solid ",f.border,";cursor:pointer;transition:all 0.15s ease;color:",f.text,";letter-spacing:-0.01em;&:hover:not(:disabled){background-color:",f.surfaceHover,";border-color:",f.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:b("background:",f.primary,";border-color:",f.primary,";color:white;&:hover:not(:disabled){background:",f.primaryHover,";border-color:",f.primaryHover,";}",""),btnDanger:b("color:",f.danger,";&:hover:not(:disabled){background-color:",f.dangerLight,";border-color:",f.danger,";}",""),btnCloud:{name:"1lzbs29",styles:"color:#f59e0b;&:hover:not(:disabled){background-color:rgba(245, 158, 11, 0.1);border-color:#f59e0b;}"},cloudDropdownWrapper:{name:"bjn8wh",styles:"position:relative"},dropdownArrow:{name:"1j1hlpy",styles:"width:12px;height:12px;margin-left:4px"},cloudDropdown:b("position:absolute;top:100%;left:0;z-index:1000;min-width:160px;margin-top:4px;background:white;border:1px solid ",f.border,";border-radius:6px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;",""),cloudDropdownItem:b("display:flex;align-items:center;gap:8px;width:100%;padding:10px 14px;border:none;background:none;font-size:",$.sm,";color:",f.text,";cursor:pointer;text-align:left;white-space:nowrap;&:hover{background-color:",f.hover,";}svg{width:16px;height:16px;flex-shrink:0;color:#f59e0b;}",""),cloudDropdownItemDefault:b("svg{color:",f.text,";}",""),cloudDropdownItemDanger:b("color:",f.danger,";svg{color:",f.danger,";}",""),cloudDropdownDivider:b("height:1px;background-color:",f.border,";margin:4px 0;",""),icon:{name:"157xhr7",styles:"width:16px;height:16px"},iconSpin:b("animation:",tg," 1s linear infinite;",""),selectionCount:b("font-size:",$.base,";color:",f.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:b("color:",f.primary,";background:none;border:none;cursor:pointer;font-size:",$.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),divider:b("width:1px;height:24px;background:",f.border,";margin:0 4px;",""),viewToggle:b("display:flex;align-items:center;height:",Qs,";background-color:",f.surface,";border:1px solid ",f.border,";border-radius:6px;overflow:hidden;",""),searchWrapper:{name:"9iujih",styles:"position:relative;display:flex;align-items:center"},searchInput:b("height:",Qs,";padding:0 32px 0 12px;border:1px solid ",f.border,";border-radius:6px;font-size:",$.base,";background:",f.surface,";color:",f.text,";width:180px;transition:all 0.15s ease;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 2px ",f.primaryLight,";}&::placeholder{color:",f.textMuted,";}",""),searchClearBtn:b("position:absolute;right:5px;top:5px;bottom:5px;background:",f.primary,";border:none;padding:0 6px;cursor:pointer;color:white;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all 0.15s ease;&:hover{background:",f.primaryHover,";}",""),viewBtn:b("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",f.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",f.text,";background-color:",f.surfaceHover,";}",""),viewBtnActive:b("background-color:",f.primaryLight,";color:",f.primary,";&:hover{background-color:",f.primaryLight,";color:",f.primary,";}","")};function ng(){const{selectedItems:o,viewMode:s,setViewMode:h,clearSelection:u,currentPath:m,triggerRefresh:p,focusedItem:D,scanRequested:_,clearScanRequest:O,fileItems:S,requestProcess:X,setProcessMode:H,actionState:K,cancelAction:oe}=Qa(),L=w.useRef(null),q=w.useRef(null),[Se,P]=w.useState(!1),[me,ae]=w.useState(!1),[ue,Y]=w.useState(!1),[J,U]=w.useState(!1),[be,ge]=w.useState(!1),[Ee,Re]=w.useState(0),[Ue,ut]=w.useState(!1),[Qe,Xe]=w.useState(!1),[T,B]=w.useState(!1),[ee,ke]=w.useState(0),[He,y]=w.useState(!1),[k,V]=w.useState("Processing Images"),[W,G]=w.useState({current:0,total:0,percent:0,status:"processing"}),[Ce,pe]=w.useState(null),[rt,Ze]=w.useState(!1),[Kt,te]=w.useState(!1),[Bt,ft]=w.useState(!1),[Me,pt]=w.useState(!1),[jt,fn]=w.useState(!1),[qn,ta]=w.useState(!1),[rl,qt]=w.useState(!1),[Ll,En]=w.useState(!1),_t=w.useRef(null),Ka=w.useRef(null),cl=m==="public/images"||m.startsWith("public/images/");w.useCallback(()=>{L.current?.click()},[]);const na=w.useCallback(async()=>{Y(!0),V("Scanning Files"),y(!0),G({current:0,total:0,percent:0,status:"processing",message:"Scanning for files..."});try{const Q=(await fetch("/api/studio/scan",{method:"POST"})).body?.getReader();if(!Q)throw new Error("No reader");const I=new TextDecoder;let re="";for(;;){const{done:fe,value:ie}=await Q.read();if(fe)break;re+=I.decode(ie,{stream:!0});const Te=re.split(`
60
+
61
+ `);re=Te.pop()||"";for(const we of Te){if(!we.startsWith("data: "))continue;const Z=JSON.parse(we.slice(6));if(Z.type==="start")G({current:0,total:Z.total,percent:0,status:"processing",message:`Scanning ${Z.total} files...`});else if(Z.type==="progress")G({current:Z.current,total:Z.total,percent:Z.percent,status:"processing",currentFile:Z.currentFile});else if(Z.type==="cleanup")G(De=>({...De,message:Z.message}));else if(Z.type==="complete"){let De=Z.renamed>0?`${Z.renamed} file(s) renamed due to conflicts. `:"";Z.orphanedFiles&&Z.orphanedFiles.length>0&&(De+=`Found ${Z.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),G({current:Z.total||0,total:Z.total||0,percent:100,status:"complete",processed:Z.added,alreadyProcessed:Z.existingCount,errors:Z.errors,orphanedFiles:Z.orphanedFiles,pendingUpdates:Z.pendingUpdates,orphanedEntries:Z.orphanedEntries,message:De||void 0,isScan:!0}),p()}else Z.type==="error"&&G({current:0,total:0,percent:0,status:"error",message:Z.message||"Scan failed"})}}}catch(ne){console.error("Scan error:",ne),G({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{Y(!1)}},[p]);w.useEffect(()=>{const ne=Q=>{_t.current&&!_t.current.contains(Q.target)&&qt(!1),Ka.current&&!Ka.current.contains(Q.target)&&En(!1)};return document.addEventListener("mousedown",ne),()=>document.removeEventListener("mousedown",ne)},[]),w.useEffect(()=>{_&&!ue&&(O(),na())},[_,ue,O,na]);const la=w.useCallback(async ne=>{const Q=ne.target.files;if(!Q||Q.length===0)return;const I=Array.from(Q);I.length>1?(G({current:0,total:I.length,percent:0,status:"processing",message:"Uploading files..."}),y(!0)):ae(!0);let re=0,fe=0;try{for(let ie=0;ie<I.length;ie++){const Te=I[ie],we=new FormData;we.append("file",Te),we.append("path",m);try{const Z=await fetch("/api/studio/upload",{method:"POST",body:we});if(Z.ok)re++;else{const De=await Z.json();fe++,I.length===1&&(Z.status>=500?(console.error("Upload error:",De),pe({title:"Upload Failed",message:`Failed to upload ${Te.name}: ${De.error||"Unknown error"}`})):pe({title:"Cannot Upload Here",message:De.error||"Upload not allowed in this location."}))}}catch{fe++}I.length>1&&G({current:ie+1,total:I.length,percent:Math.round((ie+1)/I.length*100),status:"processing",currentFile:Te.name})}I.length>1&&G({current:I.length,total:I.length,percent:100,status:"complete",processed:re,errors:fe}),p()}catch(ie){console.error("Upload error:",ie),I.length>1?G({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):pe({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{ae(!1),L.current&&(L.current.value="")}},[m,p]),Fi=w.useCallback(async ne=>{if(o.size>0){const I=Array.from(o),re=I.filter(ie=>(ie.split("/").pop()||"").includes(".")&&!ie.endsWith("/")),fe=I.filter(ie=>!(ie.split("/").pop()||"").includes(".")||ie.endsWith("/"));if(fe.length>0)try{const Te=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(fe.join(","))}`)).json();if(Te.images)for(const we of Te.images){const Z=`public/${we}`;re.includes(Z)||re.push(Z)}}catch(ie){console.error("Failed to get folder files:",ie)}if(re.length===0){pe({title:"No Files Found",message:"No files found in the selected items."});return}H(ne),X(re)}else try{const re=await(await fetch("/api/studio/count-images")).json();if(!re.images||re.images.length===0){pe({title:"No Images Found",message:"No images found in the public folder to process."});return}const fe=re.images.map(ie=>`public/${ie}`);H(ne),X(fe)}catch(I){console.error("Failed to get images:",I),pe({title:"Error",message:"Failed to get images."})}},[o,X,H]),$i=w.useCallback(()=>{q.current&&(G(ne=>({...ne,status:"stopping"})),q.current.abort())},[]),wr=w.useCallback(async()=>{const ne=W.orphanedFiles;if(!(!ne||ne.length===0))try{const Q=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:ne})}),I=await Q.json();Q.ok?(G(re=>({...re,orphanedFiles:void 0,orphansRemoved:I.deleted,message:`Deleted ${I.deleted} orphaned thumbnail${I.deleted!==1?"s":""}.`})),p()):pe({title:"Delete Failed",message:I.error||"Failed to delete orphaned files."})}catch(Q){console.error("Delete orphans error:",Q),pe({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[W.orphanedFiles,p]),zr=w.useCallback(()=>{o.size!==0&&U(!0)},[o]),Ul=w.useCallback(async()=>{U(!1);try{const ne=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:Array.from(o)})});if(ne.ok)u(),p();else{const Q=await ne.json();pe({title:"Delete Failed",message:Q.error||"Unknown error"})}}catch(ne){console.error("Delete error:",ne),pe({title:"Delete Failed",message:"Delete failed. Check console for details."})}},[o,u,p]),Xt=w.useCallback(async()=>{if(o.size===0)return;const ne=Array.from(o),Q=ne.filter(we=>(we.split("/").pop()||"").includes(".")&&!we.endsWith("/")),I=ne.filter(we=>!(we.split("/").pop()||"").includes(".")||we.endsWith("/")),re=I.length>0;if(re)try{const Z=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(I.join(","))}`)).json();if(Z.images)for(const De of Z.images){const Oe=`public/${De}`;Q.includes(Oe)||Q.push(Oe)}}catch(we){console.error("Failed to get folder files:",we)}if(Q.length===0){pe({title:"No Files Found",message:"No files found in the selected items."});return}let fe=!1,ie=!1,Te=0;for(const we of Q){const Z=S.find(De=>De.path===we);Z?Z.isRemote?fe=!0:Z.cdnPushed?Te++:ie=!0:re&&(ie=!0)}if(!re&&Te===Q.length){pe({title:"Already Pushed",message:`All ${Q.length} file${Q.length!==1?"s are":" is"} already on the CDN.`});return}Re(Q.length),ut(fe),Xe(ie),ge(!0)},[o,S]),Dn=w.useCallback(async()=>{ge(!1);const ne=Array.from(o),Q=ne.filter(De=>(De.split("/").pop()||"").includes(".")&&!De.endsWith("/")),I=ne.filter(De=>!(De.split("/").pop()||"").includes(".")||De.endsWith("/"));if(I.length>0)try{const Oe=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(I.join(","))}`)).json();if(Oe.images)for(const it of Oe.images){const ye=`public/${it}`;Q.includes(ye)||Q.push(ye)}}catch(De){console.error("Failed to get folder files:",De)}const re=Q.map(De=>"/"+De.replace(/^public\//,"")),fe=new AbortController;q.current=fe,V("Pushing to CDN"),G({current:0,total:re.length,percent:0,status:"processing",message:"Pushing to CDN..."}),y(!0);let ie=0,Te=0,we=0;const Z=[];try{for(let Oe=0;Oe<re.length;Oe++){if(fe.signal.aborted){G(dn=>({...dn,status:"stopped",message:`Stopped. ${ie} file${ie!==1?"s":""} pushed.`})),u(),p(),q.current=null;return}const it=re[Oe];let ye=!1,ct=!1,Pe;for(let dn=0;dn<3&&!ye&&!fe.signal.aborted;dn++)try{const $a=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[it]}),signal:fe.signal}),Jt=await $a.json();if($a.ok)if(Jt.pushed?.length>0)ie++,ye=!0;else if(Jt.alreadyPushed?.length>0)ct=!0,ye=!0;else if(Jt.errors?.length>0)for(const sa of Jt.errors)Pe=sa;else ye=!0;else{if(Jt.error?.includes("R2 not configured")||Jt.error?.includes("CLOUDFLARE_R2")){y(!1),fn(!0);return}Pe=Jt.error||`Failed: ${it}`}}catch{Pe=`Network error: ${it}`,dn<2&&await new Promise(Jt=>setTimeout(Jt,500*(dn+1)))}ct?Te++:!ye&&Pe&&(we++,Z.push(Pe)),G({current:Oe+1,total:re.length,percent:Math.round((Oe+1)/re.length*100),status:"processing",currentFile:it.replace(/^\//,"")})}if(fe.signal.aborted){u(),p(),q.current=null;return}let De;ie===0&&we===0?De=`${Te} file${Te!==1?"s":""} already on CDN. 0 new files pushed.`:Te>0&&we===0&&(De=`${ie} file${ie!==1?"s":""} pushed. ${Te} already on CDN.`),G({current:re.length,total:re.length,percent:100,status:"complete",processed:ie,errors:we,errorMessages:Z.length>0?Z:void 0,message:De}),u(),p()}catch(De){if(fe.signal.aborted){q.current=null;return}console.error("Push error:",De),G({current:0,total:0,percent:0,status:"error",message:"Failed to push to CDN."})}finally{q.current=null}},[o,u,p]),[Yt,Mr]=w.useState([]),[aa,Tr]=w.useState(0),ia=w.useCallback(async()=>{if(o.size===0)return;const ne=Array.from(o),Q=ne.filter(ie=>(ie.split("/").pop()||"").includes(".")&&!ie.endsWith("/")),I=ne.filter(ie=>!(ie.split("/").pop()||"").includes(".")||ie.endsWith("/")),re=I.length>0;if(re)try{const Te=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(I.join(","))}`)).json();if(Te.images)for(const we of Te.images){const Z=`public/${we}`;Q.includes(Z)||Q.push(Z)}}catch(ie){console.error("Failed to get folder files:",ie)}if(Q.length===0){pe({title:"No Files Found",message:"No files found in the selected items."});return}let fe;if(re)fe=Q;else if(fe=Q.filter(ie=>{const Te=S.find(we=>we.path===ie);return Te&&Te.cdnPushed&&!Te.isRemote}),fe.length===0){pe({title:"No CDN Files",message:`None of the ${Q.length} selected file${Q.length!==1?"s are":" is"} on the CDN.`});return}Mr(fe),Tr(Q.length),ke(fe.length),B(!0)},[o,S]),Nl=w.useRef(null),oa=w.useCallback(async()=>{B(!1),K.showDownloadConfirm&&oe();const ne=new AbortController;q.current=ne;const Q=`download-${Date.now()}-${Math.random().toString(36).slice(2)}`;Nl.current=Q;const re=(K.showDownloadConfirm?K.actionPaths:Yt).map(fe=>"/"+fe.replace(/^public\//,""));V("Downloading from CDN"),y(!0),G({current:0,total:re.length,percent:0,status:"processing"});try{const fe=await fetch("/api/studio/download-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:re,operationId:Q}),signal:ne.signal});if(!fe.ok||!fe.body)throw new Error("Download request failed");const ie=fe.body.getReader(),Te=new TextDecoder;let we="",Z=0;const De=async()=>{try{await fetch("/api/studio/cancel-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationId:Q})})}catch{}ie.cancel(),G(Oe=>({...Oe,status:"stopped",message:`Stopped. ${Z} file${Z!==1?"s":""} downloaded.`})),u(),p(),q.current=null,Nl.current=null};ne.signal.addEventListener("abort",De);try{for(;;){const{done:Oe,value:it}=await ie.read();if(Oe)break;we+=Te.decode(it,{stream:!0});const ye=we.split(`
62
+ `);we=ye.pop()||"";for(const ct of ye)if(ct.startsWith("data: "))try{const Pe=JSON.parse(ct.slice(6));if(Pe.type==="progress")Pe.downloaded!==void 0&&(Z=Pe.downloaded),G({current:Pe.current,total:Pe.total,percent:Math.round(Pe.current/Pe.total*100),status:"processing",message:Pe.message});else if(Pe.type==="complete"){Z=Pe.downloaded||Pe.total||re.length;let dn=Pe.message;aa>Z&&(dn=`${Z} file${Z!==1?"s":""} downloaded out of ${aa} selected.`),G({current:Z,total:Z,percent:100,status:"complete",message:dn})}else Pe.type==="error"&&G({current:0,total:0,percent:0,status:"error",message:Pe.message})}catch{}}ne.signal.aborted||(u(),p())}catch(Oe){if(!ne.signal.aborted)throw Oe}finally{ne.signal.removeEventListener("abort",De)}}catch(fe){if(ne.signal.aborted)return;console.error("Download error:",fe),G({current:0,total:0,percent:0,status:"error",message:"Failed to download from CDN."})}finally{q.current=null}},[Yt,aa,u,p,K.showDownloadConfirm,K.actionPaths,oe]),Yn=w.useCallback(async()=>{if(o.size===0)return;const Q=Array.from(o).filter(I=>{const re=S.find(fe=>fe.path===I);return re&&re.hasUpdate});if(Q.length===0){pe({title:"No Updates",message:"No files with pending updates in selection."});return}V("Pushing Updates"),y(!0),G({current:0,total:Q.length,percent:0,status:"processing"});try{const re=(await fetch("/api/studio/push-updates-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:Q})})).body?.getReader();if(!re)throw new Error("No response body");const fe=new TextDecoder;let ie="";for(;;){const{done:Te,value:we}=await re.read();if(Te)break;ie+=fe.decode(we,{stream:!0});const Z=ie.split(`
63
+ `);ie=Z.pop()||"";for(const De of Z)if(De.startsWith("data: "))try{const Oe=JSON.parse(De.slice(6));Oe.type==="progress"?G({current:Oe.current,total:Oe.total,percent:Oe.percent,status:"processing",currentFile:Oe.currentFile}):Oe.type==="cleanup"?G(it=>({...it,message:Oe.message})):Oe.type==="complete"?G({current:Oe.total||Q.length,total:Oe.total||Q.length,percent:100,status:"complete",message:Oe.message}):Oe.type==="error"&&G({current:0,total:0,percent:0,status:"error",message:Oe.message})}catch{}}u(),p()}catch(I){console.error("Push updates error:",I),G({current:0,total:0,percent:0,status:"error",message:"Failed to push updates."})}},[o,S,u,p]),ra=w.useCallback(async()=>{if(o.size===0)return;const Q=Array.from(o).filter(I=>{const re=S.find(fe=>fe.path===I);return re&&re.hasUpdate});if(Q.length!==0)try{const I=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:Q})});if(I.ok)u(),p();else{const re=await I.json();pe({title:"Cancel Failed",message:re.error||"Unknown error"})}}catch(I){console.error("Cancel updates error:",I),pe({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[o,S,u,p]),Hl=w.useCallback(async ne=>{Ze(!1);try{const Q=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:m,name:ne})});if(Q.ok)p();else{const I=await Q.json();pe({title:"Create Folder Failed",message:I.error||"Unknown error"})}}catch(Q){console.error("Create folder error:",Q),pe({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[m,p]),Ar=w.useCallback(()=>{o.size!==0&&pt(!0)},[o]),Wi=w.useCallback(async ne=>{const Q=Array.from(o),I=new AbortController;q.current=I,V("Moving Files"),y(!0),G({current:0,total:Q.length,percent:0,status:"processing"});let re=0;try{const fe=await fetch("/api/studio/move",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:Q,destination:ne}),signal:I.signal});if(!fe.body)throw new Error("No response body");const ie=fe.body.getReader(),Te=new TextDecoder;let we="";const Z=()=>{ie.cancel(),G(De=>({...De,status:"stopped",message:`Stopped. ${re} file${re!==1?"s":""} moved.`})),u(),p(),q.current=null};I.signal.addEventListener("abort",Z);try{for(;;){const{done:De,value:Oe}=await ie.read();if(De)break;we+=Te.decode(Oe,{stream:!0});const it=we.split(`
64
+
65
+ `);we=it.pop()||"";for(const ye of it)if(ye.startsWith("data: "))try{const ct=JSON.parse(ye.slice(6));ct.type==="start"?G(Pe=>({...Pe,total:ct.total})):ct.type==="progress"?(re=ct.current,G({current:ct.current,total:ct.total,percent:ct.percent,currentFile:ct.currentFile,status:"processing"})):ct.type==="complete"?(G(Pe=>({...Pe,status:"complete",processed:ct.moved,errors:ct.errors,errorMessages:ct.errorMessages,isMove:!0})),u(),p()):ct.type==="error"&&G(Pe=>({...Pe,status:"error",errorMessage:ct.message}))}catch{}}}finally{I.signal.removeEventListener("abort",Z)}}catch(fe){if(I.signal.aborted){q.current=null;return}console.error("Move error:",fe),G(ie=>({...ie,status:"error",errorMessage:"Failed to move items. Check console for details."}))}q.current=null},[o,u,p]),{searchQuery:ca,setSearchQuery:wn}=Qa(),Er=w.useCallback(ne=>{wn(ne.target.value)},[wn]),Ii=w.useCallback(ne=>{ne.key==="Escape"&&(ne.stopPropagation(),wn(""),ne.target.blur())},[wn]),zn=o.size>0;zn&&Array.from(o).some(ne=>{const Q=S.find(I=>I.path===ne);return Q&&Q.cdnPushed&&!Q.isRemote}),zn&&Array.from(o).every(ne=>{const Q=S.find(I=>I.path===ne);return Q&&Q.type==="file"&&Q.cdnPushed&&!Q.isRemote});const Pi=zn&&Array.from(o).some(ne=>{const Q=S.find(I=>I.path===ne);return Q&&Q.hasUpdate}),kn=Array.from(o),_n=kn.length===1&&!kn[0].includes("."),Gn=_n?kn[0]:null,Ja=Gn&&Gn.split("/").pop()||"",Qt=kn.length===1&&kn[0].includes("."),mt=Qt?kn[0]:null,Rt=mt&&mt.split("/").pop()||"",sl=w.useCallback(async ne=>{if(!Gn)return;te(!1);const Q=new AbortController;q.current=Q,V("Renaming Folder"),y(!0),G({current:0,total:0,percent:0,status:"processing",message:"Preparing rename..."});let I=0;try{const re=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:Gn,newName:ne}),signal:Q.signal});if(!re.body)throw new Error("No response body");const fe=re.body.getReader(),ie=new TextDecoder;let Te="";const we=()=>{fe.cancel(),G(Z=>({...Z,status:"stopped",message:`Stopped. ${I} item${I!==1?"s":""} renamed.`})),u(),p(),q.current=null};Q.signal.addEventListener("abort",we);try{for(;;){const{done:Z,value:De}=await fe.read();if(Z)break;Te+=ie.decode(De,{stream:!0});const Oe=Te.split(`
66
+ `);Te=Oe.pop()||"";for(const it of Oe){if(!it.startsWith("data: "))continue;const ye=JSON.parse(it.slice(6));ye.type==="start"?G({current:0,total:ye.total,percent:0,status:"processing",message:ye.message}):ye.type==="progress"?(I=ye.renamed??ye.current,G({current:ye.current,total:ye.total,percent:Math.round(ye.current/ye.total*100),status:"processing",message:ye.message})):ye.type==="complete"?G({current:ye.renamed,total:ye.renamed,percent:100,status:"complete",message:`Renamed ${ye.renamed} item(s)`}):ye.type==="error"&&G(ct=>({...ct,status:"error",message:ye.message}))}}}finally{Q.signal.removeEventListener("abort",we)}u(),p()}catch(re){if(Q.signal.aborted){q.current=null;return}console.error("Failed to rename folder:",re),G(fe=>({...fe,status:"error",message:"Failed to rename folder"}))}q.current=null},[Gn,u,p]),Fa=w.useCallback(async ne=>{if(!mt)return;ft(!1);const Q=new AbortController;q.current=Q,V("Renaming File"),y(!0),G({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});let I=0;try{const re=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:mt,newName:ne}),signal:Q.signal});if(!re.body)throw new Error("No response body");const fe=re.body.getReader(),ie=new TextDecoder;let Te="";const we=()=>{fe.cancel(),G(Z=>({...Z,status:"stopped",message:`Stopped. ${I} item${I!==1?"s":""} renamed.`})),u(),p(),q.current=null};Q.signal.addEventListener("abort",we);try{for(;;){const{done:Z,value:De}=await fe.read();if(Z)break;Te+=ie.decode(De,{stream:!0});const Oe=Te.split(`
67
+ `);Te=Oe.pop()||"";for(const it of Oe){if(!it.startsWith("data: "))continue;const ye=JSON.parse(it.slice(6));ye.type==="start"?G({current:0,total:ye.total,percent:0,status:"processing",message:ye.message}):ye.type==="progress"?(I=ye.renamed??ye.current,G({current:ye.current,total:ye.total,percent:Math.round(ye.current/ye.total*100),status:"processing",message:ye.message})):ye.type==="complete"?G({current:ye.renamed,total:ye.renamed,percent:100,status:"complete",message:`Renamed ${ye.renamed} item(s)`}):ye.type==="error"&&G(ct=>({...ct,status:"error",message:ye.message}))}}}finally{Q.signal.removeEventListener("abort",we)}u(),p()}catch(re){if(Q.signal.aborted){q.current=null;return}console.error("Failed to rename file:",re),G(fe=>({...fe,status:"error",message:"Failed to rename file"}))}q.current=null},[mt,u,p]),eo=x(xt,{children:[(T||K.showDownloadConfirm)&&c(Yi,{title:"Download from CDN",message:(()=>{const ne=K.showDownloadConfirm?K.downloadImageCount:ee,Q=K.showDownloadConfirm?K.downloadTotalSelected:aa;return Q>ne?`Download ${ne} of ${Q} selected file${Q!==1?"s":""} from Cloudflare R2? (${Q-ne} not on CDN)`:`Download ${ne} image${ne!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`})(),confirmLabel:"Download",onConfirm:oa,onCancel:()=>{B(!1),K.showDownloadConfirm&&oe()}}),He&&c(vr,{title:k,progress:W,onStop:$i,onDeleteOrphans:wr,onClose:()=>{y(!1),G({current:0,total:0,percent:0,status:"processing"}),p()}})]});return D?eo:x(xt,{children:[eo,J&&c(Yi,{title:"Delete Items",message:`Are you sure you want to delete ${o.size} item(s)? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Ul,onCancel:()=>U(!1)}),be&&c(Yi,{title:"Push to CDN",message:`Push ${Ee} image${Ee!==1?"s":""} to Cloudflare R2?${Ue?" Remote images will be downloaded first.":""}${Qe?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:Dn,onCancel:()=>ge(!1)}),rt&&c(gr,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:Hl,onCancel:()=>Ze(!1)}),Me&&c(Th,{selectedItems:o,currentPath:m,onMove:ne=>{pt(!1),Wi(ne)},onCancel:()=>pt(!1)}),Kt&&Gn&&c(gr,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:Ja,defaultValue:Ja,confirmLabel:"Rename",onConfirm:sl,onCancel:()=>te(!1)}),Bt&&mt&&c(gr,{title:"Rename File",message:"Enter a new name for the file:",placeholder:Rt,defaultValue:Rt,confirmLabel:"Rename",onConfirm:Fa,onCancel:()=>ft(!1)}),Ce&&c(Mh,{title:Ce.title,message:Ce.message,onClose:()=>{pe(null),p()}}),c(Ah,{isOpen:jt,onClose:()=>fn(!1)}),Se&&c(eg,{currentPath:m,onClose:()=>P(!1),onUploadComplete:()=>{P(!1),p()}}),x("div",{css:ve.toolbar,children:[c("input",{ref:L,type:"file",multiple:!0,accept:"image/*,video/*,audio/*,.pdf",onChange:la,style:{display:"none"}}),x("div",{css:ve.left,children:[x("button",{css:[ve.btn,ve.btnPrimary,"",""],onClick:()=>P(!0),disabled:me||cl,children:[c(lg,{}),"Add New"]}),x("button",{css:ve.btn,onClick:()=>{Qt?ft(!0):_n?te(!0):Ze(!0)},disabled:cl&&!_n&&!Qt,title:cl&&!_n&&!Qt?"Cannot create folders in protected images folder":void 0,children:[Qt||_n?c(rg,{}):c(og,{}),Qt?"Rename File":_n?"Rename Folder":"New Folder"]}),c("div",{css:ve.divider}),x("div",{css:ve.cloudDropdownWrapper,ref:Ka,children:[x("button",{css:ve.btn,onClick:()=>En(!Ll),disabled:K.showProgress||cl,title:cl?"Cannot process images folder":void 0,children:[c(pg,{}),"Thumbnails",c("svg",{css:ve.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Ll&&x("div",{css:ve.cloudDropdown,children:[x("button",{css:[ve.cloudDropdownItem,ve.cloudDropdownItemDefault,"",""],onClick:()=>{En(!1),Fi("generate")},children:[c(mg,{}),"Generate Thumbnails"]}),x("button",{css:[ve.cloudDropdownItem,ve.cloudDropdownItemDanger,"",""],onClick:()=>{En(!1),Fi("remove")},children:[c(gg,{}),"Remove Thumbnails"]})]})]}),x("button",{css:[ve.btn,ve.btnDanger,"",""],onClick:zr,disabled:!zn,children:[c(ig,{}),"Delete"]}),x("button",{css:ve.btn,onClick:Ar,disabled:!zn,children:[c(cg,{}),"Move"]}),x("div",{css:ve.cloudDropdownWrapper,ref:_t,children:[x("button",{css:[ve.btn,ve.btnCloud,"",""],onClick:()=>qt(!rl),disabled:!zn,children:[c(sh,{}),"Cloud",c("svg",{css:ve.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),rl&&zn&&x("div",{css:ve.cloudDropdown,children:[Pi&&x(xt,{children:[x("button",{css:ve.cloudDropdownItem,onClick:()=>{qt(!1),Yn()},children:[c(sg,{}),"Push Update"]}),x("button",{css:[ve.cloudDropdownItem,ve.cloudDropdownItemDanger,"",""],onClick:()=>{qt(!1),ra()},children:[c(ug,{}),"Cancel Update"]}),c("div",{css:ve.cloudDropdownDivider})]}),x("button",{css:ve.cloudDropdownItem,onClick:()=>{qt(!1),Xt()},children:[c(sh,{}),"Push CDN"]}),x("button",{css:ve.cloudDropdownItem,onClick:()=>{qt(!1),ia()},children:[c(fg,{}),"Download"]})]})]}),x("div",{css:ve.searchWrapper,children:[c("input",{css:ve.searchInput,type:"text",placeholder:"Search images...",value:ca,onChange:Er,onKeyDown:Ii}),ca&&c("button",{css:ve.searchClearBtn,onClick:()=>wn(""),title:"Clear search",children:c("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),x("div",{css:ve.right,children:[zn&&x("span",{css:ve.selectionCount,children:[o.size," selected",c("button",{css:ve.clearBtn,onClick:u,children:"Clear"})]}),x("button",{css:ve.btn,onClick:na,disabled:ue,children:[c(ag,{spinning:ue}),"Scan"]}),x("div",{css:ve.viewToggle,children:[c("button",{css:[ve.viewBtn,s==="grid"&&ve.viewBtnActive,"",""],onClick:()=>h("grid"),"aria-label":"Grid view",children:c(dg,{})}),c("button",{css:[ve.viewBtn,s==="list"&&ve.viewBtnActive,"",""],onClick:()=>h("list"),"aria-label":"List view",children:c(hg,{})})]})]})]})]})}function lg(){return c("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}function ag({spinning:o}){return c("svg",{css:[ve.icon,o&&ve.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function ig(){return c("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}function og(){return c("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"})})}function rg(){return c("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}function cg(){return c("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})})}function sh(){return c("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})})}function sg(){return c("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}function ug(){return c("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function fg(){return c("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"})})}function dg(){return c("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"})})}function hg(){return c("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function pg(){return c("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}function mg(){return c("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}function gg(){return c("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}class yg{async get(s){const h=await fetch(s,{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!h.ok){const u=await h.json().catch(()=>({}));throw new Error(u.error||`Request failed: ${h.status}`)}return h.json()}async post(s,h){const u=await fetch(s,{method:"POST",headers:h?{"Content-Type":"application/json"}:void 0,body:h?JSON.stringify(h):void 0});if(!u.ok){const m=await u.json().catch(()=>({}));throw new Error(m.error||`Request failed: ${u.status}`)}return u.json()}async list(s="public"){return this.get(`/api/studio/list?path=${encodeURIComponent(s)}`)}async search(s){return this.get(`/api/studio/search?q=${encodeURIComponent(s)}`)}async listFolders(){return this.get("/api/studio/list-folders")}async countImages(){return this.get("/api/studio/count-images")}async folderImages(s){return this.get(`/api/studio/folder-images?folders=${encodeURIComponent(s.join(","))}`)}async upload(s,h="public"){const u=new FormData;u.append("file",s),u.append("path",h);const m=await fetch("/api/studio/upload",{method:"POST",body:u});if(!m.ok){const p=await m.json().catch(()=>({}));throw new Error(p.error||`Upload failed: ${m.status}`)}return m.json()}async delete(s){return this.post("/api/studio/delete",{paths:s})}async createFolder(s,h){return this.post("/api/studio/create-folder",{parentPath:s,name:h})}async rename(s,h){return this.post("/api/studio/rename",{oldPath:s,newName:h})}async move(s,h){return this.post("/api/studio/move",{paths:s,destination:h})}async push(s){return this.post("/api/studio/sync",{imageKeys:s})}async reprocess(s){return this.post("/api/studio/reprocess",{imageKeys:s})}processAllStream(){return new EventSource("/api/studio/process-all")}}const Zs=new yg;function Eh(){const{currentPath:o,setCurrentPath:s,navigateUp:h,selectedItems:u,toggleSelection:m,selectRange:p,lastSelectedPath:D,selectAll:_,clearSelection:O,refreshKey:S,setFocusedItem:X,triggerRefresh:H,triggerScan:K,searchQuery:oe,showError:L,setFileItems:q}=Qa(),[Se,P]=w.useState([]),[me,ae]=w.useState(!0),[ue,Y]=w.useState(!1),J=w.useRef(!0),U=w.useRef(o);w.useEffect(()=>{async function B(){const ee=U.current!==o;(J.current||ee)&&ae(!0),U.current=o;try{const ke=oe&&oe.length>=2?await Zs.search(oe):await Zs.list(o),He=ke.items||[];P(He),q(He),Y(ke.isEmpty===!0)}catch(ke){const He=ke instanceof Error?ke.message:"Failed to load items";L("Load Error",He),P([]),q([]),Y(!1)}ae(!1),J.current=!1}B()},[o,S,oe,L,q]);const be=o==="public",ge=oe&&oe.length>=2,Ee=[...Se].sort((B,ee)=>B.type==="folder"&&ee.type!=="folder"?-1:B.type!=="folder"&&ee.type==="folder"?1:B.name.localeCompare(ee.name)),Re=Ee.length>0&&Ee.every(B=>u.has(B.path)),Ue=Ee.some(B=>u.has(B.path)),ut=w.useCallback((B,ee)=>{ee.shiftKey&&D?p(D,B.path,Ee):m(B.path)},[D,p,Ee,m]),Qe=w.useCallback(B=>{B.type==="folder"?s(B.path):X(B)},[s,X]),Xe=w.useCallback(async B=>{try{const ee="/"+B.path.replace(/^public\//,"");await Zs.reprocess([ee]),H()}catch(ee){const ke=ee instanceof Error?ee.message:"Failed to generate thumbnail";L("Processing Error",ke)}},[H,L]),T=w.useCallback(()=>{Re?O():_(Ee)},[Re,O,_,Ee]);return{items:Se,loading:me,sortedItems:Ee,metaEmpty:ue,isAtRoot:be,isSearching:ge,allItemsSelected:Re,someItemsSelected:Ue,currentPath:o,selectedItems:u,navigateUp:h,handleItemClick:ut,handleOpen:Qe,handleGenerateThumbnail:Xe,handleSelectAll:T,triggerScan:K}}const vg=jn`
68
+ to { transform: rotate(360deg); }
69
+ `,le={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:b("width:32px;height:32px;border-radius:50%;border:3px solid ",f.border,";border-top-color:",f.primary,";animation:",vg," 0.8s linear infinite;",""),empty:b("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",f.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:b("font-size:",$.base,";margin:0 0 4px 0;&:last-child{color:",f.textMuted,";font-size:",$.sm,";}",""),scanButton:b("margin-top:16px;padding:10px 24px;font-size:",$.base,";font-weight:500;background:",f.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",f.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),grid:{name:"el23hk",styles:"display:grid;grid-template-columns:1fr;gap:12px;@media (min-width: 480px){grid-template-columns:repeat(2, 1fr);}@media (min-width: 768px){grid-template-columns:repeat(3, 1fr);}@media (min-width: 1024px){grid-template-columns:repeat(4, 1fr);}@media (min-width: 1280px){grid-template-columns:repeat(5, 1fr);}"},item:b("position:relative;border-radius:8px;border:1px solid ",f.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",f.surface,";user-select:none;box-shadow:0 1px 2px rgba(0, 0, 0, 0.04);&:hover{border-color:#d0d5dd;box-shadow:0 2px 4px rgba(0, 0, 0, 0.06);}",""),itemSelected:b("border-color:",f.primary,";box-shadow:0 0 0 1px ",f.primary,";&:hover{border-color:",f.primary,";box-shadow:0 0 0 1px ",f.primary,";}",""),parentItem:b("cursor:pointer;&:hover{border-color:",f.primary,";}",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:b("width:18px;height:18px;accent-color:",f.primary,";cursor:pointer;",""),content:b("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",f.background,";",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},imagesFolderIcon:b("width:56px;height:56px;color:",f.imagesFolder,";",""),imagesFolderWrapper:{name:"bjn8wh",styles:"position:relative"},lockIcon:b("position:absolute;bottom:4px;right:4px;width:16px;height:16px;color:",f.imagesFolder,";background:white;border-radius:50%;padding:2px;",""),parentIcon:b("width:56px;height:56px;color:",f.textMuted,";",""),fileIcon:b("width:40px;height:40px;color:",f.textMuted,";",""),image:{name:"rm1wug",styles:"max-width:100%;max-height:100%;object-fit:contain;border-radius:4px"},label:b("padding:10px 12px;background-color:",f.surface,";border-top:1px solid ",f.borderLight,";",""),labelRow:{name:"1gkgtms",styles:"display:flex;flex-direction:column;gap:2px"},labelText:{name:"fxp7t8",styles:"flex:1;min-width:0"},copyBtn:b("position:absolute;top:4px;right:4px;z-index:10;height:28px;width:28px;color:",f.textMuted,";background:transparent;border:none;padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",f.text,";}",""),copyIcon:{name:"1eg0rk6",styles:"width:18px;height:18px"},folderStats:{name:"905wvx",styles:"display:flex;align-items:center;gap:8px;margin:2px 0 0 0"},folderStat:b("display:flex;align-items:center;gap:3px;font-size:",$.xs,";",""),folderStatLocal:b("color:",f.textMuted,";",""),folderStatCloud:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatRemote:{name:"1lukubv",styles:"color:#ef4444"},folderStatUpdate:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatIconCloud:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},folderStatIconLocal:b("width:14px;height:14px;color:",f.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:b("color:#f59e0b;font-size:",$.xs,";",""),updateCloudIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateSyncIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},statusRow:{name:"1b1nq65",styles:"display:flex;align-items:center;justify-content:space-between;margin:2px 0 0 0;gap:4px"},statusLeft:{name:"1j5vobt",styles:"display:flex;align-items:center;gap:4px"},thumbChips:{name:"x2l7ss",styles:"display:flex;align-items:center;gap:3px;margin-left:auto"},thumbChip:b("display:inline-flex;align-items:center;justify-content:center;padding:1px 4px;font-size:9px;font-weight:600;border-radius:3px;background:rgba(0, 0, 0, 0.08);color:",f.textMuted,";text-transform:uppercase;letter-spacing:0.02em;",""),storedIconCloud:{name:"1e09qmx",styles:"width:16px;height:16px;color:#f59e0b"},storedIconRemote:{name:"1mrh6ju",styles:"width:16px;height:16px;color:#ef4444"},tooltip:{name:"qoyfdh",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;z-index:100;&::before{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},openBtn:b("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",$.sm,";font-weight:500;color:",f.primary,";background:",f.surface,";border:1px solid ",f.border,";padding:0 8px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:flex;align-items:center;box-shadow:0 1px 2px rgba(0, 0, 0, 0.08);&:hover{background-color:",f.primaryLight,";border-color:",f.primary,";}",""),name:b("font-size:",$.sm,";font-weight:500;color:",f.text,";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;letter-spacing:-0.01em;direction:rtl;text-align:left;",""),size:b("font-size:",$.xs,";color:",f.textMuted,";margin:2px 0 0 0;",""),selectAllRow:b("display:flex;align-items:center;margin-bottom:16px;padding:12px 16px;background:",f.surface,";border-radius:8px;border:1px solid ",f.border,";",""),selectAllLabel:b("display:flex;align-items:center;gap:10px;font-size:",$.base,";font-weight:500;color:",f.textSecondary,";cursor:pointer;&:hover{color:",f.text,";}",""),selectAllCheckbox:b("width:16px;height:16px;accent-color:",f.primary,";","")};function bg(){const{loading:o,sortedItems:s,metaEmpty:h,isAtRoot:u,isSearching:m,allItemsSelected:p,someItemsSelected:D,selectedItems:_,navigateUp:O,handleItemClick:S,handleOpen:X,handleGenerateThumbnail:H,handleSelectAll:K,triggerScan:oe}=Eh();return o?c("div",{css:le.loading,children:c("div",{css:le.spinner})}):h&&u?x("div",{css:le.empty,children:[c("svg",{css:le.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),c("p",{css:le.emptyText,children:"No files tracked yet"}),c("p",{css:le.emptyText,children:"Click Scan to discover files in your public folder"}),c("button",{css:le.scanButton,onClick:oe,children:"Scan for Files"})]}):s.length===0&&u?x("div",{css:le.empty,children:[c("svg",{css:le.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),c("p",{css:le.emptyText,children:"No files in this folder"}),c("p",{css:le.emptyText,children:"Upload images or click Scan in the toolbar"})]}):x("div",{children:[s.length>0&&c("div",{css:le.selectAllRow,children:x("label",{css:le.selectAllLabel,children:[c("input",{type:"checkbox",css:le.selectAllCheckbox,checked:p,ref:L=>{L&&(L.indeterminate=D&&!p)},onChange:K}),"Select all (",s.length,")"]})}),x("div",{css:le.grid,children:[!u&&!m&&x("div",{css:[le.item,le.parentItem,"",""],onClick:O,children:[c("div",{css:le.content,children:c("svg",{css:le.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}),x("div",{css:le.label,children:[c("p",{css:le.name,children:".."}),c("p",{css:le.size,children:"Parent folder"})]})]}),s.map(L=>c(Sg,{item:L,isSelected:_.has(L.path),onClick:q=>S(L,q),onOpen:()=>X(L),onGenerateThumbnail:()=>H(L)},L.path))]})]})}function xg(o){return o.includes("/images/sm/")?"SM":o.includes("/images/md/")?"MD":o.includes("/images/lg/")?"LG":o.includes("/images/full/")?"FULL":null}function Sg({item:o,isSelected:s,onClick:h,onOpen:u,onGenerateThumbnail:m}){const[p,D]=w.useState(!1),_=o.type==="folder",O=!_&&o.thumbnail!==void 0,S=o.isProtected||_&&o.name==="images"&&o.path==="public/images",X=xg(o.path),H=!_&&(o.hasSm||o.hasMd||o.hasLg||o.hasFull||X),K=L=>{L.stopPropagation();const q="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(q),D(!0),setTimeout(()=>D(!1),1500)},oe=L=>{if(S){L.stopPropagation(),u();return}h(L)};return x("div",{css:[le.item,s&&!S&&le.itemSelected,"",""],onClick:oe,children:[!S&&c("div",{css:le.checkboxWrapper,onClick:L=>L.stopPropagation(),children:c("input",{type:"checkbox",css:le.checkbox,checked:s,onChange:()=>h({})})}),x("div",{css:le.content,children:[x("button",{css:le.copyBtn,onClick:K,title:"Copy file path",children:[p&&c("span",{css:le.tooltip,children:"Copied!"}),c("svg",{css:le.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),c("button",{css:le.openBtn,onClick:L=>{L.stopPropagation(),u()},children:"Open"}),_?S?x("div",{css:le.imagesFolderWrapper,children:[c("svg",{css:le.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:c("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),c("svg",{css:le.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:c("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})]}):c("svg",{css:le.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:c("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}):O&&o.thumbnail?c("img",{css:le.image,src:o.thumbnail,alt:o.name,loading:"lazy"}):c("svg",{css:le.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})]}),c("div",{css:le.label,children:c("div",{css:le.labelRow,children:x("div",{css:le.labelText,children:[c("p",{css:le.name,title:o.name,children:o.name}),_?x("div",{css:le.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&x("span",{css:[le.folderStat,le.folderStatLocal,"",""],title:`${o.localCount} local`,children:[c("svg",{css:le.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),o.localCount]}),o.cloudCount!==void 0&&o.cloudCount>0&&x("span",{css:[le.folderStat,le.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[c("svg",{css:le.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),o.cloudCount]}),o.remoteCount!==void 0&&o.remoteCount>0&&x("span",{css:[le.folderStat,le.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[c("svg",{css:le.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),o.remoteCount]}),o.updateCount!==void 0&&o.updateCount>0&&x("span",{css:[le.folderStat,le.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[c("svg",{css:le.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),o.updateCount]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount!==void 0&&x("span",{css:le.size,children:[o.fileCount," files"]})]}):x("div",{css:le.statusRow,children:[c("div",{css:le.statusLeft,children:o.hasUpdate?x(xt,{children:[c("svg",{css:le.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),c("svg",{css:le.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),c("span",{css:le.updateLabel,children:"update"})]}):o.cdnPushed?c("svg",{css:o.isRemote?le.storedIconRemote:le.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.isRemote?c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}):c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}):o.size!==void 0?c("span",{css:le.size,children:Cg(o.size)}):null}),H&&c("span",{css:le.thumbChips,children:X?c("span",{css:le.thumbChip,children:X}):x(xt,{children:[o.hasSm&&c("span",{css:le.thumbChip,children:"SM"}),o.hasMd&&c("span",{css:le.thumbChip,children:"MD"}),o.hasLg&&c("span",{css:le.thumbChip,children:"LG"}),o.hasFull&&c("span",{css:le.thumbChip,children:"FULL"})]})})]})]})})})]})}function Cg(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}const wg=jn`
70
+ to { transform: rotate(360deg); }
71
+ `,F={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:b("width:32px;height:32px;border-radius:50%;border:3px solid ",f.border,";border-top-color:",f.primary,";animation:",wg," 0.8s linear infinite;",""),empty:b("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",f.textSecondary,";",""),emptyHint:b("font-size:",$.sm,";color:",f.textMuted,";margin-top:4px;",""),scanButton:b("margin-top:16px;padding:10px 24px;font-size:",$.base,";font-weight:500;background:",f.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",f.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),tableWrapper:b("background:",f.surface,";border-radius:8px;border:1px solid ",f.border,";overflow-x:auto;",""),table:{name:"nufjao",styles:"width:100%;min-width:600px;border-collapse:collapse;white-space:nowrap"},th:b("text-align:left;font-size:11px;color:",f.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",f.background,";border-bottom:1px solid ",f.border,";",""),thCheckbox:{name:"5iz1wr",styles:"width:48px"},thSize:{name:"yct5co",styles:"width:96px"},thDimensions:{name:"gu2s0e",styles:"width:128px"},thCdn:{name:"yct5co",styles:"width:96px"},tbody:b("",""),row:b("cursor:pointer;transition:background-color 0.15s ease;user-select:none;&:hover{background-color:",f.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",f.borderLight,";}",""),rowSelected:b("background-color:",f.primaryLight,";&:hover{background-color:",f.primaryLight,";}",""),parentRow:b("cursor:pointer;border-bottom:1px solid ",f.border,";&:hover{background-color:",f.surfaceHover,";}",""),td:{name:"i563hg",styles:"padding:12px 16px"},checkboxCell:{name:"sahq4q",styles:"padding:12px 16px;cursor:pointer;vertical-align:middle"},checkbox:b("width:18px;height:18px;accent-color:",f.primary,";cursor:pointer;display:block;",""),actionsCell:{name:"1w56d5c",styles:"display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;flex-shrink:0"},copyBtn:b("position:relative;flex-shrink:0;height:32px;width:32px;font-size:",$.xs,";color:",f.textSecondary,";background:",f.surface,";border:1px solid ",f.border,";padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;justify-content:center;&:hover{background:",f.surfaceHover,";border-color:",f.borderHover,";color:",f.text,";}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},folderStats:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},folderStat:b("display:flex;align-items:center;gap:3px;font-size:",$.xs,";",""),folderStatLocal:b("color:",f.textMuted,";",""),folderStatCloud:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatRemote:{name:"1lukubv",styles:"color:#ef4444"},folderStatUpdate:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatIconCloud:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},folderStatIconLocal:b("width:14px;height:14px;color:",f.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:b("display:flex;align-items:center;gap:4px;color:#f59e0b;font-size:",$.xs,";",""),updateCloudIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateSyncIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},storedLabel:{name:"s5xdrg",styles:"display:flex;align-items:center"},storedIconCloud:{name:"1e09qmx",styles:"width:16px;height:16px;color:#f59e0b"},storedIconRemote:{name:"1mrh6ju",styles:"width:16px;height:16px;color:#ef4444"},tooltip:{name:"1bu1odp",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},nameCell:{name:"9s3nhy",styles:"display:flex;align-items:center;gap:12px;flex:1"},thumbnailWrapper:{name:"xfecxx",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0"},folderIconWrapper:{name:"xfecxx",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0"},folderIcon:{name:"a45yt2",styles:"width:24px;height:24px;color:#f9935e"},imagesFolderWrapper:{name:"iqqile",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;position:relative;align-items:center"},imagesFolderIcon:b("width:24px;height:24px;color:",f.imagesFolder,";",""),lockIcon:b("width:10px;height:10px;color:",f.imagesFolder,";margin-left:-6px;margin-top:8px;",""),parentIcon:b("width:20px;height:20px;color:",f.textMuted,";flex-shrink:0;",""),fileIcon:b("width:20px;height:20px;color:",f.textMuted,";flex-shrink:0;",""),thumbnail:b("max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;border:1px solid ",f.borderLight,";",""),name:b("font-size:",$.base,";font-weight:500;color:",f.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:b("font-size:",$.sm,";color:",f.textSecondary,";",""),cdnBadge:b("display:inline-flex;align-items:center;gap:4px;font-size:",$.xs,";font-weight:500;color:",f.success,";",""),cdnBadgeRemote:b("display:inline-flex;align-items:center;font-size:",$.xs,";font-weight:500;color:#ef4444;",""),cdnIcon:{name:"1suksrg",styles:"width:12px;height:12px"},cdnEmpty:b("font-size:",$.sm,";color:",f.textMuted,";",""),openBtn:b("height:32px;font-size:",$.sm,";font-weight:500;color:",f.primary,";background:",f.surface,";border:1px solid ",f.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",f.primaryLight,";border-color:",f.primary,";}","")};function zg(){const{loading:o,sortedItems:s,metaEmpty:h,isAtRoot:u,isSearching:m,allItemsSelected:p,someItemsSelected:D,selectedItems:_,navigateUp:O,handleItemClick:S,handleOpen:X,handleGenerateThumbnail:H,handleSelectAll:K,triggerScan:oe}=Eh();return o?c("div",{css:F.loading,children:c("div",{css:F.spinner})}):h&&u?x("div",{css:F.empty,children:[c("p",{children:"No files tracked yet"}),c("p",{css:F.emptyHint,children:"Click Scan to discover files in your public folder"}),c("button",{css:F.scanButton,onClick:oe,children:"Scan for Files"})]}):s.length===0&&u?x("div",{css:F.empty,children:[c("p",{children:"No files in this folder"}),c("p",{css:F.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):c("div",{css:F.tableWrapper,children:x("table",{css:F.table,children:[c("thead",{children:x("tr",{children:[c("th",{css:[F.th,F.thCheckbox,"",""],children:s.length>0&&c("input",{type:"checkbox",css:F.checkbox,checked:p,ref:L=>{L&&(L.indeterminate=D&&!p)},onChange:K})}),c("th",{css:F.th,children:"Name"}),c("th",{css:[F.th,F.thSize,"",""],children:"Size"}),c("th",{css:[F.th,F.thDimensions,"",""],children:"Dimensions"}),c("th",{css:[F.th,F.thCdn,"",""],children:"CDN"})]})}),x("tbody",{css:F.tbody,children:[!u&&!m&&x("tr",{css:F.parentRow,onClick:O,children:[c("td",{css:F.td}),c("td",{css:F.td,children:x("div",{css:F.nameCell,children:[c("svg",{css:F.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),c("span",{css:F.name,children:".."})]})}),c("td",{css:[F.td,F.meta,"",""],children:"--"}),c("td",{css:[F.td,F.meta,"",""],children:"Parent folder"}),c("td",{css:F.td,children:"--"})]}),s.map(L=>c(Mg,{item:L,isSelected:_.has(L.path),onClick:q=>S(L,q),onOpen:()=>X(L),onGenerateThumbnail:()=>H(L)},L.path))]})]})})}function Mg({item:o,isSelected:s,onClick:h,onOpen:u,onGenerateThumbnail:m}){const[p,D]=w.useState(!1),_=o.type==="folder",O=!_&&o.thumbnail!==void 0,S=o.isProtected||_&&o.name==="images"&&o.path==="public/images",X=K=>{K.stopPropagation();const oe="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(oe),D(!0),setTimeout(()=>D(!1),1500)},H=K=>{if(S){K.stopPropagation(),u();return}h(K)};return x("tr",{css:[F.row,s&&!S&&F.rowSelected,"",""],onClick:H,children:[c("td",{css:[F.td,F.checkboxCell,"",""],onClick:K=>K.stopPropagation(),children:!S&&c("input",{type:"checkbox",css:F.checkbox,checked:s,onChange:()=>h({})})}),c("td",{css:F.td,children:x("div",{css:F.nameCell,children:[_?S?x("div",{css:F.imagesFolderWrapper,children:[c("svg",{css:F.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:c("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),c("svg",{css:F.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:c("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})]}):c("div",{css:F.folderIconWrapper,children:c("svg",{css:F.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:c("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}):O&&o.thumbnail?c("div",{css:F.thumbnailWrapper,children:c("img",{css:F.thumbnail,src:o.thumbnail,alt:o.name,loading:"lazy"})}):c("div",{css:F.thumbnailWrapper,children:c("svg",{css:F.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})}),c("span",{css:F.name,title:o.name,children:Tg(o.name)}),x("div",{css:F.actionsCell,children:[x("button",{css:F.copyBtn,onClick:X,title:"Copy file path",children:[p&&c("span",{css:F.tooltip,children:"Copied!"}),c("svg",{css:F.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),c("button",{css:F.openBtn,onClick:K=>{K.stopPropagation(),u()},children:"Open"})]})]})}),c("td",{css:[F.td,F.meta,"",""],children:_?x("div",{css:F.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&x("span",{css:[F.folderStat,F.folderStatLocal,"",""],title:`${o.localCount} local`,children:[c("svg",{css:F.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),o.localCount]}),o.cloudCount!==void 0&&o.cloudCount>0&&x("span",{css:[F.folderStat,F.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[c("svg",{css:F.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),o.cloudCount]}),o.remoteCount!==void 0&&o.remoteCount>0&&x("span",{css:[F.folderStat,F.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[c("svg",{css:F.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),o.remoteCount]}),o.updateCount!==void 0&&o.updateCount>0&&x("span",{css:[F.folderStat,F.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[c("svg",{css:F.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),o.updateCount]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount!==void 0&&x("span",{children:[o.fileCount," files"]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount===void 0&&"--"]}):o.hasUpdate?x("span",{css:F.updateLabel,children:[c("svg",{css:F.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),c("svg",{css:F.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"update"]}):o.cdnPushed?c("span",{css:F.storedLabel,children:c("svg",{css:o.isRemote?F.storedIconRemote:F.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.isRemote?c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}):c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}):o.size!==void 0?uh(o.size):"--"}),c("td",{css:[F.td,F.meta,"",""],children:_?o.totalSize!==void 0?uh(o.totalSize):"--":o.dimensions?`${o.dimensions.width}x${o.dimensions.height}`:"--"}),c("td",{css:F.td,children:o.cdnPushed?o.isRemote?c("span",{css:F.cdnBadgeRemote,children:"Remote"}):x("span",{css:F.cdnBadge,children:[c("svg",{css:F.cdnIcon,fill:"currentColor",viewBox:"0 0 20 20",children:c("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Pushed"]}):c("span",{css:F.cdnEmpty,children:"--"})})]})}function uh(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}function Tg(o,s=32){if(o.length<=s)return o;const h=o.lastIndexOf("."),u=h>0?o.substring(h):"",m=h>0?o.substring(0,h):o,p=s-u.length-3;if(p<6)return o.substring(0,s-3)+"...";const D=Math.ceil(p/2),_=Math.floor(p/2);return m.substring(0,D)+"..."+m.substring(m.length-_)+u}const Ag=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],Eg=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function Dg(o){const s=o.toLowerCase().substring(o.lastIndexOf("."));return Ag.includes(s)}function kg(o){const s=o.toLowerCase().substring(o.lastIndexOf("."));return Eg.includes(s)}const he={overlay:{name:"1crgpqk",styles:"position:absolute;top:0;left:0;right:0;bottom:0;z-index:100;display:flex;background:transparent"},container:b("display:flex;flex:1;margin:24px;background:",f.surface,";border:1px solid ",f.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:b("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",f.background,";overflow:auto;",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},copyBtn:b("position:relative;padding:8px;background:",f.surface,";border:1px solid ",f.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),copyIcon:b("width:20px;height:20px;color:",f.textSecondary,";",""),statusIcon:b("display:flex;align-items:center;justify-content:center;padding:8px;background:",f.surface,";border:1px solid ",f.border,";border-radius:8px;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);",""),cloudIcon:{name:"1byef48",styles:"width:22px;height:22px;color:#f59e0b;transform:translateY(1px)"},globeIcon:{name:"jso3j5",styles:"width:20px;height:20px;color:#ef4444"},tooltip:{name:"1w9prgf",styles:"position:absolute;right:100%;top:50%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:8px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},mainCloseBtn:b("padding:8px;background:",f.surface,";border:1px solid ",f.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),mainCloseIcon:b("width:20px;height:20px;color:",f.textSecondary,";",""),mediaWrapper:{name:"zr0bjt",styles:"max-width:100%;max-height:100%;display:flex;align-items:center;justify-content:center"},image:{name:"4gte4n",styles:"max-width:100%;max-height:calc(100vh - 200px);object-fit:contain;border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1)"},video:{name:"1talud7",styles:"max-width:100%;max-height:calc(100vh - 200px);border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1)"},filePlaceholder:b("display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px;background:",f.surface,";border-radius:12px;border:1px solid ",f.border,";",""),fileIcon:b("width:80px;height:80px;color:",f.textMuted,";margin-bottom:16px;",""),fileName:b("font-size:",$.lg,";font-weight:600;color:",f.text,";margin:0;",""),sidebar:b("width:280px;background:",f.surface,";border-left:1px solid ",f.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:b("padding:16px 20px;border-bottom:1px solid ",f.border,";",""),sidebarTitle:b("font-size:",$.base,";font-weight:600;color:",f.text,";margin:0;",""),sidebarContent:{name:"esl95u",styles:"flex:1;padding:20px;overflow:auto"},info:{name:"bh1r16",styles:"display:flex;flex-direction:column;gap:12px;margin-bottom:24px"},infoRow:b("display:flex;justify-content:space-between;font-size:",$.sm,";",""),infoLabel:b("color:",f.textSecondary,";",""),infoValue:b("color:",f.text,";font-weight:500;text-align:right;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),infoValueWrap:b("color:",f.text,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;",""),infoLink:b("color:",f.primary,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;text-decoration:none;&:hover{text-decoration:underline;}",""),actions:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},actionBtn:b("display:flex;align-items:center;gap:10px;width:100%;padding:12px 14px;font-size:",$.base,";font-weight:500;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",f.text,";text-align:left;&:hover:not(:disabled){background-color:",f.surfaceHover,";border-color:",f.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),actionBtnDanger:b("color:",f.danger,";&:hover:not(:disabled){background-color:",f.dangerLight,";border-color:",f.danger,";}",""),actionBtnCloud:{name:"1lzbs29",styles:"color:#f59e0b;&:hover:not(:disabled){background-color:rgba(245, 158, 11, 0.1);border-color:#f59e0b;}"},actionIcon:{name:"a4lfw4",styles:"width:16px;height:16px;flex-shrink:0"}};function _g(){const{focusedItem:o,setFocusedItem:s,triggerRefresh:h,fileItems:u,requestDelete:m,requestMove:p,requestSync:D,requestDownload:_,requestProcess:O,actionState:S}=Qa(),[X,H]=w.useState(!1),[K,oe]=w.useState(!1),[L,q]=w.useState({current:0,total:1,percent:0,status:"processing",message:"Renaming..."}),[Se,P]=w.useState(!1),[me,ae]=w.useState(null),[ue,Y]=w.useState(!1),[J,U]=w.useState(!1),[be,ge]=w.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),Ee=S.showProgress,Re=o?o.name.toLowerCase()==="favicon.png"||o.name.toLowerCase()==="favicon.jpg":!1;if(!o)return null;const Ue=Dg(o.name),ut=kg(o.name),Qe="/"+o.path.replace(/^public\//,""),Xe=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${Qe}`:Qe,T=typeof window<"u"?window.location.origin:"",B=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${Qe}`:`${T}${Qe}`,ee=()=>{s(null)},ke=()=>{navigator.clipboard.writeText(B),Y(!0),setTimeout(()=>Y(!1),1500)},He=async V=>{if(V&&V!==o.name){H(!1),oe(!0),q({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});try{const W=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:o.path,newName:V})});if(!W.body)throw new Error("No response body");const G=W.body.getReader(),Ce=new TextDecoder;let pe="",rt="";for(;;){const{done:Ze,value:Kt}=await G.read();if(Ze)break;pe+=Ce.decode(Kt,{stream:!0});const te=pe.split(`
72
+ `);pe=te.pop()||"";for(const Bt of te){if(!Bt.startsWith("data: "))continue;const ft=JSON.parse(Bt.slice(6));ft.type==="start"?q({current:0,total:ft.total,percent:0,status:"processing",message:ft.message}):ft.type==="progress"?q({current:ft.current,total:ft.total,percent:Math.round(ft.current/ft.total*100),status:"processing",message:ft.message}):ft.type==="complete"?(rt=ft.newPath,q({current:ft.renamed,total:ft.renamed,percent:100,status:"complete",message:"Renamed successfully"})):ft.type==="error"&&(q(Me=>({...Me,status:"error",message:ft.message})),ae({title:"Rename Failed",message:ft.message}))}}rt&&(s({...o,path:rt,name:rt.split("/").pop()||V}),h())}catch(W){console.error("Rename error:",W),q(G=>({...G,status:"error",message:"Failed to rename"})),ae({title:"Rename Failed",message:"An error occurred while renaming the file"})}}},y=async()=>{if(o){U(!0),ge({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."});try{const V=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+o.path.replace(/^public\//,"")})});if(!V.ok){const Ce=await V.json();ge({current:0,total:3,percent:0,status:"error",message:Ce.error||"Failed to generate favicons"});return}const W=V.body?.getReader(),G=new TextDecoder;if(W){let Ce="";for(;;){const{done:pe,value:rt}=await W.read();if(pe)break;Ce+=G.decode(rt,{stream:!0});const Ze=Ce.split(`
73
+ `);Ce=Ze.pop()||"";for(const Kt of Ze)if(Kt.startsWith("data: "))try{const te=JSON.parse(Kt.slice(6));te.type==="start"?ge(Bt=>({...Bt,total:te.total})):te.type==="progress"?ge({current:te.current,total:te.total,percent:te.percent,status:"processing",message:te.message}):te.type==="complete"?ge({current:te.processed,total:te.processed,percent:100,status:te.errors>0?"error":"complete",message:te.message}):te.type==="error"&&ge(Bt=>({...Bt,status:"error",message:te.message}))}catch{}}}}catch(V){console.error("Favicon generation error:",V),ge({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},k=()=>Ue?c("img",{css:he.image,src:Xe,alt:o.name}):ut?c("video",{css:he.video,src:Xe,controls:!0}):x("div",{css:he.filePlaceholder,children:[c("svg",{css:he.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}),c("p",{css:he.fileName,children:o.name})]});return x(xt,{children:[me&&c(Mh,{title:me.title,message:me.message,onClose:()=>ae(null)}),c(Ah,{isOpen:Se,onClose:()=>P(!1)}),X&&c(gr,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:o.name,placeholder:"Enter new filename",confirmLabel:"Rename",onConfirm:He,onCancel:()=>H(!1)}),K&&c(vr,{title:"Renaming",progress:L,onClose:()=>{oe(!1),h()}}),J&&c(vr,{title:"Generating Favicons",progress:be,onClose:()=>U(!1)}),c("div",{css:he.overlay,onClick:ee,children:x("div",{css:he.container,onClick:V=>V.stopPropagation(),children:[x("div",{css:he.main,children:[x("div",{css:he.headerButtons,children:[o.cdnPushed&&!o.isRemote&&c("span",{css:he.statusIcon,title:"Pushed to CDN",children:c("svg",{css:he.cloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}),o.isRemote&&c("span",{css:he.statusIcon,title:"Remote image",children:c("svg",{css:he.globeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})})}),x("button",{css:he.copyBtn,onClick:ke,title:"Copy file path",children:[ue&&c("span",{css:he.tooltip,children:"Copied!"}),c("svg",{css:he.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),c("button",{css:he.mainCloseBtn,onClick:ee,"aria-label":"Close",children:c("svg",{css:he.mainCloseIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),c("div",{css:he.mediaWrapper,children:k()})]}),x("div",{css:he.sidebar,children:[c("div",{css:he.sidebarHeader,children:c("h3",{css:he.sidebarTitle,children:"Details"})}),x("div",{css:he.sidebarContent,children:[x("div",{css:he.info,children:[x("div",{css:he.infoRow,children:[c("span",{css:he.infoLabel,children:"Name"}),c("span",{css:he.infoValueWrap,children:o.name})]}),x("div",{css:he.infoRow,children:[c("span",{css:he.infoLabel,children:"Path"}),c("span",{css:he.infoValueWrap,children:o.path.replace(/^public\//,"")})]}),o.size!==void 0&&x("div",{css:he.infoRow,children:[c("span",{css:he.infoLabel,children:"Size"}),c("span",{css:he.infoValue,children:Rg(o.size)})]}),o.dimensions&&x("div",{css:he.infoRow,children:[c("span",{css:he.infoLabel,children:"Dimensions"}),x("span",{css:he.infoValue,children:[o.dimensions.width," × ",o.dimensions.height]})]}),x("div",{css:he.infoRow,children:[c("span",{css:he.infoLabel,children:"CDN Status"}),c("span",{css:he.infoValue,children:o.cdnPushed?o.isRemote?"Remote":"Pushed":"Local"})]}),x("div",{css:he.infoRow,children:[c("span",{css:he.infoLabel,children:"URL"}),c("a",{href:B,target:"_blank",rel:"noopener noreferrer",css:he.infoLink,title:B,children:B})]})]}),x("div",{css:he.actions,children:[x("button",{css:he.actionBtn,onClick:()=>H(!0),disabled:o.isProtected,children:[c("svg",{css:he.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),"Rename"]}),x("button",{css:he.actionBtn,onClick:()=>p([o.path]),disabled:Ee||o.isProtected,children:[c("svg",{css:he.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})}),"Move"]}),x("button",{css:[he.actionBtn,he.actionBtnCloud,"",""],onClick:()=>D([o.path],u),disabled:Ee||o.isProtected||o.cdnPushed&&!o.isRemote,title:o.cdnPushed&&!o.isRemote?"Already in R2":void 0,children:[c("svg",{css:he.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),"Push to CDN"]}),x("button",{css:[he.actionBtn,he.actionBtnCloud,"",""],onClick:()=>_([o.path],u),disabled:Ee||!o.cdnPushed||o.isRemote,title:o.cdnPushed?o.isRemote?"Remote image":"Download from CDN to local":"Not on CDN",children:[c("svg",{css:he.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"})}),"Download from CDN"]}),x("button",{css:he.actionBtn,onClick:()=>O([o.path]),disabled:Ee||o.isProtected,children:[c("svg",{css:he.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),"Process Image"]}),Re&&x("button",{css:he.actionBtn,onClick:y,disabled:J||o.isProtected,children:[c("svg",{css:he.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"})}),"Generate Favicons"]}),x("button",{css:[he.actionBtn,he.actionBtnDanger,"",""],onClick:()=>m([o.path]),disabled:Ee||o.isProtected,children:[c("svg",{css:he.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Delete"]})]})]})]})]})})]})}function Rg(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}const Og="36px",_e={btn:b("height:",Og,";padding:0 12px;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),icon:b("width:16px;height:16px;color:",f.textSecondary,";",""),overlay:{name:"1cy1r91",styles:"position:fixed;top:0;right:0;bottom:0;left:0;z-index:10000;display:flex;align-items:flex-start;justify-content:center;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);overflow-y:auto;scroll-behavior:smooth;padding:48px 24px"},panel:b(Ji," position:relative;background-color:",f.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);width:100%;max-width:512px;padding:24px;margin:auto 0;",""),header:{name:"1o4fids",styles:"display:flex;align-items:center;justify-content:space-between;margin-bottom:24px"},title:b("font-size:",$.xl,";font-weight:600;color:",f.text,";margin:0;letter-spacing:-0.02em;",""),closeBtn:b("padding:6px;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),sections:{name:"klisov",styles:"display:flex;flex-direction:column;gap:24px"},sectionTitle:b("font-size:",$.base,";font-weight:600;color:",f.text,";margin:0 0 12px 0;",""),description:b("font-size:",$.sm,";color:",f.textSecondary,";margin:0 0 12px 0;",""),codeWrapper:{name:"bjn8wh",styles:"position:relative"},code:b("background-color:",f.background,";border-radius:8px;padding:12px;padding-right:40px;font-family:'SF Mono',Monaco,Consolas,monospace;font-size:",$.xs,";color:",f.textSecondary,";border:1px solid ",f.border,";overflow-x:auto;white-space:nowrap;",""),copyBtn:b("position:absolute;top:8px;right:8px;padding:4px;background:",f.surface,";border:1px solid ",f.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),tooltip:{name:"6eskey",styles:"position:absolute;bottom:100%;left:50%;transform:translateX(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-bottom:6px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;top:100%;left:50%;transform:translateX(-50%);border:4px solid transparent;border-top-color:#1a1f36;}"},copyIcon:b("width:14px;height:14px;color:",f.textSecondary,";",""),codeLine:{name:"1bbvuqp",styles:"margin:0 0 4px 0;&:last-child{margin:0;}"},input:b("width:100%;padding:10px 14px;border:1px solid ",f.border,";border-radius:6px;font-size:",$.base,";color:",f.text,";background:",f.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 3px ",f.primaryLight,";}&::placeholder{color:",f.textMuted,";}",""),grid:{name:"xtlr5l",styles:"display:grid;grid-template-columns:repeat(3, 1fr);gap:12px"},label:b("font-size:",$.xs,";font-weight:500;color:",f.textSecondary,";display:block;margin-bottom:6px;",""),footer:b("margin-top:24px;padding-top:20px;border-top:1px solid ",f.border,";display:flex;justify-content:flex-end;gap:12px;",""),cancelBtn:b("padding:10px 18px;font-size:",$.base,";font-weight:500;color:",f.text,";background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),saveBtn:b("padding:10px 18px;font-size:",$.base,";font-weight:500;color:white;background-color:",f.primary,";border:1px solid ",f.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",f.primaryHover,";border-color:",f.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),cdnList:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},cdnRow:{name:"197tvr9",styles:"display:flex;gap:8px;align-items:center"},cdnInput:b("flex:1;padding:8px 12px;border:1px solid ",f.border,";border-radius:6px;font-size:",$.sm,";color:",f.text,";background:",f.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 3px ",f.primaryLight,";}",""),cdnIndex:b("font-size:",$.xs,";color:",f.textMuted,";width:24px;text-align:center;flex-shrink:0;",""),cdnDeleteBtn:b("padding:6px;background:none;border:none;cursor:pointer;color:",f.textMuted,";transition:color 0.15s;flex-shrink:0;&:hover{color:",f.danger,";}",""),cdnAddBtn:b("padding:8px 12px;font-size:",$.sm,";font-weight:500;color:",f.primary,";background:",f.primaryLight,";border:1px dashed ",f.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;gap:6px;margin-top:8px;&:hover{background:",f.surface,";}",""),warning:b("font-size:",$.xs,";color:",f.danger,";margin-top:8px;padding:8px 12px;background:",f.dangerLight,";border-radius:6px;","")};function Lg(){const[o,s]=w.useState(!1);return x(xt,{children:[c("button",{css:_e.btn,onClick:()=>s(!0),"aria-label":"Settings",children:x("svg",{css:_e.icon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[c("circle",{cx:"12",cy:"12",r:"3"}),c("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06a1.65 1.65 0 00.33-1.82 1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06a1.65 1.65 0 001.82.33H9a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06a1.65 1.65 0 00-.33 1.82V9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z"})]})}),o&&c(Ng,{onClose:()=>s(!1)})]})}const Ug=`# Dev site link (opens from Studio header)
74
+ STUDIO_DEV_SITE_URL=http://localhost:3000
75
+
76
+ # Cloudflare R2 Storage
77
+ CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
78
+ CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id
79
+ CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key
80
+ CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
81
+ CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function Ng({onClose:o}){const{triggerRefresh:s}=Qa(),[h,u]=w.useState(!1),[m,p]=w.useState([]),[D,_]=w.useState(!0),[O,S]=w.useState(!1),[X,H]=w.useState(!1);w.useEffect(()=>{async function P(){try{const ae=await(await fetch("/api/studio/cdns")).json();p(ae.cdns||[])}catch(me){console.error("Failed to load CDN URLs:",me)}finally{_(!1)}}P()},[]);const K=()=>{navigator.clipboard.writeText(Ug),u(!0),setTimeout(()=>u(!1),2e3)},oe=w.useCallback((P,me)=>{p(ae=>{const ue=[...ae];return ue[P]=me,ue}),H(!0)},[]),L=w.useCallback(()=>{p(P=>[...P,""]),H(!0)},[]),q=w.useCallback(P=>{p(me=>me.filter((ae,ue)=>ue!==P)),H(!0)},[]),Se=w.useCallback(async()=>{S(!0);try{(await fetch("/api/studio/cdns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cdns:m})})).ok&&(H(!1),s(),o())}catch(P){console.error("Failed to save CDN URLs:",P)}finally{S(!1)}},[m,s,o]);return c("div",{css:_e.overlay,onClick:o,children:x("div",{css:_e.panel,onClick:P=>P.stopPropagation(),children:[x("div",{css:_e.header,children:[c("h2",{css:_e.title,children:"Settings"}),c("button",{css:_e.closeBtn,onClick:o,children:c("svg",{css:_e.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),x("div",{css:_e.sections,children:[x("section",{children:[c("h3",{css:_e.sectionTitle,children:"CDN URLs"}),c("p",{css:_e.description,children:"Manage CDN base URLs used by your images:"}),D?c("p",{css:_e.description,children:"Loading..."}):x(xt,{children:[c("div",{css:_e.cdnList,children:m.map((P,me)=>x("div",{css:_e.cdnRow,children:[c("span",{css:_e.cdnIndex,children:me}),c("input",{css:_e.cdnInput,type:"text",value:P,onChange:ae=>oe(me,ae.target.value),placeholder:"https://cdn.example.com"}),c("button",{css:_e.cdnDeleteBtn,onClick:()=>q(me),title:"Delete CDN URL",children:c("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]},me))}),x("button",{css:_e.cdnAddBtn,onClick:L,children:[c("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add CDN URL"]}),m.length>0&&c("p",{css:_e.warning,children:"Warning: Changing CDN URLs may break image references. The index numbers correspond to image `c` values."})]})]}),x("section",{children:[c("h3",{css:_e.sectionTitle,children:"Environment Variables"}),x("p",{css:_e.description,children:["Configure in ",c("code",{children:".env.studio"})," file:"]}),x("div",{css:_e.codeWrapper,children:[x("button",{css:_e.copyBtn,onClick:K,title:"Copy to clipboard",children:[h&&c("span",{css:_e.tooltip,children:"Copied!"}),c("svg",{css:_e.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),x("div",{css:_e.code,children:[c("p",{css:_e.codeLine,children:"STUDIO_DEV_SITE_URL=http://localhost:3000"}),c("p",{css:_e.codeLine,children:" "}),c("p",{css:_e.codeLine,children:"# Cloudflare R2 Storage"}),c("p",{css:_e.codeLine,children:"CLOUDFLARE_R2_ACCOUNT_ID=your_account_id"}),c("p",{css:_e.codeLine,children:"CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id"}),c("p",{css:_e.codeLine,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key"}),c("p",{css:_e.codeLine,children:"CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name"}),c("p",{css:_e.codeLine,children:"CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com"})]})]})]}),x("section",{children:[c("h3",{css:_e.sectionTitle,children:"Thumbnail Sizes"}),x("div",{css:_e.grid,children:[x("div",{children:[c("label",{css:_e.label,children:"Small"}),c("input",{css:_e.input,type:"number",defaultValue:300})]}),x("div",{children:[c("label",{css:_e.label,children:"Medium"}),c("input",{css:_e.input,type:"number",defaultValue:700})]}),x("div",{children:[c("label",{css:_e.label,children:"Large"}),c("input",{css:_e.input,type:"number",defaultValue:1400})]})]})]})]}),x("div",{css:_e.footer,children:[c("button",{css:_e.cancelBtn,onClick:o,children:"Cancel"}),c("button",{css:_e.saveBtn,onClick:Se,disabled:O||!X,children:O?"Saving...":"Save Changes"})]})]})})}const ea={overlay:{name:"1u8n9cx",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1100"},modal:b("background:",f.surface,";border-radius:12px;padding:24px;max-width:400px;width:90%;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),header:{name:"c6eghz",styles:"display:flex;align-items:center;gap:12px;margin-bottom:12px"},icon:b("width:24px;height:24px;color:",f.danger,";flex-shrink:0;",""),title:b("font-size:",$.lg,";font-weight:600;color:",f.text,";margin:0;",""),message:b("font-size:",$.base,";color:",f.textSecondary,";margin:0 0 20px 0;line-height:1.5;",""),button:b("width:100%;padding:10px 16px;border-radius:6px;font-size:",$.base,";font-weight:500;border:none;background:",f.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",f.primaryHover,";}","")};function Hg(){const{error:o,clearError:s}=Qa();return o?c("div",{css:ea.overlay,onClick:s,children:x("div",{css:ea.modal,onClick:h=>h.stopPropagation(),children:[x("div",{css:ea.header,children:[c("svg",{css:ea.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),c("h3",{css:ea.title,children:o.title})]}),c("p",{css:ea.message,children:o.message}),c("button",{css:ea.button,onClick:s,children:"OK"})]})}):null}const fh={showProgress:!1,progressTitle:"",progressState:{current:0,total:0,percent:0,status:"processing"},showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1,actionPaths:[],syncImageCount:0,syncHasRemote:!1,syncHasLocal:!1,processMode:"generate",downloadImageCount:0,downloadTotalSelected:0};function Bg({triggerRefresh:o,clearSelection:s,setFocusedItem:h,showError:u}){const[m,p]=w.useState(fh),D=w.useRef(null),_=w.useCallback(J=>{p(U=>({...U,progressState:typeof J=="function"?J(U.progressState):{...U.progressState,...J}}))},[]),O=w.useCallback(J=>{p(U=>({...U,actionPaths:J,showDeleteConfirm:!0}))},[]),S=w.useCallback(J=>{p(U=>({...U,actionPaths:J,showMoveModal:!0}))},[]),X=w.useCallback((J,U)=>{const be=J.map(Re=>"/"+Re.replace(/^public\//,""));let ge=!1,Ee=!1;for(const Re of J){const Ue=U.find(ut=>ut.path===Re);Ue&&(Ue.isRemote?ge=!0:Ue.cdnPushed||(Ee=!0))}p(Re=>({...Re,actionPaths:J,syncImageCount:be.length,syncHasRemote:ge,syncHasLocal:Ee,showSyncConfirm:!0}))},[]),H=w.useCallback((J,U)=>{const be=[];for(const ge of J){const Ee=U.find(Re=>Re.path===ge);Ee&&Ee.cdnPushed&&!Ee.isRemote&&be.push(ge)}p(ge=>({...ge,actionPaths:be,downloadImageCount:be.length,downloadTotalSelected:J.length,showDownloadConfirm:!0}))},[]),K=w.useCallback(J=>{p(U=>({...U,actionPaths:J,showProcessConfirm:!0,processMode:"generate"}))},[]),oe=w.useCallback(J=>{p(U=>({...U,processMode:J}))},[]),L=w.useCallback(()=>{p(J=>({...J,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),q=w.useCallback(()=>{p(fh)},[]),Se=w.useCallback(()=>{D.current&&D.current.abort()},[]),P=w.useCallback(async()=>{const J=m.actionPaths;p(U=>({...U,showDeleteConfirm:!1}));try{const U=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:J})});if(U.ok)s(),h(null),o();else{const be=await U.json();u("Delete Failed",be.error||"Unknown error")}}catch(U){console.error("Delete error:",U),u("Delete Failed","Delete failed. Check console for details.")}},[m.actionPaths,s,h,o,u]),me=w.useCallback(async J=>{const U=m.actionPaths;p(be=>({...be,showMoveModal:!1,showProgress:!0,progressTitle:"Moving Files",progressState:{current:0,total:U.length,percent:0,status:"processing",message:"Moving files..."}}));try{const be=await fetch("/api/studio/move",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:U,destination:J})});if(!be.ok){const Re=await be.json();_({status:"error",message:Re.error||"Move failed"});return}const ge=be.body?.getReader(),Ee=new TextDecoder;if(ge){let Re="";for(;;){const{done:Ue,value:ut}=await ge.read();if(Ue)break;Re+=Ee.decode(ut,{stream:!0});const Qe=Re.split(`
82
+ `);Re=Qe.pop()||"";for(const Xe of Qe)if(Xe.startsWith("data: "))try{const T=JSON.parse(Xe.slice(6));T.type==="start"?_(B=>({...B,total:T.total})):T.type==="progress"?_({current:T.current,total:T.total,percent:Math.round(T.current/T.total*100),status:"processing",message:T.message}):T.type==="complete"?(_(B=>({...B,status:"complete",message:`Moved ${T.moved} file${T.moved!==1?"s":""}${T.errors>0?`, ${T.errors} error${T.errors!==1?"s":""}`:""}`})),T.errors>0&&T.errorMessages?.length>0&&u("Move Failed",T.errorMessages.join(`
83
+ `)),s(),h(null),o()):T.type==="error"&&_(B=>({...B,status:"error",message:T.message||"Unknown error"}))}catch{}}}}catch(be){console.error("Move error:",be),_(ge=>({...ge,status:"error",message:"Failed to move files. Check console for details."}))}},[m.actionPaths,s,h,o,u,_]),ae=w.useCallback(async()=>{const U=m.actionPaths.map(Ee=>"/"+Ee.replace(/^public\//,""));p(Ee=>({...Ee,showSyncConfirm:!1,showProgress:!0,progressTitle:"Pushing to CDN",progressState:{current:0,total:U.length,percent:0,status:"processing",message:"Pushing to CDN..."}}));let be=0;const ge=[];for(let Ee=0;Ee<U.length;Ee++){const Re=U[Ee];try{const Ue=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[Re]})});if(Ue.ok)be++;else{const ut=await Ue.json();ge.push(`${Re}: ${ut.error||"Unknown error"}`)}}catch(Ue){ge.push(`${Re}: ${Ue instanceof Error?Ue.message:"Unknown error"}`)}_({current:Ee+1,total:U.length,percent:Math.round((Ee+1)/U.length*100),status:"processing",message:`Pushed ${Re}`})}_({current:U.length,total:U.length,percent:100,status:ge.length>0?"error":"complete",message:`Pushed ${be} file${be!==1?"s":""}${ge.length>0?`, ${ge.length} error${ge.length!==1?"s":""}`:""}`}),ge.length>0&&u("Push Errors",ge.join(`
84
+ `)),s(),o()},[m.actionPaths,s,o,u,_]),ue=w.useCallback(async()=>{const J=m.actionPaths,U=m.processMode,be=J.map(Qe=>{const Xe=Qe.replace(/^public\//,"");return Xe.startsWith("/")?Xe:`/${Xe}`}),ge=U==="remove",Ee=ge?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",Re=ge?"Removing Thumbnails":"Generating Thumbnails",Ue=ge?"Removing thumbnails...":"Generating thumbnails...";p(Qe=>({...Qe,showProcessConfirm:!1,showProgress:!0,progressTitle:Re,progressState:{current:0,total:be.length,percent:0,status:"processing",message:Ue}})),D.current=new AbortController;const ut=D.current.signal;try{const Qe=await fetch(Ee,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:be}),signal:ut});if(!Qe.ok){const B=await Qe.json();_({current:0,total:be.length,percent:0,status:"error",message:B.error||(ge?"Failed to remove thumbnails":"Processing failed")});return}const Xe=Qe.body?.getReader(),T=new TextDecoder;if(Xe){let B="";for(;;){const{done:ee,value:ke}=await Xe.read();if(ee)break;B+=T.decode(ke,{stream:!0});const He=B.split(`
85
+ `);B=He.pop()||"";for(const y of He)if(y.startsWith("data: "))try{const k=JSON.parse(y.slice(6));k.type==="start"?_(V=>({...V,total:k.total})):k.type==="progress"?_({current:k.current,total:k.total,percent:k.percent,status:"processing",message:k.message}):k.type==="cleanup"?_(V=>({...V,status:"cleanup",message:k.message})):k.type==="complete"?(_({current:k.processed,total:k.processed,percent:100,status:k.errors>0?"error":"complete",message:k.message}),o()):k.type==="error"&&_(V=>({...V,status:"error",message:k.message}))}catch{}}}}catch(Qe){ut.aborted?_(Xe=>({...Xe,status:"stopped",message:ge?"Removal stopped by user":"Processing stopped by user"})):(console.error("Processing error:",Qe),_({current:0,total:be.length,percent:0,status:"error",message:ge?"Failed to remove thumbnails. Check console for details.":"Processing failed. Check console for details."}))}finally{D.current=null}},[m.actionPaths,m.processMode,o,_]),Y=w.useCallback(async()=>{const J=m.progressState.orphanedFiles;if(!(!J||J.length===0))try{const U=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:J})});if(U.ok)_(be=>({...be,orphanedFiles:void 0,message:be.message?.replace(/Found \d+ orphaned thumbnail\(s\).*/,"Orphaned thumbnails deleted.")})),o();else{const be=await U.json();u("Delete Failed",be.error||"Failed to delete orphaned files")}}catch(U){console.error("Delete orphans error:",U),u("Delete Failed","Failed to delete orphaned files. Check console for details.")}},[m.progressState.orphanedFiles,o,u,_]);return{actionState:m,setActionState:p,abortController:D.current,requestDelete:O,requestMove:S,requestSync:X,requestDownload:H,requestProcess:K,setProcessMode:oe,cancelAction:L,closeProgress:q,stopProcessing:Se,confirmDelete:P,confirmMove:me,confirmSync:ae,confirmProcess:ue,deleteOrphans:Y}}const jg="36px",kt={container:b(Ji," display:flex;flex-direction:column;height:100%;background:",f.background,";",""),header:b("display:flex;align-items:center;justify-content:space-between;padding:12px 24px;background:",f.surface,";border-bottom:1px solid ",f.border,";position:relative;",""),title:b("font-size:",$.lg,";font-weight:600;color:",f.text,";margin:0;letter-spacing:-0.02em;flex-shrink:0;",""),headerLeft:{name:"16ur2v6",styles:"display:flex;align-items:center;gap:12px;flex:1;min-width:0"},headerCenter:{name:"1fsejhz",styles:"position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;max-width:50%"},breadcrumbs:b("display:flex;align-items:center;gap:6px;font-size:",$.base,";color:",f.textSecondary,";overflow:hidden;",""),breadcrumbSeparator:b("color:",f.border,";flex-shrink:0;",""),breadcrumbItem:b("color:",f.textSecondary,";text-decoration:none;cursor:pointer;transition:color 0.15s ease;white-space:nowrap;&:hover{color:",f.primary,";}",""),breadcrumbCurrent:b("color:",f.text,";font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),headerIconBtn:b("display:flex;align-items:center;justify-content:center;width:32px;height:32px;color:",f.textMuted,";background:transparent;border:none;border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{color:",f.text,";background:",f.surface,";}",""),headerActions:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},headerBtn:b("height:",jg,";padding:0 12px;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),headerIcon:b("width:16px;height:16px;color:",f.textSecondary,";",""),content:{name:"1rtaly3",styles:"flex:1;display:flex;overflow:hidden"},fileBrowser:{name:"upomw9",styles:"flex:1;min-width:0;overflow:auto;padding:20px 24px;display:flex;flex-direction:column"},dropOverlay:b("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",f.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:b("display:flex;flex-direction:column;align-items:center;gap:12px;color:",f.primary,";font-size:",$.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"}};function qg({onClose:o,isVisible:s=!0,standaloneMode:h=!1,workspacePath:u,siteUrl:m}){const p=o||(()=>{}),[D,_]=w.useState("public"),[O,S]=w.useState(new Set),[X,H]=w.useState(null),[K,oe]=w.useState("grid"),[L,q]=w.useState(null),[Se,P]=w.useState(null),[me,ae]=w.useState(!1),[ue,Y]=w.useState(0),[J,U]=w.useState(!1),[be,ge]=w.useState(""),[Ee,Re]=w.useState(null),[Ue,ut]=w.useState([]),[Qe,Xe]=w.useState(!1),T=w.useCallback(()=>{Y(Me=>Me+1)},[]);w.useEffect(()=>{if(L&&Ue.length>0){const Me=Ue.find(pt=>pt.path===L.path);Me&&JSON.stringify(Me)!==JSON.stringify(L)&&q(Me)}},[Ue,L]);const B=w.useCallback(()=>{U(!0)},[]),ee=w.useCallback(()=>{U(!1)},[]),ke=w.useCallback((Me,pt)=>{Re({title:Me,message:pt})},[]),He=w.useCallback(()=>{Re(null)},[]),y=w.useCallback(Me=>{Me.preventDefault(),Me.stopPropagation(),Xe(!0)},[]),k=w.useCallback(Me=>{Me.preventDefault(),Me.stopPropagation(),Xe(!1)},[]),V=w.useCallback(async Me=>{Me.preventDefault(),Me.stopPropagation(),Xe(!1);const pt=Array.from(Me.dataTransfer.files);if(pt.length!==0&&!(D==="public/images"||D.startsWith("public/images/"))){for(const jt of pt){const fn=new FormData;fn.append("file",jt),fn.append("path",D);try{await fetch("/api/studio/upload",{method:"POST",body:fn})}catch(qn){console.error("Upload error:",qn)}}T()}},[D,T]),W=w.useCallback(()=>{if(D==="public")return;const Me=D.split("/");Me.pop(),_(Me.join("/")||"public"),S(new Set)},[D]),G=w.useCallback(Me=>{_(Me),S(new Set),q(null)},[]),Ce=w.useCallback(Me=>{S(pt=>{const jt=new Set(pt);return jt.has(Me)?jt.delete(Me):jt.add(Me),jt}),H(Me)},[]),pe=w.useCallback((Me,pt,jt)=>{const fn=jt.findIndex(qt=>qt.path===Me),qn=jt.findIndex(qt=>qt.path===pt);if(fn===-1||qn===-1)return;const ta=Math.min(fn,qn),rl=Math.max(fn,qn);S(qt=>{const Ll=new Set(qt);for(let En=ta;En<=rl;En++)Ll.add(jt[En].path);return Ll}),H(pt)},[]),rt=w.useCallback(Me=>{S(new Set(Me.map(pt=>pt.path)))},[]),Ze=w.useCallback(()=>{S(new Set)},[]),Kt=w.useCallback(Me=>{q(Me)},[]),te=Bg({triggerRefresh:T,clearSelection:Ze,setFocusedItem:Kt,showError:ke}),Bt=w.useCallback(Me=>{if(Me.key==="Escape"){const pt=Me.target;if(pt.tagName==="INPUT"||pt.tagName==="TEXTAREA")return;L?q(null):h||p()}},[p,L,h]);w.useEffect(()=>(s&&(document.addEventListener("keydown",Bt),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",Bt),document.body.style.overflow=""}),[Bt,s]);const ft={isOpen:!0,openStudio:()=>{},closeStudio:p,toggleStudio:p,currentPath:D,setCurrentPath:G,navigateUp:W,selectedItems:O,toggleSelection:Ce,selectRange:pe,selectAll:rt,clearSelection:Ze,lastSelectedPath:X,viewMode:K,setViewMode:oe,focusedItem:L,setFocusedItem:q,meta:Se,setMeta:P,isLoading:me,setIsLoading:ae,refreshKey:ue,triggerRefresh:T,scanRequested:J,triggerScan:B,clearScanRequest:ee,searchQuery:be,setSearchQuery:ge,error:Ee,showError:ke,clearError:He,fileItems:Ue,setFileItems:ut,actionState:te.actionState,requestDelete:te.requestDelete,requestMove:te.requestMove,requestSync:te.requestSync,requestDownload:te.requestDownload,requestProcess:te.requestProcess,setProcessMode:te.setProcessMode,confirmDelete:te.confirmDelete,confirmMove:te.confirmMove,confirmSync:te.confirmSync,confirmProcess:te.confirmProcess,cancelAction:te.cancelAction,closeProgress:te.closeProgress,stopProcessing:te.stopProcessing,abortController:te.abortController,deleteOrphans:te.deleteOrphans};return c(zh.Provider,{value:ft,children:x("div",{css:kt.container,children:[x("div",{css:kt.header,children:[c("div",{css:kt.headerLeft,children:c("h1",{css:kt.title,children:"Studio"})}),c("div",{css:kt.headerCenter,children:c(Xg,{currentPath:D,onNavigate:G,projectName:u?u.split("/").pop():void 0})}),x("div",{css:kt.headerActions,children:[m&&c("a",{href:m,target:"_blank",rel:"noopener noreferrer",css:kt.headerIconBtn,title:`Open ${m}`,children:c(Qg,{})}),c(Lg,{}),!h&&c("button",{css:kt.headerBtn,onClick:p,"aria-label":"Close Studio",children:c(Zg,{})})]})]}),c(ng,{}),x("div",{css:kt.content,onDragOver:y,onDragLeave:k,onDrop:V,children:[Qe&&c("div",{css:kt.dropOverlay,children:x("div",{css:kt.dropMessage,children:[c("svg",{css:kt.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:c("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})}),c("span",{children:"Drop files to upload"})]})}),c("div",{css:kt.fileBrowser,children:K==="grid"?c(bg,{}):c(zg,{})})]}),L&&c(_g,{}),c(Hg,{}),te.actionState.showDeleteConfirm&&c(Yi,{title:"Delete Files",message:`Are you sure you want to delete ${te.actionState.actionPaths.length} item${te.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:te.confirmDelete,onCancel:te.cancelAction}),te.actionState.showSyncConfirm&&c(Yi,{title:"Push to CDN",message:`Push ${te.actionState.syncImageCount} image${te.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${te.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${te.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:te.confirmSync,onCancel:te.cancelAction}),te.actionState.showProcessConfirm&&c(Vg,{imageCount:te.actionState.actionPaths.length,mode:te.actionState.processMode,onConfirm:te.confirmProcess,onCancel:te.cancelAction}),te.actionState.showMoveModal&&c(Th,{selectedItems:new Set(te.actionState.actionPaths),currentPath:D,onMove:Me=>te.confirmMove(Me),onCancel:te.cancelAction}),te.actionState.showProgress&&c(vr,{title:te.actionState.progressTitle,progress:te.actionState.progressState,onStop:te.stopProcessing,onDeleteOrphans:te.deleteOrphans,onClose:te.closeProgress})]})})}var Yg={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},Gg={name:"1ca3l8d",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:10000"};function Vg({imageCount:o,mode:s,onConfirm:h,onCancel:u}){const m={overlay:Gg,container:b("background:",f.surface,";border-radius:12px;padding:24px;max-width:420px;width:90%;box-shadow:0 20px 25px -5px rgba(0, 0, 0, 0.1),0 10px 10px -5px rgba(0, 0, 0, 0.04);",""),title:b("font-size:",$.lg,";font-weight:600;color:",f.text,";margin:0 0 16px;",""),message:b("font-size:",$.base,";color:",f.textSecondary,";margin:0 0 20px;line-height:1.5;",""),actions:Yg,cancelBtn:b("padding:10px 20px;border:1px solid ",f.border,";border-radius:8px;background:",f.background,";color:",f.text,";font-size:",$.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",f.surfaceHover,";border-color:",f.borderHover,";}",""),confirmBtn:b("padding:10px 20px;border:none;border-radius:8px;background:",f.primary,";color:white;font-size:",$.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",f.primaryHover,";}",""),confirmBtnDanger:b("background:",f.danger,";&:hover{background:#dc2626;}","")},p=s==="remove",D=p?"Remove Thumbnails":"Generate Thumbnails",_=p?`Remove generated thumbnails for ${o} image${o!==1?"s":""}? Original images will be kept.`:`Generate thumbnails for ${o} image${o!==1?"s":""}?`,O=p?"Remove":"Generate";return c("div",{css:m.overlay,onClick:u,children:x("div",{css:m.container,onClick:S=>S.stopPropagation(),children:[c("h2",{css:m.title,children:D}),c("p",{css:m.message,children:_}),x("div",{css:m.actions,children:[c("button",{css:m.cancelBtn,onClick:u,children:"Cancel"}),c("button",{css:[m.confirmBtn,p&&m.confirmBtnDanger,"",""],onClick:h,children:O})]})]})})}function Xg({currentPath:o,onNavigate:s,projectName:h}){const u=o.split("/").filter(Boolean),m=u.map((p,D)=>({name:D===0&&p==="public"&&h?h:p,path:u.slice(0,D+1).join("/")}));return c("div",{css:kt.breadcrumbs,children:m.map((p,D)=>x("span",{style:{display:"flex",alignItems:"center",gap:6},children:[D>0&&c("span",{css:kt.breadcrumbSeparator,children:"/"}),D===m.length-1?c("span",{css:kt.breadcrumbCurrent,children:p.name}):c("span",{css:kt.breadcrumbItem,onClick:()=>s(p.path),children:p.name})]},p.path))})}function Qg(){return x("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[c("circle",{cx:"12",cy:"12",r:"10"}),c("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),c("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})}function Zg(){return x("svg",{css:kt.headerIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[c("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),c("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}const Dh=document.getElementById("root");if(!Dh)throw new Error("Root element not found");const Kg=window.__STUDIO_WORKSPACE__||"Unknown",Jg=window.__STUDIO_SITE_URL__||"";G1.createRoot(Dh).render(c(w.StrictMode,{children:c("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:c(qg,{isVisible:!0,standaloneMode:!0,workspacePath:Kg,siteUrl:Jg})})}));
@@ -11,7 +11,7 @@
11
11
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
12
12
  }
13
13
  </style>
14
- <script type="module" crossorigin src="/assets/index-Cxfnf-5i.js"></script>
14
+ <script type="module" crossorigin src="/assets/index-T4g2jTSf.js"></script>
15
15
  </head>
16
16
  <body>
17
17
  <div id="root"></div>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gallop.software/studio",
3
- "version": "2.3.49",
3
+ "version": "2.3.50",
4
4
  "description": "Standalone media manager - upload, process, and sync images to CDN",
5
5
  "type": "module",
6
6
  "bin": {