@gallop.software/studio 2.3.118 → 2.3.120
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,92 @@
|
|
|
1
|
+
function Wm(o,r){for(var f=0;f<r.length;f++){const u=r[f];if(typeof u!="string"&&!Array.isArray(u)){for(const h in u)if(h!=="default"&&!(h in o)){const m=Object.getOwnPropertyDescriptor(u,h);m&&Object.defineProperty(o,h,m.get?m:{enumerable:!0,get:()=>u[h]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))u(h);new MutationObserver(h=>{for(const m of h)if(m.type==="childList")for(const S of m.addedNodes)S.tagName==="LINK"&&S.rel==="modulepreload"&&u(S)}).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 u(h){if(h.ep)return;h.ep=!0;const m=f(h);fetch(h.href,m)}})();function Im(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Zc={exports:{}},Fi={};var Ph;function Pm(){if(Ph)return Fi;Ph=1;var o=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function f(u,h,m){var S=null;if(m!==void 0&&(S=""+m),h.key!==void 0&&(S=""+h.key),"key"in h){m={};for(var A in h)A!=="key"&&(m[A]=h[A])}else m=h;return h=m.ref,{$$typeof:o,type:u,key:S,ref:h!==void 0?h:null,props:m}}return Fi.Fragment=r,Fi.jsx=f,Fi.jsxs=f,Fi}var ep;function eg(){return ep||(ep=1,Zc.exports=Pm()),Zc.exports}var eo=eg(),Jc={exports:{}},Ue={};var tp;function tg(){if(tp)return Ue;tp=1;var o=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),S=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),q=Symbol.iterator;function Y(x){return x===null||typeof x!="object"?null:(x=q&&x[q]||x["@@iterator"],typeof x=="function"?x:null)}var H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},X=Object.assign,ee={};function Z(x,L,W){this.props=x,this.context=L,this.refs=ee,this.updater=W||H}Z.prototype.isReactComponent={},Z.prototype.setState=function(x,L){if(typeof x!="object"&&typeof x!="function"&&x!=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,x,L,"setState")},Z.prototype.forceUpdate=function(x){this.updater.enqueueForceUpdate(this,x,"forceUpdate")};function re(){}re.prototype=Z.prototype;function P(x,L,W){this.props=x,this.context=L,this.refs=ee,this.updater=W||H}var me=P.prototype=new re;me.constructor=P,X(me,Z.prototype),me.isPureReactComponent=!0;var N=Array.isArray;function oe(){}var V={H:null,A:null,T:null,S:null},ie=Object.prototype.hasOwnProperty;function U(x,L,W){var ae=W.ref;return{$$typeof:o,type:x,key:L,ref:ae!==void 0?ae:null,props:W}}function ne(x,L){return U(x.type,L,x.props)}function I(x){return typeof x=="object"&&x!==null&&x.$$typeof===o}function de(x){var L={"=":"=0",":":"=2"};return"$"+x.replace(/[=:]/g,function(W){return L[W]})}var $=/\/+/g;function Se(x,L){return typeof x=="object"&&x!==null&&x.key!=null?de(""+x.key):L.toString(36)}function Ye(x){switch(x.status){case"fulfilled":return x.value;case"rejected":throw x.reason;default:switch(typeof x.status=="string"?x.then(oe,oe):(x.status="pending",x.then(function(L){x.status==="pending"&&(x.status="fulfilled",x.value=L)},function(L){x.status==="pending"&&(x.status="rejected",x.reason=L)})),x.status){case"fulfilled":return x.value;case"rejected":throw x.reason}}throw x}function _(x,L,W,ae,be){var Te=typeof x;(Te==="undefined"||Te==="boolean")&&(x=null);var Ne=!1;if(x===null)Ne=!0;else switch(Te){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(x.$$typeof){case o:case r:Ne=!0;break;case R:return Ne=x._init,_(Ne(x._payload),L,W,ae,be)}}if(Ne)return be=be(x),Ne=ae===""?"."+Se(x,0):ae,N(be)?(W="",Ne!=null&&(W=Ne.replace($,"$&/")+"/"),_(be,L,W,"",function($t){return $t})):be!=null&&(I(be)&&(be=ne(be,W+(be.key==null||x&&x.key===be.key?"":(""+be.key).replace($,"$&/")+"/")+Ne)),L.push(be)),1;Ne=0;var gt=ae===""?".":ae+":";if(N(x))for(var Oe=0;Oe<x.length;Oe++)ae=x[Oe],Te=gt+Se(ae,Oe),Ne+=_(ae,L,W,Te,be);else if(Oe=Y(x),typeof Oe=="function")for(x=Oe.call(x),Oe=0;!(ae=x.next()).done;)ae=ae.value,Te=gt+Se(ae,Oe++),Ne+=_(ae,L,W,Te,be);else if(Te==="object"){if(typeof x.then=="function")return _(Ye(x),L,W,ae,be);throw L=String(x),Error("Objects are not valid as a React child (found: "+(L==="[object Object]"?"object with keys {"+Object.keys(x).join(", ")+"}":L)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function Q(x,L,W){if(x==null)return x;var ae=[],be=0;return _(x,ae,"","",function(Te){return L.call(W,Te,be++)}),ae}function F(x){if(x._status===-1){var L=x._result;L=L(),L.then(function(W){(x._status===0||x._status===-1)&&(x._status=1,x._result=W)},function(W){(x._status===0||x._status===-1)&&(x._status=2,x._result=W)}),x._status===-1&&(x._status=0,x._result=L)}if(x._status===1)return x._result.default;throw x._result}var Re=typeof reportError=="function"?reportError:function(x){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var L=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof x=="object"&&x!==null&&typeof x.message=="string"?String(x.message):String(x),error:x});if(!window.dispatchEvent(L))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",x);return}console.error(x)},Ge={map:Q,forEach:function(x,L,W){Q(x,function(){L.apply(this,arguments)},W)},count:function(x){var L=0;return Q(x,function(){L++}),L},toArray:function(x){return Q(x,function(L){return L})||[]},only:function(x){if(!I(x))throw Error("React.Children.only expected to receive a single React element child.");return x}};return Ue.Activity=M,Ue.Children=Ge,Ue.Component=Z,Ue.Fragment=f,Ue.Profiler=h,Ue.PureComponent=P,Ue.StrictMode=u,Ue.Suspense=C,Ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=V,Ue.__COMPILER_RUNTIME={__proto__:null,c:function(x){return V.H.useMemoCache(x)}},Ue.cache=function(x){return function(){return x.apply(null,arguments)}},Ue.cacheSignal=function(){return null},Ue.cloneElement=function(x,L,W){if(x==null)throw Error("The argument must be a React element, but you passed "+x+".");var ae=X({},x.props),be=x.key;if(L!=null)for(Te in L.key!==void 0&&(be=""+L.key),L)!ie.call(L,Te)||Te==="key"||Te==="__self"||Te==="__source"||Te==="ref"&&L.ref===void 0||(ae[Te]=L[Te]);var Te=arguments.length-2;if(Te===1)ae.children=W;else if(1<Te){for(var Ne=Array(Te),gt=0;gt<Te;gt++)Ne[gt]=arguments[gt+2];ae.children=Ne}return U(x.type,be,ae)},Ue.createContext=function(x){return x={$$typeof:S,_currentValue:x,_currentValue2:x,_threadCount:0,Provider:null,Consumer:null},x.Provider=x,x.Consumer={$$typeof:m,_context:x},x},Ue.createElement=function(x,L,W){var ae,be={},Te=null;if(L!=null)for(ae in L.key!==void 0&&(Te=""+L.key),L)ie.call(L,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(be[ae]=L[ae]);var Ne=arguments.length-2;if(Ne===1)be.children=W;else if(1<Ne){for(var gt=Array(Ne),Oe=0;Oe<Ne;Oe++)gt[Oe]=arguments[Oe+2];be.children=gt}if(x&&x.defaultProps)for(ae in Ne=x.defaultProps,Ne)be[ae]===void 0&&(be[ae]=Ne[ae]);return U(x,Te,be)},Ue.createRef=function(){return{current:null}},Ue.forwardRef=function(x){return{$$typeof:A,render:x}},Ue.isValidElement=I,Ue.lazy=function(x){return{$$typeof:R,_payload:{_status:-1,_result:x},_init:F}},Ue.memo=function(x,L){return{$$typeof:g,type:x,compare:L===void 0?null:L}},Ue.startTransition=function(x){var L=V.T,W={};V.T=W;try{var ae=x(),be=V.S;be!==null&&be(W,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(oe,Re)}catch(Te){Re(Te)}finally{L!==null&&W.types!==null&&(L.types=W.types),V.T=L}},Ue.unstable_useCacheRefresh=function(){return V.H.useCacheRefresh()},Ue.use=function(x){return V.H.use(x)},Ue.useActionState=function(x,L,W){return V.H.useActionState(x,L,W)},Ue.useCallback=function(x,L){return V.H.useCallback(x,L)},Ue.useContext=function(x){return V.H.useContext(x)},Ue.useDebugValue=function(){},Ue.useDeferredValue=function(x,L){return V.H.useDeferredValue(x,L)},Ue.useEffect=function(x,L){return V.H.useEffect(x,L)},Ue.useEffectEvent=function(x){return V.H.useEffectEvent(x)},Ue.useId=function(){return V.H.useId()},Ue.useImperativeHandle=function(x,L,W){return V.H.useImperativeHandle(x,L,W)},Ue.useInsertionEffect=function(x,L){return V.H.useInsertionEffect(x,L)},Ue.useLayoutEffect=function(x,L){return V.H.useLayoutEffect(x,L)},Ue.useMemo=function(x,L){return V.H.useMemo(x,L)},Ue.useOptimistic=function(x,L){return V.H.useOptimistic(x,L)},Ue.useReducer=function(x,L,W){return V.H.useReducer(x,L,W)},Ue.useRef=function(x){return V.H.useRef(x)},Ue.useState=function(x){return V.H.useState(x)},Ue.useSyncExternalStore=function(x,L,W){return V.H.useSyncExternalStore(x,L,W)},Ue.useTransition=function(){return V.H.useTransition()},Ue.version="19.2.4",Ue}var np;function ou(){return np||(np=1,Jc.exports=tg()),Jc.exports}var w=ou();const it=Im(w),ap=Wm({__proto__:null,default:it},[w]);function ng(o){if(o.sheet)return o.sheet;for(var r=0;r<document.styleSheets.length;r++)if(document.styleSheets[r].ownerNode===o)return document.styleSheets[r]}function ag(o){var r=document.createElement("style");return r.setAttribute("data-emotion",o.key),o.nonce!==void 0&&r.setAttribute("nonce",o.nonce),r.appendChild(document.createTextNode("")),r.setAttribute("data-s",""),r}var lg=(function(){function o(f){var u=this;this._insertTag=function(h){var m;u.tags.length===0?u.insertionPoint?m=u.insertionPoint.nextSibling:u.prepend?m=u.container.firstChild:m=u.before:m=u.tags[u.tags.length-1].nextSibling,u.container.insertBefore(h,m),u.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 r=o.prototype;return r.hydrate=function(u){u.forEach(this._insertTag)},r.insert=function(u){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(ag(this));var h=this.tags[this.tags.length-1];if(this.isSpeedy){var m=ng(h);try{m.insertRule(u,m.cssRules.length)}catch{}}else h.appendChild(document.createTextNode(u));this.ctr++},r.flush=function(){this.tags.forEach(function(u){var h;return(h=u.parentNode)==null?void 0:h.removeChild(u)}),this.tags=[],this.ctr=0},o})(),Ft="-ms-",Tr="-moz-",nt="-webkit-",Mp="comm",ru="rule",su="decl",ig="@import",kp="@keyframes",og="@layer",rg=Math.abs,Rr=String.fromCharCode,sg=Object.assign;function cg(o,r){return Zt(o,0)^45?(((r<<2^Zt(o,0))<<2^Zt(o,1))<<2^Zt(o,2))<<2^Zt(o,3):0}function Dp(o){return o.trim()}function ug(o,r){return(o=r.exec(o))?o[0]:o}function at(o,r,f){return o.replace(r,f)}function au(o,r){return o.indexOf(r)}function Zt(o,r){return o.charCodeAt(r)|0}function to(o,r,f){return o.slice(r,f)}function Gn(o){return o.length}function cu(o){return o.length}function zr(o,r){return r.push(o),o}function dg(o,r){return o.map(r).join("")}var _r=1,Wl=1,Ep=0,un=0,Ht=0,Pl="";function Or(o,r,f,u,h,m,S){return{value:o,root:r,parent:f,type:u,props:h,children:m,line:_r,column:Wl,length:S,return:""}}function $i(o,r){return sg(Or("",null,null,"",null,null,0),o,{length:-o.length},r)}function fg(){return Ht}function hg(){return Ht=un>0?Zt(Pl,--un):0,Wl--,Ht===10&&(Wl=1,_r--),Ht}function xn(){return Ht=un<Ep?Zt(Pl,un++):0,Wl++,Ht===10&&(Wl=1,_r++),Ht}function Vn(){return Zt(Pl,un)}function Mr(){return un}function lo(o,r){return to(Pl,o,r)}function no(o){switch(o){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Tp(o){return _r=Wl=1,Ep=Gn(Pl=o),un=0,[]}function Ap(o){return Pl="",o}function kr(o){return Dp(lo(un-1,lu(o===91?o+2:o===40?o+1:o)))}function pg(o){for(;(Ht=Vn())&&Ht<33;)xn();return no(o)>2||no(Ht)>3?"":" "}function mg(o,r){for(;--r&&xn()&&!(Ht<48||Ht>102||Ht>57&&Ht<65||Ht>70&&Ht<97););return lo(o,Mr()+(r<6&&Vn()==32&&xn()==32))}function lu(o){for(;xn();)switch(Ht){case o:return un;case 34:case 39:o!==34&&o!==39&&lu(Ht);break;case 40:o===41&&lu(o);break;case 92:xn();break}return un}function gg(o,r){for(;xn()&&o+Ht!==57;)if(o+Ht===84&&Vn()===47)break;return"/*"+lo(r,un-1)+"*"+Rr(o===47?o:xn())}function yg(o){for(;!no(Vn());)xn();return lo(o,un)}function bg(o){return Ap(Dr("",null,null,null,[""],o=Tp(o),0,[0],o))}function Dr(o,r,f,u,h,m,S,A,C){for(var g=0,R=0,M=S,q=0,Y=0,H=0,X=1,ee=1,Z=1,re=0,P="",me=h,N=m,oe=u,V=P;ee;)switch(H=re,re=xn()){case 40:if(H!=108&&Zt(V,M-1)==58){au(V+=at(kr(re),"&","&\f"),"&\f")!=-1&&(Z=-1);break}case 34:case 39:case 91:V+=kr(re);break;case 9:case 10:case 13:case 32:V+=pg(H);break;case 92:V+=mg(Mr()-1,7);continue;case 47:switch(Vn()){case 42:case 47:zr(vg(gg(xn(),Mr()),r,f),C);break;default:V+="/"}break;case 123*X:A[g++]=Gn(V)*Z;case 125*X:case 59:case 0:switch(re){case 0:case 125:ee=0;case 59+R:Z==-1&&(V=at(V,/\f/g,"")),Y>0&&Gn(V)-M&&zr(Y>32?ip(V+";",u,f,M-1):ip(at(V," ","")+";",u,f,M-2),C);break;case 59:V+=";";default:if(zr(oe=lp(V,r,f,g,R,h,A,P,me=[],N=[],M),m),re===123)if(R===0)Dr(V,r,oe,oe,me,m,M,A,N);else switch(q===99&&Zt(V,3)===110?100:q){case 100:case 108:case 109:case 115:Dr(o,oe,oe,u&&zr(lp(o,oe,oe,0,0,h,A,P,h,me=[],M),N),h,N,M,A,u?me:N);break;default:Dr(V,oe,oe,oe,[""],N,0,A,N)}}g=R=Y=0,X=Z=1,P=V="",M=S;break;case 58:M=1+Gn(V),Y=H;default:if(X<1){if(re==123)--X;else if(re==125&&X++==0&&hg()==125)continue}switch(V+=Rr(re),re*X){case 38:Z=R>0?1:(V+="\f",-1);break;case 44:A[g++]=(Gn(V)-1)*Z,Z=1;break;case 64:Vn()===45&&(V+=kr(xn())),q=Vn(),R=M=Gn(P=V+=yg(Mr())),re++;break;case 45:H===45&&Gn(V)==2&&(X=0)}}return m}function lp(o,r,f,u,h,m,S,A,C,g,R){for(var M=h-1,q=h===0?m:[""],Y=cu(q),H=0,X=0,ee=0;H<u;++H)for(var Z=0,re=to(o,M+1,M=rg(X=S[H])),P=o;Z<Y;++Z)(P=Dp(X>0?q[Z]+" "+re:at(re,/&\f/g,q[Z])))&&(C[ee++]=P);return Or(o,r,f,h===0?ru:A,C,g,R)}function vg(o,r,f){return Or(o,r,f,Mp,Rr(fg()),to(o,2,-2),0)}function ip(o,r,f,u){return Or(o,r,f,su,to(o,0,u),to(o,u+1,-1),u)}function $l(o,r){for(var f="",u=cu(o),h=0;h<u;h++)f+=r(o[h],h,o,r)||"";return f}function xg(o,r,f,u){switch(o.type){case og:if(o.children.length)break;case ig:case su:return o.return=o.return||o.value;case Mp:return"";case kp:return o.return=o.value+"{"+$l(o.children,u)+"}";case ru:o.value=o.props.join(",")}return Gn(f=$l(o.children,u))?o.return=o.value+"{"+f+"}":""}function Sg(o){var r=cu(o);return function(f,u,h,m){for(var S="",A=0;A<r;A++)S+=o[A](f,u,h,m)||"";return S}}function Cg(o){return function(r){r.root||(r=r.return)&&o(r)}}function wg(o){var r=Object.create(null);return function(f){return r[f]===void 0&&(r[f]=o(f)),r[f]}}var zg=function(r,f,u){for(var h=0,m=0;h=m,m=Vn(),h===38&&m===12&&(f[u]=1),!no(m);)xn();return lo(r,un)},Mg=function(r,f){var u=-1,h=44;do switch(no(h)){case 0:h===38&&Vn()===12&&(f[u]=1),r[u]+=zg(un-1,f,u);break;case 2:r[u]+=kr(h);break;case 4:if(h===44){r[++u]=Vn()===58?"&\f":"",f[u]=r[u].length;break}default:r[u]+=Rr(h)}while(h=xn());return r},kg=function(r,f){return Ap(Mg(Tp(r),f))},op=new WeakMap,Dg=function(r){if(!(r.type!=="rule"||!r.parent||r.length<1)){for(var f=r.value,u=r.parent,h=r.column===u.column&&r.line===u.line;u.type!=="rule";)if(u=u.parent,!u)return;if(!(r.props.length===1&&f.charCodeAt(0)!==58&&!op.get(u))&&!h){op.set(r,!0);for(var m=[],S=kg(f,m),A=u.props,C=0,g=0;C<S.length;C++)for(var R=0;R<A.length;R++,g++)r.props[g]=m[C]?S[C].replace(/&\f/g,A[R]):A[R]+" "+S[C]}}},Eg=function(r){if(r.type==="decl"){var f=r.value;f.charCodeAt(0)===108&&f.charCodeAt(2)===98&&(r.return="",r.value="")}};function Rp(o,r){switch(cg(o,r)){case 5103:return nt+"print-"+o+o;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return nt+o+o;case 5349:case 4246:case 4810:case 6968:case 2756:return nt+o+Tr+o+Ft+o+o;case 6828:case 4268:return nt+o+Ft+o+o;case 6165:return nt+o+Ft+"flex-"+o+o;case 5187:return nt+o+at(o,/(\w+).+(:[^]+)/,nt+"box-$1$2"+Ft+"flex-$1$2")+o;case 5443:return nt+o+Ft+"flex-item-"+at(o,/flex-|-self/,"")+o;case 4675:return nt+o+Ft+"flex-line-pack"+at(o,/align-content|flex-|-self/,"")+o;case 5548:return nt+o+Ft+at(o,"shrink","negative")+o;case 5292:return nt+o+Ft+at(o,"basis","preferred-size")+o;case 6060:return nt+"box-"+at(o,"-grow","")+nt+o+Ft+at(o,"grow","positive")+o;case 4554:return nt+at(o,/([^-])(transform)/g,"$1"+nt+"$2")+o;case 6187:return at(at(at(o,/(zoom-|grab)/,nt+"$1"),/(image-set)/,nt+"$1"),o,"")+o;case 5495:case 3959:return at(o,/(image-set\([^]*)/,nt+"$1$`$1");case 4968:return at(at(o,/(.+:)(flex-)?(.*)/,nt+"box-pack:$3"+Ft+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+nt+o+o;case 4095:case 3583:case 4068:case 2532:return at(o,/(.+)-inline(.+)/,nt+"$1$2")+o;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Gn(o)-1-r>6)switch(Zt(o,r+1)){case 109:if(Zt(o,r+4)!==45)break;case 102:return at(o,/(.+:)(.+)-([^]+)/,"$1"+nt+"$2-$3$1"+Tr+(Zt(o,r+3)==108?"$3":"$2-$3"))+o;case 115:return~au(o,"stretch")?Rp(at(o,"stretch","fill-available"),r)+o:o}break;case 4949:if(Zt(o,r+1)!==115)break;case 6444:switch(Zt(o,Gn(o)-3-(~au(o,"!important")&&10))){case 107:return at(o,":",":"+nt)+o;case 101:return at(o,/(.+:)([^;!]+)(;|!.+)?/,"$1"+nt+(Zt(o,14)===45?"inline-":"")+"box$3$1"+nt+"$2$3$1"+Ft+"$2box$3")+o}break;case 5936:switch(Zt(o,r+11)){case 114:return nt+o+Ft+at(o,/[svh]\w+-[tblr]{2}/,"tb")+o;case 108:return nt+o+Ft+at(o,/[svh]\w+-[tblr]{2}/,"tb-rl")+o;case 45:return nt+o+Ft+at(o,/[svh]\w+-[tblr]{2}/,"lr")+o}return nt+o+Ft+o+o}return o}var Tg=function(r,f,u,h){if(r.length>-1&&!r.return)switch(r.type){case su:r.return=Rp(r.value,r.length);break;case kp:return $l([$i(r,{value:at(r.value,"@","@"+nt)})],h);case ru:if(r.length)return dg(r.props,function(m){switch(ug(m,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return $l([$i(r,{props:[at(m,/:(read-\w+)/,":"+Tr+"$1")]})],h);case"::placeholder":return $l([$i(r,{props:[at(m,/:(plac\w+)/,":"+nt+"input-$1")]}),$i(r,{props:[at(m,/:(plac\w+)/,":"+Tr+"$1")]}),$i(r,{props:[at(m,/:(plac\w+)/,Ft+"input-$1")]})],h)}return""})}},Ag=[Tg],Rg=function(r){var f=r.key;if(f==="css"){var u=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(u,function(X){var ee=X.getAttribute("data-emotion");ee.indexOf(" ")!==-1&&(document.head.appendChild(X),X.setAttribute("data-s",""))})}var h=r.stylisPlugins||Ag,m={},S,A=[];S=r.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+f+' "]'),function(X){for(var ee=X.getAttribute("data-emotion").split(" "),Z=1;Z<ee.length;Z++)m[ee[Z]]=!0;A.push(X)});var C,g=[Dg,Eg];{var R,M=[xg,Cg(function(X){R.insert(X)})],q=Sg(g.concat(h,M)),Y=function(ee){return $l(bg(ee),q)};C=function(ee,Z,re,P){R=re,Y(ee?ee+"{"+Z.styles+"}":Z.styles),P&&(H.inserted[Z.name]=!0)}}var H={key:f,sheet:new lg({key:f,container:S,nonce:r.nonce,speedy:r.speedy,prepend:r.prepend,insertionPoint:r.insertionPoint}),nonce:r.nonce,inserted:m,registered:{},insert:C};return H.sheet.hydrate(A),H},Fc={exports:{}},lt={};var rp;function _g(){if(rp)return lt;rp=1;var o=typeof Symbol=="function"&&Symbol.for,r=o?Symbol.for("react.element"):60103,f=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,h=o?Symbol.for("react.strict_mode"):60108,m=o?Symbol.for("react.profiler"):60114,S=o?Symbol.for("react.provider"):60109,A=o?Symbol.for("react.context"):60110,C=o?Symbol.for("react.async_mode"):60111,g=o?Symbol.for("react.concurrent_mode"):60111,R=o?Symbol.for("react.forward_ref"):60112,M=o?Symbol.for("react.suspense"):60113,q=o?Symbol.for("react.suspense_list"):60120,Y=o?Symbol.for("react.memo"):60115,H=o?Symbol.for("react.lazy"):60116,X=o?Symbol.for("react.block"):60121,ee=o?Symbol.for("react.fundamental"):60117,Z=o?Symbol.for("react.responder"):60118,re=o?Symbol.for("react.scope"):60119;function P(N){if(typeof N=="object"&&N!==null){var oe=N.$$typeof;switch(oe){case r:switch(N=N.type,N){case C:case g:case u:case m:case h:case M:return N;default:switch(N=N&&N.$$typeof,N){case A:case R:case H:case Y:case S:return N;default:return oe}}case f:return oe}}}function me(N){return P(N)===g}return lt.AsyncMode=C,lt.ConcurrentMode=g,lt.ContextConsumer=A,lt.ContextProvider=S,lt.Element=r,lt.ForwardRef=R,lt.Fragment=u,lt.Lazy=H,lt.Memo=Y,lt.Portal=f,lt.Profiler=m,lt.StrictMode=h,lt.Suspense=M,lt.isAsyncMode=function(N){return me(N)||P(N)===C},lt.isConcurrentMode=me,lt.isContextConsumer=function(N){return P(N)===A},lt.isContextProvider=function(N){return P(N)===S},lt.isElement=function(N){return typeof N=="object"&&N!==null&&N.$$typeof===r},lt.isForwardRef=function(N){return P(N)===R},lt.isFragment=function(N){return P(N)===u},lt.isLazy=function(N){return P(N)===H},lt.isMemo=function(N){return P(N)===Y},lt.isPortal=function(N){return P(N)===f},lt.isProfiler=function(N){return P(N)===m},lt.isStrictMode=function(N){return P(N)===h},lt.isSuspense=function(N){return P(N)===M},lt.isValidElementType=function(N){return typeof N=="string"||typeof N=="function"||N===u||N===g||N===m||N===h||N===M||N===q||typeof N=="object"&&N!==null&&(N.$$typeof===H||N.$$typeof===Y||N.$$typeof===S||N.$$typeof===A||N.$$typeof===R||N.$$typeof===ee||N.$$typeof===Z||N.$$typeof===re||N.$$typeof===X)},lt.typeOf=P,lt}var sp;function Og(){return sp||(sp=1,Fc.exports=_g()),Fc.exports}var $c,cp;function Lg(){if(cp)return $c;cp=1;var o=Og(),r={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},u={$$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[o.ForwardRef]=u,m[o.Memo]=h;function S(H){return o.isMemo(H)?h:m[H.$$typeof]||r}var A=Object.defineProperty,C=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,R=Object.getOwnPropertyDescriptor,M=Object.getPrototypeOf,q=Object.prototype;function Y(H,X,ee){if(typeof X!="string"){if(q){var Z=M(X);Z&&Z!==q&&Y(H,Z,ee)}var re=C(X);g&&(re=re.concat(g(X)));for(var P=S(H),me=S(X),N=0;N<re.length;++N){var oe=re[N];if(!f[oe]&&!(ee&&ee[oe])&&!(me&&me[oe])&&!(P&&P[oe])){var V=R(X,oe);try{A(H,oe,V)}catch{}}}}return H}return $c=Y,$c}Lg();var Ug=!0;function Hg(o,r,f){var u="";return f.split(" ").forEach(function(h){o[h]!==void 0?r.push(o[h]+";"):h&&(u+=h+" ")}),u}var _p=function(r,f,u){var h=r.key+"-"+f.name;(u===!1||Ug===!1)&&r.registered[h]===void 0&&(r.registered[h]=f.styles)},Bg=function(r,f,u){_p(r,f,u);var h=r.key+"-"+f.name;if(r.inserted[f.name]===void 0){var m=f;do r.insert(f===m?"."+h:"",m,r.sheet,!0),m=m.next;while(m!==void 0)}};function Ng(o){for(var r=0,f,u=0,h=o.length;h>=4;++u,h-=4)f=o.charCodeAt(u)&255|(o.charCodeAt(++u)&255)<<8|(o.charCodeAt(++u)&255)<<16|(o.charCodeAt(++u)&255)<<24,f=(f&65535)*1540483477+((f>>>16)*59797<<16),f^=f>>>24,r=(f&65535)*1540483477+((f>>>16)*59797<<16)^(r&65535)*1540483477+((r>>>16)*59797<<16);switch(h){case 3:r^=(o.charCodeAt(u+2)&255)<<16;case 2:r^=(o.charCodeAt(u+1)&255)<<8;case 1:r^=o.charCodeAt(u)&255,r=(r&65535)*1540483477+((r>>>16)*59797<<16)}return r^=r>>>13,r=(r&65535)*1540483477+((r>>>16)*59797<<16),((r^r>>>15)>>>0).toString(36)}var jg={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},qg=/[A-Z]|^ms/g,Yg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Op=function(r){return r.charCodeAt(1)===45},up=function(r){return r!=null&&typeof r!="boolean"},Wc=wg(function(o){return Op(o)?o:o.replace(qg,"-$&").toLowerCase()}),dp=function(r,f){switch(r){case"animation":case"animationName":if(typeof f=="string")return f.replace(Yg,function(u,h,m){return Xn={name:h,styles:m,next:Xn},h})}return jg[r]!==1&&!Op(r)&&typeof f=="number"&&f!==0?f+"px":f};function ao(o,r,f){if(f==null)return"";var u=f;if(u.__emotion_styles!==void 0)return u;switch(typeof f){case"boolean":return"";case"object":{var h=f;if(h.anim===1)return Xn={name:h.name,styles:h.styles,next:Xn},h.name;var m=f;if(m.styles!==void 0){var S=m.next;if(S!==void 0)for(;S!==void 0;)Xn={name:S.name,styles:S.styles,next:Xn},S=S.next;var A=m.styles+";";return A}return Gg(o,r,f)}case"function":{if(o!==void 0){var C=Xn,g=f(o);return Xn=C,ao(o,r,g)}break}}var R=f;return R}function Gg(o,r,f){var u="";if(Array.isArray(f))for(var h=0;h<f.length;h++)u+=ao(o,r,f[h])+";";else for(var m in f){var S=f[m];if(typeof S!="object"){var A=S;up(A)&&(u+=Wc(m)+":"+dp(m,A)+";")}else if(Array.isArray(S)&&typeof S[0]=="string"&&r==null)for(var C=0;C<S.length;C++)up(S[C])&&(u+=Wc(m)+":"+dp(m,S[C])+";");else{var g=ao(o,r,S);switch(m){case"animation":case"animationName":{u+=Wc(m)+":"+g+";";break}default:u+=m+"{"+g+"}"}}}return u}var fp=/label:\s*([^\s;{]+)\s*(;|$)/g,Xn;function Lp(o,r,f){if(o.length===1&&typeof o[0]=="object"&&o[0]!==null&&o[0].styles!==void 0)return o[0];var u=!0,h="";Xn=void 0;var m=o[0];if(m==null||m.raw===void 0)u=!1,h+=ao(f,r,m);else{var S=m;h+=S[0]}for(var A=1;A<o.length;A++)if(h+=ao(f,r,o[A]),u){var C=m;h+=C[A]}fp.lastIndex=0;for(var g="",R;(R=fp.exec(h))!==null;)g+="-"+R[1];var M=Ng(h)+g;return{name:M,styles:h,next:Xn}}var Xg=function(r){return r()},Vg=ap.useInsertionEffect?ap.useInsertionEffect:!1,Qg=Vg||Xg,Up=w.createContext(typeof HTMLElement<"u"?Rg({key:"css"}):null);Up.Provider;var Kg=function(r){return w.forwardRef(function(f,u){var h=w.useContext(Up);return r(f,h,u)})},Zg=w.createContext({}),io={}.hasOwnProperty,iu="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",uu=function(r,f){var u={};for(var h in f)io.call(f,h)&&(u[h]=f[h]);return u[iu]=r,u},Jg=function(r){var f=r.cache,u=r.serialized,h=r.isStringTag;return _p(f,u,h),Qg(function(){return Bg(f,u,h)}),null},Fg=Kg(function(o,r,f){var u=o.css;typeof u=="string"&&r.registered[u]!==void 0&&(u=r.registered[u]);var h=o[iu],m=[u],S="";typeof o.className=="string"?S=Hg(r.registered,m,o.className):o.className!=null&&(S=o.className+" ");var A=Lp(m,void 0,w.useContext(Zg));S+=r.key+"-"+A.name;var C={};for(var g in o)io.call(o,g)&&g!=="css"&&g!==iu&&(C[g]=o[g]);return C.className=S,f&&(C.ref=f),w.createElement(w.Fragment,null,w.createElement(Jg,{cache:r,serialized:A,isStringTag:typeof h=="string"}),w.createElement(h,C))}),du=Fg,ht=eo.Fragment,s=function(r,f,u){return io.call(f,"css")?eo.jsx(du,uu(r,f),u):eo.jsx(r,f,u)},b=function(r,f,u){return io.call(f,"css")?eo.jsxs(du,uu(r,f),u):eo.jsxs(r,f,u)},Ic={exports:{}},Wi={},Pc={exports:{}},eu={};var hp;function $g(){return hp||(hp=1,(function(o){function r(_,Q){var F=_.length;_.push(Q);e:for(;0<F;){var Re=F-1>>>1,Ge=_[Re];if(0<h(Ge,Q))_[Re]=Q,_[F]=Ge,F=Re;else break e}}function f(_){return _.length===0?null:_[0]}function u(_){if(_.length===0)return null;var Q=_[0],F=_.pop();if(F!==Q){_[0]=F;e:for(var Re=0,Ge=_.length,x=Ge>>>1;Re<x;){var L=2*(Re+1)-1,W=_[L],ae=L+1,be=_[ae];if(0>h(W,F))ae<Ge&&0>h(be,W)?(_[Re]=be,_[ae]=F,Re=ae):(_[Re]=W,_[L]=F,Re=L);else if(ae<Ge&&0>h(be,F))_[Re]=be,_[ae]=F,Re=ae;else break e}}return Q}function h(_,Q){var F=_.sortIndex-Q.sortIndex;return F!==0?F:_.id-Q.id}if(o.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;o.unstable_now=function(){return m.now()}}else{var S=Date,A=S.now();o.unstable_now=function(){return S.now()-A}}var C=[],g=[],R=1,M=null,q=3,Y=!1,H=!1,X=!1,ee=!1,Z=typeof setTimeout=="function"?setTimeout:null,re=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function me(_){for(var Q=f(g);Q!==null;){if(Q.callback===null)u(g);else if(Q.startTime<=_)u(g),Q.sortIndex=Q.expirationTime,r(C,Q);else break;Q=f(g)}}function N(_){if(X=!1,me(_),!H)if(f(C)!==null)H=!0,oe||(oe=!0,de());else{var Q=f(g);Q!==null&&Ye(N,Q.startTime-_)}}var oe=!1,V=-1,ie=5,U=-1;function ne(){return ee?!0:!(o.unstable_now()-U<ie)}function I(){if(ee=!1,oe){var _=o.unstable_now();U=_;var Q=!0;try{e:{H=!1,X&&(X=!1,re(V),V=-1),Y=!0;var F=q;try{t:{for(me(_),M=f(C);M!==null&&!(M.expirationTime>_&&ne());){var Re=M.callback;if(typeof Re=="function"){M.callback=null,q=M.priorityLevel;var Ge=Re(M.expirationTime<=_);if(_=o.unstable_now(),typeof Ge=="function"){M.callback=Ge,me(_),Q=!0;break t}M===f(C)&&u(C),me(_)}else u(C);M=f(C)}if(M!==null)Q=!0;else{var x=f(g);x!==null&&Ye(N,x.startTime-_),Q=!1}}break e}finally{M=null,q=F,Y=!1}Q=void 0}}finally{Q?de():oe=!1}}}var de;if(typeof P=="function")de=function(){P(I)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,Se=$.port2;$.port1.onmessage=I,de=function(){Se.postMessage(null)}}else de=function(){Z(I,0)};function Ye(_,Q){V=Z(function(){_(o.unstable_now())},Q)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(_){_.callback=null},o.unstable_forceFrameRate=function(_){0>_||125<_?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ie=0<_?Math.floor(1e3/_):5},o.unstable_getCurrentPriorityLevel=function(){return q},o.unstable_next=function(_){switch(q){case 1:case 2:case 3:var Q=3;break;default:Q=q}var F=q;q=Q;try{return _()}finally{q=F}},o.unstable_requestPaint=function(){ee=!0},o.unstable_runWithPriority=function(_,Q){switch(_){case 1:case 2:case 3:case 4:case 5:break;default:_=3}var F=q;q=_;try{return Q()}finally{q=F}},o.unstable_scheduleCallback=function(_,Q,F){var Re=o.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?Re+F:Re):F=Re,_){case 1:var Ge=-1;break;case 2:Ge=250;break;case 5:Ge=1073741823;break;case 4:Ge=1e4;break;default:Ge=5e3}return Ge=F+Ge,_={id:R++,callback:Q,priorityLevel:_,startTime:F,expirationTime:Ge,sortIndex:-1},F>Re?(_.sortIndex=F,r(g,_),f(C)===null&&_===f(g)&&(X?(re(V),V=-1):X=!0,Ye(N,F-Re))):(_.sortIndex=Ge,r(C,_),H||Y||(H=!0,oe||(oe=!0,de()))),_},o.unstable_shouldYield=ne,o.unstable_wrapCallback=function(_){var Q=q;return function(){var F=q;q=Q;try{return _.apply(this,arguments)}finally{q=F}}}})(eu)),eu}var pp;function Wg(){return pp||(pp=1,Pc.exports=$g()),Pc.exports}var tu={exports:{}},Jt={};var mp;function Ig(){if(mp)return Jt;mp=1;var o=ou();function r(C){var g="https://react.dev/errors/"+C;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var R=2;R<arguments.length;R++)g+="&args[]="+encodeURIComponent(arguments[R])}return"Minified React error #"+C+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var u={d:{f,r:function(){throw Error(r(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},h=Symbol.for("react.portal");function m(C,g,R){var M=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:M==null?null:""+M,children:C,containerInfo:g,implementation:R}}var S=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function A(C,g){if(C==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return Jt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Jt.createPortal=function(C,g){var R=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(r(299));return m(C,g,null,R)},Jt.flushSync=function(C){var g=S.T,R=u.p;try{if(S.T=null,u.p=2,C)return C()}finally{S.T=g,u.p=R,u.d.f()}},Jt.preconnect=function(C,g){typeof C=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,u.d.C(C,g))},Jt.prefetchDNS=function(C){typeof C=="string"&&u.d.D(C)},Jt.preinit=function(C,g){if(typeof C=="string"&&g&&typeof g.as=="string"){var R=g.as,M=A(R,g.crossOrigin),q=typeof g.integrity=="string"?g.integrity:void 0,Y=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;R==="style"?u.d.S(C,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:M,integrity:q,fetchPriority:Y}):R==="script"&&u.d.X(C,{crossOrigin:M,integrity:q,fetchPriority:Y,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},Jt.preinitModule=function(C,g){if(typeof C=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var R=A(g.as,g.crossOrigin);u.d.M(C,{crossOrigin:R,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&u.d.M(C)},Jt.preload=function(C,g){if(typeof C=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var R=g.as,M=A(R,g.crossOrigin);u.d.L(C,R,{crossOrigin:M,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},Jt.preloadModule=function(C,g){if(typeof C=="string")if(g){var R=A(g.as,g.crossOrigin);u.d.m(C,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:R,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else u.d.m(C)},Jt.requestFormReset=function(C){u.d.r(C)},Jt.unstable_batchedUpdates=function(C,g){return C(g)},Jt.useFormState=function(C,g,R){return S.H.useFormState(C,g,R)},Jt.useFormStatus=function(){return S.H.useHostTransitionStatus()},Jt.version="19.2.4",Jt}var gp;function Pg(){if(gp)return tu.exports;gp=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(r){console.error(r)}}return o(),tu.exports=Ig(),tu.exports}var yp;function e1(){if(yp)return Wi;yp=1;var o=Wg(),r=ou(),f=Pg();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function 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 S(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 A(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function C(e){if(m(e)!==e)throw Error(u(188))}function g(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,a=t;;){var l=n.return;if(l===null)break;var i=l.alternate;if(i===null){if(a=l.return,a!==null){n=a;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===n)return C(l),e;if(i===a)return C(l),t;i=i.sibling}throw Error(u(188))}if(n.return!==a.return)n=l,a=i;else{for(var c=!1,p=l.child;p;){if(p===n){c=!0,n=l,a=i;break}if(p===a){c=!0,a=l,n=i;break}p=p.sibling}if(!c){for(p=i.child;p;){if(p===n){c=!0,n=i,a=l;break}if(p===a){c=!0,a=i,n=l;break}p=p.sibling}if(!c)throw Error(u(189))}}if(n.alternate!==a)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function R(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=R(e),t!==null)return t;e=e.sibling}return null}var M=Object.assign,q=Symbol.for("react.element"),Y=Symbol.for("react.transitional.element"),H=Symbol.for("react.portal"),X=Symbol.for("react.fragment"),ee=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),re=Symbol.for("react.consumer"),P=Symbol.for("react.context"),me=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),oe=Symbol.for("react.suspense_list"),V=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),ne=Symbol.for("react.memo_cache_sentinel"),I=Symbol.iterator;function de(e){return e===null||typeof e!="object"?null:(e=I&&e[I]||e["@@iterator"],typeof e=="function"?e:null)}var $=Symbol.for("react.client.reference");function Se(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===$?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case X:return"Fragment";case Z:return"Profiler";case ee:return"StrictMode";case N:return"Suspense";case oe:return"SuspenseList";case U:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case H:return"Portal";case P:return e.displayName||"Context";case re:return(e._context.displayName||"Context")+".Consumer";case me:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case V:return t=e.displayName||null,t!==null?t:Se(e.type)||"Memo";case ie:t=e._payload,e=e._init;try{return Se(e(t))}catch{}}return null}var Ye=Array.isArray,_=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},Re=[],Ge=-1;function x(e){return{current:e}}function L(e){0>Ge||(e.current=Re[Ge],Re[Ge]=null,Ge--)}function W(e,t){Ge++,Re[Ge]=e.current,e.current=t}var ae=x(null),be=x(null),Te=x(null),Ne=x(null);function gt(e,t){switch(W(Te,t),W(be,e),W(ae,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ch(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ch(t),e=wh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}L(ae),W(ae,e)}function Oe(){L(ae),L(be),L(Te)}function $t(e){e.memoizedState!==null&&W(Ne,e);var t=ae.current,n=wh(t,e.type);t!==n&&(W(be,e),W(ae,n))}function ot(e){be.current===e&&(L(ae),L(be)),Ne.current===e&&(L(Ne),Qi._currentValue=F)}var pt,jt;function ge(e){if(pt===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);pt=t&&t[1]||"",jt=-1<n.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+pt+e+jt}var Dt=!1;function Wt(e,t){if(!e||Dt)return"";Dt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var G=function(){throw Error()};if(Object.defineProperty(G.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(G,[])}catch(O){var T=O}Reflect.construct(e,[],G)}else{try{G.call()}catch(O){T=O}e.call(G.prototype)}}else{try{throw Error()}catch(O){T=O}(G=e())&&typeof G.catch=="function"&&G.catch(function(){})}}catch(O){if(O&&T&&typeof O.stack=="string")return[O.stack,T.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 i=a.DetermineComponentFrameRoot(),c=i[0],p=i[1];if(c&&p){var v=c.split(`
|
|
4
|
+
`),E=p.split(`
|
|
5
|
+
`);for(l=a=0;a<v.length&&!v[a].includes("DetermineComponentFrameRoot");)a++;for(;l<E.length&&!E[l].includes("DetermineComponentFrameRoot");)l++;if(a===v.length||l===E.length)for(a=v.length-1,l=E.length-1;1<=a&&0<=l&&v[a]!==E[l];)l--;for(;1<=a&&0<=l;a--,l--)if(v[a]!==E[l]){if(a!==1||l!==1)do if(a--,l--,0>l||v[a]!==E[l]){var B=`
|
|
6
|
+
`+v[a].replace(" at new "," at ");return e.displayName&&B.includes("<anonymous>")&&(B=B.replace("<anonymous>",e.displayName)),B}while(1<=a&&0<=l);break}}}finally{Dt=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?ge(n):""}function Ce(e,t){switch(e.tag){case 26:case 27:case 5:return ge(e.type);case 16:return ge("Lazy");case 13:return e.child!==t&&t!==null?ge("Suspense Fallback"):ge("Suspense");case 19:return ge("SuspenseList");case 0:case 15:return Wt(e.type,!1);case 11:return Wt(e.type.render,!1);case 1:return Wt(e.type,!0);case 31:return ge("Activity");default:return""}}function ct(e){try{var t="",n=null;do t+=Ce(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
|
|
7
|
+
Error generating stack: `+a.message+`
|
|
8
|
+
`+a.stack}}var bt=Object.prototype.hasOwnProperty,Fe=o.unstable_scheduleCallback,xe=o.unstable_cancelCallback,we=o.unstable_shouldYield,et=o.unstable_requestPaint,He=o.unstable_now,Xe=o.unstable_getCurrentPriorityLevel,je=o.unstable_ImmediatePriority,Bt=o.unstable_UserBlockingPriority,nn=o.unstable_NormalPriority,ti=o.unstable_LowPriority,Rt=o.unstable_IdlePriority,Ya=o.log,Lr=o.unstable_setDisableYieldValue,Qn=null,It=null;function Rn(e){if(typeof Ya=="function"&&Lr(e),It&&typeof It.setStrictMode=="function")try{It.setStrictMode(Qn,e)}catch{}}var Pt=Math.clz32?Math.clz32:Br,Ur=Math.log,Hr=Math.LN2;function Br(e){return e>>>=0,e===0?32:31-(Ur(e)/Hr|0)|0}var ul=256,dl=262144,Ga=4194304;function Kn(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 fl(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var l=0,i=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var p=a&134217727;return p!==0?(a=p&~i,a!==0?l=Kn(a):(c&=p,c!==0?l=Kn(c):n||(n=p&~e,n!==0&&(l=Kn(n))))):(p=a&~i,p!==0?l=Kn(p):c!==0?l=Kn(c):n||(n=a&~e,n!==0&&(l=Kn(n)))),l===0?0:t!==0&&t!==l&&(t&i)===0&&(i=l&-l,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:l}function Xa(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Nr(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 ro(){var e=Ga;return Ga<<=1,(Ga&62914560)===0&&(Ga=4194304),e}function ni(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Va(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function jr(e,t,n,a,l,i){var c=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var p=e.entanglements,v=e.expirationTimes,E=e.hiddenUpdates;for(n=c&~n;0<n;){var B=31-Pt(n),G=1<<B;p[B]=0,v[B]=-1;var T=E[B];if(T!==null)for(E[B]=null,B=0;B<T.length;B++){var O=T[B];O!==null&&(O.lane&=-536870913)}n&=~G}a!==0&&so(e,a,0),i!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=i&~(c&~t))}function so(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Pt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function co(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Pt(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function ai(e,t){var n=t&-t;return n=(n&42)!==0?1:Zn(n),(n&(e.suspendedLanes|t))!==0?0:n}function Zn(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 li(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function uo(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:Kh(e.type))}function _n(e,t){var n=Q.p;try{return Q.p=e,t()}finally{Q.p=n}}var Bn=Math.random().toString(36).slice(2),St="__reactFiber$"+Bn,Et="__reactProps$"+Bn,fn="__reactContainer$"+Bn,hl="__reactEvents$"+Bn,ha="__reactListeners$"+Bn,pa="__reactHandles$"+Bn,ii="__reactResources$"+Bn,Qa="__reactMarker$"+Bn;function oi(e){delete e[St],delete e[Et],delete e[hl],delete e[ha],delete e[pa]}function Jn(e){var t=e[St];if(t)return t;for(var n=e.parentNode;n;){if(t=n[fn]||n[St]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ah(e);e!==null;){if(n=e[St])return n;e=Ah(e)}return t}e=n,n=e.parentNode}return null}function ce(e){if(e=e[St]||e[fn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function te(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function fe(e){var t=e[ii];return t||(t=e[ii]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function he(e){e[Qa]=!0}var De=new Set,Ae={};function $e(e,t){We(e,t),We(e+"Capture",t)}function We(e,t){for(Ae[e]=t,e=0;e<t.length;e++)De.add(t[e])}var _e=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]*$"),en={},ri={};function Xp(e){return bt.call(ri,e)?!0:bt.call(en,e)?!1:_e.test(e)?ri[e]=!0:(en[e]=!0,!1)}function fo(e,t,n){if(Xp(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 ho(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 Fn(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 Sn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Vp(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,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(c){n=""+c,i.call(this,c)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(c){n=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qr(e){if(!e._valueTracker){var t=hu(e)?"checked":"value";e._valueTracker=Vp(e,t,""+e[t])}}function pu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=hu(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function po(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 Qp=/[\n"\\]/g;function Cn(e){return e.replace(Qp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Yr(e,t,n,a,l,i,c,p){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Sn(t)):e.value!==""+Sn(t)&&(e.value=""+Sn(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?Gr(e,c,Sn(t)):n!=null?Gr(e,c,Sn(n)):a!=null&&e.removeAttribute("value"),l==null&&i!=null&&(e.defaultChecked=!!i),l!=null&&(e.checked=l&&typeof l!="function"&&typeof l!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+Sn(p):e.removeAttribute("name")}function mu(e,t,n,a,l,i,c,p){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){qr(e);return}n=n!=null?""+Sn(n):"",t=t!=null?""+Sn(t):n,p||t===e.value||(e.value=t),e.defaultValue=t}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=p?e.checked:!!a,e.defaultChecked=!!a,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),qr(e)}function Gr(e,t,n){t==="number"&&po(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function pl(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=""+Sn(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 gu(e,t,n){if(t!=null&&(t=""+Sn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Sn(n):""}function yu(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(u(92));if(Ye(a)){if(1<a.length)throw Error(u(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Sn(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),qr(e)}function ml(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Kp=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 bu(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||Kp.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function vu(e,t,n){if(t!=null&&typeof t!="object")throw Error(u(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&&bu(e,l,a)}else for(var i in t)t.hasOwnProperty(i)&&bu(e,i,t[i])}function Xr(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 Zp=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"]]),Jp=/^[\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 mo(e){return Jp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function $n(){}var Vr=null;function Qr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gl=null,yl=null;function xu(e){var t=ce(e);if(t&&(e=t.stateNode)){var n=e[Et]||null;e:switch(e=t.stateNode,t.type){case"input":if(Yr(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="'+Cn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[Et]||null;if(!l)throw Error(u(90));Yr(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&&pu(a)}break e;case"textarea":gu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&pl(e,!!n.multiple,t,!1)}}}var Kr=!1;function Su(e,t,n){if(Kr)return e(t,n);Kr=!0;try{var a=e(t);return a}finally{if(Kr=!1,(gl!==null||yl!==null)&&(nr(),gl&&(t=gl,e=yl,yl=gl=null,xu(t),e)))for(t=0;t<e.length;t++)xu(e[t])}}function si(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Et]||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(u(231,t,typeof n));return n}var Wn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zr=!1;if(Wn)try{var ci={};Object.defineProperty(ci,"passive",{get:function(){Zr=!0}}),window.addEventListener("test",ci,ci),window.removeEventListener("test",ci,ci)}catch{Zr=!1}var ma=null,Jr=null,go=null;function Cu(){if(go)return go;var e,t=Jr,n=t.length,a,l="value"in ma?ma.value:ma.textContent,i=l.length;for(e=0;e<n&&t[e]===l[e];e++);var c=n-e;for(a=1;a<=c&&t[n-a]===l[i-a];a++);return go=l.slice(e,1<a?1-a:void 0)}function yo(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 bo(){return!0}function wu(){return!1}function an(e){function t(n,a,l,i,c){this._reactName=n,this._targetInst=l,this.type=a,this.nativeEvent=i,this.target=c,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(n=e[p],this[p]=n?n(i):i[p]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?bo:wu,this.isPropagationStopped=wu,this}return M(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=bo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=bo)},persist:function(){},isPersistent:bo}),t}var Ka={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vo=an(Ka),ui=M({},Ka,{view:0,detail:0}),Fp=an(ui),Fr,$r,di,xo=M({},ui,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ir,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!==di&&(di&&e.type==="mousemove"?(Fr=e.screenX-di.screenX,$r=e.screenY-di.screenY):$r=Fr=0,di=e),Fr)},movementY:function(e){return"movementY"in e?e.movementY:$r}}),zu=an(xo),$p=M({},xo,{dataTransfer:0}),Wp=an($p),Ip=M({},ui,{relatedTarget:0}),Wr=an(Ip),Pp=M({},Ka,{animationName:0,elapsedTime:0,pseudoElement:0}),e0=an(Pp),t0=M({},Ka,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),n0=an(t0),a0=M({},Ka,{data:0}),Mu=an(a0),l0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i0={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"},o0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function r0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=o0[e])?!!t[e]:!1}function Ir(){return r0}var s0=M({},ui,{key:function(e){if(e.key){var t=l0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=yo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?i0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ir,charCode:function(e){return e.type==="keypress"?yo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?yo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),c0=an(s0),u0=M({},xo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),ku=an(u0),d0=M({},ui,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ir}),f0=an(d0),h0=M({},Ka,{propertyName:0,elapsedTime:0,pseudoElement:0}),p0=an(h0),m0=M({},xo,{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}),g0=an(m0),y0=M({},Ka,{newState:0,oldState:0}),b0=an(y0),v0=[9,13,27,32],Pr=Wn&&"CompositionEvent"in window,fi=null;Wn&&"documentMode"in document&&(fi=document.documentMode);var x0=Wn&&"TextEvent"in window&&!fi,Du=Wn&&(!Pr||fi&&8<fi&&11>=fi),Eu=" ",Tu=!1;function Au(e,t){switch(e){case"keyup":return v0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ru(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var bl=!1;function S0(e,t){switch(e){case"compositionend":return Ru(t);case"keypress":return t.which!==32?null:(Tu=!0,Eu);case"textInput":return e=t.data,e===Eu&&Tu?null:e;default:return null}}function C0(e,t){if(bl)return e==="compositionend"||!Pr&&Au(e,t)?(e=Cu(),go=Jr=ma=null,bl=!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 Du&&t.locale!=="ko"?null:t.data;default:return null}}var w0={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 _u(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!w0[e.type]:t==="textarea"}function Ou(e,t,n,a){gl?yl?yl.push(a):yl=[a]:gl=a,t=cr(t,"onChange"),0<t.length&&(n=new vo("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var hi=null,pi=null;function z0(e){gh(e,0)}function So(e){var t=te(e);if(pu(t))return e}function Lu(e,t){if(e==="change")return t}var Uu=!1;if(Wn){var es;if(Wn){var ts="oninput"in document;if(!ts){var Hu=document.createElement("div");Hu.setAttribute("oninput","return;"),ts=typeof Hu.oninput=="function"}es=ts}else es=!1;Uu=es&&(!document.documentMode||9<document.documentMode)}function Bu(){hi&&(hi.detachEvent("onpropertychange",Nu),pi=hi=null)}function Nu(e){if(e.propertyName==="value"&&So(pi)){var t=[];Ou(t,pi,e,Qr(e)),Su(z0,t)}}function M0(e,t,n){e==="focusin"?(Bu(),hi=t,pi=n,hi.attachEvent("onpropertychange",Nu)):e==="focusout"&&Bu()}function k0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return So(pi)}function D0(e,t){if(e==="click")return So(t)}function E0(e,t){if(e==="input"||e==="change")return So(t)}function T0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var hn=typeof Object.is=="function"?Object.is:T0;function mi(e,t){if(hn(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(!bt.call(t,l)||!hn(e[l],t[l]))return!1}return!0}function ju(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qu(e,t){var n=ju(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=ju(n)}}function Yu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=po(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=po(e.document)}return t}function ns(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 A0=Wn&&"documentMode"in document&&11>=document.documentMode,vl=null,as=null,gi=null,ls=!1;function Xu(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ls||vl==null||vl!==po(a)||(a=vl,"selectionStart"in a&&ns(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}),gi&&mi(gi,a)||(gi=a,a=cr(as,"onSelect"),0<a.length&&(t=new vo("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=vl)))}function Za(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var xl={animationend:Za("Animation","AnimationEnd"),animationiteration:Za("Animation","AnimationIteration"),animationstart:Za("Animation","AnimationStart"),transitionrun:Za("Transition","TransitionRun"),transitionstart:Za("Transition","TransitionStart"),transitioncancel:Za("Transition","TransitionCancel"),transitionend:Za("Transition","TransitionEnd")},is={},Vu={};Wn&&(Vu=document.createElement("div").style,"AnimationEvent"in window||(delete xl.animationend.animation,delete xl.animationiteration.animation,delete xl.animationstart.animation),"TransitionEvent"in window||delete xl.transitionend.transition);function Ja(e){if(is[e])return is[e];if(!xl[e])return e;var t=xl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Vu)return is[e]=t[n];return e}var Qu=Ja("animationend"),Ku=Ja("animationiteration"),Zu=Ja("animationstart"),R0=Ja("transitionrun"),_0=Ja("transitionstart"),O0=Ja("transitioncancel"),Ju=Ja("transitionend"),Fu=new Map,os="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(" ");os.push("scrollEnd");function On(e,t){Fu.set(e,t),$e(t,[e])}var Co=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)},wn=[],Sl=0,rs=0;function wo(){for(var e=Sl,t=rs=Sl=0;t<e;){var n=wn[t];wn[t++]=null;var a=wn[t];wn[t++]=null;var l=wn[t];wn[t++]=null;var i=wn[t];if(wn[t++]=null,a!==null&&l!==null){var c=a.pending;c===null?l.next=l:(l.next=c.next,c.next=l),a.pending=l}i!==0&&$u(n,l,i)}}function zo(e,t,n,a){wn[Sl++]=e,wn[Sl++]=t,wn[Sl++]=n,wn[Sl++]=a,rs|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function ss(e,t,n,a){return zo(e,t,n,a),Mo(e)}function Fa(e,t){return zo(e,null,null,t),Mo(e)}function $u(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var l=!1,i=e.return;i!==null;)i.childLanes|=n,a=i.alternate,a!==null&&(a.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(l=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,l&&t!==null&&(l=31-Pt(n),e=i.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),i):null}function Mo(e){if(50<Ni)throw Ni=0,yc=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Cl={};function L0(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 pn(e,t,n,a){return new L0(e,t,n,a)}function cs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function In(e,t){var n=e.alternate;return n===null?(n=pn(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 Wu(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 ko(e,t,n,a,l,i){var c=0;if(a=e,typeof e=="function")cs(e)&&(c=1);else if(typeof e=="string")c=jm(e,n,ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case U:return e=pn(31,n,t,l),e.elementType=U,e.lanes=i,e;case X:return $a(n.children,l,i,t);case ee:c=8,l|=24;break;case Z:return e=pn(12,n,t,l|2),e.elementType=Z,e.lanes=i,e;case N:return e=pn(13,n,t,l),e.elementType=N,e.lanes=i,e;case oe:return e=pn(19,n,t,l),e.elementType=oe,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case P:c=10;break e;case re:c=9;break e;case me:c=11;break e;case V:c=14;break e;case ie:c=16,a=null;break e}c=29,n=Error(u(130,e===null?"null":typeof e,"")),a=null}return t=pn(c,n,t,l),t.elementType=e,t.type=a,t.lanes=i,t}function $a(e,t,n,a){return e=pn(7,e,a,t),e.lanes=n,e}function us(e,t,n){return e=pn(6,e,null,t),e.lanes=n,e}function Iu(e){var t=pn(18,null,null,0);return t.stateNode=e,t}function ds(e,t,n){return t=pn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Pu=new WeakMap;function zn(e,t){if(typeof e=="object"&&e!==null){var n=Pu.get(e);return n!==void 0?n:(t={value:e,source:t,stack:ct(t)},Pu.set(e,t),t)}return{value:e,source:t,stack:ct(t)}}var wl=[],zl=0,Do=null,yi=0,Mn=[],kn=0,ga=null,Nn=1,jn="";function Pn(e,t){wl[zl++]=yi,wl[zl++]=Do,Do=e,yi=t}function ed(e,t,n){Mn[kn++]=Nn,Mn[kn++]=jn,Mn[kn++]=ga,ga=e;var a=Nn;e=jn;var l=32-Pt(a)-1;a&=~(1<<l),n+=1;var i=32-Pt(t)+l;if(30<i){var c=l-l%5;i=(a&(1<<c)-1).toString(32),a>>=c,l-=c,Nn=1<<32-Pt(t)+l|n<<l|a,jn=i+e}else Nn=1<<i|n<<l|a,jn=e}function fs(e){e.return!==null&&(Pn(e,1),ed(e,1,0))}function hs(e){for(;e===Do;)Do=wl[--zl],wl[zl]=null,yi=wl[--zl],wl[zl]=null;for(;e===ga;)ga=Mn[--kn],Mn[kn]=null,jn=Mn[--kn],Mn[kn]=null,Nn=Mn[--kn],Mn[kn]=null}function td(e,t){Mn[kn++]=Nn,Mn[kn++]=jn,Mn[kn++]=ga,Nn=t.id,jn=t.overflow,ga=e}var Gt=null,vt=null,Je=!1,ya=null,Dn=!1,ps=Error(u(519));function ba(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw bi(zn(t,e)),ps}function nd(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[St]=e,t[Et]=a,n){case"dialog":Qe("cancel",t),Qe("close",t);break;case"iframe":case"object":case"embed":Qe("load",t);break;case"video":case"audio":for(n=0;n<qi.length;n++)Qe(qi[n],t);break;case"source":Qe("error",t);break;case"img":case"image":case"link":Qe("error",t),Qe("load",t);break;case"details":Qe("toggle",t);break;case"input":Qe("invalid",t),mu(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Qe("invalid",t);break;case"textarea":Qe("invalid",t),yu(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||xh(t.textContent,n)?(a.popover!=null&&(Qe("beforetoggle",t),Qe("toggle",t)),a.onScroll!=null&&Qe("scroll",t),a.onScrollEnd!=null&&Qe("scrollend",t),a.onClick!=null&&(t.onclick=$n),t=!0):t=!1,t||ba(e,!0)}function ad(e){for(Gt=e.return;Gt;)switch(Gt.tag){case 5:case 31:case 13:Dn=!1;return;case 27:case 3:Dn=!0;return;default:Gt=Gt.return}}function Ml(e){if(e!==Gt)return!1;if(!Je)return ad(e),Je=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||_c(e.type,e.memoizedProps)),n=!n),n&&vt&&ba(e),ad(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));vt=Th(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));vt=Th(e)}else t===27?(t=vt,_a(e.type)?(e=Bc,Bc=null,vt=e):vt=t):vt=Gt?Tn(e.stateNode.nextSibling):null;return!0}function Wa(){vt=Gt=null,Je=!1}function ms(){var e=ya;return e!==null&&(sn===null?sn=e:sn.push.apply(sn,e),ya=null),e}function bi(e){ya===null?ya=[e]:ya.push(e)}var gs=x(null),Ia=null,ea=null;function va(e,t,n){W(gs,t._currentValue),t._currentValue=n}function ta(e){e._currentValue=gs.current,L(gs)}function ys(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 bs(e,t,n,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var i=l.dependencies;if(i!==null){var c=l.child;i=i.firstContext;e:for(;i!==null;){var p=i;i=l;for(var v=0;v<t.length;v++)if(p.context===t[v]){i.lanes|=n,p=i.alternate,p!==null&&(p.lanes|=n),ys(i.return,n,e),a||(c=null);break e}i=p.next}}else if(l.tag===18){if(c=l.return,c===null)throw Error(u(341));c.lanes|=n,i=c.alternate,i!==null&&(i.lanes|=n),ys(c,n,e),c=null}else c=l.child;if(c!==null)c.return=l;else for(c=l;c!==null;){if(c===e){c=null;break}if(l=c.sibling,l!==null){l.return=c.return,c=l;break}c=c.return}l=c}}function kl(e,t,n,a){e=null;for(var l=t,i=!1;l!==null;){if(!i){if((l.flags&524288)!==0)i=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var c=l.alternate;if(c===null)throw Error(u(387));if(c=c.memoizedProps,c!==null){var p=l.type;hn(l.pendingProps.value,c.value)||(e!==null?e.push(p):e=[p])}}else if(l===Ne.current){if(c=l.alternate,c===null)throw Error(u(387));c.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(Qi):e=[Qi])}l=l.return}e!==null&&bs(t,e,n,a),t.flags|=262144}function Eo(e){for(e=e.firstContext;e!==null;){if(!hn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Pa(e){Ia=e,ea=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Xt(e){return ld(Ia,e)}function To(e,t){return Ia===null&&Pa(e),ld(e,t)}function ld(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ea===null){if(e===null)throw Error(u(308));ea=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ea=ea.next=t;return n}var U0=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()})}},H0=o.unstable_scheduleCallback,B0=o.unstable_NormalPriority,_t={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vs(){return{controller:new U0,data:new Map,refCount:0}}function vi(e){e.refCount--,e.refCount===0&&H0(B0,function(){e.controller.abort()})}var xi=null,xs=0,Dl=0,El=null;function N0(e,t){if(xi===null){var n=xi=[];xs=0,Dl=wc(),El={status:"pending",value:void 0,then:function(a){n.push(a)}}}return xs++,t.then(id,id),t}function id(){if(--xs===0&&xi!==null){El!==null&&(El.status="fulfilled");var e=xi;xi=null,Dl=0,El=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function j0(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 od=_.S;_.S=function(e,t){Vf=He(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&N0(e,t),od!==null&&od(e,t)};var el=x(null);function Ss(){var e=el.current;return e!==null?e:mt.pooledCache}function Ao(e,t){t===null?W(el,el.current):W(el,t.pool)}function rd(){var e=Ss();return e===null?null:{parent:_t._currentValue,pool:e}}var Tl=Error(u(460)),Cs=Error(u(474)),Ro=Error(u(542)),_o={then:function(){}};function sd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function cd(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then($n,$n),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,dd(e),e;default:if(typeof t.status=="string")t.then($n,$n);else{if(e=mt,e!==null&&100<e.shellSuspendCounter)throw Error(u(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,dd(e),e}throw nl=t,Tl}}function tl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(nl=n,Tl):n}}var nl=null;function ud(){if(nl===null)throw Error(u(459));var e=nl;return nl=null,e}function dd(e){if(e===Tl||e===Ro)throw Error(u(483))}var Al=null,Si=0;function Oo(e){var t=Si;return Si+=1,Al===null&&(Al=[]),cd(Al,e,t)}function Ci(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Lo(e,t){throw t.$$typeof===q?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function fd(e){function t(k,z){if(e){var D=k.deletions;D===null?(k.deletions=[z],k.flags|=16):D.push(z)}}function n(k,z){if(!e)return null;for(;z!==null;)t(k,z),z=z.sibling;return null}function a(k){for(var z=new Map;k!==null;)k.key!==null?z.set(k.key,k):z.set(k.index,k),k=k.sibling;return z}function l(k,z){return k=In(k,z),k.index=0,k.sibling=null,k}function i(k,z,D){return k.index=D,e?(D=k.alternate,D!==null?(D=D.index,D<z?(k.flags|=67108866,z):D):(k.flags|=67108866,z)):(k.flags|=1048576,z)}function c(k){return e&&k.alternate===null&&(k.flags|=67108866),k}function p(k,z,D,j){return z===null||z.tag!==6?(z=us(D,k.mode,j),z.return=k,z):(z=l(z,D),z.return=k,z)}function v(k,z,D,j){var ze=D.type;return ze===X?B(k,z,D.props.children,j,D.key):z!==null&&(z.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===ie&&tl(ze)===z.type)?(z=l(z,D.props),Ci(z,D),z.return=k,z):(z=ko(D.type,D.key,D.props,null,k.mode,j),Ci(z,D),z.return=k,z)}function E(k,z,D,j){return z===null||z.tag!==4||z.stateNode.containerInfo!==D.containerInfo||z.stateNode.implementation!==D.implementation?(z=ds(D,k.mode,j),z.return=k,z):(z=l(z,D.children||[]),z.return=k,z)}function B(k,z,D,j,ze){return z===null||z.tag!==7?(z=$a(D,k.mode,j,ze),z.return=k,z):(z=l(z,D),z.return=k,z)}function G(k,z,D){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=us(""+z,k.mode,D),z.return=k,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case Y:return D=ko(z.type,z.key,z.props,null,k.mode,D),Ci(D,z),D.return=k,D;case H:return z=ds(z,k.mode,D),z.return=k,z;case ie:return z=tl(z),G(k,z,D)}if(Ye(z)||de(z))return z=$a(z,k.mode,D,null),z.return=k,z;if(typeof z.then=="function")return G(k,Oo(z),D);if(z.$$typeof===P)return G(k,To(k,z),D);Lo(k,z)}return null}function T(k,z,D,j){var ze=z!==null?z.key:null;if(typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint")return ze!==null?null:p(k,z,""+D,j);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case Y:return D.key===ze?v(k,z,D,j):null;case H:return D.key===ze?E(k,z,D,j):null;case ie:return D=tl(D),T(k,z,D,j)}if(Ye(D)||de(D))return ze!==null?null:B(k,z,D,j,null);if(typeof D.then=="function")return T(k,z,Oo(D),j);if(D.$$typeof===P)return T(k,z,To(k,D),j);Lo(k,D)}return null}function O(k,z,D,j,ze){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return k=k.get(D)||null,p(z,k,""+j,ze);if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Y:return k=k.get(j.key===null?D:j.key)||null,v(z,k,j,ze);case H:return k=k.get(j.key===null?D:j.key)||null,E(z,k,j,ze);case ie:return j=tl(j),O(k,z,D,j,ze)}if(Ye(j)||de(j))return k=k.get(D)||null,B(z,k,j,ze,null);if(typeof j.then=="function")return O(k,z,D,Oo(j),ze);if(j.$$typeof===P)return O(k,z,D,To(z,j),ze);Lo(z,j)}return null}function ue(k,z,D,j){for(var ze=null,Ie=null,ye=z,qe=z=0,Ze=null;ye!==null&&qe<D.length;qe++){ye.index>qe?(Ze=ye,ye=null):Ze=ye.sibling;var Pe=T(k,ye,D[qe],j);if(Pe===null){ye===null&&(ye=Ze);break}e&&ye&&Pe.alternate===null&&t(k,ye),z=i(Pe,z,qe),Ie===null?ze=Pe:Ie.sibling=Pe,Ie=Pe,ye=Ze}if(qe===D.length)return n(k,ye),Je&&Pn(k,qe),ze;if(ye===null){for(;qe<D.length;qe++)ye=G(k,D[qe],j),ye!==null&&(z=i(ye,z,qe),Ie===null?ze=ye:Ie.sibling=ye,Ie=ye);return Je&&Pn(k,qe),ze}for(ye=a(ye);qe<D.length;qe++)Ze=O(ye,k,qe,D[qe],j),Ze!==null&&(e&&Ze.alternate!==null&&ye.delete(Ze.key===null?qe:Ze.key),z=i(Ze,z,qe),Ie===null?ze=Ze:Ie.sibling=Ze,Ie=Ze);return e&&ye.forEach(function(Ba){return t(k,Ba)}),Je&&Pn(k,qe),ze}function ke(k,z,D,j){if(D==null)throw Error(u(151));for(var ze=null,Ie=null,ye=z,qe=z=0,Ze=null,Pe=D.next();ye!==null&&!Pe.done;qe++,Pe=D.next()){ye.index>qe?(Ze=ye,ye=null):Ze=ye.sibling;var Ba=T(k,ye,Pe.value,j);if(Ba===null){ye===null&&(ye=Ze);break}e&&ye&&Ba.alternate===null&&t(k,ye),z=i(Ba,z,qe),Ie===null?ze=Ba:Ie.sibling=Ba,Ie=Ba,ye=Ze}if(Pe.done)return n(k,ye),Je&&Pn(k,qe),ze;if(ye===null){for(;!Pe.done;qe++,Pe=D.next())Pe=G(k,Pe.value,j),Pe!==null&&(z=i(Pe,z,qe),Ie===null?ze=Pe:Ie.sibling=Pe,Ie=Pe);return Je&&Pn(k,qe),ze}for(ye=a(ye);!Pe.done;qe++,Pe=D.next())Pe=O(ye,k,qe,Pe.value,j),Pe!==null&&(e&&Pe.alternate!==null&&ye.delete(Pe.key===null?qe:Pe.key),z=i(Pe,z,qe),Ie===null?ze=Pe:Ie.sibling=Pe,Ie=Pe);return e&&ye.forEach(function($m){return t(k,$m)}),Je&&Pn(k,qe),ze}function ft(k,z,D,j){if(typeof D=="object"&&D!==null&&D.type===X&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case Y:e:{for(var ze=D.key;z!==null;){if(z.key===ze){if(ze=D.type,ze===X){if(z.tag===7){n(k,z.sibling),j=l(z,D.props.children),j.return=k,k=j;break e}}else if(z.elementType===ze||typeof ze=="object"&&ze!==null&&ze.$$typeof===ie&&tl(ze)===z.type){n(k,z.sibling),j=l(z,D.props),Ci(j,D),j.return=k,k=j;break e}n(k,z);break}else t(k,z);z=z.sibling}D.type===X?(j=$a(D.props.children,k.mode,j,D.key),j.return=k,k=j):(j=ko(D.type,D.key,D.props,null,k.mode,j),Ci(j,D),j.return=k,k=j)}return c(k);case H:e:{for(ze=D.key;z!==null;){if(z.key===ze)if(z.tag===4&&z.stateNode.containerInfo===D.containerInfo&&z.stateNode.implementation===D.implementation){n(k,z.sibling),j=l(z,D.children||[]),j.return=k,k=j;break e}else{n(k,z);break}else t(k,z);z=z.sibling}j=ds(D,k.mode,j),j.return=k,k=j}return c(k);case ie:return D=tl(D),ft(k,z,D,j)}if(Ye(D))return ue(k,z,D,j);if(de(D)){if(ze=de(D),typeof ze!="function")throw Error(u(150));return D=ze.call(D),ke(k,z,D,j)}if(typeof D.then=="function")return ft(k,z,Oo(D),j);if(D.$$typeof===P)return ft(k,z,To(k,D),j);Lo(k,D)}return typeof D=="string"&&D!==""||typeof D=="number"||typeof D=="bigint"?(D=""+D,z!==null&&z.tag===6?(n(k,z.sibling),j=l(z,D),j.return=k,k=j):(n(k,z),j=us(D,k.mode,j),j.return=k,k=j),c(k)):n(k,z)}return function(k,z,D,j){try{Si=0;var ze=ft(k,z,D,j);return Al=null,ze}catch(ye){if(ye===Tl||ye===Ro)throw ye;var Ie=pn(29,ye,null,k.mode);return Ie.lanes=j,Ie.return=k,Ie}}}var al=fd(!0),hd=fd(!1),xa=!1;function ws(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zs(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 Sa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ca(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(tt&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=Mo(e),$u(e,null,n),t}return zo(e,a,t,n),Mo(e)}function wi(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,co(e,n)}}function Ms(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var c={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?l=i=c:i=i.next=c,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:i,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 ks=!1;function zi(){if(ks){var e=El;if(e!==null)throw e}}function Mi(e,t,n,a){ks=!1;var l=e.updateQueue;xa=!1;var i=l.firstBaseUpdate,c=l.lastBaseUpdate,p=l.shared.pending;if(p!==null){l.shared.pending=null;var v=p,E=v.next;v.next=null,c===null?i=E:c.next=E,c=v;var B=e.alternate;B!==null&&(B=B.updateQueue,p=B.lastBaseUpdate,p!==c&&(p===null?B.firstBaseUpdate=E:p.next=E,B.lastBaseUpdate=v))}if(i!==null){var G=l.baseState;c=0,B=E=v=null,p=i;do{var T=p.lane&-536870913,O=T!==p.lane;if(O?(Ke&T)===T:(a&T)===T){T!==0&&T===Dl&&(ks=!0),B!==null&&(B=B.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var ue=e,ke=p;T=t;var ft=n;switch(ke.tag){case 1:if(ue=ke.payload,typeof ue=="function"){G=ue.call(ft,G,T);break e}G=ue;break e;case 3:ue.flags=ue.flags&-65537|128;case 0:if(ue=ke.payload,T=typeof ue=="function"?ue.call(ft,G,T):ue,T==null)break e;G=M({},G,T);break e;case 2:xa=!0}}T=p.callback,T!==null&&(e.flags|=64,O&&(e.flags|=8192),O=l.callbacks,O===null?l.callbacks=[T]:O.push(T))}else O={lane:T,tag:p.tag,payload:p.payload,callback:p.callback,next:null},B===null?(E=B=O,v=G):B=B.next=O,c|=T;if(p=p.next,p===null){if(p=l.shared.pending,p===null)break;O=p,p=O.next,O.next=null,l.lastBaseUpdate=O,l.shared.pending=null}}while(!0);B===null&&(v=G),l.baseState=v,l.firstBaseUpdate=E,l.lastBaseUpdate=B,i===null&&(l.shared.lanes=0),Da|=c,e.lanes=c,e.memoizedState=G}}function pd(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function md(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)pd(n[e],t)}var Rl=x(null),Uo=x(0);function gd(e,t){e=ua,W(Uo,e),W(Rl,t),ua=e|t.baseLanes}function Ds(){W(Uo,ua),W(Rl,Rl.current)}function Es(){ua=Uo.current,L(Rl),L(Uo)}var mn=x(null),En=null;function wa(e){var t=e.alternate;W(Tt,Tt.current&1),W(mn,e),En===null&&(t===null||Rl.current!==null||t.memoizedState!==null)&&(En=e)}function Ts(e){W(Tt,Tt.current),W(mn,e),En===null&&(En=e)}function yd(e){e.tag===22?(W(Tt,Tt.current),W(mn,e),En===null&&(En=e)):za()}function za(){W(Tt,Tt.current),W(mn,mn.current)}function gn(e){L(mn),En===e&&(En=null),L(Tt)}var Tt=x(0);function Ho(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Uc(n)||Hc(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 na=0,Be=null,ut=null,Ot=null,Bo=!1,_l=!1,ll=!1,No=0,ki=0,Ol=null,q0=0;function zt(){throw Error(u(321))}function As(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!hn(e[n],t[n]))return!1;return!0}function Rs(e,t,n,a,l,i){return na=i,Be=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_.H=e===null||e.memoizedState===null?ef:Ks,ll=!1,i=n(a,l),ll=!1,_l&&(i=vd(t,n,a,l)),bd(e),i}function bd(e){_.H=Ti;var t=ut!==null&&ut.next!==null;if(na=0,Ot=ut=Be=null,Bo=!1,ki=0,Ol=null,t)throw Error(u(300));e===null||Lt||(e=e.dependencies,e!==null&&Eo(e)&&(Lt=!0))}function vd(e,t,n,a){Be=e;var l=0;do{if(_l&&(Ol=null),ki=0,_l=!1,25<=l)throw Error(u(301));if(l+=1,Ot=ut=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}_.H=tf,i=t(n,a)}while(_l);return i}function Y0(){var e=_.H,t=e.useState()[0];return t=typeof t.then=="function"?Di(t):t,e=e.useState()[0],(ut!==null?ut.memoizedState:null)!==e&&(Be.flags|=1024),t}function _s(){var e=No!==0;return No=0,e}function Os(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ls(e){if(Bo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Bo=!1}na=0,Ot=ut=Be=null,_l=!1,ki=No=0,Ol=null}function tn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ot===null?Be.memoizedState=Ot=e:Ot=Ot.next=e,Ot}function At(){if(ut===null){var e=Be.alternate;e=e!==null?e.memoizedState:null}else e=ut.next;var t=Ot===null?Be.memoizedState:Ot.next;if(t!==null)Ot=t,ut=e;else{if(e===null)throw Be.alternate===null?Error(u(467)):Error(u(310));ut=e,e={memoizedState:ut.memoizedState,baseState:ut.baseState,baseQueue:ut.baseQueue,queue:ut.queue,next:null},Ot===null?Be.memoizedState=Ot=e:Ot=Ot.next=e}return Ot}function jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Di(e){var t=ki;return ki+=1,Ol===null&&(Ol=[]),e=cd(Ol,e,t),t=Be,(Ot===null?t.memoizedState:Ot.next)===null&&(t=t.alternate,_.H=t===null||t.memoizedState===null?ef:Ks),e}function qo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Di(e);if(e.$$typeof===P)return Xt(e)}throw Error(u(438,String(e)))}function Us(e){var t=null,n=Be.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Be.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=jo(),Be.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]=ne;return t.index++,n}function aa(e,t){return typeof t=="function"?t(e):t}function Yo(e){var t=At();return Hs(t,ut,e)}function Hs(e,t,n){var a=e.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=n;var l=e.baseQueue,i=a.pending;if(i!==null){if(l!==null){var c=l.next;l.next=i.next,i.next=c}t.baseQueue=l=i,a.pending=null}if(i=e.baseState,l===null)e.memoizedState=i;else{t=l.next;var p=c=null,v=null,E=t,B=!1;do{var G=E.lane&-536870913;if(G!==E.lane?(Ke&G)===G:(na&G)===G){var T=E.revertLane;if(T===0)v!==null&&(v=v.next={lane:0,revertLane:0,gesture:null,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null}),G===Dl&&(B=!0);else if((na&T)===T){E=E.next,T===Dl&&(B=!0);continue}else G={lane:0,revertLane:E.revertLane,gesture:null,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null},v===null?(p=v=G,c=i):v=v.next=G,Be.lanes|=T,Da|=T;G=E.action,ll&&n(i,G),i=E.hasEagerState?E.eagerState:n(i,G)}else T={lane:G,revertLane:E.revertLane,gesture:E.gesture,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null},v===null?(p=v=T,c=i):v=v.next=T,Be.lanes|=G,Da|=G;E=E.next}while(E!==null&&E!==t);if(v===null?c=i:v.next=p,!hn(i,e.memoizedState)&&(Lt=!0,B&&(n=El,n!==null)))throw n;e.memoizedState=i,e.baseState=c,e.baseQueue=v,a.lastRenderedState=i}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Bs(e){var t=At(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var a=n.dispatch,l=n.pending,i=t.memoizedState;if(l!==null){n.pending=null;var c=l=l.next;do i=e(i,c.action),c=c.next;while(c!==l);hn(i,t.memoizedState)||(Lt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,a]}function xd(e,t,n){var a=Be,l=At(),i=Je;if(i){if(n===void 0)throw Error(u(407));n=n()}else n=t();var c=!hn((ut||l).memoizedState,n);if(c&&(l.memoizedState=n,Lt=!0),l=l.queue,qs(wd.bind(null,a,l,e),[e]),l.getSnapshot!==t||c||Ot!==null&&Ot.memoizedState.tag&1){if(a.flags|=2048,Ll(9,{destroy:void 0},Cd.bind(null,a,l,n,t),null),mt===null)throw Error(u(349));i||(na&127)!==0||Sd(a,t,n)}return n}function Sd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Be.updateQueue,t===null?(t=jo(),Be.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Cd(e,t,n,a){t.value=n,t.getSnapshot=a,zd(t)&&Md(e)}function wd(e,t,n){return n(function(){zd(t)&&Md(e)})}function zd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!hn(e,n)}catch{return!0}}function Md(e){var t=Fa(e,2);t!==null&&cn(t,e,2)}function Ns(e){var t=tn();if(typeof e=="function"){var n=e;if(e=n(),ll){Rn(!0);try{n()}finally{Rn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:aa,lastRenderedState:e},t}function kd(e,t,n,a){return e.baseState=n,Hs(e,ut,typeof a=="function"?a:aa)}function G0(e,t,n,a,l){if(Vo(e))throw Error(u(485));if(e=t.action,e!==null){var i={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){i.listeners.push(c)}};_.T!==null?n(!0):i.isTransition=!1,a(i),n=t.pending,n===null?(i.next=t.pending=i,Dd(t,i)):(i.next=n.next,t.pending=n.next=i)}}function Dd(e,t){var n=t.action,a=t.payload,l=e.state;if(t.isTransition){var i=_.T,c={};_.T=c;try{var p=n(l,a),v=_.S;v!==null&&v(c,p),Ed(e,t,p)}catch(E){js(e,t,E)}finally{i!==null&&c.types!==null&&(i.types=c.types),_.T=i}}else try{i=n(l,a),Ed(e,t,i)}catch(E){js(e,t,E)}}function Ed(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Td(e,t,a)},function(a){return js(e,t,a)}):Td(e,t,n)}function Td(e,t,n){t.status="fulfilled",t.value=n,Ad(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Dd(e,n)))}function js(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Ad(t),t=t.next;while(t!==a)}e.action=null}function Ad(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Rd(e,t){return t}function _d(e,t){if(Je){var n=mt.formState;if(n!==null){e:{var a=Be;if(Je){if(vt){t:{for(var l=vt,i=Dn;l.nodeType!==8;){if(!i){l=null;break t}if(l=Tn(l.nextSibling),l===null){l=null;break t}}i=l.data,l=i==="F!"||i==="F"?l:null}if(l){vt=Tn(l.nextSibling),a=l.data==="F!";break e}}ba(a)}a=!1}a&&(t=n[0])}}return n=tn(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Rd,lastRenderedState:t},n.queue=a,n=Wd.bind(null,Be,a),a.dispatch=n,a=Ns(!1),i=Qs.bind(null,Be,!1,a.queue),a=tn(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=G0.bind(null,Be,l,i,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function Od(e){var t=At();return Ld(t,ut,e)}function Ld(e,t,n){if(t=Hs(e,t,Rd)[0],e=Yo(aa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Di(t)}catch(c){throw c===Tl?Ro:c}else a=t;t=At();var l=t.queue,i=l.dispatch;return n!==t.memoizedState&&(Be.flags|=2048,Ll(9,{destroy:void 0},X0.bind(null,l,n),null)),[a,i,e]}function X0(e,t){e.action=t}function Ud(e){var t=At(),n=ut;if(n!==null)return Ld(t,n,e);At(),t=t.memoizedState,n=At();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Ll(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Be.updateQueue,t===null&&(t=jo(),Be.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 Hd(){return At().memoizedState}function Go(e,t,n,a){var l=tn();Be.flags|=e,l.memoizedState=Ll(1|t,{destroy:void 0},n,a===void 0?null:a)}function Xo(e,t,n,a){var l=At();a=a===void 0?null:a;var i=l.memoizedState.inst;ut!==null&&a!==null&&As(a,ut.memoizedState.deps)?l.memoizedState=Ll(t,i,n,a):(Be.flags|=e,l.memoizedState=Ll(1|t,i,n,a))}function Bd(e,t){Go(8390656,8,e,t)}function qs(e,t){Xo(2048,8,e,t)}function V0(e){Be.flags|=4;var t=Be.updateQueue;if(t===null)t=jo(),Be.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Nd(e){var t=At().memoizedState;return V0({ref:t,nextImpl:e}),function(){if((tt&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function jd(e,t){return Xo(4,2,e,t)}function qd(e,t){return Xo(4,4,e,t)}function Yd(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 Gd(e,t,n){n=n!=null?n.concat([e]):null,Xo(4,4,Yd.bind(null,t,e),n)}function Ys(){}function Xd(e,t){var n=At();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&As(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Vd(e,t){var n=At();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&As(t,a[1]))return a[0];if(a=e(),ll){Rn(!0);try{e()}finally{Rn(!1)}}return n.memoizedState=[a,t],a}function Gs(e,t,n){return n===void 0||(na&1073741824)!==0&&(Ke&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Kf(),Be.lanes|=e,Da|=e,n)}function Qd(e,t,n,a){return hn(n,t)?n:Rl.current!==null?(e=Gs(e,n,a),hn(e,t)||(Lt=!0),e):(na&42)===0||(na&1073741824)!==0&&(Ke&261930)===0?(Lt=!0,e.memoizedState=n):(e=Kf(),Be.lanes|=e,Da|=e,t)}function Kd(e,t,n,a,l){var i=Q.p;Q.p=i!==0&&8>i?i:8;var c=_.T,p={};_.T=p,Qs(e,!1,t,n);try{var v=l(),E=_.S;if(E!==null&&E(p,v),v!==null&&typeof v=="object"&&typeof v.then=="function"){var B=j0(v,a);Ei(e,t,B,vn(e))}else Ei(e,t,a,vn(e))}catch(G){Ei(e,t,{then:function(){},status:"rejected",reason:G},vn())}finally{Q.p=i,c!==null&&p.types!==null&&(c.types=p.types),_.T=c}}function Q0(){}function Xs(e,t,n,a){if(e.tag!==5)throw Error(u(476));var l=Zd(e).queue;Kd(e,l,t,F,n===null?Q0:function(){return Jd(e),n(a)})}function Zd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:F,baseState:F,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:aa,lastRenderedState:F},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:aa,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Jd(e){var t=Zd(e);t.next===null&&(t=e.alternate.memoizedState),Ei(e,t.next.queue,{},vn())}function Vs(){return Xt(Qi)}function Fd(){return At().memoizedState}function $d(){return At().memoizedState}function K0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=vn();e=Sa(n);var a=Ca(t,e,n);a!==null&&(cn(a,t,n),wi(a,t,n)),t={cache:vs()},e.payload=t;return}t=t.return}}function Z0(e,t,n){var a=vn();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Vo(e)?Id(t,n):(n=ss(e,t,n,a),n!==null&&(cn(n,e,a),Pd(n,t,a)))}function Wd(e,t,n){var a=vn();Ei(e,t,n,a)}function Ei(e,t,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vo(e))Id(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var c=t.lastRenderedState,p=i(c,n);if(l.hasEagerState=!0,l.eagerState=p,hn(p,c))return zo(e,t,l,0),mt===null&&wo(),!1}catch{}if(n=ss(e,t,l,a),n!==null)return cn(n,e,a),Pd(n,t,a),!0}return!1}function Qs(e,t,n,a){if(a={lane:2,revertLane:wc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Vo(e)){if(t)throw Error(u(479))}else t=ss(e,n,a,2),t!==null&&cn(t,e,2)}function Vo(e){var t=e.alternate;return e===Be||t!==null&&t===Be}function Id(e,t){_l=Bo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Pd(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,co(e,n)}}var Ti={readContext:Xt,use:qo,useCallback:zt,useContext:zt,useEffect:zt,useImperativeHandle:zt,useLayoutEffect:zt,useInsertionEffect:zt,useMemo:zt,useReducer:zt,useRef:zt,useState:zt,useDebugValue:zt,useDeferredValue:zt,useTransition:zt,useSyncExternalStore:zt,useId:zt,useHostTransitionStatus:zt,useFormState:zt,useActionState:zt,useOptimistic:zt,useMemoCache:zt,useCacheRefresh:zt};Ti.useEffectEvent=zt;var ef={readContext:Xt,use:qo,useCallback:function(e,t){return tn().memoizedState=[e,t===void 0?null:t],e},useContext:Xt,useEffect:Bd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Go(4194308,4,Yd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Go(4194308,4,e,t)},useInsertionEffect:function(e,t){Go(4,2,e,t)},useMemo:function(e,t){var n=tn();t=t===void 0?null:t;var a=e();if(ll){Rn(!0);try{e()}finally{Rn(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=tn();if(n!==void 0){var l=n(t);if(ll){Rn(!0);try{n(t)}finally{Rn(!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=Z0.bind(null,Be,e),[a.memoizedState,e]},useRef:function(e){var t=tn();return e={current:e},t.memoizedState=e},useState:function(e){e=Ns(e);var t=e.queue,n=Wd.bind(null,Be,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ys,useDeferredValue:function(e,t){var n=tn();return Gs(n,e,t)},useTransition:function(){var e=Ns(!1);return e=Kd.bind(null,Be,e.queue,!0,!1),tn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Be,l=tn();if(Je){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),mt===null)throw Error(u(349));(Ke&127)!==0||Sd(a,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,Bd(wd.bind(null,a,i,e),[e]),a.flags|=2048,Ll(9,{destroy:void 0},Cd.bind(null,a,i,n,t),null),n},useId:function(){var e=tn(),t=mt.identifierPrefix;if(Je){var n=jn,a=Nn;n=(a&~(1<<32-Pt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=No++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=q0++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Vs,useFormState:_d,useActionState:_d,useOptimistic:function(e){var t=tn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Qs.bind(null,Be,!0,n),n.dispatch=t,[e,t]},useMemoCache:Us,useCacheRefresh:function(){return tn().memoizedState=K0.bind(null,Be)},useEffectEvent:function(e){var t=tn(),n={impl:e};return t.memoizedState=n,function(){if((tt&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}},Ks={readContext:Xt,use:qo,useCallback:Xd,useContext:Xt,useEffect:qs,useImperativeHandle:Gd,useInsertionEffect:jd,useLayoutEffect:qd,useMemo:Vd,useReducer:Yo,useRef:Hd,useState:function(){return Yo(aa)},useDebugValue:Ys,useDeferredValue:function(e,t){var n=At();return Qd(n,ut.memoizedState,e,t)},useTransition:function(){var e=Yo(aa)[0],t=At().memoizedState;return[typeof e=="boolean"?e:Di(e),t]},useSyncExternalStore:xd,useId:Fd,useHostTransitionStatus:Vs,useFormState:Od,useActionState:Od,useOptimistic:function(e,t){var n=At();return kd(n,ut,e,t)},useMemoCache:Us,useCacheRefresh:$d};Ks.useEffectEvent=Nd;var tf={readContext:Xt,use:qo,useCallback:Xd,useContext:Xt,useEffect:qs,useImperativeHandle:Gd,useInsertionEffect:jd,useLayoutEffect:qd,useMemo:Vd,useReducer:Bs,useRef:Hd,useState:function(){return Bs(aa)},useDebugValue:Ys,useDeferredValue:function(e,t){var n=At();return ut===null?Gs(n,e,t):Qd(n,ut.memoizedState,e,t)},useTransition:function(){var e=Bs(aa)[0],t=At().memoizedState;return[typeof e=="boolean"?e:Di(e),t]},useSyncExternalStore:xd,useId:Fd,useHostTransitionStatus:Vs,useFormState:Ud,useActionState:Ud,useOptimistic:function(e,t){var n=At();return ut!==null?kd(n,ut,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Us,useCacheRefresh:$d};tf.useEffectEvent=Nd;function Zs(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:M({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Js={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=vn(),l=Sa(a);l.payload=t,n!=null&&(l.callback=n),t=Ca(e,l,a),t!==null&&(cn(t,e,a),wi(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=vn(),l=Sa(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Ca(e,l,a),t!==null&&(cn(t,e,a),wi(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=vn(),a=Sa(n);a.tag=2,t!=null&&(a.callback=t),t=Ca(e,a,n),t!==null&&(cn(t,e,n),wi(t,e,n))}};function nf(e,t,n,a,l,i,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,c):t.prototype&&t.prototype.isPureReactComponent?!mi(n,a)||!mi(l,i):!0}function af(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Js.enqueueReplaceState(t,t.state,null)}function il(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=M({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function lf(e){Co(e)}function of(e){console.error(e)}function rf(e){Co(e)}function Qo(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function sf(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 Fs(e,t,n){return n=Sa(n),n.tag=3,n.payload={element:null},n.callback=function(){Qo(e,t)},n}function cf(e){return e=Sa(e),e.tag=3,e}function uf(e,t,n,a){var l=n.type.getDerivedStateFromError;if(typeof l=="function"){var i=a.value;e.payload=function(){return l(i)},e.callback=function(){sf(t,n,a)}}var c=n.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){sf(t,n,a),typeof l!="function"&&(Ea===null?Ea=new Set([this]):Ea.add(this));var p=a.stack;this.componentDidCatch(a.value,{componentStack:p!==null?p:""})})}function J0(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&kl(t,n,l,!0),n=mn.current,n!==null){switch(n.tag){case 31:case 13:return En===null?ar():n.alternate===null&&Mt===0&&(Mt=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===_o?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),xc(e,a,l)),!1;case 22:return n.flags|=65536,a===_o?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)),xc(e,a,l)),!1}throw Error(u(435,n.tag))}return xc(e,a,l),ar(),!1}if(Je)return t=mn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==ps&&(e=Error(u(422),{cause:a}),bi(zn(e,n)))):(a!==ps&&(t=Error(u(423),{cause:a}),bi(zn(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=zn(a,n),l=Fs(e.stateNode,a,l),Ms(e,l),Mt!==4&&(Mt=2)),!1;var i=Error(u(520),{cause:a});if(i=zn(i,n),Bi===null?Bi=[i]:Bi.push(i),Mt!==4&&(Mt=2),t===null)return!0;a=zn(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=Fs(n.stateNode,a,e),Ms(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Ea===null||!Ea.has(i))))return n.flags|=65536,l&=-l,n.lanes|=l,l=cf(l),uf(l,e,n,a),Ms(n,l),!1}n=n.return}while(n!==null);return!1}var $s=Error(u(461)),Lt=!1;function Vt(e,t,n,a){t.child=e===null?hd(t,null,n,a):al(t,e.child,n,a)}function df(e,t,n,a,l){n=n.render;var i=t.ref;if("ref"in a){var c={};for(var p in a)p!=="ref"&&(c[p]=a[p])}else c=a;return Pa(t),a=Rs(e,t,n,c,i,l),p=_s(),e!==null&&!Lt?(Os(e,t,l),la(e,t,l)):(Je&&p&&fs(t),t.flags|=1,Vt(e,t,a,l),t.child)}function ff(e,t,n,a,l){if(e===null){var i=n.type;return typeof i=="function"&&!cs(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,hf(e,t,i,a,l)):(e=ko(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!lc(e,l)){var c=i.memoizedProps;if(n=n.compare,n=n!==null?n:mi,n(c,a)&&e.ref===t.ref)return la(e,t,l)}return t.flags|=1,e=In(i,a),e.ref=t.ref,e.return=t,t.child=e}function hf(e,t,n,a,l){if(e!==null){var i=e.memoizedProps;if(mi(i,a)&&e.ref===t.ref)if(Lt=!1,t.pendingProps=a=i,lc(e,l))(e.flags&131072)!==0&&(Lt=!0);else return t.lanes=e.lanes,la(e,t,l)}return Ws(e,t,n,a,l)}function pf(e,t,n,a){var l=a.children,i=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(i=i!==null?i.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&~i}else a=0,t.child=null;return mf(e,t,i,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ao(t,i!==null?i.cachePool:null),i!==null?gd(t,i):Ds(),yd(t);else return a=t.lanes=536870912,mf(e,t,i!==null?i.baseLanes|n:n,n,a)}else i!==null?(Ao(t,i.cachePool),gd(t,i),za(),t.memoizedState=null):(e!==null&&Ao(t,null),Ds(),za());return Vt(e,t,l,n),t.child}function Ai(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function mf(e,t,n,a,l){var i=Ss();return i=i===null?null:{parent:_t._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&Ao(t,null),Ds(),yd(t),e!==null&&kl(e,t,a,!0),t.childLanes=l,null}function Ko(e,t){return t=Jo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gf(e,t,n){return al(t,e.child,null,n),e=Ko(t,t.pendingProps),e.flags|=2,gn(t),t.memoizedState=null,e}function F0(e,t,n){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Je){if(a.mode==="hidden")return e=Ko(t,a),t.lanes=536870912,Ai(null,e);if(Ts(t),(e=vt)?(e=Eh(e,Dn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ga!==null?{id:Nn,overflow:jn}:null,retryLane:536870912,hydrationErrors:null},n=Iu(e),n.return=t,t.child=n,Gt=t,vt=null)):e=null,e===null)throw ba(t);return t.lanes=536870912,null}return Ko(t,a)}var i=e.memoizedState;if(i!==null){var c=i.dehydrated;if(Ts(t),l)if(t.flags&256)t.flags&=-257,t=gf(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(Lt||kl(e,t,n,!1),l=(n&e.childLanes)!==0,Lt||l){if(a=mt,a!==null&&(c=ai(a,n),c!==0&&c!==i.retryLane))throw i.retryLane=c,Fa(e,c),cn(a,e,c),$s;ar(),t=gf(e,t,n)}else e=i.treeContext,vt=Tn(c.nextSibling),Gt=t,Je=!0,ya=null,Dn=!1,e!==null&&td(t,e),t=Ko(t,a),t.flags|=4096;return t}return e=In(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Zo(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(u(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Ws(e,t,n,a,l){return Pa(t),n=Rs(e,t,n,a,void 0,l),a=_s(),e!==null&&!Lt?(Os(e,t,l),la(e,t,l)):(Je&&a&&fs(t),t.flags|=1,Vt(e,t,n,l),t.child)}function yf(e,t,n,a,l,i){return Pa(t),t.updateQueue=null,n=vd(t,a,n,l),bd(e),a=_s(),e!==null&&!Lt?(Os(e,t,i),la(e,t,i)):(Je&&a&&fs(t),t.flags|=1,Vt(e,t,n,i),t.child)}function bf(e,t,n,a,l){if(Pa(t),t.stateNode===null){var i=Cl,c=n.contextType;typeof c=="object"&&c!==null&&(i=Xt(c)),i=new n(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Js,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},ws(t),c=n.contextType,i.context=typeof c=="object"&&c!==null?Xt(c):Cl,i.state=t.memoizedState,c=n.getDerivedStateFromProps,typeof c=="function"&&(Zs(t,n,c,a),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(c=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),c!==i.state&&Js.enqueueReplaceState(i,i.state,null),Mi(t,a,i,l),zi(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var p=t.memoizedProps,v=il(n,p);i.props=v;var E=i.context,B=n.contextType;c=Cl,typeof B=="object"&&B!==null&&(c=Xt(B));var G=n.getDerivedStateFromProps;B=typeof G=="function"||typeof i.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,B||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(p||E!==c)&&af(t,i,a,c),xa=!1;var T=t.memoizedState;i.state=T,Mi(t,a,i,l),zi(),E=t.memoizedState,p||T!==E||xa?(typeof G=="function"&&(Zs(t,n,G,a),E=t.memoizedState),(v=xa||nf(t,n,v,a,T,E,c))?(B||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=E),i.props=a,i.state=E,i.context=c,a=v):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,zs(e,t),c=t.memoizedProps,B=il(n,c),i.props=B,G=t.pendingProps,T=i.context,E=n.contextType,v=Cl,typeof E=="object"&&E!==null&&(v=Xt(E)),p=n.getDerivedStateFromProps,(E=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==G||T!==v)&&af(t,i,a,v),xa=!1,T=t.memoizedState,i.state=T,Mi(t,a,i,l),zi();var O=t.memoizedState;c!==G||T!==O||xa||e!==null&&e.dependencies!==null&&Eo(e.dependencies)?(typeof p=="function"&&(Zs(t,n,p,a),O=t.memoizedState),(B=xa||nf(t,n,B,a,T,O,v)||e!==null&&e.dependencies!==null&&Eo(e.dependencies))?(E||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,O,v),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,O,v)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=O),i.props=a,i.state=O,i.context=v,a=B):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,Zo(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=al(t,e.child,null,l),t.child=al(t,null,n,l)):Vt(e,t,n,l),t.memoizedState=i.state,e=t.child):e=la(e,t,l),e}function vf(e,t,n,a){return Wa(),t.flags|=256,Vt(e,t,n,a),t.child}var Is={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ps(e){return{baseLanes:e,cachePool:rd()}}function ec(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=bn),e}function xf(e,t,n){var a=t.pendingProps,l=!1,i=(t.flags&128)!==0,c;if((c=i)||(c=e!==null&&e.memoizedState===null?!1:(Tt.current&2)!==0),c&&(l=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if(Je){if(l?wa(t):za(),(e=vt)?(e=Eh(e,Dn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ga!==null?{id:Nn,overflow:jn}:null,retryLane:536870912,hydrationErrors:null},n=Iu(e),n.return=t,t.child=n,Gt=t,vt=null)):e=null,e===null)throw ba(t);return Hc(e)?t.lanes=32:t.lanes=536870912,null}var p=a.children;return a=a.fallback,l?(za(),l=t.mode,p=Jo({mode:"hidden",children:p},l),a=$a(a,l,n,null),p.return=t,a.return=t,p.sibling=a,t.child=p,a=t.child,a.memoizedState=Ps(n),a.childLanes=ec(e,c,n),t.memoizedState=Is,Ai(null,a)):(wa(t),tc(t,p))}var v=e.memoizedState;if(v!==null&&(p=v.dehydrated,p!==null)){if(i)t.flags&256?(wa(t),t.flags&=-257,t=nc(e,t,n)):t.memoizedState!==null?(za(),t.child=e.child,t.flags|=128,t=null):(za(),p=a.fallback,l=t.mode,a=Jo({mode:"visible",children:a.children},l),p=$a(p,l,n,null),p.flags|=2,a.return=t,p.return=t,a.sibling=p,t.child=a,al(t,e.child,null,n),a=t.child,a.memoizedState=Ps(n),a.childLanes=ec(e,c,n),t.memoizedState=Is,t=Ai(null,a));else if(wa(t),Hc(p)){if(c=p.nextSibling&&p.nextSibling.dataset,c)var E=c.dgst;c=E,a=Error(u(419)),a.stack="",a.digest=c,bi({value:a,source:null,stack:null}),t=nc(e,t,n)}else if(Lt||kl(e,t,n,!1),c=(n&e.childLanes)!==0,Lt||c){if(c=mt,c!==null&&(a=ai(c,n),a!==0&&a!==v.retryLane))throw v.retryLane=a,Fa(e,a),cn(c,e,a),$s;Uc(p)||ar(),t=nc(e,t,n)}else Uc(p)?(t.flags|=192,t.child=e.child,t=null):(e=v.treeContext,vt=Tn(p.nextSibling),Gt=t,Je=!0,ya=null,Dn=!1,e!==null&&td(t,e),t=tc(t,a.children),t.flags|=4096);return t}return l?(za(),p=a.fallback,l=t.mode,v=e.child,E=v.sibling,a=In(v,{mode:"hidden",children:a.children}),a.subtreeFlags=v.subtreeFlags&65011712,E!==null?p=In(E,p):(p=$a(p,l,n,null),p.flags|=2),p.return=t,a.return=t,a.sibling=p,t.child=a,Ai(null,a),a=t.child,p=e.child.memoizedState,p===null?p=Ps(n):(l=p.cachePool,l!==null?(v=_t._currentValue,l=l.parent!==v?{parent:v,pool:v}:l):l=rd(),p={baseLanes:p.baseLanes|n,cachePool:l}),a.memoizedState=p,a.childLanes=ec(e,c,n),t.memoizedState=Is,Ai(e.child,a)):(wa(t),n=e.child,e=n.sibling,n=In(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(c=t.deletions,c===null?(t.deletions=[e],t.flags|=16):c.push(e)),t.child=n,t.memoizedState=null,n)}function tc(e,t){return t=Jo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Jo(e,t){return e=pn(22,e,null,t),e.lanes=0,e}function nc(e,t,n){return al(t,e.child,null,n),e=tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sf(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),ys(e.return,t,n)}function ac(e,t,n,a,l,i){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:l,treeForkCount:i}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=a,c.tail=n,c.tailMode=l,c.treeForkCount=i)}function Cf(e,t,n){var a=t.pendingProps,l=a.revealOrder,i=a.tail;a=a.children;var c=Tt.current,p=(c&2)!==0;if(p?(c=c&1|2,t.flags|=128):c&=1,W(Tt,c),Vt(e,t,a,n),a=Je?yi:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sf(e,n,t);else if(e.tag===19)Sf(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&&Ho(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),ac(t,!1,l,n,i,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&&Ho(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}ac(t,!0,n,null,i,a);break;case"together":ac(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function la(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Da|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(kl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=In(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=In(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function lc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Eo(e)))}function $0(e,t,n){switch(t.tag){case 3:gt(t,t.stateNode.containerInfo),va(t,_t,e.memoizedState.cache),Wa();break;case 27:case 5:$t(t);break;case 4:gt(t,t.stateNode.containerInfo);break;case 10:va(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ts(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(wa(t),t.flags|=128,null):(n&t.child.childLanes)!==0?xf(e,t,n):(wa(t),e=la(e,t,n),e!==null?e.sibling:null);wa(t);break;case 19:var l=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(kl(e,t,n,!1),a=(n&t.childLanes)!==0),l){if(a)return Cf(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),W(Tt,Tt.current),a)break;return null;case 22:return t.lanes=0,pf(e,t,n,t.pendingProps);case 24:va(t,_t,e.memoizedState.cache)}return la(e,t,n)}function wf(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Lt=!0;else{if(!lc(e,n)&&(t.flags&128)===0)return Lt=!1,$0(e,t,n);Lt=(e.flags&131072)!==0}else Lt=!1,Je&&(t.flags&1048576)!==0&&ed(t,yi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=tl(t.elementType),t.type=e,typeof e=="function")cs(e)?(a=il(e,a),t.tag=1,t=bf(null,t,e,a,n)):(t.tag=0,t=Ws(null,t,e,a,n));else{if(e!=null){var l=e.$$typeof;if(l===me){t.tag=11,t=df(null,t,e,a,n);break e}else if(l===V){t.tag=14,t=ff(null,t,e,a,n);break e}}throw t=Se(e)||e,Error(u(306,t,""))}}return t;case 0:return Ws(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=il(a,t.pendingProps),bf(e,t,a,l,n);case 3:e:{if(gt(t,t.stateNode.containerInfo),e===null)throw Error(u(387));a=t.pendingProps;var i=t.memoizedState;l=i.element,zs(e,t),Mi(t,a,null,n);var c=t.memoizedState;if(a=c.cache,va(t,_t,a),a!==i.cache&&bs(t,[_t],n,!0),zi(),a=c.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=vf(e,t,a,n);break e}else if(a!==l){l=zn(Error(u(424)),t),bi(l),t=vf(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,vt=Tn(e.firstChild),Gt=t,Je=!0,ya=null,Dn=!0,n=hd(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Wa(),a===l){t=la(e,t,n);break e}Vt(e,t,a,n)}t=t.child}return t;case 26:return Zo(e,t),e===null?(n=Lh(t.type,null,t.pendingProps,null))?t.memoizedState=n:Je||(n=t.type,e=t.pendingProps,a=ur(Te.current).createElement(n),a[St]=t,a[Et]=e,Qt(a,n,e),he(a),t.stateNode=a):t.memoizedState=Lh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return $t(t),e===null&&Je&&(a=t.stateNode=Rh(t.type,t.pendingProps,Te.current),Gt=t,Dn=!0,l=vt,_a(t.type)?(Bc=l,vt=Tn(a.firstChild)):vt=l),Vt(e,t,t.pendingProps.children,n),Zo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Je&&((l=a=vt)&&(a=km(a,t.type,t.pendingProps,Dn),a!==null?(t.stateNode=a,Gt=t,vt=Tn(a.firstChild),Dn=!1,l=!0):l=!1),l||ba(t)),$t(t),l=t.type,i=t.pendingProps,c=e!==null?e.memoizedProps:null,a=i.children,_c(l,i)?a=null:c!==null&&_c(l,c)&&(t.flags|=32),t.memoizedState!==null&&(l=Rs(e,t,Y0,null,null,n),Qi._currentValue=l),Zo(e,t),Vt(e,t,a,n),t.child;case 6:return e===null&&Je&&((e=n=vt)&&(n=Dm(n,t.pendingProps,Dn),n!==null?(t.stateNode=n,Gt=t,vt=null,e=!0):e=!1),e||ba(t)),null;case 13:return xf(e,t,n);case 4:return gt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=al(t,null,a,n):Vt(e,t,a,n),t.child;case 11:return df(e,t,t.type,t.pendingProps,n);case 7:return Vt(e,t,t.pendingProps,n),t.child;case 8:return Vt(e,t,t.pendingProps.children,n),t.child;case 12:return Vt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,va(t,t.type,a.value),Vt(e,t,a.children,n),t.child;case 9:return l=t.type._context,a=t.pendingProps.children,Pa(t),l=Xt(l),a=a(l),t.flags|=1,Vt(e,t,a,n),t.child;case 14:return ff(e,t,t.type,t.pendingProps,n);case 15:return hf(e,t,t.type,t.pendingProps,n);case 19:return Cf(e,t,n);case 31:return F0(e,t,n);case 22:return pf(e,t,n,t.pendingProps);case 24:return Pa(t),a=Xt(_t),e===null?(l=Ss(),l===null&&(l=mt,i=vs(),l.pooledCache=i,i.refCount++,i!==null&&(l.pooledCacheLanes|=n),l=i),t.memoizedState={parent:a,cache:l},ws(t),va(t,_t,l)):((e.lanes&n)!==0&&(zs(e,t),Mi(t,null,null,n),zi()),l=e.memoizedState,i=t.memoizedState,l.parent!==a?(l={parent:a,cache:a},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),va(t,_t,a)):(a=i.cache,va(t,_t,a),a!==l.cache&&bs(t,[_t],n,!0))),Vt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function ia(e){e.flags|=4}function ic(e,t,n,a,l){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if($f())e.flags|=8192;else throw nl=_o,Cs}else e.flags&=-16777217}function zf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!jh(t))if($f())e.flags|=8192;else throw nl=_o,Cs}function Fo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ro():536870912,e.lanes|=t,Nl|=t)}function Ri(e,t){if(!Je)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 xt(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 W0(e,t,n){var a=t.pendingProps;switch(hs(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xt(t),null;case 1:return xt(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ta(_t),Oe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ml(t)?ia(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ms())),xt(t),null;case 26:var l=t.type,i=t.memoizedState;return e===null?(ia(t),i!==null?(xt(t),zf(t,i)):(xt(t),ic(t,l,null,a,n))):i?i!==e.memoizedState?(ia(t),xt(t),zf(t,i)):(xt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&ia(t),xt(t),ic(t,l,e,a,n)),null;case 27:if(ot(t),n=Te.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ia(t);else{if(!a){if(t.stateNode===null)throw Error(u(166));return xt(t),null}e=ae.current,Ml(t)?nd(t):(e=Rh(l,a,n),t.stateNode=e,ia(t))}return xt(t),null;case 5:if(ot(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ia(t);else{if(!a){if(t.stateNode===null)throw Error(u(166));return xt(t),null}if(i=ae.current,Ml(t))nd(t);else{var c=ur(Te.current);switch(i){case 1:i=c.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:i=c.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":i=c.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":i=c.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":i=c.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?c.createElement("select",{is:a.is}):c.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?c.createElement(l,{is:a.is}):c.createElement(l)}}i[St]=t,i[Et]=a;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=i;e:switch(Qt(i,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&&ia(t)}}return xt(t),ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ia(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(u(166));if(e=Te.current,Ml(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,l=Gt,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[St]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||xh(e.nodeValue,n)),e||ba(t,!0)}else e=ur(e).createTextNode(a),e[St]=t,t.stateNode=e}return xt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ml(t),n!==null){if(e===null){if(!a)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[St]=t}else Wa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;xt(t),e=!1}else n=ms(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(gn(t),t):(gn(t),null);if((t.flags&128)!==0)throw Error(u(558))}return xt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=Ml(t),a!==null&&a.dehydrated!==null){if(e===null){if(!l)throw Error(u(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(u(317));l[St]=t}else Wa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;xt(t),l=!1}else l=ms(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(gn(t),t):(gn(t),null)}return gn(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),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==l&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Fo(t,t.updateQueue),xt(t),null);case 4:return Oe(),e===null&&Dc(t.stateNode.containerInfo),xt(t),null;case 10:return ta(t.type),xt(t),null;case 19:if(L(Tt),a=t.memoizedState,a===null)return xt(t),null;if(l=(t.flags&128)!==0,i=a.rendering,i===null)if(l)Ri(a,!1);else{if(Mt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Ho(e),i!==null){for(t.flags|=128,Ri(a,!1),e=i.updateQueue,t.updateQueue=e,Fo(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Wu(n,e),n=n.sibling;return W(Tt,Tt.current&1|2),Je&&Pn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&He()>er&&(t.flags|=128,l=!0,Ri(a,!1),t.lanes=4194304)}else{if(!l)if(e=Ho(i),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Fo(t,e),Ri(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!Je)return xt(t),null}else 2*He()-a.renderingStartTime>er&&n!==536870912&&(t.flags|=128,l=!0,Ri(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=He(),e.sibling=null,n=Tt.current,W(Tt,l?n&1|2:n&1),Je&&Pn(t,a.treeForkCount),e):(xt(t),null);case 22:case 23:return gn(t),Es(),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&&(xt(t),t.subtreeFlags&6&&(t.flags|=8192)):xt(t),n=t.updateQueue,n!==null&&Fo(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&&L(el),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ta(_t),xt(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function I0(e,t){switch(hs(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ta(_t),Oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ot(t),null;case 31:if(t.memoizedState!==null){if(gn(t),t.alternate===null)throw Error(u(340));Wa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(gn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Wa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return L(Tt),null;case 4:return Oe(),null;case 10:return ta(t.type),null;case 22:case 23:return gn(t),Es(),e!==null&&L(el),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ta(_t),null;case 25:return null;default:return null}}function Mf(e,t){switch(hs(t),t.tag){case 3:ta(_t),Oe();break;case 26:case 27:case 5:ot(t);break;case 4:Oe();break;case 31:t.memoizedState!==null&&gn(t);break;case 13:gn(t);break;case 19:L(Tt);break;case 10:ta(t.type);break;case 22:case 23:gn(t),Es(),e!==null&&L(el);break;case 24:ta(_t)}}function _i(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 i=n.create,c=n.inst;a=i(),c.destroy=a}n=n.next}while(n!==l)}}catch(p){st(t,t.return,p)}}function Ma(e,t,n){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var i=l.next;a=i;do{if((a.tag&e)===e){var c=a.inst,p=c.destroy;if(p!==void 0){c.destroy=void 0,l=t;var v=n,E=p;try{E()}catch(B){st(l,v,B)}}}a=a.next}while(a!==i)}}catch(B){st(t,t.return,B)}}function kf(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{md(t,n)}catch(a){st(e,e.return,a)}}}function Df(e,t,n){n.props=il(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){st(e,t,a)}}function Oi(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(l){st(e,t,l)}}function qn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){st(e,t,l)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(l){st(e,t,l)}else n.current=null}function Ef(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(l){st(e,e.return,l)}}function oc(e,t,n){try{var a=e.stateNode;xm(a,e.type,n,t),a[Et]=t}catch(l){st(e,e.return,l)}}function Tf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&_a(e.type)||e.tag===4}function rc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Tf(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&&_a(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 sc(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=$n));else if(a!==4&&(a===27&&_a(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(sc(e,t,n),e=e.sibling;e!==null;)sc(e,t,n),e=e.sibling}function $o(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&&_a(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($o(e,t,n),e=e.sibling;e!==null;)$o(e,t,n),e=e.sibling}function Af(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);Qt(t,a,n),t[St]=e,t[Et]=n}catch(i){st(e,e.return,i)}}var oa=!1,Ut=!1,cc=!1,Rf=typeof WeakSet=="function"?WeakSet:Set,qt=null;function P0(e,t){if(e=e.containerInfo,Ac=yr,e=Gu(e),ns(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,i=a.focusNode;a=a.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var c=0,p=-1,v=-1,E=0,B=0,G=e,T=null;t:for(;;){for(var O;G!==n||l!==0&&G.nodeType!==3||(p=c+l),G!==i||a!==0&&G.nodeType!==3||(v=c+a),G.nodeType===3&&(c+=G.nodeValue.length),(O=G.firstChild)!==null;)T=G,G=O;for(;;){if(G===e)break t;if(T===n&&++E===l&&(p=c),T===i&&++B===a&&(v=c),(O=G.nextSibling)!==null)break;G=T,T=G.parentNode}G=O}n=p===-1||v===-1?null:{start:p,end:v}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rc={focusedElem:e,selectionRange:n},yr=!1,qt=t;qt!==null;)if(t=qt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,qt=e;else for(;qt!==null;){switch(t=qt,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)l=e[n],l.ref.impl=l.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,n=t,l=i.memoizedProps,i=i.memoizedState,a=n.stateNode;try{var ue=il(n.type,l);e=a.getSnapshotBeforeUpdate(ue,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(ke){st(n,n.return,ke)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Lc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Lc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,qt=e;break}qt=t.return}}function _f(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:sa(e,n),a&4&&_i(5,n);break;case 1:if(sa(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(c){st(n,n.return,c)}else{var l=il(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){st(n,n.return,c)}}a&64&&kf(n),a&512&&Oi(n,n.return);break;case 3:if(sa(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{md(e,t)}catch(c){st(n,n.return,c)}}break;case 27:t===null&&a&4&&Af(n);case 26:case 5:sa(e,n),t===null&&a&4&&Ef(n),a&512&&Oi(n,n.return);break;case 12:sa(e,n);break;case 31:sa(e,n),a&4&&Uf(e,n);break;case 13:sa(e,n),a&4&&Hf(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=sm.bind(null,n),Em(e,n))));break;case 22:if(a=n.memoizedState!==null||oa,!a){t=t!==null&&t.memoizedState!==null||Ut,l=oa;var i=Ut;oa=a,(Ut=t)&&!i?ca(e,n,(n.subtreeFlags&8772)!==0):sa(e,n),oa=l,Ut=i}break;case 30:break;default:sa(e,n)}}function Of(e){var t=e.alternate;t!==null&&(e.alternate=null,Of(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&oi(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 Ct=null,ln=!1;function ra(e,t,n){for(n=n.child;n!==null;)Lf(e,t,n),n=n.sibling}function Lf(e,t,n){if(It&&typeof It.onCommitFiberUnmount=="function")try{It.onCommitFiberUnmount(Qn,n)}catch{}switch(n.tag){case 26:Ut||qn(n,t),ra(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Ut||qn(n,t);var a=Ct,l=ln;_a(n.type)&&(Ct=n.stateNode,ln=!1),ra(e,t,n),Gi(n.stateNode),Ct=a,ln=l;break;case 5:Ut||qn(n,t);case 6:if(a=Ct,l=ln,Ct=null,ra(e,t,n),Ct=a,ln=l,Ct!==null)if(ln)try{(Ct.nodeType===9?Ct.body:Ct.nodeName==="HTML"?Ct.ownerDocument.body:Ct).removeChild(n.stateNode)}catch(i){st(n,t,i)}else try{Ct.removeChild(n.stateNode)}catch(i){st(n,t,i)}break;case 18:Ct!==null&&(ln?(e=Ct,kh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Kl(e)):kh(Ct,n.stateNode));break;case 4:a=Ct,l=ln,Ct=n.stateNode.containerInfo,ln=!0,ra(e,t,n),Ct=a,ln=l;break;case 0:case 11:case 14:case 15:Ma(2,n,t),Ut||Ma(4,n,t),ra(e,t,n);break;case 1:Ut||(qn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Df(n,t,a)),ra(e,t,n);break;case 21:ra(e,t,n);break;case 22:Ut=(a=Ut)||n.memoizedState!==null,ra(e,t,n),Ut=a;break;default:ra(e,t,n)}}function Uf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Kl(e)}catch(n){st(t,t.return,n)}}}function Hf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Kl(e)}catch(n){st(t,t.return,n)}}function em(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Rf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Rf),t;default:throw Error(u(435,e.tag))}}function Wo(e,t){var n=em(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var l=cm.bind(null,e,a);a.then(l,l)}})}function on(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a],i=e,c=t,p=c;e:for(;p!==null;){switch(p.tag){case 27:if(_a(p.type)){Ct=p.stateNode,ln=!1;break e}break;case 5:Ct=p.stateNode,ln=!1;break e;case 3:case 4:Ct=p.stateNode.containerInfo,ln=!0;break e}p=p.return}if(Ct===null)throw Error(u(160));Lf(i,c,l),Ct=null,ln=!1,i=l.alternate,i!==null&&(i.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Bf(t,e),t=t.sibling}var Ln=null;function Bf(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:on(t,e),rn(e),a&4&&(Ma(3,e,e.return),_i(3,e),Ma(5,e,e.return));break;case 1:on(t,e),rn(e),a&512&&(Ut||n===null||qn(n,n.return)),a&64&&oa&&(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=Ln;if(on(t,e),rn(e),a&512&&(Ut||n===null||qn(n,n.return)),a&4){var i=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":i=l.getElementsByTagName("title")[0],(!i||i[Qa]||i[St]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=l.createElement(a),l.head.insertBefore(i,l.querySelector("head > title"))),Qt(i,a,n),i[St]=e,he(i),a=i;break e;case"link":var c=Bh("link","href",l).get(a+(n.href||""));if(c){for(var p=0;p<c.length;p++)if(i=c[p],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){c.splice(p,1);break t}}i=l.createElement(a),Qt(i,a,n),l.head.appendChild(i);break;case"meta":if(c=Bh("meta","content",l).get(a+(n.content||""))){for(p=0;p<c.length;p++)if(i=c[p],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){c.splice(p,1);break t}}i=l.createElement(a),Qt(i,a,n),l.head.appendChild(i);break;default:throw Error(u(468,a))}i[St]=e,he(i),a=i}e.stateNode=a}else Nh(l,e.type,e.stateNode);else e.stateNode=Hh(l,a,e.memoizedProps);else i!==a?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,a===null?Nh(l,e.type,e.stateNode):Hh(l,a,e.memoizedProps)):a===null&&e.stateNode!==null&&oc(e,e.memoizedProps,n.memoizedProps)}break;case 27:on(t,e),rn(e),a&512&&(Ut||n===null||qn(n,n.return)),n!==null&&a&4&&oc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(on(t,e),rn(e),a&512&&(Ut||n===null||qn(n,n.return)),e.flags&32){l=e.stateNode;try{ml(l,"")}catch(ue){st(e,e.return,ue)}}a&4&&e.stateNode!=null&&(l=e.memoizedProps,oc(e,l,n!==null?n.memoizedProps:l)),a&1024&&(cc=!0);break;case 6:if(on(t,e),rn(e),a&4){if(e.stateNode===null)throw Error(u(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(ue){st(e,e.return,ue)}}break;case 3:if(hr=null,l=Ln,Ln=dr(t.containerInfo),on(t,e),Ln=l,rn(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Kl(t.containerInfo)}catch(ue){st(e,e.return,ue)}cc&&(cc=!1,Nf(e));break;case 4:a=Ln,Ln=dr(e.stateNode.containerInfo),on(t,e),rn(e),Ln=a;break;case 12:on(t,e),rn(e);break;case 31:on(t,e),rn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Wo(e,a)));break;case 13:on(t,e),rn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Po=He()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Wo(e,a)));break;case 22:l=e.memoizedState!==null;var v=n!==null&&n.memoizedState!==null,E=oa,B=Ut;if(oa=E||l,Ut=B||v,on(t,e),Ut=B,oa=E,rn(e),a&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||v||oa||Ut||ol(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){v=n=t;try{if(i=v.stateNode,l)c=i.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{p=v.stateNode;var G=v.memoizedProps.style,T=G!=null&&G.hasOwnProperty("display")?G.display:null;p.style.display=T==null||typeof T=="boolean"?"":(""+T).trim()}}catch(ue){st(v,v.return,ue)}}}else if(t.tag===6){if(n===null){v=t;try{v.stateNode.nodeValue=l?"":v.memoizedProps}catch(ue){st(v,v.return,ue)}}}else if(t.tag===18){if(n===null){v=t;try{var O=v.stateNode;l?Dh(O,!0):Dh(v.stateNode,!1)}catch(ue){st(v,v.return,ue)}}}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,Wo(e,n))));break;case 19:on(t,e),rn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Wo(e,a)));break;case 30:break;case 21:break;default:on(t,e),rn(e)}}function rn(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Tf(a)){n=a;break}a=a.return}if(n==null)throw Error(u(160));switch(n.tag){case 27:var l=n.stateNode,i=rc(e);$o(e,i,l);break;case 5:var c=n.stateNode;n.flags&32&&(ml(c,""),n.flags&=-33);var p=rc(e);$o(e,p,c);break;case 3:case 4:var v=n.stateNode.containerInfo,E=rc(e);sc(e,E,v);break;default:throw Error(u(161))}}catch(B){st(e,e.return,B)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Nf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Nf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function sa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)_f(e,t.alternate,t),t=t.sibling}function ol(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ma(4,t,t.return),ol(t);break;case 1:qn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Df(t,t.return,n),ol(t);break;case 27:Gi(t.stateNode);case 26:case 5:qn(t,t.return),ol(t);break;case 22:t.memoizedState===null&&ol(t);break;case 30:ol(t);break;default:ol(t)}e=e.sibling}}function ca(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,l=e,i=t,c=i.flags;switch(i.tag){case 0:case 11:case 15:ca(l,i,n),_i(4,i);break;case 1:if(ca(l,i,n),a=i,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(E){st(a,a.return,E)}if(a=i,l=a.updateQueue,l!==null){var p=a.stateNode;try{var v=l.shared.hiddenCallbacks;if(v!==null)for(l.shared.hiddenCallbacks=null,l=0;l<v.length;l++)pd(v[l],p)}catch(E){st(a,a.return,E)}}n&&c&64&&kf(i),Oi(i,i.return);break;case 27:Af(i);case 26:case 5:ca(l,i,n),n&&a===null&&c&4&&Ef(i),Oi(i,i.return);break;case 12:ca(l,i,n);break;case 31:ca(l,i,n),n&&c&4&&Uf(l,i);break;case 13:ca(l,i,n),n&&c&4&&Hf(l,i);break;case 22:i.memoizedState===null&&ca(l,i,n),Oi(i,i.return);break;case 30:break;default:ca(l,i,n)}t=t.sibling}}function uc(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&&vi(n))}function dc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&vi(e))}function Un(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)jf(e,t,n,a),t=t.sibling}function jf(e,t,n,a){var l=t.flags;switch(t.tag){case 0:case 11:case 15:Un(e,t,n,a),l&2048&&_i(9,t);break;case 1:Un(e,t,n,a);break;case 3:Un(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&&vi(e)));break;case 12:if(l&2048){Un(e,t,n,a),e=t.stateNode;try{var i=t.memoizedProps,c=i.id,p=i.onPostCommit;typeof p=="function"&&p(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(v){st(t,t.return,v)}}else Un(e,t,n,a);break;case 31:Un(e,t,n,a);break;case 13:Un(e,t,n,a);break;case 23:break;case 22:i=t.stateNode,c=t.alternate,t.memoizedState!==null?i._visibility&2?Un(e,t,n,a):Li(e,t):i._visibility&2?Un(e,t,n,a):(i._visibility|=2,Ul(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),l&2048&&uc(c,t);break;case 24:Un(e,t,n,a),l&2048&&dc(t.alternate,t);break;default:Un(e,t,n,a)}}function Ul(e,t,n,a,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,c=t,p=n,v=a,E=c.flags;switch(c.tag){case 0:case 11:case 15:Ul(i,c,p,v,l),_i(8,c);break;case 23:break;case 22:var B=c.stateNode;c.memoizedState!==null?B._visibility&2?Ul(i,c,p,v,l):Li(i,c):(B._visibility|=2,Ul(i,c,p,v,l)),l&&E&2048&&uc(c.alternate,c);break;case 24:Ul(i,c,p,v,l),l&&E&2048&&dc(c.alternate,c);break;default:Ul(i,c,p,v,l)}t=t.sibling}}function Li(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:Li(n,a),l&2048&&uc(a.alternate,a);break;case 24:Li(n,a),l&2048&&dc(a.alternate,a);break;default:Li(n,a)}t=t.sibling}}var Ui=8192;function Hl(e,t,n){if(e.subtreeFlags&Ui)for(e=e.child;e!==null;)qf(e,t,n),e=e.sibling}function qf(e,t,n){switch(e.tag){case 26:Hl(e,t,n),e.flags&Ui&&e.memoizedState!==null&&qm(n,Ln,e.memoizedState,e.memoizedProps);break;case 5:Hl(e,t,n);break;case 3:case 4:var a=Ln;Ln=dr(e.stateNode.containerInfo),Hl(e,t,n),Ln=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Ui,Ui=16777216,Hl(e,t,n),Ui=a):Hl(e,t,n));break;default:Hl(e,t,n)}}function Yf(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 Hi(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];qt=a,Xf(a,e)}Yf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Gf(e),e=e.sibling}function Gf(e){switch(e.tag){case 0:case 11:case 15:Hi(e),e.flags&2048&&Ma(9,e,e.return);break;case 3:Hi(e);break;case 12:Hi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Io(e)):Hi(e);break;default:Hi(e)}}function Io(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];qt=a,Xf(a,e)}Yf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ma(8,t,t.return),Io(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Io(t));break;default:Io(t)}e=e.sibling}}function Xf(e,t){for(;qt!==null;){var n=qt;switch(n.tag){case 0:case 11:case 15:Ma(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:vi(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,qt=a;else e:for(n=e;qt!==null;){a=qt;var l=a.sibling,i=a.return;if(Of(a),a===n){qt=null;break e}if(l!==null){l.return=i,qt=l;break e}qt=i}}}var tm={getCacheForType:function(e){var t=Xt(_t),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Xt(_t).controller.signal}},nm=typeof WeakMap=="function"?WeakMap:Map,tt=0,mt=null,Ve=null,Ke=0,rt=0,yn=null,ka=!1,Bl=!1,fc=!1,ua=0,Mt=0,Da=0,rl=0,hc=0,bn=0,Nl=0,Bi=null,sn=null,pc=!1,Po=0,Vf=0,er=1/0,tr=null,Ea=null,Nt=0,Ta=null,jl=null,da=0,mc=0,gc=null,Qf=null,Ni=0,yc=null;function vn(){return(tt&2)!==0&&Ke!==0?Ke&-Ke:_.T!==null?wc():uo()}function Kf(){if(bn===0)if((Ke&536870912)===0||Je){var e=dl;dl<<=1,(dl&3932160)===0&&(dl=262144),bn=e}else bn=536870912;return e=mn.current,e!==null&&(e.flags|=32),bn}function cn(e,t,n){(e===mt&&(rt===2||rt===9)||e.cancelPendingCommit!==null)&&(ql(e,0),Aa(e,Ke,bn,!1)),Va(e,n),((tt&2)===0||e!==mt)&&(e===mt&&((tt&2)===0&&(rl|=n),Mt===4&&Aa(e,Ke,bn,!1)),Yn(e))}function Zf(e,t,n){if((tt&6)!==0)throw Error(u(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Xa(e,t),l=a?im(e,t):vc(e,t,!0),i=a;do{if(l===0){Bl&&!a&&Aa(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!am(n)){l=vc(e,t,!1),i=!1;continue}if(l===2){if(i=t,e.errorRecoveryDisabledLanes&i)var c=0;else c=e.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){t=c;e:{var p=e;l=Bi;var v=p.current.memoizedState.isDehydrated;if(v&&(ql(p,c).flags|=256),c=vc(p,c,!1),c!==2){if(fc&&!v){p.errorRecoveryDisabledLanes|=i,rl|=i,l=4;break e}i=sn,sn=l,i!==null&&(sn===null?sn=i:sn.push.apply(sn,i))}l=c}if(i=!1,l!==2)continue}}if(l===1){ql(e,0),Aa(e,t,0,!0);break}e:{switch(a=e,i=l,i){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Aa(a,t,bn,!ka);break e;case 2:sn=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(l=Po+300-He(),10<l)){if(Aa(a,t,bn,!ka),fl(a,0,!0)!==0)break e;da=t,a.timeoutHandle=zh(Jf.bind(null,a,n,sn,tr,pc,t,bn,rl,Nl,ka,i,"Throttled",-0,0),l);break e}Jf(a,n,sn,tr,pc,t,bn,rl,Nl,ka,i,null,-0,0)}}break}while(!0);Yn(e)}function Jf(e,t,n,a,l,i,c,p,v,E,B,G,T,O){if(e.timeoutHandle=-1,G=t.subtreeFlags,G&8192||(G&16785408)===16785408){G={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:$n},qf(t,i,G);var ue=(i&62914560)===i?Po-He():(i&4194048)===i?Vf-He():0;if(ue=Ym(G,ue),ue!==null){da=i,e.cancelPendingCommit=ue(nh.bind(null,e,t,i,n,a,l,c,p,v,B,G,null,T,O)),Aa(e,i,c,!E);return}}nh(e,t,i,n,a,l,c,p,v)}function am(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],i=l.getSnapshot;l=l.value;try{if(!hn(i(),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 Aa(e,t,n,a){t&=~hc,t&=~rl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var i=31-Pt(l),c=1<<i;a[i]=-1,l&=~c}n!==0&&so(e,n,t)}function nr(){return(tt&6)===0?(ji(0),!1):!0}function bc(){if(Ve!==null){if(rt===0)var e=Ve.return;else e=Ve,ea=Ia=null,Ls(e),Al=null,Si=0,e=Ve;for(;e!==null;)Mf(e.alternate,e),e=e.return;Ve=null}}function ql(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,wm(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),da=0,bc(),mt=e,Ve=n=In(e.current,null),Ke=t,rt=0,yn=null,ka=!1,Bl=Xa(e,t),fc=!1,Nl=bn=hc=rl=Da=Mt=0,sn=Bi=null,pc=!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-Pt(a),i=1<<l;t|=e[l],a&=~i}return ua=t,wo(),n}function Ff(e,t){Be=null,_.H=Ti,t===Tl||t===Ro?(t=ud(),rt=3):t===Cs?(t=ud(),rt=4):rt=t===$s?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,yn=t,Ve===null&&(Mt=1,Qo(e,zn(t,e.current)))}function $f(){var e=mn.current;return e===null?!0:(Ke&4194048)===Ke?En===null:(Ke&62914560)===Ke||(Ke&536870912)!==0?e===En:!1}function Wf(){var e=_.H;return _.H=Ti,e===null?Ti:e}function If(){var e=_.A;return _.A=tm,e}function ar(){Mt=4,ka||(Ke&4194048)!==Ke&&mn.current!==null||(Bl=!0),(Da&134217727)===0&&(rl&134217727)===0||mt===null||Aa(mt,Ke,bn,!1)}function vc(e,t,n){var a=tt;tt|=2;var l=Wf(),i=If();(mt!==e||Ke!==t)&&(tr=null,ql(e,t)),t=!1;var c=Mt;e:do try{if(rt!==0&&Ve!==null){var p=Ve,v=yn;switch(rt){case 8:bc(),c=6;break e;case 3:case 2:case 9:case 6:mn.current===null&&(t=!0);var E=rt;if(rt=0,yn=null,Yl(e,p,v,E),n&&Bl){c=0;break e}break;default:E=rt,rt=0,yn=null,Yl(e,p,v,E)}}lm(),c=Mt;break}catch(B){Ff(e,B)}while(!0);return t&&e.shellSuspendCounter++,ea=Ia=null,tt=a,_.H=l,_.A=i,Ve===null&&(mt=null,Ke=0,wo()),c}function lm(){for(;Ve!==null;)Pf(Ve)}function im(e,t){var n=tt;tt|=2;var a=Wf(),l=If();mt!==e||Ke!==t?(tr=null,er=He()+500,ql(e,t)):Bl=Xa(e,t);e:do try{if(rt!==0&&Ve!==null){t=Ve;var i=yn;t:switch(rt){case 1:rt=0,yn=null,Yl(e,t,i,1);break;case 2:case 9:if(sd(i)){rt=0,yn=null,eh(t);break}t=function(){rt!==2&&rt!==9||mt!==e||(rt=7),Yn(e)},i.then(t,t);break e;case 3:rt=7;break e;case 4:rt=5;break e;case 7:sd(i)?(rt=0,yn=null,eh(t)):(rt=0,yn=null,Yl(e,t,i,7));break;case 5:var c=null;switch(Ve.tag){case 26:c=Ve.memoizedState;case 5:case 27:var p=Ve;if(c?jh(c):p.stateNode.complete){rt=0,yn=null;var v=p.sibling;if(v!==null)Ve=v;else{var E=p.return;E!==null?(Ve=E,lr(E)):Ve=null}break t}}rt=0,yn=null,Yl(e,t,i,5);break;case 6:rt=0,yn=null,Yl(e,t,i,6);break;case 8:bc(),Mt=6;break e;default:throw Error(u(462))}}om();break}catch(B){Ff(e,B)}while(!0);return ea=Ia=null,_.H=a,_.A=l,tt=n,Ve!==null?0:(mt=null,Ke=0,wo(),Mt)}function om(){for(;Ve!==null&&!we();)Pf(Ve)}function Pf(e){var t=wf(e.alternate,e,ua);e.memoizedProps=e.pendingProps,t===null?lr(e):Ve=t}function eh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=yf(n,t,t.pendingProps,t.type,void 0,Ke);break;case 11:t=yf(n,t,t.pendingProps,t.type.render,t.ref,Ke);break;case 5:Ls(t);default:Mf(n,t),t=Ve=Wu(t,ua),t=wf(n,t,ua)}e.memoizedProps=e.pendingProps,t===null?lr(e):Ve=t}function Yl(e,t,n,a){ea=Ia=null,Ls(t),Al=null,Si=0;var l=t.return;try{if(J0(e,l,t,n,Ke)){Mt=1,Qo(e,zn(n,e.current)),Ve=null;return}}catch(i){if(l!==null)throw Ve=l,i;Mt=1,Qo(e,zn(n,e.current)),Ve=null;return}t.flags&32768?(Je||a===1?e=!0:Bl||(Ke&536870912)!==0?e=!1:(ka=e=!0,(a===2||a===9||a===3||a===6)&&(a=mn.current,a!==null&&a.tag===13&&(a.flags|=16384))),th(t,e)):lr(t)}function lr(e){var t=e;do{if((t.flags&32768)!==0){th(t,ka);return}e=t.return;var n=W0(t.alternate,t,ua);if(n!==null){Ve=n;return}if(t=t.sibling,t!==null){Ve=t;return}Ve=t=e}while(t!==null);Mt===0&&(Mt=5)}function th(e,t){do{var n=I0(e.alternate,e);if(n!==null){n.flags&=32767,Ve=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Ve=e;return}Ve=e=n}while(e!==null);Mt=6,Ve=null}function nh(e,t,n,a,l,i,c,p,v){e.cancelPendingCommit=null;do ir();while(Nt!==0);if((tt&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(i=t.lanes|t.childLanes,i|=rs,jr(e,n,i,c,p,v),e===mt&&(Ve=mt=null,Ke=0),jl=t,Ta=e,da=n,mc=i,gc=l,Qf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,um(nn,function(){return rh(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=_.T,_.T=null,l=Q.p,Q.p=2,c=tt,tt|=4;try{P0(e,t,n)}finally{tt=c,Q.p=l,_.T=a}}Nt=1,ah(),lh(),ih()}}function ah(){if(Nt===1){Nt=0;var e=Ta,t=jl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=_.T,_.T=null;var a=Q.p;Q.p=2;var l=tt;tt|=4;try{Bf(t,e);var i=Rc,c=Gu(e.containerInfo),p=i.focusedElem,v=i.selectionRange;if(c!==p&&p&&p.ownerDocument&&Yu(p.ownerDocument.documentElement,p)){if(v!==null&&ns(p)){var E=v.start,B=v.end;if(B===void 0&&(B=E),"selectionStart"in p)p.selectionStart=E,p.selectionEnd=Math.min(B,p.value.length);else{var G=p.ownerDocument||document,T=G&&G.defaultView||window;if(T.getSelection){var O=T.getSelection(),ue=p.textContent.length,ke=Math.min(v.start,ue),ft=v.end===void 0?ke:Math.min(v.end,ue);!O.extend&&ke>ft&&(c=ft,ft=ke,ke=c);var k=qu(p,ke),z=qu(p,ft);if(k&&z&&(O.rangeCount!==1||O.anchorNode!==k.node||O.anchorOffset!==k.offset||O.focusNode!==z.node||O.focusOffset!==z.offset)){var D=G.createRange();D.setStart(k.node,k.offset),O.removeAllRanges(),ke>ft?(O.addRange(D),O.extend(z.node,z.offset)):(D.setEnd(z.node,z.offset),O.addRange(D))}}}}for(G=[],O=p;O=O.parentNode;)O.nodeType===1&&G.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<G.length;p++){var j=G[p];j.element.scrollLeft=j.left,j.element.scrollTop=j.top}}yr=!!Ac,Rc=Ac=null}finally{tt=l,Q.p=a,_.T=n}}e.current=t,Nt=2}}function lh(){if(Nt===2){Nt=0;var e=Ta,t=jl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=_.T,_.T=null;var a=Q.p;Q.p=2;var l=tt;tt|=4;try{_f(e,t.alternate,t)}finally{tt=l,Q.p=a,_.T=n}}Nt=3}}function ih(){if(Nt===4||Nt===3){Nt=0,et();var e=Ta,t=jl,n=da,a=Qf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Nt=5:(Nt=0,jl=Ta=null,oh(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(Ea=null),li(n),t=t.stateNode,It&&typeof It.onCommitFiberRoot=="function")try{It.onCommitFiberRoot(Qn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=_.T,l=Q.p,Q.p=2,_.T=null;try{for(var i=e.onRecoverableError,c=0;c<a.length;c++){var p=a[c];i(p.value,{componentStack:p.stack})}}finally{_.T=t,Q.p=l}}(da&3)!==0&&ir(),Yn(e),l=e.pendingLanes,(n&261930)!==0&&(l&42)!==0?e===yc?Ni++:(Ni=0,yc=e):Ni=0,ji(0)}}function oh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,vi(t)))}function ir(){return ah(),lh(),ih(),rh()}function rh(){if(Nt!==5)return!1;var e=Ta,t=mc;mc=0;var n=li(da),a=_.T,l=Q.p;try{Q.p=32>n?32:n,_.T=null,n=gc,gc=null;var i=Ta,c=da;if(Nt=0,jl=Ta=null,da=0,(tt&6)!==0)throw Error(u(331));var p=tt;if(tt|=4,Gf(i.current),jf(i,i.current,c,n),tt=p,ji(0,!1),It&&typeof It.onPostCommitFiberRoot=="function")try{It.onPostCommitFiberRoot(Qn,i)}catch{}return!0}finally{Q.p=l,_.T=a,oh(e,t)}}function sh(e,t,n){t=zn(n,t),t=Fs(e.stateNode,t,2),e=Ca(e,t,2),e!==null&&(Va(e,2),Yn(e))}function st(e,t,n){if(e.tag===3)sh(e,e,n);else for(;t!==null;){if(t.tag===3){sh(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Ea===null||!Ea.has(a))){e=zn(n,e),n=cf(2),a=Ca(t,n,2),a!==null&&(uf(n,a,t,e),Va(a,2),Yn(a));break}}t=t.return}}function xc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new nm;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)||(fc=!0,l.add(n),e=rm.bind(null,e,t,n),t.then(e,e))}function rm(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,mt===e&&(Ke&n)===n&&(Mt===4||Mt===3&&(Ke&62914560)===Ke&&300>He()-Po?(tt&2)===0&&ql(e,0):hc|=n,Nl===Ke&&(Nl=0)),Yn(e)}function ch(e,t){t===0&&(t=ro()),e=Fa(e,t),e!==null&&(Va(e,t),Yn(e))}function sm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ch(e,n)}function cm(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(u(314))}a!==null&&a.delete(t),ch(e,n)}function um(e,t){return Fe(e,t)}var or=null,Gl=null,Sc=!1,rr=!1,Cc=!1,Ra=0;function Yn(e){e!==Gl&&e.next===null&&(Gl===null?or=Gl=e:Gl=Gl.next=e),rr=!0,Sc||(Sc=!0,fm())}function ji(e,t){if(!Cc&&rr){Cc=!0;do for(var n=!1,a=or;a!==null;){if(e!==0){var l=a.pendingLanes;if(l===0)var i=0;else{var c=a.suspendedLanes,p=a.pingedLanes;i=(1<<31-Pt(42|e)+1)-1,i&=l&~(c&~p),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,hh(a,i))}else i=Ke,i=fl(a,a===mt?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||Xa(a,i)||(n=!0,hh(a,i));a=a.next}while(n);Cc=!1}}function dm(){uh()}function uh(){rr=Sc=!1;var e=0;Ra!==0&&Cm()&&(e=Ra);for(var t=He(),n=null,a=or;a!==null;){var l=a.next,i=dh(a,t);i===0?(a.next=null,n===null?or=l:n.next=l,l===null&&(Gl=n)):(n=a,(e!==0||(i&3)!==0)&&(rr=!0)),a=l}Nt!==0&&Nt!==5||ji(e),Ra!==0&&(Ra=0)}function dh(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var c=31-Pt(i),p=1<<c,v=l[c];v===-1?((p&n)===0||(p&a)!==0)&&(l[c]=Nr(p,t)):v<=t&&(e.expiredLanes|=p),i&=~p}if(t=mt,n=Ke,n=fl(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(rt===2||rt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&xe(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Xa(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&xe(a),li(n)){case 2:case 8:n=Bt;break;case 32:n=nn;break;case 268435456:n=Rt;break;default:n=nn}return a=fh.bind(null,e),n=Fe(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&xe(a),e.callbackPriority=2,e.callbackNode=null,2}function fh(e,t){if(Nt!==0&&Nt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(ir()&&e.callbackNode!==n)return null;var a=Ke;return a=fl(e,e===mt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Zf(e,a,t),dh(e,He()),e.callbackNode!=null&&e.callbackNode===n?fh.bind(null,e):null)}function hh(e,t){if(ir())return null;Zf(e,t,!0)}function fm(){zm(function(){(tt&6)!==0?Fe(je,dm):uh()})}function wc(){if(Ra===0){var e=Dl;e===0&&(e=ul,ul<<=1,(ul&261888)===0&&(ul=256)),Ra=e}return Ra}function ph(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:mo(""+e)}function mh(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 hm(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var i=ph((l[Et]||null).action),c=a.submitter;c&&(t=(t=c[Et]||null)?ph(t.formAction):c.getAttribute("formAction"),t!==null&&(i=t,c=null));var p=new vo("action","action",null,a,l);e.push({event:p,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Ra!==0){var v=c?mh(l,c):new FormData(l);Xs(n,{pending:!0,data:v,method:l.method,action:i},null,v)}}else typeof i=="function"&&(p.preventDefault(),v=c?mh(l,c):new FormData(l),Xs(n,{pending:!0,data:v,method:l.method,action:i},i,v))},currentTarget:l}]})}}for(var zc=0;zc<os.length;zc++){var Mc=os[zc],pm=Mc.toLowerCase(),mm=Mc[0].toUpperCase()+Mc.slice(1);On(pm,"on"+mm)}On(Qu,"onAnimationEnd"),On(Ku,"onAnimationIteration"),On(Zu,"onAnimationStart"),On("dblclick","onDoubleClick"),On("focusin","onFocus"),On("focusout","onBlur"),On(R0,"onTransitionRun"),On(_0,"onTransitionStart"),On(O0,"onTransitionCancel"),On(Ju,"onTransitionEnd"),We("onMouseEnter",["mouseout","mouseover"]),We("onMouseLeave",["mouseout","mouseover"]),We("onPointerEnter",["pointerout","pointerover"]),We("onPointerLeave",["pointerout","pointerover"]),$e("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$e("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$e("onBeforeInput",["compositionend","keypress","textInput","paste"]),$e("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$e("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$e("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qi="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(" "),gm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qi));function gh(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 i=void 0;if(t)for(var c=a.length-1;0<=c;c--){var p=a[c],v=p.instance,E=p.currentTarget;if(p=p.listener,v!==i&&l.isPropagationStopped())break e;i=p,l.currentTarget=E;try{i(l)}catch(B){Co(B)}l.currentTarget=null,i=v}else for(c=0;c<a.length;c++){if(p=a[c],v=p.instance,E=p.currentTarget,p=p.listener,v!==i&&l.isPropagationStopped())break e;i=p,l.currentTarget=E;try{i(l)}catch(B){Co(B)}l.currentTarget=null,i=v}}}}function Qe(e,t){var n=t[hl];n===void 0&&(n=t[hl]=new Set);var a=e+"__bubble";n.has(a)||(yh(t,e,2,!1),n.add(a))}function kc(e,t,n){var a=0;t&&(a|=4),yh(n,e,a,t)}var sr="_reactListening"+Math.random().toString(36).slice(2);function Dc(e){if(!e[sr]){e[sr]=!0,De.forEach(function(n){n!=="selectionchange"&&(gm.has(n)||kc(n,!1,e),kc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[sr]||(t[sr]=!0,kc("selectionchange",!1,t))}}function yh(e,t,n,a){switch(Kh(t)){case 2:var l=Vm;break;case 8:l=Qm;break;default:l=Gc}n=l.bind(null,t,n,e),l=void 0,!Zr||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 Ec(e,t,n,a,l){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var c=a.tag;if(c===3||c===4){var p=a.stateNode.containerInfo;if(p===l)break;if(c===4)for(c=a.return;c!==null;){var v=c.tag;if((v===3||v===4)&&c.stateNode.containerInfo===l)return;c=c.return}for(;p!==null;){if(c=Jn(p),c===null)return;if(v=c.tag,v===5||v===6||v===26||v===27){a=i=c;continue e}p=p.parentNode}}a=a.return}Su(function(){var E=i,B=Qr(n),G=[];e:{var T=Fu.get(e);if(T!==void 0){var O=vo,ue=e;switch(e){case"keypress":if(yo(n)===0)break e;case"keydown":case"keyup":O=c0;break;case"focusin":ue="focus",O=Wr;break;case"focusout":ue="blur",O=Wr;break;case"beforeblur":case"afterblur":O=Wr;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=zu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=Wp;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=f0;break;case Qu:case Ku:case Zu:O=e0;break;case Ju:O=p0;break;case"scroll":case"scrollend":O=Fp;break;case"wheel":O=g0;break;case"copy":case"cut":case"paste":O=n0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=ku;break;case"toggle":case"beforetoggle":O=b0}var ke=(t&4)!==0,ft=!ke&&(e==="scroll"||e==="scrollend"),k=ke?T!==null?T+"Capture":null:T;ke=[];for(var z=E,D;z!==null;){var j=z;if(D=j.stateNode,j=j.tag,j!==5&&j!==26&&j!==27||D===null||k===null||(j=si(z,k),j!=null&&ke.push(Yi(z,j,D))),ft)break;z=z.return}0<ke.length&&(T=new O(T,ue,null,n,B),G.push({event:T,listeners:ke}))}}if((t&7)===0){e:{if(T=e==="mouseover"||e==="pointerover",O=e==="mouseout"||e==="pointerout",T&&n!==Vr&&(ue=n.relatedTarget||n.fromElement)&&(Jn(ue)||ue[fn]))break e;if((O||T)&&(T=B.window===B?B:(T=B.ownerDocument)?T.defaultView||T.parentWindow:window,O?(ue=n.relatedTarget||n.toElement,O=E,ue=ue?Jn(ue):null,ue!==null&&(ft=m(ue),ke=ue.tag,ue!==ft||ke!==5&&ke!==27&&ke!==6)&&(ue=null)):(O=null,ue=E),O!==ue)){if(ke=zu,j="onMouseLeave",k="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(ke=ku,j="onPointerLeave",k="onPointerEnter",z="pointer"),ft=O==null?T:te(O),D=ue==null?T:te(ue),T=new ke(j,z+"leave",O,n,B),T.target=ft,T.relatedTarget=D,j=null,Jn(B)===E&&(ke=new ke(k,z+"enter",ue,n,B),ke.target=D,ke.relatedTarget=ft,j=ke),ft=j,O&&ue)t:{for(ke=ym,k=O,z=ue,D=0,j=k;j;j=ke(j))D++;j=0;for(var ze=z;ze;ze=ke(ze))j++;for(;0<D-j;)k=ke(k),D--;for(;0<j-D;)z=ke(z),j--;for(;D--;){if(k===z||z!==null&&k===z.alternate){ke=k;break t}k=ke(k),z=ke(z)}ke=null}else ke=null;O!==null&&bh(G,T,O,ke,!1),ue!==null&&ft!==null&&bh(G,ft,ue,ke,!0)}}e:{if(T=E?te(E):window,O=T.nodeName&&T.nodeName.toLowerCase(),O==="select"||O==="input"&&T.type==="file")var Ie=Lu;else if(_u(T))if(Uu)Ie=E0;else{Ie=k0;var ye=M0}else O=T.nodeName,!O||O.toLowerCase()!=="input"||T.type!=="checkbox"&&T.type!=="radio"?E&&Xr(E.elementType)&&(Ie=Lu):Ie=D0;if(Ie&&(Ie=Ie(e,E))){Ou(G,Ie,n,B);break e}ye&&ye(e,T,E),e==="focusout"&&E&&T.type==="number"&&E.memoizedProps.value!=null&&Gr(T,"number",T.value)}switch(ye=E?te(E):window,e){case"focusin":(_u(ye)||ye.contentEditable==="true")&&(vl=ye,as=E,gi=null);break;case"focusout":gi=as=vl=null;break;case"mousedown":ls=!0;break;case"contextmenu":case"mouseup":case"dragend":ls=!1,Xu(G,n,B);break;case"selectionchange":if(A0)break;case"keydown":case"keyup":Xu(G,n,B)}var qe;if(Pr)e:{switch(e){case"compositionstart":var Ze="onCompositionStart";break e;case"compositionend":Ze="onCompositionEnd";break e;case"compositionupdate":Ze="onCompositionUpdate";break e}Ze=void 0}else bl?Au(e,n)&&(Ze="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Ze="onCompositionStart");Ze&&(Du&&n.locale!=="ko"&&(bl||Ze!=="onCompositionStart"?Ze==="onCompositionEnd"&&bl&&(qe=Cu()):(ma=B,Jr="value"in ma?ma.value:ma.textContent,bl=!0)),ye=cr(E,Ze),0<ye.length&&(Ze=new Mu(Ze,e,null,n,B),G.push({event:Ze,listeners:ye}),qe?Ze.data=qe:(qe=Ru(n),qe!==null&&(Ze.data=qe)))),(qe=x0?S0(e,n):C0(e,n))&&(Ze=cr(E,"onBeforeInput"),0<Ze.length&&(ye=new Mu("onBeforeInput","beforeinput",null,n,B),G.push({event:ye,listeners:Ze}),ye.data=qe)),hm(G,e,E,n,B)}gh(G,t)})}function Yi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function cr(e,t){for(var n=t+"Capture",a=[];e!==null;){var l=e,i=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||i===null||(l=si(e,n),l!=null&&a.unshift(Yi(e,l,i)),l=si(e,t),l!=null&&a.push(Yi(e,l,i))),e.tag===3)return a;e=e.return}return[]}function ym(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function bh(e,t,n,a,l){for(var i=t._reactName,c=[];n!==null&&n!==a;){var p=n,v=p.alternate,E=p.stateNode;if(p=p.tag,v!==null&&v===a)break;p!==5&&p!==26&&p!==27||E===null||(v=E,l?(E=si(n,i),E!=null&&c.unshift(Yi(n,E,v))):l||(E=si(n,i),E!=null&&c.push(Yi(n,E,v)))),n=n.return}c.length!==0&&e.push({event:t,listeners:c})}var bm=/\r\n?/g,vm=/\u0000|\uFFFD/g;function vh(e){return(typeof e=="string"?e:""+e).replace(bm,`
|
|
9
|
+
`).replace(vm,"")}function xh(e,t){return t=vh(t),vh(e)===t}function dt(e,t,n,a,l,i){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ml(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ml(e,""+a);break;case"className":ho(e,"class",a);break;case"tabIndex":ho(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ho(e,n,a);break;case"style":vu(e,a,i);break;case"data":if(t!=="object"){ho(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=mo(""+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 i=="function"&&(n==="formAction"?(t!=="input"&&dt(e,t,"name",l.name,l,null),dt(e,t,"formEncType",l.formEncType,l,null),dt(e,t,"formMethod",l.formMethod,l,null),dt(e,t,"formTarget",l.formTarget,l,null)):(dt(e,t,"encType",l.encType,l,null),dt(e,t,"method",l.method,l,null),dt(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=mo(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=$n);break;case"onScroll":a!=null&&Qe("scroll",e);break;case"onScrollEnd":a!=null&&Qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(u(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=mo(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":Qe("beforetoggle",e),Qe("toggle",e),fo(e,"popover",a);break;case"xlinkActuate":Fn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Fn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Fn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Fn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Fn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Fn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Fn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Fn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Fn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":fo(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=Zp.get(n)||n,fo(e,n,a))}}function Tc(e,t,n,a,l,i){switch(n){case"style":vu(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"children":typeof a=="string"?ml(e,a):(typeof a=="number"||typeof a=="bigint")&&ml(e,""+a);break;case"onScroll":a!=null&&Qe("scroll",e);break;case"onScrollEnd":a!=null&&Qe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=$n);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ae.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(l=n.endsWith("Capture"),t=n.slice(2,l?n.length-7:void 0),i=e[Et]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,l),typeof a=="function")){typeof i!="function"&&i!==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,""):fo(e,n,a)}}}function Qt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",e),Qe("load",e);var a=!1,l=!1,i;for(i in n)if(n.hasOwnProperty(i)){var c=n[i];if(c!=null)switch(i){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:dt(e,t,i,c,n,null)}}l&&dt(e,t,"srcSet",n.srcSet,n,null),a&&dt(e,t,"src",n.src,n,null);return;case"input":Qe("invalid",e);var p=i=c=l=null,v=null,E=null;for(a in n)if(n.hasOwnProperty(a)){var B=n[a];if(B!=null)switch(a){case"name":l=B;break;case"type":c=B;break;case"checked":v=B;break;case"defaultChecked":E=B;break;case"value":i=B;break;case"defaultValue":p=B;break;case"children":case"dangerouslySetInnerHTML":if(B!=null)throw Error(u(137,t));break;default:dt(e,t,a,B,n,null)}}mu(e,i,p,v,E,c,l,!1);return;case"select":Qe("invalid",e),a=c=i=null;for(l in n)if(n.hasOwnProperty(l)&&(p=n[l],p!=null))switch(l){case"value":i=p;break;case"defaultValue":c=p;break;case"multiple":a=p;default:dt(e,t,l,p,n,null)}t=i,n=c,e.multiple=!!a,t!=null?pl(e,!!a,t,!1):n!=null&&pl(e,!!a,n,!0);return;case"textarea":Qe("invalid",e),i=l=a=null;for(c in n)if(n.hasOwnProperty(c)&&(p=n[c],p!=null))switch(c){case"value":a=p;break;case"defaultValue":l=p;break;case"children":i=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(u(91));break;default:dt(e,t,c,p,n,null)}yu(e,a,l,i);return;case"option":for(v in n)n.hasOwnProperty(v)&&(a=n[v],a!=null)&&(v==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":dt(e,t,v,a,n,null));return;case"dialog":Qe("beforetoggle",e),Qe("toggle",e),Qe("cancel",e),Qe("close",e);break;case"iframe":case"object":Qe("load",e);break;case"video":case"audio":for(a=0;a<qi.length;a++)Qe(qi[a],e);break;case"image":Qe("error",e),Qe("load",e);break;case"details":Qe("toggle",e);break;case"embed":case"source":case"link":Qe("error",e),Qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(E in n)if(n.hasOwnProperty(E)&&(a=n[E],a!=null))switch(E){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:dt(e,t,E,a,n,null)}return;default:if(Xr(t)){for(B in n)n.hasOwnProperty(B)&&(a=n[B],a!==void 0&&Tc(e,t,B,a,n,void 0));return}}for(p in n)n.hasOwnProperty(p)&&(a=n[p],a!=null&&dt(e,t,p,a,n,null))}function xm(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,i=null,c=null,p=null,v=null,E=null,B=null;for(O in n){var G=n[O];if(n.hasOwnProperty(O)&&G!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":v=G;default:a.hasOwnProperty(O)||dt(e,t,O,null,a,G)}}for(var T in a){var O=a[T];if(G=n[T],a.hasOwnProperty(T)&&(O!=null||G!=null))switch(T){case"type":i=O;break;case"name":l=O;break;case"checked":E=O;break;case"defaultChecked":B=O;break;case"value":c=O;break;case"defaultValue":p=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(u(137,t));break;default:O!==G&&dt(e,t,T,O,a,G)}}Yr(e,c,p,v,E,B,i,l);return;case"select":O=c=p=T=null;for(i in n)if(v=n[i],n.hasOwnProperty(i)&&v!=null)switch(i){case"value":break;case"multiple":O=v;default:a.hasOwnProperty(i)||dt(e,t,i,null,a,v)}for(l in a)if(i=a[l],v=n[l],a.hasOwnProperty(l)&&(i!=null||v!=null))switch(l){case"value":T=i;break;case"defaultValue":p=i;break;case"multiple":c=i;default:i!==v&&dt(e,t,l,i,a,v)}t=p,n=c,a=O,T!=null?pl(e,!!n,T,!1):!!a!=!!n&&(t!=null?pl(e,!!n,t,!0):pl(e,!!n,n?[]:"",!1));return;case"textarea":O=T=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:dt(e,t,p,null,a,l)}for(c in a)if(l=a[c],i=n[c],a.hasOwnProperty(c)&&(l!=null||i!=null))switch(c){case"value":T=l;break;case"defaultValue":O=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(u(91));break;default:l!==i&&dt(e,t,c,l,a,i)}gu(e,T,O);return;case"option":for(var ue in n)T=n[ue],n.hasOwnProperty(ue)&&T!=null&&!a.hasOwnProperty(ue)&&(ue==="selected"?e.selected=!1:dt(e,t,ue,null,a,T));for(v in a)T=a[v],O=n[v],a.hasOwnProperty(v)&&T!==O&&(T!=null||O!=null)&&(v==="selected"?e.selected=T&&typeof T!="function"&&typeof T!="symbol":dt(e,t,v,T,a,O));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ke in n)T=n[ke],n.hasOwnProperty(ke)&&T!=null&&!a.hasOwnProperty(ke)&&dt(e,t,ke,null,a,T);for(E in a)if(T=a[E],O=n[E],a.hasOwnProperty(E)&&T!==O&&(T!=null||O!=null))switch(E){case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(u(137,t));break;default:dt(e,t,E,T,a,O)}return;default:if(Xr(t)){for(var ft in n)T=n[ft],n.hasOwnProperty(ft)&&T!==void 0&&!a.hasOwnProperty(ft)&&Tc(e,t,ft,void 0,a,T);for(B in a)T=a[B],O=n[B],!a.hasOwnProperty(B)||T===O||T===void 0&&O===void 0||Tc(e,t,B,T,a,O);return}}for(var k in n)T=n[k],n.hasOwnProperty(k)&&T!=null&&!a.hasOwnProperty(k)&&dt(e,t,k,null,a,T);for(G in a)T=a[G],O=n[G],!a.hasOwnProperty(G)||T===O||T==null&&O==null||dt(e,t,G,T,a,O)}function Sh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Sm(){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],i=l.transferSize,c=l.initiatorType,p=l.duration;if(i&&p&&Sh(c)){for(c=0,p=l.responseEnd,a+=1;a<n.length;a++){var v=n[a],E=v.startTime;if(E>p)break;var B=v.transferSize,G=v.initiatorType;B&&Sh(G)&&(v=v.responseEnd,c+=B*(v<p?1:(p-E)/(v-E)))}if(--a,t+=8*(i+c)/(l.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Ac=null,Rc=null;function ur(e){return e.nodeType===9?e:e.ownerDocument}function Ch(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 wh(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 _c(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Oc=null;function Cm(){var e=window.event;return e&&e.type==="popstate"?e===Oc?!1:(Oc=e,!0):(Oc=null,!1)}var zh=typeof setTimeout=="function"?setTimeout:void 0,wm=typeof clearTimeout=="function"?clearTimeout:void 0,Mh=typeof Promise=="function"?Promise:void 0,zm=typeof queueMicrotask=="function"?queueMicrotask:typeof Mh<"u"?function(e){return Mh.resolve(null).then(e).catch(Mm)}:zh;function Mm(e){setTimeout(function(){throw e})}function _a(e){return e==="head"}function kh(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),Kl(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")Gi(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Gi(n);for(var i=n.firstChild;i;){var c=i.nextSibling,p=i.nodeName;i[Qa]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=c}}else n==="body"&&Gi(e.ownerDocument.body);n=l}while(n);Kl(t)}function Dh(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 Lc(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":Lc(n),oi(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function km(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[Qa])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==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(i=e.getAttribute("src"),(i!==(l.src==null?null:l.src)||e.getAttribute("type")!==(l.type==null?null:l.type)||e.getAttribute("crossorigin")!==(l.crossOrigin==null?null:l.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=l.name==null?null:""+l.name;if(l.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Tn(e.nextSibling),e===null)break}return null}function Dm(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Tn(e.nextSibling),e===null))return null;return e}function Eh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Tn(e.nextSibling),e===null))return null;return e}function Uc(e){return e.data==="$?"||e.data==="$~"}function Hc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Em(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 Tn(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 Bc=null;function Th(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Tn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Ah(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 Rh(e,t,n){switch(t=ur(n),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function Gi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);oi(e)}var An=new Map,_h=new Set;function dr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var fa=Q.d;Q.d={f:Tm,r:Am,D:Rm,C:_m,L:Om,m:Lm,X:Hm,S:Um,M:Bm};function Tm(){var e=fa.f(),t=nr();return e||t}function Am(e){var t=ce(e);t!==null&&t.tag===5&&t.type==="form"?Jd(t):fa.r(e)}var Xl=typeof document>"u"?null:document;function Oh(e,t,n){var a=Xl;if(a&&typeof t=="string"&&t){var l=Cn(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),_h.has(l)||(_h.add(l),e={rel:e,crossOrigin:n,href:t},a.querySelector(l)===null&&(t=a.createElement("link"),Qt(t,"link",e),he(t),a.head.appendChild(t)))}}function Rm(e){fa.D(e),Oh("dns-prefetch",e,null)}function _m(e,t){fa.C(e,t),Oh("preconnect",e,t)}function Om(e,t,n){fa.L(e,t,n);var a=Xl;if(a&&e&&t){var l='link[rel="preload"][as="'+Cn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+Cn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+Cn(n.imageSizes)+'"]')):l+='[href="'+Cn(e)+'"]';var i=l;switch(t){case"style":i=Vl(e);break;case"script":i=Ql(e)}An.has(i)||(e=M({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),An.set(i,e),a.querySelector(l)!==null||t==="style"&&a.querySelector(Xi(i))||t==="script"&&a.querySelector(Vi(i))||(t=a.createElement("link"),Qt(t,"link",e),he(t),a.head.appendChild(t)))}}function Lm(e,t){fa.m(e,t);var n=Xl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+Cn(a)+'"][href="'+Cn(e)+'"]',i=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Ql(e)}if(!An.has(i)&&(e=M({rel:"modulepreload",href:e},t),An.set(i,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Vi(i)))return}a=n.createElement("link"),Qt(a,"link",e),he(a),n.head.appendChild(a)}}}function Um(e,t,n){fa.S(e,t,n);var a=Xl;if(a&&e){var l=fe(a).hoistableStyles,i=Vl(e);t=t||"default";var c=l.get(i);if(!c){var p={loading:0,preload:null};if(c=a.querySelector(Xi(i)))p.loading=5;else{e=M({rel:"stylesheet",href:e,"data-precedence":t},n),(n=An.get(i))&&Nc(e,n);var v=c=a.createElement("link");he(v),Qt(v,"link",e),v._p=new Promise(function(E,B){v.onload=E,v.onerror=B}),v.addEventListener("load",function(){p.loading|=1}),v.addEventListener("error",function(){p.loading|=2}),p.loading|=4,fr(c,t,a)}c={type:"stylesheet",instance:c,count:1,state:p},l.set(i,c)}}}function Hm(e,t){fa.X(e,t);var n=Xl;if(n&&e){var a=fe(n).hoistableScripts,l=Ql(e),i=a.get(l);i||(i=n.querySelector(Vi(l)),i||(e=M({src:e,async:!0},t),(t=An.get(l))&&jc(e,t),i=n.createElement("script"),he(i),Qt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(l,i))}}function Bm(e,t){fa.M(e,t);var n=Xl;if(n&&e){var a=fe(n).hoistableScripts,l=Ql(e),i=a.get(l);i||(i=n.querySelector(Vi(l)),i||(e=M({src:e,async:!0,type:"module"},t),(t=An.get(l))&&jc(e,t),i=n.createElement("script"),he(i),Qt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(l,i))}}function Lh(e,t,n,a){var l=(l=Te.current)?dr(l):null;if(!l)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Vl(n.href),n=fe(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=Vl(n.href);var i=fe(l).hoistableStyles,c=i.get(e);if(c||(l=l.ownerDocument||l,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,c),(i=l.querySelector(Xi(e)))&&!i._p&&(c.instance=i,c.state.loading=5),An.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},An.set(e,n),i||Nm(l,e,n,c.state))),t&&a===null)throw Error(u(528,""));return c}if(t&&a!==null)throw Error(u(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ql(n),n=fe(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(u(444,e))}}function Vl(e){return'href="'+Cn(e)+'"'}function Xi(e){return'link[rel="stylesheet"]['+e+"]"}function Uh(e){return M({},e,{"data-precedence":e.precedence,precedence:null})}function Nm(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}),Qt(t,"link",n),he(t),e.head.appendChild(t))}function Ql(e){return'[src="'+Cn(e)+'"]'}function Vi(e){return"script[async]"+e}function Hh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Cn(n.href)+'"]');if(a)return t.instance=a,he(a),a;var l=M({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),he(a),Qt(a,"style",l),fr(a,n.precedence,e),t.instance=a;case"stylesheet":l=Vl(n.href);var i=e.querySelector(Xi(l));if(i)return t.state.loading|=4,t.instance=i,he(i),i;a=Uh(n),(l=An.get(l))&&Nc(a,l),i=(e.ownerDocument||e).createElement("link"),he(i);var c=i;return c._p=new Promise(function(p,v){c.onload=p,c.onerror=v}),Qt(i,"link",a),t.state.loading|=4,fr(i,n.precedence,e),t.instance=i;case"script":return i=Ql(n.src),(l=e.querySelector(Vi(i)))?(t.instance=l,he(l),l):(a=n,(l=An.get(i))&&(a=M({},n),jc(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),he(l),Qt(l,"link",a),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,fr(a,n.precedence,e));return t.instance}function fr(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,i=l,c=0;c<a.length;c++){var p=a[c];if(p.dataset.precedence===t)i=p;else if(i!==l)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Nc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function jc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var hr=null;function Bh(e,t,n){if(hr===null){var a=new Map,l=hr=new Map;l.set(n,a)}else l=hr,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 i=n[l];if(!(i[Qa]||i[St]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var c=i.getAttribute(t)||"";c=e+c;var p=a.get(c);p?p.push(i):a.set(c,[i])}}return a}function Nh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function jm(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 jh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function qm(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=Vl(a.href),i=t.querySelector(Xi(l));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=pr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,he(i);return}i=t.ownerDocument||t,a=Uh(a),(l=An.get(l))&&Nc(a,l),i=i.createElement("link"),he(i);var c=i;c._p=new Promise(function(p,v){c.onload=p,c.onerror=v}),Qt(i,"link",a),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=pr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var qc=0;function Ym(e,t){return e.stylesheets&&e.count===0&&gr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&gr(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&qc===0&&(qc=62500*Sm());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&gr(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>qc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function pr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)gr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var mr=null;function gr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mr=new Map,t.forEach(Gm,e),mr=null,pr.call(e))}function Gm(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]"),i=0;i<l.length;i++){var c=l[i];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(n.set(c.dataset.precedence,c),a=c)}a&&n.set(null,a)}l=t.instance,c=l.getAttribute("data-precedence"),i=n.get(c)||a,i===a&&n.set(null,l),n.set(c,l),this.count++,a=pr.bind(this),l.addEventListener("load",a),l.addEventListener("error",a),i?i.parentNode.insertBefore(l,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var Qi={$$typeof:P,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function Xm(e,t,n,a,l,i,c,p,v){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=ni(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ni(0),this.hiddenUpdates=ni(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=i,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=v,this.incompleteTransitions=new Map}function qh(e,t,n,a,l,i,c,p,v,E,B,G){return e=new Xm(e,t,n,c,v,E,B,G,p),t=1,i===!0&&(t|=24),i=pn(3,null,null,t),e.current=i,i.stateNode=e,t=vs(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:n,cache:t},ws(i),e}function Yh(e){return e?(e=Cl,e):Cl}function Gh(e,t,n,a,l,i){l=Yh(l),a.context===null?a.context=l:a.pendingContext=l,a=Sa(t),a.payload={element:n},i=i===void 0?null:i,i!==null&&(a.callback=i),n=Ca(e,a,t),n!==null&&(cn(n,e,t),wi(n,e,t))}function Xh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Yc(e,t){Xh(e,t),(e=e.alternate)&&Xh(e,t)}function Vh(e){if(e.tag===13||e.tag===31){var t=Fa(e,67108864);t!==null&&cn(t,e,67108864),Yc(e,67108864)}}function Qh(e){if(e.tag===13||e.tag===31){var t=vn();t=Zn(t);var n=Fa(e,t);n!==null&&cn(n,e,t),Yc(e,t)}}var yr=!0;function Vm(e,t,n,a){var l=_.T;_.T=null;var i=Q.p;try{Q.p=2,Gc(e,t,n,a)}finally{Q.p=i,_.T=l}}function Qm(e,t,n,a){var l=_.T;_.T=null;var i=Q.p;try{Q.p=8,Gc(e,t,n,a)}finally{Q.p=i,_.T=l}}function Gc(e,t,n,a){if(yr){var l=Xc(a);if(l===null)Ec(e,t,a,br,n),Zh(e,a);else if(Zm(l,e,t,n,a))a.stopPropagation();else if(Zh(e,a),t&4&&-1<Km.indexOf(e)){for(;l!==null;){var i=ce(l);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var c=Kn(i.pendingLanes);if(c!==0){var p=i;for(p.pendingLanes|=2,p.entangledLanes|=2;c;){var v=1<<31-Pt(c);p.entanglements[1]|=v,c&=~v}Yn(i),(tt&6)===0&&(er=He()+500,ji(0))}}break;case 31:case 13:p=Fa(i,2),p!==null&&cn(p,i,2),nr(),Yc(i,2)}if(i=Xc(a),i===null&&Ec(e,t,a,br,n),i===l)break;l=i}l!==null&&a.stopPropagation()}else Ec(e,t,a,null,n)}}function Xc(e){return e=Qr(e),Vc(e)}var br=null;function Vc(e){if(br=null,e=Jn(e),e!==null){var t=m(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=S(t),e!==null)return e;e=null}else if(n===31){if(e=A(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 br=e,null}function Kh(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(Xe()){case je:return 2;case Bt:return 8;case nn:case ti:return 32;case Rt:return 268435456;default:return 32}default:return 32}}var Qc=!1,Oa=null,La=null,Ua=null,Ki=new Map,Zi=new Map,Ha=[],Km="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 Zh(e,t){switch(e){case"focusin":case"focusout":Oa=null;break;case"dragenter":case"dragleave":La=null;break;case"mouseover":case"mouseout":Ua=null;break;case"pointerover":case"pointerout":Ki.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zi.delete(t.pointerId)}}function Ji(e,t,n,a,l,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:i,targetContainers:[l]},t!==null&&(t=ce(t),t!==null&&Vh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Zm(e,t,n,a,l){switch(t){case"focusin":return Oa=Ji(Oa,e,t,n,a,l),!0;case"dragenter":return La=Ji(La,e,t,n,a,l),!0;case"mouseover":return Ua=Ji(Ua,e,t,n,a,l),!0;case"pointerover":var i=l.pointerId;return Ki.set(i,Ji(Ki.get(i)||null,e,t,n,a,l)),!0;case"gotpointercapture":return i=l.pointerId,Zi.set(i,Ji(Zi.get(i)||null,e,t,n,a,l)),!0}return!1}function Jh(e){var t=Jn(e.target);if(t!==null){var n=m(t);if(n!==null){if(t=n.tag,t===13){if(t=S(n),t!==null){e.blockedOn=t,_n(e.priority,function(){Qh(n)});return}}else if(t===31){if(t=A(n),t!==null){e.blockedOn=t,_n(e.priority,function(){Qh(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 vr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Vr=a,n.target.dispatchEvent(a),Vr=null}else return t=ce(n),t!==null&&Vh(t),e.blockedOn=n,!1;t.shift()}return!0}function Fh(e,t,n){vr(e)&&n.delete(t)}function Jm(){Qc=!1,Oa!==null&&vr(Oa)&&(Oa=null),La!==null&&vr(La)&&(La=null),Ua!==null&&vr(Ua)&&(Ua=null),Ki.forEach(Fh),Zi.forEach(Fh)}function xr(e,t){e.blockedOn===t&&(e.blockedOn=null,Qc||(Qc=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Jm)))}var Sr=null;function $h(e){Sr!==e&&(Sr=e,o.unstable_scheduleCallback(o.unstable_NormalPriority,function(){Sr===e&&(Sr=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],l=e[t+2];if(typeof a!="function"){if(Vc(a||n)===null)continue;break}var i=ce(n);i!==null&&(e.splice(t,3),t-=3,Xs(i,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function Kl(e){function t(v){return xr(v,e)}Oa!==null&&xr(Oa,e),La!==null&&xr(La,e),Ua!==null&&xr(Ua,e),Ki.forEach(t),Zi.forEach(t);for(var n=0;n<Ha.length;n++){var a=Ha[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ha.length&&(n=Ha[0],n.blockedOn===null);)Jh(n),n.blockedOn===null&&Ha.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var l=n[a],i=n[a+1],c=l[Et]||null;if(typeof i=="function")c||$h(n);else if(c){var p=null;if(i&&i.hasAttribute("formAction")){if(l=i,c=i[Et]||null)p=c.formAction;else if(Vc(l)!==null)continue}else p=c.action;typeof p=="function"?n[a+1]=p:(n.splice(a,3),a-=3),$h(n)}}}function Wh(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(c){return l=c})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.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 Kc(e){this._internalRoot=e}Cr.prototype.render=Kc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var n=t.current,a=vn();Gh(n,a,e,t,null,null)},Cr.prototype.unmount=Kc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Gh(e.current,2,null,e,null,null),nr(),t[fn]=null}};function Cr(e){this._internalRoot=e}Cr.prototype.unstable_scheduleHydration=function(e){if(e){var t=uo();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ha.length&&t!==0&&t<Ha[n].priority;n++);Ha.splice(n,0,e),n===0&&Jh(e)}};var Ih=r.version;if(Ih!=="19.2.4")throw Error(u(527,Ih,"19.2.4"));Q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=g(t),e=e!==null?R(e):null,e=e===null?null:e.stateNode,e};var Fm={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:_,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wr.isDisabled&&wr.supportsFiber)try{Qn=wr.inject(Fm),It=wr}catch{}}return Wi.createRoot=function(e,t){if(!h(e))throw Error(u(299));var n=!1,a="",l=lf,i=of,c=rf;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&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=qh(e,1,!1,null,null,n,a,null,l,i,c,Wh),e[fn]=t.current,Dc(e),new Kc(t)},Wi.hydrateRoot=function(e,t,n){if(!h(e))throw Error(u(299));var a=!1,l="",i=lf,c=of,p=rf,v=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(p=n.onRecoverableError),n.formState!==void 0&&(v=n.formState)),t=qh(e,1,!0,t,n??null,a,l,v,i,c,p,Wh),t.context=Yh(null),n=t.current,a=vn(),a=Zn(a),l=Sa(a),l.callback=null,Ca(n,l,a),n=a,t.current.lanes=n,Va(t,n),Yn(t),e[fn]=t.current,Dc(e),new Cr(t)},Wi.version="19.2.4",Wi}var bp;function t1(){if(bp)return Ic.exports;bp=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(r){console.error(r)}}return o(),Ic.exports=e1(),Ic.exports}var n1=t1(),vp=function(r,f){var u=arguments;if(f==null||!io.call(f,"css"))return w.createElement.apply(void 0,u);var h=u.length,m=new Array(h);m[0]=du,m[1]=uu(r,f);for(var S=2;S<h;S++)m[S]=u[S];return w.createElement.apply(null,m)};(function(o){var r;r||(r=o.JSX||(o.JSX={}))})(vp||(vp={}));function y(){for(var o=arguments.length,r=new Array(o),f=0;f<o;f++)r[f]=arguments[f];return Lp(r)}function dn(){var o=y.apply(void 0,arguments),r="animation-"+o.name;return{name:r,styles:"@keyframes "+r+"{"+o.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const a1={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},l1={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:a1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestDownload:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},deleteOrphans:async()=>{}},Hp=w.createContext(l1);function Il(){return w.useContext(Hp)}const oo="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Ubuntu, sans-serif",d={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"},J={xs:"13px",sm:"14px",base:"16px",lg:"19px",xl:"22px"},ei=y("font-family:",oo,";font-size:",J.base,";line-height:1.5;color:",d.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;}",""),i1=dn`
|
|
10
|
+
from { opacity: 0; }
|
|
11
|
+
to { opacity: 1; }
|
|
12
|
+
`,o1=dn`
|
|
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
|
+
`,r1=dn`
|
|
22
|
+
from { transform: rotate(0deg); }
|
|
23
|
+
to { transform: rotate(360deg); }
|
|
24
|
+
`,Ee={overlay:y("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",i1," 0.15s ease-out;font-family:",oo,";",""),modal:y(ei," background-color:",d.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:",o1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",J.lg,";font-weight:600;color:",d.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"5e7rpo",styles:"padding:12px 24px 24px"},message:y("font-size:",J.base,";color:",d.textSecondary,";margin:0;line-height:1.6;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",d.border,";background-color:",d.background,";",""),btn:y("padding:10px 18px;font-size:",J.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",d.surface,";border:1px solid ",d.border,";color:",d.text,";&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),btnConfirm:y("background-color:",d.primary,";border:1px solid ",d.primary,";color:white;&:hover{background-color:",d.primaryHover,";border-color:",d.primaryHover,";}",""),btnDanger:y("background-color:",d.danger,";border:1px solid ",d.danger,";color:white;&:hover{background-color:",d.dangerHover,";border-color:",d.dangerHover,";}","")};function Pi({title:o,message:r,confirmLabel:f="Confirm",cancelLabel:u="Cancel",variant:h="default",onConfirm:m,onCancel:S}){return s("div",{css:Ee.overlay,onClick:S,children:b("div",{css:Ee.modal,onClick:A=>A.stopPropagation(),children:[s("div",{css:Ee.header,children:s("h3",{css:Ee.title,children:o})}),s("div",{css:Ee.body,children:s("p",{css:Ee.message,children:r})}),b("div",{css:Ee.footer,children:[s("button",{css:[Ee.btn,Ee.btnCancel,"",""],onClick:S,children:u}),s("button",{css:[Ee.btn,h==="danger"?Ee.btnDanger:Ee.btnConfirm,"",""],onClick:m,children:f})]})]})})}const s1={input:y("width:100%;padding:10px 12px;font-size:",J.base,";border:1px solid ",d.border,";border-radius:6px;background:",d.surface,";color:",d.text,";margin-top:12px;transition:all 0.15s ease;&:focus{outline:none;border-color:",d.primary,";box-shadow:0 0 0 2px ",d.primaryLight,";}&::placeholder{color:",d.textMuted,";}","")};function Er({title:o,message:r,inputLabel:f,defaultValue:u="",placeholder:h,confirmLabel:m="Confirm",cancelLabel:S="Cancel",isLoading:A=!1,loadingLabel:C="Processing...",onConfirm:g,onCancel:R}){const[M,q]=it.useState(u),Y=H=>{H.preventDefault(),M.trim()&&!A&&g(M.trim())};return s("div",{css:Ee.overlay,onClick:A?void 0:R,children:s("div",{css:Ee.modal,onClick:H=>H.stopPropagation(),children:b("form",{onSubmit:Y,children:[s("div",{css:Ee.header,children:s("h3",{css:Ee.title,children:o})}),b("div",{css:Ee.body,children:[r&&s("p",{css:Ee.message,children:r}),f&&s("label",{css:Ee.message,children:f}),s("input",{css:s1.input,type:"text",value:M,onChange:H=>q(H.target.value),placeholder:h,autoFocus:!0,disabled:A})]}),b("div",{css:Ee.footer,children:[s("button",{type:"button",css:[Ee.btn,Ee.btnCancel,"",""],onClick:R,disabled:A,children:S}),s("button",{type:"submit",css:[Ee.btn,Ee.btnConfirm,"",""],disabled:!M.trim()||A,children:A?b(ht,{children:[s("span",{css:y("display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:",r1," 0.75s linear infinite;margin-right:6px;","")}),C]}):m})]})]})})})}function fu({title:o,message:r,buttonLabel:f="OK",onClose:u}){return s("div",{css:Ee.overlay,onClick:u,children:b("div",{css:Ee.modal,onClick:h=>h.stopPropagation(),children:[s("div",{css:Ee.header,children:s("h3",{css:Ee.title,children:o})}),s("div",{css:Ee.body,children:s("p",{css:Ee.message,children:r})}),s("div",{css:Ee.footer,children:s("button",{css:[Ee.btn,Ee.btnConfirm,"",""],onClick:u,children:f})})]})})}const Na={progressContainer:{name:"yz1nei",styles:"margin-top:16px"},progressBar:y("width:100%;height:8px;background-color:",d.background,";border-radius:4px;overflow:hidden;margin-bottom:12px;",""),progressFill:y("height:100%;background:linear-gradient(90deg, ",d.primary,", ",d.primaryHover,");border-radius:4px;transition:width 0.3s ease;",""),progressText:y("font-size:",J.sm,";color:",d.textSecondary,";margin:0;display:flex;justify-content:space-between;align-items:center;",""),currentFile:y("font-size:",J.xs,";color:",d.textMuted,";margin:8px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),errorList:{name:"1lw22n1",styles:"margin-top:12px;padding:12px;background:#fef2f2;border:1px solid #fecaca;border-radius:6px;max-height:200px;overflow-y:auto"},errorItem:y("font-size:",J.xs,";color:#991b1b;margin:0 0 4px;&:last-child{margin-bottom:0;}","")};function cl({title:o,progress:r,onClose:f,onDeleteOrphans:u,onStop:h}){const m=r.status==="complete",S=r.status==="error",A=r.status==="stopped",C=r.status==="stopping",g=m||S||A,R=!g||C;return s("div",{css:Ee.overlay,children:b("div",{css:Ee.modal,onClick:M=>M.stopPropagation(),children:[s("div",{css:Ee.header,children:s("h3",{css:Ee.title,children:o})}),s("div",{css:Ee.body,children:S?s("p",{css:Ee.message,children:r.message||"An error occurred"}):A?b("p",{css:Ee.message,children:["Processing stopped. Processed ",r.processed??r.current," image",(r.processed??r.current)!==1?"s":""," before stopping."]}):m?b(ht,{children:[b("p",{css:Ee.message,children:[r.message?r.message:r.isMove?b(ht,{children:["Moved ",r.processed," file",r.processed!==1?"s":"",".",r.errors!==void 0&&r.errors>0?b(ht,{children:[" ",r.errors," error",r.errors!==1?"s":""," occurred."]}):null]}):r.isScan?b(ht,{children:[r.alreadyProcessed!==void 0&&r.alreadyProcessed>0?b(ht,{children:[r.alreadyProcessed," image",r.alreadyProcessed!==1?"s":""," already exist. "]}):null,"Scanned ",r.processed," new image",r.processed!==1?"s":"",".",r.orphanedEntries!==void 0&&r.orphanedEntries>0?b(ht,{children:[" Removed ",r.orphanedEntries," orphaned entr",r.orphanedEntries!==1?"ies":"y","."]}):null,r.pendingUpdates!==void 0&&r.pendingUpdates>0?b(ht,{children:[" ",r.pendingUpdates," file",r.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):b(ht,{children:["Processed ",r.processed," new image",r.processed!==1?"s":"",".",r.alreadyProcessed!==void 0&&r.alreadyProcessed>0?b(ht,{children:[" ",r.alreadyProcessed," already processed."]}):null]}),r.orphansRemoved!==void 0&&r.orphansRemoved>0?b(ht,{children:[" Removed ",r.orphansRemoved," orphaned thumbnail",r.orphansRemoved!==1?"s":"","."]}):null]}),r.errorMessages&&r.errorMessages.length>0&&b("div",{css:Na.errorList,children:[r.errorMessages.slice(0,10).map((M,q)=>s("p",{css:Na.errorItem,children:M},q)),r.errorMessages.length>10&&b("p",{css:Na.errorItem,children:["...and ",r.errorMessages.length-10," more"]})]})]}):b(ht,{children:[s("p",{css:Ee.message,children:r.status==="cleanup"?r.message||"Cleaning up...":r.message||"Processing..."}),b("div",{css:Na.progressContainer,children:[s("div",{css:Na.progressBar,children:s("div",{css:Na.progressFill,style:{width:`${r.percent}%`}})}),b("div",{css:Na.progressText,children:[b("span",{children:[r.current," of ",r.total]}),b("span",{children:[r.percent,"%"]})]}),r.currentFile&&s("p",{css:Na.currentFile,title:r.currentFile,children:r.currentFile})]})]})}),b("div",{css:Ee.footer,children:[R&&h&&s("button",{css:[Ee.btn,Ee.btnDanger,"",""],onClick:h,disabled:r.status==="stopping",children:r.status==="stopping"?"Stopping...":"Stop"}),g&&r.orphanedFiles&&r.orphanedFiles.length>0&&u&&b("button",{css:[Ee.btn,Ee.btnDanger,"",""],onClick:u,children:["Delete ",r.orphanedFiles.length," Orphan",r.orphanedFiles.length!==1?"s":""]}),g&&s("button",{css:[Ee.btn,Ee.btnConfirm,"",""],onClick:f,children:"Done"})]})]})})}function Bp(o){const{setShowProgress:r,setProgressTitle:f,setProgressState:u,triggerRefresh:h}=o,m=w.useRef(null),S=w.useRef(!1),A=w.useRef(!1),C=w.useRef(null),g=w.useCallback(()=>{m.current&&m.current.abort()},[]);return{execute:w.useCallback(async M=>{const{endpoint:q,body:Y,title:H,onComplete:X,onError:ee}=M;if(S.current){console.warn("Streaming operation already in progress");return}S.current=!0,A.current=!1;const re=`${q.split("/").pop()?.replace("-stream","")||"op"}-${Date.now()}-${Math.random().toString(36).slice(2)}`;C.current=re;const P=new AbortController;m.current=P;const me=async()=>{A.current=!0,u(N=>({...N,status:"stopping"}));try{await fetch("/api/studio/cancel-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationId:re})})}catch{}};P.signal.addEventListener("abort",me),f(H),r(!0),u({current:0,total:0,percent:0,status:"processing",message:`Starting ${H.toLowerCase()}...`});try{const N=await fetch(q,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...Y,operationId:re})});if(!N.ok){const U=await N.json().catch(()=>({}));throw new Error(U.error||`Request failed: ${N.status}`)}if(!N.body)throw new Error("No response body");const oe=N.body.getReader(),V=new TextDecoder;let ie="";try{for(;;){const{done:U,value:ne}=await oe.read();if(U)break;ie+=V.decode(ne,{stream:!0});const I=ie.split(`
|
|
25
|
+
|
|
26
|
+
`);ie=I.pop()||"";for(const de of I)if(de.startsWith("data: "))try{const $=JSON.parse(de.slice(6));if($.type==="start")u(Se=>({...Se,total:$.total||Se.total}));else if($.type==="progress")u({current:$.current||0,total:$.total||0,percent:$.percent||Math.round(($.current||0)/($.total||1)*100),status:"processing",currentFile:$.currentFile,message:$.message});else if($.type==="cleanup")u(Se=>({...Se,status:"cleanup",message:$.message}));else if($.type==="complete"){const Se=$.cancelled===!0,Ye=$.processed??$.moved??$.renamed??$.pushed??$.downloaded??$.added??$.imported??$.deleted??$.current??0;u({current:Ye,total:Ye,percent:100,status:Se?"stopped":$.errors&&$.errors>0?"error":"complete",message:$.message,processed:Ye,errors:$.errors,orphanedFiles:$.orphanedFiles}),h(),X?.($)}else $.type==="error"&&(u(Se=>({...Se,status:"error",message:$.message})),ee?.($.message||"Unknown error"))}catch{}}}catch(U){if(!A.current)throw U}finally{P.signal.removeEventListener("abort",me)}}catch(N){if(!A.current){const oe=N instanceof Error?N.message:"Operation failed";console.error(`${H} error:`,N),u({current:0,total:0,percent:0,status:"error",message:oe}),ee?.(oe)}}finally{S.current=!1,m.current=null,C.current=null}},[r,f,u,h]),stop:g,get isRunning(){return S.current}}}const c1=dn`
|
|
27
|
+
from { opacity: 0; }
|
|
28
|
+
to { opacity: 1; }
|
|
29
|
+
`,u1=dn`
|
|
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
|
+
`,kt={overlay:y("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",c1," 0.15s ease-out;font-family:",oo,";",""),modal:y(ei," background-color:",d.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:",u1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",J.lg,";font-weight:600;color:",d.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"zizupt",styles:"padding:12px 24px 24px;flex:1;overflow-y:auto;min-height:200px;max-height:400px"},message:y("font-size:",J.base,";color:",d.textSecondary,";margin:0 0 16px;line-height:1.6;",""),folderList:{name:"1axgfg3",styles:"display:flex;flex-direction:column;gap:0"},folderItem:y("display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:6px;cursor:pointer;transition:all 0.15s ease;border:1px solid transparent;position:relative;&:hover{background-color:",d.surfaceHover,";}",""),treeIndent:{name:"197dxto",styles:"display:flex;align-items:center;height:100%"},treeLine:y("width:16px;height:100%;position:relative;flex-shrink:0;&::before{content:'';position:absolute;left:8px;top:0;bottom:50%;width:0;border-left:1px dashed ",d.textSecondary,";}&::after{content:'';position:absolute;left:8px;top:50%;width:8px;height:0;border-top:1px dashed ",d.textSecondary,";}",""),folderItemSelected:y("background-color:",d.primaryLight,";border-color:",d.primary,";&:hover{background-color:",d.primaryLight,";}",""),folderItemDisabled:{name:"181lhkw",styles:"opacity:0.5;cursor:not-allowed;&:hover{background-color:transparent;}"},folderIcon:{name:"17bs1oo",styles:"width:20px;height:20px;color:#f9935e;flex-shrink:0"},folderName:y("font-size:",J.base,";color:",d.text,";flex:1;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",d.border,";background-color:",d.background,";",""),btn:y("padding:10px 18px;font-size:",J.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",d.surface,";border:1px solid ",d.border,";color:",d.text,";&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),btnConfirm:y("background-color:",d.primary,";border:1px solid ",d.primary,";color:white;&:hover:not(:disabled){background-color:",d.primaryHover,";border-color:",d.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),loading:y("display:flex;align-items:center;justify-content:center;padding:40px;color:",d.textSecondary,";",""),spinner:y("width:24px;height:24px;border-radius:50%;border:3px solid ",d.border,";border-top-color:",d.primary,";animation:spin 0.8s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}","")};function Np({selectedItems:o,currentPath:r,onMove:f,onCancel:u}){const[h,m]=w.useState([]),[S,A]=w.useState(!0),[C,g]=w.useState(null);w.useEffect(()=>{async function H(){try{const X=await fetch("/api/studio/list-folders");if(X.ok){const ee=await X.json();console.log("Loaded folders:",ee),m(ee.folders||[])}else console.error("Failed to load folders:",X.status,await X.text())}catch(X){console.error("Failed to load folders:",X)}finally{A(!1)}}H()},[]);const R=Array.from(o),M=h.filter(H=>!R.some(X=>H.path===X||H.path.startsWith(X+"/"))),q=H=>H===r,Y=()=>{C&&f(C)};return s("div",{css:kt.overlay,onClick:u,children:b("div",{css:kt.modal,onClick:H=>H.stopPropagation(),children:[s("div",{css:kt.header,children:s("h3",{css:kt.title,children:"Move Items"})}),b("div",{css:kt.body,children:[b("p",{css:kt.message,children:["Select a destination folder for ",o.size," item",o.size!==1?"s":"",":"]}),S?s("div",{css:kt.loading,children:s("div",{css:kt.spinner})}):M.length===0?s("div",{css:kt.loading,children:"No available folders to move to."}):s("div",{css:kt.folderList,children:M.map(H=>{const X=q(H.path);return b("div",{css:[kt.folderItem,C===H.path&&kt.folderItemSelected,X&&kt.folderItemDisabled,"",""],style:{paddingLeft:12},onClick:()=>!X&&g(H.path),children:[H.depth>0&&s("div",{css:kt.treeIndent,children:Array.from({length:H.depth}).map((ee,Z)=>s("div",{css:kt.treeLine},Z))}),s("svg",{css:kt.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:s("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),b("span",{css:kt.folderName,children:[H.name,X&&" (current)"]})]},H.path)})})]}),b("div",{css:kt.footer,children:[s("button",{css:[kt.btn,kt.btnCancel,"",""],onClick:u,children:"Cancel"}),s("button",{css:[kt.btn,kt.btnConfirm,"",""],onClick:Y,disabled:!C,children:"Move Here"})]})]})})}const d1=`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`,pe={overlay:{name:"8ivopw",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.6);display:flex;align-items:center;justify-content:center;z-index:1100;padding:20px"},modal:y("background:",d.surface,";border-radius:12px;max-width:560px;width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 20px 40px rgba(0, 0, 0, 0.3);",""),header:y("display:flex;align-items:center;gap:12px;padding:20px 24px;border-bottom:1px solid ",d.border,";",""),icon:y("width:32px;height:32px;color:",d.primary,";flex-shrink:0;",""),title:y("font-size:",J.xl,";font-weight:600;color:",d.text,";margin:0;",""),closeBtn:y("margin-left:auto;background:none;border:none;padding:4px;cursor:pointer;color:",d.textMuted,";border-radius:4px;&:hover{color:",d.text,";background:",d.surfaceHover,";}",""),closeIcon:{name:"1aynuae",styles:"width:20px;height:20px"},content:{name:"vxuddk",styles:"padding:24px"},intro:y("font-size:",J.base,";color:",d.textSecondary,";margin:0 0 20px 0;line-height:1.6;",""),steps:{name:"1fs2p21",styles:"list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:16px"},step:{name:"1wesxqa",styles:"display:flex;gap:12px"},stepNumber:y("width:28px;height:28px;border-radius:50%;background:",d.primaryLight,";color:",d.primary,";font-size:",J.sm,";font-weight:600;display:flex;align-items:center;justify-content:center;flex-shrink:0;",""),stepContent:{name:"pkc2k3",styles:"flex:1;padding-top:3px"},stepTitle:y("font-size:",J.base,";font-weight:500;color:",d.text,";margin:0 0 4px 0;",""),stepDesc:y("font-size:",J.sm,";color:",d.textSecondary,";margin:0;line-height:1.5;",""),link:y("color:",d.primary,";text-decoration:none;font-weight:500;&:hover{text-decoration:underline;}",""),envVarsWrapper:{name:"1ksolcl",styles:"position:relative;margin-top:20px"},envVars:y("background:",d.background,";border:1px solid ",d.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:",d.text,";overflow-x:auto;",""),envVar:{name:"4zleql",styles:"display:block"},envKey:y("color:",d.primary,";",""),envValue:y("color:",d.textSecondary,";",""),copyBtn:y("position:absolute;top:8px;right:8px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:",d.surface,";border:1px solid ",d.border,";border-radius:6px;cursor:pointer;color:",d.textMuted,";transition:all 0.15s ease;&:hover{background:",d.surfaceHover,";color:",d.text,";border-color:#d0d5dd;}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},copiedTooltip:{name:"9a5yd1",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;&::before{content:'';position:absolute;right:-4px;top:50%;transform:translateY(-50%);border-left:4px solid #1a1f36;border-top:4px solid transparent;border-bottom:4px solid transparent;}"},footer:y("padding:16px 24px;border-top:1px solid ",d.border,";display:flex;justify-content:flex-end;gap:12px;",""),docsBtn:y("padding:10px 16px;border-radius:6px;font-size:",J.base,";font-weight:500;border:1px solid ",d.border,";background:",d.surface,";color:",d.text,";cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:all 0.15s ease;&:hover{background:",d.surfaceHover,";border-color:#d0d5dd;}",""),doneBtn:y("padding:10px 20px;border-radius:6px;font-size:",J.base,";font-weight:500;border:none;background:",d.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",d.primaryHover,";}",""),externalIcon:{name:"1djxupe",styles:"width:14px;height:14px"}};function jp({isOpen:o,onClose:r}){const[f,u]=w.useState(!1),h=async()=>{try{await navigator.clipboard.writeText(d1),u(!0),setTimeout(()=>u(!1),2e3)}catch(m){console.error("Failed to copy:",m)}};return o?s("div",{css:pe.overlay,onClick:r,children:b("div",{css:pe.modal,onClick:m=>m.stopPropagation(),children:[b("div",{css:pe.header,children:[s("svg",{css:pe.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})}),s("h2",{css:pe.title,children:"Set Up CDN Storage"}),s("button",{css:pe.closeBtn,onClick:r,children:s("svg",{css:pe.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:pe.content,children:[s("p",{css:pe.intro,children:"Sync your images to Cloudflare R2 for faster global delivery. R2 offers generous free tier with no egress fees."}),b("ol",{css:pe.steps,children:[b("li",{css:pe.step,children:[s("span",{css:pe.stepNumber,children:"1"}),b("div",{css:pe.stepContent,children:[s("h4",{css:pe.stepTitle,children:"Create a Cloudflare account"}),b("p",{css:pe.stepDesc,children:["Sign up at"," ",s("a",{css:pe.link,href:"https://dash.cloudflare.com/sign-up",target:"_blank",rel:"noopener noreferrer",children:"dash.cloudflare.com"})," ","if you don't have one already."]})]})]}),b("li",{css:pe.step,children:[s("span",{css:pe.stepNumber,children:"2"}),b("div",{css:pe.stepContent,children:[s("h4",{css:pe.stepTitle,children:"Create an R2 bucket"}),b("p",{css:pe.stepDesc,children:["Go to R2 in your Cloudflare dashboard and create a new bucket. Choose a name like ",s("code",{children:"my-images"}),"."]})]})]}),b("li",{css:pe.step,children:[s("span",{css:pe.stepNumber,children:"3"}),b("div",{css:pe.stepContent,children:[s("h4",{css:pe.stepTitle,children:"Enable public access"}),b("p",{css:pe.stepDesc,children:['In bucket settings, enable "Public Access" and copy the public URL (e.g., ',s("code",{children:"https://pub-xxx.r2.dev"}),")."]})]})]}),b("li",{css:pe.step,children:[s("span",{css:pe.stepNumber,children:"4"}),b("div",{css:pe.stepContent,children:[s("h4",{css:pe.stepTitle,children:"Create API token"}),s("p",{css:pe.stepDesc,children:'Go to R2 → Manage R2 API Tokens → Create API Token. Select "Object Read & Write" permissions for your bucket.'})]})]}),b("li",{css:pe.step,children:[s("span",{css:pe.stepNumber,children:"5"}),b("div",{css:pe.stepContent,children:[s("h4",{css:pe.stepTitle,children:"Add environment variables"}),b("p",{css:pe.stepDesc,children:["Add these to your ",s("code",{children:".env.local"})," file:"]})]})]})]}),b("div",{css:pe.envVarsWrapper,children:[b("div",{css:pe.envVars,children:[b("span",{css:pe.envVar,children:[s("span",{css:pe.envKey,children:"CLOUDFLARE_R2_ACCOUNT_ID"}),"=",s("span",{css:pe.envValue,children:"your_account_id"})]}),b("span",{css:pe.envVar,children:[s("span",{css:pe.envKey,children:"CLOUDFLARE_R2_ACCESS_KEY_ID"}),"=",s("span",{css:pe.envValue,children:"your_access_key"})]}),b("span",{css:pe.envVar,children:[s("span",{css:pe.envKey,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY"}),"=",s("span",{css:pe.envValue,children:"your_secret_key"})]}),b("span",{css:pe.envVar,children:[s("span",{css:pe.envKey,children:"CLOUDFLARE_R2_BUCKET_NAME"}),"=",s("span",{css:pe.envValue,children:"your_bucket_name"})]}),b("span",{css:pe.envVar,children:[s("span",{css:pe.envKey,children:"CLOUDFLARE_R2_PUBLIC_URL"}),"=",s("span",{css:pe.envValue,children:"https://pub-xxx.r2.dev"})]}),b("span",{css:pe.envVar,children:[s("span",{css:pe.envKey,children:"NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL"}),"=",s("span",{css:pe.envValue,children:"https://pub-xxx.r2.dev"})]})]}),b("button",{css:pe.copyBtn,onClick:h,title:"Copy to clipboard",children:[f&&s("span",{css:pe.copiedTooltip,children:"Copied!"}),s("svg",{css:pe.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})]})]})]}),b("div",{css:pe.footer,children:[b("a",{css:pe.docsBtn,href:"https://developers.cloudflare.com/r2/get-started/",target:"_blank",rel:"noopener noreferrer",children:["R2 Documentation",s("svg",{css:pe.externalIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})})]}),s("button",{css:pe.doneBtn,onClick:r,children:"Got it"})]})]})}):null}const f1=dn`
|
|
44
|
+
from { opacity: 0; }
|
|
45
|
+
to { opacity: 1; }
|
|
46
|
+
`,h1=dn`
|
|
47
|
+
from {
|
|
48
|
+
opacity: 0;
|
|
49
|
+
transform: translateY(-8px) scale(0.98);
|
|
50
|
+
}
|
|
51
|
+
to {
|
|
52
|
+
opacity: 1;
|
|
53
|
+
transform: translateY(0) scale(1);
|
|
54
|
+
}
|
|
55
|
+
`,yt={overlay:y("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",f1," 0.15s ease-out;font-family:",oo,";",""),modal:y(ei," background-color:",d.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:",h1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",J.lg,";font-weight:600;color:",d.text,";margin:0;letter-spacing:-0.02em;",""),tabs:y("display:flex;gap:0;margin-top:16px;border-bottom:1px solid ",d.border,";",""),tab:y("padding:12px 20px;font-size:",J.base,";font-weight:500;color:",d.textSecondary,";background:none;border:none;cursor:pointer;position:relative;transition:color 0.15s;&:hover{color:",d.text,";}",""),tabActive:y("color:",d.primary,";&::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background-color:",d.primary,";}",""),body:{name:"1po9b7e",styles:"padding:24px;min-height:200px"},dropzone:y("border:2px dashed ",d.border,";border-radius:8px;padding:40px 24px;text-align:center;cursor:pointer;transition:all 0.15s;&:hover{border-color:",d.primary,";background-color:",d.primaryLight,";}",""),dropzoneActive:y("border-color:",d.primary,";background-color:",d.primaryLight,";",""),dropzoneIcon:y("width:48px;height:48px;margin:0 auto 16px;color:",d.textMuted,";",""),dropzoneText:y("font-size:",J.base,";color:",d.text,";margin:0 0 4px;",""),dropzoneHint:y("font-size:",J.sm,";color:",d.textSecondary,";margin:0;",""),textarea:y("width:100%;min-height:150px;padding:12px;font-size:",J.sm,";font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;border:1px solid ",d.border,";border-radius:8px;resize:vertical;&:focus{outline:none;border-color:",d.primary,";box-shadow:0 0 0 3px ",d.primaryLight,";}&::placeholder{color:",d.textMuted,";}",""),textareaLabel:y("font-size:",J.sm,";color:",d.textSecondary,";margin:0 0 8px;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",d.border,";background-color:",d.background,";",""),btn:y("padding:10px 18px;font-size:",J.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",d.surface,";border:1px solid ",d.border,";color:",d.text,";&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),btnConfirm:y("background-color:",d.primary,";border:1px solid ",d.primary,";color:white;&:hover:not(:disabled){background-color:",d.primaryHover,";border-color:",d.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),fileInput:{name:"eivff4",styles:"display:none"},selectedFiles:y("margin-top:16px;padding:12px;background-color:",d.background,";border-radius:6px;font-size:",J.sm,";color:",d.text,";","")};function p1({currentPath:o,onClose:r,onUploadComplete:f,streamingOperation:u,setShowProgress:h,setProgressTitle:m,setProgressState:S}){const[A,C]=w.useState("upload"),[g,R]=w.useState([]),[M,q]=w.useState(""),[Y,H]=w.useState(!1),[X,ee]=w.useState(!1),[Z,re]=w.useState(!1),P=w.useRef(null),me=w.useCallback(U=>{U&&R(Array.from(U))},[]),N=w.useCallback(U=>{U.preventDefault(),H(!1),me(U.dataTransfer.files)},[me]),oe=w.useRef(!1),V=w.useCallback(async()=>{if(g.length!==0){if(h&&m&&S){r(),oe.current=!1,m("Uploading Files"),h(!0),S({current:0,total:g.length,percent:0,status:"processing",message:"Uploading..."});let U=0;const ne=[];for(let I=0;I<g.length;I++){if(oe.current){S(Se=>({...Se,status:"stopped",message:`Stopped. Uploaded ${U} file${U!==1?"s":""}.`})),f();return}const de=g[I],$=new FormData;$.append("file",de),$.append("path",o);try{(await fetch("/api/studio/upload",{method:"POST",body:$})).ok?U++:ne.push(de.name)}catch{ne.push(de.name)}S({current:I+1,total:g.length,percent:Math.round((I+1)/g.length*100),status:"processing",currentFile:de.name})}S({current:g.length,total:g.length,percent:100,status:"complete",message:`Uploaded ${U} file${U!==1?"s":""}.${ne.length>0?` ${ne.length} failed.`:""}`}),f();return}ee(!0);try{for(const U of g){const ne=new FormData;ne.append("file",U),ne.append("path",o),await fetch("/api/studio/upload",{method:"POST",body:ne})}f(),r()}catch(U){console.error("Upload failed:",U)}finally{ee(!1)}}},[g,o,f,r,h,m,S]),ie=w.useCallback(async()=>{const U=M.split(`
|
|
56
|
+
`).map(ne=>ne.trim()).filter(ne=>ne.length>0);if(U.length!==0){if(u){r(),await u.execute({endpoint:"/api/studio/import",body:{urls:U},title:"Importing URLs",onComplete:()=>{f()}});return}re(!0);try{const I=(await fetch("/api/studio/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:U})})).body?.getReader();if(!I)throw new Error("No reader");const de=new TextDecoder;for(;;){const{done:$,value:Se}=await I.read();if($)break;const _=de.decode(Se).split(`
|
|
57
|
+
|
|
58
|
+
`).filter(Q=>Q.startsWith("data: "));for(const Q of _)JSON.parse(Q.replace("data: ","")).type==="complete"&&(f(),r())}}catch(ne){console.error("Import failed:",ne)}finally{re(!1)}}},[M,f,r,u]);return s("div",{css:yt.overlay,onClick:r,children:b("div",{css:yt.modal,onClick:U=>U.stopPropagation(),children:[b("div",{css:yt.header,children:[s("h3",{css:yt.title,children:"Add New"}),b("div",{css:yt.tabs,children:[s("button",{css:[yt.tab,A==="upload"&&yt.tabActive,"",""],onClick:()=>C("upload"),children:"Upload Files"}),s("button",{css:[yt.tab,A==="import"&&yt.tabActive,"",""],onClick:()=>C("import"),children:"Import URLs"})]})]}),s("div",{css:yt.body,children:A==="upload"?b(ht,{children:[b("div",{css:[yt.dropzone,Y&&yt.dropzoneActive,"",""],onClick:()=>P.current?.click(),onDragOver:U=>{U.preventDefault(),H(!0)},onDragLeave:()=>H(!1),onDrop:N,children:[s("svg",{css:yt.dropzoneIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})}),s("p",{css:yt.dropzoneText,children:"Drop files here or click to browse"}),s("p",{css:yt.dropzoneHint,children:"Supports images and other media files"})]}),s("input",{ref:P,type:"file",multiple:!0,css:yt.fileInput,onChange:U=>me(U.target.files)}),g.length>0&&b("div",{css:yt.selectedFiles,children:[g.length," file",g.length!==1?"s":""," selected"]})]}):b(ht,{children:[s("p",{css:yt.textareaLabel,children:"Paste image URLs (one per line)"}),s("textarea",{css:yt.textarea,value:M,onChange:U=>q(U.target.value),placeholder:`https://cdn.example.com/photos/image1.jpg
|
|
59
|
+
https://cdn.example.com/photos/image2.jpg`})]})}),b("div",{css:yt.footer,children:[s("button",{css:[yt.btn,yt.btnCancel,"",""],onClick:r,children:"Cancel"}),A==="upload"?s("button",{css:[yt.btn,yt.btnConfirm,"",""],onClick:V,disabled:g.length===0||X,children:X?"Uploading...":"Upload"}):s("button",{css:[yt.btn,yt.btnConfirm,"",""],onClick:ie,disabled:!M.trim()||Z,children:Z?"Importing...":"Import"})]})]})})}const m1="36px",Le={btn:y("height:",m1,";padding:0 12px;background:",d.surface,";border:1px solid ",d.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),icon:y("width:16px;height:16px;color:",d.textSecondary,";",""),overlay:{name:"1cy1r91",styles:"position:fixed;top:0;right:0;bottom:0;left:0;z-index:10000;display:flex;align-items:flex-start;justify-content:center;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);overflow-y:auto;scroll-behavior:smooth;padding:48px 24px"},panel:y(ei," position:relative;background-color:",d.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);width:100%;max-width:512px;padding:24px;margin:auto 0;",""),header:{name:"1o4fids",styles:"display:flex;align-items:center;justify-content:space-between;margin-bottom:24px"},title:y("font-size:",J.xl,";font-weight:600;color:",d.text,";margin:0;letter-spacing:-0.02em;",""),closeBtn:y("padding:6px;background:",d.surface,";border:1px solid ",d.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),sections:{name:"klisov",styles:"display:flex;flex-direction:column;gap:24px"},sectionTitle:y("font-size:",J.base,";font-weight:600;color:",d.text,";margin:0 0 12px 0;",""),description:y("font-size:",J.sm,";color:",d.textSecondary,";margin:0 0 12px 0;",""),codeWrapper:{name:"bjn8wh",styles:"position:relative"},code:y("background-color:",d.background,";border-radius:8px;padding:12px;padding-right:40px;font-family:'SF Mono',Monaco,Consolas,monospace;font-size:",J.xs,";color:",d.textSecondary,";border:1px solid ",d.border,";overflow-x:auto;white-space:nowrap;",""),copyBtn:y("position:absolute;top:8px;right:8px;padding:4px;background:",d.surface,";border:1px solid ",d.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),tooltip:{name:"6eskey",styles:"position:absolute;bottom:100%;left:50%;transform:translateX(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-bottom:6px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;top:100%;left:50%;transform:translateX(-50%);border:4px solid transparent;border-top-color:#1a1f36;}"},copyIcon:y("width:14px;height:14px;color:",d.textSecondary,";",""),codeLine:{name:"1bbvuqp",styles:"margin:0 0 4px 0;&:last-child{margin:0;}"},input:y("width:100%;padding:10px 14px;border:1px solid ",d.border,";border-radius:6px;font-size:",J.base,";color:",d.text,";background:",d.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",d.primary,";box-shadow:0 0 0 3px ",d.primaryLight,";}&::placeholder{color:",d.textMuted,";}",""),grid:{name:"xtlr5l",styles:"display:grid;grid-template-columns:repeat(3, 1fr);gap:12px"},label:y("font-size:",J.xs,";font-weight:500;color:",d.textSecondary,";display:block;margin-bottom:6px;",""),footer:y("margin-top:24px;padding-top:20px;border-top:1px solid ",d.border,";display:flex;justify-content:flex-end;gap:12px;",""),cancelBtn:y("padding:10px 18px;font-size:",J.base,";font-weight:500;color:",d.text,";background:",d.surface,";border:1px solid ",d.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),saveBtn:y("padding:10px 18px;font-size:",J.base,";font-weight:500;color:white;background-color:",d.primary,";border:1px solid ",d.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",d.primaryHover,";border-color:",d.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),cdnList:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},cdnRow:{name:"197tvr9",styles:"display:flex;gap:8px;align-items:center"},cdnInput:y("flex:1;padding:8px 12px;border:1px solid ",d.border,";border-radius:6px;font-size:",J.sm,";color:",d.text,";background:",d.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",d.primary,";box-shadow:0 0 0 3px ",d.primaryLight,";}",""),cdnIndex:y("font-size:",J.xs,";color:",d.textMuted,";width:24px;text-align:center;flex-shrink:0;",""),cdnDeleteBtn:y("padding:6px;background:none;border:none;cursor:pointer;color:",d.textMuted,";transition:color 0.15s;flex-shrink:0;&:hover{color:",d.danger,";}",""),cdnAddBtn:y("padding:8px 12px;font-size:",J.sm,";font-weight:500;color:",d.primary,";background:",d.primaryLight,";border:1px dashed ",d.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:",d.surface,";}",""),warning:y("font-size:",J.xs,";color:",d.danger,";margin-top:8px;padding:8px 12px;background:",d.dangerLight,";border-radius:6px;","")};function g1(){const[o,r]=w.useState(!1);return b(ht,{children:[s("button",{css:Le.btn,onClick:()=>r(!0),"aria-label":"Settings",children:b("svg",{css:Le.icon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[s("circle",{cx:"12",cy:"12",r:"3"}),s("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06a1.65 1.65 0 00.33-1.82 1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06a1.65 1.65 0 001.82.33H9a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06a1.65 1.65 0 00-.33 1.82V9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z"})]})}),o&&s(b1,{onClose:()=>r(!1)})]})}const y1=`# 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 b1({onClose:o}){const{triggerRefresh:r}=Il(),[f,u]=w.useState(!1),[h,m]=w.useState([]),[S,A]=w.useState(!0),[C,g]=w.useState(!1),[R,M]=w.useState(!1);w.useEffect(()=>{async function Z(){try{const P=await(await fetch("/api/studio/cdns")).json();m(P.cdns||[])}catch(re){console.error("Failed to load CDN URLs:",re)}finally{A(!1)}}Z()},[]);const q=()=>{navigator.clipboard.writeText(y1),u(!0),setTimeout(()=>u(!1),2e3)},Y=w.useCallback((Z,re)=>{m(P=>{const me=[...P];return me[Z]=re,me}),M(!0)},[]),H=w.useCallback(()=>{m(Z=>[...Z,""]),M(!0)},[]),X=w.useCallback(Z=>{m(re=>re.filter((P,me)=>me!==Z)),M(!0)},[]),ee=w.useCallback(async()=>{g(!0);try{(await fetch("/api/studio/cdns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cdns:h})})).ok&&(M(!1),r(),o())}catch(Z){console.error("Failed to save CDN URLs:",Z)}finally{g(!1)}},[h,r,o]);return s("div",{css:Le.overlay,onClick:o,children:b("div",{css:Le.panel,onClick:Z=>Z.stopPropagation(),children:[b("div",{css:Le.header,children:[s("h2",{css:Le.title,children:"Settings"}),s("button",{css:Le.closeBtn,onClick:o,children:s("svg",{css:Le.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:Le.sections,children:[b("section",{children:[s("h3",{css:Le.sectionTitle,children:"CDN URLs"}),s("p",{css:Le.description,children:"Manage CDN base URLs used by your images:"}),S?s("p",{css:Le.description,children:"Loading..."}):b(ht,{children:[s("div",{css:Le.cdnList,children:h.map((Z,re)=>b("div",{css:Le.cdnRow,children:[s("span",{css:Le.cdnIndex,children:re}),s("input",{css:Le.cdnInput,type:"text",value:Z,onChange:P=>Y(re,P.target.value),placeholder:"https://cdn.example.com"}),s("button",{css:Le.cdnDeleteBtn,onClick:()=>X(re),title:"Delete CDN URL",children:s("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})})})]},re))}),b("button",{css:Le.cdnAddBtn,onClick:H,children:[s("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add CDN URL"]}),h.length>0&&s("p",{css:Le.warning,children:"Warning: Changing CDN URLs may break image references. The index numbers correspond to image `c` values."})]})]}),b("section",{children:[s("h3",{css:Le.sectionTitle,children:"Environment Variables"}),b("p",{css:Le.description,children:["Configure in ",s("code",{children:".env.local"})," file (local development only, not needed in production):"]}),b("div",{css:Le.codeWrapper,children:[b("button",{css:Le.copyBtn,onClick:q,title:"Copy to clipboard",children:[f&&s("span",{css:Le.tooltip,children:"Copied!"}),s("svg",{css:Le.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),b("div",{css:Le.code,children:[s("p",{css:Le.codeLine,children:"NEXT_PUBLIC_PRODUCTION_URL=http://localhost:3000"}),s("p",{css:Le.codeLine,children:" "}),s("p",{css:Le.codeLine,children:"# Cloudflare R2 Storage"}),s("p",{css:Le.codeLine,children:"CLOUDFLARE_R2_ACCOUNT_ID=your_account_id"}),s("p",{css:Le.codeLine,children:"CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id"}),s("p",{css:Le.codeLine,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key"}),s("p",{css:Le.codeLine,children:"CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name"}),s("p",{css:Le.codeLine,children:"CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com"})]})]})]}),b("section",{children:[s("h3",{css:Le.sectionTitle,children:"Thumbnail Sizes"}),b("div",{css:Le.grid,children:[b("div",{children:[s("label",{css:Le.label,children:"Small"}),s("input",{css:Le.input,type:"number",defaultValue:300})]}),b("div",{children:[s("label",{css:Le.label,children:"Medium"}),s("input",{css:Le.input,type:"number",defaultValue:700})]}),b("div",{children:[s("label",{css:Le.label,children:"Large"}),s("input",{css:Le.input,type:"number",defaultValue:1400})]})]})]})]}),b("div",{css:Le.footer,children:[s("button",{css:Le.cancelBtn,onClick:o,children:"Cancel"}),s("button",{css:Le.saveBtn,onClick:ee,disabled:C||!R,children:C?"Saving...":"Save Changes"})]})]})})}const nu="36px",v1=dn`
|
|
68
|
+
to { transform: rotate(360deg); }
|
|
69
|
+
`,ve={toolbar:y("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",d.surface,";border-bottom:1px solid ",d.border,";overflow:visible;min-width:0;@media (min-width: 768px){padding:12px 24px;}",""),left:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},right:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},btn:y("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",nu,";padding:0 14px;border-radius:6px;font-size:",J.base,";font-weight:500;background:",d.surface,";border:1px solid ",d.border,";cursor:pointer;transition:all 0.15s ease;color:",d.text,";letter-spacing:-0.01em;&:hover:not(:disabled){background-color:",d.surfaceHover,";border-color:",d.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:y("background:",d.primary,";border-color:",d.primary,";color:white;&:hover:not(:disabled){background:",d.primaryHover,";border-color:",d.primaryHover,";}",""),btnDanger:y("color:",d.danger,";&:hover:not(:disabled){background-color:",d.dangerLight,";border-color:",d.danger,";}",""),btnCloud:{name:"1lzbs29",styles:"color:#f59e0b;&:hover:not(:disabled){background-color:rgba(245, 158, 11, 0.1);border-color:#f59e0b;}"},cloudDropdownWrapper:{name:"bjn8wh",styles:"position:relative"},dropdownArrow:{name:"1j1hlpy",styles:"width:12px;height:12px;margin-left:4px"},cloudDropdown:y("position:absolute;top:100%;left:0;z-index:1000;min-width:160px;margin-top:4px;background:white;border:1px solid ",d.border,";border-radius:6px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;",""),cloudDropdownItem:y("display:flex;align-items:center;gap:8px;width:100%;padding:10px 14px;border:none;background:none;font-size:",J.sm,";color:",d.text,";cursor:pointer;text-align:left;white-space:nowrap;&:hover{background-color:",d.hover,";}svg{width:16px;height:16px;flex-shrink:0;color:#f59e0b;}",""),cloudDropdownItemDefault:y("svg{color:",d.text,";}",""),cloudDropdownItemDanger:y("color:",d.danger,";svg{color:",d.danger,";}",""),cloudDropdownDivider:y("height:1px;background-color:",d.border,";margin:4px 0;",""),icon:{name:"157xhr7",styles:"width:16px;height:16px"},iconSpin:y("animation:",v1," 1s linear infinite;",""),selectionCount:y("font-size:",J.base,";color:",d.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:y("color:",d.primary,";background:none;border:none;cursor:pointer;font-size:",J.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),divider:y("width:1px;height:24px;background:",d.border,";margin:0 4px;",""),viewToggle:y("display:flex;align-items:center;height:",nu,";background-color:",d.surface,";border:1px solid ",d.border,";border-radius:6px;overflow:hidden;",""),searchWrapper:{name:"9iujih",styles:"position:relative;display:flex;align-items:center"},searchInput:y("height:",nu,";padding:0 32px 0 12px;border:1px solid ",d.border,";border-radius:6px;font-size:",J.base,";background:",d.surface,";color:",d.text,";width:180px;transition:all 0.15s ease;&:focus{outline:none;border-color:",d.primary,";box-shadow:0 0 0 2px ",d.primaryLight,";}&::placeholder{color:",d.textMuted,";}",""),searchClearBtn:y("position:absolute;right:5px;top:5px;bottom:5px;background:",d.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:",d.primaryHover,";}",""),viewBtn:y("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",d.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",d.text,";background-color:",d.surfaceHover,";}",""),viewBtnActive:y("background-color:",d.primaryLight,";color:",d.primary,";&:hover{background-color:",d.primaryLight,";color:",d.primary,";}","")};function x1(){const{selectedItems:o,viewMode:r,setViewMode:f,clearSelection:u,currentPath:h,triggerRefresh:m,focusedItem:S,scanRequested:A,clearScanRequest:C,fileItems:g,requestProcess:R,setProcessMode:M,actionState:q,cancelAction:Y}=Il(),H=w.useRef(null),X=w.useRef(null),[ee,Z]=w.useState(!1),[re,P]=w.useState(!1),[me,N]=w.useState(!1),[oe,V]=w.useState(!1),[ie,U]=w.useState(!1),[ne,I]=w.useState(0),[de,$]=w.useState(!1),[Se,Ye]=w.useState(0),[_,Q]=w.useState(!1),[F,Re]=w.useState(!1),[Ge,x]=w.useState(!1),[L,W]=w.useState(0),[ae,be]=w.useState(!1),[Te,Ne]=w.useState("Processing Images"),[gt,Oe]=w.useState({current:0,total:0,percent:0,status:"processing"}),[$t,ot]=w.useState(null),[pt,jt]=w.useState(!1),[ge,Dt]=w.useState(!1),[Wt,Ce]=w.useState(!1),[ct,bt]=w.useState(!1),[Fe,xe]=w.useState(!1),[we,et]=w.useState(!1),[He,Xe]=w.useState(!1),[je,Bt]=w.useState(!1),nn=w.useRef(null),ti=w.useRef(null),Rt=Bp({setShowProgress:be,setProgressTitle:Ne,setProgressState:Oe,triggerRefresh:m}),Ya=h==="public/images"||h.startsWith("public/images/");w.useCallback(()=>{H.current?.click()},[]);const Lr=w.useCallback(()=>{V(!0),m(),setTimeout(()=>V(!1),600)},[m]),Qn=w.useCallback(async()=>{N(!0),Ne("Scanning Files"),be(!0),Oe({current:0,total:0,percent:0,status:"processing",message:"Scanning for files..."});try{const te=(await fetch("/api/studio/scan",{method:"POST"})).body?.getReader();if(!te)throw new Error("No reader");const fe=new TextDecoder;let he="";for(;;){const{done:De,value:Ae}=await te.read();if(De)break;he+=fe.decode(Ae,{stream:!0});const $e=he.split(`
|
|
70
|
+
|
|
71
|
+
`);he=$e.pop()||"";for(const We of $e){if(!We.startsWith("data: "))continue;const _e=JSON.parse(We.slice(6));if(_e.type==="start")Oe({current:0,total:_e.total,percent:0,status:"processing",message:`Scanning ${_e.total} files...`});else if(_e.type==="progress")Oe({current:_e.current,total:_e.total,percent:_e.percent,status:"processing",currentFile:_e.currentFile});else if(_e.type==="cleanup")Oe(en=>({...en,message:_e.message}));else if(_e.type==="complete"){let en=_e.renamed>0?`${_e.renamed} file(s) renamed due to conflicts. `:"";_e.orphanedFiles&&_e.orphanedFiles.length>0&&(en+=`Found ${_e.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),Oe({current:_e.total||0,total:_e.total||0,percent:100,status:"complete",processed:_e.added,alreadyProcessed:_e.existingCount,errors:_e.errors,orphanedFiles:_e.orphanedFiles,pendingUpdates:_e.pendingUpdates,orphanedEntries:_e.orphanedEntries,message:en||void 0,isScan:!0}),m()}else _e.type==="error"&&Oe({current:0,total:0,percent:0,status:"error",message:_e.message||"Scan failed"})}}}catch(ce){console.error("Scan error:",ce),Oe({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{N(!1)}},[m]);w.useEffect(()=>{const ce=te=>{nn.current&&!nn.current.contains(te.target)&&Xe(!1),ti.current&&!ti.current.contains(te.target)&&Bt(!1)};return document.addEventListener("mousedown",ce),()=>document.removeEventListener("mousedown",ce)},[]),w.useEffect(()=>{A&&!me&&(C(),Qn())},[A,me,C,Qn]);const It=w.useCallback(async ce=>{const te=ce.target.files;if(!te||te.length===0)return;const fe=Array.from(te);fe.length>1?(Oe({current:0,total:fe.length,percent:0,status:"processing",message:"Uploading files..."}),be(!0)):P(!0);let he=0,De=0;try{for(let Ae=0;Ae<fe.length;Ae++){const $e=fe[Ae],We=new FormData;We.append("file",$e),We.append("path",h);try{const _e=await fetch("/api/studio/upload",{method:"POST",body:We});if(_e.ok)he++;else{const en=await _e.json();De++,fe.length===1&&(_e.status>=500?(console.error("Upload error:",en),ot({title:"Upload Failed",message:`Failed to upload ${$e.name}: ${en.error||"Unknown error"}`})):ot({title:"Cannot Upload Here",message:en.error||"Upload not allowed in this location."}))}}catch{De++}fe.length>1&&Oe({current:Ae+1,total:fe.length,percent:Math.round((Ae+1)/fe.length*100),status:"processing",currentFile:$e.name})}fe.length>1&&Oe({current:fe.length,total:fe.length,percent:100,status:"complete",processed:he,errors:De}),m()}catch(Ae){console.error("Upload error:",Ae),fe.length>1?Oe({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):ot({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{P(!1),H.current&&(H.current.value="")}},[h,m]),Rn=w.useCallback(async ce=>{if(o.size>0){const fe=Array.from(o),he=fe.filter(Ae=>(Ae.split("/").pop()||"").includes(".")&&!Ae.endsWith("/")),De=fe.filter(Ae=>!(Ae.split("/").pop()||"").includes(".")||Ae.endsWith("/"));if(De.length>0)try{const $e=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(De.join(","))}`)).json();if($e.images)for(const We of $e.images){const _e=`public/${We}`;he.includes(_e)||he.push(_e)}}catch(Ae){console.error("Failed to get folder files:",Ae)}if(he.length===0){ot({title:"No Files Found",message:"No files found in the selected items."});return}M(ce),R(he)}else try{const he=await(await fetch("/api/studio/count-images")).json();if(!he.images||he.images.length===0){ot({title:"No Images Found",message:"No images found in the public folder to process."});return}const De=he.images.map(Ae=>`public/${Ae}`);M(ce),R(De)}catch(fe){console.error("Failed to get images:",fe),ot({title:"Error",message:"Failed to get images."})}},[o,R,M]),Pt=w.useCallback(()=>{Rt.stop(),X.current&&(Oe(ce=>({...ce,status:"stopping"})),X.current.abort())},[Rt]),Ur=w.useCallback(async()=>{const ce=gt.orphanedFiles;if(!(!ce||ce.length===0))try{const te=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:ce})}),fe=await te.json();te.ok?(Oe(he=>({...he,orphanedFiles:void 0,orphansRemoved:fe.deleted,message:`Deleted ${fe.deleted} orphaned thumbnail${fe.deleted!==1?"s":""}.`})),m()):ot({title:"Delete Failed",message:fe.error||"Failed to delete orphaned files."})}catch(te){console.error("Delete orphans error:",te),ot({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[gt.orphanedFiles,m]),Hr=w.useCallback(async()=>{if(o.size===0)return;const ce=Array.from(o),te=ce.filter(De=>(De.split("/").pop()||"").includes(".")&&!De.endsWith("/")),fe=ce.filter(De=>!(De.split("/").pop()||"").includes(".")||De.endsWith("/"));let he=te.length;if(fe.length>0)try{const Ae=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(fe.join(","))}`)).json();Ae.images&&(he+=Ae.images.length)}catch(De){console.error("Failed to get folder files:",De)}I(he),U(!0)},[o]),Br=w.useCallback(async()=>{U(!1);const ce=Array.from(o);ce.length!==0&&await Rt.execute({endpoint:"/api/studio/delete-stream",body:{paths:ce},title:"Deleting Files",onComplete:()=>{u()}})},[o,u,Rt]),ul=w.useCallback(async()=>{if(o.size===0)return;const ce=Array.from(o),te=ce.filter(We=>(We.split("/").pop()||"").includes(".")&&!We.endsWith("/")),fe=ce.filter(We=>!(We.split("/").pop()||"").includes(".")||We.endsWith("/")),he=fe.length>0;if(he)try{const _e=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(fe.join(","))}`)).json();if(_e.images)for(const en of _e.images){const ri=`public/${en}`;te.includes(ri)||te.push(ri)}}catch(We){console.error("Failed to get folder files:",We)}if(te.length===0){ot({title:"No Files Found",message:"No files found in the selected items."});return}let De=!1,Ae=!1,$e=0;for(const We of te){const _e=g.find(en=>en.path===We);_e?_e.isRemote?De=!0:_e.cdnPushed?$e++:Ae=!0:he&&(Ae=!0)}if(!he&&$e===te.length){ot({title:"Already Pushed",message:`All ${te.length} file${te.length!==1?"s are":" is"} already on the CDN.`});return}Ye(te.length),Q(De),Re(Ae),$(!0)},[o,g]),dl=w.useCallback(async()=>{$(!1);const ce=Array.from(o),te=ce.filter(De=>(De.split("/").pop()||"").includes(".")&&!De.endsWith("/")),fe=ce.filter(De=>!(De.split("/").pop()||"").includes(".")||De.endsWith("/"));if(fe.length>0)try{const Ae=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(fe.join(","))}`)).json();if(Ae.images)for(const $e of Ae.images){const We=`public/${$e}`;te.includes(We)||te.push(We)}}catch(De){console.error("Failed to get folder files:",De)}const he=te.map(De=>"/"+De.replace(/^public\//,""));he.length!==0&&await Rt.execute({endpoint:"/api/studio/sync-stream",body:{imageKeys:he},title:"Pushing to CDN",onComplete:()=>{u()},onError:De=>{(De.includes("R2 not configured")||De.includes("CLOUDFLARE_R2"))&&(be(!1),xe(!0))}})},[o,u,Rt]),[Ga,Kn]=w.useState([]),[fl,Xa]=w.useState(0),Nr=w.useCallback(async()=>{if(o.size===0)return;const ce=Array.from(o),te=ce.filter(Ae=>(Ae.split("/").pop()||"").includes(".")&&!Ae.endsWith("/")),fe=ce.filter(Ae=>!(Ae.split("/").pop()||"").includes(".")||Ae.endsWith("/")),he=fe.length>0;if(he)try{const $e=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(fe.join(","))}`)).json();if($e.images)for(const We of $e.images){const _e=`public/${We}`;te.includes(_e)||te.push(_e)}}catch(Ae){console.error("Failed to get folder files:",Ae)}if(te.length===0){ot({title:"No Files Found",message:"No files found in the selected items."});return}let De;if(he)De=te;else if(De=te.filter(Ae=>{const $e=g.find(We=>We.path===Ae);return $e&&$e.cdnPushed&&!$e.isRemote}),De.length===0){ot({title:"No CDN Files",message:`None of the ${te.length} selected file${te.length!==1?"s are":" is"} on the CDN.`});return}Kn(De),Xa(te.length),W(De.length),x(!0)},[o,g]),ro=w.useCallback(async()=>{x(!1),q.showDownloadConfirm&&Y();const te=(q.showDownloadConfirm?q.actionPaths:Ga).map(fe=>"/"+fe.replace(/^public\//,""));await Rt.execute({endpoint:"/api/studio/download-stream",body:{imageKeys:te},title:"Downloading from CDN",onComplete:()=>u()})},[Ga,u,q.showDownloadConfirm,q.actionPaths,Y,Rt]),ni=w.useCallback(async()=>{if(o.size===0)return;const te=Array.from(o).filter(fe=>{const he=g.find(De=>De.path===fe);return he&&(he.hasUpdate||he.type==="folder"&&he.updateCount&&he.updateCount>0)});if(te.length===0){ot({title:"No Updates",message:"No files with pending updates in selection."});return}await Rt.execute({endpoint:"/api/studio/push-updates-stream",body:{paths:te},title:"Pushing Updates",onComplete:()=>u()})},[o,g,u,Rt]),Va=w.useCallback(async()=>{if(o.size===0)return;const te=Array.from(o).filter(fe=>{const he=g.find(De=>De.path===fe);return he&&(he.hasUpdate||he.type==="folder"&&he.updateCount&&he.updateCount>0)});if(te.length!==0)try{const fe=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:te})});if(fe.ok)u(),m();else{const he=await fe.json();ot({title:"Cancel Failed",message:he.error||"Unknown error"})}}catch(fe){console.error("Cancel updates error:",fe),ot({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[o,g,u,m]),jr=w.useCallback(async ce=>{jt(!1);try{const te=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:h,name:ce})});if(te.ok)m();else{const fe=await te.json();ot({title:"Create Folder Failed",message:fe.error||"Unknown error"})}}catch(te){console.error("Create folder error:",te),ot({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[h,m]),so=w.useCallback(()=>{o.size!==0&&bt(!0)},[o]),co=w.useCallback(async ce=>{const te=Array.from(o);await Rt.execute({endpoint:"/api/studio/move",body:{paths:te,destination:ce},title:"Moving Files",onComplete:()=>u()})},[o,u,Rt]),{searchQuery:ai,setSearchQuery:Zn}=Il(),li=w.useCallback(ce=>{Zn(ce.target.value)},[Zn]),uo=w.useCallback(ce=>{ce.key==="Escape"&&(ce.stopPropagation(),Zn(""),ce.target.blur())},[Zn]),_n=o.size>0;_n&&Array.from(o).some(ce=>{const te=g.find(fe=>fe.path===ce);return te&&te.cdnPushed&&!te.isRemote}),_n&&Array.from(o).every(ce=>{const te=g.find(fe=>fe.path===ce);return te&&te.type==="file"&&te.cdnPushed&&!te.isRemote});const Bn=_n&&Array.from(o).some(ce=>{const te=g.find(fe=>fe.path===ce);return te&&(te.hasUpdate||te.type==="folder"&&te.updateCount&&te.updateCount>0)}),St=Array.from(o),Et=St.length===1&&!St[0].includes("."),fn=Et?St[0]:null,hl=fn&&fn.split("/").pop()||"",ha=St.length===1&&St[0].includes("."),pa=ha?St[0]:null,ii=pa&&pa.split("/").pop()||"",Qa=w.useCallback(async ce=>{fn&&(Dt(!1),await Rt.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:fn,newName:ce},title:"Renaming Folder",onComplete:()=>u()}))},[fn,u,Rt]),oi=w.useCallback(async ce=>{pa&&(Ce(!1),await Rt.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:pa,newName:ce},title:"Renaming File",onComplete:()=>u()}))},[pa,u,Rt]),Jn=b(ht,{children:[(Ge||q.showDownloadConfirm)&&s(Pi,{title:"Download from CDN",message:(()=>{const ce=q.showDownloadConfirm?q.downloadImageCount:L,te=q.showDownloadConfirm?q.downloadTotalSelected:fl;return te>ce?`Download ${ce} of ${te} selected file${te!==1?"s":""} from Cloudflare R2? (${te-ce} not on CDN)`:`Download ${ce} image${ce!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`})(),confirmLabel:"Download",onConfirm:ro,onCancel:()=>{x(!1),q.showDownloadConfirm&&Y()}}),ae&&s(cl,{title:Te,progress:gt,onStop:Pt,onDeleteOrphans:Ur,onClose:()=>{be(!1),Oe({current:0,total:0,percent:0,status:"processing"}),m()}})]});return S?Jn:b(ht,{children:[Jn,ie&&s(Pi,{title:"Delete Items",message:`Are you sure you want to delete ${ne} file${ne!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Br,onCancel:()=>U(!1)}),de&&s(Pi,{title:"Push to CDN",message:`Push ${Se} image${Se!==1?"s":""} to Cloudflare R2?${_?" Remote images will be downloaded first.":""}${F?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:dl,onCancel:()=>$(!1)}),pt&&s(Er,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:jr,onCancel:()=>jt(!1)}),ct&&s(Np,{selectedItems:o,currentPath:h,onMove:ce=>{bt(!1),co(ce)},onCancel:()=>bt(!1)}),ge&&fn&&s(Er,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:hl,defaultValue:hl,confirmLabel:"Rename",onConfirm:Qa,onCancel:()=>Dt(!1)}),Wt&&pa&&s(Er,{title:"Rename File",message:"Enter a new name for the file:",placeholder:ii,defaultValue:ii,confirmLabel:"Rename",onConfirm:oi,onCancel:()=>Ce(!1)}),$t&&s(fu,{title:$t.title,message:$t.message,onClose:()=>{ot(null),m()}}),s(jp,{isOpen:Fe,onClose:()=>xe(!1)}),ee&&s(p1,{currentPath:h,onClose:()=>Z(!1),onUploadComplete:()=>{Z(!1),m()},streamingOperation:Rt,setShowProgress:be,setProgressTitle:Ne,setProgressState:Oe}),b("div",{css:ve.toolbar,children:[s("input",{ref:H,type:"file",multiple:!0,accept:"image/*,video/*,audio/*,.pdf",onChange:It,style:{display:"none"}}),b("div",{css:ve.left,children:[b("button",{css:[ve.btn,ve.btnPrimary,"",""],onClick:()=>Z(!0),disabled:re||Ya,children:[s(S1,{}),"Add New"]}),b("button",{css:ve.btn,onClick:()=>{ha?Ce(!0):Et?Dt(!0):jt(!0)},disabled:Ya&&!Et&&!ha,title:Ya&&!Et&&!ha?"Cannot create folders in protected images folder":void 0,children:[ha||Et?s(k1,{}):s(M1,{}),ha?"Rename File":Et?"Rename Folder":"New Folder"]}),s("div",{css:ve.divider}),b("div",{css:ve.cloudDropdownWrapper,ref:ti,children:[b("button",{css:ve.btn,onClick:()=>Bt(!je),disabled:q.showProgress||Ya,title:Ya?"Cannot process images folder":void 0,children:[s(O1,{}),"Thumbnails",s("svg",{css:ve.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),je&&b("div",{css:ve.cloudDropdown,children:[b("button",{css:[ve.cloudDropdownItem,ve.cloudDropdownItemDefault,"",""],onClick:()=>{Bt(!1),Rn("generate")},children:[s(L1,{}),"Generate Thumbnails"]}),b("button",{css:[ve.cloudDropdownItem,ve.cloudDropdownItemDanger,"",""],onClick:()=>{Bt(!1),Rn("remove")},children:[s(U1,{}),"Remove Thumbnails"]})]})]}),b("button",{css:[ve.btn,ve.btnDanger,"",""],onClick:Hr,disabled:!_n,children:[s(z1,{}),"Delete"]}),b("button",{css:ve.btn,onClick:so,disabled:!_n,children:[s(D1,{}),"Move"]}),b("div",{css:ve.cloudDropdownWrapper,ref:nn,children:[b("button",{css:[ve.btn,ve.btnCloud,"",""],onClick:()=>Xe(!He),disabled:!_n,children:[s(xp,{}),"Cloud",s("svg",{css:ve.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),He&&_n&&b("div",{css:ve.cloudDropdown,children:[Bn&&b(ht,{children:[b("button",{css:ve.cloudDropdownItem,onClick:()=>{Xe(!1),ni()},children:[s(E1,{}),"Push Update"]}),b("button",{css:[ve.cloudDropdownItem,ve.cloudDropdownItemDanger,"",""],onClick:()=>{Xe(!1),Va()},children:[s(T1,{}),"Cancel Update"]}),s("div",{css:ve.cloudDropdownDivider})]}),b("button",{css:ve.cloudDropdownItem,onClick:()=>{Xe(!1),ul()},children:[s(xp,{}),"Push CDN"]}),b("button",{css:ve.cloudDropdownItem,onClick:()=>{Xe(!1),Nr()},children:[s(A1,{}),"Download"]})]})]}),b("div",{css:ve.searchWrapper,children:[s("input",{css:ve.searchInput,type:"text",placeholder:"Search images...",value:ai,onChange:li,onKeyDown:uo}),ai&&s("button",{css:ve.searchClearBtn,onClick:()=>Zn(""),title:"Clear search",children:s("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),b("div",{css:ve.right,children:[_n&&b("span",{css:ve.selectionCount,children:[o.size," selected",s("button",{css:ve.clearBtn,onClick:u,children:"Clear"})]}),b("button",{css:ve.btn,onClick:Qn,disabled:me,children:[s(C1,{spinning:me}),"Scan"]}),s("button",{css:ve.btn,onClick:Lr,title:"Refresh view",disabled:oe,children:s(w1,{spinning:oe})}),b("div",{css:ve.viewToggle,children:[s("button",{css:[ve.viewBtn,r==="grid"&&ve.viewBtnActive,"",""],onClick:()=>f("grid"),"aria-label":"Grid view",children:s(R1,{})}),s("button",{css:[ve.viewBtn,r==="list"&&ve.viewBtnActive,"",""],onClick:()=>f("list"),"aria-label":"List view",children:s(_1,{})})]}),s(g1,{})]})]})]})}function S1(){return s("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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 C1({spinning:o}){return s("svg",{css:[ve.icon,o&&ve.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function w1({spinning:o}){return s("svg",{css:[ve.icon,o&&ve.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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 z1(){return s("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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 M1(){return s("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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 k1(){return s("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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 D1(){return s("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})})}function xp(){return s("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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 E1(){return s("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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 T1(){return s("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function A1(){return s("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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 R1(){return s("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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 _1(){return s("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function O1(){return s("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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 L1(){return s("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}function U1(){return s("svg",{css:ve.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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 H1{async get(r){const f=await fetch(r,{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!f.ok){const u=await f.json().catch(()=>({}));throw new Error(u.error||`Request failed: ${f.status}`)}return f.json()}async post(r,f){const u=await fetch(r,{method:"POST",headers:f?{"Content-Type":"application/json"}:void 0,body:f?JSON.stringify(f):void 0});if(!u.ok){const h=await u.json().catch(()=>({}));throw new Error(h.error||`Request failed: ${u.status}`)}return u.json()}async list(r="public"){return this.get(`/api/studio/list?path=${encodeURIComponent(r)}`)}async search(r,f="public"){return this.get(`/api/studio/search?q=${encodeURIComponent(r)}&path=${encodeURIComponent(f)}`)}async listFolders(){return this.get("/api/studio/list-folders")}async countImages(){return this.get("/api/studio/count-images")}async folderImages(r){return this.get(`/api/studio/folder-images?folders=${encodeURIComponent(r.join(","))}`)}async upload(r,f="public"){const u=new FormData;u.append("file",r),u.append("path",f);const h=await fetch("/api/studio/upload",{method:"POST",body:u});if(!h.ok){const m=await h.json().catch(()=>({}));throw new Error(m.error||`Upload failed: ${h.status}`)}return h.json()}async delete(r){return this.post("/api/studio/delete",{paths:r})}async createFolder(r,f){return this.post("/api/studio/create-folder",{parentPath:r,name:f})}async rename(r,f){return this.post("/api/studio/rename",{oldPath:r,newName:f})}async move(r,f){return this.post("/api/studio/move",{paths:r,destination:f})}async push(r){return this.post("/api/studio/sync",{imageKeys:r})}async reprocess(r){return this.post("/api/studio/reprocess",{imageKeys:r})}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 Ii=new H1;function qp(){const{currentPath:o,setCurrentPath:r,navigateUp:f,selectedItems:u,toggleSelection:h,selectRange:m,lastSelectedPath:S,selectAll:A,clearSelection:C,refreshKey:g,setFocusedItem:R,triggerRefresh:M,triggerScan:q,searchQuery:Y,showError:H,setFileItems:X,editedImageKey:ee}=Il(),[Z,re]=w.useState([]),[P,me]=w.useState(!0),[N,oe]=w.useState(!1),[V,ie]=w.useState(null),U=w.useRef(!0),ne=w.useRef(o);w.useEffect(()=>{async function x(){const L=ne.current!==o;(U.current||L)&&me(!0),ne.current=o;try{const W=Y&&Y.length>=2?await Ii.search(Y,o):await Ii.list(o),ae=W.items||[];re(ae),X(ae),oe(W.isEmpty===!0)}catch(W){const ae=W instanceof Error?W.message:"Failed to load items";H("Load Error",ae),re([]),X([]),oe(!1)}me(!1),U.current=!1}x()},[o,g,Y,H,X]),w.useEffect(()=>{async function x(){if(o!=="public"){ie(null);return}try{const L=await Ii.checkFeaturedImage();ie(L)}catch{ie(null)}}x()},[o,g]);const I=o==="public",de=Y&&Y.length>=2,$=[...Z].sort((x,L)=>x.type==="folder"&&L.type!=="folder"?-1:x.type!=="folder"&&L.type==="folder"?1:x.name.localeCompare(L.name)),Se=$.length>0&&$.every(x=>u.has(x.path)),Ye=$.some(x=>u.has(x.path)),_=w.useCallback((x,L)=>{L.shiftKey&&S?m(S,x.path,$):h(x.path)},[S,m,$,h]),Q=w.useCallback(x=>{x.type==="folder"?r(x.path):R(x)},[r,R]),F=w.useCallback(async x=>{try{const L="/"+x.path.replace(/^public\//,"");await Ii.reprocess([L]),M()}catch(L){const W=L instanceof Error?L.message:"Failed to generate thumbnail";H("Processing Error",W)}},[M,H]),Re=w.useCallback(()=>{Se?C():A($)},[Se,C,A,$]),Ge=V&&!V.exists?V:null;return{items:Z,loading:P,sortedItems:$,metaEmpty:N,missingFeaturedImage:Ge,isAtRoot:I,isSearching:de,allItemsSelected:Se,someItemsSelected:Ye,currentPath:o,selectedItems:u,navigateUp:f,editedImageKey:ee,handleItemClick:_,handleOpen:Q,handleGenerateThumbnail:F,handleSelectAll:Re,triggerScan:q,triggerRefresh:M}}const B1=dn`
|
|
72
|
+
from { opacity: 0; }
|
|
73
|
+
to { opacity: 1; }
|
|
74
|
+
`,N1=dn`
|
|
75
|
+
from { transform: translateY(-20px); opacity: 0; }
|
|
76
|
+
to { transform: translateY(0); opacity: 1; }
|
|
77
|
+
`,j1=dn`
|
|
78
|
+
to { transform: rotate(360deg); }
|
|
79
|
+
`,Kt={overlay:y("position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:rgba(0, 0, 0, 0.5);animation:",B1," 0.15s ease;",""),modal:y("background:",d.surface,";border-radius:12px;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);width:100%;max-width:440px;animation:",N1," 0.2s ease;overflow:hidden;",""),header:y("padding:20px 24px;border-bottom:1px solid ",d.border,";",""),title:y("font-size:",J.lg,";font-weight:600;color:",d.text,";margin:0;",""),subtitle:y("font-size:",J.sm,";color:",d.textSecondary,";margin:4px 0 0 0;",""),body:{name:"1a7zdz",styles:"padding:24px;display:flex;flex-direction:column;gap:12px"},loading:{name:"uphaut",styles:"display:flex;align-items:center;justify-content:center;padding:40px"},spinner:y("width:24px;height:24px;border-radius:50%;border:2px solid ",d.border,";border-top-color:",d.primary,";animation:",j1," 0.8s linear infinite;",""),urlButton:y("display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:16px 20px;background:",d.background,";border:1px solid ",d.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover:not(:disabled){background:",d.surfaceHover,";border-color:",d.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),urlLabel:y("font-size:",J.xs,";font-weight:600;color:",d.textSecondary,";text-transform:uppercase;letter-spacing:0.05em;",""),urlValue:y("font-size:",J.base,";font-weight:500;color:",d.text,";word-break:break-all;",""),noOptions:y("padding:20px;text-align:center;color:",d.textSecondary,";font-size:",J.sm,";",""),footer:y("padding:16px 24px;border-top:1px solid ",d.border,";display:flex;justify-content:flex-end;",""),cancelBtn:y("padding:10px 20px;font-size:",J.base,";font-weight:500;background:",d.surface,";border:1px solid ",d.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",d.text,";&:hover{background:",d.surfaceHover,";border-color:",d.borderHover,";}","")};function Yp({isOpen:o,onClose:r,onSelect:f}){const[u,h]=w.useState(!0),[m,S]=w.useState(null),[A,C]=w.useState(null);if(w.useEffect(()=>{if(!o)return;async function R(){h(!0);try{const M=await Ii.getFeaturedImageOptions();S(M.devUrl),C(M.productionUrl)}catch(M){console.error("Failed to load featured image options:",M)}h(!1)}R()},[o]),!o)return null;const g=m||A;return s("div",{css:Kt.overlay,onClick:r,children:b("div",{css:Kt.modal,onClick:R=>R.stopPropagation(),children:[b("div",{css:Kt.header,children:[s("h2",{css:Kt.title,children:"Generate Screenshot"}),s("p",{css:Kt.subtitle,children:"Choose which URL to screenshot"})]}),s("div",{css:Kt.body,children:u?s("div",{css:Kt.loading,children:s("div",{css:Kt.spinner})}):g?b(ht,{children:[m&&b("button",{css:Kt.urlButton,onClick:()=>f(m),children:[s("span",{css:Kt.urlLabel,children:"Development"}),s("span",{css:Kt.urlValue,children:m})]}),A&&b("button",{css:Kt.urlButton,onClick:()=>f(A),children:[s("span",{css:Kt.urlLabel,children:"Production"}),s("span",{css:Kt.urlValue,children:A})]})]}):b("div",{css:Kt.noOptions,children:["No URLs configured. Set ",s("code",{children:"NEXT_PUBLIC_PRODUCTION_URL"})," in .env.local and/or .env.production."]})}),s("div",{css:Kt.footer,children:s("button",{css:Kt.cancelBtn,onClick:r,children:"Cancel"})})]})})}const q1=dn`
|
|
80
|
+
to { transform: rotate(360deg); }
|
|
81
|
+
`,le={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:y("width:32px;height:32px;border-radius:50%;border:3px solid ",d.border,";border-top-color:",d.primary,";animation:",q1," 0.8s linear infinite;",""),empty:y("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",d.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:y("font-size:",J.base,";margin:0 0 4px 0;&:last-child{color:",d.textMuted,";font-size:",J.sm,";}",""),scanButton:y("margin-top:16px;padding:10px 24px;font-size:",J.base,";font-weight:500;background:",d.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",d.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),grid:{name:"el23hk",styles:"display:grid;grid-template-columns:1fr;gap:12px;@media (min-width: 480px){grid-template-columns:repeat(2, 1fr);}@media (min-width: 768px){grid-template-columns:repeat(3, 1fr);}@media (min-width: 1024px){grid-template-columns:repeat(4, 1fr);}@media (min-width: 1280px){grid-template-columns:repeat(5, 1fr);}"},item:y("position:relative;border-radius:8px;border:1px solid ",d.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",d.surface,";user-select:none;box-shadow:0 1px 2px rgba(0, 0, 0, 0.04);&:hover{border-color:#d0d5dd;box-shadow:0 2px 4px rgba(0, 0, 0, 0.06);}",""),itemSelected:y("border-color:",d.primary,";box-shadow:0 0 0 1px ",d.primary,";&:hover{border-color:",d.primary,";box-shadow:0 0 0 1px ",d.primary,";}",""),parentItem:y("cursor:pointer;&:hover{border-color:",d.primary,";}",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:y("width:18px;height:18px;accent-color:",d.primary,";cursor:pointer;",""),content:y("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",d.background,";",""),contentCloud:y("",""),contentRemote:y("",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},imagesFolderIcon:y("width:56px;height:56px;color:",d.imagesFolder,";",""),imagesFolderWrapper:{name:"bjn8wh",styles:"position:relative"},lockIcon:y("position:absolute;bottom:4px;right:4px;width:16px;height:16px;color:",d.imagesFolder,";background:white;border-radius:50%;padding:2px;",""),parentIcon:y("width:56px;height:56px;color:",d.textMuted,";",""),fileIcon:y("width:40px;height:40px;color:",d.textMuted,";",""),image:{name:"rm1wug",styles:"max-width:100%;max-height:100%;object-fit:contain;border-radius:4px"},label:y("padding:10px 12px;background-color:",d.surface,";border-top:1px solid ",d.borderLight,";",""),labelRow:{name:"1gkgtms",styles:"display:flex;flex-direction:column;gap:2px"},labelText:{name:"fxp7t8",styles:"flex:1;min-width:0"},copyBtn:y("position:absolute;top:4px;right:4px;z-index:10;height:28px;width:28px;color:",d.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:",d.text,";}",""),copyIcon:{name:"1eg0rk6",styles:"width:18px;height:18px"},folderStats:{name:"905wvx",styles:"display:flex;align-items:center;gap:8px;margin:2px 0 0 0"},folderStat:y("display:flex;align-items:center;gap:3px;font-size:",J.xs,";",""),folderStatLocal:y("color:",d.textMuted,";",""),folderStatCloud:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatRemote:{name:"1lukubv",styles:"color:#ef4444"},folderStatUpdate:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatIconCloud:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},folderStatIconLocal:y("width:14px;height:14px;color:",d.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:y("color:#f59e0b;font-size:",J.xs,";",""),updateCloudIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateSyncIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},statusRow:{name:"1b1nq65",styles:"display:flex;align-items:center;justify-content:space-between;margin:2px 0 0 0;gap:4px"},statusLeft:{name:"1j5vobt",styles:"display:flex;align-items:center;gap:4px"},thumbChips:{name:"x2l7ss",styles:"display:flex;align-items:center;gap:3px;margin-left:auto"},thumbChip:y("display:inline-flex;align-items:center;justify-content:center;padding:1px 4px;font-size:9px;font-weight:600;border-radius:3px;background:rgba(0, 0, 0, 0.08);color:",d.textMuted,";text-transform:uppercase;letter-spacing:0.02em;",""),storedIconCloud:{name:"1e09qmx",styles:"width:16px;height:16px;color:#f59e0b"},storedIconRemote:{name:"1mrh6ju",styles:"width:16px;height:16px;color:#ef4444"},tooltip:{name:"qoyfdh",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;z-index:100;&::before{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},openBtn:y("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",J.sm,";font-weight:500;color:",d.primary,";background:",d.surface,";border:1px solid ",d.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:",d.primaryLight,";border-color:",d.primary,";}",""),featuredPlaceholder:y("position:relative;border-radius:8px;border:2px dashed ",d.success,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",d.background,";&:hover{border-color:",d.success,";background-color:",d.successLight,";}",""),featuredContent:{name:"y8o17o",styles:"position:relative;aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;gap:8px"},featuredIcon:y("width:40px;height:40px;color:",d.success,";",""),featuredText:y("font-size:",J.sm,";color:",d.success,";text-align:center;font-weight:500;",""),featuredLabel:y("padding:10px 12px;background-color:",d.surface,";border-top:1px solid ",d.borderLight,";",""),name:y("font-size:",J.sm,";font-weight:500;color:",d.text,";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;letter-spacing:-0.01em;direction:rtl;text-align:left;",""),size:y("font-size:",J.xs,";color:",d.textMuted,";margin:2px 0 0 0;",""),selectAllRow:y("display:flex;align-items:center;margin-bottom:16px;padding:12px 16px;background:",d.surface,";border-radius:8px;border:1px solid ",d.border,";",""),selectAllLabel:y("display:flex;align-items:center;gap:10px;font-size:",J.base,";font-weight:500;color:",d.textSecondary,";cursor:pointer;&:hover{color:",d.text,";}",""),selectAllCheckbox:y("width:16px;height:16px;accent-color:",d.primary,";","")};function Y1(){const{loading:o,sortedItems:r,metaEmpty:f,missingFeaturedImage:u,isAtRoot:h,isSearching:m,allItemsSelected:S,someItemsSelected:A,selectedItems:C,navigateUp:g,handleItemClick:R,handleOpen:M,handleGenerateThumbnail:q,handleSelectAll:Y,triggerScan:H,triggerRefresh:X,editedImageKey:ee}=qp(),[Z,re]=w.useState(!1),[P,me]=w.useState(!1),[N,oe]=w.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),V=()=>{re(!0)},ie=async U=>{re(!1),me(!0),oe({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const ne=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:U})});if(!ne.ok){const $=await ne.json();oe({current:0,total:4,percent:0,status:"error",message:$.error||"Failed to generate screenshot"});return}const I=ne.body?.getReader(),de=new TextDecoder;if(I){let $="";for(;;){const{done:Se,value:Ye}=await I.read();if(Se)break;$+=de.decode(Ye,{stream:!0});const _=$.split(`
|
|
82
|
+
`);$=_.pop()||"";for(const Q of _)if(Q.startsWith("data: "))try{const F=JSON.parse(Q.slice(6));F.type==="start"?oe(Re=>({...Re,total:F.total,message:`Screenshotting ${F.url}...`})):F.type==="progress"?oe({current:F.current,total:F.total,percent:F.percent,status:"processing",message:F.message}):F.type==="complete"?(oe({current:F.processed,total:F.processed,percent:100,status:F.errors>0?"error":"complete",message:F.message}),X()):F.type==="error"&&oe(Re=>({...Re,status:"error",message:F.message}))}catch{}}}}catch(ne){console.error("Featured image generation error:",ne),oe({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return o?b(ht,{children:[P&&s(cl,{title:"Generating Screenshot",progress:N,onClose:()=>me(!1)}),s("div",{css:le.loading,children:s("div",{css:le.spinner})})]}):f&&h?b("div",{css:le.empty,children:[s("svg",{css:le.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),s("p",{css:le.emptyText,children:"No files tracked yet"}),s("p",{css:le.emptyText,children:"Click Scan to discover files in your public folder"}),s("button",{css:le.scanButton,onClick:H,children:"Scan for Files"})]}):r.length===0&&h?b("div",{css:le.empty,children:[s("svg",{css:le.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})}),s("p",{css:le.emptyText,children:"No files in this folder"}),s("p",{css:le.emptyText,children:"Upload images or click Scan in the toolbar"})]}):b(ht,{children:[s(Yp,{isOpen:Z,onClose:()=>re(!1),onSelect:ie}),P&&s(cl,{title:"Generating Screenshot",progress:N,onClose:()=>me(!1)}),b("div",{children:[r.length>0&&s("div",{css:le.selectAllRow,children:b("label",{css:le.selectAllLabel,children:[s("input",{type:"checkbox",css:le.selectAllCheckbox,checked:S,ref:U=>{U&&(U.indeterminate=A&&!S)},onChange:Y}),"Select all (",r.length,")"]})}),b("div",{css:le.grid,children:[!h&&!m&&b("div",{css:[le.item,le.parentItem,"",""],onClick:g,children:[s("div",{css:le.content,children:s("svg",{css:le.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}),b("div",{css:le.label,children:[s("p",{css:le.name,children:".."}),s("p",{css:le.size,children:"Parent folder"})]})]}),r.map(U=>s(X1,{item:U,isSelected:C.has(U.path),onClick:ne=>R(U,ne),onOpen:()=>M(U),onGenerateThumbnail:()=>q(U),editedImageKey:ee},U.path)),h&&u&&!m&&b("div",{css:le.featuredPlaceholder,onClick:V,title:`Generate ${u.filename}`,children:[b("div",{css:le.featuredContent,children:[s("svg",{css:le.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})}),s("span",{css:le.featuredText,children:"Generate Screenshot"})]}),b("div",{css:le.featuredLabel,children:[s("p",{css:le.name,children:u.filename}),s("p",{css:le.size,children:"Click to screenshot homepage"})]})]})]})]})]})}function G1(o){return o.includes("/images/sm/")?"SM":o.includes("/images/md/")?"MD":o.includes("/images/lg/")?"LG":o.includes("/images/full/")?"FULL":null}function X1({item:o,isSelected:r,onClick:f,onOpen:u,onGenerateThumbnail:h,editedImageKey:m}){const[S,A]=w.useState(!1),C=o.type==="folder",g=!C&&o.thumbnail!==void 0,R=o.thumbnail&&m&&m.path===o.path?`${o.thumbnail}?v=${m.key}`:o.thumbnail,M=o.isProtected||C&&o.name==="images"&&o.path==="public/images",q=G1(o.path),Y=!C&&(o.hasSm||o.hasMd||o.hasLg||o.hasFull||q),H=ee=>{ee.stopPropagation();const Z="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(Z),A(!0),setTimeout(()=>A(!1),1500)},X=ee=>{if(M){ee.stopPropagation(),u();return}f(ee)};return b("div",{css:[le.item,r&&!M&&le.itemSelected,"",""],onClick:X,children:[!M&&s("div",{css:le.checkboxWrapper,onClick:ee=>ee.stopPropagation(),children:s("input",{type:"checkbox",css:le.checkbox,checked:r,onChange:()=>f({})})}),b("div",{css:[le.content,o.isCloud&&le.contentCloud,o.isRemote&&le.contentRemote,"",""],children:[b("button",{css:le.copyBtn,onClick:H,title:"Copy file path",children:[S&&s("span",{css:le.tooltip,children:"Copied!"}),s("svg",{css:le.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})})]}),s("button",{css:le.openBtn,onClick:ee=>{ee.stopPropagation(),u()},children:"Open"}),C?M?b("div",{css:le.imagesFolderWrapper,children:[s("svg",{css:le.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:s("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"})}),s("svg",{css:le.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:s("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"})})]}):s("svg",{css:le.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:s("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}):g&&R?s("img",{css:le.image,src:R,alt:o.name,loading:"lazy"}):s("svg",{css:le.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})})]}),s("div",{css:le.label,children:s("div",{css:le.labelRow,children:b("div",{css:le.labelText,children:[s("p",{css:le.name,title:o.name,children:o.name}),C?b("div",{css:le.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&b("span",{css:[le.folderStat,le.folderStatLocal,"",""],title:`${o.localCount} local`,children:[s("svg",{css:le.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),o.localCount]}),o.cloudCount!==void 0&&o.cloudCount>0&&b("span",{css:[le.folderStat,le.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[s("svg",{css:le.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),o.cloudCount]}),o.remoteCount!==void 0&&o.remoteCount>0&&b("span",{css:[le.folderStat,le.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[s("svg",{css:le.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),o.remoteCount]}),o.updateCount!==void 0&&o.updateCount>0&&b("span",{css:[le.folderStat,le.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[s("svg",{css:le.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),o.updateCount]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount!==void 0&&b("span",{css:le.size,children:[o.fileCount," files"]})]}):b("div",{css:le.statusRow,children:[s("div",{css:le.statusLeft,children:o.hasUpdate?b(ht,{children:[s("svg",{css:le.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})}),s("svg",{css:le.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})}),s("span",{css:le.updateLabel,children:"update"})]}):o.cdnPushed?s("svg",{css:o.isRemote?le.storedIconRemote:le.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.isRemote?s("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"}):s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}):o.size!==void 0?s("span",{css:le.size,children:V1(o.size)}):null}),Y&&s("span",{css:le.thumbChips,children:q?s("span",{css:le.thumbChip,children:q}):b(ht,{children:[o.hasSm&&s("span",{css:le.thumbChip,children:"SM"}),o.hasMd&&s("span",{css:le.thumbChip,children:"MD"}),o.hasLg&&s("span",{css:le.thumbChip,children:"LG"}),o.hasFull&&s("span",{css:le.thumbChip,children:"FULL"})]})})]})]})})})]})}function V1(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}const Q1=dn`
|
|
83
|
+
to { transform: rotate(360deg); }
|
|
84
|
+
`,K={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:y("width:32px;height:32px;border-radius:50%;border:3px solid ",d.border,";border-top-color:",d.primary,";animation:",Q1," 0.8s linear infinite;",""),empty:y("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",d.textSecondary,";",""),emptyHint:y("font-size:",J.sm,";color:",d.textMuted,";margin-top:4px;",""),scanButton:y("margin-top:16px;padding:10px 24px;font-size:",J.base,";font-weight:500;background:",d.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",d.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),tableWrapper:y("background:",d.surface,";border-radius:8px;border:1px solid ",d.border,";overflow-x:auto;",""),table:{name:"nufjao",styles:"width:100%;min-width:600px;border-collapse:collapse;white-space:nowrap"},th:y("text-align:left;font-size:11px;color:",d.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",d.background,";border-bottom:1px solid ",d.border,";",""),thCheckbox:{name:"5iz1wr",styles:"width:48px"},thSize:{name:"yct5co",styles:"width:96px"},thDimensions:{name:"gu2s0e",styles:"width:128px"},thCdn:{name:"yct5co",styles:"width:96px"},tbody:y("",""),row:y("cursor:pointer;transition:background-color 0.15s ease;user-select:none;&:hover{background-color:",d.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",d.borderLight,";}",""),rowSelected:y("background-color:",d.primaryLight,";&:hover{background-color:",d.primaryLight,";}",""),parentRow:y("cursor:pointer;border-bottom:1px solid ",d.border,";&:hover{background-color:",d.surfaceHover,";}",""),td:{name:"i563hg",styles:"padding:12px 16px"},checkboxCell:{name:"sahq4q",styles:"padding:12px 16px;cursor:pointer;vertical-align:middle"},checkbox:y("width:18px;height:18px;accent-color:",d.primary,";cursor:pointer;display:block;",""),actionsCell:{name:"1w56d5c",styles:"display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;flex-shrink:0"},copyBtn:y("position:relative;flex-shrink:0;height:32px;width:32px;font-size:",J.xs,";color:",d.textSecondary,";background:",d.surface,";border:1px solid ",d.border,";padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;justify-content:center;&:hover{background:",d.surfaceHover,";border-color:",d.borderHover,";color:",d.text,";}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},folderStats:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},folderStat:y("display:flex;align-items:center;gap:3px;font-size:",J.xs,";",""),folderStatLocal:y("color:",d.textMuted,";",""),folderStatCloud:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatRemote:{name:"1lukubv",styles:"color:#ef4444"},folderStatUpdate:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatIconCloud:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},folderStatIconLocal:y("width:14px;height:14px;color:",d.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:y("display:flex;align-items:center;gap:4px;color:#f59e0b;font-size:",J.xs,";",""),updateCloudIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateSyncIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},storedLabel:{name:"s5xdrg",styles:"display:flex;align-items:center"},storedIconCloud:{name:"1e09qmx",styles:"width:16px;height:16px;color:#f59e0b"},storedIconRemote:{name:"1mrh6ju",styles:"width:16px;height:16px;color:#ef4444"},tooltip:{name:"1bu1odp",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},nameCell:{name:"9s3nhy",styles:"display:flex;align-items:center;gap:12px;flex:1"},thumbnailWrapper:{name:"f01c4l",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:4px"},thumbnailCloud:y("",""),thumbnailRemote:y("",""),folderIconWrapper:{name:"xfecxx",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0"},folderIcon:{name:"a45yt2",styles:"width:24px;height:24px;color:#f9935e"},imagesFolderWrapper:{name:"iqqile",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;position:relative;align-items:center"},imagesFolderIcon:y("width:24px;height:24px;color:",d.imagesFolder,";",""),lockIcon:y("width:10px;height:10px;color:",d.imagesFolder,";margin-left:-6px;margin-top:8px;",""),parentIcon:y("width:20px;height:20px;color:",d.textMuted,";flex-shrink:0;",""),fileIcon:y("width:20px;height:20px;color:",d.textMuted,";flex-shrink:0;",""),thumbnail:y("max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;border:1px solid ",d.borderLight,";",""),name:y("font-size:",J.base,";font-weight:500;color:",d.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:y("font-size:",J.sm,";color:",d.textSecondary,";",""),cdnBadge:y("display:inline-flex;align-items:center;gap:4px;font-size:",J.xs,";font-weight:500;color:",d.success,";",""),cdnBadgeRemote:y("display:inline-flex;align-items:center;font-size:",J.xs,";font-weight:500;color:#ef4444;",""),cdnIcon:{name:"1suksrg",styles:"width:12px;height:12px"},cdnEmpty:y("font-size:",J.sm,";color:",d.textMuted,";",""),featuredRow:y("cursor:pointer;transition:background-color 0.15s ease;border:2px dashed ",d.success,";&:hover{background-color:",d.successLight,";}td{border-bottom:none!important;}",""),featuredIcon:y("width:24px;height:24px;color:",d.success,";",""),featuredText:y("color:",d.success,";font-weight:500;",""),openBtn:y("height:32px;font-size:",J.sm,";font-weight:500;color:",d.primary,";background:",d.surface,";border:1px solid ",d.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",d.primaryLight,";border-color:",d.primary,";}","")};function K1(){const{loading:o,sortedItems:r,metaEmpty:f,missingFeaturedImage:u,isAtRoot:h,isSearching:m,allItemsSelected:S,someItemsSelected:A,selectedItems:C,navigateUp:g,handleItemClick:R,handleOpen:M,handleGenerateThumbnail:q,handleSelectAll:Y,triggerScan:H,triggerRefresh:X,editedImageKey:ee}=qp(),[Z,re]=w.useState(!1),[P,me]=w.useState(!1),[N,oe]=w.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),V=()=>{re(!0)},ie=async U=>{re(!1),me(!0),oe({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const ne=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:U})});if(!ne.ok){const $=await ne.json();oe({current:0,total:4,percent:0,status:"error",message:$.error||"Failed to generate screenshot"});return}const I=ne.body?.getReader(),de=new TextDecoder;if(I){let $="";for(;;){const{done:Se,value:Ye}=await I.read();if(Se)break;$+=de.decode(Ye,{stream:!0});const _=$.split(`
|
|
85
|
+
`);$=_.pop()||"";for(const Q of _)if(Q.startsWith("data: "))try{const F=JSON.parse(Q.slice(6));F.type==="start"?oe(Re=>({...Re,total:F.total,message:`Screenshotting ${F.url}...`})):F.type==="progress"?oe({current:F.current,total:F.total,percent:F.percent,status:"processing",message:F.message}):F.type==="complete"?(oe({current:F.processed,total:F.processed,percent:100,status:F.errors>0?"error":"complete",message:F.message}),X()):F.type==="error"&&oe(Re=>({...Re,status:"error",message:F.message}))}catch{}}}}catch(ne){console.error("Featured image generation error:",ne),oe({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return o?s("div",{css:K.loading,children:s("div",{css:K.spinner})}):f&&h?b("div",{css:K.empty,children:[s("p",{children:"No files tracked yet"}),s("p",{css:K.emptyHint,children:"Click Scan to discover files in your public folder"}),s("button",{css:K.scanButton,onClick:H,children:"Scan for Files"})]}):r.length===0&&h?b("div",{css:K.empty,children:[s("p",{children:"No files in this folder"}),s("p",{css:K.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):b(ht,{children:[s(Yp,{isOpen:Z,onClose:()=>re(!1),onSelect:ie}),P&&s(cl,{title:"Generating Screenshot",progress:N,onClose:()=>me(!1)}),s("div",{css:K.tableWrapper,children:b("table",{css:K.table,children:[s("thead",{children:b("tr",{children:[s("th",{css:[K.th,K.thCheckbox,"",""],children:r.length>0&&s("input",{type:"checkbox",css:K.checkbox,checked:S,ref:U=>{U&&(U.indeterminate=A&&!S)},onChange:Y})}),s("th",{css:K.th,children:"Name"}),s("th",{css:[K.th,K.thSize,"",""],children:"Size"}),s("th",{css:[K.th,K.thDimensions,"",""],children:"Dimensions"}),s("th",{css:[K.th,K.thCdn,"",""],children:"CDN"})]})}),b("tbody",{css:K.tbody,children:[!h&&!m&&b("tr",{css:K.parentRow,onClick:g,children:[s("td",{css:K.td}),s("td",{css:K.td,children:b("div",{css:K.nameCell,children:[s("svg",{css:K.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),s("span",{css:K.name,children:".."})]})}),s("td",{css:[K.td,K.meta,"",""],children:"--"}),s("td",{css:[K.td,K.meta,"",""],children:"Parent folder"}),s("td",{css:K.td,children:"--"})]}),r.map(U=>s(Z1,{item:U,isSelected:C.has(U.path),onClick:ne=>R(U,ne),onOpen:()=>M(U),onGenerateThumbnail:()=>q(U),editedImageKey:ee},U.path)),h&&u&&!m&&b("tr",{css:K.featuredRow,onClick:V,title:`Generate ${u.filename}`,children:[s("td",{css:K.td}),s("td",{css:K.td,children:b("div",{css:K.nameCell,children:[s("div",{css:K.folderIconWrapper,children:s("svg",{css:K.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})})}),s("span",{css:[K.name,K.featuredText,"",""],children:u.filename})]})}),s("td",{css:[K.td,K.meta,K.featuredText,"",""],children:"--"}),s("td",{css:[K.td,K.meta,K.featuredText,"",""],children:"Click to generate"}),s("td",{css:[K.td,K.featuredText,"",""],children:"--"})]})]})]})})]})}function Z1({item:o,isSelected:r,onClick:f,onOpen:u,onGenerateThumbnail:h,editedImageKey:m}){const[S,A]=w.useState(!1),C=o.type==="folder",g=!C&&o.thumbnail!==void 0,R=o.thumbnail&&m&&m.path===o.path?`${o.thumbnail}?v=${m.key}`:o.thumbnail,M=o.isProtected||C&&o.name==="images"&&o.path==="public/images",q=H=>{H.stopPropagation();const X="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(X),A(!0),setTimeout(()=>A(!1),1500)},Y=H=>{if(M){H.stopPropagation(),u();return}f(H)};return b("tr",{css:[K.row,r&&!M&&K.rowSelected,"",""],onClick:Y,children:[s("td",{css:[K.td,K.checkboxCell,"",""],onClick:H=>H.stopPropagation(),children:!M&&s("input",{type:"checkbox",css:K.checkbox,checked:r,onChange:()=>f({})})}),s("td",{css:K.td,children:b("div",{css:K.nameCell,children:[C?M?b("div",{css:K.imagesFolderWrapper,children:[s("svg",{css:K.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:s("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"})}),s("svg",{css:K.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:s("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"})})]}):s("div",{css:K.folderIconWrapper,children:s("svg",{css:K.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:s("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}):g&&R?s("div",{css:[K.thumbnailWrapper,o.isCloud&&K.thumbnailCloud,o.isRemote&&K.thumbnailRemote,"",""],children:s("img",{css:K.thumbnail,src:R,alt:o.name,loading:"lazy"})}):s("div",{css:[K.thumbnailWrapper,o.isCloud&&K.thumbnailCloud,o.isRemote&&K.thumbnailRemote,"",""],children:s("svg",{css:K.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})})}),s("span",{css:K.name,title:o.name,children:J1(o.name)}),b("div",{css:K.actionsCell,children:[b("button",{css:K.copyBtn,onClick:q,title:"Copy file path",children:[S&&s("span",{css:K.tooltip,children:"Copied!"}),s("svg",{css:K.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})})]}),s("button",{css:K.openBtn,onClick:H=>{H.stopPropagation(),u()},children:"Open"})]})]})}),s("td",{css:[K.td,K.meta,"",""],children:C?b("div",{css:K.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&b("span",{css:[K.folderStat,K.folderStatLocal,"",""],title:`${o.localCount} local`,children:[s("svg",{css:K.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),o.localCount]}),o.cloudCount!==void 0&&o.cloudCount>0&&b("span",{css:[K.folderStat,K.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[s("svg",{css:K.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),o.cloudCount]}),o.remoteCount!==void 0&&o.remoteCount>0&&b("span",{css:[K.folderStat,K.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[s("svg",{css:K.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),o.remoteCount]}),o.updateCount!==void 0&&o.updateCount>0&&b("span",{css:[K.folderStat,K.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[s("svg",{css:K.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),o.updateCount]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount!==void 0&&b("span",{children:[o.fileCount," files"]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount===void 0&&"--"]}):o.hasUpdate?b("span",{css:K.updateLabel,children:[s("svg",{css:K.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})}),s("svg",{css:K.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"update"]}):o.cdnPushed?s("span",{css:K.storedLabel,children:s("svg",{css:o.isRemote?K.storedIconRemote:K.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.isRemote?s("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"}):s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}):o.size!==void 0?Sp(o.size):"--"}),s("td",{css:[K.td,K.meta,"",""],children:C?o.totalSize!==void 0?Sp(o.totalSize):"--":o.dimensions?`${o.dimensions.width}x${o.dimensions.height}`:"--"}),s("td",{css:K.td,children:o.cdnPushed?o.isRemote?s("span",{css:K.cdnBadgeRemote,children:"Remote"}):b("span",{css:K.cdnBadge,children:[s("svg",{css:K.cdnIcon,fill:"currentColor",viewBox:"0 0 20 20",children:s("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"]}):s("span",{css:K.cdnEmpty,children:"--"})})]})}function Sp(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}function J1(o,r=32){if(o.length<=r)return o;const f=o.lastIndexOf("."),u=f>0?o.substring(f):"",h=f>0?o.substring(0,f):o,m=r-u.length-3;if(m<6)return o.substring(0,r-3)+"...";const S=Math.ceil(m/2),A=Math.floor(m/2);return h.substring(0,S)+"..."+h.substring(h.length-A)+u}var F1=Object.defineProperty,$1=(o,r,f)=>r in o?F1(o,r,{enumerable:!0,configurable:!0,writable:!0,value:f}):o[r]=f,wt=(o,r,f)=>$1(o,typeof r!="symbol"?r+"":r,f);const Ar={x:0,y:0,width:0,height:0,unit:"px"},Zl=(o,r,f)=>Math.min(Math.max(o,r),f),W1=(...o)=>o.filter(r=>r&&typeof r=="string").join(" "),Cp=(o,r)=>o===r||o.width===r.width&&o.height===r.height&&o.x===r.x&&o.y===r.y&&o.unit===r.unit;function Jl(o,r,f){return o.unit==="%"?{...Ar,...o,unit:"%"}:{unit:"%",x:o.x?o.x/r*100:0,y:o.y?o.y/f*100:0,width:o.width?o.width/r*100:0,height:o.height?o.height/f*100:0}}function ja(o,r,f){return o.unit?o.unit==="px"?{...Ar,...o,unit:"px"}:{unit:"px",x:o.x?o.x*r/100:0,y:o.y?o.y*f/100:0,width:o.width?o.width*r/100:0,height:o.height?o.height*f/100:0}:{...Ar,...o,unit:"px"}}function wp(o,r,f,u,h,m=0,S=0,A=u,C=h){const g={...o};let R=Math.min(m,u),M=Math.min(S,h),q=Math.min(A,u),Y=Math.min(C,h);r&&(r>1?(R=S?S*r:R,M=R/r,q=A*r):(M=m?m/r:M,R=M*r,Y=C/r)),g.y<0&&(g.height=Math.max(g.height+g.y,M),g.y=0),g.x<0&&(g.width=Math.max(g.width+g.x,R),g.x=0);const H=u-(g.x+g.width);H<0&&(g.x=Math.min(g.x,u-R),g.width+=H);const X=h-(g.y+g.height);if(X<0&&(g.y=Math.min(g.y,h-M),g.height+=X),g.width<R&&((f==="sw"||f=="nw")&&(g.x-=R-g.width),g.width=R),g.height<M&&((f==="nw"||f=="ne")&&(g.y-=M-g.height),g.height=M),g.width>q&&((f==="sw"||f=="nw")&&(g.x-=q-g.width),g.width=q),g.height>Y&&((f==="nw"||f=="ne")&&(g.y-=Y-g.height),g.height=Y),r){const ee=g.width/g.height;if(ee<r){const Z=Math.max(g.width/r,M);(f==="nw"||f=="ne")&&(g.y-=Z-g.height),g.height=Z}else if(ee>r){const Z=Math.max(g.height*r,R);(f==="sw"||f=="nw")&&(g.x-=Z-g.width),g.width=Z}}return g}function I1(o,r,f,u){const h={...o};return r==="ArrowLeft"?u==="nw"?(h.x-=f,h.y-=f,h.width+=f,h.height+=f):u==="w"?(h.x-=f,h.width+=f):u==="sw"?(h.x-=f,h.width+=f,h.height+=f):u==="ne"?(h.y+=f,h.width-=f,h.height-=f):u==="e"?h.width-=f:u==="se"&&(h.width-=f,h.height-=f):r==="ArrowRight"&&(u==="nw"?(h.x+=f,h.y+=f,h.width-=f,h.height-=f):u==="w"?(h.x+=f,h.width-=f):u==="sw"?(h.x+=f,h.width-=f,h.height-=f):u==="ne"?(h.y-=f,h.width+=f,h.height+=f):u==="e"?h.width+=f:u==="se"&&(h.width+=f,h.height+=f)),r==="ArrowUp"?u==="nw"?(h.x-=f,h.y-=f,h.width+=f,h.height+=f):u==="n"?(h.y-=f,h.height+=f):u==="ne"?(h.y-=f,h.width+=f,h.height+=f):u==="sw"?(h.x+=f,h.width-=f,h.height-=f):u==="s"?h.height-=f:u==="se"&&(h.width-=f,h.height-=f):r==="ArrowDown"&&(u==="nw"?(h.x+=f,h.y+=f,h.width-=f,h.height-=f):u==="n"?(h.y+=f,h.height-=f):u==="ne"?(h.y+=f,h.width-=f,h.height-=f):u==="sw"?(h.x-=f,h.width+=f,h.height+=f):u==="s"?h.height+=f:u==="se"&&(h.width+=f,h.height+=f)),h}const Fl={capture:!0,passive:!1};let P1=0;const qa=class Hn extends w.PureComponent{constructor(){super(...arguments),wt(this,"docMoveBound",!1),wt(this,"mouseDownOnCrop",!1),wt(this,"dragStarted",!1),wt(this,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),wt(this,"componentRef",w.createRef()),wt(this,"mediaRef",w.createRef()),wt(this,"resizeObserver"),wt(this,"initChangeCalled",!1),wt(this,"instanceId",`rc-${P1++}`),wt(this,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),wt(this,"onCropPointerDown",r=>{const{crop:f,disabled:u}=this.props,h=this.getBox();if(!f)return;const m=ja(f,h.width,h.height);if(u)return;r.cancelable&&r.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const S=r.target.dataset.ord,A=!!S;let C=r.clientX,g=r.clientY,R=m.x,M=m.y;if(S){const q=r.clientX-h.x,Y=r.clientY-h.y;let H=0,X=0;S==="ne"||S=="e"?(H=q-(m.x+m.width),X=Y-m.y,R=m.x,M=m.y+m.height):S==="se"||S==="s"?(H=q-(m.x+m.width),X=Y-(m.y+m.height),R=m.x,M=m.y):S==="sw"||S=="w"?(H=q-m.x,X=Y-(m.y+m.height),R=m.x+m.width,M=m.y):(S==="nw"||S=="n")&&(H=q-m.x,X=Y-m.y,R=m.x+m.width,M=m.y+m.height),C=R+h.x+H,g=M+h.y+X}this.evData={startClientX:C,startClientY:g,startCropX:R,startCropY:M,clientX:r.clientX,clientY:r.clientY,isResize:A,ord:S},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})}),wt(this,"onComponentPointerDown",r=>{const{crop:f,disabled:u,locked:h,keepSelection:m,onChange:S}=this.props,A=this.getBox();if(u||h||m&&f)return;r.cancelable&&r.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const C=r.clientX-A.x,g=r.clientY-A.y,R={unit:"px",x:C,y:g,width:0,height:0};this.evData={startClientX:r.clientX,startClientY:r.clientY,startCropX:C,startCropY:g,clientX:r.clientX,clientY:r.clientY,isResize:!0},this.mouseDownOnCrop=!0,S(ja(R,A.width,A.height),Jl(R,A.width,A.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}),wt(this,"onDocPointerMove",r=>{const{crop:f,disabled:u,onChange:h,onDragStart:m}=this.props,S=this.getBox();if(u||!f||!this.mouseDownOnCrop)return;r.cancelable&&r.preventDefault(),this.dragStarted||(this.dragStarted=!0,m&&m(r));const{evData:A}=this;A.clientX=r.clientX,A.clientY=r.clientY;let C;A.isResize?C=this.resizeCrop():C=this.dragCrop(),Cp(f,C)||h(ja(C,S.width,S.height),Jl(C,S.width,S.height))}),wt(this,"onComponentKeyDown",r=>{const{crop:f,disabled:u,onChange:h,onComplete:m}=this.props;if(u)return;const S=r.key;let A=!1;if(!f)return;const C=this.getBox(),g=this.makePixelCrop(C),R=(navigator.platform.match("Mac")?r.metaKey:r.ctrlKey)?Hn.nudgeStepLarge:r.shiftKey?Hn.nudgeStepMedium:Hn.nudgeStep;if(S==="ArrowLeft"?(g.x-=R,A=!0):S==="ArrowRight"?(g.x+=R,A=!0):S==="ArrowUp"?(g.y-=R,A=!0):S==="ArrowDown"&&(g.y+=R,A=!0),A){r.cancelable&&r.preventDefault(),g.x=Zl(g.x,0,C.width-g.width),g.y=Zl(g.y,0,C.height-g.height);const M=ja(g,C.width,C.height),q=Jl(g,C.width,C.height);h(M,q),m&&m(M,q)}}),wt(this,"onHandlerKeyDown",(r,f)=>{const{aspect:u=0,crop:h,disabled:m,minWidth:S=0,minHeight:A=0,maxWidth:C,maxHeight:g,onChange:R,onComplete:M}=this.props,q=this.getBox();if(m||!h)return;if(r.key==="ArrowUp"||r.key==="ArrowDown"||r.key==="ArrowLeft"||r.key==="ArrowRight")r.stopPropagation(),r.preventDefault();else return;const Y=(navigator.platform.match("Mac")?r.metaKey:r.ctrlKey)?Hn.nudgeStepLarge:r.shiftKey?Hn.nudgeStepMedium:Hn.nudgeStep,H=ja(h,q.width,q.height),X=I1(H,r.key,Y,f),ee=wp(X,u,f,q.width,q.height,S,A,C,g);if(!Cp(h,ee)){const Z=Jl(ee,q.width,q.height);R(ee,Z),M&&M(ee,Z)}}),wt(this,"onDocPointerDone",r=>{const{crop:f,disabled:u,onComplete:h,onDragEnd:m}=this.props,S=this.getBox();this.unbindDocMove(),!(u||!f)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,m&&m(r),h&&h(ja(f,S.width,S.height),Jl(f,S.width,S.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),wt(this,"onDragFocus",()=>{var r;(r=this.componentRef.current)==null||r.scrollTo(0,0)})}get document(){return document}getBox(){const r=this.mediaRef.current;if(!r)return{x:0,y:0,width:0,height:0};const{x:f,y:u,width:h,height:m}=r.getBoundingClientRect();return{x:f,y:u,width:h,height:m}}componentDidUpdate(r){const{crop:f,onComplete:u}=this.props;if(u&&!r.crop&&f){const{width:h,height:m}=this.getBox();h&&m&&u(ja(f,h,m),Jl(f,h,m))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,Fl),this.document.addEventListener("pointerup",this.onDocPointerDone,Fl),this.document.addEventListener("pointercancel",this.onDocPointerDone,Fl),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,Fl),this.document.removeEventListener("pointerup",this.onDocPointerDone,Fl),this.document.removeEventListener("pointercancel",this.onDocPointerDone,Fl),this.docMoveBound=!1)}getCropStyle(){const{crop:r}=this.props;if(r)return{top:`${r.y}${r.unit}`,left:`${r.x}${r.unit}`,width:`${r.width}${r.unit}`,height:`${r.height}${r.unit}`}}dragCrop(){const{evData:r}=this,f=this.getBox(),u=this.makePixelCrop(f),h=r.clientX-r.startClientX,m=r.clientY-r.startClientY;return u.x=Zl(r.startCropX+h,0,f.width-u.width),u.y=Zl(r.startCropY+m,0,f.height-u.height),u}getPointRegion(r,f,u,h){const{evData:m}=this,S=m.clientX-r.x,A=m.clientY-r.y;let C;h&&f?C=f==="nw"||f==="n"||f==="ne":C=A<m.startCropY;let g;return u&&f?g=f==="nw"||f==="w"||f==="sw":g=S<m.startCropX,g?C?"nw":"sw":C?"ne":"se"}resolveMinDimensions(r,f,u=0,h=0){const m=Math.min(u,r.width),S=Math.min(h,r.height);return!f||!m&&!S?[m,S]:f>1?m?[m,m/f]:[S*f,S]:S?[S*f,S]:[m,m/f]}resizeCrop(){const{evData:r}=this,{aspect:f=0,maxWidth:u,maxHeight:h}=this.props,m=this.getBox(),[S,A]=this.resolveMinDimensions(m,f,this.props.minWidth,this.props.minHeight);let C=this.makePixelCrop(m);const g=this.getPointRegion(m,r.ord,S,A),R=r.ord||g;let M=r.clientX-r.startClientX,q=r.clientY-r.startClientY;(S&&R==="nw"||R==="w"||R==="sw")&&(M=Math.min(M,-S)),(A&&R==="nw"||R==="n"||R==="ne")&&(q=Math.min(q,-A));const Y={unit:"px",x:0,y:0,width:0,height:0};g==="ne"?(Y.x=r.startCropX,Y.width=M,f?(Y.height=Y.width/f,Y.y=r.startCropY-Y.height):(Y.height=Math.abs(q),Y.y=r.startCropY-Y.height)):g==="se"?(Y.x=r.startCropX,Y.y=r.startCropY,Y.width=M,f?Y.height=Y.width/f:Y.height=q):g==="sw"?(Y.x=r.startCropX+M,Y.y=r.startCropY,Y.width=Math.abs(M),f?Y.height=Y.width/f:Y.height=q):g==="nw"&&(Y.x=r.startCropX+M,Y.width=Math.abs(M),f?(Y.height=Y.width/f,Y.y=r.startCropY-Y.height):(Y.height=Math.abs(q),Y.y=r.startCropY+q));const H=wp(Y,f,g,m.width,m.height,S,A,u,h);return f||Hn.xyOrds.indexOf(R)>-1?C=H:Hn.xOrds.indexOf(R)>-1?(C.x=H.x,C.width=H.width):Hn.yOrds.indexOf(R)>-1&&(C.y=H.y,C.height=H.height),C.x=Zl(C.x,0,m.width-C.width),C.y=Zl(C.y,0,m.height-C.height),C}renderCropSelection(){const{ariaLabels:r=Hn.defaultProps.ariaLabels,disabled:f,locked:u,renderSelectionAddon:h,ruleOfThirds:m,crop:S}=this.props,A=this.getCropStyle();if(S)return it.createElement("div",{style:A,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":r.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!f&&!u&&it.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},it.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),it.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),it.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),it.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),it.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":r.nwDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"nw"),role:"button"}),it.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":r.nDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"n"),role:"button"}),it.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":r.neDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"ne"),role:"button"}),it.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":r.eDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"e"),role:"button"}),it.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":r.seDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"se"),role:"button"}),it.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":r.sDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"s"),role:"button"}),it.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":r.swDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"sw"),role:"button"}),it.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":r.wDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"w"),role:"button"})),h&&it.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:C=>C.stopPropagation()},h(this.state)),m&&it.createElement(it.Fragment,null,it.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),it.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(r){const f={...Ar,...this.props.crop||{}};return ja(f,r.width,r.height)}render(){const{aspect:r,children:f,circularCrop:u,className:h,crop:m,disabled:S,locked:A,style:C,ruleOfThirds:g}=this.props,{cropIsActive:R,newCropIsBeingDrawn:M}=this.state,q=m?this.renderCropSelection():null,Y=W1("ReactCrop",h,R&&"ReactCrop--active",S&&"ReactCrop--disabled",A&&"ReactCrop--locked",M&&"ReactCrop--new-crop",m&&r&&"ReactCrop--fixed-aspect",m&&u&&"ReactCrop--circular-crop",m&&g&&"ReactCrop--rule-of-thirds",!this.dragStarted&&m&&!m.width&&!m.height&&"ReactCrop--invisible-crop",u&&"ReactCrop--no-animate");return it.createElement("div",{ref:this.componentRef,className:Y,style:C},it.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},f),m?it.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},it.createElement("defs",null,it.createElement("mask",{id:`hole-${this.instanceId}`},it.createElement("rect",{width:"100%",height:"100%",fill:"white"}),u?it.createElement("ellipse",{cx:`${m.x+m.width/2}${m.unit}`,cy:`${m.y+m.height/2}${m.unit}`,rx:`${m.width/2}${m.unit}`,ry:`${m.height/2}${m.unit}`,fill:"black"}):it.createElement("rect",{x:`${m.x}${m.unit}`,y:`${m.y}${m.unit}`,width:`${m.width}${m.unit}`,height:`${m.height}${m.unit}`,fill:"black"}))),it.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,q)}};wt(qa,"xOrds",["e","w"]),wt(qa,"yOrds",["n","s"]),wt(qa,"xyOrds",["nw","ne","se","sw"]),wt(qa,"nudgeStep",1),wt(qa,"nudgeStepMedium",10),wt(qa,"nudgeStepLarge",100),wt(qa,"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 e2=qa;const t2=dn`
|
|
86
|
+
from { opacity: 0; }
|
|
87
|
+
to { opacity: 1; }
|
|
88
|
+
`,Me={overlay:y("position:fixed;inset:0;z-index:10001;display:flex;background:transparent;animation:",t2," 0.15s ease-out;font-family:",oo,";",""),container:y(ei," display:flex;flex:1;margin:24px;background:",d.surface,";border:1px solid ",d.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:y("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",d.background,";overflow:hidden;.ReactCrop__crop-selection{border:2px solid ",d.primary,";}",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},closeBtn:y("padding:8px;background:",d.surface,";border:1px solid ",d.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:",d.surfaceHover,";border-color:",d.borderHover,";}",""),closeIcon:y("width:20px;height:20px;color:",d.textSecondary,";",""),rotationWrapper:{name:"1xwnw1d",styles:"transition:transform 0.3s ease;position:relative;cursor:pointer"},cropHint:y("position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background:rgba(0, 0, 0, 0.7);color:white;padding:12px 20px;border-radius:8px;font-size:",J.sm,";pointer-events:none;white-space:nowrap;",""),successBanner:y("position:absolute;top:50%;left:50%;transform:translate(-50%, -50%);background:#fbbf24;color:#000;padding:12px 24px;border-radius:8px;font-size:",J.sm,";font-weight:600;pointer-events:none;z-index:10;animation:fadeInOut 3s ease-in-out forwards;@keyframes fadeInOut{0%{opacity:0;transform:translate(-50%, -50%) scale(0.9);}10%{opacity:1;transform:translate(-50%, -50%) scale(1);}90%{opacity:1;transform:translate(-50%, -50%) scale(1);}100%{opacity:0;transform:translate(-50%, -50%) scale(0.9);}}",""),cropWrapper:{name:"12wysvm",styles:"max-width:100%;max-height:calc(100vh - 150px);img{max-width:100%;max-height:calc(100vh - 150px);display:block;}"},sidebar:y("width:280px;background:",d.surface,";border-left:1px solid ",d.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:y("padding:16px 20px;border-bottom:1px solid ",d.border,";",""),sidebarTitle:y("font-size:",J.base,";font-weight:600;color:",d.text,";margin:0;",""),sidebarContent:{name:"1uv1qvv",styles:"flex:1;padding:20px;overflow:auto;display:flex;flex-direction:column;gap:20px"},section:{name:"1c3pogw",styles:"display:flex;flex-direction:column;gap:10px"},sectionLabel:y("font-size:",J.sm,";font-weight:600;color:",d.text,";",""),subSectionLabel:y("font-size:",J.xs,";font-weight:500;color:",d.textMuted,";text-transform:uppercase;letter-spacing:0.5px;",""),aspectButtons:{name:"13l5m7f",styles:"display:flex;gap:6px;flex-wrap:wrap"},aspectBtn:y("padding:6px 10px;font-size:",J.sm,";border:1px solid ",d.border,";background:",d.surface,";color:",d.text,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover:not(:disabled){background-color:",d.surfaceHover,";border-color:",d.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),aspectBtnActive:y("background-color:",d.primary,";border-color:",d.primary,";color:white;&:hover:not(:disabled){background-color:",d.primary,";border-color:",d.primary,";}",""),rotateButtons:{name:"11jf4ye",styles:"display:flex;gap:8px"},rotateBtn:y("flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 12px;font-size:",J.sm,";font-weight:500;background:",d.surface,";border:1px solid ",d.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",d.text,";&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),rotateIcon:{name:"157xhr7",styles:"width:16px;height:16px"},resizeRow:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},resizeInput:y("width:80px;min-width:0;padding:8px 6px;font-size:",J.sm,";border:1px solid ",d.border,";border-radius:6px;background:",d.surface,";color:",d.text,";text-align:center;&:focus{outline:none;border-color:",d.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;background:",d.surfaceHover,";}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}-moz-appearance:textfield;",""),resizeX:y("font-size:",J.sm,";color:",d.textMuted,";",""),sidebarFooter:y("padding:16px 20px;border-top:1px solid ",d.border,";display:flex;flex-direction:column;gap:8px;",""),actionBtn:y("display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;font-size:",J.base,";font-weight:500;background:",d.primary,";border:1px solid ",d.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:white;&:hover:not(:disabled){background-color:",d.primaryHover,";border-color:",d.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),cancelBtn:y("display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;font-size:",J.base,";font-weight:500;background:",d.surface,";border:1px solid ",d.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",d.text,";&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),spinner:{name:"1b4712p",styles:"width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin 0.75s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}"},hint:y("font-size:",J.xs,";color:",d.textMuted,";font-style:italic;",""),clearBtn:y("margin-top:8px;padding:6px 12px;font-size:",J.xs,";color:",d.textSecondary,";background:transparent;border:1px solid ",d.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;&:hover{background:",d.surfaceHover,";color:",d.text,";}","")},n2=[{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 a2({imagePath:o,imageSrc:r,dimensions:f,onClose:u,onSaveComplete:h,triggerRefresh:m}){const S=w.useRef(null),[A,C]=w.useState(),[g,R]=w.useState(),[M,q]=w.useState(void 0),[Y,H]=w.useState(f.width),[X,ee]=w.useState(f.height),[Z,re]=w.useState(!1),[P,me]=w.useState(!1),[N,oe]=w.useState(!1),[V,ie]=w.useState({width:f.width,height:f.height}),[U,ne]=w.useState(1),[I,de]=w.useState(!1),[$,Se]=w.useState(0),[Ye,_]=w.useState(!1),Q=Y!==V.width||X!==V.height,[F,Re]=w.useState(0),[Ge,x]=w.useState(0),[L,W]=w.useState(!1),[ae,be]=w.useState(null),Te=xe=>{const we=xe.currentTarget,{naturalWidth:et,naturalHeight:He,width:Xe,height:je}=we;ie({width:et,height:He}),ne(et/Xe),oe(!0),H(et),ee(He)},Ne=()=>{if(!N||!S.current||I||Q)return;const xe=S.current.width,we=S.current.height;if(de(!0),M){const et=xe/we;let He,Xe;M>et?(He=100,Xe=et/M*100):(Xe=100,He=M/et*100);const je={unit:"%",x:(100-He)/2,y:(100-Xe)/2,width:He,height:Xe};C(je);const Bt={unit:"px",x:Math.round(je.x/100*xe),y:Math.round(je.y/100*we),width:Math.round(je.width/100*xe),height:Math.round(je.height/100*we)};R(Bt)}else C({unit:"%",x:0,y:0,width:100,height:100}),R({unit:"px",x:0,y:0,width:xe,height:we})},gt=()=>{de(!1),C(void 0),R(void 0)};w.useEffect(()=>{if(g&&N&&U>0){const xe=Math.round(g.width*U),we=Math.round(g.height*U);Re(xe),x(we)}else I||(Re(0),x(0))},[g,N,U,I]);const Oe=async xe=>{if(!P){me(!0);try{const et=await(await fetch("/api/studio/edit-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:o,crop:{x:0,y:0,width:V.width,height:V.height},rotation:xe===-90?270:90,resize:{width:V.height,height:V.width}})})).json();et.success?(ie({width:V.height,height:V.width}),H(V.height),ee(V.width),de(!1),C(void 0),R(void 0),Se(Date.now()),_(!0),m(),W(!0),setTimeout(()=>W(!1),3e3)):(console.error("Rotate failed:",et.error),be(et.error||"Failed to rotate image"))}catch(we){console.error("Rotate error:",we),be("An error occurred while rotating the image")}finally{me(!1)}}},$t=()=>Oe(90),ot=()=>Oe(-90),pt=()=>{Ye&&h({name:o.split("/").pop()||"",path:o,type:"file",dimensions:V}),u()},jt=xe=>{if(q(xe),!N||!S.current)return;const we=S.current.width,et=S.current.height;if(xe){const He=we/et;let Xe,je;xe>He?(Xe=100,je=He/xe*100):(je=100,Xe=xe/He*100);const Bt={unit:"%",x:(100-Xe)/2,y:(100-je)/2,width:Xe,height:je};C(Bt);const nn={unit:"px",x:Math.round(Bt.x/100*we),y:Math.round(Bt.y/100*et),width:Math.round(Bt.width/100*we),height:Math.round(Bt.height/100*et)};R(nn)}else C({unit:"%",x:0,y:0,width:100,height:100}),R({unit:"px",x:0,y:0,width:we,height:et})},ge=V.width/V.height,Dt=xe=>{if(I)return;const we=parseInt(xe.target.value)||0;H(we),we>0&&ee(Math.round(we/ge))},Wt=xe=>{if(I)return;const we=parseInt(xe.target.value)||0;ee(we),we>0&&H(Math.round(we*ge))},Ce=()=>{H(V.width),ee(V.height)},ct=xe=>{if(!g||!S.current)return;const we=parseInt(xe.target.value)||0;if(we<=0)return;let et=Ge;M&&(et=Math.round(we/M));const He=we/U,Xe=et/U,je={unit:"px",x:g.x,y:g.y,width:He,height:Xe},Bt=S.current.width-je.x,nn=S.current.height-je.y;je.width=Math.min(He,Bt),je.height=Math.min(Xe,nn),R(je),C({unit:"px",x:je.x,y:je.y,width:je.width,height:je.height})},bt=xe=>{if(!g||!S.current)return;const we=parseInt(xe.target.value)||0;if(we<=0)return;let et=F;M&&(et=Math.round(we*M));const He=et/U,Xe=we/U,je={unit:"px",x:g.x,y:g.y,width:He,height:Xe},Bt=S.current.width-je.x,nn=S.current.height-je.y;je.width=Math.min(He,Bt),je.height=Math.min(Xe,nn),R(je),C({unit:"px",x:je.x,y:je.y,width:je.width,height:je.height})},Fe=async()=>{if(N&&!(!I&&!Q)){re(!0);try{const xe=g?{x:Math.round(g.x*U),y:Math.round(g.y*U),width:Math.round(g.width*U),height:Math.round(g.height*U)}:{x:0,y:0,width:V.width,height:V.height},Xe=await(await fetch("/api/studio/edit-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:o,crop:xe,rotation:0,resize:{width:I?F:Y,height:I?Ge:X}})})).json();Xe.success?(m(),h(Xe.updatedItem),ie({width:Xe.dimensions.width,height:Xe.dimensions.height}),H(Xe.dimensions.width),ee(Xe.dimensions.height),de(!1),C(void 0),R(void 0),_(!0),Se(Date.now()),W(!0),setTimeout(()=>W(!1),3e3)):(console.error("Edit failed:",Xe.error),be(Xe.error||"Failed to save image"))}catch(xe){console.error("Edit error:",xe),be("An error occurred while saving the image")}finally{re(!1)}}};return b("div",{css:Me.overlay,children:[b("div",{css:Me.container,children:[b("div",{css:Me.main,children:[s("div",{css:Me.headerButtons,children:s("button",{css:Me.closeBtn,onClick:pt,children:s("svg",{css:Me.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})}),b("div",{css:Me.rotationWrapper,onClick:Ne,children:[s(e2,{crop:I?A:void 0,onChange:xe=>C(xe),onComplete:xe=>R(xe),aspect:M,css:Me.cropWrapper,disabled:!I,children:s("img",{ref:S,src:$?`${r}?v=${$}`:r,alt:"Edit",onLoad:Te,style:{cursor:I?"crosshair":"pointer"}})}),!I&&N&&!P&&s("div",{css:Me.cropHint,children:Q?"Save resize first to enable crop":"Click to enable crop selection"}),P&&s("div",{css:Me.cropHint,children:"Rotating..."}),L&&s("div",{css:Me.successBanner,children:"Image updated"})]})]}),b("div",{css:Me.sidebar,children:[s("div",{css:Me.sidebarHeader,children:s("h2",{css:Me.sidebarTitle,children:"Edit Image"})}),b("div",{css:Me.sidebarContent,children:[b("div",{css:Me.section,children:[s("span",{css:Me.sectionLabel,children:"Crop Selection"}),s("span",{css:Me.subSectionLabel,children:"Aspect Ratio"}),s("div",{css:Me.aspectButtons,children:n2.map(xe=>s("button",{css:[Me.aspectBtn,M===xe.value&&Me.aspectBtnActive,"",""],onClick:()=>jt(xe.value),disabled:Q,children:xe.label},xe.label))}),I&&b(ht,{children:[s("span",{css:Me.subSectionLabel,children:"Selection Size"}),b("div",{css:Me.resizeRow,children:[s("input",{type:"number",css:Me.resizeInput,value:F,onChange:ct,min:1}),s("span",{css:Me.resizeX,children:"×"}),s("input",{type:"number",css:Me.resizeInput,value:Ge,onChange:bt,min:1}),s("span",{css:Me.resizeX,children:"px"})]})]}),s("p",{css:Me.hint,children:Q?"Save resize first to enable crop":I?"Drag corners to resize crop area":"Click image to enable crop"}),I&&s("button",{css:Me.clearBtn,onClick:gt,children:"Clear Selection"})]}),b("div",{css:Me.section,children:[s("span",{css:Me.sectionLabel,children:"Rotation"}),b("div",{css:Me.rotateButtons,children:[b("button",{css:Me.rotateBtn,onClick:ot,disabled:P||Z,children:[s("svg",{css:Me.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),"CCW"]}),b("button",{css:Me.rotateBtn,onClick:$t,disabled:P||Z,children:[s("svg",{css:Me.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 10h-10a8 8 0 00-8 8v2M21 10l-6 6m6-6l-6-6"})}),"CW"]})]}),s("p",{css:Me.hint,children:"Rotates and saves immediately"})]}),b("div",{css:Me.section,children:[s("span",{css:Me.sectionLabel,children:"Resize Image"}),b("div",{css:Me.resizeRow,children:[s("input",{type:"number",css:Me.resizeInput,value:Y,onChange:Dt,min:1,disabled:I}),s("span",{css:Me.resizeX,children:"×"}),s("input",{type:"number",css:Me.resizeInput,value:X,onChange:Wt,min:1,disabled:I}),s("span",{css:Me.resizeX,children:"px"})]}),Q&&!I&&s("button",{css:Me.clearBtn,onClick:Ce,children:"Reset to Original"}),I?s("p",{css:Me.hint,children:"Clear crop selection to resize"}):Q?s("p",{css:Me.hint,children:"Save to apply resize, then crop"}):s("p",{css:Me.hint,children:"Maintains aspect ratio"})]})]}),b("div",{css:Me.sidebarFooter,children:[s("button",{css:Me.actionBtn,onClick:Fe,disabled:Z||P||!I&&!Q,children:Z?b(ht,{children:[s("span",{css:Me.spinner}),"Saving..."]}):"Save Changes"}),s("button",{css:Me.cancelBtn,onClick:pt,disabled:Z||P,children:"Close"})]})]})]}),ae&&s(fu,{title:"Error",message:ae,onClose:()=>be(null)})]})}const l2=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],i2=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function o2(o){const r=o.toLowerCase().substring(o.lastIndexOf("."));return l2.includes(r)}function r2(o){const r=o.toLowerCase().substring(o.lastIndexOf("."));return i2.includes(r)}const se={overlay:{name:"1crgpqk",styles:"position:absolute;top:0;left:0;right:0;bottom:0;z-index:100;display:flex;background:transparent"},container:y("display:flex;flex:1;margin:24px;background:",d.surface,";border:1px solid ",d.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:y("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",d.background,";overflow:auto;",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},copyBtn:y("position:relative;padding:8px;background:",d.surface,";border:1px solid ",d.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:",d.surfaceHover,";border-color:",d.borderHover,";}",""),copyIcon:y("width:20px;height:20px;color:",d.textSecondary,";",""),statusIcon:y("display:flex;align-items:center;justify-content:center;padding:8px;background:",d.surface,";border:1px solid ",d.border,";border-radius:8px;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);",""),cloudIcon:{name:"1byef48",styles:"width:22px;height:22px;color:#f59e0b;transform:translateY(1px)"},globeIcon:{name:"jso3j5",styles:"width:20px;height:20px;color:#ef4444"},tooltip:{name:"1w9prgf",styles:"position:absolute;right:100%;top:50%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:8px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},mainCloseBtn:y("padding:8px;background:",d.surface,";border:1px solid ",d.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:",d.surfaceHover,";border-color:",d.borderHover,";}",""),mainCloseIcon:y("width:20px;height:20px;color:",d.textSecondary,";",""),mediaWrapper:{name:"zr0bjt",styles:"max-width:100%;max-height:100%;display:flex;align-items:center;justify-content:center"},image:{name:"4gte4n",styles:"max-width:100%;max-height:calc(100vh - 200px);object-fit:contain;border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1)"},video:{name:"1talud7",styles:"max-width:100%;max-height:calc(100vh - 200px);border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1)"},filePlaceholder:y("display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px;background:",d.surface,";border-radius:12px;border:1px solid ",d.border,";",""),fileIcon:y("width:80px;height:80px;color:",d.textMuted,";margin-bottom:16px;",""),fileName:y("font-size:",J.lg,";font-weight:600;color:",d.text,";margin:0;",""),sidebar:y("width:280px;background:",d.surface,";border-left:1px solid ",d.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:y("padding:16px 20px;border-bottom:1px solid ",d.border,";",""),sidebarTitle:y("font-size:",J.base,";font-weight:600;color:",d.text,";margin:0;",""),sidebarContent:{name:"esl95u",styles:"flex:1;padding:20px;overflow:auto"},info:{name:"bh1r16",styles:"display:flex;flex-direction:column;gap:12px;margin-bottom:24px"},infoRow:y("display:flex;justify-content:space-between;font-size:",J.sm,";",""),infoLabel:y("color:",d.textSecondary,";",""),infoValue:y("color:",d.text,";font-weight:500;text-align:right;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),infoValueWrap:y("color:",d.text,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;",""),infoLink:y("color:",d.primary,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;text-decoration:none;&:hover{text-decoration:underline;}",""),thumbChips:{name:"1w7hks3",styles:"display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end"},thumbChip:y("font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:",d.primary,";color:white;",""),actions:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},actionBtn:y("display:flex;align-items:center;gap:10px;width:100%;padding:12px 14px;font-size:",J.base,";font-weight:500;background:",d.surface,";border:1px solid ",d.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",d.text,";text-align:left;&:hover:not(:disabled){background-color:",d.surfaceHover,";border-color:",d.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),actionBtnDanger:y("color:",d.danger,";&:hover:not(:disabled){background-color:",d.dangerLight,";border-color:",d.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 s2(){const{focusedItem:o,setFocusedItem:r,triggerRefresh:f,fileItems:u,setEditedImageKey:h,requestDelete:m,requestMove:S,requestSync:A,requestDownload:C,requestProcess:g,setProcessMode:R,actionState:M}=Il(),[q,Y]=w.useState(!1),[H,X]=w.useState(!1),[ee,Z]=w.useState({current:0,total:1,percent:0,status:"processing",message:"Renaming..."}),[re,P]=w.useState(!1),[me,N]=w.useState(null),[oe,V]=w.useState(!1),[ie,U]=w.useState(!1),[ne,I]=w.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),[de,$]=w.useState(!1),[Se,Ye]=w.useState(0),_=M.showProgress,Q=o?o.name.toLowerCase()==="favicon.png"||o.name.toLowerCase()==="favicon.jpg":!1,F=o&&!o.isProtected&&/\.(jpg|jpeg|png|webp|gif)$/i.test(o.name)&&(!o.cdnPushed||o.hasUpdate||!o.isRemote),Re=pt=>{r(pt),Ye(Date.now()),h(pt.path)};if(!o)return null;const Ge=o2(o.name),x=r2(o.name),L="/"+o.path.replace(/^public\//,""),W=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${L}`:L,ae=Se?`${W}?v=${Se}`:W,be=typeof window<"u"?window.location.origin:"",Te=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${L}`:`${be}${L}`,Ne=()=>{r(null)},gt=()=>{navigator.clipboard.writeText(Te),V(!0),setTimeout(()=>V(!1),1500)},Oe=async pt=>{if(pt&&pt!==o.name){Y(!1),X(!0),Z({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});try{const jt=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:o.path,newName:pt})});if(!jt.body)throw new Error("No response body");const ge=jt.body.getReader(),Dt=new TextDecoder;let Wt="",Ce="";for(;;){const{done:ct,value:bt}=await ge.read();if(ct)break;Wt+=Dt.decode(bt,{stream:!0});const Fe=Wt.split(`
|
|
89
|
+
`);Wt=Fe.pop()||"";for(const xe of Fe){if(!xe.startsWith("data: "))continue;const we=JSON.parse(xe.slice(6));we.type==="start"?Z({current:0,total:we.total,percent:0,status:"processing",message:we.message}):we.type==="progress"?Z({current:we.current,total:we.total,percent:Math.round(we.current/we.total*100),status:"processing",message:we.message}):we.type==="complete"?(Ce=we.newPath,Z({current:we.renamed,total:we.renamed,percent:100,status:"complete",message:"Renamed successfully"})):we.type==="error"&&(Z(et=>({...et,status:"error",message:we.message})),N({title:"Rename Failed",message:we.message}))}}Ce&&(r({...o,path:Ce,name:Ce.split("/").pop()||pt}),f())}catch(jt){console.error("Rename error:",jt),Z(ge=>({...ge,status:"error",message:"Failed to rename"})),N({title:"Rename Failed",message:"An error occurred while renaming the file"})}}},$t=async()=>{if(o){U(!0),I({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."});try{const pt=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+o.path.replace(/^public\//,"")})});if(!pt.ok){const Dt=await pt.json();I({current:0,total:3,percent:0,status:"error",message:Dt.error||"Failed to generate favicons"});return}const jt=pt.body?.getReader(),ge=new TextDecoder;if(jt){let Dt="";for(;;){const{done:Wt,value:Ce}=await jt.read();if(Wt)break;Dt+=ge.decode(Ce,{stream:!0});const ct=Dt.split(`
|
|
90
|
+
`);Dt=ct.pop()||"";for(const bt of ct)if(bt.startsWith("data: "))try{const Fe=JSON.parse(bt.slice(6));Fe.type==="start"?I(xe=>({...xe,total:Fe.total})):Fe.type==="progress"?I({current:Fe.current,total:Fe.total,percent:Fe.percent,status:"processing",message:Fe.message}):Fe.type==="complete"?I({current:Fe.processed,total:Fe.processed,percent:100,status:Fe.errors>0?"error":"complete",message:Fe.message}):Fe.type==="error"&&I(xe=>({...xe,status:"error",message:Fe.message}))}catch{}}}}catch(pt){console.error("Favicon generation error:",pt),I({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},ot=()=>Ge?s("img",{css:se.image,src:ae,alt:o.name}):x?s("video",{css:se.video,src:ae,controls:!0}):b("div",{css:se.filePlaceholder,children:[s("svg",{css:se.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})}),s("p",{css:se.fileName,children:o.name})]});return b(ht,{children:[me&&s(fu,{title:me.title,message:me.message,onClose:()=>N(null)}),s(jp,{isOpen:re,onClose:()=>P(!1)}),q&&s(Er,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:o.name,placeholder:"Enter new filename",confirmLabel:"Rename",onConfirm:Oe,onCancel:()=>Y(!1)}),H&&s(cl,{title:"Renaming",progress:ee,onClose:()=>{X(!1),f()}}),ie&&s(cl,{title:"Generating Favicons",progress:ne,onClose:()=>U(!1)}),s("div",{css:se.overlay,onClick:Ne,children:b("div",{css:se.container,onClick:pt=>pt.stopPropagation(),children:[b("div",{css:se.main,children:[b("div",{css:se.headerButtons,children:[o.cdnPushed&&!o.isRemote&&s("span",{css:se.statusIcon,title:"Pushed to CDN",children:s("svg",{css:se.cloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}),o.isRemote&&s("span",{css:se.statusIcon,title:"Remote image",children:s("svg",{css:se.globeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})})}),b("button",{css:se.copyBtn,onClick:gt,title:"Copy file path",children:[oe&&s("span",{css:se.tooltip,children:"Copied!"}),s("svg",{css:se.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})})]}),s("button",{css:se.mainCloseBtn,onClick:Ne,"aria-label":"Close",children:s("svg",{css:se.mainCloseIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),s("div",{css:se.mediaWrapper,children:ot()})]}),b("div",{css:se.sidebar,children:[s("div",{css:se.sidebarHeader,children:s("h3",{css:se.sidebarTitle,children:"Details"})}),b("div",{css:se.sidebarContent,children:[b("div",{css:se.info,children:[b("div",{css:se.infoRow,children:[s("span",{css:se.infoLabel,children:"Name"}),s("span",{css:se.infoValueWrap,children:o.name})]}),b("div",{css:se.infoRow,children:[s("span",{css:se.infoLabel,children:"Path"}),s("span",{css:se.infoValueWrap,children:o.path.replace(/^public\//,"")})]}),o.size!==void 0&&b("div",{css:se.infoRow,children:[s("span",{css:se.infoLabel,children:"Size"}),s("span",{css:se.infoValue,children:c2(o.size)})]}),o.dimensions&&b("div",{css:se.infoRow,children:[s("span",{css:se.infoLabel,children:"Dimensions"}),b("span",{css:se.infoValue,children:[o.dimensions.width," × ",o.dimensions.height]})]}),(o.hasSm||o.hasMd||o.hasLg||o.hasFull)&&b("div",{css:se.infoRow,children:[s("span",{css:se.infoLabel,children:"Thumbnails"}),s("span",{css:se.infoValue,children:b("span",{css:se.thumbChips,children:[o.hasSm&&s("span",{css:se.thumbChip,children:"SM"}),o.hasMd&&s("span",{css:se.thumbChip,children:"MD"}),o.hasLg&&s("span",{css:se.thumbChip,children:"LG"}),o.hasFull&&s("span",{css:se.thumbChip,children:"FULL"})]})})]}),b("div",{css:se.infoRow,children:[s("span",{css:se.infoLabel,children:"CDN Status"}),s("span",{css:se.infoValue,children:o.cdnPushed?o.isRemote?"Remote":"Pushed":"Local"})]}),b("div",{css:se.infoRow,children:[s("span",{css:se.infoLabel,children:"URL"}),s("a",{href:Te,target:"_blank",rel:"noopener noreferrer",css:se.infoLink,title:Te,children:Te})]})]}),b("div",{css:se.actions,children:[b("button",{css:se.actionBtn,onClick:()=>Y(!0),disabled:o.isProtected,children:[s("svg",{css:se.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"]}),Ge&&b("button",{css:se.actionBtn,onClick:()=>$(!0),disabled:_||!F,title:F?void 0:"Download image first to edit",children:[s("svg",{css:se.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})}),F?"Edit Image":"Download to Edit"]}),b("button",{css:se.actionBtn,onClick:()=>S([o.path]),disabled:_||o.isProtected,children:[s("svg",{css:se.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})}),"Move"]}),b("button",{css:[se.actionBtn,se.actionBtnCloud,"",""],onClick:()=>A([o.path],u),disabled:_||o.isProtected||o.cdnPushed&&!o.isRemote,title:o.cdnPushed&&!o.isRemote?"Already in R2":void 0,children:[s("svg",{css:se.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),"Push to CDN"]}),b("button",{css:[se.actionBtn,se.actionBtnCloud,"",""],onClick:()=>C([o.path],u),disabled:_||!o.cdnPushed||o.isRemote,title:o.cdnPushed?o.isRemote?"Remote image":"Download from CDN to local":"Not on CDN",children:[s("svg",{css:se.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"})}),"Download from CDN"]}),b("button",{css:se.actionBtn,onClick:()=>{R("generate"),g([o.path])},disabled:_||o.isProtected,children:[s("svg",{css:se.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"]}),(o.hasSm||o.hasMd||o.hasLg||o.hasFull)&&b("button",{css:se.actionBtn,onClick:()=>{R("remove"),g([o.path])},disabled:_||o.isProtected,children:[s("svg",{css:se.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"]}),Q&&b("button",{css:se.actionBtn,onClick:$t,disabled:ie||o.isProtected,children:[s("svg",{css:se.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"})}),"Generate Favicons"]}),b("button",{css:[se.actionBtn,se.actionBtnDanger,"",""],onClick:()=>m([o.path]),disabled:_||o.isProtected,children:[s("svg",{css:se.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"]})]})]})]})]})}),de&&o.dimensions&&s(a2,{imagePath:o.path,imageSrc:ae,dimensions:o.dimensions,onClose:()=>$(!1),onSaveComplete:Re,triggerRefresh:f})]})}function c2(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}const sl={overlay:{name:"1u8n9cx",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1100"},modal:y("background:",d.surface,";border-radius:12px;padding:24px;max-width:400px;width:90%;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),header:{name:"c6eghz",styles:"display:flex;align-items:center;gap:12px;margin-bottom:12px"},icon:y("width:24px;height:24px;color:",d.danger,";flex-shrink:0;",""),title:y("font-size:",J.lg,";font-weight:600;color:",d.text,";margin:0;",""),message:y("font-size:",J.base,";color:",d.textSecondary,";margin:0 0 20px 0;line-height:1.5;",""),button:y("width:100%;padding:10px 16px;border-radius:6px;font-size:",J.base,";font-weight:500;border:none;background:",d.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",d.primaryHover,";}","")};function u2(){const{error:o,clearError:r}=Il();return o?s("div",{css:sl.overlay,onClick:r,children:b("div",{css:sl.modal,onClick:f=>f.stopPropagation(),children:[b("div",{css:sl.header,children:[s("svg",{css:sl.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})}),s("h3",{css:sl.title,children:o.title})]}),s("p",{css:sl.message,children:o.message}),s("button",{css:sl.button,onClick:r,children:"OK"})]})}):null}const zp={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 d2({triggerRefresh:o,clearSelection:r,setFocusedItem:f,showError:u}){const[h,m]=w.useState(zp),S=w.useCallback(ie=>{m(U=>({...U,progressState:typeof ie=="function"?ie(U.progressState):{...U.progressState,...ie}}))},[]),A=w.useCallback(ie=>{m(U=>({...U,showProgress:ie}))},[]),C=w.useCallback(ie=>{m(U=>({...U,progressTitle:ie}))},[]),g=Bp({setShowProgress:A,setProgressTitle:C,setProgressState:S,triggerRefresh:o}),R=w.useCallback(ie=>{m(U=>({...U,actionPaths:ie,showDeleteConfirm:!0}))},[]),M=w.useCallback(ie=>{m(U=>({...U,actionPaths:ie,showMoveModal:!0}))},[]),q=w.useCallback((ie,U)=>{const ne=ie.map($=>"/"+$.replace(/^public\//,""));let I=!1,de=!1;for(const $ of ie){const Se=U.find(Ye=>Ye.path===$);Se&&(Se.isRemote?I=!0:Se.cdnPushed||(de=!0))}m($=>({...$,actionPaths:ie,syncImageCount:ne.length,syncHasRemote:I,syncHasLocal:de,showSyncConfirm:!0}))},[]),Y=w.useCallback((ie,U)=>{const ne=[];for(const I of ie){const de=U.find($=>$.path===I);de&&de.cdnPushed&&!de.isRemote&&ne.push(I)}m(I=>({...I,actionPaths:ne,downloadImageCount:ne.length,downloadTotalSelected:ie.length,showDownloadConfirm:!0}))},[]),H=w.useCallback(ie=>{m(U=>({...U,actionPaths:ie,showProcessConfirm:!0}))},[]),X=w.useCallback(ie=>{m(U=>({...U,processMode:ie}))},[]),ee=w.useCallback(()=>{m(ie=>({...ie,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),Z=w.useCallback(()=>{m(zp)},[]),re=w.useCallback(()=>{g.stop()},[g]),P=w.useCallback(async()=>{const ie=h.actionPaths;m(U=>({...U,showDeleteConfirm:!1}));try{const U=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:ie})});if(U.ok)r(),f(null),o();else{const ne=await U.json();u("Delete Failed",ne.error||"Unknown error")}}catch(U){console.error("Delete error:",U),u("Delete Failed","Delete failed. Check console for details.")}},[h.actionPaths,r,f,o,u]),me=w.useCallback(async ie=>{const U=h.actionPaths;m(ne=>({...ne,showMoveModal:!1})),await g.execute({endpoint:"/api/studio/move",body:{paths:U,destination:ie},title:"Moving Files",onComplete:ne=>{ne.errors&&ne.errors>0&&ne.errorMessages?.length&&u("Move Failed",ne.errorMessages.join(`
|
|
91
|
+
`)),r(),f(null)}})},[h.actionPaths,r,f,u,g]),N=w.useCallback(async()=>{const U=h.actionPaths.map(de=>"/"+de.replace(/^public\//,""));m(de=>({...de,showSyncConfirm:!1,showProgress:!0,progressTitle:"Pushing to CDN",progressState:{current:0,total:U.length,percent:0,status:"processing",message:"Pushing to CDN..."}}));let ne=0;const I=[];for(let de=0;de<U.length;de++){const $=U[de];try{const Se=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[$]})});if(Se.ok)ne++;else{const Ye=await Se.json();I.push(`${$}: ${Ye.error||"Unknown error"}`)}}catch(Se){I.push(`${$}: ${Se instanceof Error?Se.message:"Unknown error"}`)}S({current:de+1,total:U.length,percent:Math.round((de+1)/U.length*100),status:"processing",message:`Pushed ${$}`})}S({current:U.length,total:U.length,percent:100,status:I.length>0?"error":"complete",message:`Pushed ${ne} file${ne!==1?"s":""}${I.length>0?`, ${I.length} error${I.length!==1?"s":""}`:""}`}),I.length>0&&u("Push Errors",I.join(`
|
|
92
|
+
`)),r(),o()},[h.actionPaths,r,o,u,S]),oe=w.useCallback(async()=>{const ie=h.actionPaths,U=h.processMode,ne=ie.map(Se=>{const Ye=Se.replace(/^public\//,"");return Ye.startsWith("/")?Ye:`/${Ye}`}),I=U==="remove",de=I?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",$=I?"Removing Thumbnails":"Generating Thumbnails";m(Se=>({...Se,showProcessConfirm:!1})),await g.execute({endpoint:de,body:{imageKeys:ne},title:$})},[h.actionPaths,h.processMode,g]),V=w.useCallback(async()=>{const ie=h.progressState.orphanedFiles;if(!(!ie||ie.length===0))try{const U=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:ie})});if(U.ok)S(ne=>({...ne,orphanedFiles:void 0,message:ne.message?.replace(/Found \d+ orphaned thumbnail\(s\).*/,"Orphaned thumbnails deleted.")})),o();else{const ne=await U.json();u("Delete Failed",ne.error||"Failed to delete orphaned files")}}catch(U){console.error("Delete orphans error:",U),u("Delete Failed","Failed to delete orphaned files. Check console for details.")}},[h.progressState.orphanedFiles,o,u,S]);return{actionState:h,setActionState:m,requestDelete:R,requestMove:M,requestSync:q,requestDownload:Y,requestProcess:H,setProcessMode:X,cancelAction:ee,closeProgress:Z,stopProcessing:re,confirmDelete:P,confirmMove:me,confirmSync:N,confirmProcess:oe,deleteOrphans:V}}const f2="36px",Yt={container:y(ei," display:flex;flex-direction:column;height:100%;background:",d.background,";",""),header:y("display:flex;align-items:center;justify-content:space-between;padding:12px 24px;background:",d.surface,";border-bottom:1px solid ",d.border,";position:relative;",""),title:y("font-size:",J.lg,";font-weight:600;color:",d.text,";margin:0;letter-spacing:-0.02em;flex-shrink:0;",""),headerLeft:{name:"16ur2v6",styles:"display:flex;align-items:center;gap:12px;flex:1;min-width:0"},headerCenter:{name:"1fsejhz",styles:"position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;max-width:50%"},breadcrumbs:y("display:flex;align-items:center;gap:6px;font-size:",J.base,";color:",d.textSecondary,";overflow:hidden;",""),breadcrumbSeparator:y("color:",d.border,";flex-shrink:0;",""),breadcrumbItem:y("color:",d.textSecondary,";text-decoration:none;cursor:pointer;transition:color 0.15s ease;white-space:nowrap;&:hover{color:",d.primary,";}",""),breadcrumbCurrent:y("color:",d.text,";font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),headerIconBtn:y("display:flex;align-items:center;justify-content:center;width:32px;height:32px;color:",d.textMuted,";background:transparent;border:none;border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{color:",d.text,";background:",d.surface,";}",""),headerActions:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},headerBtn:y("height:",f2,";padding:0 12px;background:",d.surface,";border:1px solid ",d.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),headerIcon:y("width:16px;height:16px;color:",d.textSecondary,";",""),content:{name:"1rtaly3",styles:"flex:1;display:flex;overflow:hidden"},fileBrowser:{name:"upomw9",styles:"flex:1;min-width:0;overflow:auto;padding:20px 24px;display:flex;flex-direction:column"},dropOverlay:y("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",d.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:y("display:flex;flex-direction:column;align-items:center;gap:12px;color:",d.primary,";font-size:",J.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"}};function h2({onClose:o,isVisible:r=!0,standaloneMode:f=!1,workspacePath:u,siteUrl:h}){const m=o||(()=>{}),[S,A]=w.useState("public"),[C,g]=w.useState(new Set),[R,M]=w.useState(null),[q,Y]=w.useState("grid"),[H,X]=w.useState(null),[ee,Z]=w.useState(null),[re,P]=w.useState(!1),[me,N]=w.useState(0),[oe,V]=w.useState(!1),[ie,U]=w.useState(""),[ne,I]=w.useState(null),[de,$]=w.useState([]),[Se,Ye]=w.useState(!1),_=w.useCallback(()=>{N(Ce=>Ce+1)},[]),[Q,F]=w.useState(null),Re=w.useCallback(Ce=>{F({path:Ce,key:Date.now()})},[]);w.useEffect(()=>{if(H&&de.length>0){const Ce=de.find(ct=>ct.path===H.path);Ce&&JSON.stringify(Ce)!==JSON.stringify(H)&&X(Ce)}},[de,H]);const Ge=w.useCallback(()=>{V(!0)},[]),x=w.useCallback(()=>{V(!1)},[]),L=w.useCallback((Ce,ct)=>{I({title:Ce,message:ct})},[]),W=w.useCallback(()=>{I(null)},[]),ae=w.useCallback(Ce=>{Ce.preventDefault(),Ce.stopPropagation(),Ye(!0)},[]),be=w.useCallback(Ce=>{Ce.preventDefault(),Ce.stopPropagation(),Ye(!1)},[]),Te=w.useCallback(async Ce=>{Ce.preventDefault(),Ce.stopPropagation(),Ye(!1);const ct=Array.from(Ce.dataTransfer.files);if(ct.length!==0&&!(S==="public/images"||S.startsWith("public/images/"))){for(const bt of ct){const Fe=new FormData;Fe.append("file",bt),Fe.append("path",S);try{await fetch("/api/studio/upload",{method:"POST",body:Fe})}catch(xe){console.error("Upload error:",xe)}}_()}},[S,_]),Ne=w.useCallback(()=>{if(S==="public")return;const Ce=S.split("/");Ce.pop(),A(Ce.join("/")||"public"),g(new Set)},[S]),gt=w.useCallback(Ce=>{A(Ce),g(new Set),X(null)},[]),Oe=w.useCallback(Ce=>{g(ct=>{const bt=new Set(ct);return bt.has(Ce)?bt.delete(Ce):bt.add(Ce),bt}),M(Ce)},[]),$t=w.useCallback((Ce,ct,bt)=>{const Fe=bt.findIndex(He=>He.path===Ce),xe=bt.findIndex(He=>He.path===ct);if(Fe===-1||xe===-1)return;const we=Math.min(Fe,xe),et=Math.max(Fe,xe);g(He=>{const Xe=new Set(He);for(let je=we;je<=et;je++)Xe.add(bt[je].path);return Xe}),M(ct)},[]),ot=w.useCallback(Ce=>{g(new Set(Ce.map(ct=>ct.path)))},[]),pt=w.useCallback(()=>{g(new Set)},[]),jt=w.useCallback(Ce=>{X(Ce)},[]),ge=d2({triggerRefresh:_,clearSelection:pt,setFocusedItem:jt,showError:L}),Dt=w.useCallback(Ce=>{if(Ce.key==="Escape"){const ct=Ce.target;if(ct.tagName==="INPUT"||ct.tagName==="TEXTAREA")return;H?X(null):f||m()}},[m,H,f]);w.useEffect(()=>(r&&(document.addEventListener("keydown",Dt),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",Dt),document.body.style.overflow=""}),[Dt,r]);const Wt={isOpen:!0,openStudio:()=>{},closeStudio:m,toggleStudio:m,currentPath:S,setCurrentPath:gt,navigateUp:Ne,selectedItems:C,toggleSelection:Oe,selectRange:$t,selectAll:ot,clearSelection:pt,lastSelectedPath:R,viewMode:q,setViewMode:Y,focusedItem:H,setFocusedItem:X,meta:ee,setMeta:Z,isLoading:re,setIsLoading:P,refreshKey:me,triggerRefresh:_,editedImageKey:Q,setEditedImageKey:Re,scanRequested:oe,triggerScan:Ge,clearScanRequest:x,searchQuery:ie,setSearchQuery:U,error:ne,showError:L,clearError:W,fileItems:de,setFileItems:$,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 s(Hp.Provider,{value:Wt,children:b("div",{css:Yt.container,children:[b("div",{css:Yt.header,children:[s("div",{css:Yt.headerLeft,children:s("h1",{css:Yt.title,children:"gallop.studio"})}),s("div",{css:Yt.headerCenter,children:s(y2,{currentPath:S,onNavigate:gt,projectName:u?u.split("/").pop():void 0})}),b("div",{css:Yt.headerActions,children:[h&&s("a",{href:h,target:"_blank",rel:"noopener noreferrer",css:Yt.headerIconBtn,title:`Open ${h}`,children:s(b2,{})}),!f&&s("button",{css:Yt.headerBtn,onClick:m,"aria-label":"Close Studio",children:s(v2,{})})]})]}),s(x1,{}),b("div",{css:Yt.content,onDragOver:ae,onDragLeave:be,onDrop:Te,children:[Se&&s("div",{css:Yt.dropOverlay,children:b("div",{css:Yt.dropMessage,children:[s("svg",{css:Yt.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("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"})}),s("span",{children:"Drop files to upload"})]})}),s("div",{css:Yt.fileBrowser,children:q==="grid"?s(Y1,{}):s(K1,{})})]}),H&&s(s2,{}),s(u2,{}),ge.actionState.showDeleteConfirm&&s(Pi,{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&&s(Pi,{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&&s(g2,{imageCount:ge.actionState.actionPaths.length,mode:ge.actionState.processMode,onConfirm:ge.confirmProcess,onCancel:ge.cancelAction}),ge.actionState.showMoveModal&&s(Np,{selectedItems:new Set(ge.actionState.actionPaths),currentPath:S,onMove:Ce=>ge.confirmMove(Ce),onCancel:ge.cancelAction}),ge.actionState.showProgress&&s(cl,{title:ge.actionState.progressTitle,progress:ge.actionState.progressState,onStop:ge.stopProcessing,onDeleteOrphans:ge.deleteOrphans,onClose:ge.closeProgress})]})})}var p2={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},m2={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 g2({imageCount:o,mode:r,onConfirm:f,onCancel:u}){const h={overlay:m2,container:y("background:",d.surface,";border-radius:12px;padding:24px;max-width:420px;width:90%;box-shadow:0 20px 25px -5px rgba(0, 0, 0, 0.1),0 10px 10px -5px rgba(0, 0, 0, 0.04);",""),title:y("font-size:",J.lg,";font-weight:600;color:",d.text,";margin:0 0 16px;",""),message:y("font-size:",J.base,";color:",d.textSecondary,";margin:0 0 20px;line-height:1.5;",""),actions:p2,cancelBtn:y("padding:10px 20px;border:1px solid ",d.border,";border-radius:8px;background:",d.background,";color:",d.text,";font-size:",J.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",d.surfaceHover,";border-color:",d.borderHover,";}",""),confirmBtn:y("padding:10px 20px;border:none;border-radius:8px;background:",d.primary,";color:white;font-size:",J.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",d.primaryHover,";}",""),confirmBtnDanger:y("background:",d.danger,";&:hover{background:#dc2626;}","")},m=r==="remove",S=m?"Remove Thumbnails":"Generate Thumbnails",A=m?`Remove generated thumbnails for ${o} image${o!==1?"s":""}? Original images will be kept.`:`Generate thumbnails for ${o} image${o!==1?"s":""}?`,C=m?"Remove":"Generate";return s("div",{css:h.overlay,onClick:u,children:b("div",{css:h.container,onClick:g=>g.stopPropagation(),children:[s("h2",{css:h.title,children:S}),s("p",{css:h.message,children:A}),b("div",{css:h.actions,children:[s("button",{css:h.cancelBtn,onClick:u,children:"Cancel"}),s("button",{css:[h.confirmBtn,m&&h.confirmBtnDanger,"",""],onClick:f,children:C})]})]})})}function y2({currentPath:o,onNavigate:r,projectName:f}){const u=o.split("/").filter(Boolean),h=u.map((m,S)=>({name:S===0&&m==="public"&&f?f:m,path:u.slice(0,S+1).join("/")}));return s("div",{css:Yt.breadcrumbs,children:h.map((m,S)=>b("span",{style:{display:"flex",alignItems:"center",gap:6},children:[S>0&&s("span",{css:Yt.breadcrumbSeparator,children:"/"}),S===h.length-1?s("span",{css:Yt.breadcrumbCurrent,children:m.name}):s("span",{css:Yt.breadcrumbItem,onClick:()=>r(m.path),children:m.name})]},m.path))})}function b2(){return b("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[s("circle",{cx:"12",cy:"12",r:"10"}),s("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),s("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 v2(){return b("svg",{css:Yt.headerIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[s("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}const Gp=document.getElementById("root");if(!Gp)throw new Error("Root element not found");const x2=window.__STUDIO_WORKSPACE__||"Unknown",S2=window.__STUDIO_SITE_URL__||"";n1.createRoot(Gp).render(s(w.StrictMode,{children:s("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:s(h2,{isVisible:!0,standaloneMode:!0,workspacePath:x2,siteUrl:S2})})}));
|