@gallop.software/studio 2.3.141 → 2.3.142

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,94 @@
1
+ function Pm(i,s){for(var f=0;f<s.length;f++){const d=s[f];if(typeof d!="string"&&!Array.isArray(d)){for(const h in d)if(h!=="default"&&!(h in i)){const m=Object.getOwnPropertyDescriptor(d,h);m&&Object.defineProperty(i,h,m.get?m:{enumerable:!0,get:()=>d[h]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))d(h);new MutationObserver(h=>{for(const m of h)if(m.type==="childList")for(const w of m.addedNodes)w.tagName==="LINK"&&w.rel==="modulepreload"&&d(w)}).observe(document,{childList:!0,subtree:!0});function f(h){const m={};return h.integrity&&(m.integrity=h.integrity),h.referrerPolicy&&(m.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?m.credentials="include":h.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function d(h){if(h.ep)return;h.ep=!0;const m=f(h);fetch(h.href,m)}})();function eg(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Fc={exports:{}},ei={};var tp;function tg(){if(tp)return ei;tp=1;var i=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function f(d,h,m){var w=null;if(m!==void 0&&(w=""+m),h.key!==void 0&&(w=""+h.key),"key"in h){m={};for(var D in h)D!=="key"&&(m[D]=h[D])}else m=h;return h=m.ref,{$$typeof:i,type:d,key:w,ref:h!==void 0?h:null,props:m}}return ei.Fragment=s,ei.jsx=f,ei.jsxs=f,ei}var np;function ng(){return np||(np=1,Fc.exports=tg()),Fc.exports}var oi=ng(),Jc={exports:{}},Ne={};var ap;function ag(){if(ap)return Ne;ap=1;var i=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),w=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),A=Symbol.for("react.lazy"),k=Symbol.for("react.activity"),B=Symbol.iterator;function Y(S){return S===null||typeof S!="object"?null:(S=B&&S[B]||S["@@iterator"],typeof S=="function"?S:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},G=Object.assign,oe={};function K(S,H,P){this.props=S,this.context=H,this.refs=oe,this.updater=P||U}K.prototype.isReactComponent={},K.prototype.setState=function(S,H){if(typeof S!="object"&&typeof S!="function"&&S!=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,S,H,"setState")},K.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function ce(){}ce.prototype=K.prototype;function ie(S,H,P){this.props=S,this.context=H,this.refs=oe,this.updater=P||U}var he=ie.prototype=new ce;he.constructor=ie,G(he,K.prototype),he.isPureReactComponent=!0;var V=Array.isArray;function I(){}var W={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function N(S,H,P){var se=P.ref;return{$$typeof:i,type:S,key:H,ref:se!==void 0?se:null,props:P}}function L(S,H){return N(S.type,H,S.props)}function ee(S){return typeof S=="object"&&S!==null&&S.$$typeof===i}function ae(S){var H={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(P){return H[P]})}var ue=/\/+/g;function ne(S,H){return typeof S=="object"&&S!==null&&S.key!=null?ae(""+S.key):H.toString(36)}function _e(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(I,I):(S.status="pending",S.then(function(H){S.status==="pending"&&(S.status="fulfilled",S.value=H)},function(H){S.status==="pending"&&(S.status="rejected",S.reason=H)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function E(S,H,P,se,Se){var De=typeof S;(De==="undefined"||De==="boolean")&&(S=null);var Ge=!1;if(S===null)Ge=!0;else switch(De){case"bigint":case"string":case"number":Ge=!0;break;case"object":switch(S.$$typeof){case i:case s:Ge=!0;break;case A:return Ge=S._init,E(Ge(S._payload),H,P,se,Se)}}if(Ge)return Se=Se(S),Ge=se===""?"."+ne(S,0):se,V(Se)?(P="",Ge!=null&&(P=Ge.replace(ue,"$&/")+"/"),E(Se,H,P,"",function(en){return en})):Se!=null&&(ee(Se)&&(Se=L(Se,P+(Se.key==null||S&&S.key===Se.key?"":(""+Se.key).replace(ue,"$&/")+"/")+Ge)),H.push(Se)),1;Ge=0;var vt=se===""?".":se+":";if(V(S))for(var Oe=0;Oe<S.length;Oe++)se=S[Oe],De=vt+ne(se,Oe),Ge+=E(se,H,P,De,Se);else if(Oe=Y(S),typeof Oe=="function")for(S=Oe.call(S),Oe=0;!(se=S.next()).done;)se=se.value,De=vt+ne(se,Oe++),Ge+=E(se,H,P,De,Se);else if(De==="object"){if(typeof S.then=="function")return E(_e(S),H,P,se,Se);throw H=String(S),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return Ge}function J(S,H,P){if(S==null)return S;var se=[],Se=0;return E(S,se,"","",function(De){return H.call(P,De,Se++)}),se}function $(S){if(S._status===-1){var H=S._result;H=H(),H.then(function(P){(S._status===0||S._status===-1)&&(S._status=1,S._result=P)},function(P){(S._status===0||S._status===-1)&&(S._status=2,S._result=P)}),S._status===-1&&(S._status=0,S._result=H)}if(S._status===1)return S._result.default;throw S._result}var Me=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},Ye={map:J,forEach:function(S,H,P){J(S,function(){H.apply(this,arguments)},P)},count:function(S){var H=0;return J(S,function(){H++}),H},toArray:function(S){return J(S,function(H){return H})||[]},only:function(S){if(!ee(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return Ne.Activity=k,Ne.Children=Ye,Ne.Component=K,Ne.Fragment=f,Ne.Profiler=h,Ne.PureComponent=ie,Ne.StrictMode=d,Ne.Suspense=C,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=W,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(S){return W.H.useMemoCache(S)}},Ne.cache=function(S){return function(){return S.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(S,H,P){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var se=G({},S.props),Se=S.key;if(H!=null)for(De in H.key!==void 0&&(Se=""+H.key),H)!te.call(H,De)||De==="key"||De==="__self"||De==="__source"||De==="ref"&&H.ref===void 0||(se[De]=H[De]);var De=arguments.length-2;if(De===1)se.children=P;else if(1<De){for(var Ge=Array(De),vt=0;vt<De;vt++)Ge[vt]=arguments[vt+2];se.children=Ge}return N(S.type,Se,se)},Ne.createContext=function(S){return S={$$typeof:w,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:m,_context:S},S},Ne.createElement=function(S,H,P){var se,Se={},De=null;if(H!=null)for(se in H.key!==void 0&&(De=""+H.key),H)te.call(H,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(Se[se]=H[se]);var Ge=arguments.length-2;if(Ge===1)Se.children=P;else if(1<Ge){for(var vt=Array(Ge),Oe=0;Oe<Ge;Oe++)vt[Oe]=arguments[Oe+2];Se.children=vt}if(S&&S.defaultProps)for(se in Ge=S.defaultProps,Ge)Se[se]===void 0&&(Se[se]=Ge[se]);return N(S,De,Se)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(S){return{$$typeof:D,render:S}},Ne.isValidElement=ee,Ne.lazy=function(S){return{$$typeof:A,_payload:{_status:-1,_result:S},_init:$}},Ne.memo=function(S,H){return{$$typeof:g,type:S,compare:H===void 0?null:H}},Ne.startTransition=function(S){var H=W.T,P={};W.T=P;try{var se=S(),Se=W.S;Se!==null&&Se(P,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(I,Me)}catch(De){Me(De)}finally{H!==null&&P.types!==null&&(H.types=P.types),W.T=H}},Ne.unstable_useCacheRefresh=function(){return W.H.useCacheRefresh()},Ne.use=function(S){return W.H.use(S)},Ne.useActionState=function(S,H,P){return W.H.useActionState(S,H,P)},Ne.useCallback=function(S,H){return W.H.useCallback(S,H)},Ne.useContext=function(S){return W.H.useContext(S)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(S,H){return W.H.useDeferredValue(S,H)},Ne.useEffect=function(S,H){return W.H.useEffect(S,H)},Ne.useEffectEvent=function(S){return W.H.useEffectEvent(S)},Ne.useId=function(){return W.H.useId()},Ne.useImperativeHandle=function(S,H,P){return W.H.useImperativeHandle(S,H,P)},Ne.useInsertionEffect=function(S,H){return W.H.useInsertionEffect(S,H)},Ne.useLayoutEffect=function(S,H){return W.H.useLayoutEffect(S,H)},Ne.useMemo=function(S,H){return W.H.useMemo(S,H)},Ne.useOptimistic=function(S,H){return W.H.useOptimistic(S,H)},Ne.useReducer=function(S,H,P){return W.H.useReducer(S,H,P)},Ne.useRef=function(S){return W.H.useRef(S)},Ne.useState=function(S){return W.H.useState(S)},Ne.useSyncExternalStore=function(S,H,P){return W.H.useSyncExternalStore(S,H,P)},Ne.useTransition=function(){return W.H.useTransition()},Ne.version="19.2.4",Ne}var lp;function su(){return lp||(lp=1,Jc.exports=ag()),Jc.exports}var v=su();const it=eg(v),op=Pm({__proto__:null,default:it},[v]);function lg(i){if(i.sheet)return i.sheet;for(var s=0;s<document.styleSheets.length;s++)if(document.styleSheets[s].ownerNode===i)return document.styleSheets[s]}function og(i){var s=document.createElement("style");return s.setAttribute("data-emotion",i.key),i.nonce!==void 0&&s.setAttribute("nonce",i.nonce),s.appendChild(document.createTextNode("")),s.setAttribute("data-s",""),s}var ig=(function(){function i(f){var d=this;this._insertTag=function(h){var m;d.tags.length===0?d.insertionPoint?m=d.insertionPoint.nextSibling:d.prepend?m=d.container.firstChild:m=d.before:m=d.tags[d.tags.length-1].nextSibling,d.container.insertBefore(h,m),d.tags.push(h)},this.isSpeedy=f.speedy===void 0?!0:f.speedy,this.tags=[],this.ctr=0,this.nonce=f.nonce,this.key=f.key,this.container=f.container,this.prepend=f.prepend,this.insertionPoint=f.insertionPoint,this.before=null}var s=i.prototype;return s.hydrate=function(d){d.forEach(this._insertTag)},s.insert=function(d){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(og(this));var h=this.tags[this.tags.length-1];if(this.isSpeedy){var m=lg(h);try{m.insertRule(d,m.cssRules.length)}catch{}}else h.appendChild(document.createTextNode(d));this.ctr++},s.flush=function(){this.tags.forEach(function(d){var h;return(h=d.parentNode)==null?void 0:h.removeChild(d)}),this.tags=[],this.ctr=0},i})(),Pt="-ms-",Lr="-moz-",at="-webkit-",Dp="comm",cu="rule",uu="decl",rg="@import",Ep="@keyframes",sg="@layer",cg=Math.abs,Hr=String.fromCharCode,ug=Object.assign;function dg(i,s){return $t(i,0)^45?(((s<<2^$t(i,0))<<2^$t(i,1))<<2^$t(i,2))<<2^$t(i,3):0}function Tp(i){return i.trim()}function fg(i,s){return(i=s.exec(i))?i[0]:i}function lt(i,s,f){return i.replace(s,f)}function ou(i,s){return i.indexOf(s)}function $t(i,s){return i.charCodeAt(s)|0}function ii(i,s,f){return i.slice(s,f)}function Zn(i){return i.length}function du(i){return i.length}function Er(i,s){return s.push(i),i}function hg(i,s){return i.map(s).join("")}var Ur=1,no=1,Ap=0,fn=0,Nt=0,lo="";function Br(i,s,f,d,h,m,w){return{value:i,root:s,parent:f,type:d,props:h,children:m,line:Ur,column:no,length:w,return:""}}function ti(i,s){return ug(Br("",null,null,"",null,null,0),i,{length:-i.length},s)}function pg(){return Nt}function mg(){return Nt=fn>0?$t(lo,--fn):0,no--,Nt===10&&(no=1,Ur--),Nt}function Cn(){return Nt=fn<Ap?$t(lo,fn++):0,no++,Nt===10&&(no=1,Ur++),Nt}function Jn(){return $t(lo,fn)}function Tr(){return fn}function ci(i,s){return ii(lo,i,s)}function ri(i){switch(i){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 Rp(i){return Ur=no=1,Ap=Zn(lo=i),fn=0,[]}function _p(i){return lo="",i}function Ar(i){return Tp(ci(fn-1,iu(i===91?i+2:i===40?i+1:i)))}function gg(i){for(;(Nt=Jn())&&Nt<33;)Cn();return ri(i)>2||ri(Nt)>3?"":" "}function yg(i,s){for(;--s&&Cn()&&!(Nt<48||Nt>102||Nt>57&&Nt<65||Nt>70&&Nt<97););return ci(i,Tr()+(s<6&&Jn()==32&&Cn()==32))}function iu(i){for(;Cn();)switch(Nt){case i:return fn;case 34:case 39:i!==34&&i!==39&&iu(Nt);break;case 40:i===41&&iu(i);break;case 92:Cn();break}return fn}function bg(i,s){for(;Cn()&&i+Nt!==57;)if(i+Nt===84&&Jn()===47)break;return"/*"+ci(s,fn-1)+"*"+Hr(i===47?i:Cn())}function vg(i){for(;!ri(Jn());)Cn();return ci(i,fn)}function xg(i){return _p(Rr("",null,null,null,[""],i=Rp(i),0,[0],i))}function Rr(i,s,f,d,h,m,w,D,C){for(var g=0,A=0,k=w,B=0,Y=0,U=0,G=1,oe=1,K=1,ce=0,ie="",he=h,V=m,I=d,W=ie;oe;)switch(U=ce,ce=Cn()){case 40:if(U!=108&&$t(W,k-1)==58){ou(W+=lt(Ar(ce),"&","&\f"),"&\f")!=-1&&(K=-1);break}case 34:case 39:case 91:W+=Ar(ce);break;case 9:case 10:case 13:case 32:W+=gg(U);break;case 92:W+=yg(Tr()-1,7);continue;case 47:switch(Jn()){case 42:case 47:Er(Sg(bg(Cn(),Tr()),s,f),C);break;default:W+="/"}break;case 123*G:D[g++]=Zn(W)*K;case 125*G:case 59:case 0:switch(ce){case 0:case 125:oe=0;case 59+A:K==-1&&(W=lt(W,/\f/g,"")),Y>0&&Zn(W)-k&&Er(Y>32?rp(W+";",d,f,k-1):rp(lt(W," ","")+";",d,f,k-2),C);break;case 59:W+=";";default:if(Er(I=ip(W,s,f,g,A,h,D,ie,he=[],V=[],k),m),ce===123)if(A===0)Rr(W,s,I,I,he,m,k,D,V);else switch(B===99&&$t(W,3)===110?100:B){case 100:case 108:case 109:case 115:Rr(i,I,I,d&&Er(ip(i,I,I,0,0,h,D,ie,h,he=[],k),V),h,V,k,D,d?he:V);break;default:Rr(W,I,I,I,[""],V,0,D,V)}}g=A=Y=0,G=K=1,ie=W="",k=w;break;case 58:k=1+Zn(W),Y=U;default:if(G<1){if(ce==123)--G;else if(ce==125&&G++==0&&mg()==125)continue}switch(W+=Hr(ce),ce*G){case 38:K=A>0?1:(W+="\f",-1);break;case 44:D[g++]=(Zn(W)-1)*K,K=1;break;case 64:Jn()===45&&(W+=Ar(Cn())),B=Jn(),A=k=Zn(ie=W+=vg(Tr())),ce++;break;case 45:U===45&&Zn(W)==2&&(G=0)}}return m}function ip(i,s,f,d,h,m,w,D,C,g,A){for(var k=h-1,B=h===0?m:[""],Y=du(B),U=0,G=0,oe=0;U<d;++U)for(var K=0,ce=ii(i,k+1,k=cg(G=w[U])),ie=i;K<Y;++K)(ie=Tp(G>0?B[K]+" "+ce:lt(ce,/&\f/g,B[K])))&&(C[oe++]=ie);return Br(i,s,f,h===0?cu:D,C,g,A)}function Sg(i,s,f){return Br(i,s,f,Dp,Hr(pg()),ii(i,2,-2),0)}function rp(i,s,f,d){return Br(i,s,f,uu,ii(i,0,d),ii(i,d+1,-1),d)}function to(i,s){for(var f="",d=du(i),h=0;h<d;h++)f+=s(i[h],h,i,s)||"";return f}function Cg(i,s,f,d){switch(i.type){case sg:if(i.children.length)break;case rg:case uu:return i.return=i.return||i.value;case Dp:return"";case Ep:return i.return=i.value+"{"+to(i.children,d)+"}";case cu:i.value=i.props.join(",")}return Zn(f=to(i.children,d))?i.return=i.value+"{"+f+"}":""}function wg(i){var s=du(i);return function(f,d,h,m){for(var w="",D=0;D<s;D++)w+=i[D](f,d,h,m)||"";return w}}function zg(i){return function(s){s.root||(s=s.return)&&i(s)}}function kg(i){var s=Object.create(null);return function(f){return s[f]===void 0&&(s[f]=i(f)),s[f]}}var Mg=function(s,f,d){for(var h=0,m=0;h=m,m=Jn(),h===38&&m===12&&(f[d]=1),!ri(m);)Cn();return ci(s,fn)},Dg=function(s,f){var d=-1,h=44;do switch(ri(h)){case 0:h===38&&Jn()===12&&(f[d]=1),s[d]+=Mg(fn-1,f,d);break;case 2:s[d]+=Ar(h);break;case 4:if(h===44){s[++d]=Jn()===58?"&\f":"",f[d]=s[d].length;break}default:s[d]+=Hr(h)}while(h=Cn());return s},Eg=function(s,f){return _p(Dg(Rp(s),f))},sp=new WeakMap,Tg=function(s){if(!(s.type!=="rule"||!s.parent||s.length<1)){for(var f=s.value,d=s.parent,h=s.column===d.column&&s.line===d.line;d.type!=="rule";)if(d=d.parent,!d)return;if(!(s.props.length===1&&f.charCodeAt(0)!==58&&!sp.get(d))&&!h){sp.set(s,!0);for(var m=[],w=Eg(f,m),D=d.props,C=0,g=0;C<w.length;C++)for(var A=0;A<D.length;A++,g++)s.props[g]=m[C]?w[C].replace(/&\f/g,D[A]):D[A]+" "+w[C]}}},Ag=function(s){if(s.type==="decl"){var f=s.value;f.charCodeAt(0)===108&&f.charCodeAt(2)===98&&(s.return="",s.value="")}};function Lp(i,s){switch(dg(i,s)){case 5103:return at+"print-"+i+i;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 at+i+i;case 5349:case 4246:case 4810:case 6968:case 2756:return at+i+Lr+i+Pt+i+i;case 6828:case 4268:return at+i+Pt+i+i;case 6165:return at+i+Pt+"flex-"+i+i;case 5187:return at+i+lt(i,/(\w+).+(:[^]+)/,at+"box-$1$2"+Pt+"flex-$1$2")+i;case 5443:return at+i+Pt+"flex-item-"+lt(i,/flex-|-self/,"")+i;case 4675:return at+i+Pt+"flex-line-pack"+lt(i,/align-content|flex-|-self/,"")+i;case 5548:return at+i+Pt+lt(i,"shrink","negative")+i;case 5292:return at+i+Pt+lt(i,"basis","preferred-size")+i;case 6060:return at+"box-"+lt(i,"-grow","")+at+i+Pt+lt(i,"grow","positive")+i;case 4554:return at+lt(i,/([^-])(transform)/g,"$1"+at+"$2")+i;case 6187:return lt(lt(lt(i,/(zoom-|grab)/,at+"$1"),/(image-set)/,at+"$1"),i,"")+i;case 5495:case 3959:return lt(i,/(image-set\([^]*)/,at+"$1$`$1");case 4968:return lt(lt(i,/(.+:)(flex-)?(.*)/,at+"box-pack:$3"+Pt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+at+i+i;case 4095:case 3583:case 4068:case 2532:return lt(i,/(.+)-inline(.+)/,at+"$1$2")+i;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(Zn(i)-1-s>6)switch($t(i,s+1)){case 109:if($t(i,s+4)!==45)break;case 102:return lt(i,/(.+:)(.+)-([^]+)/,"$1"+at+"$2-$3$1"+Lr+($t(i,s+3)==108?"$3":"$2-$3"))+i;case 115:return~ou(i,"stretch")?Lp(lt(i,"stretch","fill-available"),s)+i:i}break;case 4949:if($t(i,s+1)!==115)break;case 6444:switch($t(i,Zn(i)-3-(~ou(i,"!important")&&10))){case 107:return lt(i,":",":"+at)+i;case 101:return lt(i,/(.+:)([^;!]+)(;|!.+)?/,"$1"+at+($t(i,14)===45?"inline-":"")+"box$3$1"+at+"$2$3$1"+Pt+"$2box$3")+i}break;case 5936:switch($t(i,s+11)){case 114:return at+i+Pt+lt(i,/[svh]\w+-[tblr]{2}/,"tb")+i;case 108:return at+i+Pt+lt(i,/[svh]\w+-[tblr]{2}/,"tb-rl")+i;case 45:return at+i+Pt+lt(i,/[svh]\w+-[tblr]{2}/,"lr")+i}return at+i+Pt+i+i}return i}var Rg=function(s,f,d,h){if(s.length>-1&&!s.return)switch(s.type){case uu:s.return=Lp(s.value,s.length);break;case Ep:return to([ti(s,{value:lt(s.value,"@","@"+at)})],h);case cu:if(s.length)return hg(s.props,function(m){switch(fg(m,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return to([ti(s,{props:[lt(m,/:(read-\w+)/,":"+Lr+"$1")]})],h);case"::placeholder":return to([ti(s,{props:[lt(m,/:(plac\w+)/,":"+at+"input-$1")]}),ti(s,{props:[lt(m,/:(plac\w+)/,":"+Lr+"$1")]}),ti(s,{props:[lt(m,/:(plac\w+)/,Pt+"input-$1")]})],h)}return""})}},_g=[Rg],Lg=function(s){var f=s.key;if(f==="css"){var d=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(d,function(G){var oe=G.getAttribute("data-emotion");oe.indexOf(" ")!==-1&&(document.head.appendChild(G),G.setAttribute("data-s",""))})}var h=s.stylisPlugins||_g,m={},w,D=[];w=s.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+f+' "]'),function(G){for(var oe=G.getAttribute("data-emotion").split(" "),K=1;K<oe.length;K++)m[oe[K]]=!0;D.push(G)});var C,g=[Tg,Ag];{var A,k=[Cg,zg(function(G){A.insert(G)})],B=wg(g.concat(h,k)),Y=function(oe){return to(xg(oe),B)};C=function(oe,K,ce,ie){A=ce,Y(oe?oe+"{"+K.styles+"}":K.styles),ie&&(U.inserted[K.name]=!0)}}var U={key:f,sheet:new ig({key:f,container:w,nonce:s.nonce,speedy:s.speedy,prepend:s.prepend,insertionPoint:s.insertionPoint}),nonce:s.nonce,inserted:m,registered:{},insert:C};return U.sheet.hydrate(D),U},$c={exports:{}},ot={};var cp;function Og(){if(cp)return ot;cp=1;var i=typeof Symbol=="function"&&Symbol.for,s=i?Symbol.for("react.element"):60103,f=i?Symbol.for("react.portal"):60106,d=i?Symbol.for("react.fragment"):60107,h=i?Symbol.for("react.strict_mode"):60108,m=i?Symbol.for("react.profiler"):60114,w=i?Symbol.for("react.provider"):60109,D=i?Symbol.for("react.context"):60110,C=i?Symbol.for("react.async_mode"):60111,g=i?Symbol.for("react.concurrent_mode"):60111,A=i?Symbol.for("react.forward_ref"):60112,k=i?Symbol.for("react.suspense"):60113,B=i?Symbol.for("react.suspense_list"):60120,Y=i?Symbol.for("react.memo"):60115,U=i?Symbol.for("react.lazy"):60116,G=i?Symbol.for("react.block"):60121,oe=i?Symbol.for("react.fundamental"):60117,K=i?Symbol.for("react.responder"):60118,ce=i?Symbol.for("react.scope"):60119;function ie(V){if(typeof V=="object"&&V!==null){var I=V.$$typeof;switch(I){case s:switch(V=V.type,V){case C:case g:case d:case m:case h:case k:return V;default:switch(V=V&&V.$$typeof,V){case D:case A:case U:case Y:case w:return V;default:return I}}case f:return I}}}function he(V){return ie(V)===g}return ot.AsyncMode=C,ot.ConcurrentMode=g,ot.ContextConsumer=D,ot.ContextProvider=w,ot.Element=s,ot.ForwardRef=A,ot.Fragment=d,ot.Lazy=U,ot.Memo=Y,ot.Portal=f,ot.Profiler=m,ot.StrictMode=h,ot.Suspense=k,ot.isAsyncMode=function(V){return he(V)||ie(V)===C},ot.isConcurrentMode=he,ot.isContextConsumer=function(V){return ie(V)===D},ot.isContextProvider=function(V){return ie(V)===w},ot.isElement=function(V){return typeof V=="object"&&V!==null&&V.$$typeof===s},ot.isForwardRef=function(V){return ie(V)===A},ot.isFragment=function(V){return ie(V)===d},ot.isLazy=function(V){return ie(V)===U},ot.isMemo=function(V){return ie(V)===Y},ot.isPortal=function(V){return ie(V)===f},ot.isProfiler=function(V){return ie(V)===m},ot.isStrictMode=function(V){return ie(V)===h},ot.isSuspense=function(V){return ie(V)===k},ot.isValidElementType=function(V){return typeof V=="string"||typeof V=="function"||V===d||V===g||V===m||V===h||V===k||V===B||typeof V=="object"&&V!==null&&(V.$$typeof===U||V.$$typeof===Y||V.$$typeof===w||V.$$typeof===D||V.$$typeof===A||V.$$typeof===oe||V.$$typeof===K||V.$$typeof===ce||V.$$typeof===G)},ot.typeOf=ie,ot}var up;function Hg(){return up||(up=1,$c.exports=Og()),$c.exports}var Wc,dp;function Ug(){if(dp)return Wc;dp=1;var i=Hg(),s={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},f={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},d={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},h={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},m={};m[i.ForwardRef]=d,m[i.Memo]=h;function w(U){return i.isMemo(U)?h:m[U.$$typeof]||s}var D=Object.defineProperty,C=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,A=Object.getOwnPropertyDescriptor,k=Object.getPrototypeOf,B=Object.prototype;function Y(U,G,oe){if(typeof G!="string"){if(B){var K=k(G);K&&K!==B&&Y(U,K,oe)}var ce=C(G);g&&(ce=ce.concat(g(G)));for(var ie=w(U),he=w(G),V=0;V<ce.length;++V){var I=ce[V];if(!f[I]&&!(oe&&oe[I])&&!(he&&he[I])&&!(ie&&ie[I])){var W=A(G,I);try{D(U,I,W)}catch{}}}}return U}return Wc=Y,Wc}Ug();var Bg=!0;function Ng(i,s,f){var d="";return f.split(" ").forEach(function(h){i[h]!==void 0?s.push(i[h]+";"):h&&(d+=h+" ")}),d}var Op=function(s,f,d){var h=s.key+"-"+f.name;(d===!1||Bg===!1)&&s.registered[h]===void 0&&(s.registered[h]=f.styles)},jg=function(s,f,d){Op(s,f,d);var h=s.key+"-"+f.name;if(s.inserted[f.name]===void 0){var m=f;do s.insert(f===m?"."+h:"",m,s.sheet,!0),m=m.next;while(m!==void 0)}};function qg(i){for(var s=0,f,d=0,h=i.length;h>=4;++d,h-=4)f=i.charCodeAt(d)&255|(i.charCodeAt(++d)&255)<<8|(i.charCodeAt(++d)&255)<<16|(i.charCodeAt(++d)&255)<<24,f=(f&65535)*1540483477+((f>>>16)*59797<<16),f^=f>>>24,s=(f&65535)*1540483477+((f>>>16)*59797<<16)^(s&65535)*1540483477+((s>>>16)*59797<<16);switch(h){case 3:s^=(i.charCodeAt(d+2)&255)<<16;case 2:s^=(i.charCodeAt(d+1)&255)<<8;case 1:s^=i.charCodeAt(d)&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 Yg={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},Gg=/[A-Z]|^ms/g,Xg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Hp=function(s){return s.charCodeAt(1)===45},fp=function(s){return s!=null&&typeof s!="boolean"},Ic=kg(function(i){return Hp(i)?i:i.replace(Gg,"-$&").toLowerCase()}),hp=function(s,f){switch(s){case"animation":case"animationName":if(typeof f=="string")return f.replace(Xg,function(d,h,m){return Fn={name:h,styles:m,next:Fn},h})}return Yg[s]!==1&&!Hp(s)&&typeof f=="number"&&f!==0?f+"px":f};function si(i,s,f){if(f==null)return"";var d=f;if(d.__emotion_styles!==void 0)return d;switch(typeof f){case"boolean":return"";case"object":{var h=f;if(h.anim===1)return Fn={name:h.name,styles:h.styles,next:Fn},h.name;var m=f;if(m.styles!==void 0){var w=m.next;if(w!==void 0)for(;w!==void 0;)Fn={name:w.name,styles:w.styles,next:Fn},w=w.next;var D=m.styles+";";return D}return Vg(i,s,f)}case"function":{if(i!==void 0){var C=Fn,g=f(i);return Fn=C,si(i,s,g)}break}}var A=f;return A}function Vg(i,s,f){var d="";if(Array.isArray(f))for(var h=0;h<f.length;h++)d+=si(i,s,f[h])+";";else for(var m in f){var w=f[m];if(typeof w!="object"){var D=w;fp(D)&&(d+=Ic(m)+":"+hp(m,D)+";")}else if(Array.isArray(w)&&typeof w[0]=="string"&&s==null)for(var C=0;C<w.length;C++)fp(w[C])&&(d+=Ic(m)+":"+hp(m,w[C])+";");else{var g=si(i,s,w);switch(m){case"animation":case"animationName":{d+=Ic(m)+":"+g+";";break}default:d+=m+"{"+g+"}"}}}return d}var pp=/label:\s*([^\s;{]+)\s*(;|$)/g,Fn;function Up(i,s,f){if(i.length===1&&typeof i[0]=="object"&&i[0]!==null&&i[0].styles!==void 0)return i[0];var d=!0,h="";Fn=void 0;var m=i[0];if(m==null||m.raw===void 0)d=!1,h+=si(f,s,m);else{var w=m;h+=w[0]}for(var D=1;D<i.length;D++)if(h+=si(f,s,i[D]),d){var C=m;h+=C[D]}pp.lastIndex=0;for(var g="",A;(A=pp.exec(h))!==null;)g+="-"+A[1];var k=qg(h)+g;return{name:k,styles:h,next:Fn}}var Qg=function(s){return s()},Kg=op.useInsertionEffect?op.useInsertionEffect:!1,Zg=Kg||Qg,Bp=v.createContext(typeof HTMLElement<"u"?Lg({key:"css"}):null);Bp.Provider;var Fg=function(s){return v.forwardRef(function(f,d){var h=v.useContext(Bp);return s(f,h,d)})},Jg=v.createContext({}),ui={}.hasOwnProperty,ru="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",fu=function(s,f){var d={};for(var h in f)ui.call(f,h)&&(d[h]=f[h]);return d[ru]=s,d},$g=function(s){var f=s.cache,d=s.serialized,h=s.isStringTag;return Op(f,d,h),Zg(function(){return jg(f,d,h)}),null},Wg=Fg(function(i,s,f){var d=i.css;typeof d=="string"&&s.registered[d]!==void 0&&(d=s.registered[d]);var h=i[ru],m=[d],w="";typeof i.className=="string"?w=Ng(s.registered,m,i.className):i.className!=null&&(w=i.className+" ");var D=Up(m,void 0,v.useContext(Jg));w+=s.key+"-"+D.name;var C={};for(var g in i)ui.call(i,g)&&g!=="css"&&g!==ru&&(C[g]=i[g]);return C.className=w,f&&(C.ref=f),v.createElement(v.Fragment,null,v.createElement($g,{cache:s,serialized:D,isStringTag:typeof h=="string"}),v.createElement(h,C))}),hu=Wg,tt=oi.Fragment,r=function(s,f,d){return ui.call(f,"css")?oi.jsx(hu,fu(s,f),d):oi.jsx(s,f,d)},b=function(s,f,d){return ui.call(f,"css")?oi.jsxs(hu,fu(s,f),d):oi.jsxs(s,f,d)},Pc={exports:{}},ni={},eu={exports:{}},tu={};var mp;function Ig(){return mp||(mp=1,(function(i){function s(E,J){var $=E.length;E.push(J);e:for(;0<$;){var Me=$-1>>>1,Ye=E[Me];if(0<h(Ye,J))E[Me]=J,E[$]=Ye,$=Me;else break e}}function f(E){return E.length===0?null:E[0]}function d(E){if(E.length===0)return null;var J=E[0],$=E.pop();if($!==J){E[0]=$;e:for(var Me=0,Ye=E.length,S=Ye>>>1;Me<S;){var H=2*(Me+1)-1,P=E[H],se=H+1,Se=E[se];if(0>h(P,$))se<Ye&&0>h(Se,P)?(E[Me]=Se,E[se]=$,Me=se):(E[Me]=P,E[H]=$,Me=H);else if(se<Ye&&0>h(Se,$))E[Me]=Se,E[se]=$,Me=se;else break e}}return J}function h(E,J){var $=E.sortIndex-J.sortIndex;return $!==0?$:E.id-J.id}if(i.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;i.unstable_now=function(){return m.now()}}else{var w=Date,D=w.now();i.unstable_now=function(){return w.now()-D}}var C=[],g=[],A=1,k=null,B=3,Y=!1,U=!1,G=!1,oe=!1,K=typeof setTimeout=="function"?setTimeout:null,ce=typeof clearTimeout=="function"?clearTimeout:null,ie=typeof setImmediate<"u"?setImmediate:null;function he(E){for(var J=f(g);J!==null;){if(J.callback===null)d(g);else if(J.startTime<=E)d(g),J.sortIndex=J.expirationTime,s(C,J);else break;J=f(g)}}function V(E){if(G=!1,he(E),!U)if(f(C)!==null)U=!0,I||(I=!0,ae());else{var J=f(g);J!==null&&_e(V,J.startTime-E)}}var I=!1,W=-1,te=5,N=-1;function L(){return oe?!0:!(i.unstable_now()-N<te)}function ee(){if(oe=!1,I){var E=i.unstable_now();N=E;var J=!0;try{e:{U=!1,G&&(G=!1,ce(W),W=-1),Y=!0;var $=B;try{t:{for(he(E),k=f(C);k!==null&&!(k.expirationTime>E&&L());){var Me=k.callback;if(typeof Me=="function"){k.callback=null,B=k.priorityLevel;var Ye=Me(k.expirationTime<=E);if(E=i.unstable_now(),typeof Ye=="function"){k.callback=Ye,he(E),J=!0;break t}k===f(C)&&d(C),he(E)}else d(C);k=f(C)}if(k!==null)J=!0;else{var S=f(g);S!==null&&_e(V,S.startTime-E),J=!1}}break e}finally{k=null,B=$,Y=!1}J=void 0}}finally{J?ae():I=!1}}}var ae;if(typeof ie=="function")ae=function(){ie(ee)};else if(typeof MessageChannel<"u"){var ue=new MessageChannel,ne=ue.port2;ue.port1.onmessage=ee,ae=function(){ne.postMessage(null)}}else ae=function(){K(ee,0)};function _e(E,J){W=K(function(){E(i.unstable_now())},J)}i.unstable_IdlePriority=5,i.unstable_ImmediatePriority=1,i.unstable_LowPriority=4,i.unstable_NormalPriority=3,i.unstable_Profiling=null,i.unstable_UserBlockingPriority=2,i.unstable_cancelCallback=function(E){E.callback=null},i.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):te=0<E?Math.floor(1e3/E):5},i.unstable_getCurrentPriorityLevel=function(){return B},i.unstable_next=function(E){switch(B){case 1:case 2:case 3:var J=3;break;default:J=B}var $=B;B=J;try{return E()}finally{B=$}},i.unstable_requestPaint=function(){oe=!0},i.unstable_runWithPriority=function(E,J){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var $=B;B=E;try{return J()}finally{B=$}},i.unstable_scheduleCallback=function(E,J,$){var Me=i.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?Me+$:Me):$=Me,E){case 1:var Ye=-1;break;case 2:Ye=250;break;case 5:Ye=1073741823;break;case 4:Ye=1e4;break;default:Ye=5e3}return Ye=$+Ye,E={id:A++,callback:J,priorityLevel:E,startTime:$,expirationTime:Ye,sortIndex:-1},$>Me?(E.sortIndex=$,s(g,E),f(C)===null&&E===f(g)&&(G?(ce(W),W=-1):G=!0,_e(V,$-Me))):(E.sortIndex=Ye,s(C,E),U||Y||(U=!0,I||(I=!0,ae()))),E},i.unstable_shouldYield=L,i.unstable_wrapCallback=function(E){var J=B;return function(){var $=B;B=J;try{return E.apply(this,arguments)}finally{B=$}}}})(tu)),tu}var gp;function Pg(){return gp||(gp=1,eu.exports=Ig()),eu.exports}var nu={exports:{}},It={};var yp;function e1(){if(yp)return It;yp=1;var i=su();function s(C){var g="https://react.dev/errors/"+C;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var A=2;A<arguments.length;A++)g+="&args[]="+encodeURIComponent(arguments[A])}return"Minified React error #"+C+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var d={d:{f,r:function(){throw Error(s(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},h=Symbol.for("react.portal");function m(C,g,A){var k=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:k==null?null:""+k,children:C,containerInfo:g,implementation:A}}var w=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function D(C,g){if(C==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return It.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=d,It.createPortal=function(C,g){var A=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return m(C,g,null,A)},It.flushSync=function(C){var g=w.T,A=d.p;try{if(w.T=null,d.p=2,C)return C()}finally{w.T=g,d.p=A,d.d.f()}},It.preconnect=function(C,g){typeof C=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,d.d.C(C,g))},It.prefetchDNS=function(C){typeof C=="string"&&d.d.D(C)},It.preinit=function(C,g){if(typeof C=="string"&&g&&typeof g.as=="string"){var A=g.as,k=D(A,g.crossOrigin),B=typeof g.integrity=="string"?g.integrity:void 0,Y=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;A==="style"?d.d.S(C,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:k,integrity:B,fetchPriority:Y}):A==="script"&&d.d.X(C,{crossOrigin:k,integrity:B,fetchPriority:Y,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},It.preinitModule=function(C,g){if(typeof C=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var A=D(g.as,g.crossOrigin);d.d.M(C,{crossOrigin:A,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&d.d.M(C)},It.preload=function(C,g){if(typeof C=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var A=g.as,k=D(A,g.crossOrigin);d.d.L(C,A,{crossOrigin:k,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},It.preloadModule=function(C,g){if(typeof C=="string")if(g){var A=D(g.as,g.crossOrigin);d.d.m(C,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:A,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else d.d.m(C)},It.requestFormReset=function(C){d.d.r(C)},It.unstable_batchedUpdates=function(C,g){return C(g)},It.useFormState=function(C,g,A){return w.H.useFormState(C,g,A)},It.useFormStatus=function(){return w.H.useHostTransitionStatus()},It.version="19.2.4",It}var bp;function t1(){if(bp)return nu.exports;bp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(s){console.error(s)}}return i(),nu.exports=e1(),nu.exports}var vp;function n1(){if(vp)return ni;vp=1;var i=Pg(),s=su(),f=t1();function d(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 h(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 w(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 D(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 C(e){if(m(e)!==e)throw Error(d(188))}function g(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(d(188));return t!==e?null:e}for(var n=e,a=t;;){var l=n.return;if(l===null)break;var o=l.alternate;if(o===null){if(a=l.return,a!==null){n=a;continue}break}if(l.child===o.child){for(o=l.child;o;){if(o===n)return C(l),e;if(o===a)return C(l),t;o=o.sibling}throw Error(d(188))}if(n.return!==a.return)n=l,a=o;else{for(var c=!1,p=l.child;p;){if(p===n){c=!0,n=l,a=o;break}if(p===a){c=!0,a=l,n=o;break}p=p.sibling}if(!c){for(p=o.child;p;){if(p===n){c=!0,n=o,a=l;break}if(p===a){c=!0,a=o,n=l;break}p=p.sibling}if(!c)throw Error(d(189))}}if(n.alternate!==a)throw Error(d(190))}if(n.tag!==3)throw Error(d(188));return n.stateNode.current===n?e:t}function A(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=A(e),t!==null)return t;e=e.sibling}return null}var k=Object.assign,B=Symbol.for("react.element"),Y=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),oe=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),ce=Symbol.for("react.consumer"),ie=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),N=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),ee=Symbol.iterator;function ae(e){return e===null||typeof e!="object"?null:(e=ee&&e[ee]||e["@@iterator"],typeof e=="function"?e:null)}var ue=Symbol.for("react.client.reference");function ne(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ue?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case K:return"Profiler";case oe:return"StrictMode";case V:return"Suspense";case I:return"SuspenseList";case N:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case U:return"Portal";case ie:return e.displayName||"Context";case ce:return(e._context.displayName||"Context")+".Consumer";case he:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case W:return t=e.displayName||null,t!==null?t:ne(e.type)||"Memo";case te:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}var _e=Array.isArray,E=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},Me=[],Ye=-1;function S(e){return{current:e}}function H(e){0>Ye||(e.current=Me[Ye],Me[Ye]=null,Ye--)}function P(e,t){Ye++,Me[Ye]=e.current,e.current=t}var se=S(null),Se=S(null),De=S(null),Ge=S(null);function vt(e,t){switch(P(De,t),P(Se,e),P(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?zh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=zh(t),e=kh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(se),P(se,e)}function Oe(){H(se),H(Se),H(De)}function en(e){e.memoizedState!==null&&P(Ge,e);var t=se.current,n=kh(t,e.type);t!==n&&(P(Se,e),P(se,n))}function Je(e){Se.current===e&&(H(se),H(Se)),Ge.current===e&&(H(Ge),$o._currentValue=$)}var ct,pt;function jt(e){if(ct===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ct=t&&t[1]||"",pt=-1<n.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+ct+e+pt}var qt=!1;function tn(e,t){if(!e||qt)return"";qt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(O){var _=O}Reflect.construct(e,[],X)}else{try{X.call()}catch(O){_=O}e.call(X.prototype)}}else{try{throw Error()}catch(O){_=O}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(O){if(O&&_&&typeof O.stack=="string")return[O.stack,_.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=a.DetermineComponentFrameRoot(),c=o[0],p=o[1];if(c&&p){var x=c.split(`
4
+ `),R=p.split(`
5
+ `);for(l=a=0;a<x.length&&!x[a].includes("DetermineComponentFrameRoot");)a++;for(;l<R.length&&!R[l].includes("DetermineComponentFrameRoot");)l++;if(a===x.length||l===R.length)for(a=x.length-1,l=R.length-1;1<=a&&0<=l&&x[a]!==R[l];)l--;for(;1<=a&&0<=l;a--,l--)if(x[a]!==R[l]){if(a!==1||l!==1)do if(a--,l--,0>l||x[a]!==R[l]){var j=`
6
+ `+x[a].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),j}while(1<=a&&0<=l);break}}}finally{qt=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?jt(n):""}function Vt(e,t){switch(e.tag){case 26:case 27:case 5:return jt(e.type);case 16:return jt("Lazy");case 13:return e.child!==t&&t!==null?jt("Suspense Fallback"):jt("Suspense");case 19:return jt("SuspenseList");case 0:case 15:return tn(e.type,!1);case 11:return tn(e.type.render,!1);case 1:return tn(e.type,!0);case 31:return jt("Activity");default:return""}}function hn(e){try{var t="",n=null;do t+=Vt(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}}var Wt=Object.prototype.hasOwnProperty,ut=i.unstable_scheduleCallback,Gt=i.unstable_cancelCallback,wt=i.unstable_shouldYield,Ee=i.unstable_requestPaint,Dt=i.unstable_now,wn=i.unstable_getCurrentPriorityLevel,Yn=i.unstable_ImmediatePriority,Hn=i.unstable_UserBlockingPriority,zn=i.unstable_NormalPriority,Z=i.unstable_LowPriority,de=i.unstable_IdlePriority,je=i.log,Ie=i.unstable_setDisableYieldValue,Ue=null,ze=null;function xt(e){if(typeof je=="function"&&Ie(e),ze&&typeof ze.setStrictMode=="function")try{ze.setStrictMode(Ue,e)}catch{}}var mt=Math.clz32?Math.clz32:Nr,pl=Math.log,Qa=Math.LN2;function Nr(e){return e>>>=0,e===0?32:31-(pl(e)/Qa|0)|0}var ml=256,gl=262144,Ka=4194304;function $n(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 yl(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var l=0,o=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var p=a&134217727;return p!==0?(a=p&~o,a!==0?l=$n(a):(c&=p,c!==0?l=$n(c):n||(n=p&~e,n!==0&&(l=$n(n))))):(p=a&~o,p!==0?l=$n(p):c!==0?l=$n(c):n||(n=a&~e,n!==0&&(l=$n(n)))),l===0?0:t!==0&&t!==l&&(t&o)===0&&(o=l&-l,n=t&-t,o>=n||o===32&&(n&4194048)!==0)?t:l}function Za(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function jr(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 fi(){var e=Ka;return Ka<<=1,(Ka&62914560)===0&&(Ka=4194304),e}function io(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Fa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function qr(e,t,n,a,l,o){var c=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 p=e.entanglements,x=e.expirationTimes,R=e.hiddenUpdates;for(n=c&~n;0<n;){var j=31-mt(n),X=1<<j;p[j]=0,x[j]=-1;var _=R[j];if(_!==null)for(R[j]=null,j=0;j<_.length;j++){var O=_[j];O!==null&&(O.lane&=-536870913)}n&=~X}a!==0&&hi(e,a,0),o!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=o&~(c&~t))}function hi(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-mt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function pi(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-mt(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function ro(e,t){var n=t&-t;return n=(n&42)!==0?1:Wn(n),(n&(e.suspendedLanes|t))!==0?0:n}function Wn(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 so(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function mi(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Fh(e.type))}function Un(e,t){var n=J.p;try{return J.p=e,t()}finally{J.p=n}}var Gn=Math.random().toString(36).slice(2),zt="__reactFiber$"+Gn,Rt="__reactProps$"+Gn,pn="__reactContainer$"+Gn,bl="__reactEvents$"+Gn,ya="__reactListeners$"+Gn,ba="__reactHandles$"+Gn,co="__reactResources$"+Gn,Ja="__reactMarker$"+Gn;function uo(e){delete e[zt],delete e[Rt],delete e[bl],delete e[ya],delete e[ba]}function In(e){var t=e[zt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pn]||n[zt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=_h(e);e!==null;){if(n=e[zt])return n;e=_h(e)}return t}e=n,n=e.parentNode}return null}function pe(e){if(e=e[zt]||e[pn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function le(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(d(33))}function ge(e){var t=e[co];return t||(t=e[co]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ye(e){e[Ja]=!0}var Te=new Set,Re={};function $e(e,t){We(e,t),We(e+"Capture",t)}function We(e,t){for(Re[e]=t,e=0;e<t.length;e++)Te.add(t[e])}var Le=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]*$"),nn={},fo={};function Qp(e){return Wt.call(fo,e)?!0:Wt.call(nn,e)?!1:Le.test(e)?fo[e]=!0:(nn[e]=!0,!1)}function gi(e,t,n){if(Qp(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function yi(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 Pn(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function kn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function mu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Kp(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,o=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(c){n=""+c,o.call(this,c)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(c){n=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Yr(e){if(!e._valueTracker){var t=mu(e)?"checked":"value";e._valueTracker=Kp(e,t,""+e[t])}}function gu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=mu(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function bi(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 Zp=/[\n"\\]/g;function Mn(e){return e.replace(Zp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gr(e,t,n,a,l,o,c,p){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+kn(t)):e.value!==""+kn(t)&&(e.value=""+kn(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?Xr(e,c,kn(t)):n!=null?Xr(e,c,kn(n)):a!=null&&e.removeAttribute("value"),l==null&&o!=null&&(e.defaultChecked=!!o),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+kn(p):e.removeAttribute("name")}function yu(e,t,n,a,l,o,c,p){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||n!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){Yr(e);return}n=n!=null?""+kn(n):"",t=t!=null?""+kn(t):n,p||t===e.value||(e.value=t),e.defaultValue=t}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=p?e.checked:!!a,e.defaultChecked=!!a,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),Yr(e)}function Xr(e,t,n){t==="number"&&bi(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function vl(e,t,n,a){if(e=e.options,t){t={};for(var l=0;l<n.length;l++)t["$"+n[l]]=!0;for(n=0;n<e.length;n++)l=t.hasOwnProperty("$"+e[n].value),e[n].selected!==l&&(e[n].selected=l),l&&a&&(e[n].defaultSelected=!0)}else{for(n=""+kn(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,a&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function bu(e,t,n){if(t!=null&&(t=""+kn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+kn(n):""}function vu(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(d(92));if(_e(a)){if(1<a.length)throw Error(d(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=kn(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Yr(e)}function xl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Fp=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 xu(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||Fp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Su(e,t,n){if(t!=null&&typeof t!="object")throw Error(d(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var l in t)a=t[l],t.hasOwnProperty(l)&&n[l]!==a&&xu(e,l,a)}else for(var o in t)t.hasOwnProperty(o)&&xu(e,o,t[o])}function Vr(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 Jp=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"]]),$p=/^[\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 vi(e){return $p.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ea(){}var Qr=null;function Kr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sl=null,Cl=null;function Cu(e){var t=pe(e);if(t&&(e=t.stateNode)){var n=e[Rt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Gr(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="'+Mn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[Rt]||null;if(!l)throw Error(d(90));Gr(a,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&gu(a)}break e;case"textarea":bu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&vl(e,!!n.multiple,t,!1)}}}var Zr=!1;function wu(e,t,n){if(Zr)return e(t,n);Zr=!0;try{var a=e(t);return a}finally{if(Zr=!1,(Sl!==null||Cl!==null)&&(ir(),Sl&&(t=Sl,e=Cl,Cl=Sl=null,Cu(t),e)))for(t=0;t<e.length;t++)Cu(e[t])}}function ho(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Rt]||null;if(a===null)return null;n=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(d(231,t,typeof n));return n}var ta=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fr=!1;if(ta)try{var po={};Object.defineProperty(po,"passive",{get:function(){Fr=!0}}),window.addEventListener("test",po,po),window.removeEventListener("test",po,po)}catch{Fr=!1}var va=null,Jr=null,xi=null;function zu(){if(xi)return xi;var e,t=Jr,n=t.length,a,l="value"in va?va.value:va.textContent,o=l.length;for(e=0;e<n&&t[e]===l[e];e++);var c=n-e;for(a=1;a<=c&&t[n-a]===l[o-a];a++);return xi=l.slice(e,1<a?1-a:void 0)}function Si(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 Ci(){return!0}function ku(){return!1}function on(e){function t(n,a,l,o,c){this._reactName=n,this._targetInst=l,this.type=a,this.nativeEvent=o,this.target=c,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(n=e[p],this[p]=n?n(o):o[p]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Ci:ku,this.isPropagationStopped=ku,this}return k(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=Ci)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ci)},persist:function(){},isPersistent:Ci}),t}var $a={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},wi=on($a),mo=k({},$a,{view:0,detail:0}),Wp=on(mo),$r,Wr,go,zi=k({},mo,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pr,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!==go&&(go&&e.type==="mousemove"?($r=e.screenX-go.screenX,Wr=e.screenY-go.screenY):Wr=$r=0,go=e),$r)},movementY:function(e){return"movementY"in e?e.movementY:Wr}}),Mu=on(zi),Ip=k({},zi,{dataTransfer:0}),Pp=on(Ip),e0=k({},mo,{relatedTarget:0}),Ir=on(e0),t0=k({},$a,{animationName:0,elapsedTime:0,pseudoElement:0}),n0=on(t0),a0=k({},$a,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),l0=on(a0),o0=k({},$a,{data:0}),Du=on(o0),i0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},r0={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"},s0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function c0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=s0[e])?!!t[e]:!1}function Pr(){return c0}var u0=k({},mo,{key:function(e){if(e.key){var t=i0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Si(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?r0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pr,charCode:function(e){return e.type==="keypress"?Si(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Si(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),d0=on(u0),f0=k({},zi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Eu=on(f0),h0=k({},mo,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pr}),p0=on(h0),m0=k({},$a,{propertyName:0,elapsedTime:0,pseudoElement:0}),g0=on(m0),y0=k({},zi,{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}),b0=on(y0),v0=k({},$a,{newState:0,oldState:0}),x0=on(v0),S0=[9,13,27,32],es=ta&&"CompositionEvent"in window,yo=null;ta&&"documentMode"in document&&(yo=document.documentMode);var C0=ta&&"TextEvent"in window&&!yo,Tu=ta&&(!es||yo&&8<yo&&11>=yo),Au=" ",Ru=!1;function _u(e,t){switch(e){case"keyup":return S0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Lu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var wl=!1;function w0(e,t){switch(e){case"compositionend":return Lu(t);case"keypress":return t.which!==32?null:(Ru=!0,Au);case"textInput":return e=t.data,e===Au&&Ru?null:e;default:return null}}function z0(e,t){if(wl)return e==="compositionend"||!es&&_u(e,t)?(e=zu(),xi=Jr=va=null,wl=!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 Tu&&t.locale!=="ko"?null:t.data;default:return null}}var k0={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 Ou(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!k0[e.type]:t==="textarea"}function Hu(e,t,n,a){Sl?Cl?Cl.push(a):Cl=[a]:Sl=a,t=hr(t,"onChange"),0<t.length&&(n=new wi("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var bo=null,vo=null;function M0(e){bh(e,0)}function ki(e){var t=le(e);if(gu(t))return e}function Uu(e,t){if(e==="change")return t}var Bu=!1;if(ta){var ts;if(ta){var ns="oninput"in document;if(!ns){var Nu=document.createElement("div");Nu.setAttribute("oninput","return;"),ns=typeof Nu.oninput=="function"}ts=ns}else ts=!1;Bu=ts&&(!document.documentMode||9<document.documentMode)}function ju(){bo&&(bo.detachEvent("onpropertychange",qu),vo=bo=null)}function qu(e){if(e.propertyName==="value"&&ki(vo)){var t=[];Hu(t,vo,e,Kr(e)),wu(M0,t)}}function D0(e,t,n){e==="focusin"?(ju(),bo=t,vo=n,bo.attachEvent("onpropertychange",qu)):e==="focusout"&&ju()}function E0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ki(vo)}function T0(e,t){if(e==="click")return ki(t)}function A0(e,t){if(e==="input"||e==="change")return ki(t)}function R0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var mn=typeof Object.is=="function"?Object.is:R0;function xo(e,t){if(mn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var l=n[a];if(!Wt.call(t,l)||!mn(e[l],t[l]))return!1}return!0}function Yu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Gu(e,t){var n=Yu(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Yu(n)}}function Xu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=bi(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=bi(e.document)}return t}function as(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 _0=ta&&"documentMode"in document&&11>=document.documentMode,zl=null,ls=null,So=null,os=!1;function Qu(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;os||zl==null||zl!==bi(a)||(a=zl,"selectionStart"in a&&as(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),So&&xo(So,a)||(So=a,a=hr(ls,"onSelect"),0<a.length&&(t=new wi("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=zl)))}function Wa(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var kl={animationend:Wa("Animation","AnimationEnd"),animationiteration:Wa("Animation","AnimationIteration"),animationstart:Wa("Animation","AnimationStart"),transitionrun:Wa("Transition","TransitionRun"),transitionstart:Wa("Transition","TransitionStart"),transitioncancel:Wa("Transition","TransitionCancel"),transitionend:Wa("Transition","TransitionEnd")},is={},Ku={};ta&&(Ku=document.createElement("div").style,"AnimationEvent"in window||(delete kl.animationend.animation,delete kl.animationiteration.animation,delete kl.animationstart.animation),"TransitionEvent"in window||delete kl.transitionend.transition);function Ia(e){if(is[e])return is[e];if(!kl[e])return e;var t=kl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ku)return is[e]=t[n];return e}var Zu=Ia("animationend"),Fu=Ia("animationiteration"),Ju=Ia("animationstart"),L0=Ia("transitionrun"),O0=Ia("transitionstart"),H0=Ia("transitioncancel"),$u=Ia("transitionend"),Wu=new Map,rs="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(" ");rs.push("scrollEnd");function Bn(e,t){Wu.set(e,t),$e(t,[e])}var Mi=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)},Dn=[],Ml=0,ss=0;function Di(){for(var e=Ml,t=ss=Ml=0;t<e;){var n=Dn[t];Dn[t++]=null;var a=Dn[t];Dn[t++]=null;var l=Dn[t];Dn[t++]=null;var o=Dn[t];if(Dn[t++]=null,a!==null&&l!==null){var c=a.pending;c===null?l.next=l:(l.next=c.next,c.next=l),a.pending=l}o!==0&&Iu(n,l,o)}}function Ei(e,t,n,a){Dn[Ml++]=e,Dn[Ml++]=t,Dn[Ml++]=n,Dn[Ml++]=a,ss|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function cs(e,t,n,a){return Ei(e,t,n,a),Ti(e)}function Pa(e,t){return Ei(e,null,null,t),Ti(e)}function Iu(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var l=!1,o=e.return;o!==null;)o.childLanes|=n,a=o.alternate,a!==null&&(a.childLanes|=n),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(l=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,l&&t!==null&&(l=31-mt(n),e=o.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),o):null}function Ti(e){if(50<Xo)throw Xo=0,bc=null,Error(d(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Dl={};function U0(e,t,n,a){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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function gn(e,t,n,a){return new U0(e,t,n,a)}function us(e){return e=e.prototype,!(!e||!e.isReactComponent)}function na(e,t){var n=e.alternate;return n===null?(n=gn(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 Pu(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 Ai(e,t,n,a,l,o){var c=0;if(a=e,typeof e=="function")us(e)&&(c=1);else if(typeof e=="string")c=Ym(e,n,se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case N:return e=gn(31,n,t,l),e.elementType=N,e.lanes=o,e;case G:return el(n.children,l,o,t);case oe:c=8,l|=24;break;case K:return e=gn(12,n,t,l|2),e.elementType=K,e.lanes=o,e;case V:return e=gn(13,n,t,l),e.elementType=V,e.lanes=o,e;case I:return e=gn(19,n,t,l),e.elementType=I,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ie:c=10;break e;case ce:c=9;break e;case he:c=11;break e;case W:c=14;break e;case te:c=16,a=null;break e}c=29,n=Error(d(130,e===null?"null":typeof e,"")),a=null}return t=gn(c,n,t,l),t.elementType=e,t.type=a,t.lanes=o,t}function el(e,t,n,a){return e=gn(7,e,a,t),e.lanes=n,e}function ds(e,t,n){return e=gn(6,e,null,t),e.lanes=n,e}function ed(e){var t=gn(18,null,null,0);return t.stateNode=e,t}function fs(e,t,n){return t=gn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var td=new WeakMap;function En(e,t){if(typeof e=="object"&&e!==null){var n=td.get(e);return n!==void 0?n:(t={value:e,source:t,stack:hn(t)},td.set(e,t),t)}return{value:e,source:t,stack:hn(t)}}var El=[],Tl=0,Ri=null,Co=0,Tn=[],An=0,xa=null,Xn=1,Vn="";function aa(e,t){El[Tl++]=Co,El[Tl++]=Ri,Ri=e,Co=t}function nd(e,t,n){Tn[An++]=Xn,Tn[An++]=Vn,Tn[An++]=xa,xa=e;var a=Xn;e=Vn;var l=32-mt(a)-1;a&=~(1<<l),n+=1;var o=32-mt(t)+l;if(30<o){var c=l-l%5;o=(a&(1<<c)-1).toString(32),a>>=c,l-=c,Xn=1<<32-mt(t)+l|n<<l|a,Vn=o+e}else Xn=1<<o|n<<l|a,Vn=e}function hs(e){e.return!==null&&(aa(e,1),nd(e,1,0))}function ps(e){for(;e===Ri;)Ri=El[--Tl],El[Tl]=null,Co=El[--Tl],El[Tl]=null;for(;e===xa;)xa=Tn[--An],Tn[An]=null,Vn=Tn[--An],Tn[An]=null,Xn=Tn[--An],Tn[An]=null}function ad(e,t){Tn[An++]=Xn,Tn[An++]=Vn,Tn[An++]=xa,Xn=t.id,Vn=t.overflow,xa=e}var Qt=null,St=null,Fe=!1,Sa=null,Rn=!1,ms=Error(d(519));function Ca(e){var t=Error(d(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw wo(En(t,e)),ms}function ld(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[zt]=e,t[Rt]=a,n){case"dialog":Qe("cancel",t),Qe("close",t);break;case"iframe":case"object":case"embed":Qe("load",t);break;case"video":case"audio":for(n=0;n<Qo.length;n++)Qe(Qo[n],t);break;case"source":Qe("error",t);break;case"img":case"image":case"link":Qe("error",t),Qe("load",t);break;case"details":Qe("toggle",t);break;case"input":Qe("invalid",t),yu(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Qe("invalid",t);break;case"textarea":Qe("invalid",t),vu(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||Ch(t.textContent,n)?(a.popover!=null&&(Qe("beforetoggle",t),Qe("toggle",t)),a.onScroll!=null&&Qe("scroll",t),a.onScrollEnd!=null&&Qe("scrollend",t),a.onClick!=null&&(t.onclick=ea),t=!0):t=!1,t||Ca(e,!0)}function od(e){for(Qt=e.return;Qt;)switch(Qt.tag){case 5:case 31:case 13:Rn=!1;return;case 27:case 3:Rn=!0;return;default:Qt=Qt.return}}function Al(e){if(e!==Qt)return!1;if(!Fe)return od(e),Fe=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Lc(e.type,e.memoizedProps)),n=!n),n&&St&&Ca(e),od(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));St=Rh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));St=Rh(e)}else t===27?(t=St,Ua(e.type)?(e=Nc,Nc=null,St=e):St=t):St=Qt?Ln(e.stateNode.nextSibling):null;return!0}function tl(){St=Qt=null,Fe=!1}function gs(){var e=Sa;return e!==null&&(un===null?un=e:un.push.apply(un,e),Sa=null),e}function wo(e){Sa===null?Sa=[e]:Sa.push(e)}var ys=S(null),nl=null,la=null;function wa(e,t,n){P(ys,t._currentValue),t._currentValue=n}function oa(e){e._currentValue=ys.current,H(ys)}function bs(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function vs(e,t,n,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var o=l.dependencies;if(o!==null){var c=l.child;o=o.firstContext;e:for(;o!==null;){var p=o;o=l;for(var x=0;x<t.length;x++)if(p.context===t[x]){o.lanes|=n,p=o.alternate,p!==null&&(p.lanes|=n),bs(o.return,n,e),a||(c=null);break e}o=p.next}}else if(l.tag===18){if(c=l.return,c===null)throw Error(d(341));c.lanes|=n,o=c.alternate,o!==null&&(o.lanes|=n),bs(c,n,e),c=null}else c=l.child;if(c!==null)c.return=l;else for(c=l;c!==null;){if(c===e){c=null;break}if(l=c.sibling,l!==null){l.return=c.return,c=l;break}c=c.return}l=c}}function Rl(e,t,n,a){e=null;for(var l=t,o=!1;l!==null;){if(!o){if((l.flags&524288)!==0)o=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var c=l.alternate;if(c===null)throw Error(d(387));if(c=c.memoizedProps,c!==null){var p=l.type;mn(l.pendingProps.value,c.value)||(e!==null?e.push(p):e=[p])}}else if(l===Ge.current){if(c=l.alternate,c===null)throw Error(d(387));c.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push($o):e=[$o])}l=l.return}e!==null&&vs(t,e,n,a),t.flags|=262144}function _i(e){for(e=e.firstContext;e!==null;){if(!mn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function al(e){nl=e,la=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Kt(e){return id(nl,e)}function Li(e,t){return nl===null&&al(e),id(e,t)}function id(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},la===null){if(e===null)throw Error(d(308));la=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else la=la.next=t;return n}var B0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},N0=i.unstable_scheduleCallback,j0=i.unstable_NormalPriority,Ot={$$typeof:ie,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function xs(){return{controller:new B0,data:new Map,refCount:0}}function zo(e){e.refCount--,e.refCount===0&&N0(j0,function(){e.controller.abort()})}var ko=null,Ss=0,_l=0,Ll=null;function q0(e,t){if(ko===null){var n=ko=[];Ss=0,_l=zc(),Ll={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Ss++,t.then(rd,rd),t}function rd(){if(--Ss===0&&ko!==null){Ll!==null&&(Ll.status="fulfilled");var e=ko;ko=null,_l=0,Ll=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Y0(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(l){n.push(l)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var l=0;l<n.length;l++)(0,n[l])(t)},function(l){for(a.status="rejected",a.reason=l,l=0;l<n.length;l++)(0,n[l])(void 0)}),a}var sd=E.S;E.S=function(e,t){Kf=Dt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&q0(e,t),sd!==null&&sd(e,t)};var ll=S(null);function Cs(){var e=ll.current;return e!==null?e:gt.pooledCache}function Oi(e,t){t===null?P(ll,ll.current):P(ll,t.pool)}function cd(){var e=Cs();return e===null?null:{parent:Ot._currentValue,pool:e}}var Ol=Error(d(460)),ws=Error(d(474)),Hi=Error(d(542)),Ui={then:function(){}};function ud(e){return e=e.status,e==="fulfilled"||e==="rejected"}function dd(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(ea,ea),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hd(e),e;default:if(typeof t.status=="string")t.then(ea,ea);else{if(e=gt,e!==null&&100<e.shellSuspendCounter)throw Error(d(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=a}},function(a){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hd(e),e}throw il=t,Ol}}function ol(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(il=n,Ol):n}}var il=null;function fd(){if(il===null)throw Error(d(459));var e=il;return il=null,e}function hd(e){if(e===Ol||e===Hi)throw Error(d(483))}var Hl=null,Mo=0;function Bi(e){var t=Mo;return Mo+=1,Hl===null&&(Hl=[]),dd(Hl,e,t)}function Do(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ni(e,t){throw t.$$typeof===B?Error(d(525)):(e=Object.prototype.toString.call(t),Error(d(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function pd(e){function t(M,z){if(e){var T=M.deletions;T===null?(M.deletions=[z],M.flags|=16):T.push(z)}}function n(M,z){if(!e)return null;for(;z!==null;)t(M,z),z=z.sibling;return null}function a(M){for(var z=new Map;M!==null;)M.key!==null?z.set(M.key,M):z.set(M.index,M),M=M.sibling;return z}function l(M,z){return M=na(M,z),M.index=0,M.sibling=null,M}function o(M,z,T){return M.index=T,e?(T=M.alternate,T!==null?(T=T.index,T<z?(M.flags|=67108866,z):T):(M.flags|=67108866,z)):(M.flags|=1048576,z)}function c(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function p(M,z,T,q){return z===null||z.tag!==6?(z=ds(T,M.mode,q),z.return=M,z):(z=l(z,T),z.return=M,z)}function x(M,z,T,q){var we=T.type;return we===G?j(M,z,T.props.children,q,T.key):z!==null&&(z.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===te&&ol(we)===z.type)?(z=l(z,T.props),Do(z,T),z.return=M,z):(z=Ai(T.type,T.key,T.props,null,M.mode,q),Do(z,T),z.return=M,z)}function R(M,z,T,q){return z===null||z.tag!==4||z.stateNode.containerInfo!==T.containerInfo||z.stateNode.implementation!==T.implementation?(z=fs(T,M.mode,q),z.return=M,z):(z=l(z,T.children||[]),z.return=M,z)}function j(M,z,T,q,we){return z===null||z.tag!==7?(z=el(T,M.mode,q,we),z.return=M,z):(z=l(z,T),z.return=M,z)}function X(M,z,T){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=ds(""+z,M.mode,T),z.return=M,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case Y:return T=Ai(z.type,z.key,z.props,null,M.mode,T),Do(T,z),T.return=M,T;case U:return z=fs(z,M.mode,T),z.return=M,z;case te:return z=ol(z),X(M,z,T)}if(_e(z)||ae(z))return z=el(z,M.mode,T,null),z.return=M,z;if(typeof z.then=="function")return X(M,Bi(z),T);if(z.$$typeof===ie)return X(M,Li(M,z),T);Ni(M,z)}return null}function _(M,z,T,q){var we=z!==null?z.key:null;if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return we!==null?null:p(M,z,""+T,q);if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Y:return T.key===we?x(M,z,T,q):null;case U:return T.key===we?R(M,z,T,q):null;case te:return T=ol(T),_(M,z,T,q)}if(_e(T)||ae(T))return we!==null?null:j(M,z,T,q,null);if(typeof T.then=="function")return _(M,z,Bi(T),q);if(T.$$typeof===ie)return _(M,z,Li(M,T),q);Ni(M,T)}return null}function O(M,z,T,q,we){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return M=M.get(T)||null,p(z,M,""+q,we);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case Y:return M=M.get(q.key===null?T:q.key)||null,x(z,M,q,we);case U:return M=M.get(q.key===null?T:q.key)||null,R(z,M,q,we);case te:return q=ol(q),O(M,z,T,q,we)}if(_e(q)||ae(q))return M=M.get(T)||null,j(z,M,q,we,null);if(typeof q.then=="function")return O(M,z,T,Bi(q),we);if(q.$$typeof===ie)return O(M,z,T,Li(z,q),we);Ni(z,q)}return null}function me(M,z,T,q){for(var we=null,Pe=null,xe=z,Xe=z=0,Ze=null;xe!==null&&Xe<T.length;Xe++){xe.index>Xe?(Ze=xe,xe=null):Ze=xe.sibling;var et=_(M,xe,T[Xe],q);if(et===null){xe===null&&(xe=Ze);break}e&&xe&&et.alternate===null&&t(M,xe),z=o(et,z,Xe),Pe===null?we=et:Pe.sibling=et,Pe=et,xe=Ze}if(Xe===T.length)return n(M,xe),Fe&&aa(M,Xe),we;if(xe===null){for(;Xe<T.length;Xe++)xe=X(M,T[Xe],q),xe!==null&&(z=o(xe,z,Xe),Pe===null?we=xe:Pe.sibling=xe,Pe=xe);return Fe&&aa(M,Xe),we}for(xe=a(xe);Xe<T.length;Xe++)Ze=O(xe,M,Xe,T[Xe],q),Ze!==null&&(e&&Ze.alternate!==null&&xe.delete(Ze.key===null?Xe:Ze.key),z=o(Ze,z,Xe),Pe===null?we=Ze:Pe.sibling=Ze,Pe=Ze);return e&&xe.forEach(function(Ya){return t(M,Ya)}),Fe&&aa(M,Xe),we}function ke(M,z,T,q){if(T==null)throw Error(d(151));for(var we=null,Pe=null,xe=z,Xe=z=0,Ze=null,et=T.next();xe!==null&&!et.done;Xe++,et=T.next()){xe.index>Xe?(Ze=xe,xe=null):Ze=xe.sibling;var Ya=_(M,xe,et.value,q);if(Ya===null){xe===null&&(xe=Ze);break}e&&xe&&Ya.alternate===null&&t(M,xe),z=o(Ya,z,Xe),Pe===null?we=Ya:Pe.sibling=Ya,Pe=Ya,xe=Ze}if(et.done)return n(M,xe),Fe&&aa(M,Xe),we;if(xe===null){for(;!et.done;Xe++,et=T.next())et=X(M,et.value,q),et!==null&&(z=o(et,z,Xe),Pe===null?we=et:Pe.sibling=et,Pe=et);return Fe&&aa(M,Xe),we}for(xe=a(xe);!et.done;Xe++,et=T.next())et=O(xe,M,Xe,et.value,q),et!==null&&(e&&et.alternate!==null&&xe.delete(et.key===null?Xe:et.key),z=o(et,z,Xe),Pe===null?we=et:Pe.sibling=et,Pe=et);return e&&xe.forEach(function(Im){return t(M,Im)}),Fe&&aa(M,Xe),we}function ht(M,z,T,q){if(typeof T=="object"&&T!==null&&T.type===G&&T.key===null&&(T=T.props.children),typeof T=="object"&&T!==null){switch(T.$$typeof){case Y:e:{for(var we=T.key;z!==null;){if(z.key===we){if(we=T.type,we===G){if(z.tag===7){n(M,z.sibling),q=l(z,T.props.children),q.return=M,M=q;break e}}else if(z.elementType===we||typeof we=="object"&&we!==null&&we.$$typeof===te&&ol(we)===z.type){n(M,z.sibling),q=l(z,T.props),Do(q,T),q.return=M,M=q;break e}n(M,z);break}else t(M,z);z=z.sibling}T.type===G?(q=el(T.props.children,M.mode,q,T.key),q.return=M,M=q):(q=Ai(T.type,T.key,T.props,null,M.mode,q),Do(q,T),q.return=M,M=q)}return c(M);case U:e:{for(we=T.key;z!==null;){if(z.key===we)if(z.tag===4&&z.stateNode.containerInfo===T.containerInfo&&z.stateNode.implementation===T.implementation){n(M,z.sibling),q=l(z,T.children||[]),q.return=M,M=q;break e}else{n(M,z);break}else t(M,z);z=z.sibling}q=fs(T,M.mode,q),q.return=M,M=q}return c(M);case te:return T=ol(T),ht(M,z,T,q)}if(_e(T))return me(M,z,T,q);if(ae(T)){if(we=ae(T),typeof we!="function")throw Error(d(150));return T=we.call(T),ke(M,z,T,q)}if(typeof T.then=="function")return ht(M,z,Bi(T),q);if(T.$$typeof===ie)return ht(M,z,Li(M,T),q);Ni(M,T)}return typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint"?(T=""+T,z!==null&&z.tag===6?(n(M,z.sibling),q=l(z,T),q.return=M,M=q):(n(M,z),q=ds(T,M.mode,q),q.return=M,M=q),c(M)):n(M,z)}return function(M,z,T,q){try{Mo=0;var we=ht(M,z,T,q);return Hl=null,we}catch(xe){if(xe===Ol||xe===Hi)throw xe;var Pe=gn(29,xe,null,M.mode);return Pe.lanes=q,Pe.return=M,Pe}}}var rl=pd(!0),md=pd(!1),za=!1;function zs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ks(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 ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ma(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(nt&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=Ti(e),Iu(e,null,n),t}return Ei(e,a,t,n),Ti(e)}function Eo(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,pi(e,n)}}function Ms(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var c={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};o===null?l=o=c:o=o.next=c,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ds=!1;function To(){if(Ds){var e=Ll;if(e!==null)throw e}}function Ao(e,t,n,a){Ds=!1;var l=e.updateQueue;za=!1;var o=l.firstBaseUpdate,c=l.lastBaseUpdate,p=l.shared.pending;if(p!==null){l.shared.pending=null;var x=p,R=x.next;x.next=null,c===null?o=R:c.next=R,c=x;var j=e.alternate;j!==null&&(j=j.updateQueue,p=j.lastBaseUpdate,p!==c&&(p===null?j.firstBaseUpdate=R:p.next=R,j.lastBaseUpdate=x))}if(o!==null){var X=l.baseState;c=0,j=R=x=null,p=o;do{var _=p.lane&-536870913,O=_!==p.lane;if(O?(Ke&_)===_:(a&_)===_){_!==0&&_===_l&&(Ds=!0),j!==null&&(j=j.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var me=e,ke=p;_=t;var ht=n;switch(ke.tag){case 1:if(me=ke.payload,typeof me=="function"){X=me.call(ht,X,_);break e}X=me;break e;case 3:me.flags=me.flags&-65537|128;case 0:if(me=ke.payload,_=typeof me=="function"?me.call(ht,X,_):me,_==null)break e;X=k({},X,_);break e;case 2:za=!0}}_=p.callback,_!==null&&(e.flags|=64,O&&(e.flags|=8192),O=l.callbacks,O===null?l.callbacks=[_]:O.push(_))}else O={lane:_,tag:p.tag,payload:p.payload,callback:p.callback,next:null},j===null?(R=j=O,x=X):j=j.next=O,c|=_;if(p=p.next,p===null){if(p=l.shared.pending,p===null)break;O=p,p=O.next,O.next=null,l.lastBaseUpdate=O,l.shared.pending=null}}while(!0);j===null&&(x=X),l.baseState=x,l.firstBaseUpdate=R,l.lastBaseUpdate=j,o===null&&(l.shared.lanes=0),Ra|=c,e.lanes=c,e.memoizedState=X}}function gd(e,t){if(typeof e!="function")throw Error(d(191,e));e.call(t)}function yd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)gd(n[e],t)}var Ul=S(null),ji=S(0);function bd(e,t){e=pa,P(ji,e),P(Ul,t),pa=e|t.baseLanes}function Es(){P(ji,pa),P(Ul,Ul.current)}function Ts(){pa=ji.current,H(Ul),H(ji)}var yn=S(null),_n=null;function Da(e){var t=e.alternate;P(_t,_t.current&1),P(yn,e),_n===null&&(t===null||Ul.current!==null||t.memoizedState!==null)&&(_n=e)}function As(e){P(_t,_t.current),P(yn,e),_n===null&&(_n=e)}function vd(e){e.tag===22?(P(_t,_t.current),P(yn,e),_n===null&&(_n=e)):Ea()}function Ea(){P(_t,_t.current),P(yn,yn.current)}function bn(e){H(yn),_n===e&&(_n=null),H(_t)}var _t=S(0);function qi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Uc(n)||Bc(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 ia=0,qe=null,dt=null,Ht=null,Yi=!1,Bl=!1,sl=!1,Gi=0,Ro=0,Nl=null,G0=0;function Et(){throw Error(d(321))}function Rs(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!mn(e[n],t[n]))return!1;return!0}function _s(e,t,n,a,l,o){return ia=o,qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,E.H=e===null||e.memoizedState===null?nf:Zs,sl=!1,o=n(a,l),sl=!1,Bl&&(o=Sd(t,n,a,l)),xd(e),o}function xd(e){E.H=Oo;var t=dt!==null&&dt.next!==null;if(ia=0,Ht=dt=qe=null,Yi=!1,Ro=0,Nl=null,t)throw Error(d(300));e===null||Ut||(e=e.dependencies,e!==null&&_i(e)&&(Ut=!0))}function Sd(e,t,n,a){qe=e;var l=0;do{if(Bl&&(Nl=null),Ro=0,Bl=!1,25<=l)throw Error(d(301));if(l+=1,Ht=dt=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}E.H=af,o=t(n,a)}while(Bl);return o}function X0(){var e=E.H,t=e.useState()[0];return t=typeof t.then=="function"?_o(t):t,e=e.useState()[0],(dt!==null?dt.memoizedState:null)!==e&&(qe.flags|=1024),t}function Ls(){var e=Gi!==0;return Gi=0,e}function Os(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Hs(e){if(Yi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Yi=!1}ia=0,Ht=dt=qe=null,Bl=!1,Ro=Gi=0,Nl=null}function an(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ht===null?qe.memoizedState=Ht=e:Ht=Ht.next=e,Ht}function Lt(){if(dt===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=dt.next;var t=Ht===null?qe.memoizedState:Ht.next;if(t!==null)Ht=t,dt=e;else{if(e===null)throw qe.alternate===null?Error(d(467)):Error(d(310));dt=e,e={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},Ht===null?qe.memoizedState=Ht=e:Ht=Ht.next=e}return Ht}function Xi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function _o(e){var t=Ro;return Ro+=1,Nl===null&&(Nl=[]),e=dd(Nl,e,t),t=qe,(Ht===null?t.memoizedState:Ht.next)===null&&(t=t.alternate,E.H=t===null||t.memoizedState===null?nf:Zs),e}function Vi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return _o(e);if(e.$$typeof===ie)return Kt(e)}throw Error(d(438,String(e)))}function Us(e){var t=null,n=qe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=qe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Xi(),qe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=L;return t.index++,n}function ra(e,t){return typeof t=="function"?t(e):t}function Qi(e){var t=Lt();return Bs(t,dt,e)}function Bs(e,t,n){var a=e.queue;if(a===null)throw Error(d(311));a.lastRenderedReducer=n;var l=e.baseQueue,o=a.pending;if(o!==null){if(l!==null){var c=l.next;l.next=o.next,o.next=c}t.baseQueue=l=o,a.pending=null}if(o=e.baseState,l===null)e.memoizedState=o;else{t=l.next;var p=c=null,x=null,R=t,j=!1;do{var X=R.lane&-536870913;if(X!==R.lane?(Ke&X)===X:(ia&X)===X){var _=R.revertLane;if(_===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),X===_l&&(j=!0);else if((ia&_)===_){R=R.next,_===_l&&(j=!0);continue}else X={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},x===null?(p=x=X,c=o):x=x.next=X,qe.lanes|=_,Ra|=_;X=R.action,sl&&n(o,X),o=R.hasEagerState?R.eagerState:n(o,X)}else _={lane:X,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},x===null?(p=x=_,c=o):x=x.next=_,qe.lanes|=X,Ra|=X;R=R.next}while(R!==null&&R!==t);if(x===null?c=o:x.next=p,!mn(o,e.memoizedState)&&(Ut=!0,j&&(n=Ll,n!==null)))throw n;e.memoizedState=o,e.baseState=c,e.baseQueue=x,a.lastRenderedState=o}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Ns(e){var t=Lt(),n=t.queue;if(n===null)throw Error(d(311));n.lastRenderedReducer=e;var a=n.dispatch,l=n.pending,o=t.memoizedState;if(l!==null){n.pending=null;var c=l=l.next;do o=e(o,c.action),c=c.next;while(c!==l);mn(o,t.memoizedState)||(Ut=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,a]}function Cd(e,t,n){var a=qe,l=Lt(),o=Fe;if(o){if(n===void 0)throw Error(d(407));n=n()}else n=t();var c=!mn((dt||l).memoizedState,n);if(c&&(l.memoizedState=n,Ut=!0),l=l.queue,Ys(kd.bind(null,a,l,e),[e]),l.getSnapshot!==t||c||Ht!==null&&Ht.memoizedState.tag&1){if(a.flags|=2048,jl(9,{destroy:void 0},zd.bind(null,a,l,n,t),null),gt===null)throw Error(d(349));o||(ia&127)!==0||wd(a,t,n)}return n}function wd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=qe.updateQueue,t===null?(t=Xi(),qe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zd(e,t,n,a){t.value=n,t.getSnapshot=a,Md(t)&&Dd(e)}function kd(e,t,n){return n(function(){Md(t)&&Dd(e)})}function Md(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!mn(e,n)}catch{return!0}}function Dd(e){var t=Pa(e,2);t!==null&&dn(t,e,2)}function js(e){var t=an();if(typeof e=="function"){var n=e;if(e=n(),sl){xt(!0);try{n()}finally{xt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:e},t}function Ed(e,t,n,a){return e.baseState=n,Bs(e,dt,typeof a=="function"?a:ra)}function V0(e,t,n,a,l){if(Fi(e))throw Error(d(485));if(e=t.action,e!==null){var o={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){o.listeners.push(c)}};E.T!==null?n(!0):o.isTransition=!1,a(o),n=t.pending,n===null?(o.next=t.pending=o,Td(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Td(e,t){var n=t.action,a=t.payload,l=e.state;if(t.isTransition){var o=E.T,c={};E.T=c;try{var p=n(l,a),x=E.S;x!==null&&x(c,p),Ad(e,t,p)}catch(R){qs(e,t,R)}finally{o!==null&&c.types!==null&&(o.types=c.types),E.T=o}}else try{o=n(l,a),Ad(e,t,o)}catch(R){qs(e,t,R)}}function Ad(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Rd(e,t,a)},function(a){return qs(e,t,a)}):Rd(e,t,n)}function Rd(e,t,n){t.status="fulfilled",t.value=n,_d(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Td(e,n)))}function qs(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,_d(t),t=t.next;while(t!==a)}e.action=null}function _d(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ld(e,t){return t}function Od(e,t){if(Fe){var n=gt.formState;if(n!==null){e:{var a=qe;if(Fe){if(St){t:{for(var l=St,o=Rn;l.nodeType!==8;){if(!o){l=null;break t}if(l=Ln(l.nextSibling),l===null){l=null;break t}}o=l.data,l=o==="F!"||o==="F"?l:null}if(l){St=Ln(l.nextSibling),a=l.data==="F!";break e}}Ca(a)}a=!1}a&&(t=n[0])}}return n=an(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ld,lastRenderedState:t},n.queue=a,n=Pd.bind(null,qe,a),a.dispatch=n,a=js(!1),o=Ks.bind(null,qe,!1,a.queue),a=an(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=V0.bind(null,qe,l,o,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function Hd(e){var t=Lt();return Ud(t,dt,e)}function Ud(e,t,n){if(t=Bs(e,t,Ld)[0],e=Qi(ra)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=_o(t)}catch(c){throw c===Ol?Hi:c}else a=t;t=Lt();var l=t.queue,o=l.dispatch;return n!==t.memoizedState&&(qe.flags|=2048,jl(9,{destroy:void 0},Q0.bind(null,l,n),null)),[a,o,e]}function Q0(e,t){e.action=t}function Bd(e){var t=Lt(),n=dt;if(n!==null)return Ud(t,n,e);Lt(),t=t.memoizedState,n=Lt();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function jl(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=qe.updateQueue,t===null&&(t=Xi(),qe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Nd(){return Lt().memoizedState}function Ki(e,t,n,a){var l=an();qe.flags|=e,l.memoizedState=jl(1|t,{destroy:void 0},n,a===void 0?null:a)}function Zi(e,t,n,a){var l=Lt();a=a===void 0?null:a;var o=l.memoizedState.inst;dt!==null&&a!==null&&Rs(a,dt.memoizedState.deps)?l.memoizedState=jl(t,o,n,a):(qe.flags|=e,l.memoizedState=jl(1|t,o,n,a))}function jd(e,t){Ki(8390656,8,e,t)}function Ys(e,t){Zi(2048,8,e,t)}function K0(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=Xi(),qe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function qd(e){var t=Lt().memoizedState;return K0({ref:t,nextImpl:e}),function(){if((nt&2)!==0)throw Error(d(440));return t.impl.apply(void 0,arguments)}}function Yd(e,t){return Zi(4,2,e,t)}function Gd(e,t){return Zi(4,4,e,t)}function Xd(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 Vd(e,t,n){n=n!=null?n.concat([e]):null,Zi(4,4,Xd.bind(null,t,e),n)}function Gs(){}function Qd(e,t){var n=Lt();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Rs(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Kd(e,t){var n=Lt();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Rs(t,a[1]))return a[0];if(a=e(),sl){xt(!0);try{e()}finally{xt(!1)}}return n.memoizedState=[a,t],a}function Xs(e,t,n){return n===void 0||(ia&1073741824)!==0&&(Ke&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Ff(),qe.lanes|=e,Ra|=e,n)}function Zd(e,t,n,a){return mn(n,t)?n:Ul.current!==null?(e=Xs(e,n,a),mn(e,t)||(Ut=!0),e):(ia&42)===0||(ia&1073741824)!==0&&(Ke&261930)===0?(Ut=!0,e.memoizedState=n):(e=Ff(),qe.lanes|=e,Ra|=e,t)}function Fd(e,t,n,a,l){var o=J.p;J.p=o!==0&&8>o?o:8;var c=E.T,p={};E.T=p,Ks(e,!1,t,n);try{var x=l(),R=E.S;if(R!==null&&R(p,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var j=Y0(x,a);Lo(e,t,j,Sn(e))}else Lo(e,t,a,Sn(e))}catch(X){Lo(e,t,{then:function(){},status:"rejected",reason:X},Sn())}finally{J.p=o,c!==null&&p.types!==null&&(c.types=p.types),E.T=c}}function Z0(){}function Vs(e,t,n,a){if(e.tag!==5)throw Error(d(476));var l=Jd(e).queue;Fd(e,l,t,$,n===null?Z0:function(){return $d(e),n(a)})}function Jd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:$},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ra,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $d(e){var t=Jd(e);t.next===null&&(t=e.alternate.memoizedState),Lo(e,t.next.queue,{},Sn())}function Qs(){return Kt($o)}function Wd(){return Lt().memoizedState}function Id(){return Lt().memoizedState}function F0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Sn();e=ka(n);var a=Ma(t,e,n);a!==null&&(dn(a,t,n),Eo(a,t,n)),t={cache:xs()},e.payload=t;return}t=t.return}}function J0(e,t,n){var a=Sn();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fi(e)?ef(t,n):(n=cs(e,t,n,a),n!==null&&(dn(n,e,a),tf(n,t,a)))}function Pd(e,t,n){var a=Sn();Lo(e,t,n,a)}function Lo(e,t,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fi(e))ef(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var c=t.lastRenderedState,p=o(c,n);if(l.hasEagerState=!0,l.eagerState=p,mn(p,c))return Ei(e,t,l,0),gt===null&&Di(),!1}catch{}if(n=cs(e,t,l,a),n!==null)return dn(n,e,a),tf(n,t,a),!0}return!1}function Ks(e,t,n,a){if(a={lane:2,revertLane:zc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Fi(e)){if(t)throw Error(d(479))}else t=cs(e,n,a,2),t!==null&&dn(t,e,2)}function Fi(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function ef(e,t){Bl=Yi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function tf(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,pi(e,n)}}var Oo={readContext:Kt,use:Vi,useCallback:Et,useContext:Et,useEffect:Et,useImperativeHandle:Et,useLayoutEffect:Et,useInsertionEffect:Et,useMemo:Et,useReducer:Et,useRef:Et,useState:Et,useDebugValue:Et,useDeferredValue:Et,useTransition:Et,useSyncExternalStore:Et,useId:Et,useHostTransitionStatus:Et,useFormState:Et,useActionState:Et,useOptimistic:Et,useMemoCache:Et,useCacheRefresh:Et};Oo.useEffectEvent=Et;var nf={readContext:Kt,use:Vi,useCallback:function(e,t){return an().memoizedState=[e,t===void 0?null:t],e},useContext:Kt,useEffect:jd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Ki(4194308,4,Xd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ki(4194308,4,e,t)},useInsertionEffect:function(e,t){Ki(4,2,e,t)},useMemo:function(e,t){var n=an();t=t===void 0?null:t;var a=e();if(sl){xt(!0);try{e()}finally{xt(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=an();if(n!==void 0){var l=n(t);if(sl){xt(!0);try{n(t)}finally{xt(!1)}}}else l=t;return a.memoizedState=a.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},a.queue=e,e=e.dispatch=J0.bind(null,qe,e),[a.memoizedState,e]},useRef:function(e){var t=an();return e={current:e},t.memoizedState=e},useState:function(e){e=js(e);var t=e.queue,n=Pd.bind(null,qe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gs,useDeferredValue:function(e,t){var n=an();return Xs(n,e,t)},useTransition:function(){var e=js(!1);return e=Fd.bind(null,qe,e.queue,!0,!1),an().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=qe,l=an();if(Fe){if(n===void 0)throw Error(d(407));n=n()}else{if(n=t(),gt===null)throw Error(d(349));(Ke&127)!==0||wd(a,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,jd(kd.bind(null,a,o,e),[e]),a.flags|=2048,jl(9,{destroy:void 0},zd.bind(null,a,o,n,t),null),n},useId:function(){var e=an(),t=gt.identifierPrefix;if(Fe){var n=Vn,a=Xn;n=(a&~(1<<32-mt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Gi++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=G0++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Qs,useFormState:Od,useActionState:Od,useOptimistic:function(e){var t=an();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ks.bind(null,qe,!0,n),n.dispatch=t,[e,t]},useMemoCache:Us,useCacheRefresh:function(){return an().memoizedState=F0.bind(null,qe)},useEffectEvent:function(e){var t=an(),n={impl:e};return t.memoizedState=n,function(){if((nt&2)!==0)throw Error(d(440));return n.impl.apply(void 0,arguments)}}},Zs={readContext:Kt,use:Vi,useCallback:Qd,useContext:Kt,useEffect:Ys,useImperativeHandle:Vd,useInsertionEffect:Yd,useLayoutEffect:Gd,useMemo:Kd,useReducer:Qi,useRef:Nd,useState:function(){return Qi(ra)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=Lt();return Zd(n,dt.memoizedState,e,t)},useTransition:function(){var e=Qi(ra)[0],t=Lt().memoizedState;return[typeof e=="boolean"?e:_o(e),t]},useSyncExternalStore:Cd,useId:Wd,useHostTransitionStatus:Qs,useFormState:Hd,useActionState:Hd,useOptimistic:function(e,t){var n=Lt();return Ed(n,dt,e,t)},useMemoCache:Us,useCacheRefresh:Id};Zs.useEffectEvent=qd;var af={readContext:Kt,use:Vi,useCallback:Qd,useContext:Kt,useEffect:Ys,useImperativeHandle:Vd,useInsertionEffect:Yd,useLayoutEffect:Gd,useMemo:Kd,useReducer:Ns,useRef:Nd,useState:function(){return Ns(ra)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=Lt();return dt===null?Xs(n,e,t):Zd(n,dt.memoizedState,e,t)},useTransition:function(){var e=Ns(ra)[0],t=Lt().memoizedState;return[typeof e=="boolean"?e:_o(e),t]},useSyncExternalStore:Cd,useId:Wd,useHostTransitionStatus:Qs,useFormState:Bd,useActionState:Bd,useOptimistic:function(e,t){var n=Lt();return dt!==null?Ed(n,dt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Us,useCacheRefresh:Id};af.useEffectEvent=qd;function Fs(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:k({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Js={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Sn(),l=ka(a);l.payload=t,n!=null&&(l.callback=n),t=Ma(e,l,a),t!==null&&(dn(t,e,a),Eo(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Sn(),l=ka(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Ma(e,l,a),t!==null&&(dn(t,e,a),Eo(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Sn(),a=ka(n);a.tag=2,t!=null&&(a.callback=t),t=Ma(e,a,n),t!==null&&(dn(t,e,n),Eo(t,e,n))}};function lf(e,t,n,a,l,o,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,o,c):t.prototype&&t.prototype.isPureReactComponent?!xo(n,a)||!xo(l,o):!0}function of(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Js.enqueueReplaceState(t,t.state,null)}function cl(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=k({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function rf(e){Mi(e)}function sf(e){console.error(e)}function cf(e){Mi(e)}function Ji(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function uf(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function $s(e,t,n){return n=ka(n),n.tag=3,n.payload={element:null},n.callback=function(){Ji(e,t)},n}function df(e){return e=ka(e),e.tag=3,e}function ff(e,t,n,a){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var o=a.value;e.payload=function(){return l(o)},e.callback=function(){uf(t,n,a)}}var c=n.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){uf(t,n,a),typeof l!="function"&&(_a===null?_a=new Set([this]):_a.add(this));var p=a.stack;this.componentDidCatch(a.value,{componentStack:p!==null?p:""})})}function $0(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Rl(t,n,l,!0),n=yn.current,n!==null){switch(n.tag){case 31:case 13:return _n===null?rr():n.alternate===null&&Tt===0&&(Tt=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===Ui?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Sc(e,a,l)),!1;case 22:return n.flags|=65536,a===Ui?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),Sc(e,a,l)),!1}throw Error(d(435,n.tag))}return Sc(e,a,l),rr(),!1}if(Fe)return t=yn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==ms&&(e=Error(d(422),{cause:a}),wo(En(e,n)))):(a!==ms&&(t=Error(d(423),{cause:a}),wo(En(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=En(a,n),l=$s(e.stateNode,a,l),Ms(e,l),Tt!==4&&(Tt=2)),!1;var o=Error(d(520),{cause:a});if(o=En(o,n),Go===null?Go=[o]:Go.push(o),Tt!==4&&(Tt=2),t===null)return!0;a=En(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=$s(n.stateNode,a,e),Ms(n,e),!1;case 1:if(t=n.type,o=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(_a===null||!_a.has(o))))return n.flags|=65536,l&=-l,n.lanes|=l,l=df(l),ff(l,e,n,a),Ms(n,l),!1}n=n.return}while(n!==null);return!1}var Ws=Error(d(461)),Ut=!1;function Zt(e,t,n,a){t.child=e===null?md(t,null,n,a):rl(t,e.child,n,a)}function hf(e,t,n,a,l){n=n.render;var o=t.ref;if("ref"in a){var c={};for(var p in a)p!=="ref"&&(c[p]=a[p])}else c=a;return al(t),a=_s(e,t,n,c,o,l),p=Ls(),e!==null&&!Ut?(Os(e,t,l),sa(e,t,l)):(Fe&&p&&hs(t),t.flags|=1,Zt(e,t,a,l),t.child)}function pf(e,t,n,a,l){if(e===null){var o=n.type;return typeof o=="function"&&!us(o)&&o.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=o,mf(e,t,o,a,l)):(e=Ai(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!oc(e,l)){var c=o.memoizedProps;if(n=n.compare,n=n!==null?n:xo,n(c,a)&&e.ref===t.ref)return sa(e,t,l)}return t.flags|=1,e=na(o,a),e.ref=t.ref,e.return=t,t.child=e}function mf(e,t,n,a,l){if(e!==null){var o=e.memoizedProps;if(xo(o,a)&&e.ref===t.ref)if(Ut=!1,t.pendingProps=a=o,oc(e,l))(e.flags&131072)!==0&&(Ut=!0);else return t.lanes=e.lanes,sa(e,t,l)}return Is(e,t,n,a,l)}function gf(e,t,n,a){var l=a.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(o=o!==null?o.baseLanes|n:n,e!==null){for(a=t.child=e.child,l=0;a!==null;)l=l|a.lanes|a.childLanes,a=a.sibling;a=l&~o}else a=0,t.child=null;return yf(e,t,o,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Oi(t,o!==null?o.cachePool:null),o!==null?bd(t,o):Es(),vd(t);else return a=t.lanes=536870912,yf(e,t,o!==null?o.baseLanes|n:n,n,a)}else o!==null?(Oi(t,o.cachePool),bd(t,o),Ea(),t.memoizedState=null):(e!==null&&Oi(t,null),Es(),Ea());return Zt(e,t,l,n),t.child}function Ho(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function yf(e,t,n,a,l){var o=Cs();return o=o===null?null:{parent:Ot._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},e!==null&&Oi(t,null),Es(),vd(t),e!==null&&Rl(e,t,a,!0),t.childLanes=l,null}function $i(e,t){return t=Ii({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function bf(e,t,n){return rl(t,e.child,null,n),e=$i(t,t.pendingProps),e.flags|=2,bn(t),t.memoizedState=null,e}function W0(e,t,n){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Fe){if(a.mode==="hidden")return e=$i(t,a),t.lanes=536870912,Ho(null,e);if(As(t),(e=St)?(e=Ah(e,Rn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xa!==null?{id:Xn,overflow:Vn}:null,retryLane:536870912,hydrationErrors:null},n=ed(e),n.return=t,t.child=n,Qt=t,St=null)):e=null,e===null)throw Ca(t);return t.lanes=536870912,null}return $i(t,a)}var o=e.memoizedState;if(o!==null){var c=o.dehydrated;if(As(t),l)if(t.flags&256)t.flags&=-257,t=bf(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(d(558));else if(Ut||Rl(e,t,n,!1),l=(n&e.childLanes)!==0,Ut||l){if(a=gt,a!==null&&(c=ro(a,n),c!==0&&c!==o.retryLane))throw o.retryLane=c,Pa(e,c),dn(a,e,c),Ws;rr(),t=bf(e,t,n)}else e=o.treeContext,St=Ln(c.nextSibling),Qt=t,Fe=!0,Sa=null,Rn=!1,e!==null&&ad(t,e),t=$i(t,a),t.flags|=4096;return t}return e=na(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Wi(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(d(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Is(e,t,n,a,l){return al(t),n=_s(e,t,n,a,void 0,l),a=Ls(),e!==null&&!Ut?(Os(e,t,l),sa(e,t,l)):(Fe&&a&&hs(t),t.flags|=1,Zt(e,t,n,l),t.child)}function vf(e,t,n,a,l,o){return al(t),t.updateQueue=null,n=Sd(t,a,n,l),xd(e),a=Ls(),e!==null&&!Ut?(Os(e,t,o),sa(e,t,o)):(Fe&&a&&hs(t),t.flags|=1,Zt(e,t,n,o),t.child)}function xf(e,t,n,a,l){if(al(t),t.stateNode===null){var o=Dl,c=n.contextType;typeof c=="object"&&c!==null&&(o=Kt(c)),o=new n(a,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Js,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=a,o.state=t.memoizedState,o.refs={},zs(t),c=n.contextType,o.context=typeof c=="object"&&c!==null?Kt(c):Dl,o.state=t.memoizedState,c=n.getDerivedStateFromProps,typeof c=="function"&&(Fs(t,n,c,a),o.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(c=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),c!==o.state&&Js.enqueueReplaceState(o,o.state,null),Ao(t,a,o,l),To(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){o=t.stateNode;var p=t.memoizedProps,x=cl(n,p);o.props=x;var R=o.context,j=n.contextType;c=Dl,typeof j=="object"&&j!==null&&(c=Kt(j));var X=n.getDerivedStateFromProps;j=typeof X=="function"||typeof o.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,j||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(p||R!==c)&&of(t,o,a,c),za=!1;var _=t.memoizedState;o.state=_,Ao(t,a,o,l),To(),R=t.memoizedState,p||_!==R||za?(typeof X=="function"&&(Fs(t,n,X,a),R=t.memoizedState),(x=za||lf(t,n,x,a,_,R,c))?(j||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=R),o.props=a,o.state=R,o.context=c,a=x):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{o=t.stateNode,ks(e,t),c=t.memoizedProps,j=cl(n,c),o.props=j,X=t.pendingProps,_=o.context,R=n.contextType,x=Dl,typeof R=="object"&&R!==null&&(x=Kt(R)),p=n.getDerivedStateFromProps,(R=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(c!==X||_!==x)&&of(t,o,a,x),za=!1,_=t.memoizedState,o.state=_,Ao(t,a,o,l),To();var O=t.memoizedState;c!==X||_!==O||za||e!==null&&e.dependencies!==null&&_i(e.dependencies)?(typeof p=="function"&&(Fs(t,n,p,a),O=t.memoizedState),(j=za||lf(t,n,j,a,_,O,x)||e!==null&&e.dependencies!==null&&_i(e.dependencies))?(R||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(a,O,x),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(a,O,x)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||c===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),o.props=a,o.state=O,o.context=x,a=j):(typeof o.componentDidUpdate!="function"||c===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),a=!1)}return o=a,Wi(e,t),a=(t.flags&128)!==0,o||a?(o=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&a?(t.child=rl(t,e.child,null,l),t.child=rl(t,null,n,l)):Zt(e,t,n,l),t.memoizedState=o.state,e=t.child):e=sa(e,t,l),e}function Sf(e,t,n,a){return tl(),t.flags|=256,Zt(e,t,n,a),t.child}var Ps={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ec(e){return{baseLanes:e,cachePool:cd()}}function tc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=xn),e}function Cf(e,t,n){var a=t.pendingProps,l=!1,o=(t.flags&128)!==0,c;if((c=o)||(c=e!==null&&e.memoizedState===null?!1:(_t.current&2)!==0),c&&(l=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if(Fe){if(l?Da(t):Ea(),(e=St)?(e=Ah(e,Rn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:xa!==null?{id:Xn,overflow:Vn}:null,retryLane:536870912,hydrationErrors:null},n=ed(e),n.return=t,t.child=n,Qt=t,St=null)):e=null,e===null)throw Ca(t);return Bc(e)?t.lanes=32:t.lanes=536870912,null}var p=a.children;return a=a.fallback,l?(Ea(),l=t.mode,p=Ii({mode:"hidden",children:p},l),a=el(a,l,n,null),p.return=t,a.return=t,p.sibling=a,t.child=p,a=t.child,a.memoizedState=ec(n),a.childLanes=tc(e,c,n),t.memoizedState=Ps,Ho(null,a)):(Da(t),nc(t,p))}var x=e.memoizedState;if(x!==null&&(p=x.dehydrated,p!==null)){if(o)t.flags&256?(Da(t),t.flags&=-257,t=ac(e,t,n)):t.memoizedState!==null?(Ea(),t.child=e.child,t.flags|=128,t=null):(Ea(),p=a.fallback,l=t.mode,a=Ii({mode:"visible",children:a.children},l),p=el(p,l,n,null),p.flags|=2,a.return=t,p.return=t,a.sibling=p,t.child=a,rl(t,e.child,null,n),a=t.child,a.memoizedState=ec(n),a.childLanes=tc(e,c,n),t.memoizedState=Ps,t=Ho(null,a));else if(Da(t),Bc(p)){if(c=p.nextSibling&&p.nextSibling.dataset,c)var R=c.dgst;c=R,a=Error(d(419)),a.stack="",a.digest=c,wo({value:a,source:null,stack:null}),t=ac(e,t,n)}else if(Ut||Rl(e,t,n,!1),c=(n&e.childLanes)!==0,Ut||c){if(c=gt,c!==null&&(a=ro(c,n),a!==0&&a!==x.retryLane))throw x.retryLane=a,Pa(e,a),dn(c,e,a),Ws;Uc(p)||rr(),t=ac(e,t,n)}else Uc(p)?(t.flags|=192,t.child=e.child,t=null):(e=x.treeContext,St=Ln(p.nextSibling),Qt=t,Fe=!0,Sa=null,Rn=!1,e!==null&&ad(t,e),t=nc(t,a.children),t.flags|=4096);return t}return l?(Ea(),p=a.fallback,l=t.mode,x=e.child,R=x.sibling,a=na(x,{mode:"hidden",children:a.children}),a.subtreeFlags=x.subtreeFlags&65011712,R!==null?p=na(R,p):(p=el(p,l,n,null),p.flags|=2),p.return=t,a.return=t,a.sibling=p,t.child=a,Ho(null,a),a=t.child,p=e.child.memoizedState,p===null?p=ec(n):(l=p.cachePool,l!==null?(x=Ot._currentValue,l=l.parent!==x?{parent:x,pool:x}:l):l=cd(),p={baseLanes:p.baseLanes|n,cachePool:l}),a.memoizedState=p,a.childLanes=tc(e,c,n),t.memoizedState=Ps,Ho(e.child,a)):(Da(t),n=e.child,e=n.sibling,n=na(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(c=t.deletions,c===null?(t.deletions=[e],t.flags|=16):c.push(e)),t.child=n,t.memoizedState=null,n)}function nc(e,t){return t=Ii({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Ii(e,t){return e=gn(22,e,null,t),e.lanes=0,e}function ac(e,t,n){return rl(t,e.child,null,n),e=nc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function wf(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),bs(e.return,t,n)}function lc(e,t,n,a,l,o){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:l,treeForkCount:o}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=a,c.tail=n,c.tailMode=l,c.treeForkCount=o)}function zf(e,t,n){var a=t.pendingProps,l=a.revealOrder,o=a.tail;a=a.children;var c=_t.current,p=(c&2)!==0;if(p?(c=c&1|2,t.flags|=128):c&=1,P(_t,c),Zt(e,t,a,n),a=Fe?Co:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wf(e,n,t);else if(e.tag===19)wf(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(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&qi(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),lc(t,!1,l,n,o,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&qi(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}lc(t,!0,n,null,o,a);break;case"together":lc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function sa(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ra|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Rl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(d(153));if(t.child!==null){for(e=t.child,n=na(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=na(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function oc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&_i(e)))}function I0(e,t,n){switch(t.tag){case 3:vt(t,t.stateNode.containerInfo),wa(t,Ot,e.memoizedState.cache),tl();break;case 27:case 5:en(t);break;case 4:vt(t,t.stateNode.containerInfo);break;case 10:wa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,As(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Da(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Cf(e,t,n):(Da(t),e=sa(e,t,n),e!==null?e.sibling:null);Da(t);break;case 19:var l=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Rl(e,t,n,!1),a=(n&t.childLanes)!==0),l){if(a)return zf(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),P(_t,_t.current),a)break;return null;case 22:return t.lanes=0,gf(e,t,n,t.pendingProps);case 24:wa(t,Ot,e.memoizedState.cache)}return sa(e,t,n)}function kf(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Ut=!0;else{if(!oc(e,n)&&(t.flags&128)===0)return Ut=!1,I0(e,t,n);Ut=(e.flags&131072)!==0}else Ut=!1,Fe&&(t.flags&1048576)!==0&&nd(t,Co,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ol(t.elementType),t.type=e,typeof e=="function")us(e)?(a=cl(e,a),t.tag=1,t=xf(null,t,e,a,n)):(t.tag=0,t=Is(null,t,e,a,n));else{if(e!=null){var l=e.$$typeof;if(l===he){t.tag=11,t=hf(null,t,e,a,n);break e}else if(l===W){t.tag=14,t=pf(null,t,e,a,n);break e}}throw t=ne(e)||e,Error(d(306,t,""))}}return t;case 0:return Is(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=cl(a,t.pendingProps),xf(e,t,a,l,n);case 3:e:{if(vt(t,t.stateNode.containerInfo),e===null)throw Error(d(387));a=t.pendingProps;var o=t.memoizedState;l=o.element,ks(e,t),Ao(t,a,null,n);var c=t.memoizedState;if(a=c.cache,wa(t,Ot,a),a!==o.cache&&vs(t,[Ot],n,!0),To(),a=c.element,o.isDehydrated)if(o={element:a,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Sf(e,t,a,n);break e}else if(a!==l){l=En(Error(d(424)),t),wo(l),t=Sf(e,t,a,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,St=Ln(e.firstChild),Qt=t,Fe=!0,Sa=null,Rn=!0,n=md(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(tl(),a===l){t=sa(e,t,n);break e}Zt(e,t,a,n)}t=t.child}return t;case 26:return Wi(e,t),e===null?(n=Uh(t.type,null,t.pendingProps,null))?t.memoizedState=n:Fe||(n=t.type,e=t.pendingProps,a=pr(De.current).createElement(n),a[zt]=t,a[Rt]=e,Ft(a,n,e),ye(a),t.stateNode=a):t.memoizedState=Uh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return en(t),e===null&&Fe&&(a=t.stateNode=Lh(t.type,t.pendingProps,De.current),Qt=t,Rn=!0,l=St,Ua(t.type)?(Nc=l,St=Ln(a.firstChild)):St=l),Zt(e,t,t.pendingProps.children,n),Wi(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Fe&&((l=a=St)&&(a=Em(a,t.type,t.pendingProps,Rn),a!==null?(t.stateNode=a,Qt=t,St=Ln(a.firstChild),Rn=!1,l=!0):l=!1),l||Ca(t)),en(t),l=t.type,o=t.pendingProps,c=e!==null?e.memoizedProps:null,a=o.children,Lc(l,o)?a=null:c!==null&&Lc(l,c)&&(t.flags|=32),t.memoizedState!==null&&(l=_s(e,t,X0,null,null,n),$o._currentValue=l),Wi(e,t),Zt(e,t,a,n),t.child;case 6:return e===null&&Fe&&((e=n=St)&&(n=Tm(n,t.pendingProps,Rn),n!==null?(t.stateNode=n,Qt=t,St=null,e=!0):e=!1),e||Ca(t)),null;case 13:return Cf(e,t,n);case 4:return vt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=rl(t,null,a,n):Zt(e,t,a,n),t.child;case 11:return hf(e,t,t.type,t.pendingProps,n);case 7:return Zt(e,t,t.pendingProps,n),t.child;case 8:return Zt(e,t,t.pendingProps.children,n),t.child;case 12:return Zt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,wa(t,t.type,a.value),Zt(e,t,a.children,n),t.child;case 9:return l=t.type._context,a=t.pendingProps.children,al(t),l=Kt(l),a=a(l),t.flags|=1,Zt(e,t,a,n),t.child;case 14:return pf(e,t,t.type,t.pendingProps,n);case 15:return mf(e,t,t.type,t.pendingProps,n);case 19:return zf(e,t,n);case 31:return W0(e,t,n);case 22:return gf(e,t,n,t.pendingProps);case 24:return al(t),a=Kt(Ot),e===null?(l=Cs(),l===null&&(l=gt,o=xs(),l.pooledCache=o,o.refCount++,o!==null&&(l.pooledCacheLanes|=n),l=o),t.memoizedState={parent:a,cache:l},zs(t),wa(t,Ot,l)):((e.lanes&n)!==0&&(ks(e,t),Ao(t,null,null,n),To()),l=e.memoizedState,o=t.memoizedState,l.parent!==a?(l={parent:a,cache:a},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),wa(t,Ot,a)):(a=o.cache,wa(t,Ot,a),a!==l.cache&&vs(t,[Ot],n,!0))),Zt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(d(156,t.tag))}function ca(e){e.flags|=4}function ic(e,t,n,a,l){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(If())e.flags|=8192;else throw il=Ui,ws}else e.flags&=-16777217}function Mf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Yh(t))if(If())e.flags|=8192;else throw il=Ui,ws}function Pi(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?fi():536870912,e.lanes|=t,Xl|=t)}function Uo(e,t){if(!Fe)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 a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Ct(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags&65011712,a|=l.flags&65011712,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,a|=l.subtreeFlags,a|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function P0(e,t,n){var a=t.pendingProps;switch(ps(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ct(t),null;case 1:return Ct(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),oa(Ot),Oe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Al(t)?ca(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,gs())),Ct(t),null;case 26:var l=t.type,o=t.memoizedState;return e===null?(ca(t),o!==null?(Ct(t),Mf(t,o)):(Ct(t),ic(t,l,null,a,n))):o?o!==e.memoizedState?(ca(t),Ct(t),Mf(t,o)):(Ct(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&ca(t),Ct(t),ic(t,l,e,a,n)),null;case 27:if(Je(t),n=De.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ca(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return Ct(t),null}e=se.current,Al(t)?ld(t):(e=Lh(l,a,n),t.stateNode=e,ca(t))}return Ct(t),null;case 5:if(Je(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ca(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return Ct(t),null}if(o=se.current,Al(t))ld(t);else{var c=pr(De.current);switch(o){case 1:o=c.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:o=c.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":o=c.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":o=c.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":o=c.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof a.is=="string"?c.createElement("select",{is:a.is}):c.createElement("select"),a.multiple?o.multiple=!0:a.size&&(o.size=a.size);break;default:o=typeof a.is=="string"?c.createElement(l,{is:a.is}):c.createElement(l)}}o[zt]=t,o[Rt]=a;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)o.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=o;e:switch(Ft(o,l,a),l){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ca(t)}}return Ct(t),ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ca(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(d(166));if(e=De.current,Al(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,l=Qt,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[zt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Ch(e.nodeValue,n)),e||Ca(t,!0)}else e=pr(e).createTextNode(a),e[zt]=t,t.stateNode=e}return Ct(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Al(t),n!==null){if(e===null){if(!a)throw Error(d(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(557));e[zt]=t}else tl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ct(t),e=!1}else n=gs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(bn(t),t):(bn(t),null);if((t.flags&128)!==0)throw Error(d(558))}return Ct(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=Al(t),a!==null&&a.dehydrated!==null){if(e===null){if(!l)throw Error(d(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(d(317));l[zt]=t}else tl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ct(t),l=!1}else l=gs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(bn(t),t):(bn(t),null)}return bn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool),o=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(o=a.memoizedState.cachePool.pool),o!==l&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Pi(t,t.updateQueue),Ct(t),null);case 4:return Oe(),e===null&&Ec(t.stateNode.containerInfo),Ct(t),null;case 10:return oa(t.type),Ct(t),null;case 19:if(H(_t),a=t.memoizedState,a===null)return Ct(t),null;if(l=(t.flags&128)!==0,o=a.rendering,o===null)if(l)Uo(a,!1);else{if(Tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=qi(e),o!==null){for(t.flags|=128,Uo(a,!1),e=o.updateQueue,t.updateQueue=e,Pi(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Pu(n,e),n=n.sibling;return P(_t,_t.current&1|2),Fe&&aa(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Dt()>lr&&(t.flags|=128,l=!0,Uo(a,!1),t.lanes=4194304)}else{if(!l)if(e=qi(o),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Pi(t,e),Uo(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!Fe)return Ct(t),null}else 2*Dt()-a.renderingStartTime>lr&&n!==536870912&&(t.flags|=128,l=!0,Uo(a,!1),t.lanes=4194304);a.isBackwards?(o.sibling=t.child,t.child=o):(e=a.last,e!==null?e.sibling=o:t.child=o,a.last=o)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Dt(),e.sibling=null,n=_t.current,P(_t,l?n&1|2:n&1),Fe&&aa(t,a.treeForkCount),e):(Ct(t),null);case 22:case 23:return bn(t),Ts(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Ct(t),t.subtreeFlags&6&&(t.flags|=8192)):Ct(t),n=t.updateQueue,n!==null&&Pi(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&H(ll),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),oa(Ot),Ct(t),null;case 25:return null;case 30:return null}throw Error(d(156,t.tag))}function em(e,t){switch(ps(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return oa(Ot),Oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Je(t),null;case 31:if(t.memoizedState!==null){if(bn(t),t.alternate===null)throw Error(d(340));tl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(bn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(d(340));tl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(_t),null;case 4:return Oe(),null;case 10:return oa(t.type),null;case 22:case 23:return bn(t),Ts(),e!==null&&H(ll),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return oa(Ot),null;case 25:return null;default:return null}}function Df(e,t){switch(ps(t),t.tag){case 3:oa(Ot),Oe();break;case 26:case 27:case 5:Je(t);break;case 4:Oe();break;case 31:t.memoizedState!==null&&bn(t);break;case 13:bn(t);break;case 19:H(_t);break;case 10:oa(t.type);break;case 22:case 23:bn(t),Ts(),e!==null&&H(ll);break;case 24:oa(Ot)}}function Bo(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var l=a.next;n=l;do{if((n.tag&e)===e){a=void 0;var o=n.create,c=n.inst;a=o(),c.destroy=a}n=n.next}while(n!==l)}}catch(p){st(t,t.return,p)}}function Ta(e,t,n){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var o=l.next;a=o;do{if((a.tag&e)===e){var c=a.inst,p=c.destroy;if(p!==void 0){c.destroy=void 0,l=t;var x=n,R=p;try{R()}catch(j){st(l,x,j)}}}a=a.next}while(a!==o)}}catch(j){st(t,t.return,j)}}function Ef(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{yd(t,n)}catch(a){st(e,e.return,a)}}}function Tf(e,t,n){n.props=cl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){st(e,t,a)}}function No(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(l){st(e,t,l)}}function Qn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){st(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(l){st(e,t,l)}else n.current=null}function Af(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(l){st(e,e.return,l)}}function rc(e,t,n){try{var a=e.stateNode;Cm(a,e.type,n,t),a[Rt]=t}catch(l){st(e,e.return,l)}}function Rf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ua(e.type)||e.tag===4}function sc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rf(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&&Ua(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 cc(e,t,n){var a=e.tag;if(a===5||a===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=ea));else if(a!==4&&(a===27&&Ua(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(cc(e,t,n),e=e.sibling;e!==null;)cc(e,t,n),e=e.sibling}function er(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&Ua(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(er(e,t,n),e=e.sibling;e!==null;)er(e,t,n),e=e.sibling}function _f(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);Ft(t,a,n),t[zt]=e,t[Rt]=n}catch(o){st(e,e.return,o)}}var ua=!1,Bt=!1,uc=!1,Lf=typeof WeakSet=="function"?WeakSet:Set,Xt=null;function tm(e,t){if(e=e.containerInfo,Rc=Sr,e=Vu(e),as(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var l=a.anchorOffset,o=a.focusNode;a=a.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var c=0,p=-1,x=-1,R=0,j=0,X=e,_=null;t:for(;;){for(var O;X!==n||l!==0&&X.nodeType!==3||(p=c+l),X!==o||a!==0&&X.nodeType!==3||(x=c+a),X.nodeType===3&&(c+=X.nodeValue.length),(O=X.firstChild)!==null;)_=X,X=O;for(;;){if(X===e)break t;if(_===n&&++R===l&&(p=c),_===o&&++j===a&&(x=c),(O=X.nextSibling)!==null)break;X=_,_=X.parentNode}X=O}n=p===-1||x===-1?null:{start:p,end:x}}else n=null}n=n||{start:0,end:0}}else n=null;for(_c={focusedElem:e,selectionRange:n},Sr=!1,Xt=t;Xt!==null;)if(t=Xt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Xt=e;else for(;Xt!==null;){switch(t=Xt,o=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++)l=e[n],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,n=t,l=o.memoizedProps,o=o.memoizedState,a=n.stateNode;try{var me=cl(n.type,l);e=a.getSnapshotBeforeUpdate(me,o),a.__reactInternalSnapshotBeforeUpdate=e}catch(ke){st(n,n.return,ke)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Hc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Hc(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(d(163))}if(e=t.sibling,e!==null){e.return=t.return,Xt=e;break}Xt=t.return}}function Of(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:fa(e,n),a&4&&Bo(5,n);break;case 1:if(fa(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(c){st(n,n.return,c)}else{var l=cl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){st(n,n.return,c)}}a&64&&Ef(n),a&512&&No(n,n.return);break;case 3:if(fa(e,n),a&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{yd(e,t)}catch(c){st(n,n.return,c)}}break;case 27:t===null&&a&4&&_f(n);case 26:case 5:fa(e,n),t===null&&a&4&&Af(n),a&512&&No(n,n.return);break;case 12:fa(e,n);break;case 31:fa(e,n),a&4&&Bf(e,n);break;case 13:fa(e,n),a&4&&Nf(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=um.bind(null,n),Am(e,n))));break;case 22:if(a=n.memoizedState!==null||ua,!a){t=t!==null&&t.memoizedState!==null||Bt,l=ua;var o=Bt;ua=a,(Bt=t)&&!o?ha(e,n,(n.subtreeFlags&8772)!==0):fa(e,n),ua=l,Bt=o}break;case 30:break;default:fa(e,n)}}function Hf(e){var t=e.alternate;t!==null&&(e.alternate=null,Hf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&uo(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 kt=null,rn=!1;function da(e,t,n){for(n=n.child;n!==null;)Uf(e,t,n),n=n.sibling}function Uf(e,t,n){if(ze&&typeof ze.onCommitFiberUnmount=="function")try{ze.onCommitFiberUnmount(Ue,n)}catch{}switch(n.tag){case 26:Bt||Qn(n,t),da(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Bt||Qn(n,t);var a=kt,l=rn;Ua(n.type)&&(kt=n.stateNode,rn=!1),da(e,t,n),Zo(n.stateNode),kt=a,rn=l;break;case 5:Bt||Qn(n,t);case 6:if(a=kt,l=rn,kt=null,da(e,t,n),kt=a,rn=l,kt!==null)if(rn)try{(kt.nodeType===9?kt.body:kt.nodeName==="HTML"?kt.ownerDocument.body:kt).removeChild(n.stateNode)}catch(o){st(n,t,o)}else try{kt.removeChild(n.stateNode)}catch(o){st(n,t,o)}break;case 18:kt!==null&&(rn?(e=kt,Eh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Wl(e)):Eh(kt,n.stateNode));break;case 4:a=kt,l=rn,kt=n.stateNode.containerInfo,rn=!0,da(e,t,n),kt=a,rn=l;break;case 0:case 11:case 14:case 15:Ta(2,n,t),Bt||Ta(4,n,t),da(e,t,n);break;case 1:Bt||(Qn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Tf(n,t,a)),da(e,t,n);break;case 21:da(e,t,n);break;case 22:Bt=(a=Bt)||n.memoizedState!==null,da(e,t,n),Bt=a;break;default:da(e,t,n)}}function Bf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wl(e)}catch(n){st(t,t.return,n)}}}function Nf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wl(e)}catch(n){st(t,t.return,n)}}function nm(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Lf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Lf),t;default:throw Error(d(435,e.tag))}}function tr(e,t){var n=nm(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var l=dm.bind(null,e,a);a.then(l,l)}})}function sn(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a],o=e,c=t,p=c;e:for(;p!==null;){switch(p.tag){case 27:if(Ua(p.type)){kt=p.stateNode,rn=!1;break e}break;case 5:kt=p.stateNode,rn=!1;break e;case 3:case 4:kt=p.stateNode.containerInfo,rn=!0;break e}p=p.return}if(kt===null)throw Error(d(160));Uf(o,c,l),kt=null,rn=!1,o=l.alternate,o!==null&&(o.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)jf(t,e),t=t.sibling}var Nn=null;function jf(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:sn(t,e),cn(e),a&4&&(Ta(3,e,e.return),Bo(3,e),Ta(5,e,e.return));break;case 1:sn(t,e),cn(e),a&512&&(Bt||n===null||Qn(n,n.return)),a&64&&ua&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var l=Nn;if(sn(t,e),cn(e),a&512&&(Bt||n===null||Qn(n,n.return)),a&4){var o=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,l=l.ownerDocument||l;t:switch(a){case"title":o=l.getElementsByTagName("title")[0],(!o||o[Ja]||o[zt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=l.createElement(a),l.head.insertBefore(o,l.querySelector("head > title"))),Ft(o,a,n),o[zt]=e,ye(o),a=o;break e;case"link":var c=jh("link","href",l).get(a+(n.href||""));if(c){for(var p=0;p<c.length;p++)if(o=c[p],o.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&o.getAttribute("rel")===(n.rel==null?null:n.rel)&&o.getAttribute("title")===(n.title==null?null:n.title)&&o.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){c.splice(p,1);break t}}o=l.createElement(a),Ft(o,a,n),l.head.appendChild(o);break;case"meta":if(c=jh("meta","content",l).get(a+(n.content||""))){for(p=0;p<c.length;p++)if(o=c[p],o.getAttribute("content")===(n.content==null?null:""+n.content)&&o.getAttribute("name")===(n.name==null?null:n.name)&&o.getAttribute("property")===(n.property==null?null:n.property)&&o.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute("charset")===(n.charSet==null?null:n.charSet)){c.splice(p,1);break t}}o=l.createElement(a),Ft(o,a,n),l.head.appendChild(o);break;default:throw Error(d(468,a))}o[zt]=e,ye(o),a=o}e.stateNode=a}else qh(l,e.type,e.stateNode);else e.stateNode=Nh(l,a,e.memoizedProps);else o!==a?(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,a===null?qh(l,e.type,e.stateNode):Nh(l,a,e.memoizedProps)):a===null&&e.stateNode!==null&&rc(e,e.memoizedProps,n.memoizedProps)}break;case 27:sn(t,e),cn(e),a&512&&(Bt||n===null||Qn(n,n.return)),n!==null&&a&4&&rc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(sn(t,e),cn(e),a&512&&(Bt||n===null||Qn(n,n.return)),e.flags&32){l=e.stateNode;try{xl(l,"")}catch(me){st(e,e.return,me)}}a&4&&e.stateNode!=null&&(l=e.memoizedProps,rc(e,l,n!==null?n.memoizedProps:l)),a&1024&&(uc=!0);break;case 6:if(sn(t,e),cn(e),a&4){if(e.stateNode===null)throw Error(d(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(me){st(e,e.return,me)}}break;case 3:if(yr=null,l=Nn,Nn=mr(t.containerInfo),sn(t,e),Nn=l,cn(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Wl(t.containerInfo)}catch(me){st(e,e.return,me)}uc&&(uc=!1,qf(e));break;case 4:a=Nn,Nn=mr(e.stateNode.containerInfo),sn(t,e),cn(e),Nn=a;break;case 12:sn(t,e),cn(e);break;case 31:sn(t,e),cn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,tr(e,a)));break;case 13:sn(t,e),cn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ar=Dt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,tr(e,a)));break;case 22:l=e.memoizedState!==null;var x=n!==null&&n.memoizedState!==null,R=ua,j=Bt;if(ua=R||l,Bt=j||x,sn(t,e),Bt=j,ua=R,cn(e),a&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||x||ua||Bt||ul(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){x=n=t;try{if(o=x.stateNode,l)c=o.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{p=x.stateNode;var X=x.memoizedProps.style,_=X!=null&&X.hasOwnProperty("display")?X.display:null;p.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(me){st(x,x.return,me)}}}else if(t.tag===6){if(n===null){x=t;try{x.stateNode.nodeValue=l?"":x.memoizedProps}catch(me){st(x,x.return,me)}}}else if(t.tag===18){if(n===null){x=t;try{var O=x.stateNode;l?Th(O,!0):Th(x.stateNode,!1)}catch(me){st(x,x.return,me)}}}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}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,tr(e,n))));break;case 19:sn(t,e),cn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,tr(e,a)));break;case 30:break;case 21:break;default:sn(t,e),cn(e)}}function cn(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Rf(a)){n=a;break}a=a.return}if(n==null)throw Error(d(160));switch(n.tag){case 27:var l=n.stateNode,o=sc(e);er(e,o,l);break;case 5:var c=n.stateNode;n.flags&32&&(xl(c,""),n.flags&=-33);var p=sc(e);er(e,p,c);break;case 3:case 4:var x=n.stateNode.containerInfo,R=sc(e);cc(e,R,x);break;default:throw Error(d(161))}}catch(j){st(e,e.return,j)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;qf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function fa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Of(e,t.alternate,t),t=t.sibling}function ul(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ta(4,t,t.return),ul(t);break;case 1:Qn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Tf(t,t.return,n),ul(t);break;case 27:Zo(t.stateNode);case 26:case 5:Qn(t,t.return),ul(t);break;case 22:t.memoizedState===null&&ul(t);break;case 30:ul(t);break;default:ul(t)}e=e.sibling}}function ha(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,l=e,o=t,c=o.flags;switch(o.tag){case 0:case 11:case 15:ha(l,o,n),Bo(4,o);break;case 1:if(ha(l,o,n),a=o,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(R){st(a,a.return,R)}if(a=o,l=a.updateQueue,l!==null){var p=a.stateNode;try{var x=l.shared.hiddenCallbacks;if(x!==null)for(l.shared.hiddenCallbacks=null,l=0;l<x.length;l++)gd(x[l],p)}catch(R){st(a,a.return,R)}}n&&c&64&&Ef(o),No(o,o.return);break;case 27:_f(o);case 26:case 5:ha(l,o,n),n&&a===null&&c&4&&Af(o),No(o,o.return);break;case 12:ha(l,o,n);break;case 31:ha(l,o,n),n&&c&4&&Bf(l,o);break;case 13:ha(l,o,n),n&&c&4&&Nf(l,o);break;case 22:o.memoizedState===null&&ha(l,o,n),No(o,o.return);break;case 30:break;default:ha(l,o,n)}t=t.sibling}}function dc(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&&zo(n))}function fc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&zo(e))}function jn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Yf(e,t,n,a),t=t.sibling}function Yf(e,t,n,a){var l=t.flags;switch(t.tag){case 0:case 11:case 15:jn(e,t,n,a),l&2048&&Bo(9,t);break;case 1:jn(e,t,n,a);break;case 3:jn(e,t,n,a),l&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&zo(e)));break;case 12:if(l&2048){jn(e,t,n,a),e=t.stateNode;try{var o=t.memoizedProps,c=o.id,p=o.onPostCommit;typeof p=="function"&&p(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(x){st(t,t.return,x)}}else jn(e,t,n,a);break;case 31:jn(e,t,n,a);break;case 13:jn(e,t,n,a);break;case 23:break;case 22:o=t.stateNode,c=t.alternate,t.memoizedState!==null?o._visibility&2?jn(e,t,n,a):jo(e,t):o._visibility&2?jn(e,t,n,a):(o._visibility|=2,ql(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),l&2048&&dc(c,t);break;case 24:jn(e,t,n,a),l&2048&&fc(t.alternate,t);break;default:jn(e,t,n,a)}}function ql(e,t,n,a,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,c=t,p=n,x=a,R=c.flags;switch(c.tag){case 0:case 11:case 15:ql(o,c,p,x,l),Bo(8,c);break;case 23:break;case 22:var j=c.stateNode;c.memoizedState!==null?j._visibility&2?ql(o,c,p,x,l):jo(o,c):(j._visibility|=2,ql(o,c,p,x,l)),l&&R&2048&&dc(c.alternate,c);break;case 24:ql(o,c,p,x,l),l&&R&2048&&fc(c.alternate,c);break;default:ql(o,c,p,x,l)}t=t.sibling}}function jo(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,l=a.flags;switch(a.tag){case 22:jo(n,a),l&2048&&dc(a.alternate,a);break;case 24:jo(n,a),l&2048&&fc(a.alternate,a);break;default:jo(n,a)}t=t.sibling}}var qo=8192;function Yl(e,t,n){if(e.subtreeFlags&qo)for(e=e.child;e!==null;)Gf(e,t,n),e=e.sibling}function Gf(e,t,n){switch(e.tag){case 26:Yl(e,t,n),e.flags&qo&&e.memoizedState!==null&&Gm(n,Nn,e.memoizedState,e.memoizedProps);break;case 5:Yl(e,t,n);break;case 3:case 4:var a=Nn;Nn=mr(e.stateNode.containerInfo),Yl(e,t,n),Nn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=qo,qo=16777216,Yl(e,t,n),qo=a):Yl(e,t,n));break;default:Yl(e,t,n)}}function Xf(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 Yo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Xt=a,Qf(a,e)}Xf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vf(e),e=e.sibling}function Vf(e){switch(e.tag){case 0:case 11:case 15:Yo(e),e.flags&2048&&Ta(9,e,e.return);break;case 3:Yo(e);break;case 12:Yo(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,nr(e)):Yo(e);break;default:Yo(e)}}function nr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];Xt=a,Qf(a,e)}Xf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ta(8,t,t.return),nr(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,nr(t));break;default:nr(t)}e=e.sibling}}function Qf(e,t){for(;Xt!==null;){var n=Xt;switch(n.tag){case 0:case 11:case 15:Ta(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:zo(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,Xt=a;else e:for(n=e;Xt!==null;){a=Xt;var l=a.sibling,o=a.return;if(Hf(a),a===n){Xt=null;break e}if(l!==null){l.return=o,Xt=l;break e}Xt=o}}}var am={getCacheForType:function(e){var t=Kt(Ot),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Kt(Ot).controller.signal}},lm=typeof WeakMap=="function"?WeakMap:Map,nt=0,gt=null,Ve=null,Ke=0,rt=0,vn=null,Aa=!1,Gl=!1,hc=!1,pa=0,Tt=0,Ra=0,dl=0,pc=0,xn=0,Xl=0,Go=null,un=null,mc=!1,ar=0,Kf=0,lr=1/0,or=null,_a=null,Yt=0,La=null,Vl=null,ma=0,gc=0,yc=null,Zf=null,Xo=0,bc=null;function Sn(){return(nt&2)!==0&&Ke!==0?Ke&-Ke:E.T!==null?zc():mi()}function Ff(){if(xn===0)if((Ke&536870912)===0||Fe){var e=gl;gl<<=1,(gl&3932160)===0&&(gl=262144),xn=e}else xn=536870912;return e=yn.current,e!==null&&(e.flags|=32),xn}function dn(e,t,n){(e===gt&&(rt===2||rt===9)||e.cancelPendingCommit!==null)&&(Ql(e,0),Oa(e,Ke,xn,!1)),Fa(e,n),((nt&2)===0||e!==gt)&&(e===gt&&((nt&2)===0&&(dl|=n),Tt===4&&Oa(e,Ke,xn,!1)),Kn(e))}function Jf(e,t,n){if((nt&6)!==0)throw Error(d(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Za(e,t),l=a?rm(e,t):xc(e,t,!0),o=a;do{if(l===0){Gl&&!a&&Oa(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!om(n)){l=xc(e,t,!1),o=!1;continue}if(l===2){if(o=t,e.errorRecoveryDisabledLanes&o)var c=0;else c=e.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){t=c;e:{var p=e;l=Go;var x=p.current.memoizedState.isDehydrated;if(x&&(Ql(p,c).flags|=256),c=xc(p,c,!1),c!==2){if(hc&&!x){p.errorRecoveryDisabledLanes|=o,dl|=o,l=4;break e}o=un,un=l,o!==null&&(un===null?un=o:un.push.apply(un,o))}l=c}if(o=!1,l!==2)continue}}if(l===1){Ql(e,0),Oa(e,t,0,!0);break}e:{switch(a=e,o=l,o){case 0:case 1:throw Error(d(345));case 4:if((t&4194048)!==t)break;case 6:Oa(a,t,xn,!Aa);break e;case 2:un=null;break;case 3:case 5:break;default:throw Error(d(329))}if((t&62914560)===t&&(l=ar+300-Dt(),10<l)){if(Oa(a,t,xn,!Aa),yl(a,0,!0)!==0)break e;ma=t,a.timeoutHandle=Mh($f.bind(null,a,n,un,or,mc,t,xn,dl,Xl,Aa,o,"Throttled",-0,0),l);break e}$f(a,n,un,or,mc,t,xn,dl,Xl,Aa,o,null,-0,0)}}break}while(!0);Kn(e)}function $f(e,t,n,a,l,o,c,p,x,R,j,X,_,O){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ea},Gf(t,o,X);var me=(o&62914560)===o?ar-Dt():(o&4194048)===o?Kf-Dt():0;if(me=Xm(X,me),me!==null){ma=o,e.cancelPendingCommit=me(lh.bind(null,e,t,o,n,a,l,c,p,x,j,X,null,_,O)),Oa(e,o,c,!R);return}}lh(e,t,o,n,a,l,c,p,x)}function om(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 a=0;a<n.length;a++){var l=n[a],o=l.getSnapshot;l=l.value;try{if(!mn(o(),l))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 Oa(e,t,n,a){t&=~pc,t&=~dl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var o=31-mt(l),c=1<<o;a[o]=-1,l&=~c}n!==0&&hi(e,n,t)}function ir(){return(nt&6)===0?(Vo(0),!1):!0}function vc(){if(Ve!==null){if(rt===0)var e=Ve.return;else e=Ve,la=nl=null,Hs(e),Hl=null,Mo=0,e=Ve;for(;e!==null;)Df(e.alternate,e),e=e.return;Ve=null}}function Ql(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,km(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),ma=0,vc(),gt=e,Ve=n=na(e.current,null),Ke=t,rt=0,vn=null,Aa=!1,Gl=Za(e,t),hc=!1,Xl=xn=pc=dl=Ra=Tt=0,un=Go=null,mc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var l=31-mt(a),o=1<<l;t|=e[l],a&=~o}return pa=t,Di(),n}function Wf(e,t){qe=null,E.H=Oo,t===Ol||t===Hi?(t=fd(),rt=3):t===ws?(t=fd(),rt=4):rt=t===Ws?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,vn=t,Ve===null&&(Tt=1,Ji(e,En(t,e.current)))}function If(){var e=yn.current;return e===null?!0:(Ke&4194048)===Ke?_n===null:(Ke&62914560)===Ke||(Ke&536870912)!==0?e===_n:!1}function Pf(){var e=E.H;return E.H=Oo,e===null?Oo:e}function eh(){var e=E.A;return E.A=am,e}function rr(){Tt=4,Aa||(Ke&4194048)!==Ke&&yn.current!==null||(Gl=!0),(Ra&134217727)===0&&(dl&134217727)===0||gt===null||Oa(gt,Ke,xn,!1)}function xc(e,t,n){var a=nt;nt|=2;var l=Pf(),o=eh();(gt!==e||Ke!==t)&&(or=null,Ql(e,t)),t=!1;var c=Tt;e:do try{if(rt!==0&&Ve!==null){var p=Ve,x=vn;switch(rt){case 8:vc(),c=6;break e;case 3:case 2:case 9:case 6:yn.current===null&&(t=!0);var R=rt;if(rt=0,vn=null,Kl(e,p,x,R),n&&Gl){c=0;break e}break;default:R=rt,rt=0,vn=null,Kl(e,p,x,R)}}im(),c=Tt;break}catch(j){Wf(e,j)}while(!0);return t&&e.shellSuspendCounter++,la=nl=null,nt=a,E.H=l,E.A=o,Ve===null&&(gt=null,Ke=0,Di()),c}function im(){for(;Ve!==null;)th(Ve)}function rm(e,t){var n=nt;nt|=2;var a=Pf(),l=eh();gt!==e||Ke!==t?(or=null,lr=Dt()+500,Ql(e,t)):Gl=Za(e,t);e:do try{if(rt!==0&&Ve!==null){t=Ve;var o=vn;t:switch(rt){case 1:rt=0,vn=null,Kl(e,t,o,1);break;case 2:case 9:if(ud(o)){rt=0,vn=null,nh(t);break}t=function(){rt!==2&&rt!==9||gt!==e||(rt=7),Kn(e)},o.then(t,t);break e;case 3:rt=7;break e;case 4:rt=5;break e;case 7:ud(o)?(rt=0,vn=null,nh(t)):(rt=0,vn=null,Kl(e,t,o,7));break;case 5:var c=null;switch(Ve.tag){case 26:c=Ve.memoizedState;case 5:case 27:var p=Ve;if(c?Yh(c):p.stateNode.complete){rt=0,vn=null;var x=p.sibling;if(x!==null)Ve=x;else{var R=p.return;R!==null?(Ve=R,sr(R)):Ve=null}break t}}rt=0,vn=null,Kl(e,t,o,5);break;case 6:rt=0,vn=null,Kl(e,t,o,6);break;case 8:vc(),Tt=6;break e;default:throw Error(d(462))}}sm();break}catch(j){Wf(e,j)}while(!0);return la=nl=null,E.H=a,E.A=l,nt=n,Ve!==null?0:(gt=null,Ke=0,Di(),Tt)}function sm(){for(;Ve!==null&&!wt();)th(Ve)}function th(e){var t=kf(e.alternate,e,pa);e.memoizedProps=e.pendingProps,t===null?sr(e):Ve=t}function nh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=vf(n,t,t.pendingProps,t.type,void 0,Ke);break;case 11:t=vf(n,t,t.pendingProps,t.type.render,t.ref,Ke);break;case 5:Hs(t);default:Df(n,t),t=Ve=Pu(t,pa),t=kf(n,t,pa)}e.memoizedProps=e.pendingProps,t===null?sr(e):Ve=t}function Kl(e,t,n,a){la=nl=null,Hs(t),Hl=null,Mo=0;var l=t.return;try{if($0(e,l,t,n,Ke)){Tt=1,Ji(e,En(n,e.current)),Ve=null;return}}catch(o){if(l!==null)throw Ve=l,o;Tt=1,Ji(e,En(n,e.current)),Ve=null;return}t.flags&32768?(Fe||a===1?e=!0:Gl||(Ke&536870912)!==0?e=!1:(Aa=e=!0,(a===2||a===9||a===3||a===6)&&(a=yn.current,a!==null&&a.tag===13&&(a.flags|=16384))),ah(t,e)):sr(t)}function sr(e){var t=e;do{if((t.flags&32768)!==0){ah(t,Aa);return}e=t.return;var n=P0(t.alternate,t,pa);if(n!==null){Ve=n;return}if(t=t.sibling,t!==null){Ve=t;return}Ve=t=e}while(t!==null);Tt===0&&(Tt=5)}function ah(e,t){do{var n=em(e.alternate,e);if(n!==null){n.flags&=32767,Ve=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ve=e;return}Ve=e=n}while(e!==null);Tt=6,Ve=null}function lh(e,t,n,a,l,o,c,p,x){e.cancelPendingCommit=null;do cr();while(Yt!==0);if((nt&6)!==0)throw Error(d(327));if(t!==null){if(t===e.current)throw Error(d(177));if(o=t.lanes|t.childLanes,o|=ss,qr(e,n,o,c,p,x),e===gt&&(Ve=gt=null,Ke=0),Vl=t,La=e,ma=n,gc=o,yc=l,Zf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,fm(zn,function(){return ch(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=E.T,E.T=null,l=J.p,J.p=2,c=nt,nt|=4;try{tm(e,t,n)}finally{nt=c,J.p=l,E.T=a}}Yt=1,oh(),ih(),rh()}}function oh(){if(Yt===1){Yt=0;var e=La,t=Vl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=E.T,E.T=null;var a=J.p;J.p=2;var l=nt;nt|=4;try{jf(t,e);var o=_c,c=Vu(e.containerInfo),p=o.focusedElem,x=o.selectionRange;if(c!==p&&p&&p.ownerDocument&&Xu(p.ownerDocument.documentElement,p)){if(x!==null&&as(p)){var R=x.start,j=x.end;if(j===void 0&&(j=R),"selectionStart"in p)p.selectionStart=R,p.selectionEnd=Math.min(j,p.value.length);else{var X=p.ownerDocument||document,_=X&&X.defaultView||window;if(_.getSelection){var O=_.getSelection(),me=p.textContent.length,ke=Math.min(x.start,me),ht=x.end===void 0?ke:Math.min(x.end,me);!O.extend&&ke>ht&&(c=ht,ht=ke,ke=c);var M=Gu(p,ke),z=Gu(p,ht);if(M&&z&&(O.rangeCount!==1||O.anchorNode!==M.node||O.anchorOffset!==M.offset||O.focusNode!==z.node||O.focusOffset!==z.offset)){var T=X.createRange();T.setStart(M.node,M.offset),O.removeAllRanges(),ke>ht?(O.addRange(T),O.extend(z.node,z.offset)):(T.setEnd(z.node,z.offset),O.addRange(T))}}}}for(X=[],O=p;O=O.parentNode;)O.nodeType===1&&X.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<X.length;p++){var q=X[p];q.element.scrollLeft=q.left,q.element.scrollTop=q.top}}Sr=!!Rc,_c=Rc=null}finally{nt=l,J.p=a,E.T=n}}e.current=t,Yt=2}}function ih(){if(Yt===2){Yt=0;var e=La,t=Vl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=E.T,E.T=null;var a=J.p;J.p=2;var l=nt;nt|=4;try{Of(e,t.alternate,t)}finally{nt=l,J.p=a,E.T=n}}Yt=3}}function rh(){if(Yt===4||Yt===3){Yt=0,Ee();var e=La,t=Vl,n=ma,a=Zf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Yt=5:(Yt=0,Vl=La=null,sh(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(_a=null),so(n),t=t.stateNode,ze&&typeof ze.onCommitFiberRoot=="function")try{ze.onCommitFiberRoot(Ue,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=E.T,l=J.p,J.p=2,E.T=null;try{for(var o=e.onRecoverableError,c=0;c<a.length;c++){var p=a[c];o(p.value,{componentStack:p.stack})}}finally{E.T=t,J.p=l}}(ma&3)!==0&&cr(),Kn(e),l=e.pendingLanes,(n&261930)!==0&&(l&42)!==0?e===bc?Xo++:(Xo=0,bc=e):Xo=0,Vo(0)}}function sh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,zo(t)))}function cr(){return oh(),ih(),rh(),ch()}function ch(){if(Yt!==5)return!1;var e=La,t=gc;gc=0;var n=so(ma),a=E.T,l=J.p;try{J.p=32>n?32:n,E.T=null,n=yc,yc=null;var o=La,c=ma;if(Yt=0,Vl=La=null,ma=0,(nt&6)!==0)throw Error(d(331));var p=nt;if(nt|=4,Vf(o.current),Yf(o,o.current,c,n),nt=p,Vo(0,!1),ze&&typeof ze.onPostCommitFiberRoot=="function")try{ze.onPostCommitFiberRoot(Ue,o)}catch{}return!0}finally{J.p=l,E.T=a,sh(e,t)}}function uh(e,t,n){t=En(n,t),t=$s(e.stateNode,t,2),e=Ma(e,t,2),e!==null&&(Fa(e,2),Kn(e))}function st(e,t,n){if(e.tag===3)uh(e,e,n);else for(;t!==null;){if(t.tag===3){uh(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(_a===null||!_a.has(a))){e=En(n,e),n=df(2),a=Ma(t,n,2),a!==null&&(ff(n,a,t,e),Fa(a,2),Kn(a));break}}t=t.return}}function Sc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new lm;var l=new Set;a.set(t,l)}else l=a.get(t),l===void 0&&(l=new Set,a.set(t,l));l.has(n)||(hc=!0,l.add(n),e=cm.bind(null,e,t,n),t.then(e,e))}function cm(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,gt===e&&(Ke&n)===n&&(Tt===4||Tt===3&&(Ke&62914560)===Ke&&300>Dt()-ar?(nt&2)===0&&Ql(e,0):pc|=n,Xl===Ke&&(Xl=0)),Kn(e)}function dh(e,t){t===0&&(t=fi()),e=Pa(e,t),e!==null&&(Fa(e,t),Kn(e))}function um(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dh(e,n)}function dm(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(d(314))}a!==null&&a.delete(t),dh(e,n)}function fm(e,t){return ut(e,t)}var ur=null,Zl=null,Cc=!1,dr=!1,wc=!1,Ha=0;function Kn(e){e!==Zl&&e.next===null&&(Zl===null?ur=Zl=e:Zl=Zl.next=e),dr=!0,Cc||(Cc=!0,pm())}function Vo(e,t){if(!wc&&dr){wc=!0;do for(var n=!1,a=ur;a!==null;){if(e!==0){var l=a.pendingLanes;if(l===0)var o=0;else{var c=a.suspendedLanes,p=a.pingedLanes;o=(1<<31-mt(42|e)+1)-1,o&=l&~(c&~p),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(n=!0,mh(a,o))}else o=Ke,o=yl(a,a===gt?o:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(o&3)===0||Za(a,o)||(n=!0,mh(a,o));a=a.next}while(n);wc=!1}}function hm(){fh()}function fh(){dr=Cc=!1;var e=0;Ha!==0&&zm()&&(e=Ha);for(var t=Dt(),n=null,a=ur;a!==null;){var l=a.next,o=hh(a,t);o===0?(a.next=null,n===null?ur=l:n.next=l,l===null&&(Zl=n)):(n=a,(e!==0||(o&3)!==0)&&(dr=!0)),a=l}Yt!==0&&Yt!==5||Vo(e),Ha!==0&&(Ha=0)}function hh(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var c=31-mt(o),p=1<<c,x=l[c];x===-1?((p&n)===0||(p&a)!==0)&&(l[c]=jr(p,t)):x<=t&&(e.expiredLanes|=p),o&=~p}if(t=gt,n=Ke,n=yl(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(rt===2||rt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Gt(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Za(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Gt(a),so(n)){case 2:case 8:n=Hn;break;case 32:n=zn;break;case 268435456:n=de;break;default:n=zn}return a=ph.bind(null,e),n=ut(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Gt(a),e.callbackPriority=2,e.callbackNode=null,2}function ph(e,t){if(Yt!==0&&Yt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(cr()&&e.callbackNode!==n)return null;var a=Ke;return a=yl(e,e===gt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Jf(e,a,t),hh(e,Dt()),e.callbackNode!=null&&e.callbackNode===n?ph.bind(null,e):null)}function mh(e,t){if(cr())return null;Jf(e,t,!0)}function pm(){Mm(function(){(nt&6)!==0?ut(Yn,hm):fh()})}function zc(){if(Ha===0){var e=_l;e===0&&(e=ml,ml<<=1,(ml&261888)===0&&(ml=256)),Ha=e}return Ha}function gh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:vi(""+e)}function yh(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 mm(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var o=gh((l[Rt]||null).action),c=a.submitter;c&&(t=(t=c[Rt]||null)?gh(t.formAction):c.getAttribute("formAction"),t!==null&&(o=t,c=null));var p=new wi("action","action",null,a,l);e.push({event:p,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Ha!==0){var x=c?yh(l,c):new FormData(l);Vs(n,{pending:!0,data:x,method:l.method,action:o},null,x)}}else typeof o=="function"&&(p.preventDefault(),x=c?yh(l,c):new FormData(l),Vs(n,{pending:!0,data:x,method:l.method,action:o},o,x))},currentTarget:l}]})}}for(var kc=0;kc<rs.length;kc++){var Mc=rs[kc],gm=Mc.toLowerCase(),ym=Mc[0].toUpperCase()+Mc.slice(1);Bn(gm,"on"+ym)}Bn(Zu,"onAnimationEnd"),Bn(Fu,"onAnimationIteration"),Bn(Ju,"onAnimationStart"),Bn("dblclick","onDoubleClick"),Bn("focusin","onFocus"),Bn("focusout","onBlur"),Bn(L0,"onTransitionRun"),Bn(O0,"onTransitionStart"),Bn(H0,"onTransitionCancel"),Bn($u,"onTransitionEnd"),We("onMouseEnter",["mouseout","mouseover"]),We("onMouseLeave",["mouseout","mouseover"]),We("onPointerEnter",["pointerout","pointerover"]),We("onPointerLeave",["pointerout","pointerover"]),$e("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$e("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$e("onBeforeInput",["compositionend","keypress","textInput","paste"]),$e("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$e("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$e("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Qo="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(" "),bm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Qo));function bh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],l=a.event;a=a.listeners;e:{var o=void 0;if(t)for(var c=a.length-1;0<=c;c--){var p=a[c],x=p.instance,R=p.currentTarget;if(p=p.listener,x!==o&&l.isPropagationStopped())break e;o=p,l.currentTarget=R;try{o(l)}catch(j){Mi(j)}l.currentTarget=null,o=x}else for(c=0;c<a.length;c++){if(p=a[c],x=p.instance,R=p.currentTarget,p=p.listener,x!==o&&l.isPropagationStopped())break e;o=p,l.currentTarget=R;try{o(l)}catch(j){Mi(j)}l.currentTarget=null,o=x}}}}function Qe(e,t){var n=t[bl];n===void 0&&(n=t[bl]=new Set);var a=e+"__bubble";n.has(a)||(vh(t,e,2,!1),n.add(a))}function Dc(e,t,n){var a=0;t&&(a|=4),vh(n,e,a,t)}var fr="_reactListening"+Math.random().toString(36).slice(2);function Ec(e){if(!e[fr]){e[fr]=!0,Te.forEach(function(n){n!=="selectionchange"&&(bm.has(n)||Dc(n,!1,e),Dc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[fr]||(t[fr]=!0,Dc("selectionchange",!1,t))}}function vh(e,t,n,a){switch(Fh(t)){case 2:var l=Km;break;case 8:l=Zm;break;default:l=Xc}n=l.bind(null,t,n,e),l=void 0,!Fr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),a?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Tc(e,t,n,a,l){var o=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var c=a.tag;if(c===3||c===4){var p=a.stateNode.containerInfo;if(p===l)break;if(c===4)for(c=a.return;c!==null;){var x=c.tag;if((x===3||x===4)&&c.stateNode.containerInfo===l)return;c=c.return}for(;p!==null;){if(c=In(p),c===null)return;if(x=c.tag,x===5||x===6||x===26||x===27){a=o=c;continue e}p=p.parentNode}}a=a.return}wu(function(){var R=o,j=Kr(n),X=[];e:{var _=Wu.get(e);if(_!==void 0){var O=wi,me=e;switch(e){case"keypress":if(Si(n)===0)break e;case"keydown":case"keyup":O=d0;break;case"focusin":me="focus",O=Ir;break;case"focusout":me="blur",O=Ir;break;case"beforeblur":case"afterblur":O=Ir;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":O=Mu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=Pp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=p0;break;case Zu:case Fu:case Ju:O=n0;break;case $u:O=g0;break;case"scroll":case"scrollend":O=Wp;break;case"wheel":O=b0;break;case"copy":case"cut":case"paste":O=l0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=Eu;break;case"toggle":case"beforetoggle":O=x0}var ke=(t&4)!==0,ht=!ke&&(e==="scroll"||e==="scrollend"),M=ke?_!==null?_+"Capture":null:_;ke=[];for(var z=R,T;z!==null;){var q=z;if(T=q.stateNode,q=q.tag,q!==5&&q!==26&&q!==27||T===null||M===null||(q=ho(z,M),q!=null&&ke.push(Ko(z,q,T))),ht)break;z=z.return}0<ke.length&&(_=new O(_,me,null,n,j),X.push({event:_,listeners:ke}))}}if((t&7)===0){e:{if(_=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",_&&n!==Qr&&(me=n.relatedTarget||n.fromElement)&&(In(me)||me[pn]))break e;if((O||_)&&(_=j.window===j?j:(_=j.ownerDocument)?_.defaultView||_.parentWindow:window,O?(me=n.relatedTarget||n.toElement,O=R,me=me?In(me):null,me!==null&&(ht=m(me),ke=me.tag,me!==ht||ke!==5&&ke!==27&&ke!==6)&&(me=null)):(O=null,me=R),O!==me)){if(ke=Mu,q="onMouseLeave",M="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(ke=Eu,q="onPointerLeave",M="onPointerEnter",z="pointer"),ht=O==null?_:le(O),T=me==null?_:le(me),_=new ke(q,z+"leave",O,n,j),_.target=ht,_.relatedTarget=T,q=null,In(j)===R&&(ke=new ke(M,z+"enter",me,n,j),ke.target=T,ke.relatedTarget=ht,q=ke),ht=q,O&&me)t:{for(ke=vm,M=O,z=me,T=0,q=M;q;q=ke(q))T++;q=0;for(var we=z;we;we=ke(we))q++;for(;0<T-q;)M=ke(M),T--;for(;0<q-T;)z=ke(z),q--;for(;T--;){if(M===z||z!==null&&M===z.alternate){ke=M;break t}M=ke(M),z=ke(z)}ke=null}else ke=null;O!==null&&xh(X,_,O,ke,!1),me!==null&&ht!==null&&xh(X,ht,me,ke,!0)}}e:{if(_=R?le(R):window,O=_.nodeName&&_.nodeName.toLowerCase(),O==="select"||O==="input"&&_.type==="file")var Pe=Uu;else if(Ou(_))if(Bu)Pe=A0;else{Pe=E0;var xe=D0}else O=_.nodeName,!O||O.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?R&&Vr(R.elementType)&&(Pe=Uu):Pe=T0;if(Pe&&(Pe=Pe(e,R))){Hu(X,Pe,n,j);break e}xe&&xe(e,_,R),e==="focusout"&&R&&_.type==="number"&&R.memoizedProps.value!=null&&Xr(_,"number",_.value)}switch(xe=R?le(R):window,e){case"focusin":(Ou(xe)||xe.contentEditable==="true")&&(zl=xe,ls=R,So=null);break;case"focusout":So=ls=zl=null;break;case"mousedown":os=!0;break;case"contextmenu":case"mouseup":case"dragend":os=!1,Qu(X,n,j);break;case"selectionchange":if(_0)break;case"keydown":case"keyup":Qu(X,n,j)}var Xe;if(es)e:{switch(e){case"compositionstart":var Ze="onCompositionStart";break e;case"compositionend":Ze="onCompositionEnd";break e;case"compositionupdate":Ze="onCompositionUpdate";break e}Ze=void 0}else wl?_u(e,n)&&(Ze="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ze="onCompositionStart");Ze&&(Tu&&n.locale!=="ko"&&(wl||Ze!=="onCompositionStart"?Ze==="onCompositionEnd"&&wl&&(Xe=zu()):(va=j,Jr="value"in va?va.value:va.textContent,wl=!0)),xe=hr(R,Ze),0<xe.length&&(Ze=new Du(Ze,e,null,n,j),X.push({event:Ze,listeners:xe}),Xe?Ze.data=Xe:(Xe=Lu(n),Xe!==null&&(Ze.data=Xe)))),(Xe=C0?w0(e,n):z0(e,n))&&(Ze=hr(R,"onBeforeInput"),0<Ze.length&&(xe=new Du("onBeforeInput","beforeinput",null,n,j),X.push({event:xe,listeners:Ze}),xe.data=Xe)),mm(X,e,R,n,j)}bh(X,t)})}function Ko(e,t,n){return{instance:e,listener:t,currentTarget:n}}function hr(e,t){for(var n=t+"Capture",a=[];e!==null;){var l=e,o=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||o===null||(l=ho(e,n),l!=null&&a.unshift(Ko(e,l,o)),l=ho(e,t),l!=null&&a.push(Ko(e,l,o))),e.tag===3)return a;e=e.return}return[]}function vm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function xh(e,t,n,a,l){for(var o=t._reactName,c=[];n!==null&&n!==a;){var p=n,x=p.alternate,R=p.stateNode;if(p=p.tag,x!==null&&x===a)break;p!==5&&p!==26&&p!==27||R===null||(x=R,l?(R=ho(n,o),R!=null&&c.unshift(Ko(n,R,x))):l||(R=ho(n,o),R!=null&&c.push(Ko(n,R,x)))),n=n.return}c.length!==0&&e.push({event:t,listeners:c})}var xm=/\r\n?/g,Sm=/\u0000|\uFFFD/g;function Sh(e){return(typeof e=="string"?e:""+e).replace(xm,`
9
+ `).replace(Sm,"")}function Ch(e,t){return t=Sh(t),Sh(e)===t}function ft(e,t,n,a,l,o){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||xl(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&xl(e,""+a);break;case"className":yi(e,"class",a);break;case"tabIndex":yi(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":yi(e,n,a);break;case"style":Su(e,a,o);break;case"data":if(t!=="object"){yi(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=vi(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="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 o=="function"&&(n==="formAction"?(t!=="input"&&ft(e,t,"name",l.name,l,null),ft(e,t,"formEncType",l.formEncType,l,null),ft(e,t,"formMethod",l.formMethod,l,null),ft(e,t,"formTarget",l.formTarget,l,null)):(ft(e,t,"encType",l.encType,l,null),ft(e,t,"method",l.method,l,null),ft(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=vi(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=ea);break;case"onScroll":a!=null&&Qe("scroll",e);break;case"onScrollEnd":a!=null&&Qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(d(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(d(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=vi(""+a),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":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":Qe("beforetoggle",e),Qe("toggle",e),gi(e,"popover",a);break;case"xlinkActuate":Pn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Pn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Pn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Pn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Pn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Pn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Pn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":gi(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Jp.get(n)||n,gi(e,n,a))}}function Ac(e,t,n,a,l,o){switch(n){case"style":Su(e,a,o);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(d(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(d(60));e.innerHTML=n}}break;case"children":typeof a=="string"?xl(e,a):(typeof a=="number"||typeof a=="bigint")&&xl(e,""+a);break;case"onScroll":a!=null&&Qe("scroll",e);break;case"onScrollEnd":a!=null&&Qe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=ea);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Re.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),t=n.slice(2,l?n.length-7:void 0),o=e[Rt]||null,o=o!=null?o[n]:null,typeof o=="function"&&e.removeEventListener(t,o,l),typeof a=="function")){typeof o!="function"&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,l);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):gi(e,n,a)}}}function Ft(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",e),Qe("load",e);var a=!1,l=!1,o;for(o in n)if(n.hasOwnProperty(o)){var c=n[o];if(c!=null)switch(o){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:ft(e,t,o,c,n,null)}}l&&ft(e,t,"srcSet",n.srcSet,n,null),a&&ft(e,t,"src",n.src,n,null);return;case"input":Qe("invalid",e);var p=o=c=l=null,x=null,R=null;for(a in n)if(n.hasOwnProperty(a)){var j=n[a];if(j!=null)switch(a){case"name":l=j;break;case"type":c=j;break;case"checked":x=j;break;case"defaultChecked":R=j;break;case"value":o=j;break;case"defaultValue":p=j;break;case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(d(137,t));break;default:ft(e,t,a,j,n,null)}}yu(e,o,p,x,R,c,l,!1);return;case"select":Qe("invalid",e),a=c=o=null;for(l in n)if(n.hasOwnProperty(l)&&(p=n[l],p!=null))switch(l){case"value":o=p;break;case"defaultValue":c=p;break;case"multiple":a=p;default:ft(e,t,l,p,n,null)}t=o,n=c,e.multiple=!!a,t!=null?vl(e,!!a,t,!1):n!=null&&vl(e,!!a,n,!0);return;case"textarea":Qe("invalid",e),o=l=a=null;for(c in n)if(n.hasOwnProperty(c)&&(p=n[c],p!=null))switch(c){case"value":a=p;break;case"defaultValue":l=p;break;case"children":o=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(d(91));break;default:ft(e,t,c,p,n,null)}vu(e,a,l,o);return;case"option":for(x in n)n.hasOwnProperty(x)&&(a=n[x],a!=null)&&(x==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":ft(e,t,x,a,n,null));return;case"dialog":Qe("beforetoggle",e),Qe("toggle",e),Qe("cancel",e),Qe("close",e);break;case"iframe":case"object":Qe("load",e);break;case"video":case"audio":for(a=0;a<Qo.length;a++)Qe(Qo[a],e);break;case"image":Qe("error",e),Qe("load",e);break;case"details":Qe("toggle",e);break;case"embed":case"source":case"link":Qe("error",e),Qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(R in n)if(n.hasOwnProperty(R)&&(a=n[R],a!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:ft(e,t,R,a,n,null)}return;default:if(Vr(t)){for(j in n)n.hasOwnProperty(j)&&(a=n[j],a!==void 0&&Ac(e,t,j,a,n,void 0));return}}for(p in n)n.hasOwnProperty(p)&&(a=n[p],a!=null&&ft(e,t,p,a,n,null))}function Cm(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,o=null,c=null,p=null,x=null,R=null,j=null;for(O in n){var X=n[O];if(n.hasOwnProperty(O)&&X!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":x=X;default:a.hasOwnProperty(O)||ft(e,t,O,null,a,X)}}for(var _ in a){var O=a[_];if(X=n[_],a.hasOwnProperty(_)&&(O!=null||X!=null))switch(_){case"type":o=O;break;case"name":l=O;break;case"checked":R=O;break;case"defaultChecked":j=O;break;case"value":c=O;break;case"defaultValue":p=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(d(137,t));break;default:O!==X&&ft(e,t,_,O,a,X)}}Gr(e,c,p,x,R,j,o,l);return;case"select":O=c=p=_=null;for(o in n)if(x=n[o],n.hasOwnProperty(o)&&x!=null)switch(o){case"value":break;case"multiple":O=x;default:a.hasOwnProperty(o)||ft(e,t,o,null,a,x)}for(l in a)if(o=a[l],x=n[l],a.hasOwnProperty(l)&&(o!=null||x!=null))switch(l){case"value":_=o;break;case"defaultValue":p=o;break;case"multiple":c=o;default:o!==x&&ft(e,t,l,o,a,x)}t=p,n=c,a=O,_!=null?vl(e,!!n,_,!1):!!a!=!!n&&(t!=null?vl(e,!!n,t,!0):vl(e,!!n,n?[]:"",!1));return;case"textarea":O=_=null;for(p in n)if(l=n[p],n.hasOwnProperty(p)&&l!=null&&!a.hasOwnProperty(p))switch(p){case"value":break;case"children":break;default:ft(e,t,p,null,a,l)}for(c in a)if(l=a[c],o=n[c],a.hasOwnProperty(c)&&(l!=null||o!=null))switch(c){case"value":_=l;break;case"defaultValue":O=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(d(91));break;default:l!==o&&ft(e,t,c,l,a,o)}bu(e,_,O);return;case"option":for(var me in n)_=n[me],n.hasOwnProperty(me)&&_!=null&&!a.hasOwnProperty(me)&&(me==="selected"?e.selected=!1:ft(e,t,me,null,a,_));for(x in a)_=a[x],O=n[x],a.hasOwnProperty(x)&&_!==O&&(_!=null||O!=null)&&(x==="selected"?e.selected=_&&typeof _!="function"&&typeof _!="symbol":ft(e,t,x,_,a,O));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 ke in n)_=n[ke],n.hasOwnProperty(ke)&&_!=null&&!a.hasOwnProperty(ke)&&ft(e,t,ke,null,a,_);for(R in a)if(_=a[R],O=n[R],a.hasOwnProperty(R)&&_!==O&&(_!=null||O!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(d(137,t));break;default:ft(e,t,R,_,a,O)}return;default:if(Vr(t)){for(var ht in n)_=n[ht],n.hasOwnProperty(ht)&&_!==void 0&&!a.hasOwnProperty(ht)&&Ac(e,t,ht,void 0,a,_);for(j in a)_=a[j],O=n[j],!a.hasOwnProperty(j)||_===O||_===void 0&&O===void 0||Ac(e,t,j,_,a,O);return}}for(var M in n)_=n[M],n.hasOwnProperty(M)&&_!=null&&!a.hasOwnProperty(M)&&ft(e,t,M,null,a,_);for(X in a)_=a[X],O=n[X],!a.hasOwnProperty(X)||_===O||_==null&&O==null||ft(e,t,X,_,a,O)}function wh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function wm(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var l=n[a],o=l.transferSize,c=l.initiatorType,p=l.duration;if(o&&p&&wh(c)){for(c=0,p=l.responseEnd,a+=1;a<n.length;a++){var x=n[a],R=x.startTime;if(R>p)break;var j=x.transferSize,X=x.initiatorType;j&&wh(X)&&(x=x.responseEnd,c+=j*(x<p?1:(p-R)/(x-R)))}if(--a,t+=8*(o+c)/(l.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 Rc=null,_c=null;function pr(e){return e.nodeType===9?e:e.ownerDocument}function zh(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 kh(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 Lc(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 Oc=null;function zm(){var e=window.event;return e&&e.type==="popstate"?e===Oc?!1:(Oc=e,!0):(Oc=null,!1)}var Mh=typeof setTimeout=="function"?setTimeout:void 0,km=typeof clearTimeout=="function"?clearTimeout:void 0,Dh=typeof Promise=="function"?Promise:void 0,Mm=typeof queueMicrotask=="function"?queueMicrotask:typeof Dh<"u"?function(e){return Dh.resolve(null).then(e).catch(Dm)}:Mh;function Dm(e){setTimeout(function(){throw e})}function Ua(e){return e==="head"}function Eh(e,t){var n=t,a=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(l),Wl(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")Zo(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Zo(n);for(var o=n.firstChild;o;){var c=o.nextSibling,p=o.nodeName;o[Ja]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=c}}else n==="body"&&Zo(e.ownerDocument.body);n=l}while(n);Wl(t)}function Th(e,t){var n=e;e=0;do{var a=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||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Hc(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":Hc(n),uo(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Em(e,t,n,a){for(;e.nodeType===1;){var l=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Ja])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==l.rel||e.getAttribute("href")!==(l.href==null||l.href===""?null:l.href)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin)||e.getAttribute("title")!==(l.title==null?null:l.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=Ln(e.nextSibling),e===null)break}return null}function Tm(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Ln(e.nextSibling),e===null))return null;return e}function Ah(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ln(e.nextSibling),e===null))return null;return e}function Uc(e){return e.data==="$?"||e.data==="$~"}function Bc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Am(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Ln(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 Nc=null;function Rh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Ln(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function _h(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 Lh(e,t,n){switch(t=pr(n),e){case"html":if(e=t.documentElement,!e)throw Error(d(452));return e;case"head":if(e=t.head,!e)throw Error(d(453));return e;case"body":if(e=t.body,!e)throw Error(d(454));return e;default:throw Error(d(451))}}function Zo(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);uo(e)}var On=new Map,Oh=new Set;function mr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ga=J.d;J.d={f:Rm,r:_m,D:Lm,C:Om,L:Hm,m:Um,X:Nm,S:Bm,M:jm};function Rm(){var e=ga.f(),t=ir();return e||t}function _m(e){var t=pe(e);t!==null&&t.tag===5&&t.type==="form"?$d(t):ga.r(e)}var Fl=typeof document>"u"?null:document;function Hh(e,t,n){var a=Fl;if(a&&typeof t=="string"&&t){var l=Mn(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),Oh.has(l)||(Oh.add(l),e={rel:e,crossOrigin:n,href:t},a.querySelector(l)===null&&(t=a.createElement("link"),Ft(t,"link",e),ye(t),a.head.appendChild(t)))}}function Lm(e){ga.D(e),Hh("dns-prefetch",e,null)}function Om(e,t){ga.C(e,t),Hh("preconnect",e,t)}function Hm(e,t,n){ga.L(e,t,n);var a=Fl;if(a&&e&&t){var l='link[rel="preload"][as="'+Mn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+Mn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+Mn(n.imageSizes)+'"]')):l+='[href="'+Mn(e)+'"]';var o=l;switch(t){case"style":o=Jl(e);break;case"script":o=$l(e)}On.has(o)||(e=k({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),On.set(o,e),a.querySelector(l)!==null||t==="style"&&a.querySelector(Fo(o))||t==="script"&&a.querySelector(Jo(o))||(t=a.createElement("link"),Ft(t,"link",e),ye(t),a.head.appendChild(t)))}}function Um(e,t){ga.m(e,t);var n=Fl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Mn(a)+'"][href="'+Mn(e)+'"]',o=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=$l(e)}if(!On.has(o)&&(e=k({rel:"modulepreload",href:e},t),On.set(o,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Jo(o)))return}a=n.createElement("link"),Ft(a,"link",e),ye(a),n.head.appendChild(a)}}}function Bm(e,t,n){ga.S(e,t,n);var a=Fl;if(a&&e){var l=ge(a).hoistableStyles,o=Jl(e);t=t||"default";var c=l.get(o);if(!c){var p={loading:0,preload:null};if(c=a.querySelector(Fo(o)))p.loading=5;else{e=k({rel:"stylesheet",href:e,"data-precedence":t},n),(n=On.get(o))&&jc(e,n);var x=c=a.createElement("link");ye(x),Ft(x,"link",e),x._p=new Promise(function(R,j){x.onload=R,x.onerror=j}),x.addEventListener("load",function(){p.loading|=1}),x.addEventListener("error",function(){p.loading|=2}),p.loading|=4,gr(c,t,a)}c={type:"stylesheet",instance:c,count:1,state:p},l.set(o,c)}}}function Nm(e,t){ga.X(e,t);var n=Fl;if(n&&e){var a=ge(n).hoistableScripts,l=$l(e),o=a.get(l);o||(o=n.querySelector(Jo(l)),o||(e=k({src:e,async:!0},t),(t=On.get(l))&&qc(e,t),o=n.createElement("script"),ye(o),Ft(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function jm(e,t){ga.M(e,t);var n=Fl;if(n&&e){var a=ge(n).hoistableScripts,l=$l(e),o=a.get(l);o||(o=n.querySelector(Jo(l)),o||(e=k({src:e,async:!0,type:"module"},t),(t=On.get(l))&&qc(e,t),o=n.createElement("script"),ye(o),Ft(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function Uh(e,t,n,a){var l=(l=De.current)?mr(l):null;if(!l)throw Error(d(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Jl(n.href),n=ge(l).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Jl(n.href);var o=ge(l).hoistableStyles,c=o.get(e);if(c||(l=l.ownerDocument||l,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,c),(o=l.querySelector(Fo(e)))&&!o._p&&(c.instance=o,c.state.loading=5),On.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},On.set(e,n),o||qm(l,e,n,c.state))),t&&a===null)throw Error(d(528,""));return c}if(t&&a!==null)throw Error(d(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=$l(n),n=ge(l).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(d(444,e))}}function Jl(e){return'href="'+Mn(e)+'"'}function Fo(e){return'link[rel="stylesheet"]['+e+"]"}function Bh(e){return k({},e,{"data-precedence":e.precedence,precedence:null})}function qm(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Ft(t,"link",n),ye(t),e.head.appendChild(t))}function $l(e){return'[src="'+Mn(e)+'"]'}function Jo(e){return"script[async]"+e}function Nh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Mn(n.href)+'"]');if(a)return t.instance=a,ye(a),a;var l=k({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ye(a),Ft(a,"style",l),gr(a,n.precedence,e),t.instance=a;case"stylesheet":l=Jl(n.href);var o=e.querySelector(Fo(l));if(o)return t.state.loading|=4,t.instance=o,ye(o),o;a=Bh(n),(l=On.get(l))&&jc(a,l),o=(e.ownerDocument||e).createElement("link"),ye(o);var c=o;return c._p=new Promise(function(p,x){c.onload=p,c.onerror=x}),Ft(o,"link",a),t.state.loading|=4,gr(o,n.precedence,e),t.instance=o;case"script":return o=$l(n.src),(l=e.querySelector(Jo(o)))?(t.instance=l,ye(l),l):(a=n,(l=On.get(o))&&(a=k({},n),qc(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),ye(l),Ft(l,"link",a),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(d(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,gr(a,n.precedence,e));return t.instance}function gr(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,o=l,c=0;c<a.length;c++){var p=a[c];if(p.dataset.precedence===t)o=p;else if(o!==l)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function jc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function qc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var yr=null;function jh(e,t,n){if(yr===null){var a=new Map,l=yr=new Map;l.set(n,a)}else l=yr,a=l.get(n),a||(a=new Map,l.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var o=n[l];if(!(o[Ja]||o[zt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var c=o.getAttribute(t)||"";c=e+c;var p=a.get(c);p?p.push(o):a.set(c,[o])}}return a}function qh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Ym(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 Yh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Gm(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var l=Jl(a.href),o=t.querySelector(Fo(l));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=br.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,ye(o);return}o=t.ownerDocument||t,a=Bh(a),(l=On.get(l))&&jc(a,l),o=o.createElement("link"),ye(o);var c=o;c._p=new Promise(function(p,x){c.onload=p,c.onerror=x}),Ft(o,"link",a),n.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=br.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Yc=0;function Xm(e,t){return e.stylesheets&&e.count===0&&xr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&xr(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Yc===0&&(Yc=62500*wm());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&xr(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Yc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function br(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var vr=null;function xr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,vr=new Map,t.forEach(Vm,e),vr=null,br.call(e))}function Vm(e,t){if(!(t.state.loading&4)){var n=vr.get(e);if(n)var a=n.get(null);else{n=new Map,vr.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<l.length;o++){var c=l[o];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(n.set(c.dataset.precedence,c),a=c)}a&&n.set(null,a)}l=t.instance,c=l.getAttribute("data-precedence"),o=n.get(c)||a,o===a&&n.set(null,l),n.set(c,l),this.count++,a=br.bind(this),l.addEventListener("load",a),l.addEventListener("error",a),o?o.parentNode.insertBefore(l,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var $o={$$typeof:ie,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function Qm(e,t,n,a,l,o,c,p,x){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=io(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=io(0),this.hiddenUpdates=io(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=o,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function Gh(e,t,n,a,l,o,c,p,x,R,j,X){return e=new Qm(e,t,n,c,x,R,j,X,p),t=1,o===!0&&(t|=24),o=gn(3,null,null,t),e.current=o,o.stateNode=e,t=xs(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:a,isDehydrated:n,cache:t},zs(o),e}function Xh(e){return e?(e=Dl,e):Dl}function Vh(e,t,n,a,l,o){l=Xh(l),a.context===null?a.context=l:a.pendingContext=l,a=ka(t),a.payload={element:n},o=o===void 0?null:o,o!==null&&(a.callback=o),n=Ma(e,a,t),n!==null&&(dn(n,e,t),Eo(n,e,t))}function Qh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Gc(e,t){Qh(e,t),(e=e.alternate)&&Qh(e,t)}function Kh(e){if(e.tag===13||e.tag===31){var t=Pa(e,67108864);t!==null&&dn(t,e,67108864),Gc(e,67108864)}}function Zh(e){if(e.tag===13||e.tag===31){var t=Sn();t=Wn(t);var n=Pa(e,t);n!==null&&dn(n,e,t),Gc(e,t)}}var Sr=!0;function Km(e,t,n,a){var l=E.T;E.T=null;var o=J.p;try{J.p=2,Xc(e,t,n,a)}finally{J.p=o,E.T=l}}function Zm(e,t,n,a){var l=E.T;E.T=null;var o=J.p;try{J.p=8,Xc(e,t,n,a)}finally{J.p=o,E.T=l}}function Xc(e,t,n,a){if(Sr){var l=Vc(a);if(l===null)Tc(e,t,a,Cr,n),Jh(e,a);else if(Jm(l,e,t,n,a))a.stopPropagation();else if(Jh(e,a),t&4&&-1<Fm.indexOf(e)){for(;l!==null;){var o=pe(l);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var c=$n(o.pendingLanes);if(c!==0){var p=o;for(p.pendingLanes|=2,p.entangledLanes|=2;c;){var x=1<<31-mt(c);p.entanglements[1]|=x,c&=~x}Kn(o),(nt&6)===0&&(lr=Dt()+500,Vo(0))}}break;case 31:case 13:p=Pa(o,2),p!==null&&dn(p,o,2),ir(),Gc(o,2)}if(o=Vc(a),o===null&&Tc(e,t,a,Cr,n),o===l)break;l=o}l!==null&&a.stopPropagation()}else Tc(e,t,a,null,n)}}function Vc(e){return e=Kr(e),Qc(e)}var Cr=null;function Qc(e){if(Cr=null,e=In(e),e!==null){var t=m(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=w(t),e!==null)return e;e=null}else if(n===31){if(e=D(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 Cr=e,null}function Fh(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(wn()){case Yn:return 2;case Hn:return 8;case zn:case Z:return 32;case de:return 268435456;default:return 32}default:return 32}}var Kc=!1,Ba=null,Na=null,ja=null,Wo=new Map,Io=new Map,qa=[],Fm="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 Jh(e,t){switch(e){case"focusin":case"focusout":Ba=null;break;case"dragenter":case"dragleave":Na=null;break;case"mouseover":case"mouseout":ja=null;break;case"pointerover":case"pointerout":Wo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Io.delete(t.pointerId)}}function Po(e,t,n,a,l,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:o,targetContainers:[l]},t!==null&&(t=pe(t),t!==null&&Kh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Jm(e,t,n,a,l){switch(t){case"focusin":return Ba=Po(Ba,e,t,n,a,l),!0;case"dragenter":return Na=Po(Na,e,t,n,a,l),!0;case"mouseover":return ja=Po(ja,e,t,n,a,l),!0;case"pointerover":var o=l.pointerId;return Wo.set(o,Po(Wo.get(o)||null,e,t,n,a,l)),!0;case"gotpointercapture":return o=l.pointerId,Io.set(o,Po(Io.get(o)||null,e,t,n,a,l)),!0}return!1}function $h(e){var t=In(e.target);if(t!==null){var n=m(t);if(n!==null){if(t=n.tag,t===13){if(t=w(n),t!==null){e.blockedOn=t,Un(e.priority,function(){Zh(n)});return}}else if(t===31){if(t=D(n),t!==null){e.blockedOn=t,Un(e.priority,function(){Zh(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 wr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Vc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Qr=a,n.target.dispatchEvent(a),Qr=null}else return t=pe(n),t!==null&&Kh(t),e.blockedOn=n,!1;t.shift()}return!0}function Wh(e,t,n){wr(e)&&n.delete(t)}function $m(){Kc=!1,Ba!==null&&wr(Ba)&&(Ba=null),Na!==null&&wr(Na)&&(Na=null),ja!==null&&wr(ja)&&(ja=null),Wo.forEach(Wh),Io.forEach(Wh)}function zr(e,t){e.blockedOn===t&&(e.blockedOn=null,Kc||(Kc=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,$m)))}var kr=null;function Ih(e){kr!==e&&(kr=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){kr===e&&(kr=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],l=e[t+2];if(typeof a!="function"){if(Qc(a||n)===null)continue;break}var o=pe(n);o!==null&&(e.splice(t,3),t-=3,Vs(o,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function Wl(e){function t(x){return zr(x,e)}Ba!==null&&zr(Ba,e),Na!==null&&zr(Na,e),ja!==null&&zr(ja,e),Wo.forEach(t),Io.forEach(t);for(var n=0;n<qa.length;n++){var a=qa[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<qa.length&&(n=qa[0],n.blockedOn===null);)$h(n),n.blockedOn===null&&qa.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var l=n[a],o=n[a+1],c=l[Rt]||null;if(typeof o=="function")c||Ih(n);else if(c){var p=null;if(o&&o.hasAttribute("formAction")){if(l=o,c=o[Rt]||null)p=c.formAction;else if(Qc(l)!==null)continue}else p=c.action;typeof p=="function"?n[a+1]=p:(n.splice(a,3),a-=3),Ih(n)}}}function Ph(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(c){return l=c})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function Zc(e){this._internalRoot=e}Mr.prototype.render=Zc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(d(409));var n=t.current,a=Sn();Vh(n,a,e,t,null,null)},Mr.prototype.unmount=Zc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Vh(e.current,2,null,e,null,null),ir(),t[pn]=null}};function Mr(e){this._internalRoot=e}Mr.prototype.unstable_scheduleHydration=function(e){if(e){var t=mi();e={blockedOn:null,target:e,priority:t};for(var n=0;n<qa.length&&t!==0&&t<qa[n].priority;n++);qa.splice(n,0,e),n===0&&$h(e)}};var ep=s.version;if(ep!=="19.2.4")throw Error(d(527,ep,"19.2.4"));J.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(d(188)):(e=Object.keys(e).join(","),Error(d(268,e)));return e=g(t),e=e!==null?A(e):null,e=e===null?null:e.stateNode,e};var Wm={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:E,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Dr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Dr.isDisabled&&Dr.supportsFiber)try{Ue=Dr.inject(Wm),ze=Dr}catch{}}return ni.createRoot=function(e,t){if(!h(e))throw Error(d(299));var n=!1,a="",l=rf,o=sf,c=cf;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=Gh(e,1,!1,null,null,n,a,null,l,o,c,Ph),e[pn]=t.current,Ec(e),new Zc(t)},ni.hydrateRoot=function(e,t,n){if(!h(e))throw Error(d(299));var a=!1,l="",o=rf,c=sf,p=cf,x=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(o=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(p=n.onRecoverableError),n.formState!==void 0&&(x=n.formState)),t=Gh(e,1,!0,t,n??null,a,l,x,o,c,p,Ph),t.context=Xh(null),n=t.current,a=Sn(),a=Wn(a),l=ka(a),l.callback=null,Ma(n,l,a),n=a,t.current.lanes=n,Fa(t,n),Kn(t),e[pn]=t.current,Ec(e),new Mr(t)},ni.version="19.2.4",ni}var xp;function a1(){if(xp)return Pc.exports;xp=1;function i(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(s){console.error(s)}}return i(),Pc.exports=n1(),Pc.exports}var l1=a1(),Sp=function(s,f){var d=arguments;if(f==null||!ui.call(f,"css"))return v.createElement.apply(void 0,d);var h=d.length,m=new Array(h);m[0]=hu,m[1]=fu(s,f);for(var w=2;w<h;w++)m[w]=d[w];return v.createElement.apply(null,m)};(function(i){var s;s||(s=i.JSX||(i.JSX={}))})(Sp||(Sp={}));function y(){for(var i=arguments.length,s=new Array(i),f=0;f<i;f++)s[f]=arguments[f];return Up(s)}function ln(){var i=y.apply(void 0,arguments),s="animation-"+i.name;return{name:s,styles:"@keyframes "+s+"{"+i.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const o1={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},i1={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:()=>{},editedImageKey:null,setEditedImageKey:()=>{},scanRequested:!1,triggerScan:()=>{},clearScanRequest:()=>{},searchQuery:"",setSearchQuery:()=>{},error:null,showError:()=>{},clearError:()=>{},fileItems:[],setFileItems:()=>{},actionState:o1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestDownload:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},deleteOrphans:async()=>{}},Np=v.createContext(i1);function ao(){return v.useContext(Np)}const di="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Ubuntu, sans-serif",u={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",successLight:"#e6f7ef",danger:"#df1b41",dangerHover:"#c41535",dangerLight:"#fff5f7",imagesFolder:"#8b5cf6",hover:"#e8ecf0"},Q={xs:"13px",sm:"14px",base:"16px",lg:"19px",xl:"22px"},oo=y("font-family:",di,";font-size:",Q.base,";line-height:1.5;color:",u.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;}",""),r1=ln`
10
+ from { opacity: 0; }
11
+ to { opacity: 1; }
12
+ `,s1=ln`
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
+ `,c1=ln`
22
+ from { transform: rotate(0deg); }
23
+ to { transform: rotate(360deg); }
24
+ `,Ae={overlay:y("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:",r1," 0.15s ease-out;font-family:",di,";",""),modal:y(oo," background-color:",u.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:",s1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",Q.lg,";font-weight:600;color:",u.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"5e7rpo",styles:"padding:12px 24px 24px"},message:y("font-size:",Q.base,";color:",u.textSecondary,";margin:0;line-height:1.6;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",u.border,";background-color:",u.background,";",""),btn:y("padding:10px 18px;font-size:",Q.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",u.surface,";border:1px solid ",u.border,";color:",u.text,";&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),btnConfirm:y("background-color:",u.primary,";border:1px solid ",u.primary,";color:white;&:hover{background-color:",u.primaryHover,";border-color:",u.primaryHover,";}",""),btnDanger:y("background-color:",u.danger,";border:1px solid ",u.danger,";color:white;&:hover{background-color:",u.dangerHover,";border-color:",u.dangerHover,";}","")};function li({title:i,message:s,confirmLabel:f="Confirm",cancelLabel:d="Cancel",variant:h="default",onConfirm:m,onCancel:w}){return r("div",{css:Ae.overlay,onClick:w,children:b("div",{css:Ae.modal,onClick:D=>D.stopPropagation(),children:[r("div",{css:Ae.header,children:r("h3",{css:Ae.title,children:i})}),r("div",{css:Ae.body,children:r("p",{css:Ae.message,children:s})}),b("div",{css:Ae.footer,children:[r("button",{css:[Ae.btn,Ae.btnCancel,"",""],onClick:w,children:d}),r("button",{css:[Ae.btn,h==="danger"?Ae.btnDanger:Ae.btnConfirm,"",""],onClick:m,children:f})]})]})})}const u1={input:y("width:100%;padding:10px 12px;font-size:",Q.base,";border:1px solid ",u.border,";border-radius:6px;background:",u.surface,";color:",u.text,";margin-top:12px;transition:all 0.15s ease;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 2px ",u.primaryLight,";}&::placeholder{color:",u.textMuted,";}","")};function _r({title:i,message:s,inputLabel:f,defaultValue:d="",placeholder:h,confirmLabel:m="Confirm",cancelLabel:w="Cancel",isLoading:D=!1,loadingLabel:C="Processing...",onConfirm:g,onCancel:A}){const[k,B]=it.useState(d),Y=U=>{U.preventDefault(),k.trim()&&!D&&g(k.trim())};return r("div",{css:Ae.overlay,onClick:D?void 0:A,children:r("div",{css:Ae.modal,onClick:U=>U.stopPropagation(),children:b("form",{onSubmit:Y,children:[r("div",{css:Ae.header,children:r("h3",{css:Ae.title,children:i})}),b("div",{css:Ae.body,children:[s&&r("p",{css:Ae.message,children:s}),f&&r("label",{css:Ae.message,children:f}),r("input",{css:u1.input,type:"text",value:k,onChange:U=>B(U.target.value),placeholder:h,autoFocus:!0,disabled:D})]}),b("div",{css:Ae.footer,children:[r("button",{type:"button",css:[Ae.btn,Ae.btnCancel,"",""],onClick:A,disabled:D,children:w}),r("button",{type:"submit",css:[Ae.btn,Ae.btnConfirm,"",""],disabled:!k.trim()||D,children:D?b(tt,{children:[r("span",{css:y("display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:",c1," 0.75s linear infinite;margin-right:6px;","")}),C]}):m})]})]})})})}function pu({title:i,message:s,buttonLabel:f="OK",onClose:d}){return r("div",{css:Ae.overlay,onClick:d,children:b("div",{css:Ae.modal,onClick:h=>h.stopPropagation(),children:[r("div",{css:Ae.header,children:r("h3",{css:Ae.title,children:i})}),r("div",{css:Ae.body,children:r("p",{css:Ae.message,children:s})}),r("div",{css:Ae.footer,children:r("button",{css:[Ae.btn,Ae.btnConfirm,"",""],onClick:d,children:f})})]})})}const Ga={progressContainer:{name:"yz1nei",styles:"margin-top:16px"},progressBar:y("width:100%;height:8px;background-color:",u.background,";border-radius:4px;overflow:hidden;margin-bottom:12px;",""),progressFill:y("height:100%;background:linear-gradient(90deg, ",u.primary,", ",u.primaryHover,");border-radius:4px;transition:width 0.3s ease;",""),progressText:y("font-size:",Q.sm,";color:",u.textSecondary,";margin:0;display:flex;justify-content:space-between;align-items:center;",""),currentFile:y("font-size:",Q.xs,";color:",u.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:y("font-size:",Q.xs,";color:#991b1b;margin:0 0 4px;&:last-child{margin-bottom:0;}","")};function hl({title:i,progress:s,onClose:f,onDeleteOrphans:d,onStop:h}){const m=s.status==="complete",w=s.status==="error",D=s.status==="stopped",C=s.status==="stopping",g=m||w||D,A=!g||C;return r("div",{css:Ae.overlay,children:b("div",{css:Ae.modal,onClick:k=>k.stopPropagation(),children:[r("div",{css:Ae.header,children:r("h3",{css:Ae.title,children:i})}),r("div",{css:Ae.body,children:w?r("p",{css:Ae.message,children:s.message||"An error occurred"}):D?b("p",{css:Ae.message,children:["Processing stopped. Processed ",s.processed??s.current," image",(s.processed??s.current)!==1?"s":""," before stopping."]}):m?b(tt,{children:[b("p",{css:Ae.message,children:[s.message?s.message:s.isDelete?b(tt,{children:["Deleted ",s.processed," file",s.processed!==1?"s":"",".",s.errors!==void 0&&s.errors>0?b(tt,{children:[" ",s.errors," error",s.errors!==1?"s":""," occurred."]}):null]}):s.isMove?b(tt,{children:["Moved ",s.processed," file",s.processed!==1?"s":"",".",s.errors!==void 0&&s.errors>0?b(tt,{children:[" ",s.errors," error",s.errors!==1?"s":""," occurred."]}):null]}):s.isScan?b(tt,{children:[s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?b(tt,{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?b(tt,{children:[" Removed ",s.orphanedEntries," orphaned entr",s.orphanedEntries!==1?"ies":"y","."]}):null,s.pendingUpdates!==void 0&&s.pendingUpdates>0?b(tt,{children:[" ",s.pendingUpdates," file",s.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):b(tt,{children:["Processed ",s.processed," new image",s.processed!==1?"s":"",".",s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?b(tt,{children:[" ",s.alreadyProcessed," already processed."]}):null]}),s.orphansRemoved!==void 0&&s.orphansRemoved>0?b(tt,{children:[" Removed ",s.orphansRemoved," orphaned thumbnail",s.orphansRemoved!==1?"s":"","."]}):null]}),s.errorMessages&&s.errorMessages.length>0&&b("div",{css:Ga.errorList,children:[s.errorMessages.slice(0,10).map((k,B)=>r("p",{css:Ga.errorItem,children:k},B)),s.errorMessages.length>10&&b("p",{css:Ga.errorItem,children:["...and ",s.errorMessages.length-10," more"]})]})]}):b(tt,{children:[r("p",{css:Ae.message,children:s.status==="cleanup"?s.message||"Cleaning up...":s.message||"Processing..."}),b("div",{css:Ga.progressContainer,children:[r("div",{css:Ga.progressBar,children:r("div",{css:Ga.progressFill,style:{width:`${s.percent}%`}})}),b("div",{css:Ga.progressText,children:[b("span",{children:[s.current," of ",s.total]}),b("span",{children:[s.percent,"%"]})]}),s.currentFile&&r("p",{css:Ga.currentFile,title:s.currentFile,children:s.currentFile})]})]})}),b("div",{css:Ae.footer,children:[A&&h&&r("button",{css:[Ae.btn,Ae.btnDanger,"",""],onClick:h,disabled:s.status==="stopping",children:s.status==="stopping"?"Stopping...":"Stop"}),g&&s.orphanedFiles&&s.orphanedFiles.length>0&&d&&b("button",{css:[Ae.btn,Ae.btnDanger,"",""],onClick:d,children:["Delete ",s.orphanedFiles.length," Orphan",s.orphanedFiles.length!==1?"s":""]}),g&&r("button",{css:[Ae.btn,Ae.btnConfirm,"",""],onClick:f,children:"Done"})]})]})})}function jp(i){const{setShowProgress:s,setProgressTitle:f,setProgressState:d,triggerRefresh:h}=i,m=v.useRef(null),w=v.useRef(!1),D=v.useRef(!1),C=v.useRef(null),g=v.useCallback(()=>{m.current&&m.current.abort()},[]);return{execute:v.useCallback(async k=>{const{endpoint:B,body:Y,title:U,operationType:G,onComplete:oe,onError:K}=k;if(w.current){console.warn("Streaming operation already in progress");return}w.current=!0,D.current=!1;const ie=`${B.split("/").pop()?.replace("-stream","")||"op"}-${Date.now()}-${Math.random().toString(36).slice(2)}`;C.current=ie;const he=new AbortController;m.current=he;const V=async()=>{D.current=!0,d(I=>({...I,status:"stopping"}));try{await fetch("/api/studio/cancel-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationId:ie})})}catch{}};he.signal.addEventListener("abort",V),f(U),s(!0),d({current:0,total:0,percent:0,status:"processing",message:`Starting ${U.toLowerCase()}...`});try{const I=await fetch(B,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...Y,operationId:ie})});if(!I.ok){const L=await I.json().catch(()=>({}));throw new Error(L.error||`Request failed: ${I.status}`)}if(!I.body)throw new Error("No response body");const W=I.body.getReader(),te=new TextDecoder;let N="";try{for(;;){const{done:L,value:ee}=await W.read();if(L)break;N+=te.decode(ee,{stream:!0});const ae=N.split(`
25
+
26
+ `);N=ae.pop()||"";for(const ue of ae)if(ue.startsWith("data: "))try{const ne=JSON.parse(ue.slice(6));if(ne.type==="start")d(_e=>({..._e,total:ne.total||_e.total}));else if(ne.type==="progress")d({current:ne.current||0,total:ne.total||0,percent:ne.percent||Math.round((ne.current||0)/(ne.total||1)*100),status:"processing",currentFile:ne.currentFile,message:ne.message});else if(ne.type==="cleanup")d(_e=>({..._e,status:"cleanup",message:ne.message}));else if(ne.type==="complete"){const _e=ne.cancelled===!0,E=ne.processed??ne.moved??ne.renamed??ne.pushed??ne.downloaded??ne.added??ne.imported??ne.deleted??ne.current??0;d({current:E,total:E,percent:100,status:_e?"stopped":ne.errors&&ne.errors>0?"error":"complete",message:ne.message,processed:E,errors:ne.errors,orphanedFiles:ne.orphanedFiles,isDelete:G==="delete",isMove:G==="move",isScan:G==="scan"}),h(),oe?.(ne)}else ne.type==="error"&&(d(_e=>({..._e,status:"error",message:ne.message})),K?.(ne.message||"Unknown error"))}catch{}}}catch(L){if(!D.current)throw L}finally{he.signal.removeEventListener("abort",V)}}catch(I){if(!D.current){const W=I instanceof Error?I.message:"Operation failed";console.error(`${U} error:`,I),d({current:0,total:0,percent:0,status:"error",message:W}),K?.(W)}}finally{w.current=!1,m.current=null,C.current=null}},[s,f,d,h]),stop:g,get isRunning(){return w.current}}}const d1=ln`
27
+ from { opacity: 0; }
28
+ to { opacity: 1; }
29
+ `,f1=ln`
30
+ from {
31
+ opacity: 0;
32
+ transform: translateY(-8px) scale(0.98);
33
+ }
34
+ to {
35
+ opacity: 1;
36
+ transform: translateY(0) scale(1);
37
+ }
38
+ `,At={overlay:y("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:",d1," 0.15s ease-out;font-family:",di,";",""),modal:y(oo," background-color:",u.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:",f1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",Q.lg,";font-weight:600;color:",u.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:y("font-size:",Q.base,";color:",u.textSecondary,";margin:0 0 16px;line-height:1.6;",""),folderList:{name:"1axgfg3",styles:"display:flex;flex-direction:column;gap:0"},folderItem:y("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:",u.surfaceHover,";}",""),treeIndent:{name:"197dxto",styles:"display:flex;align-items:center;height:100%"},treeLine:y("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 ",u.textSecondary,";}&::after{content:'';position:absolute;left:8px;top:50%;width:8px;height:0;border-top:1px dashed ",u.textSecondary,";}",""),folderItemSelected:y("background-color:",u.primaryLight,";border-color:",u.primary,";&:hover{background-color:",u.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:y("font-size:",Q.base,";color:",u.text,";flex:1;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",u.border,";background-color:",u.background,";",""),btn:y("padding:10px 18px;font-size:",Q.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",u.surface,";border:1px solid ",u.border,";color:",u.text,";&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),btnConfirm:y("background-color:",u.primary,";border:1px solid ",u.primary,";color:white;&:hover:not(:disabled){background-color:",u.primaryHover,";border-color:",u.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),loading:y("display:flex;align-items:center;justify-content:center;padding:40px;color:",u.textSecondary,";",""),spinner:y("width:24px;height:24px;border-radius:50%;border:3px solid ",u.border,";border-top-color:",u.primary,";animation:spin 0.8s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}","")};function qp({selectedItems:i,currentPath:s,onMove:f,onCancel:d}){const[h,m]=v.useState([]),[w,D]=v.useState(!0),[C,g]=v.useState(null);v.useEffect(()=>{async function U(){try{const G=await fetch("/api/studio/list-folders");if(G.ok){const oe=await G.json();console.log("Loaded folders:",oe),m(oe.folders||[])}else console.error("Failed to load folders:",G.status,await G.text())}catch(G){console.error("Failed to load folders:",G)}finally{D(!1)}}U()},[]);const A=Array.from(i),k=h.filter(U=>!A.some(G=>U.path===G||U.path.startsWith(G+"/"))),B=U=>U===s,Y=()=>{C&&f(C)};return r("div",{css:At.overlay,onClick:d,children:b("div",{css:At.modal,onClick:U=>U.stopPropagation(),children:[r("div",{css:At.header,children:r("h3",{css:At.title,children:"Move Items"})}),b("div",{css:At.body,children:[b("p",{css:At.message,children:["Select a destination folder for ",i.size," item",i.size!==1?"s":"",":"]}),w?r("div",{css:At.loading,children:r("div",{css:At.spinner})}):k.length===0?r("div",{css:At.loading,children:"No available folders to move to."}):r("div",{css:At.folderList,children:k.map(U=>{const G=B(U.path);return b("div",{css:[At.folderItem,C===U.path&&At.folderItemSelected,G&&At.folderItemDisabled,"",""],style:{paddingLeft:12},onClick:()=>!G&&g(U.path),children:[U.depth>0&&r("div",{css:At.treeIndent,children:Array.from({length:U.depth}).map((oe,K)=>r("div",{css:At.treeLine},K))}),r("svg",{css:At.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),b("span",{css:At.folderName,children:[U.name,G&&" (current)"]})]},U.path)})})]}),b("div",{css:At.footer,children:[r("button",{css:[At.btn,At.btnCancel,"",""],onClick:d,children:"Cancel"}),r("button",{css:[At.btn,At.btnConfirm,"",""],onClick:Y,disabled:!C,children:"Move Here"})]})]})})}const h1=`CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
39
+ CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key
40
+ CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_key
41
+ CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
42
+ CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev
43
+ NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev`,be={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:y("background:",u.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:y("display:flex;align-items:center;gap:12px;padding:20px 24px;border-bottom:1px solid ",u.border,";",""),icon:y("width:32px;height:32px;color:",u.primary,";flex-shrink:0;",""),title:y("font-size:",Q.xl,";font-weight:600;color:",u.text,";margin:0;",""),closeBtn:y("margin-left:auto;background:none;border:none;padding:4px;cursor:pointer;color:",u.textMuted,";border-radius:4px;&:hover{color:",u.text,";background:",u.surfaceHover,";}",""),closeIcon:{name:"1aynuae",styles:"width:20px;height:20px"},content:{name:"vxuddk",styles:"padding:24px"},intro:y("font-size:",Q.base,";color:",u.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:y("width:28px;height:28px;border-radius:50%;background:",u.primaryLight,";color:",u.primary,";font-size:",Q.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:y("font-size:",Q.base,";font-weight:500;color:",u.text,";margin:0 0 4px 0;",""),stepDesc:y("font-size:",Q.sm,";color:",u.textSecondary,";margin:0;line-height:1.5;",""),link:y("color:",u.primary,";text-decoration:none;font-weight:500;&:hover{text-decoration:underline;}",""),envVarsWrapper:{name:"1ksolcl",styles:"position:relative;margin-top:20px"},envVars:y("background:",u.background,";border:1px solid ",u.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:",u.text,";overflow-x:auto;",""),envVar:{name:"4zleql",styles:"display:block"},envKey:y("color:",u.primary,";",""),envValue:y("color:",u.textSecondary,";",""),copyBtn:y("position:absolute;top:8px;right:8px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;color:",u.textMuted,";transition:all 0.15s ease;&:hover{background:",u.surfaceHover,";color:",u.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:y("padding:16px 24px;border-top:1px solid ",u.border,";display:flex;justify-content:flex-end;gap:12px;",""),docsBtn:y("padding:10px 16px;border-radius:6px;font-size:",Q.base,";font-weight:500;border:1px solid ",u.border,";background:",u.surface,";color:",u.text,";cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:all 0.15s ease;&:hover{background:",u.surfaceHover,";border-color:#d0d5dd;}",""),doneBtn:y("padding:10px 20px;border-radius:6px;font-size:",Q.base,";font-weight:500;border:none;background:",u.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",u.primaryHover,";}",""),externalIcon:{name:"1djxupe",styles:"width:14px;height:14px"}};function Yp({isOpen:i,onClose:s}){const[f,d]=v.useState(!1),h=async()=>{try{await navigator.clipboard.writeText(h1),d(!0),setTimeout(()=>d(!1),2e3)}catch(m){console.error("Failed to copy:",m)}};return i?r("div",{css:be.overlay,onClick:s,children:b("div",{css:be.modal,onClick:m=>m.stopPropagation(),children:[b("div",{css:be.header,children:[r("svg",{css:be.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("h2",{css:be.title,children:"Set Up CDN Storage"}),r("button",{css:be.closeBtn,onClick:s,children:r("svg",{css:be.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:be.content,children:[r("p",{css:be.intro,children:"Sync your images to Cloudflare R2 for faster global delivery. R2 offers generous free tier with no egress fees."}),b("ol",{css:be.steps,children:[b("li",{css:be.step,children:[r("span",{css:be.stepNumber,children:"1"}),b("div",{css:be.stepContent,children:[r("h4",{css:be.stepTitle,children:"Create a Cloudflare account"}),b("p",{css:be.stepDesc,children:["Sign up at"," ",r("a",{css:be.link,href:"https://dash.cloudflare.com/sign-up",target:"_blank",rel:"noopener noreferrer",children:"dash.cloudflare.com"})," ","if you don't have one already."]})]})]}),b("li",{css:be.step,children:[r("span",{css:be.stepNumber,children:"2"}),b("div",{css:be.stepContent,children:[r("h4",{css:be.stepTitle,children:"Create an R2 bucket"}),b("p",{css:be.stepDesc,children:["Go to R2 in your Cloudflare dashboard and create a new bucket. Choose a name like ",r("code",{children:"my-images"}),"."]})]})]}),b("li",{css:be.step,children:[r("span",{css:be.stepNumber,children:"3"}),b("div",{css:be.stepContent,children:[r("h4",{css:be.stepTitle,children:"Enable public access"}),b("p",{css:be.stepDesc,children:['In bucket settings, enable "Public Access" and copy the public URL (e.g., ',r("code",{children:"https://pub-xxx.r2.dev"}),")."]})]})]}),b("li",{css:be.step,children:[r("span",{css:be.stepNumber,children:"4"}),b("div",{css:be.stepContent,children:[r("h4",{css:be.stepTitle,children:"Create API token"}),r("p",{css:be.stepDesc,children:'Go to R2 → Manage R2 API Tokens → Create API Token. Select "Object Read & Write" permissions for your bucket.'})]})]}),b("li",{css:be.step,children:[r("span",{css:be.stepNumber,children:"5"}),b("div",{css:be.stepContent,children:[r("h4",{css:be.stepTitle,children:"Add environment variables"}),b("p",{css:be.stepDesc,children:["Add these to your ",r("code",{children:".env.local"})," file:"]})]})]})]}),b("div",{css:be.envVarsWrapper,children:[b("div",{css:be.envVars,children:[b("span",{css:be.envVar,children:[r("span",{css:be.envKey,children:"CLOUDFLARE_R2_ACCOUNT_ID"}),"=",r("span",{css:be.envValue,children:"your_account_id"})]}),b("span",{css:be.envVar,children:[r("span",{css:be.envKey,children:"CLOUDFLARE_R2_ACCESS_KEY_ID"}),"=",r("span",{css:be.envValue,children:"your_access_key"})]}),b("span",{css:be.envVar,children:[r("span",{css:be.envKey,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY"}),"=",r("span",{css:be.envValue,children:"your_secret_key"})]}),b("span",{css:be.envVar,children:[r("span",{css:be.envKey,children:"CLOUDFLARE_R2_BUCKET_NAME"}),"=",r("span",{css:be.envValue,children:"your_bucket_name"})]}),b("span",{css:be.envVar,children:[r("span",{css:be.envKey,children:"CLOUDFLARE_R2_PUBLIC_URL"}),"=",r("span",{css:be.envValue,children:"https://pub-xxx.r2.dev"})]}),b("span",{css:be.envVar,children:[r("span",{css:be.envKey,children:"NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL"}),"=",r("span",{css:be.envValue,children:"https://pub-xxx.r2.dev"})]})]}),b("button",{css:be.copyBtn,onClick:h,title:"Copy to clipboard",children:[f&&r("span",{css:be.copiedTooltip,children:"Copied!"}),r("svg",{css:be.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})]})]})]}),b("div",{css:be.footer,children:[b("a",{css:be.docsBtn,href:"https://developers.cloudflare.com/r2/get-started/",target:"_blank",rel:"noopener noreferrer",children:["R2 Documentation",r("svg",{css:be.externalIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})]}),r("button",{css:be.doneBtn,onClick:s,children:"Got it"})]})]})}):null}const p1=ln`
44
+ from { opacity: 0; }
45
+ to { opacity: 1; }
46
+ `,m1=ln`
47
+ from {
48
+ opacity: 0;
49
+ transform: translateY(-8px) scale(0.98);
50
+ }
51
+ to {
52
+ opacity: 1;
53
+ transform: translateY(0) scale(1);
54
+ }
55
+ `,yt={overlay:y("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:",p1," 0.15s ease-out;font-family:",di,";",""),modal:y(oo," background-color:",u.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:",m1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",Q.lg,";font-weight:600;color:",u.text,";margin:0;letter-spacing:-0.02em;",""),tabs:y("display:flex;gap:0;margin-top:16px;border-bottom:1px solid ",u.border,";",""),tab:y("padding:12px 20px;font-size:",Q.base,";font-weight:500;color:",u.textSecondary,";background:none;border:none;cursor:pointer;position:relative;transition:color 0.15s;&:hover{color:",u.text,";}",""),tabActive:y("color:",u.primary,";&::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background-color:",u.primary,";}",""),body:{name:"1po9b7e",styles:"padding:24px;min-height:200px"},dropzone:y("border:2px dashed ",u.border,";border-radius:8px;padding:40px 24px;text-align:center;cursor:pointer;transition:all 0.15s;&:hover{border-color:",u.primary,";background-color:",u.primaryLight,";}",""),dropzoneActive:y("border-color:",u.primary,";background-color:",u.primaryLight,";",""),dropzoneIcon:y("width:48px;height:48px;margin:0 auto 16px;color:",u.textMuted,";",""),dropzoneText:y("font-size:",Q.base,";color:",u.text,";margin:0 0 4px;",""),dropzoneHint:y("font-size:",Q.sm,";color:",u.textSecondary,";margin:0;",""),textarea:y("width:100%;min-height:150px;padding:12px;font-size:",Q.sm,";font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;border:1px solid ",u.border,";border-radius:8px;resize:vertical;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 3px ",u.primaryLight,";}&::placeholder{color:",u.textMuted,";}",""),textareaLabel:y("font-size:",Q.sm,";color:",u.textSecondary,";margin:0 0 8px;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",u.border,";background-color:",u.background,";",""),btn:y("padding:10px 18px;font-size:",Q.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",u.surface,";border:1px solid ",u.border,";color:",u.text,";&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),btnConfirm:y("background-color:",u.primary,";border:1px solid ",u.primary,";color:white;&:hover:not(:disabled){background-color:",u.primaryHover,";border-color:",u.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),fileInput:{name:"eivff4",styles:"display:none"},selectedFiles:y("margin-top:16px;padding:12px;background-color:",u.background,";border-radius:6px;font-size:",Q.sm,";color:",u.text,";","")};function g1({currentPath:i,onClose:s,onUploadComplete:f,streamingOperation:d,setShowProgress:h,setProgressTitle:m,setProgressState:w}){const[D,C]=v.useState("upload"),[g,A]=v.useState([]),[k,B]=v.useState(""),[Y,U]=v.useState(!1),[G,oe]=v.useState(!1),[K,ce]=v.useState(!1),ie=v.useRef(null),he=v.useCallback(N=>{N&&A(Array.from(N))},[]),V=v.useCallback(N=>{N.preventDefault(),U(!1),he(N.dataTransfer.files)},[he]),I=v.useRef(!1),W=v.useCallback(async()=>{if(g.length!==0){if(h&&m&&w){s(),I.current=!1,m("Uploading Files"),h(!0),w({current:0,total:g.length,percent:0,status:"processing",message:"Uploading..."});let N=0;const L=[];for(let ee=0;ee<g.length;ee++){if(I.current){w(ne=>({...ne,status:"stopped",message:`Stopped. Uploaded ${N} file${N!==1?"s":""}.`})),f();return}const ae=g[ee],ue=new FormData;ue.append("file",ae),ue.append("path",i);try{(await fetch("/api/studio/upload",{method:"POST",body:ue})).ok?N++:L.push(ae.name)}catch{L.push(ae.name)}w({current:ee+1,total:g.length,percent:Math.round((ee+1)/g.length*100),status:"processing",currentFile:ae.name})}w({current:g.length,total:g.length,percent:100,status:"complete",message:`Uploaded ${N} file${N!==1?"s":""}.${L.length>0?` ${L.length} failed.`:""}`}),f();return}oe(!0);try{for(const N of g){const L=new FormData;L.append("file",N),L.append("path",i),await fetch("/api/studio/upload",{method:"POST",body:L})}f(),s()}catch(N){console.error("Upload failed:",N)}finally{oe(!1)}}},[g,i,f,s,h,m,w]),te=v.useCallback(async()=>{const N=k.split(`
56
+ `).map(L=>L.trim()).filter(L=>L.length>0);if(N.length!==0){if(d){s(),await d.execute({endpoint:"/api/studio/import",body:{urls:N},title:"Importing URLs",onComplete:()=>{f()}});return}ce(!0);try{const ee=(await fetch("/api/studio/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:N})})).body?.getReader();if(!ee)throw new Error("No reader");const ae=new TextDecoder;for(;;){const{done:ue,value:ne}=await ee.read();if(ue)break;const E=ae.decode(ne).split(`
57
+
58
+ `).filter(J=>J.startsWith("data: "));for(const J of E)JSON.parse(J.replace("data: ","")).type==="complete"&&(f(),s())}}catch(L){console.error("Import failed:",L)}finally{ce(!1)}}},[k,f,s,d]);return r("div",{css:yt.overlay,onClick:s,children:b("div",{css:yt.modal,onClick:N=>N.stopPropagation(),children:[b("div",{css:yt.header,children:[r("h3",{css:yt.title,children:"Add New"}),b("div",{css:yt.tabs,children:[r("button",{css:[yt.tab,D==="upload"&&yt.tabActive,"",""],onClick:()=>C("upload"),children:"Upload Files"}),r("button",{css:[yt.tab,D==="import"&&yt.tabActive,"",""],onClick:()=>C("import"),children:"Import URLs"})]})]}),r("div",{css:yt.body,children:D==="upload"?b(tt,{children:[b("div",{css:[yt.dropzone,Y&&yt.dropzoneActive,"",""],onClick:()=>ie.current?.click(),onDragOver:N=>{N.preventDefault(),U(!0)},onDragLeave:()=>U(!1),onDrop:V,children:[r("svg",{css:yt.dropzoneIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("p",{css:yt.dropzoneText,children:"Drop files here or click to browse"}),r("p",{css:yt.dropzoneHint,children:"Supports images and other media files"})]}),r("input",{ref:ie,type:"file",multiple:!0,css:yt.fileInput,onChange:N=>he(N.target.files)}),g.length>0&&b("div",{css:yt.selectedFiles,children:[g.length," file",g.length!==1?"s":""," selected"]})]}):b(tt,{children:[r("p",{css:yt.textareaLabel,children:"Paste image URLs (one per line)"}),r("textarea",{css:yt.textarea,value:k,onChange:N=>B(N.target.value),placeholder:`https://cdn.example.com/photos/image1.jpg
59
+ https://cdn.example.com/photos/image2.jpg`})]})}),b("div",{css:yt.footer,children:[r("button",{css:[yt.btn,yt.btnCancel,"",""],onClick:s,children:"Cancel"}),D==="upload"?r("button",{css:[yt.btn,yt.btnConfirm,"",""],onClick:W,disabled:g.length===0||G,children:G?"Uploading...":"Upload"}):r("button",{css:[yt.btn,yt.btnConfirm,"",""],onClick:te,disabled:!k.trim()||K,children:K?"Importing...":"Import"})]})]})})}const y1="36px",Be={btn:y("height:",y1,";padding:0 12px;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),icon:y("width:16px;height:16px;color:",u.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:y(oo," position:relative;background-color:",u.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:y("font-size:",Q.xl,";font-weight:600;color:",u.text,";margin:0;letter-spacing:-0.02em;",""),closeBtn:y("padding:6px;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),sections:{name:"klisov",styles:"display:flex;flex-direction:column;gap:24px"},sectionTitle:y("font-size:",Q.base,";font-weight:600;color:",u.text,";margin:0 0 12px 0;",""),description:y("font-size:",Q.sm,";color:",u.textSecondary,";margin:0 0 12px 0;",""),codeWrapper:{name:"bjn8wh",styles:"position:relative"},code:y("background-color:",u.background,";border-radius:8px;padding:12px;padding-right:40px;font-family:'SF Mono',Monaco,Consolas,monospace;font-size:",Q.xs,";color:",u.textSecondary,";border:1px solid ",u.border,";overflow-x:auto;white-space:nowrap;",""),copyBtn:y("position:absolute;top:8px;right:8px;padding:4px;background:",u.surface,";border:1px solid ",u.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",u.surfaceHover,";border-color:",u.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:y("width:14px;height:14px;color:",u.textSecondary,";",""),codeLine:{name:"1bbvuqp",styles:"margin:0 0 4px 0;&:last-child{margin:0;}"},input:y("width:100%;padding:10px 14px;border:1px solid ",u.border,";border-radius:6px;font-size:",Q.base,";color:",u.text,";background:",u.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 3px ",u.primaryLight,";}&::placeholder{color:",u.textMuted,";}",""),grid:{name:"xtlr5l",styles:"display:grid;grid-template-columns:repeat(3, 1fr);gap:12px"},label:y("font-size:",Q.xs,";font-weight:500;color:",u.textSecondary,";display:block;margin-bottom:6px;",""),footer:y("margin-top:24px;padding-top:20px;border-top:1px solid ",u.border,";display:flex;justify-content:flex-end;gap:12px;",""),cancelBtn:y("padding:10px 18px;font-size:",Q.base,";font-weight:500;color:",u.text,";background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),saveBtn:y("padding:10px 18px;font-size:",Q.base,";font-weight:500;color:white;background-color:",u.primary,";border:1px solid ",u.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",u.primaryHover,";border-color:",u.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:y("flex:1;padding:8px 12px;border:1px solid ",u.border,";border-radius:6px;font-size:",Q.sm,";color:",u.text,";background:",u.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 3px ",u.primaryLight,";}",""),cdnIndex:y("font-size:",Q.xs,";color:",u.textMuted,";width:24px;text-align:center;flex-shrink:0;",""),cdnDeleteBtn:y("padding:6px;background:none;border:none;cursor:pointer;color:",u.textMuted,";transition:color 0.15s;flex-shrink:0;&:hover{color:",u.danger,";}",""),cdnAddBtn:y("padding:8px 12px;font-size:",Q.sm,";font-weight:500;color:",u.primary,";background:",u.primaryLight,";border:1px dashed ",u.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:",u.surface,";}",""),warning:y("font-size:",Q.xs,";color:",u.danger,";margin-top:8px;padding:8px 12px;background:",u.dangerLight,";border-radius:6px;","")};function b1(){const[i,s]=v.useState(!1);return b(tt,{children:[r("button",{css:Be.btn,onClick:()=>s(!0),"aria-label":"Settings",children:b("svg",{css:Be.icon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("circle",{cx:"12",cy:"12",r:"3"}),r("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"})]})}),i&&r(x1,{onClose:()=>s(!1)})]})}const v1=`# Dev site link (opens from Studio header)
60
+ STUDIO_DEV_SITE_URL=http://localhost:3000
61
+
62
+ # Cloudflare R2 Storage
63
+ CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
64
+ CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id
65
+ CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key
66
+ CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
67
+ CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function x1({onClose:i}){const{triggerRefresh:s}=ao(),[f,d]=v.useState(!1),[h,m]=v.useState([]),[w,D]=v.useState(!0),[C,g]=v.useState(!1),[A,k]=v.useState(!1);v.useEffect(()=>{async function K(){try{const ie=await(await fetch("/api/studio/cdns")).json();m(ie.cdns||[])}catch(ce){console.error("Failed to load CDN URLs:",ce)}finally{D(!1)}}K()},[]);const B=()=>{navigator.clipboard.writeText(v1),d(!0),setTimeout(()=>d(!1),2e3)},Y=v.useCallback((K,ce)=>{m(ie=>{const he=[...ie];return he[K]=ce,he}),k(!0)},[]),U=v.useCallback(()=>{m(K=>[...K,""]),k(!0)},[]),G=v.useCallback(K=>{m(ce=>ce.filter((ie,he)=>he!==K)),k(!0)},[]),oe=v.useCallback(async()=>{g(!0);try{(await fetch("/api/studio/cdns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cdns:h})})).ok&&(k(!1),s(),i())}catch(K){console.error("Failed to save CDN URLs:",K)}finally{g(!1)}},[h,s,i]);return r("div",{css:Be.overlay,onClick:i,children:b("div",{css:Be.panel,onClick:K=>K.stopPropagation(),children:[b("div",{css:Be.header,children:[r("h2",{css:Be.title,children:"Settings"}),r("button",{css:Be.closeBtn,onClick:i,children:r("svg",{css:Be.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:Be.sections,children:[b("section",{children:[r("h3",{css:Be.sectionTitle,children:"CDN URLs"}),r("p",{css:Be.description,children:"Manage CDN base URLs used by your images:"}),w?r("p",{css:Be.description,children:"Loading..."}):b(tt,{children:[r("div",{css:Be.cdnList,children:h.map((K,ce)=>b("div",{css:Be.cdnRow,children:[r("span",{css:Be.cdnIndex,children:ce}),r("input",{css:Be.cdnInput,type:"text",value:K,onChange:ie=>Y(ce,ie.target.value),placeholder:"https://cdn.example.com"}),r("button",{css:Be.cdnDeleteBtn,onClick:()=>G(ce),title:"Delete CDN URL",children:r("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})})]},ce))}),b("button",{css:Be.cdnAddBtn,onClick:U,children:[r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add CDN URL"]}),h.length>0&&r("p",{css:Be.warning,children:"Warning: Changing CDN URLs may break image references. The index numbers correspond to image `c` values."})]})]}),b("section",{children:[r("h3",{css:Be.sectionTitle,children:"Environment Variables"}),b("p",{css:Be.description,children:["Configure in ",r("code",{children:".env.local"})," file (local development only, not needed in production):"]}),b("div",{css:Be.codeWrapper,children:[b("button",{css:Be.copyBtn,onClick:B,title:"Copy to clipboard",children:[f&&r("span",{css:Be.tooltip,children:"Copied!"}),r("svg",{css:Be.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})]}),b("div",{css:Be.code,children:[r("p",{css:Be.codeLine,children:"NEXT_PUBLIC_PRODUCTION_URL=http://localhost:3000"}),r("p",{css:Be.codeLine,children:" "}),r("p",{css:Be.codeLine,children:"# Cloudflare R2 Storage"}),r("p",{css:Be.codeLine,children:"CLOUDFLARE_R2_ACCOUNT_ID=your_account_id"}),r("p",{css:Be.codeLine,children:"CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id"}),r("p",{css:Be.codeLine,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key"}),r("p",{css:Be.codeLine,children:"CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name"}),r("p",{css:Be.codeLine,children:"CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com"})]})]})]}),b("section",{children:[r("h3",{css:Be.sectionTitle,children:"Thumbnail Sizes"}),b("div",{css:Be.grid,children:[b("div",{children:[r("label",{css:Be.label,children:"Small"}),r("input",{css:Be.input,type:"number",defaultValue:300})]}),b("div",{children:[r("label",{css:Be.label,children:"Medium"}),r("input",{css:Be.input,type:"number",defaultValue:700})]}),b("div",{children:[r("label",{css:Be.label,children:"Large"}),r("input",{css:Be.input,type:"number",defaultValue:1400})]})]})]})]}),b("div",{css:Be.footer,children:[r("button",{css:Be.cancelBtn,onClick:i,children:"Cancel"}),r("button",{css:Be.saveBtn,onClick:oe,disabled:C||!A,children:C?"Saving...":"Save Changes"})]})]})})}const au="36px",S1=ln`
68
+ to { transform: rotate(360deg); }
69
+ `,Ce={toolbar:y("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",u.surface,";border-bottom:1px solid ",u.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:y("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",au,";padding:0 14px;border-radius:6px;font-size:",Q.base,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";cursor:pointer;transition:all 0.15s ease;color:",u.text,";letter-spacing:-0.01em;&:hover:not(:disabled){background-color:",u.surfaceHover,";border-color:",u.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:y("background:",u.primary,";border-color:",u.primary,";color:white;&:hover:not(:disabled){background:",u.primaryHover,";border-color:",u.primaryHover,";}",""),btnDanger:y("color:",u.danger,";&:hover:not(:disabled){background-color:",u.dangerLight,";border-color:",u.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:y("position:absolute;top:100%;left:0;z-index:1000;min-width:160px;margin-top:4px;background:white;border:1px solid ",u.border,";border-radius:6px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;",""),cloudDropdownItem:y("display:flex;align-items:center;gap:8px;width:100%;padding:10px 14px;border:none;background:none;font-size:",Q.sm,";color:",u.text,";cursor:pointer;text-align:left;white-space:nowrap;&:hover{background-color:",u.hover,";}svg{width:16px;height:16px;flex-shrink:0;color:#f59e0b;}",""),cloudDropdownItemDefault:y("svg{color:",u.text,";}",""),cloudDropdownItemDanger:y("color:",u.danger,";svg{color:",u.danger,";}",""),cloudDropdownDivider:y("height:1px;background-color:",u.border,";margin:4px 0;",""),icon:{name:"157xhr7",styles:"width:16px;height:16px"},iconSpin:y("animation:",S1," 1s linear infinite;",""),selectionCount:y("font-size:",Q.base,";color:",u.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:y("color:",u.primary,";background:none;border:none;cursor:pointer;font-size:",Q.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),divider:y("width:1px;height:24px;background:",u.border,";margin:0 4px;",""),viewToggle:y("display:flex;align-items:center;height:",au,";background-color:",u.surface,";border:1px solid ",u.border,";border-radius:6px;overflow:hidden;",""),searchWrapper:{name:"9iujih",styles:"position:relative;display:flex;align-items:center"},searchInput:y("height:",au,";padding:0 32px 0 12px;border:1px solid ",u.border,";border-radius:6px;font-size:",Q.base,";background:",u.surface,";color:",u.text,";width:180px;transition:all 0.15s ease;&:focus{outline:none;border-color:",u.primary,";box-shadow:0 0 0 2px ",u.primaryLight,";}&::placeholder{color:",u.textMuted,";}",""),searchClearBtn:y("position:absolute;right:5px;top:5px;bottom:5px;background:",u.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:",u.primaryHover,";}",""),viewBtn:y("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",u.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",u.text,";background-color:",u.surfaceHover,";}",""),viewBtnActive:y("background-color:",u.primaryLight,";color:",u.primary,";&:hover{background-color:",u.primaryLight,";color:",u.primary,";}","")};function C1(){const{selectedItems:i,viewMode:s,setViewMode:f,clearSelection:d,currentPath:h,triggerRefresh:m,focusedItem:w,scanRequested:D,clearScanRequest:C,fileItems:g,requestProcess:A,setProcessMode:k,actionState:B,cancelAction:Y}=ao(),U=v.useRef(null),G=v.useRef(null),[oe,K]=v.useState(!1),[ce,ie]=v.useState(!1),[he,V]=v.useState(!1),[I,W]=v.useState(!1),[te,N]=v.useState(!1),[L,ee]=v.useState(0),[ae,ue]=v.useState(!1),[ne,_e]=v.useState(0),[E,J]=v.useState(!1),[$,Me]=v.useState(!1),[Ye,S]=v.useState(!1),[H,P]=v.useState(0),[se,Se]=v.useState(!1),[De,Ge]=v.useState("Processing Images"),[vt,Oe]=v.useState({current:0,total:0,percent:0,status:"processing"}),[en,Je]=v.useState(null),[ct,pt]=v.useState(!1),[jt,qt]=v.useState(!1),[tn,Vt]=v.useState(!1),[hn,Wt]=v.useState(!1),[ut,Gt]=v.useState(!1),[wt,Ee]=v.useState(!1),[Dt,wn]=v.useState(!1),[Yn,Hn]=v.useState(!1),zn=v.useRef(null),Z=v.useRef(null),de=jp({setShowProgress:Se,setProgressTitle:Ge,setProgressState:Oe,triggerRefresh:m}),je=h==="public/images"||h.startsWith("public/images/");v.useCallback(()=>{U.current?.click()},[]);const Ie=v.useCallback(()=>{W(!0),m(),setTimeout(()=>W(!1),600)},[m]),Ue=v.useCallback(async()=>{V(!0),Ge("Scanning Files"),Se(!0),Oe({current:0,total:0,percent:0,status:"processing",message:"Scanning for files..."});try{const le=(await fetch("/api/studio/scan",{method:"POST"})).body?.getReader();if(!le)throw new Error("No reader");const ge=new TextDecoder;let ye="";for(;;){const{done:Te,value:Re}=await le.read();if(Te)break;ye+=ge.decode(Re,{stream:!0});const $e=ye.split(`
70
+
71
+ `);ye=$e.pop()||"";for(const We of $e){if(!We.startsWith("data: "))continue;const Le=JSON.parse(We.slice(6));if(Le.type==="start")Oe({current:0,total:Le.total,percent:0,status:"processing",message:`Scanning ${Le.total} files...`});else if(Le.type==="progress")Oe({current:Le.current,total:Le.total,percent:Le.percent,status:"processing",currentFile:Le.currentFile});else if(Le.type==="cleanup")Oe(nn=>({...nn,message:Le.message}));else if(Le.type==="complete"){let nn=Le.renamed>0?`${Le.renamed} file(s) renamed due to conflicts. `:"";Le.orphanedFiles&&Le.orphanedFiles.length>0&&(nn+=`Found ${Le.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),Oe({current:Le.total||0,total:Le.total||0,percent:100,status:"complete",processed:Le.added,alreadyProcessed:Le.existingCount,errors:Le.errors,orphanedFiles:Le.orphanedFiles,pendingUpdates:Le.pendingUpdates,orphanedEntries:Le.orphanedEntries,message:nn||void 0,isScan:!0}),m()}else Le.type==="error"&&Oe({current:0,total:0,percent:0,status:"error",message:Le.message||"Scan failed"})}}}catch(pe){console.error("Scan error:",pe),Oe({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{V(!1)}},[m]);v.useEffect(()=>{const pe=le=>{zn.current&&!zn.current.contains(le.target)&&wn(!1),Z.current&&!Z.current.contains(le.target)&&Hn(!1)};return document.addEventListener("mousedown",pe),()=>document.removeEventListener("mousedown",pe)},[]),v.useEffect(()=>{D&&!he&&(C(),Ue())},[D,he,C,Ue]);const ze=v.useCallback(async pe=>{const le=pe.target.files;if(!le||le.length===0)return;const ge=Array.from(le);ge.length>1?(Oe({current:0,total:ge.length,percent:0,status:"processing",message:"Uploading files..."}),Se(!0)):ie(!0);let ye=0,Te=0;try{for(let Re=0;Re<ge.length;Re++){const $e=ge[Re],We=new FormData;We.append("file",$e),We.append("path",h);try{const Le=await fetch("/api/studio/upload",{method:"POST",body:We});if(Le.ok)ye++;else{const nn=await Le.json();Te++,ge.length===1&&(Le.status>=500?(console.error("Upload error:",nn),Je({title:"Upload Failed",message:`Failed to upload ${$e.name}: ${nn.error||"Unknown error"}`})):Je({title:"Cannot Upload Here",message:nn.error||"Upload not allowed in this location."}))}}catch{Te++}ge.length>1&&Oe({current:Re+1,total:ge.length,percent:Math.round((Re+1)/ge.length*100),status:"processing",currentFile:$e.name})}ge.length>1&&Oe({current:ge.length,total:ge.length,percent:100,status:"complete",processed:ye,errors:Te}),m()}catch(Re){console.error("Upload error:",Re),ge.length>1?Oe({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):Je({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{ie(!1),U.current&&(U.current.value="")}},[h,m]),xt=v.useCallback(async pe=>{if(i.size>0){const ge=Array.from(i),ye=ge.filter(Re=>(Re.split("/").pop()||"").includes(".")&&!Re.endsWith("/")),Te=ge.filter(Re=>!(Re.split("/").pop()||"").includes(".")||Re.endsWith("/"));if(Te.length>0)try{const $e=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(Te.join(","))}`)).json();if($e.images)for(const We of $e.images){const Le=`public/${We}`;ye.includes(Le)||ye.push(Le)}}catch(Re){console.error("Failed to get folder files:",Re)}if(ye.length===0){Je({title:"No Files Found",message:"No files found in the selected items."});return}k(pe),A(ye)}else try{const ye=await(await fetch("/api/studio/count-images")).json();if(!ye.images||ye.images.length===0){Je({title:"No Images Found",message:"No images found in the public folder to process."});return}const Te=ye.images.map(Re=>`public/${Re}`);k(pe),A(Te)}catch(ge){console.error("Failed to get images:",ge),Je({title:"Error",message:"Failed to get images."})}},[i,A,k]),mt=v.useCallback(()=>{de.stop(),G.current&&(Oe(pe=>({...pe,status:"stopping"})),G.current.abort())},[de]),pl=v.useCallback(async()=>{const pe=vt.orphanedFiles;if(!(!pe||pe.length===0))try{const le=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:pe})}),ge=await le.json();le.ok?(Oe(ye=>({...ye,orphanedFiles:void 0,orphansRemoved:ge.deleted,message:`Deleted ${ge.deleted} orphaned thumbnail${ge.deleted!==1?"s":""}.`})),m()):Je({title:"Delete Failed",message:ge.error||"Failed to delete orphaned files."})}catch(le){console.error("Delete orphans error:",le),Je({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[vt.orphanedFiles,m]),Qa=v.useCallback(async()=>{if(i.size===0)return;const pe=Array.from(i),le=pe.filter(Te=>(Te.split("/").pop()||"").includes(".")&&!Te.endsWith("/")),ge=pe.filter(Te=>!(Te.split("/").pop()||"").includes(".")||Te.endsWith("/"));let ye=le.length;if(ge.length>0)try{const Re=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ge.join(","))}`)).json();Re.images&&(ye+=Re.images.length)}catch(Te){console.error("Failed to get folder files:",Te)}ee(ye),N(!0)},[i]),Nr=v.useCallback(async()=>{N(!1);const pe=Array.from(i);pe.length!==0&&await de.execute({endpoint:"/api/studio/delete-stream",body:{paths:pe},title:"Deleting Files",operationType:"delete",onComplete:()=>{d()}})},[i,d,de]),ml=v.useCallback(async()=>{if(i.size===0)return;const pe=Array.from(i),le=pe.filter(We=>(We.split("/").pop()||"").includes(".")&&!We.endsWith("/")),ge=pe.filter(We=>!(We.split("/").pop()||"").includes(".")||We.endsWith("/")),ye=ge.length>0;if(ye)try{const Le=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ge.join(","))}`)).json();if(Le.images)for(const nn of Le.images){const fo=`public/${nn}`;le.includes(fo)||le.push(fo)}}catch(We){console.error("Failed to get folder files:",We)}if(le.length===0){Je({title:"No Files Found",message:"No files found in the selected items."});return}let Te=!1,Re=!1,$e=0;for(const We of le){const Le=g.find(nn=>nn.path===We);Le?Le.isRemote?Te=!0:Le.cdnPushed?$e++:Re=!0:ye&&(Re=!0)}if(!ye&&$e===le.length){Je({title:"Already Pushed",message:`All ${le.length} file${le.length!==1?"s are":" is"} already on the CDN.`});return}_e(le.length),J(Te),Me(Re),ue(!0)},[i,g]),gl=v.useCallback(async()=>{ue(!1);const pe=Array.from(i),le=pe.filter(Te=>(Te.split("/").pop()||"").includes(".")&&!Te.endsWith("/")),ge=pe.filter(Te=>!(Te.split("/").pop()||"").includes(".")||Te.endsWith("/"));if(ge.length>0)try{const Re=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ge.join(","))}`)).json();if(Re.images)for(const $e of Re.images){const We=`public/${$e}`;le.includes(We)||le.push(We)}}catch(Te){console.error("Failed to get folder files:",Te)}const ye=le.map(Te=>"/"+Te.replace(/^public\//,""));ye.length!==0&&await de.execute({endpoint:"/api/studio/sync-stream",body:{imageKeys:ye},title:"Pushing to CDN",onComplete:()=>{d()},onError:Te=>{(Te.includes("R2 not configured")||Te.includes("CLOUDFLARE_R2"))&&(Se(!1),Gt(!0))}})},[i,d,de]),[Ka,$n]=v.useState([]),[yl,Za]=v.useState(0),jr=v.useCallback(async()=>{if(i.size===0)return;const pe=Array.from(i),le=pe.filter(Re=>(Re.split("/").pop()||"").includes(".")&&!Re.endsWith("/")),ge=pe.filter(Re=>!(Re.split("/").pop()||"").includes(".")||Re.endsWith("/")),ye=ge.length>0;if(ye)try{const $e=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ge.join(","))}`)).json();if($e.images)for(const We of $e.images){const Le=`public/${We}`;le.includes(Le)||le.push(Le)}}catch(Re){console.error("Failed to get folder files:",Re)}if(le.length===0){Je({title:"No Files Found",message:"No files found in the selected items."});return}let Te;if(ye)Te=le;else if(Te=le.filter(Re=>{const $e=g.find(We=>We.path===Re);return $e&&$e.cdnPushed&&!$e.isRemote}),Te.length===0){Je({title:"No CDN Files",message:`None of the ${le.length} selected file${le.length!==1?"s are":" is"} on the CDN.`});return}$n(Te),Za(le.length),P(Te.length),S(!0)},[i,g]),fi=v.useCallback(async()=>{S(!1),B.showDownloadConfirm&&Y();const le=(B.showDownloadConfirm?B.actionPaths:Ka).map(ge=>"/"+ge.replace(/^public\//,""));await de.execute({endpoint:"/api/studio/download-stream",body:{imageKeys:le},title:"Downloading from CDN",onComplete:()=>d()})},[Ka,d,B.showDownloadConfirm,B.actionPaths,Y,de]),io=v.useCallback(async()=>{if(i.size===0)return;const le=Array.from(i).filter(ge=>{const ye=g.find(Te=>Te.path===ge);return ye&&(ye.hasUpdate||ye.type==="folder"&&ye.updateCount&&ye.updateCount>0)});if(le.length===0){Je({title:"No Updates",message:"No files with pending updates in selection."});return}await de.execute({endpoint:"/api/studio/push-updates-stream",body:{paths:le},title:"Pushing Updates",onComplete:()=>d()})},[i,g,d,de]),Fa=v.useCallback(async()=>{if(i.size===0)return;const le=Array.from(i).filter(ge=>{const ye=g.find(Te=>Te.path===ge);return ye&&(ye.hasUpdate||ye.type==="folder"&&ye.updateCount&&ye.updateCount>0)});if(le.length!==0)try{const ge=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:le})});if(ge.ok)d(),m();else{const ye=await ge.json();Je({title:"Cancel Failed",message:ye.error||"Unknown error"})}}catch(ge){console.error("Cancel updates error:",ge),Je({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[i,g,d,m]),qr=v.useCallback(async pe=>{pt(!1);try{const le=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:h,name:pe})});if(le.ok)m();else{const ge=await le.json();Je({title:"Create Folder Failed",message:ge.error||"Unknown error"})}}catch(le){console.error("Create folder error:",le),Je({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[h,m]),hi=v.useCallback(()=>{i.size!==0&&Wt(!0)},[i]),pi=v.useCallback(async pe=>{const le=Array.from(i);await de.execute({endpoint:"/api/studio/move",body:{paths:le,destination:pe},title:"Moving Files",onComplete:()=>d()})},[i,d,de]),{searchQuery:ro,setSearchQuery:Wn}=ao(),so=v.useCallback(pe=>{Wn(pe.target.value)},[Wn]),mi=v.useCallback(pe=>{pe.key==="Escape"&&(pe.stopPropagation(),Wn(""),pe.target.blur())},[Wn]),Un=i.size>0;Un&&Array.from(i).some(pe=>{const le=g.find(ge=>ge.path===pe);return le&&le.cdnPushed&&!le.isRemote}),Un&&Array.from(i).every(pe=>{const le=g.find(ge=>ge.path===pe);return le&&le.type==="file"&&le.cdnPushed&&!le.isRemote});const Gn=Un&&Array.from(i).some(pe=>{const le=g.find(ge=>ge.path===pe);return le&&(le.hasUpdate||le.type==="folder"&&le.updateCount&&le.updateCount>0)}),zt=Array.from(i),Rt=zt.length===1&&!zt[0].includes("."),pn=Rt?zt[0]:null,bl=pn&&pn.split("/").pop()||"",ya=zt.length===1&&zt[0].includes("."),ba=ya?zt[0]:null,co=ba&&ba.split("/").pop()||"",Ja=v.useCallback(async pe=>{pn&&(qt(!1),await de.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:pn,newName:pe},title:"Renaming Folder",onComplete:()=>d()}))},[pn,d,de]),uo=v.useCallback(async pe=>{ba&&(Vt(!1),await de.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:ba,newName:pe},title:"Renaming File",onComplete:()=>d()}))},[ba,d,de]),In=b(tt,{children:[(Ye||B.showDownloadConfirm)&&r(li,{title:"Download from CDN",message:(()=>{const pe=B.showDownloadConfirm?B.downloadImageCount:H,le=B.showDownloadConfirm?B.downloadTotalSelected:yl;return le>pe?`Download ${pe} of ${le} selected file${le!==1?"s":""} from Cloudflare R2? (${le-pe} not on CDN)`:`Download ${pe} image${pe!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`})(),confirmLabel:"Download",onConfirm:fi,onCancel:()=>{S(!1),B.showDownloadConfirm&&Y()}}),se&&r(hl,{title:De,progress:vt,onStop:mt,onDeleteOrphans:pl,onClose:()=>{Se(!1),Oe({current:0,total:0,percent:0,status:"processing"}),m()}})]});return w?In:b(tt,{children:[In,te&&r(li,{title:"Delete Items",message:`Are you sure you want to delete ${L} file${L!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Nr,onCancel:()=>N(!1)}),ae&&r(li,{title:"Push to CDN",message:`Push ${ne} image${ne!==1?"s":""} to Cloudflare R2?${E?" Remote images will be downloaded first.":""}${$?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:gl,onCancel:()=>ue(!1)}),ct&&r(_r,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:qr,onCancel:()=>pt(!1)}),hn&&r(qp,{selectedItems:i,currentPath:h,onMove:pe=>{Wt(!1),pi(pe)},onCancel:()=>Wt(!1)}),jt&&pn&&r(_r,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:bl,defaultValue:bl,confirmLabel:"Rename",onConfirm:Ja,onCancel:()=>qt(!1)}),tn&&ba&&r(_r,{title:"Rename File",message:"Enter a new name for the file:",placeholder:co,defaultValue:co,confirmLabel:"Rename",onConfirm:uo,onCancel:()=>Vt(!1)}),en&&r(pu,{title:en.title,message:en.message,onClose:()=>{Je(null),m()}}),r(Yp,{isOpen:ut,onClose:()=>Gt(!1)}),oe&&r(g1,{currentPath:h,onClose:()=>K(!1),onUploadComplete:()=>{K(!1),m()},streamingOperation:de,setShowProgress:Se,setProgressTitle:Ge,setProgressState:Oe}),b("div",{css:Ce.toolbar,children:[r("input",{ref:U,type:"file",multiple:!0,accept:"image/*,video/*,audio/*,.pdf",onChange:ze,style:{display:"none"}}),b("div",{css:Ce.left,children:[b("button",{css:[Ce.btn,Ce.btnPrimary,"",""],onClick:()=>K(!0),disabled:ce||je,children:[r(w1,{}),"Add New"]}),b("button",{css:Ce.btn,onClick:()=>{ya?Vt(!0):Rt?qt(!0):pt(!0)},disabled:je&&!Rt&&!ya,title:je&&!Rt&&!ya?"Cannot create folders in protected images folder":void 0,children:[ya||Rt?r(E1,{}):r(D1,{}),ya?"Rename File":Rt?"Rename Folder":"New Folder"]}),r("div",{css:Ce.divider}),b("div",{css:Ce.cloudDropdownWrapper,ref:Z,children:[b("button",{css:Ce.btn,onClick:()=>Hn(!Yn),disabled:B.showProgress||je,title:je?"Cannot process images folder":void 0,children:[r(H1,{}),"Thumbnails",r("svg",{css:Ce.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Yn&&b("div",{css:Ce.cloudDropdown,children:[b("button",{css:[Ce.cloudDropdownItem,Ce.cloudDropdownItemDefault,"",""],onClick:()=>{Hn(!1),xt("generate")},children:[r(U1,{}),"Generate Thumbnails"]}),b("button",{css:[Ce.cloudDropdownItem,Ce.cloudDropdownItemDanger,"",""],onClick:()=>{Hn(!1),xt("remove")},children:[r(B1,{}),"Remove Thumbnails"]})]})]}),b("button",{css:[Ce.btn,Ce.btnDanger,"",""],onClick:Qa,disabled:!Un,children:[r(M1,{}),"Delete"]}),b("button",{css:Ce.btn,onClick:hi,disabled:!Un,children:[r(T1,{}),"Move"]}),b("div",{css:Ce.cloudDropdownWrapper,ref:zn,children:[b("button",{css:[Ce.btn,Ce.btnCloud,"",""],onClick:()=>wn(!Dt),disabled:!Un,children:[r(Cp,{}),"Cloud",r("svg",{css:Ce.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Dt&&Un&&b("div",{css:Ce.cloudDropdown,children:[Gn&&b(tt,{children:[b("button",{css:Ce.cloudDropdownItem,onClick:()=>{wn(!1),io()},children:[r(A1,{}),"Push Update"]}),b("button",{css:[Ce.cloudDropdownItem,Ce.cloudDropdownItemDanger,"",""],onClick:()=>{wn(!1),Fa()},children:[r(R1,{}),"Cancel Update"]}),r("div",{css:Ce.cloudDropdownDivider})]}),b("button",{css:Ce.cloudDropdownItem,onClick:()=>{wn(!1),ml()},children:[r(Cp,{}),"Push CDN"]}),b("button",{css:Ce.cloudDropdownItem,onClick:()=>{wn(!1),jr()},children:[r(_1,{}),"Download"]})]})]}),b("div",{css:Ce.searchWrapper,children:[r("input",{css:Ce.searchInput,type:"text",placeholder:"Search images...",value:ro,onChange:so,onKeyDown:mi}),ro&&r("button",{css:Ce.searchClearBtn,onClick:()=>Wn(""),title:"Clear search",children:r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),b("div",{css:Ce.right,children:[Un&&b("span",{css:Ce.selectionCount,children:[i.size," selected",r("button",{css:Ce.clearBtn,onClick:d,children:"Clear"})]}),b("button",{css:Ce.btn,onClick:Ue,disabled:he,children:[r(z1,{spinning:he}),"Scan"]}),r("button",{css:Ce.btn,onClick:Ie,title:"Refresh view",disabled:I,children:r(k1,{spinning:I})}),b("div",{css:Ce.viewToggle,children:[r("button",{css:[Ce.viewBtn,s==="grid"&&Ce.viewBtnActive,"",""],onClick:()=>f("grid"),"aria-label":"Grid view",children:r(L1,{})}),r("button",{css:[Ce.viewBtn,s==="list"&&Ce.viewBtnActive,"",""],onClick:()=>f("list"),"aria-label":"List view",children:r(O1,{})})]}),r(b1,{})]})]})]})}function w1(){return r("svg",{css:Ce.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 z1({spinning:i}){return r("svg",{css:[Ce.icon,i&&Ce.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function k1({spinning:i}){return r("svg",{css:[Ce.icon,i&&Ce.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 M1(){return r("svg",{css:Ce.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 D1(){return r("svg",{css:Ce.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 E1(){return r("svg",{css:Ce.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 T1(){return r("svg",{css:Ce.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})})}function Cp(){return r("svg",{css:Ce.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 A1(){return r("svg",{css:Ce.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 R1(){return r("svg",{css:Ce.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function _1(){return r("svg",{css:Ce.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 L1(){return r("svg",{css:Ce.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 O1(){return r("svg",{css:Ce.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function H1(){return r("svg",{css:Ce.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 U1(){return r("svg",{css:Ce.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 B1(){return r("svg",{css:Ce.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 N1{async get(s){const f=await fetch(s,{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!f.ok){const d=await f.json().catch(()=>({}));throw new Error(d.error||`Request failed: ${f.status}`)}return f.json()}async post(s,f){const d=await fetch(s,{method:"POST",headers:f?{"Content-Type":"application/json"}:void 0,body:f?JSON.stringify(f):void 0});if(!d.ok){const h=await d.json().catch(()=>({}));throw new Error(h.error||`Request failed: ${d.status}`)}return d.json()}async list(s="public"){return this.get(`/api/studio/list?path=${encodeURIComponent(s)}`)}async search(s,f="public"){return this.get(`/api/studio/search?q=${encodeURIComponent(s)}&path=${encodeURIComponent(f)}`)}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,f="public"){const d=new FormData;d.append("file",s),d.append("path",f);const h=await fetch("/api/studio/upload",{method:"POST",body:d});if(!h.ok){const m=await h.json().catch(()=>({}));throw new Error(m.error||`Upload failed: ${h.status}`)}return h.json()}async delete(s){return this.post("/api/studio/delete",{paths:s})}async createFolder(s,f){return this.post("/api/studio/create-folder",{parentPath:s,name:f})}async rename(s,f){return this.post("/api/studio/rename",{oldPath:s,newName:f})}async move(s,f){return this.post("/api/studio/move",{paths:s,destination:f})}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")}async checkFeaturedImage(){return this.get("/api/studio/check-featured-image")}async getFeaturedImageOptions(){return this.get("/api/studio/featured-image-options")}}const ai=new N1;function Gp(){const{currentPath:i,setCurrentPath:s,navigateUp:f,selectedItems:d,toggleSelection:h,selectRange:m,lastSelectedPath:w,selectAll:D,clearSelection:C,refreshKey:g,setFocusedItem:A,triggerRefresh:k,triggerScan:B,searchQuery:Y,showError:U,setFileItems:G,editedImageKey:oe}=ao(),[K,ce]=v.useState([]),[ie,he]=v.useState(!0),[V,I]=v.useState(!1),[W,te]=v.useState(null),N=v.useRef(!0),L=v.useRef(i);v.useEffect(()=>{async function S(){const H=L.current!==i;(N.current||H)&&he(!0),L.current=i;try{const P=Y&&Y.length>=2?await ai.search(Y,i):await ai.list(i),se=P.items||[];ce(se),G(se),I(P.isEmpty===!0)}catch(P){const se=P instanceof Error?P.message:"Failed to load items";U("Load Error",se),ce([]),G([]),I(!1)}he(!1),N.current=!1}S()},[i,g,Y,U,G]),v.useEffect(()=>{async function S(){if(i!=="public"){te(null);return}try{const H=await ai.checkFeaturedImage();te(H)}catch{te(null)}}S()},[i,g]);const ee=i==="public",ae=Y&&Y.length>=2,ue=[...K].sort((S,H)=>S.type==="folder"&&H.type!=="folder"?-1:S.type!=="folder"&&H.type==="folder"?1:S.name.localeCompare(H.name)),ne=ue.length>0&&ue.every(S=>d.has(S.path)),_e=ue.some(S=>d.has(S.path)),E=v.useCallback((S,H)=>{H.shiftKey&&w?m(w,S.path,ue):h(S.path)},[w,m,ue,h]),J=v.useCallback(S=>{S.type==="folder"?s(S.path):A(S)},[s,A]),$=v.useCallback(async S=>{try{const H="/"+S.path.replace(/^public\//,"");await ai.reprocess([H]),k()}catch(H){const P=H instanceof Error?H.message:"Failed to generate thumbnail";U("Processing Error",P)}},[k,U]),Me=v.useCallback(()=>{ne?C():D(ue)},[ne,C,D,ue]),Ye=W&&!W.exists?W:null;return{items:K,loading:ie,sortedItems:ue,metaEmpty:V,missingFeaturedImage:Ye,isAtRoot:ee,isSearching:ae,allItemsSelected:ne,someItemsSelected:_e,currentPath:i,selectedItems:d,navigateUp:f,editedImageKey:oe,handleItemClick:E,handleOpen:J,handleGenerateThumbnail:$,handleSelectAll:Me,triggerScan:B,triggerRefresh:k}}const j1=ln`
72
+ from { opacity: 0; }
73
+ to { opacity: 1; }
74
+ `,q1=ln`
75
+ from { transform: translateY(-20px); opacity: 0; }
76
+ to { transform: translateY(0); opacity: 1; }
77
+ `,Y1=ln`
78
+ to { transform: rotate(360deg); }
79
+ `,Jt={overlay:y("position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:rgba(0, 0, 0, 0.5);animation:",j1," 0.15s ease;",""),modal:y("background:",u.surface,";border-radius:12px;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);width:100%;max-width:440px;animation:",q1," 0.2s ease;overflow:hidden;",""),header:y("padding:20px 24px;border-bottom:1px solid ",u.border,";",""),title:y("font-size:",Q.lg,";font-weight:600;color:",u.text,";margin:0;",""),subtitle:y("font-size:",Q.sm,";color:",u.textSecondary,";margin:4px 0 0 0;",""),body:{name:"1a7zdz",styles:"padding:24px;display:flex;flex-direction:column;gap:12px"},loading:{name:"uphaut",styles:"display:flex;align-items:center;justify-content:center;padding:40px"},spinner:y("width:24px;height:24px;border-radius:50%;border:2px solid ",u.border,";border-top-color:",u.primary,";animation:",Y1," 0.8s linear infinite;",""),urlButton:y("display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:16px 20px;background:",u.background,";border:1px solid ",u.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover:not(:disabled){background:",u.surfaceHover,";border-color:",u.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),urlLabel:y("font-size:",Q.xs,";font-weight:600;color:",u.textSecondary,";text-transform:uppercase;letter-spacing:0.05em;",""),urlValue:y("font-size:",Q.base,";font-weight:500;color:",u.text,";word-break:break-all;",""),noOptions:y("padding:20px;text-align:center;color:",u.textSecondary,";font-size:",Q.sm,";",""),footer:y("padding:16px 24px;border-top:1px solid ",u.border,";display:flex;justify-content:flex-end;",""),cancelBtn:y("padding:10px 20px;font-size:",Q.base,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",u.text,";&:hover{background:",u.surfaceHover,";border-color:",u.borderHover,";}","")};function Xp({isOpen:i,onClose:s,onSelect:f}){const[d,h]=v.useState(!0),[m,w]=v.useState(null),[D,C]=v.useState(null);if(v.useEffect(()=>{if(!i)return;async function A(){h(!0);try{const k=await ai.getFeaturedImageOptions();w(k.devUrl),C(k.productionUrl)}catch(k){console.error("Failed to load featured image options:",k)}h(!1)}A()},[i]),!i)return null;const g=m||D;return r("div",{css:Jt.overlay,onClick:s,children:b("div",{css:Jt.modal,onClick:A=>A.stopPropagation(),children:[b("div",{css:Jt.header,children:[r("h2",{css:Jt.title,children:"Generate Screenshot"}),r("p",{css:Jt.subtitle,children:"Choose which URL to screenshot"})]}),r("div",{css:Jt.body,children:d?r("div",{css:Jt.loading,children:r("div",{css:Jt.spinner})}):g?b(tt,{children:[m&&b("button",{css:Jt.urlButton,onClick:()=>f(m),children:[r("span",{css:Jt.urlLabel,children:"Development"}),r("span",{css:Jt.urlValue,children:m})]}),D&&b("button",{css:Jt.urlButton,onClick:()=>f(D),children:[r("span",{css:Jt.urlLabel,children:"Production"}),r("span",{css:Jt.urlValue,children:D})]})]}):b("div",{css:Jt.noOptions,children:["No URLs configured. Set ",r("code",{children:"NEXT_PUBLIC_PRODUCTION_URL"})," in .env.local and/or .env.production."]})}),r("div",{css:Jt.footer,children:r("button",{css:Jt.cancelBtn,onClick:s,children:"Cancel"})})]})})}const G1=ln`
80
+ to { transform: rotate(360deg); }
81
+ `,re={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:y("width:32px;height:32px;border-radius:50%;border:3px solid ",u.border,";border-top-color:",u.primary,";animation:",G1," 0.8s linear infinite;",""),empty:y("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",u.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:y("font-size:",Q.base,";margin:0 0 4px 0;&:last-child{color:",u.textMuted,";font-size:",Q.sm,";}",""),scanButton:y("margin-top:16px;padding:10px 24px;font-size:",Q.base,";font-weight:500;background:",u.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",u.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:y("position:relative;border-radius:8px;border:1px solid ",u.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",u.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:y("border-color:",u.primary,";box-shadow:0 0 0 1px ",u.primary,";&:hover{border-color:",u.primary,";box-shadow:0 0 0 1px ",u.primary,";}",""),parentItem:y("cursor:pointer;&:hover{border-color:",u.primary,";}",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:y("width:18px;height:18px;accent-color:",u.primary,";cursor:pointer;",""),content:y("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",u.background,";",""),contentCloud:y("",""),contentRemote:y("",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},imagesFolderIcon:y("width:56px;height:56px;color:",u.imagesFolder,";",""),imagesFolderWrapper:{name:"bjn8wh",styles:"position:relative"},lockIcon:y("position:absolute;bottom:4px;right:4px;width:16px;height:16px;color:",u.imagesFolder,";background:white;border-radius:50%;padding:2px;",""),parentIcon:y("width:56px;height:56px;color:",u.textMuted,";",""),fileIcon:y("width:40px;height:40px;color:",u.textMuted,";",""),image:{name:"rm1wug",styles:"max-width:100%;max-height:100%;object-fit:contain;border-radius:4px"},label:y("padding:10px 12px;background-color:",u.surface,";border-top:1px solid ",u.borderLight,";",""),labelRow:{name:"1gkgtms",styles:"display:flex;flex-direction:column;gap:2px"},labelText:{name:"fxp7t8",styles:"flex:1;min-width:0"},copyBtn:y("position:absolute;top:4px;right:4px;z-index:10;height:28px;width:28px;color:",u.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:",u.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:y("display:flex;align-items:center;gap:3px;font-size:",Q.xs,";",""),folderStatLocal:y("color:",u.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:y("width:14px;height:14px;color:",u.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:y("color:#f59e0b;font-size:",Q.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:y("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:",u.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:y("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",Q.sm,";font-weight:500;color:",u.primary,";background:",u.surface,";border:1px solid ",u.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:",u.primaryLight,";border-color:",u.primary,";}",""),featuredPlaceholder:y("position:relative;border-radius:8px;border:2px dashed ",u.success,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",u.background,";&:hover{border-color:",u.success,";background-color:",u.successLight,";}",""),featuredContent:{name:"y8o17o",styles:"position:relative;aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;gap:8px"},featuredIcon:y("width:40px;height:40px;color:",u.success,";",""),featuredText:y("font-size:",Q.sm,";color:",u.success,";text-align:center;font-weight:500;",""),featuredLabel:y("padding:10px 12px;background-color:",u.surface,";border-top:1px solid ",u.borderLight,";",""),name:y("font-size:",Q.sm,";font-weight:500;color:",u.text,";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;letter-spacing:-0.01em;direction:rtl;text-align:left;",""),size:y("font-size:",Q.xs,";color:",u.textMuted,";margin:2px 0 0 0;",""),selectAllRow:y("display:flex;align-items:center;margin-bottom:16px;padding:12px 16px;background:",u.surface,";border-radius:8px;border:1px solid ",u.border,";",""),selectAllLabel:y("display:flex;align-items:center;gap:10px;font-size:",Q.base,";font-weight:500;color:",u.textSecondary,";cursor:pointer;&:hover{color:",u.text,";}",""),selectAllCheckbox:y("width:16px;height:16px;accent-color:",u.primary,";","")};function X1(){const{loading:i,sortedItems:s,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:m,allItemsSelected:w,someItemsSelected:D,selectedItems:C,navigateUp:g,handleItemClick:A,handleOpen:k,handleGenerateThumbnail:B,handleSelectAll:Y,triggerScan:U,triggerRefresh:G,editedImageKey:oe}=Gp(),[K,ce]=v.useState(!1),[ie,he]=v.useState(!1),[V,I]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),W=()=>{ce(!0)},te=async N=>{ce(!1),he(!0),I({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const L=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:N})});if(!L.ok){const ue=await L.json();I({current:0,total:4,percent:0,status:"error",message:ue.error||"Failed to generate screenshot"});return}const ee=L.body?.getReader(),ae=new TextDecoder;if(ee){let ue="";for(;;){const{done:ne,value:_e}=await ee.read();if(ne)break;ue+=ae.decode(_e,{stream:!0});const E=ue.split(`
82
+ `);ue=E.pop()||"";for(const J of E)if(J.startsWith("data: "))try{const $=JSON.parse(J.slice(6));$.type==="start"?I(Me=>({...Me,total:$.total,message:`Screenshotting ${$.url}...`})):$.type==="progress"?I({current:$.current,total:$.total,percent:$.percent,status:"processing",message:$.message}):$.type==="complete"?(I({current:$.processed,total:$.processed,percent:100,status:$.errors>0?"error":"complete",message:$.message}),G()):$.type==="error"&&I(Me=>({...Me,status:"error",message:$.message}))}catch{}}}}catch(L){console.error("Featured image generation error:",L),I({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?b(tt,{children:[ie&&r(hl,{title:"Generating Screenshot",progress:V,onClose:()=>he(!1)}),r("div",{css:re.loading,children:r("div",{css:re.spinner})})]}):f&&h?b("div",{css:re.empty,children:[r("svg",{css:re.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),r("p",{css:re.emptyText,children:"No files tracked yet"}),r("p",{css:re.emptyText,children:"Click Scan to discover files in your public folder"}),r("button",{css:re.scanButton,onClick:U,children:"Scan for Files"})]}):s.length===0&&h?b("div",{css:re.empty,children:[r("svg",{css:re.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("p",{css:re.emptyText,children:"No files in this folder"}),r("p",{css:re.emptyText,children:"Upload images or click Scan in the toolbar"})]}):b(tt,{children:[r(Xp,{isOpen:K,onClose:()=>ce(!1),onSelect:te}),ie&&r(hl,{title:"Generating Screenshot",progress:V,onClose:()=>he(!1)}),b("div",{children:[s.length>0&&r("div",{css:re.selectAllRow,children:b("label",{css:re.selectAllLabel,children:[r("input",{type:"checkbox",css:re.selectAllCheckbox,checked:w,ref:N=>{N&&(N.indeterminate=D&&!w)},onChange:Y}),"Select all (",s.length,")"]})}),b("div",{css:re.grid,children:[!h&&!m&&b("div",{css:[re.item,re.parentItem,"",""],onClick:g,children:[r("div",{css:re.content,children:r("svg",{css:re.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}),b("div",{css:re.label,children:[r("p",{css:re.name,children:".."}),r("p",{css:re.size,children:"Parent folder"})]})]}),s.map(N=>r(Q1,{item:N,isSelected:C.has(N.path),onClick:L=>A(N,L),onOpen:()=>k(N),onGenerateThumbnail:()=>B(N),editedImageKey:oe},N.path)),h&&d&&!m&&b("div",{css:re.featuredPlaceholder,onClick:W,title:`Generate ${d.filename}`,children:[b("div",{css:re.featuredContent,children:[r("svg",{css:re.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("span",{css:re.featuredText,children:"Generate Screenshot"})]}),b("div",{css:re.featuredLabel,children:[r("p",{css:re.name,children:d.filename}),r("p",{css:re.size,children:"Click to screenshot homepage"})]})]})]})]})]})}function V1(i){return i.includes("/images/sm/")?"SM":i.includes("/images/md/")?"MD":i.includes("/images/lg/")?"LG":i.includes("/images/full/")?"FULL":null}function Q1({item:i,isSelected:s,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:m}){const[w,D]=v.useState(!1),C=i.type==="folder",g=!C&&i.thumbnail!==void 0,A=i.thumbnail&&m&&m.path===i.path?`${i.thumbnail}?v=${m.key}`:i.thumbnail,k=i.isProtected||C&&i.name==="images"&&i.path==="public/images",B=V1(i.path),Y=!C&&(i.hasSm||i.hasMd||i.hasLg||i.hasFull||B),U=oe=>{oe.stopPropagation();const K="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(K),D(!0),setTimeout(()=>D(!1),1500)},G=oe=>{if(k){oe.stopPropagation(),d();return}f(oe)};return b("div",{css:[re.item,s&&!k&&re.itemSelected,"",""],onClick:G,children:[!k&&r("div",{css:re.checkboxWrapper,onClick:oe=>oe.stopPropagation(),children:r("input",{type:"checkbox",css:re.checkbox,checked:s,onChange:()=>f({})})}),b("div",{css:[re.content,i.isCloud&&re.contentCloud,i.isRemote&&re.contentRemote,"",""],children:[b("button",{css:re.copyBtn,onClick:U,title:"Copy file path",children:[w&&r("span",{css:re.tooltip,children:"Copied!"}),r("svg",{css:re.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})]}),r("button",{css:re.openBtn,onClick:oe=>{oe.stopPropagation(),d()},children:"Open"}),C?k?b("div",{css:re.imagesFolderWrapper,children:[r("svg",{css:re.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("svg",{css:re.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("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"})})]}):r("svg",{css:re.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("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"})}):g&&A?r("img",{css:re.image,src:A,alt:i.name,loading:"lazy"}):r("svg",{css:re.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})]}),r("div",{css:re.label,children:r("div",{css:re.labelRow,children:b("div",{css:re.labelText,children:[r("p",{css:re.name,title:i.name,children:i.name}),C?b("div",{css:re.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&b("span",{css:[re.folderStat,re.folderStatLocal,"",""],title:`${i.localCount} local`,children:[r("svg",{css:re.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),i.localCount]}),i.cloudCount!==void 0&&i.cloudCount>0&&b("span",{css:[re.folderStat,re.folderStatCloud,"",""],title:`${i.cloudCount} in cloud`,children:[r("svg",{css:re.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),i.cloudCount]}),i.remoteCount!==void 0&&i.remoteCount>0&&b("span",{css:[re.folderStat,re.folderStatRemote,"",""],title:`${i.remoteCount} remote`,children:[r("svg",{css:re.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),i.remoteCount]}),i.updateCount!==void 0&&i.updateCount>0&&b("span",{css:[re.folderStat,re.folderStatUpdate,"",""],title:`${i.updateCount} pending update${i.updateCount!==1?"s":""}`,children:[r("svg",{css:re.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),i.updateCount]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount!==void 0&&b("span",{css:re.size,children:[i.fileCount," files"]})]}):b("div",{css:re.statusRow,children:[r("div",{css:re.statusLeft,children:i.hasUpdate?b(tt,{children:[r("svg",{css:re.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("svg",{css:re.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("span",{css:re.updateLabel,children:"update"})]}):i.cdnPushed?r("svg",{css:i.isRemote?re.storedIconRemote:re.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.isRemote?r("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"}):r("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"})}):i.size!==void 0?r("span",{css:re.size,children:K1(i.size)}):null}),Y&&r("span",{css:re.thumbChips,children:B?r("span",{css:re.thumbChip,children:B}):b(tt,{children:[i.hasSm&&r("span",{css:re.thumbChip,children:"SM"}),i.hasMd&&r("span",{css:re.thumbChip,children:"MD"}),i.hasLg&&r("span",{css:re.thumbChip,children:"LG"}),i.hasFull&&r("span",{css:re.thumbChip,children:"FULL"})]})})]})]})})})]})}function K1(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}const Z1=ln`
83
+ to { transform: rotate(360deg); }
84
+ `,F={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:y("width:32px;height:32px;border-radius:50%;border:3px solid ",u.border,";border-top-color:",u.primary,";animation:",Z1," 0.8s linear infinite;",""),empty:y("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",u.textSecondary,";",""),emptyHint:y("font-size:",Q.sm,";color:",u.textMuted,";margin-top:4px;",""),scanButton:y("margin-top:16px;padding:10px 24px;font-size:",Q.base,";font-weight:500;background:",u.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",u.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),tableWrapper:y("background:",u.surface,";border-radius:8px;border:1px solid ",u.border,";overflow-x:auto;",""),table:{name:"nufjao",styles:"width:100%;min-width:600px;border-collapse:collapse;white-space:nowrap"},th:y("text-align:left;font-size:11px;color:",u.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",u.background,";border-bottom:1px solid ",u.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:y("",""),row:y("cursor:pointer;transition:background-color 0.15s ease;user-select:none;&:hover{background-color:",u.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",u.borderLight,";}",""),rowSelected:y("background-color:",u.primaryLight,";&:hover{background-color:",u.primaryLight,";}",""),parentRow:y("cursor:pointer;border-bottom:1px solid ",u.border,";&:hover{background-color:",u.surfaceHover,";}",""),td:{name:"i563hg",styles:"padding:12px 16px"},checkboxCell:{name:"sahq4q",styles:"padding:12px 16px;cursor:pointer;vertical-align:middle"},checkbox:y("width:18px;height:18px;accent-color:",u.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:y("position:relative;flex-shrink:0;height:32px;width:32px;font-size:",Q.xs,";color:",u.textSecondary,";background:",u.surface,";border:1px solid ",u.border,";padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;justify-content:center;&:hover{background:",u.surfaceHover,";border-color:",u.borderHover,";color:",u.text,";}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},folderStats:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},folderStat:y("display:flex;align-items:center;gap:3px;font-size:",Q.xs,";",""),folderStatLocal:y("color:",u.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:y("width:14px;height:14px;color:",u.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:y("display:flex;align-items:center;gap:4px;color:#f59e0b;font-size:",Q.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:"f01c4l",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:4px"},thumbnailCloud:y("",""),thumbnailRemote:y("",""),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:y("width:24px;height:24px;color:",u.imagesFolder,";",""),lockIcon:y("width:10px;height:10px;color:",u.imagesFolder,";margin-left:-6px;margin-top:8px;",""),parentIcon:y("width:20px;height:20px;color:",u.textMuted,";flex-shrink:0;",""),fileIcon:y("width:20px;height:20px;color:",u.textMuted,";flex-shrink:0;",""),thumbnail:y("max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;border:1px solid ",u.borderLight,";",""),name:y("font-size:",Q.base,";font-weight:500;color:",u.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:y("font-size:",Q.sm,";color:",u.textSecondary,";",""),cdnBadge:y("display:inline-flex;align-items:center;gap:4px;font-size:",Q.xs,";font-weight:500;color:",u.success,";",""),cdnBadgeRemote:y("display:inline-flex;align-items:center;font-size:",Q.xs,";font-weight:500;color:#ef4444;",""),cdnIcon:{name:"1suksrg",styles:"width:12px;height:12px"},cdnEmpty:y("font-size:",Q.sm,";color:",u.textMuted,";",""),featuredRow:y("cursor:pointer;transition:background-color 0.15s ease;border:2px dashed ",u.success,";&:hover{background-color:",u.successLight,";}td{border-bottom:none!important;}",""),featuredIcon:y("width:24px;height:24px;color:",u.success,";",""),featuredText:y("color:",u.success,";font-weight:500;",""),openBtn:y("height:32px;font-size:",Q.sm,";font-weight:500;color:",u.primary,";background:",u.surface,";border:1px solid ",u.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",u.primaryLight,";border-color:",u.primary,";}","")};function F1(){const{loading:i,sortedItems:s,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:m,allItemsSelected:w,someItemsSelected:D,selectedItems:C,navigateUp:g,handleItemClick:A,handleOpen:k,handleGenerateThumbnail:B,handleSelectAll:Y,triggerScan:U,triggerRefresh:G,editedImageKey:oe}=Gp(),[K,ce]=v.useState(!1),[ie,he]=v.useState(!1),[V,I]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),W=()=>{ce(!0)},te=async N=>{ce(!1),he(!0),I({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const L=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:N})});if(!L.ok){const ue=await L.json();I({current:0,total:4,percent:0,status:"error",message:ue.error||"Failed to generate screenshot"});return}const ee=L.body?.getReader(),ae=new TextDecoder;if(ee){let ue="";for(;;){const{done:ne,value:_e}=await ee.read();if(ne)break;ue+=ae.decode(_e,{stream:!0});const E=ue.split(`
85
+ `);ue=E.pop()||"";for(const J of E)if(J.startsWith("data: "))try{const $=JSON.parse(J.slice(6));$.type==="start"?I(Me=>({...Me,total:$.total,message:`Screenshotting ${$.url}...`})):$.type==="progress"?I({current:$.current,total:$.total,percent:$.percent,status:"processing",message:$.message}):$.type==="complete"?(I({current:$.processed,total:$.processed,percent:100,status:$.errors>0?"error":"complete",message:$.message}),G()):$.type==="error"&&I(Me=>({...Me,status:"error",message:$.message}))}catch{}}}}catch(L){console.error("Featured image generation error:",L),I({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?r("div",{css:F.loading,children:r("div",{css:F.spinner})}):f&&h?b("div",{css:F.empty,children:[r("p",{children:"No files tracked yet"}),r("p",{css:F.emptyHint,children:"Click Scan to discover files in your public folder"}),r("button",{css:F.scanButton,onClick:U,children:"Scan for Files"})]}):s.length===0&&h?b("div",{css:F.empty,children:[r("p",{children:"No files in this folder"}),r("p",{css:F.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):b(tt,{children:[r(Xp,{isOpen:K,onClose:()=>ce(!1),onSelect:te}),ie&&r(hl,{title:"Generating Screenshot",progress:V,onClose:()=>he(!1)}),r("div",{css:F.tableWrapper,children:b("table",{css:F.table,children:[r("thead",{children:b("tr",{children:[r("th",{css:[F.th,F.thCheckbox,"",""],children:s.length>0&&r("input",{type:"checkbox",css:F.checkbox,checked:w,ref:N=>{N&&(N.indeterminate=D&&!w)},onChange:Y})}),r("th",{css:F.th,children:"Name"}),r("th",{css:[F.th,F.thSize,"",""],children:"Size"}),r("th",{css:[F.th,F.thDimensions,"",""],children:"Dimensions"}),r("th",{css:[F.th,F.thCdn,"",""],children:"CDN"})]})}),b("tbody",{css:F.tbody,children:[!h&&!m&&b("tr",{css:F.parentRow,onClick:g,children:[r("td",{css:F.td}),r("td",{css:F.td,children:b("div",{css:F.nameCell,children:[r("svg",{css:F.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),r("span",{css:F.name,children:".."})]})}),r("td",{css:[F.td,F.meta,"",""],children:"--"}),r("td",{css:[F.td,F.meta,"",""],children:"Parent folder"}),r("td",{css:F.td,children:"--"})]}),s.map(N=>r(J1,{item:N,isSelected:C.has(N.path),onClick:L=>A(N,L),onOpen:()=>k(N),onGenerateThumbnail:()=>B(N),editedImageKey:oe},N.path)),h&&d&&!m&&b("tr",{css:F.featuredRow,onClick:W,title:`Generate ${d.filename}`,children:[r("td",{css:F.td}),r("td",{css:F.td,children:b("div",{css:F.nameCell,children:[r("div",{css:F.folderIconWrapper,children:r("svg",{css:F.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})}),r("span",{css:[F.name,F.featuredText,"",""],children:d.filename})]})}),r("td",{css:[F.td,F.meta,F.featuredText,"",""],children:"--"}),r("td",{css:[F.td,F.meta,F.featuredText,"",""],children:"Click to generate"}),r("td",{css:[F.td,F.featuredText,"",""],children:"--"})]})]})]})})]})}function J1({item:i,isSelected:s,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:m}){const[w,D]=v.useState(!1),C=i.type==="folder",g=!C&&i.thumbnail!==void 0,A=i.thumbnail&&m&&m.path===i.path?`${i.thumbnail}?v=${m.key}`:i.thumbnail,k=i.isProtected||C&&i.name==="images"&&i.path==="public/images",B=U=>{U.stopPropagation();const G="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(G),D(!0),setTimeout(()=>D(!1),1500)},Y=U=>{if(k){U.stopPropagation(),d();return}f(U)};return b("tr",{css:[F.row,s&&!k&&F.rowSelected,"",""],onClick:Y,children:[r("td",{css:[F.td,F.checkboxCell,"",""],onClick:U=>U.stopPropagation(),children:!k&&r("input",{type:"checkbox",css:F.checkbox,checked:s,onChange:()=>f({})})}),r("td",{css:F.td,children:b("div",{css:F.nameCell,children:[C?k?b("div",{css:F.imagesFolderWrapper,children:[r("svg",{css:F.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("svg",{css:F.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("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"})})]}):r("div",{css:F.folderIconWrapper,children:r("svg",{css:F.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("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"})})}):g&&A?r("div",{css:[F.thumbnailWrapper,i.isCloud&&F.thumbnailCloud,i.isRemote&&F.thumbnailRemote,"",""],children:r("img",{css:F.thumbnail,src:A,alt:i.name,loading:"lazy"})}):r("div",{css:[F.thumbnailWrapper,i.isCloud&&F.thumbnailCloud,i.isRemote&&F.thumbnailRemote,"",""],children:r("svg",{css:F.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})}),r("span",{css:F.name,title:i.name,children:$1(i.name)}),b("div",{css:F.actionsCell,children:[b("button",{css:F.copyBtn,onClick:B,title:"Copy file path",children:[w&&r("span",{css:F.tooltip,children:"Copied!"}),r("svg",{css:F.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})]}),r("button",{css:F.openBtn,onClick:U=>{U.stopPropagation(),d()},children:"Open"})]})]})}),r("td",{css:[F.td,F.meta,"",""],children:C?b("div",{css:F.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&b("span",{css:[F.folderStat,F.folderStatLocal,"",""],title:`${i.localCount} local`,children:[r("svg",{css:F.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),i.localCount]}),i.cloudCount!==void 0&&i.cloudCount>0&&b("span",{css:[F.folderStat,F.folderStatCloud,"",""],title:`${i.cloudCount} in cloud`,children:[r("svg",{css:F.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),i.cloudCount]}),i.remoteCount!==void 0&&i.remoteCount>0&&b("span",{css:[F.folderStat,F.folderStatRemote,"",""],title:`${i.remoteCount} remote`,children:[r("svg",{css:F.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),i.remoteCount]}),i.updateCount!==void 0&&i.updateCount>0&&b("span",{css:[F.folderStat,F.folderStatUpdate,"",""],title:`${i.updateCount} pending update${i.updateCount!==1?"s":""}`,children:[r("svg",{css:F.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),i.updateCount]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount!==void 0&&b("span",{children:[i.fileCount," files"]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount===void 0&&"--"]}):i.hasUpdate?b("span",{css:F.updateLabel,children:[r("svg",{css:F.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("svg",{css:F.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"]}):i.cdnPushed?r("span",{css:F.storedLabel,children:r("svg",{css:i.isRemote?F.storedIconRemote:F.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:i.isRemote?r("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"}):r("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"})})}):i.size!==void 0?wp(i.size):"--"}),r("td",{css:[F.td,F.meta,"",""],children:C?i.totalSize!==void 0?wp(i.totalSize):"--":i.dimensions?`${i.dimensions.width}x${i.dimensions.height}`:"--"}),r("td",{css:F.td,children:i.cdnPushed?i.isRemote?r("span",{css:F.cdnBadgeRemote,children:"Remote"}):b("span",{css:F.cdnBadge,children:[r("svg",{css:F.cdnIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("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"]}):r("span",{css:F.cdnEmpty,children:"--"})})]})}function wp(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}function $1(i,s=32){if(i.length<=s)return i;const f=i.lastIndexOf("."),d=f>0?i.substring(f):"",h=f>0?i.substring(0,f):i,m=s-d.length-3;if(m<6)return i.substring(0,s-3)+"...";const w=Math.ceil(m/2),D=Math.floor(m/2);return h.substring(0,w)+"..."+h.substring(h.length-D)+d}var W1=Object.defineProperty,I1=(i,s,f)=>s in i?W1(i,s,{enumerable:!0,configurable:!0,writable:!0,value:f}):i[s]=f,Mt=(i,s,f)=>I1(i,typeof s!="symbol"?s+"":s,f);const Or={x:0,y:0,width:0,height:0,unit:"px"},Il=(i,s,f)=>Math.min(Math.max(i,s),f),P1=(...i)=>i.filter(s=>s&&typeof s=="string").join(" "),zp=(i,s)=>i===s||i.width===s.width&&i.height===s.height&&i.x===s.x&&i.y===s.y&&i.unit===s.unit;function Pl(i,s,f){return i.unit==="%"?{...Or,...i,unit:"%"}:{unit:"%",x:i.x?i.x/s*100:0,y:i.y?i.y/f*100:0,width:i.width?i.width/s*100:0,height:i.height?i.height/f*100:0}}function Xa(i,s,f){return i.unit?i.unit==="px"?{...Or,...i,unit:"px"}:{unit:"px",x:i.x?i.x*s/100:0,y:i.y?i.y*f/100:0,width:i.width?i.width*s/100:0,height:i.height?i.height*f/100:0}:{...Or,...i,unit:"px"}}function kp(i,s,f,d,h,m=0,w=0,D=d,C=h){const g={...i};let A=Math.min(m,d),k=Math.min(w,h),B=Math.min(D,d),Y=Math.min(C,h);s&&(s>1?(A=w?w*s:A,k=A/s,B=D*s):(k=m?m/s:k,A=k*s,Y=C/s)),g.y<0&&(g.height=Math.max(g.height+g.y,k),g.y=0),g.x<0&&(g.width=Math.max(g.width+g.x,A),g.x=0);const U=d-(g.x+g.width);U<0&&(g.x=Math.min(g.x,d-A),g.width+=U);const G=h-(g.y+g.height);if(G<0&&(g.y=Math.min(g.y,h-k),g.height+=G),g.width<A&&((f==="sw"||f=="nw")&&(g.x-=A-g.width),g.width=A),g.height<k&&((f==="nw"||f=="ne")&&(g.y-=k-g.height),g.height=k),g.width>B&&((f==="sw"||f=="nw")&&(g.x-=B-g.width),g.width=B),g.height>Y&&((f==="nw"||f=="ne")&&(g.y-=Y-g.height),g.height=Y),s){const oe=g.width/g.height;if(oe<s){const K=Math.max(g.width/s,k);(f==="nw"||f=="ne")&&(g.y-=K-g.height),g.height=K}else if(oe>s){const K=Math.max(g.height*s,A);(f==="sw"||f=="nw")&&(g.x-=K-g.width),g.width=K}}return g}function e2(i,s,f,d){const h={...i};return s==="ArrowLeft"?d==="nw"?(h.x-=f,h.y-=f,h.width+=f,h.height+=f):d==="w"?(h.x-=f,h.width+=f):d==="sw"?(h.x-=f,h.width+=f,h.height+=f):d==="ne"?(h.y+=f,h.width-=f,h.height-=f):d==="e"?h.width-=f:d==="se"&&(h.width-=f,h.height-=f):s==="ArrowRight"&&(d==="nw"?(h.x+=f,h.y+=f,h.width-=f,h.height-=f):d==="w"?(h.x+=f,h.width-=f):d==="sw"?(h.x+=f,h.width-=f,h.height-=f):d==="ne"?(h.y-=f,h.width+=f,h.height+=f):d==="e"?h.width+=f:d==="se"&&(h.width+=f,h.height+=f)),s==="ArrowUp"?d==="nw"?(h.x-=f,h.y-=f,h.width+=f,h.height+=f):d==="n"?(h.y-=f,h.height+=f):d==="ne"?(h.y-=f,h.width+=f,h.height+=f):d==="sw"?(h.x+=f,h.width-=f,h.height-=f):d==="s"?h.height-=f:d==="se"&&(h.width-=f,h.height-=f):s==="ArrowDown"&&(d==="nw"?(h.x+=f,h.y+=f,h.width-=f,h.height-=f):d==="n"?(h.y+=f,h.height-=f):d==="ne"?(h.y+=f,h.width-=f,h.height-=f):d==="sw"?(h.x-=f,h.width+=f,h.height+=f):d==="s"?h.height+=f:d==="se"&&(h.width+=f,h.height+=f)),h}const eo={capture:!0,passive:!1};let t2=0;const Va=class qn extends v.PureComponent{constructor(){super(...arguments),Mt(this,"docMoveBound",!1),Mt(this,"mouseDownOnCrop",!1),Mt(this,"dragStarted",!1),Mt(this,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),Mt(this,"componentRef",v.createRef()),Mt(this,"mediaRef",v.createRef()),Mt(this,"resizeObserver"),Mt(this,"initChangeCalled",!1),Mt(this,"instanceId",`rc-${t2++}`),Mt(this,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),Mt(this,"onCropPointerDown",s=>{const{crop:f,disabled:d}=this.props,h=this.getBox();if(!f)return;const m=Xa(f,h.width,h.height);if(d)return;s.cancelable&&s.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const w=s.target.dataset.ord,D=!!w;let C=s.clientX,g=s.clientY,A=m.x,k=m.y;if(w){const B=s.clientX-h.x,Y=s.clientY-h.y;let U=0,G=0;w==="ne"||w=="e"?(U=B-(m.x+m.width),G=Y-m.y,A=m.x,k=m.y+m.height):w==="se"||w==="s"?(U=B-(m.x+m.width),G=Y-(m.y+m.height),A=m.x,k=m.y):w==="sw"||w=="w"?(U=B-m.x,G=Y-(m.y+m.height),A=m.x+m.width,k=m.y):(w==="nw"||w=="n")&&(U=B-m.x,G=Y-m.y,A=m.x+m.width,k=m.y+m.height),C=A+h.x+U,g=k+h.y+G}this.evData={startClientX:C,startClientY:g,startCropX:A,startCropY:k,clientX:s.clientX,clientY:s.clientY,isResize:D,ord:w},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})}),Mt(this,"onComponentPointerDown",s=>{const{crop:f,disabled:d,locked:h,keepSelection:m,onChange:w}=this.props,D=this.getBox();if(d||h||m&&f)return;s.cancelable&&s.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const C=s.clientX-D.x,g=s.clientY-D.y,A={unit:"px",x:C,y:g,width:0,height:0};this.evData={startClientX:s.clientX,startClientY:s.clientY,startCropX:C,startCropY:g,clientX:s.clientX,clientY:s.clientY,isResize:!0},this.mouseDownOnCrop=!0,w(Xa(A,D.width,D.height),Pl(A,D.width,D.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}),Mt(this,"onDocPointerMove",s=>{const{crop:f,disabled:d,onChange:h,onDragStart:m}=this.props,w=this.getBox();if(d||!f||!this.mouseDownOnCrop)return;s.cancelable&&s.preventDefault(),this.dragStarted||(this.dragStarted=!0,m&&m(s));const{evData:D}=this;D.clientX=s.clientX,D.clientY=s.clientY;let C;D.isResize?C=this.resizeCrop():C=this.dragCrop(),zp(f,C)||h(Xa(C,w.width,w.height),Pl(C,w.width,w.height))}),Mt(this,"onComponentKeyDown",s=>{const{crop:f,disabled:d,onChange:h,onComplete:m}=this.props;if(d)return;const w=s.key;let D=!1;if(!f)return;const C=this.getBox(),g=this.makePixelCrop(C),A=(navigator.platform.match("Mac")?s.metaKey:s.ctrlKey)?qn.nudgeStepLarge:s.shiftKey?qn.nudgeStepMedium:qn.nudgeStep;if(w==="ArrowLeft"?(g.x-=A,D=!0):w==="ArrowRight"?(g.x+=A,D=!0):w==="ArrowUp"?(g.y-=A,D=!0):w==="ArrowDown"&&(g.y+=A,D=!0),D){s.cancelable&&s.preventDefault(),g.x=Il(g.x,0,C.width-g.width),g.y=Il(g.y,0,C.height-g.height);const k=Xa(g,C.width,C.height),B=Pl(g,C.width,C.height);h(k,B),m&&m(k,B)}}),Mt(this,"onHandlerKeyDown",(s,f)=>{const{aspect:d=0,crop:h,disabled:m,minWidth:w=0,minHeight:D=0,maxWidth:C,maxHeight:g,onChange:A,onComplete:k}=this.props,B=this.getBox();if(m||!h)return;if(s.key==="ArrowUp"||s.key==="ArrowDown"||s.key==="ArrowLeft"||s.key==="ArrowRight")s.stopPropagation(),s.preventDefault();else return;const Y=(navigator.platform.match("Mac")?s.metaKey:s.ctrlKey)?qn.nudgeStepLarge:s.shiftKey?qn.nudgeStepMedium:qn.nudgeStep,U=Xa(h,B.width,B.height),G=e2(U,s.key,Y,f),oe=kp(G,d,f,B.width,B.height,w,D,C,g);if(!zp(h,oe)){const K=Pl(oe,B.width,B.height);A(oe,K),k&&k(oe,K)}}),Mt(this,"onDocPointerDone",s=>{const{crop:f,disabled:d,onComplete:h,onDragEnd:m}=this.props,w=this.getBox();this.unbindDocMove(),!(d||!f)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,m&&m(s),h&&h(Xa(f,w.width,w.height),Pl(f,w.width,w.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),Mt(this,"onDragFocus",()=>{var s;(s=this.componentRef.current)==null||s.scrollTo(0,0)})}get document(){return document}getBox(){const s=this.mediaRef.current;if(!s)return{x:0,y:0,width:0,height:0};const{x:f,y:d,width:h,height:m}=s.getBoundingClientRect();return{x:f,y:d,width:h,height:m}}componentDidUpdate(s){const{crop:f,onComplete:d}=this.props;if(d&&!s.crop&&f){const{width:h,height:m}=this.getBox();h&&m&&d(Xa(f,h,m),Pl(f,h,m))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,eo),this.document.addEventListener("pointerup",this.onDocPointerDone,eo),this.document.addEventListener("pointercancel",this.onDocPointerDone,eo),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,eo),this.document.removeEventListener("pointerup",this.onDocPointerDone,eo),this.document.removeEventListener("pointercancel",this.onDocPointerDone,eo),this.docMoveBound=!1)}getCropStyle(){const{crop:s}=this.props;if(s)return{top:`${s.y}${s.unit}`,left:`${s.x}${s.unit}`,width:`${s.width}${s.unit}`,height:`${s.height}${s.unit}`}}dragCrop(){const{evData:s}=this,f=this.getBox(),d=this.makePixelCrop(f),h=s.clientX-s.startClientX,m=s.clientY-s.startClientY;return d.x=Il(s.startCropX+h,0,f.width-d.width),d.y=Il(s.startCropY+m,0,f.height-d.height),d}getPointRegion(s,f,d,h){const{evData:m}=this,w=m.clientX-s.x,D=m.clientY-s.y;let C;h&&f?C=f==="nw"||f==="n"||f==="ne":C=D<m.startCropY;let g;return d&&f?g=f==="nw"||f==="w"||f==="sw":g=w<m.startCropX,g?C?"nw":"sw":C?"ne":"se"}resolveMinDimensions(s,f,d=0,h=0){const m=Math.min(d,s.width),w=Math.min(h,s.height);return!f||!m&&!w?[m,w]:f>1?m?[m,m/f]:[w*f,w]:w?[w*f,w]:[m,m/f]}resizeCrop(){const{evData:s}=this,{aspect:f=0,maxWidth:d,maxHeight:h}=this.props,m=this.getBox(),[w,D]=this.resolveMinDimensions(m,f,this.props.minWidth,this.props.minHeight);let C=this.makePixelCrop(m);const g=this.getPointRegion(m,s.ord,w,D),A=s.ord||g;let k=s.clientX-s.startClientX,B=s.clientY-s.startClientY;(w&&A==="nw"||A==="w"||A==="sw")&&(k=Math.min(k,-w)),(D&&A==="nw"||A==="n"||A==="ne")&&(B=Math.min(B,-D));const Y={unit:"px",x:0,y:0,width:0,height:0};g==="ne"?(Y.x=s.startCropX,Y.width=k,f?(Y.height=Y.width/f,Y.y=s.startCropY-Y.height):(Y.height=Math.abs(B),Y.y=s.startCropY-Y.height)):g==="se"?(Y.x=s.startCropX,Y.y=s.startCropY,Y.width=k,f?Y.height=Y.width/f:Y.height=B):g==="sw"?(Y.x=s.startCropX+k,Y.y=s.startCropY,Y.width=Math.abs(k),f?Y.height=Y.width/f:Y.height=B):g==="nw"&&(Y.x=s.startCropX+k,Y.width=Math.abs(k),f?(Y.height=Y.width/f,Y.y=s.startCropY-Y.height):(Y.height=Math.abs(B),Y.y=s.startCropY+B));const U=kp(Y,f,g,m.width,m.height,w,D,d,h);return f||qn.xyOrds.indexOf(A)>-1?C=U:qn.xOrds.indexOf(A)>-1?(C.x=U.x,C.width=U.width):qn.yOrds.indexOf(A)>-1&&(C.y=U.y,C.height=U.height),C.x=Il(C.x,0,m.width-C.width),C.y=Il(C.y,0,m.height-C.height),C}renderCropSelection(){const{ariaLabels:s=qn.defaultProps.ariaLabels,disabled:f,locked:d,renderSelectionAddon:h,ruleOfThirds:m,crop:w}=this.props,D=this.getCropStyle();if(w)return it.createElement("div",{style:D,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":s.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!f&&!d&&it.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},it.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),it.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),it.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),it.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),it.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":s.nwDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"nw"),role:"button"}),it.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":s.nDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"n"),role:"button"}),it.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":s.neDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"ne"),role:"button"}),it.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":s.eDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"e"),role:"button"}),it.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":s.seDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"se"),role:"button"}),it.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":s.sDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"s"),role:"button"}),it.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":s.swDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"sw"),role:"button"}),it.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":s.wDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"w"),role:"button"})),h&&it.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:C=>C.stopPropagation()},h(this.state)),m&&it.createElement(it.Fragment,null,it.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),it.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(s){const f={...Or,...this.props.crop||{}};return Xa(f,s.width,s.height)}render(){const{aspect:s,children:f,circularCrop:d,className:h,crop:m,disabled:w,locked:D,style:C,ruleOfThirds:g}=this.props,{cropIsActive:A,newCropIsBeingDrawn:k}=this.state,B=m?this.renderCropSelection():null,Y=P1("ReactCrop",h,A&&"ReactCrop--active",w&&"ReactCrop--disabled",D&&"ReactCrop--locked",k&&"ReactCrop--new-crop",m&&s&&"ReactCrop--fixed-aspect",m&&d&&"ReactCrop--circular-crop",m&&g&&"ReactCrop--rule-of-thirds",!this.dragStarted&&m&&!m.width&&!m.height&&"ReactCrop--invisible-crop",d&&"ReactCrop--no-animate");return it.createElement("div",{ref:this.componentRef,className:Y,style:C},it.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},f),m?it.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},it.createElement("defs",null,it.createElement("mask",{id:`hole-${this.instanceId}`},it.createElement("rect",{width:"100%",height:"100%",fill:"white"}),d?it.createElement("ellipse",{cx:`${m.x+m.width/2}${m.unit}`,cy:`${m.y+m.height/2}${m.unit}`,rx:`${m.width/2}${m.unit}`,ry:`${m.height/2}${m.unit}`,fill:"black"}):it.createElement("rect",{x:`${m.x}${m.unit}`,y:`${m.y}${m.unit}`,width:`${m.width}${m.unit}`,height:`${m.height}${m.unit}`,fill:"black"}))),it.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,B)}};Mt(Va,"xOrds",["e","w"]),Mt(Va,"yOrds",["n","s"]),Mt(Va,"xyOrds",["nw","ne","se","sw"]),Mt(Va,"nudgeStep",1),Mt(Va,"nudgeStepMedium",10),Mt(Va,"nudgeStepLarge",100),Mt(Va,"defaultProps",{ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}});let n2=Va;const a2=ln`
86
+ from { opacity: 0; }
87
+ to { opacity: 1; }
88
+ `,ve={overlay:y("position:fixed;inset:0;z-index:10001;display:flex;background:transparent;animation:",a2," 0.15s ease-out;font-family:",di,";",""),container:y(oo," display:flex;flex:1;margin:24px;background:",u.surface,";border:1px solid ",u.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:y("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",u.background,";overflow:hidden;.ReactCrop__crop-selection{border:2px solid ",u.primary,";}",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},closeBtn:y("padding:8px;background:",u.surface,";border:1px solid ",u.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:",u.surfaceHover,";border-color:",u.borderHover,";}",""),closeIcon:y("width:20px;height:20px;color:",u.textSecondary,";",""),rotationWrapper:{name:"1xwnw1d",styles:"transition:transform 0.3s ease;position:relative;cursor:pointer"},cropHint:y("position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background:rgba(0, 0, 0, 0.7);color:white;padding:12px 20px;border-radius:8px;font-size:",Q.sm,";pointer-events:none;white-space:nowrap;",""),successBanner:y("position:absolute;top:24px;left:50%;transform:translateX(-50%);background:#22c55e;color:#fff;padding:12px 24px;border-radius:8px;font-size:",Q.sm,";font-weight:600;pointer-events:none;z-index:10;animation:fadeInOut 3s ease-in-out forwards;@keyframes fadeInOut{0%{opacity:0;transform:translateX(-50%) scale(0.9);}10%{opacity:1;transform:translateX(-50%) scale(1);}90%{opacity:1;transform:translateX(-50%) scale(1);}100%{opacity:0;transform:translateX(-50%) scale(0.9);}}",""),cropWrapper:{name:"12wysvm",styles:"max-width:100%;max-height:calc(100vh - 150px);img{max-width:100%;max-height:calc(100vh - 150px);display:block;}"},sidebar:y("width:280px;background:",u.surface,";border-left:1px solid ",u.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:y("padding:16px 20px;border-bottom:1px solid ",u.border,";",""),sidebarTitle:y("font-size:",Q.base,";font-weight:600;color:",u.text,";margin:0;",""),sidebarContent:{name:"1uv1qvv",styles:"flex:1;padding:20px;overflow:auto;display:flex;flex-direction:column;gap:20px"},section:{name:"1c3pogw",styles:"display:flex;flex-direction:column;gap:10px"},sectionLabel:y("font-size:",Q.sm,";font-weight:600;color:",u.text,";",""),subSectionLabel:y("font-size:",Q.xs,";font-weight:500;color:",u.textMuted,";text-transform:uppercase;letter-spacing:0.5px;",""),aspectButtons:{name:"13l5m7f",styles:"display:flex;gap:6px;flex-wrap:wrap"},aspectBtn:y("padding:6px 10px;font-size:",Q.sm,";border:1px solid ",u.border,";background:",u.surface,";color:",u.text,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover:not(:disabled){background-color:",u.surfaceHover,";border-color:",u.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),aspectBtnActive:y("background-color:",u.primary,";border-color:",u.primary,";color:white;&:hover:not(:disabled){background-color:",u.primary,";border-color:",u.primary,";}",""),rotateButtons:{name:"11jf4ye",styles:"display:flex;gap:8px"},rotateBtn:y("flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 12px;font-size:",Q.sm,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",u.text,";&:hover:not(:disabled){background-color:",u.surfaceHover,";border-color:",u.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),rotateIcon:{name:"157xhr7",styles:"width:16px;height:16px"},rotatePreview:y("width:80px;height:80px;border:1px solid ",u.border,";border-radius:6px;overflow:hidden;display:flex;align-items:center;justify-content:center;background:",u.background,";margin:8px auto;img{max-width:100%;max-height:100%;object-fit:contain;transition:transform 0.3s ease;}",""),resizeRow:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},resizeInput:y("width:80px;min-width:0;padding:8px 6px;font-size:",Q.sm,";border:1px solid ",u.border,";border-radius:6px;background:",u.surface,";color:",u.text,";text-align:center;&:focus{outline:none;border-color:",u.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;background:",u.surfaceHover,";}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}-moz-appearance:textfield;",""),resizeX:y("font-size:",Q.sm,";color:",u.textMuted,";",""),qualitySlider:y("width:100%;height:6px;border-radius:3px;background:",u.border,";outline:none;cursor:pointer;&::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:",u.primary,";cursor:pointer;}&::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:",u.primary,";cursor:pointer;border:none;}",""),qualityRow:{name:"uh5xjc",styles:"display:flex;align-items:center;gap:12px"},qualityValue:y("min-width:40px;font-size:",Q.sm,";color:",u.text,";text-align:right;",""),fileSize:y("font-size:",Q.sm,";color:",u.textMuted,";padding:8px 0;",""),sidebarFooter:y("padding:16px 20px;border-top:1px solid ",u.border,";display:flex;flex-direction:column;gap:8px;",""),actionBtn:y("display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;font-size:",Q.base,";font-weight:500;background:",u.primary,";border:1px solid ",u.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:white;&:hover:not(:disabled){background-color:",u.primaryHover,";border-color:",u.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),cancelBtn:y("display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;font-size:",Q.base,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",u.text,";&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),spinner:{name:"1b4712p",styles:"width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin 0.75s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}"},hint:y("font-size:",Q.xs,";color:",u.textMuted,";font-style:italic;",""),clearBtn:y("margin-top:8px;padding:6px 12px;font-size:",Q.xs,";color:",u.textSecondary,";background:transparent;border:1px solid ",u.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;&:hover{background:",u.surfaceHover,";color:",u.text,";}","")},l2=[{label:"Free",value:void 0},{label:"1:1",value:1},{label:"4:3",value:4/3},{label:"3:2",value:3/2},{label:"16:9",value:16/9},{label:"2:3",value:2/3},{label:"9:16",value:9/16}];function o2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(2)} MB`}function i2({imagePath:i,imageSrc:s,dimensions:f,fileSize:d,onClose:h,onSaveComplete:m,triggerRefresh:w}){const D=v.useRef(null),[C,g]=v.useState(),[A,k]=v.useState(),[B,Y]=v.useState(void 0),[U,G]=v.useState(f.width),[oe,K]=v.useState(f.height),[ce,ie]=v.useState(!1),[he,V]=v.useState(!1),[I,W]=v.useState({width:f.width,height:f.height}),[te,N]=v.useState(1),[L,ee]=v.useState(!1),[ae,ue]=v.useState(0),[ne,_e]=v.useState(!1),E=U!==I.width||oe!==I.height,[J,$]=v.useState(0),[Me,Ye]=v.useState(0),[S,H]=v.useState(!1),[P,se]=v.useState(0),[Se,De]=v.useState(null),[Ge,vt]=v.useState(d),[Oe,en]=v.useState(95),[Je,ct]=v.useState(0),pt=Je!==0,jt=Z=>{const de=Z.currentTarget,{naturalWidth:je,naturalHeight:Ie,width:Ue,height:ze}=de;W({width:je,height:Ie}),N(je/Ue),V(!0),G(je),K(Ie)},qt=()=>{if(!he||!D.current||L||E||pt)return;const Z=D.current.width,de=D.current.height;if(ee(!0),B){const je=Z/de;let Ie,Ue;B>je?(Ie=100,Ue=je/B*100):(Ue=100,Ie=B/je*100);const ze={unit:"%",x:(100-Ie)/2,y:(100-Ue)/2,width:Ie,height:Ue};g(ze);const xt={unit:"px",x:Math.round(ze.x/100*Z),y:Math.round(ze.y/100*de),width:Math.round(ze.width/100*Z),height:Math.round(ze.height/100*de)};k(xt)}else g({unit:"%",x:0,y:0,width:100,height:100}),k({unit:"px",x:0,y:0,width:Z,height:de})},tn=()=>{ee(!1),g(void 0),k(void 0)};v.useEffect(()=>{if(A&&he&&te>0){const Z=Math.round(A.width*te),de=Math.round(A.height*te);$(Z),Ye(de)}else L||($(0),Ye(0))},[A,he,te,L]);const Vt=()=>{ct(Z=>(Z+90)%360)},hn=()=>{ct(Z=>(Z-90+360)%360)},Wt=()=>{ct(0)},ut=()=>{ne&&m({name:i.split("/").pop()||"",path:i,type:"file",dimensions:I}),h()},Gt=Z=>{if(Y(Z),!he||!D.current)return;const de=D.current.width,je=D.current.height;if(Z){const Ie=de/je;let Ue,ze;Z>Ie?(Ue=100,ze=Ie/Z*100):(ze=100,Ue=Z/Ie*100);const xt={unit:"%",x:(100-Ue)/2,y:(100-ze)/2,width:Ue,height:ze};g(xt);const mt={unit:"px",x:Math.round(xt.x/100*de),y:Math.round(xt.y/100*je),width:Math.round(xt.width/100*de),height:Math.round(xt.height/100*je)};k(mt)}else g({unit:"%",x:0,y:0,width:100,height:100}),k({unit:"px",x:0,y:0,width:de,height:je})},wt=I.width/I.height,Ee=Z=>{if(L)return;const de=parseInt(Z.target.value)||0;G(de),de>0&&K(Math.round(de/wt))},Dt=Z=>{if(L)return;const de=parseInt(Z.target.value)||0;K(de),de>0&&G(Math.round(de*wt))},wn=()=>{G(I.width),K(I.height)},Yn=Z=>{if(!A||!D.current)return;const de=parseInt(Z.target.value)||0;if(de<=0)return;let je=Me;B&&(je=Math.round(de/B));const Ie=de/te,Ue=je/te,ze={unit:"px",x:A.x,y:A.y,width:Ie,height:Ue},xt=D.current.width-ze.x,mt=D.current.height-ze.y;ze.width=Math.min(Ie,xt),ze.height=Math.min(Ue,mt),k(ze),g({unit:"px",x:ze.x,y:ze.y,width:ze.width,height:ze.height})},Hn=Z=>{if(!A||!D.current)return;const de=parseInt(Z.target.value)||0;if(de<=0)return;let je=J;B&&(je=Math.round(de*B));const Ie=je/te,Ue=de/te,ze={unit:"px",x:A.x,y:A.y,width:Ie,height:Ue},xt=D.current.width-ze.x,mt=D.current.height-ze.y;ze.width=Math.min(Ie,xt),ze.height=Math.min(Ue,mt),k(ze),g({unit:"px",x:ze.x,y:ze.y,width:ze.width,height:ze.height})},zn=async()=>{if(he){ie(!0);try{const Z=A?{x:Math.round(A.x*te),y:Math.round(A.y*te),width:Math.round(A.width*te),height:Math.round(A.height*te)}:{x:0,y:0,width:I.width,height:I.height};let de=L?J:E?U:I.width,je=L?Me:E?oe:I.height;if(Je===90||Je===270){const ze=de;de=je,je=ze}const Ue=await(await fetch("/api/studio/edit-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:i,crop:Z,rotation:Je,resize:{width:de,height:je},quality:Oe})})).json();Ue.success?(w(),m(Ue.updatedItem),W({width:Ue.dimensions.width,height:Ue.dimensions.height}),G(Ue.dimensions.width),K(Ue.dimensions.height),Ue.updatedItem?.size&&vt(Ue.updatedItem.size),ee(!1),g(void 0),k(void 0),ct(0),_e(!0),ue(Date.now()),se(ze=>ze+1),H(!0),setTimeout(()=>H(!1),3e3)):(console.error("Edit failed:",Ue.error),De(Ue.error||"Failed to save image"))}catch(Z){console.error("Edit error:",Z),De("An error occurred while saving the image")}finally{ie(!1)}}};return b("div",{css:ve.overlay,children:[b("div",{css:ve.container,children:[b("div",{css:ve.main,children:[r("div",{css:ve.headerButtons,children:r("button",{css:ve.closeBtn,onClick:ut,children:r("svg",{css:ve.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})}),b("div",{css:ve.rotationWrapper,onClick:qt,children:[r(n2,{crop:L?C:void 0,onChange:Z=>g(Z),onComplete:Z=>k(Z),aspect:B,css:ve.cropWrapper,disabled:!L,children:r("img",{ref:D,src:ae?`${s}?v=${ae}`:s,alt:"Edit",onLoad:jt,style:{cursor:L?"crosshair":"pointer"}})}),!L&&he&&r("div",{css:ve.cropHint,children:pt?"Save rotation first to enable crop":E?"Save resize first to enable crop":"Click to enable crop selection"}),S&&r("div",{css:ve.successBanner,children:"Image updated"},P)]})]}),b("div",{css:ve.sidebar,children:[r("div",{css:ve.sidebarHeader,children:r("h2",{css:ve.sidebarTitle,children:"Edit Image"})}),b("div",{css:ve.sidebarContent,children:[b("div",{css:ve.section,children:[r("span",{css:ve.sectionLabel,children:"Crop Selection"}),r("span",{css:ve.subSectionLabel,children:"Aspect Ratio"}),r("div",{css:ve.aspectButtons,children:l2.map(Z=>r("button",{css:[ve.aspectBtn,B===Z.value&&ve.aspectBtnActive,"",""],onClick:()=>Gt(Z.value),disabled:E||pt,children:Z.label},Z.label))}),L&&b(tt,{children:[r("span",{css:ve.subSectionLabel,children:"Selection Size"}),b("div",{css:ve.resizeRow,children:[r("input",{type:"number",css:ve.resizeInput,value:J,onChange:Yn,min:1}),r("span",{css:ve.resizeX,children:"×"}),r("input",{type:"number",css:ve.resizeInput,value:Me,onChange:Hn,min:1}),r("span",{css:ve.resizeX,children:"px"})]})]}),r("p",{css:ve.hint,children:pt?"Save rotation first to enable crop":E?"Save resize first to enable crop":L?"Drag corners to resize crop area":"Click image to enable crop"}),L&&r("button",{css:ve.clearBtn,onClick:tn,children:"Clear Selection"})]}),b("div",{css:ve.section,children:[r("span",{css:ve.sectionLabel,children:"Rotation"}),r("div",{css:ve.rotatePreview,children:r("img",{src:ae?`${s}?v=${ae}`:s,alt:"Rotation preview",style:{transform:`rotate(${Je}deg)`}})}),b("div",{css:ve.rotateButtons,children:[b("button",{css:ve.rotateBtn,onClick:hn,disabled:ce||L||E,children:[r("svg",{css:ve.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),"CCW"]}),b("button",{css:ve.rotateBtn,onClick:Vt,disabled:ce||L||E,children:[r("svg",{css:ve.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 10h-10a8 8 0 00-8 8v2M21 10l-6 6m6-6l-6-6"})}),"CW"]})]}),pt&&r("button",{css:ve.clearBtn,onClick:Wt,children:"Reset Rotation"}),r("p",{css:ve.hint,children:L||E?"Save other changes first to rotate":pt?"Click Save Changes to apply rotation":"Preview rotation before saving"})]}),b("div",{css:ve.section,children:[r("span",{css:ve.sectionLabel,children:"Resize Image"}),b("div",{css:ve.resizeRow,children:[r("input",{type:"number",css:ve.resizeInput,value:U,onChange:Ee,min:1,disabled:L||pt}),r("span",{css:ve.resizeX,children:"×"}),r("input",{type:"number",css:ve.resizeInput,value:oe,onChange:Dt,min:1,disabled:L||pt}),r("span",{css:ve.resizeX,children:"px"})]}),E&&!L&&!pt&&r("button",{css:ve.clearBtn,onClick:wn,children:"Reset to Original"}),pt?r("p",{css:ve.hint,children:"Save rotation first to resize"}):L?r("p",{css:ve.hint,children:"Clear crop selection to resize"}):E?r("p",{css:ve.hint,children:"Save to apply resize, then crop"}):r("p",{css:ve.hint,children:"Maintains aspect ratio"})]}),b("div",{css:ve.section,children:[r("span",{css:ve.sectionLabel,children:"Quality"}),b("div",{css:ve.qualityRow,children:[r("input",{type:"range",css:ve.qualitySlider,min:1,max:100,value:Oe,onChange:Z=>en(parseInt(Z.target.value))}),b("span",{css:ve.qualityValue,children:[Oe,"%"]})]}),r("p",{css:ve.hint,children:"Lower quality = smaller file size"})]}),b("div",{css:ve.section,children:[r("span",{css:ve.sectionLabel,children:"File Size"}),r("p",{css:ve.fileSize,children:o2(Ge)})]})]}),b("div",{css:ve.sidebarFooter,children:[r("button",{css:ve.actionBtn,onClick:zn,disabled:ce||!he,children:ce?b(tt,{children:[r("span",{css:ve.spinner}),"Saving..."]}):"Save Changes"}),r("button",{css:ve.cancelBtn,onClick:ut,disabled:ce,children:"Close"})]})]})]}),Se&&r(pu,{title:"Error",message:Se,onClose:()=>De(null)})]})}const r2=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],s2=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function c2(i){const s=i.toLowerCase().substring(i.lastIndexOf("."));return r2.includes(s)}function u2(i){const s=i.toLowerCase().substring(i.lastIndexOf("."));return s2.includes(s)}const fe={overlay:{name:"1crgpqk",styles:"position:absolute;top:0;left:0;right:0;bottom:0;z-index:100;display:flex;background:transparent"},container:y("display:flex;flex:1;margin:24px;background:",u.surface,";border:1px solid ",u.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:y("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",u.background,";overflow:auto;",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},copyBtn:y("position:relative;padding:8px;background:",u.surface,";border:1px solid ",u.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:",u.surfaceHover,";border-color:",u.borderHover,";}",""),copyIcon:y("width:20px;height:20px;color:",u.textSecondary,";",""),statusIcon:y("display:flex;align-items:center;justify-content:center;padding:8px;background:",u.surface,";border:1px solid ",u.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:y("padding:8px;background:",u.surface,";border:1px solid ",u.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:",u.surfaceHover,";border-color:",u.borderHover,";}",""),mainCloseIcon:y("width:20px;height:20px;color:",u.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:y("display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px;background:",u.surface,";border-radius:12px;border:1px solid ",u.border,";",""),fileIcon:y("width:80px;height:80px;color:",u.textMuted,";margin-bottom:16px;",""),fileName:y("font-size:",Q.lg,";font-weight:600;color:",u.text,";margin:0;",""),sidebar:y("width:280px;background:",u.surface,";border-left:1px solid ",u.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:y("padding:16px 20px;border-bottom:1px solid ",u.border,";",""),sidebarTitle:y("font-size:",Q.base,";font-weight:600;color:",u.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:y("display:flex;justify-content:space-between;font-size:",Q.sm,";",""),infoLabel:y("color:",u.textSecondary,";",""),infoValue:y("color:",u.text,";font-weight:500;text-align:right;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),infoValueWrap:y("color:",u.text,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;",""),infoLink:y("color:",u.primary,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;text-decoration:none;&:hover{text-decoration:underline;}",""),thumbChips:{name:"1w7hks3",styles:"display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end"},thumbChip:y("font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:",u.primary,";color:white;",""),actions:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},actionBtn:y("display:flex;align-items:center;gap:10px;width:100%;padding:12px 14px;font-size:",Q.base,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",u.text,";text-align:left;&:hover:not(:disabled){background-color:",u.surfaceHover,";border-color:",u.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),actionBtnDanger:y("color:",u.danger,";&:hover:not(:disabled){background-color:",u.dangerLight,";border-color:",u.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 d2(){const{focusedItem:i,setFocusedItem:s,triggerRefresh:f,fileItems:d,setEditedImageKey:h,requestDelete:m,requestMove:w,requestSync:D,requestDownload:C,requestProcess:g,setProcessMode:A,actionState:k}=ao(),[B,Y]=v.useState(!1),[U,G]=v.useState(!1),[oe,K]=v.useState({current:0,total:1,percent:0,status:"processing",message:"Renaming..."}),[ce,ie]=v.useState(!1),[he,V]=v.useState(null),[I,W]=v.useState(!1),[te,N]=v.useState(!1),[L,ee]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),[ae,ue]=v.useState(!1),[ne,_e]=v.useState(0),E=k.showProgress,J=i?i.name.toLowerCase()==="favicon.png"||i.name.toLowerCase()==="favicon.jpg":!1,$=i&&!i.isProtected&&/\.(jpg|jpeg|png|webp|gif)$/i.test(i.name)&&(!i.isCloud||i.hasUpdate),Me=ct=>{s(ct),_e(Date.now()),h(ct.path)};if(!i)return null;const Ye=c2(i.name),S=u2(i.name),H="/"+i.path.replace(/^public\//,""),P=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${H}`:H,se=ne?`${P}?v=${ne}`:P,Se=typeof window<"u"?window.location.origin:"",De=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${H}`:`${Se}${H}`,Ge=()=>{s(null)},vt=()=>{navigator.clipboard.writeText(De),W(!0),setTimeout(()=>W(!1),1500)},Oe=async ct=>{if(ct&&ct!==i.name){Y(!1),G(!0),K({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});try{const pt=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:i.path,newName:ct})});if(!pt.body)throw new Error("No response body");const jt=pt.body.getReader(),qt=new TextDecoder;let tn="",Vt="";for(;;){const{done:hn,value:Wt}=await jt.read();if(hn)break;tn+=qt.decode(Wt,{stream:!0});const ut=tn.split(`
89
+ `);tn=ut.pop()||"";for(const Gt of ut){if(!Gt.startsWith("data: "))continue;const wt=JSON.parse(Gt.slice(6));wt.type==="start"?K({current:0,total:wt.total,percent:0,status:"processing",message:wt.message}):wt.type==="progress"?K({current:wt.current,total:wt.total,percent:Math.round(wt.current/wt.total*100),status:"processing",message:wt.message}):wt.type==="complete"?(Vt=wt.newPath,K({current:wt.renamed,total:wt.renamed,percent:100,status:"complete",message:"Renamed successfully"})):wt.type==="error"&&(K(Ee=>({...Ee,status:"error",message:wt.message})),V({title:"Rename Failed",message:wt.message}))}}Vt&&(s({...i,path:Vt,name:Vt.split("/").pop()||ct}),f())}catch(pt){console.error("Rename error:",pt),K(jt=>({...jt,status:"error",message:"Failed to rename"})),V({title:"Rename Failed",message:"An error occurred while renaming the file"})}}},en=async()=>{if(i){N(!0),ee({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."});try{const ct=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+i.path.replace(/^public\//,"")})});if(!ct.ok){const qt=await ct.json();ee({current:0,total:3,percent:0,status:"error",message:qt.error||"Failed to generate favicons"});return}const pt=ct.body?.getReader(),jt=new TextDecoder;if(pt){let qt="";for(;;){const{done:tn,value:Vt}=await pt.read();if(tn)break;qt+=jt.decode(Vt,{stream:!0});const hn=qt.split(`
90
+ `);qt=hn.pop()||"";for(const Wt of hn)if(Wt.startsWith("data: "))try{const ut=JSON.parse(Wt.slice(6));ut.type==="start"?ee(Gt=>({...Gt,total:ut.total})):ut.type==="progress"?ee({current:ut.current,total:ut.total,percent:ut.percent,status:"processing",message:ut.message}):ut.type==="complete"?ee({current:ut.processed,total:ut.processed,percent:100,status:ut.errors>0?"error":"complete",message:ut.message}):ut.type==="error"&&ee(Gt=>({...Gt,status:"error",message:ut.message}))}catch{}}}}catch(ct){console.error("Favicon generation error:",ct),ee({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},Je=()=>Ye?r("img",{css:fe.image,src:se,alt:i.name}):S?r("video",{css:fe.video,src:se,controls:!0}):b("div",{css:fe.filePlaceholder,children:[r("svg",{css:fe.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("p",{css:fe.fileName,children:i.name})]});return b(tt,{children:[he&&r(pu,{title:he.title,message:he.message,onClose:()=>V(null)}),r(Yp,{isOpen:ce,onClose:()=>ie(!1)}),B&&r(_r,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:i.name,placeholder:"Enter new filename",confirmLabel:"Rename",onConfirm:Oe,onCancel:()=>Y(!1)}),U&&r(hl,{title:"Renaming",progress:oe,onClose:()=>{G(!1),f()}}),te&&r(hl,{title:"Generating Favicons",progress:L,onClose:()=>N(!1)}),r("div",{css:fe.overlay,onClick:Ge,children:b("div",{css:fe.container,onClick:ct=>ct.stopPropagation(),children:[b("div",{css:fe.main,children:[b("div",{css:fe.headerButtons,children:[i.cdnPushed&&!i.isRemote&&r("span",{css:fe.statusIcon,title:"Pushed to CDN",children:r("svg",{css:fe.cloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})}),i.isRemote&&r("span",{css:fe.statusIcon,title:"Remote image",children:r("svg",{css:fe.globeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})}),b("button",{css:fe.copyBtn,onClick:vt,title:"Copy file path",children:[I&&r("span",{css:fe.tooltip,children:"Copied!"}),r("svg",{css:fe.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})]}),r("button",{css:fe.mainCloseBtn,onClick:Ge,"aria-label":"Close",children:r("svg",{css:fe.mainCloseIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),r("div",{css:fe.mediaWrapper,children:Je()})]}),b("div",{css:fe.sidebar,children:[r("div",{css:fe.sidebarHeader,children:r("h3",{css:fe.sidebarTitle,children:"Details"})}),b("div",{css:fe.sidebarContent,children:[b("div",{css:fe.info,children:[b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Name"}),r("span",{css:fe.infoValueWrap,children:i.name})]}),b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Path"}),r("span",{css:fe.infoValueWrap,children:i.path.replace(/^public\//,"")})]}),i.size!==void 0&&b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Size"}),r("span",{css:fe.infoValue,children:f2(i.size)})]}),i.dimensions&&b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Dimensions"}),b("span",{css:fe.infoValue,children:[i.dimensions.width," × ",i.dimensions.height]})]}),(i.hasSm||i.hasMd||i.hasLg||i.hasFull)&&b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"Thumbnails"}),r("span",{css:fe.infoValue,children:b("span",{css:fe.thumbChips,children:[i.hasSm&&r("span",{css:fe.thumbChip,children:"SM"}),i.hasMd&&r("span",{css:fe.thumbChip,children:"MD"}),i.hasLg&&r("span",{css:fe.thumbChip,children:"LG"}),i.hasFull&&r("span",{css:fe.thumbChip,children:"FULL"})]})})]}),b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"CDN Status"}),r("span",{css:fe.infoValue,children:i.cdnPushed?i.isRemote?"Remote":"Pushed":"Local"})]}),b("div",{css:fe.infoRow,children:[r("span",{css:fe.infoLabel,children:"URL"}),r("a",{href:De,target:"_blank",rel:"noopener noreferrer",css:fe.infoLink,title:De,children:De})]})]}),b("div",{css:fe.actions,children:[b("button",{css:fe.actionBtn,onClick:()=>Y(!0),disabled:i.isProtected,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"]}),Ye&&b("button",{css:fe.actionBtn,onClick:()=>ue(!0),disabled:E||!$,title:$?void 0:"Download image first to edit",children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 14M14 8l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2"})}),$?"Edit Image":"Download to Edit"]}),b("button",{css:fe.actionBtn,onClick:()=>w([i.path]),disabled:E||i.isProtected,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})}),"Move"]}),b("button",{css:[fe.actionBtn,fe.actionBtnCloud,"",""],onClick:()=>D([i.path],d),disabled:E||i.isProtected||i.cdnPushed&&!i.isRemote,title:i.cdnPushed&&!i.isRemote?"Already in R2":void 0,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"]}),b("button",{css:[fe.actionBtn,fe.actionBtnCloud,"",""],onClick:()=>C([i.path],d),disabled:E||!i.cdnPushed||i.isRemote,title:i.cdnPushed?i.isRemote?"Remote image":"Download from CDN to local":"Not on CDN",children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"]}),b("button",{css:fe.actionBtn,onClick:()=>{A("generate"),g([i.path])},disabled:E||i.isProtected,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),"Generate Thumbnails"]}),(i.hasSm||i.hasMd||i.hasLg||i.hasFull)&&b("button",{css:fe.actionBtn,onClick:()=>{A("remove"),g([i.path])},disabled:E||i.isProtected,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),"Remove Thumbnails"]}),J&&b("button",{css:fe.actionBtn,onClick:en,disabled:te||i.isProtected,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"]}),b("button",{css:[fe.actionBtn,fe.actionBtnDanger,"",""],onClick:()=>m([i.path]),disabled:E||i.isProtected,children:[r("svg",{css:fe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"]})]})]})]})]})}),ae&&i.dimensions&&r(i2,{imagePath:i.path,imageSrc:se,dimensions:i.dimensions,fileSize:i.size||0,onClose:()=>ue(!1),onSaveComplete:Me,triggerRefresh:f})]})}function f2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}const fl={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:y("background:",u.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:y("width:24px;height:24px;color:",u.danger,";flex-shrink:0;",""),title:y("font-size:",Q.lg,";font-weight:600;color:",u.text,";margin:0;",""),message:y("font-size:",Q.base,";color:",u.textSecondary,";margin:0 0 20px 0;line-height:1.5;",""),button:y("width:100%;padding:10px 16px;border-radius:6px;font-size:",Q.base,";font-weight:500;border:none;background:",u.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",u.primaryHover,";}","")};function h2(){const{error:i,clearError:s}=ao();return i?r("div",{css:fl.overlay,onClick:s,children:b("div",{css:fl.modal,onClick:f=>f.stopPropagation(),children:[b("div",{css:fl.header,children:[r("svg",{css:fl.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("h3",{css:fl.title,children:i.title})]}),r("p",{css:fl.message,children:i.message}),r("button",{css:fl.button,onClick:s,children:"OK"})]})}):null}const Mp={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 p2({triggerRefresh:i,clearSelection:s,setFocusedItem:f,showError:d}){const[h,m]=v.useState(Mp),w=v.useCallback(te=>{m(N=>({...N,progressState:typeof te=="function"?te(N.progressState):{...N.progressState,...te}}))},[]),D=v.useCallback(te=>{m(N=>({...N,showProgress:te}))},[]),C=v.useCallback(te=>{m(N=>({...N,progressTitle:te}))},[]),g=jp({setShowProgress:D,setProgressTitle:C,setProgressState:w,triggerRefresh:i}),A=v.useCallback(te=>{m(N=>({...N,actionPaths:te,showDeleteConfirm:!0}))},[]),k=v.useCallback(te=>{m(N=>({...N,actionPaths:te,showMoveModal:!0}))},[]),B=v.useCallback((te,N)=>{const L=te.map(ue=>"/"+ue.replace(/^public\//,""));let ee=!1,ae=!1;for(const ue of te){const ne=N.find(_e=>_e.path===ue);ne&&(ne.isRemote?ee=!0:ne.cdnPushed||(ae=!0))}m(ue=>({...ue,actionPaths:te,syncImageCount:L.length,syncHasRemote:ee,syncHasLocal:ae,showSyncConfirm:!0}))},[]),Y=v.useCallback((te,N)=>{const L=[];for(const ee of te){const ae=N.find(ue=>ue.path===ee);ae&&ae.cdnPushed&&!ae.isRemote&&L.push(ee)}m(ee=>({...ee,actionPaths:L,downloadImageCount:L.length,downloadTotalSelected:te.length,showDownloadConfirm:!0}))},[]),U=v.useCallback(te=>{m(N=>({...N,actionPaths:te,showProcessConfirm:!0}))},[]),G=v.useCallback(te=>{m(N=>({...N,processMode:te}))},[]),oe=v.useCallback(()=>{m(te=>({...te,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),K=v.useCallback(()=>{m(Mp)},[]),ce=v.useCallback(()=>{g.stop()},[g]),ie=v.useCallback(async()=>{const te=h.actionPaths;m(N=>({...N,showDeleteConfirm:!1}));try{const N=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:te})});if(N.ok)s(),f(null),i();else{const L=await N.json();d("Delete Failed",L.error||"Unknown error")}}catch(N){console.error("Delete error:",N),d("Delete Failed","Delete failed. Check console for details.")}},[h.actionPaths,s,f,i,d]),he=v.useCallback(async te=>{const N=h.actionPaths;m(L=>({...L,showMoveModal:!1})),await g.execute({endpoint:"/api/studio/move",body:{paths:N,destination:te},title:"Moving Files",onComplete:L=>{L.errors&&L.errors>0&&L.errorMessages?.length&&d("Move Failed",L.errorMessages.join(`
91
+ `)),s(),f(null)}})},[h.actionPaths,s,f,d,g]),V=v.useCallback(async()=>{const N=h.actionPaths.map(ae=>"/"+ae.replace(/^public\//,""));m(ae=>({...ae,showSyncConfirm:!1,showProgress:!0,progressTitle:"Pushing to CDN",progressState:{current:0,total:N.length,percent:0,status:"processing",message:"Pushing to CDN..."}}));let L=0;const ee=[];for(let ae=0;ae<N.length;ae++){const ue=N[ae];try{const ne=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[ue]})});if(ne.ok)L++;else{const _e=await ne.json();ee.push(`${ue}: ${_e.error||"Unknown error"}`)}}catch(ne){ee.push(`${ue}: ${ne instanceof Error?ne.message:"Unknown error"}`)}w({current:ae+1,total:N.length,percent:Math.round((ae+1)/N.length*100),status:"processing",message:`Pushed ${ue}`})}w({current:N.length,total:N.length,percent:100,status:ee.length>0?"error":"complete",message:`Pushed ${L} file${L!==1?"s":""}${ee.length>0?`, ${ee.length} error${ee.length!==1?"s":""}`:""}`}),ee.length>0&&d("Push Errors",ee.join(`
92
+ `)),s(),i()},[h.actionPaths,s,i,d,w]),I=v.useCallback(async()=>{const te=h.actionPaths,N=h.processMode,L=te.map(ne=>{const _e=ne.replace(/^public\//,"");return _e.startsWith("/")?_e:`/${_e}`}),ee=N==="remove",ae=ee?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",ue=ee?"Removing Thumbnails":"Generating Thumbnails";m(ne=>({...ne,showProcessConfirm:!1})),await g.execute({endpoint:ae,body:{imageKeys:L},title:ue})},[h.actionPaths,h.processMode,g]),W=v.useCallback(async()=>{const te=h.progressState.orphanedFiles;if(!(!te||te.length===0))try{const N=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:te})});if(N.ok)w(L=>({...L,orphanedFiles:void 0,message:L.message?.replace(/Found \d+ orphaned thumbnail\(s\).*/,"Orphaned thumbnails deleted.")})),i();else{const L=await N.json();d("Delete Failed",L.error||"Failed to delete orphaned files")}}catch(N){console.error("Delete orphans error:",N),d("Delete Failed","Failed to delete orphaned files. Check console for details.")}},[h.progressState.orphanedFiles,i,d,w]);return{actionState:h,setActionState:m,requestDelete:A,requestMove:k,requestSync:B,requestDownload:Y,requestProcess:U,setProcessMode:G,cancelAction:oe,closeProgress:K,stopProcessing:ce,confirmDelete:ie,confirmMove:he,confirmSync:V,confirmProcess:I,deleteOrphans:W}}const m2="36px",g2=ln`
93
+ to { transform: rotate(360deg); }
94
+ `,He={container:{name:"xt6tct",styles:"flex:1;display:flex;flex-direction:column;overflow:hidden"},toolbar:y("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",u.surface,";border-bottom:1px solid ",u.border,";@media (min-width: 768px){padding:12px 24px;}",""),toolbarLeft:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},toolbarRight:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},btn:y("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",m2,";padding:0 14px;border-radius:6px;font-size:",Q.base,";font-weight:500;background:",u.surface,";border:1px solid ",u.border,";cursor:pointer;transition:all 0.15s ease;color:",u.text,";&:hover:not(:disabled){background-color:",u.surfaceHover,";border-color:",u.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:y("background:",u.primary,";border-color:",u.primary,";color:white;&:hover:not(:disabled){background:",u.primaryHover,";border-color:",u.primaryHover,";}",""),btnDanger:y("background:",u.danger,";border-color:",u.danger,";color:white;&:hover:not(:disabled){background:",u.dangerHover,";border-color:",u.dangerHover,";}",""),btnIcon:{name:"157xhr7",styles:"width:16px;height:16px"},content:{name:"1tznmxd",styles:"flex:1;overflow:auto;padding:20px 24px"},loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:y("width:32px;height:32px;border-radius:50%;border:3px solid ",u.border,";border-top-color:",u.primary,";animation:",g2," 0.8s linear infinite;",""),empty:y("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",u.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:y("font-size:",Q.base,";margin:0 0 4px 0;&:last-child{color:",u.textMuted,";font-size:",Q.sm,";}",""),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:y("position:relative;border-radius:8px;border:1px solid ",u.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",u.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:y("border-color:",u.primary,";box-shadow:0 0 0 1px ",u.primary,";",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:y("width:18px;height:18px;accent-color:",u.primary,";cursor:pointer;",""),itemContent:y("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",u.background,";",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},parentIcon:y("width:56px;height:56px;color:",u.textMuted,";",""),fileIcon:y("width:40px;height:40px;color:",u.textMuted,";",""),openBtn:y("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",Q.sm,";font-weight:500;color:",u.primary,";background:",u.surface,";border:1px solid ",u.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:",u.primaryLight,";border-color:",u.primary,";}",""),label:y("padding:10px 12px;background-color:",u.surface,";border-top:1px solid ",u.borderLight,";",""),labelName:y("font-size:",Q.sm,";font-weight:500;color:",u.text,";margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),labelMeta:y("font-size:",Q.xs,";color:",u.textMuted,";margin:2px 0 0 0;",""),dropOverlay:y("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",u.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:y("display:flex;flex-direction:column;align-items:center;gap:12px;color:",u.primary,";font-size:",Q.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"},createBtn:y("margin-top:16px;padding:10px 24px;font-size:",Q.base,";font-weight:500;background:",u.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover{background:",u.primaryHover,";}","")};function y2(i){return i<1024?i+" B":i<1024*1024?(i/1024).toFixed(1)+" KB":(i/(1024*1024)).toFixed(1)+" MB"}function b2({currentPath:i,setCurrentPath:s,refreshKey:f,triggerRefresh:d}){const[h,m]=v.useState([]),[w,D]=v.useState(!0),[C,g]=v.useState(new Set),[A,k]=v.useState(!1),[B,Y]=v.useState(!1),U=v.useCallback(async()=>{try{D(!0);const L=await fetch(`/api/studio/fonts/list?path=${encodeURIComponent(i)}`);if(L.ok){const ee=await L.json();m(ee.items||[]),k(ee.canCreate===!0)}}catch(L){console.error("Failed to fetch fonts:",L),m([])}finally{D(!1)}},[i]);v.useEffect(()=>{U(),g(new Set)},[U,f]);const G=i==="_fonts";i==="src"||i.startsWith("src/");const oe=v.useCallback((L,ee)=>{ee.stopPropagation(),g(ae=>{const ue=new Set(ae);return ue.has(L.path)?ue.delete(L.path):ue.add(L.path),ue})},[]),K=v.useCallback(L=>{L.type==="folder"&&(s(L.path),g(new Set))},[s]),ce=v.useCallback(()=>{const L=i.split("/");L.pop();const ee=L.join("/")||"_fonts";s(ee),g(new Set)},[i,s]),ie=v.useCallback(async()=>{if(!(C.size===0||!window.confirm(`Delete ${C.size} item(s)?`)))try{(await fetch("/api/studio/fonts/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:Array.from(C)})})).ok&&(g(new Set),d())}catch(ee){console.error("Delete failed:",ee)}},[C,d]),he=v.useCallback(async()=>{const L=window.prompt("Folder name:");if(L)try{(await fetch("/api/studio/fonts/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:i,name:L})})).ok&&d()}catch(ee){console.error("Create folder failed:",ee)}},[i,d]),V=v.useCallback(L=>{L.preventDefault(),L.stopPropagation(),i.startsWith("_fonts")&&Y(!0)},[i]),I=v.useCallback(L=>{L.preventDefault(),L.stopPropagation(),Y(!1)},[]),W=v.useCallback(async L=>{if(L.preventDefault(),L.stopPropagation(),Y(!1),!i.startsWith("_fonts"))return;const ee=Array.from(L.dataTransfer.files).filter(ae=>ae.name.toLowerCase().endsWith(".ttf"));if(ee.length!==0){for(const ae of ee){const ue=new FormData;ue.append("file",ae),ue.append("path",i);try{await fetch("/api/studio/fonts/upload",{method:"POST",body:ue})}catch(ne){console.error("Upload failed:",ne)}}d()}},[i,d]),te=v.useCallback(L=>{L&&L.addEventListener("change",async ee=>{const ae=ee.target.files;if(!(!ae||ae.length===0)){for(const ue of Array.from(ae)){if(!ue.name.toLowerCase().endsWith(".ttf"))continue;const ne=new FormData;ne.append("file",ue),ne.append("path",i);try{await fetch("/api/studio/fonts/upload",{method:"POST",body:ne})}catch(_e){console.error("Upload failed:",_e)}}d(),L.value=""}})},[i,d]);if(w)return b("div",{css:He.container,children:[r("div",{css:He.toolbar}),r("div",{css:He.loading,children:r("div",{css:He.spinner})})]});const N=i.startsWith("_fonts");return b("div",{css:He.container,children:[b("div",{css:He.toolbar,children:[b("div",{css:He.toolbarLeft,children:[N&&b(tt,{children:[b("button",{css:[He.btn,He.btnPrimary,"",""],onClick:()=>document.getElementById("font-file-input")?.click(),children:[r(v2,{}),"Add New"]}),r("input",{id:"font-file-input",type:"file",accept:".ttf",multiple:!0,style:{display:"none"},ref:te})]}),b("button",{css:He.btn,onClick:he,children:[r(x2,{}),"New Folder"]}),C.size>0&&b("button",{css:[He.btn,He.btnDanger,"",""],onClick:ie,children:[r(S2,{}),"Delete (",C.size,")"]})]}),r("div",{css:He.toolbarRight,children:b("span",{style:{color:u.textSecondary,fontSize:Q.sm},children:[h.length," item",h.length!==1?"s":""]})})]}),b("div",{css:He.content,onDragOver:V,onDragLeave:I,onDrop:W,style:{position:"relative"},children:[B&&r("div",{css:He.dropOverlay,children:b("div",{css:He.dropMessage,children:[r(C2,{}),r("span",{children:"Drop TTF files to upload"})]})}),h.length===0&&!A?b("div",{css:He.empty,children:[r(lu,{css:He.emptyIcon}),r("p",{css:He.emptyText,children:"No files yet"}),r("p",{css:He.emptyText,children:N?'Drop TTF files here or click "Add New"':"This folder is empty"})]}):h.length===0&&A?b("div",{css:He.empty,children:[r(lu,{css:He.emptyIcon}),r("p",{css:He.emptyText,children:"Folder doesn't exist"}),r("button",{css:He.createBtn,onClick:he,children:"Create Folder"})]}):b("div",{css:He.grid,children:[!G&&b("div",{css:He.item,onClick:ce,onDoubleClick:ce,children:[r("div",{css:He.itemContent,children:r(w2,{})}),b("div",{css:He.label,children:[r("p",{css:He.labelName,children:".."}),r("p",{css:He.labelMeta,children:"Parent folder"})]})]}),h.map(L=>{const ee=C.has(L.path);return b("div",{css:[He.item,ee&&He.itemSelected,"",""],onClick:ae=>oe(L,ae),onDoubleClick:()=>K(L),children:[r("div",{css:He.checkboxWrapper,onClick:ae=>{ae.stopPropagation(),oe(L,ae)},children:r("input",{type:"checkbox",css:He.checkbox,checked:ee,onChange:()=>{}})}),b("div",{css:He.itemContent,children:[r("button",{css:He.openBtn,onClick:ae=>{ae.stopPropagation(),K(L)},children:"Open"}),L.type==="folder"?r(lu,{}):r(z2,{})]}),b("div",{css:He.label,children:[r("p",{css:He.labelName,children:L.name}),r("p",{css:He.labelMeta,children:L.type==="folder"?`${L.fileCount||0} files`:L.size?y2(L.size):""})]})]},L.path)})]})]})]})}function v2(){return r("svg",{css:He.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}function x2(){return r("svg",{css:He.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 S2(){return r("svg",{css:He.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 C2(){return r("svg",{css:He.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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 lu(){return r("svg",{css:He.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("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"})})}function w2(){return r("svg",{css:He.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}function z2(){return r("svg",{css:He.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})})}const k2="36px",bt={container:y(oo," display:flex;flex-direction:column;height:100%;background:",u.background,";",""),header:y("display:flex;align-items:center;justify-content:space-between;padding:12px 24px;background:",u.surface,";border-bottom:1px solid ",u.border,";position:relative;",""),titleDropdown:{name:"bjn8wh",styles:"position:relative"},titleButton:y("display:flex;align-items:center;gap:6px;font-size:19px!important;font-weight:600;color:",u.text,";background:transparent;border:none;padding:4px 8px;margin:-4px -8px;border-radius:6px;cursor:pointer;letter-spacing:-0.02em;transition:background 0.15s ease;&:hover{background:",u.surfaceHover,";}",""),titleChevron:y("width:18px;height:18px;color:",u.textSecondary,";transition:transform 0.15s ease;margin-top:2px;stroke-width:2.5;",""),titleChevronOpen:{name:"21xn5r",styles:"transform:rotate(180deg)"},dropdownMenu:y("position:absolute;top:calc(100% + 8px);left:0;background:",u.surface,";border:1px solid ",u.border,";border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);min-width:180px;padding:4px;z-index:100;",""),dropdownItem:y("display:block;width:100%;padding:10px 12px;background:transparent;border:none;border-radius:6px;font-size:19px!important;font-weight:600;letter-spacing:-0.02em;color:",u.text,";cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover{background:",u.surfaceHover,";}",""),dropdownItemActive:y("color:",u.primary,";&:hover{background:rgba(99, 91, 255, 0.1);color:",u.primaryHover,";}",""),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:y("display:flex;align-items:center;gap:6px;font-size:",Q.base,";color:",u.textSecondary,";overflow:hidden;",""),breadcrumbSeparator:y("color:",u.border,";flex-shrink:0;",""),breadcrumbItem:y("color:",u.textSecondary,";text-decoration:none;cursor:pointer;transition:color 0.15s ease;white-space:nowrap;&:hover{color:",u.primary,";}",""),breadcrumbCurrent:y("color:",u.text,";font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),headerIconBtn:y("display:flex;align-items:center;justify-content:center;width:32px;height:32px;color:",u.textMuted,";background:transparent;border:none;border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{color:",u.text,";background:",u.surface,";}",""),headerActions:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},headerBtn:y("height:",k2,";padding:0 12px;background:",u.surface,";border:1px solid ",u.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",u.surfaceHover,";border-color:",u.borderHover,";}",""),headerIcon:y("width:16px;height:16px;color:",u.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:y("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",u.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:y("display:flex;flex-direction:column;align-items:center;gap:12px;color:",u.primary,";font-size:",Q.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"}};function M2({onClose:i,isVisible:s=!0,standaloneMode:f=!1,workspacePath:d,siteUrl:h}){const m=i||(()=>{}),[w,D]=v.useState("public"),[C,g]=v.useState(new Set),[A,k]=v.useState(null),[B,Y]=v.useState("grid"),[U,G]=v.useState(null),[oe,K]=v.useState(null),[ce,ie]=v.useState(!1),[he,V]=v.useState(0),[I,W]=v.useState(!1),[te,N]=v.useState(""),[L,ee]=v.useState(null),[ae,ue]=v.useState([]),[ne,_e]=v.useState(!1),[E,J]=v.useState(()=>typeof window<"u"&&window.location.hash.slice(1)==="fonts"?"fonts":"media"),[$,Me]=v.useState(!1),Ye=v.useRef(null);v.useEffect(()=>{const Z=()=>{const de=window.location.hash.slice(1);J(de==="fonts"?"fonts":"media")};return window.addEventListener("hashchange",Z),()=>window.removeEventListener("hashchange",Z)},[]);const[S,H]=v.useState("_fonts"),[P,se]=v.useState(0),Se=v.useCallback(()=>{V(Z=>Z+1)},[]),[De,Ge]=v.useState(null),vt=v.useCallback(Z=>{Ge({path:Z,key:Date.now()})},[]);v.useEffect(()=>{if(U&&ae.length>0){const Z=ae.find(de=>de.path===U.path);Z&&JSON.stringify(Z)!==JSON.stringify(U)&&G(Z)}},[ae,U]);const Oe=v.useCallback(()=>{W(!0)},[]),en=v.useCallback(()=>{W(!1)},[]),Je=v.useCallback((Z,de)=>{ee({title:Z,message:de})},[]),ct=v.useCallback(()=>{ee(null)},[]),pt=v.useCallback(Z=>{Z.preventDefault(),Z.stopPropagation(),_e(!0)},[]),jt=v.useCallback(Z=>{Z.preventDefault(),Z.stopPropagation(),_e(!1)},[]),qt=v.useCallback(async Z=>{Z.preventDefault(),Z.stopPropagation(),_e(!1);const de=Array.from(Z.dataTransfer.files);if(de.length!==0&&!(w==="public/images"||w.startsWith("public/images/"))){for(const je of de){const Ie=new FormData;Ie.append("file",je),Ie.append("path",w);try{await fetch("/api/studio/upload",{method:"POST",body:Ie})}catch(Ue){console.error("Upload error:",Ue)}}Se()}},[w,Se]),tn=v.useCallback(()=>{if(w==="public")return;const Z=w.split("/");Z.pop(),D(Z.join("/")||"public"),g(new Set)},[w]),Vt=v.useCallback(Z=>{D(Z),g(new Set),G(null)},[]),hn=v.useCallback(Z=>{g(de=>{const je=new Set(de);return je.has(Z)?je.delete(Z):je.add(Z),je}),k(Z)},[]),Wt=v.useCallback((Z,de,je)=>{const Ie=je.findIndex(mt=>mt.path===Z),Ue=je.findIndex(mt=>mt.path===de);if(Ie===-1||Ue===-1)return;const ze=Math.min(Ie,Ue),xt=Math.max(Ie,Ue);g(mt=>{const pl=new Set(mt);for(let Qa=ze;Qa<=xt;Qa++)pl.add(je[Qa].path);return pl}),k(de)},[]),ut=v.useCallback(Z=>{g(new Set(Z.map(de=>de.path)))},[]),Gt=v.useCallback(()=>{g(new Set)},[]),wt=v.useCallback(Z=>{G(Z)},[]),Ee=p2({triggerRefresh:Se,clearSelection:Gt,setFocusedItem:wt,showError:Je}),Dt=v.useCallback(Z=>{if(Z.key==="Escape"){const de=Z.target;if(de.tagName==="INPUT"||de.tagName==="TEXTAREA")return;U?G(null):f||m()}},[m,U,f]);v.useEffect(()=>(s&&(document.addEventListener("keydown",Dt),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",Dt),document.body.style.overflow=""}),[Dt,s]),v.useEffect(()=>{const Z=de=>{Ye.current&&!Ye.current.contains(de.target)&&Me(!1)};return $&&document.addEventListener("mousedown",Z),()=>{document.removeEventListener("mousedown",Z)}},[$]);const wn=v.useCallback(()=>{Me(Z=>!Z)},[]),Yn=v.useCallback(Z=>{J(Z),Me(!1),window.location.hash=Z==="media"?"":Z},[]),Hn=v.useCallback(()=>{se(Z=>Z+1)},[]),zn={isOpen:!0,openStudio:()=>{},closeStudio:m,toggleStudio:m,currentPath:w,setCurrentPath:Vt,navigateUp:tn,selectedItems:C,toggleSelection:hn,selectRange:Wt,selectAll:ut,clearSelection:Gt,lastSelectedPath:A,viewMode:B,setViewMode:Y,focusedItem:U,setFocusedItem:G,meta:oe,setMeta:K,isLoading:ce,setIsLoading:ie,refreshKey:he,triggerRefresh:Se,editedImageKey:De,setEditedImageKey:vt,scanRequested:I,triggerScan:Oe,clearScanRequest:en,searchQuery:te,setSearchQuery:N,error:L,showError:Je,clearError:ct,fileItems:ae,setFileItems:ue,actionState:Ee.actionState,requestDelete:Ee.requestDelete,requestMove:Ee.requestMove,requestSync:Ee.requestSync,requestDownload:Ee.requestDownload,requestProcess:Ee.requestProcess,setProcessMode:Ee.setProcessMode,confirmDelete:Ee.confirmDelete,confirmMove:Ee.confirmMove,confirmSync:Ee.confirmSync,confirmProcess:Ee.confirmProcess,cancelAction:Ee.cancelAction,closeProgress:Ee.closeProgress,stopProcessing:Ee.stopProcessing,deleteOrphans:Ee.deleteOrphans};return r(Np.Provider,{value:zn,children:b("div",{css:bt.container,children:[b("div",{css:bt.header,children:[r("div",{css:bt.headerLeft,children:b("div",{css:bt.titleDropdown,ref:Ye,children:[b("button",{css:bt.titleButton,onClick:wn,children:[r("span",{children:"gallop.studio"}),r(L2,{isOpen:$})]}),$&&b("div",{css:bt.dropdownMenu,children:[r("button",{css:[bt.dropdownItem,E==="media"&&bt.dropdownItemActive,"",""],onClick:()=>Yn("media"),children:"media & files"}),r("button",{css:[bt.dropdownItem,E==="fonts"&&bt.dropdownItemActive,"",""],onClick:()=>Yn("fonts"),children:"fonts"})]})]})}),r("div",{css:bt.headerCenter,children:r(A2,{currentPath:w,onNavigate:Vt,projectName:d?d.split("/").pop():void 0})}),b("div",{css:bt.headerActions,children:[h&&r("a",{href:h,target:"_blank",rel:"noopener noreferrer",css:bt.headerIconBtn,title:`Open ${h}`,children:r(R2,{})}),!f&&r("button",{css:bt.headerBtn,onClick:m,"aria-label":"Close Studio",children:r(_2,{})})]})]}),E==="media"?b(tt,{children:[r(C1,{}),b("div",{css:bt.content,onDragOver:pt,onDragLeave:jt,onDrop:qt,children:[ne&&r("div",{css:bt.dropOverlay,children:b("div",{css:bt.dropMessage,children:[r("svg",{css:bt.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("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"})}),r("span",{children:"Drop files to upload"})]})}),r("div",{css:bt.fileBrowser,children:B==="grid"?r(X1,{}):r(F1,{})})]}),U&&r(d2,{}),r(h2,{}),Ee.actionState.showDeleteConfirm&&r(li,{title:"Delete Files",message:`Are you sure you want to delete ${Ee.actionState.actionPaths.length} item${Ee.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Ee.confirmDelete,onCancel:Ee.cancelAction}),Ee.actionState.showSyncConfirm&&r(li,{title:"Push to CDN",message:`Push ${Ee.actionState.syncImageCount} image${Ee.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${Ee.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${Ee.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:Ee.confirmSync,onCancel:Ee.cancelAction}),Ee.actionState.showProcessConfirm&&r(T2,{imageCount:Ee.actionState.actionPaths.length,mode:Ee.actionState.processMode,onConfirm:Ee.confirmProcess,onCancel:Ee.cancelAction}),Ee.actionState.showMoveModal&&r(qp,{selectedItems:new Set(Ee.actionState.actionPaths),currentPath:w,onMove:Z=>Ee.confirmMove(Z),onCancel:Ee.cancelAction}),Ee.actionState.showProgress&&r(hl,{title:Ee.actionState.progressTitle,progress:Ee.actionState.progressState,onStop:Ee.stopProcessing,onDeleteOrphans:Ee.deleteOrphans,onClose:Ee.closeProgress})]}):r(b2,{currentPath:S,setCurrentPath:H,refreshKey:P,triggerRefresh:Hn})]})})}var D2={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},E2={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 T2({imageCount:i,mode:s,onConfirm:f,onCancel:d}){const h={overlay:E2,container:y("background:",u.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:y("font-size:",Q.lg,";font-weight:600;color:",u.text,";margin:0 0 16px;",""),message:y("font-size:",Q.base,";color:",u.textSecondary,";margin:0 0 20px;line-height:1.5;",""),actions:D2,cancelBtn:y("padding:10px 20px;border:1px solid ",u.border,";border-radius:8px;background:",u.background,";color:",u.text,";font-size:",Q.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",u.surfaceHover,";border-color:",u.borderHover,";}",""),confirmBtn:y("padding:10px 20px;border:none;border-radius:8px;background:",u.primary,";color:white;font-size:",Q.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",u.primaryHover,";}",""),confirmBtnDanger:y("background:",u.danger,";&:hover{background:#dc2626;}","")},m=s==="remove",w=m?"Remove Thumbnails":"Generate Thumbnails",D=m?`Remove generated thumbnails for ${i} image${i!==1?"s":""}? Original images will be kept.`:`Generate thumbnails for ${i} image${i!==1?"s":""}?`,C=m?"Remove":"Generate";return r("div",{css:h.overlay,onClick:d,children:b("div",{css:h.container,onClick:g=>g.stopPropagation(),children:[r("h2",{css:h.title,children:w}),r("p",{css:h.message,children:D}),b("div",{css:h.actions,children:[r("button",{css:h.cancelBtn,onClick:d,children:"Cancel"}),r("button",{css:[h.confirmBtn,m&&h.confirmBtnDanger,"",""],onClick:f,children:C})]})]})})}function A2({currentPath:i,onNavigate:s,projectName:f}){const d=i.split("/").filter(Boolean),h=d.map((m,w)=>({name:w===0&&m==="public"&&f?f:m,path:d.slice(0,w+1).join("/")}));return r("div",{css:bt.breadcrumbs,children:h.map((m,w)=>b("span",{style:{display:"flex",alignItems:"center",gap:6},children:[w>0&&r("span",{css:bt.breadcrumbSeparator,children:"/"}),w===h.length-1?r("span",{css:bt.breadcrumbCurrent,children:m.name}):r("span",{css:bt.breadcrumbItem,onClick:()=>s(m.path),children:m.name})]},m.path))})}function R2(){return b("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("circle",{cx:"12",cy:"12",r:"10"}),r("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),r("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 _2(){return b("svg",{css:bt.headerIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function L2({isOpen:i}){return r("svg",{css:[bt.titleChevron,i&&bt.titleChevronOpen,"",""],viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:r("polyline",{points:"6 9 12 15 18 9"})})}const Vp=document.getElementById("root");if(!Vp)throw new Error("Root element not found");const O2=window.__STUDIO_WORKSPACE__||"Unknown",H2=window.__STUDIO_SITE_URL__||"";l1.createRoot(Vp).render(r(v.StrictMode,{children:r("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:r(M2,{isVisible:!0,standaloneMode:!0,workspacePath:O2,siteUrl:H2})})}));