@gallop.software/studio 2.3.173 → 2.4.1

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,136 @@
1
+ function rm(i,c){for(var f=0;f<c.length;f++){const d=c[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 c=document.createElement("link").relList;if(c&&c.supports&&c.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 x of m.addedNodes)x.tagName==="LINK"&&x.rel==="modulepreload"&&d(x)}).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 sm(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Ic={exports:{}},hi={};var op;function cm(){if(op)return hi;op=1;var i=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function f(d,h,m){var x=null;if(m!==void 0&&(x=""+m),h.key!==void 0&&(x=""+h.key),"key"in h){m={};for(var M in h)M!=="key"&&(m[M]=h[M])}else m=h;return h=m.ref,{$$typeof:i,type:d,key:x,ref:h!==void 0?h:null,props:m}}return hi.Fragment=c,hi.jsx=f,hi.jsxs=f,hi}var ip;function um(){return ip||(ip=1,Ic.exports=cm()),Ic.exports}var bi=um(),Pc={exports:{}},Ve={};var rp;function dm(){if(rp)return Ve;rp=1;var i=Symbol.for("react.transitional.element"),c=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"),x=Symbol.for("react.context"),M=Symbol.for("react.forward_ref"),S=Symbol.for("react.suspense"),b=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),R=Symbol.iterator;function Y(w){return w===null||typeof w!="object"?null:(w=R&&w[R]||w["@@iterator"],typeof w=="function"?w:null)}var U={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},X=Object.assign,W={};function V(w,H,ne){this.props=w,this.context=H,this.refs=W,this.updater=ne||U}V.prototype.isReactComponent={},V.prototype.setState=function(w,H){if(typeof w!="object"&&typeof w!="function"&&w!=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,w,H,"setState")},V.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};function ae(){}ae.prototype=V.prototype;function le(w,H,ne){this.props=w,this.context=H,this.refs=W,this.updater=ne||U}var he=le.prototype=new ae;he.constructor=le,X(he,V.prototype),he.isPureReactComponent=!0;var F=Array.isArray;function te(){}var P={H:null,A:null,T:null,S:null},oe=Object.prototype.hasOwnProperty;function B(w,H,ne){var ie=ne.ref;return{$$typeof:i,type:w,key:H,ref:ie!==void 0?ie:null,props:ne}}function q(w,H){return B(w.type,H,w.props)}function se(w){return typeof w=="object"&&w!==null&&w.$$typeof===i}function pe(w){var H={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(ne){return H[ne]})}var fe=/\/+/g;function re(w,H){return typeof w=="object"&&w!==null&&w.key!=null?pe(""+w.key):H.toString(36)}function Ae(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(te,te):(w.status="pending",w.then(function(H){w.status==="pending"&&(w.status="fulfilled",w.value=H)},function(H){w.status==="pending"&&(w.status="rejected",w.reason=H)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function A(w,H,ne,ie,Me){var Le=typeof w;(Le==="undefined"||Le==="boolean")&&(w=null);var Xe=!1;if(w===null)Xe=!0;else switch(Le){case"bigint":case"string":case"number":Xe=!0;break;case"object":switch(w.$$typeof){case i:case c:Xe=!0;break;case T:return Xe=w._init,A(Xe(w._payload),H,ne,ie,Me)}}if(Xe)return Me=Me(w),Xe=ie===""?"."+re(w,0):ie,F(Me)?(ne="",Xe!=null&&(ne=Xe.replace(fe,"$&/")+"/"),A(Me,H,ne,"",function(Yt){return Yt})):Me!=null&&(se(Me)&&(Me=q(Me,ne+(Me.key==null||w&&w.key===Me.key?"":(""+Me.key).replace(fe,"$&/")+"/")+Xe)),H.push(Me)),1;Xe=0;var pt=ie===""?".":ie+":";if(F(w))for(var je=0;je<w.length;je++)ie=w[je],Le=pt+re(ie,je),Xe+=A(ie,H,ne,Le,Me);else if(je=Y(w),typeof je=="function")for(w=je.call(w),je=0;!(ie=w.next()).done;)ie=ie.value,Le=pt+re(ie,je++),Xe+=A(ie,H,ne,Le,Me);else if(Le==="object"){if(typeof w.then=="function")return A(Ae(w),H,ne,ie,Me);throw H=String(w),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return Xe}function J(w,H,ne){if(w==null)return w;var ie=[],Me=0;return A(w,ie,"","",function(Le){return H.call(ne,Le,Me++)}),ie}function ee(w){if(w._status===-1){var H=w._result;H=H(),H.then(function(ne){(w._status===0||w._status===-1)&&(w._status=1,w._result=ne)},function(ne){(w._status===0||w._status===-1)&&(w._status=2,w._result=ne)}),w._status===-1&&(w._status=0,w._result=H)}if(w._status===1)return w._result.default;throw w._result}var Te=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof w=="object"&&w!==null&&typeof w.message=="string"?String(w.message):String(w),error:w});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)},Fe={map:J,forEach:function(w,H,ne){J(w,function(){H.apply(this,arguments)},ne)},count:function(w){var H=0;return J(w,function(){H++}),H},toArray:function(w){return J(w,function(H){return H})||[]},only:function(w){if(!se(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};return Ve.Activity=z,Ve.Children=Fe,Ve.Component=V,Ve.Fragment=f,Ve.Profiler=h,Ve.PureComponent=le,Ve.StrictMode=d,Ve.Suspense=S,Ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,Ve.__COMPILER_RUNTIME={__proto__:null,c:function(w){return P.H.useMemoCache(w)}},Ve.cache=function(w){return function(){return w.apply(null,arguments)}},Ve.cacheSignal=function(){return null},Ve.cloneElement=function(w,H,ne){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var ie=X({},w.props),Me=w.key;if(H!=null)for(Le in H.key!==void 0&&(Me=""+H.key),H)!oe.call(H,Le)||Le==="key"||Le==="__self"||Le==="__source"||Le==="ref"&&H.ref===void 0||(ie[Le]=H[Le]);var Le=arguments.length-2;if(Le===1)ie.children=ne;else if(1<Le){for(var Xe=Array(Le),pt=0;pt<Le;pt++)Xe[pt]=arguments[pt+2];ie.children=Xe}return B(w.type,Me,ie)},Ve.createContext=function(w){return w={$$typeof:x,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:m,_context:w},w},Ve.createElement=function(w,H,ne){var ie,Me={},Le=null;if(H!=null)for(ie in H.key!==void 0&&(Le=""+H.key),H)oe.call(H,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(Me[ie]=H[ie]);var Xe=arguments.length-2;if(Xe===1)Me.children=ne;else if(1<Xe){for(var pt=Array(Xe),je=0;je<Xe;je++)pt[je]=arguments[je+2];Me.children=pt}if(w&&w.defaultProps)for(ie in Xe=w.defaultProps,Xe)Me[ie]===void 0&&(Me[ie]=Xe[ie]);return B(w,Le,Me)},Ve.createRef=function(){return{current:null}},Ve.forwardRef=function(w){return{$$typeof:M,render:w}},Ve.isValidElement=se,Ve.lazy=function(w){return{$$typeof:T,_payload:{_status:-1,_result:w},_init:ee}},Ve.memo=function(w,H){return{$$typeof:b,type:w,compare:H===void 0?null:H}},Ve.startTransition=function(w){var H=P.T,ne={};P.T=ne;try{var ie=w(),Me=P.S;Me!==null&&Me(ne,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(te,Te)}catch(Le){Te(Le)}finally{H!==null&&ne.types!==null&&(H.types=ne.types),P.T=H}},Ve.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},Ve.use=function(w){return P.H.use(w)},Ve.useActionState=function(w,H,ne){return P.H.useActionState(w,H,ne)},Ve.useCallback=function(w,H){return P.H.useCallback(w,H)},Ve.useContext=function(w){return P.H.useContext(w)},Ve.useDebugValue=function(){},Ve.useDeferredValue=function(w,H){return P.H.useDeferredValue(w,H)},Ve.useEffect=function(w,H){return P.H.useEffect(w,H)},Ve.useEffectEvent=function(w){return P.H.useEffectEvent(w)},Ve.useId=function(){return P.H.useId()},Ve.useImperativeHandle=function(w,H,ne){return P.H.useImperativeHandle(w,H,ne)},Ve.useInsertionEffect=function(w,H){return P.H.useInsertionEffect(w,H)},Ve.useLayoutEffect=function(w,H){return P.H.useLayoutEffect(w,H)},Ve.useMemo=function(w,H){return P.H.useMemo(w,H)},Ve.useOptimistic=function(w,H){return P.H.useOptimistic(w,H)},Ve.useReducer=function(w,H,ne){return P.H.useReducer(w,H,ne)},Ve.useRef=function(w){return P.H.useRef(w)},Ve.useState=function(w){return P.H.useState(w)},Ve.useSyncExternalStore=function(w,H,ne){return P.H.useSyncExternalStore(w,H,ne)},Ve.useTransition=function(){return P.H.useTransition()},Ve.version="19.2.4",Ve}var sp;function fu(){return sp||(sp=1,Pc.exports=dm()),Pc.exports}var v=fu();const bt=sm(v),cp=rm({__proto__:null,default:bt},[v]);function fm(i){if(i.sheet)return i.sheet;for(var c=0;c<document.styleSheets.length;c++)if(document.styleSheets[c].ownerNode===i)return document.styleSheets[c]}function hm(i){var c=document.createElement("style");return c.setAttribute("data-emotion",i.key),i.nonce!==void 0&&c.setAttribute("nonce",i.nonce),c.appendChild(document.createTextNode("")),c.setAttribute("data-s",""),c}var pm=(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 c=i.prototype;return c.hydrate=function(d){d.forEach(this._insertTag)},c.insert=function(d){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(hm(this));var h=this.tags[this.tags.length-1];if(this.isSpeedy){var m=fm(h);try{m.insertRule(d,m.cssRules.length)}catch{}}else h.appendChild(document.createTextNode(d));this.ctr++},c.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})(),hn="-ms-",Nr="-moz-",ft="-webkit-",Hp="comm",hu="rule",pu="decl",gm="@import",Up="@keyframes",mm="@layer",bm=Math.abs,Yr=String.fromCharCode,ym=Object.assign;function vm(i,c){return un(i,0)^45?(((c<<2^un(i,0))<<2^un(i,1))<<2^un(i,2))<<2^un(i,3):0}function jp(i){return i.trim()}function xm(i,c){return(i=c.exec(i))?i[0]:i}function ht(i,c,f){return i.replace(c,f)}function cu(i,c){return i.indexOf(c)}function un(i,c){return i.charCodeAt(c)|0}function yi(i,c,f){return i.slice(c,f)}function la(i){return i.length}function gu(i){return i.length}function Br(i,c){return c.push(i),i}function Sm(i,c){return i.map(c).join("")}var Gr=1,yo=1,Np=0,zn=0,It=0,xo="";function Xr(i,c,f,d,h,m,x){return{value:i,root:c,parent:f,type:d,props:h,children:m,line:Gr,column:yo,length:x,return:""}}function pi(i,c){return ym(Xr("",null,null,"",null,null,0),i,{length:-i.length},c)}function wm(){return It}function Cm(){return It=zn>0?un(xo,--zn):0,yo--,It===10&&(yo=1,Gr--),It}function Hn(){return It=zn<Np?un(xo,zn++):0,yo++,It===10&&(yo=1,Gr++),It}function ia(){return un(xo,zn)}function Hr(){return zn}function Si(i,c){return yi(xo,i,c)}function vi(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 qp(i){return Gr=yo=1,Np=la(xo=i),zn=0,[]}function Yp(i){return xo="",i}function Ur(i){return jp(Si(zn-1,uu(i===91?i+2:i===40?i+1:i)))}function km(i){for(;(It=ia())&&It<33;)Hn();return vi(i)>2||vi(It)>3?"":" "}function zm(i,c){for(;--c&&Hn()&&!(It<48||It>102||It>57&&It<65||It>70&&It<97););return Si(i,Hr()+(c<6&&ia()==32&&Hn()==32))}function uu(i){for(;Hn();)switch(It){case i:return zn;case 34:case 39:i!==34&&i!==39&&uu(It);break;case 40:i===41&&uu(i);break;case 92:Hn();break}return zn}function Mm(i,c){for(;Hn()&&i+It!==57;)if(i+It===84&&ia()===47)break;return"/*"+Si(c,zn-1)+"*"+Yr(i===47?i:Hn())}function Dm(i){for(;!vi(ia());)Hn();return Si(i,zn)}function Am(i){return Yp(jr("",null,null,null,[""],i=qp(i),0,[0],i))}function jr(i,c,f,d,h,m,x,M,S){for(var b=0,T=0,z=x,R=0,Y=0,U=0,X=1,W=1,V=1,ae=0,le="",he=h,F=m,te=d,P=le;W;)switch(U=ae,ae=Hn()){case 40:if(U!=108&&un(P,z-1)==58){cu(P+=ht(Ur(ae),"&","&\f"),"&\f")!=-1&&(V=-1);break}case 34:case 39:case 91:P+=Ur(ae);break;case 9:case 10:case 13:case 32:P+=km(U);break;case 92:P+=zm(Hr()-1,7);continue;case 47:switch(ia()){case 42:case 47:Br(Tm(Mm(Hn(),Hr()),c,f),S);break;default:P+="/"}break;case 123*X:M[b++]=la(P)*V;case 125*X:case 59:case 0:switch(ae){case 0:case 125:W=0;case 59+T:V==-1&&(P=ht(P,/\f/g,"")),Y>0&&la(P)-z&&Br(Y>32?dp(P+";",d,f,z-1):dp(ht(P," ","")+";",d,f,z-2),S);break;case 59:P+=";";default:if(Br(te=up(P,c,f,b,T,h,M,le,he=[],F=[],z),m),ae===123)if(T===0)jr(P,c,te,te,he,m,z,M,F);else switch(R===99&&un(P,3)===110?100:R){case 100:case 108:case 109:case 115:jr(i,te,te,d&&Br(up(i,te,te,0,0,h,M,le,h,he=[],z),F),h,F,z,M,d?he:F);break;default:jr(P,te,te,te,[""],F,0,M,F)}}b=T=Y=0,X=V=1,le=P="",z=x;break;case 58:z=1+la(P),Y=U;default:if(X<1){if(ae==123)--X;else if(ae==125&&X++==0&&Cm()==125)continue}switch(P+=Yr(ae),ae*X){case 38:V=T>0?1:(P+="\f",-1);break;case 44:M[b++]=(la(P)-1)*V,V=1;break;case 64:ia()===45&&(P+=Ur(Hn())),R=ia(),T=z=la(le=P+=Dm(Hr())),ae++;break;case 45:U===45&&la(P)==2&&(X=0)}}return m}function up(i,c,f,d,h,m,x,M,S,b,T){for(var z=h-1,R=h===0?m:[""],Y=gu(R),U=0,X=0,W=0;U<d;++U)for(var V=0,ae=yi(i,z+1,z=bm(X=x[U])),le=i;V<Y;++V)(le=jp(X>0?R[V]+" "+ae:ht(ae,/&\f/g,R[V])))&&(S[W++]=le);return Xr(i,c,f,h===0?hu:M,S,b,T)}function Tm(i,c,f){return Xr(i,c,f,Hp,Yr(wm()),yi(i,2,-2),0)}function dp(i,c,f,d){return Xr(i,c,f,pu,yi(i,0,d),yi(i,d+1,-1),d)}function mo(i,c){for(var f="",d=gu(i),h=0;h<d;h++)f+=c(i[h],h,i,c)||"";return f}function Em(i,c,f,d){switch(i.type){case mm:if(i.children.length)break;case gm:case pu:return i.return=i.return||i.value;case Hp:return"";case Up:return i.return=i.value+"{"+mo(i.children,d)+"}";case hu:i.value=i.props.join(",")}return la(f=mo(i.children,d))?i.return=i.value+"{"+f+"}":""}function Lm(i){var c=gu(i);return function(f,d,h,m){for(var x="",M=0;M<c;M++)x+=i[M](f,d,h,m)||"";return x}}function Rm(i){return function(c){c.root||(c=c.return)&&i(c)}}function _m(i){var c=Object.create(null);return function(f){return c[f]===void 0&&(c[f]=i(f)),c[f]}}var Om=function(c,f,d){for(var h=0,m=0;h=m,m=ia(),h===38&&m===12&&(f[d]=1),!vi(m);)Hn();return Si(c,zn)},Bm=function(c,f){var d=-1,h=44;do switch(vi(h)){case 0:h===38&&ia()===12&&(f[d]=1),c[d]+=Om(zn-1,f,d);break;case 2:c[d]+=Ur(h);break;case 4:if(h===44){c[++d]=ia()===58?"&\f":"",f[d]=c[d].length;break}default:c[d]+=Yr(h)}while(h=Hn());return c},Hm=function(c,f){return Yp(Bm(qp(c),f))},fp=new WeakMap,Um=function(c){if(!(c.type!=="rule"||!c.parent||c.length<1)){for(var f=c.value,d=c.parent,h=c.column===d.column&&c.line===d.line;d.type!=="rule";)if(d=d.parent,!d)return;if(!(c.props.length===1&&f.charCodeAt(0)!==58&&!fp.get(d))&&!h){fp.set(c,!0);for(var m=[],x=Hm(f,m),M=d.props,S=0,b=0;S<x.length;S++)for(var T=0;T<M.length;T++,b++)c.props[b]=m[S]?x[S].replace(/&\f/g,M[T]):M[T]+" "+x[S]}}},jm=function(c){if(c.type==="decl"){var f=c.value;f.charCodeAt(0)===108&&f.charCodeAt(2)===98&&(c.return="",c.value="")}};function Gp(i,c){switch(vm(i,c)){case 5103:return ft+"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 ft+i+i;case 5349:case 4246:case 4810:case 6968:case 2756:return ft+i+Nr+i+hn+i+i;case 6828:case 4268:return ft+i+hn+i+i;case 6165:return ft+i+hn+"flex-"+i+i;case 5187:return ft+i+ht(i,/(\w+).+(:[^]+)/,ft+"box-$1$2"+hn+"flex-$1$2")+i;case 5443:return ft+i+hn+"flex-item-"+ht(i,/flex-|-self/,"")+i;case 4675:return ft+i+hn+"flex-line-pack"+ht(i,/align-content|flex-|-self/,"")+i;case 5548:return ft+i+hn+ht(i,"shrink","negative")+i;case 5292:return ft+i+hn+ht(i,"basis","preferred-size")+i;case 6060:return ft+"box-"+ht(i,"-grow","")+ft+i+hn+ht(i,"grow","positive")+i;case 4554:return ft+ht(i,/([^-])(transform)/g,"$1"+ft+"$2")+i;case 6187:return ht(ht(ht(i,/(zoom-|grab)/,ft+"$1"),/(image-set)/,ft+"$1"),i,"")+i;case 5495:case 3959:return ht(i,/(image-set\([^]*)/,ft+"$1$`$1");case 4968:return ht(ht(i,/(.+:)(flex-)?(.*)/,ft+"box-pack:$3"+hn+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ft+i+i;case 4095:case 3583:case 4068:case 2532:return ht(i,/(.+)-inline(.+)/,ft+"$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(la(i)-1-c>6)switch(un(i,c+1)){case 109:if(un(i,c+4)!==45)break;case 102:return ht(i,/(.+:)(.+)-([^]+)/,"$1"+ft+"$2-$3$1"+Nr+(un(i,c+3)==108?"$3":"$2-$3"))+i;case 115:return~cu(i,"stretch")?Gp(ht(i,"stretch","fill-available"),c)+i:i}break;case 4949:if(un(i,c+1)!==115)break;case 6444:switch(un(i,la(i)-3-(~cu(i,"!important")&&10))){case 107:return ht(i,":",":"+ft)+i;case 101:return ht(i,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ft+(un(i,14)===45?"inline-":"")+"box$3$1"+ft+"$2$3$1"+hn+"$2box$3")+i}break;case 5936:switch(un(i,c+11)){case 114:return ft+i+hn+ht(i,/[svh]\w+-[tblr]{2}/,"tb")+i;case 108:return ft+i+hn+ht(i,/[svh]\w+-[tblr]{2}/,"tb-rl")+i;case 45:return ft+i+hn+ht(i,/[svh]\w+-[tblr]{2}/,"lr")+i}return ft+i+hn+i+i}return i}var Nm=function(c,f,d,h){if(c.length>-1&&!c.return)switch(c.type){case pu:c.return=Gp(c.value,c.length);break;case Up:return mo([pi(c,{value:ht(c.value,"@","@"+ft)})],h);case hu:if(c.length)return Sm(c.props,function(m){switch(xm(m,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return mo([pi(c,{props:[ht(m,/:(read-\w+)/,":"+Nr+"$1")]})],h);case"::placeholder":return mo([pi(c,{props:[ht(m,/:(plac\w+)/,":"+ft+"input-$1")]}),pi(c,{props:[ht(m,/:(plac\w+)/,":"+Nr+"$1")]}),pi(c,{props:[ht(m,/:(plac\w+)/,hn+"input-$1")]})],h)}return""})}},qm=[Nm],Ym=function(c){var f=c.key;if(f==="css"){var d=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(d,function(X){var W=X.getAttribute("data-emotion");W.indexOf(" ")!==-1&&(document.head.appendChild(X),X.setAttribute("data-s",""))})}var h=c.stylisPlugins||qm,m={},x,M=[];x=c.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+f+' "]'),function(X){for(var W=X.getAttribute("data-emotion").split(" "),V=1;V<W.length;V++)m[W[V]]=!0;M.push(X)});var S,b=[Um,jm];{var T,z=[Em,Rm(function(X){T.insert(X)})],R=Lm(b.concat(h,z)),Y=function(W){return mo(Am(W),R)};S=function(W,V,ae,le){T=ae,Y(W?W+"{"+V.styles+"}":V.styles),le&&(U.inserted[V.name]=!0)}}var U={key:f,sheet:new pm({key:f,container:x,nonce:c.nonce,speedy:c.speedy,prepend:c.prepend,insertionPoint:c.insertionPoint}),nonce:c.nonce,inserted:m,registered:{},insert:S};return U.sheet.hydrate(M),U},eu={exports:{}},mt={};var hp;function Gm(){if(hp)return mt;hp=1;var i=typeof Symbol=="function"&&Symbol.for,c=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,x=i?Symbol.for("react.provider"):60109,M=i?Symbol.for("react.context"):60110,S=i?Symbol.for("react.async_mode"):60111,b=i?Symbol.for("react.concurrent_mode"):60111,T=i?Symbol.for("react.forward_ref"):60112,z=i?Symbol.for("react.suspense"):60113,R=i?Symbol.for("react.suspense_list"):60120,Y=i?Symbol.for("react.memo"):60115,U=i?Symbol.for("react.lazy"):60116,X=i?Symbol.for("react.block"):60121,W=i?Symbol.for("react.fundamental"):60117,V=i?Symbol.for("react.responder"):60118,ae=i?Symbol.for("react.scope"):60119;function le(F){if(typeof F=="object"&&F!==null){var te=F.$$typeof;switch(te){case c:switch(F=F.type,F){case S:case b:case d:case m:case h:case z:return F;default:switch(F=F&&F.$$typeof,F){case M:case T:case U:case Y:case x:return F;default:return te}}case f:return te}}}function he(F){return le(F)===b}return mt.AsyncMode=S,mt.ConcurrentMode=b,mt.ContextConsumer=M,mt.ContextProvider=x,mt.Element=c,mt.ForwardRef=T,mt.Fragment=d,mt.Lazy=U,mt.Memo=Y,mt.Portal=f,mt.Profiler=m,mt.StrictMode=h,mt.Suspense=z,mt.isAsyncMode=function(F){return he(F)||le(F)===S},mt.isConcurrentMode=he,mt.isContextConsumer=function(F){return le(F)===M},mt.isContextProvider=function(F){return le(F)===x},mt.isElement=function(F){return typeof F=="object"&&F!==null&&F.$$typeof===c},mt.isForwardRef=function(F){return le(F)===T},mt.isFragment=function(F){return le(F)===d},mt.isLazy=function(F){return le(F)===U},mt.isMemo=function(F){return le(F)===Y},mt.isPortal=function(F){return le(F)===f},mt.isProfiler=function(F){return le(F)===m},mt.isStrictMode=function(F){return le(F)===h},mt.isSuspense=function(F){return le(F)===z},mt.isValidElementType=function(F){return typeof F=="string"||typeof F=="function"||F===d||F===b||F===m||F===h||F===z||F===R||typeof F=="object"&&F!==null&&(F.$$typeof===U||F.$$typeof===Y||F.$$typeof===x||F.$$typeof===M||F.$$typeof===T||F.$$typeof===W||F.$$typeof===V||F.$$typeof===ae||F.$$typeof===X)},mt.typeOf=le,mt}var pp;function Xm(){return pp||(pp=1,eu.exports=Gm()),eu.exports}var tu,gp;function Vm(){if(gp)return tu;gp=1;var i=Xm(),c={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 x(U){return i.isMemo(U)?h:m[U.$$typeof]||c}var M=Object.defineProperty,S=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,T=Object.getOwnPropertyDescriptor,z=Object.getPrototypeOf,R=Object.prototype;function Y(U,X,W){if(typeof X!="string"){if(R){var V=z(X);V&&V!==R&&Y(U,V,W)}var ae=S(X);b&&(ae=ae.concat(b(X)));for(var le=x(U),he=x(X),F=0;F<ae.length;++F){var te=ae[F];if(!f[te]&&!(W&&W[te])&&!(he&&he[te])&&!(le&&le[te])){var P=T(X,te);try{M(U,te,P)}catch{}}}}return U}return tu=Y,tu}Vm();var Fm=!0;function Qm(i,c,f){var d="";return f.split(" ").forEach(function(h){i[h]!==void 0?c.push(i[h]+";"):h&&(d+=h+" ")}),d}var Xp=function(c,f,d){var h=c.key+"-"+f.name;(d===!1||Fm===!1)&&c.registered[h]===void 0&&(c.registered[h]=f.styles)},Km=function(c,f,d){Xp(c,f,d);var h=c.key+"-"+f.name;if(c.inserted[f.name]===void 0){var m=f;do c.insert(f===m?"."+h:"",m,c.sheet,!0),m=m.next;while(m!==void 0)}};function Zm(i){for(var c=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,c=(f&65535)*1540483477+((f>>>16)*59797<<16)^(c&65535)*1540483477+((c>>>16)*59797<<16);switch(h){case 3:c^=(i.charCodeAt(d+2)&255)<<16;case 2:c^=(i.charCodeAt(d+1)&255)<<8;case 1:c^=i.charCodeAt(d)&255,c=(c&65535)*1540483477+((c>>>16)*59797<<16)}return c^=c>>>13,c=(c&65535)*1540483477+((c>>>16)*59797<<16),((c^c>>>15)>>>0).toString(36)}var $m={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},Wm=/[A-Z]|^ms/g,Jm=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Vp=function(c){return c.charCodeAt(1)===45},mp=function(c){return c!=null&&typeof c!="boolean"},nu=_m(function(i){return Vp(i)?i:i.replace(Wm,"-$&").toLowerCase()}),bp=function(c,f){switch(c){case"animation":case"animationName":if(typeof f=="string")return f.replace(Jm,function(d,h,m){return oa={name:h,styles:m,next:oa},h})}return $m[c]!==1&&!Vp(c)&&typeof f=="number"&&f!==0?f+"px":f};function xi(i,c,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 oa={name:h.name,styles:h.styles,next:oa},h.name;var m=f;if(m.styles!==void 0){var x=m.next;if(x!==void 0)for(;x!==void 0;)oa={name:x.name,styles:x.styles,next:oa},x=x.next;var M=m.styles+";";return M}return Im(i,c,f)}case"function":{if(i!==void 0){var S=oa,b=f(i);return oa=S,xi(i,c,b)}break}}var T=f;return T}function Im(i,c,f){var d="";if(Array.isArray(f))for(var h=0;h<f.length;h++)d+=xi(i,c,f[h])+";";else for(var m in f){var x=f[m];if(typeof x!="object"){var M=x;mp(M)&&(d+=nu(m)+":"+bp(m,M)+";")}else if(Array.isArray(x)&&typeof x[0]=="string"&&c==null)for(var S=0;S<x.length;S++)mp(x[S])&&(d+=nu(m)+":"+bp(m,x[S])+";");else{var b=xi(i,c,x);switch(m){case"animation":case"animationName":{d+=nu(m)+":"+b+";";break}default:d+=m+"{"+b+"}"}}}return d}var yp=/label:\s*([^\s;{]+)\s*(;|$)/g,oa;function Fp(i,c,f){if(i.length===1&&typeof i[0]=="object"&&i[0]!==null&&i[0].styles!==void 0)return i[0];var d=!0,h="";oa=void 0;var m=i[0];if(m==null||m.raw===void 0)d=!1,h+=xi(f,c,m);else{var x=m;h+=x[0]}for(var M=1;M<i.length;M++)if(h+=xi(f,c,i[M]),d){var S=m;h+=S[M]}yp.lastIndex=0;for(var b="",T;(T=yp.exec(h))!==null;)b+="-"+T[1];var z=Zm(h)+b;return{name:z,styles:h,next:oa}}var Pm=function(c){return c()},e1=cp.useInsertionEffect?cp.useInsertionEffect:!1,t1=e1||Pm,Qp=v.createContext(typeof HTMLElement<"u"?Ym({key:"css"}):null);Qp.Provider;var n1=function(c){return v.forwardRef(function(f,d){var h=v.useContext(Qp);return c(f,h,d)})},a1=v.createContext({}),wi={}.hasOwnProperty,du="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",mu=function(c,f){var d={};for(var h in f)wi.call(f,h)&&(d[h]=f[h]);return d[du]=c,d},l1=function(c){var f=c.cache,d=c.serialized,h=c.isStringTag;return Xp(f,d,h),t1(function(){return Km(f,d,h)}),null},o1=n1(function(i,c,f){var d=i.css;typeof d=="string"&&c.registered[d]!==void 0&&(d=c.registered[d]);var h=i[du],m=[d],x="";typeof i.className=="string"?x=Qm(c.registered,m,i.className):i.className!=null&&(x=i.className+" ");var M=Fp(m,void 0,v.useContext(a1));x+=c.key+"-"+M.name;var S={};for(var b in i)wi.call(i,b)&&b!=="css"&&b!==du&&(S[b]=i[b]);return S.className=x,f&&(S.ref=f),v.createElement(v.Fragment,null,v.createElement(l1,{cache:c,serialized:M,isStringTag:typeof h=="string"}),v.createElement(h,S))}),bu=o1,Pe=bi.Fragment,r=function(c,f,d){return wi.call(f,"css")?bi.jsx(bu,mu(c,f),d):bi.jsx(c,f,d)},y=function(c,f,d){return wi.call(f,"css")?bi.jsxs(bu,mu(c,f),d):bi.jsxs(c,f,d)},au={exports:{}},gi={},lu={exports:{}},ou={};var vp;function i1(){return vp||(vp=1,(function(i){function c(A,J){var ee=A.length;A.push(J);e:for(;0<ee;){var Te=ee-1>>>1,Fe=A[Te];if(0<h(Fe,J))A[Te]=J,A[ee]=Fe,ee=Te;else break e}}function f(A){return A.length===0?null:A[0]}function d(A){if(A.length===0)return null;var J=A[0],ee=A.pop();if(ee!==J){A[0]=ee;e:for(var Te=0,Fe=A.length,w=Fe>>>1;Te<w;){var H=2*(Te+1)-1,ne=A[H],ie=H+1,Me=A[ie];if(0>h(ne,ee))ie<Fe&&0>h(Me,ne)?(A[Te]=Me,A[ie]=ee,Te=ie):(A[Te]=ne,A[H]=ee,Te=H);else if(ie<Fe&&0>h(Me,ee))A[Te]=Me,A[ie]=ee,Te=ie;else break e}}return J}function h(A,J){var ee=A.sortIndex-J.sortIndex;return ee!==0?ee:A.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 x=Date,M=x.now();i.unstable_now=function(){return x.now()-M}}var S=[],b=[],T=1,z=null,R=3,Y=!1,U=!1,X=!1,W=!1,V=typeof setTimeout=="function"?setTimeout:null,ae=typeof clearTimeout=="function"?clearTimeout:null,le=typeof setImmediate<"u"?setImmediate:null;function he(A){for(var J=f(b);J!==null;){if(J.callback===null)d(b);else if(J.startTime<=A)d(b),J.sortIndex=J.expirationTime,c(S,J);else break;J=f(b)}}function F(A){if(X=!1,he(A),!U)if(f(S)!==null)U=!0,te||(te=!0,pe());else{var J=f(b);J!==null&&Ae(F,J.startTime-A)}}var te=!1,P=-1,oe=5,B=-1;function q(){return W?!0:!(i.unstable_now()-B<oe)}function se(){if(W=!1,te){var A=i.unstable_now();B=A;var J=!0;try{e:{U=!1,X&&(X=!1,ae(P),P=-1),Y=!0;var ee=R;try{t:{for(he(A),z=f(S);z!==null&&!(z.expirationTime>A&&q());){var Te=z.callback;if(typeof Te=="function"){z.callback=null,R=z.priorityLevel;var Fe=Te(z.expirationTime<=A);if(A=i.unstable_now(),typeof Fe=="function"){z.callback=Fe,he(A),J=!0;break t}z===f(S)&&d(S),he(A)}else d(S);z=f(S)}if(z!==null)J=!0;else{var w=f(b);w!==null&&Ae(F,w.startTime-A),J=!1}}break e}finally{z=null,R=ee,Y=!1}J=void 0}}finally{J?pe():te=!1}}}var pe;if(typeof le=="function")pe=function(){le(se)};else if(typeof MessageChannel<"u"){var fe=new MessageChannel,re=fe.port2;fe.port1.onmessage=se,pe=function(){re.postMessage(null)}}else pe=function(){V(se,0)};function Ae(A,J){P=V(function(){A(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(A){A.callback=null},i.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):oe=0<A?Math.floor(1e3/A):5},i.unstable_getCurrentPriorityLevel=function(){return R},i.unstable_next=function(A){switch(R){case 1:case 2:case 3:var J=3;break;default:J=R}var ee=R;R=J;try{return A()}finally{R=ee}},i.unstable_requestPaint=function(){W=!0},i.unstable_runWithPriority=function(A,J){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var ee=R;R=A;try{return J()}finally{R=ee}},i.unstable_scheduleCallback=function(A,J,ee){var Te=i.unstable_now();switch(typeof ee=="object"&&ee!==null?(ee=ee.delay,ee=typeof ee=="number"&&0<ee?Te+ee:Te):ee=Te,A){case 1:var Fe=-1;break;case 2:Fe=250;break;case 5:Fe=1073741823;break;case 4:Fe=1e4;break;default:Fe=5e3}return Fe=ee+Fe,A={id:T++,callback:J,priorityLevel:A,startTime:ee,expirationTime:Fe,sortIndex:-1},ee>Te?(A.sortIndex=ee,c(b,A),f(S)===null&&A===f(b)&&(X?(ae(P),P=-1):X=!0,Ae(F,ee-Te))):(A.sortIndex=Fe,c(S,A),U||Y||(U=!0,te||(te=!0,pe()))),A},i.unstable_shouldYield=q,i.unstable_wrapCallback=function(A){var J=R;return function(){var ee=R;R=J;try{return A.apply(this,arguments)}finally{R=ee}}}})(ou)),ou}var xp;function r1(){return xp||(xp=1,lu.exports=i1()),lu.exports}var iu={exports:{}},fn={};var Sp;function s1(){if(Sp)return fn;Sp=1;var i=fu();function c(S){var b="https://react.dev/errors/"+S;if(1<arguments.length){b+="?args[]="+encodeURIComponent(arguments[1]);for(var T=2;T<arguments.length;T++)b+="&args[]="+encodeURIComponent(arguments[T])}return"Minified React error #"+S+"; visit "+b+" 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(c(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(S,b,T){var z=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:z==null?null:""+z,children:S,containerInfo:b,implementation:T}}var x=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function M(S,b){if(S==="font")return"";if(typeof b=="string")return b==="use-credentials"?b:""}return fn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=d,fn.createPortal=function(S,b){var T=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!b||b.nodeType!==1&&b.nodeType!==9&&b.nodeType!==11)throw Error(c(299));return m(S,b,null,T)},fn.flushSync=function(S){var b=x.T,T=d.p;try{if(x.T=null,d.p=2,S)return S()}finally{x.T=b,d.p=T,d.d.f()}},fn.preconnect=function(S,b){typeof S=="string"&&(b?(b=b.crossOrigin,b=typeof b=="string"?b==="use-credentials"?b:"":void 0):b=null,d.d.C(S,b))},fn.prefetchDNS=function(S){typeof S=="string"&&d.d.D(S)},fn.preinit=function(S,b){if(typeof S=="string"&&b&&typeof b.as=="string"){var T=b.as,z=M(T,b.crossOrigin),R=typeof b.integrity=="string"?b.integrity:void 0,Y=typeof b.fetchPriority=="string"?b.fetchPriority:void 0;T==="style"?d.d.S(S,typeof b.precedence=="string"?b.precedence:void 0,{crossOrigin:z,integrity:R,fetchPriority:Y}):T==="script"&&d.d.X(S,{crossOrigin:z,integrity:R,fetchPriority:Y,nonce:typeof b.nonce=="string"?b.nonce:void 0})}},fn.preinitModule=function(S,b){if(typeof S=="string")if(typeof b=="object"&&b!==null){if(b.as==null||b.as==="script"){var T=M(b.as,b.crossOrigin);d.d.M(S,{crossOrigin:T,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0})}}else b==null&&d.d.M(S)},fn.preload=function(S,b){if(typeof S=="string"&&typeof b=="object"&&b!==null&&typeof b.as=="string"){var T=b.as,z=M(T,b.crossOrigin);d.d.L(S,T,{crossOrigin:z,integrity:typeof b.integrity=="string"?b.integrity:void 0,nonce:typeof b.nonce=="string"?b.nonce:void 0,type:typeof b.type=="string"?b.type:void 0,fetchPriority:typeof b.fetchPriority=="string"?b.fetchPriority:void 0,referrerPolicy:typeof b.referrerPolicy=="string"?b.referrerPolicy:void 0,imageSrcSet:typeof b.imageSrcSet=="string"?b.imageSrcSet:void 0,imageSizes:typeof b.imageSizes=="string"?b.imageSizes:void 0,media:typeof b.media=="string"?b.media:void 0})}},fn.preloadModule=function(S,b){if(typeof S=="string")if(b){var T=M(b.as,b.crossOrigin);d.d.m(S,{as:typeof b.as=="string"&&b.as!=="script"?b.as:void 0,crossOrigin:T,integrity:typeof b.integrity=="string"?b.integrity:void 0})}else d.d.m(S)},fn.requestFormReset=function(S){d.d.r(S)},fn.unstable_batchedUpdates=function(S,b){return S(b)},fn.useFormState=function(S,b,T){return x.H.useFormState(S,b,T)},fn.useFormStatus=function(){return x.H.useHostTransitionStatus()},fn.version="19.2.4",fn}var wp;function c1(){if(wp)return iu.exports;wp=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(c){console.error(c)}}return i(),iu.exports=s1(),iu.exports}var Cp;function u1(){if(Cp)return gi;Cp=1;var i=r1(),c=fu(),f=c1();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 x(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 M(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 S(e){if(m(e)!==e)throw Error(d(188))}function b(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 S(l),e;if(o===a)return S(l),t;o=o.sibling}throw Error(d(188))}if(n.return!==a.return)n=l,a=o;else{for(var u=!1,p=l.child;p;){if(p===n){u=!0,n=l,a=o;break}if(p===a){u=!0,a=l,n=o;break}p=p.sibling}if(!u){for(p=o.child;p;){if(p===n){u=!0,n=o,a=l;break}if(p===a){u=!0,a=o,n=l;break}p=p.sibling}if(!u)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 T(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=T(e),t!==null)return t;e=e.sibling}return null}var z=Object.assign,R=Symbol.for("react.element"),Y=Symbol.for("react.transitional.element"),U=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),ae=Symbol.for("react.consumer"),le=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),oe=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),q=Symbol.for("react.memo_cache_sentinel"),se=Symbol.iterator;function pe(e){return e===null||typeof e!="object"?null:(e=se&&e[se]||e["@@iterator"],typeof e=="function"?e:null)}var fe=Symbol.for("react.client.reference");function re(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===fe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case X:return"Fragment";case V:return"Profiler";case W:return"StrictMode";case F:return"Suspense";case te:return"SuspenseList";case B:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case U:return"Portal";case le:return e.displayName||"Context";case ae: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 P:return t=e.displayName||null,t!==null?t:re(e.type)||"Memo";case oe:t=e._payload,e=e._init;try{return re(e(t))}catch{}}return null}var Ae=Array.isArray,A=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee={pending:!1,data:null,method:null,action:null},Te=[],Fe=-1;function w(e){return{current:e}}function H(e){0>Fe||(e.current=Te[Fe],Te[Fe]=null,Fe--)}function ne(e,t){Fe++,Te[Fe]=e.current,e.current=t}var ie=w(null),Me=w(null),Le=w(null),Xe=w(null);function pt(e,t){switch(ne(Le,t),ne(Me,e),ne(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ah(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ah(t),e=Th(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(ie),ne(ie,e)}function je(){H(ie),H(Me),H(Le)}function Yt(e){e.memoizedState!==null&&ne(Xe,e);var t=ie.current,n=Th(t,e.type);t!==n&&(ne(Me,e),ne(ie,n))}function Ze(e){Me.current===e&&(H(ie),H(Me)),Xe.current===e&&(H(Xe),ci._currentValue=ee)}var et,yt;function Rt(e){if(et===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);et=t&&t[1]||"",yt=-1<n.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+et+e+yt}var Ut=!1;function Vt(e,t){if(!e||Ut)return"";Ut=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(j){var _=j}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(j){_=j}e.call(Z.prototype)}}else{try{throw Error()}catch(j){_=j}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(j){if(j&&_&&typeof j.stack=="string")return[j.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(),u=o[0],p=o[1];if(u&&p){var C=u.split(`
4
+ `),L=p.split(`
5
+ `);for(l=a=0;a<C.length&&!C[a].includes("DetermineComponentFrameRoot");)a++;for(;l<L.length&&!L[l].includes("DetermineComponentFrameRoot");)l++;if(a===C.length||l===L.length)for(a=C.length-1,l=L.length-1;1<=a&&0<=l&&C[a]!==L[l];)l--;for(;1<=a&&0<=l;a--,l--)if(C[a]!==L[l]){if(a!==1||l!==1)do if(a--,l--,0>l||C[a]!==L[l]){var G=`
6
+ `+C[a].replace(" at new "," at ");return e.displayName&&G.includes("<anonymous>")&&(G=G.replace("<anonymous>",e.displayName)),G}while(1<=a&&0<=l);break}}}finally{Ut=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Rt(n):""}function Pt(e,t){switch(e.tag){case 26:case 27:case 5:return Rt(e.type);case 16:return Rt("Lazy");case 13:return e.child!==t&&t!==null?Rt("Suspense Fallback"):Rt("Suspense");case 19:return Rt("SuspenseList");case 0:case 15:return Vt(e.type,!1);case 11:return Vt(e.type.render,!1);case 1:return Vt(e.type,!0);case 31:return Rt("Activity");default:return""}}function tn(e){try{var t="",n=null;do t+=Pt(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}}var Ft=Object.prototype.hasOwnProperty,lt=i.unstable_scheduleCallback,Mt=i.unstable_cancelCallback,ge=i.unstable_shouldYield,Un=i.unstable_requestPaint,_t=i.unstable_now,pn=i.unstable_getCurrentPriorityLevel,Mn=i.unstable_ImmediatePriority,bn=i.unstable_UserBlockingPriority,yn=i.unstable_NormalPriority,$=i.unstable_LowPriority,ce=i.unstable_IdlePriority,Oe=i.log,ct=i.unstable_setDisableYieldValue,Ne=null,ke=null;function St(e){if(typeof Oe=="function"&&ct(e),ke&&typeof ke.setStrictMode=="function")try{ke.setStrictMode(Ne,e)}catch{}}var at=Math.clz32?Math.clz32:So,Pn=Math.log,Dn=Math.LN2;function So(e){return e>>>=0,e===0?32:31-(Pn(e)/Dn|0)|0}var Ea=256,La=262144,ra=4194304;function Zn(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ra(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var l=0,o=e.suspendedLanes,u=e.pingedLanes;e=e.warmLanes;var p=a&134217727;return p!==0?(a=p&~o,a!==0?l=Zn(a):(u&=p,u!==0?l=Zn(u):n||(n=p&~e,n!==0&&(l=Zn(n))))):(p=a&~o,p!==0?l=Zn(p):u!==0?l=Zn(u):n||(n=a&~e,n!==0&&(l=Zn(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 sa(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Tl(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 El(){var e=ra;return ra<<=1,(ra&62914560)===0&&(ra=4194304),e}function cl(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ca(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function wo(e,t,n,a,l,o){var u=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,C=e.expirationTimes,L=e.hiddenUpdates;for(n=u&~n;0<n;){var G=31-at(n),Z=1<<G;p[G]=0,C[G]=-1;var _=L[G];if(_!==null)for(L[G]=null,G=0;G<_.length;G++){var j=_[G];j!==null&&(j.lane&=-536870913)}n&=~Z}a!==0&&Ll(e,a,0),o!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=o&~(u&~t))}function Ll(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-at(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function O(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-at(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function Be(e,t){var n=t&-t;return n=(n&42)!==0?1:ze(n),(n&(e.suspendedLanes|t))!==0?0:n}function ze(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 tt(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ut(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Ih(e.type))}function nn(e,t){var n=J.p;try{return J.p=e,t()}finally{J.p=n}}var dn=Math.random().toString(36).slice(2),gt="__reactFiber$"+dn,Tt="__reactProps$"+dn,An="__reactContainer$"+dn,Rl="__reactEvents$"+dn,_a="__reactListeners$"+dn,Oa="__reactHandles$"+dn,Co="__reactResources$"+dn,ul="__reactMarker$"+dn;function ko(e){delete e[gt],delete e[Tt],delete e[Rl],delete e[_a],delete e[Oa]}function ua(e){var t=e[gt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[An]||n[gt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Hh(e);e!==null;){if(n=e[gt])return n;e=Hh(e)}return t}e=n,n=e.parentNode}return null}function be(e){if(e=e[gt]||e[An]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ue(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(d(33))}function ve(e){var t=e[Co];return t||(t=e[Co]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function xe(e){e[ul]=!0}var He=new Set,qe={};function ot(e,t){it(e,t),it(e+"Capture",t)}function it(e,t){for(qe[e]=t,e=0;e<t.length;e++)He.add(t[e])}var Ye=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]*$"),gn={},zo={};function Pp(e){return Ft.call(zo,e)?!0:Ft.call(gn,e)?!1:Ye.test(e)?zo[e]=!0:(gn[e]=!0,!1)}function Ci(e,t,n){if(Pp(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 ki(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 da(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 jn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function vu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function e0(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(u){n=""+u,o.call(this,u)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(u){n=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Fr(e){if(!e._valueTracker){var t=vu(e)?"checked":"value";e._valueTracker=e0(e,t,""+e[t])}}function xu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=vu(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function zi(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 t0=/[\n"\\]/g;function Nn(e){return e.replace(t0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Qr(e,t,n,a,l,o,u,p){e.name="",u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?e.type=u:e.removeAttribute("type"),t!=null?u==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+jn(t)):e.value!==""+jn(t)&&(e.value=""+jn(t)):u!=="submit"&&u!=="reset"||e.removeAttribute("value"),t!=null?Kr(e,u,jn(t)):n!=null?Kr(e,u,jn(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=""+jn(p):e.removeAttribute("name")}function Su(e,t,n,a,l,o,u,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)){Fr(e);return}n=n!=null?""+jn(n):"",t=t!=null?""+jn(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,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.name=u),Fr(e)}function Kr(e,t,n){t==="number"&&zi(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function _l(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=""+jn(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 wu(e,t,n){if(t!=null&&(t=""+jn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+jn(n):""}function Cu(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(d(92));if(Ae(a)){if(1<a.length)throw Error(d(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=jn(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Fr(e)}function Ol(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var n0=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 ku(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||n0.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function zu(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&&ku(e,l,a)}else for(var o in t)t.hasOwnProperty(o)&&ku(e,o,t[o])}function Zr(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 a0=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"]]),l0=/^[\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 Mi(e){return l0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function fa(){}var $r=null;function Wr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Bl=null,Hl=null;function Mu(e){var t=be(e);if(t&&(e=t.stateNode)){var n=e[Tt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Qr(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="'+Nn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[Tt]||null;if(!l)throw Error(d(90));Qr(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&&xu(a)}break e;case"textarea":wu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&_l(e,!!n.multiple,t,!1)}}}var Jr=!1;function Du(e,t,n){if(Jr)return e(t,n);Jr=!0;try{var a=e(t);return a}finally{if(Jr=!1,(Bl!==null||Hl!==null)&&(hr(),Bl&&(t=Bl,e=Hl,Hl=Bl=null,Mu(t),e)))for(t=0;t<e.length;t++)Mu(e[t])}}function Mo(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Tt]||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 ha=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ir=!1;if(ha)try{var Do={};Object.defineProperty(Do,"passive",{get:function(){Ir=!0}}),window.addEventListener("test",Do,Do),window.removeEventListener("test",Do,Do)}catch{Ir=!1}var Ba=null,Pr=null,Di=null;function Au(){if(Di)return Di;var e,t=Pr,n=t.length,a,l="value"in Ba?Ba.value:Ba.textContent,o=l.length;for(e=0;e<n&&t[e]===l[e];e++);var u=n-e;for(a=1;a<=u&&t[n-a]===l[o-a];a++);return Di=l.slice(e,1<a?1-a:void 0)}function Ai(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 Ti(){return!0}function Tu(){return!1}function vn(e){function t(n,a,l,o,u){this._reactName=n,this._targetInst=l,this.type=a,this.nativeEvent=o,this.target=u,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)?Ti:Tu,this.isPropagationStopped=Tu,this}return z(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=Ti)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ti)},persist:function(){},isPersistent:Ti}),t}var dl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ei=vn(dl),Ao=z({},dl,{view:0,detail:0}),o0=vn(Ao),es,ts,To,Li=z({},Ao,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:as,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!==To&&(To&&e.type==="mousemove"?(es=e.screenX-To.screenX,ts=e.screenY-To.screenY):ts=es=0,To=e),es)},movementY:function(e){return"movementY"in e?e.movementY:ts}}),Eu=vn(Li),i0=z({},Li,{dataTransfer:0}),r0=vn(i0),s0=z({},Ao,{relatedTarget:0}),ns=vn(s0),c0=z({},dl,{animationName:0,elapsedTime:0,pseudoElement:0}),u0=vn(c0),d0=z({},dl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),f0=vn(d0),h0=z({},dl,{data:0}),Lu=vn(h0),p0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},g0={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"},m0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function b0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=m0[e])?!!t[e]:!1}function as(){return b0}var y0=z({},Ao,{key:function(e){if(e.key){var t=p0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ai(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?g0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:as,charCode:function(e){return e.type==="keypress"?Ai(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ai(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),v0=vn(y0),x0=z({},Li,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ru=vn(x0),S0=z({},Ao,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:as}),w0=vn(S0),C0=z({},dl,{propertyName:0,elapsedTime:0,pseudoElement:0}),k0=vn(C0),z0=z({},Li,{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}),M0=vn(z0),D0=z({},dl,{newState:0,oldState:0}),A0=vn(D0),T0=[9,13,27,32],ls=ha&&"CompositionEvent"in window,Eo=null;ha&&"documentMode"in document&&(Eo=document.documentMode);var E0=ha&&"TextEvent"in window&&!Eo,_u=ha&&(!ls||Eo&&8<Eo&&11>=Eo),Ou=" ",Bu=!1;function Hu(e,t){switch(e){case"keyup":return T0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ul=!1;function L0(e,t){switch(e){case"compositionend":return Uu(t);case"keypress":return t.which!==32?null:(Bu=!0,Ou);case"textInput":return e=t.data,e===Ou&&Bu?null:e;default:return null}}function R0(e,t){if(Ul)return e==="compositionend"||!ls&&Hu(e,t)?(e=Au(),Di=Pr=Ba=null,Ul=!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 _u&&t.locale!=="ko"?null:t.data;default:return null}}var _0={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 ju(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!_0[e.type]:t==="textarea"}function Nu(e,t,n,a){Bl?Hl?Hl.push(a):Hl=[a]:Bl=a,t=xr(t,"onChange"),0<t.length&&(n=new Ei("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Lo=null,Ro=null;function O0(e){wh(e,0)}function Ri(e){var t=ue(e);if(xu(t))return e}function qu(e,t){if(e==="change")return t}var Yu=!1;if(ha){var os;if(ha){var is="oninput"in document;if(!is){var Gu=document.createElement("div");Gu.setAttribute("oninput","return;"),is=typeof Gu.oninput=="function"}os=is}else os=!1;Yu=os&&(!document.documentMode||9<document.documentMode)}function Xu(){Lo&&(Lo.detachEvent("onpropertychange",Vu),Ro=Lo=null)}function Vu(e){if(e.propertyName==="value"&&Ri(Ro)){var t=[];Nu(t,Ro,e,Wr(e)),Du(O0,t)}}function B0(e,t,n){e==="focusin"?(Xu(),Lo=t,Ro=n,Lo.attachEvent("onpropertychange",Vu)):e==="focusout"&&Xu()}function H0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ri(Ro)}function U0(e,t){if(e==="click")return Ri(t)}function j0(e,t){if(e==="input"||e==="change")return Ri(t)}function N0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tn=typeof Object.is=="function"?Object.is:N0;function _o(e,t){if(Tn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var l=n[a];if(!Ft.call(t,l)||!Tn(e[l],t[l]))return!1}return!0}function Fu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Qu(e,t){var n=Fu(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=Fu(n)}}function Ku(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ku(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Zu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=zi(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=zi(e.document)}return t}function rs(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 q0=ha&&"documentMode"in document&&11>=document.documentMode,jl=null,ss=null,Oo=null,cs=!1;function $u(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;cs||jl==null||jl!==zi(a)||(a=jl,"selectionStart"in a&&rs(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}),Oo&&_o(Oo,a)||(Oo=a,a=xr(ss,"onSelect"),0<a.length&&(t=new Ei("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=jl)))}function fl(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Nl={animationend:fl("Animation","AnimationEnd"),animationiteration:fl("Animation","AnimationIteration"),animationstart:fl("Animation","AnimationStart"),transitionrun:fl("Transition","TransitionRun"),transitionstart:fl("Transition","TransitionStart"),transitioncancel:fl("Transition","TransitionCancel"),transitionend:fl("Transition","TransitionEnd")},us={},Wu={};ha&&(Wu=document.createElement("div").style,"AnimationEvent"in window||(delete Nl.animationend.animation,delete Nl.animationiteration.animation,delete Nl.animationstart.animation),"TransitionEvent"in window||delete Nl.transitionend.transition);function hl(e){if(us[e])return us[e];if(!Nl[e])return e;var t=Nl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Wu)return us[e]=t[n];return e}var Ju=hl("animationend"),Iu=hl("animationiteration"),Pu=hl("animationstart"),Y0=hl("transitionrun"),G0=hl("transitionstart"),X0=hl("transitioncancel"),ed=hl("transitionend"),td=new Map,ds="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(" ");ds.push("scrollEnd");function $n(e,t){td.set(e,t),ot(t,[e])}var _i=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)},qn=[],ql=0,fs=0;function Oi(){for(var e=ql,t=fs=ql=0;t<e;){var n=qn[t];qn[t++]=null;var a=qn[t];qn[t++]=null;var l=qn[t];qn[t++]=null;var o=qn[t];if(qn[t++]=null,a!==null&&l!==null){var u=a.pending;u===null?l.next=l:(l.next=u.next,u.next=l),a.pending=l}o!==0&&nd(n,l,o)}}function Bi(e,t,n,a){qn[ql++]=e,qn[ql++]=t,qn[ql++]=n,qn[ql++]=a,fs|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function hs(e,t,n,a){return Bi(e,t,n,a),Hi(e)}function pl(e,t){return Bi(e,null,null,t),Hi(e)}function nd(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-at(n),e=o.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),o):null}function Hi(e){if(50<ni)throw ni=0,wc=null,Error(d(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Yl={};function V0(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 En(e,t,n,a){return new V0(e,t,n,a)}function ps(e){return e=e.prototype,!(!e||!e.isReactComponent)}function pa(e,t){var n=e.alternate;return n===null?(n=En(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 ad(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 Ui(e,t,n,a,l,o){var u=0;if(a=e,typeof e=="function")ps(e)&&(u=1);else if(typeof e=="string")u=$g(e,n,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case B:return e=En(31,n,t,l),e.elementType=B,e.lanes=o,e;case X:return gl(n.children,l,o,t);case W:u=8,l|=24;break;case V:return e=En(12,n,t,l|2),e.elementType=V,e.lanes=o,e;case F:return e=En(13,n,t,l),e.elementType=F,e.lanes=o,e;case te:return e=En(19,n,t,l),e.elementType=te,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case le:u=10;break e;case ae:u=9;break e;case he:u=11;break e;case P:u=14;break e;case oe:u=16,a=null;break e}u=29,n=Error(d(130,e===null?"null":typeof e,"")),a=null}return t=En(u,n,t,l),t.elementType=e,t.type=a,t.lanes=o,t}function gl(e,t,n,a){return e=En(7,e,a,t),e.lanes=n,e}function gs(e,t,n){return e=En(6,e,null,t),e.lanes=n,e}function ld(e){var t=En(18,null,null,0);return t.stateNode=e,t}function ms(e,t,n){return t=En(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var od=new WeakMap;function Yn(e,t){if(typeof e=="object"&&e!==null){var n=od.get(e);return n!==void 0?n:(t={value:e,source:t,stack:tn(t)},od.set(e,t),t)}return{value:e,source:t,stack:tn(t)}}var Gl=[],Xl=0,ji=null,Bo=0,Gn=[],Xn=0,Ha=null,ea=1,ta="";function ga(e,t){Gl[Xl++]=Bo,Gl[Xl++]=ji,ji=e,Bo=t}function id(e,t,n){Gn[Xn++]=ea,Gn[Xn++]=ta,Gn[Xn++]=Ha,Ha=e;var a=ea;e=ta;var l=32-at(a)-1;a&=~(1<<l),n+=1;var o=32-at(t)+l;if(30<o){var u=l-l%5;o=(a&(1<<u)-1).toString(32),a>>=u,l-=u,ea=1<<32-at(t)+l|n<<l|a,ta=o+e}else ea=1<<o|n<<l|a,ta=e}function bs(e){e.return!==null&&(ga(e,1),id(e,1,0))}function ys(e){for(;e===ji;)ji=Gl[--Xl],Gl[Xl]=null,Bo=Gl[--Xl],Gl[Xl]=null;for(;e===Ha;)Ha=Gn[--Xn],Gn[Xn]=null,ta=Gn[--Xn],Gn[Xn]=null,ea=Gn[--Xn],Gn[Xn]=null}function rd(e,t){Gn[Xn++]=ea,Gn[Xn++]=ta,Gn[Xn++]=Ha,ea=t.id,ta=t.overflow,Ha=e}var ln=null,Et=null,nt=!1,Ua=null,Vn=!1,vs=Error(d(519));function ja(e){var t=Error(d(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ho(Yn(t,e)),vs}function sd(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[gt]=e,t[Tt]=a,n){case"dialog":We("cancel",t),We("close",t);break;case"iframe":case"object":case"embed":We("load",t);break;case"video":case"audio":for(n=0;n<li.length;n++)We(li[n],t);break;case"source":We("error",t);break;case"img":case"image":case"link":We("error",t),We("load",t);break;case"details":We("toggle",t);break;case"input":We("invalid",t),Su(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":We("invalid",t);break;case"textarea":We("invalid",t),Cu(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||Mh(t.textContent,n)?(a.popover!=null&&(We("beforetoggle",t),We("toggle",t)),a.onScroll!=null&&We("scroll",t),a.onScrollEnd!=null&&We("scrollend",t),a.onClick!=null&&(t.onclick=fa),t=!0):t=!1,t||ja(e,!0)}function cd(e){for(ln=e.return;ln;)switch(ln.tag){case 5:case 31:case 13:Vn=!1;return;case 27:case 3:Vn=!0;return;default:ln=ln.return}}function Vl(e){if(e!==ln)return!1;if(!nt)return cd(e),nt=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Uc(e.type,e.memoizedProps)),n=!n),n&&Et&&ja(e),cd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));Et=Bh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));Et=Bh(e)}else t===27?(t=Et,Ia(e.type)?(e=Gc,Gc=null,Et=e):Et=t):Et=ln?Qn(e.stateNode.nextSibling):null;return!0}function ml(){Et=ln=null,nt=!1}function xs(){var e=Ua;return e!==null&&(Cn===null?Cn=e:Cn.push.apply(Cn,e),Ua=null),e}function Ho(e){Ua===null?Ua=[e]:Ua.push(e)}var Ss=w(null),bl=null,ma=null;function Na(e,t,n){ne(Ss,t._currentValue),t._currentValue=n}function ba(e){e._currentValue=Ss.current,H(Ss)}function ws(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 Cs(e,t,n,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var o=l.dependencies;if(o!==null){var u=l.child;o=o.firstContext;e:for(;o!==null;){var p=o;o=l;for(var C=0;C<t.length;C++)if(p.context===t[C]){o.lanes|=n,p=o.alternate,p!==null&&(p.lanes|=n),ws(o.return,n,e),a||(u=null);break e}o=p.next}}else if(l.tag===18){if(u=l.return,u===null)throw Error(d(341));u.lanes|=n,o=u.alternate,o!==null&&(o.lanes|=n),ws(u,n,e),u=null}else u=l.child;if(u!==null)u.return=l;else for(u=l;u!==null;){if(u===e){u=null;break}if(l=u.sibling,l!==null){l.return=u.return,u=l;break}u=u.return}l=u}}function Fl(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 u=l.alternate;if(u===null)throw Error(d(387));if(u=u.memoizedProps,u!==null){var p=l.type;Tn(l.pendingProps.value,u.value)||(e!==null?e.push(p):e=[p])}}else if(l===Xe.current){if(u=l.alternate,u===null)throw Error(d(387));u.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(ci):e=[ci])}l=l.return}e!==null&&Cs(t,e,n,a),t.flags|=262144}function Ni(e){for(e=e.firstContext;e!==null;){if(!Tn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function yl(e){bl=e,ma=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function on(e){return ud(bl,e)}function qi(e,t){return bl===null&&yl(e),ud(e,t)}function ud(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ma===null){if(e===null)throw Error(d(308));ma=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ma=ma.next=t;return n}var F0=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()})}},Q0=i.unstable_scheduleCallback,K0=i.unstable_NormalPriority,Qt={$$typeof:le,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ks(){return{controller:new F0,data:new Map,refCount:0}}function Uo(e){e.refCount--,e.refCount===0&&Q0(K0,function(){e.controller.abort()})}var jo=null,zs=0,Ql=0,Kl=null;function Z0(e,t){if(jo===null){var n=jo=[];zs=0,Ql=Ac(),Kl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return zs++,t.then(dd,dd),t}function dd(){if(--zs===0&&jo!==null){Kl!==null&&(Kl.status="fulfilled");var e=jo;jo=null,Ql=0,Kl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function $0(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 fd=A.S;A.S=function(e,t){Wf=_t(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Z0(e,t),fd!==null&&fd(e,t)};var vl=w(null);function Ms(){var e=vl.current;return e!==null?e:zt.pooledCache}function Yi(e,t){t===null?ne(vl,vl.current):ne(vl,t.pool)}function hd(){var e=Ms();return e===null?null:{parent:Qt._currentValue,pool:e}}var Zl=Error(d(460)),Ds=Error(d(474)),Gi=Error(d(542)),Xi={then:function(){}};function pd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function gd(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(fa,fa),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,bd(e),e;default:if(typeof t.status=="string")t.then(fa,fa);else{if(e=zt,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,bd(e),e}throw Sl=t,Zl}}function xl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Sl=n,Zl):n}}var Sl=null;function md(){if(Sl===null)throw Error(d(459));var e=Sl;return Sl=null,e}function bd(e){if(e===Zl||e===Gi)throw Error(d(483))}var $l=null,No=0;function Vi(e){var t=No;return No+=1,$l===null&&($l=[]),gd($l,e,t)}function qo(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Fi(e,t){throw t.$$typeof===R?Error(d(525)):(e=Object.prototype.toString.call(t),Error(d(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function yd(e){function t(D,k){if(e){var E=D.deletions;E===null?(D.deletions=[k],D.flags|=16):E.push(k)}}function n(D,k){if(!e)return null;for(;k!==null;)t(D,k),k=k.sibling;return null}function a(D){for(var k=new Map;D!==null;)D.key!==null?k.set(D.key,D):k.set(D.index,D),D=D.sibling;return k}function l(D,k){return D=pa(D,k),D.index=0,D.sibling=null,D}function o(D,k,E){return D.index=E,e?(E=D.alternate,E!==null?(E=E.index,E<k?(D.flags|=67108866,k):E):(D.flags|=67108866,k)):(D.flags|=1048576,k)}function u(D){return e&&D.alternate===null&&(D.flags|=67108866),D}function p(D,k,E,K){return k===null||k.tag!==6?(k=gs(E,D.mode,K),k.return=D,k):(k=l(k,E),k.return=D,k)}function C(D,k,E,K){var Ee=E.type;return Ee===X?G(D,k,E.props.children,K,E.key):k!==null&&(k.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===oe&&xl(Ee)===k.type)?(k=l(k,E.props),qo(k,E),k.return=D,k):(k=Ui(E.type,E.key,E.props,null,D.mode,K),qo(k,E),k.return=D,k)}function L(D,k,E,K){return k===null||k.tag!==4||k.stateNode.containerInfo!==E.containerInfo||k.stateNode.implementation!==E.implementation?(k=ms(E,D.mode,K),k.return=D,k):(k=l(k,E.children||[]),k.return=D,k)}function G(D,k,E,K,Ee){return k===null||k.tag!==7?(k=gl(E,D.mode,K,Ee),k.return=D,k):(k=l(k,E),k.return=D,k)}function Z(D,k,E){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=gs(""+k,D.mode,E),k.return=D,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case Y:return E=Ui(k.type,k.key,k.props,null,D.mode,E),qo(E,k),E.return=D,E;case U:return k=ms(k,D.mode,E),k.return=D,k;case oe:return k=xl(k),Z(D,k,E)}if(Ae(k)||pe(k))return k=gl(k,D.mode,E,null),k.return=D,k;if(typeof k.then=="function")return Z(D,Vi(k),E);if(k.$$typeof===le)return Z(D,qi(D,k),E);Fi(D,k)}return null}function _(D,k,E,K){var Ee=k!==null?k.key:null;if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return Ee!==null?null:p(D,k,""+E,K);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case Y:return E.key===Ee?C(D,k,E,K):null;case U:return E.key===Ee?L(D,k,E,K):null;case oe:return E=xl(E),_(D,k,E,K)}if(Ae(E)||pe(E))return Ee!==null?null:G(D,k,E,K,null);if(typeof E.then=="function")return _(D,k,Vi(E),K);if(E.$$typeof===le)return _(D,k,qi(D,E),K);Fi(D,E)}return null}function j(D,k,E,K,Ee){if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return D=D.get(E)||null,p(k,D,""+K,Ee);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case Y:return D=D.get(K.key===null?E:K.key)||null,C(k,D,K,Ee);case U:return D=D.get(K.key===null?E:K.key)||null,L(k,D,K,Ee);case oe:return K=xl(K),j(D,k,E,K,Ee)}if(Ae(K)||pe(K))return D=D.get(E)||null,G(k,D,K,Ee,null);if(typeof K.then=="function")return j(D,k,E,Vi(K),Ee);if(K.$$typeof===le)return j(D,k,E,qi(k,K),Ee);Fi(k,K)}return null}function ye(D,k,E,K){for(var Ee=null,rt=null,Ce=k,Ke=k=0,Ie=null;Ce!==null&&Ke<E.length;Ke++){Ce.index>Ke?(Ie=Ce,Ce=null):Ie=Ce.sibling;var st=_(D,Ce,E[Ke],K);if(st===null){Ce===null&&(Ce=Ie);break}e&&Ce&&st.alternate===null&&t(D,Ce),k=o(st,k,Ke),rt===null?Ee=st:rt.sibling=st,rt=st,Ce=Ie}if(Ke===E.length)return n(D,Ce),nt&&ga(D,Ke),Ee;if(Ce===null){for(;Ke<E.length;Ke++)Ce=Z(D,E[Ke],K),Ce!==null&&(k=o(Ce,k,Ke),rt===null?Ee=Ce:rt.sibling=Ce,rt=Ce);return nt&&ga(D,Ke),Ee}for(Ce=a(Ce);Ke<E.length;Ke++)Ie=j(Ce,D,Ke,E[Ke],K),Ie!==null&&(e&&Ie.alternate!==null&&Ce.delete(Ie.key===null?Ke:Ie.key),k=o(Ie,k,Ke),rt===null?Ee=Ie:rt.sibling=Ie,rt=Ie);return e&&Ce.forEach(function(al){return t(D,al)}),nt&&ga(D,Ke),Ee}function _e(D,k,E,K){if(E==null)throw Error(d(151));for(var Ee=null,rt=null,Ce=k,Ke=k=0,Ie=null,st=E.next();Ce!==null&&!st.done;Ke++,st=E.next()){Ce.index>Ke?(Ie=Ce,Ce=null):Ie=Ce.sibling;var al=_(D,Ce,st.value,K);if(al===null){Ce===null&&(Ce=Ie);break}e&&Ce&&al.alternate===null&&t(D,Ce),k=o(al,k,Ke),rt===null?Ee=al:rt.sibling=al,rt=al,Ce=Ie}if(st.done)return n(D,Ce),nt&&ga(D,Ke),Ee;if(Ce===null){for(;!st.done;Ke++,st=E.next())st=Z(D,st.value,K),st!==null&&(k=o(st,k,Ke),rt===null?Ee=st:rt.sibling=st,rt=st);return nt&&ga(D,Ke),Ee}for(Ce=a(Ce);!st.done;Ke++,st=E.next())st=j(Ce,D,Ke,st.value,K),st!==null&&(e&&st.alternate!==null&&Ce.delete(st.key===null?Ke:st.key),k=o(st,k,Ke),rt===null?Ee=st:rt.sibling=st,rt=st);return e&&Ce.forEach(function(im){return t(D,im)}),nt&&ga(D,Ke),Ee}function kt(D,k,E,K){if(typeof E=="object"&&E!==null&&E.type===X&&E.key===null&&(E=E.props.children),typeof E=="object"&&E!==null){switch(E.$$typeof){case Y:e:{for(var Ee=E.key;k!==null;){if(k.key===Ee){if(Ee=E.type,Ee===X){if(k.tag===7){n(D,k.sibling),K=l(k,E.props.children),K.return=D,D=K;break e}}else if(k.elementType===Ee||typeof Ee=="object"&&Ee!==null&&Ee.$$typeof===oe&&xl(Ee)===k.type){n(D,k.sibling),K=l(k,E.props),qo(K,E),K.return=D,D=K;break e}n(D,k);break}else t(D,k);k=k.sibling}E.type===X?(K=gl(E.props.children,D.mode,K,E.key),K.return=D,D=K):(K=Ui(E.type,E.key,E.props,null,D.mode,K),qo(K,E),K.return=D,D=K)}return u(D);case U:e:{for(Ee=E.key;k!==null;){if(k.key===Ee)if(k.tag===4&&k.stateNode.containerInfo===E.containerInfo&&k.stateNode.implementation===E.implementation){n(D,k.sibling),K=l(k,E.children||[]),K.return=D,D=K;break e}else{n(D,k);break}else t(D,k);k=k.sibling}K=ms(E,D.mode,K),K.return=D,D=K}return u(D);case oe:return E=xl(E),kt(D,k,E,K)}if(Ae(E))return ye(D,k,E,K);if(pe(E)){if(Ee=pe(E),typeof Ee!="function")throw Error(d(150));return E=Ee.call(E),_e(D,k,E,K)}if(typeof E.then=="function")return kt(D,k,Vi(E),K);if(E.$$typeof===le)return kt(D,k,qi(D,E),K);Fi(D,E)}return typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint"?(E=""+E,k!==null&&k.tag===6?(n(D,k.sibling),K=l(k,E),K.return=D,D=K):(n(D,k),K=gs(E,D.mode,K),K.return=D,D=K),u(D)):n(D,k)}return function(D,k,E,K){try{No=0;var Ee=kt(D,k,E,K);return $l=null,Ee}catch(Ce){if(Ce===Zl||Ce===Gi)throw Ce;var rt=En(29,Ce,null,D.mode);return rt.lanes=K,rt.return=D,rt}}}var wl=yd(!0),vd=yd(!1),qa=!1;function As(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ts(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 Ya(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ga(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(dt&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=Hi(e),nd(e,null,n),t}return Bi(e,a,t,n),Hi(e)}function Yo(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,O(e,n)}}function Es(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 u={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};o===null?l=o=u:o=o.next=u,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 Ls=!1;function Go(){if(Ls){var e=Kl;if(e!==null)throw e}}function Xo(e,t,n,a){Ls=!1;var l=e.updateQueue;qa=!1;var o=l.firstBaseUpdate,u=l.lastBaseUpdate,p=l.shared.pending;if(p!==null){l.shared.pending=null;var C=p,L=C.next;C.next=null,u===null?o=L:u.next=L,u=C;var G=e.alternate;G!==null&&(G=G.updateQueue,p=G.lastBaseUpdate,p!==u&&(p===null?G.firstBaseUpdate=L:p.next=L,G.lastBaseUpdate=C))}if(o!==null){var Z=l.baseState;u=0,G=L=C=null,p=o;do{var _=p.lane&-536870913,j=_!==p.lane;if(j?(Je&_)===_:(a&_)===_){_!==0&&_===Ql&&(Ls=!0),G!==null&&(G=G.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var ye=e,_e=p;_=t;var kt=n;switch(_e.tag){case 1:if(ye=_e.payload,typeof ye=="function"){Z=ye.call(kt,Z,_);break e}Z=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=_e.payload,_=typeof ye=="function"?ye.call(kt,Z,_):ye,_==null)break e;Z=z({},Z,_);break e;case 2:qa=!0}}_=p.callback,_!==null&&(e.flags|=64,j&&(e.flags|=8192),j=l.callbacks,j===null?l.callbacks=[_]:j.push(_))}else j={lane:_,tag:p.tag,payload:p.payload,callback:p.callback,next:null},G===null?(L=G=j,C=Z):G=G.next=j,u|=_;if(p=p.next,p===null){if(p=l.shared.pending,p===null)break;j=p,p=j.next,j.next=null,l.lastBaseUpdate=j,l.shared.pending=null}}while(!0);G===null&&(C=Z),l.baseState=C,l.firstBaseUpdate=L,l.lastBaseUpdate=G,o===null&&(l.shared.lanes=0),Ka|=u,e.lanes=u,e.memoizedState=Z}}function xd(e,t){if(typeof e!="function")throw Error(d(191,e));e.call(t)}function Sd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)xd(n[e],t)}var Wl=w(null),Qi=w(0);function wd(e,t){e=Ma,ne(Qi,e),ne(Wl,t),Ma=e|t.baseLanes}function Rs(){ne(Qi,Ma),ne(Wl,Wl.current)}function _s(){Ma=Qi.current,H(Wl),H(Qi)}var Ln=w(null),Fn=null;function Xa(e){var t=e.alternate;ne(Gt,Gt.current&1),ne(Ln,e),Fn===null&&(t===null||Wl.current!==null||t.memoizedState!==null)&&(Fn=e)}function Os(e){ne(Gt,Gt.current),ne(Ln,e),Fn===null&&(Fn=e)}function Cd(e){e.tag===22?(ne(Gt,Gt.current),ne(Ln,e),Fn===null&&(Fn=e)):Va()}function Va(){ne(Gt,Gt.current),ne(Ln,Ln.current)}function Rn(e){H(Ln),Fn===e&&(Fn=null),H(Gt)}var Gt=w(0);function Ki(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||qc(n)||Yc(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 ya=0,Qe=null,wt=null,Kt=null,Zi=!1,Jl=!1,Cl=!1,$i=0,Vo=0,Il=null,W0=0;function jt(){throw Error(d(321))}function Bs(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tn(e[n],t[n]))return!1;return!0}function Hs(e,t,n,a,l,o){return ya=o,Qe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,A.H=e===null||e.memoizedState===null?rf:Js,Cl=!1,o=n(a,l),Cl=!1,Jl&&(o=zd(t,n,a,l)),kd(e),o}function kd(e){A.H=Ko;var t=wt!==null&&wt.next!==null;if(ya=0,Kt=wt=Qe=null,Zi=!1,Vo=0,Il=null,t)throw Error(d(300));e===null||Zt||(e=e.dependencies,e!==null&&Ni(e)&&(Zt=!0))}function zd(e,t,n,a){Qe=e;var l=0;do{if(Jl&&(Il=null),Vo=0,Jl=!1,25<=l)throw Error(d(301));if(l+=1,Kt=wt=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}A.H=sf,o=t(n,a)}while(Jl);return o}function J0(){var e=A.H,t=e.useState()[0];return t=typeof t.then=="function"?Fo(t):t,e=e.useState()[0],(wt!==null?wt.memoizedState:null)!==e&&(Qe.flags|=1024),t}function Us(){var e=$i!==0;return $i=0,e}function js(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ns(e){if(Zi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Zi=!1}ya=0,Kt=wt=Qe=null,Jl=!1,Vo=$i=0,Il=null}function mn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Kt===null?Qe.memoizedState=Kt=e:Kt=Kt.next=e,Kt}function Xt(){if(wt===null){var e=Qe.alternate;e=e!==null?e.memoizedState:null}else e=wt.next;var t=Kt===null?Qe.memoizedState:Kt.next;if(t!==null)Kt=t,wt=e;else{if(e===null)throw Qe.alternate===null?Error(d(467)):Error(d(310));wt=e,e={memoizedState:wt.memoizedState,baseState:wt.baseState,baseQueue:wt.baseQueue,queue:wt.queue,next:null},Kt===null?Qe.memoizedState=Kt=e:Kt=Kt.next=e}return Kt}function Wi(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Fo(e){var t=Vo;return Vo+=1,Il===null&&(Il=[]),e=gd(Il,e,t),t=Qe,(Kt===null?t.memoizedState:Kt.next)===null&&(t=t.alternate,A.H=t===null||t.memoizedState===null?rf:Js),e}function Ji(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Fo(e);if(e.$$typeof===le)return on(e)}throw Error(d(438,String(e)))}function qs(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=Wi(),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]=q;return t.index++,n}function va(e,t){return typeof t=="function"?t(e):t}function Ii(e){var t=Xt();return Ys(t,wt,e)}function Ys(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 u=l.next;l.next=o.next,o.next=u}t.baseQueue=l=o,a.pending=null}if(o=e.baseState,l===null)e.memoizedState=o;else{t=l.next;var p=u=null,C=null,L=t,G=!1;do{var Z=L.lane&-536870913;if(Z!==L.lane?(Je&Z)===Z:(ya&Z)===Z){var _=L.revertLane;if(_===0)C!==null&&(C=C.next={lane:0,revertLane:0,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null}),Z===Ql&&(G=!0);else if((ya&_)===_){L=L.next,_===Ql&&(G=!0);continue}else Z={lane:0,revertLane:L.revertLane,gesture:null,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},C===null?(p=C=Z,u=o):C=C.next=Z,Qe.lanes|=_,Ka|=_;Z=L.action,Cl&&n(o,Z),o=L.hasEagerState?L.eagerState:n(o,Z)}else _={lane:Z,revertLane:L.revertLane,gesture:L.gesture,action:L.action,hasEagerState:L.hasEagerState,eagerState:L.eagerState,next:null},C===null?(p=C=_,u=o):C=C.next=_,Qe.lanes|=Z,Ka|=Z;L=L.next}while(L!==null&&L!==t);if(C===null?u=o:C.next=p,!Tn(o,e.memoizedState)&&(Zt=!0,G&&(n=Kl,n!==null)))throw n;e.memoizedState=o,e.baseState=u,e.baseQueue=C,a.lastRenderedState=o}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Gs(e){var t=Xt(),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 u=l=l.next;do o=e(o,u.action),u=u.next;while(u!==l);Tn(o,t.memoizedState)||(Zt=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,a]}function Md(e,t,n){var a=Qe,l=Xt(),o=nt;if(o){if(n===void 0)throw Error(d(407));n=n()}else n=t();var u=!Tn((wt||l).memoizedState,n);if(u&&(l.memoizedState=n,Zt=!0),l=l.queue,Fs(Td.bind(null,a,l,e),[e]),l.getSnapshot!==t||u||Kt!==null&&Kt.memoizedState.tag&1){if(a.flags|=2048,Pl(9,{destroy:void 0},Ad.bind(null,a,l,n,t),null),zt===null)throw Error(d(349));o||(ya&127)!==0||Dd(a,t,n)}return n}function Dd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Qe.updateQueue,t===null?(t=Wi(),Qe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Ad(e,t,n,a){t.value=n,t.getSnapshot=a,Ed(t)&&Ld(e)}function Td(e,t,n){return n(function(){Ed(t)&&Ld(e)})}function Ed(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tn(e,n)}catch{return!0}}function Ld(e){var t=pl(e,2);t!==null&&kn(t,e,2)}function Xs(e){var t=mn();if(typeof e=="function"){var n=e;if(e=n(),Cl){St(!0);try{n()}finally{St(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:e},t}function Rd(e,t,n,a){return e.baseState=n,Ys(e,wt,typeof a=="function"?a:va)}function I0(e,t,n,a,l){if(tr(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(u){o.listeners.push(u)}};A.T!==null?n(!0):o.isTransition=!1,a(o),n=t.pending,n===null?(o.next=t.pending=o,_d(t,o)):(o.next=n.next,t.pending=n.next=o)}}function _d(e,t){var n=t.action,a=t.payload,l=e.state;if(t.isTransition){var o=A.T,u={};A.T=u;try{var p=n(l,a),C=A.S;C!==null&&C(u,p),Od(e,t,p)}catch(L){Vs(e,t,L)}finally{o!==null&&u.types!==null&&(o.types=u.types),A.T=o}}else try{o=n(l,a),Od(e,t,o)}catch(L){Vs(e,t,L)}}function Od(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Bd(e,t,a)},function(a){return Vs(e,t,a)}):Bd(e,t,n)}function Bd(e,t,n){t.status="fulfilled",t.value=n,Hd(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,_d(e,n)))}function Vs(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Hd(t),t=t.next;while(t!==a)}e.action=null}function Hd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ud(e,t){return t}function jd(e,t){if(nt){var n=zt.formState;if(n!==null){e:{var a=Qe;if(nt){if(Et){t:{for(var l=Et,o=Vn;l.nodeType!==8;){if(!o){l=null;break t}if(l=Qn(l.nextSibling),l===null){l=null;break t}}o=l.data,l=o==="F!"||o==="F"?l:null}if(l){Et=Qn(l.nextSibling),a=l.data==="F!";break e}}ja(a)}a=!1}a&&(t=n[0])}}return n=mn(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ud,lastRenderedState:t},n.queue=a,n=af.bind(null,Qe,a),a.dispatch=n,a=Xs(!1),o=Ws.bind(null,Qe,!1,a.queue),a=mn(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=I0.bind(null,Qe,l,o,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function Nd(e){var t=Xt();return qd(t,wt,e)}function qd(e,t,n){if(t=Ys(e,t,Ud)[0],e=Ii(va)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Fo(t)}catch(u){throw u===Zl?Gi:u}else a=t;t=Xt();var l=t.queue,o=l.dispatch;return n!==t.memoizedState&&(Qe.flags|=2048,Pl(9,{destroy:void 0},P0.bind(null,l,n),null)),[a,o,e]}function P0(e,t){e.action=t}function Yd(e){var t=Xt(),n=wt;if(n!==null)return qd(t,n,e);Xt(),t=t.memoizedState,n=Xt();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Pl(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Qe.updateQueue,t===null&&(t=Wi(),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 Gd(){return Xt().memoizedState}function Pi(e,t,n,a){var l=mn();Qe.flags|=e,l.memoizedState=Pl(1|t,{destroy:void 0},n,a===void 0?null:a)}function er(e,t,n,a){var l=Xt();a=a===void 0?null:a;var o=l.memoizedState.inst;wt!==null&&a!==null&&Bs(a,wt.memoizedState.deps)?l.memoizedState=Pl(t,o,n,a):(Qe.flags|=e,l.memoizedState=Pl(1|t,o,n,a))}function Xd(e,t){Pi(8390656,8,e,t)}function Fs(e,t){er(2048,8,e,t)}function eg(e){Qe.flags|=4;var t=Qe.updateQueue;if(t===null)t=Wi(),Qe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Vd(e){var t=Xt().memoizedState;return eg({ref:t,nextImpl:e}),function(){if((dt&2)!==0)throw Error(d(440));return t.impl.apply(void 0,arguments)}}function Fd(e,t){return er(4,2,e,t)}function Qd(e,t){return er(4,4,e,t)}function Kd(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 Zd(e,t,n){n=n!=null?n.concat([e]):null,er(4,4,Kd.bind(null,t,e),n)}function Qs(){}function $d(e,t){var n=Xt();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Bs(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Wd(e,t){var n=Xt();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Bs(t,a[1]))return a[0];if(a=e(),Cl){St(!0);try{e()}finally{St(!1)}}return n.memoizedState=[a,t],a}function Ks(e,t,n){return n===void 0||(ya&1073741824)!==0&&(Je&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=If(),Qe.lanes|=e,Ka|=e,n)}function Jd(e,t,n,a){return Tn(n,t)?n:Wl.current!==null?(e=Ks(e,n,a),Tn(e,t)||(Zt=!0),e):(ya&42)===0||(ya&1073741824)!==0&&(Je&261930)===0?(Zt=!0,e.memoizedState=n):(e=If(),Qe.lanes|=e,Ka|=e,t)}function Id(e,t,n,a,l){var o=J.p;J.p=o!==0&&8>o?o:8;var u=A.T,p={};A.T=p,Ws(e,!1,t,n);try{var C=l(),L=A.S;if(L!==null&&L(p,C),C!==null&&typeof C=="object"&&typeof C.then=="function"){var G=$0(C,a);Qo(e,t,G,Bn(e))}else Qo(e,t,a,Bn(e))}catch(Z){Qo(e,t,{then:function(){},status:"rejected",reason:Z},Bn())}finally{J.p=o,u!==null&&p.types!==null&&(u.types=p.types),A.T=u}}function tg(){}function Zs(e,t,n,a){if(e.tag!==5)throw Error(d(476));var l=Pd(e).queue;Id(e,l,t,ee,n===null?tg:function(){return ef(e),n(a)})}function Pd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ee,baseState:ee,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:ee},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:va,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ef(e){var t=Pd(e);t.next===null&&(t=e.alternate.memoizedState),Qo(e,t.next.queue,{},Bn())}function $s(){return on(ci)}function tf(){return Xt().memoizedState}function nf(){return Xt().memoizedState}function ng(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Bn();e=Ya(n);var a=Ga(t,e,n);a!==null&&(kn(a,t,n),Yo(a,t,n)),t={cache:ks()},e.payload=t;return}t=t.return}}function ag(e,t,n){var a=Bn();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},tr(e)?lf(t,n):(n=hs(e,t,n,a),n!==null&&(kn(n,e,a),of(n,t,a)))}function af(e,t,n){var a=Bn();Qo(e,t,n,a)}function Qo(e,t,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(tr(e))lf(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var u=t.lastRenderedState,p=o(u,n);if(l.hasEagerState=!0,l.eagerState=p,Tn(p,u))return Bi(e,t,l,0),zt===null&&Oi(),!1}catch{}if(n=hs(e,t,l,a),n!==null)return kn(n,e,a),of(n,t,a),!0}return!1}function Ws(e,t,n,a){if(a={lane:2,revertLane:Ac(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},tr(e)){if(t)throw Error(d(479))}else t=hs(e,n,a,2),t!==null&&kn(t,e,2)}function tr(e){var t=e.alternate;return e===Qe||t!==null&&t===Qe}function lf(e,t){Jl=Zi=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function of(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,O(e,n)}}var Ko={readContext:on,use:Ji,useCallback:jt,useContext:jt,useEffect:jt,useImperativeHandle:jt,useLayoutEffect:jt,useInsertionEffect:jt,useMemo:jt,useReducer:jt,useRef:jt,useState:jt,useDebugValue:jt,useDeferredValue:jt,useTransition:jt,useSyncExternalStore:jt,useId:jt,useHostTransitionStatus:jt,useFormState:jt,useActionState:jt,useOptimistic:jt,useMemoCache:jt,useCacheRefresh:jt};Ko.useEffectEvent=jt;var rf={readContext:on,use:Ji,useCallback:function(e,t){return mn().memoizedState=[e,t===void 0?null:t],e},useContext:on,useEffect:Xd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Pi(4194308,4,Kd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Pi(4194308,4,e,t)},useInsertionEffect:function(e,t){Pi(4,2,e,t)},useMemo:function(e,t){var n=mn();t=t===void 0?null:t;var a=e();if(Cl){St(!0);try{e()}finally{St(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=mn();if(n!==void 0){var l=n(t);if(Cl){St(!0);try{n(t)}finally{St(!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=ag.bind(null,Qe,e),[a.memoizedState,e]},useRef:function(e){var t=mn();return e={current:e},t.memoizedState=e},useState:function(e){e=Xs(e);var t=e.queue,n=af.bind(null,Qe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Qs,useDeferredValue:function(e,t){var n=mn();return Ks(n,e,t)},useTransition:function(){var e=Xs(!1);return e=Id.bind(null,Qe,e.queue,!0,!1),mn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Qe,l=mn();if(nt){if(n===void 0)throw Error(d(407));n=n()}else{if(n=t(),zt===null)throw Error(d(349));(Je&127)!==0||Dd(a,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,Xd(Td.bind(null,a,o,e),[e]),a.flags|=2048,Pl(9,{destroy:void 0},Ad.bind(null,a,o,n,t),null),n},useId:function(){var e=mn(),t=zt.identifierPrefix;if(nt){var n=ta,a=ea;n=(a&~(1<<32-at(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=$i++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=W0++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:$s,useFormState:jd,useActionState:jd,useOptimistic:function(e){var t=mn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ws.bind(null,Qe,!0,n),n.dispatch=t,[e,t]},useMemoCache:qs,useCacheRefresh:function(){return mn().memoizedState=ng.bind(null,Qe)},useEffectEvent:function(e){var t=mn(),n={impl:e};return t.memoizedState=n,function(){if((dt&2)!==0)throw Error(d(440));return n.impl.apply(void 0,arguments)}}},Js={readContext:on,use:Ji,useCallback:$d,useContext:on,useEffect:Fs,useImperativeHandle:Zd,useInsertionEffect:Fd,useLayoutEffect:Qd,useMemo:Wd,useReducer:Ii,useRef:Gd,useState:function(){return Ii(va)},useDebugValue:Qs,useDeferredValue:function(e,t){var n=Xt();return Jd(n,wt.memoizedState,e,t)},useTransition:function(){var e=Ii(va)[0],t=Xt().memoizedState;return[typeof e=="boolean"?e:Fo(e),t]},useSyncExternalStore:Md,useId:tf,useHostTransitionStatus:$s,useFormState:Nd,useActionState:Nd,useOptimistic:function(e,t){var n=Xt();return Rd(n,wt,e,t)},useMemoCache:qs,useCacheRefresh:nf};Js.useEffectEvent=Vd;var sf={readContext:on,use:Ji,useCallback:$d,useContext:on,useEffect:Fs,useImperativeHandle:Zd,useInsertionEffect:Fd,useLayoutEffect:Qd,useMemo:Wd,useReducer:Gs,useRef:Gd,useState:function(){return Gs(va)},useDebugValue:Qs,useDeferredValue:function(e,t){var n=Xt();return wt===null?Ks(n,e,t):Jd(n,wt.memoizedState,e,t)},useTransition:function(){var e=Gs(va)[0],t=Xt().memoizedState;return[typeof e=="boolean"?e:Fo(e),t]},useSyncExternalStore:Md,useId:tf,useHostTransitionStatus:$s,useFormState:Yd,useActionState:Yd,useOptimistic:function(e,t){var n=Xt();return wt!==null?Rd(n,wt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:qs,useCacheRefresh:nf};sf.useEffectEvent=Vd;function Is(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:z({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ps={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Bn(),l=Ya(a);l.payload=t,n!=null&&(l.callback=n),t=Ga(e,l,a),t!==null&&(kn(t,e,a),Yo(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Bn(),l=Ya(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Ga(e,l,a),t!==null&&(kn(t,e,a),Yo(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Bn(),a=Ya(n);a.tag=2,t!=null&&(a.callback=t),t=Ga(e,a,n),t!==null&&(kn(t,e,n),Yo(t,e,n))}};function cf(e,t,n,a,l,o,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,o,u):t.prototype&&t.prototype.isPureReactComponent?!_o(n,a)||!_o(l,o):!0}function uf(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&&Ps.enqueueReplaceState(t,t.state,null)}function kl(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=z({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function df(e){_i(e)}function ff(e){console.error(e)}function hf(e){_i(e)}function nr(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function pf(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 ec(e,t,n){return n=Ya(n),n.tag=3,n.payload={element:null},n.callback=function(){nr(e,t)},n}function gf(e){return e=Ya(e),e.tag=3,e}function mf(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(){pf(t,n,a)}}var u=n.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(e.callback=function(){pf(t,n,a),typeof l!="function"&&(Za===null?Za=new Set([this]):Za.add(this));var p=a.stack;this.componentDidCatch(a.value,{componentStack:p!==null?p:""})})}function lg(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Fl(t,n,l,!0),n=Ln.current,n!==null){switch(n.tag){case 31:case 13:return Fn===null?pr():n.alternate===null&&Nt===0&&(Nt=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===Xi?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),zc(e,a,l)),!1;case 22:return n.flags|=65536,a===Xi?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)),zc(e,a,l)),!1}throw Error(d(435,n.tag))}return zc(e,a,l),pr(),!1}if(nt)return t=Ln.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==vs&&(e=Error(d(422),{cause:a}),Ho(Yn(e,n)))):(a!==vs&&(t=Error(d(423),{cause:a}),Ho(Yn(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=Yn(a,n),l=ec(e.stateNode,a,l),Es(e,l),Nt!==4&&(Nt=2)),!1;var o=Error(d(520),{cause:a});if(o=Yn(o,n),ti===null?ti=[o]:ti.push(o),Nt!==4&&(Nt=2),t===null)return!0;a=Yn(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=ec(n.stateNode,a,e),Es(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"&&(Za===null||!Za.has(o))))return n.flags|=65536,l&=-l,n.lanes|=l,l=gf(l),mf(l,e,n,a),Es(n,l),!1}n=n.return}while(n!==null);return!1}var tc=Error(d(461)),Zt=!1;function rn(e,t,n,a){t.child=e===null?vd(t,null,n,a):wl(t,e.child,n,a)}function bf(e,t,n,a,l){n=n.render;var o=t.ref;if("ref"in a){var u={};for(var p in a)p!=="ref"&&(u[p]=a[p])}else u=a;return yl(t),a=Hs(e,t,n,u,o,l),p=Us(),e!==null&&!Zt?(js(e,t,l),xa(e,t,l)):(nt&&p&&bs(t),t.flags|=1,rn(e,t,a,l),t.child)}function yf(e,t,n,a,l){if(e===null){var o=n.type;return typeof o=="function"&&!ps(o)&&o.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=o,vf(e,t,o,a,l)):(e=Ui(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!cc(e,l)){var u=o.memoizedProps;if(n=n.compare,n=n!==null?n:_o,n(u,a)&&e.ref===t.ref)return xa(e,t,l)}return t.flags|=1,e=pa(o,a),e.ref=t.ref,e.return=t,t.child=e}function vf(e,t,n,a,l){if(e!==null){var o=e.memoizedProps;if(_o(o,a)&&e.ref===t.ref)if(Zt=!1,t.pendingProps=a=o,cc(e,l))(e.flags&131072)!==0&&(Zt=!0);else return t.lanes=e.lanes,xa(e,t,l)}return nc(e,t,n,a,l)}function xf(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 Sf(e,t,o,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Yi(t,o!==null?o.cachePool:null),o!==null?wd(t,o):Rs(),Cd(t);else return a=t.lanes=536870912,Sf(e,t,o!==null?o.baseLanes|n:n,n,a)}else o!==null?(Yi(t,o.cachePool),wd(t,o),Va(),t.memoizedState=null):(e!==null&&Yi(t,null),Rs(),Va());return rn(e,t,l,n),t.child}function Zo(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Sf(e,t,n,a,l){var o=Ms();return o=o===null?null:{parent:Qt._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},e!==null&&Yi(t,null),Rs(),Cd(t),e!==null&&Fl(e,t,a,!0),t.childLanes=l,null}function ar(e,t){return t=or({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function wf(e,t,n){return wl(t,e.child,null,n),e=ar(t,t.pendingProps),e.flags|=2,Rn(t),t.memoizedState=null,e}function og(e,t,n){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(nt){if(a.mode==="hidden")return e=ar(t,a),t.lanes=536870912,Zo(null,e);if(Os(t),(e=Et)?(e=Oh(e,Vn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ha!==null?{id:ea,overflow:ta}:null,retryLane:536870912,hydrationErrors:null},n=ld(e),n.return=t,t.child=n,ln=t,Et=null)):e=null,e===null)throw ja(t);return t.lanes=536870912,null}return ar(t,a)}var o=e.memoizedState;if(o!==null){var u=o.dehydrated;if(Os(t),l)if(t.flags&256)t.flags&=-257,t=wf(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(d(558));else if(Zt||Fl(e,t,n,!1),l=(n&e.childLanes)!==0,Zt||l){if(a=zt,a!==null&&(u=Be(a,n),u!==0&&u!==o.retryLane))throw o.retryLane=u,pl(e,u),kn(a,e,u),tc;pr(),t=wf(e,t,n)}else e=o.treeContext,Et=Qn(u.nextSibling),ln=t,nt=!0,Ua=null,Vn=!1,e!==null&&rd(t,e),t=ar(t,a),t.flags|=4096;return t}return e=pa(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function lr(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 nc(e,t,n,a,l){return yl(t),n=Hs(e,t,n,a,void 0,l),a=Us(),e!==null&&!Zt?(js(e,t,l),xa(e,t,l)):(nt&&a&&bs(t),t.flags|=1,rn(e,t,n,l),t.child)}function Cf(e,t,n,a,l,o){return yl(t),t.updateQueue=null,n=zd(t,a,n,l),kd(e),a=Us(),e!==null&&!Zt?(js(e,t,o),xa(e,t,o)):(nt&&a&&bs(t),t.flags|=1,rn(e,t,n,o),t.child)}function kf(e,t,n,a,l){if(yl(t),t.stateNode===null){var o=Yl,u=n.contextType;typeof u=="object"&&u!==null&&(o=on(u)),o=new n(a,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=Ps,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=a,o.state=t.memoizedState,o.refs={},As(t),u=n.contextType,o.context=typeof u=="object"&&u!==null?on(u):Yl,o.state=t.memoizedState,u=n.getDerivedStateFromProps,typeof u=="function"&&(Is(t,n,u,a),o.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(u=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),u!==o.state&&Ps.enqueueReplaceState(o,o.state,null),Xo(t,a,o,l),Go(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){o=t.stateNode;var p=t.memoizedProps,C=kl(n,p);o.props=C;var L=o.context,G=n.contextType;u=Yl,typeof G=="object"&&G!==null&&(u=on(G));var Z=n.getDerivedStateFromProps;G=typeof Z=="function"||typeof o.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,G||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(p||L!==u)&&uf(t,o,a,u),qa=!1;var _=t.memoizedState;o.state=_,Xo(t,a,o,l),Go(),L=t.memoizedState,p||_!==L||qa?(typeof Z=="function"&&(Is(t,n,Z,a),L=t.memoizedState),(C=qa||cf(t,n,C,a,_,L,u))?(G||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=L),o.props=a,o.state=L,o.context=u,a=C):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{o=t.stateNode,Ts(e,t),u=t.memoizedProps,G=kl(n,u),o.props=G,Z=t.pendingProps,_=o.context,L=n.contextType,C=Yl,typeof L=="object"&&L!==null&&(C=on(L)),p=n.getDerivedStateFromProps,(L=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(u!==Z||_!==C)&&uf(t,o,a,C),qa=!1,_=t.memoizedState,o.state=_,Xo(t,a,o,l),Go();var j=t.memoizedState;u!==Z||_!==j||qa||e!==null&&e.dependencies!==null&&Ni(e.dependencies)?(typeof p=="function"&&(Is(t,n,p,a),j=t.memoizedState),(G=qa||cf(t,n,G,a,_,j,C)||e!==null&&e.dependencies!==null&&Ni(e.dependencies))?(L||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(a,j,C),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(a,j,C)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=j),o.props=a,o.state=j,o.context=C,a=G):(typeof o.componentDidUpdate!="function"||u===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),a=!1)}return o=a,lr(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=wl(t,e.child,null,l),t.child=wl(t,null,n,l)):rn(e,t,n,l),t.memoizedState=o.state,e=t.child):e=xa(e,t,l),e}function zf(e,t,n,a){return ml(),t.flags|=256,rn(e,t,n,a),t.child}var ac={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function lc(e){return{baseLanes:e,cachePool:hd()}}function oc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=On),e}function Mf(e,t,n){var a=t.pendingProps,l=!1,o=(t.flags&128)!==0,u;if((u=o)||(u=e!==null&&e.memoizedState===null?!1:(Gt.current&2)!==0),u&&(l=!0,t.flags&=-129),u=(t.flags&32)!==0,t.flags&=-33,e===null){if(nt){if(l?Xa(t):Va(),(e=Et)?(e=Oh(e,Vn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ha!==null?{id:ea,overflow:ta}:null,retryLane:536870912,hydrationErrors:null},n=ld(e),n.return=t,t.child=n,ln=t,Et=null)):e=null,e===null)throw ja(t);return Yc(e)?t.lanes=32:t.lanes=536870912,null}var p=a.children;return a=a.fallback,l?(Va(),l=t.mode,p=or({mode:"hidden",children:p},l),a=gl(a,l,n,null),p.return=t,a.return=t,p.sibling=a,t.child=p,a=t.child,a.memoizedState=lc(n),a.childLanes=oc(e,u,n),t.memoizedState=ac,Zo(null,a)):(Xa(t),ic(t,p))}var C=e.memoizedState;if(C!==null&&(p=C.dehydrated,p!==null)){if(o)t.flags&256?(Xa(t),t.flags&=-257,t=rc(e,t,n)):t.memoizedState!==null?(Va(),t.child=e.child,t.flags|=128,t=null):(Va(),p=a.fallback,l=t.mode,a=or({mode:"visible",children:a.children},l),p=gl(p,l,n,null),p.flags|=2,a.return=t,p.return=t,a.sibling=p,t.child=a,wl(t,e.child,null,n),a=t.child,a.memoizedState=lc(n),a.childLanes=oc(e,u,n),t.memoizedState=ac,t=Zo(null,a));else if(Xa(t),Yc(p)){if(u=p.nextSibling&&p.nextSibling.dataset,u)var L=u.dgst;u=L,a=Error(d(419)),a.stack="",a.digest=u,Ho({value:a,source:null,stack:null}),t=rc(e,t,n)}else if(Zt||Fl(e,t,n,!1),u=(n&e.childLanes)!==0,Zt||u){if(u=zt,u!==null&&(a=Be(u,n),a!==0&&a!==C.retryLane))throw C.retryLane=a,pl(e,a),kn(u,e,a),tc;qc(p)||pr(),t=rc(e,t,n)}else qc(p)?(t.flags|=192,t.child=e.child,t=null):(e=C.treeContext,Et=Qn(p.nextSibling),ln=t,nt=!0,Ua=null,Vn=!1,e!==null&&rd(t,e),t=ic(t,a.children),t.flags|=4096);return t}return l?(Va(),p=a.fallback,l=t.mode,C=e.child,L=C.sibling,a=pa(C,{mode:"hidden",children:a.children}),a.subtreeFlags=C.subtreeFlags&65011712,L!==null?p=pa(L,p):(p=gl(p,l,n,null),p.flags|=2),p.return=t,a.return=t,a.sibling=p,t.child=a,Zo(null,a),a=t.child,p=e.child.memoizedState,p===null?p=lc(n):(l=p.cachePool,l!==null?(C=Qt._currentValue,l=l.parent!==C?{parent:C,pool:C}:l):l=hd(),p={baseLanes:p.baseLanes|n,cachePool:l}),a.memoizedState=p,a.childLanes=oc(e,u,n),t.memoizedState=ac,Zo(e.child,a)):(Xa(t),n=e.child,e=n.sibling,n=pa(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(u=t.deletions,u===null?(t.deletions=[e],t.flags|=16):u.push(e)),t.child=n,t.memoizedState=null,n)}function ic(e,t){return t=or({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function or(e,t){return e=En(22,e,null,t),e.lanes=0,e}function rc(e,t,n){return wl(t,e.child,null,n),e=ic(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Df(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),ws(e.return,t,n)}function sc(e,t,n,a,l,o){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:l,treeForkCount:o}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=a,u.tail=n,u.tailMode=l,u.treeForkCount=o)}function Af(e,t,n){var a=t.pendingProps,l=a.revealOrder,o=a.tail;a=a.children;var u=Gt.current,p=(u&2)!==0;if(p?(u=u&1|2,t.flags|=128):u&=1,ne(Gt,u),rn(e,t,a,n),a=nt?Bo:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Df(e,n,t);else if(e.tag===19)Df(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&&Ki(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),sc(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&&Ki(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}sc(t,!0,n,null,o,a);break;case"together":sc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function xa(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ka|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Fl(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=pa(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=pa(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function cc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Ni(e)))}function ig(e,t,n){switch(t.tag){case 3:pt(t,t.stateNode.containerInfo),Na(t,Qt,e.memoizedState.cache),ml();break;case 27:case 5:Yt(t);break;case 4:pt(t,t.stateNode.containerInfo);break;case 10:Na(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Os(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Xa(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Mf(e,t,n):(Xa(t),e=xa(e,t,n),e!==null?e.sibling:null);Xa(t);break;case 19:var l=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Fl(e,t,n,!1),a=(n&t.childLanes)!==0),l){if(a)return Af(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),ne(Gt,Gt.current),a)break;return null;case 22:return t.lanes=0,xf(e,t,n,t.pendingProps);case 24:Na(t,Qt,e.memoizedState.cache)}return xa(e,t,n)}function Tf(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Zt=!0;else{if(!cc(e,n)&&(t.flags&128)===0)return Zt=!1,ig(e,t,n);Zt=(e.flags&131072)!==0}else Zt=!1,nt&&(t.flags&1048576)!==0&&id(t,Bo,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=xl(t.elementType),t.type=e,typeof e=="function")ps(e)?(a=kl(e,a),t.tag=1,t=kf(null,t,e,a,n)):(t.tag=0,t=nc(null,t,e,a,n));else{if(e!=null){var l=e.$$typeof;if(l===he){t.tag=11,t=bf(null,t,e,a,n);break e}else if(l===P){t.tag=14,t=yf(null,t,e,a,n);break e}}throw t=re(e)||e,Error(d(306,t,""))}}return t;case 0:return nc(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=kl(a,t.pendingProps),kf(e,t,a,l,n);case 3:e:{if(pt(t,t.stateNode.containerInfo),e===null)throw Error(d(387));a=t.pendingProps;var o=t.memoizedState;l=o.element,Ts(e,t),Xo(t,a,null,n);var u=t.memoizedState;if(a=u.cache,Na(t,Qt,a),a!==o.cache&&Cs(t,[Qt],n,!0),Go(),a=u.element,o.isDehydrated)if(o={element:a,isDehydrated:!1,cache:u.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=zf(e,t,a,n);break e}else if(a!==l){l=Yn(Error(d(424)),t),Ho(l),t=zf(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,Et=Qn(e.firstChild),ln=t,nt=!0,Ua=null,Vn=!0,n=vd(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(ml(),a===l){t=xa(e,t,n);break e}rn(e,t,a,n)}t=t.child}return t;case 26:return lr(e,t),e===null?(n=qh(t.type,null,t.pendingProps,null))?t.memoizedState=n:nt||(n=t.type,e=t.pendingProps,a=Sr(Le.current).createElement(n),a[gt]=t,a[Tt]=e,sn(a,n,e),xe(a),t.stateNode=a):t.memoizedState=qh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Yt(t),e===null&&nt&&(a=t.stateNode=Uh(t.type,t.pendingProps,Le.current),ln=t,Vn=!0,l=Et,Ia(t.type)?(Gc=l,Et=Qn(a.firstChild)):Et=l),rn(e,t,t.pendingProps.children,n),lr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&nt&&((l=a=Et)&&(a=Hg(a,t.type,t.pendingProps,Vn),a!==null?(t.stateNode=a,ln=t,Et=Qn(a.firstChild),Vn=!1,l=!0):l=!1),l||ja(t)),Yt(t),l=t.type,o=t.pendingProps,u=e!==null?e.memoizedProps:null,a=o.children,Uc(l,o)?a=null:u!==null&&Uc(l,u)&&(t.flags|=32),t.memoizedState!==null&&(l=Hs(e,t,J0,null,null,n),ci._currentValue=l),lr(e,t),rn(e,t,a,n),t.child;case 6:return e===null&&nt&&((e=n=Et)&&(n=Ug(n,t.pendingProps,Vn),n!==null?(t.stateNode=n,ln=t,Et=null,e=!0):e=!1),e||ja(t)),null;case 13:return Mf(e,t,n);case 4:return pt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=wl(t,null,a,n):rn(e,t,a,n),t.child;case 11:return bf(e,t,t.type,t.pendingProps,n);case 7:return rn(e,t,t.pendingProps,n),t.child;case 8:return rn(e,t,t.pendingProps.children,n),t.child;case 12:return rn(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,Na(t,t.type,a.value),rn(e,t,a.children,n),t.child;case 9:return l=t.type._context,a=t.pendingProps.children,yl(t),l=on(l),a=a(l),t.flags|=1,rn(e,t,a,n),t.child;case 14:return yf(e,t,t.type,t.pendingProps,n);case 15:return vf(e,t,t.type,t.pendingProps,n);case 19:return Af(e,t,n);case 31:return og(e,t,n);case 22:return xf(e,t,n,t.pendingProps);case 24:return yl(t),a=on(Qt),e===null?(l=Ms(),l===null&&(l=zt,o=ks(),l.pooledCache=o,o.refCount++,o!==null&&(l.pooledCacheLanes|=n),l=o),t.memoizedState={parent:a,cache:l},As(t),Na(t,Qt,l)):((e.lanes&n)!==0&&(Ts(e,t),Xo(t,null,null,n),Go()),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),Na(t,Qt,a)):(a=o.cache,Na(t,Qt,a),a!==l.cache&&Cs(t,[Qt],n,!0))),rn(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(d(156,t.tag))}function Sa(e){e.flags|=4}function uc(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(nh())e.flags|=8192;else throw Sl=Xi,Ds}else e.flags&=-16777217}function Ef(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Fh(t))if(nh())e.flags|=8192;else throw Sl=Xi,Ds}function ir(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?El():536870912,e.lanes|=t,ao|=t)}function $o(e,t){if(!nt)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 Lt(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 rg(e,t,n){var a=t.pendingProps;switch(ys(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Lt(t),null;case 1:return Lt(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ba(Qt),je(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Vl(t)?Sa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,xs())),Lt(t),null;case 26:var l=t.type,o=t.memoizedState;return e===null?(Sa(t),o!==null?(Lt(t),Ef(t,o)):(Lt(t),uc(t,l,null,a,n))):o?o!==e.memoizedState?(Sa(t),Lt(t),Ef(t,o)):(Lt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Sa(t),Lt(t),uc(t,l,e,a,n)),null;case 27:if(Ze(t),n=Le.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Sa(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return Lt(t),null}e=ie.current,Vl(t)?sd(t):(e=Uh(l,a,n),t.stateNode=e,Sa(t))}return Lt(t),null;case 5:if(Ze(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Sa(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return Lt(t),null}if(o=ie.current,Vl(t))sd(t);else{var u=Sr(Le.current);switch(o){case 1:o=u.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:o=u.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":o=u.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":o=u.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":o=u.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof a.is=="string"?u.createElement("select",{is:a.is}):u.createElement("select"),a.multiple?o.multiple=!0:a.size&&(o.size=a.size);break;default:o=typeof a.is=="string"?u.createElement(l,{is:a.is}):u.createElement(l)}}o[gt]=t,o[Tt]=a;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)o.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=o;e:switch(sn(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&&Sa(t)}}return Lt(t),uc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Sa(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(d(166));if(e=Le.current,Vl(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,l=ln,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[gt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Mh(e.nodeValue,n)),e||ja(t,!0)}else e=Sr(e).createTextNode(a),e[gt]=t,t.stateNode=e}return Lt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Vl(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[gt]=t}else ml(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Lt(t),e=!1}else n=xs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Rn(t),t):(Rn(t),null);if((t.flags&128)!==0)throw Error(d(558))}return Lt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=Vl(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[gt]=t}else ml(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Lt(t),l=!1}else l=xs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(Rn(t),t):(Rn(t),null)}return Rn(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),ir(t,t.updateQueue),Lt(t),null);case 4:return je(),e===null&&Rc(t.stateNode.containerInfo),Lt(t),null;case 10:return ba(t.type),Lt(t),null;case 19:if(H(Gt),a=t.memoizedState,a===null)return Lt(t),null;if(l=(t.flags&128)!==0,o=a.rendering,o===null)if(l)$o(a,!1);else{if(Nt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=Ki(e),o!==null){for(t.flags|=128,$o(a,!1),e=o.updateQueue,t.updateQueue=e,ir(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ad(n,e),n=n.sibling;return ne(Gt,Gt.current&1|2),nt&&ga(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&_t()>dr&&(t.flags|=128,l=!0,$o(a,!1),t.lanes=4194304)}else{if(!l)if(e=Ki(o),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,ir(t,e),$o(a,!0),a.tail===null&&a.tailMode==="hidden"&&!o.alternate&&!nt)return Lt(t),null}else 2*_t()-a.renderingStartTime>dr&&n!==536870912&&(t.flags|=128,l=!0,$o(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=_t(),e.sibling=null,n=Gt.current,ne(Gt,l?n&1|2:n&1),nt&&ga(t,a.treeForkCount),e):(Lt(t),null);case 22:case 23:return Rn(t),_s(),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&&(Lt(t),t.subtreeFlags&6&&(t.flags|=8192)):Lt(t),n=t.updateQueue,n!==null&&ir(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(vl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ba(Qt),Lt(t),null;case 25:return null;case 30:return null}throw Error(d(156,t.tag))}function sg(e,t){switch(ys(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ba(Qt),je(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ze(t),null;case 31:if(t.memoizedState!==null){if(Rn(t),t.alternate===null)throw Error(d(340));ml()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Rn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(d(340));ml()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return H(Gt),null;case 4:return je(),null;case 10:return ba(t.type),null;case 22:case 23:return Rn(t),_s(),e!==null&&H(vl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ba(Qt),null;case 25:return null;default:return null}}function Lf(e,t){switch(ys(t),t.tag){case 3:ba(Qt),je();break;case 26:case 27:case 5:Ze(t);break;case 4:je();break;case 31:t.memoizedState!==null&&Rn(t);break;case 13:Rn(t);break;case 19:H(Gt);break;case 10:ba(t.type);break;case 22:case 23:Rn(t),_s(),e!==null&&H(vl);break;case 24:ba(Qt)}}function Wo(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,u=n.inst;a=o(),u.destroy=a}n=n.next}while(n!==l)}}catch(p){xt(t,t.return,p)}}function Fa(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 u=a.inst,p=u.destroy;if(p!==void 0){u.destroy=void 0,l=t;var C=n,L=p;try{L()}catch(G){xt(l,C,G)}}}a=a.next}while(a!==o)}}catch(G){xt(t,t.return,G)}}function Rf(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Sd(t,n)}catch(a){xt(e,e.return,a)}}}function _f(e,t,n){n.props=kl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){xt(e,t,a)}}function Jo(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){xt(e,t,l)}}function na(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){xt(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){xt(e,t,l)}else n.current=null}function Of(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){xt(e,e.return,l)}}function dc(e,t,n){try{var a=e.stateNode;Eg(a,e.type,n,t),a[Tt]=t}catch(l){xt(e,e.return,l)}}function Bf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ia(e.type)||e.tag===4}function fc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Bf(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&&Ia(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 hc(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=fa));else if(a!==4&&(a===27&&Ia(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(hc(e,t,n),e=e.sibling;e!==null;)hc(e,t,n),e=e.sibling}function rr(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&&Ia(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(rr(e,t,n),e=e.sibling;e!==null;)rr(e,t,n),e=e.sibling}function Hf(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);sn(t,a,n),t[gt]=e,t[Tt]=n}catch(o){xt(e,e.return,o)}}var wa=!1,$t=!1,pc=!1,Uf=typeof WeakSet=="function"?WeakSet:Set,an=null;function cg(e,t){if(e=e.containerInfo,Bc=Ar,e=Zu(e),rs(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 u=0,p=-1,C=-1,L=0,G=0,Z=e,_=null;t:for(;;){for(var j;Z!==n||l!==0&&Z.nodeType!==3||(p=u+l),Z!==o||a!==0&&Z.nodeType!==3||(C=u+a),Z.nodeType===3&&(u+=Z.nodeValue.length),(j=Z.firstChild)!==null;)_=Z,Z=j;for(;;){if(Z===e)break t;if(_===n&&++L===l&&(p=u),_===o&&++G===a&&(C=u),(j=Z.nextSibling)!==null)break;Z=_,_=Z.parentNode}Z=j}n=p===-1||C===-1?null:{start:p,end:C}}else n=null}n=n||{start:0,end:0}}else n=null;for(Hc={focusedElem:e,selectionRange:n},Ar=!1,an=t;an!==null;)if(t=an,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,an=e;else for(;an!==null;){switch(t=an,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 ye=kl(n.type,l);e=a.getSnapshotBeforeUpdate(ye,o),a.__reactInternalSnapshotBeforeUpdate=e}catch(_e){xt(n,n.return,_e)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Nc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Nc(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,an=e;break}an=t.return}}function jf(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:ka(e,n),a&4&&Wo(5,n);break;case 1:if(ka(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(u){xt(n,n.return,u)}else{var l=kl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(u){xt(n,n.return,u)}}a&64&&Rf(n),a&512&&Jo(n,n.return);break;case 3:if(ka(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{Sd(e,t)}catch(u){xt(n,n.return,u)}}break;case 27:t===null&&a&4&&Hf(n);case 26:case 5:ka(e,n),t===null&&a&4&&Of(n),a&512&&Jo(n,n.return);break;case 12:ka(e,n);break;case 31:ka(e,n),a&4&&Yf(e,n);break;case 13:ka(e,n),a&4&&Gf(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=yg.bind(null,n),jg(e,n))));break;case 22:if(a=n.memoizedState!==null||wa,!a){t=t!==null&&t.memoizedState!==null||$t,l=wa;var o=$t;wa=a,($t=t)&&!o?za(e,n,(n.subtreeFlags&8772)!==0):ka(e,n),wa=l,$t=o}break;case 30:break;default:ka(e,n)}}function Nf(e){var t=e.alternate;t!==null&&(e.alternate=null,Nf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&ko(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 Ot=null,xn=!1;function Ca(e,t,n){for(n=n.child;n!==null;)qf(e,t,n),n=n.sibling}function qf(e,t,n){if(ke&&typeof ke.onCommitFiberUnmount=="function")try{ke.onCommitFiberUnmount(Ne,n)}catch{}switch(n.tag){case 26:$t||na(n,t),Ca(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:$t||na(n,t);var a=Ot,l=xn;Ia(n.type)&&(Ot=n.stateNode,xn=!1),Ca(e,t,n),ii(n.stateNode),Ot=a,xn=l;break;case 5:$t||na(n,t);case 6:if(a=Ot,l=xn,Ot=null,Ca(e,t,n),Ot=a,xn=l,Ot!==null)if(xn)try{(Ot.nodeType===9?Ot.body:Ot.nodeName==="HTML"?Ot.ownerDocument.body:Ot).removeChild(n.stateNode)}catch(o){xt(n,t,o)}else try{Ot.removeChild(n.stateNode)}catch(o){xt(n,t,o)}break;case 18:Ot!==null&&(xn?(e=Ot,Rh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),fo(e)):Rh(Ot,n.stateNode));break;case 4:a=Ot,l=xn,Ot=n.stateNode.containerInfo,xn=!0,Ca(e,t,n),Ot=a,xn=l;break;case 0:case 11:case 14:case 15:Fa(2,n,t),$t||Fa(4,n,t),Ca(e,t,n);break;case 1:$t||(na(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&_f(n,t,a)),Ca(e,t,n);break;case 21:Ca(e,t,n);break;case 22:$t=(a=$t)||n.memoizedState!==null,Ca(e,t,n),$t=a;break;default:Ca(e,t,n)}}function Yf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{fo(e)}catch(n){xt(t,t.return,n)}}}function Gf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{fo(e)}catch(n){xt(t,t.return,n)}}function ug(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Uf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Uf),t;default:throw Error(d(435,e.tag))}}function sr(e,t){var n=ug(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var l=vg.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,u=t,p=u;e:for(;p!==null;){switch(p.tag){case 27:if(Ia(p.type)){Ot=p.stateNode,xn=!1;break e}break;case 5:Ot=p.stateNode,xn=!1;break e;case 3:case 4:Ot=p.stateNode.containerInfo,xn=!0;break e}p=p.return}if(Ot===null)throw Error(d(160));qf(o,u,l),Ot=null,xn=!1,o=l.alternate,o!==null&&(o.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Xf(t,e),t=t.sibling}var Wn=null;function Xf(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Sn(t,e),wn(e),a&4&&(Fa(3,e,e.return),Wo(3,e),Fa(5,e,e.return));break;case 1:Sn(t,e),wn(e),a&512&&($t||n===null||na(n,n.return)),a&64&&wa&&(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=Wn;if(Sn(t,e),wn(e),a&512&&($t||n===null||na(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[ul]||o[gt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=l.createElement(a),l.head.insertBefore(o,l.querySelector("head > title"))),sn(o,a,n),o[gt]=e,xe(o),a=o;break e;case"link":var u=Xh("link","href",l).get(a+(n.href||""));if(u){for(var p=0;p<u.length;p++)if(o=u[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)){u.splice(p,1);break t}}o=l.createElement(a),sn(o,a,n),l.head.appendChild(o);break;case"meta":if(u=Xh("meta","content",l).get(a+(n.content||""))){for(p=0;p<u.length;p++)if(o=u[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)){u.splice(p,1);break t}}o=l.createElement(a),sn(o,a,n),l.head.appendChild(o);break;default:throw Error(d(468,a))}o[gt]=e,xe(o),a=o}e.stateNode=a}else Vh(l,e.type,e.stateNode);else e.stateNode=Gh(l,a,e.memoizedProps);else o!==a?(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,a===null?Vh(l,e.type,e.stateNode):Gh(l,a,e.memoizedProps)):a===null&&e.stateNode!==null&&dc(e,e.memoizedProps,n.memoizedProps)}break;case 27:Sn(t,e),wn(e),a&512&&($t||n===null||na(n,n.return)),n!==null&&a&4&&dc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Sn(t,e),wn(e),a&512&&($t||n===null||na(n,n.return)),e.flags&32){l=e.stateNode;try{Ol(l,"")}catch(ye){xt(e,e.return,ye)}}a&4&&e.stateNode!=null&&(l=e.memoizedProps,dc(e,l,n!==null?n.memoizedProps:l)),a&1024&&(pc=!0);break;case 6:if(Sn(t,e),wn(e),a&4){if(e.stateNode===null)throw Error(d(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(ye){xt(e,e.return,ye)}}break;case 3:if(kr=null,l=Wn,Wn=wr(t.containerInfo),Sn(t,e),Wn=l,wn(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{fo(t.containerInfo)}catch(ye){xt(e,e.return,ye)}pc&&(pc=!1,Vf(e));break;case 4:a=Wn,Wn=wr(e.stateNode.containerInfo),Sn(t,e),wn(e),Wn=a;break;case 12:Sn(t,e),wn(e);break;case 31:Sn(t,e),wn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,sr(e,a)));break;case 13:Sn(t,e),wn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ur=_t()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,sr(e,a)));break;case 22:l=e.memoizedState!==null;var C=n!==null&&n.memoizedState!==null,L=wa,G=$t;if(wa=L||l,$t=G||C,Sn(t,e),$t=G,wa=L,wn(e),a&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||C||wa||$t||zl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){C=n=t;try{if(o=C.stateNode,l)u=o.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none";else{p=C.stateNode;var Z=C.memoizedProps.style,_=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;p.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(ye){xt(C,C.return,ye)}}}else if(t.tag===6){if(n===null){C=t;try{C.stateNode.nodeValue=l?"":C.memoizedProps}catch(ye){xt(C,C.return,ye)}}}else if(t.tag===18){if(n===null){C=t;try{var j=C.stateNode;l?_h(j,!0):_h(C.stateNode,!1)}catch(ye){xt(C,C.return,ye)}}}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,sr(e,n))));break;case 19:Sn(t,e),wn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,sr(e,a)));break;case 30:break;case 21:break;default:Sn(t,e),wn(e)}}function wn(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Bf(a)){n=a;break}a=a.return}if(n==null)throw Error(d(160));switch(n.tag){case 27:var l=n.stateNode,o=fc(e);rr(e,o,l);break;case 5:var u=n.stateNode;n.flags&32&&(Ol(u,""),n.flags&=-33);var p=fc(e);rr(e,p,u);break;case 3:case 4:var C=n.stateNode.containerInfo,L=fc(e);hc(e,L,C);break;default:throw Error(d(161))}}catch(G){xt(e,e.return,G)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Vf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Vf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ka(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)jf(e,t.alternate,t),t=t.sibling}function zl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Fa(4,t,t.return),zl(t);break;case 1:na(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&_f(t,t.return,n),zl(t);break;case 27:ii(t.stateNode);case 26:case 5:na(t,t.return),zl(t);break;case 22:t.memoizedState===null&&zl(t);break;case 30:zl(t);break;default:zl(t)}e=e.sibling}}function za(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,l=e,o=t,u=o.flags;switch(o.tag){case 0:case 11:case 15:za(l,o,n),Wo(4,o);break;case 1:if(za(l,o,n),a=o,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(L){xt(a,a.return,L)}if(a=o,l=a.updateQueue,l!==null){var p=a.stateNode;try{var C=l.shared.hiddenCallbacks;if(C!==null)for(l.shared.hiddenCallbacks=null,l=0;l<C.length;l++)xd(C[l],p)}catch(L){xt(a,a.return,L)}}n&&u&64&&Rf(o),Jo(o,o.return);break;case 27:Hf(o);case 26:case 5:za(l,o,n),n&&a===null&&u&4&&Of(o),Jo(o,o.return);break;case 12:za(l,o,n);break;case 31:za(l,o,n),n&&u&4&&Yf(l,o);break;case 13:za(l,o,n),n&&u&4&&Gf(l,o);break;case 22:o.memoizedState===null&&za(l,o,n),Jo(o,o.return);break;case 30:break;default:za(l,o,n)}t=t.sibling}}function gc(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&&Uo(n))}function mc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Uo(e))}function Jn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ff(e,t,n,a),t=t.sibling}function Ff(e,t,n,a){var l=t.flags;switch(t.tag){case 0:case 11:case 15:Jn(e,t,n,a),l&2048&&Wo(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&&Uo(e)));break;case 12:if(l&2048){Jn(e,t,n,a),e=t.stateNode;try{var o=t.memoizedProps,u=o.id,p=o.onPostCommit;typeof p=="function"&&p(u,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(C){xt(t,t.return,C)}}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,u=t.alternate,t.memoizedState!==null?o._visibility&2?Jn(e,t,n,a):Io(e,t):o._visibility&2?Jn(e,t,n,a):(o._visibility|=2,eo(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),l&2048&&gc(u,t);break;case 24:Jn(e,t,n,a),l&2048&&mc(t.alternate,t);break;default:Jn(e,t,n,a)}}function eo(e,t,n,a,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,u=t,p=n,C=a,L=u.flags;switch(u.tag){case 0:case 11:case 15:eo(o,u,p,C,l),Wo(8,u);break;case 23:break;case 22:var G=u.stateNode;u.memoizedState!==null?G._visibility&2?eo(o,u,p,C,l):Io(o,u):(G._visibility|=2,eo(o,u,p,C,l)),l&&L&2048&&gc(u.alternate,u);break;case 24:eo(o,u,p,C,l),l&&L&2048&&mc(u.alternate,u);break;default:eo(o,u,p,C,l)}t=t.sibling}}function Io(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:Io(n,a),l&2048&&gc(a.alternate,a);break;case 24:Io(n,a),l&2048&&mc(a.alternate,a);break;default:Io(n,a)}t=t.sibling}}var Po=8192;function to(e,t,n){if(e.subtreeFlags&Po)for(e=e.child;e!==null;)Qf(e,t,n),e=e.sibling}function Qf(e,t,n){switch(e.tag){case 26:to(e,t,n),e.flags&Po&&e.memoizedState!==null&&Wg(n,Wn,e.memoizedState,e.memoizedProps);break;case 5:to(e,t,n);break;case 3:case 4:var a=Wn;Wn=wr(e.stateNode.containerInfo),to(e,t,n),Wn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Po,Po=16777216,to(e,t,n),Po=a):to(e,t,n));break;default:to(e,t,n)}}function Kf(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 ei(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];an=a,$f(a,e)}Kf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Zf(e),e=e.sibling}function Zf(e){switch(e.tag){case 0:case 11:case 15:ei(e),e.flags&2048&&Fa(9,e,e.return);break;case 3:ei(e);break;case 12:ei(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,cr(e)):ei(e);break;default:ei(e)}}function cr(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];an=a,$f(a,e)}Kf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Fa(8,t,t.return),cr(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,cr(t));break;default:cr(t)}e=e.sibling}}function $f(e,t){for(;an!==null;){var n=an;switch(n.tag){case 0:case 11:case 15:Fa(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:Uo(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,an=a;else e:for(n=e;an!==null;){a=an;var l=a.sibling,o=a.return;if(Nf(a),a===n){an=null;break e}if(l!==null){l.return=o,an=l;break e}an=o}}}var dg={getCacheForType:function(e){var t=on(Qt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return on(Qt).controller.signal}},fg=typeof WeakMap=="function"?WeakMap:Map,dt=0,zt=null,$e=null,Je=0,vt=0,_n=null,Qa=!1,no=!1,bc=!1,Ma=0,Nt=0,Ka=0,Ml=0,yc=0,On=0,ao=0,ti=null,Cn=null,vc=!1,ur=0,Wf=0,dr=1/0,fr=null,Za=null,en=0,$a=null,lo=null,Da=0,xc=0,Sc=null,Jf=null,ni=0,wc=null;function Bn(){return(dt&2)!==0&&Je!==0?Je&-Je:A.T!==null?Ac():ut()}function If(){if(On===0)if((Je&536870912)===0||nt){var e=La;La<<=1,(La&3932160)===0&&(La=262144),On=e}else On=536870912;return e=Ln.current,e!==null&&(e.flags|=32),On}function kn(e,t,n){(e===zt&&(vt===2||vt===9)||e.cancelPendingCommit!==null)&&(oo(e,0),Wa(e,Je,On,!1)),ca(e,n),((dt&2)===0||e!==zt)&&(e===zt&&((dt&2)===0&&(Ml|=n),Nt===4&&Wa(e,Je,On,!1)),aa(e))}function Pf(e,t,n){if((dt&6)!==0)throw Error(d(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||sa(e,t),l=a?gg(e,t):kc(e,t,!0),o=a;do{if(l===0){no&&!a&&Wa(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!hg(n)){l=kc(e,t,!1),o=!1;continue}if(l===2){if(o=t,e.errorRecoveryDisabledLanes&o)var u=0;else u=e.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){t=u;e:{var p=e;l=ti;var C=p.current.memoizedState.isDehydrated;if(C&&(oo(p,u).flags|=256),u=kc(p,u,!1),u!==2){if(bc&&!C){p.errorRecoveryDisabledLanes|=o,Ml|=o,l=4;break e}o=Cn,Cn=l,o!==null&&(Cn===null?Cn=o:Cn.push.apply(Cn,o))}l=u}if(o=!1,l!==2)continue}}if(l===1){oo(e,0),Wa(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:Wa(a,t,On,!Qa);break e;case 2:Cn=null;break;case 3:case 5:break;default:throw Error(d(329))}if((t&62914560)===t&&(l=ur+300-_t(),10<l)){if(Wa(a,t,On,!Qa),Ra(a,0,!0)!==0)break e;Da=t,a.timeoutHandle=Eh(eh.bind(null,a,n,Cn,fr,vc,t,On,Ml,ao,Qa,o,"Throttled",-0,0),l);break e}eh(a,n,Cn,fr,vc,t,On,Ml,ao,Qa,o,null,-0,0)}}break}while(!0);aa(e)}function eh(e,t,n,a,l,o,u,p,C,L,G,Z,_,j){if(e.timeoutHandle=-1,Z=t.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:fa},Qf(t,o,Z);var ye=(o&62914560)===o?ur-_t():(o&4194048)===o?Wf-_t():0;if(ye=Jg(Z,ye),ye!==null){Da=o,e.cancelPendingCommit=ye(sh.bind(null,e,t,o,n,a,l,u,p,C,G,Z,null,_,j)),Wa(e,o,u,!L);return}}sh(e,t,o,n,a,l,u,p,C)}function hg(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(!Tn(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 Wa(e,t,n,a){t&=~yc,t&=~Ml,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var o=31-at(l),u=1<<o;a[o]=-1,l&=~u}n!==0&&Ll(e,n,t)}function hr(){return(dt&6)===0?(ai(0),!1):!0}function Cc(){if($e!==null){if(vt===0)var e=$e.return;else e=$e,ma=bl=null,Ns(e),$l=null,No=0,e=$e;for(;e!==null;)Lf(e.alternate,e),e=e.return;$e=null}}function oo(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,_g(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Da=0,Cc(),zt=e,$e=n=pa(e.current,null),Je=t,vt=0,_n=null,Qa=!1,no=sa(e,t),bc=!1,ao=On=yc=Ml=Ka=Nt=0,Cn=ti=null,vc=!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-at(a),o=1<<l;t|=e[l],a&=~o}return Ma=t,Oi(),n}function th(e,t){Qe=null,A.H=Ko,t===Zl||t===Gi?(t=md(),vt=3):t===Ds?(t=md(),vt=4):vt=t===tc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,_n=t,$e===null&&(Nt=1,nr(e,Yn(t,e.current)))}function nh(){var e=Ln.current;return e===null?!0:(Je&4194048)===Je?Fn===null:(Je&62914560)===Je||(Je&536870912)!==0?e===Fn:!1}function ah(){var e=A.H;return A.H=Ko,e===null?Ko:e}function lh(){var e=A.A;return A.A=dg,e}function pr(){Nt=4,Qa||(Je&4194048)!==Je&&Ln.current!==null||(no=!0),(Ka&134217727)===0&&(Ml&134217727)===0||zt===null||Wa(zt,Je,On,!1)}function kc(e,t,n){var a=dt;dt|=2;var l=ah(),o=lh();(zt!==e||Je!==t)&&(fr=null,oo(e,t)),t=!1;var u=Nt;e:do try{if(vt!==0&&$e!==null){var p=$e,C=_n;switch(vt){case 8:Cc(),u=6;break e;case 3:case 2:case 9:case 6:Ln.current===null&&(t=!0);var L=vt;if(vt=0,_n=null,io(e,p,C,L),n&&no){u=0;break e}break;default:L=vt,vt=0,_n=null,io(e,p,C,L)}}pg(),u=Nt;break}catch(G){th(e,G)}while(!0);return t&&e.shellSuspendCounter++,ma=bl=null,dt=a,A.H=l,A.A=o,$e===null&&(zt=null,Je=0,Oi()),u}function pg(){for(;$e!==null;)oh($e)}function gg(e,t){var n=dt;dt|=2;var a=ah(),l=lh();zt!==e||Je!==t?(fr=null,dr=_t()+500,oo(e,t)):no=sa(e,t);e:do try{if(vt!==0&&$e!==null){t=$e;var o=_n;t:switch(vt){case 1:vt=0,_n=null,io(e,t,o,1);break;case 2:case 9:if(pd(o)){vt=0,_n=null,ih(t);break}t=function(){vt!==2&&vt!==9||zt!==e||(vt=7),aa(e)},o.then(t,t);break e;case 3:vt=7;break e;case 4:vt=5;break e;case 7:pd(o)?(vt=0,_n=null,ih(t)):(vt=0,_n=null,io(e,t,o,7));break;case 5:var u=null;switch($e.tag){case 26:u=$e.memoizedState;case 5:case 27:var p=$e;if(u?Fh(u):p.stateNode.complete){vt=0,_n=null;var C=p.sibling;if(C!==null)$e=C;else{var L=p.return;L!==null?($e=L,gr(L)):$e=null}break t}}vt=0,_n=null,io(e,t,o,5);break;case 6:vt=0,_n=null,io(e,t,o,6);break;case 8:Cc(),Nt=6;break e;default:throw Error(d(462))}}mg();break}catch(G){th(e,G)}while(!0);return ma=bl=null,A.H=a,A.A=l,dt=n,$e!==null?0:(zt=null,Je=0,Oi(),Nt)}function mg(){for(;$e!==null&&!ge();)oh($e)}function oh(e){var t=Tf(e.alternate,e,Ma);e.memoizedProps=e.pendingProps,t===null?gr(e):$e=t}function ih(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Cf(n,t,t.pendingProps,t.type,void 0,Je);break;case 11:t=Cf(n,t,t.pendingProps,t.type.render,t.ref,Je);break;case 5:Ns(t);default:Lf(n,t),t=$e=ad(t,Ma),t=Tf(n,t,Ma)}e.memoizedProps=e.pendingProps,t===null?gr(e):$e=t}function io(e,t,n,a){ma=bl=null,Ns(t),$l=null,No=0;var l=t.return;try{if(lg(e,l,t,n,Je)){Nt=1,nr(e,Yn(n,e.current)),$e=null;return}}catch(o){if(l!==null)throw $e=l,o;Nt=1,nr(e,Yn(n,e.current)),$e=null;return}t.flags&32768?(nt||a===1?e=!0:no||(Je&536870912)!==0?e=!1:(Qa=e=!0,(a===2||a===9||a===3||a===6)&&(a=Ln.current,a!==null&&a.tag===13&&(a.flags|=16384))),rh(t,e)):gr(t)}function gr(e){var t=e;do{if((t.flags&32768)!==0){rh(t,Qa);return}e=t.return;var n=rg(t.alternate,t,Ma);if(n!==null){$e=n;return}if(t=t.sibling,t!==null){$e=t;return}$e=t=e}while(t!==null);Nt===0&&(Nt=5)}function rh(e,t){do{var n=sg(e.alternate,e);if(n!==null){n.flags&=32767,$e=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){$e=e;return}$e=e=n}while(e!==null);Nt=6,$e=null}function sh(e,t,n,a,l,o,u,p,C){e.cancelPendingCommit=null;do mr();while(en!==0);if((dt&6)!==0)throw Error(d(327));if(t!==null){if(t===e.current)throw Error(d(177));if(o=t.lanes|t.childLanes,o|=fs,wo(e,n,o,u,p,C),e===zt&&($e=zt=null,Je=0),lo=t,$a=e,Da=n,xc=o,Sc=l,Jf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,xg(yn,function(){return hh(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=A.T,A.T=null,l=J.p,J.p=2,u=dt,dt|=4;try{cg(e,t,n)}finally{dt=u,J.p=l,A.T=a}}en=1,ch(),uh(),dh()}}function ch(){if(en===1){en=0;var e=$a,t=lo,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=A.T,A.T=null;var a=J.p;J.p=2;var l=dt;dt|=4;try{Xf(t,e);var o=Hc,u=Zu(e.containerInfo),p=o.focusedElem,C=o.selectionRange;if(u!==p&&p&&p.ownerDocument&&Ku(p.ownerDocument.documentElement,p)){if(C!==null&&rs(p)){var L=C.start,G=C.end;if(G===void 0&&(G=L),"selectionStart"in p)p.selectionStart=L,p.selectionEnd=Math.min(G,p.value.length);else{var Z=p.ownerDocument||document,_=Z&&Z.defaultView||window;if(_.getSelection){var j=_.getSelection(),ye=p.textContent.length,_e=Math.min(C.start,ye),kt=C.end===void 0?_e:Math.min(C.end,ye);!j.extend&&_e>kt&&(u=kt,kt=_e,_e=u);var D=Qu(p,_e),k=Qu(p,kt);if(D&&k&&(j.rangeCount!==1||j.anchorNode!==D.node||j.anchorOffset!==D.offset||j.focusNode!==k.node||j.focusOffset!==k.offset)){var E=Z.createRange();E.setStart(D.node,D.offset),j.removeAllRanges(),_e>kt?(j.addRange(E),j.extend(k.node,k.offset)):(E.setEnd(k.node,k.offset),j.addRange(E))}}}}for(Z=[],j=p;j=j.parentNode;)j.nodeType===1&&Z.push({element:j,left:j.scrollLeft,top:j.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<Z.length;p++){var K=Z[p];K.element.scrollLeft=K.left,K.element.scrollTop=K.top}}Ar=!!Bc,Hc=Bc=null}finally{dt=l,J.p=a,A.T=n}}e.current=t,en=2}}function uh(){if(en===2){en=0;var e=$a,t=lo,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=A.T,A.T=null;var a=J.p;J.p=2;var l=dt;dt|=4;try{jf(e,t.alternate,t)}finally{dt=l,J.p=a,A.T=n}}en=3}}function dh(){if(en===4||en===3){en=0,Un();var e=$a,t=lo,n=Da,a=Jf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?en=5:(en=0,lo=$a=null,fh(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(Za=null),tt(n),t=t.stateNode,ke&&typeof ke.onCommitFiberRoot=="function")try{ke.onCommitFiberRoot(Ne,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=A.T,l=J.p,J.p=2,A.T=null;try{for(var o=e.onRecoverableError,u=0;u<a.length;u++){var p=a[u];o(p.value,{componentStack:p.stack})}}finally{A.T=t,J.p=l}}(Da&3)!==0&&mr(),aa(e),l=e.pendingLanes,(n&261930)!==0&&(l&42)!==0?e===wc?ni++:(ni=0,wc=e):ni=0,ai(0)}}function fh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Uo(t)))}function mr(){return ch(),uh(),dh(),hh()}function hh(){if(en!==5)return!1;var e=$a,t=xc;xc=0;var n=tt(Da),a=A.T,l=J.p;try{J.p=32>n?32:n,A.T=null,n=Sc,Sc=null;var o=$a,u=Da;if(en=0,lo=$a=null,Da=0,(dt&6)!==0)throw Error(d(331));var p=dt;if(dt|=4,Zf(o.current),Ff(o,o.current,u,n),dt=p,ai(0,!1),ke&&typeof ke.onPostCommitFiberRoot=="function")try{ke.onPostCommitFiberRoot(Ne,o)}catch{}return!0}finally{J.p=l,A.T=a,fh(e,t)}}function ph(e,t,n){t=Yn(n,t),t=ec(e.stateNode,t,2),e=Ga(e,t,2),e!==null&&(ca(e,2),aa(e))}function xt(e,t,n){if(e.tag===3)ph(e,e,n);else for(;t!==null;){if(t.tag===3){ph(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Za===null||!Za.has(a))){e=Yn(n,e),n=gf(2),a=Ga(t,n,2),a!==null&&(mf(n,a,t,e),ca(a,2),aa(a));break}}t=t.return}}function zc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new fg;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)||(bc=!0,l.add(n),e=bg.bind(null,e,t,n),t.then(e,e))}function bg(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,zt===e&&(Je&n)===n&&(Nt===4||Nt===3&&(Je&62914560)===Je&&300>_t()-ur?(dt&2)===0&&oo(e,0):yc|=n,ao===Je&&(ao=0)),aa(e)}function gh(e,t){t===0&&(t=El()),e=pl(e,t),e!==null&&(ca(e,t),aa(e))}function yg(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),gh(e,n)}function vg(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),gh(e,n)}function xg(e,t){return lt(e,t)}var br=null,ro=null,Mc=!1,yr=!1,Dc=!1,Ja=0;function aa(e){e!==ro&&e.next===null&&(ro===null?br=ro=e:ro=ro.next=e),yr=!0,Mc||(Mc=!0,wg())}function ai(e,t){if(!Dc&&yr){Dc=!0;do for(var n=!1,a=br;a!==null;){if(e!==0){var l=a.pendingLanes;if(l===0)var o=0;else{var u=a.suspendedLanes,p=a.pingedLanes;o=(1<<31-at(42|e)+1)-1,o&=l&~(u&~p),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(n=!0,vh(a,o))}else o=Je,o=Ra(a,a===zt?o:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(o&3)===0||sa(a,o)||(n=!0,vh(a,o));a=a.next}while(n);Dc=!1}}function Sg(){mh()}function mh(){yr=Mc=!1;var e=0;Ja!==0&&Rg()&&(e=Ja);for(var t=_t(),n=null,a=br;a!==null;){var l=a.next,o=bh(a,t);o===0?(a.next=null,n===null?br=l:n.next=l,l===null&&(ro=n)):(n=a,(e!==0||(o&3)!==0)&&(yr=!0)),a=l}en!==0&&en!==5||ai(e),Ja!==0&&(Ja=0)}function bh(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var u=31-at(o),p=1<<u,C=l[u];C===-1?((p&n)===0||(p&a)!==0)&&(l[u]=Tl(p,t)):C<=t&&(e.expiredLanes|=p),o&=~p}if(t=zt,n=Je,n=Ra(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(vt===2||vt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Mt(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||sa(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Mt(a),tt(n)){case 2:case 8:n=bn;break;case 32:n=yn;break;case 268435456:n=ce;break;default:n=yn}return a=yh.bind(null,e),n=lt(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Mt(a),e.callbackPriority=2,e.callbackNode=null,2}function yh(e,t){if(en!==0&&en!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(mr()&&e.callbackNode!==n)return null;var a=Je;return a=Ra(e,e===zt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Pf(e,a,t),bh(e,_t()),e.callbackNode!=null&&e.callbackNode===n?yh.bind(null,e):null)}function vh(e,t){if(mr())return null;Pf(e,t,!0)}function wg(){Og(function(){(dt&6)!==0?lt(Mn,Sg):mh()})}function Ac(){if(Ja===0){var e=Ql;e===0&&(e=Ea,Ea<<=1,(Ea&261888)===0&&(Ea=256)),Ja=e}return Ja}function xh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Mi(""+e)}function Sh(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 Cg(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var o=xh((l[Tt]||null).action),u=a.submitter;u&&(t=(t=u[Tt]||null)?xh(t.formAction):u.getAttribute("formAction"),t!==null&&(o=t,u=null));var p=new Ei("action","action",null,a,l);e.push({event:p,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Ja!==0){var C=u?Sh(l,u):new FormData(l);Zs(n,{pending:!0,data:C,method:l.method,action:o},null,C)}}else typeof o=="function"&&(p.preventDefault(),C=u?Sh(l,u):new FormData(l),Zs(n,{pending:!0,data:C,method:l.method,action:o},o,C))},currentTarget:l}]})}}for(var Tc=0;Tc<ds.length;Tc++){var Ec=ds[Tc],kg=Ec.toLowerCase(),zg=Ec[0].toUpperCase()+Ec.slice(1);$n(kg,"on"+zg)}$n(Ju,"onAnimationEnd"),$n(Iu,"onAnimationIteration"),$n(Pu,"onAnimationStart"),$n("dblclick","onDoubleClick"),$n("focusin","onFocus"),$n("focusout","onBlur"),$n(Y0,"onTransitionRun"),$n(G0,"onTransitionStart"),$n(X0,"onTransitionCancel"),$n(ed,"onTransitionEnd"),it("onMouseEnter",["mouseout","mouseover"]),it("onMouseLeave",["mouseout","mouseover"]),it("onPointerEnter",["pointerout","pointerover"]),it("onPointerLeave",["pointerout","pointerover"]),ot("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ot("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ot("onBeforeInput",["compositionend","keypress","textInput","paste"]),ot("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ot("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ot("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var li="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(" "),Mg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(li));function wh(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 u=a.length-1;0<=u;u--){var p=a[u],C=p.instance,L=p.currentTarget;if(p=p.listener,C!==o&&l.isPropagationStopped())break e;o=p,l.currentTarget=L;try{o(l)}catch(G){_i(G)}l.currentTarget=null,o=C}else for(u=0;u<a.length;u++){if(p=a[u],C=p.instance,L=p.currentTarget,p=p.listener,C!==o&&l.isPropagationStopped())break e;o=p,l.currentTarget=L;try{o(l)}catch(G){_i(G)}l.currentTarget=null,o=C}}}}function We(e,t){var n=t[Rl];n===void 0&&(n=t[Rl]=new Set);var a=e+"__bubble";n.has(a)||(Ch(t,e,2,!1),n.add(a))}function Lc(e,t,n){var a=0;t&&(a|=4),Ch(n,e,a,t)}var vr="_reactListening"+Math.random().toString(36).slice(2);function Rc(e){if(!e[vr]){e[vr]=!0,He.forEach(function(n){n!=="selectionchange"&&(Mg.has(n)||Lc(n,!1,e),Lc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[vr]||(t[vr]=!0,Lc("selectionchange",!1,t))}}function Ch(e,t,n,a){switch(Ih(t)){case 2:var l=em;break;case 8:l=tm;break;default:l=Kc}n=l.bind(null,t,n,e),l=void 0,!Ir||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 _c(e,t,n,a,l){var o=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var u=a.tag;if(u===3||u===4){var p=a.stateNode.containerInfo;if(p===l)break;if(u===4)for(u=a.return;u!==null;){var C=u.tag;if((C===3||C===4)&&u.stateNode.containerInfo===l)return;u=u.return}for(;p!==null;){if(u=ua(p),u===null)return;if(C=u.tag,C===5||C===6||C===26||C===27){a=o=u;continue e}p=p.parentNode}}a=a.return}Du(function(){var L=o,G=Wr(n),Z=[];e:{var _=td.get(e);if(_!==void 0){var j=Ei,ye=e;switch(e){case"keypress":if(Ai(n)===0)break e;case"keydown":case"keyup":j=v0;break;case"focusin":ye="focus",j=ns;break;case"focusout":ye="blur",j=ns;break;case"beforeblur":case"afterblur":j=ns;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":j=Eu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":j=r0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":j=w0;break;case Ju:case Iu:case Pu:j=u0;break;case ed:j=k0;break;case"scroll":case"scrollend":j=o0;break;case"wheel":j=M0;break;case"copy":case"cut":case"paste":j=f0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":j=Ru;break;case"toggle":case"beforetoggle":j=A0}var _e=(t&4)!==0,kt=!_e&&(e==="scroll"||e==="scrollend"),D=_e?_!==null?_+"Capture":null:_;_e=[];for(var k=L,E;k!==null;){var K=k;if(E=K.stateNode,K=K.tag,K!==5&&K!==26&&K!==27||E===null||D===null||(K=Mo(k,D),K!=null&&_e.push(oi(k,K,E))),kt)break;k=k.return}0<_e.length&&(_=new j(_,ye,null,n,G),Z.push({event:_,listeners:_e}))}}if((t&7)===0){e:{if(_=e==="mouseover"||e==="pointerover",j=e==="mouseout"||e==="pointerout",_&&n!==$r&&(ye=n.relatedTarget||n.fromElement)&&(ua(ye)||ye[An]))break e;if((j||_)&&(_=G.window===G?G:(_=G.ownerDocument)?_.defaultView||_.parentWindow:window,j?(ye=n.relatedTarget||n.toElement,j=L,ye=ye?ua(ye):null,ye!==null&&(kt=m(ye),_e=ye.tag,ye!==kt||_e!==5&&_e!==27&&_e!==6)&&(ye=null)):(j=null,ye=L),j!==ye)){if(_e=Eu,K="onMouseLeave",D="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(_e=Ru,K="onPointerLeave",D="onPointerEnter",k="pointer"),kt=j==null?_:ue(j),E=ye==null?_:ue(ye),_=new _e(K,k+"leave",j,n,G),_.target=kt,_.relatedTarget=E,K=null,ua(G)===L&&(_e=new _e(D,k+"enter",ye,n,G),_e.target=E,_e.relatedTarget=kt,K=_e),kt=K,j&&ye)t:{for(_e=Dg,D=j,k=ye,E=0,K=D;K;K=_e(K))E++;K=0;for(var Ee=k;Ee;Ee=_e(Ee))K++;for(;0<E-K;)D=_e(D),E--;for(;0<K-E;)k=_e(k),K--;for(;E--;){if(D===k||k!==null&&D===k.alternate){_e=D;break t}D=_e(D),k=_e(k)}_e=null}else _e=null;j!==null&&kh(Z,_,j,_e,!1),ye!==null&&kt!==null&&kh(Z,kt,ye,_e,!0)}}e:{if(_=L?ue(L):window,j=_.nodeName&&_.nodeName.toLowerCase(),j==="select"||j==="input"&&_.type==="file")var rt=qu;else if(ju(_))if(Yu)rt=j0;else{rt=H0;var Ce=B0}else j=_.nodeName,!j||j.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?L&&Zr(L.elementType)&&(rt=qu):rt=U0;if(rt&&(rt=rt(e,L))){Nu(Z,rt,n,G);break e}Ce&&Ce(e,_,L),e==="focusout"&&L&&_.type==="number"&&L.memoizedProps.value!=null&&Kr(_,"number",_.value)}switch(Ce=L?ue(L):window,e){case"focusin":(ju(Ce)||Ce.contentEditable==="true")&&(jl=Ce,ss=L,Oo=null);break;case"focusout":Oo=ss=jl=null;break;case"mousedown":cs=!0;break;case"contextmenu":case"mouseup":case"dragend":cs=!1,$u(Z,n,G);break;case"selectionchange":if(q0)break;case"keydown":case"keyup":$u(Z,n,G)}var Ke;if(ls)e:{switch(e){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else Ul?Hu(e,n)&&(Ie="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ie="onCompositionStart");Ie&&(_u&&n.locale!=="ko"&&(Ul||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&Ul&&(Ke=Au()):(Ba=G,Pr="value"in Ba?Ba.value:Ba.textContent,Ul=!0)),Ce=xr(L,Ie),0<Ce.length&&(Ie=new Lu(Ie,e,null,n,G),Z.push({event:Ie,listeners:Ce}),Ke?Ie.data=Ke:(Ke=Uu(n),Ke!==null&&(Ie.data=Ke)))),(Ke=E0?L0(e,n):R0(e,n))&&(Ie=xr(L,"onBeforeInput"),0<Ie.length&&(Ce=new Lu("onBeforeInput","beforeinput",null,n,G),Z.push({event:Ce,listeners:Ie}),Ce.data=Ke)),Cg(Z,e,L,n,G)}wh(Z,t)})}function oi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function xr(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=Mo(e,n),l!=null&&a.unshift(oi(e,l,o)),l=Mo(e,t),l!=null&&a.push(oi(e,l,o))),e.tag===3)return a;e=e.return}return[]}function Dg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function kh(e,t,n,a,l){for(var o=t._reactName,u=[];n!==null&&n!==a;){var p=n,C=p.alternate,L=p.stateNode;if(p=p.tag,C!==null&&C===a)break;p!==5&&p!==26&&p!==27||L===null||(C=L,l?(L=Mo(n,o),L!=null&&u.unshift(oi(n,L,C))):l||(L=Mo(n,o),L!=null&&u.push(oi(n,L,C)))),n=n.return}u.length!==0&&e.push({event:t,listeners:u})}var Ag=/\r\n?/g,Tg=/\u0000|\uFFFD/g;function zh(e){return(typeof e=="string"?e:""+e).replace(Ag,`
9
+ `).replace(Tg,"")}function Mh(e,t){return t=zh(t),zh(e)===t}function Ct(e,t,n,a,l,o){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ol(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ol(e,""+a);break;case"className":ki(e,"class",a);break;case"tabIndex":ki(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ki(e,n,a);break;case"style":zu(e,a,o);break;case"data":if(t!=="object"){ki(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=Mi(""+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"&&Ct(e,t,"name",l.name,l,null),Ct(e,t,"formEncType",l.formEncType,l,null),Ct(e,t,"formMethod",l.formMethod,l,null),Ct(e,t,"formTarget",l.formTarget,l,null)):(Ct(e,t,"encType",l.encType,l,null),Ct(e,t,"method",l.method,l,null),Ct(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=Mi(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=fa);break;case"onScroll":a!=null&&We("scroll",e);break;case"onScrollEnd":a!=null&&We("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=Mi(""+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":We("beforetoggle",e),We("toggle",e),Ci(e,"popover",a);break;case"xlinkActuate":da(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":da(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":da(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":da(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":da(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":da(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":da(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":da(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":da(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Ci(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=a0.get(n)||n,Ci(e,n,a))}}function Oc(e,t,n,a,l,o){switch(n){case"style":zu(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"?Ol(e,a):(typeof a=="number"||typeof a=="bigint")&&Ol(e,""+a);break;case"onScroll":a!=null&&We("scroll",e);break;case"onScrollEnd":a!=null&&We("scrollend",e);break;case"onClick":a!=null&&(e.onclick=fa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!qe.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[Tt]||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,""):Ci(e,n,a)}}}function sn(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":We("error",e),We("load",e);var a=!1,l=!1,o;for(o in n)if(n.hasOwnProperty(o)){var u=n[o];if(u!=null)switch(o){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:Ct(e,t,o,u,n,null)}}l&&Ct(e,t,"srcSet",n.srcSet,n,null),a&&Ct(e,t,"src",n.src,n,null);return;case"input":We("invalid",e);var p=o=u=l=null,C=null,L=null;for(a in n)if(n.hasOwnProperty(a)){var G=n[a];if(G!=null)switch(a){case"name":l=G;break;case"type":u=G;break;case"checked":C=G;break;case"defaultChecked":L=G;break;case"value":o=G;break;case"defaultValue":p=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(d(137,t));break;default:Ct(e,t,a,G,n,null)}}Su(e,o,p,C,L,u,l,!1);return;case"select":We("invalid",e),a=u=o=null;for(l in n)if(n.hasOwnProperty(l)&&(p=n[l],p!=null))switch(l){case"value":o=p;break;case"defaultValue":u=p;break;case"multiple":a=p;default:Ct(e,t,l,p,n,null)}t=o,n=u,e.multiple=!!a,t!=null?_l(e,!!a,t,!1):n!=null&&_l(e,!!a,n,!0);return;case"textarea":We("invalid",e),o=l=a=null;for(u in n)if(n.hasOwnProperty(u)&&(p=n[u],p!=null))switch(u){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:Ct(e,t,u,p,n,null)}Cu(e,a,l,o);return;case"option":for(C in n)n.hasOwnProperty(C)&&(a=n[C],a!=null)&&(C==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":Ct(e,t,C,a,n,null));return;case"dialog":We("beforetoggle",e),We("toggle",e),We("cancel",e),We("close",e);break;case"iframe":case"object":We("load",e);break;case"video":case"audio":for(a=0;a<li.length;a++)We(li[a],e);break;case"image":We("error",e),We("load",e);break;case"details":We("toggle",e);break;case"embed":case"source":case"link":We("error",e),We("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(L in n)if(n.hasOwnProperty(L)&&(a=n[L],a!=null))switch(L){case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:Ct(e,t,L,a,n,null)}return;default:if(Zr(t)){for(G in n)n.hasOwnProperty(G)&&(a=n[G],a!==void 0&&Oc(e,t,G,a,n,void 0));return}}for(p in n)n.hasOwnProperty(p)&&(a=n[p],a!=null&&Ct(e,t,p,a,n,null))}function Eg(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,u=null,p=null,C=null,L=null,G=null;for(j in n){var Z=n[j];if(n.hasOwnProperty(j)&&Z!=null)switch(j){case"checked":break;case"value":break;case"defaultValue":C=Z;default:a.hasOwnProperty(j)||Ct(e,t,j,null,a,Z)}}for(var _ in a){var j=a[_];if(Z=n[_],a.hasOwnProperty(_)&&(j!=null||Z!=null))switch(_){case"type":o=j;break;case"name":l=j;break;case"checked":L=j;break;case"defaultChecked":G=j;break;case"value":u=j;break;case"defaultValue":p=j;break;case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(d(137,t));break;default:j!==Z&&Ct(e,t,_,j,a,Z)}}Qr(e,u,p,C,L,G,o,l);return;case"select":j=u=p=_=null;for(o in n)if(C=n[o],n.hasOwnProperty(o)&&C!=null)switch(o){case"value":break;case"multiple":j=C;default:a.hasOwnProperty(o)||Ct(e,t,o,null,a,C)}for(l in a)if(o=a[l],C=n[l],a.hasOwnProperty(l)&&(o!=null||C!=null))switch(l){case"value":_=o;break;case"defaultValue":p=o;break;case"multiple":u=o;default:o!==C&&Ct(e,t,l,o,a,C)}t=p,n=u,a=j,_!=null?_l(e,!!n,_,!1):!!a!=!!n&&(t!=null?_l(e,!!n,t,!0):_l(e,!!n,n?[]:"",!1));return;case"textarea":j=_=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:Ct(e,t,p,null,a,l)}for(u in a)if(l=a[u],o=n[u],a.hasOwnProperty(u)&&(l!=null||o!=null))switch(u){case"value":_=l;break;case"defaultValue":j=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(d(91));break;default:l!==o&&Ct(e,t,u,l,a,o)}wu(e,_,j);return;case"option":for(var ye in n)_=n[ye],n.hasOwnProperty(ye)&&_!=null&&!a.hasOwnProperty(ye)&&(ye==="selected"?e.selected=!1:Ct(e,t,ye,null,a,_));for(C in a)_=a[C],j=n[C],a.hasOwnProperty(C)&&_!==j&&(_!=null||j!=null)&&(C==="selected"?e.selected=_&&typeof _!="function"&&typeof _!="symbol":Ct(e,t,C,_,a,j));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 _e in n)_=n[_e],n.hasOwnProperty(_e)&&_!=null&&!a.hasOwnProperty(_e)&&Ct(e,t,_e,null,a,_);for(L in a)if(_=a[L],j=n[L],a.hasOwnProperty(L)&&_!==j&&(_!=null||j!=null))switch(L){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(d(137,t));break;default:Ct(e,t,L,_,a,j)}return;default:if(Zr(t)){for(var kt in n)_=n[kt],n.hasOwnProperty(kt)&&_!==void 0&&!a.hasOwnProperty(kt)&&Oc(e,t,kt,void 0,a,_);for(G in a)_=a[G],j=n[G],!a.hasOwnProperty(G)||_===j||_===void 0&&j===void 0||Oc(e,t,G,_,a,j);return}}for(var D in n)_=n[D],n.hasOwnProperty(D)&&_!=null&&!a.hasOwnProperty(D)&&Ct(e,t,D,null,a,_);for(Z in a)_=a[Z],j=n[Z],!a.hasOwnProperty(Z)||_===j||_==null&&j==null||Ct(e,t,Z,_,a,j)}function Dh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Lg(){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,u=l.initiatorType,p=l.duration;if(o&&p&&Dh(u)){for(u=0,p=l.responseEnd,a+=1;a<n.length;a++){var C=n[a],L=C.startTime;if(L>p)break;var G=C.transferSize,Z=C.initiatorType;G&&Dh(Z)&&(C=C.responseEnd,u+=G*(C<p?1:(p-L)/(C-L)))}if(--a,t+=8*(o+u)/(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 Bc=null,Hc=null;function Sr(e){return e.nodeType===9?e:e.ownerDocument}function Ah(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 Th(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 Uc(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 jc=null;function Rg(){var e=window.event;return e&&e.type==="popstate"?e===jc?!1:(jc=e,!0):(jc=null,!1)}var Eh=typeof setTimeout=="function"?setTimeout:void 0,_g=typeof clearTimeout=="function"?clearTimeout:void 0,Lh=typeof Promise=="function"?Promise:void 0,Og=typeof queueMicrotask=="function"?queueMicrotask:typeof Lh<"u"?function(e){return Lh.resolve(null).then(e).catch(Bg)}:Eh;function Bg(e){setTimeout(function(){throw e})}function Ia(e){return e==="head"}function Rh(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),fo(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")ii(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,ii(n);for(var o=n.firstChild;o;){var u=o.nextSibling,p=o.nodeName;o[ul]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=u}}else n==="body"&&ii(e.ownerDocument.body);n=l}while(n);fo(t)}function _h(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 Nc(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":Nc(n),ko(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Hg(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[ul])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=Qn(e.nextSibling),e===null)break}return null}function Ug(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Qn(e.nextSibling),e===null))return null;return e}function Oh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Qn(e.nextSibling),e===null))return null;return e}function qc(e){return e.data==="$?"||e.data==="$~"}function Yc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function jg(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 Qn(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 Gc=null;function Bh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Qn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Hh(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 Uh(e,t,n){switch(t=Sr(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 ii(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);ko(e)}var Kn=new Map,jh=new Set;function wr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Aa=J.d;J.d={f:Ng,r:qg,D:Yg,C:Gg,L:Xg,m:Vg,X:Qg,S:Fg,M:Kg};function Ng(){var e=Aa.f(),t=hr();return e||t}function qg(e){var t=be(e);t!==null&&t.tag===5&&t.type==="form"?ef(t):Aa.r(e)}var so=typeof document>"u"?null:document;function Nh(e,t,n){var a=so;if(a&&typeof t=="string"&&t){var l=Nn(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),jh.has(l)||(jh.add(l),e={rel:e,crossOrigin:n,href:t},a.querySelector(l)===null&&(t=a.createElement("link"),sn(t,"link",e),xe(t),a.head.appendChild(t)))}}function Yg(e){Aa.D(e),Nh("dns-prefetch",e,null)}function Gg(e,t){Aa.C(e,t),Nh("preconnect",e,t)}function Xg(e,t,n){Aa.L(e,t,n);var a=so;if(a&&e&&t){var l='link[rel="preload"][as="'+Nn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+Nn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+Nn(n.imageSizes)+'"]')):l+='[href="'+Nn(e)+'"]';var o=l;switch(t){case"style":o=co(e);break;case"script":o=uo(e)}Kn.has(o)||(e=z({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Kn.set(o,e),a.querySelector(l)!==null||t==="style"&&a.querySelector(ri(o))||t==="script"&&a.querySelector(si(o))||(t=a.createElement("link"),sn(t,"link",e),xe(t),a.head.appendChild(t)))}}function Vg(e,t){Aa.m(e,t);var n=so;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Nn(a)+'"][href="'+Nn(e)+'"]',o=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=uo(e)}if(!Kn.has(o)&&(e=z({rel:"modulepreload",href:e},t),Kn.set(o,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(si(o)))return}a=n.createElement("link"),sn(a,"link",e),xe(a),n.head.appendChild(a)}}}function Fg(e,t,n){Aa.S(e,t,n);var a=so;if(a&&e){var l=ve(a).hoistableStyles,o=co(e);t=t||"default";var u=l.get(o);if(!u){var p={loading:0,preload:null};if(u=a.querySelector(ri(o)))p.loading=5;else{e=z({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Kn.get(o))&&Xc(e,n);var C=u=a.createElement("link");xe(C),sn(C,"link",e),C._p=new Promise(function(L,G){C.onload=L,C.onerror=G}),C.addEventListener("load",function(){p.loading|=1}),C.addEventListener("error",function(){p.loading|=2}),p.loading|=4,Cr(u,t,a)}u={type:"stylesheet",instance:u,count:1,state:p},l.set(o,u)}}}function Qg(e,t){Aa.X(e,t);var n=so;if(n&&e){var a=ve(n).hoistableScripts,l=uo(e),o=a.get(l);o||(o=n.querySelector(si(l)),o||(e=z({src:e,async:!0},t),(t=Kn.get(l))&&Vc(e,t),o=n.createElement("script"),xe(o),sn(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function Kg(e,t){Aa.M(e,t);var n=so;if(n&&e){var a=ve(n).hoistableScripts,l=uo(e),o=a.get(l);o||(o=n.querySelector(si(l)),o||(e=z({src:e,async:!0,type:"module"},t),(t=Kn.get(l))&&Vc(e,t),o=n.createElement("script"),xe(o),sn(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},a.set(l,o))}}function qh(e,t,n,a){var l=(l=Le.current)?wr(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=co(n.href),n=ve(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=co(n.href);var o=ve(l).hoistableStyles,u=o.get(e);if(u||(l=l.ownerDocument||l,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,u),(o=l.querySelector(ri(e)))&&!o._p&&(u.instance=o,u.state.loading=5),Kn.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},Kn.set(e,n),o||Zg(l,e,n,u.state))),t&&a===null)throw Error(d(528,""));return u}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=uo(n),n=ve(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 co(e){return'href="'+Nn(e)+'"'}function ri(e){return'link[rel="stylesheet"]['+e+"]"}function Yh(e){return z({},e,{"data-precedence":e.precedence,precedence:null})}function Zg(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}),sn(t,"link",n),xe(t),e.head.appendChild(t))}function uo(e){return'[src="'+Nn(e)+'"]'}function si(e){return"script[async]"+e}function Gh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Nn(n.href)+'"]');if(a)return t.instance=a,xe(a),a;var l=z({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),xe(a),sn(a,"style",l),Cr(a,n.precedence,e),t.instance=a;case"stylesheet":l=co(n.href);var o=e.querySelector(ri(l));if(o)return t.state.loading|=4,t.instance=o,xe(o),o;a=Yh(n),(l=Kn.get(l))&&Xc(a,l),o=(e.ownerDocument||e).createElement("link"),xe(o);var u=o;return u._p=new Promise(function(p,C){u.onload=p,u.onerror=C}),sn(o,"link",a),t.state.loading|=4,Cr(o,n.precedence,e),t.instance=o;case"script":return o=uo(n.src),(l=e.querySelector(si(o)))?(t.instance=l,xe(l),l):(a=n,(l=Kn.get(o))&&(a=z({},n),Vc(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),xe(l),sn(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,Cr(a,n.precedence,e));return t.instance}function Cr(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,u=0;u<a.length;u++){var p=a[u];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 Xc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Vc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var kr=null;function Xh(e,t,n){if(kr===null){var a=new Map,l=kr=new Map;l.set(n,a)}else l=kr,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[ul]||o[gt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var u=o.getAttribute(t)||"";u=e+u;var p=a.get(u);p?p.push(o):a.set(u,[o])}}return a}function Vh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function $g(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 Fh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Wg(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=co(a.href),o=t.querySelector(ri(l));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=zr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,xe(o);return}o=t.ownerDocument||t,a=Yh(a),(l=Kn.get(l))&&Xc(a,l),o=o.createElement("link"),xe(o);var u=o;u._p=new Promise(function(p,C){u.onload=p,u.onerror=C}),sn(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=zr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Fc=0;function Jg(e,t){return e.stylesheets&&e.count===0&&Dr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&Dr(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&Fc===0&&(Fc=62500*Lg());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Dr(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>Fc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function zr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Dr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Mr=null;function Dr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Mr=new Map,t.forEach(Ig,e),Mr=null,zr.call(e))}function Ig(e,t){if(!(t.state.loading&4)){var n=Mr.get(e);if(n)var a=n.get(null);else{n=new Map,Mr.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<l.length;o++){var u=l[o];(u.nodeName==="LINK"||u.getAttribute("media")!=="not all")&&(n.set(u.dataset.precedence,u),a=u)}a&&n.set(null,a)}l=t.instance,u=l.getAttribute("data-precedence"),o=n.get(u)||a,o===a&&n.set(null,l),n.set(u,l),this.count++,a=zr.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 ci={$$typeof:le,Provider:null,Consumer:null,_currentValue:ee,_currentValue2:ee,_threadCount:0};function Pg(e,t,n,a,l,o,u,p,C){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=cl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cl(0),this.hiddenUpdates=cl(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=o,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=C,this.incompleteTransitions=new Map}function Qh(e,t,n,a,l,o,u,p,C,L,G,Z){return e=new Pg(e,t,n,u,C,L,G,Z,p),t=1,o===!0&&(t|=24),o=En(3,null,null,t),e.current=o,o.stateNode=e,t=ks(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:a,isDehydrated:n,cache:t},As(o),e}function Kh(e){return e?(e=Yl,e):Yl}function Zh(e,t,n,a,l,o){l=Kh(l),a.context===null?a.context=l:a.pendingContext=l,a=Ya(t),a.payload={element:n},o=o===void 0?null:o,o!==null&&(a.callback=o),n=Ga(e,a,t),n!==null&&(kn(n,e,t),Yo(n,e,t))}function $h(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Qc(e,t){$h(e,t),(e=e.alternate)&&$h(e,t)}function Wh(e){if(e.tag===13||e.tag===31){var t=pl(e,67108864);t!==null&&kn(t,e,67108864),Qc(e,67108864)}}function Jh(e){if(e.tag===13||e.tag===31){var t=Bn();t=ze(t);var n=pl(e,t);n!==null&&kn(n,e,t),Qc(e,t)}}var Ar=!0;function em(e,t,n,a){var l=A.T;A.T=null;var o=J.p;try{J.p=2,Kc(e,t,n,a)}finally{J.p=o,A.T=l}}function tm(e,t,n,a){var l=A.T;A.T=null;var o=J.p;try{J.p=8,Kc(e,t,n,a)}finally{J.p=o,A.T=l}}function Kc(e,t,n,a){if(Ar){var l=Zc(a);if(l===null)_c(e,t,a,Tr,n),Ph(e,a);else if(am(l,e,t,n,a))a.stopPropagation();else if(Ph(e,a),t&4&&-1<nm.indexOf(e)){for(;l!==null;){var o=be(l);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var u=Zn(o.pendingLanes);if(u!==0){var p=o;for(p.pendingLanes|=2,p.entangledLanes|=2;u;){var C=1<<31-at(u);p.entanglements[1]|=C,u&=~C}aa(o),(dt&6)===0&&(dr=_t()+500,ai(0))}}break;case 31:case 13:p=pl(o,2),p!==null&&kn(p,o,2),hr(),Qc(o,2)}if(o=Zc(a),o===null&&_c(e,t,a,Tr,n),o===l)break;l=o}l!==null&&a.stopPropagation()}else _c(e,t,a,null,n)}}function Zc(e){return e=Wr(e),$c(e)}var Tr=null;function $c(e){if(Tr=null,e=ua(e),e!==null){var t=m(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=x(t),e!==null)return e;e=null}else if(n===31){if(e=M(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 Tr=e,null}function Ih(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(pn()){case Mn:return 2;case bn:return 8;case yn:case $:return 32;case ce:return 268435456;default:return 32}default:return 32}}var Wc=!1,Pa=null,el=null,tl=null,ui=new Map,di=new Map,nl=[],nm="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 Ph(e,t){switch(e){case"focusin":case"focusout":Pa=null;break;case"dragenter":case"dragleave":el=null;break;case"mouseover":case"mouseout":tl=null;break;case"pointerover":case"pointerout":ui.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":di.delete(t.pointerId)}}function fi(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=be(t),t!==null&&Wh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function am(e,t,n,a,l){switch(t){case"focusin":return Pa=fi(Pa,e,t,n,a,l),!0;case"dragenter":return el=fi(el,e,t,n,a,l),!0;case"mouseover":return tl=fi(tl,e,t,n,a,l),!0;case"pointerover":var o=l.pointerId;return ui.set(o,fi(ui.get(o)||null,e,t,n,a,l)),!0;case"gotpointercapture":return o=l.pointerId,di.set(o,fi(di.get(o)||null,e,t,n,a,l)),!0}return!1}function ep(e){var t=ua(e.target);if(t!==null){var n=m(t);if(n!==null){if(t=n.tag,t===13){if(t=x(n),t!==null){e.blockedOn=t,nn(e.priority,function(){Jh(n)});return}}else if(t===31){if(t=M(n),t!==null){e.blockedOn=t,nn(e.priority,function(){Jh(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 Er(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Zc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);$r=a,n.target.dispatchEvent(a),$r=null}else return t=be(n),t!==null&&Wh(t),e.blockedOn=n,!1;t.shift()}return!0}function tp(e,t,n){Er(e)&&n.delete(t)}function lm(){Wc=!1,Pa!==null&&Er(Pa)&&(Pa=null),el!==null&&Er(el)&&(el=null),tl!==null&&Er(tl)&&(tl=null),ui.forEach(tp),di.forEach(tp)}function Lr(e,t){e.blockedOn===t&&(e.blockedOn=null,Wc||(Wc=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,lm)))}var Rr=null;function np(e){Rr!==e&&(Rr=e,i.unstable_scheduleCallback(i.unstable_NormalPriority,function(){Rr===e&&(Rr=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($c(a||n)===null)continue;break}var o=be(n);o!==null&&(e.splice(t,3),t-=3,Zs(o,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function fo(e){function t(C){return Lr(C,e)}Pa!==null&&Lr(Pa,e),el!==null&&Lr(el,e),tl!==null&&Lr(tl,e),ui.forEach(t),di.forEach(t);for(var n=0;n<nl.length;n++){var a=nl[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<nl.length&&(n=nl[0],n.blockedOn===null);)ep(n),n.blockedOn===null&&nl.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],u=l[Tt]||null;if(typeof o=="function")u||np(n);else if(u){var p=null;if(o&&o.hasAttribute("formAction")){if(l=o,u=o[Tt]||null)p=u.formAction;else if($c(l)!==null)continue}else p=u.action;typeof p=="function"?n[a+1]=p:(n.splice(a,3),a-=3),np(n)}}}function ap(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(u){return l=u})},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 Jc(e){this._internalRoot=e}_r.prototype.render=Jc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(d(409));var n=t.current,a=Bn();Zh(n,a,e,t,null,null)},_r.prototype.unmount=Jc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zh(e.current,2,null,e,null,null),hr(),t[An]=null}};function _r(e){this._internalRoot=e}_r.prototype.unstable_scheduleHydration=function(e){if(e){var t=ut();e={blockedOn:null,target:e,priority:t};for(var n=0;n<nl.length&&t!==0&&t<nl[n].priority;n++);nl.splice(n,0,e),n===0&&ep(e)}};var lp=c.version;if(lp!=="19.2.4")throw Error(d(527,lp,"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=b(t),e=e!==null?T(e):null,e=e===null?null:e.stateNode,e};var om={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Or=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Or.isDisabled&&Or.supportsFiber)try{Ne=Or.inject(om),ke=Or}catch{}}return gi.createRoot=function(e,t){if(!h(e))throw Error(d(299));var n=!1,a="",l=df,o=ff,u=hf;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&&(u=t.onRecoverableError)),t=Qh(e,1,!1,null,null,n,a,null,l,o,u,ap),e[An]=t.current,Rc(e),new Jc(t)},gi.hydrateRoot=function(e,t,n){if(!h(e))throw Error(d(299));var a=!1,l="",o=df,u=ff,p=hf,C=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&&(u=n.onCaughtError),n.onRecoverableError!==void 0&&(p=n.onRecoverableError),n.formState!==void 0&&(C=n.formState)),t=Qh(e,1,!0,t,n??null,a,l,C,o,u,p,ap),t.context=Kh(null),n=t.current,a=Bn(),a=ze(a),l=Ya(a),l.callback=null,Ga(n,l,a),n=a,t.current.lanes=n,ca(t,n),aa(t),e[An]=t.current,Rc(e),new _r(t)},gi.version="19.2.4",gi}var kp;function d1(){if(kp)return au.exports;kp=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(c){console.error(c)}}return i(),au.exports=u1(),au.exports}var f1=d1(),zp=function(c,f){var d=arguments;if(f==null||!wi.call(f,"css"))return v.createElement.apply(void 0,d);var h=d.length,m=new Array(h);m[0]=bu,m[1]=mu(c,f);for(var x=2;x<h;x++)m[x]=d[x];return v.createElement.apply(null,m)};(function(i){var c;c||(c=i.JSX||(i.JSX={}))})(zp||(zp={}));function g(){for(var i=arguments.length,c=new Array(i),f=0;f<i;f++)c[f]=arguments[f];return Fp(c)}function Ht(){var i=g.apply(void 0,arguments),c="animation-"+i.name;return{name:c,styles:"@keyframes "+c+"{"+i.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const h1={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},p1={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:h1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestDownload:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},deleteOrphans:async()=>{}},Kp=v.createContext(p1);function vo(){return v.useContext(Kp)}const sl="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Ubuntu, sans-serif",s={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"},N={xs:"13px",sm:"14px",base:"16px",lg:"19px",xl:"22px"},Ta=g("font-family:",sl,";font-size:",N.base,";line-height:1.5;color:",s.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;}",""),g1=Ht`
10
+ from { opacity: 0; }
11
+ to { opacity: 1; }
12
+ `,m1=Ht`
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
+ `,b1=Ht`
22
+ from { transform: rotate(0deg); }
23
+ to { transform: rotate(360deg); }
24
+ `,Ue={overlay:g("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:",g1," 0.15s ease-out;font-family:",sl,";",""),modal:g(Ta," background-color:",s.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:",m1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:g("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"5e7rpo",styles:"padding:12px 24px 24px"},message:g("font-size:",N.base,";color:",s.textSecondary,";margin:0;line-height:1.6;",""),footer:g("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",s.border,";background-color:",s.background,";",""),btn:g("padding:10px 18px;font-size:",N.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:g("background-color:",s.surface,";border:1px solid ",s.border,";color:",s.text,";&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),btnConfirm:g("background-color:",s.primary,";border:1px solid ",s.primary,";color:white;&:hover{background-color:",s.primaryHover,";border-color:",s.primaryHover,";}",""),btnDanger:g("background-color:",s.danger,";border:1px solid ",s.danger,";color:white;&:hover{background-color:",s.dangerHover,";border-color:",s.dangerHover,";}","")};function bo({title:i,message:c,confirmLabel:f="Confirm",cancelLabel:d="Cancel",variant:h="default",onConfirm:m,onCancel:x}){return r("div",{css:Ue.overlay,onClick:x,children:y("div",{css:Ue.modal,onClick:M=>M.stopPropagation(),children:[r("div",{css:Ue.header,children:r("h3",{css:Ue.title,children:i})}),r("div",{css:Ue.body,children:r("p",{css:Ue.message,children:c})}),y("div",{css:Ue.footer,children:[r("button",{css:[Ue.btn,Ue.btnCancel,"",""],onClick:x,children:d}),r("button",{css:[Ue.btn,h==="danger"?Ue.btnDanger:Ue.btnConfirm,"",""],onClick:m,children:f})]})]})})}const y1={input:g("width:100%;padding:10px 12px;font-size:",N.base,";border:1px solid ",s.border,";border-radius:6px;background:",s.surface,";color:",s.text,";margin-top:12px;transition:all 0.15s ease;&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 2px ",s.primaryLight,";}&::placeholder{color:",s.textMuted,";}","")};function Al({title:i,message:c,inputLabel:f,defaultValue:d="",placeholder:h,confirmLabel:m="Confirm",cancelLabel:x="Cancel",isLoading:M=!1,loadingLabel:S="Processing...",onConfirm:b,onCancel:T}){const[z,R]=bt.useState(d),Y=U=>{U.preventDefault(),z.trim()&&!M&&b(z.trim())};return r("div",{css:Ue.overlay,onClick:M?void 0:T,children:r("div",{css:Ue.modal,onClick:U=>U.stopPropagation(),children:y("form",{onSubmit:Y,children:[r("div",{css:Ue.header,children:r("h3",{css:Ue.title,children:i})}),y("div",{css:Ue.body,children:[c&&r("p",{css:Ue.message,children:c}),f&&r("label",{css:Ue.message,children:f}),r("input",{css:y1.input,type:"text",value:z,onChange:U=>R(U.target.value),placeholder:h,autoFocus:!0,disabled:M})]}),y("div",{css:Ue.footer,children:[r("button",{type:"button",css:[Ue.btn,Ue.btnCancel,"",""],onClick:T,disabled:M,children:x}),r("button",{type:"submit",css:[Ue.btn,Ue.btnConfirm,"",""],disabled:!z.trim()||M,children:M?y(Pe,{children:[r("span",{css:g("display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:",b1," 0.75s linear infinite;margin-right:6px;","")}),S]}):m})]})]})})})}function Vr({title:i,message:c,buttonLabel:f="OK",onClose:d}){return r("div",{css:Ue.overlay,onClick:d,children:y("div",{css:Ue.modal,onClick:h=>h.stopPropagation(),children:[r("div",{css:Ue.header,children:r("h3",{css:Ue.title,children:i})}),r("div",{css:Ue.body,children:r("p",{css:Ue.message,children:c})}),r("div",{css:Ue.footer,children:r("button",{css:[Ue.btn,Ue.btnConfirm,"",""],onClick:d,children:f})})]})})}const ll={progressContainer:{name:"yz1nei",styles:"margin-top:16px"},progressBar:g("width:100%;height:8px;background-color:",s.background,";border-radius:4px;overflow:hidden;margin-bottom:12px;",""),progressFill:g("height:100%;background:linear-gradient(90deg, ",s.primary,", ",s.primaryHover,");border-radius:4px;transition:width 0.3s ease;",""),progressText:g("font-size:",N.sm,";color:",s.textSecondary,";margin:0;display:flex;justify-content:space-between;align-items:center;",""),currentFile:g("font-size:",N.xs,";color:",s.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:g("font-size:",N.xs,";color:#991b1b;margin:0 0 4px;&:last-child{margin-bottom:0;}","")};function rl({title:i,progress:c,onClose:f,onDeleteOrphans:d,onStop:h}){const m=c.status==="complete",x=c.status==="error",M=c.status==="stopped",S=c.status==="stopping",b=m||x||M,T=!b||S;return r("div",{css:Ue.overlay,children:y("div",{css:Ue.modal,onClick:z=>z.stopPropagation(),children:[r("div",{css:Ue.header,children:r("h3",{css:Ue.title,children:i})}),r("div",{css:Ue.body,children:x?r("p",{css:Ue.message,children:c.message||"An error occurred"}):M?y("p",{css:Ue.message,children:["Processing stopped. Processed ",c.processed??c.current," image",(c.processed??c.current)!==1?"s":""," before stopping."]}):m?y(Pe,{children:[y("p",{css:Ue.message,children:[c.message?c.message:c.isDelete?y(Pe,{children:["Deleted ",c.processed," file",c.processed!==1?"s":"",".",c.errors!==void 0&&c.errors>0?y(Pe,{children:[" ",c.errors," error",c.errors!==1?"s":""," occurred."]}):null]}):c.isMove?y(Pe,{children:["Moved ",c.processed," file",c.processed!==1?"s":"",".",c.errors!==void 0&&c.errors>0?y(Pe,{children:[" ",c.errors," error",c.errors!==1?"s":""," occurred."]}):null]}):c.isScan?y(Pe,{children:[c.alreadyProcessed!==void 0&&c.alreadyProcessed>0?y(Pe,{children:[c.alreadyProcessed," image",c.alreadyProcessed!==1?"s":""," already exist. "]}):null,"Scanned ",c.processed," new image",c.processed!==1?"s":"",".",c.orphanedEntries!==void 0&&c.orphanedEntries>0?y(Pe,{children:[" Removed ",c.orphanedEntries," orphaned entr",c.orphanedEntries!==1?"ies":"y","."]}):null,c.pendingUpdates!==void 0&&c.pendingUpdates>0?y(Pe,{children:[" ",c.pendingUpdates," file",c.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):y(Pe,{children:["Processed ",c.processed," new image",c.processed!==1?"s":"",".",c.alreadyProcessed!==void 0&&c.alreadyProcessed>0?y(Pe,{children:[" ",c.alreadyProcessed," already processed."]}):null]}),c.orphansRemoved!==void 0&&c.orphansRemoved>0?y(Pe,{children:[" Removed ",c.orphansRemoved," orphaned thumbnail",c.orphansRemoved!==1?"s":"","."]}):null]}),c.errorMessages&&c.errorMessages.length>0&&y("div",{css:ll.errorList,children:[c.errorMessages.slice(0,10).map((z,R)=>r("p",{css:ll.errorItem,children:z},R)),c.errorMessages.length>10&&y("p",{css:ll.errorItem,children:["...and ",c.errorMessages.length-10," more"]})]})]}):y(Pe,{children:[r("p",{css:Ue.message,children:c.status==="cleanup"?c.message||"Cleaning up...":c.message||"Processing..."}),y("div",{css:ll.progressContainer,children:[r("div",{css:ll.progressBar,children:r("div",{css:ll.progressFill,style:{width:`${c.percent}%`}})}),y("div",{css:ll.progressText,children:[y("span",{children:[c.current," of ",c.total]}),y("span",{children:[c.percent,"%"]})]}),c.currentFile&&r("p",{css:ll.currentFile,title:c.currentFile,children:c.currentFile})]})]})}),y("div",{css:Ue.footer,children:[T&&h&&r("button",{css:[Ue.btn,Ue.btnDanger,"",""],onClick:h,disabled:c.status==="stopping",children:c.status==="stopping"?"Stopping...":"Stop"}),b&&c.orphanedFiles&&c.orphanedFiles.length>0&&d&&y("button",{css:[Ue.btn,Ue.btnDanger,"",""],onClick:d,children:["Delete ",c.orphanedFiles.length," Orphan",c.orphanedFiles.length!==1?"s":""]}),b&&r("button",{css:[Ue.btn,Ue.btnConfirm,"",""],onClick:f,children:"Done"})]})]})})}function yu(i){const{setShowProgress:c,setProgressTitle:f,setProgressState:d,triggerRefresh:h}=i,m=v.useRef(null),x=v.useRef(!1),M=v.useRef(!1),S=v.useRef(null),b=v.useCallback(()=>{m.current&&m.current.abort()},[]);return{execute:v.useCallback(async z=>{const{endpoint:R,body:Y,title:U,operationType:X,onComplete:W,onError:V}=z;if(x.current){console.warn("Streaming operation already in progress");return}x.current=!0,M.current=!1;const le=`${R.split("/").pop()?.replace("-stream","")||"op"}-${Date.now()}-${Math.random().toString(36).slice(2)}`;S.current=le;const he=new AbortController;m.current=he;const F=async()=>{M.current=!0,d(te=>({...te,status:"stopping"}));try{await fetch("/api/studio/cancel-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationId:le})})}catch{}};he.signal.addEventListener("abort",F),f(U),c(!0),d({current:0,total:0,percent:0,status:"processing",message:`Starting ${U.toLowerCase()}...`});try{const te=await fetch(R,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...Y,operationId:le})});if(!te.ok){const q=await te.json().catch(()=>({}));throw new Error(q.error||`Request failed: ${te.status}`)}if(!te.body)throw new Error("No response body");const P=te.body.getReader(),oe=new TextDecoder;let B="";try{for(;;){const{done:q,value:se}=await P.read();if(q)break;B+=oe.decode(se,{stream:!0});const pe=B.split(`
25
+
26
+ `);B=pe.pop()||"";for(const fe of pe)if(fe.startsWith("data: "))try{const re=JSON.parse(fe.slice(6));if(re.type==="start")d(Ae=>({...Ae,total:re.total||Ae.total}));else if(re.type==="progress")d({current:re.current||0,total:re.total||0,percent:re.percent||Math.round((re.current||0)/(re.total||1)*100),status:"processing",currentFile:re.currentFile,message:re.message});else if(re.type==="cleanup")d(Ae=>({...Ae,status:"cleanup",message:re.message}));else if(re.type==="complete"){const Ae=re.cancelled===!0,A=re.processed??re.moved??re.renamed??re.pushed??re.downloaded??re.added??re.imported??re.deleted??re.current??0;d({current:A,total:A,percent:100,status:Ae?"stopped":re.errors&&re.errors>0?"error":"complete",message:re.message,processed:A,errors:re.errors,orphanedFiles:re.orphanedFiles,isDelete:X==="delete",isMove:X==="move",isScan:X==="scan"}),h(),W?.(re)}else re.type==="error"&&(d(Ae=>({...Ae,status:"error",message:re.message})),V?.(re.message||"Unknown error"))}catch{}}}catch(q){if(!M.current)throw q}finally{he.signal.removeEventListener("abort",F)}}catch(te){if(!M.current){const P=te instanceof Error?te.message:"Operation failed";console.error(`${U} error:`,te),d({current:0,total:0,percent:0,status:"error",message:P}),V?.(P)}}finally{x.current=!1,m.current=null,S.current=null}},[c,f,d,h]),stop:b,get isRunning(){return x.current}}}const v1=Ht`
27
+ from { opacity: 0; }
28
+ to { opacity: 1; }
29
+ `,x1=Ht`
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
+ `,qt={overlay:g("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:",v1," 0.15s ease-out;font-family:",sl,";",""),modal:g(Ta," background-color:",s.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:",x1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:g("font-size:",N.lg,";font-weight:600;color:",s.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:g("font-size:",N.base,";color:",s.textSecondary,";margin:0 0 16px;line-height:1.6;",""),folderList:{name:"1axgfg3",styles:"display:flex;flex-direction:column;gap:0"},folderItem:g("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:",s.surfaceHover,";}",""),treeIndent:{name:"197dxto",styles:"display:flex;align-items:center;height:100%"},treeLine:g("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 ",s.textSecondary,";}&::after{content:'';position:absolute;left:8px;top:50%;width:8px;height:0;border-top:1px dashed ",s.textSecondary,";}",""),folderItemSelected:g("background-color:",s.primaryLight,";border-color:",s.primary,";&:hover{background-color:",s.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:g("font-size:",N.base,";color:",s.text,";flex:1;",""),footer:g("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",s.border,";background-color:",s.background,";",""),btn:g("padding:10px 18px;font-size:",N.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:g("background-color:",s.surface,";border:1px solid ",s.border,";color:",s.text,";&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),btnConfirm:g("background-color:",s.primary,";border:1px solid ",s.primary,";color:white;&:hover:not(:disabled){background-color:",s.primaryHover,";border-color:",s.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),loading:g("display:flex;align-items:center;justify-content:center;padding:40px;color:",s.textSecondary,";",""),spinner:g("width:24px;height:24px;border-radius:50%;border:3px solid ",s.border,";border-top-color:",s.primary,";animation:spin 0.8s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}","")};function Zp({selectedItems:i,currentPath:c,onMove:f,onCancel:d}){const[h,m]=v.useState([]),[x,M]=v.useState(!0),[S,b]=v.useState(null);v.useEffect(()=>{async function U(){try{const X=await fetch("/api/studio/list-folders");if(X.ok){const W=await X.json();console.log("Loaded folders:",W),m(W.folders||[])}else console.error("Failed to load folders:",X.status,await X.text())}catch(X){console.error("Failed to load folders:",X)}finally{M(!1)}}U()},[]);const T=Array.from(i),z=h.filter(U=>!T.some(X=>U.path===X||U.path.startsWith(X+"/"))),R=U=>U===c,Y=()=>{S&&f(S)};return r("div",{css:qt.overlay,onClick:d,children:y("div",{css:qt.modal,onClick:U=>U.stopPropagation(),children:[r("div",{css:qt.header,children:r("h3",{css:qt.title,children:"Move Items"})}),y("div",{css:qt.body,children:[y("p",{css:qt.message,children:["Select a destination folder for ",i.size," item",i.size!==1?"s":"",":"]}),x?r("div",{css:qt.loading,children:r("div",{css:qt.spinner})}):z.length===0?r("div",{css:qt.loading,children:"No available folders to move to."}):r("div",{css:qt.folderList,children:z.map(U=>{const X=R(U.path);return y("div",{css:[qt.folderItem,S===U.path&&qt.folderItemSelected,X&&qt.folderItemDisabled,"",""],style:{paddingLeft:12},onClick:()=>!X&&b(U.path),children:[U.depth>0&&r("div",{css:qt.treeIndent,children:Array.from({length:U.depth}).map((W,V)=>r("div",{css:qt.treeLine},V))}),r("svg",{css:qt.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"})}),y("span",{css:qt.folderName,children:[U.name,X&&" (current)"]})]},U.path)})})]}),y("div",{css:qt.footer,children:[r("button",{css:[qt.btn,qt.btnCancel,"",""],onClick:d,children:"Cancel"}),r("button",{css:[qt.btn,qt.btnConfirm,"",""],onClick:Y,disabled:!S,children:"Move Here"})]})]})})}const S1=`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`,Se={overlay:{name:"8ivopw",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.6);display:flex;align-items:center;justify-content:center;z-index:1100;padding:20px"},modal:g("background:",s.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:g("display:flex;align-items:center;gap:12px;padding:20px 24px;border-bottom:1px solid ",s.border,";",""),icon:g("width:32px;height:32px;color:",s.primary,";flex-shrink:0;",""),title:g("font-size:",N.xl,";font-weight:600;color:",s.text,";margin:0;",""),closeBtn:g("margin-left:auto;background:none;border:none;padding:4px;cursor:pointer;color:",s.textMuted,";border-radius:4px;&:hover{color:",s.text,";background:",s.surfaceHover,";}",""),closeIcon:{name:"1aynuae",styles:"width:20px;height:20px"},content:{name:"vxuddk",styles:"padding:24px"},intro:g("font-size:",N.base,";color:",s.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:g("width:28px;height:28px;border-radius:50%;background:",s.primaryLight,";color:",s.primary,";font-size:",N.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:g("font-size:",N.base,";font-weight:500;color:",s.text,";margin:0 0 4px 0;",""),stepDesc:g("font-size:",N.sm,";color:",s.textSecondary,";margin:0;line-height:1.5;",""),link:g("color:",s.primary,";text-decoration:none;font-weight:500;&:hover{text-decoration:underline;}",""),envVarsWrapper:{name:"1ksolcl",styles:"position:relative;margin-top:20px"},envVars:g("background:",s.background,";border:1px solid ",s.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:",s.text,";overflow-x:auto;",""),envVar:{name:"4zleql",styles:"display:block"},envKey:g("color:",s.primary,";",""),envValue:g("color:",s.textSecondary,";",""),copyBtn:g("position:absolute;top:8px;right:8px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;color:",s.textMuted,";transition:all 0.15s ease;&:hover{background:",s.surfaceHover,";color:",s.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:g("padding:16px 24px;border-top:1px solid ",s.border,";display:flex;justify-content:flex-end;gap:12px;",""),docsBtn:g("padding:10px 16px;border-radius:6px;font-size:",N.base,";font-weight:500;border:1px solid ",s.border,";background:",s.surface,";color:",s.text,";cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:all 0.15s ease;&:hover{background:",s.surfaceHover,";border-color:#d0d5dd;}",""),doneBtn:g("padding:10px 20px;border-radius:6px;font-size:",N.base,";font-weight:500;border:none;background:",s.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",s.primaryHover,";}",""),externalIcon:{name:"1djxupe",styles:"width:14px;height:14px"}};function $p({isOpen:i,onClose:c}){const[f,d]=v.useState(!1),h=async()=>{try{await navigator.clipboard.writeText(S1),d(!0),setTimeout(()=>d(!1),2e3)}catch(m){console.error("Failed to copy:",m)}};return i?r("div",{css:Se.overlay,onClick:c,children:y("div",{css:Se.modal,onClick:m=>m.stopPropagation(),children:[y("div",{css:Se.header,children:[r("svg",{css:Se.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:Se.title,children:"Set Up CDN Storage"}),r("button",{css:Se.closeBtn,onClick:c,children:r("svg",{css:Se.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"})})})]}),y("div",{css:Se.content,children:[r("p",{css:Se.intro,children:"Sync your images to Cloudflare R2 for faster global delivery. R2 offers generous free tier with no egress fees."}),y("ol",{css:Se.steps,children:[y("li",{css:Se.step,children:[r("span",{css:Se.stepNumber,children:"1"}),y("div",{css:Se.stepContent,children:[r("h4",{css:Se.stepTitle,children:"Create a Cloudflare account"}),y("p",{css:Se.stepDesc,children:["Sign up at"," ",r("a",{css:Se.link,href:"https://dash.cloudflare.com/sign-up",target:"_blank",rel:"noopener noreferrer",children:"dash.cloudflare.com"})," ","if you don't have one already."]})]})]}),y("li",{css:Se.step,children:[r("span",{css:Se.stepNumber,children:"2"}),y("div",{css:Se.stepContent,children:[r("h4",{css:Se.stepTitle,children:"Create an R2 bucket"}),y("p",{css:Se.stepDesc,children:["Go to R2 in your Cloudflare dashboard and create a new bucket. Choose a name like ",r("code",{children:"my-images"}),"."]})]})]}),y("li",{css:Se.step,children:[r("span",{css:Se.stepNumber,children:"3"}),y("div",{css:Se.stepContent,children:[r("h4",{css:Se.stepTitle,children:"Enable public access"}),y("p",{css:Se.stepDesc,children:['In bucket settings, enable "Public Access" and copy the public URL (e.g., ',r("code",{children:"https://pub-xxx.r2.dev"}),")."]})]})]}),y("li",{css:Se.step,children:[r("span",{css:Se.stepNumber,children:"4"}),y("div",{css:Se.stepContent,children:[r("h4",{css:Se.stepTitle,children:"Create API token"}),r("p",{css:Se.stepDesc,children:'Go to R2 → Manage R2 API Tokens → Create API Token. Select "Object Read & Write" permissions for your bucket.'})]})]}),y("li",{css:Se.step,children:[r("span",{css:Se.stepNumber,children:"5"}),y("div",{css:Se.stepContent,children:[r("h4",{css:Se.stepTitle,children:"Add environment variables"}),y("p",{css:Se.stepDesc,children:["Add these to your ",r("code",{children:".env.local"})," file:"]})]})]})]}),y("div",{css:Se.envVarsWrapper,children:[y("div",{css:Se.envVars,children:[y("span",{css:Se.envVar,children:[r("span",{css:Se.envKey,children:"CLOUDFLARE_R2_ACCOUNT_ID"}),"=",r("span",{css:Se.envValue,children:"your_account_id"})]}),y("span",{css:Se.envVar,children:[r("span",{css:Se.envKey,children:"CLOUDFLARE_R2_ACCESS_KEY_ID"}),"=",r("span",{css:Se.envValue,children:"your_access_key"})]}),y("span",{css:Se.envVar,children:[r("span",{css:Se.envKey,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY"}),"=",r("span",{css:Se.envValue,children:"your_secret_key"})]}),y("span",{css:Se.envVar,children:[r("span",{css:Se.envKey,children:"CLOUDFLARE_R2_BUCKET_NAME"}),"=",r("span",{css:Se.envValue,children:"your_bucket_name"})]}),y("span",{css:Se.envVar,children:[r("span",{css:Se.envKey,children:"CLOUDFLARE_R2_PUBLIC_URL"}),"=",r("span",{css:Se.envValue,children:"https://pub-xxx.r2.dev"})]}),y("span",{css:Se.envVar,children:[r("span",{css:Se.envKey,children:"NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL"}),"=",r("span",{css:Se.envValue,children:"https://pub-xxx.r2.dev"})]})]}),y("button",{css:Se.copyBtn,onClick:h,title:"Copy to clipboard",children:[f&&r("span",{css:Se.copiedTooltip,children:"Copied!"}),r("svg",{css:Se.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"})})]})]})]}),y("div",{css:Se.footer,children:[y("a",{css:Se.docsBtn,href:"https://developers.cloudflare.com/r2/get-started/",target:"_blank",rel:"noopener noreferrer",children:["R2 Documentation",r("svg",{css:Se.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:Se.doneBtn,onClick:c,children:"Got it"})]})]})}):null}const w1=Ht`
44
+ from { opacity: 0; }
45
+ to { opacity: 1; }
46
+ `,C1=Ht`
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
+ `,Dt={overlay:g("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:",w1," 0.15s ease-out;font-family:",sl,";",""),modal:g(Ta," background-color:",s.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:",C1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:g("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;letter-spacing:-0.02em;",""),tabs:g("display:flex;gap:0;margin-top:16px;border-bottom:1px solid ",s.border,";",""),tab:g("padding:12px 20px;font-size:",N.base,";font-weight:500;color:",s.textSecondary,";background:none;border:none;cursor:pointer;position:relative;transition:color 0.15s;&:hover{color:",s.text,";}",""),tabActive:g("color:",s.primary,";&::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background-color:",s.primary,";}",""),body:{name:"1po9b7e",styles:"padding:24px;min-height:200px"},dropzone:g("border:2px dashed ",s.border,";border-radius:8px;padding:40px 24px;text-align:center;cursor:pointer;transition:all 0.15s;&:hover{border-color:",s.primary,";background-color:",s.primaryLight,";}",""),dropzoneActive:g("border-color:",s.primary,";background-color:",s.primaryLight,";",""),dropzoneIcon:g("width:48px;height:48px;margin:0 auto 16px;color:",s.textMuted,";",""),dropzoneText:g("font-size:",N.base,";color:",s.text,";margin:0 0 4px;",""),dropzoneHint:g("font-size:",N.sm,";color:",s.textSecondary,";margin:0;",""),textarea:g("width:100%;min-height:150px;padding:12px;font-size:",N.sm,";font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;border:1px solid ",s.border,";border-radius:8px;resize:vertical;&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 3px ",s.primaryLight,";}&::placeholder{color:",s.textMuted,";}",""),textareaLabel:g("font-size:",N.sm,";color:",s.textSecondary,";margin:0 0 8px;",""),footer:g("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",s.border,";background-color:",s.background,";",""),btn:g("padding:10px 18px;font-size:",N.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:g("background-color:",s.surface,";border:1px solid ",s.border,";color:",s.text,";&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),btnConfirm:g("background-color:",s.primary,";border:1px solid ",s.primary,";color:white;&:hover:not(:disabled){background-color:",s.primaryHover,";border-color:",s.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),fileInput:{name:"eivff4",styles:"display:none"},selectedFiles:g("margin-top:16px;padding:12px;background-color:",s.background,";border-radius:6px;font-size:",N.sm,";color:",s.text,";","")};function k1({currentPath:i,onClose:c,onUploadComplete:f,streamingOperation:d,setShowProgress:h,setProgressTitle:m,setProgressState:x}){const[M,S]=v.useState("upload"),[b,T]=v.useState([]),[z,R]=v.useState(""),[Y,U]=v.useState(!1),[X,W]=v.useState(!1),[V,ae]=v.useState(!1),le=v.useRef(null),he=v.useCallback(B=>{B&&T(Array.from(B))},[]),F=v.useCallback(B=>{B.preventDefault(),U(!1),he(B.dataTransfer.files)},[he]),te=v.useRef(!1),P=v.useCallback(async()=>{if(b.length!==0){if(h&&m&&x){c(),te.current=!1,m("Uploading Files"),h(!0),x({current:0,total:b.length,percent:0,status:"processing",message:"Uploading..."});let B=0;const q=[];for(let se=0;se<b.length;se++){if(te.current){x(re=>({...re,status:"stopped",message:`Stopped. Uploaded ${B} file${B!==1?"s":""}.`})),f();return}const pe=b[se],fe=new FormData;fe.append("file",pe),fe.append("path",i);try{(await fetch("/api/studio/upload",{method:"POST",body:fe})).ok?B++:q.push(pe.name)}catch{q.push(pe.name)}x({current:se+1,total:b.length,percent:Math.round((se+1)/b.length*100),status:"processing",currentFile:pe.name})}x({current:b.length,total:b.length,percent:100,status:"complete",message:`Uploaded ${B} file${B!==1?"s":""}.${q.length>0?` ${q.length} failed.`:""}`}),f();return}W(!0);try{for(const B of b){const q=new FormData;q.append("file",B),q.append("path",i),await fetch("/api/studio/upload",{method:"POST",body:q})}f(),c()}catch(B){console.error("Upload failed:",B)}finally{W(!1)}}},[b,i,f,c,h,m,x]),oe=v.useCallback(async()=>{const B=z.split(`
56
+ `).map(q=>q.trim()).filter(q=>q.length>0);if(B.length!==0){if(d){c(),await d.execute({endpoint:"/api/studio/import",body:{urls:B},title:"Importing URLs",onComplete:()=>{f()}});return}ae(!0);try{const se=(await fetch("/api/studio/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:B})})).body?.getReader();if(!se)throw new Error("No reader");const pe=new TextDecoder;for(;;){const{done:fe,value:re}=await se.read();if(fe)break;const A=pe.decode(re).split(`
57
+
58
+ `).filter(J=>J.startsWith("data: "));for(const J of A)JSON.parse(J.replace("data: ","")).type==="complete"&&(f(),c())}}catch(q){console.error("Import failed:",q)}finally{ae(!1)}}},[z,f,c,d]);return r("div",{css:Dt.overlay,onClick:c,children:y("div",{css:Dt.modal,onClick:B=>B.stopPropagation(),children:[y("div",{css:Dt.header,children:[r("h3",{css:Dt.title,children:"Add New"}),y("div",{css:Dt.tabs,children:[r("button",{css:[Dt.tab,M==="upload"&&Dt.tabActive,"",""],onClick:()=>S("upload"),children:"Upload Files"}),r("button",{css:[Dt.tab,M==="import"&&Dt.tabActive,"",""],onClick:()=>S("import"),children:"Import URLs"})]})]}),r("div",{css:Dt.body,children:M==="upload"?y(Pe,{children:[y("div",{css:[Dt.dropzone,Y&&Dt.dropzoneActive,"",""],onClick:()=>le.current?.click(),onDragOver:B=>{B.preventDefault(),U(!0)},onDragLeave:()=>U(!1),onDrop:F,children:[r("svg",{css:Dt.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:Dt.dropzoneText,children:"Drop files here or click to browse"}),r("p",{css:Dt.dropzoneHint,children:"Supports all file types"})]}),r("input",{ref:le,type:"file",multiple:!0,css:Dt.fileInput,onChange:B=>he(B.target.files)}),b.length>0&&y("div",{css:Dt.selectedFiles,children:[b.length," file",b.length!==1?"s":""," selected"]})]}):y(Pe,{children:[r("p",{css:Dt.textareaLabel,children:"Paste image URLs (one per line)"}),r("textarea",{css:Dt.textarea,value:z,onChange:B=>R(B.target.value),placeholder:`https://cdn.example.com/photos/image1.jpg
59
+ https://cdn.example.com/photos/image2.jpg`})]})}),y("div",{css:Dt.footer,children:[r("button",{css:[Dt.btn,Dt.btnCancel,"",""],onClick:c,children:"Cancel"}),M==="upload"?r("button",{css:[Dt.btn,Dt.btnConfirm,"",""],onClick:P,disabled:b.length===0||X,children:X?"Uploading...":"Upload"}):r("button",{css:[Dt.btn,Dt.btnConfirm,"",""],onClick:oe,disabled:!z.trim()||V,children:V?"Importing...":"Import"})]})]})})}const z1="36px",Ge={btn:g("height:",z1,";padding:0 12px;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),icon:g("width:16px;height:16px;color:",s.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:g(Ta," position:relative;background-color:",s.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:g("font-size:",N.xl,";font-weight:600;color:",s.text,";margin:0;letter-spacing:-0.02em;",""),closeBtn:g("padding:6px;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),sections:{name:"klisov",styles:"display:flex;flex-direction:column;gap:24px"},sectionTitle:g("font-size:",N.base,";font-weight:600;color:",s.text,";margin:0 0 12px 0;",""),description:g("font-size:",N.sm,";color:",s.textSecondary,";margin:0 0 12px 0;",""),codeWrapper:{name:"bjn8wh",styles:"position:relative"},code:g("background-color:",s.background,";border-radius:8px;padding:12px;padding-right:40px;font-family:'SF Mono',Monaco,Consolas,monospace;font-size:",N.xs,";color:",s.textSecondary,";border:1px solid ",s.border,";overflow-x:auto;white-space:nowrap;",""),copyBtn:g("position:absolute;top:8px;right:8px;padding:4px;background:",s.surface,";border:1px solid ",s.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",s.surfaceHover,";border-color:",s.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:g("width:14px;height:14px;color:",s.textSecondary,";",""),codeLine:{name:"1bbvuqp",styles:"margin:0 0 4px 0;&:last-child{margin:0;}"},input:g("width:100%;padding:10px 14px;border:1px solid ",s.border,";border-radius:6px;font-size:",N.base,";color:",s.text,";background:",s.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 3px ",s.primaryLight,";}&::placeholder{color:",s.textMuted,";}",""),grid:{name:"xtlr5l",styles:"display:grid;grid-template-columns:repeat(3, 1fr);gap:12px"},label:g("font-size:",N.xs,";font-weight:500;color:",s.textSecondary,";display:block;margin-bottom:6px;",""),footer:g("margin-top:24px;padding-top:20px;border-top:1px solid ",s.border,";display:flex;justify-content:flex-end;gap:12px;",""),cancelBtn:g("padding:10px 18px;font-size:",N.base,";font-weight:500;color:",s.text,";background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),saveBtn:g("padding:10px 18px;font-size:",N.base,";font-weight:500;color:white;background-color:",s.primary,";border:1px solid ",s.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",s.primaryHover,";border-color:",s.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:g("flex:1;padding:8px 12px;border:1px solid ",s.border,";border-radius:6px;font-size:",N.sm,";color:",s.text,";background:",s.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 3px ",s.primaryLight,";}",""),cdnIndex:g("font-size:",N.xs,";color:",s.textMuted,";width:24px;text-align:center;flex-shrink:0;",""),cdnDeleteBtn:g("padding:6px;background:none;border:none;cursor:pointer;color:",s.textMuted,";transition:color 0.15s;flex-shrink:0;&:hover{color:",s.danger,";}",""),cdnAddBtn:g("padding:8px 12px;font-size:",N.sm,";font-weight:500;color:",s.primary,";background:",s.primaryLight,";border:1px dashed ",s.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:",s.surface,";}",""),warning:g("font-size:",N.xs,";color:",s.danger,";margin-top:8px;padding:8px 12px;background:",s.dangerLight,";border-radius:6px;","")};function M1(){const[i,c]=v.useState(!1);return y(Pe,{children:[r("button",{css:Ge.btn,onClick:()=>c(!0),"aria-label":"Settings",children:y("svg",{css:Ge.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(A1,{onClose:()=>c(!1)})]})}const D1=`# 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 A1({onClose:i}){const{triggerRefresh:c}=vo(),[f,d]=v.useState(!1),[h,m]=v.useState([]),[x,M]=v.useState(!0),[S,b]=v.useState(!1),[T,z]=v.useState(!1);v.useEffect(()=>{async function V(){try{const le=await(await fetch("/api/studio/cdns")).json();m(le.cdns||[])}catch(ae){console.error("Failed to load CDN URLs:",ae)}finally{M(!1)}}V()},[]);const R=()=>{navigator.clipboard.writeText(D1),d(!0),setTimeout(()=>d(!1),2e3)},Y=v.useCallback((V,ae)=>{m(le=>{const he=[...le];return he[V]=ae,he}),z(!0)},[]),U=v.useCallback(()=>{m(V=>[...V,""]),z(!0)},[]),X=v.useCallback(V=>{m(ae=>ae.filter((le,he)=>he!==V)),z(!0)},[]),W=v.useCallback(async()=>{b(!0);try{(await fetch("/api/studio/cdns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cdns:h})})).ok&&(z(!1),c(),i())}catch(V){console.error("Failed to save CDN URLs:",V)}finally{b(!1)}},[h,c,i]);return r("div",{css:Ge.overlay,onClick:i,children:y("div",{css:Ge.panel,onClick:V=>V.stopPropagation(),children:[y("div",{css:Ge.header,children:[r("h2",{css:Ge.title,children:"Settings"}),r("button",{css:Ge.closeBtn,onClick:i,children:r("svg",{css:Ge.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"})})})]}),y("div",{css:Ge.sections,children:[y("section",{children:[r("h3",{css:Ge.sectionTitle,children:"CDN URLs"}),r("p",{css:Ge.description,children:"Manage CDN base URLs used by your images:"}),x?r("p",{css:Ge.description,children:"Loading..."}):y(Pe,{children:[r("div",{css:Ge.cdnList,children:h.map((V,ae)=>y("div",{css:Ge.cdnRow,children:[r("span",{css:Ge.cdnIndex,children:ae}),r("input",{css:Ge.cdnInput,type:"text",value:V,onChange:le=>Y(ae,le.target.value),placeholder:"https://cdn.example.com"}),r("button",{css:Ge.cdnDeleteBtn,onClick:()=>X(ae),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"})})})]},ae))}),y("button",{css:Ge.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:Ge.warning,children:"Warning: Changing CDN URLs may break image references. The index numbers correspond to image `c` values."})]})]}),y("section",{children:[r("h3",{css:Ge.sectionTitle,children:"Environment Variables"}),y("p",{css:Ge.description,children:["Configure in ",r("code",{children:".env.local"})," file (local development only, not needed in production):"]}),y("div",{css:Ge.codeWrapper,children:[y("button",{css:Ge.copyBtn,onClick:R,title:"Copy to clipboard",children:[f&&r("span",{css:Ge.tooltip,children:"Copied!"}),r("svg",{css:Ge.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"})})]}),y("div",{css:Ge.code,children:[r("p",{css:Ge.codeLine,children:"NEXT_PUBLIC_PRODUCTION_URL=http://localhost:3000"}),r("p",{css:Ge.codeLine,children:" "}),r("p",{css:Ge.codeLine,children:"# Cloudflare R2 Storage"}),r("p",{css:Ge.codeLine,children:"CLOUDFLARE_R2_ACCOUNT_ID=your_account_id"}),r("p",{css:Ge.codeLine,children:"CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id"}),r("p",{css:Ge.codeLine,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key"}),r("p",{css:Ge.codeLine,children:"CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name"}),r("p",{css:Ge.codeLine,children:"CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com"})]})]})]}),y("section",{children:[r("h3",{css:Ge.sectionTitle,children:"Thumbnail Sizes"}),y("div",{css:Ge.grid,children:[y("div",{children:[r("label",{css:Ge.label,children:"Small"}),r("input",{css:Ge.input,type:"number",defaultValue:300})]}),y("div",{children:[r("label",{css:Ge.label,children:"Medium"}),r("input",{css:Ge.input,type:"number",defaultValue:700})]}),y("div",{children:[r("label",{css:Ge.label,children:"Large"}),r("input",{css:Ge.input,type:"number",defaultValue:1400})]})]})]})]}),y("div",{css:Ge.footer,children:[r("button",{css:Ge.cancelBtn,onClick:i,children:"Cancel"}),r("button",{css:Ge.saveBtn,onClick:W,disabled:S||!T,children:S?"Saving...":"Save Changes"})]})]})})}const ru="36px",T1=Ht`
68
+ to { transform: rotate(360deg); }
69
+ `,De={toolbar:g("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",s.surface,";border-bottom:1px solid ",s.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:g("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",ru,";padding:0 14px;border-radius:6px;font-size:",N.base,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";cursor:pointer;transition:all 0.15s ease;color:",s.text,";letter-spacing:-0.01em;&:hover:not(:disabled){background-color:",s.surfaceHover,";border-color:",s.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:g("background:",s.primary,";border-color:",s.primary,";color:white;&:hover:not(:disabled){background:",s.primaryHover,";border-color:",s.primaryHover,";}",""),btnDanger:g("color:",s.danger,";&:hover:not(:disabled){background-color:",s.dangerLight,";border-color:",s.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:g("position:absolute;top:100%;left:0;z-index:1000;min-width:160px;margin-top:4px;background:white;border:1px solid ",s.border,";border-radius:6px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;",""),cloudDropdownItem:g("display:flex;align-items:center;gap:8px;width:100%;padding:10px 14px;border:none;background:none;font-size:",N.sm,";color:",s.text,";cursor:pointer;text-align:left;white-space:nowrap;&:hover{background-color:",s.hover,";}svg{width:16px;height:16px;flex-shrink:0;color:#f59e0b;}",""),cloudDropdownItemDefault:g("svg{color:",s.text,";}",""),cloudDropdownItemDanger:g("color:",s.danger,";svg{color:",s.danger,";}",""),cloudDropdownDivider:g("height:1px;background-color:",s.border,";margin:4px 0;",""),icon:{name:"157xhr7",styles:"width:16px;height:16px"},iconSpin:g("animation:",T1," 1s linear infinite;",""),selectionCount:g("font-size:",N.base,";color:",s.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:g("color:",s.primary,";background:none;border:none;cursor:pointer;font-size:",N.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),divider:g("width:1px;height:24px;background:",s.border,";margin:0 4px;",""),viewToggle:g("display:flex;align-items:center;height:",ru,";background-color:",s.surface,";border:1px solid ",s.border,";border-radius:6px;overflow:hidden;",""),searchWrapper:{name:"9iujih",styles:"position:relative;display:flex;align-items:center"},searchInput:g("height:",ru,";padding:0 32px 0 12px;border:1px solid ",s.border,";border-radius:6px;font-size:",N.base,";background:",s.surface,";color:",s.text,";width:180px;transition:all 0.15s ease;&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 2px ",s.primaryLight,";}&::placeholder{color:",s.textMuted,";}",""),searchClearBtn:g("position:absolute;right:5px;top:5px;bottom:5px;background:",s.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:",s.primaryHover,";}",""),viewBtn:g("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",s.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",s.text,";background-color:",s.surfaceHover,";}",""),viewBtnActive:g("background-color:",s.primaryLight,";color:",s.primary,";&:hover{background-color:",s.primaryLight,";color:",s.primary,";}","")};function E1(){const{selectedItems:i,viewMode:c,setViewMode:f,clearSelection:d,currentPath:h,triggerRefresh:m,focusedItem:x,scanRequested:M,clearScanRequest:S,fileItems:b,requestProcess:T,setProcessMode:z,actionState:R,cancelAction:Y}=vo(),U=v.useRef(null),X=v.useRef(null),[W,V]=v.useState(!1),[ae,le]=v.useState(!1),[he,F]=v.useState(!1),[te,P]=v.useState(!1),[oe,B]=v.useState(!1),[q,se]=v.useState(0),[pe,fe]=v.useState(!1),[re,Ae]=v.useState(0),[A,J]=v.useState(!1),[ee,Te]=v.useState(!1),[Fe,w]=v.useState(!1),[H,ne]=v.useState(0),[ie,Me]=v.useState(!1),[Le,Xe]=v.useState("Processing Images"),[pt,je]=v.useState({current:0,total:0,percent:0,status:"processing"}),[Yt,Ze]=v.useState(null),[et,yt]=v.useState(!1),[Rt,Ut]=v.useState(!1),[Vt,Pt]=v.useState(!1),[tn,Ft]=v.useState(!1),[lt,Mt]=v.useState(!1),[ge,Un]=v.useState(!1),[_t,pn]=v.useState(!1),[Mn,bn]=v.useState(!1),yn=v.useRef(null),$=v.useRef(null),ce=yu({setShowProgress:Me,setProgressTitle:Xe,setProgressState:je,triggerRefresh:m}),Oe=h==="public/images"||h.startsWith("public/images/");v.useCallback(()=>{U.current?.click()},[]);const ct=v.useCallback(()=>{P(!0),m(),setTimeout(()=>P(!1),600)},[m]),Ne=v.useCallback(async()=>{F(!0),Xe("Scanning Files"),Me(!0),je({current:0,total:0,percent:0,status:"processing",message:"Scanning for files..."});try{const ue=(await fetch("/api/studio/scan",{method:"POST"})).body?.getReader();if(!ue)throw new Error("No reader");const ve=new TextDecoder;let xe="";for(;;){const{done:He,value:qe}=await ue.read();if(He)break;xe+=ve.decode(qe,{stream:!0});const ot=xe.split(`
70
+
71
+ `);xe=ot.pop()||"";for(const it of ot){if(!it.startsWith("data: "))continue;const Ye=JSON.parse(it.slice(6));if(Ye.type==="start")je({current:0,total:Ye.total,percent:0,status:"processing",message:`Scanning ${Ye.total} files...`});else if(Ye.type==="progress")je({current:Ye.current,total:Ye.total,percent:Ye.percent,status:"processing",currentFile:Ye.currentFile});else if(Ye.type==="cleanup")je(gn=>({...gn,message:Ye.message}));else if(Ye.type==="complete"){let gn=Ye.renamed>0?`${Ye.renamed} file(s) renamed due to conflicts. `:"";Ye.orphanedFiles&&Ye.orphanedFiles.length>0&&(gn+=`Found ${Ye.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),je({current:Ye.total||0,total:Ye.total||0,percent:100,status:"complete",processed:Ye.added,alreadyProcessed:Ye.existingCount,errors:Ye.errors,orphanedFiles:Ye.orphanedFiles,pendingUpdates:Ye.pendingUpdates,orphanedEntries:Ye.orphanedEntries,message:gn||void 0,isScan:!0}),m()}else Ye.type==="error"&&je({current:0,total:0,percent:0,status:"error",message:Ye.message||"Scan failed"})}}}catch(be){console.error("Scan error:",be),je({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{F(!1)}},[m]);v.useEffect(()=>{const be=ue=>{yn.current&&!yn.current.contains(ue.target)&&pn(!1),$.current&&!$.current.contains(ue.target)&&bn(!1)};return document.addEventListener("mousedown",be),()=>document.removeEventListener("mousedown",be)},[]),v.useEffect(()=>{M&&!he&&(S(),Ne())},[M,he,S,Ne]);const ke=v.useCallback(async be=>{const ue=be.target.files;if(!ue||ue.length===0)return;const ve=Array.from(ue);ve.length>1?(je({current:0,total:ve.length,percent:0,status:"processing",message:"Uploading files..."}),Me(!0)):le(!0);let xe=0,He=0;try{for(let qe=0;qe<ve.length;qe++){const ot=ve[qe],it=new FormData;it.append("file",ot),it.append("path",h);try{const Ye=await fetch("/api/studio/upload",{method:"POST",body:it});if(Ye.ok)xe++;else{const gn=await Ye.json();He++,ve.length===1&&(Ye.status>=500?(console.error("Upload error:",gn),Ze({title:"Upload Failed",message:`Failed to upload ${ot.name}: ${gn.error||"Unknown error"}`})):Ze({title:"Cannot Upload Here",message:gn.error||"Upload not allowed in this location."}))}}catch{He++}ve.length>1&&je({current:qe+1,total:ve.length,percent:Math.round((qe+1)/ve.length*100),status:"processing",currentFile:ot.name})}ve.length>1&&je({current:ve.length,total:ve.length,percent:100,status:"complete",processed:xe,errors:He}),m()}catch(qe){console.error("Upload error:",qe),ve.length>1?je({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):Ze({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{le(!1),U.current&&(U.current.value="")}},[h,m]),St=v.useCallback(async be=>{if(i.size>0){const ve=Array.from(i),xe=ve.filter(qe=>(qe.split("/").pop()||"").includes(".")&&!qe.endsWith("/")),He=ve.filter(qe=>!(qe.split("/").pop()||"").includes(".")||qe.endsWith("/"));if(He.length>0)try{const ot=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(He.join(","))}`)).json();if(ot.images)for(const it of ot.images){const Ye=`public/${it}`;xe.includes(Ye)||xe.push(Ye)}}catch(qe){console.error("Failed to get folder files:",qe)}if(xe.length===0){Ze({title:"No Files Found",message:"No files found in the selected items."});return}z(be),T(xe)}else try{const xe=await(await fetch("/api/studio/count-images")).json();if(!xe.images||xe.images.length===0){Ze({title:"No Images Found",message:"No images found in the public folder to process."});return}const He=xe.images.map(qe=>`public/${qe}`);z(be),T(He)}catch(ve){console.error("Failed to get images:",ve),Ze({title:"Error",message:"Failed to get images."})}},[i,T,z]),at=v.useCallback(()=>{ce.stop(),X.current&&(je(be=>({...be,status:"stopping"})),X.current.abort())},[ce]),Pn=v.useCallback(async()=>{const be=pt.orphanedFiles;if(!(!be||be.length===0))try{const ue=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:be})}),ve=await ue.json();ue.ok?(je(xe=>({...xe,orphanedFiles:void 0,orphansRemoved:ve.deleted,message:`Deleted ${ve.deleted} orphaned thumbnail${ve.deleted!==1?"s":""}.`})),m()):Ze({title:"Delete Failed",message:ve.error||"Failed to delete orphaned files."})}catch(ue){console.error("Delete orphans error:",ue),Ze({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[pt.orphanedFiles,m]),Dn=v.useCallback(async()=>{if(i.size===0)return;const be=Array.from(i),ue=be.filter(He=>(He.split("/").pop()||"").includes(".")&&!He.endsWith("/")),ve=be.filter(He=>!(He.split("/").pop()||"").includes(".")||He.endsWith("/"));let xe=ue.length;if(ve.length>0)try{const qe=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ve.join(","))}`)).json();qe.images&&(xe+=qe.images.length)}catch(He){console.error("Failed to get folder files:",He)}se(xe),B(!0)},[i]),So=v.useCallback(async()=>{B(!1);const be=Array.from(i);be.length!==0&&await ce.execute({endpoint:"/api/studio/delete-stream",body:{paths:be},title:"Deleting Files",operationType:"delete",onComplete:()=>{d()}})},[i,d,ce]),Ea=v.useCallback(async()=>{if(i.size===0)return;const be=Array.from(i),ue=be.filter(it=>(it.split("/").pop()||"").includes(".")&&!it.endsWith("/")),ve=be.filter(it=>!(it.split("/").pop()||"").includes(".")||it.endsWith("/")),xe=ve.length>0;if(xe)try{const Ye=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ve.join(","))}`)).json();if(Ye.images)for(const gn of Ye.images){const zo=`public/${gn}`;ue.includes(zo)||ue.push(zo)}}catch(it){console.error("Failed to get folder files:",it)}if(ue.length===0){Ze({title:"No Files Found",message:"No files found in the selected items."});return}let He=!1,qe=!1,ot=0;for(const it of ue){const Ye=b.find(gn=>gn.path===it);Ye?Ye.isRemote?He=!0:Ye.cdnPushed?ot++:qe=!0:xe&&(qe=!0)}if(!xe&&ot===ue.length){Ze({title:"Already Pushed",message:`All ${ue.length} file${ue.length!==1?"s are":" is"} already on the CDN.`});return}Ae(ue.length),J(He),Te(qe),fe(!0)},[i,b]),La=v.useCallback(async()=>{fe(!1);const be=Array.from(i),ue=be.filter(He=>(He.split("/").pop()||"").includes(".")&&!He.endsWith("/")),ve=be.filter(He=>!(He.split("/").pop()||"").includes(".")||He.endsWith("/"));if(ve.length>0)try{const qe=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ve.join(","))}`)).json();if(qe.images)for(const ot of qe.images){const it=`public/${ot}`;ue.includes(it)||ue.push(it)}}catch(He){console.error("Failed to get folder files:",He)}const xe=ue.map(He=>"/"+He.replace(/^public\//,""));xe.length!==0&&await ce.execute({endpoint:"/api/studio/sync-stream",body:{imageKeys:xe},title:"Pushing to CDN",onComplete:()=>{d()},onError:He=>{(He.includes("R2 not configured")||He.includes("CLOUDFLARE_R2"))&&(Me(!1),Mt(!0))}})},[i,d,ce]),[ra,Zn]=v.useState([]),[Ra,sa]=v.useState(0),Tl=v.useCallback(async()=>{if(i.size===0)return;const be=Array.from(i),ue=be.filter(qe=>(qe.split("/").pop()||"").includes(".")&&!qe.endsWith("/")),ve=be.filter(qe=>!(qe.split("/").pop()||"").includes(".")||qe.endsWith("/")),xe=ve.length>0;if(xe)try{const ot=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ve.join(","))}`)).json();if(ot.images)for(const it of ot.images){const Ye=`public/${it}`;ue.includes(Ye)||ue.push(Ye)}}catch(qe){console.error("Failed to get folder files:",qe)}if(ue.length===0){Ze({title:"No Files Found",message:"No files found in the selected items."});return}let He;if(xe)He=ue;else if(He=ue.filter(qe=>{const ot=b.find(it=>it.path===qe);return ot&&ot.cdnPushed&&!ot.isRemote}),He.length===0){Ze({title:"No CDN Files",message:`None of the ${ue.length} selected file${ue.length!==1?"s are":" is"} on the CDN.`});return}Zn(He),sa(ue.length),ne(He.length),w(!0)},[i,b]),El=v.useCallback(async()=>{w(!1),R.showDownloadConfirm&&Y();const ue=(R.showDownloadConfirm?R.actionPaths:ra).map(ve=>"/"+ve.replace(/^public\//,""));await ce.execute({endpoint:"/api/studio/download-stream",body:{imageKeys:ue},title:"Downloading from CDN",onComplete:()=>d()})},[ra,d,R.showDownloadConfirm,R.actionPaths,Y,ce]),cl=v.useCallback(async()=>{if(i.size===0)return;const ue=Array.from(i).filter(ve=>{const xe=b.find(He=>He.path===ve);return xe&&(xe.hasUpdate||xe.type==="folder"&&xe.updateCount&&xe.updateCount>0)});if(ue.length===0){Ze({title:"No Updates",message:"No files with pending updates in selection."});return}await ce.execute({endpoint:"/api/studio/push-updates-stream",body:{paths:ue},title:"Pushing Updates",onComplete:()=>d()})},[i,b,d,ce]),ca=v.useCallback(async()=>{if(i.size===0)return;const ue=Array.from(i).filter(ve=>{const xe=b.find(He=>He.path===ve);return xe&&(xe.hasUpdate||xe.type==="folder"&&xe.updateCount&&xe.updateCount>0)});if(ue.length!==0)try{const ve=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:ue})});if(ve.ok)d(),m();else{const xe=await ve.json();Ze({title:"Cancel Failed",message:xe.error||"Unknown error"})}}catch(ve){console.error("Cancel updates error:",ve),Ze({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[i,b,d,m]),wo=v.useCallback(async be=>{yt(!1);try{const ue=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:h,name:be})});if(ue.ok)m();else{const ve=await ue.json();Ze({title:"Create Folder Failed",message:ve.error||"Unknown error"})}}catch(ue){console.error("Create folder error:",ue),Ze({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[h,m]),Ll=v.useCallback(()=>{i.size!==0&&Ft(!0)},[i]),O=v.useCallback(async be=>{const ue=Array.from(i);await ce.execute({endpoint:"/api/studio/move",body:{paths:ue,destination:be},title:"Moving Files",onComplete:()=>d()})},[i,d,ce]),{searchQuery:Be,setSearchQuery:ze}=vo(),tt=v.useCallback(be=>{ze(be.target.value)},[ze]),ut=v.useCallback(be=>{be.key==="Escape"&&(be.stopPropagation(),ze(""),be.target.blur())},[ze]),nn=i.size>0;nn&&Array.from(i).some(be=>{const ue=b.find(ve=>ve.path===be);return ue&&ue.cdnPushed&&!ue.isRemote}),nn&&Array.from(i).every(be=>{const ue=b.find(ve=>ve.path===be);return ue&&ue.type==="file"&&ue.cdnPushed&&!ue.isRemote});const dn=nn&&Array.from(i).some(be=>{const ue=b.find(ve=>ve.path===be);return ue&&(ue.hasUpdate||ue.type==="folder"&&ue.updateCount&&ue.updateCount>0)}),gt=Array.from(i),Tt=gt.length===1&&!gt[0].includes("."),An=Tt?gt[0]:null,Rl=An&&An.split("/").pop()||"",_a=gt.length===1&&gt[0].includes("."),Oa=_a?gt[0]:null,Co=Oa&&Oa.split("/").pop()||"",ul=v.useCallback(async be=>{An&&(Ut(!1),await ce.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:An,newName:be},title:"Renaming Folder",onComplete:()=>d()}))},[An,d,ce]),ko=v.useCallback(async be=>{Oa&&(Pt(!1),await ce.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:Oa,newName:be},title:"Renaming File",onComplete:()=>d()}))},[Oa,d,ce]),ua=y(Pe,{children:[(Fe||R.showDownloadConfirm)&&r(bo,{title:"Download from CDN",message:(()=>{const be=R.showDownloadConfirm?R.downloadImageCount:H,ue=R.showDownloadConfirm?R.downloadTotalSelected:Ra;return ue>be?`Download ${be} of ${ue} selected file${ue!==1?"s":""} from Cloudflare R2? (${ue-be} not on CDN)`:`Download ${be} image${be!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`})(),confirmLabel:"Download",onConfirm:El,onCancel:()=>{w(!1),R.showDownloadConfirm&&Y()}}),ie&&r(rl,{title:Le,progress:pt,onStop:at,onDeleteOrphans:Pn,onClose:()=>{Me(!1),je({current:0,total:0,percent:0,status:"processing"}),m()}})]});return x?ua:y(Pe,{children:[ua,oe&&r(bo,{title:"Delete Items",message:`Are you sure you want to delete ${q} file${q!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:So,onCancel:()=>B(!1)}),pe&&r(bo,{title:"Push to CDN",message:`Push ${re} image${re!==1?"s":""} to Cloudflare R2?${A?" Remote images will be downloaded first.":""}${ee?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:La,onCancel:()=>fe(!1)}),et&&r(Al,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:wo,onCancel:()=>yt(!1)}),tn&&r(Zp,{selectedItems:i,currentPath:h,onMove:be=>{Ft(!1),O(be)},onCancel:()=>Ft(!1)}),Rt&&An&&r(Al,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:Rl,defaultValue:Rl,confirmLabel:"Rename",onConfirm:ul,onCancel:()=>Ut(!1)}),Vt&&Oa&&r(Al,{title:"Rename File",message:"Enter a new name for the file:",placeholder:Co,defaultValue:Co,confirmLabel:"Rename",onConfirm:ko,onCancel:()=>Pt(!1)}),Yt&&r(Vr,{title:Yt.title,message:Yt.message,onClose:()=>{Ze(null),m()}}),r($p,{isOpen:lt,onClose:()=>Mt(!1)}),W&&r(k1,{currentPath:h,onClose:()=>V(!1),onUploadComplete:()=>{V(!1),m()},streamingOperation:ce,setShowProgress:Me,setProgressTitle:Xe,setProgressState:je}),y("div",{css:De.toolbar,children:[r("input",{ref:U,type:"file",multiple:!0,accept:"*/*",onChange:ke,style:{display:"none"}}),y("div",{css:De.left,children:[y("button",{css:[De.btn,De.btnPrimary,"",""],onClick:()=>V(!0),disabled:ae||Oe,children:[r(L1,{}),"Add New"]}),y("button",{css:De.btn,onClick:()=>{_a?Pt(!0):Tt?Ut(!0):yt(!0)},disabled:Oe&&!Tt&&!_a,title:Oe&&!Tt&&!_a?"Cannot create folders in protected images folder":void 0,children:[_a||Tt?r(H1,{}):r(B1,{}),_a?"Rename File":Tt?"Rename Folder":"New Folder"]}),r("div",{css:De.divider}),y("div",{css:De.cloudDropdownWrapper,ref:$,children:[y("button",{css:De.btn,onClick:()=>bn(!Mn),disabled:R.showProgress||Oe,title:Oe?"Cannot process images folder":void 0,children:[r(X1,{}),"Thumbnails",r("svg",{css:De.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"})})]}),Mn&&y("div",{css:De.cloudDropdown,children:[y("button",{css:[De.cloudDropdownItem,De.cloudDropdownItemDefault,"",""],onClick:()=>{bn(!1),St("generate")},children:[r(V1,{}),"Generate Thumbnails"]}),y("button",{css:[De.cloudDropdownItem,De.cloudDropdownItemDanger,"",""],onClick:()=>{bn(!1),St("remove")},children:[r(F1,{}),"Remove Thumbnails"]})]})]}),y("button",{css:[De.btn,De.btnDanger,"",""],onClick:Dn,disabled:!nn,children:[r(O1,{}),"Delete"]}),y("button",{css:De.btn,onClick:Ll,disabled:!nn,children:[r(U1,{}),"Move"]}),y("div",{css:De.cloudDropdownWrapper,ref:yn,children:[y("button",{css:[De.btn,De.btnCloud,"",""],onClick:()=>pn(!_t),disabled:!nn,children:[r(Mp,{}),"Cloud",r("svg",{css:De.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"})})]}),_t&&nn&&y("div",{css:De.cloudDropdown,children:[dn&&y(Pe,{children:[y("button",{css:De.cloudDropdownItem,onClick:()=>{pn(!1),cl()},children:[r(j1,{}),"Push Update"]}),y("button",{css:[De.cloudDropdownItem,De.cloudDropdownItemDanger,"",""],onClick:()=>{pn(!1),ca()},children:[r(N1,{}),"Cancel Update"]}),r("div",{css:De.cloudDropdownDivider})]}),y("button",{css:De.cloudDropdownItem,onClick:()=>{pn(!1),Ea()},children:[r(Mp,{}),"Push CDN"]}),y("button",{css:De.cloudDropdownItem,onClick:()=>{pn(!1),Tl()},children:[r(q1,{}),"Download"]})]})]}),y("div",{css:De.searchWrapper,children:[r("input",{css:De.searchInput,type:"text",placeholder:"Search images...",value:Be,onChange:tt,onKeyDown:ut}),Be&&r("button",{css:De.searchClearBtn,onClick:()=>ze(""),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"})})})]})]}),y("div",{css:De.right,children:[nn&&y("span",{css:De.selectionCount,children:[i.size," selected",r("button",{css:De.clearBtn,onClick:d,children:"Clear"})]}),y("button",{css:De.btn,onClick:Ne,disabled:he,children:[r(R1,{spinning:he}),"Scan"]}),r("button",{css:De.btn,onClick:ct,title:"Refresh view",disabled:te,children:r(_1,{spinning:te})}),y("div",{css:De.viewToggle,children:[r("button",{css:[De.viewBtn,c==="grid"&&De.viewBtnActive,"",""],onClick:()=>f("grid"),"aria-label":"Grid view",children:r(Y1,{})}),r("button",{css:[De.viewBtn,c==="list"&&De.viewBtnActive,"",""],onClick:()=>f("list"),"aria-label":"List view",children:r(G1,{})})]}),r(M1,{})]})]})]})}function L1(){return r("svg",{css:De.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 R1({spinning:i}){return r("svg",{css:[De.icon,i&&De.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 _1({spinning:i}){return r("svg",{css:[De.icon,i&&De.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 O1(){return r("svg",{css:De.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 B1(){return r("svg",{css:De.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 H1(){return r("svg",{css:De.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 U1(){return r("svg",{css:De.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 Mp(){return r("svg",{css:De.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 j1(){return r("svg",{css:De.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 N1(){return r("svg",{css:De.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 q1(){return r("svg",{css:De.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 Y1(){return r("svg",{css:De.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 G1(){return r("svg",{css:De.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 X1(){return r("svg",{css:De.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 V1(){return r("svg",{css:De.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 F1(){return r("svg",{css:De.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 Q1{async get(c){const f=await fetch(c,{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(c,f){const d=await fetch(c,{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(c="public"){return this.get(`/api/studio/list?path=${encodeURIComponent(c)}`)}async search(c,f="public"){return this.get(`/api/studio/search?q=${encodeURIComponent(c)}&path=${encodeURIComponent(f)}`)}async listFolders(){return this.get("/api/studio/list-folders")}async countImages(){return this.get("/api/studio/count-images")}async folderImages(c){return this.get(`/api/studio/folder-images?folders=${encodeURIComponent(c.join(","))}`)}async upload(c,f="public"){const d=new FormData;d.append("file",c),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(c){return this.post("/api/studio/delete",{paths:c})}async createFolder(c,f){return this.post("/api/studio/create-folder",{parentPath:c,name:f})}async rename(c,f){return this.post("/api/studio/rename",{oldPath:c,newName:f})}async move(c,f){return this.post("/api/studio/move",{paths:c,destination:f})}async push(c){return this.post("/api/studio/sync",{imageKeys:c})}async reprocess(c){return this.post("/api/studio/reprocess",{imageKeys:c})}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 mi=new Q1;function Wp(){const{currentPath:i,setCurrentPath:c,navigateUp:f,selectedItems:d,toggleSelection:h,selectRange:m,lastSelectedPath:x,selectAll:M,clearSelection:S,refreshKey:b,setFocusedItem:T,triggerRefresh:z,triggerScan:R,searchQuery:Y,showError:U,setFileItems:X,editedImageKey:W}=vo(),[V,ae]=v.useState([]),[le,he]=v.useState(!0),[F,te]=v.useState(!1),[P,oe]=v.useState(null),B=v.useRef(!0),q=v.useRef(i);v.useEffect(()=>{async function w(){const H=q.current!==i;(B.current||H)&&he(!0),q.current=i;try{const ne=Y&&Y.length>=2?await mi.search(Y,i):await mi.list(i),ie=ne.items||[];ae(ie),X(ie),te(ne.isEmpty===!0)}catch(ne){const ie=ne instanceof Error?ne.message:"Failed to load items";U("Load Error",ie),ae([]),X([]),te(!1)}he(!1),B.current=!1}w()},[i,b,Y,U,X]),v.useEffect(()=>{async function w(){if(i!=="public"){oe(null);return}try{const H=await mi.checkFeaturedImage();oe(H)}catch{oe(null)}}w()},[i,b]);const se=i==="public",pe=Y&&Y.length>=2,fe=[...V].sort((w,H)=>w.type==="folder"&&H.type!=="folder"?-1:w.type!=="folder"&&H.type==="folder"?1:w.name.localeCompare(H.name)),re=fe.length>0&&fe.every(w=>d.has(w.path)),Ae=fe.some(w=>d.has(w.path)),A=v.useCallback((w,H)=>{H.shiftKey&&x?m(x,w.path,fe):h(w.path)},[x,m,fe,h]),J=v.useCallback(w=>{w.type==="folder"?c(w.path):T(w)},[c,T]),ee=v.useCallback(async w=>{try{const H="/"+w.path.replace(/^public\//,"");await mi.reprocess([H]),z()}catch(H){const ne=H instanceof Error?H.message:"Failed to generate thumbnail";U("Processing Error",ne)}},[z,U]),Te=v.useCallback(()=>{re?S():M(fe)},[re,S,M,fe]),Fe=P&&!P.exists?P:null;return{items:V,loading:le,sortedItems:fe,metaEmpty:F,missingFeaturedImage:Fe,isAtRoot:se,isSearching:pe,allItemsSelected:re,someItemsSelected:Ae,currentPath:i,selectedItems:d,navigateUp:f,editedImageKey:W,handleItemClick:A,handleOpen:J,handleGenerateThumbnail:ee,handleSelectAll:Te,triggerScan:R,triggerRefresh:z}}const K1=Ht`
72
+ from { opacity: 0; }
73
+ to { opacity: 1; }
74
+ `,Z1=Ht`
75
+ from { transform: translateY(-20px); opacity: 0; }
76
+ to { transform: translateY(0); opacity: 1; }
77
+ `,$1=Ht`
78
+ to { transform: rotate(360deg); }
79
+ `,cn={overlay:g("position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:rgba(0, 0, 0, 0.5);animation:",K1," 0.15s ease;",""),modal:g("background:",s.surface,";border-radius:12px;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);width:100%;max-width:440px;animation:",Z1," 0.2s ease;overflow:hidden;",""),header:g("padding:20px 24px;border-bottom:1px solid ",s.border,";",""),title:g("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;",""),subtitle:g("font-size:",N.sm,";color:",s.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:g("width:24px;height:24px;border-radius:50%;border:2px solid ",s.border,";border-top-color:",s.primary,";animation:",$1," 0.8s linear infinite;",""),urlButton:g("display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:16px 20px;background:",s.background,";border:1px solid ",s.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover:not(:disabled){background:",s.surfaceHover,";border-color:",s.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),urlLabel:g("font-size:",N.xs,";font-weight:600;color:",s.textSecondary,";text-transform:uppercase;letter-spacing:0.05em;",""),urlValue:g("font-size:",N.base,";font-weight:500;color:",s.text,";word-break:break-all;",""),noOptions:g("padding:20px;text-align:center;color:",s.textSecondary,";font-size:",N.sm,";",""),footer:g("padding:16px 24px;border-top:1px solid ",s.border,";display:flex;justify-content:flex-end;",""),cancelBtn:g("padding:10px 20px;font-size:",N.base,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",s.text,";&:hover{background:",s.surfaceHover,";border-color:",s.borderHover,";}","")};function Jp({isOpen:i,onClose:c,onSelect:f}){const[d,h]=v.useState(!0),[m,x]=v.useState(null),[M,S]=v.useState(null);if(v.useEffect(()=>{if(!i)return;async function T(){h(!0);try{const z=await mi.getFeaturedImageOptions();x(z.devUrl),S(z.productionUrl)}catch(z){console.error("Failed to load featured image options:",z)}h(!1)}T()},[i]),!i)return null;const b=m||M;return r("div",{css:cn.overlay,onClick:c,children:y("div",{css:cn.modal,onClick:T=>T.stopPropagation(),children:[y("div",{css:cn.header,children:[r("h2",{css:cn.title,children:"Generate Screenshot"}),r("p",{css:cn.subtitle,children:"Choose which URL to screenshot"})]}),r("div",{css:cn.body,children:d?r("div",{css:cn.loading,children:r("div",{css:cn.spinner})}):b?y(Pe,{children:[m&&y("button",{css:cn.urlButton,onClick:()=>f(m),children:[r("span",{css:cn.urlLabel,children:"Development"}),r("span",{css:cn.urlValue,children:m})]}),M&&y("button",{css:cn.urlButton,onClick:()=>f(M),children:[r("span",{css:cn.urlLabel,children:"Production"}),r("span",{css:cn.urlValue,children:M})]})]}):y("div",{css:cn.noOptions,children:["No URLs configured. Set ",r("code",{children:"NEXT_PUBLIC_PRODUCTION_URL"})," in .env.local and/or .env.production."]})}),r("div",{css:cn.footer,children:r("button",{css:cn.cancelBtn,onClick:c,children:"Cancel"})})]})})}const W1=Ht`
80
+ to { transform: rotate(360deg); }
81
+ `,de={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:g("width:32px;height:32px;border-radius:50%;border:3px solid ",s.border,";border-top-color:",s.primary,";animation:",W1," 0.8s linear infinite;",""),empty:g("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",s.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:g("font-size:",N.base,";margin:0 0 4px 0;&:last-child{color:",s.textMuted,";font-size:",N.sm,";}",""),scanButton:g("margin-top:16px;padding:10px 24px;font-size:",N.base,";font-weight:500;background:",s.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",s.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:g("position:relative;border-radius:8px;border:1px solid ",s.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",s.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:g("border-color:",s.primary,";box-shadow:0 0 0 1px ",s.primary,";&:hover{border-color:",s.primary,";box-shadow:0 0 0 1px ",s.primary,";}",""),parentItem:g("cursor:pointer;&:hover{border-color:",s.primary,";}",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:g("width:18px;height:18px;accent-color:",s.primary,";cursor:pointer;",""),content:g("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",s.background,";",""),contentCloud:g("",""),contentRemote:g("",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},imagesFolderIcon:g("width:56px;height:56px;color:",s.imagesFolder,";",""),imagesFolderWrapper:{name:"bjn8wh",styles:"position:relative"},lockIcon:g("position:absolute;bottom:4px;right:4px;width:16px;height:16px;color:",s.imagesFolder,";background:white;border-radius:50%;padding:2px;",""),parentIcon:g("width:56px;height:56px;color:",s.textMuted,";",""),fileIcon:g("width:40px;height:40px;color:",s.textMuted,";",""),image:{name:"rm1wug",styles:"max-width:100%;max-height:100%;object-fit:contain;border-radius:4px"},label:g("padding:10px 12px;background-color:",s.surface,";border-top:1px solid ",s.borderLight,";",""),labelRow:{name:"1gkgtms",styles:"display:flex;flex-direction:column;gap:2px"},labelText:{name:"fxp7t8",styles:"flex:1;min-width:0"},copyBtn:g("position:absolute;top:4px;right:4px;z-index:10;height:28px;width:28px;color:",s.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:",s.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:g("display:flex;align-items:center;gap:3px;font-size:",N.xs,";",""),folderStatLocal:g("color:",s.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:g("width:14px;height:14px;color:",s.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:g("color:#f59e0b;font-size:",N.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:g("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:",s.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:g("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",N.sm,";font-weight:500;color:",s.primary,";background:",s.surface,";border:1px solid ",s.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:",s.primaryLight,";border-color:",s.primary,";}",""),featuredPlaceholder:g("position:relative;border-radius:8px;border:2px dashed ",s.success,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",s.background,";&:hover{border-color:",s.success,";background-color:",s.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:g("width:40px;height:40px;color:",s.success,";",""),featuredText:g("font-size:",N.sm,";color:",s.success,";text-align:center;font-weight:500;",""),featuredLabel:g("padding:10px 12px;background-color:",s.surface,";border-top:1px solid ",s.borderLight,";",""),name:g("font-size:",N.sm,";font-weight:500;color:",s.text,";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;letter-spacing:-0.01em;direction:rtl;text-align:left;",""),size:g("font-size:",N.xs,";color:",s.textMuted,";margin:2px 0 0 0;",""),selectAllRow:g("display:flex;align-items:center;margin-bottom:16px;padding:12px 16px;background:",s.surface,";border-radius:8px;border:1px solid ",s.border,";",""),selectAllLabel:g("display:flex;align-items:center;gap:10px;font-size:",N.base,";font-weight:500;color:",s.textSecondary,";cursor:pointer;&:hover{color:",s.text,";}",""),selectAllCheckbox:g("width:16px;height:16px;accent-color:",s.primary,";","")};function J1(){const{loading:i,sortedItems:c,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:m,allItemsSelected:x,someItemsSelected:M,selectedItems:S,navigateUp:b,handleItemClick:T,handleOpen:z,handleGenerateThumbnail:R,handleSelectAll:Y,triggerScan:U,triggerRefresh:X,editedImageKey:W}=Wp(),[V,ae]=v.useState(!1),[le,he]=v.useState(!1),[F,te]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),P=()=>{ae(!0)},oe=async B=>{ae(!1),he(!0),te({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const q=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:B})});if(!q.ok){const fe=await q.json();te({current:0,total:4,percent:0,status:"error",message:fe.error||"Failed to generate screenshot"});return}const se=q.body?.getReader(),pe=new TextDecoder;if(se){let fe="";for(;;){const{done:re,value:Ae}=await se.read();if(re)break;fe+=pe.decode(Ae,{stream:!0});const A=fe.split(`
82
+ `);fe=A.pop()||"";for(const J of A)if(J.startsWith("data: "))try{const ee=JSON.parse(J.slice(6));ee.type==="start"?te(Te=>({...Te,total:ee.total,message:`Screenshotting ${ee.url}...`})):ee.type==="progress"?te({current:ee.current,total:ee.total,percent:ee.percent,status:"processing",message:ee.message}):ee.type==="complete"?(te({current:ee.processed,total:ee.processed,percent:100,status:ee.errors>0?"error":"complete",message:ee.message}),X()):ee.type==="error"&&te(Te=>({...Te,status:"error",message:ee.message}))}catch{}}}}catch(q){console.error("Featured image generation error:",q),te({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?y(Pe,{children:[le&&r(rl,{title:"Generating Screenshot",progress:F,onClose:()=>he(!1)}),r("div",{css:de.loading,children:r("div",{css:de.spinner})})]}):f&&h?y("div",{css:de.empty,children:[r("svg",{css:de.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:de.emptyText,children:"No files tracked yet"}),r("p",{css:de.emptyText,children:"Click Scan to discover files in your public folder"}),r("button",{css:de.scanButton,onClick:U,children:"Scan for Files"})]}):c.length===0&&h?y("div",{css:de.empty,children:[r("svg",{css:de.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:de.emptyText,children:"No files in this folder"}),r("p",{css:de.emptyText,children:"Upload images or click Scan in the toolbar"})]}):y(Pe,{children:[r(Jp,{isOpen:V,onClose:()=>ae(!1),onSelect:oe}),le&&r(rl,{title:"Generating Screenshot",progress:F,onClose:()=>he(!1)}),y("div",{children:[c.length>0&&r("div",{css:de.selectAllRow,children:y("label",{css:de.selectAllLabel,children:[r("input",{type:"checkbox",css:de.selectAllCheckbox,checked:x,ref:B=>{B&&(B.indeterminate=M&&!x)},onChange:Y}),"Select all (",c.length,")"]})}),y("div",{css:de.grid,children:[!h&&!m&&y("div",{css:[de.item,de.parentItem,"",""],onClick:b,children:[r("div",{css:de.content,children:r("svg",{css:de.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"})})}),y("div",{css:de.label,children:[r("p",{css:de.name,children:".."}),r("p",{css:de.size,children:"Parent folder"})]})]}),c.map(B=>r(P1,{item:B,isSelected:S.has(B.path),onClick:q=>T(B,q),onOpen:()=>z(B),onGenerateThumbnail:()=>R(B),editedImageKey:W},B.path)),h&&d&&!m&&y("div",{css:de.featuredPlaceholder,onClick:P,title:`Generate ${d.filename}`,children:[y("div",{css:de.featuredContent,children:[r("svg",{css:de.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:de.featuredText,children:"Generate Screenshot"})]}),y("div",{css:de.featuredLabel,children:[r("p",{css:de.name,children:d.filename}),r("p",{css:de.size,children:"Click to screenshot homepage"})]})]})]})]})]})}function I1(i){return i.includes("/images/sm/")?"SM":i.includes("/images/md/")?"MD":i.includes("/images/lg/")?"LG":i.includes("/images/full/")?"FULL":null}function P1({item:i,isSelected:c,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:m}){const[x,M]=v.useState(!1),S=i.type==="folder",b=!S&&i.thumbnail!==void 0,T=i.thumbnail&&m&&m.path===i.path?`${i.thumbnail}?v=${m.key}`:i.thumbnail,z=i.isProtected||S&&i.name==="images"&&i.path==="public/images",R=I1(i.path),Y=!S&&(i.hasSm||i.hasMd||i.hasLg||i.hasFull||R),U=W=>{W.stopPropagation();const V="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(V),M(!0),setTimeout(()=>M(!1),1500)},X=W=>{if(z){W.stopPropagation(),d();return}f(W)};return y("div",{css:[de.item,c&&!z&&de.itemSelected,"",""],onClick:X,children:[!z&&r("div",{css:de.checkboxWrapper,onClick:W=>W.stopPropagation(),children:r("input",{type:"checkbox",css:de.checkbox,checked:c,onChange:()=>f({})})}),y("div",{css:[de.content,i.isCloud&&de.contentCloud,i.isRemote&&de.contentRemote,"",""],children:[y("button",{css:de.copyBtn,onClick:U,title:"Copy file path",children:[x&&r("span",{css:de.tooltip,children:"Copied!"}),r("svg",{css:de.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:de.openBtn,onClick:W=>{W.stopPropagation(),d()},children:"Open"}),S?z?y("div",{css:de.imagesFolderWrapper,children:[r("svg",{css:de.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:de.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:de.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&&T?r("img",{css:de.image,src:T,alt:i.name,loading:"lazy"}):r("svg",{css:de.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:de.label,children:r("div",{css:de.labelRow,children:y("div",{css:de.labelText,children:[r("p",{css:de.name,title:i.name,children:i.name}),S?y("div",{css:de.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&y("span",{css:[de.folderStat,de.folderStatLocal,"",""],title:`${i.localCount} local`,children:[r("svg",{css:de.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&&y("span",{css:[de.folderStat,de.folderStatCloud,"",""],title:`${i.cloudCount} in cloud`,children:[r("svg",{css:de.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&&y("span",{css:[de.folderStat,de.folderStatRemote,"",""],title:`${i.remoteCount} remote`,children:[r("svg",{css:de.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&&y("span",{css:[de.folderStat,de.folderStatUpdate,"",""],title:`${i.updateCount} pending update${i.updateCount!==1?"s":""}`,children:[r("svg",{css:de.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&&y("span",{css:de.size,children:[i.fileCount," files"]})]}):y("div",{css:de.statusRow,children:[r("div",{css:de.statusLeft,children:i.hasUpdate?y(Pe,{children:[r("svg",{css:de.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:de.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:de.updateLabel,children:"update"})]}):i.cdnPushed?r("svg",{css:i.isRemote?de.storedIconRemote:de.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:de.size,children:e2(i.size)}):null}),Y&&r("span",{css:de.thumbChips,children:R?r("span",{css:de.thumbChip,children:R}):y(Pe,{children:[i.hasSm&&r("span",{css:de.thumbChip,children:"SM"}),i.hasMd&&r("span",{css:de.thumbChip,children:"MD"}),i.hasLg&&r("span",{css:de.thumbChip,children:"LG"}),i.hasFull&&r("span",{css:de.thumbChip,children:"FULL"})]})})]})]})})})]})}function e2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}const t2=Ht`
83
+ to { transform: rotate(360deg); }
84
+ `,I={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:g("width:32px;height:32px;border-radius:50%;border:3px solid ",s.border,";border-top-color:",s.primary,";animation:",t2," 0.8s linear infinite;",""),empty:g("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",s.textSecondary,";",""),emptyHint:g("font-size:",N.sm,";color:",s.textMuted,";margin-top:4px;",""),scanButton:g("margin-top:16px;padding:10px 24px;font-size:",N.base,";font-weight:500;background:",s.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",s.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),tableWrapper:g("background:",s.surface,";border-radius:8px;border:1px solid ",s.border,";overflow-x:auto;",""),table:{name:"nufjao",styles:"width:100%;min-width:600px;border-collapse:collapse;white-space:nowrap"},th:g("text-align:left;font-size:11px;color:",s.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",s.background,";border-bottom:1px solid ",s.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:g("",""),row:g("cursor:pointer;transition:background-color 0.15s ease;user-select:none;&:hover{background-color:",s.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",s.borderLight,";}",""),rowSelected:g("background-color:",s.primaryLight,";&:hover{background-color:",s.primaryLight,";}",""),parentRow:g("cursor:pointer;border-bottom:1px solid ",s.border,";&:hover{background-color:",s.surfaceHover,";}",""),td:{name:"i563hg",styles:"padding:12px 16px"},checkboxCell:{name:"sahq4q",styles:"padding:12px 16px;cursor:pointer;vertical-align:middle"},checkbox:g("width:18px;height:18px;accent-color:",s.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:g("position:relative;flex-shrink:0;height:32px;width:32px;font-size:",N.xs,";color:",s.textSecondary,";background:",s.surface,";border:1px solid ",s.border,";padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;justify-content:center;&:hover{background:",s.surfaceHover,";border-color:",s.borderHover,";color:",s.text,";}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},folderStats:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},folderStat:g("display:flex;align-items:center;gap:3px;font-size:",N.xs,";",""),folderStatLocal:g("color:",s.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:g("width:14px;height:14px;color:",s.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:g("display:flex;align-items:center;gap:4px;color:#f59e0b;font-size:",N.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:g("",""),thumbnailRemote:g("",""),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:g("width:24px;height:24px;color:",s.imagesFolder,";",""),lockIcon:g("width:10px;height:10px;color:",s.imagesFolder,";margin-left:-6px;margin-top:8px;",""),parentIcon:g("width:20px;height:20px;color:",s.textMuted,";flex-shrink:0;",""),fileIcon:g("width:20px;height:20px;color:",s.textMuted,";flex-shrink:0;",""),thumbnail:g("max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;border:1px solid ",s.borderLight,";",""),name:g("font-size:",N.base,";font-weight:500;color:",s.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:g("font-size:",N.sm,";color:",s.textSecondary,";",""),cdnBadge:g("display:inline-flex;align-items:center;gap:4px;font-size:",N.xs,";font-weight:500;color:",s.success,";",""),cdnBadgeRemote:g("display:inline-flex;align-items:center;font-size:",N.xs,";font-weight:500;color:#ef4444;",""),cdnIcon:{name:"1suksrg",styles:"width:12px;height:12px"},cdnEmpty:g("font-size:",N.sm,";color:",s.textMuted,";",""),featuredRow:g("cursor:pointer;transition:background-color 0.15s ease;border:2px dashed ",s.success,";&:hover{background-color:",s.successLight,";}td{border-bottom:none!important;}",""),featuredIcon:g("width:24px;height:24px;color:",s.success,";",""),featuredText:g("color:",s.success,";font-weight:500;",""),openBtn:g("height:32px;font-size:",N.sm,";font-weight:500;color:",s.primary,";background:",s.surface,";border:1px solid ",s.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",s.primaryLight,";border-color:",s.primary,";}","")};function n2(){const{loading:i,sortedItems:c,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:m,allItemsSelected:x,someItemsSelected:M,selectedItems:S,navigateUp:b,handleItemClick:T,handleOpen:z,handleGenerateThumbnail:R,handleSelectAll:Y,triggerScan:U,triggerRefresh:X,editedImageKey:W}=Wp(),[V,ae]=v.useState(!1),[le,he]=v.useState(!1),[F,te]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),P=()=>{ae(!0)},oe=async B=>{ae(!1),he(!0),te({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const q=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:B})});if(!q.ok){const fe=await q.json();te({current:0,total:4,percent:0,status:"error",message:fe.error||"Failed to generate screenshot"});return}const se=q.body?.getReader(),pe=new TextDecoder;if(se){let fe="";for(;;){const{done:re,value:Ae}=await se.read();if(re)break;fe+=pe.decode(Ae,{stream:!0});const A=fe.split(`
85
+ `);fe=A.pop()||"";for(const J of A)if(J.startsWith("data: "))try{const ee=JSON.parse(J.slice(6));ee.type==="start"?te(Te=>({...Te,total:ee.total,message:`Screenshotting ${ee.url}...`})):ee.type==="progress"?te({current:ee.current,total:ee.total,percent:ee.percent,status:"processing",message:ee.message}):ee.type==="complete"?(te({current:ee.processed,total:ee.processed,percent:100,status:ee.errors>0?"error":"complete",message:ee.message}),X()):ee.type==="error"&&te(Te=>({...Te,status:"error",message:ee.message}))}catch{}}}}catch(q){console.error("Featured image generation error:",q),te({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return i?r("div",{css:I.loading,children:r("div",{css:I.spinner})}):f&&h?y("div",{css:I.empty,children:[r("p",{children:"No files tracked yet"}),r("p",{css:I.emptyHint,children:"Click Scan to discover files in your public folder"}),r("button",{css:I.scanButton,onClick:U,children:"Scan for Files"})]}):c.length===0&&h?y("div",{css:I.empty,children:[r("p",{children:"No files in this folder"}),r("p",{css:I.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):y(Pe,{children:[r(Jp,{isOpen:V,onClose:()=>ae(!1),onSelect:oe}),le&&r(rl,{title:"Generating Screenshot",progress:F,onClose:()=>he(!1)}),r("div",{css:I.tableWrapper,children:y("table",{css:I.table,children:[r("thead",{children:y("tr",{children:[r("th",{css:[I.th,I.thCheckbox,"",""],children:c.length>0&&r("input",{type:"checkbox",css:I.checkbox,checked:x,ref:B=>{B&&(B.indeterminate=M&&!x)},onChange:Y})}),r("th",{css:I.th,children:"Name"}),r("th",{css:[I.th,I.thSize,"",""],children:"Size"}),r("th",{css:[I.th,I.thDimensions,"",""],children:"Dimensions"}),r("th",{css:[I.th,I.thCdn,"",""],children:"CDN"})]})}),y("tbody",{css:I.tbody,children:[!h&&!m&&y("tr",{css:I.parentRow,onClick:b,children:[r("td",{css:I.td}),r("td",{css:I.td,children:y("div",{css:I.nameCell,children:[r("svg",{css:I.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:I.name,children:".."})]})}),r("td",{css:[I.td,I.meta,"",""],children:"--"}),r("td",{css:[I.td,I.meta,"",""],children:"Parent folder"}),r("td",{css:I.td,children:"--"})]}),c.map(B=>r(a2,{item:B,isSelected:S.has(B.path),onClick:q=>T(B,q),onOpen:()=>z(B),onGenerateThumbnail:()=>R(B),editedImageKey:W},B.path)),h&&d&&!m&&y("tr",{css:I.featuredRow,onClick:P,title:`Generate ${d.filename}`,children:[r("td",{css:I.td}),r("td",{css:I.td,children:y("div",{css:I.nameCell,children:[r("div",{css:I.folderIconWrapper,children:r("svg",{css:I.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:[I.name,I.featuredText,"",""],children:d.filename})]})}),r("td",{css:[I.td,I.meta,I.featuredText,"",""],children:"--"}),r("td",{css:[I.td,I.meta,I.featuredText,"",""],children:"Click to generate"}),r("td",{css:[I.td,I.featuredText,"",""],children:"--"})]})]})]})})]})}function a2({item:i,isSelected:c,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:m}){const[x,M]=v.useState(!1),S=i.type==="folder",b=!S&&i.thumbnail!==void 0,T=i.thumbnail&&m&&m.path===i.path?`${i.thumbnail}?v=${m.key}`:i.thumbnail,z=i.isProtected||S&&i.name==="images"&&i.path==="public/images",R=U=>{U.stopPropagation();const X="/"+i.path.replace(/^public\//,"");navigator.clipboard.writeText(X),M(!0),setTimeout(()=>M(!1),1500)},Y=U=>{if(z){U.stopPropagation(),d();return}f(U)};return y("tr",{css:[I.row,c&&!z&&I.rowSelected,"",""],onClick:Y,children:[r("td",{css:[I.td,I.checkboxCell,"",""],onClick:U=>U.stopPropagation(),children:!z&&r("input",{type:"checkbox",css:I.checkbox,checked:c,onChange:()=>f({})})}),r("td",{css:I.td,children:y("div",{css:I.nameCell,children:[S?z?y("div",{css:I.imagesFolderWrapper,children:[r("svg",{css:I.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:I.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:I.folderIconWrapper,children:r("svg",{css:I.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&&T?r("div",{css:[I.thumbnailWrapper,i.isCloud&&I.thumbnailCloud,i.isRemote&&I.thumbnailRemote,"",""],children:r("img",{css:I.thumbnail,src:T,alt:i.name,loading:"lazy"})}):r("div",{css:[I.thumbnailWrapper,i.isCloud&&I.thumbnailCloud,i.isRemote&&I.thumbnailRemote,"",""],children:r("svg",{css:I.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:I.name,title:i.name,children:l2(i.name)}),y("div",{css:I.actionsCell,children:[y("button",{css:I.copyBtn,onClick:R,title:"Copy file path",children:[x&&r("span",{css:I.tooltip,children:"Copied!"}),r("svg",{css:I.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:I.openBtn,onClick:U=>{U.stopPropagation(),d()},children:"Open"})]})]})}),r("td",{css:[I.td,I.meta,"",""],children:S?y("div",{css:I.folderStats,children:[i.localCount!==void 0&&i.localCount>0&&y("span",{css:[I.folderStat,I.folderStatLocal,"",""],title:`${i.localCount} local`,children:[r("svg",{css:I.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&&y("span",{css:[I.folderStat,I.folderStatCloud,"",""],title:`${i.cloudCount} in cloud`,children:[r("svg",{css:I.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&&y("span",{css:[I.folderStat,I.folderStatRemote,"",""],title:`${i.remoteCount} remote`,children:[r("svg",{css:I.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&&y("span",{css:[I.folderStat,I.folderStatUpdate,"",""],title:`${i.updateCount} pending update${i.updateCount!==1?"s":""}`,children:[r("svg",{css:I.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&&y("span",{children:[i.fileCount," files"]}),!i.localCount&&!i.cloudCount&&!i.remoteCount&&!i.updateCount&&i.fileCount===void 0&&"--"]}):i.hasUpdate?y("span",{css:I.updateLabel,children:[r("svg",{css:I.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:I.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:I.storedLabel,children:r("svg",{css:i.isRemote?I.storedIconRemote:I.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?Dp(i.size):"--"}),r("td",{css:[I.td,I.meta,"",""],children:S?i.totalSize!==void 0?Dp(i.totalSize):"--":i.dimensions?`${i.dimensions.width}x${i.dimensions.height}`:"--"}),r("td",{css:I.td,children:i.cdnPushed?i.isRemote?r("span",{css:I.cdnBadgeRemote,children:"Remote"}):y("span",{css:I.cdnBadge,children:[r("svg",{css:I.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:I.cdnEmpty,children:"--"})})]})}function Dp(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}function l2(i,c=32){if(i.length<=c)return i;const f=i.lastIndexOf("."),d=f>0?i.substring(f):"",h=f>0?i.substring(0,f):i,m=c-d.length-3;if(m<6)return i.substring(0,c-3)+"...";const x=Math.ceil(m/2),M=Math.floor(m/2);return h.substring(0,x)+"..."+h.substring(h.length-M)+d}var o2=Object.defineProperty,i2=(i,c,f)=>c in i?o2(i,c,{enumerable:!0,configurable:!0,writable:!0,value:f}):i[c]=f,Bt=(i,c,f)=>i2(i,typeof c!="symbol"?c+"":c,f);const qr={x:0,y:0,width:0,height:0,unit:"px"},ho=(i,c,f)=>Math.min(Math.max(i,c),f),r2=(...i)=>i.filter(c=>c&&typeof c=="string").join(" "),Ap=(i,c)=>i===c||i.width===c.width&&i.height===c.height&&i.x===c.x&&i.y===c.y&&i.unit===c.unit;function po(i,c,f){return i.unit==="%"?{...qr,...i,unit:"%"}:{unit:"%",x:i.x?i.x/c*100:0,y:i.y?i.y/f*100:0,width:i.width?i.width/c*100:0,height:i.height?i.height/f*100:0}}function ol(i,c,f){return i.unit?i.unit==="px"?{...qr,...i,unit:"px"}:{unit:"px",x:i.x?i.x*c/100:0,y:i.y?i.y*f/100:0,width:i.width?i.width*c/100:0,height:i.height?i.height*f/100:0}:{...qr,...i,unit:"px"}}function Tp(i,c,f,d,h,m=0,x=0,M=d,S=h){const b={...i};let T=Math.min(m,d),z=Math.min(x,h),R=Math.min(M,d),Y=Math.min(S,h);c&&(c>1?(T=x?x*c:T,z=T/c,R=M*c):(z=m?m/c:z,T=z*c,Y=S/c)),b.y<0&&(b.height=Math.max(b.height+b.y,z),b.y=0),b.x<0&&(b.width=Math.max(b.width+b.x,T),b.x=0);const U=d-(b.x+b.width);U<0&&(b.x=Math.min(b.x,d-T),b.width+=U);const X=h-(b.y+b.height);if(X<0&&(b.y=Math.min(b.y,h-z),b.height+=X),b.width<T&&((f==="sw"||f=="nw")&&(b.x-=T-b.width),b.width=T),b.height<z&&((f==="nw"||f=="ne")&&(b.y-=z-b.height),b.height=z),b.width>R&&((f==="sw"||f=="nw")&&(b.x-=R-b.width),b.width=R),b.height>Y&&((f==="nw"||f=="ne")&&(b.y-=Y-b.height),b.height=Y),c){const W=b.width/b.height;if(W<c){const V=Math.max(b.width/c,z);(f==="nw"||f=="ne")&&(b.y-=V-b.height),b.height=V}else if(W>c){const V=Math.max(b.height*c,T);(f==="sw"||f=="nw")&&(b.x-=V-b.width),b.width=V}}return b}function s2(i,c,f,d){const h={...i};return c==="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):c==="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)),c==="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):c==="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 go={capture:!0,passive:!1};let c2=0;const il=class In extends v.PureComponent{constructor(){super(...arguments),Bt(this,"docMoveBound",!1),Bt(this,"mouseDownOnCrop",!1),Bt(this,"dragStarted",!1),Bt(this,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),Bt(this,"componentRef",v.createRef()),Bt(this,"mediaRef",v.createRef()),Bt(this,"resizeObserver"),Bt(this,"initChangeCalled",!1),Bt(this,"instanceId",`rc-${c2++}`),Bt(this,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),Bt(this,"onCropPointerDown",c=>{const{crop:f,disabled:d}=this.props,h=this.getBox();if(!f)return;const m=ol(f,h.width,h.height);if(d)return;c.cancelable&&c.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const x=c.target.dataset.ord,M=!!x;let S=c.clientX,b=c.clientY,T=m.x,z=m.y;if(x){const R=c.clientX-h.x,Y=c.clientY-h.y;let U=0,X=0;x==="ne"||x=="e"?(U=R-(m.x+m.width),X=Y-m.y,T=m.x,z=m.y+m.height):x==="se"||x==="s"?(U=R-(m.x+m.width),X=Y-(m.y+m.height),T=m.x,z=m.y):x==="sw"||x=="w"?(U=R-m.x,X=Y-(m.y+m.height),T=m.x+m.width,z=m.y):(x==="nw"||x=="n")&&(U=R-m.x,X=Y-m.y,T=m.x+m.width,z=m.y+m.height),S=T+h.x+U,b=z+h.y+X}this.evData={startClientX:S,startClientY:b,startCropX:T,startCropY:z,clientX:c.clientX,clientY:c.clientY,isResize:M,ord:x},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})}),Bt(this,"onComponentPointerDown",c=>{const{crop:f,disabled:d,locked:h,keepSelection:m,onChange:x}=this.props,M=this.getBox();if(d||h||m&&f)return;c.cancelable&&c.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const S=c.clientX-M.x,b=c.clientY-M.y,T={unit:"px",x:S,y:b,width:0,height:0};this.evData={startClientX:c.clientX,startClientY:c.clientY,startCropX:S,startCropY:b,clientX:c.clientX,clientY:c.clientY,isResize:!0},this.mouseDownOnCrop=!0,x(ol(T,M.width,M.height),po(T,M.width,M.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}),Bt(this,"onDocPointerMove",c=>{const{crop:f,disabled:d,onChange:h,onDragStart:m}=this.props,x=this.getBox();if(d||!f||!this.mouseDownOnCrop)return;c.cancelable&&c.preventDefault(),this.dragStarted||(this.dragStarted=!0,m&&m(c));const{evData:M}=this;M.clientX=c.clientX,M.clientY=c.clientY;let S;M.isResize?S=this.resizeCrop():S=this.dragCrop(),Ap(f,S)||h(ol(S,x.width,x.height),po(S,x.width,x.height))}),Bt(this,"onComponentKeyDown",c=>{const{crop:f,disabled:d,onChange:h,onComplete:m}=this.props;if(d)return;const x=c.key;let M=!1;if(!f)return;const S=this.getBox(),b=this.makePixelCrop(S),T=(navigator.platform.match("Mac")?c.metaKey:c.ctrlKey)?In.nudgeStepLarge:c.shiftKey?In.nudgeStepMedium:In.nudgeStep;if(x==="ArrowLeft"?(b.x-=T,M=!0):x==="ArrowRight"?(b.x+=T,M=!0):x==="ArrowUp"?(b.y-=T,M=!0):x==="ArrowDown"&&(b.y+=T,M=!0),M){c.cancelable&&c.preventDefault(),b.x=ho(b.x,0,S.width-b.width),b.y=ho(b.y,0,S.height-b.height);const z=ol(b,S.width,S.height),R=po(b,S.width,S.height);h(z,R),m&&m(z,R)}}),Bt(this,"onHandlerKeyDown",(c,f)=>{const{aspect:d=0,crop:h,disabled:m,minWidth:x=0,minHeight:M=0,maxWidth:S,maxHeight:b,onChange:T,onComplete:z}=this.props,R=this.getBox();if(m||!h)return;if(c.key==="ArrowUp"||c.key==="ArrowDown"||c.key==="ArrowLeft"||c.key==="ArrowRight")c.stopPropagation(),c.preventDefault();else return;const Y=(navigator.platform.match("Mac")?c.metaKey:c.ctrlKey)?In.nudgeStepLarge:c.shiftKey?In.nudgeStepMedium:In.nudgeStep,U=ol(h,R.width,R.height),X=s2(U,c.key,Y,f),W=Tp(X,d,f,R.width,R.height,x,M,S,b);if(!Ap(h,W)){const V=po(W,R.width,R.height);T(W,V),z&&z(W,V)}}),Bt(this,"onDocPointerDone",c=>{const{crop:f,disabled:d,onComplete:h,onDragEnd:m}=this.props,x=this.getBox();this.unbindDocMove(),!(d||!f)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,m&&m(c),h&&h(ol(f,x.width,x.height),po(f,x.width,x.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),Bt(this,"onDragFocus",()=>{var c;(c=this.componentRef.current)==null||c.scrollTo(0,0)})}get document(){return document}getBox(){const c=this.mediaRef.current;if(!c)return{x:0,y:0,width:0,height:0};const{x:f,y:d,width:h,height:m}=c.getBoundingClientRect();return{x:f,y:d,width:h,height:m}}componentDidUpdate(c){const{crop:f,onComplete:d}=this.props;if(d&&!c.crop&&f){const{width:h,height:m}=this.getBox();h&&m&&d(ol(f,h,m),po(f,h,m))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,go),this.document.addEventListener("pointerup",this.onDocPointerDone,go),this.document.addEventListener("pointercancel",this.onDocPointerDone,go),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,go),this.document.removeEventListener("pointerup",this.onDocPointerDone,go),this.document.removeEventListener("pointercancel",this.onDocPointerDone,go),this.docMoveBound=!1)}getCropStyle(){const{crop:c}=this.props;if(c)return{top:`${c.y}${c.unit}`,left:`${c.x}${c.unit}`,width:`${c.width}${c.unit}`,height:`${c.height}${c.unit}`}}dragCrop(){const{evData:c}=this,f=this.getBox(),d=this.makePixelCrop(f),h=c.clientX-c.startClientX,m=c.clientY-c.startClientY;return d.x=ho(c.startCropX+h,0,f.width-d.width),d.y=ho(c.startCropY+m,0,f.height-d.height),d}getPointRegion(c,f,d,h){const{evData:m}=this,x=m.clientX-c.x,M=m.clientY-c.y;let S;h&&f?S=f==="nw"||f==="n"||f==="ne":S=M<m.startCropY;let b;return d&&f?b=f==="nw"||f==="w"||f==="sw":b=x<m.startCropX,b?S?"nw":"sw":S?"ne":"se"}resolveMinDimensions(c,f,d=0,h=0){const m=Math.min(d,c.width),x=Math.min(h,c.height);return!f||!m&&!x?[m,x]:f>1?m?[m,m/f]:[x*f,x]:x?[x*f,x]:[m,m/f]}resizeCrop(){const{evData:c}=this,{aspect:f=0,maxWidth:d,maxHeight:h}=this.props,m=this.getBox(),[x,M]=this.resolveMinDimensions(m,f,this.props.minWidth,this.props.minHeight);let S=this.makePixelCrop(m);const b=this.getPointRegion(m,c.ord,x,M),T=c.ord||b;let z=c.clientX-c.startClientX,R=c.clientY-c.startClientY;(x&&T==="nw"||T==="w"||T==="sw")&&(z=Math.min(z,-x)),(M&&T==="nw"||T==="n"||T==="ne")&&(R=Math.min(R,-M));const Y={unit:"px",x:0,y:0,width:0,height:0};b==="ne"?(Y.x=c.startCropX,Y.width=z,f?(Y.height=Y.width/f,Y.y=c.startCropY-Y.height):(Y.height=Math.abs(R),Y.y=c.startCropY-Y.height)):b==="se"?(Y.x=c.startCropX,Y.y=c.startCropY,Y.width=z,f?Y.height=Y.width/f:Y.height=R):b==="sw"?(Y.x=c.startCropX+z,Y.y=c.startCropY,Y.width=Math.abs(z),f?Y.height=Y.width/f:Y.height=R):b==="nw"&&(Y.x=c.startCropX+z,Y.width=Math.abs(z),f?(Y.height=Y.width/f,Y.y=c.startCropY-Y.height):(Y.height=Math.abs(R),Y.y=c.startCropY+R));const U=Tp(Y,f,b,m.width,m.height,x,M,d,h);return f||In.xyOrds.indexOf(T)>-1?S=U:In.xOrds.indexOf(T)>-1?(S.x=U.x,S.width=U.width):In.yOrds.indexOf(T)>-1&&(S.y=U.y,S.height=U.height),S.x=ho(S.x,0,m.width-S.width),S.y=ho(S.y,0,m.height-S.height),S}renderCropSelection(){const{ariaLabels:c=In.defaultProps.ariaLabels,disabled:f,locked:d,renderSelectionAddon:h,ruleOfThirds:m,crop:x}=this.props,M=this.getCropStyle();if(x)return bt.createElement("div",{style:M,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":c.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!f&&!d&&bt.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},bt.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),bt.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),bt.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),bt.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),bt.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":c.nwDragHandle,onKeyDown:S=>this.onHandlerKeyDown(S,"nw"),role:"button"}),bt.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":c.nDragHandle,onKeyDown:S=>this.onHandlerKeyDown(S,"n"),role:"button"}),bt.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":c.neDragHandle,onKeyDown:S=>this.onHandlerKeyDown(S,"ne"),role:"button"}),bt.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":c.eDragHandle,onKeyDown:S=>this.onHandlerKeyDown(S,"e"),role:"button"}),bt.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":c.seDragHandle,onKeyDown:S=>this.onHandlerKeyDown(S,"se"),role:"button"}),bt.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":c.sDragHandle,onKeyDown:S=>this.onHandlerKeyDown(S,"s"),role:"button"}),bt.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":c.swDragHandle,onKeyDown:S=>this.onHandlerKeyDown(S,"sw"),role:"button"}),bt.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":c.wDragHandle,onKeyDown:S=>this.onHandlerKeyDown(S,"w"),role:"button"})),h&&bt.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:S=>S.stopPropagation()},h(this.state)),m&&bt.createElement(bt.Fragment,null,bt.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),bt.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(c){const f={...qr,...this.props.crop||{}};return ol(f,c.width,c.height)}render(){const{aspect:c,children:f,circularCrop:d,className:h,crop:m,disabled:x,locked:M,style:S,ruleOfThirds:b}=this.props,{cropIsActive:T,newCropIsBeingDrawn:z}=this.state,R=m?this.renderCropSelection():null,Y=r2("ReactCrop",h,T&&"ReactCrop--active",x&&"ReactCrop--disabled",M&&"ReactCrop--locked",z&&"ReactCrop--new-crop",m&&c&&"ReactCrop--fixed-aspect",m&&d&&"ReactCrop--circular-crop",m&&b&&"ReactCrop--rule-of-thirds",!this.dragStarted&&m&&!m.width&&!m.height&&"ReactCrop--invisible-crop",d&&"ReactCrop--no-animate");return bt.createElement("div",{ref:this.componentRef,className:Y,style:S},bt.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},f),m?bt.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},bt.createElement("defs",null,bt.createElement("mask",{id:`hole-${this.instanceId}`},bt.createElement("rect",{width:"100%",height:"100%",fill:"white"}),d?bt.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"}):bt.createElement("rect",{x:`${m.x}${m.unit}`,y:`${m.y}${m.unit}`,width:`${m.width}${m.unit}`,height:`${m.height}${m.unit}`,fill:"black"}))),bt.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,R)}};Bt(il,"xOrds",["e","w"]),Bt(il,"yOrds",["n","s"]),Bt(il,"xyOrds",["nw","ne","se","sw"]),Bt(il,"nudgeStep",1),Bt(il,"nudgeStepMedium",10),Bt(il,"nudgeStepLarge",100),Bt(il,"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 u2=il;const d2=Ht`
86
+ from { opacity: 0; }
87
+ to { opacity: 1; }
88
+ `,we={overlay:g("position:fixed;inset:0;z-index:10001;display:flex;background:transparent;animation:",d2," 0.15s ease-out;font-family:",sl,";",""),container:g(Ta," display:flex;flex:1;margin:24px;background:",s.surface,";border:1px solid ",s.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:g("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",s.background,";overflow:hidden;.ReactCrop__crop-selection{border:2px solid ",s.primary,";}",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},closeBtn:g("padding:8px;background:",s.surface,";border:1px solid ",s.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:",s.surfaceHover,";border-color:",s.borderHover,";}",""),closeIcon:g("width:20px;height:20px;color:",s.textSecondary,";",""),rotationWrapper:{name:"1xwnw1d",styles:"transition:transform 0.3s ease;position:relative;cursor:pointer"},cropHint:g("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:",N.sm,";pointer-events:none;white-space:nowrap;",""),successBanner:g("position:absolute;top:24px;left:50%;transform:translateX(-50%);background:#22c55e;color:#fff;padding:12px 24px;border-radius:8px;font-size:",N.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:g("width:280px;background:",s.surface,";border-left:1px solid ",s.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:g("padding:16px 20px;border-bottom:1px solid ",s.border,";",""),sidebarTitle:g("font-size:",N.base,";font-weight:600;color:",s.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:g("font-size:",N.sm,";font-weight:600;color:",s.text,";",""),subSectionLabel:g("font-size:",N.xs,";font-weight:500;color:",s.textMuted,";text-transform:uppercase;letter-spacing:0.5px;",""),aspectButtons:{name:"13l5m7f",styles:"display:flex;gap:6px;flex-wrap:wrap"},aspectBtn:g("padding:6px 10px;font-size:",N.sm,";border:1px solid ",s.border,";background:",s.surface,";color:",s.text,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover:not(:disabled){background-color:",s.surfaceHover,";border-color:",s.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),aspectBtnActive:g("background-color:",s.primary,";border-color:",s.primary,";color:white;&:hover:not(:disabled){background-color:",s.primary,";border-color:",s.primary,";}",""),rotateButtons:{name:"11jf4ye",styles:"display:flex;gap:8px"},rotateBtn:g("flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 12px;font-size:",N.sm,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",s.text,";&:hover:not(:disabled){background-color:",s.surfaceHover,";border-color:",s.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),rotateIcon:{name:"157xhr7",styles:"width:16px;height:16px"},rotatePreview:g("width:80px;height:80px;border:1px solid ",s.border,";border-radius:6px;overflow:hidden;display:flex;align-items:center;justify-content:center;background:",s.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:g("width:80px;min-width:0;padding:8px 6px;font-size:",N.sm,";border:1px solid ",s.border,";border-radius:6px;background:",s.surface,";color:",s.text,";text-align:center;&:focus{outline:none;border-color:",s.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;background:",s.surfaceHover,";}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}-moz-appearance:textfield;",""),resizeX:g("font-size:",N.sm,";color:",s.textMuted,";",""),qualitySlider:g("width:100%;height:6px;border-radius:3px;background:",s.border,";outline:none;cursor:pointer;&::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:",s.primary,";cursor:pointer;}&::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:",s.primary,";cursor:pointer;border:none;}",""),qualityRow:{name:"uh5xjc",styles:"display:flex;align-items:center;gap:12px"},qualityValue:g("min-width:40px;font-size:",N.sm,";color:",s.text,";text-align:right;",""),fileSize:g("font-size:",N.sm,";color:",s.textMuted,";padding:8px 0;",""),sidebarFooter:g("padding:16px 20px;border-top:1px solid ",s.border,";display:flex;flex-direction:column;gap:8px;",""),actionBtn:g("display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;font-size:",N.base,";font-weight:500;background:",s.primary,";border:1px solid ",s.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:white;&:hover:not(:disabled){background-color:",s.primaryHover,";border-color:",s.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),cancelBtn:g("display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;font-size:",N.base,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",s.text,";&:hover{background-color:",s.surfaceHover,";border-color:",s.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:g("font-size:",N.xs,";color:",s.textMuted,";font-style:italic;",""),clearBtn:g("margin-top:8px;padding:6px 12px;font-size:",N.xs,";color:",s.textSecondary,";background:transparent;border:1px solid ",s.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;&:hover{background:",s.surfaceHover,";color:",s.text,";}","")},f2=[{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 h2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(2)} MB`}function p2({imagePath:i,imageSrc:c,dimensions:f,fileSize:d,onClose:h,onSaveComplete:m,triggerRefresh:x}){const M=v.useRef(null),[S,b]=v.useState(),[T,z]=v.useState(),[R,Y]=v.useState(void 0),[U,X]=v.useState(f.width),[W,V]=v.useState(f.height),[ae,le]=v.useState(!1),[he,F]=v.useState(!1),[te,P]=v.useState({width:f.width,height:f.height}),[oe,B]=v.useState(1),[q,se]=v.useState(!1),[pe,fe]=v.useState(0),[re,Ae]=v.useState(!1),A=U!==te.width||W!==te.height,[J,ee]=v.useState(0),[Te,Fe]=v.useState(0),[w,H]=v.useState(!1),[ne,ie]=v.useState(0),[Me,Le]=v.useState(null),[Xe,pt]=v.useState(d),[je,Yt]=v.useState(95),[Ze,et]=v.useState(0),yt=Ze!==0,Rt=$=>{const ce=$.currentTarget,{naturalWidth:Oe,naturalHeight:ct,width:Ne,height:ke}=ce;P({width:Oe,height:ct}),B(Oe/Ne),F(!0),X(Oe),V(ct)},Ut=()=>{if(!he||!M.current||q||A||yt)return;const $=M.current.width,ce=M.current.height;if(se(!0),R){const Oe=$/ce;let ct,Ne;R>Oe?(ct=100,Ne=Oe/R*100):(Ne=100,ct=R/Oe*100);const ke={unit:"%",x:(100-ct)/2,y:(100-Ne)/2,width:ct,height:Ne};b(ke);const St={unit:"px",x:Math.round(ke.x/100*$),y:Math.round(ke.y/100*ce),width:Math.round(ke.width/100*$),height:Math.round(ke.height/100*ce)};z(St)}else b({unit:"%",x:0,y:0,width:100,height:100}),z({unit:"px",x:0,y:0,width:$,height:ce})},Vt=()=>{se(!1),b(void 0),z(void 0)};v.useEffect(()=>{if(T&&he&&oe>0){const $=Math.round(T.width*oe),ce=Math.round(T.height*oe);ee($),Fe(ce)}else q||(ee(0),Fe(0))},[T,he,oe,q]);const Pt=()=>{et($=>($+90)%360)},tn=()=>{et($=>($-90+360)%360)},Ft=()=>{et(0)},lt=()=>{re&&m({name:i.split("/").pop()||"",path:i,type:"file",dimensions:te}),h()},Mt=$=>{if(Y($),!he||!M.current)return;const ce=M.current.width,Oe=M.current.height;if($){const ct=ce/Oe;let Ne,ke;$>ct?(Ne=100,ke=ct/$*100):(ke=100,Ne=$/ct*100);const St={unit:"%",x:(100-Ne)/2,y:(100-ke)/2,width:Ne,height:ke};b(St);const at={unit:"px",x:Math.round(St.x/100*ce),y:Math.round(St.y/100*Oe),width:Math.round(St.width/100*ce),height:Math.round(St.height/100*Oe)};z(at)}else b({unit:"%",x:0,y:0,width:100,height:100}),z({unit:"px",x:0,y:0,width:ce,height:Oe})},ge=te.width/te.height,Un=$=>{if(q)return;const ce=parseInt($.target.value)||0;X(ce),ce>0&&V(Math.round(ce/ge))},_t=$=>{if(q)return;const ce=parseInt($.target.value)||0;V(ce),ce>0&&X(Math.round(ce*ge))},pn=()=>{X(te.width),V(te.height)},Mn=$=>{if(!T||!M.current)return;const ce=parseInt($.target.value)||0;if(ce<=0)return;let Oe=Te;R&&(Oe=Math.round(ce/R));const ct=ce/oe,Ne=Oe/oe,ke={unit:"px",x:T.x,y:T.y,width:ct,height:Ne},St=M.current.width-ke.x,at=M.current.height-ke.y;ke.width=Math.min(ct,St),ke.height=Math.min(Ne,at),z(ke),b({unit:"px",x:ke.x,y:ke.y,width:ke.width,height:ke.height})},bn=$=>{if(!T||!M.current)return;const ce=parseInt($.target.value)||0;if(ce<=0)return;let Oe=J;R&&(Oe=Math.round(ce*R));const ct=Oe/oe,Ne=ce/oe,ke={unit:"px",x:T.x,y:T.y,width:ct,height:Ne},St=M.current.width-ke.x,at=M.current.height-ke.y;ke.width=Math.min(ct,St),ke.height=Math.min(Ne,at),z(ke),b({unit:"px",x:ke.x,y:ke.y,width:ke.width,height:ke.height})},yn=async()=>{if(he){le(!0);try{const $=T?{x:Math.round(T.x*oe),y:Math.round(T.y*oe),width:Math.round(T.width*oe),height:Math.round(T.height*oe)}:{x:0,y:0,width:te.width,height:te.height};let ce=q?J:A?U:te.width,Oe=q?Te:A?W:te.height;if(Ze===90||Ze===270){const ke=ce;ce=Oe,Oe=ke}const Ne=await(await fetch("/api/studio/edit-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:i,crop:$,rotation:Ze,resize:{width:ce,height:Oe},quality:je})})).json();Ne.success?(x(),m(Ne.updatedItem),P({width:Ne.dimensions.width,height:Ne.dimensions.height}),X(Ne.dimensions.width),V(Ne.dimensions.height),Ne.updatedItem?.size&&pt(Ne.updatedItem.size),se(!1),b(void 0),z(void 0),et(0),Ae(!0),fe(Date.now()),ie(ke=>ke+1),H(!0),setTimeout(()=>H(!1),3e3)):(console.error("Edit failed:",Ne.error),Le(Ne.error||"Failed to save image"))}catch($){console.error("Edit error:",$),Le("An error occurred while saving the image")}finally{le(!1)}}};return y("div",{css:we.overlay,children:[y("div",{css:we.container,children:[y("div",{css:we.main,children:[r("div",{css:we.headerButtons,children:r("button",{css:we.closeBtn,onClick:lt,children:r("svg",{css:we.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"})})})}),y("div",{css:we.rotationWrapper,onClick:Ut,children:[r(u2,{crop:q?S:void 0,onChange:$=>b($),onComplete:$=>z($),aspect:R,css:we.cropWrapper,disabled:!q,children:r("img",{ref:M,src:pe?`${c}?v=${pe}`:c,alt:"Edit",onLoad:Rt,style:{cursor:q?"crosshair":"pointer"}})}),!q&&he&&r("div",{css:we.cropHint,children:yt?"Save rotation first to enable crop":A?"Save resize first to enable crop":"Click to enable crop selection"}),w&&r("div",{css:we.successBanner,children:"Image updated"},ne)]})]}),y("div",{css:we.sidebar,children:[r("div",{css:we.sidebarHeader,children:r("h2",{css:we.sidebarTitle,children:"Edit Image"})}),y("div",{css:we.sidebarContent,children:[y("div",{css:we.section,children:[r("span",{css:we.sectionLabel,children:"Crop Selection"}),r("span",{css:we.subSectionLabel,children:"Aspect Ratio"}),r("div",{css:we.aspectButtons,children:f2.map($=>r("button",{css:[we.aspectBtn,R===$.value&&we.aspectBtnActive,"",""],onClick:()=>Mt($.value),disabled:A||yt,children:$.label},$.label))}),q&&y(Pe,{children:[r("span",{css:we.subSectionLabel,children:"Selection Size"}),y("div",{css:we.resizeRow,children:[r("input",{type:"number",css:we.resizeInput,value:J,onChange:Mn,min:1}),r("span",{css:we.resizeX,children:"×"}),r("input",{type:"number",css:we.resizeInput,value:Te,onChange:bn,min:1}),r("span",{css:we.resizeX,children:"px"})]})]}),r("p",{css:we.hint,children:yt?"Save rotation first to enable crop":A?"Save resize first to enable crop":q?"Drag corners to resize crop area":"Click image to enable crop"}),q&&r("button",{css:we.clearBtn,onClick:Vt,children:"Clear Selection"})]}),y("div",{css:we.section,children:[r("span",{css:we.sectionLabel,children:"Rotation"}),r("div",{css:we.rotatePreview,children:r("img",{src:pe?`${c}?v=${pe}`:c,alt:"Rotation preview",style:{transform:`rotate(${Ze}deg)`}})}),y("div",{css:we.rotateButtons,children:[y("button",{css:we.rotateBtn,onClick:tn,disabled:ae||q||A,children:[r("svg",{css:we.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"]}),y("button",{css:we.rotateBtn,onClick:Pt,disabled:ae||q||A,children:[r("svg",{css:we.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"]})]}),yt&&r("button",{css:we.clearBtn,onClick:Ft,children:"Reset Rotation"}),r("p",{css:we.hint,children:q||A?"Save other changes first to rotate":yt?"Click Save Changes to apply rotation":"Preview rotation before saving"})]}),y("div",{css:we.section,children:[r("span",{css:we.sectionLabel,children:"Resize Image"}),y("div",{css:we.resizeRow,children:[r("input",{type:"number",css:we.resizeInput,value:U,onChange:Un,min:1,disabled:q||yt}),r("span",{css:we.resizeX,children:"×"}),r("input",{type:"number",css:we.resizeInput,value:W,onChange:_t,min:1,disabled:q||yt}),r("span",{css:we.resizeX,children:"px"})]}),A&&!q&&!yt&&r("button",{css:we.clearBtn,onClick:pn,children:"Reset to Original"}),yt?r("p",{css:we.hint,children:"Save rotation first to resize"}):q?r("p",{css:we.hint,children:"Clear crop selection to resize"}):A?r("p",{css:we.hint,children:"Save to apply resize, then crop"}):r("p",{css:we.hint,children:"Maintains aspect ratio"})]}),y("div",{css:we.section,children:[r("span",{css:we.sectionLabel,children:"Quality"}),y("div",{css:we.qualityRow,children:[r("input",{type:"range",css:we.qualitySlider,min:1,max:100,value:je,onChange:$=>Yt(parseInt($.target.value))}),y("span",{css:we.qualityValue,children:[je,"%"]})]}),r("p",{css:we.hint,children:"Lower quality = smaller file size"})]}),y("div",{css:we.section,children:[r("span",{css:we.sectionLabel,children:"File Size"}),r("p",{css:we.fileSize,children:h2(Xe)})]})]}),y("div",{css:we.sidebarFooter,children:[r("button",{css:we.actionBtn,onClick:yn,disabled:ae||!he,children:ae?y(Pe,{children:[r("span",{css:we.spinner}),"Saving..."]}):"Save Changes"}),r("button",{css:we.cancelBtn,onClick:lt,disabled:ae,children:"Close"})]})]})]}),Me&&r(Vr,{title:"Error",message:Me,onClose:()=>Le(null)})]})}const g2=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],m2=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function b2(i){const c=i.toLowerCase().substring(i.lastIndexOf("."));return g2.includes(c)}function y2(i){const c=i.toLowerCase().substring(i.lastIndexOf("."));return m2.includes(c)}const me={overlay:{name:"1crgpqk",styles:"position:absolute;top:0;left:0;right:0;bottom:0;z-index:100;display:flex;background:transparent"},container:g("display:flex;flex:1;margin:24px;background:",s.surface,";border:1px solid ",s.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:g("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",s.background,";overflow:auto;",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},copyBtn:g("position:relative;padding:8px;background:",s.surface,";border:1px solid ",s.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:",s.surfaceHover,";border-color:",s.borderHover,";}",""),copyIcon:g("width:20px;height:20px;color:",s.textSecondary,";",""),statusIcon:g("display:flex;align-items:center;justify-content:center;padding:8px;background:",s.surface,";border:1px solid ",s.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:g("padding:8px;background:",s.surface,";border:1px solid ",s.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:",s.surfaceHover,";border-color:",s.borderHover,";}",""),mainCloseIcon:g("width:20px;height:20px;color:",s.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:g("display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px;background:",s.surface,";border-radius:12px;border:1px solid ",s.border,";",""),fileIcon:g("width:80px;height:80px;color:",s.textMuted,";margin-bottom:16px;",""),fileName:g("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;",""),sidebar:g("width:280px;background:",s.surface,";border-left:1px solid ",s.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:g("padding:16px 20px;border-bottom:1px solid ",s.border,";",""),sidebarTitle:g("font-size:",N.base,";font-weight:600;color:",s.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:g("display:flex;justify-content:space-between;font-size:",N.sm,";",""),infoLabel:g("color:",s.textSecondary,";",""),infoValue:g("color:",s.text,";font-weight:500;text-align:right;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),infoValueWrap:g("color:",s.text,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;",""),infoLink:g("color:",s.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:g("font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:",s.primary,";color:white;",""),actions:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},actionBtn:g("display:flex;align-items:center;gap:10px;width:100%;padding:12px 14px;font-size:",N.base,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",s.text,";text-align:left;&:hover:not(:disabled){background-color:",s.surfaceHover,";border-color:",s.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),actionBtnDanger:g("color:",s.danger,";&:hover:not(:disabled){background-color:",s.dangerLight,";border-color:",s.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 v2(){const{focusedItem:i,setFocusedItem:c,triggerRefresh:f,fileItems:d,setEditedImageKey:h,requestDelete:m,requestMove:x,requestSync:M,requestDownload:S,requestProcess:b,setProcessMode:T,actionState:z}=vo(),[R,Y]=v.useState(!1),[U,X]=v.useState(!1),[W,V]=v.useState({current:0,total:1,percent:0,status:"processing",message:"Renaming..."}),[ae,le]=v.useState(!1),[he,F]=v.useState(null),[te,P]=v.useState(!1),[oe,B]=v.useState(!1),[q,se]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),[pe,fe]=v.useState(!1),[re,Ae]=v.useState(0),A=z.showProgress,J=i?i.name.toLowerCase()==="favicon.png"||i.name.toLowerCase()==="favicon.jpg":!1,ee=i&&!i.isProtected&&/\.(jpg|jpeg|png|webp|gif)$/i.test(i.name)&&(!i.isCloud||i.hasUpdate),Te=et=>{c(et),Ae(Date.now()),h(et.path)};if(!i)return null;const Fe=b2(i.name),w=y2(i.name),H="/"+i.path.replace(/^public\//,""),ne=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${H}`:H,ie=re?`${ne}?v=${re}`:ne,Me=typeof window<"u"?window.location.origin:"",Le=i.cdnPushed&&i.cdnBaseUrl?`${i.cdnBaseUrl}${H}`:`${Me}${H}`,Xe=()=>{c(null)},pt=()=>{navigator.clipboard.writeText(Le),P(!0),setTimeout(()=>P(!1),1500)},je=async et=>{if(et&&et!==i.name){Y(!1),X(!0),V({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});try{const yt=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:i.path,newName:et})});if(!yt.body)throw new Error("No response body");const Rt=yt.body.getReader(),Ut=new TextDecoder;let Vt="",Pt="";for(;;){const{done:tn,value:Ft}=await Rt.read();if(tn)break;Vt+=Ut.decode(Ft,{stream:!0});const lt=Vt.split(`
89
+ `);Vt=lt.pop()||"";for(const Mt of lt){if(!Mt.startsWith("data: "))continue;const ge=JSON.parse(Mt.slice(6));ge.type==="start"?V({current:0,total:ge.total,percent:0,status:"processing",message:ge.message}):ge.type==="progress"?V({current:ge.current,total:ge.total,percent:Math.round(ge.current/ge.total*100),status:"processing",message:ge.message}):ge.type==="complete"?(Pt=ge.newPath,V({current:ge.renamed,total:ge.renamed,percent:100,status:"complete",message:"Renamed successfully"})):ge.type==="error"&&(V(Un=>({...Un,status:"error",message:ge.message})),F({title:"Rename Failed",message:ge.message}))}}Pt&&(c({...i,path:Pt,name:Pt.split("/").pop()||et}),f())}catch(yt){console.error("Rename error:",yt),V(Rt=>({...Rt,status:"error",message:"Failed to rename"})),F({title:"Rename Failed",message:"An error occurred while renaming the file"})}}},Yt=async()=>{if(i){B(!0),se({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."});try{const et=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+i.path.replace(/^public\//,"")})});if(!et.ok){const Ut=await et.json();se({current:0,total:3,percent:0,status:"error",message:Ut.error||"Failed to generate favicons"});return}const yt=et.body?.getReader(),Rt=new TextDecoder;if(yt){let Ut="";for(;;){const{done:Vt,value:Pt}=await yt.read();if(Vt)break;Ut+=Rt.decode(Pt,{stream:!0});const tn=Ut.split(`
90
+ `);Ut=tn.pop()||"";for(const Ft of tn)if(Ft.startsWith("data: "))try{const lt=JSON.parse(Ft.slice(6));lt.type==="start"?se(Mt=>({...Mt,total:lt.total})):lt.type==="progress"?se({current:lt.current,total:lt.total,percent:lt.percent,status:"processing",message:lt.message}):lt.type==="complete"?se({current:lt.processed,total:lt.processed,percent:100,status:lt.errors>0?"error":"complete",message:lt.message}):lt.type==="error"&&se(Mt=>({...Mt,status:"error",message:lt.message}))}catch{}}}}catch(et){console.error("Favicon generation error:",et),se({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},Ze=()=>Fe?r("img",{css:me.image,src:ie,alt:i.name}):w?r("video",{css:me.video,src:ie,controls:!0}):y("div",{css:me.filePlaceholder,children:[r("svg",{css:me.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:me.fileName,children:i.name})]});return y(Pe,{children:[he&&r(Vr,{title:he.title,message:he.message,onClose:()=>F(null)}),r($p,{isOpen:ae,onClose:()=>le(!1)}),R&&r(Al,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:i.name,placeholder:"Enter new filename",confirmLabel:"Rename",onConfirm:je,onCancel:()=>Y(!1)}),U&&r(rl,{title:"Renaming",progress:W,onClose:()=>{X(!1),f()}}),oe&&r(rl,{title:"Generating Favicons",progress:q,onClose:()=>B(!1)}),r("div",{css:me.overlay,onClick:Xe,children:y("div",{css:me.container,onClick:et=>et.stopPropagation(),children:[y("div",{css:me.main,children:[y("div",{css:me.headerButtons,children:[i.cdnPushed&&!i.isRemote&&r("span",{css:me.statusIcon,title:"Pushed to CDN",children:r("svg",{css:me.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:me.statusIcon,title:"Remote image",children:r("svg",{css:me.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"})})}),y("button",{css:me.copyBtn,onClick:pt,title:"Copy file path",children:[te&&r("span",{css:me.tooltip,children:"Copied!"}),r("svg",{css:me.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:me.mainCloseBtn,onClick:Xe,"aria-label":"Close",children:r("svg",{css:me.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:me.mediaWrapper,children:Ze()})]}),y("div",{css:me.sidebar,children:[r("div",{css:me.sidebarHeader,children:r("h3",{css:me.sidebarTitle,children:"Details"})}),y("div",{css:me.sidebarContent,children:[y("div",{css:me.info,children:[y("div",{css:me.infoRow,children:[r("span",{css:me.infoLabel,children:"Name"}),r("span",{css:me.infoValueWrap,children:i.name})]}),y("div",{css:me.infoRow,children:[r("span",{css:me.infoLabel,children:"Path"}),r("span",{css:me.infoValueWrap,children:i.path.replace(/^public\//,"")})]}),i.size!==void 0&&y("div",{css:me.infoRow,children:[r("span",{css:me.infoLabel,children:"Size"}),r("span",{css:me.infoValue,children:x2(i.size)})]}),i.dimensions&&y("div",{css:me.infoRow,children:[r("span",{css:me.infoLabel,children:"Dimensions"}),y("span",{css:me.infoValue,children:[i.dimensions.width," × ",i.dimensions.height]})]}),(i.hasSm||i.hasMd||i.hasLg||i.hasFull)&&y("div",{css:me.infoRow,children:[r("span",{css:me.infoLabel,children:"Thumbnails"}),r("span",{css:me.infoValue,children:y("span",{css:me.thumbChips,children:[i.hasSm&&r("span",{css:me.thumbChip,children:"SM"}),i.hasMd&&r("span",{css:me.thumbChip,children:"MD"}),i.hasLg&&r("span",{css:me.thumbChip,children:"LG"}),i.hasFull&&r("span",{css:me.thumbChip,children:"FULL"})]})})]}),y("div",{css:me.infoRow,children:[r("span",{css:me.infoLabel,children:"CDN Status"}),r("span",{css:me.infoValue,children:i.cdnPushed?i.isRemote?"Remote":"Pushed":"Local"})]}),y("div",{css:me.infoRow,children:[r("span",{css:me.infoLabel,children:"URL"}),r("a",{href:Le,target:"_blank",rel:"noopener noreferrer",css:me.infoLink,title:Le,children:Le})]})]}),y("div",{css:me.actions,children:[y("button",{css:me.actionBtn,onClick:()=>Y(!0),disabled:i.isProtected,children:[r("svg",{css:me.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"]}),Fe&&y("button",{css:me.actionBtn,onClick:()=>fe(!0),disabled:A||!ee,title:ee?void 0:"Download image first to edit",children:[r("svg",{css:me.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"})}),ee?"Edit Image":"Download to Edit"]}),y("button",{css:me.actionBtn,onClick:()=>x([i.path]),disabled:A||i.isProtected,children:[r("svg",{css:me.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"]}),y("button",{css:[me.actionBtn,me.actionBtnCloud,"",""],onClick:()=>M([i.path],d),disabled:A||i.isProtected||i.cdnPushed&&!i.isRemote,title:i.cdnPushed&&!i.isRemote?"Already in R2":void 0,children:[r("svg",{css:me.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"]}),y("button",{css:[me.actionBtn,me.actionBtnCloud,"",""],onClick:()=>S([i.path],d),disabled:A||!i.cdnPushed||i.isRemote,title:i.cdnPushed?i.isRemote?"Remote image":"Download from CDN to local":"Not on CDN",children:[r("svg",{css:me.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"]}),y("button",{css:me.actionBtn,onClick:()=>{T("generate"),b([i.path])},disabled:A||i.isProtected,children:[r("svg",{css:me.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)&&y("button",{css:me.actionBtn,onClick:()=>{T("remove"),b([i.path])},disabled:A||i.isProtected,children:[r("svg",{css:me.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&&y("button",{css:me.actionBtn,onClick:Yt,disabled:oe||i.isProtected,children:[r("svg",{css:me.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"]}),y("button",{css:[me.actionBtn,me.actionBtnDanger,"",""],onClick:()=>m([i.path]),disabled:A||i.isProtected,children:[r("svg",{css:me.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"]})]})]})]})]})}),pe&&i.dimensions&&r(p2,{imagePath:i.path,imageSrc:ie,dimensions:i.dimensions,fileSize:i.size||0,onClose:()=>fe(!1),onSaveComplete:Te,triggerRefresh:f})]})}function x2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}const Dl={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:g("background:",s.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:g("width:24px;height:24px;color:",s.danger,";flex-shrink:0;",""),title:g("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;",""),message:g("font-size:",N.base,";color:",s.textSecondary,";margin:0 0 20px 0;line-height:1.5;",""),button:g("width:100%;padding:10px 16px;border-radius:6px;font-size:",N.base,";font-weight:500;border:none;background:",s.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",s.primaryHover,";}","")};function S2(){const{error:i,clearError:c}=vo();return i?r("div",{css:Dl.overlay,onClick:c,children:y("div",{css:Dl.modal,onClick:f=>f.stopPropagation(),children:[y("div",{css:Dl.header,children:[r("svg",{css:Dl.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:Dl.title,children:i.title})]}),r("p",{css:Dl.message,children:i.message}),r("button",{css:Dl.button,onClick:c,children:"OK"})]})}):null}const Ep={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 w2({triggerRefresh:i,clearSelection:c,setFocusedItem:f,showError:d}){const[h,m]=v.useState(Ep),x=v.useCallback(B=>{m(q=>({...q,progressState:typeof B=="function"?B(q.progressState):{...q.progressState,...B}}))},[]),M=v.useCallback(B=>{m(q=>({...q,showProgress:B}))},[]),S=v.useCallback(B=>{m(q=>({...q,progressTitle:B}))},[]),b=yu({setShowProgress:M,setProgressTitle:S,setProgressState:x,triggerRefresh:i}),T=v.useCallback(B=>{m(q=>({...q,actionPaths:B,showDeleteConfirm:!0}))},[]),z=v.useCallback(B=>{m(q=>({...q,actionPaths:B,showMoveModal:!0}))},[]),R=v.useCallback((B,q)=>{const se=B.map(re=>"/"+re.replace(/^public\//,""));let pe=!1,fe=!1;for(const re of B){const Ae=q.find(A=>A.path===re);Ae&&(Ae.isRemote?pe=!0:Ae.cdnPushed||(fe=!0))}m(re=>({...re,actionPaths:B,syncImageCount:se.length,syncHasRemote:pe,syncHasLocal:fe,showSyncConfirm:!0}))},[]),Y=v.useCallback((B,q)=>{const se=[];for(const pe of B){const fe=q.find(re=>re.path===pe);fe&&fe.cdnPushed&&!fe.isRemote&&se.push(pe)}m(pe=>({...pe,actionPaths:se,downloadImageCount:se.length,downloadTotalSelected:B.length,showDownloadConfirm:!0}))},[]),U=v.useCallback(B=>{m(q=>({...q,actionPaths:B,showProcessConfirm:!0}))},[]),X=v.useCallback(B=>{m(q=>({...q,processMode:B}))},[]),W=v.useCallback(()=>{m(B=>({...B,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),V=v.useCallback(()=>{m(Ep)},[]),ae=v.useCallback(()=>{b.stop()},[b]),le=v.useCallback(async()=>{const B=h.actionPaths;m(q=>({...q,showDeleteConfirm:!1}));try{const q=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:B})});if(q.ok)c(),f(null),i();else{const se=await q.json();d("Delete Failed",se.error||"Unknown error")}}catch(q){console.error("Delete error:",q),d("Delete Failed","Delete failed. Check console for details.")}},[h.actionPaths,c,f,i,d]),he=v.useCallback(async B=>{const q=h.actionPaths;m(se=>({...se,showMoveModal:!1})),await b.execute({endpoint:"/api/studio/move",body:{paths:q,destination:B},title:"Moving Files",onComplete:se=>{se.errors&&se.errors>0&&se.errorMessages?.length&&d("Move Failed",se.errorMessages.join(`
91
+ `)),c(),f(null)}})},[h.actionPaths,c,f,d,b]),F=v.useCallback(async()=>{const q=h.actionPaths.map(fe=>"/"+fe.replace(/^public\//,""));m(fe=>({...fe,showSyncConfirm:!1,showProgress:!0,progressTitle:"Pushing to CDN",progressState:{current:0,total:q.length,percent:0,status:"processing",message:"Pushing to CDN..."}}));let se=0;const pe=[];for(let fe=0;fe<q.length;fe++){const re=q[fe];try{const Ae=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[re]})});if(Ae.ok)se++;else{const A=await Ae.json();pe.push(`${re}: ${A.error||"Unknown error"}`)}}catch(Ae){pe.push(`${re}: ${Ae instanceof Error?Ae.message:"Unknown error"}`)}x({current:fe+1,total:q.length,percent:Math.round((fe+1)/q.length*100),status:"processing",message:`Pushed ${re}`})}x({current:q.length,total:q.length,percent:100,status:pe.length>0?"error":"complete",message:`Pushed ${se} file${se!==1?"s":""}${pe.length>0?`, ${pe.length} error${pe.length!==1?"s":""}`:""}`}),pe.length>0&&d("Push Errors",pe.join(`
92
+ `)),c(),i()},[h.actionPaths,c,i,d,x]),te=v.useCallback(async()=>{const B=h.actionPaths,q=h.processMode,se=B.map(Ae=>{const A=Ae.replace(/^public\//,"");return A.startsWith("/")?A:`/${A}`}),pe=q==="remove",fe=pe?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",re=pe?"Removing Thumbnails":"Generating Thumbnails";m(Ae=>({...Ae,showProcessConfirm:!1})),await b.execute({endpoint:fe,body:{imageKeys:se},title:re})},[h.actionPaths,h.processMode,b]),P=v.useCallback(async()=>{const B=h.progressState.orphanedFiles;if(!(!B||B.length===0))try{const q=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:B})});if(q.ok)x(se=>({...se,orphanedFiles:void 0,message:se.message?.replace(/Found \d+ orphaned thumbnail\(s\).*/,"Orphaned thumbnails deleted.")})),i();else{const se=await q.json();d("Delete Failed",se.error||"Failed to delete orphaned files")}}catch(q){console.error("Delete orphans error:",q),d("Delete Failed","Failed to delete orphaned files. Check console for details.")}},[h.progressState.orphanedFiles,i,d,x]),oe=v.useCallback(async(B,q)=>{if(B.length===0)return;S("Uploading Files"),M(!0),x({current:0,total:B.length,percent:0,status:"processing",message:"Uploading..."});let se=0;const pe=[];for(let fe=0;fe<B.length;fe++){const re=B[fe],Ae=new FormData;Ae.append("file",re),Ae.append("path",q);try{(await fetch("/api/studio/upload",{method:"POST",body:Ae})).ok?se++:pe.push(re.name)}catch(A){console.error("Upload error:",A),pe.push(re.name)}x({current:fe+1,total:B.length,percent:Math.round((fe+1)/B.length*100),status:"processing",message:`Uploaded ${re.name}`})}x({current:B.length,total:B.length,percent:100,status:pe.length>0?"error":"complete",message:`Uploaded ${se} file${se!==1?"s":""}${pe.length>0?`, ${pe.length} failed`:""}`}),i()},[M,S,x,i]);return{actionState:h,setActionState:m,requestDelete:T,requestMove:z,requestSync:R,requestDownload:Y,requestProcess:U,setProcessMode:X,cancelAction:W,closeProgress:V,stopProcessing:ae,confirmDelete:le,confirmMove:he,confirmSync:F,confirmProcess:te,deleteOrphans:P,uploadFiles:oe}}const C2=Ht`
93
+ from { opacity: 0; }
94
+ to { opacity: 1; }
95
+ `,k2=Ht`
96
+ from {
97
+ opacity: 0;
98
+ transform: translateY(-8px) scale(0.98);
99
+ }
100
+ to {
101
+ opacity: 1;
102
+ transform: translateY(0) scale(1);
103
+ }
104
+ `,z2=Ht`
105
+ from { transform: rotate(0deg); }
106
+ to { transform: rotate(360deg); }
107
+ `,Re={overlay:g("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:",C2," 0.15s ease-out;font-family:",sl,";",""),modal:g(Ta," background-color:",s.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:90vh;overflow:hidden;animation:",k2," 0.2s ease-out;display:flex;flex-direction:column;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:g("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"amghpa",styles:"padding:16px 24px 24px;overflow-y:auto;flex:1"},section:{name:"za8dp",styles:"margin-bottom:20px;&:last-child{margin-bottom:0;}"},sectionLabel:g("font-size:",N.sm,";font-weight:600;color:",s.textSecondary,";margin:0 0 8px 0;text-transform:uppercase;letter-spacing:0.05em;",""),folderName:g("display:inline-flex;align-items:center;gap:8px;padding:8px 12px;background:",s.background,";border-radius:6px;font-size:",N.base,";font-weight:500;color:",s.text,";",""),folderIcon:{name:"8pinfb",styles:"width:18px;height:18px;color:#f9935e"},statusBadge:g("display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:6px;font-size:",N.sm,";margin-top:8px;",""),statusNeedsGen:{name:"1ozqf4e",styles:"background:#fef3c7;color:#92400e"},statusReady:{name:"6zd3sa",styles:"background:#d1fae5;color:#065f46"},fontList:{name:"dj9uva",styles:"display:flex;flex-wrap:wrap;gap:6px;margin-top:8px"},fontChip:g("display:inline-flex;align-items:center;padding:4px 10px;background:",s.background,";border-radius:4px;font-size:",N.sm,";color:",s.text,";",""),checkboxList:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},checkboxLabel:g("display:flex;align-items:center;gap:10px;padding:10px 12px;background:",s.background,";border-radius:6px;cursor:pointer;transition:background 0.15s ease;&:hover{background:",s.surfaceHover,";}",""),checkbox:g("width:18px;height:18px;accent-color:",s.primary,";cursor:pointer;",""),checkboxText:g("font-size:",N.base,";color:",s.text,";flex:1;",""),addNewRow:{name:"ap5vte",styles:"display:flex;gap:8px;margin-top:12px"},addNewInput:g("flex:1;padding:10px 12px;font-size:",N.base,";border:1px solid ",s.border,";border-radius:6px;background:",s.surface,";color:",s.text,";&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 2px ",s.primaryLight,";}&::placeholder{color:",s.textMuted,";}",""),addNewBtn:g("padding:10px 16px;font-size:",N.base,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;color:",s.text,";transition:all 0.15s ease;&:hover:not(:disabled){background:",s.surfaceHover,";border-color:",s.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),emptyText:g("font-size:",N.sm,";color:",s.textMuted,";padding:8px 0;",""),errorText:g("font-size:",N.sm,";color:",s.danger,";margin-top:4px;",""),footer:g("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",s.border,";background-color:",s.background,";",""),btn:g("padding:10px 18px;font-size:",N.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:g("background-color:",s.surface,";border:1px solid ",s.border,";color:",s.text,";&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),btnConfirm:g("background-color:",s.primary,";border:1px solid ",s.primary,";color:white;&:hover:not(:disabled){background-color:",s.primaryHover,";border-color:",s.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),loading:{name:"uphaut",styles:"display:flex;align-items:center;justify-content:center;padding:40px"},loadingSpinner:g("width:32px;height:32px;border-radius:50%;border:3px solid ",s.border,";border-top-color:",s.primary,";animation:",z2," 0.8s linear infinite;","")};function M2({folderPath:i,selectedFiles:c,onConfirm:f,onCancel:d}){const[h,m]=v.useState(!0),[x,M]=v.useState(null),[S,b]=v.useState([]),[T,z]=v.useState(new Set),[R,Y]=v.useState(""),[U,X]=v.useState(""),[W,V]=v.useState(!1),ae=!!(c&&c.length>0);v.useEffect(()=>{async function oe(){try{if(ae){const B=await fetch("/api/studio/fonts/assignments");if(B.ok){const q=await B.json();b(q.assignments||[])}}else if(i){const[B,q]=await Promise.all([fetch("/api/studio/fonts/scan",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:i})}),fetch("/api/studio/fonts/assignments")]);if(B.ok){const se=await B.json();M(se),z(new Set(se.assignments||[]))}if(q.ok){const se=await q.json();b(se.assignments||[])}}}catch(B){console.error("Failed to load data:",B)}finally{m(!1)}}oe()},[i,ae]);const le=oe=>{V(!0),z(B=>{const q=new Set(B);return q.has(oe)?q.delete(oe):q.add(oe),q})},he=()=>{const oe=R.trim().toLowerCase();if(oe){if(!/^[a-z][a-z0-9]*$/.test(oe)){X("Name must start with a letter and contain only letters and numbers");return}V(!0),z(B=>new Set([...B,oe])),Y(""),X("")}},F=()=>{W&&!window.confirm("You have unsaved changes. Discard them?")||d()},te=()=>{const oe=Array.from(T);oe.length!==0&&f(oe)};if(h)return r("div",{css:Re.overlay,children:r("div",{css:Re.modal,children:r("div",{css:Re.loading,children:r("div",{css:Re.loadingSpinner})})})});const P=!ae&&x!==null&&x.ttfFiles.length===0&&x.woff2Files.length===0;return r("div",{css:Re.overlay,onClick:F,children:y("div",{css:Re.modal,onClick:oe=>oe.stopPropagation(),children:[r("div",{css:Re.header,children:r("h3",{css:Re.title,children:"Assign Web Font"})}),y("div",{css:Re.body,children:[ae?y("div",{css:Re.section,children:[y("p",{css:Re.sectionLabel,children:["Selected Files (",c.length,")"]}),y("div",{css:[Re.statusBadge,Re.statusReady,"",""],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:"M5 13l4 4L19 7"})}),c.length," woff2 file",c.length>1?"s":""," selected"]}),y("div",{css:Re.fontList,children:[c.slice(0,10).map((oe,B)=>r("span",{css:Re.fontChip,children:oe.split("/").pop()},B)),c.length>10&&y("span",{css:Re.fontChip,children:["+",c.length-10," more"]})]})]}):y(Pe,{children:[y("div",{css:Re.section,children:[r("p",{css:Re.sectionLabel,children:"Font Folder"}),y("div",{css:Re.folderName,children:[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"})}),x?.folderName||i?.split("/").pop()]}),x&&r("div",{css:[Re.statusBadge,x.needsGeneration?Re.statusNeedsGen:Re.statusReady,"",""],children:x.needsGeneration?y(Pe,{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 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"})}),"woff2 files will be generated (",x.ttfFiles.length," TTF files)"]}):y(Pe,{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:"M5 13l4 4L19 7"})}),"woff2 files ready (",x.woff2Files.length," files)"]})})]}),x&&x.detectedFonts.length>0&&y("div",{css:Re.section,children:[r("p",{css:Re.sectionLabel,children:"Detected Fonts"}),r("div",{css:Re.fontList,children:x.detectedFonts.map((oe,B)=>y("span",{css:Re.fontChip,children:[oe.weightName,oe.style==="italic"?" Italic":""]},B))})]}),x&&x.needsGeneration&&y("div",{css:Re.section,children:[r("p",{css:Re.sectionLabel,children:"TTF Files to Convert"}),y("div",{css:Re.fontList,children:[x.ttfFiles.slice(0,8).map((oe,B)=>r("span",{css:Re.fontChip,children:oe},B)),x.ttfFiles.length>8&&y("span",{css:Re.fontChip,children:["+",x.ttfFiles.length-8," more"]})]})]})]}),!P&&y("div",{css:Re.section,children:[r("p",{css:Re.sectionLabel,children:"Assign To"}),S.length>0?r("div",{css:Re.checkboxList,children:S.map(oe=>y("label",{css:Re.checkboxLabel,children:[r("input",{type:"checkbox",css:Re.checkbox,checked:T.has(oe.name),onChange:()=>le(oe.name)}),r("span",{css:Re.checkboxText,children:oe.name})]},oe.name))}):r("p",{css:Re.emptyText,children:"No existing font assignments"}),Array.from(T).filter(oe=>!S.find(B=>B.name===oe)).map(oe=>y("label",{css:[Re.checkboxLabel,"margin-top:8px;",""],children:[r("input",{type:"checkbox",css:Re.checkbox,checked:!0,onChange:()=>le(oe)}),y("span",{css:Re.checkboxText,children:[oe," (new)"]})]},oe)),y("div",{css:Re.addNewRow,children:[r("input",{type:"text",css:Re.addNewInput,placeholder:"Add new assignment...",value:R,onChange:oe=>{Y(oe.target.value),X("")},onKeyDown:oe=>{oe.key==="Enter"&&(oe.preventDefault(),he())}}),r("button",{css:Re.addNewBtn,onClick:he,disabled:!R.trim(),children:"Add"})]}),U&&r("p",{css:Re.errorText,children:U})]}),P&&r("div",{css:Re.section,children:r("p",{css:Re.emptyText,children:"This folder does not contain any TTF or woff2 font files."})})]}),y("div",{css:Re.footer,children:[r("button",{css:[Re.btn,Re.btnCancel,"",""],onClick:F,children:"Cancel"}),y("button",{css:[Re.btn,Re.btnConfirm,"",""],onClick:te,disabled:T.size===0||P,children:["Assign Font",T.size>1?"s":""]})]})]})})}const D2=Ht`
108
+ from { opacity: 0; }
109
+ to { opacity: 1; }
110
+ `,A2=Ht`
111
+ from {
112
+ opacity: 0;
113
+ transform: translateY(-8px) scale(0.98);
114
+ }
115
+ to {
116
+ opacity: 1;
117
+ transform: translateY(0) scale(1);
118
+ }
119
+ `,T2=Ht`
120
+ from { transform: rotate(0deg); }
121
+ to { transform: rotate(360deg); }
122
+ `,Wt={overlay:g("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:",D2," 0.15s ease-out;font-family:",sl,";",""),modal:g(Ta," background-color:",s.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;overflow:hidden;animation:",A2," 0.2s ease-out;display:flex;flex-direction:column;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:g("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"amghpa",styles:"padding:16px 24px 24px;overflow-y:auto;flex:1"},assignmentList:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},assignmentRow:g("display:flex;align-items:center;justify-content:space-between;padding:12px 14px;background:",s.background,";border-radius:8px;border:1px solid ",s.border,";",""),assignmentInfo:{name:"nj7tus",styles:"display:flex;align-items:center;gap:8px;flex:1;min-width:0"},assignmentName:g("font-size:",N.base,";font-weight:500;color:",s.text,";",""),assignmentFolder:g("font-size:",N.sm,";color:",s.textMuted,";&::before{content:'→';margin-right:6px;color:",s.textMuted,";}",""),deleteBtn:g("padding:6px 12px;font-size:",N.sm,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:4px;cursor:pointer;color:",s.textSecondary,";transition:all 0.15s ease;&:hover{background:",s.dangerLight,";border-color:",s.danger,";color:",s.danger,";}",""),confirmRow:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},confirmBtn:g("padding:6px 12px;font-size:",N.sm,";font-weight:500;background:",s.danger,";border:1px solid ",s.danger,";border-radius:4px;cursor:pointer;color:white;transition:all 0.15s ease;&:hover{background:",s.dangerHover,";border-color:",s.dangerHover,";}",""),cancelBtn:g("padding:6px 12px;font-size:",N.sm,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";border-radius:4px;cursor:pointer;color:",s.textSecondary,";transition:all 0.15s ease;&:hover{background:",s.surfaceHover,";border-color:",s.borderHover,";}",""),emptyText:g("font-size:",N.base,";color:",s.textMuted,";text-align:center;padding:32px 0;",""),footer:g("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",s.border,";background-color:",s.background,";",""),btn:g("padding:10px 18px;font-size:",N.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnPrimary:g("background-color:",s.primary,";border:1px solid ",s.primary,";color:white;&:hover{background-color:",s.primaryHover,";border-color:",s.primaryHover,";}",""),loading:{name:"uphaut",styles:"display:flex;align-items:center;justify-content:center;padding:40px"},loadingSpinner:g("width:32px;height:32px;border-radius:50%;border:3px solid ",s.border,";border-top-color:",s.primary,";animation:",T2," 0.8s linear infinite;","")};function E2({onClose:i,onRefresh:c}){const[f,d]=v.useState(!0),[h,m]=v.useState([]),[x,M]=v.useState(null),S=v.useCallback(async()=>{try{const R=await fetch("/api/studio/fonts/assignments");if(R.ok){const Y=await R.json();m(Y.assignments||[])}}catch(R){console.error("Failed to load assignments:",R)}finally{d(!1)}},[]);v.useEffect(()=>{S()},[S]);const b=R=>{M(R)},T=()=>{M(null)},z=async R=>{try{(await fetch("/api/studio/fonts/delete-assignment",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:R})})).ok&&(m(U=>U.filter(X=>X.name!==R)),M(null),c?.())}catch(Y){console.error("Failed to delete assignment:",Y)}};return r("div",{css:Wt.overlay,onClick:i,children:y("div",{css:Wt.modal,onClick:R=>R.stopPropagation(),children:[r("div",{css:Wt.header,children:r("h3",{css:Wt.title,children:"Font Assignments"})}),r("div",{css:Wt.body,children:f?r("div",{css:Wt.loading,children:r("div",{css:Wt.loadingSpinner})}):h.length===0?y("p",{css:Wt.emptyText,children:["No font assignments yet.",r("br",{}),'Select a folder and click "Assign Web Font" to create one.']}):r("div",{css:Wt.assignmentList,children:h.map(R=>y("div",{css:Wt.assignmentRow,children:[y("div",{css:Wt.assignmentInfo,children:[r("span",{css:Wt.assignmentName,children:R.name}),r("span",{css:Wt.assignmentFolder,children:R.folder})]}),x===R.name?y("div",{css:Wt.confirmRow,children:[r("button",{css:Wt.confirmBtn,onClick:()=>z(R.name),children:"Delete?"}),r("button",{css:Wt.cancelBtn,onClick:T,children:"Cancel"})]}):r("button",{css:Wt.deleteBtn,onClick:()=>b(R.name),children:"Delete"})]},R.name))})}),r("div",{css:Wt.footer,children:r("button",{css:[Wt.btn,Wt.btnPrimary,"",""],onClick:i,children:"Done"})})]})})}const L2=Ht`
123
+ from { opacity: 0; }
124
+ to { opacity: 1; }
125
+ `,R2=Ht`
126
+ from {
127
+ opacity: 0;
128
+ transform: translateY(-8px) scale(0.98);
129
+ }
130
+ to {
131
+ opacity: 1;
132
+ transform: translateY(0) scale(1);
133
+ }
134
+ `,Jt={overlay:g("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:",L2," 0.15s ease-out;font-family:",sl,";",""),modal:g(Ta," background-color:",s.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:",R2," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:g("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0;letter-spacing:-0.02em;",""),content:{name:"vxuddk",styles:"padding:24px"},dropzone:g("border:2px dashed ",s.border,";border-radius:8px;padding:40px 24px;text-align:center;cursor:pointer;transition:all 0.15s ease;background-color:",s.background,";&:hover{border-color:",s.primary,";background-color:",s.primaryLight,";}",""),dropzoneActive:g("border-color:",s.primary,";background-color:",s.primaryLight,";",""),dropzoneIcon:g("width:48px;height:48px;color:",s.textMuted,";margin:0 auto 16px;",""),dropzoneText:g("font-size:",N.base,";color:",s.text,";margin:0 0 8px;",""),dropzoneHint:g("font-size:",N.sm,";color:",s.textMuted,";margin:0;",""),fileList:{name:"1kqpffn",styles:"margin-top:16px;max-height:200px;overflow-y:auto"},fileItem:g("display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background-color:",s.background,";border-radius:6px;margin-bottom:4px;font-size:",N.sm,";&:last-child{margin-bottom:0;}",""),fileName:g("color:",s.text,";overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;margin-right:8px;",""),fileSize:g("color:",s.textMuted,";flex-shrink:0;",""),removeBtn:g("background:none;border:none;color:",s.textMuted,";cursor:pointer;padding:4px;margin-left:8px;&:hover{color:",s.danger,";}",""),footer:g("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;background-color:",s.background,";border-top:1px solid ",s.border,";",""),btn:g("padding:10px 20px;border-radius:6px;font-size:",N.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;",""),btnSecondary:g("background-color:",s.surface,";border:1px solid ",s.border,";color:",s.text,";&:hover{background-color:",s.background,";}",""),btnPrimary:g("background-color:",s.primary,";border:1px solid ",s.primary,";color:white;&:hover:not(:disabled){background-color:",s.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}","")};function _2(i){return i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`}function O2({currentPath:i,onClose:c,onUploadComplete:f,setShowProgress:d,setProgressTitle:h,setProgress:m}){const[x,M]=v.useState([]),[S,b]=v.useState(!1),T=v.useRef(null),z=v.useRef(!1),R=v.useCallback(W=>{if(W){const V=Array.from(W).filter(ae=>ae.name.toLowerCase().endsWith(".ttf"));M(ae=>[...ae,...V])}},[]),Y=v.useCallback(W=>{W.preventDefault(),b(!1),R(W.dataTransfer.files)},[R]),U=v.useCallback(W=>{M(V=>V.filter((ae,le)=>le!==W))},[]),X=v.useCallback(async()=>{if(x.length===0)return;c(),z.current=!1,h("Uploading Font Files"),d(!0),m({current:0,total:x.length,percent:0,status:"processing",message:"Uploading..."});let W=0;const V=[];for(let ae=0;ae<x.length;ae++){if(z.current){m(F=>({...F,status:"complete",message:`Stopped. Uploaded ${W} file${W!==1?"s":""}.`})),f();return}const le=x[ae];m({current:ae,total:x.length,percent:Math.round(ae/x.length*100),status:"processing",message:`Uploading ${le.name}...`}),await new Promise(F=>setTimeout(F,500));const he=new FormData;he.append("file",le),he.append("path",i);try{(await fetch("/api/studio/fonts/upload",{method:"POST",body:he})).ok?W++:V.push(le.name)}catch{V.push(le.name)}}m({current:W,total:x.length,percent:100,status:"complete",message:V.length>0?`Uploaded ${W} file${W!==1?"s":""}. ${V.length} failed.`:`Uploaded ${W} file${W!==1?"s":""} successfully.`}),f()},[x,i,c,f,d,h,m]);return r("div",{css:Jt.overlay,onClick:c,children:y("div",{css:Jt.modal,onClick:W=>W.stopPropagation(),children:[r("div",{css:Jt.header,children:r("h2",{css:Jt.title,children:"Add Font Files"})}),y("div",{css:Jt.content,children:[r("input",{ref:T,type:"file",multiple:!0,accept:".ttf",style:{display:"none"},onChange:W=>R(W.target.files)}),y("div",{css:[Jt.dropzone,S&&Jt.dropzoneActive,"",""],onClick:()=>T.current?.click(),onDragOver:W=>{W.preventDefault(),b(!0)},onDragLeave:()=>b(!1),onDrop:Y,children:[r("svg",{css:Jt.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:Jt.dropzoneText,children:S?"Drop files here":"Click to select or drag and drop"}),r("p",{css:Jt.dropzoneHint,children:"TTF font files only"})]}),x.length>0&&r("div",{css:Jt.fileList,children:x.map((W,V)=>y("div",{css:Jt.fileItem,children:[r("span",{css:Jt.fileName,children:W.name}),r("span",{css:Jt.fileSize,children:_2(W.size)}),r("button",{css:Jt.removeBtn,onClick:()=>U(V),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:"M6 18L18 6M6 6l12 12"})})})]},`${W.name}-${V}`))})]}),y("div",{css:Jt.footer,children:[r("button",{css:[Jt.btn,Jt.btnSecondary,"",""],onClick:c,children:"Cancel"}),y("button",{css:[Jt.btn,Jt.btnPrimary,"",""],onClick:X,disabled:x.length===0,children:["Upload ",x.length>0&&`(${x.length})`]})]})]})})}const su="36px",Lp=Ht`
135
+ to { transform: rotate(360deg); }
136
+ `,Q={container:{name:"xt6tct",styles:"flex:1;display:flex;flex-direction:column;overflow:hidden"},toolbar:g("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",s.surface,";border-bottom:1px solid ",s.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"},selectionCount:g("font-size:",N.base,";color:",s.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:g("color:",s.primary,";background:none;border:none;cursor:pointer;font-size:",N.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),btn:g("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",su,";padding:0 14px;border-radius:6px;font-size:",N.base,";font-weight:500;background:",s.surface,";border:1px solid ",s.border,";cursor:pointer;transition:all 0.15s ease;color:",s.text,";&:hover:not(:disabled){background-color:",s.surfaceHover,";border-color:",s.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:g("background:",s.primary,";border-color:",s.primary,";color:white;&:hover:not(:disabled){background:",s.primaryHover,";border-color:",s.primaryHover,";}",""),btnDanger:g("color:",s.danger,";&:hover:not(:disabled){background-color:",s.dangerLight,";border-color:",s.danger,";}",""),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:g("width:32px;height:32px;border-radius:50%;border:3px solid ",s.border,";border-top-color:",s.primary,";animation:",Lp," 0.8s linear infinite;",""),empty:g("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",s.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:g("font-size:",N.base,";margin:0 0 4px 0;&:last-child{color:",s.textMuted,";font-size:",N.sm,";}",""),selectAllRow:g("display:flex;align-items:center;gap:24px;margin-bottom:16px;padding:12px 16px;background:",s.surface,";border-radius:8px;border:1px solid ",s.border,";",""),selectAllLabel:g("display:flex;align-items:center;gap:10px;font-size:",N.base,";font-weight:500;color:",s.textSecondary,";cursor:pointer;&:hover{color:",s.text,";}",""),selectAllCheckbox:g("width:16px;height:16px;accent-color:",s.primary,";",""),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:g("position:relative;border-radius:8px;border:1px solid ",s.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",s.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:g("border-color:",s.primary,";box-shadow:0 0 0 1px ",s.primary,";&:hover{border-color:",s.primary,";box-shadow:0 0 0 1px ",s.primary,";}",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:g("width:18px;height:18px;accent-color:",s.primary,";cursor:pointer;",""),itemContent:g("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",s.background,";",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},parentIcon:g("width:56px;height:56px;color:",s.textMuted,";",""),fileIcon:g("width:40px;height:40px;color:",s.textMuted,";",""),openBtn:g("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",N.sm,";font-weight:500;color:",s.primary,";background:",s.surface,";border:1px solid ",s.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:",s.primaryLight,";border-color:",s.primary,";}",""),label:g("padding:10px 12px;background-color:",s.surface,";border-top:1px solid ",s.borderLight,";",""),labelName:g("font-size:",N.sm,";font-weight:500;color:",s.text,";margin:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),labelMeta:g("font-size:",N.xs,";color:",s.textMuted,";margin:2px 0 0 0;",""),dropOverlay:g("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",s.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:g("display:flex;flex-direction:column;align-items:center;gap:12px;color:",s.primary,";font-size:",N.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"},createBtn:g("margin-top:16px;padding:10px 24px;font-size:",N.base,";font-weight:500;background:",s.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover{background:",s.primaryHover,";}",""),viewToggle:g("display:flex;align-items:center;height:",su,";background-color:",s.surface,";border:1px solid ",s.border,";border-radius:6px;overflow:hidden;",""),viewBtn:g("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",s.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",s.text,";background-color:",s.surfaceHover,";}",""),viewBtnActive:g("background-color:",s.primaryLight,";color:",s.primary,";&:hover{background-color:",s.primaryLight,";color:",s.primary,";}",""),iconSpin:g("animation:",Lp," 1s linear infinite;",""),tableWrapper:g("background:",s.surface,";border-radius:8px;border:1px solid ",s.border,";overflow-x:auto;",""),table:{name:"1ceqwkv",styles:"width:100%;min-width:400px;border-collapse:collapse;white-space:nowrap"},th:g("text-align:left;font-size:11px;color:",s.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",s.background,";border-bottom:1px solid ",s.border,";",""),thCheckbox:{name:"5iz1wr",styles:"width:48px"},thSize:{name:"yct5co",styles:"width:96px"},row:g("cursor:pointer;transition:background-color 0.15s ease;user-select:none;&:hover{background-color:",s.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",s.borderLight,";}",""),rowSelected:g("background-color:",s.primaryLight,";&:hover{background-color:",s.primaryLight,";}",""),parentRow:g("cursor:pointer;border-bottom:1px solid ",s.border,";&:hover{background-color:",s.surfaceHover,";}",""),td:{name:"i563hg",styles:"padding:12px 16px"},checkboxCell:{name:"sahq4q",styles:"padding:12px 16px;cursor:pointer;vertical-align:middle"},nameCell:{name:"9s3nhy",styles:"display:flex;align-items:center;gap:12px;flex:1"},folderIconWrapper:{name:"xfecxx",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0"},folderIconSmall:{name:"a45yt2",styles:"width:24px;height:24px;color:#f9935e"},fileIconWrapper:{name:"xfecxx",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0"},fileIconSmall:g("width:20px;height:20px;color:",s.textMuted,";",""),parentIconSmall:g("width:20px;height:20px;color:",s.textMuted,";flex-shrink:0;",""),name:g("font-size:",N.base,";font-weight:500;color:",s.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:g("font-size:",N.sm,";color:",s.textSecondary,";",""),actionsCell:{name:"1w56d5c",styles:"display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;flex-shrink:0"},listOpenBtn:g("height:32px;font-size:",N.sm,";font-weight:500;color:",s.primary,";background:",s.surface,";border:1px solid ",s.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",s.primaryLight,";border-color:",s.primary,";}",""),badge:{name:"1ue8xbs",styles:"width:8px;height:8px;border-radius:50%;flex-shrink:0"},badgeGray:{name:"a0o945",styles:"background-color:#9ca3af"},badgeYellow:{name:"yqs32k",styles:"background-color:#eab308"},badgeGreen:{name:"b752gh",styles:"background-color:#10b981"},badgeWrapper:{name:"1pi78hi",styles:"display:flex;align-items:center;gap:6px"},searchInput:g("height:",su,";padding:0 10px;border-radius:6px;font-size:",N.base,";background:",s.surface,";border:1px solid ",s.border,";color:",s.text,";width:160px;transition:all 0.15s ease;&:focus{outline:none;border-color:",s.primary,";box-shadow:0 0 0 2px ",s.primaryLight,";}&::placeholder{color:",s.textMuted,";}",""),copyBtn:g("position:absolute;top:8px;right:8px;z-index:10;width:28px;height:28px;display:flex;align-items:center;justify-content:center;background:",s.surface,";border:1px solid ",s.border,";border-radius:4px;cursor:pointer;opacity:0;transition:opacity 0.15s ease;box-shadow:0 1px 2px rgba(0, 0, 0, 0.08);color:",s.textSecondary,";&:hover{background-color:",s.primaryLight,";border-color:",s.primary,";color:",s.primary,";}.studio-item:hover &{opacity:1;}",""),copyBtnVisible:g("opacity:1;color:",s.primary,";",""),copyBtnIcon:{name:"1djxupe",styles:"width:14px;height:14px"},listCopyBtn:g("height:28px;width:28px;display:flex;align-items:center;justify-content:center;background:transparent;border:1px solid transparent;border-radius:4px;cursor:pointer;color:",s.textMuted,";transition:all 0.15s ease;flex-shrink:0;&:hover{background-color:",s.primaryLight,";border-color:",s.primary,";color:",s.primary,";}","")};function Rp(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:c,refreshKey:f,triggerRefresh:d}){const[h,m]=v.useState([]),[x,M]=v.useState(!0),[S,b]=v.useState(new Set),[T,z]=v.useState(!1),[R,Y]=v.useState(!1),[U,X]=v.useState(!1),[W,V]=v.useState(!1),[ae,le]=v.useState(!1),[he,F]=v.useState(!1),[te,P]=v.useState("grid"),[oe,B]=v.useState(!1),[q,se]=v.useState(!1),[pe,fe]=v.useState(!1),[re,Ae]=v.useState(!1),[A,J]=v.useState(!1),[ee,Te]=v.useState({status:"idle",current:0,total:0,percent:0}),[Fe,w]=v.useState("Processing"),[H,ne]=v.useState(null),[ie,Me]=v.useState({}),[Le,Xe]=v.useState(null),[pt,je]=v.useState(""),[Yt,Ze]=v.useState(null),{execute:et,stop:yt}=yu({setShowProgress:J,setProgressTitle:w,setProgressState:Te,triggerRefresh:d}),Rt=v.useCallback(async()=>{try{M(!0);const O=await fetch(`/api/studio/fonts/list?path=${encodeURIComponent(i)}`);if(O.ok){const Be=await O.json();m(Be.items||[]),z(Be.canCreate===!0)}}catch(O){console.error("Failed to fetch fonts:",O),m([])}finally{M(!1)}},[i]);v.useEffect(()=>{Rt(),b(new Set)},[Rt,f]);const Ut=v.useCallback(async O=>{const Be={};for(const ze of O)if(ze.type==="folder")try{const tt=await fetch("/api/studio/fonts/scan",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({folder:ze.path})});if(tt.ok){const ut=await tt.json();Be[ze.path]={needsGeneration:ut.needsGeneration,hasWoff2:ut.woff2Files?.length>0,assignments:ut.assignments||[]}}}catch{}Me(Be)},[]);v.useEffect(()=>{const O=h.filter(Be=>Be.type==="folder");O.length>0&&i.startsWith("_fonts")&&Ut(O)},[h,i,Ut]);const Vt=pt?h.filter(O=>O.name.toLowerCase().includes(pt.toLowerCase())):h,Pt=i==="_fonts";i==="src"||i.startsWith("src/");const tn=v.useCallback((O,Be)=>{if(Be.stopPropagation(),Be.shiftKey&&Le){const ze=h.findIndex(ut=>ut.path===Le),tt=h.findIndex(ut=>ut.path===O.path);if(ze!==-1&&tt!==-1){const ut=Math.min(ze,tt),nn=Math.max(ze,tt);b(dn=>{const gt=new Set(dn);for(let Tt=ut;Tt<=nn;Tt++)gt.add(h[Tt].path);return gt})}}else b(ze=>{const tt=new Set(ze);return tt.has(O.path)?tt.delete(O.path):tt.add(O.path),tt});Xe(O.path)},[h,Le]),Ft=v.useCallback(O=>{O.type==="folder"&&(c(O.path),b(new Set))},[c]),lt=v.useCallback(()=>{const O=i.split("/");O.pop();const Be=O.join("/")||"_fonts";c(Be),b(new Set)},[i,c]),Mt=h.length>0&&S.size===h.length,ge=S.size>0,Un=v.useCallback(()=>{b(Mt?new Set:new Set(h.map(O=>O.path)))},[Mt,h]),_t=v.useCallback(()=>{b(new Set),Xe(null)},[]),pn=v.useCallback(()=>{const O=h.filter(ze=>ze.type==="file"&&ze.name.toLowerCase().endsWith(".woff2")),Be=O.every(ze=>S.has(ze.path));b(Be?ze=>{const tt=new Set(ze);return O.forEach(ut=>tt.delete(ut.path)),tt}:ze=>{const tt=new Set(ze);return O.forEach(ut=>tt.add(ut.path)),tt})},[h,S]),Mn=v.useCallback(()=>{const O=h.filter(ze=>ze.type==="file"&&ze.name.toLowerCase().endsWith(".ttf")),Be=O.every(ze=>S.has(ze.path));b(Be?ze=>{const tt=new Set(ze);return O.forEach(ut=>tt.delete(ut.path)),tt}:ze=>{const tt=new Set(ze);return O.forEach(ut=>tt.add(ut.path)),tt})},[h,S]),bn=v.useCallback((O,Be)=>{Be.stopPropagation(),navigator.clipboard.writeText(O).then(()=>{Ze(O),setTimeout(()=>Ze(null),1500)})},[]),yn=v.useCallback(async()=>{B(!0),await Rt(),B(!1)},[Rt]),$=Array.from(S),ce=$.length===1&&h.find(O=>O.path===$[0])?.type==="folder",Oe=ce?$[0]:null,ct=Oe&&Oe.split("/").pop()||"",Ne=$.length===1&&h.find(O=>O.path===$[0])?.type==="file",ke=Ne?$[0]:null,St=ke&&ke.split("/").pop()||"",at=$.filter(O=>{const Be=h.find(ze=>ze.path===O);return Be?.type==="file"&&Be.name.toLowerCase().endsWith(".woff2")}),Pn=at.length>0,Dn=ce||Pn,So=v.useCallback(()=>{Dn&&fe(!0)},[Dn]),Ea=v.useCallback(async O=>{fe(!1),await et({endpoint:"/api/studio/fonts/assign-stream",body:ce?{folder:Oe,assignments:O}:{files:at,assignments:O},title:"Assigning Web Font",operationType:"process"})},[Oe,ce,at,et]),La=v.useCallback(()=>{J(!1),Te({status:"idle",current:0,total:0,percent:0})},[]),ra=v.useCallback(async O=>{Oe&&(X(!1),await et({endpoint:"/api/studio/fonts/rename-stream",body:{oldPath:Oe,newName:O},title:"Renaming Folder",onComplete:()=>b(new Set)}))},[Oe,et]),Zn=v.useCallback(async O=>{if(ke){V(!1);try{(await fetch("/api/studio/fonts/rename",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:ke,newName:O})})).ok&&(b(new Set),d())}catch(Be){console.error("Rename file failed:",Be)}}},[ke,d]),Ra=v.useCallback(()=>{S.size!==0&&F(!0)},[S.size]),sa=v.useCallback(async()=>{F(!1),await et({endpoint:"/api/studio/fonts/delete-stream",body:{paths:Array.from(S)},title:"Deleting Files",operationType:"delete",onComplete:()=>b(new Set)})},[S,et]),Tl=v.useCallback(()=>{le(!0)},[]),El=v.useCallback(async O=>{le(!1);try{(await fetch("/api/studio/fonts/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:i,name:O})})).ok&&d()}catch(Be){console.error("Create folder failed:",Be)}},[i,d]),cl=v.useCallback(O=>{O.preventDefault(),O.stopPropagation(),i.startsWith("_fonts")&&Y(!0)},[i]),ca=v.useCallback(O=>{O.preventDefault(),O.stopPropagation(),Y(!1)},[]),wo=v.useCallback(async O=>{if(O.preventDefault(),O.stopPropagation(),Y(!1),!i.startsWith("_fonts"))return;const Be=Array.from(O.dataTransfer.files).filter(ut=>ut.name.toLowerCase().endsWith(".ttf")||ut.name.toLowerCase().endsWith(".otf"));if(Be.length===0)return;w("Uploading Files"),J(!0),Te({status:"processing",current:0,total:Be.length,percent:0,message:"Uploading..."});let ze=0;const tt=[];for(let ut=0;ut<Be.length;ut++){const nn=Be[ut],dn=new FormData;dn.append("file",nn),dn.append("path",i);try{(await fetch("/api/studio/fonts/upload",{method:"POST",body:dn})).ok?ze++:tt.push(nn.name)}catch(gt){console.error("Upload failed:",gt),tt.push(nn.name)}Te({status:"processing",current:ut+1,total:Be.length,percent:Math.round((ut+1)/Be.length*100),message:`Uploaded ${nn.name}`})}Te({status:tt.length>0?"error":"complete",current:Be.length,total:Be.length,percent:100,message:`Uploaded ${ze} file${ze!==1?"s":""}${tt.length>0?`, ${tt.length} failed`:""}`}),d()},[i,d]);if(x)return y("div",{css:Q.container,children:[r("div",{css:Q.toolbar}),r("div",{css:Q.loading,children:r("div",{css:Q.spinner})})]});const Ll=i.startsWith("_fonts");return y("div",{css:Q.container,children:[y("div",{css:Q.toolbar,children:[y("div",{css:Q.toolbarLeft,children:[Ll&&y("button",{css:[Q.btn,Q.btnPrimary,"",""],onClick:()=>se(!0),children:[r(H2,{}),"Add New"]}),y("button",{css:Q.btn,onClick:()=>{Ne?V(!0):ce?X(!0):Tl()},children:[Ne||ce?r(N2,{}):r(U2,{}),Ne?"Rename File":ce?"Rename Folder":"New Folder"]}),y("button",{css:[Q.btn,Q.btnDanger,"",""],onClick:Ra,disabled:S.size===0,children:[r(j2,{}),"Delete"]}),y("button",{css:Q.btn,onClick:So,disabled:!Dn,title:Dn?Pn?`Assign ${at.length} woff2 file${at.length>1?"s":""}`:"Assign web font":"Select a folder or woff2 files to assign",children:[r(Q2,{}),"Assign Web Font"]})]}),y("div",{css:Q.toolbarRight,children:[ge&&y("span",{css:Q.selectionCount,children:[S.size," selected",r("button",{css:Q.clearBtn,onClick:_t,children:"Clear"})]}),r("input",{type:"text",css:Q.searchInput,placeholder:"Search fonts...",value:pt,onChange:O=>je(O.target.value)}),r("button",{css:Q.btn,onClick:yn,title:"Refresh view",disabled:oe,children:r(X2,{spinning:oe})}),y("div",{css:Q.viewToggle,children:[r("button",{css:[Q.viewBtn,te==="grid"&&Q.viewBtnActive,"",""],onClick:()=>P("grid"),"aria-label":"Grid view",children:r(V2,{})}),r("button",{css:[Q.viewBtn,te==="list"&&Q.viewBtnActive,"",""],onClick:()=>P("list"),"aria-label":"List view",children:r(F2,{})})]}),r("button",{css:Q.btn,onClick:()=>Ae(!0),title:"Font assignments settings",children:r(K2,{})})]})]}),y("div",{css:Q.content,onDragOver:cl,onDragLeave:ca,onDrop:wo,style:{position:"relative"},children:[R&&r("div",{css:Q.dropOverlay,children:y("div",{css:Q.dropMessage,children:[r(q2,{}),r("span",{children:"Drop TTF/OTF files to upload"})]})}),Vt.length===0&&T&&!pt?y("div",{css:Q.empty,children:[r("span",{css:Q.emptyIcon,children:r(Bp,{})}),r("p",{css:Q.emptyText,children:"Folder doesn't exist"}),r("button",{css:Q.createBtn,onClick:Tl,children:"Create Folder"})]}):te==="grid"?y(Pe,{children:[h.length>0&&y("div",{css:Q.selectAllRow,children:[y("label",{css:Q.selectAllLabel,children:[r("input",{type:"checkbox",css:Q.selectAllCheckbox,checked:Mt,ref:O=>{O&&(O.indeterminate=ge&&!Mt)},onChange:Un}),"Select all (",h.length,")"]}),h.some(O=>O.name.toLowerCase().endsWith(".woff2"))&&y("label",{css:Q.selectAllLabel,children:[r("input",{type:"checkbox",css:Q.selectAllCheckbox,checked:h.filter(O=>O.name.toLowerCase().endsWith(".woff2")).every(O=>S.has(O.path)),onChange:pn}),"WOFF2"]}),h.some(O=>O.name.toLowerCase().endsWith(".ttf"))&&y("label",{css:Q.selectAllLabel,children:[r("input",{type:"checkbox",css:Q.selectAllCheckbox,checked:h.filter(O=>O.name.toLowerCase().endsWith(".ttf")).every(O=>S.has(O.path)),onChange:Mn}),"TTF"]})]}),y("div",{css:Q.grid,children:[!Pt&&y("div",{css:Q.item,onClick:lt,onDoubleClick:lt,children:[r("div",{css:Q.itemContent,children:r(Y2,{})}),y("div",{css:Q.label,children:[r("p",{css:Q.labelName,children:".."}),r("p",{css:Q.labelMeta,children:"Parent folder"})]})]}),Vt.map(O=>{const Be=S.has(O.path);return y("div",{className:"studio-item",css:[Q.item,Be&&Q.itemSelected,"",""],onClick:ze=>tn(O,ze),onDoubleClick:()=>Ft(O),children:[r("div",{css:Q.checkboxWrapper,onClick:ze=>{ze.stopPropagation(),tn(O,ze)},children:r("input",{type:"checkbox",css:Q.checkbox,checked:Be,onChange:()=>{}})}),y("div",{css:Q.itemContent,children:[O.type==="file"&&r("button",{css:[Q.copyBtn,Yt===O.path&&Q.copyBtnVisible,"",""],onClick:ze=>bn(O.path,ze),title:Yt===O.path?"Copied!":"Copy path",children:Yt===O.path?r(Op,{}):r(_p,{})}),r("button",{css:Q.openBtn,onClick:ze=>{ze.stopPropagation(),Ft(O)},children:"Open"}),O.type==="folder"?r(Bp,{}):r(G2,{})]}),y("div",{css:Q.label,children:[r("p",{css:Q.labelName,children:y("span",{css:Q.badgeWrapper,children:[O.type==="folder"&&ie[O.path]&&r("span",{css:[Q.badge,ie[O.path].assignments.length>0?Q.badgeGreen:ie[O.path].hasWoff2?Q.badgeYellow:Q.badgeGray,"",""],title:ie[O.path].assignments.length>0?`Assigned to: ${ie[O.path].assignments.join(", ")}`:ie[O.path].hasWoff2?"woff2 ready":"TTF only"}),O.name]})}),r("p",{css:Q.labelMeta,children:O.type==="folder"?`${O.fileCount||0} files`:O.size?Rp(O.size):""})]})]},O.path)})]})]}):y(Pe,{children:[h.length>0&&y("div",{css:Q.selectAllRow,children:[y("label",{css:Q.selectAllLabel,children:[r("input",{type:"checkbox",css:Q.selectAllCheckbox,checked:Mt,ref:O=>{O&&(O.indeterminate=ge&&!Mt)},onChange:Un}),"Select all (",h.length,")"]}),h.some(O=>O.name.toLowerCase().endsWith(".woff2"))&&y("label",{css:Q.selectAllLabel,children:[r("input",{type:"checkbox",css:Q.selectAllCheckbox,checked:h.filter(O=>O.name.toLowerCase().endsWith(".woff2")).every(O=>S.has(O.path)),onChange:pn}),"WOFF2"]}),h.some(O=>O.name.toLowerCase().endsWith(".ttf"))&&y("label",{css:Q.selectAllLabel,children:[r("input",{type:"checkbox",css:Q.selectAllCheckbox,checked:h.filter(O=>O.name.toLowerCase().endsWith(".ttf")).every(O=>S.has(O.path)),onChange:Mn}),"TTF"]})]}),r("div",{css:Q.tableWrapper,children:y("table",{css:Q.table,children:[r("thead",{children:y("tr",{children:[r("th",{css:[Q.th,Q.thCheckbox,"",""],children:h.length>0&&r("input",{type:"checkbox",css:Q.checkbox,checked:Mt,ref:O=>{O&&(O.indeterminate=ge&&!Mt)},onChange:Un})}),r("th",{css:Q.th,children:"Name"}),r("th",{css:[Q.th,Q.thSize,"",""],children:"Size"})]})}),y("tbody",{children:[!Pt&&y("tr",{css:Q.parentRow,onClick:lt,children:[r("td",{css:Q.td}),r("td",{css:Q.td,children:y("div",{css:Q.nameCell,children:[r("svg",{css:Q.parentIconSmall,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:Q.name,children:".."})]})}),r("td",{css:[Q.td,Q.meta,"",""],children:"Parent folder"})]}),Vt.map(O=>{const Be=S.has(O.path);return y("tr",{css:[Q.row,Be&&Q.rowSelected,"",""],onClick:ze=>tn(O,ze),children:[r("td",{css:[Q.td,Q.checkboxCell,"",""],onClick:ze=>ze.stopPropagation(),children:r("input",{type:"checkbox",css:Q.checkbox,checked:Be,onChange:()=>tn(O,{})})}),r("td",{css:Q.td,children:y("div",{css:Q.nameCell,children:[O.type==="folder"?r("div",{css:Q.folderIconWrapper,children:r("svg",{css:Q.folderIconSmall,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("div",{css:Q.fileIconWrapper,children:r("svg",{css:Q.fileIconSmall,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"})})}),y("span",{css:Q.badgeWrapper,children:[O.type==="folder"&&ie[O.path]&&r("span",{css:[Q.badge,ie[O.path].assignments.length>0?Q.badgeGreen:ie[O.path].hasWoff2?Q.badgeYellow:Q.badgeGray,"",""],title:ie[O.path].assignments.length>0?`Assigned to: ${ie[O.path].assignments.join(", ")}`:ie[O.path].hasWoff2?"woff2 ready":"TTF only"}),r("span",{css:Q.name,title:O.name,children:O.name})]}),y("div",{css:Q.actionsCell,children:[O.type==="file"&&r("button",{css:Q.listCopyBtn,onClick:ze=>bn(O.path,ze),title:Yt===O.path?"Copied!":"Copy path",children:Yt===O.path?r(Op,{}):r(_p,{})}),r("button",{css:Q.listOpenBtn,onClick:ze=>{ze.stopPropagation(),Ft(O)},children:"Open"})]})]})}),r("td",{css:[Q.td,Q.meta,"",""],children:O.type==="folder"?`${O.fileCount||0} files`:O.size?Rp(O.size):"--"})]},O.path)})]})]})})]})]}),ae&&r(Al,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:El,onCancel:()=>le(!1)}),U&&Oe&&r(Al,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:ct,defaultValue:ct,confirmLabel:"Rename",onConfirm:ra,onCancel:()=>X(!1)}),W&&ke&&r(Al,{title:"Rename File",message:"Enter a new name for the file:",placeholder:St,defaultValue:St,confirmLabel:"Rename",onConfirm:Zn,onCancel:()=>V(!1)}),he&&r(bo,{title:"Delete Items",message:`Are you sure you want to delete ${S.size} item${S.size!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:sa,onCancel:()=>F(!1)}),q&&r(O2,{currentPath:i,onClose:()=>se(!1),onUploadComplete:()=>{se(!1),d()},setShowProgress:J,setProgressTitle:w,setProgress:Te}),pe&&Dn&&r(M2,{folderPath:ce?Oe:void 0,selectedFiles:Pn?at:void 0,onConfirm:Ea,onCancel:()=>fe(!1)}),A&&r(rl,{title:Fe,progress:ee,onClose:La,onStop:yt}),re&&r(E2,{onClose:()=>Ae(!1),onRefresh:d}),H&&r(Vr,{title:H.title,message:H.message,onClose:()=>ne(null)})]})}function H2(){return r("svg",{css:Q.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}function U2(){return r("svg",{css:Q.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 j2(){return r("svg",{css:Q.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 N2(){return r("svg",{css:Q.btnIcon,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 q2(){return r("svg",{css:Q.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 _p(){return r("svg",{css:Q.copyBtnIcon,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"})})}function Op(){return r("svg",{css:Q.copyBtnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}function Bp(){return r("svg",{css:Q.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 Y2(){return r("svg",{css:Q.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 G2(){return r("svg",{css:Q.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"})})}function X2({spinning:i}){return r("svg",{css:[Q.btnIcon,i&&Q.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 V2(){return r("svg",{css:Q.btnIcon,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 F2(){return r("svg",{css:Q.btnIcon,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 Q2(){return r("svg",{css:Q.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16M4 18h7"})})}function K2(){return y("svg",{css:Q.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})}const Z2="36px",At={container:g(Ta," display:flex;flex-direction:column;height:100%;background:",s.background,";",""),header:g("display:flex;align-items:center;justify-content:space-between;padding:12px 24px;background:",s.surface,";border-bottom:1px solid ",s.border,";position:relative;",""),titleDropdown:{name:"bjn8wh",styles:"position:relative"},titleButton:g("display:flex;align-items:center;gap:6px;font-size:19px!important;font-weight:600;color:",s.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:",s.surfaceHover,";}",""),titleChevron:g("width:18px;height:18px;color:",s.textSecondary,";transition:transform 0.15s ease;margin-top:2px;stroke-width:2.5;",""),titleChevronOpen:{name:"21xn5r",styles:"transform:rotate(180deg)"},dropdownMenu:g("position:absolute;top:calc(100% + 8px);left:0;background:",s.surface,";border:1px solid ",s.border,";border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);padding:4px;z-index:100;",""),dropdownItem:g("display:flex;align-items:center;gap:8px;width:100%;padding:10px 12px;background:transparent;border:none;border-radius:6px;white-space:nowrap;position:relative;top:1px;font-size:19px!important;font-weight:600;letter-spacing:-0.02em;color:",s.text,";cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover{background:",s.surfaceHover,";}",""),dropdownItemActive:g("&::after{content:'';display:inline-block;width:8px;height:8px;background:",s.primary,";border-radius:50%;position:relative;top:1px;}",""),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:g("display:flex;align-items:center;gap:6px;font-size:",N.base,";color:",s.textSecondary,";overflow:hidden;",""),breadcrumbSeparator:g("color:",s.border,";flex-shrink:0;",""),breadcrumbItem:g("color:",s.textSecondary,";text-decoration:none;cursor:pointer;transition:color 0.15s ease;white-space:nowrap;font-weight:500;&:hover{color:",s.primary,";}",""),breadcrumbCurrent:g("color:",s.text,";font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),headerIconBtn:g("display:flex;align-items:center;justify-content:center;width:32px;height:32px;color:",s.textMuted,";background:transparent;border:none;border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{color:",s.text,";background:",s.surface,";}",""),headerActions:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},headerBtn:g("height:",Z2,";padding:0 12px;background:",s.surface,";border:1px solid ",s.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",s.surfaceHover,";border-color:",s.borderHover,";}",""),headerIcon:g("width:16px;height:16px;color:",s.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:g("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",s.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:g("display:flex;flex-direction:column;align-items:center;gap:12px;color:",s.primary,";font-size:",N.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"}};function $2({onClose:i,isVisible:c=!0,standaloneMode:f=!1,workspacePath:d,siteUrl:h}){const m=i||(()=>{}),[x,M]=v.useState("public"),[S,b]=v.useState(new Set),[T,z]=v.useState(null),[R,Y]=v.useState("grid"),[U,X]=v.useState(null),[W,V]=v.useState(null),[ae,le]=v.useState(!1),[he,F]=v.useState(0),[te,P]=v.useState(!1),[oe,B]=v.useState(""),[q,se]=v.useState(null),[pe,fe]=v.useState([]),[re,Ae]=v.useState(!1),[A,J]=v.useState(()=>{if(typeof window<"u"){const $=window.location.hash.slice(1);if($==="fonts")return"fonts";if($==="media")return"media"}return"media"}),[ee,Te]=v.useState(!1),Fe=v.useRef(null);v.useEffect(()=>{const $=()=>{const ce=window.location.hash.slice(1);ce==="fonts"?J("fonts"):ce==="media"&&J("media")};return window.addEventListener("hashchange",$),()=>window.removeEventListener("hashchange",$)},[]);const[w,H]=v.useState("_fonts"),[ne,ie]=v.useState(0),Me=v.useCallback(()=>{F($=>$+1)},[]),[Le,Xe]=v.useState(null),pt=v.useCallback($=>{Xe({path:$,key:Date.now()})},[]);v.useEffect(()=>{if(U&&pe.length>0){const $=pe.find(ce=>ce.path===U.path);$&&JSON.stringify($)!==JSON.stringify(U)&&X($)}},[pe,U]);const je=v.useCallback(()=>{P(!0)},[]),Yt=v.useCallback(()=>{P(!1)},[]),Ze=v.useCallback(($,ce)=>{se({title:$,message:ce})},[]),et=v.useCallback(()=>{se(null)},[]),yt=v.useCallback($=>{$.preventDefault(),$.stopPropagation(),Ae(!0)},[]),Rt=v.useCallback($=>{$.preventDefault(),$.stopPropagation(),Ae(!1)},[]),Ut=v.useCallback(()=>{if(x==="public")return;const $=x.split("/");$.pop(),M($.join("/")||"public"),b(new Set)},[x]),Vt=v.useCallback($=>{M($),b(new Set),X(null)},[]),Pt=v.useCallback($=>{b(ce=>{const Oe=new Set(ce);return Oe.has($)?Oe.delete($):Oe.add($),Oe}),z($)},[]),tn=v.useCallback(($,ce,Oe)=>{const ct=Oe.findIndex(at=>at.path===$),Ne=Oe.findIndex(at=>at.path===ce);if(ct===-1||Ne===-1)return;const ke=Math.min(ct,Ne),St=Math.max(ct,Ne);b(at=>{const Pn=new Set(at);for(let Dn=ke;Dn<=St;Dn++)Pn.add(Oe[Dn].path);return Pn}),z(ce)},[]),Ft=v.useCallback($=>{b(new Set($.map(ce=>ce.path)))},[]),lt=v.useCallback(()=>{b(new Set)},[]),Mt=v.useCallback($=>{X($)},[]),ge=w2({triggerRefresh:Me,clearSelection:lt,setFocusedItem:Mt,showError:Ze}),Un=v.useCallback(async $=>{$.preventDefault(),$.stopPropagation(),Ae(!1);const ce=Array.from($.dataTransfer.files);ce.length!==0&&(x==="public/images"||x.startsWith("public/images/")||ge.uploadFiles(ce,x))},[x,ge]),_t=v.useCallback($=>{if($.key==="Escape"){const ce=$.target;if(ce.tagName==="INPUT"||ce.tagName==="TEXTAREA")return;U?X(null):f||m()}},[m,U,f]);v.useEffect(()=>(c&&(document.addEventListener("keydown",_t),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",_t),document.body.style.overflow=""}),[_t,c]),v.useEffect(()=>{const $=ce=>{Fe.current&&!Fe.current.contains(ce.target)&&Te(!1)};return ee&&document.addEventListener("mousedown",$),()=>{document.removeEventListener("mousedown",$)}},[ee]);const pn=v.useCallback(()=>{Te($=>!$)},[]),Mn=v.useCallback($=>{J($),Te(!1),window.location.hash=$},[]),bn=v.useCallback(()=>{ie($=>$+1)},[]),yn={isOpen:!0,openStudio:()=>{},closeStudio:m,toggleStudio:m,currentPath:x,setCurrentPath:Vt,navigateUp:Ut,selectedItems:S,toggleSelection:Pt,selectRange:tn,selectAll:Ft,clearSelection:lt,lastSelectedPath:T,viewMode:R,setViewMode:Y,focusedItem:U,setFocusedItem:X,meta:W,setMeta:V,isLoading:ae,setIsLoading:le,refreshKey:he,triggerRefresh:Me,editedImageKey:Le,setEditedImageKey:pt,scanRequested:te,triggerScan:je,clearScanRequest:Yt,searchQuery:oe,setSearchQuery:B,error:q,showError:Ze,clearError:et,fileItems:pe,setFileItems:fe,actionState:ge.actionState,requestDelete:ge.requestDelete,requestMove:ge.requestMove,requestSync:ge.requestSync,requestDownload:ge.requestDownload,requestProcess:ge.requestProcess,setProcessMode:ge.setProcessMode,confirmDelete:ge.confirmDelete,confirmMove:ge.confirmMove,confirmSync:ge.confirmSync,confirmProcess:ge.confirmProcess,cancelAction:ge.cancelAction,closeProgress:ge.closeProgress,stopProcessing:ge.stopProcessing,deleteOrphans:ge.deleteOrphans};return r(Kp.Provider,{value:yn,children:y("div",{css:At.container,children:[y("div",{css:At.header,children:[r("div",{css:At.headerLeft,children:y("div",{css:At.titleDropdown,ref:Fe,children:[y("button",{css:At.titleButton,onClick:pn,children:[r("span",{children:"gallop.studio"}),r(nb,{isOpen:ee})]}),ee&&y("div",{css:At.dropdownMenu,children:[r("button",{css:[At.dropdownItem,A==="media"&&At.dropdownItemActive,"",""],onClick:()=>Mn("media"),children:"media & files"}),r("button",{css:[At.dropdownItem,A==="fonts"&&At.dropdownItemActive,"",""],onClick:()=>Mn("fonts"),children:"fonts"})]})]})}),r("div",{css:At.headerCenter,children:r(P2,{currentPath:A==="fonts"?w:x,onNavigate:A==="fonts"?H:Vt,projectName:d?d.split("/").pop():void 0})}),y("div",{css:At.headerActions,children:[h&&r("a",{href:h,target:"_blank",rel:"noopener noreferrer",css:At.headerIconBtn,title:`Open ${h}`,children:r(eb,{})}),!f&&r("button",{css:At.headerBtn,onClick:m,"aria-label":"Close Studio",children:r(tb,{})})]})]}),A==="media"?y(Pe,{children:[r(E1,{}),y("div",{css:At.content,onDragOver:yt,onDragLeave:Rt,onDrop:Un,children:[re&&r("div",{css:At.dropOverlay,children:y("div",{css:At.dropMessage,children:[r("svg",{css:At.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:At.fileBrowser,children:R==="grid"?r(J1,{}):r(n2,{})})]}),U&&r(v2,{}),r(S2,{}),ge.actionState.showDeleteConfirm&&r(bo,{title:"Delete Files",message:`Are you sure you want to delete ${ge.actionState.actionPaths.length} item${ge.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:ge.confirmDelete,onCancel:ge.cancelAction}),ge.actionState.showSyncConfirm&&r(bo,{title:"Push to CDN",message:`Push ${ge.actionState.syncImageCount} image${ge.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${ge.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${ge.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:ge.confirmSync,onCancel:ge.cancelAction}),ge.actionState.showProcessConfirm&&r(I2,{imageCount:ge.actionState.actionPaths.length,mode:ge.actionState.processMode,onConfirm:ge.confirmProcess,onCancel:ge.cancelAction}),ge.actionState.showMoveModal&&r(Zp,{selectedItems:new Set(ge.actionState.actionPaths),currentPath:x,onMove:$=>ge.confirmMove($),onCancel:ge.cancelAction}),ge.actionState.showProgress&&r(rl,{title:ge.actionState.progressTitle,progress:ge.actionState.progressState,onStop:ge.stopProcessing,onDeleteOrphans:ge.deleteOrphans,onClose:ge.closeProgress})]}):r(B2,{currentPath:w,setCurrentPath:H,refreshKey:ne,triggerRefresh:bn})]})})}var W2={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},J2={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 I2({imageCount:i,mode:c,onConfirm:f,onCancel:d}){const h={overlay:J2,container:g("background:",s.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:g("font-size:",N.lg,";font-weight:600;color:",s.text,";margin:0 0 16px;",""),message:g("font-size:",N.base,";color:",s.textSecondary,";margin:0 0 20px;line-height:1.5;",""),actions:W2,cancelBtn:g("padding:10px 20px;border:1px solid ",s.border,";border-radius:8px;background:",s.background,";color:",s.text,";font-size:",N.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",s.surfaceHover,";border-color:",s.borderHover,";}",""),confirmBtn:g("padding:10px 20px;border:none;border-radius:8px;background:",s.primary,";color:white;font-size:",N.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",s.primaryHover,";}",""),confirmBtnDanger:g("background:",s.danger,";&:hover{background:#dc2626;}","")},m=c==="remove",x=m?"Remove Thumbnails":"Generate Thumbnails",M=m?`Remove generated thumbnails for ${i} image${i!==1?"s":""}? Original images will be kept.`:`Generate thumbnails for ${i} image${i!==1?"s":""}?`,S=m?"Remove":"Generate";return r("div",{css:h.overlay,onClick:d,children:y("div",{css:h.container,onClick:b=>b.stopPropagation(),children:[r("h2",{css:h.title,children:x}),r("p",{css:h.message,children:M}),y("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:S})]})]})})}function P2({currentPath:i,onNavigate:c,projectName:f}){const d=i.split("/").filter(Boolean),h=d.map((m,x)=>{let M=m;return x===0&&(m==="public"&&f?M=f:m==="_fonts"&&(M="fonts")),{name:M,path:d.slice(0,x+1).join("/")}});return r("div",{css:At.breadcrumbs,children:h.map((m,x)=>y("span",{style:{display:"flex",alignItems:"center",gap:6},children:[x>0&&r("span",{css:At.breadcrumbSeparator,children:"/"}),x===h.length-1?r("span",{css:At.breadcrumbCurrent,children:m.name}):r("span",{css:At.breadcrumbItem,onClick:()=>c(m.path),children:m.name})]},m.path))})}function eb(){return y("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 tb(){return y("svg",{css:At.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 nb({isOpen:i}){return r("svg",{css:[At.titleChevron,i&&At.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 Ip=document.getElementById("root");if(!Ip)throw new Error("Root element not found");const ab=window.__STUDIO_WORKSPACE__||"Unknown",lb=window.__STUDIO_SITE_URL__||"";f1.createRoot(Ip).render(r(v.StrictMode,{children:r("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:r($2,{isVisible:!0,standaloneMode:!0,workspacePath:ab,siteUrl:lb})})}));