@gallop.software/studio 2.3.34 → 2.3.36

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 p in u)if(p!=="default"&&!(p in o)){const m=Object.getOwnPropertyDescriptor(u,p);m&&Object.defineProperty(o,p,m.get?m:{enumerable:!0,get:()=>u[p]})}}}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 p of document.querySelectorAll('link[rel="modulepreload"]'))u(p);new MutationObserver(p=>{for(const m of p)if(m.type==="childList")for(const D of m.addedNodes)D.tagName==="LINK"&&D.rel==="modulepreload"&&u(D)}).observe(document,{childList:!0,subtree:!0});function h(p){const m={};return p.integrity&&(m.integrity=p.integrity),p.referrerPolicy&&(m.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?m.credentials="include":p.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function u(p){if(p.ep)return;p.ep=!0;const m=h(p);fetch(p.href,m)}})();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,p,m){var D=null;if(m!==void 0&&(D=""+m),p.key!==void 0&&(D=""+p.key),"key"in p){m={};for(var _ in p)_!=="key"&&(m[_]=p[_])}else m=p;return p=m.ref,{$$typeof:o,type:u,key:D,ref:p!==void 0?p:null,props:m}}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:{}},Oe={};var X0;function Ym(){if(X0)return Oe;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"),p=Symbol.for("react.profiler"),m=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(){}},Y=Object.assign,Ce={};function ee(y,k,G){this.props=y,this.context=k,this.refs=Ce,this.updater=G||L}ee.prototype.isReactComponent={},ee.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")},ee.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function me(){}me.prototype=ee.prototype;function ie(y,k,G){this.props=y,this.context=k,this.refs=Ce,this.updater=G||L}var ue=ie.prototype=new me;ue.constructor=ie,Y(ue,ee.prototype),ue.isPureReactComponent=!0;var q=Array.isArray;function J(){}var U={H:null,A:null,T:null,S:null},be=Object.prototype.hasOwnProperty;function ge(y,k,G){var W=G.ref;return{$$typeof:o,type:y,key:k,ref:W!==void 0?W:null,props:G}}function Ee(y,k){return ge(y.type,k,y.props)}function Re(y){return typeof y=="object"&&y!==null&&y.$$typeof===o}function Le(y){var k={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function(G){return k[G]})}var ot=/\/+/g;function Xe(y,k){return typeof y=="object"&&y!==null&&y.key!=null?Le(""+y.key):k.toString(36)}function Ve(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,G,W,V){var we=typeof y;(we==="undefined"||we==="boolean")&&(y=null);var he=!1;if(y===null)he=!0;else switch(we){case"bigint":case"string":case"number":he=!0;break;case"object":switch(y.$$typeof){case o:case s:he=!0;break;case X:return he=y._init,T(he(y._payload),k,G,W,V)}}if(he)return V=V(y),he=W===""?"."+Xe(y,0):W,q(V)?(G="",he!=null&&(G=he.replace(ot,"$&/")+"/"),T(V,k,G,"",function(Zt){return Zt})):V!=null&&(Re(V)&&(V=Ee(V,G+(V.key==null||y&&y.key===V.key?"":(""+V.key).replace(ot,"$&/")+"/")+he)),k.push(V)),1;he=0;var at=W===""?".":W+":";if(q(y))for(var Qe=0;Qe<y.length;Qe++)W=y[Qe],we=at+Xe(W,Qe),he+=T(W,k,G,we,V);else if(Qe=oe(y),typeof Qe=="function")for(y=Qe.call(y),Qe=0;!(W=y.next()).done;)W=W.value,we=at+Xe(W,Qe++),he+=T(W,k,G,we,V);else if(we==="object"){if(typeof y.then=="function")return T(Ve(y),k,G,W,V);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 he}function B(y,k,G){if(y==null)return y;var W=[],V=0;return T(y,W,"","",function(we){return k.call(G,we,V++)}),W}function te(y){if(y._status===-1){var k=y._result;k=k(),k.then(function(G){(y._status===0||y._status===-1)&&(y._status=1,y._result=G)},function(G){(y._status===0||y._status===-1)&&(y._status=2,y._result=G)}),y._status===-1&&(y._status=0,y._result=k)}if(y._status===1)return y._result.default;throw y._result}var De=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)},Ne={map:B,forEach:function(y,k,G){B(y,function(){k.apply(this,arguments)},G)},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 Oe.Activity=H,Oe.Children=Ne,Oe.Component=ee,Oe.Fragment=h,Oe.Profiler=p,Oe.PureComponent=ie,Oe.StrictMode=u,Oe.Suspense=O,Oe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=U,Oe.__COMPILER_RUNTIME={__proto__:null,c:function(y){return U.H.useMemoCache(y)}},Oe.cache=function(y){return function(){return y.apply(null,arguments)}},Oe.cacheSignal=function(){return null},Oe.cloneElement=function(y,k,G){if(y==null)throw Error("The argument must be a React element, but you passed "+y+".");var W=Y({},y.props),V=y.key;if(k!=null)for(we in k.key!==void 0&&(V=""+k.key),k)!be.call(k,we)||we==="key"||we==="__self"||we==="__source"||we==="ref"&&k.ref===void 0||(W[we]=k[we]);var we=arguments.length-2;if(we===1)W.children=G;else if(1<we){for(var he=Array(we),at=0;at<we;at++)he[at]=arguments[at+2];W.children=he}return ge(y.type,V,W)},Oe.createContext=function(y){return y={$$typeof:D,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null},y.Provider=y,y.Consumer={$$typeof:m,_context:y},y},Oe.createElement=function(y,k,G){var W,V={},we=null;if(k!=null)for(W in k.key!==void 0&&(we=""+k.key),k)be.call(k,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(V[W]=k[W]);var he=arguments.length-2;if(he===1)V.children=G;else if(1<he){for(var at=Array(he),Qe=0;Qe<he;Qe++)at[Qe]=arguments[Qe+2];V.children=at}if(y&&y.defaultProps)for(W in he=y.defaultProps,he)V[W]===void 0&&(V[W]=he[W]);return ge(y,we,V)},Oe.createRef=function(){return{current:null}},Oe.forwardRef=function(y){return{$$typeof:_,render:y}},Oe.isValidElement=Re,Oe.lazy=function(y){return{$$typeof:X,_payload:{_status:-1,_result:y},_init:te}},Oe.memo=function(y,k){return{$$typeof:S,type:y,compare:k===void 0?null:k}},Oe.startTransition=function(y){var k=U.T,G={};U.T=G;try{var W=y(),V=U.S;V!==null&&V(G,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(J,De)}catch(we){De(we)}finally{k!==null&&G.types!==null&&(k.types=G.types),U.T=k}},Oe.unstable_useCacheRefresh=function(){return U.H.useCacheRefresh()},Oe.use=function(y){return U.H.use(y)},Oe.useActionState=function(y,k,G){return U.H.useActionState(y,k,G)},Oe.useCallback=function(y,k){return U.H.useCallback(y,k)},Oe.useContext=function(y){return U.H.useContext(y)},Oe.useDebugValue=function(){},Oe.useDeferredValue=function(y,k){return U.H.useDeferredValue(y,k)},Oe.useEffect=function(y,k){return U.H.useEffect(y,k)},Oe.useEffectEvent=function(y){return U.H.useEffectEvent(y)},Oe.useId=function(){return U.H.useId()},Oe.useImperativeHandle=function(y,k,G){return U.H.useImperativeHandle(y,k,G)},Oe.useInsertionEffect=function(y,k){return U.H.useInsertionEffect(y,k)},Oe.useLayoutEffect=function(y,k){return U.H.useLayoutEffect(y,k)},Oe.useMemo=function(y,k){return U.H.useMemo(y,k)},Oe.useOptimistic=function(y,k){return U.H.useOptimistic(y,k)},Oe.useReducer=function(y,k,G){return U.H.useReducer(y,k,G)},Oe.useRef=function(y){return U.H.useRef(y)},Oe.useState=function(y){return U.H.useState(y)},Oe.useSyncExternalStore=function(y,k,G){return U.H.useSyncExternalStore(y,k,G)},Oe.useTransition=function(){return U.H.useTransition()},Oe.version="19.2.4",Oe}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(p){var m;u.tags.length===0?u.insertionPoint?m=u.insertionPoint.nextSibling:u.prepend?m=u.container.firstChild:m=u.before:m=u.tags[u.tags.length-1].nextSibling,u.container.insertBefore(p,m),u.tags.push(p)},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 p=this.tags[this.tags.length-1];if(this.isSpeedy){var m=Gm(p);try{m.insertRule(u,m.cssRules.length)}catch{}}else p.appendChild(document.createTextNode(u));this.ctr++},s.flush=function(){this.tags.forEach(function(u){var p;return(p=u.parentNode)==null?void 0:p.removeChild(u)}),this.tags=[],this.ctr=0},o})(),Gt="-ms-",yr="-moz-",Fe="-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 Nt(o,0)^45?(((s<<2^Nt(o,0))<<2^Nt(o,1))<<2^Nt(o,2))<<2^Nt(o,3):0}function mh(o){return o.trim()}function $m(o,s){return(o=s.exec(o))?o[0]:o}function $e(o,s,h){return o.replace(s,h)}function Ks(o,s){return o.indexOf(s)}function Nt(o,s){return o.charCodeAt(s)|0}function Vi(o,s,h){return o.slice(s,h)}function Un(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,en=0,Mt=0,Za="";function Sr(o,s,h,u,p,m,D){return{value:o,root:s,parent:h,type:u,props:p,children:m,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 Mt}function Pm(){return Mt=en>0?Nt(Za,--en):0,Xa--,Mt===10&&(Xa=1,xr--),Mt}function sn(){return Mt=en<gh?Nt(Za,en++):0,Xa++,Mt===10&&(Xa=1,xr++),Mt}function Hn(){return Nt(Za,en)}function hr(){return en}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=Un(Za=o),en=0,[]}function vh(o){return Za="",o}function pr(o){return mh(Zi(en-1,Js(o===91?o+2:o===40?o+1:o)))}function e1(o){for(;(Mt=Hn())&&Mt<33;)sn();return Xi(o)>2||Xi(Mt)>3?"":" "}function t1(o,s){for(;--s&&sn()&&!(Mt<48||Mt>102||Mt>57&&Mt<65||Mt>70&&Mt<97););return Zi(o,hr()+(s<6&&Hn()==32&&sn()==32))}function Js(o){for(;sn();)switch(Mt){case o:return en;case 34:case 39:o!==34&&o!==39&&Js(Mt);break;case 40:o===41&&Js(o);break;case 92:sn();break}return en}function n1(o,s){for(;sn()&&o+Mt!==57;)if(o+Mt===84&&Hn()===47)break;return"/*"+Zi(s,en-1)+"*"+br(o===47?o:sn())}function l1(o){for(;!Xi(Hn());)sn();return Zi(o,en)}function a1(o){return vh(mr("",null,null,null,[""],o=yh(o),0,[0],o))}function mr(o,s,h,u,p,m,D,_,O){for(var S=0,X=0,H=D,K=0,oe=0,L=0,Y=1,Ce=1,ee=1,me=0,ie="",ue=p,q=m,J=u,U=ie;Ce;)switch(L=me,me=sn()){case 40:if(L!=108&&Nt(U,H-1)==58){Ks(U+=$e(pr(me),"&","&\f"),"&\f")!=-1&&(ee=-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(Hn()){case 42:case 47:dr(i1(n1(sn(),hr()),s,h),O);break;default:U+="/"}break;case 123*Y:_[S++]=Un(U)*ee;case 125*Y:case 59:case 0:switch(me){case 0:case 125:Ce=0;case 59+X:ee==-1&&(U=$e(U,/\f/g,"")),oe>0&&Un(U)-H&&dr(oe>32?J0(U+";",u,h,H-1):J0($e(U," ","")+";",u,h,H-2),O);break;case 59:U+=";";default:if(dr(J=K0(U,s,h,S,X,p,_,ie,ue=[],q=[],H),m),me===123)if(X===0)mr(U,s,J,J,ue,m,H,_,q);else switch(K===99&&Nt(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,p,_,ie,p,ue=[],H),q),p,q,H,_,u?ue:q);break;default:mr(U,J,J,J,[""],q,0,_,q)}}S=X=oe=0,Y=ee=1,ie=U="",H=D;break;case 58:H=1+Un(U),oe=L;default:if(Y<1){if(me==123)--Y;else if(me==125&&Y++==0&&Pm()==125)continue}switch(U+=br(me),me*Y){case 38:ee=X>0?1:(U+="\f",-1);break;case 44:_[S++]=(Un(U)-1)*ee,ee=1;break;case 64:Hn()===45&&(U+=pr(sn())),K=Hn(),X=H=Un(ie=U+=l1(hr())),me++;break;case 45:L===45&&Un(U)==2&&(Y=0)}}return m}function K0(o,s,h,u,p,m,D,_,O,S,X){for(var H=p-1,K=p===0?m:[""],oe=Ps(K),L=0,Y=0,Ce=0;L<u;++L)for(var ee=0,me=Vi(o,H+1,H=Km(Y=D[L])),ie=o;ee<oe;++ee)(ie=mh(Y>0?K[ee]+" "+me:$e(me,/&\f/g,K[ee])))&&(O[Ce++]=ie);return Sr(o,s,h,p===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),p=0;p<u;p++)h+=s(o[p],p,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 Un(h=Va(o.children,u))?o.return=o.value+"{"+h+"}":""}function r1(o){var s=Ps(o);return function(h,u,p,m){for(var D="",_=0;_<s;_++)D+=o[_](h,u,p,m)||"";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 p=0,m=0;p=m,m=Hn(),p===38&&m===12&&(h[u]=1),!Xi(m);)sn();return Zi(s,en)},f1=function(s,h){var u=-1,p=44;do switch(Xi(p)){case 0:p===38&&Hn()===12&&(h[u]=1),s[u]+=u1(en-1,h,u);break;case 2:s[u]+=pr(p);break;case 4:if(p===44){s[++u]=Hn()===58?"&\f":"",h[u]=s[u].length;break}default:s[u]+=br(p)}while(p=sn());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,p=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))&&!p){F0.set(s,!0);for(var m=[],D=d1(h,m),_=u.props,O=0,S=0;O<D.length;O++)for(var X=0;X<_.length;X++,S++)s.props[S]=m[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 Fe+"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 Fe+o+o;case 5349:case 4246:case 4810:case 6968:case 2756:return Fe+o+yr+o+Gt+o+o;case 6828:case 4268:return Fe+o+Gt+o+o;case 6165:return Fe+o+Gt+"flex-"+o+o;case 5187:return Fe+o+$e(o,/(\w+).+(:[^]+)/,Fe+"box-$1$2"+Gt+"flex-$1$2")+o;case 5443:return Fe+o+Gt+"flex-item-"+$e(o,/flex-|-self/,"")+o;case 4675:return Fe+o+Gt+"flex-line-pack"+$e(o,/align-content|flex-|-self/,"")+o;case 5548:return Fe+o+Gt+$e(o,"shrink","negative")+o;case 5292:return Fe+o+Gt+$e(o,"basis","preferred-size")+o;case 6060:return Fe+"box-"+$e(o,"-grow","")+Fe+o+Gt+$e(o,"grow","positive")+o;case 4554:return Fe+$e(o,/([^-])(transform)/g,"$1"+Fe+"$2")+o;case 6187:return $e($e($e(o,/(zoom-|grab)/,Fe+"$1"),/(image-set)/,Fe+"$1"),o,"")+o;case 5495:case 3959:return $e(o,/(image-set\([^]*)/,Fe+"$1$`$1");case 4968:return $e($e(o,/(.+:)(flex-)?(.*)/,Fe+"box-pack:$3"+Gt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Fe+o+o;case 4095:case 3583:case 4068:case 2532:return $e(o,/(.+)-inline(.+)/,Fe+"$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(Un(o)-1-s>6)switch(Nt(o,s+1)){case 109:if(Nt(o,s+4)!==45)break;case 102:return $e(o,/(.+:)(.+)-([^]+)/,"$1"+Fe+"$2-$3$1"+yr+(Nt(o,s+3)==108?"$3":"$2-$3"))+o;case 115:return~Ks(o,"stretch")?bh($e(o,"stretch","fill-available"),s)+o:o}break;case 4949:if(Nt(o,s+1)!==115)break;case 6444:switch(Nt(o,Un(o)-3-(~Ks(o,"!important")&&10))){case 107:return $e(o,":",":"+Fe)+o;case 101:return $e(o,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Fe+(Nt(o,14)===45?"inline-":"")+"box$3$1"+Fe+"$2$3$1"+Gt+"$2box$3")+o}break;case 5936:switch(Nt(o,s+11)){case 114:return Fe+o+Gt+$e(o,/[svh]\w+-[tblr]{2}/,"tb")+o;case 108:return Fe+o+Gt+$e(o,/[svh]\w+-[tblr]{2}/,"tb-rl")+o;case 45:return Fe+o+Gt+$e(o,/[svh]\w+-[tblr]{2}/,"lr")+o}return Fe+o+Gt+o+o}return o}var m1=function(s,h,u,p){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:$e(s.value,"@","@"+Fe)})],p);case Ws:if(s.length)return Wm(s.props,function(m){switch($m(m,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Va([ji(s,{props:[$e(m,/:(read-\w+)/,":"+yr+"$1")]})],p);case"::placeholder":return Va([ji(s,{props:[$e(m,/:(plac\w+)/,":"+Fe+"input-$1")]}),ji(s,{props:[$e(m,/:(plac\w+)/,":"+yr+"$1")]}),ji(s,{props:[$e(m,/:(plac\w+)/,Gt+"input-$1")]})],p)}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(Y){var Ce=Y.getAttribute("data-emotion");Ce.indexOf(" ")!==-1&&(document.head.appendChild(Y),Y.setAttribute("data-s",""))})}var p=s.stylisPlugins||g1,m={},D,_=[];D=s.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+h+' "]'),function(Y){for(var Ce=Y.getAttribute("data-emotion").split(" "),ee=1;ee<Ce.length;ee++)m[Ce[ee]]=!0;_.push(Y)});var O,S=[h1,p1];{var X,H=[o1,c1(function(Y){X.insert(Y)})],K=r1(S.concat(p,H)),oe=function(Ce){return Va(a1(Ce),K)};O=function(Ce,ee,me,ie){X=me,oe(Ce?Ce+"{"+ee.styles+"}":ee.styles),ie&&(L.inserted[ee.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:m,registered:{},insert:O};return L.sheet.hydrate(_),L},Bs={exports:{}},We={};var $0;function v1(){if($0)return We;$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,p=o?Symbol.for("react.strict_mode"):60108,m=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,Y=o?Symbol.for("react.block"):60121,Ce=o?Symbol.for("react.fundamental"):60117,ee=o?Symbol.for("react.responder"):60118,me=o?Symbol.for("react.scope"):60119;function ie(q){if(typeof q=="object"&&q!==null){var J=q.$$typeof;switch(J){case s:switch(q=q.type,q){case O:case S:case u:case m:case p:case H:return q;default:switch(q=q&&q.$$typeof,q){case _:case X:case L:case oe:case D:return q;default:return J}}case h:return J}}}function ue(q){return ie(q)===S}return We.AsyncMode=O,We.ConcurrentMode=S,We.ContextConsumer=_,We.ContextProvider=D,We.Element=s,We.ForwardRef=X,We.Fragment=u,We.Lazy=L,We.Memo=oe,We.Portal=h,We.Profiler=m,We.StrictMode=p,We.Suspense=H,We.isAsyncMode=function(q){return ue(q)||ie(q)===O},We.isConcurrentMode=ue,We.isContextConsumer=function(q){return ie(q)===_},We.isContextProvider=function(q){return ie(q)===D},We.isElement=function(q){return typeof q=="object"&&q!==null&&q.$$typeof===s},We.isForwardRef=function(q){return ie(q)===X},We.isFragment=function(q){return ie(q)===u},We.isLazy=function(q){return ie(q)===L},We.isMemo=function(q){return ie(q)===oe},We.isPortal=function(q){return ie(q)===h},We.isProfiler=function(q){return ie(q)===m},We.isStrictMode=function(q){return ie(q)===p},We.isSuspense=function(q){return ie(q)===H},We.isValidElementType=function(q){return typeof q=="string"||typeof q=="function"||q===u||q===S||q===m||q===p||q===H||q===K||typeof q=="object"&&q!==null&&(q.$$typeof===L||q.$$typeof===oe||q.$$typeof===D||q.$$typeof===_||q.$$typeof===X||q.$$typeof===Ce||q.$$typeof===ee||q.$$typeof===me||q.$$typeof===Y)},We.typeOf=ie,We}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},p={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},m={};m[o.ForwardRef]=u,m[o.Memo]=p;function D(L){return o.isMemo(L)?p:m[L.$$typeof]||s}var _=Object.defineProperty,O=Object.getOwnPropertyNames,S=Object.getOwnPropertySymbols,X=Object.getOwnPropertyDescriptor,H=Object.getPrototypeOf,K=Object.prototype;function oe(L,Y,Ce){if(typeof Y!="string"){if(K){var ee=H(Y);ee&&ee!==K&&oe(L,ee,Ce)}var me=O(Y);S&&(me=me.concat(S(Y)));for(var ie=D(L),ue=D(Y),q=0;q<me.length;++q){var J=me[q];if(!h[J]&&!(Ce&&Ce[J])&&!(ue&&ue[J])&&!(ie&&ie[J])){var U=X(Y,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(p){o[p]!==void 0?s.push(o[p]+";"):p&&(u+=p+" ")}),u}var xh=function(s,h,u){var p=s.key+"-"+h.name;(u===!1||S1===!1)&&s.registered[p]===void 0&&(s.registered[p]=h.styles)},w1=function(s,h,u){xh(s,h,u);var p=s.key+"-"+h.name;if(s.inserted[h.name]===void 0){var m=h;do s.insert(h===m?"."+p:"",m,s.sheet,!0),m=m.next;while(m!==void 0)}};function z1(o){for(var s=0,h,u=0,p=o.length;p>=4;++u,p-=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(p){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,p,m){return Nn={name:p,styles:m,next:Nn},p})}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 p=h;if(p.anim===1)return Nn={name:p.name,styles:p.styles,next:Nn},p.name;var m=h;if(m.styles!==void 0){var D=m.next;if(D!==void 0)for(;D!==void 0;)Nn={name:D.name,styles:D.styles,next:Nn},D=D.next;var _=m.styles+";";return _}return E1(o,s,h)}case"function":{if(o!==void 0){var O=Nn,S=h(o);return Nn=O,Qi(o,s,S)}break}}var X=h;return X}function E1(o,s,h){var u="";if(Array.isArray(h))for(var p=0;p<h.length;p++)u+=Qi(o,s,h[p])+";";else for(var m in h){var D=h[m];if(typeof D!="object"){var _=D;P0(_)&&(u+=qs(m)+":"+eh(m,_)+";")}else if(Array.isArray(D)&&typeof D[0]=="string"&&s==null)for(var O=0;O<D.length;O++)P0(D[O])&&(u+=qs(m)+":"+eh(m,D[O])+";");else{var S=Qi(o,s,D);switch(m){case"animation":case"animationName":{u+=qs(m)+":"+S+";";break}default:u+=m+"{"+S+"}"}}}return u}var th=/label:\s*([^\s;{]+)\s*(;|$)/g,Nn;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,p="";Nn=void 0;var m=o[0];if(m==null||m.raw===void 0)u=!1,p+=Qi(h,s,m);else{var D=m;p+=D[0]}for(var _=1;_<o.length;_++)if(p+=Qi(h,s,o[_]),u){var O=m;p+=O[_]}th.lastIndex=0;for(var S="",X;(X=th.exec(p))!==null;)S+="-"+X[1];var H=z1(p)+S;return{name:H,styles:p,next:Nn}}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 p=w.useContext(wh);return s(h,p,u)})},O1=w.createContext({}),Ki={}.hasOwnProperty,Fs="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",eu=function(s,h){var u={};for(var p in h)Ki.call(h,p)&&(u[p]=h[p]);return u[Fs]=s,u},L1=function(s){var h=s.cache,u=s.serialized,p=s.isStringTag;return xh(h,u,p),_1(function(){return w1(h,u,p)}),null},U1=R1(function(o,s,h){var u=o.css;typeof u=="string"&&s.registered[u]!==void 0&&(u=s.registered[u]);var p=o[Fs],m=[u],D="";typeof o.className=="string"?D=C1(s.registered,m,o.className):o.className!=null&&(D=o.className+" ");var _=Ch(m,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 p=="string"}),w.createElement(p,O))}),tu=U1,vt=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 te=T.length;T.push(B);e:for(;0<te;){var De=te-1>>>1,Ne=T[De];if(0<p(Ne,B))T[De]=B,T[te]=Ne,te=De;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],te=T.pop();if(te!==B){T[0]=te;e:for(var De=0,Ne=T.length,y=Ne>>>1;De<y;){var k=2*(De+1)-1,G=T[k],W=k+1,V=T[W];if(0>p(G,te))W<Ne&&0>p(V,G)?(T[De]=V,T[W]=te,De=W):(T[De]=G,T[k]=te,De=k);else if(W<Ne&&0>p(V,te))T[De]=V,T[W]=te,De=W;else break e}}return B}function p(T,B){var te=T.sortIndex-B.sortIndex;return te!==0?te:T.id-B.id}if(o.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;o.unstable_now=function(){return m.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,Y=!1,Ce=!1,ee=typeof setTimeout=="function"?setTimeout:null,me=typeof clearTimeout=="function"?clearTimeout:null,ie=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 q(T){if(Y=!1,ue(T),!L)if(h(O)!==null)L=!0,J||(J=!0,Le());else{var B=h(S);B!==null&&Ve(q,B.startTime-T)}}var J=!1,U=-1,be=5,ge=-1;function Ee(){return Ce?!0:!(o.unstable_now()-ge<be)}function Re(){if(Ce=!1,J){var T=o.unstable_now();ge=T;var B=!0;try{e:{L=!1,Y&&(Y=!1,me(U),U=-1),oe=!0;var te=K;try{t:{for(ue(T),H=h(O);H!==null&&!(H.expirationTime>T&&Ee());){var De=H.callback;if(typeof De=="function"){H.callback=null,K=H.priorityLevel;var Ne=De(H.expirationTime<=T);if(T=o.unstable_now(),typeof Ne=="function"){H.callback=Ne,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&&Ve(q,y.startTime-T),B=!1}}break e}finally{H=null,K=te,oe=!1}B=void 0}}finally{B?Le():J=!1}}}var Le;if(typeof ie=="function")Le=function(){ie(Re)};else if(typeof MessageChannel<"u"){var ot=new MessageChannel,Xe=ot.port2;ot.port1.onmessage=Re,Le=function(){Xe.postMessage(null)}}else Le=function(){ee(Re,0)};function Ve(T,B){U=ee(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 te=K;K=B;try{return T()}finally{K=te}},o.unstable_requestPaint=function(){Ce=!0},o.unstable_runWithPriority=function(T,B){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var te=K;K=T;try{return B()}finally{K=te}},o.unstable_scheduleCallback=function(T,B,te){var De=o.unstable_now();switch(typeof te=="object"&&te!==null?(te=te.delay,te=typeof te=="number"&&0<te?De+te:De):te=De,T){case 1:var Ne=-1;break;case 2:Ne=250;break;case 5:Ne=1073741823;break;case 4:Ne=1e4;break;default:Ne=5e3}return Ne=te+Ne,T={id:X++,callback:B,priorityLevel:T,startTime:te,expirationTime:Ne,sortIndex:-1},te>De?(T.sortIndex=te,s(S,T),h(O)===null&&T===h(S)&&(Y?(me(U),U=-1):Y=!0,Ve(q,te-De))):(T.sortIndex=Ne,s(O,T),L||oe||(L=!0,J||(J=!0,Le()))),T},o.unstable_shouldYield=Ee,o.unstable_wrapCallback=function(T){var B=K;return function(){var te=K;K=B;try{return T.apply(this,arguments)}finally{K=te}}}})(Vs)),Vs}var lh;function H1(){return lh||(lh=1,Gs.exports=N1()),Gs.exports}var Xs={exports:{}},Yt={};var ah;function B1(){if(ah)return Yt;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},p=Symbol.for("react.portal");function m(O,S,X){var H=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:p,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 Yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Yt.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 m(O,S,null,X)},Yt.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()}},Yt.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))},Yt.prefetchDNS=function(O){typeof O=="string"&&u.d.D(O)},Yt.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})}},Yt.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)},Yt.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})}},Yt.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)},Yt.requestFormReset=function(O){u.d.r(O)},Yt.unstable_batchedUpdates=function(O,S){return O(S)},Yt.useFormState=function(O,S,X){return D.H.useFormState(O,S,X)},Yt.useFormStatus=function(){return D.H.useHostTransitionStatus()},Yt.version="19.2.4",Yt}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 p(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(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(m(e)!==e)throw Error(u(188))}function S(e){var t=e.alternate;if(!t){if(t=m(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"),Y=Symbol.for("react.fragment"),Ce=Symbol.for("react.strict_mode"),ee=Symbol.for("react.profiler"),me=Symbol.for("react.consumer"),ie=Symbol.for("react.context"),ue=Symbol.for("react.forward_ref"),q=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 Le(e){return e===null||typeof e!="object"?null:(e=Re&&e[Re]||e["@@iterator"],typeof e=="function"?e:null)}var ot=Symbol.for("react.client.reference");function Xe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ot?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Y:return"Fragment";case ee:return"Profiler";case Ce:return"StrictMode";case q:return"Suspense";case J:return"SuspenseList";case ge:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case L:return"Portal";case ie: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:Xe(e.type)||"Memo";case be:t=e._payload,e=e._init;try{return Xe(e(t))}catch{}}return null}var Ve=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,te={pending:!1,data:null,method:null,action:null},De=[],Ne=-1;function y(e){return{current:e}}function k(e){0>Ne||(e.current=De[Ne],De[Ne]=null,Ne--)}function G(e,t){Ne++,De[Ne]=e.current,e.current=t}var W=y(null),V=y(null),we=y(null),he=y(null);function at(e,t){switch(G(we,t),G(V,e),G(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),G(W,e)}function Qe(){k(W),k(V),k(we)}function Zt(e){e.memoizedState!==null&&G(he,e);var t=W.current,n=d0(t,e.type);t!==n&&(G(V,e),G(W,n))}function ne(e){V.current===e&&(k(W),k(V)),he.current===e&&(k(he),Li._currentValue=te)}var Ht,rt;function Me(e){if(Ht===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ht=t&&t[1]||"",rt=-1<n.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Ht+e+rt}var ut=!1;function Bt(e,t){if(!e||ut)return"";ut=!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{ut=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Me(n):""}function un(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 Bt(e.type,!1);case 11:return Bt(e.type.render,!1);case 1:return Bt(e.type,!0);case 31:return Me("Activity");default:return""}}function jn(e){try{var t="",n=null;do t+=un(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,ol=o.unstable_scheduleCallback,jt=o.unstable_cancelCallback,Ol=o.unstable_shouldYield,An=o.unstable_requestPaint,kt=o.unstable_now,Ka=o.unstable_getCurrentPriorityLevel,rl=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,Ll=null,Vt=null;function En(e){if(typeof wr=="function"&&zr(e),Vt&&typeof Vt.setStrictMode=="function")try{Vt.setStrictMode(Ll,e)}catch{}}var qt=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,Ul=262144,oa=4194304;function qn(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=qn(l):(r&=d,r!==0?a=qn(r):n||(n=d&~e,n!==0&&(a=qn(n))))):(d=l&~i,d!==0?a=qn(d):r!==0?a=qn(r):n||(n=l&~e,n!==0&&(a=qn(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 Nl(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 Cn(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-qt(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-qt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function wn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-qt(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:Dn(n),(n&(e.suspendedLanes|t))!==0?0:n}function Dn(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 kn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Yn(){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 Xt=Math.random().toString(36).slice(2),ft="__reactFiber$"+Xt,_t="__reactProps$"+Xt,cl="__reactContainer$"+Xt,Fa="__reactEvents$"+Xt,eo="__reactListeners$"+Xt,le="__reactHandles$"+Xt,Q="__reactResources$"+Xt,I="__reactMarker$"+Xt;function pe(e){delete e[ft],delete e[_t],delete e[Fa],delete e[eo],delete e[le]}function ye(e){var t=e[ft];if(t)return t;for(var n=e.parentNode;n;){if(t=n[cl]||n[ft]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=b0(e);e!==null;){if(n=e[ft])return n;e=b0(e)}return t}e=n,n=e.parentNode}return null}function re(e){if(e=e[ft]||e[cl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ke(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Te(e){var t=e[Q];return t||(t=e[Q]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Z(e){e[I]=!0}var P=new Set,Se={};function dt(e,t){At(e,t),At(e+"Capture",t)}function At(e,t){for(Se[e]=t,e=0;e<t.length;e++)P.add(t[e])}var Hl=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]*$"),pt={},fn={};function $a(e){return ta.call(fn,e)?!0:ta.call(pt,e)?!1:Hl.test(e)?fn[e]=!0:(pt[e]=!0,!1)}function Kt(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 Gn(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 dn(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 hn(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=""+dn(t)):e.value!==""+dn(t)&&(e.value=""+dn(t)):r!=="submit"&&r!=="reset"||e.removeAttribute("value"),t!=null?_r(e,r,dn(t)):n!=null?_r(e,r,dn(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=""+dn(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?""+dn(n):"",t=t!=null?""+dn(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=""+dn(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=""+dn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+dn(n):""}function ou(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(u(92));if(Ve(l)){if(1<l.length)throw Error(u(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=dn(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 Vn(){}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=re(e);if(t&&(e=t.stateNode)){var n=e[_t]||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="'+hn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var a=l[_t]||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[_t]||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 Xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Nr=!1;if(Xn)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 sl=null,Hr=null,lo=null;function fu(){if(lo)return lo;var e,t=Hr,n=t.length,l,a="value"in sl?sl.value:sl.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 Jt(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=Jt(Bl),Pa=H({},Bl,{view:0,detail:0}),Uh=Jt(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=Jt(ro),Nh=H({},ro,{dataTransfer:0}),Hh=Jt(Nh),Bh=H({},Pa,{relatedTarget:0}),qr=Jt(Bh),jh=H({},Bl,{animationName:0,elapsedTime:0,pseudoElement:0}),qh=Jt(jh),Yh=H({},Bl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Gh=Jt(Yh),Vh=H({},Bl,{data:0}),pu=Jt(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=Jt(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=Jt($h),Wh=H({},Pa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Yr}),Ih=Jt(Wh),Ph=H({},Bl,{propertyName:0,elapsedTime:0,pseudoElement:0}),ep=Jt(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=Jt(tp),lp=H({},Bl,{newState:0,oldState:0}),ap=Jt(lp),ip=[9,13,27,32],Gr=Xn&&"CompositionEvent"in window,ti=null;Xn&&"documentMode"in document&&(ti=document.documentMode);var op=Xn&&"TextEvent"in window&&!ti,gu=Xn&&(!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=sl=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=ke(e);if(lu(t))return e}function wu(e,t){if(e==="change")return t}var zu=!1;if(Xn){var Vr;if(Xn){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 tn=typeof Object.is=="function"?Object.is:mp;function ai(e,t){if(tn(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)||!tn(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=Xn&&"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={};Xn&&(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 zn(e,t){Bu.set(e,t),dt(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)},pn=[],ya=0,$r=0;function uo(){for(var e=ya,t=$r=ya=0;t<e;){var n=pn[t];pn[t++]=null;var l=pn[t];pn[t++]=null;var a=pn[t];pn[t++]=null;var i=pn[t];if(pn[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){pn[ya++]=e,pn[ya++]=t,pn[ya++]=n,pn[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-qt(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 nn(e,t,n,l){return new xp(e,t,n,l)}function Ir(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qn(e,t){var n=e.alternate;return n===null?(n=nn(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=nn(31,n,t,a),e.elementType=ge,e.lanes=i,e;case Y:return Gl(n.children,a,i,t);case Ce:r=8,a|=24;break;case ee:return e=nn(12,n,t,a|2),e.elementType=ee,e.lanes=i,e;case q:return e=nn(13,n,t,a),e.elementType=q,e.lanes=i,e;case J:return e=nn(19,n,t,a),e.elementType=J,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ie: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=nn(r,n,t,a),t.elementType=e,t.type=l,t.lanes=i,t}function Gl(e,t,n,l){return e=nn(7,e,l,t),e.lanes=n,e}function Pr(e,t,n){return e=nn(6,e,null,t),e.lanes=n,e}function Yu(e){var t=nn(18,null,null,0);return t.stateNode=e,t}function ec(e,t,n){return t=nn(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 mn(e,t){if(typeof e=="object"&&e!==null){var n=Gu.get(e);return n!==void 0?n:(t={value:e,source:t,stack:jn(t)},Gu.set(e,t),t)}return{value:e,source:t,stack:jn(t)}}var ba=[],xa=0,mo=null,oi=0,gn=[],yn=0,ul=null,_n=1,Rn="";function Zn(e,t){ba[xa++]=oi,ba[xa++]=mo,mo=e,oi=t}function Vu(e,t,n){gn[yn++]=_n,gn[yn++]=Rn,gn[yn++]=ul,ul=e;var l=_n;e=Rn;var a=32-qt(l)-1;l&=~(1<<a),n+=1;var i=32-qt(t)+a;if(30<i){var r=a-a%5;i=(l&(1<<r)-1).toString(32),l>>=r,a-=r,_n=1<<32-qt(t)+a|n<<a|l,Rn=i+e}else _n=1<<i|n<<a|l,Rn=e}function tc(e){e.return!==null&&(Zn(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===ul;)ul=gn[--yn],gn[yn]=null,Rn=gn[--yn],gn[yn]=null,_n=gn[--yn],gn[yn]=null}function Xu(e,t){gn[yn++]=_n,gn[yn++]=Rn,gn[yn++]=ul,_n=t.id,Rn=t.overflow,ul=e}var Rt=null,ct=null,Ge=!1,fl=null,vn=!1,lc=Error(u(519));function dl(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ri(mn(t,e)),lc}function Qu(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[ft]=e,t[_t]=l,n){case"dialog":je("cancel",t),je("close",t);break;case"iframe":case"object":case"embed":je("load",t);break;case"video":case"audio":for(n=0;n<Di.length;n++)je(Di[n],t);break;case"source":je("error",t);break;case"img":case"image":case"link":je("error",t),je("load",t);break;case"details":je("toggle",t);break;case"input":je("invalid",t),au(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":je("invalid",t);break;case"textarea":je("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&&(je("beforetoggle",t),je("toggle",t)),l.onScroll!=null&&je("scroll",t),l.onScrollEnd!=null&&je("scrollend",t),l.onClick!=null&&(t.onclick=Vn),t=!0):t=!1,t||dl(e,!0)}function Zu(e){for(Rt=e.return;Rt;)switch(Rt.tag){case 5:case 31:case 13:vn=!1;return;case 27:case 3:vn=!0;return;default:Rt=Rt.return}}function Sa(e){if(e!==Rt)return!1;if(!Ge)return Zu(e),Ge=!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&&ct&&dl(e),Zu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));ct=v0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));ct=v0(e)}else t===27?(t=ct,Tl(e.type)?(e=Ts,Ts=null,ct=e):ct=t):ct=Rt?xn(e.stateNode.nextSibling):null;return!0}function Vl(){ct=Rt=null,Ge=!1}function ac(){var e=fl;return e!==null&&(It===null?It=e:It.push.apply(It,e),fl=null),e}function ri(e){fl===null?fl=[e]:fl.push(e)}var ic=y(null),Xl=null,Kn=null;function hl(e,t,n){G(ic,t._currentValue),t._currentValue=n}function Jn(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;tn(a.pendingProps.value,r.value)||(e!==null?e.push(d):e=[d])}}else if(a===he.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(!tn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ql(e){Xl=e,Kn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ot(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},Kn===null){if(e===null)throw Error(u(308));Kn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Kn=Kn.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,St={$$typeof:ie,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=kt(),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:lt.pooledCache}function vo(e,t){t===null?G(Zl,Zl.current):G(Zl,t.pool)}function $u(){var e=uc();return e===null?null:{parent:St._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(Vn,Vn),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(Vn,Vn);else{if(e=lt,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=Qn(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===Y?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(Ve(v)||Le(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===ie)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(Ve(z)||Le(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===ie)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(Ve(N)||Le(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===ie)return E(C,v,z,yo(v,N),xe);Co(v,N)}return null}function ce(C,v,z,N){for(var xe=null,Ze=null,fe=v,He=v=0,Ye=null;fe!==null&&He<z.length;He++){fe.index>He?(Ye=fe,fe=null):Ye=fe.sibling;var Ke=A(C,fe,z[He],N);if(Ke===null){fe===null&&(fe=Ye);break}e&&fe&&Ke.alternate===null&&t(C,fe),v=i(Ke,v,He),Ze===null?xe=Ke:Ze.sibling=Ke,Ze=Ke,fe=Ye}if(He===z.length)return n(C,fe),Ge&&Zn(C,He),xe;if(fe===null){for(;He<z.length;He++)fe=j(C,z[He],N),fe!==null&&(v=i(fe,v,He),Ze===null?xe=fe:Ze.sibling=fe,Ze=fe);return Ge&&Zn(C,He),xe}for(fe=l(fe);He<z.length;He++)Ye=E(fe,C,He,z[He],N),Ye!==null&&(e&&Ye.alternate!==null&&fe.delete(Ye.key===null?He:Ye.key),v=i(Ye,v,He),Ze===null?xe=Ye:Ze.sibling=Ye,Ze=Ye);return e&&fe.forEach(function(_l){return t(C,_l)}),Ge&&Zn(C,He),xe}function ze(C,v,z,N){if(z==null)throw Error(u(151));for(var xe=null,Ze=null,fe=v,He=v=0,Ye=null,Ke=z.next();fe!==null&&!Ke.done;He++,Ke=z.next()){fe.index>He?(Ye=fe,fe=null):Ye=fe.sibling;var _l=A(C,fe,Ke.value,N);if(_l===null){fe===null&&(fe=Ye);break}e&&fe&&_l.alternate===null&&t(C,fe),v=i(_l,v,He),Ze===null?xe=_l:Ze.sibling=_l,Ze=_l,fe=Ye}if(Ke.done)return n(C,fe),Ge&&Zn(C,He),xe;if(fe===null){for(;!Ke.done;He++,Ke=z.next())Ke=j(C,Ke.value,N),Ke!==null&&(v=i(Ke,v,He),Ze===null?xe=Ke:Ze.sibling=Ke,Ze=Ke);return Ge&&Zn(C,He),xe}for(fe=l(fe);!Ke.done;He++,Ke=z.next())Ke=E(fe,C,He,Ke.value,N),Ke!==null&&(e&&Ke.alternate!==null&&fe.delete(Ke.key===null?He:Ke.key),v=i(Ke,v,He),Ze===null?xe=Ke:Ze.sibling=Ke,Ze=Ke);return e&&fe.forEach(function(Nm){return t(C,Nm)}),Ge&&Zn(C,He),xe}function nt(C,v,z,N){if(typeof z=="object"&&z!==null&&z.type===Y&&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===Y){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===Y?(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),nt(C,v,z,N)}if(Ve(z))return ce(C,v,z,N);if(Le(z)){if(xe=Le(z),typeof xe!="function")throw Error(u(150));return z=xe.call(z),ze(C,v,z,N)}if(typeof z.then=="function")return nt(C,v,So(z),N);if(z.$$typeof===ie)return nt(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=nt(C,v,z,N);return Ta=null,xe}catch(fe){if(fe===Ma||fe===bo)throw fe;var Ze=nn(29,fe,null,C.mode);return Ze.lanes=N,Ze.return=C,Ze}}}var Fl=tf(!0),nf=tf(!1),pl=!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 ml(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function gl(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Je&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,wn(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;pl=!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?(qe&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 nt=n;switch(ze.tag){case 1:if(ce=ze.payload,typeof ce=="function"){j=ce.call(nt,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(nt,j,A):ce,A==null)break e;j=H({},j,A);break e;case 2:pl=!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),Sl|=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=ll,G(wo,e),G(Aa,t),ll=e|t.baseLanes}function gc(){G(wo,ll),G(Aa,Aa.current)}function yc(){ll=wo.current,k(Aa),k(wo)}var ln=y(null),bn=null;function yl(e){var t=e.alternate;G(bt,bt.current&1),G(ln,e),bn===null&&(t===null||Aa.current!==null||t.memoizedState!==null)&&(bn=e)}function vc(e){G(bt,bt.current),G(ln,e),bn===null&&(bn=e)}function rf(e){e.tag===22?(G(bt,bt.current),G(ln,e),bn===null&&(bn=e)):vl()}function vl(){G(bt,bt.current),G(ln,ln.current)}function an(e){k(ln),bn===e&&(bn=null),k(bt)}var bt=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 Fn=0,Ue=null,et=null,Ct=null,Mo=!1,Ea=!1,$l=!1,To=0,mi=0,Da=null,Tp=0;function mt(){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(!tn(e[n],t[n]))return!1;return!0}function xc(e,t,n,l,a,i){return Fn=i,Ue=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=et!==null&&et.next!==null;if(Fn=0,Ct=et=Ue=null,Mo=!1,mi=0,Da=null,t)throw Error(u(300));e===null||wt||(e=e.dependencies,e!==null&&go(e)&&(wt=!0))}function sf(e,t,n,l){Ue=e;var a=0;do{if(Ea&&(Da=null),mi=0,Ea=!1,25<=a)throw Error(u(301));if(a+=1,Ct=et=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],(et!==null?et.memoizedState:null)!==e&&(Ue.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}Fn=0,Ct=et=Ue=null,Ea=!1,mi=To=0,Da=null}function Qt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?Ue.memoizedState=Ct=e:Ct=Ct.next=e,Ct}function xt(){if(et===null){var e=Ue.alternate;e=e!==null?e.memoizedState:null}else e=et.next;var t=Ct===null?Ue.memoizedState:Ct.next;if(t!==null)Ct=t,et=e;else{if(e===null)throw Ue.alternate===null?Error(u(467)):Error(u(310));et=e,e={memoizedState:et.memoizedState,baseState:et.baseState,baseQueue:et.baseQueue,queue:et.queue,next:null},Ct===null?Ue.memoizedState=Ct=e:Ct=Ct.next=e}return Ct}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=Ue,(Ct===null?t.memoizedState:Ct.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===ie)return Ot(e)}throw Error(u(438,String(e)))}function zc(e){var t=null,n=Ue.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=Ue.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(),Ue.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 $n(e,t){return typeof t=="function"?t(e):t}function Do(e){var t=xt();return Mc(t,et,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?(qe&j)===j:(Fn&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((Fn&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,Ue.lanes|=A,Sl|=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,Ue.lanes|=j,Sl|=j;M=M.next}while(M!==null&&M!==t);if(g===null?r=i:g.next=d,!tn(i,e.memoizedState)&&(wt=!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=xt(),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);tn(i,t.memoizedState)||(wt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,l]}function uf(e,t,n){var l=Ue,a=xt(),i=Ge;if(i){if(n===void 0)throw Error(u(407));n=n()}else n=t();var r=!tn((et||a).memoizedState,n);if(r&&(a.memoizedState=n,wt=!0),a=a.queue,Dc(hf.bind(null,l,a,e),[e]),a.getSnapshot!==t||r||Ct!==null&&Ct.memoizedState.tag&1){if(l.flags|=2048,ka(9,{destroy:void 0},df.bind(null,l,a,n,t),null),lt===null)throw Error(u(349));i||(Fn&127)!==0||ff(l,t,n)}return n}function ff(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ue.updateQueue,t===null?(t=Ao(),Ue.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!tn(e,n)}catch{return!0}}function mf(e){var t=Yl(e,2);t!==null&&Pt(t,e,2)}function Ac(e){var t=Qt();if(typeof e=="function"){var n=e;if(e=n(),$l){En(!0);try{n()}finally{En(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:e},t}function gf(e,t,n,l){return e.baseState=n,Mc(e,et,typeof l=="function"?l:$n)}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(Ge){var n=lt.formState;if(n!==null){e:{var l=Ue;if(Ge){if(ct){t:{for(var a=ct,i=vn;a.nodeType!==8;){if(!i){a=null;break t}if(a=xn(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){ct=xn(a.nextSibling),l=a.data==="F!";break e}}dl(l)}l=!1}l&&(t=n[0])}}return n=Qt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sf,lastRenderedState:t},n.queue=l,n=Yf.bind(null,Ue,l),l.dispatch=n,l=Ac(!1),i=Lc.bind(null,Ue,!1,l.queue),l=Qt(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=Ep.bind(null,Ue,a,i,n),a.dispatch=n,l.memoizedState=e,[t,n,!1]}function wf(e){var t=xt();return zf(t,et,e)}function zf(e,t,n){if(t=Mc(e,t,Sf)[0],e=Do($n)[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=xt();var a=t.queue,i=a.dispatch;return n!==t.memoizedState&&(Ue.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=xt(),n=et;if(n!==null)return zf(t,n,e);xt(),t=t.memoizedState,n=xt();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=Ue.updateQueue,t===null&&(t=Ao(),Ue.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 xt().memoizedState}function ko(e,t,n,l){var a=Qt();Ue.flags|=e,a.memoizedState=ka(1|t,{destroy:void 0},n,l===void 0?null:l)}function _o(e,t,n,l){var a=xt();l=l===void 0?null:l;var i=a.memoizedState.inst;et!==null&&l!==null&&bc(l,et.memoizedState.deps)?a.memoizedState=ka(t,i,n,l):(Ue.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){Ue.flags|=4;var t=Ue.updateQueue;if(t===null)t=Ao(),Ue.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Ef(e){var t=xt().memoizedState;return kp({ref:t,nextImpl:e}),function(){if((Je&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=xt();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=xt();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&bc(t,l[1]))return l[0];if(l=e(),$l){En(!0);try{e()}finally{En(!1)}}return n.memoizedState=[l,t],l}function _c(e,t,n){return n===void 0||(Fn&1073741824)!==0&&(qe&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Ud(),Ue.lanes|=e,Sl|=e,n)}function Uf(e,t,n,l){return tn(n,t)?n:Aa.current!==null?(e=_c(e,n,l),tn(e,t)||(wt=!0),e):(Fn&42)===0||(Fn&1073741824)!==0&&(qe&261930)===0?(wt=!0,e.memoizedState=n):(e=Ud(),Ue.lanes|=e,Sl|=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,cn(e))}else yi(e,t,l,cn(e))}catch(j){yi(e,t,{then:function(){},status:"rejected",reason:j},cn())}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,te,n===null?_p:function(){return Bf(e),n(l)})}function Hf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,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,{},cn())}function Oc(){return Ot(Li)}function jf(){return xt().memoizedState}function qf(){return xt().memoizedState}function Rp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=cn();e=ml(n);var l=gl(t,e,n);l!==null&&(Pt(l,t,n),di(l,t,n)),t={cache:cc()},e.payload=t;return}t=t.return}}function Op(e,t,n){var l=cn();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&&(Pt(n,e,l),Vf(n,t,l)))}function Yf(e,t,n){var l=cn();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,tn(d,r))return fo(e,t,a,0),lt===null&&uo(),!1}catch{}if(n=Wr(e,t,a,l),n!==null)return Pt(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&&Pt(t,e,2)}function Ro(e){var t=e.alternate;return e===Ue||t!==null&&t===Ue}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,wn(e,n)}}var vi={readContext:Ot,use:Eo,useCallback:mt,useContext:mt,useEffect:mt,useImperativeHandle:mt,useLayoutEffect:mt,useInsertionEffect:mt,useMemo:mt,useReducer:mt,useRef:mt,useState:mt,useDebugValue:mt,useDeferredValue:mt,useTransition:mt,useSyncExternalStore:mt,useId:mt,useHostTransitionStatus:mt,useFormState:mt,useActionState:mt,useOptimistic:mt,useMemoCache:mt,useCacheRefresh:mt};vi.useEffectEvent=mt;var Xf={readContext:Ot,use:Eo,useCallback:function(e,t){return Qt().memoizedState=[e,t===void 0?null:t],e},useContext:Ot,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=Qt();t=t===void 0?null:t;var l=e();if($l){En(!0);try{e()}finally{En(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Qt();if(n!==void 0){var a=n(t);if($l){En(!0);try{n(t)}finally{En(!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,Ue,e),[l.memoizedState,e]},useRef:function(e){var t=Qt();return e={current:e},t.memoizedState=e},useState:function(e){e=Ac(e);var t=e.queue,n=Yf.bind(null,Ue,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:kc,useDeferredValue:function(e,t){var n=Qt();return _c(n,e,t)},useTransition:function(){var e=Ac(!1);return e=Nf.bind(null,Ue,e.queue,!0,!1),Qt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=Ue,a=Qt();if(Ge){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),lt===null)throw Error(u(349));(qe&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=Qt(),t=lt.identifierPrefix;if(Ge){var n=Rn,l=_n;n=(l&~(1<<32-qt(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=Qt();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,Ue,!0,n),n.dispatch=t,[e,t]},useMemoCache:zc,useCacheRefresh:function(){return Qt().memoizedState=Rp.bind(null,Ue)},useEffectEvent:function(e){var t=Qt(),n={impl:e};return t.memoizedState=n,function(){if((Je&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}},Uc={readContext:Ot,use:Eo,useCallback:Of,useContext:Ot,useEffect:Dc,useImperativeHandle:Rf,useInsertionEffect:Df,useLayoutEffect:kf,useMemo:Lf,useReducer:Do,useRef:Tf,useState:function(){return Do($n)},useDebugValue:kc,useDeferredValue:function(e,t){var n=xt();return Uf(n,et.memoizedState,e,t)},useTransition:function(){var e=Do($n)[0],t=xt().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=xt();return gf(n,et,e,t)},useMemoCache:zc,useCacheRefresh:qf};Uc.useEffectEvent=Ef;var Qf={readContext:Ot,use:Eo,useCallback:Of,useContext:Ot,useEffect:Dc,useImperativeHandle:Rf,useInsertionEffect:Df,useLayoutEffect:kf,useMemo:Lf,useReducer:Tc,useRef:Tf,useState:function(){return Tc($n)},useDebugValue:kc,useDeferredValue:function(e,t){var n=xt();return et===null?_c(n,e,t):Uf(n,et.memoizedState,e,t)},useTransition:function(){var e=Tc($n)[0],t=xt().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=xt();return et!==null?gf(n,et,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=cn(),a=ml(l);a.payload=t,n!=null&&(a.callback=n),t=gl(e,a,l),t!==null&&(Pt(t,e,l),di(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=cn(),a=ml(l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=gl(e,a,l),t!==null&&(Pt(t,e,l),di(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=cn(),l=ml(n);l.tag=2,t!=null&&(l.callback=t),t=gl(e,l,n),t!==null&&(Pt(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=ml(n),n.tag=3,n.payload={element:null},n.callback=function(){Oo(e,t)},n}function If(e){return e=ml(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"&&(Cl===null?Cl=new Set([this]):Cl.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=ln.current,n!==null){switch(n.tag){case 31:case 13:return bn===null?Qo():n.alternate===null&&gt===0&&(gt=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(Ge)return t=ln.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(mn(e,n)))):(l!==lc&&(t=Error(u(423),{cause:l}),ri(mn(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=mn(l,n),a=Bc(e.stateNode,l,a),pc(e,a),gt!==4&&(gt=2)),!1;var i=Error(u(520),{cause:l});if(i=mn(i,n),Ti===null?Ti=[i]:Ti.push(i),gt!==4&&(gt=2),t===null)return!0;l=mn(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"&&(Cl===null||!Cl.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)),wt=!1;function Lt(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&&!wt?(Cc(e,t,a),Wn(e,t,a)):(Ge&&d&&tc(t),t.flags|=1,Lt(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 Wn(e,t,a)}return t.flags|=1,e=Qn(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(wt=!1,t.pendingProps=l=i,Kc(e,a))(e.flags&131072)!==0&&(wt=!0);else return t.lanes=e.lanes,Wn(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),vl(),t.memoizedState=null):(e!==null&&vo(t,null),gc(),vl());return Lt(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:St._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,an(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(Ge){if(l.mode==="hidden")return e=Lo(t,l),t.lanes=536870912,bi(null,e);if(vc(t),(e=ct)?(e=y0(e,vn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ul!==null?{id:_n,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},n=Yu(e),n.return=t,t.child=n,Rt=t,ct=null)):e=null,e===null)throw dl(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(wt||Ca(e,t,n,!1),a=(n&e.childLanes)!==0,wt||a){if(l=lt,l!==null&&(r=Pi(l,n),r!==0&&r!==i.retryLane))throw i.retryLane=r,Yl(e,r),Pt(l,e,r),jc;Qo(),t=id(e,t,n)}else e=i.treeContext,ct=xn(r.nextSibling),Rt=t,Ge=!0,fl=null,vn=!1,e!==null&&Xu(t,e),t=Lo(t,l),t.flags|=4096;return t}return e=Qn(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&&!wt?(Cc(e,t,a),Wn(e,t,a)):(Ge&&l&&tc(t),t.flags|=1,Lt(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&&!wt?(Cc(e,t,i),Wn(e,t,i)):(Ge&&l&&tc(t),t.flags|=1,Lt(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=Ot(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?Ot(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=Ot(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),pl=!1;var A=t.memoizedState;i.state=A,pi(t,l,i,a),hi(),M=t.memoizedState,d||A!==M||pl?(typeof j=="function"&&(Nc(t,n,j,l),M=t.memoizedState),(g=pl||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=Ot(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),pl=!1,A=t.memoizedState,i.state=A,pi(t,l,i,a),hi();var E=t.memoizedState;r!==j||A!==E||pl||e!==null&&e.dependencies!==null&&go(e.dependencies)?(typeof d=="function"&&(Nc(t,n,d,l),E=t.memoizedState),(R=pl||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)):Lt(e,t,n,a),t.memoizedState=i.state,e=t.child):e=Wn(e,t,a),e}function cd(e,t,n,l){return Vl(),t.flags|=256,Lt(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|=rn),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:(bt.current&2)!==0),r&&(a=!0,t.flags&=-129),r=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ge){if(a?yl(t):vl(),(e=ct)?(e=y0(e,vn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ul!==null?{id:_n,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},n=Yu(e),n.return=t,t.child=n,Rt=t,ct=null)):e=null,e===null)throw dl(t);return Ms(e)?t.lanes=32:t.lanes=536870912,null}var d=l.children;return l=l.fallback,a?(vl(),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)):(yl(t),Xc(t,d))}var g=e.memoizedState;if(g!==null&&(d=g.dehydrated,d!==null)){if(i)t.flags&256?(yl(t),t.flags&=-257,t=Qc(e,t,n)):t.memoizedState!==null?(vl(),t.child=e.child,t.flags|=128,t=null):(vl(),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(yl(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(wt||Ca(e,t,n,!1),r=(n&e.childLanes)!==0,wt||r){if(r=lt,r!==null&&(l=Pi(r,n),l!==0&&l!==g.retryLane))throw g.retryLane=l,Yl(e,l),Pt(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,ct=xn(d.nextSibling),Rt=t,Ge=!0,fl=null,vn=!1,e!==null&&Xu(t,e),t=Xc(t,l.children),t.flags|=4096);return t}return a?(vl(),d=l.fallback,a=t.mode,g=e.child,M=g.sibling,l=Qn(g,{mode:"hidden",children:l.children}),l.subtreeFlags=g.subtreeFlags&65011712,M!==null?d=Qn(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=St._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)):(yl(t),n=e.child,e=n.sibling,n=Qn(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=nn(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=bt.current,d=(r&2)!==0;if(d?(r=r&1|2,t.flags|=128):r&=1,G(bt,r),Lt(e,t,l,n),l=Ge?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 Wn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Sl|=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=Qn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qn(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:at(t,t.stateNode.containerInfo),hl(t,St,e.memoizedState.cache),Vl();break;case 27:case 5:Zt(t);break;case 4:at(t,t.stateNode.containerInfo);break;case 10:hl(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?(yl(t),t.flags|=128,null):(n&t.child.childLanes)!==0?sd(e,t,n):(yl(t),e=Wn(e,t,n),e!==null?e.sibling:null);yl(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),G(bt,bt.current),l)break;return null;case 22:return t.lanes=0,ld(e,t,n,t.pendingProps);case 24:hl(t,St,e.memoizedState.cache)}return Wn(e,t,n)}function dd(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)wt=!0;else{if(!Kc(e,n)&&(t.flags&128)===0)return wt=!1,Np(e,t,n);wt=(e.flags&131072)!==0}else wt=!1,Ge&&(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=Xe(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(at(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,hl(t,St,l),l!==i.cache&&rc(t,[St],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=mn(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,ct=xn(e.firstChild),Rt=t,Ge=!0,fl=null,vn=!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=Wn(e,t,n);break e}Lt(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:Ge||(n=t.type,e=t.pendingProps,l=Io(we.current).createElement(n),l[ft]=t,l[_t]=e,Ut(l,n,e),Z(l),t.stateNode=l):t.memoizedState=w0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Zt(t),e===null&&Ge&&(l=t.stateNode=x0(t.type,t.pendingProps,we.current),Rt=t,vn=!0,a=ct,Tl(t.type)?(Ts=a,ct=xn(l.firstChild)):ct=a),Lt(e,t,t.pendingProps.children,n),Uo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ge&&((a=l=ct)&&(l=dm(l,t.type,t.pendingProps,vn),l!==null?(t.stateNode=l,Rt=t,ct=xn(l.firstChild),vn=!1,a=!0):a=!1),a||dl(t)),Zt(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),Lt(e,t,l,n),t.child;case 6:return e===null&&Ge&&((e=n=ct)&&(n=hm(n,t.pendingProps,vn),n!==null?(t.stateNode=n,Rt=t,ct=null,e=!0):e=!1),e||dl(t)),null;case 13:return sd(e,t,n);case 4:return at(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Fl(t,null,l,n):Lt(e,t,l,n),t.child;case 11:return ed(e,t,t.type,t.pendingProps,n);case 7:return Lt(e,t,t.pendingProps,n),t.child;case 8:return Lt(e,t,t.pendingProps.children,n),t.child;case 12:return Lt(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,hl(t,t.type,l.value),Lt(e,t,l.children,n),t.child;case 9:return a=t.type._context,l=t.pendingProps.children,Ql(t),a=Ot(a),l=l(a),t.flags|=1,Lt(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=Ot(St),e===null?(a=uc(),a===null&&(a=lt,i=cc(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=n),a=i),t.memoizedState={parent:l,cache:a},dc(t),hl(t,St,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),hl(t,St,l)):(l=i.cache,hl(t,St,l),l!==a.cache&&rc(t,[St],n,!0))),Lt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function In(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(!Ge)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 st(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 st(t),null;case 1:return st(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Jn(St),Qe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Sa(t)?In(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ac())),st(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(In(t),i!==null?(st(t),hd(t,i)):(st(t),Jc(t,a,null,l,n))):i?i!==e.memoizedState?(In(t),st(t),hd(t,i)):(st(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&In(t),st(t),Jc(t,a,e,l,n)),null;case 27:if(ne(t),n=we.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&In(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return st(t),null}e=W.current,Sa(t)?Qu(t):(e=x0(a,l,n),t.stateNode=e,In(t))}return st(t),null;case 5:if(ne(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&In(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return st(t),null}if(i=W.current,Sa(t))Qu(t);else{var r=Io(we.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[ft]=t,i[_t]=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(Ut(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&&In(t)}}return st(t),Jc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&In(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=we.current,Sa(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=Rt,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[ft]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||s0(e.nodeValue,n)),e||dl(t,!0)}else e=Io(e).createTextNode(l),e[ft]=t,t.stateNode=e}return st(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[ft]=t}else Vl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),e=!1}else n=ac(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(an(t),t):(an(t),null);if((t.flags&128)!==0)throw Error(u(558))}return st(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[ft]=t}else Vl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;st(t),a=!1}else a=ac(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(an(t),t):(an(t),null)}return an(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),st(t),null);case 4:return Qe(),e===null&&gs(t.stateNode.containerInfo),st(t),null;case 10:return Jn(t.type),st(t),null;case 19:if(k(bt),l=t.memoizedState,l===null)return st(t),null;if(a=(t.flags&128)!==0,i=l.rendering,i===null)if(a)xi(l,!1);else{if(gt!==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 G(bt,bt.current&1|2),Ge&&Zn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&kt()>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&&!Ge)return st(t),null}else 2*kt()-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=kt(),e.sibling=null,n=bt.current,G(bt,a?n&1|2:n&1),Ge&&Zn(t,l.treeForkCount),e):(st(t),null);case 22:case 23:return an(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&&(st(t),t.subtreeFlags&6&&(t.flags|=8192)):st(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),Jn(St),st(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 Jn(St),Qe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ne(t),null;case 31:if(t.memoizedState!==null){if(an(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(an(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(bt),null;case 4:return Qe(),null;case 10:return Jn(t.type),null;case 22:case 23:return an(t),yc(),e!==null&&k(Zl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jn(St),null;case 25:return null;default:return null}}function pd(e,t){switch(nc(t),t.tag){case 3:Jn(St),Qe();break;case 26:case 27:case 5:ne(t);break;case 4:Qe();break;case 31:t.memoizedState!==null&&an(t);break;case 13:an(t);break;case 19:k(bt);break;case 10:Jn(t.type);break;case 22:case 23:an(t),yc(),e!==null&&k(Zl);break;case 24:Jn(St)}}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){Pe(t,t.return,d)}}function bl(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){Pe(a,g,R)}}}l=l.next}while(l!==i)}}catch(R){Pe(t,t.return,R)}}function md(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{af(t,n)}catch(l){Pe(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){Pe(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){Pe(e,t,a)}}function On(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){Pe(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){Pe(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){Pe(e,e.return,a)}}function Fc(e,t,n){try{var l=e.stateNode;om(l,e.type,n,t),l[_t]=t}catch(a){Pe(e,e.return,a)}}function vd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Tl(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&&Tl(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=Vn));else if(l!==4&&(l===27&&Tl(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&&Tl(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]);Ut(t,l,n),t[ft]=e,t[_t]=n}catch(i){Pe(e,e.return,i)}}var Pn=!1,zt=!1,Ic=!1,xd=typeof WeakSet=="function"?WeakSet:Set,Et=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,Et=t;Et!==null;)if(t=Et,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Et=e;else for(;Et!==null;){switch(t=Et,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){Pe(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,Et=e;break}Et=t.return}}function Sd(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:tl(e,n),l&4&&Si(5,n);break;case 1:if(tl(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(r){Pe(n,n.return,r)}else{var a=Wl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(r){Pe(n,n.return,r)}}l&64&&md(n),l&512&&Ci(n,n.return);break;case 3:if(tl(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){Pe(n,n.return,r)}}break;case 27:t===null&&l&4&&bd(n);case 26:case 5:tl(e,n),t===null&&l&4&&yd(n),l&512&&Ci(n,n.return);break;case 12:tl(e,n);break;case 31:tl(e,n),l&4&&zd(e,n);break;case 13:tl(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||Pn,!l){t=t!==null&&t.memoizedState!==null||zt,a=Pn;var i=zt;Pn=l,(zt=t)&&!i?nl(e,n,(n.subtreeFlags&8772)!==0):tl(e,n),Pn=a,zt=i}break;case 30:break;default:tl(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&&pe(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 ht=null,Ft=!1;function el(e,t,n){for(n=n.child;n!==null;)wd(e,t,n),n=n.sibling}function wd(e,t,n){if(Vt&&typeof Vt.onCommitFiberUnmount=="function")try{Vt.onCommitFiberUnmount(Ll,n)}catch{}switch(n.tag){case 26:zt||On(n,t),el(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:zt||On(n,t);var l=ht,a=Ft;Tl(n.type)&&(ht=n.stateNode,Ft=!1),el(e,t,n),_i(n.stateNode),ht=l,Ft=a;break;case 5:zt||On(n,t);case 6:if(l=ht,a=Ft,ht=null,el(e,t,n),ht=l,Ft=a,ht!==null)if(Ft)try{(ht.nodeType===9?ht.body:ht.nodeName==="HTML"?ht.ownerDocument.body:ht).removeChild(n.stateNode)}catch(i){Pe(n,t,i)}else try{ht.removeChild(n.stateNode)}catch(i){Pe(n,t,i)}break;case 18:ht!==null&&(Ft?(e=ht,m0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Ga(e)):m0(ht,n.stateNode));break;case 4:l=ht,a=Ft,ht=n.stateNode.containerInfo,Ft=!0,el(e,t,n),ht=l,Ft=a;break;case 0:case 11:case 14:case 15:bl(2,n,t),zt||bl(4,n,t),el(e,t,n);break;case 1:zt||(On(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&gd(n,t,l)),el(e,t,n);break;case 21:el(e,t,n);break;case 22:zt=(l=zt)||n.memoizedState!==null,el(e,t,n),zt=l;break;default:el(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){Pe(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){Pe(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 $t(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(Tl(d.type)){ht=d.stateNode,Ft=!1;break e}break;case 5:ht=d.stateNode,Ft=!1;break e;case 3:case 4:ht=d.stateNode.containerInfo,Ft=!0;break e}d=d.return}if(ht===null)throw Error(u(160));wd(i,r,a),ht=null,Ft=!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 Mn=null;function Td(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:$t(t,e),Wt(e),l&4&&(bl(3,e,e.return),Si(3,e),bl(5,e,e.return));break;case 1:$t(t,e),Wt(e),l&512&&(zt||n===null||On(n,n.return)),l&64&&Pn&&(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=Mn;if($t(t,e),Wt(e),l&512&&(zt||n===null||On(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[ft]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(l),a.head.insertBefore(i,a.querySelector("head > title"))),Ut(i,l,n),i[ft]=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),Ut(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),Ut(i,l,n),a.head.appendChild(i);break;default:throw Error(u(468,l))}i[ft]=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:$t(t,e),Wt(e),l&512&&(zt||n===null||On(n,n.return)),n!==null&&l&4&&Fc(e,e.memoizedProps,n.memoizedProps);break;case 5:if($t(t,e),Wt(e),l&512&&(zt||n===null||On(n,n.return)),e.flags&32){a=e.stateNode;try{fa(a,"")}catch(ce){Pe(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($t(t,e),Wt(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(ce){Pe(e,e.return,ce)}}break;case 3:if(tr=null,a=Mn,Mn=Po(t.containerInfo),$t(t,e),Mn=a,Wt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Ga(t.containerInfo)}catch(ce){Pe(e,e.return,ce)}Ic&&(Ic=!1,Ad(e));break;case 4:l=Mn,Mn=Po(e.stateNode.containerInfo),$t(t,e),Wt(e),Mn=l;break;case 12:$t(t,e),Wt(e);break;case 31:$t(t,e),Wt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,jo(e,l)));break;case 13:$t(t,e),Wt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Yo=kt()),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=Pn,R=zt;if(Pn=M||a,zt=R||g,$t(t,e),zt=R,Pn=M,Wt(e),l&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||g||Pn||zt||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){Pe(g,g.return,ce)}}}else if(t.tag===6){if(n===null){g=t;try{g.stateNode.nodeValue=a?"":g.memoizedProps}catch(ce){Pe(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){Pe(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:$t(t,e),Wt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,jo(e,l)));break;case 30:break;case 21:break;default:$t(t,e),Wt(e)}}function Wt(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){Pe(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 tl(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:bl(4,t,t.return),Il(t);break;case 1:On(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:On(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 nl(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:nl(a,i,n),Si(4,i);break;case 1:if(nl(a,i,n),l=i,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(M){Pe(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){Pe(l,l.return,M)}}n&&r&64&&md(i),Ci(i,i.return);break;case 27:bd(i);case 26:case 5:nl(a,i,n),n&&l===null&&r&4&&yd(i),Ci(i,i.return);break;case 12:nl(a,i,n);break;case 31:nl(a,i,n),n&&r&4&&zd(a,i);break;case 13:nl(a,i,n),n&&r&4&&Md(a,i);break;case 22:i.memoizedState===null&&nl(a,i,n),Ci(i,i.return);break;case 30:break;default:nl(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 Tn(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:Tn(e,t,n,l),a&2048&&Si(9,t);break;case 1:Tn(e,t,n,l);break;case 3:Tn(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){Tn(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){Pe(t,t.return,g)}}else Tn(e,t,n,l);break;case 31:Tn(e,t,n,l);break;case 13:Tn(e,t,n,l);break;case 23:break;case 22:i=t.stateNode,r=t.alternate,t.memoizedState!==null?i._visibility&2?Tn(e,t,n,l):wi(e,t):i._visibility&2?Tn(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:Tn(e,t,n,l),a&2048&&es(t.alternate,t);break;default:Tn(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,Mn,e.memoizedState,e.memoizedProps);break;case 5:Ra(e,t,n);break;case 3:case 4:var l=Mn;Mn=Po(e.stateNode.containerInfo),Ra(e,t,n),Mn=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];Et=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&&bl(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];Et=l,Rd(l,e)}kd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:bl(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(;Et!==null;){var n=Et;switch(n.tag){case 0:case 11:case 15:bl(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,Et=l;else e:for(n=e;Et!==null;){l=Et;var a=l.sibling,i=l.return;if(Cd(l),l===n){Et=null;break e}if(a!==null){a.return=i,Et=a;break e}Et=i}}}var Yp={getCacheForType:function(e){var t=Ot(St),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ot(St).controller.signal}},Gp=typeof WeakMap=="function"?WeakMap:Map,Je=0,lt=null,Be=null,qe=0,Ie=0,on=null,xl=!1,Oa=!1,ts=!1,ll=0,gt=0,Sl=0,Pl=0,ns=0,rn=0,La=0,Ti=null,It=null,ls=!1,Yo=0,Od=0,Go=1/0,Vo=null,Cl=null,Tt=0,wl=null,Ua=null,al=0,as=0,is=null,Ld=null,Ai=0,os=null;function cn(){return(Je&2)!==0&&qe!==0?qe&-qe:T.T!==null?ds():Yn()}function Ud(){if(rn===0)if((qe&536870912)===0||Ge){var e=Ul;Ul<<=1,(Ul&3932160)===0&&(Ul=262144),rn=e}else rn=536870912;return e=ln.current,e!==null&&(e.flags|=32),rn}function Pt(e,t,n){(e===lt&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)&&(Na(e,0),zl(e,qe,rn,!1)),Cn(e,n),((Je&2)===0||e!==lt)&&(e===lt&&((Je&2)===0&&(Pl|=n),gt===4&&zl(e,qe,rn,!1)),Ln(e))}function Nd(e,t,n){if((Je&6)!==0)throw Error(u(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Nl(e,t),a=l?Qp(e,t):cs(e,t,!0),i=l;do{if(a===0){Oa&&!l&&zl(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=It,It=a,i!==null&&(It===null?It=i:It.push.apply(It,i))}a=r}if(i=!1,a!==2)continue}}if(a===1){Na(e,0),zl(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:zl(l,t,rn,!xl);break e;case 2:It=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(a=Yo+300-kt(),10<a)){if(zl(l,t,rn,!xl),ra(l,0,!0)!==0)break e;al=t,l.timeoutHandle=h0(Hd.bind(null,l,n,It,Vo,ls,t,rn,Pl,La,xl,i,"Throttled",-0,0),a);break e}Hd(l,n,It,Vo,ls,t,rn,Pl,La,xl,i,null,-0,0)}}break}while(!0);Ln(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:Vn},Dd(t,i,j);var ce=(i&62914560)===i?Yo-kt():(i&4194048)===i?Od-kt():0;if(ce=Am(j,ce),ce!==null){al=i,e.cancelPendingCommit=ce(Qd.bind(null,e,t,i,n,l,a,r,d,g,R,j,null,A,E)),zl(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(!tn(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 zl(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-qt(a),r=1<<i;l[i]=-1,a&=~r}n!==0&&Ii(e,n,t)}function Xo(){return(Je&6)===0?(Ei(0),!1):!0}function rs(){if(Be!==null){if(Ie===0)var e=Be.return;else e=Be,Kn=Xl=null,wc(e),Ta=null,ui=0,e=Be;for(;e!==null;)pd(e.alternate,e),e=e.return;Be=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()),al=0,rs(),lt=e,Be=n=Qn(e.current,null),qe=t,Ie=0,on=null,xl=!1,Oa=Nl(e,t),ts=!1,La=rn=ns=Pl=Sl=gt=0,It=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-qt(l),i=1<<a;t|=e[a],l&=~i}return ll=t,uo(),n}function Bd(e,t){Ue=null,T.H=vi,t===Ma||t===bo?(t=Pu(),Ie=3):t===fc?(t=Pu(),Ie=4):Ie=t===jc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,on=t,Be===null&&(gt=1,Oo(e,mn(t,e.current)))}function jd(){var e=ln.current;return e===null?!0:(qe&4194048)===qe?bn===null:(qe&62914560)===qe||(qe&536870912)!==0?e===bn:!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(){gt=4,xl||(qe&4194048)!==qe&&ln.current!==null||(Oa=!0),(Sl&134217727)===0&&(Pl&134217727)===0||lt===null||zl(lt,qe,rn,!1)}function cs(e,t,n){var l=Je;Je|=2;var a=qd(),i=Yd();(lt!==e||qe!==t)&&(Vo=null,Na(e,t)),t=!1;var r=gt;e:do try{if(Ie!==0&&Be!==null){var d=Be,g=on;switch(Ie){case 8:rs(),r=6;break e;case 3:case 2:case 9:case 6:ln.current===null&&(t=!0);var M=Ie;if(Ie=0,on=null,Ha(e,d,g,M),n&&Oa){r=0;break e}break;default:M=Ie,Ie=0,on=null,Ha(e,d,g,M)}}Xp(),r=gt;break}catch(R){Bd(e,R)}while(!0);return t&&e.shellSuspendCounter++,Kn=Xl=null,Je=l,T.H=a,T.A=i,Be===null&&(lt=null,qe=0,uo()),r}function Xp(){for(;Be!==null;)Gd(Be)}function Qp(e,t){var n=Je;Je|=2;var l=qd(),a=Yd();lt!==e||qe!==t?(Vo=null,Go=kt()+500,Na(e,t)):Oa=Nl(e,t);e:do try{if(Ie!==0&&Be!==null){t=Be;var i=on;t:switch(Ie){case 1:Ie=0,on=null,Ha(e,t,i,1);break;case 2:case 9:if(Wu(i)){Ie=0,on=null,Vd(t);break}t=function(){Ie!==2&&Ie!==9||lt!==e||(Ie=7),Ln(e)},i.then(t,t);break e;case 3:Ie=7;break e;case 4:Ie=5;break e;case 7:Wu(i)?(Ie=0,on=null,Vd(t)):(Ie=0,on=null,Ha(e,t,i,7));break;case 5:var r=null;switch(Be.tag){case 26:r=Be.memoizedState;case 5:case 27:var d=Be;if(r?E0(r):d.stateNode.complete){Ie=0,on=null;var g=d.sibling;if(g!==null)Be=g;else{var M=d.return;M!==null?(Be=M,Zo(M)):Be=null}break t}}Ie=0,on=null,Ha(e,t,i,5);break;case 6:Ie=0,on=null,Ha(e,t,i,6);break;case 8:rs(),gt=6;break e;default:throw Error(u(462))}}Zp();break}catch(R){Bd(e,R)}while(!0);return Kn=Xl=null,T.H=l,T.A=a,Je=n,Be!==null?0:(lt=null,qe=0,uo(),gt)}function Zp(){for(;Be!==null&&!Ol();)Gd(Be)}function Gd(e){var t=dd(e.alternate,e,ll);e.memoizedProps=e.pendingProps,t===null?Zo(e):Be=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,qe);break;case 11:t=od(n,t,t.pendingProps,t.type.render,t.ref,qe);break;case 5:wc(t);default:pd(n,t),t=Be=qu(t,ll),t=dd(n,t,ll)}e.memoizedProps=e.pendingProps,t===null?Zo(e):Be=t}function Ha(e,t,n,l){Kn=Xl=null,wc(t),Ta=null,ui=0;var a=t.return;try{if(Lp(e,a,t,n,qe)){gt=1,Oo(e,mn(n,e.current)),Be=null;return}}catch(i){if(a!==null)throw Be=a,i;gt=1,Oo(e,mn(n,e.current)),Be=null;return}t.flags&32768?(Ge||l===1?e=!0:Oa||(qe&536870912)!==0?e=!1:(xl=e=!0,(l===2||l===9||l===3||l===6)&&(l=ln.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,xl);return}e=t.return;var n=Hp(t.alternate,t,ll);if(n!==null){Be=n;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);gt===0&&(gt=5)}function Xd(e,t){do{var n=Bp(e.alternate,e);if(n!==null){n.flags&=32767,Be=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Be=e;return}Be=e=n}while(e!==null);gt=6,Be=null}function Qd(e,t,n,l,a,i,r,d,g){e.cancelPendingCommit=null;do Ko();while(Tt!==0);if((Je&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===lt&&(Be=lt=null,qe=0),Ua=t,wl=e,al=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=Je,Je|=4;try{jp(e,t,n)}finally{Je=r,B.p=a,T.T=l}}Tt=1,Zd(),Kd(),Jd()}}function Zd(){if(Tt===1){Tt=0;var e=wl,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=Je;Je|=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),nt=g.end===void 0?ze:Math.min(g.end,ce);!E.extend&&ze>nt&&(r=nt,nt=ze,ze=r);var C=Du(d,ze),v=Du(d,nt);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>nt?(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{Je=a,B.p=l,T.T=n}}e.current=t,Tt=2}}function Kd(){if(Tt===2){Tt=0;var e=wl,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=Je;Je|=4;try{Sd(e,t.alternate,t)}finally{Je=a,B.p=l,T.T=n}}Tt=3}}function Jd(){if(Tt===4||Tt===3){Tt=0,An();var e=wl,t=Ua,n=al,l=Ld;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Tt=5:(Tt=0,Ua=wl=null,Fd(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Cl=null),kn(n),t=t.stateNode,Vt&&typeof Vt.onCommitFiberRoot=="function")try{Vt.onCommitFiberRoot(Ll,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}}(al&3)!==0&&Ko(),Ln(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(Tt!==5)return!1;var e=wl,t=as;as=0;var n=kn(al),l=T.T,a=B.p;try{B.p=32>n?32:n,T.T=null,n=is,is=null;var i=wl,r=al;if(Tt=0,Ua=wl=null,al=0,(Je&6)!==0)throw Error(u(331));var d=Je;if(Je|=4,_d(i.current),Ed(i,i.current,r,n),Je=d,Ei(0,!1),Vt&&typeof Vt.onPostCommitFiberRoot=="function")try{Vt.onPostCommitFiberRoot(Ll,i)}catch{}return!0}finally{B.p=a,T.T=l,Fd(e,t)}}function Wd(e,t,n){t=mn(n,t),t=Bc(e.stateNode,t,2),e=gl(e,t,2),e!==null&&(Cn(e,2),Ln(e))}function Pe(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"&&(Cl===null||!Cl.has(l))){e=mn(n,e),n=If(2),l=gl(t,n,2),l!==null&&(Pf(n,l,t,e),Cn(l,2),Ln(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,lt===e&&(qe&n)===n&&(gt===4||gt===3&&(qe&62914560)===qe&&300>kt()-Yo?(Je&2)===0&&Na(e,0):ns|=n,La===qe&&(La=0)),Ln(e)}function Id(e,t){t===0&&(t=Wi()),e=Yl(e,t),e!==null&&(Cn(e,t),Ln(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 ol(e,t)}var Jo=null,Ba=null,us=!1,Fo=!1,fs=!1,Ml=0;function Ln(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-qt(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=qe,i=ra(l,l===lt?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||Nl(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;Ml!==0&&cm()&&(e=Ml);for(var t=kt(),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}Tt!==0&&Tt!==5||Ei(e),Ml!==0&&(Ml=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-qt(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=lt,n=qe,n=ra(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(Ie===2||Ie===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&jt(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Nl(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&jt(l),kn(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=ol(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&jt(l),e.callbackPriority=2,e.callbackNode=null,2}function t0(e,t){if(Tt!==0&&Tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ko()&&e.callbackNode!==n)return null;var l=qe;return l=ra(e,e===lt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Nd(e,l,t),e0(e,kt()),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(){(Je&6)!==0?ol(rl,Wp):Pd()})}function ds(){if(Ml===0){var e=wa;e===0&&(e=ia,ia<<=1,(ia&261888)===0&&(ia=256)),Ml=e}return Ml}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[_t]||null).action),r=l.submitter;r&&(t=(t=r[_t]||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(Ml!==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);zn(em,"on"+tm)}zn(Lu,"onAnimationEnd"),zn(Uu,"onAnimationIteration"),zn(Nu,"onAnimationStart"),zn("dblclick","onDoubleClick"),zn("focusin","onFocus"),zn("focusout","onBlur"),zn(yp,"onTransitionRun"),zn(vp,"onTransitionStart"),zn(bp,"onTransitionCancel"),zn(Hu,"onTransitionEnd"),At("onMouseEnter",["mouseout","mouseover"]),At("onMouseLeave",["mouseout","mouseover"]),At("onPointerEnter",["pointerout","pointerover"]),At("onPointerLeave",["pointerout","pointerover"]),dt("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),dt("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),dt("onBeforeInput",["compositionend","keypress","textInput","paste"]),dt("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),dt("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),dt("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 je(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,P.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=ye(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,nt=!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))),nt)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)&&(ye(ce)||ce[cl]))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?ye(ce):null,ce!==null&&(nt=m(ce),ze=ce.tag,ce!==nt||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"),nt=E==null?A:ke(E),z=ce==null?A:ke(ce),A=new ze(N,v+"leave",E,n,R),A.target=nt,A.relatedTarget=z,N=null,ye(R)===M&&(ze=new ze(C,v+"enter",ce,n,R),ze.target=z,ze.relatedTarget=nt,N=ze),nt=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&&nt!==null&&r0(j,nt,ce,ze,!0)}}e:{if(A=M?ke(M):window,E=A.nodeName&&A.nodeName.toLowerCase(),E==="select"||E==="input"&&A.type==="file")var Ze=wu;else if(Su(A))if(zu)Ze=pp;else{Ze=dp;var fe=fp}else E=A.nodeName,!E||E.toLowerCase()!=="input"||A.type!=="checkbox"&&A.type!=="radio"?M&&Rr(M.elementType)&&(Ze=wu):Ze=hp;if(Ze&&(Ze=Ze(e,M))){Cu(j,Ze,n,R);break e}fe&&fe(e,A,M),e==="focusout"&&M&&A.type==="number"&&M.memoizedProps.value!=null&&_r(A,"number",A.value)}switch(fe=M?ke(M):window,e){case"focusin":(Su(fe)||fe.contentEditable==="true")&&(ma=fe,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 He;if(Gr)e:{switch(e){case"compositionstart":var Ye="onCompositionStart";break e;case"compositionend":Ye="onCompositionEnd";break e;case"compositionupdate":Ye="onCompositionUpdate";break e}Ye=void 0}else pa?bu(e,n)&&(Ye="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ye="onCompositionStart");Ye&&(gu&&n.locale!=="ko"&&(pa||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&pa&&(He=fu()):(sl=R,Hr="value"in sl?sl.value:sl.textContent,pa=!0)),fe=Wo(M,Ye),0<fe.length&&(Ye=new pu(Ye,e,null,n,R),j.push({event:Ye,listeners:fe}),He?Ye.data=He:(He=xu(n),He!==null&&(Ye.data=He)))),(He=op?rp(e,n):cp(e,n))&&(Ye=Wo(M,"onBeforeInput"),0<Ye.length&&(fe=new pu("onBeforeInput","beforeinput",null,n,R),j.push({event:fe,listeners:Ye}),fe.data=He)),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 tt(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"&&tt(e,t,"name",a.name,a,null),tt(e,t,"formEncType",a.formEncType,a,null),tt(e,t,"formMethod",a.formMethod,a,null),tt(e,t,"formTarget",a.formTarget,a,null)):(tt(e,t,"encType",a.encType,a,null),tt(e,t,"method",a.method,a,null),tt(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=Vn);break;case"onScroll":l!=null&&je("scroll",e);break;case"onScrollEnd":l!=null&&je("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":je("beforetoggle",e),je("toggle",e),Kt(e,"popover",l);break;case"xlinkActuate":Gn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Gn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Gn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Gn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Gn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Gn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Gn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Gn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Gn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Kt(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,Kt(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&&je("scroll",e);break;case"onScrollEnd":l!=null&&je("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Vn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Se.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[_t]||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,""):Kt(e,n,l)}}}function Ut(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",e),je("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:tt(e,t,i,r,n,null)}}a&&tt(e,t,"srcSet",n.srcSet,n,null),l&&tt(e,t,"src",n.src,n,null);return;case"input":je("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:tt(e,t,l,R,n,null)}}au(e,i,d,g,M,r,a,!1);return;case"select":je("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:tt(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":je("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:tt(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":tt(e,t,g,l,n,null));return;case"dialog":je("beforetoggle",e),je("toggle",e),je("cancel",e),je("close",e);break;case"iframe":case"object":je("load",e);break;case"video":case"audio":for(l=0;l<Di.length;l++)je(Di[l],e);break;case"image":je("error",e),je("load",e);break;case"details":je("toggle",e);break;case"embed":case"source":case"link":je("error",e),je("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:tt(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&&tt(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)||tt(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&&tt(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)||tt(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&&tt(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:tt(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&&tt(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:tt(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":tt(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)&&tt(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:tt(e,t,M,A,l,E)}return;default:if(Rr(t)){for(var nt in n)A=n[nt],n.hasOwnProperty(nt)&&A!==void 0&&!l.hasOwnProperty(nt)&&vs(e,t,nt,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)&&tt(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||tt(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 Tl(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),pe(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=xn(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=xn(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=xn(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 xn(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 xn(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]);pe(e)}var Sn=new Map,S0=new Set;function Po(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var il=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=il.f(),t=Xo();return e||t}function gm(e){var t=re(e);t!==null&&t.tag===5&&t.type==="form"?Bf(t):il.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=hn(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"),Ut(t,"link",e),Z(t),l.head.appendChild(t)))}}function ym(e){il.D(e),C0("dns-prefetch",e,null)}function vm(e,t){il.C(e,t),C0("preconnect",e,t)}function bm(e,t,n){il.L(e,t,n);var l=ja;if(l&&e&&t){var a='link[rel="preload"][as="'+hn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+hn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+hn(n.imageSizes)+'"]')):a+='[href="'+hn(e)+'"]';var i=a;switch(t){case"style":i=qa(e);break;case"script":i=Ya(e)}Sn.has(i)||(e=H({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Sn.set(i,e),l.querySelector(a)!==null||t==="style"&&l.querySelector(Ri(i))||t==="script"&&l.querySelector(Oi(i))||(t=l.createElement("link"),Ut(t,"link",e),Z(t),l.head.appendChild(t)))}}function xm(e,t){il.m(e,t);var n=ja;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+hn(l)+'"][href="'+hn(e)+'"]',i=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ya(e)}if(!Sn.has(i)&&(e=H({rel:"modulepreload",href:e},t),Sn.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"),Ut(l,"link",e),Z(l),n.head.appendChild(l)}}}function Sm(e,t,n){il.S(e,t,n);var l=ja;if(l&&e){var a=Te(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=Sn.get(i))&&As(e,n);var g=r=l.createElement("link");Z(g),Ut(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){il.X(e,t);var n=ja;if(n&&e){var l=Te(n).hoistableScripts,a=Ya(e),i=l.get(a);i||(i=n.querySelector(Oi(a)),i||(e=H({src:e,async:!0},t),(t=Sn.get(a))&&Es(e,t),i=n.createElement("script"),Z(i),Ut(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function wm(e,t){il.M(e,t);var n=ja;if(n&&e){var l=Te(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=Sn.get(a))&&Es(e,t),i=n.createElement("script"),Z(i),Ut(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=we.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=Te(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=Te(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),Sn.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},Sn.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=Te(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="'+hn(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}),Ut(t,"link",n),Z(t),e.head.appendChild(t))}function Ya(e){return'[src="'+hn(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~="'+hn(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),Ut(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=Sn.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}),Ut(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=Sn.get(i))&&(l=H({},n),Es(l,a)),e=e.ownerDocument||e,a=e.createElement("script"),Z(a),Ut(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[ft]||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=Sn.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}),Ut(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:ie,Provider:null,Consumer:null,_currentValue:te,_currentValue2:te,_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=nn(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=ml(t),l.payload={element:n},i=i===void 0?null:i,i!==null&&(l.callback=i),n=gl(e,l,t),n!==null&&(Pt(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&&Pt(t,e,67108864),ks(e,67108864)}}function L0(e){if(e.tag===13||e.tag===31){var t=cn();t=Dn(t);var n=Yl(e,t);n!==null&&Pt(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=re(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var r=qn(i.pendingLanes);if(r!==0){var d=i;for(d.pendingLanes|=2,d.entangledLanes|=2;r;){var g=1<<31-qt(r);d.entanglements[1]|=g,r&=~g}Ln(i),(Je&6)===0&&(Go=kt()+500,Ei(0))}}break;case 31:case 13:d=Yl(i,2),d!==null&&Pt(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=ye(e),e!==null){var t=m(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 rl: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,Al=null,El=null,Dl=null,Ui=new Map,Ni=new Map,kl=[],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":Al=null;break;case"dragenter":case"dragleave":El=null;break;case"mouseover":case"mouseout":Dl=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=re(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 Al=Hi(Al,e,t,n,l,a),!0;case"dragenter":return El=Hi(El,e,t,n,l,a),!0;case"mouseover":return Dl=Hi(Dl,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=ye(e.target);if(t!==null){var n=m(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=re(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,Al!==null&&rr(Al)&&(Al=null),El!==null&&rr(El)&&(El=null),Dl!==null&&rr(Dl)&&(Dl=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=re(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)}Al!==null&&cr(Al,e),El!==null&&cr(El,e),Dl!==null&&cr(Dl,e),Ui.forEach(t),Ni.forEach(t);for(var n=0;n<kl.length;n++){var l=kl[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<kl.length&&(n=kl[0],n.blockedOn===null);)H0(n),n.blockedOn===null&&kl.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[_t]||null;if(typeof i=="function")r||j0(n);else if(r){var d=null;if(i&&i.hasAttribute("formAction")){if(a=i,r=i[_t]||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=cn();_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[cl]=null}};function ur(e){this._internalRoot=e}ur.prototype.unstable_scheduleHydration=function(e){if(e){var t=Yn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<kl.length&&t!==0&&t<kl[n].priority;n++);kl.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{Ll=fr.inject(Um),Vt=fr}catch{}}return qi.createRoot=function(e,t){if(!p(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[cl]=t.current,gs(e),new Us(t)},qi.hydrateRoot=function(e,t,n){if(!p(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=cn(),l=Dn(l),a=ml(l),a.callback=null,gl(n,a,l),n=l,t.current.lanes=n,Cn(t,n),Ln(t),e[cl]=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 p=u.length,m=new Array(p);m[0]=tu,m[1]=eu(s,h);for(var D=2;D<p;D++)m[D]=u[D];return w.createElement.apply(null,m)};(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 Bn(){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=Bn`
10
+ from { opacity: 0; }
11
+ to { opacity: 1; }
12
+ `,Z1=Bn`
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=Bn`
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:p="default",onConfirm:m,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,p==="danger"?Ae.btnDanger:Ae.btnConfirm,"",""],onClick:m,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:p,confirmLabel:m="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:p,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(vt,{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]}):m})]})]})})})}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:p=>p.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 Rl={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:p}){const m=s.status==="complete",D=s.status==="error",_=s.status==="stopped",O=s.status==="stopping",S=m||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."]}):m?x(vt,{children:[x("p",{css:Ae.message,children:[s.message?s.message:s.isMove?x(vt,{children:["Moved ",s.processed," file",s.processed!==1?"s":"",".",s.errors!==void 0&&s.errors>0?x(vt,{children:[" ",s.errors," error",s.errors!==1?"s":""," occurred."]}):null]}):s.isScan?x(vt,{children:[s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?x(vt,{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(vt,{children:[" Removed ",s.orphanedEntries," orphaned entr",s.orphanedEntries!==1?"ies":"y","."]}):null,s.pendingUpdates!==void 0&&s.pendingUpdates>0?x(vt,{children:[" ",s.pendingUpdates," file",s.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):x(vt,{children:["Processed ",s.processed," new image",s.processed!==1?"s":"",".",s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?x(vt,{children:[" ",s.alreadyProcessed," already processed."]}):null]}),s.orphansRemoved!==void 0&&s.orphansRemoved>0?x(vt,{children:[" Removed ",s.orphansRemoved," orphaned thumbnail",s.orphansRemoved!==1?"s":"","."]}):null]}),s.errorMessages&&s.errorMessages.length>0&&x("div",{css:Rl.errorList,children:[s.errorMessages.slice(0,10).map((H,K)=>c("p",{css:Rl.errorItem,children:H},K)),s.errorMessages.length>10&&x("p",{css:Rl.errorItem,children:["...and ",s.errorMessages.length-10," more"]})]})]}):x(vt,{children:[c("p",{css:Ae.message,children:s.status==="cleanup"?s.message||"Cleaning up...":s.message||"Processing..."}),x("div",{css:Rl.progressContainer,children:[c("div",{css:Rl.progressBar,children:c("div",{css:Rl.progressFill,style:{width:`${s.percent}%`}})}),x("div",{css:Rl.progressText,children:[x("span",{children:[s.current," of ",s.total]}),x("span",{children:[s.percent,"%"]})]}),s.currentFile&&c("p",{css:Rl.currentFile,title:s.currentFile,children:s.currentFile})]})]})}),x("div",{css:Ae.footer,children:[X&&p&&c("button",{css:[Ae.btn,Ae.btnDanger,"",""],onClick:p,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=Bn`
25
+ from { opacity: 0; }
26
+ to { opacity: 1; }
27
+ `,$1=Bn`
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
+ `,yt={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[p,m]=w.useState([]),[D,_]=w.useState(!0),[O,S]=w.useState(null);w.useEffect(()=>{async function L(){try{const Y=await fetch("/api/studio/list-folders");if(Y.ok){const Ce=await Y.json();console.log("Loaded folders:",Ce),m(Ce.folders||[])}else console.error("Failed to load folders:",Y.status,await Y.text())}catch(Y){console.error("Failed to load folders:",Y)}finally{_(!1)}}L()},[]);const X=Array.from(o),H=p.filter(L=>!X.some(Y=>L.path===Y||L.path.startsWith(Y+"/"))),K=L=>L===s,oe=()=>{O&&h(O)};return c("div",{css:yt.overlay,onClick:u,children:x("div",{css:yt.modal,onClick:L=>L.stopPropagation(),children:[c("div",{css:yt.header,children:c("h3",{css:yt.title,children:"Move Items"})}),x("div",{css:yt.body,children:[x("p",{css:yt.message,children:["Select a destination folder for ",o.size," item",o.size!==1?"s":"",":"]}),D?c("div",{css:yt.loading,children:c("div",{css:yt.spinner})}):H.length===0?c("div",{css:yt.loading,children:"No available folders to move to."}):c("div",{css:yt.folderList,children:H.map(L=>{const Y=K(L.path);return x("div",{css:[yt.folderItem,O===L.path&&yt.folderItemSelected,Y&&yt.folderItemDisabled,"",""],style:{paddingLeft:12},onClick:()=>!Y&&S(L.path),children:[L.depth>0&&c("div",{css:yt.treeIndent,children:Array.from({length:L.depth}).map((Ce,ee)=>c("div",{css:yt.treeLine},ee))}),c("svg",{css:yt.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:yt.folderName,children:[L.name,Y&&" (current)"]})]},L.path)})})]}),x("div",{css:yt.footer,children:[c("button",{css:[yt.btn,yt.btnCancel,"",""],onClick:u,children:"Cancel"}),c("button",{css:[yt.btn,yt.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),p=async()=>{try{await navigator.clipboard.writeText(W1),u(!0),setTimeout(()=>u(!1),2e3)}catch(m){console.error("Failed to copy:",m)}};return o?c("div",{css:se.overlay,onClick:s,children:x("div",{css:se.modal,onClick:m=>m.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:p,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=Bn`
42
+ from { opacity: 0; }
43
+ to { opacity: 1; }
44
+ `,P1=Bn`
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
+ `,it={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,p]=w.useState("upload"),[m,D]=w.useState([]),[_,O]=w.useState(""),[S,X]=w.useState(!1),[H,K]=w.useState(!1),[oe,L]=w.useState(!1),Y=w.useRef(null),Ce=w.useCallback(ue=>{ue&&D(Array.from(ue))},[]),ee=w.useCallback(ue=>{ue.preventDefault(),X(!1),Ce(ue.dataTransfer.files)},[Ce]),me=w.useCallback(async()=>{if(m.length!==0){K(!0);try{for(const ue of m){const q=new FormData;q.append("file",ue),q.append("path",o),await fetch("/api/studio/upload",{method:"POST",body:q})}h(),s()}catch(ue){console.error("Upload failed:",ue)}finally{K(!1)}}},[m,o,h,s]),ie=w.useCallback(async()=>{const ue=_.split(`
54
+ `).map(q=>q.trim()).filter(q=>q.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(Le=>Le.startsWith("data: "));for(const Le of Re)JSON.parse(Le.replace("data: ","")).type==="complete"&&(h(),s())}}catch(q){console.error("Import failed:",q)}finally{L(!1)}}},[_,h,s]);return c("div",{css:it.overlay,onClick:s,children:x("div",{css:it.modal,onClick:ue=>ue.stopPropagation(),children:[x("div",{css:it.header,children:[c("h3",{css:it.title,children:"Add New"}),x("div",{css:it.tabs,children:[c("button",{css:[it.tab,u==="upload"&&it.tabActive,"",""],onClick:()=>p("upload"),children:"Upload Files"}),c("button",{css:[it.tab,u==="import"&&it.tabActive,"",""],onClick:()=>p("import"),children:"Import URLs"})]})]}),c("div",{css:it.body,children:u==="upload"?x(vt,{children:[x("div",{css:[it.dropzone,S&&it.dropzoneActive,"",""],onClick:()=>Y.current?.click(),onDragOver:ue=>{ue.preventDefault(),X(!0)},onDragLeave:()=>X(!1),onDrop:ee,children:[c("svg",{css:it.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:it.dropzoneText,children:"Drop files here or click to browse"}),c("p",{css:it.dropzoneHint,children:"Supports images and other media files"})]}),c("input",{ref:Y,type:"file",multiple:!0,css:it.fileInput,onChange:ue=>Ce(ue.target.files)}),m.length>0&&x("div",{css:it.selectedFiles,children:[m.length," file",m.length!==1?"s":""," selected"]})]}):x(vt,{children:[c("p",{css:it.textareaLabel,children:"Paste image URLs (one per line)"}),c("textarea",{css:it.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:it.footer,children:[c("button",{css:[it.btn,it.btnCancel,"",""],onClick:s,children:"Cancel"}),u==="upload"?c("button",{css:[it.btn,it.btnConfirm,"",""],onClick:me,disabled:m.length===0||H,children:H?"Uploading...":"Upload"}):c("button",{css:[it.btn,it.btnConfirm,"",""],onClick:ie,disabled:!_.trim()||oe,children:oe?"Importing...":"Import"})]})]})})}const Qs="36px",tg=Bn`
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:p,triggerRefresh:m,focusedItem:D,scanRequested:_,clearScanRequest:O,fileItems:S,requestProcess:X,setProcessMode:H,actionState:K,cancelAction:oe}=Qa(),L=w.useRef(null),Y=w.useRef(null),[Ce,ee]=w.useState(!1),[me,ie]=w.useState(!1),[ue,q]=w.useState(!1),[J,U]=w.useState(!1),[be,ge]=w.useState(!1),[Ee,Re]=w.useState(0),[Le,ot]=w.useState(!1),[Xe,Ve]=w.useState(!1),[T,B]=w.useState(!1),[te,De]=w.useState(0),[Ne,y]=w.useState(!1),[k,G]=w.useState("Processing Images"),[W,V]=w.useState({current:0,total:0,percent:0,status:"processing"}),[we,he]=w.useState(null),[at,Qe]=w.useState(!1),[Zt,ne]=w.useState(!1),[Ht,rt]=w.useState(!1),[Me,ut]=w.useState(!1),[Bt,un]=w.useState(!1),[jn,ta]=w.useState(!1),[ol,jt]=w.useState(!1),[Ol,An]=w.useState(!1),kt=w.useRef(null),Ka=w.useRef(null),rl=p==="public/images"||p.startsWith("public/images/");w.useCallback(()=>{L.current?.click()},[]);const na=w.useCallback(async()=>{q(!0),G("Scanning Files"),y(!0),V({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 pe="";for(;;){const{done:ye,value:re}=await Q.read();if(ye)break;pe+=I.decode(re,{stream:!0});const ke=pe.split(`
60
+
61
+ `);pe=ke.pop()||"";for(const Te of ke){if(!Te.startsWith("data: "))continue;const Z=JSON.parse(Te.slice(6));if(Z.type==="start")V({current:0,total:Z.total,percent:0,status:"processing",message:`Scanning ${Z.total} files...`});else if(Z.type==="progress")V({current:Z.current,total:Z.total,percent:Z.percent,status:"processing",currentFile:Z.currentFile});else if(Z.type==="cleanup")V(P=>({...P,message:Z.message}));else if(Z.type==="complete"){let P=Z.renamed>0?`${Z.renamed} file(s) renamed due to conflicts. `:"";Z.orphanedFiles&&Z.orphanedFiles.length>0&&(P+=`Found ${Z.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),V({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:P||void 0,isScan:!0}),m()}else Z.type==="error"&&V({current:0,total:0,percent:0,status:"error",message:Z.message||"Scan failed"})}}}catch(le){console.error("Scan error:",le),V({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{q(!1)}},[m]);w.useEffect(()=>{const le=Q=>{kt.current&&!kt.current.contains(Q.target)&&jt(!1),Ka.current&&!Ka.current.contains(Q.target)&&An(!1)};return document.addEventListener("mousedown",le),()=>document.removeEventListener("mousedown",le)},[]),w.useEffect(()=>{_&&!ue&&(O(),na())},[_,ue,O,na]);const la=w.useCallback(async le=>{const Q=le.target.files;if(!Q||Q.length===0)return;const I=Array.from(Q);I.length>1?(V({current:0,total:I.length,percent:0,status:"processing",message:"Uploading files..."}),y(!0)):ie(!0);let pe=0,ye=0;try{for(let re=0;re<I.length;re++){const ke=I[re],Te=new FormData;Te.append("file",ke),Te.append("path",p);try{const Z=await fetch("/api/studio/upload",{method:"POST",body:Te});if(Z.ok)pe++;else{const P=await Z.json();ye++,I.length===1&&(Z.status>=500?(console.error("Upload error:",P),he({title:"Upload Failed",message:`Failed to upload ${ke.name}: ${P.error||"Unknown error"}`})):he({title:"Cannot Upload Here",message:P.error||"Upload not allowed in this location."}))}}catch{ye++}I.length>1&&V({current:re+1,total:I.length,percent:Math.round((re+1)/I.length*100),status:"processing",currentFile:ke.name})}I.length>1&&V({current:I.length,total:I.length,percent:100,status:"complete",processed:pe,errors:ye}),m()}catch(re){console.error("Upload error:",re),I.length>1?V({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):he({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{ie(!1),L.current&&(L.current.value="")}},[p,m]),Fi=w.useCallback(async le=>{if(o.size>0){const I=Array.from(o),pe=I.filter(re=>(re.split("/").pop()||"").includes(".")&&!re.endsWith("/")),ye=I.filter(re=>!(re.split("/").pop()||"").includes(".")||re.endsWith("/"));if(ye.length>0)try{const ke=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ye.join(","))}`)).json();if(ke.images)for(const Te of ke.images){const Z=`public/${Te}`;pe.includes(Z)||pe.push(Z)}}catch(re){console.error("Failed to get folder files:",re)}if(pe.length===0){he({title:"No Files Found",message:"No files found in the selected items."});return}H(le),X(pe)}else try{const pe=await(await fetch("/api/studio/count-images")).json();if(!pe.images||pe.images.length===0){he({title:"No Images Found",message:"No images found in the public folder to process."});return}const ye=pe.images.map(re=>`public/${re}`);H(le),X(ye)}catch(I){console.error("Failed to get images:",I),he({title:"Error",message:"Failed to get images."})}},[o,X,H]),$i=w.useCallback(()=>{Y.current&&(V(le=>({...le,status:"stopping"})),Y.current.abort())},[]),wr=w.useCallback(async()=>{const le=W.orphanedFiles;if(!(!le||le.length===0))try{const Q=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:le})}),I=await Q.json();Q.ok?(V(pe=>({...pe,orphanedFiles:void 0,orphansRemoved:I.deleted,message:`Deleted ${I.deleted} orphaned thumbnail${I.deleted!==1?"s":""}.`})),m()):he({title:"Delete Failed",message:I.error||"Failed to delete orphaned files."})}catch(Q){console.error("Delete orphans error:",Q),he({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[W.orphanedFiles,m]),zr=w.useCallback(()=>{o.size!==0&&U(!0)},[o]),Ll=w.useCallback(async()=>{U(!1);try{const le=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:Array.from(o)})});if(le.ok)u(),m();else{const Q=await le.json();he({title:"Delete Failed",message:Q.error||"Unknown error"})}}catch(le){console.error("Delete error:",le),he({title:"Delete Failed",message:"Delete failed. Check console for details."})}},[o,u,m]),Vt=w.useCallback(async()=>{if(o.size===0)return;const le=Array.from(o),Q=le.filter(Te=>(Te.split("/").pop()||"").includes(".")&&!Te.endsWith("/")),I=le.filter(Te=>!(Te.split("/").pop()||"").includes(".")||Te.endsWith("/")),pe=I.length>0;if(pe)try{const Z=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(I.join(","))}`)).json();if(Z.images)for(const P of Z.images){const Se=`public/${P}`;Q.includes(Se)||Q.push(Se)}}catch(Te){console.error("Failed to get folder files:",Te)}if(Q.length===0){he({title:"No Files Found",message:"No files found in the selected items."});return}let ye=!1,re=!1,ke=0;for(const Te of Q){const Z=S.find(P=>P.path===Te);Z?Z.isRemote?ye=!0:Z.cdnPushed?ke++:re=!0:pe&&(re=!0)}if(!pe&&ke===Q.length){he({title:"Already Pushed",message:`All ${Q.length} file${Q.length!==1?"s are":" is"} already on the CDN.`});return}Re(Q.length),ot(ye),Ve(re),ge(!0)},[o,S]),En=w.useCallback(async()=>{ge(!1);const le=Array.from(o),Q=le.filter(P=>(P.split("/").pop()||"").includes(".")&&!P.endsWith("/")),I=le.filter(P=>!(P.split("/").pop()||"").includes(".")||P.endsWith("/"));if(I.length>0)try{const Se=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(I.join(","))}`)).json();if(Se.images)for(const dt of Se.images){const At=`public/${dt}`;Q.includes(At)||Q.push(At)}}catch(P){console.error("Failed to get folder files:",P)}const pe=Q.map(P=>"/"+P.replace(/^public\//,"")),ye=new AbortController;Y.current=ye,G("Pushing to CDN"),V({current:0,total:pe.length,percent:0,status:"processing",message:"Pushing to CDN..."}),y(!0);let re=0,ke=0,Te=0;const Z=[];try{for(let Se=0;Se<pe.length;Se++){if(ye.signal.aborted){V(fn=>({...fn,status:"stopped",message:`Stopped. ${re} file${re!==1?"s":""} pushed.`})),u(),m(),Y.current=null;return}const dt=pe[Se];let At=!1,Hl=!1,pt;for(let fn=0;fn<3&&!At&&!ye.signal.aborted;fn++)try{const $a=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[dt]}),signal:ye.signal}),Kt=await $a.json();if($a.ok)if(Kt.pushed?.length>0)re++,At=!0;else if(Kt.alreadyPushed?.length>0)Hl=!0,At=!0;else if(Kt.errors?.length>0)for(const sa of Kt.errors)pt=sa;else At=!0;else{if(Kt.error?.includes("R2 not configured")||Kt.error?.includes("CLOUDFLARE_R2")){y(!1),un(!0);return}pt=Kt.error||`Failed: ${dt}`}}catch{pt=`Network error: ${dt}`,fn<2&&await new Promise(Kt=>setTimeout(Kt,500*(fn+1)))}Hl?ke++:!At&&pt&&(Te++,Z.push(pt)),V({current:Se+1,total:pe.length,percent:Math.round((Se+1)/pe.length*100),status:"processing",currentFile:dt.replace(/^\//,"")})}if(ye.signal.aborted){u(),m(),Y.current=null;return}let P;re===0&&Te===0?P=`${ke} file${ke!==1?"s":""} already on CDN. 0 new files pushed.`:ke>0&&Te===0&&(P=`${re} file${re!==1?"s":""} pushed. ${ke} already on CDN.`),V({current:pe.length,total:pe.length,percent:100,status:"complete",processed:re,errors:Te,errorMessages:Z.length>0?Z:void 0,message:P}),u(),m()}catch(P){if(ye.signal.aborted){Y.current=null;return}console.error("Push error:",P),V({current:0,total:0,percent:0,status:"error",message:"Failed to push to CDN."})}finally{Y.current=null}},[o,u,m]),[qt,Mr]=w.useState([]),[aa,Tr]=w.useState(0),ia=w.useCallback(async()=>{if(o.size===0)return;const le=Array.from(o),Q=le.filter(re=>(re.split("/").pop()||"").includes(".")&&!re.endsWith("/")),I=le.filter(re=>!(re.split("/").pop()||"").includes(".")||re.endsWith("/")),pe=I.length>0;if(pe)try{const ke=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(I.join(","))}`)).json();if(ke.images)for(const Te of ke.images){const Z=`public/${Te}`;Q.includes(Z)||Q.push(Z)}}catch(re){console.error("Failed to get folder files:",re)}if(Q.length===0){he({title:"No Files Found",message:"No files found in the selected items."});return}let ye;if(pe)ye=Q;else if(ye=Q.filter(re=>{const ke=S.find(Te=>Te.path===re);return ke&&ke.cdnPushed&&!ke.isRemote}),ye.length===0){he({title:"No CDN Files",message:`None of the ${Q.length} selected file${Q.length!==1?"s are":" is"} on the CDN.`});return}Mr(ye),Tr(Q.length),De(ye.length),B(!0)},[o,S]),Ul=w.useRef(null),oa=w.useCallback(async()=>{B(!1),K.showDownloadConfirm&&oe();const le=new AbortController;Y.current=le;const Q=`download-${Date.now()}-${Math.random().toString(36).slice(2)}`;Ul.current=Q;const pe=(K.showDownloadConfirm?K.actionPaths:qt).map(ye=>"/"+ye.replace(/^public\//,""));G("Downloading from CDN"),y(!0),V({current:0,total:pe.length,percent:0,status:"processing"});try{const ye=await fetch("/api/studio/download-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:pe,operationId:Q}),signal:le.signal});if(!ye.ok||!ye.body)throw new Error("Download request failed");const re=ye.body.getReader(),ke=new TextDecoder;let Te="",Z=0;const P=async()=>{try{await fetch("/api/studio/cancel-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationId:Q})})}catch{}re.cancel(),V(Se=>({...Se,status:"stopped",message:`Stopped. ${Z} file${Z!==1?"s":""} downloaded.`})),u(),m(),Y.current=null,Ul.current=null};le.signal.addEventListener("abort",P);try{for(;;){const{done:Se,value:dt}=await re.read();if(Se)break;Te+=ke.decode(dt,{stream:!0});const At=Te.split(`
62
+ `);Te=At.pop()||"";for(const Hl of At)if(Hl.startsWith("data: "))try{const pt=JSON.parse(Hl.slice(6));if(pt.type==="progress")pt.downloaded!==void 0&&(Z=pt.downloaded),V({current:pt.current,total:pt.total,percent:Math.round(pt.current/pt.total*100),status:"processing",message:pt.message});else if(pt.type==="complete"){Z=pt.downloaded||pt.total||pe.length;let fn=pt.message;aa>Z&&(fn=`${Z} file${Z!==1?"s":""} downloaded out of ${aa} selected.`),V({current:Z,total:Z,percent:100,status:"complete",message:fn})}else pt.type==="error"&&V({current:0,total:0,percent:0,status:"error",message:pt.message})}catch{}}le.signal.aborted||(u(),m())}catch(Se){if(!le.signal.aborted)throw Se}finally{le.signal.removeEventListener("abort",P)}}catch(ye){if(le.signal.aborted)return;console.error("Download error:",ye),V({current:0,total:0,percent:0,status:"error",message:"Failed to download from CDN."})}finally{Y.current=null}},[qt,aa,u,m,K.showDownloadConfirm,K.actionPaths,oe]),qn=w.useCallback(async()=>{if(o.size===0)return;const Q=Array.from(o).filter(I=>{const pe=S.find(ye=>ye.path===I);return pe&&pe.hasUpdate});if(Q.length===0){he({title:"No Updates",message:"No files with pending updates in selection."});return}G("Pushing Updates"),y(!0),V({current:0,total:Q.length,percent:0,status:"processing"});try{const pe=(await fetch("/api/studio/push-updates-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:Q})})).body?.getReader();if(!pe)throw new Error("No response body");const ye=new TextDecoder;let re="";for(;;){const{done:ke,value:Te}=await pe.read();if(ke)break;re+=ye.decode(Te,{stream:!0});const Z=re.split(`
63
+ `);re=Z.pop()||"";for(const P of Z)if(P.startsWith("data: "))try{const Se=JSON.parse(P.slice(6));Se.type==="progress"?V({current:Se.current,total:Se.total,percent:Se.percent,status:"processing",currentFile:Se.currentFile}):Se.type==="cleanup"?V(dt=>({...dt,message:Se.message})):Se.type==="complete"?V({current:Se.total||Q.length,total:Se.total||Q.length,percent:100,status:"complete",message:Se.message}):Se.type==="error"&&V({current:0,total:0,percent:0,status:"error",message:Se.message})}catch{}}u(),m()}catch(I){console.error("Push updates error:",I),V({current:0,total:0,percent:0,status:"error",message:"Failed to push updates."})}},[o,S,u,m]),ra=w.useCallback(async()=>{if(o.size===0)return;const Q=Array.from(o).filter(I=>{const pe=S.find(ye=>ye.path===I);return pe&&pe.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(),m();else{const pe=await I.json();he({title:"Cancel Failed",message:pe.error||"Unknown error"})}}catch(I){console.error("Cancel updates error:",I),he({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[o,S,u,m]),Nl=w.useCallback(async le=>{Qe(!1);try{const Q=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:p,name:le})});if(Q.ok)m();else{const I=await Q.json();he({title:"Create Folder Failed",message:I.error||"Unknown error"})}}catch(Q){console.error("Create folder error:",Q),he({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[p,m]),Ar=w.useCallback(()=>{o.size!==0&&ut(!0)},[o]),Wi=w.useCallback(async le=>{const Q=Array.from(o);G("Moving Files"),y(!0),V({current:0,total:Q.length,percent:0,status:"processing"});try{const I=await fetch("/api/studio/move",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:Q,destination:le})});if(!I.body)throw new Error("No response body");const pe=I.body.getReader(),ye=new TextDecoder;let re="";for(;;){const{done:ke,value:Te}=await pe.read();if(ke)break;re+=ye.decode(Te,{stream:!0});const Z=re.split(`
64
+
65
+ `);re=Z.pop()||"";for(const P of Z)if(P.startsWith("data: "))try{const Se=JSON.parse(P.slice(6));Se.type==="start"?V(dt=>({...dt,total:Se.total})):Se.type==="progress"?V({current:Se.current,total:Se.total,percent:Se.percent,currentFile:Se.currentFile,status:"processing"}):Se.type==="complete"?(V(dt=>({...dt,status:"complete",processed:Se.moved,errors:Se.errors,errorMessages:Se.errorMessages,isMove:!0})),u(),m()):Se.type==="error"&&V(dt=>({...dt,status:"error",errorMessage:Se.message}))}catch{}}}catch(I){console.error("Move error:",I),V(pe=>({...pe,status:"error",errorMessage:"Failed to move items. Check console for details."}))}},[o,u,m]),{searchQuery:ca,setSearchQuery:Cn}=Qa(),Er=w.useCallback(le=>{Cn(le.target.value)},[Cn]),Ii=w.useCallback(le=>{le.key==="Escape"&&(le.stopPropagation(),Cn(""),le.target.blur())},[Cn]),wn=o.size>0;wn&&Array.from(o).some(le=>{const Q=S.find(I=>I.path===le);return Q&&Q.cdnPushed&&!Q.isRemote}),wn&&Array.from(o).every(le=>{const Q=S.find(I=>I.path===le);return Q&&Q.type==="file"&&Q.cdnPushed&&!Q.isRemote});const Pi=wn&&Array.from(o).some(le=>{const Q=S.find(I=>I.path===le);return Q&&Q.hasUpdate}),Dn=Array.from(o),kn=Dn.length===1&&!Dn[0].includes("."),Yn=kn?Dn[0]:null,Ja=Yn&&Yn.split("/").pop()||"",Xt=Dn.length===1&&Dn[0].includes("."),ft=Xt?Dn[0]:null,_t=ft&&ft.split("/").pop()||"",cl=w.useCallback(async le=>{if(Yn){ne(!1),G("Renaming Folder"),y(!0),V({current:0,total:0,percent:0,status:"processing",message:"Preparing rename..."});try{const Q=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:Yn,newName:le})});if(!Q.body)throw new Error("No response body");const I=Q.body.getReader(),pe=new TextDecoder;let ye="";for(;;){const{done:re,value:ke}=await I.read();if(re)break;ye+=pe.decode(ke,{stream:!0});const Te=ye.split(`
66
+ `);ye=Te.pop()||"";for(const Z of Te){if(!Z.startsWith("data: "))continue;const P=JSON.parse(Z.slice(6));P.type==="start"?V({current:0,total:P.total,percent:0,status:"processing",message:P.message}):P.type==="progress"?V({current:P.current,total:P.total,percent:Math.round(P.current/P.total*100),status:"processing",message:P.message}):P.type==="complete"?V({current:P.renamed,total:P.renamed,percent:100,status:"complete",message:`Renamed ${P.renamed} item(s)`}):P.type==="error"&&V(Se=>({...Se,status:"error",message:P.message}))}}u(),m()}catch(Q){console.error("Failed to rename folder:",Q),V(I=>({...I,status:"error",message:"Failed to rename folder"}))}}},[Yn,u,m]),Fa=w.useCallback(async le=>{if(ft){rt(!1),G("Renaming File"),y(!0),V({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});try{const Q=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:ft,newName:le})});if(!Q.body)throw new Error("No response body");const I=Q.body.getReader(),pe=new TextDecoder;let ye="";for(;;){const{done:re,value:ke}=await I.read();if(re)break;ye+=pe.decode(ke,{stream:!0});const Te=ye.split(`
67
+ `);ye=Te.pop()||"";for(const Z of Te){if(!Z.startsWith("data: "))continue;const P=JSON.parse(Z.slice(6));P.type==="start"?V({current:0,total:P.total,percent:0,status:"processing",message:P.message}):P.type==="progress"?V({current:P.current,total:P.total,percent:Math.round(P.current/P.total*100),status:"processing",message:P.message}):P.type==="complete"?V({current:P.renamed,total:P.renamed,percent:100,status:"complete",message:`Renamed ${P.renamed} item(s)`}):P.type==="error"&&V(Se=>({...Se,status:"error",message:P.message}))}}u(),m()}catch(Q){console.error("Failed to rename file:",Q),V(I=>({...I,status:"error",message:"Failed to rename file"}))}}},[ft,u,m]),eo=x(vt,{children:[(T||K.showDownloadConfirm)&&c(Yi,{title:"Download from CDN",message:(()=>{const le=K.showDownloadConfirm?K.downloadImageCount:te,Q=K.showDownloadConfirm?K.downloadTotalSelected:aa;return Q>le?`Download ${le} of ${Q} selected file${Q!==1?"s":""} from Cloudflare R2? (${Q-le} not on CDN)`:`Download ${le} image${le!==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()}}),Ne&&c(vr,{title:k,progress:W,onStop:$i,onDeleteOrphans:wr,onClose:()=>{y(!1),V({current:0,total:0,percent:0,status:"processing"}),m()}})]});return D?eo:x(vt,{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:Ll,onCancel:()=>U(!1)}),be&&c(Yi,{title:"Push to CDN",message:`Push ${Ee} image${Ee!==1?"s":""} to Cloudflare R2?${Le?" Remote images will be downloaded first.":""}${Xe?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:En,onCancel:()=>ge(!1)}),at&&c(gr,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:Nl,onCancel:()=>Qe(!1)}),Me&&c(Th,{selectedItems:o,currentPath:p,onMove:le=>{ut(!1),Wi(le)},onCancel:()=>ut(!1)}),Zt&&Yn&&c(gr,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:Ja,defaultValue:Ja,confirmLabel:"Rename",onConfirm:cl,onCancel:()=>ne(!1)}),Ht&&ft&&c(gr,{title:"Rename File",message:"Enter a new name for the file:",placeholder:_t,defaultValue:_t,confirmLabel:"Rename",onConfirm:Fa,onCancel:()=>rt(!1)}),we&&c(Mh,{title:we.title,message:we.message,onClose:()=>{he(null),m()}}),c(Ah,{isOpen:Bt,onClose:()=>un(!1)}),Ce&&c(eg,{currentPath:p,onClose:()=>ee(!1),onUploadComplete:()=>{ee(!1),m()}}),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:()=>ee(!0),disabled:me||rl,children:[c(lg,{}),"Add New"]}),x("button",{css:ve.btn,onClick:()=>{Xt?rt(!0):kn?ne(!0):Qe(!0)},disabled:rl&&!kn&&!Xt,title:rl&&!kn&&!Xt?"Cannot create folders in protected images folder":void 0,children:[Xt||kn?c(rg,{}):c(og,{}),Xt?"Rename File":kn?"Rename Folder":"New Folder"]}),c("div",{css:ve.divider}),x("div",{css:ve.cloudDropdownWrapper,ref:Ka,children:[x("button",{css:ve.btn,onClick:()=>An(!Ol),disabled:K.showProgress||rl,title:rl?"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"})})]}),Ol&&x("div",{css:ve.cloudDropdown,children:[x("button",{css:[ve.cloudDropdownItem,ve.cloudDropdownItemDefault,"",""],onClick:()=>{An(!1),Fi("generate")},children:[c(mg,{}),"Generate Thumbnails"]}),x("button",{css:[ve.cloudDropdownItem,ve.cloudDropdownItemDanger,"",""],onClick:()=>{An(!1),Fi("remove")},children:[c(gg,{}),"Remove Thumbnails"]})]})]}),x("button",{css:[ve.btn,ve.btnDanger,"",""],onClick:zr,disabled:!wn,children:[c(ig,{}),"Delete"]}),x("button",{css:ve.btn,onClick:Ar,disabled:!wn,children:[c(cg,{}),"Move"]}),x("div",{css:ve.cloudDropdownWrapper,ref:kt,children:[x("button",{css:[ve.btn,ve.btnCloud,"",""],onClick:()=>jt(!ol),disabled:!wn,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"})})]}),ol&&wn&&x("div",{css:ve.cloudDropdown,children:[Pi&&x(vt,{children:[x("button",{css:ve.cloudDropdownItem,onClick:()=>{jt(!1),qn()},children:[c(sg,{}),"Push Update"]}),x("button",{css:[ve.cloudDropdownItem,ve.cloudDropdownItemDanger,"",""],onClick:()=>{jt(!1),ra()},children:[c(ug,{}),"Cancel Update"]}),c("div",{css:ve.cloudDropdownDivider})]}),x("button",{css:ve.cloudDropdownItem,onClick:()=>{jt(!1),Vt()},children:[c(sh,{}),"Push CDN"]}),x("button",{css:ve.cloudDropdownItem,onClick:()=>{jt(!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:()=>Cn(""),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:[wn&&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 p=await u.json().catch(()=>({}));throw new Error(p.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 p=await fetch("/api/studio/upload",{method:"POST",body:u});if(!p.ok){const m=await p.json().catch(()=>({}));throw new Error(m.error||`Upload failed: ${p.status}`)}return p.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:p,selectRange:m,lastSelectedPath:D,selectAll:_,clearSelection:O,refreshKey:S,setFocusedItem:X,triggerRefresh:H,triggerScan:K,searchQuery:oe,showError:L,setFileItems:Y}=Qa(),[Ce,ee]=w.useState([]),[me,ie]=w.useState(!0),[ue,q]=w.useState(!1),J=w.useRef(!0),U=w.useRef(o);w.useEffect(()=>{async function B(){const te=U.current!==o;(J.current||te)&&ie(!0),U.current=o;try{const De=oe&&oe.length>=2?await Zs.search(oe):await Zs.list(o),Ne=De.items||[];ee(Ne),Y(Ne),q(De.isEmpty===!0)}catch(De){const Ne=De instanceof Error?De.message:"Failed to load items";L("Load Error",Ne),ee([]),Y([]),q(!1)}ie(!1),J.current=!1}B()},[o,S,oe,L,Y]);const be=o==="public",ge=oe&&oe.length>=2,Ee=[...Ce].sort((B,te)=>B.type==="folder"&&te.type!=="folder"?-1:B.type!=="folder"&&te.type==="folder"?1:B.name.localeCompare(te.name)),Re=Ee.length>0&&Ee.every(B=>u.has(B.path)),Le=Ee.some(B=>u.has(B.path)),ot=w.useCallback((B,te)=>{te.shiftKey&&D?m(D,B.path,Ee):p(B.path)},[D,m,Ee,p]),Xe=w.useCallback(B=>{B.type==="folder"?s(B.path):X(B)},[s,X]),Ve=w.useCallback(async B=>{try{const te="/"+B.path.replace(/^public\//,"");await Zs.reprocess([te]),H()}catch(te){const De=te instanceof Error?te.message:"Failed to generate thumbnail";L("Processing Error",De)}},[H,L]),T=w.useCallback(()=>{Re?O():_(Ee)},[Re,O,_,Ee]);return{items:Ce,loading:me,sortedItems:Ee,metaEmpty:ue,isAtRoot:be,isSearching:ge,allItemsSelected:Re,someItemsSelected:Le,currentPath:o,selectedItems:u,navigateUp:h,handleItemClick:ot,handleOpen:Xe,handleGenerateThumbnail:Ve,handleSelectAll:T,triggerScan:K}}const vg=Bn`
68
+ to { transform: rotate(360deg); }
69
+ `,ae={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:p,allItemsSelected:m,someItemsSelected:D,selectedItems:_,navigateUp:O,handleItemClick:S,handleOpen:X,handleGenerateThumbnail:H,handleSelectAll:K,triggerScan:oe}=Eh();return o?c("div",{css:ae.loading,children:c("div",{css:ae.spinner})}):h&&u?x("div",{css:ae.empty,children:[c("svg",{css:ae.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:ae.emptyText,children:"No files tracked yet"}),c("p",{css:ae.emptyText,children:"Click Scan to discover files in your public folder"}),c("button",{css:ae.scanButton,onClick:oe,children:"Scan for Files"})]}):s.length===0&&u?x("div",{css:ae.empty,children:[c("svg",{css:ae.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:ae.emptyText,children:"No files in this folder"}),c("p",{css:ae.emptyText,children:"Upload images or click Scan in the toolbar"})]}):x("div",{children:[s.length>0&&c("div",{css:ae.selectAllRow,children:x("label",{css:ae.selectAllLabel,children:[c("input",{type:"checkbox",css:ae.selectAllCheckbox,checked:m,ref:L=>{L&&(L.indeterminate=D&&!m)},onChange:K}),"Select all (",s.length,")"]})}),x("div",{css:ae.grid,children:[!u&&!p&&x("div",{css:[ae.item,ae.parentItem,"",""],onClick:O,children:[c("div",{css:ae.content,children:c("svg",{css:ae.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:ae.label,children:[c("p",{css:ae.name,children:".."}),c("p",{css:ae.size,children:"Parent folder"})]})]}),s.map(L=>c(Sg,{item:L,isSelected:_.has(L.path),onClick:Y=>S(L,Y),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:p}){const[m,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 Y="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(Y),D(!0),setTimeout(()=>D(!1),1500)},oe=L=>{if(S){L.stopPropagation(),u();return}h(L)};return x("div",{css:[ae.item,s&&!S&&ae.itemSelected,"",""],onClick:oe,children:[!S&&c("div",{css:ae.checkboxWrapper,onClick:L=>L.stopPropagation(),children:c("input",{type:"checkbox",css:ae.checkbox,checked:s,onChange:()=>h({})})}),x("div",{css:ae.content,children:[x("button",{css:ae.copyBtn,onClick:K,title:"Copy file path",children:[m&&c("span",{css:ae.tooltip,children:"Copied!"}),c("svg",{css:ae.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:ae.openBtn,onClick:L=>{L.stopPropagation(),u()},children:"Open"}),_?S?x("div",{css:ae.imagesFolderWrapper,children:[c("svg",{css:ae.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:ae.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:ae.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:ae.image,src:o.thumbnail,alt:o.name,loading:"lazy"}):c("svg",{css:ae.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:ae.label,children:c("div",{css:ae.labelRow,children:x("div",{css:ae.labelText,children:[c("p",{css:ae.name,title:o.name,children:o.name}),_?x("div",{css:ae.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&x("span",{css:[ae.folderStat,ae.folderStatLocal,"",""],title:`${o.localCount} local`,children:[c("svg",{css:ae.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:[ae.folderStat,ae.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[c("svg",{css:ae.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:[ae.folderStat,ae.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[c("svg",{css:ae.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:[ae.folderStat,ae.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[c("svg",{css:ae.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:ae.size,children:[o.fileCount," files"]})]}):x("div",{css:ae.statusRow,children:[c("div",{css:ae.statusLeft,children:o.hasUpdate?x(vt,{children:[c("svg",{css:ae.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:ae.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:ae.updateLabel,children:"update"})]}):o.cdnPushed?c("svg",{css:o.isRemote?ae.storedIconRemote:ae.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:ae.size,children:Cg(o.size)}):null}),H&&c("span",{css:ae.thumbChips,children:X?c("span",{css:ae.thumbChip,children:X}):x(vt,{children:[o.hasSm&&c("span",{css:ae.thumbChip,children:"SM"}),o.hasMd&&c("span",{css:ae.thumbChip,children:"MD"}),o.hasLg&&c("span",{css:ae.thumbChip,children:"LG"}),o.hasFull&&c("span",{css:ae.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=Bn`
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:p,allItemsSelected:m,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:m,ref:L=>{L&&(L.indeterminate=D&&!m)},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&&!p&&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:Y=>S(L,Y),onOpen:()=>X(L),onGenerateThumbnail:()=>H(L)},L.path))]})]})})}function Mg({item:o,isSelected:s,onClick:h,onOpen:u,onGenerateThumbnail:p}){const[m,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:[m&&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):"",p=h>0?o.substring(0,h):o,m=s-u.length-3;if(m<6)return o.substring(0,s-3)+"...";const D=Math.ceil(m/2),_=Math.floor(m/2);return p.substring(0,D)+"..."+p.substring(p.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 de={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:p,requestMove:m,requestSync:D,requestDownload:_,requestProcess:O,actionState:S}=Qa(),[X,H]=w.useState(!1),[K,oe]=w.useState(!1),[L,Y]=w.useState({current:0,total:1,percent:0,status:"processing",message:"Renaming..."}),[Ce,ee]=w.useState(!1),[me,ie]=w.useState(null),[ue,q]=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 Le=Dg(o.name),ot=kg(o.name),Xe="/"+o.path.replace(/^public\//,""),Ve=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${Xe}`:Xe,T=typeof window<"u"?window.location.origin:"",B=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${Xe}`:`${T}${Xe}`,te=()=>{s(null)},De=()=>{navigator.clipboard.writeText(B),q(!0),setTimeout(()=>q(!1),1500)},Ne=async G=>{if(G&&G!==o.name){H(!1),oe(!0),Y({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:G})});if(!W.body)throw new Error("No response body");const V=W.body.getReader(),we=new TextDecoder;let he="",at="";for(;;){const{done:Qe,value:Zt}=await V.read();if(Qe)break;he+=we.decode(Zt,{stream:!0});const ne=he.split(`
72
+ `);he=ne.pop()||"";for(const Ht of ne){if(!Ht.startsWith("data: "))continue;const rt=JSON.parse(Ht.slice(6));rt.type==="start"?Y({current:0,total:rt.total,percent:0,status:"processing",message:rt.message}):rt.type==="progress"?Y({current:rt.current,total:rt.total,percent:Math.round(rt.current/rt.total*100),status:"processing",message:rt.message}):rt.type==="complete"?(at=rt.newPath,Y({current:rt.renamed,total:rt.renamed,percent:100,status:"complete",message:"Renamed successfully"})):rt.type==="error"&&(Y(Me=>({...Me,status:"error",message:rt.message})),ie({title:"Rename Failed",message:rt.message}))}}at&&(s({...o,path:at,name:at.split("/").pop()||G}),h())}catch(W){console.error("Rename error:",W),Y(V=>({...V,status:"error",message:"Failed to rename"})),ie({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 G=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+o.path.replace(/^public\//,"")})});if(!G.ok){const we=await G.json();ge({current:0,total:3,percent:0,status:"error",message:we.error||"Failed to generate favicons"});return}const W=G.body?.getReader(),V=new TextDecoder;if(W){let we="";for(;;){const{done:he,value:at}=await W.read();if(he)break;we+=V.decode(at,{stream:!0});const Qe=we.split(`
73
+ `);we=Qe.pop()||"";for(const Zt of Qe)if(Zt.startsWith("data: "))try{const ne=JSON.parse(Zt.slice(6));ne.type==="start"?ge(Ht=>({...Ht,total:ne.total})):ne.type==="progress"?ge({current:ne.current,total:ne.total,percent:ne.percent,status:"processing",message:ne.message}):ne.type==="complete"?ge({current:ne.processed,total:ne.processed,percent:100,status:ne.errors>0?"error":"complete",message:ne.message}):ne.type==="error"&&ge(Ht=>({...Ht,status:"error",message:ne.message}))}catch{}}}}catch(G){console.error("Favicon generation error:",G),ge({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},k=()=>Le?c("img",{css:de.image,src:Ve,alt:o.name}):ot?c("video",{css:de.video,src:Ve,controls:!0}):x("div",{css:de.filePlaceholder,children:[c("svg",{css:de.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:de.fileName,children:o.name})]});return x(vt,{children:[me&&c(Mh,{title:me.title,message:me.message,onClose:()=>ie(null)}),c(Ah,{isOpen:Ce,onClose:()=>ee(!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:Ne,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:de.overlay,onClick:te,children:x("div",{css:de.container,onClick:G=>G.stopPropagation(),children:[x("div",{css:de.main,children:[x("div",{css:de.headerButtons,children:[o.cdnPushed&&!o.isRemote&&c("span",{css:de.statusIcon,title:"Pushed to CDN",children:c("svg",{css:de.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:de.statusIcon,title:"Remote image",children:c("svg",{css:de.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:de.copyBtn,onClick:De,title:"Copy file path",children:[ue&&c("span",{css:de.tooltip,children:"Copied!"}),c("svg",{css:de.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:de.mainCloseBtn,onClick:te,"aria-label":"Close",children:c("svg",{css:de.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:de.mediaWrapper,children:k()})]}),x("div",{css:de.sidebar,children:[c("div",{css:de.sidebarHeader,children:c("h3",{css:de.sidebarTitle,children:"Details"})}),x("div",{css:de.sidebarContent,children:[x("div",{css:de.info,children:[x("div",{css:de.infoRow,children:[c("span",{css:de.infoLabel,children:"Name"}),c("span",{css:de.infoValueWrap,children:o.name})]}),x("div",{css:de.infoRow,children:[c("span",{css:de.infoLabel,children:"Path"}),c("span",{css:de.infoValueWrap,children:o.path.replace(/^public\//,"")})]}),o.size!==void 0&&x("div",{css:de.infoRow,children:[c("span",{css:de.infoLabel,children:"Size"}),c("span",{css:de.infoValue,children:Rg(o.size)})]}),o.dimensions&&x("div",{css:de.infoRow,children:[c("span",{css:de.infoLabel,children:"Dimensions"}),x("span",{css:de.infoValue,children:[o.dimensions.width," × ",o.dimensions.height]})]}),x("div",{css:de.infoRow,children:[c("span",{css:de.infoLabel,children:"CDN Status"}),c("span",{css:de.infoValue,children:o.cdnPushed?o.isRemote?"Remote":"Pushed":"Local"})]}),x("div",{css:de.infoRow,children:[c("span",{css:de.infoLabel,children:"URL"}),c("a",{href:B,target:"_blank",rel:"noopener noreferrer",css:de.infoLink,title:B,children:B})]})]}),x("div",{css:de.actions,children:[x("button",{css:de.actionBtn,onClick:()=>H(!0),disabled:o.isProtected,children:[c("svg",{css:de.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:de.actionBtn,onClick:()=>m([o.path]),disabled:Ee||o.isProtected,children:[c("svg",{css:de.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:[de.actionBtn,de.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:de.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:[de.actionBtn,de.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:de.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:de.actionBtn,onClick:()=>O([o.path]),disabled:Ee||o.isProtected,children:[c("svg",{css:de.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:de.actionBtn,onClick:y,disabled:J||o.isProtected,children:[c("svg",{css:de.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:[de.actionBtn,de.actionBtnDanger,"",""],onClick:()=>p([o.path]),disabled:Ee||o.isProtected,children:[c("svg",{css:de.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(vt,{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),[p,m]=w.useState([]),[D,_]=w.useState(!0),[O,S]=w.useState(!1),[X,H]=w.useState(!1);w.useEffect(()=>{async function ee(){try{const ie=await(await fetch("/api/studio/cdns")).json();m(ie.cdns||[])}catch(me){console.error("Failed to load CDN URLs:",me)}finally{_(!1)}}ee()},[]);const K=()=>{navigator.clipboard.writeText(Ug),u(!0),setTimeout(()=>u(!1),2e3)},oe=w.useCallback((ee,me)=>{m(ie=>{const ue=[...ie];return ue[ee]=me,ue}),H(!0)},[]),L=w.useCallback(()=>{m(ee=>[...ee,""]),H(!0)},[]),Y=w.useCallback(ee=>{m(me=>me.filter((ie,ue)=>ue!==ee)),H(!0)},[]),Ce=w.useCallback(async()=>{S(!0);try{(await fetch("/api/studio/cdns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cdns:p})})).ok&&(H(!1),s(),o())}catch(ee){console.error("Failed to save CDN URLs:",ee)}finally{S(!1)}},[p,s,o]);return c("div",{css:_e.overlay,onClick:o,children:x("div",{css:_e.panel,onClick:ee=>ee.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(vt,{children:[c("div",{css:_e.cdnList,children:p.map((ee,me)=>x("div",{css:_e.cdnRow,children:[c("span",{css:_e.cdnIndex,children:me}),c("input",{css:_e.cdnInput,type:"text",value:ee,onChange:ie=>oe(me,ie.target.value),placeholder:"https://cdn.example.com"}),c("button",{css:_e.cdnDeleteBtn,onClick:()=>Y(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"]}),p.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:Ce,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[p,m]=w.useState(fh),D=w.useRef(null),_=w.useCallback(J=>{m(U=>({...U,progressState:typeof J=="function"?J(U.progressState):{...U.progressState,...J}}))},[]),O=w.useCallback(J=>{m(U=>({...U,actionPaths:J,showDeleteConfirm:!0}))},[]),S=w.useCallback(J=>{m(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 Le=U.find(ot=>ot.path===Re);Le&&(Le.isRemote?ge=!0:Le.cdnPushed||(Ee=!0))}m(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)}m(ge=>({...ge,actionPaths:be,downloadImageCount:be.length,downloadTotalSelected:J.length,showDownloadConfirm:!0}))},[]),K=w.useCallback(J=>{m(U=>({...U,actionPaths:J,showProcessConfirm:!0,processMode:"generate"}))},[]),oe=w.useCallback(J=>{m(U=>({...U,processMode:J}))},[]),L=w.useCallback(()=>{m(J=>({...J,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),Y=w.useCallback(()=>{m(fh)},[]),Ce=w.useCallback(()=>{D.current&&D.current.abort()},[]),ee=w.useCallback(async()=>{const J=p.actionPaths;m(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.")}},[p.actionPaths,s,h,o,u]),me=w.useCallback(async J=>{const U=p.actionPaths;m(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:Le,value:ot}=await ge.read();if(Le)break;Re+=Ee.decode(ot,{stream:!0});const Xe=Re.split(`
82
+ `);Re=Xe.pop()||"";for(const Ve of Xe)if(Ve.startsWith("data: "))try{const T=JSON.parse(Ve.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."}))}},[p.actionPaths,s,h,o,u,_]),ie=w.useCallback(async()=>{const U=p.actionPaths.map(Ee=>"/"+Ee.replace(/^public\//,""));m(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 Le=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[Re]})});if(Le.ok)be++;else{const ot=await Le.json();ge.push(`${Re}: ${ot.error||"Unknown error"}`)}}catch(Le){ge.push(`${Re}: ${Le instanceof Error?Le.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()},[p.actionPaths,s,o,u,_]),ue=w.useCallback(async()=>{const J=p.actionPaths,U=p.processMode,be=J.map(Xe=>{const Ve=Xe.replace(/^public\//,"");return Ve.startsWith("/")?Ve:`/${Ve}`}),ge=U==="remove",Ee=ge?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",Re=ge?"Removing Thumbnails":"Generating Thumbnails",Le=ge?"Removing thumbnails...":"Generating thumbnails...";m(Xe=>({...Xe,showProcessConfirm:!1,showProgress:!0,progressTitle:Re,progressState:{current:0,total:be.length,percent:0,status:"processing",message:Le}})),D.current=new AbortController;const ot=D.current.signal;try{const Xe=await fetch(Ee,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:be}),signal:ot});if(!Xe.ok){const B=await Xe.json();_({current:0,total:be.length,percent:0,status:"error",message:B.error||(ge?"Failed to remove thumbnails":"Processing failed")});return}const Ve=Xe.body?.getReader(),T=new TextDecoder;if(Ve){let B="";for(;;){const{done:te,value:De}=await Ve.read();if(te)break;B+=T.decode(De,{stream:!0});const Ne=B.split(`
85
+ `);B=Ne.pop()||"";for(const y of Ne)if(y.startsWith("data: "))try{const k=JSON.parse(y.slice(6));k.type==="start"?_(G=>({...G,total:k.total})):k.type==="progress"?_({current:k.current,total:k.total,percent:k.percent,status:"processing",message:k.message}):k.type==="cleanup"?_(G=>({...G,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"&&_(G=>({...G,status:"error",message:k.message}))}catch{}}}}catch(Xe){ot.aborted?_(Ve=>({...Ve,status:"stopped",message:ge?"Removal stopped by user":"Processing stopped by user"})):(console.error("Processing error:",Xe),_({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}},[p.actionPaths,p.processMode,o,_]),q=w.useCallback(async()=>{const J=p.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.")}},[p.progressState.orphanedFiles,o,u,_]);return{actionState:p,setActionState:m,abortController:D.current,requestDelete:O,requestMove:S,requestSync:X,requestDownload:H,requestProcess:K,setProcessMode:oe,cancelAction:L,closeProgress:Y,stopProcessing:Ce,confirmDelete:ee,confirmMove:me,confirmSync:ie,confirmProcess:ue,deleteOrphans:q}}const jg="36px",Dt={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:p}){const m=o||(()=>{}),[D,_]=w.useState("public"),[O,S]=w.useState(new Set),[X,H]=w.useState(null),[K,oe]=w.useState("grid"),[L,Y]=w.useState(null),[Ce,ee]=w.useState(null),[me,ie]=w.useState(!1),[ue,q]=w.useState(0),[J,U]=w.useState(!1),[be,ge]=w.useState(""),[Ee,Re]=w.useState(null),[Le,ot]=w.useState([]),[Xe,Ve]=w.useState(!1),T=w.useCallback(()=>{q(Me=>Me+1)},[]);w.useEffect(()=>{if(L&&Le.length>0){const Me=Le.find(ut=>ut.path===L.path);Me&&JSON.stringify(Me)!==JSON.stringify(L)&&Y(Me)}},[Le,L]);const B=w.useCallback(()=>{U(!0)},[]),te=w.useCallback(()=>{U(!1)},[]),De=w.useCallback((Me,ut)=>{Re({title:Me,message:ut})},[]),Ne=w.useCallback(()=>{Re(null)},[]),y=w.useCallback(Me=>{Me.preventDefault(),Me.stopPropagation(),Ve(!0)},[]),k=w.useCallback(Me=>{Me.preventDefault(),Me.stopPropagation(),Ve(!1)},[]),G=w.useCallback(async Me=>{Me.preventDefault(),Me.stopPropagation(),Ve(!1);const ut=Array.from(Me.dataTransfer.files);if(ut.length!==0&&!(D==="public/images"||D.startsWith("public/images/"))){for(const Bt of ut){const un=new FormData;un.append("file",Bt),un.append("path",D);try{await fetch("/api/studio/upload",{method:"POST",body:un})}catch(jn){console.error("Upload error:",jn)}}T()}},[D,T]),W=w.useCallback(()=>{if(D==="public")return;const Me=D.split("/");Me.pop(),_(Me.join("/")||"public"),S(new Set)},[D]),V=w.useCallback(Me=>{_(Me),S(new Set),Y(null)},[]),we=w.useCallback(Me=>{S(ut=>{const Bt=new Set(ut);return Bt.has(Me)?Bt.delete(Me):Bt.add(Me),Bt}),H(Me)},[]),he=w.useCallback((Me,ut,Bt)=>{const un=Bt.findIndex(jt=>jt.path===Me),jn=Bt.findIndex(jt=>jt.path===ut);if(un===-1||jn===-1)return;const ta=Math.min(un,jn),ol=Math.max(un,jn);S(jt=>{const Ol=new Set(jt);for(let An=ta;An<=ol;An++)Ol.add(Bt[An].path);return Ol}),H(ut)},[]),at=w.useCallback(Me=>{S(new Set(Me.map(ut=>ut.path)))},[]),Qe=w.useCallback(()=>{S(new Set)},[]),Zt=w.useCallback(Me=>{Y(Me)},[]),ne=Bg({triggerRefresh:T,clearSelection:Qe,setFocusedItem:Zt,showError:De}),Ht=w.useCallback(Me=>{if(Me.key==="Escape"){const ut=Me.target;if(ut.tagName==="INPUT"||ut.tagName==="TEXTAREA")return;L?Y(null):h||m()}},[m,L,h]);w.useEffect(()=>(s&&(document.addEventListener("keydown",Ht),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",Ht),document.body.style.overflow=""}),[Ht,s]);const rt={isOpen:!0,openStudio:()=>{},closeStudio:m,toggleStudio:m,currentPath:D,setCurrentPath:V,navigateUp:W,selectedItems:O,toggleSelection:we,selectRange:he,selectAll:at,clearSelection:Qe,lastSelectedPath:X,viewMode:K,setViewMode:oe,focusedItem:L,setFocusedItem:Y,meta:Ce,setMeta:ee,isLoading:me,setIsLoading:ie,refreshKey:ue,triggerRefresh:T,scanRequested:J,triggerScan:B,clearScanRequest:te,searchQuery:be,setSearchQuery:ge,error:Ee,showError:De,clearError:Ne,fileItems:Le,setFileItems:ot,actionState:ne.actionState,requestDelete:ne.requestDelete,requestMove:ne.requestMove,requestSync:ne.requestSync,requestDownload:ne.requestDownload,requestProcess:ne.requestProcess,setProcessMode:ne.setProcessMode,confirmDelete:ne.confirmDelete,confirmMove:ne.confirmMove,confirmSync:ne.confirmSync,confirmProcess:ne.confirmProcess,cancelAction:ne.cancelAction,closeProgress:ne.closeProgress,stopProcessing:ne.stopProcessing,abortController:ne.abortController,deleteOrphans:ne.deleteOrphans};return c(zh.Provider,{value:rt,children:x("div",{css:Dt.container,children:[x("div",{css:Dt.header,children:[c("div",{css:Dt.headerLeft,children:c("h1",{css:Dt.title,children:"Studio"})}),c("div",{css:Dt.headerCenter,children:c(Xg,{currentPath:D,onNavigate:V,projectName:u?u.split("/").pop():void 0})}),x("div",{css:Dt.headerActions,children:[p&&c("a",{href:p,target:"_blank",rel:"noopener noreferrer",css:Dt.headerIconBtn,title:`Open ${p}`,children:c(Qg,{})}),c(Lg,{}),!h&&c("button",{css:Dt.headerBtn,onClick:m,"aria-label":"Close Studio",children:c(Zg,{})})]})]}),c(ng,{}),x("div",{css:Dt.content,onDragOver:y,onDragLeave:k,onDrop:G,children:[Xe&&c("div",{css:Dt.dropOverlay,children:x("div",{css:Dt.dropMessage,children:[c("svg",{css:Dt.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:Dt.fileBrowser,children:K==="grid"?c(bg,{}):c(zg,{})})]}),L&&c(_g,{}),c(Hg,{}),ne.actionState.showDeleteConfirm&&c(Yi,{title:"Delete Files",message:`Are you sure you want to delete ${ne.actionState.actionPaths.length} item${ne.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:ne.confirmDelete,onCancel:ne.cancelAction}),ne.actionState.showSyncConfirm&&c(Yi,{title:"Push to CDN",message:`Push ${ne.actionState.syncImageCount} image${ne.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${ne.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${ne.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:ne.confirmSync,onCancel:ne.cancelAction}),ne.actionState.showProcessConfirm&&c(Vg,{imageCount:ne.actionState.actionPaths.length,mode:ne.actionState.processMode,onConfirm:ne.confirmProcess,onCancel:ne.cancelAction}),ne.actionState.showMoveModal&&c(Th,{selectedItems:new Set(ne.actionState.actionPaths),currentPath:D,onMove:Me=>ne.confirmMove(Me),onCancel:ne.cancelAction}),ne.actionState.showProgress&&c(vr,{title:ne.actionState.progressTitle,progress:ne.actionState.progressState,onStop:ne.stopProcessing,onDeleteOrphans:ne.deleteOrphans,onClose:ne.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 p={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;}","")},m=s==="remove",D=m?"Remove Thumbnails":"Generate Thumbnails",_=m?`Remove generated thumbnails for ${o} image${o!==1?"s":""}? Original images will be kept.`:`Generate thumbnails for ${o} image${o!==1?"s":""}?`,O=m?"Remove":"Generate";return c("div",{css:p.overlay,onClick:u,children:x("div",{css:p.container,onClick:S=>S.stopPropagation(),children:[c("h2",{css:p.title,children:D}),c("p",{css:p.message,children:_}),x("div",{css:p.actions,children:[c("button",{css:p.cancelBtn,onClick:u,children:"Cancel"}),c("button",{css:[p.confirmBtn,m&&p.confirmBtnDanger,"",""],onClick:h,children:O})]})]})})}function Xg({currentPath:o,onNavigate:s,projectName:h}){const u=o.split("/").filter(Boolean),p=u.map((m,D)=>({name:D===0&&m==="public"&&h?h:m,path:u.slice(0,D+1).join("/")}));return c("div",{css:Dt.breadcrumbs,children:p.map((m,D)=>x("span",{style:{display:"flex",alignItems:"center",gap:6},children:[D>0&&c("span",{css:Dt.breadcrumbSeparator,children:"/"}),D===p.length-1?c("span",{css:Dt.breadcrumbCurrent,children:m.name}):c("span",{css:Dt.breadcrumbItem,onClick:()=>s(m.path),children:m.name})]},m.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:Dt.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})})}));