@gallop.software/studio 2.3.135 → 2.3.137

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,105 @@
1
+ function tg(o,s){for(var f=0;f<s.length;f++){const d=s[f];if(typeof d!="string"&&!Array.isArray(d)){for(const h in d)if(h!=="default"&&!(h in o)){const m=Object.getOwnPropertyDescriptor(d,h);m&&Object.defineProperty(o,h,m.get?m:{enumerable:!0,get:()=>d[h]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))d(h);new MutationObserver(h=>{for(const m of h)if(m.type==="childList")for(const w of m.addedNodes)w.tagName==="LINK"&&w.rel==="modulepreload"&&d(w)}).observe(document,{childList:!0,subtree:!0});function f(h){const m={};return h.integrity&&(m.integrity=h.integrity),h.referrerPolicy&&(m.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?m.credentials="include":h.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function d(h){if(h.ep)return;h.ep=!0;const m=f(h);fetch(h.href,m)}})();function ng(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Jc={exports:{}},ao={};var tp;function ag(){if(tp)return ao;tp=1;var o=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function f(d,h,m){var w=null;if(m!==void 0&&(w=""+m),h.key!==void 0&&(w=""+h.key),"key"in h){m={};for(var D in h)D!=="key"&&(m[D]=h[D])}else m=h;return h=m.ref,{$$typeof:o,type:d,key:w,ref:h!==void 0?h:null,props:m}}return ao.Fragment=s,ao.jsx=f,ao.jsxs=f,ao}var np;function lg(){return np||(np=1,Jc.exports=ag()),Jc.exports}var so=lg(),$c={exports:{}},Ne={};var ap;function ig(){if(ap)return Ne;ap=1;var o=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),w=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),z=Symbol.for("react.activity"),_=Symbol.iterator;function N(S){return S===null||typeof S!="object"?null:(S=_&&S[_]||S["@@iterator"],typeof S=="function"?S:null)}var O={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},G=Object.assign,ie={};function Q(S,U,ee){this.props=S,this.context=U,this.refs=ie,this.updater=ee||O}Q.prototype.isReactComponent={},Q.prototype.setState=function(S,U){if(typeof S!="object"&&typeof S!="function"&&S!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,S,U,"setState")},Q.prototype.forceUpdate=function(S){this.updater.enqueueForceUpdate(this,S,"forceUpdate")};function re(){}re.prototype=Q.prototype;function ne(S,U,ee){this.props=S,this.context=U,this.refs=ie,this.updater=ee||O}var ue=ne.prototype=new re;ue.constructor=ne,G(ue,Q.prototype),ue.isPureReactComponent=!0;var V=Array.isArray;function P(){}var I={H:null,A:null,T:null,S:null},te=Object.prototype.hasOwnProperty;function j(S,U,ee){var oe=ee.ref;return{$$typeof:o,type:S,key:U,ref:oe!==void 0?oe:null,props:ee}}function K(S,U){return j(S.type,U,S.props)}function fe(S){return typeof S=="object"&&S!==null&&S.$$typeof===o}function $(S){var U={"=":"=0",":":"=2"};return"$"+S.replace(/[=:]/g,function(ee){return U[ee]})}var ae=/\/+/g;function W(S,U){return typeof S=="object"&&S!==null&&S.key!=null?$(""+S.key):U.toString(36)}function ve(S){switch(S.status){case"fulfilled":return S.value;case"rejected":throw S.reason;default:switch(typeof S.status=="string"?S.then(P,P):(S.status="pending",S.then(function(U){S.status==="pending"&&(S.status="fulfilled",S.value=U)},function(U){S.status==="pending"&&(S.status="rejected",S.reason=U)})),S.status){case"fulfilled":return S.value;case"rejected":throw S.reason}}throw S}function T(S,U,ee,oe,Ce){var Ee=typeof S;(Ee==="undefined"||Ee==="boolean")&&(S=null);var Ye=!1;if(S===null)Ye=!0;else switch(Ee){case"bigint":case"string":case"number":Ye=!0;break;case"object":switch(S.$$typeof){case o:case s:Ye=!0;break;case E:return Ye=S._init,T(Ye(S._payload),U,ee,oe,Ce)}}if(Ye)return Ce=Ce(S),Ye=oe===""?"."+W(S,0):oe,V(Ce)?(ee="",Ye!=null&&(ee=Ye.replace(ae,"$&/")+"/"),T(Ce,U,ee,"",function(on){return on})):Ce!=null&&(fe(Ce)&&(Ce=K(Ce,ee+(Ce.key==null||S&&S.key===Ce.key?"":(""+Ce.key).replace(ae,"$&/")+"/")+Ye)),U.push(Ce)),1;Ye=0;var xt=oe===""?".":oe+":";if(V(S))for(var Re=0;Re<S.length;Re++)oe=S[Re],Ee=xt+W(oe,Re),Ye+=T(oe,U,ee,Ee,Ce);else if(Re=N(S),typeof Re=="function")for(S=Re.call(S),Re=0;!(oe=S.next()).done;)oe=oe.value,Ee=xt+W(oe,Re++),Ye+=T(oe,U,ee,Ee,Ce);else if(Ee==="object"){if(typeof S.then=="function")return T(ve(S),U,ee,oe,Ce);throw U=String(S),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(S).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return Ye}function J(S,U,ee){if(S==null)return S;var oe=[],Ce=0;return T(S,oe,"","",function(Ee){return U.call(ee,Ee,Ce++)}),oe}function F(S){if(S._status===-1){var U=S._result;U=U(),U.then(function(ee){(S._status===0||S._status===-1)&&(S._status=1,S._result=ee)},function(ee){(S._status===0||S._status===-1)&&(S._status=2,S._result=ee)}),S._status===-1&&(S._status=0,S._result=U)}if(S._status===1)return S._result.default;throw S._result}var Me=typeof reportError=="function"?reportError:function(S){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof S=="object"&&S!==null&&typeof S.message=="string"?String(S.message):String(S),error:S});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",S);return}console.error(S)},qe={map:J,forEach:function(S,U,ee){J(S,function(){U.apply(this,arguments)},ee)},count:function(S){var U=0;return J(S,function(){U++}),U},toArray:function(S){return J(S,function(U){return U})||[]},only:function(S){if(!fe(S))throw Error("React.Children.only expected to receive a single React element child.");return S}};return Ne.Activity=z,Ne.Children=qe,Ne.Component=Q,Ne.Fragment=f,Ne.Profiler=h,Ne.PureComponent=ne,Ne.StrictMode=d,Ne.Suspense=C,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(S){return I.H.useMemoCache(S)}},Ne.cache=function(S){return function(){return S.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(S,U,ee){if(S==null)throw Error("The argument must be a React element, but you passed "+S+".");var oe=G({},S.props),Ce=S.key;if(U!=null)for(Ee in U.key!==void 0&&(Ce=""+U.key),U)!te.call(U,Ee)||Ee==="key"||Ee==="__self"||Ee==="__source"||Ee==="ref"&&U.ref===void 0||(oe[Ee]=U[Ee]);var Ee=arguments.length-2;if(Ee===1)oe.children=ee;else if(1<Ee){for(var Ye=Array(Ee),xt=0;xt<Ee;xt++)Ye[xt]=arguments[xt+2];oe.children=Ye}return j(S.type,Ce,oe)},Ne.createContext=function(S){return S={$$typeof:w,_currentValue:S,_currentValue2:S,_threadCount:0,Provider:null,Consumer:null},S.Provider=S,S.Consumer={$$typeof:m,_context:S},S},Ne.createElement=function(S,U,ee){var oe,Ce={},Ee=null;if(U!=null)for(oe in U.key!==void 0&&(Ee=""+U.key),U)te.call(U,oe)&&oe!=="key"&&oe!=="__self"&&oe!=="__source"&&(Ce[oe]=U[oe]);var Ye=arguments.length-2;if(Ye===1)Ce.children=ee;else if(1<Ye){for(var xt=Array(Ye),Re=0;Re<Ye;Re++)xt[Re]=arguments[Re+2];Ce.children=xt}if(S&&S.defaultProps)for(oe in Ye=S.defaultProps,Ye)Ce[oe]===void 0&&(Ce[oe]=Ye[oe]);return j(S,Ee,Ce)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(S){return{$$typeof:D,render:S}},Ne.isValidElement=fe,Ne.lazy=function(S){return{$$typeof:E,_payload:{_status:-1,_result:S},_init:F}},Ne.memo=function(S,U){return{$$typeof:g,type:S,compare:U===void 0?null:U}},Ne.startTransition=function(S){var U=I.T,ee={};I.T=ee;try{var oe=S(),Ce=I.S;Ce!==null&&Ce(ee,oe),typeof oe=="object"&&oe!==null&&typeof oe.then=="function"&&oe.then(P,Me)}catch(Ee){Me(Ee)}finally{U!==null&&ee.types!==null&&(U.types=ee.types),I.T=U}},Ne.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Ne.use=function(S){return I.H.use(S)},Ne.useActionState=function(S,U,ee){return I.H.useActionState(S,U,ee)},Ne.useCallback=function(S,U){return I.H.useCallback(S,U)},Ne.useContext=function(S){return I.H.useContext(S)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(S,U){return I.H.useDeferredValue(S,U)},Ne.useEffect=function(S,U){return I.H.useEffect(S,U)},Ne.useEffectEvent=function(S){return I.H.useEffectEvent(S)},Ne.useId=function(){return I.H.useId()},Ne.useImperativeHandle=function(S,U,ee){return I.H.useImperativeHandle(S,U,ee)},Ne.useInsertionEffect=function(S,U){return I.H.useInsertionEffect(S,U)},Ne.useLayoutEffect=function(S,U){return I.H.useLayoutEffect(S,U)},Ne.useMemo=function(S,U){return I.H.useMemo(S,U)},Ne.useOptimistic=function(S,U){return I.H.useOptimistic(S,U)},Ne.useReducer=function(S,U,ee){return I.H.useReducer(S,U,ee)},Ne.useRef=function(S){return I.H.useRef(S)},Ne.useState=function(S){return I.H.useState(S)},Ne.useSyncExternalStore=function(S,U,ee){return I.H.useSyncExternalStore(S,U,ee)},Ne.useTransition=function(){return I.H.useTransition()},Ne.version="19.2.4",Ne}var lp;function su(){return lp||(lp=1,$c.exports=ig()),$c.exports}var v=su();const rt=ng(v),ip=tg({__proto__:null,default:rt},[v]);function og(o){if(o.sheet)return o.sheet;for(var s=0;s<document.styleSheets.length;s++)if(document.styleSheets[s].ownerNode===o)return document.styleSheets[s]}function rg(o){var s=document.createElement("style");return s.setAttribute("data-emotion",o.key),o.nonce!==void 0&&s.setAttribute("nonce",o.nonce),s.appendChild(document.createTextNode("")),s.setAttribute("data-s",""),s}var sg=(function(){function o(f){var d=this;this._insertTag=function(h){var m;d.tags.length===0?d.insertionPoint?m=d.insertionPoint.nextSibling:d.prepend?m=d.container.firstChild:m=d.before:m=d.tags[d.tags.length-1].nextSibling,d.container.insertBefore(h,m),d.tags.push(h)},this.isSpeedy=f.speedy===void 0?!0:f.speedy,this.tags=[],this.ctr=0,this.nonce=f.nonce,this.key=f.key,this.container=f.container,this.prepend=f.prepend,this.insertionPoint=f.insertionPoint,this.before=null}var s=o.prototype;return s.hydrate=function(d){d.forEach(this._insertTag)},s.insert=function(d){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(rg(this));var h=this.tags[this.tags.length-1];if(this.isSpeedy){var m=og(h);try{m.insertRule(d,m.cssRules.length)}catch{}}else h.appendChild(document.createTextNode(d));this.ctr++},s.flush=function(){this.tags.forEach(function(d){var h;return(h=d.parentNode)==null?void 0:h.removeChild(d)}),this.tags=[],this.ctr=0},o})(),an="-ms-",Hr="-moz-",lt="-webkit-",Ep="comm",cu="rule",uu="decl",cg="@import",Tp="@keyframes",ug="@layer",dg=Math.abs,Nr=String.fromCharCode,fg=Object.assign;function hg(o,s){return It(o,0)^45?(((s<<2^It(o,0))<<2^It(o,1))<<2^It(o,2))<<2^It(o,3):0}function Ap(o){return o.trim()}function pg(o,s){return(o=s.exec(o))?o[0]:o}function it(o,s,f){return o.replace(s,f)}function iu(o,s){return o.indexOf(s)}function It(o,s){return o.charCodeAt(s)|0}function co(o,s,f){return o.slice(s,f)}function ea(o){return o.length}function du(o){return o.length}function Rr(o,s){return s.push(o),o}function mg(o,s){return o.map(s).join("")}var jr=1,oi=1,Rp=0,bn=0,Gt=0,si="";function qr(o,s,f,d,h,m,w){return{value:o,root:s,parent:f,type:d,props:h,children:m,line:jr,column:oi,length:w,return:""}}function lo(o,s){return fg(qr("",null,null,"",null,null,0),o,{length:-o.length},s)}function gg(){return Gt}function yg(){return Gt=bn>0?It(si,--bn):0,oi--,Gt===10&&(oi=1,jr--),Gt}function Tn(){return Gt=bn<Rp?It(si,bn++):0,oi++,Gt===10&&(oi=1,jr++),Gt}function na(){return It(si,bn)}function Lr(){return bn}function ho(o,s){return co(si,o,s)}function uo(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 Lp(o){return jr=oi=1,Rp=ea(si=o),bn=0,[]}function _p(o){return si="",o}function _r(o){return Ap(ho(bn-1,ou(o===91?o+2:o===40?o+1:o)))}function bg(o){for(;(Gt=na())&&Gt<33;)Tn();return uo(o)>2||uo(Gt)>3?"":" "}function vg(o,s){for(;--s&&Tn()&&!(Gt<48||Gt>102||Gt>57&&Gt<65||Gt>70&&Gt<97););return ho(o,Lr()+(s<6&&na()==32&&Tn()==32))}function ou(o){for(;Tn();)switch(Gt){case o:return bn;case 34:case 39:o!==34&&o!==39&&ou(Gt);break;case 40:o===41&&ou(o);break;case 92:Tn();break}return bn}function xg(o,s){for(;Tn()&&o+Gt!==57;)if(o+Gt===84&&na()===47)break;return"/*"+ho(s,bn-1)+"*"+Nr(o===47?o:Tn())}function Sg(o){for(;!uo(na());)Tn();return ho(o,bn)}function wg(o){return _p(Or("",null,null,null,[""],o=Lp(o),0,[0],o))}function Or(o,s,f,d,h,m,w,D,C){for(var g=0,E=0,z=w,_=0,N=0,O=0,G=1,ie=1,Q=1,re=0,ne="",ue=h,V=m,P=d,I=ne;ie;)switch(O=re,re=Tn()){case 40:if(O!=108&&It(I,z-1)==58){iu(I+=it(_r(re),"&","&\f"),"&\f")!=-1&&(Q=-1);break}case 34:case 39:case 91:I+=_r(re);break;case 9:case 10:case 13:case 32:I+=bg(O);break;case 92:I+=vg(Lr()-1,7);continue;case 47:switch(na()){case 42:case 47:Rr(Cg(xg(Tn(),Lr()),s,f),C);break;default:I+="/"}break;case 123*G:D[g++]=ea(I)*Q;case 125*G:case 59:case 0:switch(re){case 0:case 125:ie=0;case 59+E:Q==-1&&(I=it(I,/\f/g,"")),N>0&&ea(I)-z&&Rr(N>32?rp(I+";",d,f,z-1):rp(it(I," ","")+";",d,f,z-2),C);break;case 59:I+=";";default:if(Rr(P=op(I,s,f,g,E,h,D,ne,ue=[],V=[],z),m),re===123)if(E===0)Or(I,s,P,P,ue,m,z,D,V);else switch(_===99&&It(I,3)===110?100:_){case 100:case 108:case 109:case 115:Or(o,P,P,d&&Rr(op(o,P,P,0,0,h,D,ne,h,ue=[],z),V),h,V,z,D,d?ue:V);break;default:Or(I,P,P,P,[""],V,0,D,V)}}g=E=N=0,G=Q=1,ne=I="",z=w;break;case 58:z=1+ea(I),N=O;default:if(G<1){if(re==123)--G;else if(re==125&&G++==0&&yg()==125)continue}switch(I+=Nr(re),re*G){case 38:Q=E>0?1:(I+="\f",-1);break;case 44:D[g++]=(ea(I)-1)*Q,Q=1;break;case 64:na()===45&&(I+=_r(Tn())),_=na(),E=z=ea(ne=I+=Sg(Lr())),re++;break;case 45:O===45&&ea(I)==2&&(G=0)}}return m}function op(o,s,f,d,h,m,w,D,C,g,E){for(var z=h-1,_=h===0?m:[""],N=du(_),O=0,G=0,ie=0;O<d;++O)for(var Q=0,re=co(o,z+1,z=dg(G=w[O])),ne=o;Q<N;++Q)(ne=Ap(G>0?_[Q]+" "+re:it(re,/&\f/g,_[Q])))&&(C[ie++]=ne);return qr(o,s,f,h===0?cu:D,C,g,E)}function Cg(o,s,f){return qr(o,s,f,Ep,Nr(gg()),co(o,2,-2),0)}function rp(o,s,f,d){return qr(o,s,f,uu,co(o,0,d),co(o,d+1,-1),d)}function ii(o,s){for(var f="",d=du(o),h=0;h<d;h++)f+=s(o[h],h,o,s)||"";return f}function kg(o,s,f,d){switch(o.type){case ug:if(o.children.length)break;case cg:case uu:return o.return=o.return||o.value;case Ep:return"";case Tp:return o.return=o.value+"{"+ii(o.children,d)+"}";case cu:o.value=o.props.join(",")}return ea(f=ii(o.children,d))?o.return=o.value+"{"+f+"}":""}function zg(o){var s=du(o);return function(f,d,h,m){for(var w="",D=0;D<s;D++)w+=o[D](f,d,h,m)||"";return w}}function Mg(o){return function(s){s.root||(s=s.return)&&o(s)}}function Dg(o){var s=Object.create(null);return function(f){return s[f]===void 0&&(s[f]=o(f)),s[f]}}var Eg=function(s,f,d){for(var h=0,m=0;h=m,m=na(),h===38&&m===12&&(f[d]=1),!uo(m);)Tn();return ho(s,bn)},Tg=function(s,f){var d=-1,h=44;do switch(uo(h)){case 0:h===38&&na()===12&&(f[d]=1),s[d]+=Eg(bn-1,f,d);break;case 2:s[d]+=_r(h);break;case 4:if(h===44){s[++d]=na()===58?"&\f":"",f[d]=s[d].length;break}default:s[d]+=Nr(h)}while(h=Tn());return s},Ag=function(s,f){return _p(Tg(Lp(s),f))},sp=new WeakMap,Rg=function(s){if(!(s.type!=="rule"||!s.parent||s.length<1)){for(var f=s.value,d=s.parent,h=s.column===d.column&&s.line===d.line;d.type!=="rule";)if(d=d.parent,!d)return;if(!(s.props.length===1&&f.charCodeAt(0)!==58&&!sp.get(d))&&!h){sp.set(s,!0);for(var m=[],w=Ag(f,m),D=d.props,C=0,g=0;C<w.length;C++)for(var E=0;E<D.length;E++,g++)s.props[g]=m[C]?w[C].replace(/&\f/g,D[E]):D[E]+" "+w[C]}}},Lg=function(s){if(s.type==="decl"){var f=s.value;f.charCodeAt(0)===108&&f.charCodeAt(2)===98&&(s.return="",s.value="")}};function Op(o,s){switch(hg(o,s)){case 5103:return lt+"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 lt+o+o;case 5349:case 4246:case 4810:case 6968:case 2756:return lt+o+Hr+o+an+o+o;case 6828:case 4268:return lt+o+an+o+o;case 6165:return lt+o+an+"flex-"+o+o;case 5187:return lt+o+it(o,/(\w+).+(:[^]+)/,lt+"box-$1$2"+an+"flex-$1$2")+o;case 5443:return lt+o+an+"flex-item-"+it(o,/flex-|-self/,"")+o;case 4675:return lt+o+an+"flex-line-pack"+it(o,/align-content|flex-|-self/,"")+o;case 5548:return lt+o+an+it(o,"shrink","negative")+o;case 5292:return lt+o+an+it(o,"basis","preferred-size")+o;case 6060:return lt+"box-"+it(o,"-grow","")+lt+o+an+it(o,"grow","positive")+o;case 4554:return lt+it(o,/([^-])(transform)/g,"$1"+lt+"$2")+o;case 6187:return it(it(it(o,/(zoom-|grab)/,lt+"$1"),/(image-set)/,lt+"$1"),o,"")+o;case 5495:case 3959:return it(o,/(image-set\([^]*)/,lt+"$1$`$1");case 4968:return it(it(o,/(.+:)(flex-)?(.*)/,lt+"box-pack:$3"+an+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+lt+o+o;case 4095:case 3583:case 4068:case 2532:return it(o,/(.+)-inline(.+)/,lt+"$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(ea(o)-1-s>6)switch(It(o,s+1)){case 109:if(It(o,s+4)!==45)break;case 102:return it(o,/(.+:)(.+)-([^]+)/,"$1"+lt+"$2-$3$1"+Hr+(It(o,s+3)==108?"$3":"$2-$3"))+o;case 115:return~iu(o,"stretch")?Op(it(o,"stretch","fill-available"),s)+o:o}break;case 4949:if(It(o,s+1)!==115)break;case 6444:switch(It(o,ea(o)-3-(~iu(o,"!important")&&10))){case 107:return it(o,":",":"+lt)+o;case 101:return it(o,/(.+:)([^;!]+)(;|!.+)?/,"$1"+lt+(It(o,14)===45?"inline-":"")+"box$3$1"+lt+"$2$3$1"+an+"$2box$3")+o}break;case 5936:switch(It(o,s+11)){case 114:return lt+o+an+it(o,/[svh]\w+-[tblr]{2}/,"tb")+o;case 108:return lt+o+an+it(o,/[svh]\w+-[tblr]{2}/,"tb-rl")+o;case 45:return lt+o+an+it(o,/[svh]\w+-[tblr]{2}/,"lr")+o}return lt+o+an+o+o}return o}var _g=function(s,f,d,h){if(s.length>-1&&!s.return)switch(s.type){case uu:s.return=Op(s.value,s.length);break;case Tp:return ii([lo(s,{value:it(s.value,"@","@"+lt)})],h);case cu:if(s.length)return mg(s.props,function(m){switch(pg(m,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return ii([lo(s,{props:[it(m,/:(read-\w+)/,":"+Hr+"$1")]})],h);case"::placeholder":return ii([lo(s,{props:[it(m,/:(plac\w+)/,":"+lt+"input-$1")]}),lo(s,{props:[it(m,/:(plac\w+)/,":"+Hr+"$1")]}),lo(s,{props:[it(m,/:(plac\w+)/,an+"input-$1")]})],h)}return""})}},Og=[_g],Ug=function(s){var f=s.key;if(f==="css"){var d=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(d,function(G){var ie=G.getAttribute("data-emotion");ie.indexOf(" ")!==-1&&(document.head.appendChild(G),G.setAttribute("data-s",""))})}var h=s.stylisPlugins||Og,m={},w,D=[];w=s.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+f+' "]'),function(G){for(var ie=G.getAttribute("data-emotion").split(" "),Q=1;Q<ie.length;Q++)m[ie[Q]]=!0;D.push(G)});var C,g=[Rg,Lg];{var E,z=[kg,Mg(function(G){E.insert(G)})],_=zg(g.concat(h,z)),N=function(ie){return ii(wg(ie),_)};C=function(ie,Q,re,ne){E=re,N(ie?ie+"{"+Q.styles+"}":Q.styles),ne&&(O.inserted[Q.name]=!0)}}var O={key:f,sheet:new sg({key:f,container:w,nonce:s.nonce,speedy:s.speedy,prepend:s.prepend,insertionPoint:s.insertionPoint}),nonce:s.nonce,inserted:m,registered:{},insert:C};return O.sheet.hydrate(D),O},Wc={exports:{}},ot={};var cp;function Hg(){if(cp)return ot;cp=1;var o=typeof Symbol=="function"&&Symbol.for,s=o?Symbol.for("react.element"):60103,f=o?Symbol.for("react.portal"):60106,d=o?Symbol.for("react.fragment"):60107,h=o?Symbol.for("react.strict_mode"):60108,m=o?Symbol.for("react.profiler"):60114,w=o?Symbol.for("react.provider"):60109,D=o?Symbol.for("react.context"):60110,C=o?Symbol.for("react.async_mode"):60111,g=o?Symbol.for("react.concurrent_mode"):60111,E=o?Symbol.for("react.forward_ref"):60112,z=o?Symbol.for("react.suspense"):60113,_=o?Symbol.for("react.suspense_list"):60120,N=o?Symbol.for("react.memo"):60115,O=o?Symbol.for("react.lazy"):60116,G=o?Symbol.for("react.block"):60121,ie=o?Symbol.for("react.fundamental"):60117,Q=o?Symbol.for("react.responder"):60118,re=o?Symbol.for("react.scope"):60119;function ne(V){if(typeof V=="object"&&V!==null){var P=V.$$typeof;switch(P){case s:switch(V=V.type,V){case C:case g:case d:case m:case h:case z:return V;default:switch(V=V&&V.$$typeof,V){case D:case E:case O:case N:case w:return V;default:return P}}case f:return P}}}function ue(V){return ne(V)===g}return ot.AsyncMode=C,ot.ConcurrentMode=g,ot.ContextConsumer=D,ot.ContextProvider=w,ot.Element=s,ot.ForwardRef=E,ot.Fragment=d,ot.Lazy=O,ot.Memo=N,ot.Portal=f,ot.Profiler=m,ot.StrictMode=h,ot.Suspense=z,ot.isAsyncMode=function(V){return ue(V)||ne(V)===C},ot.isConcurrentMode=ue,ot.isContextConsumer=function(V){return ne(V)===D},ot.isContextProvider=function(V){return ne(V)===w},ot.isElement=function(V){return typeof V=="object"&&V!==null&&V.$$typeof===s},ot.isForwardRef=function(V){return ne(V)===E},ot.isFragment=function(V){return ne(V)===d},ot.isLazy=function(V){return ne(V)===O},ot.isMemo=function(V){return ne(V)===N},ot.isPortal=function(V){return ne(V)===f},ot.isProfiler=function(V){return ne(V)===m},ot.isStrictMode=function(V){return ne(V)===h},ot.isSuspense=function(V){return ne(V)===z},ot.isValidElementType=function(V){return typeof V=="string"||typeof V=="function"||V===d||V===g||V===m||V===h||V===z||V===_||typeof V=="object"&&V!==null&&(V.$$typeof===O||V.$$typeof===N||V.$$typeof===w||V.$$typeof===D||V.$$typeof===E||V.$$typeof===ie||V.$$typeof===Q||V.$$typeof===re||V.$$typeof===G)},ot.typeOf=ne,ot}var up;function Bg(){return up||(up=1,Wc.exports=Hg()),Wc.exports}var Ic,dp;function Ng(){if(dp)return Ic;dp=1;var o=Bg(),s={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},f={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},d={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},h={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},m={};m[o.ForwardRef]=d,m[o.Memo]=h;function w(O){return o.isMemo(O)?h:m[O.$$typeof]||s}var D=Object.defineProperty,C=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,E=Object.getOwnPropertyDescriptor,z=Object.getPrototypeOf,_=Object.prototype;function N(O,G,ie){if(typeof G!="string"){if(_){var Q=z(G);Q&&Q!==_&&N(O,Q,ie)}var re=C(G);g&&(re=re.concat(g(G)));for(var ne=w(O),ue=w(G),V=0;V<re.length;++V){var P=re[V];if(!f[P]&&!(ie&&ie[P])&&!(ue&&ue[P])&&!(ne&&ne[P])){var I=E(G,P);try{D(O,P,I)}catch{}}}}return O}return Ic=N,Ic}Ng();var jg=!0;function qg(o,s,f){var d="";return f.split(" ").forEach(function(h){o[h]!==void 0?s.push(o[h]+";"):h&&(d+=h+" ")}),d}var Up=function(s,f,d){var h=s.key+"-"+f.name;(d===!1||jg===!1)&&s.registered[h]===void 0&&(s.registered[h]=f.styles)},Yg=function(s,f,d){Up(s,f,d);var h=s.key+"-"+f.name;if(s.inserted[f.name]===void 0){var m=f;do s.insert(f===m?"."+h:"",m,s.sheet,!0),m=m.next;while(m!==void 0)}};function Gg(o){for(var s=0,f,d=0,h=o.length;h>=4;++d,h-=4)f=o.charCodeAt(d)&255|(o.charCodeAt(++d)&255)<<8|(o.charCodeAt(++d)&255)<<16|(o.charCodeAt(++d)&255)<<24,f=(f&65535)*1540483477+((f>>>16)*59797<<16),f^=f>>>24,s=(f&65535)*1540483477+((f>>>16)*59797<<16)^(s&65535)*1540483477+((s>>>16)*59797<<16);switch(h){case 3:s^=(o.charCodeAt(d+2)&255)<<16;case 2:s^=(o.charCodeAt(d+1)&255)<<8;case 1:s^=o.charCodeAt(d)&255,s=(s&65535)*1540483477+((s>>>16)*59797<<16)}return s^=s>>>13,s=(s&65535)*1540483477+((s>>>16)*59797<<16),((s^s>>>15)>>>0).toString(36)}var Xg={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},Vg=/[A-Z]|^ms/g,Qg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Hp=function(s){return s.charCodeAt(1)===45},fp=function(s){return s!=null&&typeof s!="boolean"},Pc=Dg(function(o){return Hp(o)?o:o.replace(Vg,"-$&").toLowerCase()}),hp=function(s,f){switch(s){case"animation":case"animationName":if(typeof f=="string")return f.replace(Qg,function(d,h,m){return ta={name:h,styles:m,next:ta},h})}return Xg[s]!==1&&!Hp(s)&&typeof f=="number"&&f!==0?f+"px":f};function fo(o,s,f){if(f==null)return"";var d=f;if(d.__emotion_styles!==void 0)return d;switch(typeof f){case"boolean":return"";case"object":{var h=f;if(h.anim===1)return ta={name:h.name,styles:h.styles,next:ta},h.name;var m=f;if(m.styles!==void 0){var w=m.next;if(w!==void 0)for(;w!==void 0;)ta={name:w.name,styles:w.styles,next:ta},w=w.next;var D=m.styles+";";return D}return Kg(o,s,f)}case"function":{if(o!==void 0){var C=ta,g=f(o);return ta=C,fo(o,s,g)}break}}var E=f;return E}function Kg(o,s,f){var d="";if(Array.isArray(f))for(var h=0;h<f.length;h++)d+=fo(o,s,f[h])+";";else for(var m in f){var w=f[m];if(typeof w!="object"){var D=w;fp(D)&&(d+=Pc(m)+":"+hp(m,D)+";")}else if(Array.isArray(w)&&typeof w[0]=="string"&&s==null)for(var C=0;C<w.length;C++)fp(w[C])&&(d+=Pc(m)+":"+hp(m,w[C])+";");else{var g=fo(o,s,w);switch(m){case"animation":case"animationName":{d+=Pc(m)+":"+g+";";break}default:d+=m+"{"+g+"}"}}}return d}var pp=/label:\s*([^\s;{]+)\s*(;|$)/g,ta;function Bp(o,s,f){if(o.length===1&&typeof o[0]=="object"&&o[0]!==null&&o[0].styles!==void 0)return o[0];var d=!0,h="";ta=void 0;var m=o[0];if(m==null||m.raw===void 0)d=!1,h+=fo(f,s,m);else{var w=m;h+=w[0]}for(var D=1;D<o.length;D++)if(h+=fo(f,s,o[D]),d){var C=m;h+=C[D]}pp.lastIndex=0;for(var g="",E;(E=pp.exec(h))!==null;)g+="-"+E[1];var z=Gg(h)+g;return{name:z,styles:h,next:ta}}var Zg=function(s){return s()},Fg=ip.useInsertionEffect?ip.useInsertionEffect:!1,Jg=Fg||Zg,Np=v.createContext(typeof HTMLElement<"u"?Ug({key:"css"}):null);Np.Provider;var $g=function(s){return v.forwardRef(function(f,d){var h=v.useContext(Np);return s(f,h,d)})},Wg=v.createContext({}),po={}.hasOwnProperty,ru="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",fu=function(s,f){var d={};for(var h in f)po.call(f,h)&&(d[h]=f[h]);return d[ru]=s,d},Ig=function(s){var f=s.cache,d=s.serialized,h=s.isStringTag;return Up(f,d,h),Jg(function(){return Yg(f,d,h)}),null},Pg=$g(function(o,s,f){var d=o.css;typeof d=="string"&&s.registered[d]!==void 0&&(d=s.registered[d]);var h=o[ru],m=[d],w="";typeof o.className=="string"?w=qg(s.registered,m,o.className):o.className!=null&&(w=o.className+" ");var D=Bp(m,void 0,v.useContext(Wg));w+=s.key+"-"+D.name;var C={};for(var g in o)po.call(o,g)&&g!=="css"&&g!==ru&&(C[g]=o[g]);return C.className=w,f&&(C.ref=f),v.createElement(v.Fragment,null,v.createElement(Ig,{cache:s,serialized:D,isStringTag:typeof h=="string"}),v.createElement(h,C))}),hu=Pg,nt=so.Fragment,r=function(s,f,d){return po.call(f,"css")?so.jsx(hu,fu(s,f),d):so.jsx(s,f,d)},b=function(s,f,d){return po.call(f,"css")?so.jsxs(hu,fu(s,f),d):so.jsxs(s,f,d)},eu={exports:{}},io={},tu={exports:{}},nu={};var mp;function e1(){return mp||(mp=1,(function(o){function s(T,J){var F=T.length;T.push(J);e:for(;0<F;){var Me=F-1>>>1,qe=T[Me];if(0<h(qe,J))T[Me]=J,T[F]=qe,F=Me;else break e}}function f(T){return T.length===0?null:T[0]}function d(T){if(T.length===0)return null;var J=T[0],F=T.pop();if(F!==J){T[0]=F;e:for(var Me=0,qe=T.length,S=qe>>>1;Me<S;){var U=2*(Me+1)-1,ee=T[U],oe=U+1,Ce=T[oe];if(0>h(ee,F))oe<qe&&0>h(Ce,ee)?(T[Me]=Ce,T[oe]=F,Me=oe):(T[Me]=ee,T[U]=F,Me=U);else if(oe<qe&&0>h(Ce,F))T[Me]=Ce,T[oe]=F,Me=oe;else break e}}return J}function h(T,J){var F=T.sortIndex-J.sortIndex;return F!==0?F:T.id-J.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 w=Date,D=w.now();o.unstable_now=function(){return w.now()-D}}var C=[],g=[],E=1,z=null,_=3,N=!1,O=!1,G=!1,ie=!1,Q=typeof setTimeout=="function"?setTimeout:null,re=typeof clearTimeout=="function"?clearTimeout:null,ne=typeof setImmediate<"u"?setImmediate:null;function ue(T){for(var J=f(g);J!==null;){if(J.callback===null)d(g);else if(J.startTime<=T)d(g),J.sortIndex=J.expirationTime,s(C,J);else break;J=f(g)}}function V(T){if(G=!1,ue(T),!O)if(f(C)!==null)O=!0,P||(P=!0,$());else{var J=f(g);J!==null&&ve(V,J.startTime-T)}}var P=!1,I=-1,te=5,j=-1;function K(){return ie?!0:!(o.unstable_now()-j<te)}function fe(){if(ie=!1,P){var T=o.unstable_now();j=T;var J=!0;try{e:{O=!1,G&&(G=!1,re(I),I=-1),N=!0;var F=_;try{t:{for(ue(T),z=f(C);z!==null&&!(z.expirationTime>T&&K());){var Me=z.callback;if(typeof Me=="function"){z.callback=null,_=z.priorityLevel;var qe=Me(z.expirationTime<=T);if(T=o.unstable_now(),typeof qe=="function"){z.callback=qe,ue(T),J=!0;break t}z===f(C)&&d(C),ue(T)}else d(C);z=f(C)}if(z!==null)J=!0;else{var S=f(g);S!==null&&ve(V,S.startTime-T),J=!1}}break e}finally{z=null,_=F,N=!1}J=void 0}}finally{J?$():P=!1}}}var $;if(typeof ne=="function")$=function(){ne(fe)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,W=ae.port2;ae.port1.onmessage=fe,$=function(){W.postMessage(null)}}else $=function(){Q(fe,0)};function ve(T,J){I=Q(function(){T(o.unstable_now())},J)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(T){T.callback=null},o.unstable_forceFrameRate=function(T){0>T||125<T?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):te=0<T?Math.floor(1e3/T):5},o.unstable_getCurrentPriorityLevel=function(){return _},o.unstable_next=function(T){switch(_){case 1:case 2:case 3:var J=3;break;default:J=_}var F=_;_=J;try{return T()}finally{_=F}},o.unstable_requestPaint=function(){ie=!0},o.unstable_runWithPriority=function(T,J){switch(T){case 1:case 2:case 3:case 4:case 5:break;default:T=3}var F=_;_=T;try{return J()}finally{_=F}},o.unstable_scheduleCallback=function(T,J,F){var Me=o.unstable_now();switch(typeof F=="object"&&F!==null?(F=F.delay,F=typeof F=="number"&&0<F?Me+F:Me):F=Me,T){case 1:var qe=-1;break;case 2:qe=250;break;case 5:qe=1073741823;break;case 4:qe=1e4;break;default:qe=5e3}return qe=F+qe,T={id:E++,callback:J,priorityLevel:T,startTime:F,expirationTime:qe,sortIndex:-1},F>Me?(T.sortIndex=F,s(g,T),f(C)===null&&T===f(g)&&(G?(re(I),I=-1):G=!0,ve(V,F-Me))):(T.sortIndex=qe,s(C,T),O||N||(O=!0,P||(P=!0,$()))),T},o.unstable_shouldYield=K,o.unstable_wrapCallback=function(T){var J=_;return function(){var F=_;_=J;try{return T.apply(this,arguments)}finally{_=F}}}})(nu)),nu}var gp;function t1(){return gp||(gp=1,tu.exports=e1()),tu.exports}var au={exports:{}},nn={};var yp;function n1(){if(yp)return nn;yp=1;var o=su();function s(C){var g="https://react.dev/errors/"+C;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var E=2;E<arguments.length;E++)g+="&args[]="+encodeURIComponent(arguments[E])}return"Minified React error #"+C+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var d={d:{f,r:function(){throw Error(s(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},h=Symbol.for("react.portal");function m(C,g,E){var z=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:z==null?null:""+z,children:C,containerInfo:g,implementation:E}}var w=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function D(C,g){if(C==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return nn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=d,nn.createPortal=function(C,g){var E=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(s(299));return m(C,g,null,E)},nn.flushSync=function(C){var g=w.T,E=d.p;try{if(w.T=null,d.p=2,C)return C()}finally{w.T=g,d.p=E,d.d.f()}},nn.preconnect=function(C,g){typeof C=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,d.d.C(C,g))},nn.prefetchDNS=function(C){typeof C=="string"&&d.d.D(C)},nn.preinit=function(C,g){if(typeof C=="string"&&g&&typeof g.as=="string"){var E=g.as,z=D(E,g.crossOrigin),_=typeof g.integrity=="string"?g.integrity:void 0,N=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;E==="style"?d.d.S(C,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:z,integrity:_,fetchPriority:N}):E==="script"&&d.d.X(C,{crossOrigin:z,integrity:_,fetchPriority:N,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},nn.preinitModule=function(C,g){if(typeof C=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var E=D(g.as,g.crossOrigin);d.d.M(C,{crossOrigin:E,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&d.d.M(C)},nn.preload=function(C,g){if(typeof C=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var E=g.as,z=D(E,g.crossOrigin);d.d.L(C,E,{crossOrigin:z,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})}},nn.preloadModule=function(C,g){if(typeof C=="string")if(g){var E=D(g.as,g.crossOrigin);d.d.m(C,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:E,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else d.d.m(C)},nn.requestFormReset=function(C){d.d.r(C)},nn.unstable_batchedUpdates=function(C,g){return C(g)},nn.useFormState=function(C,g,E){return w.H.useFormState(C,g,E)},nn.useFormStatus=function(){return w.H.useHostTransitionStatus()},nn.version="19.2.4",nn}var bp;function a1(){if(bp)return au.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(s){console.error(s)}}return o(),au.exports=n1(),au.exports}var vp;function l1(){if(vp)return io;vp=1;var o=t1(),s=su(),f=a1();function d(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function w(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function D(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function C(e){if(m(e)!==e)throw Error(d(188))}function g(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(d(188));return t!==e?null:e}for(var n=e,a=t;;){var l=n.return;if(l===null)break;var 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(d(188))}if(n.return!==a.return)n=l,a=i;else{for(var u=!1,p=l.child;p;){if(p===n){u=!0,n=l,a=i;break}if(p===a){u=!0,a=l,n=i;break}p=p.sibling}if(!u){for(p=i.child;p;){if(p===n){u=!0,n=i,a=l;break}if(p===a){u=!0,a=i,n=l;break}p=p.sibling}if(!u)throw Error(d(189))}}if(n.alternate!==a)throw Error(d(190))}if(n.tag!==3)throw Error(d(188));return n.stateNode.current===n?e:t}function E(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=E(e),t!==null)return t;e=e.sibling}return null}var z=Object.assign,_=Symbol.for("react.element"),N=Symbol.for("react.transitional.element"),O=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),ie=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),re=Symbol.for("react.consumer"),ne=Symbol.for("react.context"),ue=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),te=Symbol.for("react.lazy"),j=Symbol.for("react.activity"),K=Symbol.for("react.memo_cache_sentinel"),fe=Symbol.iterator;function $(e){return e===null||typeof e!="object"?null:(e=fe&&e[fe]||e["@@iterator"],typeof e=="function"?e:null)}var ae=Symbol.for("react.client.reference");function W(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case G:return"Fragment";case Q:return"Profiler";case ie:return"StrictMode";case V:return"Suspense";case P:return"SuspenseList";case j:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case O:return"Portal";case ne:return e.displayName||"Context";case re:return(e._context.displayName||"Context")+".Consumer";case ue:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return t=e.displayName||null,t!==null?t:W(e.type)||"Memo";case te:t=e._payload,e=e._init;try{return W(e(t))}catch{}}return null}var ve=Array.isArray,T=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F={pending:!1,data:null,method:null,action:null},Me=[],qe=-1;function S(e){return{current:e}}function U(e){0>qe||(e.current=Me[qe],Me[qe]=null,qe--)}function ee(e,t){qe++,Me[qe]=e.current,e.current=t}var oe=S(null),Ce=S(null),Ee=S(null),Ye=S(null);function xt(e,t){switch(ee(Ee,t),ee(Ce,e),ee(oe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?kh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=kh(t),e=zh(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(oe),ee(oe,e)}function Re(){U(oe),U(Ce),U(Ee)}function on(e){e.memoizedState!==null&&ee(Ye,e);var t=oe.current,n=zh(t,e.type);t!==n&&(ee(Ce,e),ee(oe,n))}function $e(e){Ce.current===e&&(U(oe),U(Ce)),Ye.current===e&&(U(Ye),Pi._currentValue=F)}var ut,mt;function Xt(e){if(ut===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);ut=t&&t[1]||"",mt=-1<n.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+ut+e+mt}var Ht=!1;function rn(e,t){if(!e||Ht)return"";Ht=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(H){var L=H}Reflect.construct(e,[],X)}else{try{X.call()}catch(H){L=H}e.call(X.prototype)}}else{try{throw Error()}catch(H){L=H}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(H){if(H&&L&&typeof H.stack=="string")return[H.stack,L.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(),u=i[0],p=i[1];if(u&&p){var x=u.split(`
4
+ `),R=p.split(`
5
+ `);for(l=a=0;a<x.length&&!x[a].includes("DetermineComponentFrameRoot");)a++;for(;l<R.length&&!R[l].includes("DetermineComponentFrameRoot");)l++;if(a===x.length||l===R.length)for(a=x.length-1,l=R.length-1;1<=a&&0<=l&&x[a]!==R[l];)l--;for(;1<=a&&0<=l;a--,l--)if(x[a]!==R[l]){if(a!==1||l!==1)do if(a--,l--,0>l||x[a]!==R[l]){var q=`
6
+ `+x[a].replace(" at new "," at ");return e.displayName&&q.includes("<anonymous>")&&(q=q.replace("<anonymous>",e.displayName)),q}while(1<=a&&0<=l);break}}}finally{Ht=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Xt(n):""}function Pt(e,t){switch(e.tag){case 26:case 27:case 5:return Xt(e.type);case 16:return Xt("Lazy");case 13:return e.child!==t&&t!==null?Xt("Suspense Fallback"):Xt("Suspense");case 19:return Xt("SuspenseList");case 0:case 15:return rn(e.type,!1);case 11:return rn(e.type.render,!1);case 1:return rn(e.type,!0);case 31:return Xt("Activity");default:return""}}function vn(e){try{var t="",n=null;do t+=Pt(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}}var en=Object.prototype.hasOwnProperty,dt=o.unstable_scheduleCallback,Qt=o.unstable_cancelCallback,zt=o.unstable_shouldYield,za=o.unstable_requestPaint,Bt=o.unstable_now,xn=o.unstable_getCurrentPriorityLevel,aa=o.unstable_ImmediatePriority,De=o.unstable_UserBlockingPriority,un=o.unstable_NormalPriority,Le=o.unstable_LowPriority,we=o.unstable_IdlePriority,We=o.log,yt=o.unstable_setDisableYieldValue,Ge=null,ze=null;function St(e){if(typeof We=="function"&&yt(e),ze&&typeof ze.setStrictMode=="function")try{ze.setStrictMode(Ge,e)}catch{}}var Tt=Math.clz32?Math.clz32:tn,he=Math.log,wt=Math.LN2;function tn(e){return e>>>=0,e===0?32:31-(he(e)/wt|0)|0}var dn=256,An=262144,la=4194304;function Gn(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 Rn(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var l=0,i=e.suspendedLanes,u=e.pingedLanes;e=e.warmLanes;var p=a&134217727;return p!==0?(a=p&~i,a!==0?l=Gn(a):(u&=p,u!==0?l=Gn(u):n||(n=p&~e,n!==0&&(l=Gn(n))))):(p=a&~i,p!==0?l=Gn(p):u!==0?l=Gn(u):n||(n=a&~e,n!==0&&(l=Gn(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 Fn(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function el(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 mo(){var e=la;return la<<=1,(la&62914560)===0&&(la=4194304),e}function ui(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function tl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Yr(e,t,n,a,l,i){var u=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var p=e.entanglements,x=e.expirationTimes,R=e.hiddenUpdates;for(n=u&~n;0<n;){var q=31-Tt(n),X=1<<q;p[q]=0,x[q]=-1;var L=R[q];if(L!==null)for(R[q]=null,q=0;q<L.length;q++){var H=L[q];H!==null&&(H.lane&=-536870913)}n&=~X}a!==0&&go(e,a,0),i!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=i&~(u&~t))}function go(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Tt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function yo(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Tt(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function di(e,t){var n=t&-t;return n=(n&42)!==0?1:ia(n),(n&(e.suspendedLanes|t))!==0?0:n}function ia(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 fi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function bo(){var e=J.p;return e!==0?e:(e=window.event,e===void 0?32:Fh(e.type))}function Xn(e,t){var n=J.p;try{return J.p=e,t()}finally{J.p=n}}var Jn=Math.random().toString(36).slice(2),Mt="__reactFiber$"+Jn,_t="__reactProps$"+Jn,Sn="__reactContainer$"+Jn,wl="__reactEvents$"+Jn,Ma="__reactListeners$"+Jn,Da="__reactHandles$"+Jn,hi="__reactResources$"+Jn,nl="__reactMarker$"+Jn;function pi(e){delete e[Mt],delete e[_t],delete e[wl],delete e[Ma],delete e[Da]}function oa(e){var t=e[Mt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Sn]||n[Mt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Lh(e);e!==null;){if(n=e[Mt])return n;e=Lh(e)}return t}e=n,n=e.parentNode}return null}function de(e){if(e=e[Mt]||e[Sn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function le(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(d(33))}function me(e){var t=e[hi];return t||(t=e[hi]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ge(e){e[nl]=!0}var _e=new Set,Ue={};function Ie(e,t){Pe(e,t),Pe(e+"Capture",t)}function Pe(e,t){for(Ue[e]=t,e=0;e<t.length;e++)_e.add(t[e])}var He=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]*$"),sn={},mi={};function Zp(e){return en.call(mi,e)?!0:en.call(sn,e)?!1:He.test(e)?mi[e]=!0:(sn[e]=!0,!1)}function vo(e,t,n){if(Zp(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 xo(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 ra(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 Ln(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function mu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Fp(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(u){n=""+u,i.call(this,u)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(u){n=""+u},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Gr(e){if(!e._valueTracker){var t=mu(e)?"checked":"value";e._valueTracker=Fp(e,t,""+e[t])}}function gu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=mu(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function So(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 Jp=/[\n"\\]/g;function _n(e){return e.replace(Jp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Xr(e,t,n,a,l,i,u,p){e.name="",u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?e.type=u:e.removeAttribute("type"),t!=null?u==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Ln(t)):e.value!==""+Ln(t)&&(e.value=""+Ln(t)):u!=="submit"&&u!=="reset"||e.removeAttribute("value"),t!=null?Vr(e,u,Ln(t)):n!=null?Vr(e,u,Ln(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=""+Ln(p):e.removeAttribute("name")}function yu(e,t,n,a,l,i,u,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)){Gr(e);return}n=n!=null?""+Ln(n):"",t=t!=null?""+Ln(t):n,p||t===e.value||(e.value=t),e.defaultValue=t}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=p?e.checked:!!a,e.defaultChecked=!!a,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.name=u),Gr(e)}function Vr(e,t,n){t==="number"&&So(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Cl(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=""+Ln(n),t=null,l=0;l<e.length;l++){if(e[l].value===n){e[l].selected=!0,a&&(e[l].defaultSelected=!0);return}t!==null||e[l].disabled||(t=e[l])}t!==null&&(t.selected=!0)}}function bu(e,t,n){if(t!=null&&(t=""+Ln(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Ln(n):""}function vu(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(d(92));if(ve(a)){if(1<a.length)throw Error(d(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Ln(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Gr(e)}function kl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var $p=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function xu(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||$p.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Su(e,t,n){if(t!=null&&typeof t!="object")throw Error(d(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var l in t)a=t[l],t.hasOwnProperty(l)&&n[l]!==a&&xu(e,l,a)}else for(var i in t)t.hasOwnProperty(i)&&xu(e,i,t[i])}function Qr(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 Wp=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"]]),Ip=/^[\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 wo(e){return Ip.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function sa(){}var Kr=null;function Zr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zl=null,Ml=null;function wu(e){var t=de(e);if(t&&(e=t.stateNode)){var n=e[_t]||null;e:switch(e=t.stateNode,t.type){case"input":if(Xr(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="'+_n(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[_t]||null;if(!l)throw Error(d(90));Xr(a,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&gu(a)}break e;case"textarea":bu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Cl(e,!!n.multiple,t,!1)}}}var Fr=!1;function Cu(e,t,n){if(Fr)return e(t,n);Fr=!0;try{var a=e(t);return a}finally{if(Fr=!1,(zl!==null||Ml!==null)&&(cr(),zl&&(t=zl,e=Ml,Ml=zl=null,wu(t),e)))for(t=0;t<e.length;t++)wu(e[t])}}function gi(e,t){var n=e.stateNode;if(n===null)return null;var a=n[_t]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(d(231,t,typeof n));return n}var ca=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Jr=!1;if(ca)try{var yi={};Object.defineProperty(yi,"passive",{get:function(){Jr=!0}}),window.addEventListener("test",yi,yi),window.removeEventListener("test",yi,yi)}catch{Jr=!1}var Ea=null,$r=null,Co=null;function ku(){if(Co)return Co;var e,t=$r,n=t.length,a,l="value"in Ea?Ea.value:Ea.textContent,i=l.length;for(e=0;e<n&&t[e]===l[e];e++);var u=n-e;for(a=1;a<=u&&t[n-a]===l[i-a];a++);return Co=l.slice(e,1<a?1-a:void 0)}function ko(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 zo(){return!0}function zu(){return!1}function fn(e){function t(n,a,l,i,u){this._reactName=n,this._targetInst=l,this.type=a,this.nativeEvent=i,this.target=u,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)?zo:zu,this.isPropagationStopped=zu,this}return z(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=zo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=zo)},persist:function(){},isPersistent:zo}),t}var al={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mo=fn(al),bi=z({},al,{view:0,detail:0}),Pp=fn(bi),Wr,Ir,vi,Do=z({},bi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:es,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!==vi&&(vi&&e.type==="mousemove"?(Wr=e.screenX-vi.screenX,Ir=e.screenY-vi.screenY):Ir=Wr=0,vi=e),Wr)},movementY:function(e){return"movementY"in e?e.movementY:Ir}}),Mu=fn(Do),e0=z({},Do,{dataTransfer:0}),t0=fn(e0),n0=z({},bi,{relatedTarget:0}),Pr=fn(n0),a0=z({},al,{animationName:0,elapsedTime:0,pseudoElement:0}),l0=fn(a0),i0=z({},al,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),o0=fn(i0),r0=z({},al,{data:0}),Du=fn(r0),s0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},c0={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"},u0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function d0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=u0[e])?!!t[e]:!1}function es(){return d0}var f0=z({},bi,{key:function(e){if(e.key){var t=s0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ko(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?c0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:es,charCode:function(e){return e.type==="keypress"?ko(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ko(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),h0=fn(f0),p0=z({},Do,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Eu=fn(p0),m0=z({},bi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:es}),g0=fn(m0),y0=z({},al,{propertyName:0,elapsedTime:0,pseudoElement:0}),b0=fn(y0),v0=z({},Do,{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}),x0=fn(v0),S0=z({},al,{newState:0,oldState:0}),w0=fn(S0),C0=[9,13,27,32],ts=ca&&"CompositionEvent"in window,xi=null;ca&&"documentMode"in document&&(xi=document.documentMode);var k0=ca&&"TextEvent"in window&&!xi,Tu=ca&&(!ts||xi&&8<xi&&11>=xi),Au=" ",Ru=!1;function Lu(e,t){switch(e){case"keyup":return C0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function _u(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dl=!1;function z0(e,t){switch(e){case"compositionend":return _u(t);case"keypress":return t.which!==32?null:(Ru=!0,Au);case"textInput":return e=t.data,e===Au&&Ru?null:e;default:return null}}function M0(e,t){if(Dl)return e==="compositionend"||!ts&&Lu(e,t)?(e=ku(),Co=$r=Ea=null,Dl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Tu&&t.locale!=="ko"?null:t.data;default:return null}}var D0={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Ou(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!D0[e.type]:t==="textarea"}function Uu(e,t,n,a){zl?Ml?Ml.push(a):Ml=[a]:zl=a,t=gr(t,"onChange"),0<t.length&&(n=new Mo("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Si=null,wi=null;function E0(e){bh(e,0)}function Eo(e){var t=le(e);if(gu(t))return e}function Hu(e,t){if(e==="change")return t}var Bu=!1;if(ca){var ns;if(ca){var as="oninput"in document;if(!as){var Nu=document.createElement("div");Nu.setAttribute("oninput","return;"),as=typeof Nu.oninput=="function"}ns=as}else ns=!1;Bu=ns&&(!document.documentMode||9<document.documentMode)}function ju(){Si&&(Si.detachEvent("onpropertychange",qu),wi=Si=null)}function qu(e){if(e.propertyName==="value"&&Eo(wi)){var t=[];Uu(t,wi,e,Zr(e)),Cu(E0,t)}}function T0(e,t,n){e==="focusin"?(ju(),Si=t,wi=n,Si.attachEvent("onpropertychange",qu)):e==="focusout"&&ju()}function A0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Eo(wi)}function R0(e,t){if(e==="click")return Eo(t)}function L0(e,t){if(e==="input"||e==="change")return Eo(t)}function _0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var wn=typeof Object.is=="function"?Object.is:_0;function Ci(e,t){if(wn(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(!en.call(t,l)||!wn(e[l],t[l]))return!1}return!0}function Yu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Gu(e,t){var n=Yu(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Yu(n)}}function Xu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Vu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=So(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=So(e.document)}return t}function ls(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 O0=ca&&"documentMode"in document&&11>=document.documentMode,El=null,is=null,ki=null,os=!1;function Qu(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;os||El==null||El!==So(a)||(a=El,"selectionStart"in a&&ls(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}),ki&&Ci(ki,a)||(ki=a,a=gr(is,"onSelect"),0<a.length&&(t=new Mo("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=El)))}function ll(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Tl={animationend:ll("Animation","AnimationEnd"),animationiteration:ll("Animation","AnimationIteration"),animationstart:ll("Animation","AnimationStart"),transitionrun:ll("Transition","TransitionRun"),transitionstart:ll("Transition","TransitionStart"),transitioncancel:ll("Transition","TransitionCancel"),transitionend:ll("Transition","TransitionEnd")},rs={},Ku={};ca&&(Ku=document.createElement("div").style,"AnimationEvent"in window||(delete Tl.animationend.animation,delete Tl.animationiteration.animation,delete Tl.animationstart.animation),"TransitionEvent"in window||delete Tl.transitionend.transition);function il(e){if(rs[e])return rs[e];if(!Tl[e])return e;var t=Tl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ku)return rs[e]=t[n];return e}var Zu=il("animationend"),Fu=il("animationiteration"),Ju=il("animationstart"),U0=il("transitionrun"),H0=il("transitionstart"),B0=il("transitioncancel"),$u=il("transitionend"),Wu=new Map,ss="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(" ");ss.push("scrollEnd");function Vn(e,t){Wu.set(e,t),Ie(t,[e])}var To=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)},On=[],Al=0,cs=0;function Ao(){for(var e=Al,t=cs=Al=0;t<e;){var n=On[t];On[t++]=null;var a=On[t];On[t++]=null;var l=On[t];On[t++]=null;var i=On[t];if(On[t++]=null,a!==null&&l!==null){var u=a.pending;u===null?l.next=l:(l.next=u.next,u.next=l),a.pending=l}i!==0&&Iu(n,l,i)}}function Ro(e,t,n,a){On[Al++]=e,On[Al++]=t,On[Al++]=n,On[Al++]=a,cs|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function us(e,t,n,a){return Ro(e,t,n,a),Lo(e)}function ol(e,t){return Ro(e,null,null,t),Lo(e)}function Iu(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-Tt(n),e=i.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),i):null}function Lo(e){if(50<Ki)throw Ki=0,vc=null,Error(d(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Rl={};function N0(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 Cn(e,t,n,a){return new N0(e,t,n,a)}function ds(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ua(e,t){var n=e.alternate;return n===null?(n=Cn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Pu(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function _o(e,t,n,a,l,i){var u=0;if(a=e,typeof e=="function")ds(e)&&(u=1);else if(typeof e=="string")u=Xm(e,n,oe.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case j:return e=Cn(31,n,t,l),e.elementType=j,e.lanes=i,e;case G:return rl(n.children,l,i,t);case ie:u=8,l|=24;break;case Q:return e=Cn(12,n,t,l|2),e.elementType=Q,e.lanes=i,e;case V:return e=Cn(13,n,t,l),e.elementType=V,e.lanes=i,e;case P:return e=Cn(19,n,t,l),e.elementType=P,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ne:u=10;break e;case re:u=9;break e;case ue:u=11;break e;case I:u=14;break e;case te:u=16,a=null;break e}u=29,n=Error(d(130,e===null?"null":typeof e,"")),a=null}return t=Cn(u,n,t,l),t.elementType=e,t.type=a,t.lanes=i,t}function rl(e,t,n,a){return e=Cn(7,e,a,t),e.lanes=n,e}function fs(e,t,n){return e=Cn(6,e,null,t),e.lanes=n,e}function ed(e){var t=Cn(18,null,null,0);return t.stateNode=e,t}function hs(e,t,n){return t=Cn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var td=new WeakMap;function Un(e,t){if(typeof e=="object"&&e!==null){var n=td.get(e);return n!==void 0?n:(t={value:e,source:t,stack:vn(t)},td.set(e,t),t)}return{value:e,source:t,stack:vn(t)}}var Ll=[],_l=0,Oo=null,zi=0,Hn=[],Bn=0,Ta=null,$n=1,Wn="";function da(e,t){Ll[_l++]=zi,Ll[_l++]=Oo,Oo=e,zi=t}function nd(e,t,n){Hn[Bn++]=$n,Hn[Bn++]=Wn,Hn[Bn++]=Ta,Ta=e;var a=$n;e=Wn;var l=32-Tt(a)-1;a&=~(1<<l),n+=1;var i=32-Tt(t)+l;if(30<i){var u=l-l%5;i=(a&(1<<u)-1).toString(32),a>>=u,l-=u,$n=1<<32-Tt(t)+l|n<<l|a,Wn=i+e}else $n=1<<i|n<<l|a,Wn=e}function ps(e){e.return!==null&&(da(e,1),nd(e,1,0))}function ms(e){for(;e===Oo;)Oo=Ll[--_l],Ll[_l]=null,zi=Ll[--_l],Ll[_l]=null;for(;e===Ta;)Ta=Hn[--Bn],Hn[Bn]=null,Wn=Hn[--Bn],Hn[Bn]=null,$n=Hn[--Bn],Hn[Bn]=null}function ad(e,t){Hn[Bn++]=$n,Hn[Bn++]=Wn,Hn[Bn++]=Ta,$n=t.id,Wn=t.overflow,Ta=e}var Zt=null,Ct=null,Je=!1,Aa=null,Nn=!1,gs=Error(d(519));function Ra(e){var t=Error(d(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Mi(Un(t,e)),gs}function ld(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Mt]=e,t[_t]=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<Fi.length;n++)Qe(Fi[n],t);break;case"source":Qe("error",t);break;case"img":case"image":case"link":Qe("error",t),Qe("load",t);break;case"details":Qe("toggle",t);break;case"input":Qe("invalid",t),yu(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Qe("invalid",t);break;case"textarea":Qe("invalid",t),vu(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||wh(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=sa),t=!0):t=!1,t||Ra(e,!0)}function id(e){for(Zt=e.return;Zt;)switch(Zt.tag){case 5:case 31:case 13:Nn=!1;return;case 27:case 3:Nn=!0;return;default:Zt=Zt.return}}function Ol(e){if(e!==Zt)return!1;if(!Je)return id(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")||Oc(e.type,e.memoizedProps)),n=!n),n&&Ct&&Ra(e),id(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));Ct=Rh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));Ct=Rh(e)}else t===27?(t=Ct,Qa(e.type)?(e=jc,jc=null,Ct=e):Ct=t):Ct=Zt?qn(e.stateNode.nextSibling):null;return!0}function sl(){Ct=Zt=null,Je=!1}function ys(){var e=Aa;return e!==null&&(gn===null?gn=e:gn.push.apply(gn,e),Aa=null),e}function Mi(e){Aa===null?Aa=[e]:Aa.push(e)}var bs=S(null),cl=null,fa=null;function La(e,t,n){ee(bs,t._currentValue),t._currentValue=n}function ha(e){e._currentValue=bs.current,U(bs)}function vs(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 xs(e,t,n,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var i=l.dependencies;if(i!==null){var u=l.child;i=i.firstContext;e:for(;i!==null;){var p=i;i=l;for(var x=0;x<t.length;x++)if(p.context===t[x]){i.lanes|=n,p=i.alternate,p!==null&&(p.lanes|=n),vs(i.return,n,e),a||(u=null);break e}i=p.next}}else if(l.tag===18){if(u=l.return,u===null)throw Error(d(341));u.lanes|=n,i=u.alternate,i!==null&&(i.lanes|=n),vs(u,n,e),u=null}else u=l.child;if(u!==null)u.return=l;else for(u=l;u!==null;){if(u===e){u=null;break}if(l=u.sibling,l!==null){l.return=u.return,u=l;break}u=u.return}l=u}}function Ul(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 u=l.alternate;if(u===null)throw Error(d(387));if(u=u.memoizedProps,u!==null){var p=l.type;wn(l.pendingProps.value,u.value)||(e!==null?e.push(p):e=[p])}}else if(l===Ye.current){if(u=l.alternate,u===null)throw Error(d(387));u.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(Pi):e=[Pi])}l=l.return}e!==null&&xs(t,e,n,a),t.flags|=262144}function Uo(e){for(e=e.firstContext;e!==null;){if(!wn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ul(e){cl=e,fa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ft(e){return od(cl,e)}function Ho(e,t){return cl===null&&ul(e),od(e,t)}function od(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},fa===null){if(e===null)throw Error(d(308));fa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else fa=fa.next=t;return n}var j0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},q0=o.unstable_scheduleCallback,Y0=o.unstable_NormalPriority,Nt={$$typeof:ne,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ss(){return{controller:new j0,data:new Map,refCount:0}}function Di(e){e.refCount--,e.refCount===0&&q0(Y0,function(){e.controller.abort()})}var Ei=null,ws=0,Hl=0,Bl=null;function G0(e,t){if(Ei===null){var n=Ei=[];ws=0,Hl=zc(),Bl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return ws++,t.then(rd,rd),t}function rd(){if(--ws===0&&Ei!==null){Bl!==null&&(Bl.status="fulfilled");var e=Ei;Ei=null,Hl=0,Bl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function X0(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(l){n.push(l)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var l=0;l<n.length;l++)(0,n[l])(t)},function(l){for(a.status="rejected",a.reason=l,l=0;l<n.length;l++)(0,n[l])(void 0)}),a}var sd=T.S;T.S=function(e,t){Kf=Bt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&G0(e,t),sd!==null&&sd(e,t)};var dl=S(null);function Cs(){var e=dl.current;return e!==null?e:gt.pooledCache}function Bo(e,t){t===null?ee(dl,dl.current):ee(dl,t.pool)}function cd(){var e=Cs();return e===null?null:{parent:Nt._currentValue,pool:e}}var Nl=Error(d(460)),ks=Error(d(474)),No=Error(d(542)),jo={then:function(){}};function ud(e){return e=e.status,e==="fulfilled"||e==="rejected"}function dd(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(sa,sa),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hd(e),e;default:if(typeof t.status=="string")t.then(sa,sa);else{if(e=gt,e!==null&&100<e.shellSuspendCounter)throw Error(d(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=a}},function(a){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,hd(e),e}throw hl=t,Nl}}function fl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(hl=n,Nl):n}}var hl=null;function fd(){if(hl===null)throw Error(d(459));var e=hl;return hl=null,e}function hd(e){if(e===Nl||e===No)throw Error(d(483))}var jl=null,Ti=0;function qo(e){var t=Ti;return Ti+=1,jl===null&&(jl=[]),dd(jl,e,t)}function Ai(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Yo(e,t){throw t.$$typeof===_?Error(d(525)):(e=Object.prototype.toString.call(t),Error(d(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function pd(e){function t(M,k){if(e){var A=M.deletions;A===null?(M.deletions=[k],M.flags|=16):A.push(k)}}function n(M,k){if(!e)return null;for(;k!==null;)t(M,k),k=k.sibling;return null}function a(M){for(var k=new Map;M!==null;)M.key!==null?k.set(M.key,M):k.set(M.index,M),M=M.sibling;return k}function l(M,k){return M=ua(M,k),M.index=0,M.sibling=null,M}function i(M,k,A){return M.index=A,e?(A=M.alternate,A!==null?(A=A.index,A<k?(M.flags|=67108866,k):A):(M.flags|=67108866,k)):(M.flags|=1048576,k)}function u(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function p(M,k,A,Y){return k===null||k.tag!==6?(k=fs(A,M.mode,Y),k.return=M,k):(k=l(k,A),k.return=M,k)}function x(M,k,A,Y){var ke=A.type;return ke===G?q(M,k,A.props.children,Y,A.key):k!==null&&(k.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===te&&fl(ke)===k.type)?(k=l(k,A.props),Ai(k,A),k.return=M,k):(k=_o(A.type,A.key,A.props,null,M.mode,Y),Ai(k,A),k.return=M,k)}function R(M,k,A,Y){return k===null||k.tag!==4||k.stateNode.containerInfo!==A.containerInfo||k.stateNode.implementation!==A.implementation?(k=hs(A,M.mode,Y),k.return=M,k):(k=l(k,A.children||[]),k.return=M,k)}function q(M,k,A,Y,ke){return k===null||k.tag!==7?(k=rl(A,M.mode,Y,ke),k.return=M,k):(k=l(k,A),k.return=M,k)}function X(M,k,A){if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return k=fs(""+k,M.mode,A),k.return=M,k;if(typeof k=="object"&&k!==null){switch(k.$$typeof){case N:return A=_o(k.type,k.key,k.props,null,M.mode,A),Ai(A,k),A.return=M,A;case O:return k=hs(k,M.mode,A),k.return=M,k;case te:return k=fl(k),X(M,k,A)}if(ve(k)||$(k))return k=rl(k,M.mode,A,null),k.return=M,k;if(typeof k.then=="function")return X(M,qo(k),A);if(k.$$typeof===ne)return X(M,Ho(M,k),A);Yo(M,k)}return null}function L(M,k,A,Y){var ke=k!==null?k.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return ke!==null?null:p(M,k,""+A,Y);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case N:return A.key===ke?x(M,k,A,Y):null;case O:return A.key===ke?R(M,k,A,Y):null;case te:return A=fl(A),L(M,k,A,Y)}if(ve(A)||$(A))return ke!==null?null:q(M,k,A,Y,null);if(typeof A.then=="function")return L(M,k,qo(A),Y);if(A.$$typeof===ne)return L(M,k,Ho(M,A),Y);Yo(M,A)}return null}function H(M,k,A,Y,ke){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return M=M.get(A)||null,p(k,M,""+Y,ke);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case N:return M=M.get(Y.key===null?A:Y.key)||null,x(k,M,Y,ke);case O:return M=M.get(Y.key===null?A:Y.key)||null,R(k,M,Y,ke);case te:return Y=fl(Y),H(M,k,A,Y,ke)}if(ve(Y)||$(Y))return M=M.get(A)||null,q(k,M,Y,ke,null);if(typeof Y.then=="function")return H(M,k,A,qo(Y),ke);if(Y.$$typeof===ne)return H(M,k,A,Ho(k,Y),ke);Yo(k,Y)}return null}function pe(M,k,A,Y){for(var ke=null,et=null,xe=k,Xe=k=0,Fe=null;xe!==null&&Xe<A.length;Xe++){xe.index>Xe?(Fe=xe,xe=null):Fe=xe.sibling;var tt=L(M,xe,A[Xe],Y);if(tt===null){xe===null&&(xe=Fe);break}e&&xe&&tt.alternate===null&&t(M,xe),k=i(tt,k,Xe),et===null?ke=tt:et.sibling=tt,et=tt,xe=Fe}if(Xe===A.length)return n(M,xe),Je&&da(M,Xe),ke;if(xe===null){for(;Xe<A.length;Xe++)xe=X(M,A[Xe],Y),xe!==null&&(k=i(xe,k,Xe),et===null?ke=xe:et.sibling=xe,et=xe);return Je&&da(M,Xe),ke}for(xe=a(xe);Xe<A.length;Xe++)Fe=H(xe,M,Xe,A[Xe],Y),Fe!==null&&(e&&Fe.alternate!==null&&xe.delete(Fe.key===null?Xe:Fe.key),k=i(Fe,k,Xe),et===null?ke=Fe:et.sibling=Fe,et=Fe);return e&&xe.forEach(function($a){return t(M,$a)}),Je&&da(M,Xe),ke}function Te(M,k,A,Y){if(A==null)throw Error(d(151));for(var ke=null,et=null,xe=k,Xe=k=0,Fe=null,tt=A.next();xe!==null&&!tt.done;Xe++,tt=A.next()){xe.index>Xe?(Fe=xe,xe=null):Fe=xe.sibling;var $a=L(M,xe,tt.value,Y);if($a===null){xe===null&&(xe=Fe);break}e&&xe&&$a.alternate===null&&t(M,xe),k=i($a,k,Xe),et===null?ke=$a:et.sibling=$a,et=$a,xe=Fe}if(tt.done)return n(M,xe),Je&&da(M,Xe),ke;if(xe===null){for(;!tt.done;Xe++,tt=A.next())tt=X(M,tt.value,Y),tt!==null&&(k=i(tt,k,Xe),et===null?ke=tt:et.sibling=tt,et=tt);return Je&&da(M,Xe),ke}for(xe=a(xe);!tt.done;Xe++,tt=A.next())tt=H(xe,M,Xe,tt.value,Y),tt!==null&&(e&&tt.alternate!==null&&xe.delete(tt.key===null?Xe:tt.key),k=i(tt,k,Xe),et===null?ke=tt:et.sibling=tt,et=tt);return e&&xe.forEach(function(eg){return t(M,eg)}),Je&&da(M,Xe),ke}function pt(M,k,A,Y){if(typeof A=="object"&&A!==null&&A.type===G&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case N:e:{for(var ke=A.key;k!==null;){if(k.key===ke){if(ke=A.type,ke===G){if(k.tag===7){n(M,k.sibling),Y=l(k,A.props.children),Y.return=M,M=Y;break e}}else if(k.elementType===ke||typeof ke=="object"&&ke!==null&&ke.$$typeof===te&&fl(ke)===k.type){n(M,k.sibling),Y=l(k,A.props),Ai(Y,A),Y.return=M,M=Y;break e}n(M,k);break}else t(M,k);k=k.sibling}A.type===G?(Y=rl(A.props.children,M.mode,Y,A.key),Y.return=M,M=Y):(Y=_o(A.type,A.key,A.props,null,M.mode,Y),Ai(Y,A),Y.return=M,M=Y)}return u(M);case O:e:{for(ke=A.key;k!==null;){if(k.key===ke)if(k.tag===4&&k.stateNode.containerInfo===A.containerInfo&&k.stateNode.implementation===A.implementation){n(M,k.sibling),Y=l(k,A.children||[]),Y.return=M,M=Y;break e}else{n(M,k);break}else t(M,k);k=k.sibling}Y=hs(A,M.mode,Y),Y.return=M,M=Y}return u(M);case te:return A=fl(A),pt(M,k,A,Y)}if(ve(A))return pe(M,k,A,Y);if($(A)){if(ke=$(A),typeof ke!="function")throw Error(d(150));return A=ke.call(A),Te(M,k,A,Y)}if(typeof A.then=="function")return pt(M,k,qo(A),Y);if(A.$$typeof===ne)return pt(M,k,Ho(M,A),Y);Yo(M,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,k!==null&&k.tag===6?(n(M,k.sibling),Y=l(k,A),Y.return=M,M=Y):(n(M,k),Y=fs(A,M.mode,Y),Y.return=M,M=Y),u(M)):n(M,k)}return function(M,k,A,Y){try{Ti=0;var ke=pt(M,k,A,Y);return jl=null,ke}catch(xe){if(xe===Nl||xe===No)throw xe;var et=Cn(29,xe,null,M.mode);return et.lanes=Y,et.return=M,et}}}var pl=pd(!0),md=pd(!1),_a=!1;function zs(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ms(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 Oa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ua(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(at&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=Lo(e),Iu(e,null,n),t}return Ro(e,a,t,n),Lo(e)}function Ri(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,yo(e,n)}}function Ds(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 u={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?l=i=u:i=i.next=u,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 Es=!1;function Li(){if(Es){var e=Bl;if(e!==null)throw e}}function _i(e,t,n,a){Es=!1;var l=e.updateQueue;_a=!1;var i=l.firstBaseUpdate,u=l.lastBaseUpdate,p=l.shared.pending;if(p!==null){l.shared.pending=null;var x=p,R=x.next;x.next=null,u===null?i=R:u.next=R,u=x;var q=e.alternate;q!==null&&(q=q.updateQueue,p=q.lastBaseUpdate,p!==u&&(p===null?q.firstBaseUpdate=R:p.next=R,q.lastBaseUpdate=x))}if(i!==null){var X=l.baseState;u=0,q=R=x=null,p=i;do{var L=p.lane&-536870913,H=L!==p.lane;if(H?(Ze&L)===L:(a&L)===L){L!==0&&L===Hl&&(Es=!0),q!==null&&(q=q.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var pe=e,Te=p;L=t;var pt=n;switch(Te.tag){case 1:if(pe=Te.payload,typeof pe=="function"){X=pe.call(pt,X,L);break e}X=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=Te.payload,L=typeof pe=="function"?pe.call(pt,X,L):pe,L==null)break e;X=z({},X,L);break e;case 2:_a=!0}}L=p.callback,L!==null&&(e.flags|=64,H&&(e.flags|=8192),H=l.callbacks,H===null?l.callbacks=[L]:H.push(L))}else H={lane:L,tag:p.tag,payload:p.payload,callback:p.callback,next:null},q===null?(R=q=H,x=X):q=q.next=H,u|=L;if(p=p.next,p===null){if(p=l.shared.pending,p===null)break;H=p,p=H.next,H.next=null,l.lastBaseUpdate=H,l.shared.pending=null}}while(!0);q===null&&(x=X),l.baseState=x,l.firstBaseUpdate=R,l.lastBaseUpdate=q,i===null&&(l.shared.lanes=0),qa|=u,e.lanes=u,e.memoizedState=X}}function gd(e,t){if(typeof e!="function")throw Error(d(191,e));e.call(t)}function yd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)gd(n[e],t)}var ql=S(null),Go=S(0);function bd(e,t){e=wa,ee(Go,e),ee(ql,t),wa=e|t.baseLanes}function Ts(){ee(Go,wa),ee(ql,ql.current)}function As(){wa=Go.current,U(ql),U(Go)}var kn=S(null),jn=null;function Ha(e){var t=e.alternate;ee(Ot,Ot.current&1),ee(kn,e),jn===null&&(t===null||ql.current!==null||t.memoizedState!==null)&&(jn=e)}function Rs(e){ee(Ot,Ot.current),ee(kn,e),jn===null&&(jn=e)}function vd(e){e.tag===22?(ee(Ot,Ot.current),ee(kn,e),jn===null&&(jn=e)):Ba()}function Ba(){ee(Ot,Ot.current),ee(kn,kn.current)}function zn(e){U(kn),jn===e&&(jn=null),U(Ot)}var Ot=S(0);function Xo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Bc(n)||Nc(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 pa=0,je=null,ft=null,jt=null,Vo=!1,Yl=!1,ml=!1,Qo=0,Oi=0,Gl=null,V0=0;function At(){throw Error(d(321))}function Ls(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!wn(e[n],t[n]))return!1;return!0}function _s(e,t,n,a,l,i){return pa=i,je=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,T.H=e===null||e.memoizedState===null?nf:Fs,ml=!1,i=n(a,l),ml=!1,Yl&&(i=Sd(t,n,a,l)),xd(e),i}function xd(e){T.H=Bi;var t=ft!==null&&ft.next!==null;if(pa=0,jt=ft=je=null,Vo=!1,Oi=0,Gl=null,t)throw Error(d(300));e===null||qt||(e=e.dependencies,e!==null&&Uo(e)&&(qt=!0))}function Sd(e,t,n,a){je=e;var l=0;do{if(Yl&&(Gl=null),Oi=0,Yl=!1,25<=l)throw Error(d(301));if(l+=1,jt=ft=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}T.H=af,i=t(n,a)}while(Yl);return i}function Q0(){var e=T.H,t=e.useState()[0];return t=typeof t.then=="function"?Ui(t):t,e=e.useState()[0],(ft!==null?ft.memoizedState:null)!==e&&(je.flags|=1024),t}function Os(){var e=Qo!==0;return Qo=0,e}function Us(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Hs(e){if(Vo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Vo=!1}pa=0,jt=ft=je=null,Yl=!1,Oi=Qo=0,Gl=null}function cn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?je.memoizedState=jt=e:jt=jt.next=e,jt}function Ut(){if(ft===null){var e=je.alternate;e=e!==null?e.memoizedState:null}else e=ft.next;var t=jt===null?je.memoizedState:jt.next;if(t!==null)jt=t,ft=e;else{if(e===null)throw je.alternate===null?Error(d(467)):Error(d(310));ft=e,e={memoizedState:ft.memoizedState,baseState:ft.baseState,baseQueue:ft.baseQueue,queue:ft.queue,next:null},jt===null?je.memoizedState=jt=e:jt=jt.next=e}return jt}function Ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ui(e){var t=Oi;return Oi+=1,Gl===null&&(Gl=[]),e=dd(Gl,e,t),t=je,(jt===null?t.memoizedState:jt.next)===null&&(t=t.alternate,T.H=t===null||t.memoizedState===null?nf:Fs),e}function Zo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Ui(e);if(e.$$typeof===ne)return Ft(e)}throw Error(d(438,String(e)))}function Bs(e){var t=null,n=je.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=je.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=Ko(),je.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]=K;return t.index++,n}function ma(e,t){return typeof t=="function"?t(e):t}function Fo(e){var t=Ut();return Ns(t,ft,e)}function Ns(e,t,n){var a=e.queue;if(a===null)throw Error(d(311));a.lastRenderedReducer=n;var l=e.baseQueue,i=a.pending;if(i!==null){if(l!==null){var u=l.next;l.next=i.next,i.next=u}t.baseQueue=l=i,a.pending=null}if(i=e.baseState,l===null)e.memoizedState=i;else{t=l.next;var p=u=null,x=null,R=t,q=!1;do{var X=R.lane&-536870913;if(X!==R.lane?(Ze&X)===X:(pa&X)===X){var L=R.revertLane;if(L===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null}),X===Hl&&(q=!0);else if((pa&L)===L){R=R.next,L===Hl&&(q=!0);continue}else X={lane:0,revertLane:R.revertLane,gesture:null,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},x===null?(p=x=X,u=i):x=x.next=X,je.lanes|=L,qa|=L;X=R.action,ml&&n(i,X),i=R.hasEagerState?R.eagerState:n(i,X)}else L={lane:X,revertLane:R.revertLane,gesture:R.gesture,action:R.action,hasEagerState:R.hasEagerState,eagerState:R.eagerState,next:null},x===null?(p=x=L,u=i):x=x.next=L,je.lanes|=X,qa|=X;R=R.next}while(R!==null&&R!==t);if(x===null?u=i:x.next=p,!wn(i,e.memoizedState)&&(qt=!0,q&&(n=Bl,n!==null)))throw n;e.memoizedState=i,e.baseState=u,e.baseQueue=x,a.lastRenderedState=i}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function js(e){var t=Ut(),n=t.queue;if(n===null)throw Error(d(311));n.lastRenderedReducer=e;var a=n.dispatch,l=n.pending,i=t.memoizedState;if(l!==null){n.pending=null;var u=l=l.next;do i=e(i,u.action),u=u.next;while(u!==l);wn(i,t.memoizedState)||(qt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,a]}function wd(e,t,n){var a=je,l=Ut(),i=Je;if(i){if(n===void 0)throw Error(d(407));n=n()}else n=t();var u=!wn((ft||l).memoizedState,n);if(u&&(l.memoizedState=n,qt=!0),l=l.queue,Gs(zd.bind(null,a,l,e),[e]),l.getSnapshot!==t||u||jt!==null&&jt.memoizedState.tag&1){if(a.flags|=2048,Xl(9,{destroy:void 0},kd.bind(null,a,l,n,t),null),gt===null)throw Error(d(349));i||(pa&127)!==0||Cd(a,t,n)}return n}function Cd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=je.updateQueue,t===null?(t=Ko(),je.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function kd(e,t,n,a){t.value=n,t.getSnapshot=a,Md(t)&&Dd(e)}function zd(e,t,n){return n(function(){Md(t)&&Dd(e)})}function Md(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!wn(e,n)}catch{return!0}}function Dd(e){var t=ol(e,2);t!==null&&yn(t,e,2)}function qs(e){var t=cn();if(typeof e=="function"){var n=e;if(e=n(),ml){St(!0);try{n()}finally{St(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:e},t}function Ed(e,t,n,a){return e.baseState=n,Ns(e,ft,typeof a=="function"?a:ma)}function K0(e,t,n,a,l){if(Wo(e))throw Error(d(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(u){i.listeners.push(u)}};T.T!==null?n(!0):i.isTransition=!1,a(i),n=t.pending,n===null?(i.next=t.pending=i,Td(t,i)):(i.next=n.next,t.pending=n.next=i)}}function Td(e,t){var n=t.action,a=t.payload,l=e.state;if(t.isTransition){var i=T.T,u={};T.T=u;try{var p=n(l,a),x=T.S;x!==null&&x(u,p),Ad(e,t,p)}catch(R){Ys(e,t,R)}finally{i!==null&&u.types!==null&&(i.types=u.types),T.T=i}}else try{i=n(l,a),Ad(e,t,i)}catch(R){Ys(e,t,R)}}function Ad(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Rd(e,t,a)},function(a){return Ys(e,t,a)}):Rd(e,t,n)}function Rd(e,t,n){t.status="fulfilled",t.value=n,Ld(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Td(e,n)))}function Ys(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Ld(t),t=t.next;while(t!==a)}e.action=null}function Ld(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function _d(e,t){return t}function Od(e,t){if(Je){var n=gt.formState;if(n!==null){e:{var a=je;if(Je){if(Ct){t:{for(var l=Ct,i=Nn;l.nodeType!==8;){if(!i){l=null;break t}if(l=qn(l.nextSibling),l===null){l=null;break t}}i=l.data,l=i==="F!"||i==="F"?l:null}if(l){Ct=qn(l.nextSibling),a=l.data==="F!";break e}}Ra(a)}a=!1}a&&(t=n[0])}}return n=cn(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_d,lastRenderedState:t},n.queue=a,n=Pd.bind(null,je,a),a.dispatch=n,a=qs(!1),i=Zs.bind(null,je,!1,a.queue),a=cn(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=K0.bind(null,je,l,i,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function Ud(e){var t=Ut();return Hd(t,ft,e)}function Hd(e,t,n){if(t=Ns(e,t,_d)[0],e=Fo(ma)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Ui(t)}catch(u){throw u===Nl?No:u}else a=t;t=Ut();var l=t.queue,i=l.dispatch;return n!==t.memoizedState&&(je.flags|=2048,Xl(9,{destroy:void 0},Z0.bind(null,l,n),null)),[a,i,e]}function Z0(e,t){e.action=t}function Bd(e){var t=Ut(),n=ft;if(n!==null)return Hd(t,n,e);Ut(),t=t.memoizedState,n=Ut();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Xl(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=je.updateQueue,t===null&&(t=Ko(),je.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Nd(){return Ut().memoizedState}function Jo(e,t,n,a){var l=cn();je.flags|=e,l.memoizedState=Xl(1|t,{destroy:void 0},n,a===void 0?null:a)}function $o(e,t,n,a){var l=Ut();a=a===void 0?null:a;var i=l.memoizedState.inst;ft!==null&&a!==null&&Ls(a,ft.memoizedState.deps)?l.memoizedState=Xl(t,i,n,a):(je.flags|=e,l.memoizedState=Xl(1|t,i,n,a))}function jd(e,t){Jo(8390656,8,e,t)}function Gs(e,t){$o(2048,8,e,t)}function F0(e){je.flags|=4;var t=je.updateQueue;if(t===null)t=Ko(),je.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function qd(e){var t=Ut().memoizedState;return F0({ref:t,nextImpl:e}),function(){if((at&2)!==0)throw Error(d(440));return t.impl.apply(void 0,arguments)}}function Yd(e,t){return $o(4,2,e,t)}function Gd(e,t){return $o(4,4,e,t)}function Xd(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Vd(e,t,n){n=n!=null?n.concat([e]):null,$o(4,4,Xd.bind(null,t,e),n)}function Xs(){}function Qd(e,t){var n=Ut();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Ls(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Kd(e,t){var n=Ut();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Ls(t,a[1]))return a[0];if(a=e(),ml){St(!0);try{e()}finally{St(!1)}}return n.memoizedState=[a,t],a}function Vs(e,t,n){return n===void 0||(pa&1073741824)!==0&&(Ze&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Ff(),je.lanes|=e,qa|=e,n)}function Zd(e,t,n,a){return wn(n,t)?n:ql.current!==null?(e=Vs(e,n,a),wn(e,t)||(qt=!0),e):(pa&42)===0||(pa&1073741824)!==0&&(Ze&261930)===0?(qt=!0,e.memoizedState=n):(e=Ff(),je.lanes|=e,qa|=e,t)}function Fd(e,t,n,a,l){var i=J.p;J.p=i!==0&&8>i?i:8;var u=T.T,p={};T.T=p,Zs(e,!1,t,n);try{var x=l(),R=T.S;if(R!==null&&R(p,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var q=X0(x,a);Hi(e,t,q,En(e))}else Hi(e,t,a,En(e))}catch(X){Hi(e,t,{then:function(){},status:"rejected",reason:X},En())}finally{J.p=i,u!==null&&p.types!==null&&(u.types=p.types),T.T=u}}function J0(){}function Qs(e,t,n,a){if(e.tag!==5)throw Error(d(476));var l=Jd(e).queue;Fd(e,l,t,F,n===null?J0:function(){return $d(e),n(a)})}function Jd(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:ma,lastRenderedState:F},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ma,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function $d(e){var t=Jd(e);t.next===null&&(t=e.alternate.memoizedState),Hi(e,t.next.queue,{},En())}function Ks(){return Ft(Pi)}function Wd(){return Ut().memoizedState}function Id(){return Ut().memoizedState}function $0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=En();e=Oa(n);var a=Ua(t,e,n);a!==null&&(yn(a,t,n),Ri(a,t,n)),t={cache:Ss()},e.payload=t;return}t=t.return}}function W0(e,t,n){var a=En();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Wo(e)?ef(t,n):(n=us(e,t,n,a),n!==null&&(yn(n,e,a),tf(n,t,a)))}function Pd(e,t,n){var a=En();Hi(e,t,n,a)}function Hi(e,t,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Wo(e))ef(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var u=t.lastRenderedState,p=i(u,n);if(l.hasEagerState=!0,l.eagerState=p,wn(p,u))return Ro(e,t,l,0),gt===null&&Ao(),!1}catch{}if(n=us(e,t,l,a),n!==null)return yn(n,e,a),tf(n,t,a),!0}return!1}function Zs(e,t,n,a){if(a={lane:2,revertLane:zc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Wo(e)){if(t)throw Error(d(479))}else t=us(e,n,a,2),t!==null&&yn(t,e,2)}function Wo(e){var t=e.alternate;return e===je||t!==null&&t===je}function ef(e,t){Yl=Vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function tf(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,yo(e,n)}}var Bi={readContext:Ft,use:Zo,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useLayoutEffect:At,useInsertionEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useSyncExternalStore:At,useId:At,useHostTransitionStatus:At,useFormState:At,useActionState:At,useOptimistic:At,useMemoCache:At,useCacheRefresh:At};Bi.useEffectEvent=At;var nf={readContext:Ft,use:Zo,useCallback:function(e,t){return cn().memoizedState=[e,t===void 0?null:t],e},useContext:Ft,useEffect:jd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Jo(4194308,4,Xd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Jo(4194308,4,e,t)},useInsertionEffect:function(e,t){Jo(4,2,e,t)},useMemo:function(e,t){var n=cn();t=t===void 0?null:t;var a=e();if(ml){St(!0);try{e()}finally{St(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=cn();if(n!==void 0){var l=n(t);if(ml){St(!0);try{n(t)}finally{St(!1)}}}else l=t;return a.memoizedState=a.baseState=l,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:l},a.queue=e,e=e.dispatch=W0.bind(null,je,e),[a.memoizedState,e]},useRef:function(e){var t=cn();return e={current:e},t.memoizedState=e},useState:function(e){e=qs(e);var t=e.queue,n=Pd.bind(null,je,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Xs,useDeferredValue:function(e,t){var n=cn();return Vs(n,e,t)},useTransition:function(){var e=qs(!1);return e=Fd.bind(null,je,e.queue,!0,!1),cn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=je,l=cn();if(Je){if(n===void 0)throw Error(d(407));n=n()}else{if(n=t(),gt===null)throw Error(d(349));(Ze&127)!==0||Cd(a,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,jd(zd.bind(null,a,i,e),[e]),a.flags|=2048,Xl(9,{destroy:void 0},kd.bind(null,a,i,n,t),null),n},useId:function(){var e=cn(),t=gt.identifierPrefix;if(Je){var n=Wn,a=$n;n=(a&~(1<<32-Tt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Qo++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=V0++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Ks,useFormState:Od,useActionState:Od,useOptimistic:function(e){var t=cn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Zs.bind(null,je,!0,n),n.dispatch=t,[e,t]},useMemoCache:Bs,useCacheRefresh:function(){return cn().memoizedState=$0.bind(null,je)},useEffectEvent:function(e){var t=cn(),n={impl:e};return t.memoizedState=n,function(){if((at&2)!==0)throw Error(d(440));return n.impl.apply(void 0,arguments)}}},Fs={readContext:Ft,use:Zo,useCallback:Qd,useContext:Ft,useEffect:Gs,useImperativeHandle:Vd,useInsertionEffect:Yd,useLayoutEffect:Gd,useMemo:Kd,useReducer:Fo,useRef:Nd,useState:function(){return Fo(ma)},useDebugValue:Xs,useDeferredValue:function(e,t){var n=Ut();return Zd(n,ft.memoizedState,e,t)},useTransition:function(){var e=Fo(ma)[0],t=Ut().memoizedState;return[typeof e=="boolean"?e:Ui(e),t]},useSyncExternalStore:wd,useId:Wd,useHostTransitionStatus:Ks,useFormState:Ud,useActionState:Ud,useOptimistic:function(e,t){var n=Ut();return Ed(n,ft,e,t)},useMemoCache:Bs,useCacheRefresh:Id};Fs.useEffectEvent=qd;var af={readContext:Ft,use:Zo,useCallback:Qd,useContext:Ft,useEffect:Gs,useImperativeHandle:Vd,useInsertionEffect:Yd,useLayoutEffect:Gd,useMemo:Kd,useReducer:js,useRef:Nd,useState:function(){return js(ma)},useDebugValue:Xs,useDeferredValue:function(e,t){var n=Ut();return ft===null?Vs(n,e,t):Zd(n,ft.memoizedState,e,t)},useTransition:function(){var e=js(ma)[0],t=Ut().memoizedState;return[typeof e=="boolean"?e:Ui(e),t]},useSyncExternalStore:wd,useId:Wd,useHostTransitionStatus:Ks,useFormState:Bd,useActionState:Bd,useOptimistic:function(e,t){var n=Ut();return ft!==null?Ed(n,ft,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Bs,useCacheRefresh:Id};af.useEffectEvent=qd;function Js(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:z({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var $s={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=En(),l=Oa(a);l.payload=t,n!=null&&(l.callback=n),t=Ua(e,l,a),t!==null&&(yn(t,e,a),Ri(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=En(),l=Oa(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=Ua(e,l,a),t!==null&&(yn(t,e,a),Ri(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=En(),a=Oa(n);a.tag=2,t!=null&&(a.callback=t),t=Ua(e,a,n),t!==null&&(yn(t,e,n),Ri(t,e,n))}};function lf(e,t,n,a,l,i,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,u):t.prototype&&t.prototype.isPureReactComponent?!Ci(n,a)||!Ci(l,i):!0}function of(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&$s.enqueueReplaceState(t,t.state,null)}function gl(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=z({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function rf(e){To(e)}function sf(e){console.error(e)}function cf(e){To(e)}function Io(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function uf(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function Ws(e,t,n){return n=Oa(n),n.tag=3,n.payload={element:null},n.callback=function(){Io(e,t)},n}function df(e){return e=Oa(e),e.tag=3,e}function ff(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(){uf(t,n,a)}}var u=n.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(e.callback=function(){uf(t,n,a),typeof l!="function"&&(Ya===null?Ya=new Set([this]):Ya.add(this));var p=a.stack;this.componentDidCatch(a.value,{componentStack:p!==null?p:""})})}function I0(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Ul(t,n,l,!0),n=kn.current,n!==null){switch(n.tag){case 31:case 13:return jn===null?ur():n.alternate===null&&Rt===0&&(Rt=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===jo?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),wc(e,a,l)),!1;case 22:return n.flags|=65536,a===jo?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)),wc(e,a,l)),!1}throw Error(d(435,n.tag))}return wc(e,a,l),ur(),!1}if(Je)return t=kn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==gs&&(e=Error(d(422),{cause:a}),Mi(Un(e,n)))):(a!==gs&&(t=Error(d(423),{cause:a}),Mi(Un(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=Un(a,n),l=Ws(e.stateNode,a,l),Ds(e,l),Rt!==4&&(Rt=2)),!1;var i=Error(d(520),{cause:a});if(i=Un(i,n),Qi===null?Qi=[i]:Qi.push(i),Rt!==4&&(Rt=2),t===null)return!0;a=Un(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=Ws(n.stateNode,a,e),Ds(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"&&(Ya===null||!Ya.has(i))))return n.flags|=65536,l&=-l,n.lanes|=l,l=df(l),ff(l,e,n,a),Ds(n,l),!1}n=n.return}while(n!==null);return!1}var Is=Error(d(461)),qt=!1;function Jt(e,t,n,a){t.child=e===null?md(t,null,n,a):pl(t,e.child,n,a)}function hf(e,t,n,a,l){n=n.render;var i=t.ref;if("ref"in a){var u={};for(var p in a)p!=="ref"&&(u[p]=a[p])}else u=a;return ul(t),a=_s(e,t,n,u,i,l),p=Os(),e!==null&&!qt?(Us(e,t,l),ga(e,t,l)):(Je&&p&&ps(t),t.flags|=1,Jt(e,t,a,l),t.child)}function pf(e,t,n,a,l){if(e===null){var i=n.type;return typeof i=="function"&&!ds(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,mf(e,t,i,a,l)):(e=_o(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!oc(e,l)){var u=i.memoizedProps;if(n=n.compare,n=n!==null?n:Ci,n(u,a)&&e.ref===t.ref)return ga(e,t,l)}return t.flags|=1,e=ua(i,a),e.ref=t.ref,e.return=t,t.child=e}function mf(e,t,n,a,l){if(e!==null){var i=e.memoizedProps;if(Ci(i,a)&&e.ref===t.ref)if(qt=!1,t.pendingProps=a=i,oc(e,l))(e.flags&131072)!==0&&(qt=!0);else return t.lanes=e.lanes,ga(e,t,l)}return Ps(e,t,n,a,l)}function gf(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 yf(e,t,i,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Bo(t,i!==null?i.cachePool:null),i!==null?bd(t,i):Ts(),vd(t);else return a=t.lanes=536870912,yf(e,t,i!==null?i.baseLanes|n:n,n,a)}else i!==null?(Bo(t,i.cachePool),bd(t,i),Ba(),t.memoizedState=null):(e!==null&&Bo(t,null),Ts(),Ba());return Jt(e,t,l,n),t.child}function Ni(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function yf(e,t,n,a,l){var i=Cs();return i=i===null?null:{parent:Nt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&Bo(t,null),Ts(),vd(t),e!==null&&Ul(e,t,a,!0),t.childLanes=l,null}function Po(e,t){return t=tr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function bf(e,t,n){return pl(t,e.child,null,n),e=Po(t,t.pendingProps),e.flags|=2,zn(t),t.memoizedState=null,e}function P0(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=Po(t,a),t.lanes=536870912,Ni(null,e);if(Rs(t),(e=Ct)?(e=Ah(e,Nn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ta!==null?{id:$n,overflow:Wn}:null,retryLane:536870912,hydrationErrors:null},n=ed(e),n.return=t,t.child=n,Zt=t,Ct=null)):e=null,e===null)throw Ra(t);return t.lanes=536870912,null}return Po(t,a)}var i=e.memoizedState;if(i!==null){var u=i.dehydrated;if(Rs(t),l)if(t.flags&256)t.flags&=-257,t=bf(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(d(558));else if(qt||Ul(e,t,n,!1),l=(n&e.childLanes)!==0,qt||l){if(a=gt,a!==null&&(u=di(a,n),u!==0&&u!==i.retryLane))throw i.retryLane=u,ol(e,u),yn(a,e,u),Is;ur(),t=bf(e,t,n)}else e=i.treeContext,Ct=qn(u.nextSibling),Zt=t,Je=!0,Aa=null,Nn=!1,e!==null&&ad(t,e),t=Po(t,a),t.flags|=4096;return t}return e=ua(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function er(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(d(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Ps(e,t,n,a,l){return ul(t),n=_s(e,t,n,a,void 0,l),a=Os(),e!==null&&!qt?(Us(e,t,l),ga(e,t,l)):(Je&&a&&ps(t),t.flags|=1,Jt(e,t,n,l),t.child)}function vf(e,t,n,a,l,i){return ul(t),t.updateQueue=null,n=Sd(t,a,n,l),xd(e),a=Os(),e!==null&&!qt?(Us(e,t,i),ga(e,t,i)):(Je&&a&&ps(t),t.flags|=1,Jt(e,t,n,i),t.child)}function xf(e,t,n,a,l){if(ul(t),t.stateNode===null){var i=Rl,u=n.contextType;typeof u=="object"&&u!==null&&(i=Ft(u)),i=new n(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=$s,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},zs(t),u=n.contextType,i.context=typeof u=="object"&&u!==null?Ft(u):Rl,i.state=t.memoizedState,u=n.getDerivedStateFromProps,typeof u=="function"&&(Js(t,n,u,a),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(u=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),u!==i.state&&$s.enqueueReplaceState(i,i.state,null),_i(t,a,i,l),Li(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var p=t.memoizedProps,x=gl(n,p);i.props=x;var R=i.context,q=n.contextType;u=Rl,typeof q=="object"&&q!==null&&(u=Ft(q));var X=n.getDerivedStateFromProps;q=typeof X=="function"||typeof i.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,q||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(p||R!==u)&&of(t,i,a,u),_a=!1;var L=t.memoizedState;i.state=L,_i(t,a,i,l),Li(),R=t.memoizedState,p||L!==R||_a?(typeof X=="function"&&(Js(t,n,X,a),R=t.memoizedState),(x=_a||lf(t,n,x,a,L,R,u))?(q||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=R),i.props=a,i.state=R,i.context=u,a=x):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Ms(e,t),u=t.memoizedProps,q=gl(n,u),i.props=q,X=t.pendingProps,L=i.context,R=n.contextType,x=Rl,typeof R=="object"&&R!==null&&(x=Ft(R)),p=n.getDerivedStateFromProps,(R=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==X||L!==x)&&of(t,i,a,x),_a=!1,L=t.memoizedState,i.state=L,_i(t,a,i,l),Li();var H=t.memoizedState;u!==X||L!==H||_a||e!==null&&e.dependencies!==null&&Uo(e.dependencies)?(typeof p=="function"&&(Js(t,n,p,a),H=t.memoizedState),(q=_a||lf(t,n,q,a,L,H,x)||e!==null&&e.dependencies!==null&&Uo(e.dependencies))?(R||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,H,x),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,H,x)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=H),i.props=a,i.state=H,i.context=x,a=q):(typeof i.componentDidUpdate!="function"||u===e.memoizedProps&&L===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&L===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,er(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=pl(t,e.child,null,l),t.child=pl(t,null,n,l)):Jt(e,t,n,l),t.memoizedState=i.state,e=t.child):e=ga(e,t,l),e}function Sf(e,t,n,a){return sl(),t.flags|=256,Jt(e,t,n,a),t.child}var ec={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function tc(e){return{baseLanes:e,cachePool:cd()}}function nc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Dn),e}function wf(e,t,n){var a=t.pendingProps,l=!1,i=(t.flags&128)!==0,u;if((u=i)||(u=e!==null&&e.memoizedState===null?!1:(Ot.current&2)!==0),u&&(l=!0,t.flags&=-129),u=(t.flags&32)!==0,t.flags&=-33,e===null){if(Je){if(l?Ha(t):Ba(),(e=Ct)?(e=Ah(e,Nn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ta!==null?{id:$n,overflow:Wn}:null,retryLane:536870912,hydrationErrors:null},n=ed(e),n.return=t,t.child=n,Zt=t,Ct=null)):e=null,e===null)throw Ra(t);return Nc(e)?t.lanes=32:t.lanes=536870912,null}var p=a.children;return a=a.fallback,l?(Ba(),l=t.mode,p=tr({mode:"hidden",children:p},l),a=rl(a,l,n,null),p.return=t,a.return=t,p.sibling=a,t.child=p,a=t.child,a.memoizedState=tc(n),a.childLanes=nc(e,u,n),t.memoizedState=ec,Ni(null,a)):(Ha(t),ac(t,p))}var x=e.memoizedState;if(x!==null&&(p=x.dehydrated,p!==null)){if(i)t.flags&256?(Ha(t),t.flags&=-257,t=lc(e,t,n)):t.memoizedState!==null?(Ba(),t.child=e.child,t.flags|=128,t=null):(Ba(),p=a.fallback,l=t.mode,a=tr({mode:"visible",children:a.children},l),p=rl(p,l,n,null),p.flags|=2,a.return=t,p.return=t,a.sibling=p,t.child=a,pl(t,e.child,null,n),a=t.child,a.memoizedState=tc(n),a.childLanes=nc(e,u,n),t.memoizedState=ec,t=Ni(null,a));else if(Ha(t),Nc(p)){if(u=p.nextSibling&&p.nextSibling.dataset,u)var R=u.dgst;u=R,a=Error(d(419)),a.stack="",a.digest=u,Mi({value:a,source:null,stack:null}),t=lc(e,t,n)}else if(qt||Ul(e,t,n,!1),u=(n&e.childLanes)!==0,qt||u){if(u=gt,u!==null&&(a=di(u,n),a!==0&&a!==x.retryLane))throw x.retryLane=a,ol(e,a),yn(u,e,a),Is;Bc(p)||ur(),t=lc(e,t,n)}else Bc(p)?(t.flags|=192,t.child=e.child,t=null):(e=x.treeContext,Ct=qn(p.nextSibling),Zt=t,Je=!0,Aa=null,Nn=!1,e!==null&&ad(t,e),t=ac(t,a.children),t.flags|=4096);return t}return l?(Ba(),p=a.fallback,l=t.mode,x=e.child,R=x.sibling,a=ua(x,{mode:"hidden",children:a.children}),a.subtreeFlags=x.subtreeFlags&65011712,R!==null?p=ua(R,p):(p=rl(p,l,n,null),p.flags|=2),p.return=t,a.return=t,a.sibling=p,t.child=a,Ni(null,a),a=t.child,p=e.child.memoizedState,p===null?p=tc(n):(l=p.cachePool,l!==null?(x=Nt._currentValue,l=l.parent!==x?{parent:x,pool:x}:l):l=cd(),p={baseLanes:p.baseLanes|n,cachePool:l}),a.memoizedState=p,a.childLanes=nc(e,u,n),t.memoizedState=ec,Ni(e.child,a)):(Ha(t),n=e.child,e=n.sibling,n=ua(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(u=t.deletions,u===null?(t.deletions=[e],t.flags|=16):u.push(e)),t.child=n,t.memoizedState=null,n)}function ac(e,t){return t=tr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function tr(e,t){return e=Cn(22,e,null,t),e.lanes=0,e}function lc(e,t,n){return pl(t,e.child,null,n),e=ac(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Cf(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),vs(e.return,t,n)}function ic(e,t,n,a,l,i){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:l,treeForkCount:i}:(u.isBackwards=t,u.rendering=null,u.renderingStartTime=0,u.last=a,u.tail=n,u.tailMode=l,u.treeForkCount=i)}function kf(e,t,n){var a=t.pendingProps,l=a.revealOrder,i=a.tail;a=a.children;var u=Ot.current,p=(u&2)!==0;if(p?(u=u&1|2,t.flags|=128):u&=1,ee(Ot,u),Jt(e,t,a,n),a=Je?zi:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Cf(e,n,t);else if(e.tag===19)Cf(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&&Xo(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),ic(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&&Xo(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}ic(t,!0,n,null,i,a);break;case"together":ic(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function ga(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),qa|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Ul(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(d(153));if(t.child!==null){for(e=t.child,n=ua(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ua(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function oc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Uo(e)))}function em(e,t,n){switch(t.tag){case 3:xt(t,t.stateNode.containerInfo),La(t,Nt,e.memoizedState.cache),sl();break;case 27:case 5:on(t);break;case 4:xt(t,t.stateNode.containerInfo);break;case 10:La(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Rs(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Ha(t),t.flags|=128,null):(n&t.child.childLanes)!==0?wf(e,t,n):(Ha(t),e=ga(e,t,n),e!==null?e.sibling:null);Ha(t);break;case 19:var l=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Ul(e,t,n,!1),a=(n&t.childLanes)!==0),l){if(a)return kf(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),ee(Ot,Ot.current),a)break;return null;case 22:return t.lanes=0,gf(e,t,n,t.pendingProps);case 24:La(t,Nt,e.memoizedState.cache)}return ga(e,t,n)}function zf(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)qt=!0;else{if(!oc(e,n)&&(t.flags&128)===0)return qt=!1,em(e,t,n);qt=(e.flags&131072)!==0}else qt=!1,Je&&(t.flags&1048576)!==0&&nd(t,zi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=fl(t.elementType),t.type=e,typeof e=="function")ds(e)?(a=gl(e,a),t.tag=1,t=xf(null,t,e,a,n)):(t.tag=0,t=Ps(null,t,e,a,n));else{if(e!=null){var l=e.$$typeof;if(l===ue){t.tag=11,t=hf(null,t,e,a,n);break e}else if(l===I){t.tag=14,t=pf(null,t,e,a,n);break e}}throw t=W(e)||e,Error(d(306,t,""))}}return t;case 0:return Ps(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=gl(a,t.pendingProps),xf(e,t,a,l,n);case 3:e:{if(xt(t,t.stateNode.containerInfo),e===null)throw Error(d(387));a=t.pendingProps;var i=t.memoizedState;l=i.element,Ms(e,t),_i(t,a,null,n);var u=t.memoizedState;if(a=u.cache,La(t,Nt,a),a!==i.cache&&xs(t,[Nt],n,!0),Li(),a=u.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:u.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Sf(e,t,a,n);break e}else if(a!==l){l=Un(Error(d(424)),t),Mi(l),t=Sf(e,t,a,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ct=qn(e.firstChild),Zt=t,Je=!0,Aa=null,Nn=!0,n=md(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(sl(),a===l){t=ga(e,t,n);break e}Jt(e,t,a,n)}t=t.child}return t;case 26:return er(e,t),e===null?(n=Hh(t.type,null,t.pendingProps,null))?t.memoizedState=n:Je||(n=t.type,e=t.pendingProps,a=yr(Ee.current).createElement(n),a[Mt]=t,a[_t]=e,$t(a,n,e),ge(a),t.stateNode=a):t.memoizedState=Hh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return on(t),e===null&&Je&&(a=t.stateNode=_h(t.type,t.pendingProps,Ee.current),Zt=t,Nn=!0,l=Ct,Qa(t.type)?(jc=l,Ct=qn(a.firstChild)):Ct=l),Jt(e,t,t.pendingProps.children,n),er(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Je&&((l=a=Ct)&&(a=Am(a,t.type,t.pendingProps,Nn),a!==null?(t.stateNode=a,Zt=t,Ct=qn(a.firstChild),Nn=!1,l=!0):l=!1),l||Ra(t)),on(t),l=t.type,i=t.pendingProps,u=e!==null?e.memoizedProps:null,a=i.children,Oc(l,i)?a=null:u!==null&&Oc(l,u)&&(t.flags|=32),t.memoizedState!==null&&(l=_s(e,t,Q0,null,null,n),Pi._currentValue=l),er(e,t),Jt(e,t,a,n),t.child;case 6:return e===null&&Je&&((e=n=Ct)&&(n=Rm(n,t.pendingProps,Nn),n!==null?(t.stateNode=n,Zt=t,Ct=null,e=!0):e=!1),e||Ra(t)),null;case 13:return wf(e,t,n);case 4:return xt(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=pl(t,null,a,n):Jt(e,t,a,n),t.child;case 11:return hf(e,t,t.type,t.pendingProps,n);case 7:return Jt(e,t,t.pendingProps,n),t.child;case 8:return Jt(e,t,t.pendingProps.children,n),t.child;case 12:return Jt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,La(t,t.type,a.value),Jt(e,t,a.children,n),t.child;case 9:return l=t.type._context,a=t.pendingProps.children,ul(t),l=Ft(l),a=a(l),t.flags|=1,Jt(e,t,a,n),t.child;case 14:return pf(e,t,t.type,t.pendingProps,n);case 15:return mf(e,t,t.type,t.pendingProps,n);case 19:return kf(e,t,n);case 31:return P0(e,t,n);case 22:return gf(e,t,n,t.pendingProps);case 24:return ul(t),a=Ft(Nt),e===null?(l=Cs(),l===null&&(l=gt,i=Ss(),l.pooledCache=i,i.refCount++,i!==null&&(l.pooledCacheLanes|=n),l=i),t.memoizedState={parent:a,cache:l},zs(t),La(t,Nt,l)):((e.lanes&n)!==0&&(Ms(e,t),_i(t,null,null,n),Li()),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),La(t,Nt,a)):(a=i.cache,La(t,Nt,a),a!==l.cache&&xs(t,[Nt],n,!0))),Jt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(d(156,t.tag))}function ya(e){e.flags|=4}function rc(e,t,n,a,l){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(If())e.flags|=8192;else throw hl=jo,ks}else e.flags&=-16777217}function Mf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Yh(t))if(If())e.flags|=8192;else throw hl=jo,ks}function nr(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?mo():536870912,e.lanes|=t,Zl|=t)}function ji(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 kt(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 tm(e,t,n){var a=t.pendingProps;switch(ms(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return kt(t),null;case 1:return kt(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),ha(Nt),Re(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ol(t)?ya(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ys())),kt(t),null;case 26:var l=t.type,i=t.memoizedState;return e===null?(ya(t),i!==null?(kt(t),Mf(t,i)):(kt(t),rc(t,l,null,a,n))):i?i!==e.memoizedState?(ya(t),kt(t),Mf(t,i)):(kt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&ya(t),kt(t),rc(t,l,e,a,n)),null;case 27:if($e(t),n=Ee.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ya(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return kt(t),null}e=oe.current,Ol(t)?ld(t):(e=_h(l,a,n),t.stateNode=e,ya(t))}return kt(t),null;case 5:if($e(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ya(t);else{if(!a){if(t.stateNode===null)throw Error(d(166));return kt(t),null}if(i=oe.current,Ol(t))ld(t);else{var u=yr(Ee.current);switch(i){case 1:i=u.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:i=u.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":i=u.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":i=u.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":i=u.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?u.createElement("select",{is:a.is}):u.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?u.createElement(l,{is:a.is}):u.createElement(l)}}i[Mt]=t,i[_t]=a;e:for(u=t.child;u!==null;){if(u.tag===5||u.tag===6)i.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===t)break e;for(;u.sibling===null;){if(u.return===null||u.return===t)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}t.stateNode=i;e:switch($t(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&&ya(t)}}return kt(t),rc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ya(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(d(166));if(e=Ee.current,Ol(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,l=Zt,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[Mt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||wh(e.nodeValue,n)),e||Ra(t,!0)}else e=yr(e).createTextNode(a),e[Mt]=t,t.stateNode=e}return kt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=Ol(t),n!==null){if(e===null){if(!a)throw Error(d(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(557));e[Mt]=t}else sl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;kt(t),e=!1}else n=ys(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(zn(t),t):(zn(t),null);if((t.flags&128)!==0)throw Error(d(558))}return kt(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=Ol(t),a!==null&&a.dehydrated!==null){if(e===null){if(!l)throw Error(d(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(d(317));l[Mt]=t}else sl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;kt(t),l=!1}else l=ys(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(zn(t),t):(zn(t),null)}return zn(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),nr(t,t.updateQueue),kt(t),null);case 4:return Re(),e===null&&Tc(t.stateNode.containerInfo),kt(t),null;case 10:return ha(t.type),kt(t),null;case 19:if(U(Ot),a=t.memoizedState,a===null)return kt(t),null;if(l=(t.flags&128)!==0,i=a.rendering,i===null)if(l)ji(a,!1);else{if(Rt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Xo(e),i!==null){for(t.flags|=128,ji(a,!1),e=i.updateQueue,t.updateQueue=e,nr(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Pu(n,e),n=n.sibling;return ee(Ot,Ot.current&1|2),Je&&da(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Bt()>rr&&(t.flags|=128,l=!0,ji(a,!1),t.lanes=4194304)}else{if(!l)if(e=Xo(i),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,nr(t,e),ji(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!Je)return kt(t),null}else 2*Bt()-a.renderingStartTime>rr&&n!==536870912&&(t.flags|=128,l=!0,ji(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=Bt(),e.sibling=null,n=Ot.current,ee(Ot,l?n&1|2:n&1),Je&&da(t,a.treeForkCount),e):(kt(t),null);case 22:case 23:return zn(t),As(),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&&(kt(t),t.subtreeFlags&6&&(t.flags|=8192)):kt(t),n=t.updateQueue,n!==null&&nr(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&&U(dl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ha(Nt),kt(t),null;case 25:return null;case 30:return null}throw Error(d(156,t.tag))}function nm(e,t){switch(ms(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ha(Nt),Re(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return $e(t),null;case 31:if(t.memoizedState!==null){if(zn(t),t.alternate===null)throw Error(d(340));sl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(zn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(d(340));sl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(Ot),null;case 4:return Re(),null;case 10:return ha(t.type),null;case 22:case 23:return zn(t),As(),e!==null&&U(dl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ha(Nt),null;case 25:return null;default:return null}}function Df(e,t){switch(ms(t),t.tag){case 3:ha(Nt),Re();break;case 26:case 27:case 5:$e(t);break;case 4:Re();break;case 31:t.memoizedState!==null&&zn(t);break;case 13:zn(t);break;case 19:U(Ot);break;case 10:ha(t.type);break;case 22:case 23:zn(t),As(),e!==null&&U(dl);break;case 24:ha(Nt)}}function qi(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,u=n.inst;a=i(),u.destroy=a}n=n.next}while(n!==l)}}catch(p){ct(t,t.return,p)}}function Na(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 u=a.inst,p=u.destroy;if(p!==void 0){u.destroy=void 0,l=t;var x=n,R=p;try{R()}catch(q){ct(l,x,q)}}}a=a.next}while(a!==i)}}catch(q){ct(t,t.return,q)}}function Ef(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{yd(t,n)}catch(a){ct(e,e.return,a)}}}function Tf(e,t,n){n.props=gl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){ct(e,t,a)}}function Yi(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){ct(e,t,l)}}function In(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){ct(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){ct(e,t,l)}else n.current=null}function Af(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(l){ct(e,e.return,l)}}function sc(e,t,n){try{var a=e.stateNode;km(a,e.type,n,t),a[_t]=t}catch(l){ct(e,e.return,l)}}function Rf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Qa(e.type)||e.tag===4}function cc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Rf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Qa(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 uc(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=sa));else if(a!==4&&(a===27&&Qa(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(uc(e,t,n),e=e.sibling;e!==null;)uc(e,t,n),e=e.sibling}function ar(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&&Qa(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(ar(e,t,n),e=e.sibling;e!==null;)ar(e,t,n),e=e.sibling}function Lf(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);$t(t,a,n),t[Mt]=e,t[_t]=n}catch(i){ct(e,e.return,i)}}var ba=!1,Yt=!1,dc=!1,_f=typeof WeakSet=="function"?WeakSet:Set,Kt=null;function am(e,t){if(e=e.containerInfo,Lc=kr,e=Vu(e),ls(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 u=0,p=-1,x=-1,R=0,q=0,X=e,L=null;t:for(;;){for(var H;X!==n||l!==0&&X.nodeType!==3||(p=u+l),X!==i||a!==0&&X.nodeType!==3||(x=u+a),X.nodeType===3&&(u+=X.nodeValue.length),(H=X.firstChild)!==null;)L=X,X=H;for(;;){if(X===e)break t;if(L===n&&++R===l&&(p=u),L===i&&++q===a&&(x=u),(H=X.nextSibling)!==null)break;X=L,L=X.parentNode}X=H}n=p===-1||x===-1?null:{start:p,end:x}}else n=null}n=n||{start:0,end:0}}else n=null;for(_c={focusedElem:e,selectionRange:n},kr=!1,Kt=t;Kt!==null;)if(t=Kt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Kt=e;else for(;Kt!==null;){switch(t=Kt,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 pe=gl(n.type,l);e=a.getSnapshotBeforeUpdate(pe,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(Te){ct(n,n.return,Te)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Hc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Hc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(d(163))}if(e=t.sibling,e!==null){e.return=t.return,Kt=e;break}Kt=t.return}}function Of(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:xa(e,n),a&4&&qi(5,n);break;case 1:if(xa(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(u){ct(n,n.return,u)}else{var l=gl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(u){ct(n,n.return,u)}}a&64&&Ef(n),a&512&&Yi(n,n.return);break;case 3:if(xa(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{yd(e,t)}catch(u){ct(n,n.return,u)}}break;case 27:t===null&&a&4&&Lf(n);case 26:case 5:xa(e,n),t===null&&a&4&&Af(n),a&512&&Yi(n,n.return);break;case 12:xa(e,n);break;case 31:xa(e,n),a&4&&Bf(e,n);break;case 13:xa(e,n),a&4&&Nf(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=fm.bind(null,n),Lm(e,n))));break;case 22:if(a=n.memoizedState!==null||ba,!a){t=t!==null&&t.memoizedState!==null||Yt,l=ba;var i=Yt;ba=a,(Yt=t)&&!i?Sa(e,n,(n.subtreeFlags&8772)!==0):xa(e,n),ba=l,Yt=i}break;case 30:break;default:xa(e,n)}}function Uf(e){var t=e.alternate;t!==null&&(e.alternate=null,Uf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&pi(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 Dt=null,hn=!1;function va(e,t,n){for(n=n.child;n!==null;)Hf(e,t,n),n=n.sibling}function Hf(e,t,n){if(ze&&typeof ze.onCommitFiberUnmount=="function")try{ze.onCommitFiberUnmount(Ge,n)}catch{}switch(n.tag){case 26:Yt||In(n,t),va(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Yt||In(n,t);var a=Dt,l=hn;Qa(n.type)&&(Dt=n.stateNode,hn=!1),va(e,t,n),$i(n.stateNode),Dt=a,hn=l;break;case 5:Yt||In(n,t);case 6:if(a=Dt,l=hn,Dt=null,va(e,t,n),Dt=a,hn=l,Dt!==null)if(hn)try{(Dt.nodeType===9?Dt.body:Dt.nodeName==="HTML"?Dt.ownerDocument.body:Dt).removeChild(n.stateNode)}catch(i){ct(n,t,i)}else try{Dt.removeChild(n.stateNode)}catch(i){ct(n,t,i)}break;case 18:Dt!==null&&(hn?(e=Dt,Eh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),ti(e)):Eh(Dt,n.stateNode));break;case 4:a=Dt,l=hn,Dt=n.stateNode.containerInfo,hn=!0,va(e,t,n),Dt=a,hn=l;break;case 0:case 11:case 14:case 15:Na(2,n,t),Yt||Na(4,n,t),va(e,t,n);break;case 1:Yt||(In(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Tf(n,t,a)),va(e,t,n);break;case 21:va(e,t,n);break;case 22:Yt=(a=Yt)||n.memoizedState!==null,va(e,t,n),Yt=a;break;default:va(e,t,n)}}function Bf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ti(e)}catch(n){ct(t,t.return,n)}}}function Nf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ti(e)}catch(n){ct(t,t.return,n)}}function lm(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new _f),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new _f),t;default:throw Error(d(435,e.tag))}}function lr(e,t){var n=lm(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var l=hm.bind(null,e,a);a.then(l,l)}})}function pn(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a],i=e,u=t,p=u;e:for(;p!==null;){switch(p.tag){case 27:if(Qa(p.type)){Dt=p.stateNode,hn=!1;break e}break;case 5:Dt=p.stateNode,hn=!1;break e;case 3:case 4:Dt=p.stateNode.containerInfo,hn=!0;break e}p=p.return}if(Dt===null)throw Error(d(160));Hf(i,u,l),Dt=null,hn=!1,i=l.alternate,i!==null&&(i.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)jf(t,e),t=t.sibling}var Qn=null;function jf(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pn(t,e),mn(e),a&4&&(Na(3,e,e.return),qi(3,e),Na(5,e,e.return));break;case 1:pn(t,e),mn(e),a&512&&(Yt||n===null||In(n,n.return)),a&64&&ba&&(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=Qn;if(pn(t,e),mn(e),a&512&&(Yt||n===null||In(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[nl]||i[Mt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=l.createElement(a),l.head.insertBefore(i,l.querySelector("head > title"))),$t(i,a,n),i[Mt]=e,ge(i),a=i;break e;case"link":var u=jh("link","href",l).get(a+(n.href||""));if(u){for(var p=0;p<u.length;p++)if(i=u[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)){u.splice(p,1);break t}}i=l.createElement(a),$t(i,a,n),l.head.appendChild(i);break;case"meta":if(u=jh("meta","content",l).get(a+(n.content||""))){for(p=0;p<u.length;p++)if(i=u[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)){u.splice(p,1);break t}}i=l.createElement(a),$t(i,a,n),l.head.appendChild(i);break;default:throw Error(d(468,a))}i[Mt]=e,ge(i),a=i}e.stateNode=a}else qh(l,e.type,e.stateNode);else e.stateNode=Nh(l,a,e.memoizedProps);else i!==a?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,a===null?qh(l,e.type,e.stateNode):Nh(l,a,e.memoizedProps)):a===null&&e.stateNode!==null&&sc(e,e.memoizedProps,n.memoizedProps)}break;case 27:pn(t,e),mn(e),a&512&&(Yt||n===null||In(n,n.return)),n!==null&&a&4&&sc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(pn(t,e),mn(e),a&512&&(Yt||n===null||In(n,n.return)),e.flags&32){l=e.stateNode;try{kl(l,"")}catch(pe){ct(e,e.return,pe)}}a&4&&e.stateNode!=null&&(l=e.memoizedProps,sc(e,l,n!==null?n.memoizedProps:l)),a&1024&&(dc=!0);break;case 6:if(pn(t,e),mn(e),a&4){if(e.stateNode===null)throw Error(d(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(pe){ct(e,e.return,pe)}}break;case 3:if(xr=null,l=Qn,Qn=br(t.containerInfo),pn(t,e),Qn=l,mn(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{ti(t.containerInfo)}catch(pe){ct(e,e.return,pe)}dc&&(dc=!1,qf(e));break;case 4:a=Qn,Qn=br(e.stateNode.containerInfo),pn(t,e),mn(e),Qn=a;break;case 12:pn(t,e),mn(e);break;case 31:pn(t,e),mn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,lr(e,a)));break;case 13:pn(t,e),mn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(or=Bt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,lr(e,a)));break;case 22:l=e.memoizedState!==null;var x=n!==null&&n.memoizedState!==null,R=ba,q=Yt;if(ba=R||l,Yt=q||x,pn(t,e),Yt=q,ba=R,mn(e),a&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||x||ba||Yt||yl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){x=n=t;try{if(i=x.stateNode,l)u=i.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none";else{p=x.stateNode;var X=x.memoizedProps.style,L=X!=null&&X.hasOwnProperty("display")?X.display:null;p.style.display=L==null||typeof L=="boolean"?"":(""+L).trim()}}catch(pe){ct(x,x.return,pe)}}}else if(t.tag===6){if(n===null){x=t;try{x.stateNode.nodeValue=l?"":x.memoizedProps}catch(pe){ct(x,x.return,pe)}}}else if(t.tag===18){if(n===null){x=t;try{var H=x.stateNode;l?Th(H,!0):Th(x.stateNode,!1)}catch(pe){ct(x,x.return,pe)}}}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,lr(e,n))));break;case 19:pn(t,e),mn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,lr(e,a)));break;case 30:break;case 21:break;default:pn(t,e),mn(e)}}function mn(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Rf(a)){n=a;break}a=a.return}if(n==null)throw Error(d(160));switch(n.tag){case 27:var l=n.stateNode,i=cc(e);ar(e,i,l);break;case 5:var u=n.stateNode;n.flags&32&&(kl(u,""),n.flags&=-33);var p=cc(e);ar(e,p,u);break;case 3:case 4:var x=n.stateNode.containerInfo,R=cc(e);uc(e,R,x);break;default:throw Error(d(161))}}catch(q){ct(e,e.return,q)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;qf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function xa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Of(e,t.alternate,t),t=t.sibling}function yl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Na(4,t,t.return),yl(t);break;case 1:In(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Tf(t,t.return,n),yl(t);break;case 27:$i(t.stateNode);case 26:case 5:In(t,t.return),yl(t);break;case 22:t.memoizedState===null&&yl(t);break;case 30:yl(t);break;default:yl(t)}e=e.sibling}}function Sa(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,l=e,i=t,u=i.flags;switch(i.tag){case 0:case 11:case 15:Sa(l,i,n),qi(4,i);break;case 1:if(Sa(l,i,n),a=i,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(R){ct(a,a.return,R)}if(a=i,l=a.updateQueue,l!==null){var p=a.stateNode;try{var x=l.shared.hiddenCallbacks;if(x!==null)for(l.shared.hiddenCallbacks=null,l=0;l<x.length;l++)gd(x[l],p)}catch(R){ct(a,a.return,R)}}n&&u&64&&Ef(i),Yi(i,i.return);break;case 27:Lf(i);case 26:case 5:Sa(l,i,n),n&&a===null&&u&4&&Af(i),Yi(i,i.return);break;case 12:Sa(l,i,n);break;case 31:Sa(l,i,n),n&&u&4&&Bf(l,i);break;case 13:Sa(l,i,n),n&&u&4&&Nf(l,i);break;case 22:i.memoizedState===null&&Sa(l,i,n),Yi(i,i.return);break;case 30:break;default:Sa(l,i,n)}t=t.sibling}}function fc(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&&Di(n))}function hc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Di(e))}function Kn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Yf(e,t,n,a),t=t.sibling}function Yf(e,t,n,a){var l=t.flags;switch(t.tag){case 0:case 11:case 15:Kn(e,t,n,a),l&2048&&qi(9,t);break;case 1:Kn(e,t,n,a);break;case 3:Kn(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&&Di(e)));break;case 12:if(l&2048){Kn(e,t,n,a),e=t.stateNode;try{var i=t.memoizedProps,u=i.id,p=i.onPostCommit;typeof p=="function"&&p(u,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(x){ct(t,t.return,x)}}else Kn(e,t,n,a);break;case 31:Kn(e,t,n,a);break;case 13:Kn(e,t,n,a);break;case 23:break;case 22:i=t.stateNode,u=t.alternate,t.memoizedState!==null?i._visibility&2?Kn(e,t,n,a):Gi(e,t):i._visibility&2?Kn(e,t,n,a):(i._visibility|=2,Vl(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),l&2048&&fc(u,t);break;case 24:Kn(e,t,n,a),l&2048&&hc(t.alternate,t);break;default:Kn(e,t,n,a)}}function Vl(e,t,n,a,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,u=t,p=n,x=a,R=u.flags;switch(u.tag){case 0:case 11:case 15:Vl(i,u,p,x,l),qi(8,u);break;case 23:break;case 22:var q=u.stateNode;u.memoizedState!==null?q._visibility&2?Vl(i,u,p,x,l):Gi(i,u):(q._visibility|=2,Vl(i,u,p,x,l)),l&&R&2048&&fc(u.alternate,u);break;case 24:Vl(i,u,p,x,l),l&&R&2048&&hc(u.alternate,u);break;default:Vl(i,u,p,x,l)}t=t.sibling}}function Gi(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:Gi(n,a),l&2048&&fc(a.alternate,a);break;case 24:Gi(n,a),l&2048&&hc(a.alternate,a);break;default:Gi(n,a)}t=t.sibling}}var Xi=8192;function Ql(e,t,n){if(e.subtreeFlags&Xi)for(e=e.child;e!==null;)Gf(e,t,n),e=e.sibling}function Gf(e,t,n){switch(e.tag){case 26:Ql(e,t,n),e.flags&Xi&&e.memoizedState!==null&&Vm(n,Qn,e.memoizedState,e.memoizedProps);break;case 5:Ql(e,t,n);break;case 3:case 4:var a=Qn;Qn=br(e.stateNode.containerInfo),Ql(e,t,n),Qn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Xi,Xi=16777216,Ql(e,t,n),Xi=a):Ql(e,t,n));break;default:Ql(e,t,n)}}function Xf(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Vi(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];Kt=a,Qf(a,e)}Xf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vf(e),e=e.sibling}function Vf(e){switch(e.tag){case 0:case 11:case 15:Vi(e),e.flags&2048&&Na(9,e,e.return);break;case 3:Vi(e);break;case 12:Vi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ir(e)):Vi(e);break;default:Vi(e)}}function ir(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];Kt=a,Qf(a,e)}Xf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Na(8,t,t.return),ir(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ir(t));break;default:ir(t)}e=e.sibling}}function Qf(e,t){for(;Kt!==null;){var n=Kt;switch(n.tag){case 0:case 11:case 15:Na(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:Di(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,Kt=a;else e:for(n=e;Kt!==null;){a=Kt;var l=a.sibling,i=a.return;if(Uf(a),a===n){Kt=null;break e}if(l!==null){l.return=i,Kt=l;break e}Kt=i}}}var im={getCacheForType:function(e){var t=Ft(Nt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ft(Nt).controller.signal}},om=typeof WeakMap=="function"?WeakMap:Map,at=0,gt=null,Ve=null,Ze=0,st=0,Mn=null,ja=!1,Kl=!1,pc=!1,wa=0,Rt=0,qa=0,bl=0,mc=0,Dn=0,Zl=0,Qi=null,gn=null,gc=!1,or=0,Kf=0,rr=1/0,sr=null,Ya=null,Vt=0,Ga=null,Fl=null,Ca=0,yc=0,bc=null,Zf=null,Ki=0,vc=null;function En(){return(at&2)!==0&&Ze!==0?Ze&-Ze:T.T!==null?zc():bo()}function Ff(){if(Dn===0)if((Ze&536870912)===0||Je){var e=An;An<<=1,(An&3932160)===0&&(An=262144),Dn=e}else Dn=536870912;return e=kn.current,e!==null&&(e.flags|=32),Dn}function yn(e,t,n){(e===gt&&(st===2||st===9)||e.cancelPendingCommit!==null)&&(Jl(e,0),Xa(e,Ze,Dn,!1)),tl(e,n),((at&2)===0||e!==gt)&&(e===gt&&((at&2)===0&&(bl|=n),Rt===4&&Xa(e,Ze,Dn,!1)),Pn(e))}function Jf(e,t,n){if((at&6)!==0)throw Error(d(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Fn(e,t),l=a?cm(e,t):Sc(e,t,!0),i=a;do{if(l===0){Kl&&!a&&Xa(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!rm(n)){l=Sc(e,t,!1),i=!1;continue}if(l===2){if(i=t,e.errorRecoveryDisabledLanes&i)var u=0;else u=e.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){t=u;e:{var p=e;l=Qi;var x=p.current.memoizedState.isDehydrated;if(x&&(Jl(p,u).flags|=256),u=Sc(p,u,!1),u!==2){if(pc&&!x){p.errorRecoveryDisabledLanes|=i,bl|=i,l=4;break e}i=gn,gn=l,i!==null&&(gn===null?gn=i:gn.push.apply(gn,i))}l=u}if(i=!1,l!==2)continue}}if(l===1){Jl(e,0),Xa(e,t,0,!0);break}e:{switch(a=e,i=l,i){case 0:case 1:throw Error(d(345));case 4:if((t&4194048)!==t)break;case 6:Xa(a,t,Dn,!ja);break e;case 2:gn=null;break;case 3:case 5:break;default:throw Error(d(329))}if((t&62914560)===t&&(l=or+300-Bt(),10<l)){if(Xa(a,t,Dn,!ja),Rn(a,0,!0)!==0)break e;Ca=t,a.timeoutHandle=Mh($f.bind(null,a,n,gn,sr,gc,t,Dn,bl,Zl,ja,i,"Throttled",-0,0),l);break e}$f(a,n,gn,sr,gc,t,Dn,bl,Zl,ja,i,null,-0,0)}}break}while(!0);Pn(e)}function $f(e,t,n,a,l,i,u,p,x,R,q,X,L,H){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:sa},Gf(t,i,X);var pe=(i&62914560)===i?or-Bt():(i&4194048)===i?Kf-Bt():0;if(pe=Qm(X,pe),pe!==null){Ca=i,e.cancelPendingCommit=pe(lh.bind(null,e,t,i,n,a,l,u,p,x,q,X,null,L,H)),Xa(e,i,u,!R);return}}lh(e,t,i,n,a,l,u,p,x)}function rm(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(!wn(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 Xa(e,t,n,a){t&=~mc,t&=~bl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var i=31-Tt(l),u=1<<i;a[i]=-1,l&=~u}n!==0&&go(e,n,t)}function cr(){return(at&6)===0?(Zi(0),!1):!0}function xc(){if(Ve!==null){if(st===0)var e=Ve.return;else e=Ve,fa=cl=null,Hs(e),jl=null,Ti=0,e=Ve;for(;e!==null;)Df(e.alternate,e),e=e.return;Ve=null}}function Jl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Dm(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Ca=0,xc(),gt=e,Ve=n=ua(e.current,null),Ze=t,st=0,Mn=null,ja=!1,Kl=Fn(e,t),pc=!1,Zl=Dn=mc=bl=qa=Rt=0,gn=Qi=null,gc=!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-Tt(a),i=1<<l;t|=e[l],a&=~i}return wa=t,Ao(),n}function Wf(e,t){je=null,T.H=Bi,t===Nl||t===No?(t=fd(),st=3):t===ks?(t=fd(),st=4):st=t===Is?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Mn=t,Ve===null&&(Rt=1,Io(e,Un(t,e.current)))}function If(){var e=kn.current;return e===null?!0:(Ze&4194048)===Ze?jn===null:(Ze&62914560)===Ze||(Ze&536870912)!==0?e===jn:!1}function Pf(){var e=T.H;return T.H=Bi,e===null?Bi:e}function eh(){var e=T.A;return T.A=im,e}function ur(){Rt=4,ja||(Ze&4194048)!==Ze&&kn.current!==null||(Kl=!0),(qa&134217727)===0&&(bl&134217727)===0||gt===null||Xa(gt,Ze,Dn,!1)}function Sc(e,t,n){var a=at;at|=2;var l=Pf(),i=eh();(gt!==e||Ze!==t)&&(sr=null,Jl(e,t)),t=!1;var u=Rt;e:do try{if(st!==0&&Ve!==null){var p=Ve,x=Mn;switch(st){case 8:xc(),u=6;break e;case 3:case 2:case 9:case 6:kn.current===null&&(t=!0);var R=st;if(st=0,Mn=null,$l(e,p,x,R),n&&Kl){u=0;break e}break;default:R=st,st=0,Mn=null,$l(e,p,x,R)}}sm(),u=Rt;break}catch(q){Wf(e,q)}while(!0);return t&&e.shellSuspendCounter++,fa=cl=null,at=a,T.H=l,T.A=i,Ve===null&&(gt=null,Ze=0,Ao()),u}function sm(){for(;Ve!==null;)th(Ve)}function cm(e,t){var n=at;at|=2;var a=Pf(),l=eh();gt!==e||Ze!==t?(sr=null,rr=Bt()+500,Jl(e,t)):Kl=Fn(e,t);e:do try{if(st!==0&&Ve!==null){t=Ve;var i=Mn;t:switch(st){case 1:st=0,Mn=null,$l(e,t,i,1);break;case 2:case 9:if(ud(i)){st=0,Mn=null,nh(t);break}t=function(){st!==2&&st!==9||gt!==e||(st=7),Pn(e)},i.then(t,t);break e;case 3:st=7;break e;case 4:st=5;break e;case 7:ud(i)?(st=0,Mn=null,nh(t)):(st=0,Mn=null,$l(e,t,i,7));break;case 5:var u=null;switch(Ve.tag){case 26:u=Ve.memoizedState;case 5:case 27:var p=Ve;if(u?Yh(u):p.stateNode.complete){st=0,Mn=null;var x=p.sibling;if(x!==null)Ve=x;else{var R=p.return;R!==null?(Ve=R,dr(R)):Ve=null}break t}}st=0,Mn=null,$l(e,t,i,5);break;case 6:st=0,Mn=null,$l(e,t,i,6);break;case 8:xc(),Rt=6;break e;default:throw Error(d(462))}}um();break}catch(q){Wf(e,q)}while(!0);return fa=cl=null,T.H=a,T.A=l,at=n,Ve!==null?0:(gt=null,Ze=0,Ao(),Rt)}function um(){for(;Ve!==null&&!zt();)th(Ve)}function th(e){var t=zf(e.alternate,e,wa);e.memoizedProps=e.pendingProps,t===null?dr(e):Ve=t}function nh(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=vf(n,t,t.pendingProps,t.type,void 0,Ze);break;case 11:t=vf(n,t,t.pendingProps,t.type.render,t.ref,Ze);break;case 5:Hs(t);default:Df(n,t),t=Ve=Pu(t,wa),t=zf(n,t,wa)}e.memoizedProps=e.pendingProps,t===null?dr(e):Ve=t}function $l(e,t,n,a){fa=cl=null,Hs(t),jl=null,Ti=0;var l=t.return;try{if(I0(e,l,t,n,Ze)){Rt=1,Io(e,Un(n,e.current)),Ve=null;return}}catch(i){if(l!==null)throw Ve=l,i;Rt=1,Io(e,Un(n,e.current)),Ve=null;return}t.flags&32768?(Je||a===1?e=!0:Kl||(Ze&536870912)!==0?e=!1:(ja=e=!0,(a===2||a===9||a===3||a===6)&&(a=kn.current,a!==null&&a.tag===13&&(a.flags|=16384))),ah(t,e)):dr(t)}function dr(e){var t=e;do{if((t.flags&32768)!==0){ah(t,ja);return}e=t.return;var n=tm(t.alternate,t,wa);if(n!==null){Ve=n;return}if(t=t.sibling,t!==null){Ve=t;return}Ve=t=e}while(t!==null);Rt===0&&(Rt=5)}function ah(e,t){do{var n=nm(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);Rt=6,Ve=null}function lh(e,t,n,a,l,i,u,p,x){e.cancelPendingCommit=null;do fr();while(Vt!==0);if((at&6)!==0)throw Error(d(327));if(t!==null){if(t===e.current)throw Error(d(177));if(i=t.lanes|t.childLanes,i|=cs,Yr(e,n,i,u,p,x),e===gt&&(Ve=gt=null,Ze=0),Fl=t,Ga=e,Ca=n,yc=i,bc=l,Zf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,pm(un,function(){return ch(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=T.T,T.T=null,l=J.p,J.p=2,u=at,at|=4;try{am(e,t,n)}finally{at=u,J.p=l,T.T=a}}Vt=1,ih(),oh(),rh()}}function ih(){if(Vt===1){Vt=0;var e=Ga,t=Fl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=T.T,T.T=null;var a=J.p;J.p=2;var l=at;at|=4;try{jf(t,e);var i=_c,u=Vu(e.containerInfo),p=i.focusedElem,x=i.selectionRange;if(u!==p&&p&&p.ownerDocument&&Xu(p.ownerDocument.documentElement,p)){if(x!==null&&ls(p)){var R=x.start,q=x.end;if(q===void 0&&(q=R),"selectionStart"in p)p.selectionStart=R,p.selectionEnd=Math.min(q,p.value.length);else{var X=p.ownerDocument||document,L=X&&X.defaultView||window;if(L.getSelection){var H=L.getSelection(),pe=p.textContent.length,Te=Math.min(x.start,pe),pt=x.end===void 0?Te:Math.min(x.end,pe);!H.extend&&Te>pt&&(u=pt,pt=Te,Te=u);var M=Gu(p,Te),k=Gu(p,pt);if(M&&k&&(H.rangeCount!==1||H.anchorNode!==M.node||H.anchorOffset!==M.offset||H.focusNode!==k.node||H.focusOffset!==k.offset)){var A=X.createRange();A.setStart(M.node,M.offset),H.removeAllRanges(),Te>pt?(H.addRange(A),H.extend(k.node,k.offset)):(A.setEnd(k.node,k.offset),H.addRange(A))}}}}for(X=[],H=p;H=H.parentNode;)H.nodeType===1&&X.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<X.length;p++){var Y=X[p];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}kr=!!Lc,_c=Lc=null}finally{at=l,J.p=a,T.T=n}}e.current=t,Vt=2}}function oh(){if(Vt===2){Vt=0;var e=Ga,t=Fl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=T.T,T.T=null;var a=J.p;J.p=2;var l=at;at|=4;try{Of(e,t.alternate,t)}finally{at=l,J.p=a,T.T=n}}Vt=3}}function rh(){if(Vt===4||Vt===3){Vt=0,za();var e=Ga,t=Fl,n=Ca,a=Zf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Vt=5:(Vt=0,Fl=Ga=null,sh(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(Ya=null),fi(n),t=t.stateNode,ze&&typeof ze.onCommitFiberRoot=="function")try{ze.onCommitFiberRoot(Ge,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=T.T,l=J.p,J.p=2,T.T=null;try{for(var i=e.onRecoverableError,u=0;u<a.length;u++){var p=a[u];i(p.value,{componentStack:p.stack})}}finally{T.T=t,J.p=l}}(Ca&3)!==0&&fr(),Pn(e),l=e.pendingLanes,(n&261930)!==0&&(l&42)!==0?e===vc?Ki++:(Ki=0,vc=e):Ki=0,Zi(0)}}function sh(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Di(t)))}function fr(){return ih(),oh(),rh(),ch()}function ch(){if(Vt!==5)return!1;var e=Ga,t=yc;yc=0;var n=fi(Ca),a=T.T,l=J.p;try{J.p=32>n?32:n,T.T=null,n=bc,bc=null;var i=Ga,u=Ca;if(Vt=0,Fl=Ga=null,Ca=0,(at&6)!==0)throw Error(d(331));var p=at;if(at|=4,Vf(i.current),Yf(i,i.current,u,n),at=p,Zi(0,!1),ze&&typeof ze.onPostCommitFiberRoot=="function")try{ze.onPostCommitFiberRoot(Ge,i)}catch{}return!0}finally{J.p=l,T.T=a,sh(e,t)}}function uh(e,t,n){t=Un(n,t),t=Ws(e.stateNode,t,2),e=Ua(e,t,2),e!==null&&(tl(e,2),Pn(e))}function ct(e,t,n){if(e.tag===3)uh(e,e,n);else for(;t!==null;){if(t.tag===3){uh(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Ya===null||!Ya.has(a))){e=Un(n,e),n=df(2),a=Ua(t,n,2),a!==null&&(ff(n,a,t,e),tl(a,2),Pn(a));break}}t=t.return}}function wc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new om;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)||(pc=!0,l.add(n),e=dm.bind(null,e,t,n),t.then(e,e))}function dm(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,gt===e&&(Ze&n)===n&&(Rt===4||Rt===3&&(Ze&62914560)===Ze&&300>Bt()-or?(at&2)===0&&Jl(e,0):mc|=n,Zl===Ze&&(Zl=0)),Pn(e)}function dh(e,t){t===0&&(t=mo()),e=ol(e,t),e!==null&&(tl(e,t),Pn(e))}function fm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),dh(e,n)}function hm(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(d(314))}a!==null&&a.delete(t),dh(e,n)}function pm(e,t){return dt(e,t)}var hr=null,Wl=null,Cc=!1,pr=!1,kc=!1,Va=0;function Pn(e){e!==Wl&&e.next===null&&(Wl===null?hr=Wl=e:Wl=Wl.next=e),pr=!0,Cc||(Cc=!0,gm())}function Zi(e,t){if(!kc&&pr){kc=!0;do for(var n=!1,a=hr;a!==null;){if(e!==0){var l=a.pendingLanes;if(l===0)var i=0;else{var u=a.suspendedLanes,p=a.pingedLanes;i=(1<<31-Tt(42|e)+1)-1,i&=l&~(u&~p),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,mh(a,i))}else i=Ze,i=Rn(a,a===gt?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||Fn(a,i)||(n=!0,mh(a,i));a=a.next}while(n);kc=!1}}function mm(){fh()}function fh(){pr=Cc=!1;var e=0;Va!==0&&Mm()&&(e=Va);for(var t=Bt(),n=null,a=hr;a!==null;){var l=a.next,i=hh(a,t);i===0?(a.next=null,n===null?hr=l:n.next=l,l===null&&(Wl=n)):(n=a,(e!==0||(i&3)!==0)&&(pr=!0)),a=l}Vt!==0&&Vt!==5||Zi(e),Va!==0&&(Va=0)}function hh(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var u=31-Tt(i),p=1<<u,x=l[u];x===-1?((p&n)===0||(p&a)!==0)&&(l[u]=el(p,t)):x<=t&&(e.expiredLanes|=p),i&=~p}if(t=gt,n=Ze,n=Rn(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(st===2||st===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Qt(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Fn(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Qt(a),fi(n)){case 2:case 8:n=De;break;case 32:n=un;break;case 268435456:n=we;break;default:n=un}return a=ph.bind(null,e),n=dt(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Qt(a),e.callbackPriority=2,e.callbackNode=null,2}function ph(e,t){if(Vt!==0&&Vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(fr()&&e.callbackNode!==n)return null;var a=Ze;return a=Rn(e,e===gt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Jf(e,a,t),hh(e,Bt()),e.callbackNode!=null&&e.callbackNode===n?ph.bind(null,e):null)}function mh(e,t){if(fr())return null;Jf(e,t,!0)}function gm(){Em(function(){(at&6)!==0?dt(aa,mm):fh()})}function zc(){if(Va===0){var e=Hl;e===0&&(e=dn,dn<<=1,(dn&261888)===0&&(dn=256)),Va=e}return Va}function gh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:wo(""+e)}function yh(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function ym(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var i=gh((l[_t]||null).action),u=a.submitter;u&&(t=(t=u[_t]||null)?gh(t.formAction):u.getAttribute("formAction"),t!==null&&(i=t,u=null));var p=new Mo("action","action",null,a,l);e.push({event:p,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Va!==0){var x=u?yh(l,u):new FormData(l);Qs(n,{pending:!0,data:x,method:l.method,action:i},null,x)}}else typeof i=="function"&&(p.preventDefault(),x=u?yh(l,u):new FormData(l),Qs(n,{pending:!0,data:x,method:l.method,action:i},i,x))},currentTarget:l}]})}}for(var Mc=0;Mc<ss.length;Mc++){var Dc=ss[Mc],bm=Dc.toLowerCase(),vm=Dc[0].toUpperCase()+Dc.slice(1);Vn(bm,"on"+vm)}Vn(Zu,"onAnimationEnd"),Vn(Fu,"onAnimationIteration"),Vn(Ju,"onAnimationStart"),Vn("dblclick","onDoubleClick"),Vn("focusin","onFocus"),Vn("focusout","onBlur"),Vn(U0,"onTransitionRun"),Vn(H0,"onTransitionStart"),Vn(B0,"onTransitionCancel"),Vn($u,"onTransitionEnd"),Pe("onMouseEnter",["mouseout","mouseover"]),Pe("onMouseLeave",["mouseout","mouseover"]),Pe("onPointerEnter",["pointerout","pointerover"]),Pe("onPointerLeave",["pointerout","pointerover"]),Ie("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ie("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ie("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ie("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ie("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ie("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fi="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(" "),xm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fi));function bh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],l=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var u=a.length-1;0<=u;u--){var p=a[u],x=p.instance,R=p.currentTarget;if(p=p.listener,x!==i&&l.isPropagationStopped())break e;i=p,l.currentTarget=R;try{i(l)}catch(q){To(q)}l.currentTarget=null,i=x}else for(u=0;u<a.length;u++){if(p=a[u],x=p.instance,R=p.currentTarget,p=p.listener,x!==i&&l.isPropagationStopped())break e;i=p,l.currentTarget=R;try{i(l)}catch(q){To(q)}l.currentTarget=null,i=x}}}}function Qe(e,t){var n=t[wl];n===void 0&&(n=t[wl]=new Set);var a=e+"__bubble";n.has(a)||(vh(t,e,2,!1),n.add(a))}function Ec(e,t,n){var a=0;t&&(a|=4),vh(n,e,a,t)}var mr="_reactListening"+Math.random().toString(36).slice(2);function Tc(e){if(!e[mr]){e[mr]=!0,_e.forEach(function(n){n!=="selectionchange"&&(xm.has(n)||Ec(n,!1,e),Ec(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[mr]||(t[mr]=!0,Ec("selectionchange",!1,t))}}function vh(e,t,n,a){switch(Fh(t)){case 2:var l=Fm;break;case 8:l=Jm;break;default:l=Vc}n=l.bind(null,t,n,e),l=void 0,!Jr||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 Ac(e,t,n,a,l){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var u=a.tag;if(u===3||u===4){var p=a.stateNode.containerInfo;if(p===l)break;if(u===4)for(u=a.return;u!==null;){var x=u.tag;if((x===3||x===4)&&u.stateNode.containerInfo===l)return;u=u.return}for(;p!==null;){if(u=oa(p),u===null)return;if(x=u.tag,x===5||x===6||x===26||x===27){a=i=u;continue e}p=p.parentNode}}a=a.return}Cu(function(){var R=i,q=Zr(n),X=[];e:{var L=Wu.get(e);if(L!==void 0){var H=Mo,pe=e;switch(e){case"keypress":if(ko(n)===0)break e;case"keydown":case"keyup":H=h0;break;case"focusin":pe="focus",H=Pr;break;case"focusout":pe="blur",H=Pr;break;case"beforeblur":case"afterblur":H=Pr;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":H=Mu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=t0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=g0;break;case Zu:case Fu:case Ju:H=l0;break;case $u:H=b0;break;case"scroll":case"scrollend":H=Pp;break;case"wheel":H=x0;break;case"copy":case"cut":case"paste":H=o0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=Eu;break;case"toggle":case"beforetoggle":H=w0}var Te=(t&4)!==0,pt=!Te&&(e==="scroll"||e==="scrollend"),M=Te?L!==null?L+"Capture":null:L;Te=[];for(var k=R,A;k!==null;){var Y=k;if(A=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||A===null||M===null||(Y=gi(k,M),Y!=null&&Te.push(Ji(k,Y,A))),pt)break;k=k.return}0<Te.length&&(L=new H(L,pe,null,n,q),X.push({event:L,listeners:Te}))}}if((t&7)===0){e:{if(L=e==="mouseover"||e==="pointerover",H=e==="mouseout"||e==="pointerout",L&&n!==Kr&&(pe=n.relatedTarget||n.fromElement)&&(oa(pe)||pe[Sn]))break e;if((H||L)&&(L=q.window===q?q:(L=q.ownerDocument)?L.defaultView||L.parentWindow:window,H?(pe=n.relatedTarget||n.toElement,H=R,pe=pe?oa(pe):null,pe!==null&&(pt=m(pe),Te=pe.tag,pe!==pt||Te!==5&&Te!==27&&Te!==6)&&(pe=null)):(H=null,pe=R),H!==pe)){if(Te=Mu,Y="onMouseLeave",M="onMouseEnter",k="mouse",(e==="pointerout"||e==="pointerover")&&(Te=Eu,Y="onPointerLeave",M="onPointerEnter",k="pointer"),pt=H==null?L:le(H),A=pe==null?L:le(pe),L=new Te(Y,k+"leave",H,n,q),L.target=pt,L.relatedTarget=A,Y=null,oa(q)===R&&(Te=new Te(M,k+"enter",pe,n,q),Te.target=A,Te.relatedTarget=pt,Y=Te),pt=Y,H&&pe)t:{for(Te=Sm,M=H,k=pe,A=0,Y=M;Y;Y=Te(Y))A++;Y=0;for(var ke=k;ke;ke=Te(ke))Y++;for(;0<A-Y;)M=Te(M),A--;for(;0<Y-A;)k=Te(k),Y--;for(;A--;){if(M===k||k!==null&&M===k.alternate){Te=M;break t}M=Te(M),k=Te(k)}Te=null}else Te=null;H!==null&&xh(X,L,H,Te,!1),pe!==null&&pt!==null&&xh(X,pt,pe,Te,!0)}}e:{if(L=R?le(R):window,H=L.nodeName&&L.nodeName.toLowerCase(),H==="select"||H==="input"&&L.type==="file")var et=Hu;else if(Ou(L))if(Bu)et=L0;else{et=A0;var xe=T0}else H=L.nodeName,!H||H.toLowerCase()!=="input"||L.type!=="checkbox"&&L.type!=="radio"?R&&Qr(R.elementType)&&(et=Hu):et=R0;if(et&&(et=et(e,R))){Uu(X,et,n,q);break e}xe&&xe(e,L,R),e==="focusout"&&R&&L.type==="number"&&R.memoizedProps.value!=null&&Vr(L,"number",L.value)}switch(xe=R?le(R):window,e){case"focusin":(Ou(xe)||xe.contentEditable==="true")&&(El=xe,is=R,ki=null);break;case"focusout":ki=is=El=null;break;case"mousedown":os=!0;break;case"contextmenu":case"mouseup":case"dragend":os=!1,Qu(X,n,q);break;case"selectionchange":if(O0)break;case"keydown":case"keyup":Qu(X,n,q)}var Xe;if(ts)e:{switch(e){case"compositionstart":var Fe="onCompositionStart";break e;case"compositionend":Fe="onCompositionEnd";break e;case"compositionupdate":Fe="onCompositionUpdate";break e}Fe=void 0}else Dl?Lu(e,n)&&(Fe="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Fe="onCompositionStart");Fe&&(Tu&&n.locale!=="ko"&&(Dl||Fe!=="onCompositionStart"?Fe==="onCompositionEnd"&&Dl&&(Xe=ku()):(Ea=q,$r="value"in Ea?Ea.value:Ea.textContent,Dl=!0)),xe=gr(R,Fe),0<xe.length&&(Fe=new Du(Fe,e,null,n,q),X.push({event:Fe,listeners:xe}),Xe?Fe.data=Xe:(Xe=_u(n),Xe!==null&&(Fe.data=Xe)))),(Xe=k0?z0(e,n):M0(e,n))&&(Fe=gr(R,"onBeforeInput"),0<Fe.length&&(xe=new Du("onBeforeInput","beforeinput",null,n,q),X.push({event:xe,listeners:Fe}),xe.data=Xe)),ym(X,e,R,n,q)}bh(X,t)})}function Ji(e,t,n){return{instance:e,listener:t,currentTarget:n}}function gr(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=gi(e,n),l!=null&&a.unshift(Ji(e,l,i)),l=gi(e,t),l!=null&&a.push(Ji(e,l,i))),e.tag===3)return a;e=e.return}return[]}function Sm(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function xh(e,t,n,a,l){for(var i=t._reactName,u=[];n!==null&&n!==a;){var p=n,x=p.alternate,R=p.stateNode;if(p=p.tag,x!==null&&x===a)break;p!==5&&p!==26&&p!==27||R===null||(x=R,l?(R=gi(n,i),R!=null&&u.unshift(Ji(n,R,x))):l||(R=gi(n,i),R!=null&&u.push(Ji(n,R,x)))),n=n.return}u.length!==0&&e.push({event:t,listeners:u})}var wm=/\r\n?/g,Cm=/\u0000|\uFFFD/g;function Sh(e){return(typeof e=="string"?e:""+e).replace(wm,`
9
+ `).replace(Cm,"")}function wh(e,t){return t=Sh(t),Sh(e)===t}function ht(e,t,n,a,l,i){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||kl(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&kl(e,""+a);break;case"className":xo(e,"class",a);break;case"tabIndex":xo(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":xo(e,n,a);break;case"style":Su(e,a,i);break;case"data":if(t!=="object"){xo(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=wo(""+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"&&ht(e,t,"name",l.name,l,null),ht(e,t,"formEncType",l.formEncType,l,null),ht(e,t,"formMethod",l.formMethod,l,null),ht(e,t,"formTarget",l.formTarget,l,null)):(ht(e,t,"encType",l.encType,l,null),ht(e,t,"method",l.method,l,null),ht(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=wo(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=sa);break;case"onScroll":a!=null&&Qe("scroll",e);break;case"onScrollEnd":a!=null&&Qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(d(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(d(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=wo(""+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),vo(e,"popover",a);break;case"xlinkActuate":ra(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":ra(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":ra(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":ra(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":ra(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":ra(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":ra(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":ra(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":ra(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":vo(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=Wp.get(n)||n,vo(e,n,a))}}function Rc(e,t,n,a,l,i){switch(n){case"style":Su(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(d(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(d(60));e.innerHTML=n}}break;case"children":typeof a=="string"?kl(e,a):(typeof a=="number"||typeof a=="bigint")&&kl(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=sa);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ue.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[_t]||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,""):vo(e,n,a)}}}function $t(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 u=n[i];if(u!=null)switch(i){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:ht(e,t,i,u,n,null)}}l&&ht(e,t,"srcSet",n.srcSet,n,null),a&&ht(e,t,"src",n.src,n,null);return;case"input":Qe("invalid",e);var p=i=u=l=null,x=null,R=null;for(a in n)if(n.hasOwnProperty(a)){var q=n[a];if(q!=null)switch(a){case"name":l=q;break;case"type":u=q;break;case"checked":x=q;break;case"defaultChecked":R=q;break;case"value":i=q;break;case"defaultValue":p=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(d(137,t));break;default:ht(e,t,a,q,n,null)}}yu(e,i,p,x,R,u,l,!1);return;case"select":Qe("invalid",e),a=u=i=null;for(l in n)if(n.hasOwnProperty(l)&&(p=n[l],p!=null))switch(l){case"value":i=p;break;case"defaultValue":u=p;break;case"multiple":a=p;default:ht(e,t,l,p,n,null)}t=i,n=u,e.multiple=!!a,t!=null?Cl(e,!!a,t,!1):n!=null&&Cl(e,!!a,n,!0);return;case"textarea":Qe("invalid",e),i=l=a=null;for(u in n)if(n.hasOwnProperty(u)&&(p=n[u],p!=null))switch(u){case"value":a=p;break;case"defaultValue":l=p;break;case"children":i=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(d(91));break;default:ht(e,t,u,p,n,null)}vu(e,a,l,i);return;case"option":for(x in n)n.hasOwnProperty(x)&&(a=n[x],a!=null)&&(x==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":ht(e,t,x,a,n,null));return;case"dialog":Qe("beforetoggle",e),Qe("toggle",e),Qe("cancel",e),Qe("close",e);break;case"iframe":case"object":Qe("load",e);break;case"video":case"audio":for(a=0;a<Fi.length;a++)Qe(Fi[a],e);break;case"image":Qe("error",e),Qe("load",e);break;case"details":Qe("toggle",e);break;case"embed":case"source":case"link":Qe("error",e),Qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(R in n)if(n.hasOwnProperty(R)&&(a=n[R],a!=null))switch(R){case"children":case"dangerouslySetInnerHTML":throw Error(d(137,t));default:ht(e,t,R,a,n,null)}return;default:if(Qr(t)){for(q in n)n.hasOwnProperty(q)&&(a=n[q],a!==void 0&&Rc(e,t,q,a,n,void 0));return}}for(p in n)n.hasOwnProperty(p)&&(a=n[p],a!=null&&ht(e,t,p,a,n,null))}function km(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,u=null,p=null,x=null,R=null,q=null;for(H in n){var X=n[H];if(n.hasOwnProperty(H)&&X!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":x=X;default:a.hasOwnProperty(H)||ht(e,t,H,null,a,X)}}for(var L in a){var H=a[L];if(X=n[L],a.hasOwnProperty(L)&&(H!=null||X!=null))switch(L){case"type":i=H;break;case"name":l=H;break;case"checked":R=H;break;case"defaultChecked":q=H;break;case"value":u=H;break;case"defaultValue":p=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(d(137,t));break;default:H!==X&&ht(e,t,L,H,a,X)}}Xr(e,u,p,x,R,q,i,l);return;case"select":H=u=p=L=null;for(i in n)if(x=n[i],n.hasOwnProperty(i)&&x!=null)switch(i){case"value":break;case"multiple":H=x;default:a.hasOwnProperty(i)||ht(e,t,i,null,a,x)}for(l in a)if(i=a[l],x=n[l],a.hasOwnProperty(l)&&(i!=null||x!=null))switch(l){case"value":L=i;break;case"defaultValue":p=i;break;case"multiple":u=i;default:i!==x&&ht(e,t,l,i,a,x)}t=p,n=u,a=H,L!=null?Cl(e,!!n,L,!1):!!a!=!!n&&(t!=null?Cl(e,!!n,t,!0):Cl(e,!!n,n?[]:"",!1));return;case"textarea":H=L=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:ht(e,t,p,null,a,l)}for(u in a)if(l=a[u],i=n[u],a.hasOwnProperty(u)&&(l!=null||i!=null))switch(u){case"value":L=l;break;case"defaultValue":H=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(d(91));break;default:l!==i&&ht(e,t,u,l,a,i)}bu(e,L,H);return;case"option":for(var pe in n)L=n[pe],n.hasOwnProperty(pe)&&L!=null&&!a.hasOwnProperty(pe)&&(pe==="selected"?e.selected=!1:ht(e,t,pe,null,a,L));for(x in a)L=a[x],H=n[x],a.hasOwnProperty(x)&&L!==H&&(L!=null||H!=null)&&(x==="selected"?e.selected=L&&typeof L!="function"&&typeof L!="symbol":ht(e,t,x,L,a,H));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 Te in n)L=n[Te],n.hasOwnProperty(Te)&&L!=null&&!a.hasOwnProperty(Te)&&ht(e,t,Te,null,a,L);for(R in a)if(L=a[R],H=n[R],a.hasOwnProperty(R)&&L!==H&&(L!=null||H!=null))switch(R){case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(d(137,t));break;default:ht(e,t,R,L,a,H)}return;default:if(Qr(t)){for(var pt in n)L=n[pt],n.hasOwnProperty(pt)&&L!==void 0&&!a.hasOwnProperty(pt)&&Rc(e,t,pt,void 0,a,L);for(q in a)L=a[q],H=n[q],!a.hasOwnProperty(q)||L===H||L===void 0&&H===void 0||Rc(e,t,q,L,a,H);return}}for(var M in n)L=n[M],n.hasOwnProperty(M)&&L!=null&&!a.hasOwnProperty(M)&&ht(e,t,M,null,a,L);for(X in a)L=a[X],H=n[X],!a.hasOwnProperty(X)||L===H||L==null&&H==null||ht(e,t,X,L,a,H)}function Ch(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function zm(){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,u=l.initiatorType,p=l.duration;if(i&&p&&Ch(u)){for(u=0,p=l.responseEnd,a+=1;a<n.length;a++){var x=n[a],R=x.startTime;if(R>p)break;var q=x.transferSize,X=x.initiatorType;q&&Ch(X)&&(x=x.responseEnd,u+=q*(x<p?1:(p-R)/(x-R)))}if(--a,t+=8*(i+u)/(l.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Lc=null,_c=null;function yr(e){return e.nodeType===9?e:e.ownerDocument}function kh(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 zh(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 Oc(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 Uc=null;function Mm(){var e=window.event;return e&&e.type==="popstate"?e===Uc?!1:(Uc=e,!0):(Uc=null,!1)}var Mh=typeof setTimeout=="function"?setTimeout:void 0,Dm=typeof clearTimeout=="function"?clearTimeout:void 0,Dh=typeof Promise=="function"?Promise:void 0,Em=typeof queueMicrotask=="function"?queueMicrotask:typeof Dh<"u"?function(e){return Dh.resolve(null).then(e).catch(Tm)}:Mh;function Tm(e){setTimeout(function(){throw e})}function Qa(e){return e==="head"}function Eh(e,t){var n=t,a=0;do{var l=n.nextSibling;if(e.removeChild(n),l&&l.nodeType===8)if(n=l.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(l),ti(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")$i(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,$i(n);for(var i=n.firstChild;i;){var u=i.nextSibling,p=i.nodeName;i[nl]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=u}}else n==="body"&&$i(e.ownerDocument.body);n=l}while(n);ti(t)}function Th(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Hc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Hc(n),pi(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Am(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[nl])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=qn(e.nextSibling),e===null)break}return null}function Rm(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=qn(e.nextSibling),e===null))return null;return e}function Ah(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=qn(e.nextSibling),e===null))return null;return e}function Bc(e){return e.data==="$?"||e.data==="$~"}function Nc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Lm(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function qn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var jc=null;function Rh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return qn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Lh(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 _h(e,t,n){switch(t=yr(n),e){case"html":if(e=t.documentElement,!e)throw Error(d(452));return e;case"head":if(e=t.head,!e)throw Error(d(453));return e;case"body":if(e=t.body,!e)throw Error(d(454));return e;default:throw Error(d(451))}}function $i(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pi(e)}var Yn=new Map,Oh=new Set;function br(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ka=J.d;J.d={f:_m,r:Om,D:Um,C:Hm,L:Bm,m:Nm,X:qm,S:jm,M:Ym};function _m(){var e=ka.f(),t=cr();return e||t}function Om(e){var t=de(e);t!==null&&t.tag===5&&t.type==="form"?$d(t):ka.r(e)}var Il=typeof document>"u"?null:document;function Uh(e,t,n){var a=Il;if(a&&typeof t=="string"&&t){var l=_n(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),Oh.has(l)||(Oh.add(l),e={rel:e,crossOrigin:n,href:t},a.querySelector(l)===null&&(t=a.createElement("link"),$t(t,"link",e),ge(t),a.head.appendChild(t)))}}function Um(e){ka.D(e),Uh("dns-prefetch",e,null)}function Hm(e,t){ka.C(e,t),Uh("preconnect",e,t)}function Bm(e,t,n){ka.L(e,t,n);var a=Il;if(a&&e&&t){var l='link[rel="preload"][as="'+_n(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+_n(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+_n(n.imageSizes)+'"]')):l+='[href="'+_n(e)+'"]';var i=l;switch(t){case"style":i=Pl(e);break;case"script":i=ei(e)}Yn.has(i)||(e=z({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Yn.set(i,e),a.querySelector(l)!==null||t==="style"&&a.querySelector(Wi(i))||t==="script"&&a.querySelector(Ii(i))||(t=a.createElement("link"),$t(t,"link",e),ge(t),a.head.appendChild(t)))}}function Nm(e,t){ka.m(e,t);var n=Il;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+_n(a)+'"][href="'+_n(e)+'"]',i=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=ei(e)}if(!Yn.has(i)&&(e=z({rel:"modulepreload",href:e},t),Yn.set(i,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ii(i)))return}a=n.createElement("link"),$t(a,"link",e),ge(a),n.head.appendChild(a)}}}function jm(e,t,n){ka.S(e,t,n);var a=Il;if(a&&e){var l=me(a).hoistableStyles,i=Pl(e);t=t||"default";var u=l.get(i);if(!u){var p={loading:0,preload:null};if(u=a.querySelector(Wi(i)))p.loading=5;else{e=z({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Yn.get(i))&&qc(e,n);var x=u=a.createElement("link");ge(x),$t(x,"link",e),x._p=new Promise(function(R,q){x.onload=R,x.onerror=q}),x.addEventListener("load",function(){p.loading|=1}),x.addEventListener("error",function(){p.loading|=2}),p.loading|=4,vr(u,t,a)}u={type:"stylesheet",instance:u,count:1,state:p},l.set(i,u)}}}function qm(e,t){ka.X(e,t);var n=Il;if(n&&e){var a=me(n).hoistableScripts,l=ei(e),i=a.get(l);i||(i=n.querySelector(Ii(l)),i||(e=z({src:e,async:!0},t),(t=Yn.get(l))&&Yc(e,t),i=n.createElement("script"),ge(i),$t(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(l,i))}}function Ym(e,t){ka.M(e,t);var n=Il;if(n&&e){var a=me(n).hoistableScripts,l=ei(e),i=a.get(l);i||(i=n.querySelector(Ii(l)),i||(e=z({src:e,async:!0,type:"module"},t),(t=Yn.get(l))&&Yc(e,t),i=n.createElement("script"),ge(i),$t(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(l,i))}}function Hh(e,t,n,a){var l=(l=Ee.current)?br(l):null;if(!l)throw Error(d(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Pl(n.href),n=me(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=Pl(n.href);var i=me(l).hoistableStyles,u=i.get(e);if(u||(l=l.ownerDocument||l,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,u),(i=l.querySelector(Wi(e)))&&!i._p&&(u.instance=i,u.state.loading=5),Yn.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},Yn.set(e,n),i||Gm(l,e,n,u.state))),t&&a===null)throw Error(d(528,""));return u}if(t&&a!==null)throw Error(d(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ei(n),n=me(l).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(d(444,e))}}function Pl(e){return'href="'+_n(e)+'"'}function Wi(e){return'link[rel="stylesheet"]['+e+"]"}function Bh(e){return z({},e,{"data-precedence":e.precedence,precedence:null})}function Gm(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}),$t(t,"link",n),ge(t),e.head.appendChild(t))}function ei(e){return'[src="'+_n(e)+'"]'}function Ii(e){return"script[async]"+e}function Nh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+_n(n.href)+'"]');if(a)return t.instance=a,ge(a),a;var l=z({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ge(a),$t(a,"style",l),vr(a,n.precedence,e),t.instance=a;case"stylesheet":l=Pl(n.href);var i=e.querySelector(Wi(l));if(i)return t.state.loading|=4,t.instance=i,ge(i),i;a=Bh(n),(l=Yn.get(l))&&qc(a,l),i=(e.ownerDocument||e).createElement("link"),ge(i);var u=i;return u._p=new Promise(function(p,x){u.onload=p,u.onerror=x}),$t(i,"link",a),t.state.loading|=4,vr(i,n.precedence,e),t.instance=i;case"script":return i=ei(n.src),(l=e.querySelector(Ii(i)))?(t.instance=l,ge(l),l):(a=n,(l=Yn.get(i))&&(a=z({},n),Yc(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),ge(l),$t(l,"link",a),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(d(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,vr(a,n.precedence,e));return t.instance}function vr(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,u=0;u<a.length;u++){var p=a[u];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 qc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Yc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var xr=null;function jh(e,t,n){if(xr===null){var a=new Map,l=xr=new Map;l.set(n,a)}else l=xr,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[nl]||i[Mt]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var u=i.getAttribute(t)||"";u=e+u;var p=a.get(u);p?p.push(i):a.set(u,[i])}}return a}function qh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Xm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Yh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Vm(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=Pl(a.href),i=t.querySelector(Wi(l));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Sr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,ge(i);return}i=t.ownerDocument||t,a=Bh(a),(l=Yn.get(l))&&qc(a,l),i=i.createElement("link"),ge(i);var u=i;u._p=new Promise(function(p,x){u.onload=p,u.onerror=x}),$t(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=Sr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Gc=0;function Qm(e,t){return e.stylesheets&&e.count===0&&Cr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&Cr(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Gc===0&&(Gc=62500*zm());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Cr(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Gc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function Sr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Cr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var wr=null;function Cr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,wr=new Map,t.forEach(Km,e),wr=null,Sr.call(e))}function Km(e,t){if(!(t.state.loading&4)){var n=wr.get(e);if(n)var a=n.get(null);else{n=new Map,wr.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<l.length;i++){var u=l[i];(u.nodeName==="LINK"||u.getAttribute("media")!=="not all")&&(n.set(u.dataset.precedence,u),a=u)}a&&n.set(null,a)}l=t.instance,u=l.getAttribute("data-precedence"),i=n.get(u)||a,i===a&&n.set(null,l),n.set(u,l),this.count++,a=Sr.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 Pi={$$typeof:ne,Provider:null,Consumer:null,_currentValue:F,_currentValue2:F,_threadCount:0};function Zm(e,t,n,a,l,i,u,p,x){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ui(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ui(0),this.hiddenUpdates=ui(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=i,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function Gh(e,t,n,a,l,i,u,p,x,R,q,X){return e=new Zm(e,t,n,u,x,R,q,X,p),t=1,i===!0&&(t|=24),i=Cn(3,null,null,t),e.current=i,i.stateNode=e,t=Ss(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:n,cache:t},zs(i),e}function Xh(e){return e?(e=Rl,e):Rl}function Vh(e,t,n,a,l,i){l=Xh(l),a.context===null?a.context=l:a.pendingContext=l,a=Oa(t),a.payload={element:n},i=i===void 0?null:i,i!==null&&(a.callback=i),n=Ua(e,a,t),n!==null&&(yn(n,e,t),Ri(n,e,t))}function Qh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Xc(e,t){Qh(e,t),(e=e.alternate)&&Qh(e,t)}function Kh(e){if(e.tag===13||e.tag===31){var t=ol(e,67108864);t!==null&&yn(t,e,67108864),Xc(e,67108864)}}function Zh(e){if(e.tag===13||e.tag===31){var t=En();t=ia(t);var n=ol(e,t);n!==null&&yn(n,e,t),Xc(e,t)}}var kr=!0;function Fm(e,t,n,a){var l=T.T;T.T=null;var i=J.p;try{J.p=2,Vc(e,t,n,a)}finally{J.p=i,T.T=l}}function Jm(e,t,n,a){var l=T.T;T.T=null;var i=J.p;try{J.p=8,Vc(e,t,n,a)}finally{J.p=i,T.T=l}}function Vc(e,t,n,a){if(kr){var l=Qc(a);if(l===null)Ac(e,t,a,zr,n),Jh(e,a);else if(Wm(l,e,t,n,a))a.stopPropagation();else if(Jh(e,a),t&4&&-1<$m.indexOf(e)){for(;l!==null;){var i=de(l);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var u=Gn(i.pendingLanes);if(u!==0){var p=i;for(p.pendingLanes|=2,p.entangledLanes|=2;u;){var x=1<<31-Tt(u);p.entanglements[1]|=x,u&=~x}Pn(i),(at&6)===0&&(rr=Bt()+500,Zi(0))}}break;case 31:case 13:p=ol(i,2),p!==null&&yn(p,i,2),cr(),Xc(i,2)}if(i=Qc(a),i===null&&Ac(e,t,a,zr,n),i===l)break;l=i}l!==null&&a.stopPropagation()}else Ac(e,t,a,null,n)}}function Qc(e){return e=Zr(e),Kc(e)}var zr=null;function Kc(e){if(zr=null,e=oa(e),e!==null){var t=m(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=w(t),e!==null)return e;e=null}else if(n===31){if(e=D(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return zr=e,null}function Fh(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(xn()){case aa:return 2;case De:return 8;case un:case Le:return 32;case we:return 268435456;default:return 32}default:return 32}}var Zc=!1,Ka=null,Za=null,Fa=null,eo=new Map,to=new Map,Ja=[],$m="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Jh(e,t){switch(e){case"focusin":case"focusout":Ka=null;break;case"dragenter":case"dragleave":Za=null;break;case"mouseover":case"mouseout":Fa=null;break;case"pointerover":case"pointerout":eo.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":to.delete(t.pointerId)}}function no(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=de(t),t!==null&&Kh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Wm(e,t,n,a,l){switch(t){case"focusin":return Ka=no(Ka,e,t,n,a,l),!0;case"dragenter":return Za=no(Za,e,t,n,a,l),!0;case"mouseover":return Fa=no(Fa,e,t,n,a,l),!0;case"pointerover":var i=l.pointerId;return eo.set(i,no(eo.get(i)||null,e,t,n,a,l)),!0;case"gotpointercapture":return i=l.pointerId,to.set(i,no(to.get(i)||null,e,t,n,a,l)),!0}return!1}function $h(e){var t=oa(e.target);if(t!==null){var n=m(t);if(n!==null){if(t=n.tag,t===13){if(t=w(n),t!==null){e.blockedOn=t,Xn(e.priority,function(){Zh(n)});return}}else if(t===31){if(t=D(n),t!==null){e.blockedOn=t,Xn(e.priority,function(){Zh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Mr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Qc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Kr=a,n.target.dispatchEvent(a),Kr=null}else return t=de(n),t!==null&&Kh(t),e.blockedOn=n,!1;t.shift()}return!0}function Wh(e,t,n){Mr(e)&&n.delete(t)}function Im(){Zc=!1,Ka!==null&&Mr(Ka)&&(Ka=null),Za!==null&&Mr(Za)&&(Za=null),Fa!==null&&Mr(Fa)&&(Fa=null),eo.forEach(Wh),to.forEach(Wh)}function Dr(e,t){e.blockedOn===t&&(e.blockedOn=null,Zc||(Zc=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Im)))}var Er=null;function Ih(e){Er!==e&&(Er=e,o.unstable_scheduleCallback(o.unstable_NormalPriority,function(){Er===e&&(Er=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(Kc(a||n)===null)continue;break}var i=de(n);i!==null&&(e.splice(t,3),t-=3,Qs(i,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function ti(e){function t(x){return Dr(x,e)}Ka!==null&&Dr(Ka,e),Za!==null&&Dr(Za,e),Fa!==null&&Dr(Fa,e),eo.forEach(t),to.forEach(t);for(var n=0;n<Ja.length;n++){var a=Ja[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ja.length&&(n=Ja[0],n.blockedOn===null);)$h(n),n.blockedOn===null&&Ja.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],u=l[_t]||null;if(typeof i=="function")u||Ih(n);else if(u){var p=null;if(i&&i.hasAttribute("formAction")){if(l=i,u=i[_t]||null)p=u.formAction;else if(Kc(l)!==null)continue}else p=u.action;typeof p=="function"?n[a+1]=p:(n.splice(a,3),a-=3),Ih(n)}}}function Ph(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(u){return l=u})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var 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 Fc(e){this._internalRoot=e}Tr.prototype.render=Fc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(d(409));var n=t.current,a=En();Vh(n,a,e,t,null,null)},Tr.prototype.unmount=Fc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Vh(e.current,2,null,e,null,null),cr(),t[Sn]=null}};function Tr(e){this._internalRoot=e}Tr.prototype.unstable_scheduleHydration=function(e){if(e){var t=bo();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ja.length&&t!==0&&t<Ja[n].priority;n++);Ja.splice(n,0,e),n===0&&$h(e)}};var ep=s.version;if(ep!=="19.2.4")throw Error(d(527,ep,"19.2.4"));J.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(d(188)):(e=Object.keys(e).join(","),Error(d(268,e)));return e=g(t),e=e!==null?E(e):null,e=e===null?null:e.stateNode,e};var Pm={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ar=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ar.isDisabled&&Ar.supportsFiber)try{Ge=Ar.inject(Pm),ze=Ar}catch{}}return io.createRoot=function(e,t){if(!h(e))throw Error(d(299));var n=!1,a="",l=rf,i=sf,u=cf;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(u=t.onRecoverableError)),t=Gh(e,1,!1,null,null,n,a,null,l,i,u,Ph),e[Sn]=t.current,Tc(e),new Fc(t)},io.hydrateRoot=function(e,t,n){if(!h(e))throw Error(d(299));var a=!1,l="",i=rf,u=sf,p=cf,x=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(l=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(u=n.onCaughtError),n.onRecoverableError!==void 0&&(p=n.onRecoverableError),n.formState!==void 0&&(x=n.formState)),t=Gh(e,1,!0,t,n??null,a,l,x,i,u,p,Ph),t.context=Xh(null),n=t.current,a=En(),a=ia(a),l=Oa(a),l.callback=null,Ua(n,l,a),n=a,t.current.lanes=n,tl(t,n),Pn(t),e[Sn]=t.current,Tc(e),new Tr(t)},io.version="19.2.4",io}var xp;function i1(){if(xp)return eu.exports;xp=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(s){console.error(s)}}return o(),eu.exports=l1(),eu.exports}var o1=i1(),Sp=function(s,f){var d=arguments;if(f==null||!po.call(f,"css"))return v.createElement.apply(void 0,d);var h=d.length,m=new Array(h);m[0]=hu,m[1]=fu(s,f);for(var w=2;w<h;w++)m[w]=d[w];return v.createElement.apply(null,m)};(function(o){var s;s||(s=o.JSX||(o.JSX={}))})(Sp||(Sp={}));function y(){for(var o=arguments.length,s=new Array(o),f=0;f<o;f++)s[f]=arguments[f];return Bp(s)}function ln(){var o=y.apply(void 0,arguments),s="animation-"+o.name;return{name:s,styles:"@keyframes "+s+"{"+o.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const r1={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},s1={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:r1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestDownload:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},deleteOrphans:async()=>{}},jp=v.createContext(s1);function ri(){return v.useContext(jp)}const ci="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Ubuntu, sans-serif",c={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",shadow:"rgba(50, 50, 93, 0.1)",imagesFolder:"#8b5cf6",hover:"#e8ecf0"},B={xs:"13px",sm:"14px",base:"16px",lg:"19px",xl:"22px"},Sl=y("font-family:",ci,";font-size:",B.base,";line-height:1.5;color:",c.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;}",""),c1=ln`
10
+ from { opacity: 0; }
11
+ to { opacity: 1; }
12
+ `,u1=ln`
13
+ from {
14
+ opacity: 0;
15
+ transform: translateY(-8px) scale(0.98);
16
+ }
17
+ to {
18
+ opacity: 1;
19
+ transform: translateY(0) scale(1);
20
+ }
21
+ `,d1=ln`
22
+ from { transform: rotate(0deg); }
23
+ to { transform: rotate(360deg); }
24
+ `,Oe={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:",ci,";",""),modal:y(Sl," background-color:",c.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:",u1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",B.lg,";font-weight:600;color:",c.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"5e7rpo",styles:"padding:12px 24px 24px"},message:y("font-size:",B.base,";color:",c.textSecondary,";margin:0;line-height:1.6;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",c.border,";background-color:",c.background,";",""),btn:y("padding:10px 18px;font-size:",B.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",c.surface,";border:1px solid ",c.border,";color:",c.text,";&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),btnConfirm:y("background-color:",c.primary,";border:1px solid ",c.primary,";color:white;&:hover{background-color:",c.primaryHover,";border-color:",c.primaryHover,";}",""),btnDanger:y("background-color:",c.danger,";border:1px solid ",c.danger,";color:white;&:hover{background-color:",c.dangerHover,";border-color:",c.dangerHover,";}","")};function ro({title:o,message:s,confirmLabel:f="Confirm",cancelLabel:d="Cancel",variant:h="default",onConfirm:m,onCancel:w}){return r("div",{css:Oe.overlay,onClick:w,children:b("div",{css:Oe.modal,onClick:D=>D.stopPropagation(),children:[r("div",{css:Oe.header,children:r("h3",{css:Oe.title,children:o})}),r("div",{css:Oe.body,children:r("p",{css:Oe.message,children:s})}),b("div",{css:Oe.footer,children:[r("button",{css:[Oe.btn,Oe.btnCancel,"",""],onClick:w,children:d}),r("button",{css:[Oe.btn,h==="danger"?Oe.btnDanger:Oe.btnConfirm,"",""],onClick:m,children:f})]})]})})}const f1={input:y("width:100%;padding:10px 12px;font-size:",B.base,";border:1px solid ",c.border,";border-radius:6px;background:",c.surface,";color:",c.text,";margin-top:12px;transition:all 0.15s ease;&:focus{outline:none;border-color:",c.primary,";box-shadow:0 0 0 2px ",c.primaryLight,";}&::placeholder{color:",c.textMuted,";}","")};function Ur({title:o,message:s,inputLabel:f,defaultValue:d="",placeholder:h,confirmLabel:m="Confirm",cancelLabel:w="Cancel",isLoading:D=!1,loadingLabel:C="Processing...",onConfirm:g,onCancel:E}){const[z,_]=rt.useState(d),N=O=>{O.preventDefault(),z.trim()&&!D&&g(z.trim())};return r("div",{css:Oe.overlay,onClick:D?void 0:E,children:r("div",{css:Oe.modal,onClick:O=>O.stopPropagation(),children:b("form",{onSubmit:N,children:[r("div",{css:Oe.header,children:r("h3",{css:Oe.title,children:o})}),b("div",{css:Oe.body,children:[s&&r("p",{css:Oe.message,children:s}),f&&r("label",{css:Oe.message,children:f}),r("input",{css:f1.input,type:"text",value:z,onChange:O=>_(O.target.value),placeholder:h,autoFocus:!0,disabled:D})]}),b("div",{css:Oe.footer,children:[r("button",{type:"button",css:[Oe.btn,Oe.btnCancel,"",""],onClick:E,disabled:D,children:w}),r("button",{type:"submit",css:[Oe.btn,Oe.btnConfirm,"",""],disabled:!z.trim()||D,children:D?b(nt,{children:[r("span",{css:y("display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:",d1," 0.75s linear infinite;margin-right:6px;","")}),C]}):m})]})]})})})}function pu({title:o,message:s,buttonLabel:f="OK",onClose:d}){return r("div",{css:Oe.overlay,onClick:d,children:b("div",{css:Oe.modal,onClick:h=>h.stopPropagation(),children:[r("div",{css:Oe.header,children:r("h3",{css:Oe.title,children:o})}),r("div",{css:Oe.body,children:r("p",{css:Oe.message,children:s})}),r("div",{css:Oe.footer,children:r("button",{css:[Oe.btn,Oe.btnConfirm,"",""],onClick:d,children:f})})]})})}const Wa={progressContainer:{name:"yz1nei",styles:"margin-top:16px"},progressBar:y("width:100%;height:8px;background-color:",c.background,";border-radius:4px;overflow:hidden;margin-bottom:12px;",""),progressFill:y("height:100%;background:linear-gradient(90deg, ",c.primary,", ",c.primaryHover,");border-radius:4px;transition:width 0.3s ease;",""),progressText:y("font-size:",B.sm,";color:",c.textSecondary,";margin:0;display:flex;justify-content:space-between;align-items:center;",""),currentFile:y("font-size:",B.xs,";color:",c.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:",B.xs,";color:#991b1b;margin:0 0 4px;&:last-child{margin-bottom:0;}","")};function xl({title:o,progress:s,onClose:f,onDeleteOrphans:d,onStop:h}){const m=s.status==="complete",w=s.status==="error",D=s.status==="stopped",C=s.status==="stopping",g=m||w||D,E=!g||C;return r("div",{css:Oe.overlay,children:b("div",{css:Oe.modal,onClick:z=>z.stopPropagation(),children:[r("div",{css:Oe.header,children:r("h3",{css:Oe.title,children:o})}),r("div",{css:Oe.body,children:w?r("p",{css:Oe.message,children:s.message||"An error occurred"}):D?b("p",{css:Oe.message,children:["Processing stopped. Processed ",s.processed??s.current," image",(s.processed??s.current)!==1?"s":""," before stopping."]}):m?b(nt,{children:[b("p",{css:Oe.message,children:[s.message?s.message:s.isDelete?b(nt,{children:["Deleted ",s.processed," file",s.processed!==1?"s":"",".",s.errors!==void 0&&s.errors>0?b(nt,{children:[" ",s.errors," error",s.errors!==1?"s":""," occurred."]}):null]}):s.isMove?b(nt,{children:["Moved ",s.processed," file",s.processed!==1?"s":"",".",s.errors!==void 0&&s.errors>0?b(nt,{children:[" ",s.errors," error",s.errors!==1?"s":""," occurred."]}):null]}):s.isScan?b(nt,{children:[s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?b(nt,{children:[s.alreadyProcessed," image",s.alreadyProcessed!==1?"s":""," already exist. "]}):null,"Scanned ",s.processed," new image",s.processed!==1?"s":"",".",s.orphanedEntries!==void 0&&s.orphanedEntries>0?b(nt,{children:[" Removed ",s.orphanedEntries," orphaned entr",s.orphanedEntries!==1?"ies":"y","."]}):null,s.pendingUpdates!==void 0&&s.pendingUpdates>0?b(nt,{children:[" ",s.pendingUpdates," file",s.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):b(nt,{children:["Processed ",s.processed," new image",s.processed!==1?"s":"",".",s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?b(nt,{children:[" ",s.alreadyProcessed," already processed."]}):null]}),s.orphansRemoved!==void 0&&s.orphansRemoved>0?b(nt,{children:[" Removed ",s.orphansRemoved," orphaned thumbnail",s.orphansRemoved!==1?"s":"","."]}):null]}),s.errorMessages&&s.errorMessages.length>0&&b("div",{css:Wa.errorList,children:[s.errorMessages.slice(0,10).map((z,_)=>r("p",{css:Wa.errorItem,children:z},_)),s.errorMessages.length>10&&b("p",{css:Wa.errorItem,children:["...and ",s.errorMessages.length-10," more"]})]})]}):b(nt,{children:[r("p",{css:Oe.message,children:s.status==="cleanup"?s.message||"Cleaning up...":s.message||"Processing..."}),b("div",{css:Wa.progressContainer,children:[r("div",{css:Wa.progressBar,children:r("div",{css:Wa.progressFill,style:{width:`${s.percent}%`}})}),b("div",{css:Wa.progressText,children:[b("span",{children:[s.current," of ",s.total]}),b("span",{children:[s.percent,"%"]})]}),s.currentFile&&r("p",{css:Wa.currentFile,title:s.currentFile,children:s.currentFile})]})]})}),b("div",{css:Oe.footer,children:[E&&h&&r("button",{css:[Oe.btn,Oe.btnDanger,"",""],onClick:h,disabled:s.status==="stopping",children:s.status==="stopping"?"Stopping...":"Stop"}),g&&s.orphanedFiles&&s.orphanedFiles.length>0&&d&&b("button",{css:[Oe.btn,Oe.btnDanger,"",""],onClick:d,children:["Delete ",s.orphanedFiles.length," Orphan",s.orphanedFiles.length!==1?"s":""]}),g&&r("button",{css:[Oe.btn,Oe.btnConfirm,"",""],onClick:f,children:"Done"})]})]})})}function qp(o){const{setShowProgress:s,setProgressTitle:f,setProgressState:d,triggerRefresh:h}=o,m=v.useRef(null),w=v.useRef(!1),D=v.useRef(!1),C=v.useRef(null),g=v.useCallback(()=>{m.current&&m.current.abort()},[]);return{execute:v.useCallback(async z=>{const{endpoint:_,body:N,title:O,operationType:G,onComplete:ie,onError:Q}=z;if(w.current){console.warn("Streaming operation already in progress");return}w.current=!0,D.current=!1;const ne=`${_.split("/").pop()?.replace("-stream","")||"op"}-${Date.now()}-${Math.random().toString(36).slice(2)}`;C.current=ne;const ue=new AbortController;m.current=ue;const V=async()=>{D.current=!0,d(P=>({...P,status:"stopping"}));try{await fetch("/api/studio/cancel-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationId:ne})})}catch{}};ue.signal.addEventListener("abort",V),f(O),s(!0),d({current:0,total:0,percent:0,status:"processing",message:`Starting ${O.toLowerCase()}...`});try{const P=await fetch(_,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...N,operationId:ne})});if(!P.ok){const K=await P.json().catch(()=>({}));throw new Error(K.error||`Request failed: ${P.status}`)}if(!P.body)throw new Error("No response body");const I=P.body.getReader(),te=new TextDecoder;let j="";try{for(;;){const{done:K,value:fe}=await I.read();if(K)break;j+=te.decode(fe,{stream:!0});const $=j.split(`
25
+
26
+ `);j=$.pop()||"";for(const ae of $)if(ae.startsWith("data: "))try{const W=JSON.parse(ae.slice(6));if(W.type==="start")d(ve=>({...ve,total:W.total||ve.total}));else if(W.type==="progress")d({current:W.current||0,total:W.total||0,percent:W.percent||Math.round((W.current||0)/(W.total||1)*100),status:"processing",currentFile:W.currentFile,message:W.message});else if(W.type==="cleanup")d(ve=>({...ve,status:"cleanup",message:W.message}));else if(W.type==="complete"){const ve=W.cancelled===!0,T=W.processed??W.moved??W.renamed??W.pushed??W.downloaded??W.added??W.imported??W.deleted??W.current??0;d({current:T,total:T,percent:100,status:ve?"stopped":W.errors&&W.errors>0?"error":"complete",message:W.message,processed:T,errors:W.errors,orphanedFiles:W.orphanedFiles,isDelete:G==="delete",isMove:G==="move",isScan:G==="scan"}),h(),ie?.(W)}else W.type==="error"&&(d(ve=>({...ve,status:"error",message:W.message})),Q?.(W.message||"Unknown error"))}catch{}}}catch(K){if(!D.current)throw K}finally{ue.signal.removeEventListener("abort",V)}}catch(P){if(!D.current){const I=P instanceof Error?P.message:"Operation failed";console.error(`${O} error:`,P),d({current:0,total:0,percent:0,status:"error",message:I}),Q?.(I)}}finally{w.current=!1,m.current=null,C.current=null}},[s,f,d,h]),stop:g,get isRunning(){return w.current}}}const h1=ln`
27
+ from { opacity: 0; }
28
+ to { opacity: 1; }
29
+ `,p1=ln`
30
+ from {
31
+ opacity: 0;
32
+ transform: translateY(-8px) scale(0.98);
33
+ }
34
+ to {
35
+ opacity: 1;
36
+ transform: translateY(0) scale(1);
37
+ }
38
+ `,Lt={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:",h1," 0.15s ease-out;font-family:",ci,";",""),modal:y(Sl," background-color:",c.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:",p1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",B.lg,";font-weight:600;color:",c.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:",B.base,";color:",c.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:",c.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 ",c.textSecondary,";}&::after{content:'';position:absolute;left:8px;top:50%;width:8px;height:0;border-top:1px dashed ",c.textSecondary,";}",""),folderItemSelected:y("background-color:",c.primaryLight,";border-color:",c.primary,";&:hover{background-color:",c.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:",B.base,";color:",c.text,";flex:1;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",c.border,";background-color:",c.background,";",""),btn:y("padding:10px 18px;font-size:",B.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",c.surface,";border:1px solid ",c.border,";color:",c.text,";&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),btnConfirm:y("background-color:",c.primary,";border:1px solid ",c.primary,";color:white;&:hover:not(:disabled){background-color:",c.primaryHover,";border-color:",c.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),loading:y("display:flex;align-items:center;justify-content:center;padding:40px;color:",c.textSecondary,";",""),spinner:y("width:24px;height:24px;border-radius:50%;border:3px solid ",c.border,";border-top-color:",c.primary,";animation:spin 0.8s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}","")};function Yp({selectedItems:o,currentPath:s,onMove:f,onCancel:d}){const[h,m]=v.useState([]),[w,D]=v.useState(!0),[C,g]=v.useState(null);v.useEffect(()=>{async function O(){try{const G=await fetch("/api/studio/list-folders");if(G.ok){const ie=await G.json();console.log("Loaded folders:",ie),m(ie.folders||[])}else console.error("Failed to load folders:",G.status,await G.text())}catch(G){console.error("Failed to load folders:",G)}finally{D(!1)}}O()},[]);const E=Array.from(o),z=h.filter(O=>!E.some(G=>O.path===G||O.path.startsWith(G+"/"))),_=O=>O===s,N=()=>{C&&f(C)};return r("div",{css:Lt.overlay,onClick:d,children:b("div",{css:Lt.modal,onClick:O=>O.stopPropagation(),children:[r("div",{css:Lt.header,children:r("h3",{css:Lt.title,children:"Move Items"})}),b("div",{css:Lt.body,children:[b("p",{css:Lt.message,children:["Select a destination folder for ",o.size," item",o.size!==1?"s":"",":"]}),w?r("div",{css:Lt.loading,children:r("div",{css:Lt.spinner})}):z.length===0?r("div",{css:Lt.loading,children:"No available folders to move to."}):r("div",{css:Lt.folderList,children:z.map(O=>{const G=_(O.path);return b("div",{css:[Lt.folderItem,C===O.path&&Lt.folderItemSelected,G&&Lt.folderItemDisabled,"",""],style:{paddingLeft:12},onClick:()=>!G&&g(O.path),children:[O.depth>0&&r("div",{css:Lt.treeIndent,children:Array.from({length:O.depth}).map((ie,Q)=>r("div",{css:Lt.treeLine},Q))}),r("svg",{css:Lt.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),b("span",{css:Lt.folderName,children:[O.name,G&&" (current)"]})]},O.path)})})]}),b("div",{css:Lt.footer,children:[r("button",{css:[Lt.btn,Lt.btnCancel,"",""],onClick:d,children:"Cancel"}),r("button",{css:[Lt.btn,Lt.btnConfirm,"",""],onClick:N,disabled:!C,children:"Move Here"})]})]})})}const m1=`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`,ye={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:",c.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 ",c.border,";",""),icon:y("width:32px;height:32px;color:",c.primary,";flex-shrink:0;",""),title:y("font-size:",B.xl,";font-weight:600;color:",c.text,";margin:0;",""),closeBtn:y("margin-left:auto;background:none;border:none;padding:4px;cursor:pointer;color:",c.textMuted,";border-radius:4px;&:hover{color:",c.text,";background:",c.surfaceHover,";}",""),closeIcon:{name:"1aynuae",styles:"width:20px;height:20px"},content:{name:"vxuddk",styles:"padding:24px"},intro:y("font-size:",B.base,";color:",c.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:",c.primaryLight,";color:",c.primary,";font-size:",B.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:",B.base,";font-weight:500;color:",c.text,";margin:0 0 4px 0;",""),stepDesc:y("font-size:",B.sm,";color:",c.textSecondary,";margin:0;line-height:1.5;",""),link:y("color:",c.primary,";text-decoration:none;font-weight:500;&:hover{text-decoration:underline;}",""),envVarsWrapper:{name:"1ksolcl",styles:"position:relative;margin-top:20px"},envVars:y("background:",c.background,";border:1px solid ",c.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:",c.text,";overflow-x:auto;",""),envVar:{name:"4zleql",styles:"display:block"},envKey:y("color:",c.primary,";",""),envValue:y("color:",c.textSecondary,";",""),copyBtn:y("position:absolute;top:8px;right:8px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;cursor:pointer;color:",c.textMuted,";transition:all 0.15s ease;&:hover{background:",c.surfaceHover,";color:",c.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 ",c.border,";display:flex;justify-content:flex-end;gap:12px;",""),docsBtn:y("padding:10px 16px;border-radius:6px;font-size:",B.base,";font-weight:500;border:1px solid ",c.border,";background:",c.surface,";color:",c.text,";cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:all 0.15s ease;&:hover{background:",c.surfaceHover,";border-color:#d0d5dd;}",""),doneBtn:y("padding:10px 20px;border-radius:6px;font-size:",B.base,";font-weight:500;border:none;background:",c.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",c.primaryHover,";}",""),externalIcon:{name:"1djxupe",styles:"width:14px;height:14px"}};function Gp({isOpen:o,onClose:s}){const[f,d]=v.useState(!1),h=async()=>{try{await navigator.clipboard.writeText(m1),d(!0),setTimeout(()=>d(!1),2e3)}catch(m){console.error("Failed to copy:",m)}};return o?r("div",{css:ye.overlay,onClick:s,children:b("div",{css:ye.modal,onClick:m=>m.stopPropagation(),children:[b("div",{css:ye.header,children:[r("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),r("h2",{css:ye.title,children:"Set Up CDN Storage"}),r("button",{css:ye.closeBtn,onClick:s,children:r("svg",{css:ye.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:ye.content,children:[r("p",{css:ye.intro,children:"Sync your images to Cloudflare R2 for faster global delivery. R2 offers generous free tier with no egress fees."}),b("ol",{css:ye.steps,children:[b("li",{css:ye.step,children:[r("span",{css:ye.stepNumber,children:"1"}),b("div",{css:ye.stepContent,children:[r("h4",{css:ye.stepTitle,children:"Create a Cloudflare account"}),b("p",{css:ye.stepDesc,children:["Sign up at"," ",r("a",{css:ye.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:ye.step,children:[r("span",{css:ye.stepNumber,children:"2"}),b("div",{css:ye.stepContent,children:[r("h4",{css:ye.stepTitle,children:"Create an R2 bucket"}),b("p",{css:ye.stepDesc,children:["Go to R2 in your Cloudflare dashboard and create a new bucket. Choose a name like ",r("code",{children:"my-images"}),"."]})]})]}),b("li",{css:ye.step,children:[r("span",{css:ye.stepNumber,children:"3"}),b("div",{css:ye.stepContent,children:[r("h4",{css:ye.stepTitle,children:"Enable public access"}),b("p",{css:ye.stepDesc,children:['In bucket settings, enable "Public Access" and copy the public URL (e.g., ',r("code",{children:"https://pub-xxx.r2.dev"}),")."]})]})]}),b("li",{css:ye.step,children:[r("span",{css:ye.stepNumber,children:"4"}),b("div",{css:ye.stepContent,children:[r("h4",{css:ye.stepTitle,children:"Create API token"}),r("p",{css:ye.stepDesc,children:'Go to R2 → Manage R2 API Tokens → Create API Token. Select "Object Read & Write" permissions for your bucket.'})]})]}),b("li",{css:ye.step,children:[r("span",{css:ye.stepNumber,children:"5"}),b("div",{css:ye.stepContent,children:[r("h4",{css:ye.stepTitle,children:"Add environment variables"}),b("p",{css:ye.stepDesc,children:["Add these to your ",r("code",{children:".env.local"})," file:"]})]})]})]}),b("div",{css:ye.envVarsWrapper,children:[b("div",{css:ye.envVars,children:[b("span",{css:ye.envVar,children:[r("span",{css:ye.envKey,children:"CLOUDFLARE_R2_ACCOUNT_ID"}),"=",r("span",{css:ye.envValue,children:"your_account_id"})]}),b("span",{css:ye.envVar,children:[r("span",{css:ye.envKey,children:"CLOUDFLARE_R2_ACCESS_KEY_ID"}),"=",r("span",{css:ye.envValue,children:"your_access_key"})]}),b("span",{css:ye.envVar,children:[r("span",{css:ye.envKey,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY"}),"=",r("span",{css:ye.envValue,children:"your_secret_key"})]}),b("span",{css:ye.envVar,children:[r("span",{css:ye.envKey,children:"CLOUDFLARE_R2_BUCKET_NAME"}),"=",r("span",{css:ye.envValue,children:"your_bucket_name"})]}),b("span",{css:ye.envVar,children:[r("span",{css:ye.envKey,children:"CLOUDFLARE_R2_PUBLIC_URL"}),"=",r("span",{css:ye.envValue,children:"https://pub-xxx.r2.dev"})]}),b("span",{css:ye.envVar,children:[r("span",{css:ye.envKey,children:"NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL"}),"=",r("span",{css:ye.envValue,children:"https://pub-xxx.r2.dev"})]})]}),b("button",{css:ye.copyBtn,onClick:h,title:"Copy to clipboard",children:[f&&r("span",{css:ye.copiedTooltip,children:"Copied!"}),r("svg",{css:ye.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})]})]})]}),b("div",{css:ye.footer,children:[b("a",{css:ye.docsBtn,href:"https://developers.cloudflare.com/r2/get-started/",target:"_blank",rel:"noopener noreferrer",children:["R2 Documentation",r("svg",{css:ye.externalIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]}),r("button",{css:ye.doneBtn,onClick:s,children:"Got it"})]})]})}):null}const g1=ln`
44
+ from { opacity: 0; }
45
+ to { opacity: 1; }
46
+ `,y1=ln`
47
+ from {
48
+ opacity: 0;
49
+ transform: translateY(-8px) scale(0.98);
50
+ }
51
+ to {
52
+ opacity: 1;
53
+ transform: translateY(0) scale(1);
54
+ }
55
+ `,bt={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:",g1," 0.15s ease-out;font-family:",ci,";",""),modal:y(Sl," background-color:",c.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:",y1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",B.lg,";font-weight:600;color:",c.text,";margin:0;letter-spacing:-0.02em;",""),tabs:y("display:flex;gap:0;margin-top:16px;border-bottom:1px solid ",c.border,";",""),tab:y("padding:12px 20px;font-size:",B.base,";font-weight:500;color:",c.textSecondary,";background:none;border:none;cursor:pointer;position:relative;transition:color 0.15s;&:hover{color:",c.text,";}",""),tabActive:y("color:",c.primary,";&::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background-color:",c.primary,";}",""),body:{name:"1po9b7e",styles:"padding:24px;min-height:200px"},dropzone:y("border:2px dashed ",c.border,";border-radius:8px;padding:40px 24px;text-align:center;cursor:pointer;transition:all 0.15s;&:hover{border-color:",c.primary,";background-color:",c.primaryLight,";}",""),dropzoneActive:y("border-color:",c.primary,";background-color:",c.primaryLight,";",""),dropzoneIcon:y("width:48px;height:48px;margin:0 auto 16px;color:",c.textMuted,";",""),dropzoneText:y("font-size:",B.base,";color:",c.text,";margin:0 0 4px;",""),dropzoneHint:y("font-size:",B.sm,";color:",c.textSecondary,";margin:0;",""),textarea:y("width:100%;min-height:150px;padding:12px;font-size:",B.sm,";font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;border:1px solid ",c.border,";border-radius:8px;resize:vertical;&:focus{outline:none;border-color:",c.primary,";box-shadow:0 0 0 3px ",c.primaryLight,";}&::placeholder{color:",c.textMuted,";}",""),textareaLabel:y("font-size:",B.sm,";color:",c.textSecondary,";margin:0 0 8px;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",c.border,";background-color:",c.background,";",""),btn:y("padding:10px 18px;font-size:",B.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",c.surface,";border:1px solid ",c.border,";color:",c.text,";&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),btnConfirm:y("background-color:",c.primary,";border:1px solid ",c.primary,";color:white;&:hover:not(:disabled){background-color:",c.primaryHover,";border-color:",c.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),fileInput:{name:"eivff4",styles:"display:none"},selectedFiles:y("margin-top:16px;padding:12px;background-color:",c.background,";border-radius:6px;font-size:",B.sm,";color:",c.text,";","")};function b1({currentPath:o,onClose:s,onUploadComplete:f,streamingOperation:d,setShowProgress:h,setProgressTitle:m,setProgressState:w}){const[D,C]=v.useState("upload"),[g,E]=v.useState([]),[z,_]=v.useState(""),[N,O]=v.useState(!1),[G,ie]=v.useState(!1),[Q,re]=v.useState(!1),ne=v.useRef(null),ue=v.useCallback(j=>{j&&E(Array.from(j))},[]),V=v.useCallback(j=>{j.preventDefault(),O(!1),ue(j.dataTransfer.files)},[ue]),P=v.useRef(!1),I=v.useCallback(async()=>{if(g.length!==0){if(h&&m&&w){s(),P.current=!1,m("Uploading Files"),h(!0),w({current:0,total:g.length,percent:0,status:"processing",message:"Uploading..."});let j=0;const K=[];for(let fe=0;fe<g.length;fe++){if(P.current){w(W=>({...W,status:"stopped",message:`Stopped. Uploaded ${j} file${j!==1?"s":""}.`})),f();return}const $=g[fe],ae=new FormData;ae.append("file",$),ae.append("path",o);try{(await fetch("/api/studio/upload",{method:"POST",body:ae})).ok?j++:K.push($.name)}catch{K.push($.name)}w({current:fe+1,total:g.length,percent:Math.round((fe+1)/g.length*100),status:"processing",currentFile:$.name})}w({current:g.length,total:g.length,percent:100,status:"complete",message:`Uploaded ${j} file${j!==1?"s":""}.${K.length>0?` ${K.length} failed.`:""}`}),f();return}ie(!0);try{for(const j of g){const K=new FormData;K.append("file",j),K.append("path",o),await fetch("/api/studio/upload",{method:"POST",body:K})}f(),s()}catch(j){console.error("Upload failed:",j)}finally{ie(!1)}}},[g,o,f,s,h,m,w]),te=v.useCallback(async()=>{const j=z.split(`
56
+ `).map(K=>K.trim()).filter(K=>K.length>0);if(j.length!==0){if(d){s(),await d.execute({endpoint:"/api/studio/import",body:{urls:j},title:"Importing URLs",onComplete:()=>{f()}});return}re(!0);try{const fe=(await fetch("/api/studio/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:j})})).body?.getReader();if(!fe)throw new Error("No reader");const $=new TextDecoder;for(;;){const{done:ae,value:W}=await fe.read();if(ae)break;const T=$.decode(W).split(`
57
+
58
+ `).filter(J=>J.startsWith("data: "));for(const J of T)JSON.parse(J.replace("data: ","")).type==="complete"&&(f(),s())}}catch(K){console.error("Import failed:",K)}finally{re(!1)}}},[z,f,s,d]);return r("div",{css:bt.overlay,onClick:s,children:b("div",{css:bt.modal,onClick:j=>j.stopPropagation(),children:[b("div",{css:bt.header,children:[r("h3",{css:bt.title,children:"Add New"}),b("div",{css:bt.tabs,children:[r("button",{css:[bt.tab,D==="upload"&&bt.tabActive,"",""],onClick:()=>C("upload"),children:"Upload Files"}),r("button",{css:[bt.tab,D==="import"&&bt.tabActive,"",""],onClick:()=>C("import"),children:"Import URLs"})]})]}),r("div",{css:bt.body,children:D==="upload"?b(nt,{children:[b("div",{css:[bt.dropzone,N&&bt.dropzoneActive,"",""],onClick:()=>ne.current?.click(),onDragOver:j=>{j.preventDefault(),O(!0)},onDragLeave:()=>O(!1),onDrop:V,children:[r("svg",{css:bt.dropzoneIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),r("p",{css:bt.dropzoneText,children:"Drop files here or click to browse"}),r("p",{css:bt.dropzoneHint,children:"Supports images and other media files"})]}),r("input",{ref:ne,type:"file",multiple:!0,css:bt.fileInput,onChange:j=>ue(j.target.files)}),g.length>0&&b("div",{css:bt.selectedFiles,children:[g.length," file",g.length!==1?"s":""," selected"]})]}):b(nt,{children:[r("p",{css:bt.textareaLabel,children:"Paste image URLs (one per line)"}),r("textarea",{css:bt.textarea,value:z,onChange:j=>_(j.target.value),placeholder:`https://cdn.example.com/photos/image1.jpg
59
+ https://cdn.example.com/photos/image2.jpg`})]})}),b("div",{css:bt.footer,children:[r("button",{css:[bt.btn,bt.btnCancel,"",""],onClick:s,children:"Cancel"}),D==="upload"?r("button",{css:[bt.btn,bt.btnConfirm,"",""],onClick:I,disabled:g.length===0||G,children:G?"Uploading...":"Upload"}):r("button",{css:[bt.btn,bt.btnConfirm,"",""],onClick:te,disabled:!z.trim()||Q,children:Q?"Importing...":"Import"})]})]})})}const v1="36px",Be={btn:y("height:",v1,";padding:0 12px;background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),icon:y("width:16px;height:16px;color:",c.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(Sl," position:relative;background-color:",c.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:",B.xl,";font-weight:600;color:",c.text,";margin:0;letter-spacing:-0.02em;",""),closeBtn:y("padding:6px;background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),sections:{name:"klisov",styles:"display:flex;flex-direction:column;gap:24px"},sectionTitle:y("font-size:",B.base,";font-weight:600;color:",c.text,";margin:0 0 12px 0;",""),description:y("font-size:",B.sm,";color:",c.textSecondary,";margin:0 0 12px 0;",""),codeWrapper:{name:"bjn8wh",styles:"position:relative"},code:y("background-color:",c.background,";border-radius:8px;padding:12px;padding-right:40px;font-family:'SF Mono',Monaco,Consolas,monospace;font-size:",B.xs,";color:",c.textSecondary,";border:1px solid ",c.border,";overflow-x:auto;white-space:nowrap;",""),copyBtn:y("position:absolute;top:8px;right:8px;padding:4px;background:",c.surface,";border:1px solid ",c.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",c.surfaceHover,";border-color:",c.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:",c.textSecondary,";",""),codeLine:{name:"1bbvuqp",styles:"margin:0 0 4px 0;&:last-child{margin:0;}"},input:y("width:100%;padding:10px 14px;border:1px solid ",c.border,";border-radius:6px;font-size:",B.base,";color:",c.text,";background:",c.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",c.primary,";box-shadow:0 0 0 3px ",c.primaryLight,";}&::placeholder{color:",c.textMuted,";}",""),grid:{name:"xtlr5l",styles:"display:grid;grid-template-columns:repeat(3, 1fr);gap:12px"},label:y("font-size:",B.xs,";font-weight:500;color:",c.textSecondary,";display:block;margin-bottom:6px;",""),footer:y("margin-top:24px;padding-top:20px;border-top:1px solid ",c.border,";display:flex;justify-content:flex-end;gap:12px;",""),cancelBtn:y("padding:10px 18px;font-size:",B.base,";font-weight:500;color:",c.text,";background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),saveBtn:y("padding:10px 18px;font-size:",B.base,";font-weight:500;color:white;background-color:",c.primary,";border:1px solid ",c.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",c.primaryHover,";border-color:",c.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 ",c.border,";border-radius:6px;font-size:",B.sm,";color:",c.text,";background:",c.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",c.primary,";box-shadow:0 0 0 3px ",c.primaryLight,";}",""),cdnIndex:y("font-size:",B.xs,";color:",c.textMuted,";width:24px;text-align:center;flex-shrink:0;",""),cdnDeleteBtn:y("padding:6px;background:none;border:none;cursor:pointer;color:",c.textMuted,";transition:color 0.15s;flex-shrink:0;&:hover{color:",c.danger,";}",""),cdnAddBtn:y("padding:8px 12px;font-size:",B.sm,";font-weight:500;color:",c.primary,";background:",c.primaryLight,";border:1px dashed ",c.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:",c.surface,";}",""),warning:y("font-size:",B.xs,";color:",c.danger,";margin-top:8px;padding:8px 12px;background:",c.dangerLight,";border-radius:6px;","")};function x1(){const[o,s]=v.useState(!1);return b(nt,{children:[r("button",{css:Be.btn,onClick:()=>s(!0),"aria-label":"Settings",children:b("svg",{css:Be.icon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("circle",{cx:"12",cy:"12",r:"3"}),r("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06a1.65 1.65 0 00.33-1.82 1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06a1.65 1.65 0 001.82.33H9a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06a1.65 1.65 0 00-.33 1.82V9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z"})]})}),o&&r(w1,{onClose:()=>s(!1)})]})}const S1=`# 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 w1({onClose:o}){const{triggerRefresh:s}=ri(),[f,d]=v.useState(!1),[h,m]=v.useState([]),[w,D]=v.useState(!0),[C,g]=v.useState(!1),[E,z]=v.useState(!1);v.useEffect(()=>{async function Q(){try{const ne=await(await fetch("/api/studio/cdns")).json();m(ne.cdns||[])}catch(re){console.error("Failed to load CDN URLs:",re)}finally{D(!1)}}Q()},[]);const _=()=>{navigator.clipboard.writeText(S1),d(!0),setTimeout(()=>d(!1),2e3)},N=v.useCallback((Q,re)=>{m(ne=>{const ue=[...ne];return ue[Q]=re,ue}),z(!0)},[]),O=v.useCallback(()=>{m(Q=>[...Q,""]),z(!0)},[]),G=v.useCallback(Q=>{m(re=>re.filter((ne,ue)=>ue!==Q)),z(!0)},[]),ie=v.useCallback(async()=>{g(!0);try{(await fetch("/api/studio/cdns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cdns:h})})).ok&&(z(!1),s(),o())}catch(Q){console.error("Failed to save CDN URLs:",Q)}finally{g(!1)}},[h,s,o]);return r("div",{css:Be.overlay,onClick:o,children:b("div",{css:Be.panel,onClick:Q=>Q.stopPropagation(),children:[b("div",{css:Be.header,children:[r("h2",{css:Be.title,children:"Settings"}),r("button",{css:Be.closeBtn,onClick:o,children:r("svg",{css:Be.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),b("div",{css:Be.sections,children:[b("section",{children:[r("h3",{css:Be.sectionTitle,children:"CDN URLs"}),r("p",{css:Be.description,children:"Manage CDN base URLs used by your images:"}),w?r("p",{css:Be.description,children:"Loading..."}):b(nt,{children:[r("div",{css:Be.cdnList,children:h.map((Q,re)=>b("div",{css:Be.cdnRow,children:[r("span",{css:Be.cdnIndex,children:re}),r("input",{css:Be.cdnInput,type:"text",value:Q,onChange:ne=>N(re,ne.target.value),placeholder:"https://cdn.example.com"}),r("button",{css:Be.cdnDeleteBtn,onClick:()=>G(re),title:"Delete CDN URL",children:r("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]},re))}),b("button",{css:Be.cdnAddBtn,onClick:O,children:[r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add CDN URL"]}),h.length>0&&r("p",{css:Be.warning,children:"Warning: Changing CDN URLs may break image references. The index numbers correspond to image `c` values."})]})]}),b("section",{children:[r("h3",{css:Be.sectionTitle,children:"Environment Variables"}),b("p",{css:Be.description,children:["Configure in ",r("code",{children:".env.local"})," file (local development only, not needed in production):"]}),b("div",{css:Be.codeWrapper,children:[b("button",{css:Be.copyBtn,onClick:_,title:"Copy to clipboard",children:[f&&r("span",{css:Be.tooltip,children:"Copied!"}),r("svg",{css:Be.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),b("div",{css:Be.code,children:[r("p",{css:Be.codeLine,children:"NEXT_PUBLIC_PRODUCTION_URL=http://localhost:3000"}),r("p",{css:Be.codeLine,children:" "}),r("p",{css:Be.codeLine,children:"# Cloudflare R2 Storage"}),r("p",{css:Be.codeLine,children:"CLOUDFLARE_R2_ACCOUNT_ID=your_account_id"}),r("p",{css:Be.codeLine,children:"CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id"}),r("p",{css:Be.codeLine,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key"}),r("p",{css:Be.codeLine,children:"CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name"}),r("p",{css:Be.codeLine,children:"CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com"})]})]})]}),b("section",{children:[r("h3",{css:Be.sectionTitle,children:"Thumbnail Sizes"}),b("div",{css:Be.grid,children:[b("div",{children:[r("label",{css:Be.label,children:"Small"}),r("input",{css:Be.input,type:"number",defaultValue:300})]}),b("div",{children:[r("label",{css:Be.label,children:"Medium"}),r("input",{css:Be.input,type:"number",defaultValue:700})]}),b("div",{children:[r("label",{css:Be.label,children:"Large"}),r("input",{css:Be.input,type:"number",defaultValue:1400})]})]})]})]}),b("div",{css:Be.footer,children:[r("button",{css:Be.cancelBtn,onClick:o,children:"Cancel"}),r("button",{css:Be.saveBtn,onClick:ie,disabled:C||!E,children:C?"Saving...":"Save Changes"})]})]})})}const lu="36px",C1=ln`
68
+ to { transform: rotate(360deg); }
69
+ `,Se={toolbar:y("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",c.surface,";border-bottom:1px solid ",c.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:",lu,";padding:0 14px;border-radius:6px;font-size:",B.base,";font-weight:500;background:",c.surface,";border:1px solid ",c.border,";cursor:pointer;transition:all 0.15s ease;color:",c.text,";letter-spacing:-0.01em;&:hover:not(:disabled){background-color:",c.surfaceHover,";border-color:",c.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:y("background:",c.primary,";border-color:",c.primary,";color:white;&:hover:not(:disabled){background:",c.primaryHover,";border-color:",c.primaryHover,";}",""),btnDanger:y("color:",c.danger,";&:hover:not(:disabled){background-color:",c.dangerLight,";border-color:",c.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 ",c.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:",B.sm,";color:",c.text,";cursor:pointer;text-align:left;white-space:nowrap;&:hover{background-color:",c.hover,";}svg{width:16px;height:16px;flex-shrink:0;color:#f59e0b;}",""),cloudDropdownItemDefault:y("svg{color:",c.text,";}",""),cloudDropdownItemDanger:y("color:",c.danger,";svg{color:",c.danger,";}",""),cloudDropdownDivider:y("height:1px;background-color:",c.border,";margin:4px 0;",""),icon:{name:"157xhr7",styles:"width:16px;height:16px"},iconSpin:y("animation:",C1," 1s linear infinite;",""),selectionCount:y("font-size:",B.base,";color:",c.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:y("color:",c.primary,";background:none;border:none;cursor:pointer;font-size:",B.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),divider:y("width:1px;height:24px;background:",c.border,";margin:0 4px;",""),viewToggle:y("display:flex;align-items:center;height:",lu,";background-color:",c.surface,";border:1px solid ",c.border,";border-radius:6px;overflow:hidden;",""),searchWrapper:{name:"9iujih",styles:"position:relative;display:flex;align-items:center"},searchInput:y("height:",lu,";padding:0 32px 0 12px;border:1px solid ",c.border,";border-radius:6px;font-size:",B.base,";background:",c.surface,";color:",c.text,";width:180px;transition:all 0.15s ease;&:focus{outline:none;border-color:",c.primary,";box-shadow:0 0 0 2px ",c.primaryLight,";}&::placeholder{color:",c.textMuted,";}",""),searchClearBtn:y("position:absolute;right:5px;top:5px;bottom:5px;background:",c.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:",c.primaryHover,";}",""),viewBtn:y("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",c.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",c.text,";background-color:",c.surfaceHover,";}",""),viewBtnActive:y("background-color:",c.primaryLight,";color:",c.primary,";&:hover{background-color:",c.primaryLight,";color:",c.primary,";}","")};function k1(){const{selectedItems:o,viewMode:s,setViewMode:f,clearSelection:d,currentPath:h,triggerRefresh:m,focusedItem:w,scanRequested:D,clearScanRequest:C,fileItems:g,requestProcess:E,setProcessMode:z,actionState:_,cancelAction:N}=ri(),O=v.useRef(null),G=v.useRef(null),[ie,Q]=v.useState(!1),[re,ne]=v.useState(!1),[ue,V]=v.useState(!1),[P,I]=v.useState(!1),[te,j]=v.useState(!1),[K,fe]=v.useState(0),[$,ae]=v.useState(!1),[W,ve]=v.useState(0),[T,J]=v.useState(!1),[F,Me]=v.useState(!1),[qe,S]=v.useState(!1),[U,ee]=v.useState(0),[oe,Ce]=v.useState(!1),[Ee,Ye]=v.useState("Processing Images"),[xt,Re]=v.useState({current:0,total:0,percent:0,status:"processing"}),[on,$e]=v.useState(null),[ut,mt]=v.useState(!1),[Xt,Ht]=v.useState(!1),[rn,Pt]=v.useState(!1),[vn,en]=v.useState(!1),[dt,Qt]=v.useState(!1),[zt,za]=v.useState(!1),[Bt,xn]=v.useState(!1),[aa,De]=v.useState(!1),un=v.useRef(null),Le=v.useRef(null),we=qp({setShowProgress:Ce,setProgressTitle:Ye,setProgressState:Re,triggerRefresh:m}),We=h==="public/images"||h.startsWith("public/images/");v.useCallback(()=>{O.current?.click()},[]);const yt=v.useCallback(()=>{I(!0),m(),setTimeout(()=>I(!1),600)},[m]),Ge=v.useCallback(async()=>{V(!0),Ye("Scanning Files"),Ce(!0),Re({current:0,total:0,percent:0,status:"processing",message:"Scanning for files..."});try{const le=(await fetch("/api/studio/scan",{method:"POST"})).body?.getReader();if(!le)throw new Error("No reader");const me=new TextDecoder;let ge="";for(;;){const{done:_e,value:Ue}=await le.read();if(_e)break;ge+=me.decode(Ue,{stream:!0});const Ie=ge.split(`
70
+
71
+ `);ge=Ie.pop()||"";for(const Pe of Ie){if(!Pe.startsWith("data: "))continue;const He=JSON.parse(Pe.slice(6));if(He.type==="start")Re({current:0,total:He.total,percent:0,status:"processing",message:`Scanning ${He.total} files...`});else if(He.type==="progress")Re({current:He.current,total:He.total,percent:He.percent,status:"processing",currentFile:He.currentFile});else if(He.type==="cleanup")Re(sn=>({...sn,message:He.message}));else if(He.type==="complete"){let sn=He.renamed>0?`${He.renamed} file(s) renamed due to conflicts. `:"";He.orphanedFiles&&He.orphanedFiles.length>0&&(sn+=`Found ${He.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),Re({current:He.total||0,total:He.total||0,percent:100,status:"complete",processed:He.added,alreadyProcessed:He.existingCount,errors:He.errors,orphanedFiles:He.orphanedFiles,pendingUpdates:He.pendingUpdates,orphanedEntries:He.orphanedEntries,message:sn||void 0,isScan:!0}),m()}else He.type==="error"&&Re({current:0,total:0,percent:0,status:"error",message:He.message||"Scan failed"})}}}catch(de){console.error("Scan error:",de),Re({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{V(!1)}},[m]);v.useEffect(()=>{const de=le=>{un.current&&!un.current.contains(le.target)&&xn(!1),Le.current&&!Le.current.contains(le.target)&&De(!1)};return document.addEventListener("mousedown",de),()=>document.removeEventListener("mousedown",de)},[]),v.useEffect(()=>{D&&!ue&&(C(),Ge())},[D,ue,C,Ge]);const ze=v.useCallback(async de=>{const le=de.target.files;if(!le||le.length===0)return;const me=Array.from(le);me.length>1?(Re({current:0,total:me.length,percent:0,status:"processing",message:"Uploading files..."}),Ce(!0)):ne(!0);let ge=0,_e=0;try{for(let Ue=0;Ue<me.length;Ue++){const Ie=me[Ue],Pe=new FormData;Pe.append("file",Ie),Pe.append("path",h);try{const He=await fetch("/api/studio/upload",{method:"POST",body:Pe});if(He.ok)ge++;else{const sn=await He.json();_e++,me.length===1&&(He.status>=500?(console.error("Upload error:",sn),$e({title:"Upload Failed",message:`Failed to upload ${Ie.name}: ${sn.error||"Unknown error"}`})):$e({title:"Cannot Upload Here",message:sn.error||"Upload not allowed in this location."}))}}catch{_e++}me.length>1&&Re({current:Ue+1,total:me.length,percent:Math.round((Ue+1)/me.length*100),status:"processing",currentFile:Ie.name})}me.length>1&&Re({current:me.length,total:me.length,percent:100,status:"complete",processed:ge,errors:_e}),m()}catch(Ue){console.error("Upload error:",Ue),me.length>1?Re({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):$e({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{ne(!1),O.current&&(O.current.value="")}},[h,m]),St=v.useCallback(async de=>{if(o.size>0){const me=Array.from(o),ge=me.filter(Ue=>(Ue.split("/").pop()||"").includes(".")&&!Ue.endsWith("/")),_e=me.filter(Ue=>!(Ue.split("/").pop()||"").includes(".")||Ue.endsWith("/"));if(_e.length>0)try{const Ie=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(_e.join(","))}`)).json();if(Ie.images)for(const Pe of Ie.images){const He=`public/${Pe}`;ge.includes(He)||ge.push(He)}}catch(Ue){console.error("Failed to get folder files:",Ue)}if(ge.length===0){$e({title:"No Files Found",message:"No files found in the selected items."});return}z(de),E(ge)}else try{const ge=await(await fetch("/api/studio/count-images")).json();if(!ge.images||ge.images.length===0){$e({title:"No Images Found",message:"No images found in the public folder to process."});return}const _e=ge.images.map(Ue=>`public/${Ue}`);z(de),E(_e)}catch(me){console.error("Failed to get images:",me),$e({title:"Error",message:"Failed to get images."})}},[o,E,z]),Tt=v.useCallback(()=>{we.stop(),G.current&&(Re(de=>({...de,status:"stopping"})),G.current.abort())},[we]),he=v.useCallback(async()=>{const de=xt.orphanedFiles;if(!(!de||de.length===0))try{const le=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:de})}),me=await le.json();le.ok?(Re(ge=>({...ge,orphanedFiles:void 0,orphansRemoved:me.deleted,message:`Deleted ${me.deleted} orphaned thumbnail${me.deleted!==1?"s":""}.`})),m()):$e({title:"Delete Failed",message:me.error||"Failed to delete orphaned files."})}catch(le){console.error("Delete orphans error:",le),$e({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[xt.orphanedFiles,m]),wt=v.useCallback(async()=>{if(o.size===0)return;const de=Array.from(o),le=de.filter(_e=>(_e.split("/").pop()||"").includes(".")&&!_e.endsWith("/")),me=de.filter(_e=>!(_e.split("/").pop()||"").includes(".")||_e.endsWith("/"));let ge=le.length;if(me.length>0)try{const Ue=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(me.join(","))}`)).json();Ue.images&&(ge+=Ue.images.length)}catch(_e){console.error("Failed to get folder files:",_e)}fe(ge),j(!0)},[o]),tn=v.useCallback(async()=>{j(!1);const de=Array.from(o);de.length!==0&&await we.execute({endpoint:"/api/studio/delete-stream",body:{paths:de},title:"Deleting Files",operationType:"delete",onComplete:()=>{d()}})},[o,d,we]),dn=v.useCallback(async()=>{if(o.size===0)return;const de=Array.from(o),le=de.filter(Pe=>(Pe.split("/").pop()||"").includes(".")&&!Pe.endsWith("/")),me=de.filter(Pe=>!(Pe.split("/").pop()||"").includes(".")||Pe.endsWith("/")),ge=me.length>0;if(ge)try{const He=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(me.join(","))}`)).json();if(He.images)for(const sn of He.images){const mi=`public/${sn}`;le.includes(mi)||le.push(mi)}}catch(Pe){console.error("Failed to get folder files:",Pe)}if(le.length===0){$e({title:"No Files Found",message:"No files found in the selected items."});return}let _e=!1,Ue=!1,Ie=0;for(const Pe of le){const He=g.find(sn=>sn.path===Pe);He?He.isRemote?_e=!0:He.cdnPushed?Ie++:Ue=!0:ge&&(Ue=!0)}if(!ge&&Ie===le.length){$e({title:"Already Pushed",message:`All ${le.length} file${le.length!==1?"s are":" is"} already on the CDN.`});return}ve(le.length),J(_e),Me(Ue),ae(!0)},[o,g]),An=v.useCallback(async()=>{ae(!1);const de=Array.from(o),le=de.filter(_e=>(_e.split("/").pop()||"").includes(".")&&!_e.endsWith("/")),me=de.filter(_e=>!(_e.split("/").pop()||"").includes(".")||_e.endsWith("/"));if(me.length>0)try{const Ue=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(me.join(","))}`)).json();if(Ue.images)for(const Ie of Ue.images){const Pe=`public/${Ie}`;le.includes(Pe)||le.push(Pe)}}catch(_e){console.error("Failed to get folder files:",_e)}const ge=le.map(_e=>"/"+_e.replace(/^public\//,""));ge.length!==0&&await we.execute({endpoint:"/api/studio/sync-stream",body:{imageKeys:ge},title:"Pushing to CDN",onComplete:()=>{d()},onError:_e=>{(_e.includes("R2 not configured")||_e.includes("CLOUDFLARE_R2"))&&(Ce(!1),Qt(!0))}})},[o,d,we]),[la,Gn]=v.useState([]),[Rn,Fn]=v.useState(0),el=v.useCallback(async()=>{if(o.size===0)return;const de=Array.from(o),le=de.filter(Ue=>(Ue.split("/").pop()||"").includes(".")&&!Ue.endsWith("/")),me=de.filter(Ue=>!(Ue.split("/").pop()||"").includes(".")||Ue.endsWith("/")),ge=me.length>0;if(ge)try{const Ie=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(me.join(","))}`)).json();if(Ie.images)for(const Pe of Ie.images){const He=`public/${Pe}`;le.includes(He)||le.push(He)}}catch(Ue){console.error("Failed to get folder files:",Ue)}if(le.length===0){$e({title:"No Files Found",message:"No files found in the selected items."});return}let _e;if(ge)_e=le;else if(_e=le.filter(Ue=>{const Ie=g.find(Pe=>Pe.path===Ue);return Ie&&Ie.cdnPushed&&!Ie.isRemote}),_e.length===0){$e({title:"No CDN Files",message:`None of the ${le.length} selected file${le.length!==1?"s are":" is"} on the CDN.`});return}Gn(_e),Fn(le.length),ee(_e.length),S(!0)},[o,g]),mo=v.useCallback(async()=>{S(!1),_.showDownloadConfirm&&N();const le=(_.showDownloadConfirm?_.actionPaths:la).map(me=>"/"+me.replace(/^public\//,""));await we.execute({endpoint:"/api/studio/download-stream",body:{imageKeys:le},title:"Downloading from CDN",onComplete:()=>d()})},[la,d,_.showDownloadConfirm,_.actionPaths,N,we]),ui=v.useCallback(async()=>{if(o.size===0)return;const le=Array.from(o).filter(me=>{const ge=g.find(_e=>_e.path===me);return ge&&(ge.hasUpdate||ge.type==="folder"&&ge.updateCount&&ge.updateCount>0)});if(le.length===0){$e({title:"No Updates",message:"No files with pending updates in selection."});return}await we.execute({endpoint:"/api/studio/push-updates-stream",body:{paths:le},title:"Pushing Updates",onComplete:()=>d()})},[o,g,d,we]),tl=v.useCallback(async()=>{if(o.size===0)return;const le=Array.from(o).filter(me=>{const ge=g.find(_e=>_e.path===me);return ge&&(ge.hasUpdate||ge.type==="folder"&&ge.updateCount&&ge.updateCount>0)});if(le.length!==0)try{const me=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:le})});if(me.ok)d(),m();else{const ge=await me.json();$e({title:"Cancel Failed",message:ge.error||"Unknown error"})}}catch(me){console.error("Cancel updates error:",me),$e({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[o,g,d,m]),Yr=v.useCallback(async de=>{mt(!1);try{const le=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:h,name:de})});if(le.ok)m();else{const me=await le.json();$e({title:"Create Folder Failed",message:me.error||"Unknown error"})}}catch(le){console.error("Create folder error:",le),$e({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[h,m]),go=v.useCallback(()=>{o.size!==0&&en(!0)},[o]),yo=v.useCallback(async de=>{const le=Array.from(o);await we.execute({endpoint:"/api/studio/move",body:{paths:le,destination:de},title:"Moving Files",onComplete:()=>d()})},[o,d,we]),{searchQuery:di,setSearchQuery:ia}=ri(),fi=v.useCallback(de=>{ia(de.target.value)},[ia]),bo=v.useCallback(de=>{de.key==="Escape"&&(de.stopPropagation(),ia(""),de.target.blur())},[ia]),Xn=o.size>0;Xn&&Array.from(o).some(de=>{const le=g.find(me=>me.path===de);return le&&le.cdnPushed&&!le.isRemote}),Xn&&Array.from(o).every(de=>{const le=g.find(me=>me.path===de);return le&&le.type==="file"&&le.cdnPushed&&!le.isRemote});const Jn=Xn&&Array.from(o).some(de=>{const le=g.find(me=>me.path===de);return le&&(le.hasUpdate||le.type==="folder"&&le.updateCount&&le.updateCount>0)}),Mt=Array.from(o),_t=Mt.length===1&&!Mt[0].includes("."),Sn=_t?Mt[0]:null,wl=Sn&&Sn.split("/").pop()||"",Ma=Mt.length===1&&Mt[0].includes("."),Da=Ma?Mt[0]:null,hi=Da&&Da.split("/").pop()||"",nl=v.useCallback(async de=>{Sn&&(Ht(!1),await we.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:Sn,newName:de},title:"Renaming Folder",onComplete:()=>d()}))},[Sn,d,we]),pi=v.useCallback(async de=>{Da&&(Pt(!1),await we.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:Da,newName:de},title:"Renaming File",onComplete:()=>d()}))},[Da,d,we]),oa=b(nt,{children:[(qe||_.showDownloadConfirm)&&r(ro,{title:"Download from CDN",message:(()=>{const de=_.showDownloadConfirm?_.downloadImageCount:U,le=_.showDownloadConfirm?_.downloadTotalSelected:Rn;return le>de?`Download ${de} of ${le} selected file${le!==1?"s":""} from Cloudflare R2? (${le-de} not on CDN)`:`Download ${de} image${de!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`})(),confirmLabel:"Download",onConfirm:mo,onCancel:()=>{S(!1),_.showDownloadConfirm&&N()}}),oe&&r(xl,{title:Ee,progress:xt,onStop:Tt,onDeleteOrphans:he,onClose:()=>{Ce(!1),Re({current:0,total:0,percent:0,status:"processing"}),m()}})]});return w?oa:b(nt,{children:[oa,te&&r(ro,{title:"Delete Items",message:`Are you sure you want to delete ${K} file${K!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:tn,onCancel:()=>j(!1)}),$&&r(ro,{title:"Push to CDN",message:`Push ${W} image${W!==1?"s":""} to Cloudflare R2?${T?" Remote images will be downloaded first.":""}${F?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:An,onCancel:()=>ae(!1)}),ut&&r(Ur,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:Yr,onCancel:()=>mt(!1)}),vn&&r(Yp,{selectedItems:o,currentPath:h,onMove:de=>{en(!1),yo(de)},onCancel:()=>en(!1)}),Xt&&Sn&&r(Ur,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:wl,defaultValue:wl,confirmLabel:"Rename",onConfirm:nl,onCancel:()=>Ht(!1)}),rn&&Da&&r(Ur,{title:"Rename File",message:"Enter a new name for the file:",placeholder:hi,defaultValue:hi,confirmLabel:"Rename",onConfirm:pi,onCancel:()=>Pt(!1)}),on&&r(pu,{title:on.title,message:on.message,onClose:()=>{$e(null),m()}}),r(Gp,{isOpen:dt,onClose:()=>Qt(!1)}),ie&&r(b1,{currentPath:h,onClose:()=>Q(!1),onUploadComplete:()=>{Q(!1),m()},streamingOperation:we,setShowProgress:Ce,setProgressTitle:Ye,setProgressState:Re}),b("div",{css:Se.toolbar,children:[r("input",{ref:O,type:"file",multiple:!0,accept:"image/*,video/*,audio/*,.pdf",onChange:ze,style:{display:"none"}}),b("div",{css:Se.left,children:[b("button",{css:[Se.btn,Se.btnPrimary,"",""],onClick:()=>Q(!0),disabled:re||We,children:[r(z1,{}),"Add New"]}),b("button",{css:Se.btn,onClick:()=>{Ma?Pt(!0):_t?Ht(!0):mt(!0)},disabled:We&&!_t&&!Ma,title:We&&!_t&&!Ma?"Cannot create folders in protected images folder":void 0,children:[Ma||_t?r(A1,{}):r(T1,{}),Ma?"Rename File":_t?"Rename Folder":"New Folder"]}),r("div",{css:Se.divider}),b("div",{css:Se.cloudDropdownWrapper,ref:Le,children:[b("button",{css:Se.btn,onClick:()=>De(!aa),disabled:_.showProgress||We,title:We?"Cannot process images folder":void 0,children:[r(B1,{}),"Thumbnails",r("svg",{css:Se.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),aa&&b("div",{css:Se.cloudDropdown,children:[b("button",{css:[Se.cloudDropdownItem,Se.cloudDropdownItemDefault,"",""],onClick:()=>{De(!1),St("generate")},children:[r(N1,{}),"Generate Thumbnails"]}),b("button",{css:[Se.cloudDropdownItem,Se.cloudDropdownItemDanger,"",""],onClick:()=>{De(!1),St("remove")},children:[r(j1,{}),"Remove Thumbnails"]})]})]}),b("button",{css:[Se.btn,Se.btnDanger,"",""],onClick:wt,disabled:!Xn,children:[r(E1,{}),"Delete"]}),b("button",{css:Se.btn,onClick:go,disabled:!Xn,children:[r(R1,{}),"Move"]}),b("div",{css:Se.cloudDropdownWrapper,ref:un,children:[b("button",{css:[Se.btn,Se.btnCloud,"",""],onClick:()=>xn(!Bt),disabled:!Xn,children:[r(wp,{}),"Cloud",r("svg",{css:Se.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Bt&&Xn&&b("div",{css:Se.cloudDropdown,children:[Jn&&b(nt,{children:[b("button",{css:Se.cloudDropdownItem,onClick:()=>{xn(!1),ui()},children:[r(L1,{}),"Push Update"]}),b("button",{css:[Se.cloudDropdownItem,Se.cloudDropdownItemDanger,"",""],onClick:()=>{xn(!1),tl()},children:[r(_1,{}),"Cancel Update"]}),r("div",{css:Se.cloudDropdownDivider})]}),b("button",{css:Se.cloudDropdownItem,onClick:()=>{xn(!1),dn()},children:[r(wp,{}),"Push CDN"]}),b("button",{css:Se.cloudDropdownItem,onClick:()=>{xn(!1),el()},children:[r(O1,{}),"Download"]})]})]}),b("div",{css:Se.searchWrapper,children:[r("input",{css:Se.searchInput,type:"text",placeholder:"Search images...",value:di,onChange:fi,onKeyDown:bo}),di&&r("button",{css:Se.searchClearBtn,onClick:()=>ia(""),title:"Clear search",children:r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),b("div",{css:Se.right,children:[Xn&&b("span",{css:Se.selectionCount,children:[o.size," selected",r("button",{css:Se.clearBtn,onClick:d,children:"Clear"})]}),b("button",{css:Se.btn,onClick:Ge,disabled:ue,children:[r(M1,{spinning:ue}),"Scan"]}),r("button",{css:Se.btn,onClick:yt,title:"Refresh view",disabled:P,children:r(D1,{spinning:P})}),b("div",{css:Se.viewToggle,children:[r("button",{css:[Se.viewBtn,s==="grid"&&Se.viewBtnActive,"",""],onClick:()=>f("grid"),"aria-label":"Grid view",children:r(U1,{})}),r("button",{css:[Se.viewBtn,s==="list"&&Se.viewBtnActive,"",""],onClick:()=>f("list"),"aria-label":"List view",children:r(H1,{})})]}),r(x1,{})]})]})]})}function z1(){return r("svg",{css:Se.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}function M1({spinning:o}){return r("svg",{css:[Se.icon,o&&Se.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function D1({spinning:o}){return r("svg",{css:[Se.icon,o&&Se.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}function E1(){return r("svg",{css:Se.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}function T1(){return r("svg",{css:Se.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"})})}function A1(){return r("svg",{css:Se.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}function R1(){return r("svg",{css:Se.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})})}function wp(){return r("svg",{css:Se.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})})}function L1(){return r("svg",{css:Se.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}function _1(){return r("svg",{css:Se.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function O1(){return r("svg",{css:Se.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"})})}function U1(){return r("svg",{css:Se.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"})})}function H1(){return r("svg",{css:Se.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function B1(){return r("svg",{css:Se.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}function N1(){return r("svg",{css:Se.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}function j1(){return r("svg",{css:Se.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}class q1{async get(s){const f=await fetch(s,{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!f.ok){const d=await f.json().catch(()=>({}));throw new Error(d.error||`Request failed: ${f.status}`)}return f.json()}async post(s,f){const d=await fetch(s,{method:"POST",headers:f?{"Content-Type":"application/json"}:void 0,body:f?JSON.stringify(f):void 0});if(!d.ok){const h=await d.json().catch(()=>({}));throw new Error(h.error||`Request failed: ${d.status}`)}return d.json()}async list(s="public"){return this.get(`/api/studio/list?path=${encodeURIComponent(s)}`)}async search(s,f="public"){return this.get(`/api/studio/search?q=${encodeURIComponent(s)}&path=${encodeURIComponent(f)}`)}async listFolders(){return this.get("/api/studio/list-folders")}async countImages(){return this.get("/api/studio/count-images")}async folderImages(s){return this.get(`/api/studio/folder-images?folders=${encodeURIComponent(s.join(","))}`)}async upload(s,f="public"){const d=new FormData;d.append("file",s),d.append("path",f);const h=await fetch("/api/studio/upload",{method:"POST",body:d});if(!h.ok){const m=await h.json().catch(()=>({}));throw new Error(m.error||`Upload failed: ${h.status}`)}return h.json()}async delete(s){return this.post("/api/studio/delete",{paths:s})}async createFolder(s,f){return this.post("/api/studio/create-folder",{parentPath:s,name:f})}async rename(s,f){return this.post("/api/studio/rename",{oldPath:s,newName:f})}async move(s,f){return this.post("/api/studio/move",{paths:s,destination:f})}async push(s){return this.post("/api/studio/sync",{imageKeys:s})}async reprocess(s){return this.post("/api/studio/reprocess",{imageKeys:s})}processAllStream(){return new EventSource("/api/studio/process-all")}async checkFeaturedImage(){return this.get("/api/studio/check-featured-image")}async getFeaturedImageOptions(){return this.get("/api/studio/featured-image-options")}}const oo=new q1;function Xp(){const{currentPath:o,setCurrentPath:s,navigateUp:f,selectedItems:d,toggleSelection:h,selectRange:m,lastSelectedPath:w,selectAll:D,clearSelection:C,refreshKey:g,setFocusedItem:E,triggerRefresh:z,triggerScan:_,searchQuery:N,showError:O,setFileItems:G,editedImageKey:ie}=ri(),[Q,re]=v.useState([]),[ne,ue]=v.useState(!0),[V,P]=v.useState(!1),[I,te]=v.useState(null),j=v.useRef(!0),K=v.useRef(o);v.useEffect(()=>{async function S(){const U=K.current!==o;(j.current||U)&&ue(!0),K.current=o;try{const ee=N&&N.length>=2?await oo.search(N,o):await oo.list(o),oe=ee.items||[];re(oe),G(oe),P(ee.isEmpty===!0)}catch(ee){const oe=ee instanceof Error?ee.message:"Failed to load items";O("Load Error",oe),re([]),G([]),P(!1)}ue(!1),j.current=!1}S()},[o,g,N,O,G]),v.useEffect(()=>{async function S(){if(o!=="public"){te(null);return}try{const U=await oo.checkFeaturedImage();te(U)}catch{te(null)}}S()},[o,g]);const fe=o==="public",$=N&&N.length>=2,ae=[...Q].sort((S,U)=>S.type==="folder"&&U.type!=="folder"?-1:S.type!=="folder"&&U.type==="folder"?1:S.name.localeCompare(U.name)),W=ae.length>0&&ae.every(S=>d.has(S.path)),ve=ae.some(S=>d.has(S.path)),T=v.useCallback((S,U)=>{U.shiftKey&&w?m(w,S.path,ae):h(S.path)},[w,m,ae,h]),J=v.useCallback(S=>{S.type==="folder"?s(S.path):E(S)},[s,E]),F=v.useCallback(async S=>{try{const U="/"+S.path.replace(/^public\//,"");await oo.reprocess([U]),z()}catch(U){const ee=U instanceof Error?U.message:"Failed to generate thumbnail";O("Processing Error",ee)}},[z,O]),Me=v.useCallback(()=>{W?C():D(ae)},[W,C,D,ae]),qe=I&&!I.exists?I:null;return{items:Q,loading:ne,sortedItems:ae,metaEmpty:V,missingFeaturedImage:qe,isAtRoot:fe,isSearching:$,allItemsSelected:W,someItemsSelected:ve,currentPath:o,selectedItems:d,navigateUp:f,editedImageKey:ie,handleItemClick:T,handleOpen:J,handleGenerateThumbnail:F,handleSelectAll:Me,triggerScan:_,triggerRefresh:z}}const Y1=ln`
72
+ from { opacity: 0; }
73
+ to { opacity: 1; }
74
+ `,G1=ln`
75
+ from { transform: translateY(-20px); opacity: 0; }
76
+ to { transform: translateY(0); opacity: 1; }
77
+ `,X1=ln`
78
+ to { transform: rotate(360deg); }
79
+ `,Wt={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:",Y1," 0.15s ease;",""),modal:y("background:",c.surface,";border-radius:12px;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);width:100%;max-width:440px;animation:",G1," 0.2s ease;overflow:hidden;",""),header:y("padding:20px 24px;border-bottom:1px solid ",c.border,";",""),title:y("font-size:",B.lg,";font-weight:600;color:",c.text,";margin:0;",""),subtitle:y("font-size:",B.sm,";color:",c.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 ",c.border,";border-top-color:",c.primary,";animation:",X1," 0.8s linear infinite;",""),urlButton:y("display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:16px 20px;background:",c.background,";border:1px solid ",c.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover:not(:disabled){background:",c.surfaceHover,";border-color:",c.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),urlLabel:y("font-size:",B.xs,";font-weight:600;color:",c.textSecondary,";text-transform:uppercase;letter-spacing:0.05em;",""),urlValue:y("font-size:",B.base,";font-weight:500;color:",c.text,";word-break:break-all;",""),noOptions:y("padding:20px;text-align:center;color:",c.textSecondary,";font-size:",B.sm,";",""),footer:y("padding:16px 24px;border-top:1px solid ",c.border,";display:flex;justify-content:flex-end;",""),cancelBtn:y("padding:10px 20px;font-size:",B.base,";font-weight:500;background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",c.text,";&:hover{background:",c.surfaceHover,";border-color:",c.borderHover,";}","")};function Vp({isOpen:o,onClose:s,onSelect:f}){const[d,h]=v.useState(!0),[m,w]=v.useState(null),[D,C]=v.useState(null);if(v.useEffect(()=>{if(!o)return;async function E(){h(!0);try{const z=await oo.getFeaturedImageOptions();w(z.devUrl),C(z.productionUrl)}catch(z){console.error("Failed to load featured image options:",z)}h(!1)}E()},[o]),!o)return null;const g=m||D;return r("div",{css:Wt.overlay,onClick:s,children:b("div",{css:Wt.modal,onClick:E=>E.stopPropagation(),children:[b("div",{css:Wt.header,children:[r("h2",{css:Wt.title,children:"Generate Screenshot"}),r("p",{css:Wt.subtitle,children:"Choose which URL to screenshot"})]}),r("div",{css:Wt.body,children:d?r("div",{css:Wt.loading,children:r("div",{css:Wt.spinner})}):g?b(nt,{children:[m&&b("button",{css:Wt.urlButton,onClick:()=>f(m),children:[r("span",{css:Wt.urlLabel,children:"Development"}),r("span",{css:Wt.urlValue,children:m})]}),D&&b("button",{css:Wt.urlButton,onClick:()=>f(D),children:[r("span",{css:Wt.urlLabel,children:"Production"}),r("span",{css:Wt.urlValue,children:D})]})]}):b("div",{css:Wt.noOptions,children:["No URLs configured. Set ",r("code",{children:"NEXT_PUBLIC_PRODUCTION_URL"})," in .env.local and/or .env.production."]})}),r("div",{css:Wt.footer,children:r("button",{css:Wt.cancelBtn,onClick:s,children:"Cancel"})})]})})}const V1=ln`
80
+ to { transform: rotate(360deg); }
81
+ `,se={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 ",c.border,";border-top-color:",c.primary,";animation:",V1," 0.8s linear infinite;",""),empty:y("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",c.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:y("font-size:",B.base,";margin:0 0 4px 0;&:last-child{color:",c.textMuted,";font-size:",B.sm,";}",""),scanButton:y("margin-top:16px;padding:10px 24px;font-size:",B.base,";font-weight:500;background:",c.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",c.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 ",c.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",c.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:",c.primary,";box-shadow:0 0 0 1px ",c.primary,";&:hover{border-color:",c.primary,";box-shadow:0 0 0 1px ",c.primary,";}",""),parentItem:y("cursor:pointer;&:hover{border-color:",c.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:",c.primary,";cursor:pointer;",""),content:y("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",c.background,";",""),contentCloud:y("",""),contentRemote:y("",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},imagesFolderIcon:y("width:56px;height:56px;color:",c.imagesFolder,";",""),imagesFolderWrapper:{name:"bjn8wh",styles:"position:relative"},lockIcon:y("position:absolute;bottom:4px;right:4px;width:16px;height:16px;color:",c.imagesFolder,";background:white;border-radius:50%;padding:2px;",""),parentIcon:y("width:56px;height:56px;color:",c.textMuted,";",""),fileIcon:y("width:40px;height:40px;color:",c.textMuted,";",""),image:{name:"rm1wug",styles:"max-width:100%;max-height:100%;object-fit:contain;border-radius:4px"},label:y("padding:10px 12px;background-color:",c.surface,";border-top:1px solid ",c.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:",c.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:",c.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:",B.xs,";",""),folderStatLocal:y("color:",c.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:",c.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:",B.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:",c.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:",B.sm,";font-weight:500;color:",c.primary,";background:",c.surface,";border:1px solid ",c.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:",c.primaryLight,";border-color:",c.primary,";}",""),featuredPlaceholder:y("position:relative;border-radius:8px;border:2px dashed ",c.success,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",c.background,";&:hover{border-color:",c.success,";background-color:",c.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:",c.success,";",""),featuredText:y("font-size:",B.sm,";color:",c.success,";text-align:center;font-weight:500;",""),featuredLabel:y("padding:10px 12px;background-color:",c.surface,";border-top:1px solid ",c.borderLight,";",""),name:y("font-size:",B.sm,";font-weight:500;color:",c.text,";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;letter-spacing:-0.01em;direction:rtl;text-align:left;",""),size:y("font-size:",B.xs,";color:",c.textMuted,";margin:2px 0 0 0;",""),selectAllRow:y("display:flex;align-items:center;margin-bottom:16px;padding:12px 16px;background:",c.surface,";border-radius:8px;border:1px solid ",c.border,";",""),selectAllLabel:y("display:flex;align-items:center;gap:10px;font-size:",B.base,";font-weight:500;color:",c.textSecondary,";cursor:pointer;&:hover{color:",c.text,";}",""),selectAllCheckbox:y("width:16px;height:16px;accent-color:",c.primary,";","")};function Q1(){const{loading:o,sortedItems:s,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:m,allItemsSelected:w,someItemsSelected:D,selectedItems:C,navigateUp:g,handleItemClick:E,handleOpen:z,handleGenerateThumbnail:_,handleSelectAll:N,triggerScan:O,triggerRefresh:G,editedImageKey:ie}=Xp(),[Q,re]=v.useState(!1),[ne,ue]=v.useState(!1),[V,P]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),I=()=>{re(!0)},te=async j=>{re(!1),ue(!0),P({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const K=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:j})});if(!K.ok){const ae=await K.json();P({current:0,total:4,percent:0,status:"error",message:ae.error||"Failed to generate screenshot"});return}const fe=K.body?.getReader(),$=new TextDecoder;if(fe){let ae="";for(;;){const{done:W,value:ve}=await fe.read();if(W)break;ae+=$.decode(ve,{stream:!0});const T=ae.split(`
82
+ `);ae=T.pop()||"";for(const J of T)if(J.startsWith("data: "))try{const F=JSON.parse(J.slice(6));F.type==="start"?P(Me=>({...Me,total:F.total,message:`Screenshotting ${F.url}...`})):F.type==="progress"?P({current:F.current,total:F.total,percent:F.percent,status:"processing",message:F.message}):F.type==="complete"?(P({current:F.processed,total:F.processed,percent:100,status:F.errors>0?"error":"complete",message:F.message}),G()):F.type==="error"&&P(Me=>({...Me,status:"error",message:F.message}))}catch{}}}}catch(K){console.error("Featured image generation error:",K),P({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return o?b(nt,{children:[ne&&r(xl,{title:"Generating Screenshot",progress:V,onClose:()=>ue(!1)}),r("div",{css:se.loading,children:r("div",{css:se.spinner})})]}):f&&h?b("div",{css:se.empty,children:[r("svg",{css:se.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),r("p",{css:se.emptyText,children:"No files tracked yet"}),r("p",{css:se.emptyText,children:"Click Scan to discover files in your public folder"}),r("button",{css:se.scanButton,onClick:O,children:"Scan for Files"})]}):s.length===0&&h?b("div",{css:se.empty,children:[r("svg",{css:se.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),r("p",{css:se.emptyText,children:"No files in this folder"}),r("p",{css:se.emptyText,children:"Upload images or click Scan in the toolbar"})]}):b(nt,{children:[r(Vp,{isOpen:Q,onClose:()=>re(!1),onSelect:te}),ne&&r(xl,{title:"Generating Screenshot",progress:V,onClose:()=>ue(!1)}),b("div",{children:[s.length>0&&r("div",{css:se.selectAllRow,children:b("label",{css:se.selectAllLabel,children:[r("input",{type:"checkbox",css:se.selectAllCheckbox,checked:w,ref:j=>{j&&(j.indeterminate=D&&!w)},onChange:N}),"Select all (",s.length,")"]})}),b("div",{css:se.grid,children:[!h&&!m&&b("div",{css:[se.item,se.parentItem,"",""],onClick:g,children:[r("div",{css:se.content,children:r("svg",{css:se.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}),b("div",{css:se.label,children:[r("p",{css:se.name,children:".."}),r("p",{css:se.size,children:"Parent folder"})]})]}),s.map(j=>r(Z1,{item:j,isSelected:C.has(j.path),onClick:K=>E(j,K),onOpen:()=>z(j),onGenerateThumbnail:()=>_(j),editedImageKey:ie},j.path)),h&&d&&!m&&b("div",{css:se.featuredPlaceholder,onClick:I,title:`Generate ${d.filename}`,children:[b("div",{css:se.featuredContent,children:[r("svg",{css:se.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),r("span",{css:se.featuredText,children:"Generate Screenshot"})]}),b("div",{css:se.featuredLabel,children:[r("p",{css:se.name,children:d.filename}),r("p",{css:se.size,children:"Click to screenshot homepage"})]})]})]})]})]})}function K1(o){return o.includes("/images/sm/")?"SM":o.includes("/images/md/")?"MD":o.includes("/images/lg/")?"LG":o.includes("/images/full/")?"FULL":null}function Z1({item:o,isSelected:s,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:m}){const[w,D]=v.useState(!1),C=o.type==="folder",g=!C&&o.thumbnail!==void 0,E=o.thumbnail&&m&&m.path===o.path?`${o.thumbnail}?v=${m.key}`:o.thumbnail,z=o.isProtected||C&&o.name==="images"&&o.path==="public/images",_=K1(o.path),N=!C&&(o.hasSm||o.hasMd||o.hasLg||o.hasFull||_),O=ie=>{ie.stopPropagation();const Q="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(Q),D(!0),setTimeout(()=>D(!1),1500)},G=ie=>{if(z){ie.stopPropagation(),d();return}f(ie)};return b("div",{css:[se.item,s&&!z&&se.itemSelected,"",""],onClick:G,children:[!z&&r("div",{css:se.checkboxWrapper,onClick:ie=>ie.stopPropagation(),children:r("input",{type:"checkbox",css:se.checkbox,checked:s,onChange:()=>f({})})}),b("div",{css:[se.content,o.isCloud&&se.contentCloud,o.isRemote&&se.contentRemote,"",""],children:[b("button",{css:se.copyBtn,onClick:O,title:"Copy file path",children:[w&&r("span",{css:se.tooltip,children:"Copied!"}),r("svg",{css:se.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),r("button",{css:se.openBtn,onClick:ie=>{ie.stopPropagation(),d()},children:"Open"}),C?z?b("div",{css:se.imagesFolderWrapper,children:[r("svg",{css:se.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),r("svg",{css:se.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})]}):r("svg",{css:se.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}):g&&E?r("img",{css:se.image,src:E,alt:o.name,loading:"lazy"}):r("svg",{css:se.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})]}),r("div",{css:se.label,children:r("div",{css:se.labelRow,children:b("div",{css:se.labelText,children:[r("p",{css:se.name,title:o.name,children:o.name}),C?b("div",{css:se.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&b("span",{css:[se.folderStat,se.folderStatLocal,"",""],title:`${o.localCount} local`,children:[r("svg",{css:se.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),o.localCount]}),o.cloudCount!==void 0&&o.cloudCount>0&&b("span",{css:[se.folderStat,se.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[r("svg",{css:se.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),o.cloudCount]}),o.remoteCount!==void 0&&o.remoteCount>0&&b("span",{css:[se.folderStat,se.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[r("svg",{css:se.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),o.remoteCount]}),o.updateCount!==void 0&&o.updateCount>0&&b("span",{css:[se.folderStat,se.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[r("svg",{css:se.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),o.updateCount]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount!==void 0&&b("span",{css:se.size,children:[o.fileCount," files"]})]}):b("div",{css:se.statusRow,children:[r("div",{css:se.statusLeft,children:o.hasUpdate?b(nt,{children:[r("svg",{css:se.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),r("svg",{css:se.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),r("span",{css:se.updateLabel,children:"update"})]}):o.cdnPushed?r("svg",{css:o.isRemote?se.storedIconRemote:se.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.isRemote?r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}):r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}):o.size!==void 0?r("span",{css:se.size,children:F1(o.size)}):null}),N&&r("span",{css:se.thumbChips,children:_?r("span",{css:se.thumbChip,children:_}):b(nt,{children:[o.hasSm&&r("span",{css:se.thumbChip,children:"SM"}),o.hasMd&&r("span",{css:se.thumbChip,children:"MD"}),o.hasLg&&r("span",{css:se.thumbChip,children:"LG"}),o.hasFull&&r("span",{css:se.thumbChip,children:"FULL"})]})})]})]})})})]})}function F1(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}const J1=ln`
83
+ to { transform: rotate(360deg); }
84
+ `,Z={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 ",c.border,";border-top-color:",c.primary,";animation:",J1," 0.8s linear infinite;",""),empty:y("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",c.textSecondary,";",""),emptyHint:y("font-size:",B.sm,";color:",c.textMuted,";margin-top:4px;",""),scanButton:y("margin-top:16px;padding:10px 24px;font-size:",B.base,";font-weight:500;background:",c.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",c.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),tableWrapper:y("background:",c.surface,";border-radius:8px;border:1px solid ",c.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:",c.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",c.background,";border-bottom:1px solid ",c.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:",c.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",c.borderLight,";}",""),rowSelected:y("background-color:",c.primaryLight,";&:hover{background-color:",c.primaryLight,";}",""),parentRow:y("cursor:pointer;border-bottom:1px solid ",c.border,";&:hover{background-color:",c.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:",c.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:",B.xs,";color:",c.textSecondary,";background:",c.surface,";border:1px solid ",c.border,";padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;justify-content:center;&:hover{background:",c.surfaceHover,";border-color:",c.borderHover,";color:",c.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:",B.xs,";",""),folderStatLocal:y("color:",c.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:",c.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:",B.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:",c.imagesFolder,";",""),lockIcon:y("width:10px;height:10px;color:",c.imagesFolder,";margin-left:-6px;margin-top:8px;",""),parentIcon:y("width:20px;height:20px;color:",c.textMuted,";flex-shrink:0;",""),fileIcon:y("width:20px;height:20px;color:",c.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 ",c.borderLight,";",""),name:y("font-size:",B.base,";font-weight:500;color:",c.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:y("font-size:",B.sm,";color:",c.textSecondary,";",""),cdnBadge:y("display:inline-flex;align-items:center;gap:4px;font-size:",B.xs,";font-weight:500;color:",c.success,";",""),cdnBadgeRemote:y("display:inline-flex;align-items:center;font-size:",B.xs,";font-weight:500;color:#ef4444;",""),cdnIcon:{name:"1suksrg",styles:"width:12px;height:12px"},cdnEmpty:y("font-size:",B.sm,";color:",c.textMuted,";",""),featuredRow:y("cursor:pointer;transition:background-color 0.15s ease;border:2px dashed ",c.success,";&:hover{background-color:",c.successLight,";}td{border-bottom:none!important;}",""),featuredIcon:y("width:24px;height:24px;color:",c.success,";",""),featuredText:y("color:",c.success,";font-weight:500;",""),openBtn:y("height:32px;font-size:",B.sm,";font-weight:500;color:",c.primary,";background:",c.surface,";border:1px solid ",c.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",c.primaryLight,";border-color:",c.primary,";}","")};function $1(){const{loading:o,sortedItems:s,metaEmpty:f,missingFeaturedImage:d,isAtRoot:h,isSearching:m,allItemsSelected:w,someItemsSelected:D,selectedItems:C,navigateUp:g,handleItemClick:E,handleOpen:z,handleGenerateThumbnail:_,handleSelectAll:N,triggerScan:O,triggerRefresh:G,editedImageKey:ie}=Xp(),[Q,re]=v.useState(!1),[ne,ue]=v.useState(!1),[V,P]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),I=()=>{re(!0)},te=async j=>{re(!1),ue(!0),P({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const K=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:j})});if(!K.ok){const ae=await K.json();P({current:0,total:4,percent:0,status:"error",message:ae.error||"Failed to generate screenshot"});return}const fe=K.body?.getReader(),$=new TextDecoder;if(fe){let ae="";for(;;){const{done:W,value:ve}=await fe.read();if(W)break;ae+=$.decode(ve,{stream:!0});const T=ae.split(`
85
+ `);ae=T.pop()||"";for(const J of T)if(J.startsWith("data: "))try{const F=JSON.parse(J.slice(6));F.type==="start"?P(Me=>({...Me,total:F.total,message:`Screenshotting ${F.url}...`})):F.type==="progress"?P({current:F.current,total:F.total,percent:F.percent,status:"processing",message:F.message}):F.type==="complete"?(P({current:F.processed,total:F.processed,percent:100,status:F.errors>0?"error":"complete",message:F.message}),G()):F.type==="error"&&P(Me=>({...Me,status:"error",message:F.message}))}catch{}}}}catch(K){console.error("Featured image generation error:",K),P({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return o?r("div",{css:Z.loading,children:r("div",{css:Z.spinner})}):f&&h?b("div",{css:Z.empty,children:[r("p",{children:"No files tracked yet"}),r("p",{css:Z.emptyHint,children:"Click Scan to discover files in your public folder"}),r("button",{css:Z.scanButton,onClick:O,children:"Scan for Files"})]}):s.length===0&&h?b("div",{css:Z.empty,children:[r("p",{children:"No files in this folder"}),r("p",{css:Z.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):b(nt,{children:[r(Vp,{isOpen:Q,onClose:()=>re(!1),onSelect:te}),ne&&r(xl,{title:"Generating Screenshot",progress:V,onClose:()=>ue(!1)}),r("div",{css:Z.tableWrapper,children:b("table",{css:Z.table,children:[r("thead",{children:b("tr",{children:[r("th",{css:[Z.th,Z.thCheckbox,"",""],children:s.length>0&&r("input",{type:"checkbox",css:Z.checkbox,checked:w,ref:j=>{j&&(j.indeterminate=D&&!w)},onChange:N})}),r("th",{css:Z.th,children:"Name"}),r("th",{css:[Z.th,Z.thSize,"",""],children:"Size"}),r("th",{css:[Z.th,Z.thDimensions,"",""],children:"Dimensions"}),r("th",{css:[Z.th,Z.thCdn,"",""],children:"CDN"})]})}),b("tbody",{css:Z.tbody,children:[!h&&!m&&b("tr",{css:Z.parentRow,onClick:g,children:[r("td",{css:Z.td}),r("td",{css:Z.td,children:b("div",{css:Z.nameCell,children:[r("svg",{css:Z.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),r("span",{css:Z.name,children:".."})]})}),r("td",{css:[Z.td,Z.meta,"",""],children:"--"}),r("td",{css:[Z.td,Z.meta,"",""],children:"Parent folder"}),r("td",{css:Z.td,children:"--"})]}),s.map(j=>r(W1,{item:j,isSelected:C.has(j.path),onClick:K=>E(j,K),onOpen:()=>z(j),onGenerateThumbnail:()=>_(j),editedImageKey:ie},j.path)),h&&d&&!m&&b("tr",{css:Z.featuredRow,onClick:I,title:`Generate ${d.filename}`,children:[r("td",{css:Z.td}),r("td",{css:Z.td,children:b("div",{css:Z.nameCell,children:[r("div",{css:Z.folderIconWrapper,children:r("svg",{css:Z.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),r("span",{css:[Z.name,Z.featuredText,"",""],children:d.filename})]})}),r("td",{css:[Z.td,Z.meta,Z.featuredText,"",""],children:"--"}),r("td",{css:[Z.td,Z.meta,Z.featuredText,"",""],children:"Click to generate"}),r("td",{css:[Z.td,Z.featuredText,"",""],children:"--"})]})]})]})})]})}function W1({item:o,isSelected:s,onClick:f,onOpen:d,onGenerateThumbnail:h,editedImageKey:m}){const[w,D]=v.useState(!1),C=o.type==="folder",g=!C&&o.thumbnail!==void 0,E=o.thumbnail&&m&&m.path===o.path?`${o.thumbnail}?v=${m.key}`:o.thumbnail,z=o.isProtected||C&&o.name==="images"&&o.path==="public/images",_=O=>{O.stopPropagation();const G="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(G),D(!0),setTimeout(()=>D(!1),1500)},N=O=>{if(z){O.stopPropagation(),d();return}f(O)};return b("tr",{css:[Z.row,s&&!z&&Z.rowSelected,"",""],onClick:N,children:[r("td",{css:[Z.td,Z.checkboxCell,"",""],onClick:O=>O.stopPropagation(),children:!z&&r("input",{type:"checkbox",css:Z.checkbox,checked:s,onChange:()=>f({})})}),r("td",{css:Z.td,children:b("div",{css:Z.nameCell,children:[C?z?b("div",{css:Z.imagesFolderWrapper,children:[r("svg",{css:Z.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),r("svg",{css:Z.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})]}):r("div",{css:Z.folderIconWrapper,children:r("svg",{css:Z.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}):g&&E?r("div",{css:[Z.thumbnailWrapper,o.isCloud&&Z.thumbnailCloud,o.isRemote&&Z.thumbnailRemote,"",""],children:r("img",{css:Z.thumbnail,src:E,alt:o.name,loading:"lazy"})}):r("div",{css:[Z.thumbnailWrapper,o.isCloud&&Z.thumbnailCloud,o.isRemote&&Z.thumbnailRemote,"",""],children:r("svg",{css:Z.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})}),r("span",{css:Z.name,title:o.name,children:I1(o.name)}),b("div",{css:Z.actionsCell,children:[b("button",{css:Z.copyBtn,onClick:_,title:"Copy file path",children:[w&&r("span",{css:Z.tooltip,children:"Copied!"}),r("svg",{css:Z.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),r("button",{css:Z.openBtn,onClick:O=>{O.stopPropagation(),d()},children:"Open"})]})]})}),r("td",{css:[Z.td,Z.meta,"",""],children:C?b("div",{css:Z.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&b("span",{css:[Z.folderStat,Z.folderStatLocal,"",""],title:`${o.localCount} local`,children:[r("svg",{css:Z.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),o.localCount]}),o.cloudCount!==void 0&&o.cloudCount>0&&b("span",{css:[Z.folderStat,Z.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[r("svg",{css:Z.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),o.cloudCount]}),o.remoteCount!==void 0&&o.remoteCount>0&&b("span",{css:[Z.folderStat,Z.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[r("svg",{css:Z.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),o.remoteCount]}),o.updateCount!==void 0&&o.updateCount>0&&b("span",{css:[Z.folderStat,Z.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[r("svg",{css:Z.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),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:Z.updateLabel,children:[r("svg",{css:Z.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),r("svg",{css:Z.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"update"]}):o.cdnPushed?r("span",{css:Z.storedLabel,children:r("svg",{css:o.isRemote?Z.storedIconRemote:Z.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.isRemote?r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}):r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}):o.size!==void 0?Cp(o.size):"--"}),r("td",{css:[Z.td,Z.meta,"",""],children:C?o.totalSize!==void 0?Cp(o.totalSize):"--":o.dimensions?`${o.dimensions.width}x${o.dimensions.height}`:"--"}),r("td",{css:Z.td,children:o.cdnPushed?o.isRemote?r("span",{css:Z.cdnBadgeRemote,children:"Remote"}):b("span",{css:Z.cdnBadge,children:[r("svg",{css:Z.cdnIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Pushed"]}):r("span",{css:Z.cdnEmpty,children:"--"})})]})}function Cp(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}function I1(o,s=32){if(o.length<=s)return o;const f=o.lastIndexOf("."),d=f>0?o.substring(f):"",h=f>0?o.substring(0,f):o,m=s-d.length-3;if(m<6)return o.substring(0,s-3)+"...";const w=Math.ceil(m/2),D=Math.floor(m/2);return h.substring(0,w)+"..."+h.substring(h.length-D)+d}var P1=Object.defineProperty,ey=(o,s,f)=>s in o?P1(o,s,{enumerable:!0,configurable:!0,writable:!0,value:f}):o[s]=f,Et=(o,s,f)=>ey(o,typeof s!="symbol"?s+"":s,f);const Br={x:0,y:0,width:0,height:0,unit:"px"},ni=(o,s,f)=>Math.min(Math.max(o,s),f),ty=(...o)=>o.filter(s=>s&&typeof s=="string").join(" "),kp=(o,s)=>o===s||o.width===s.width&&o.height===s.height&&o.x===s.x&&o.y===s.y&&o.unit===s.unit;function ai(o,s,f){return o.unit==="%"?{...Br,...o,unit:"%"}:{unit:"%",x:o.x?o.x/s*100:0,y:o.y?o.y/f*100:0,width:o.width?o.width/s*100:0,height:o.height?o.height/f*100:0}}function Ia(o,s,f){return o.unit?o.unit==="px"?{...Br,...o,unit:"px"}:{unit:"px",x:o.x?o.x*s/100:0,y:o.y?o.y*f/100:0,width:o.width?o.width*s/100:0,height:o.height?o.height*f/100:0}:{...Br,...o,unit:"px"}}function zp(o,s,f,d,h,m=0,w=0,D=d,C=h){const g={...o};let E=Math.min(m,d),z=Math.min(w,h),_=Math.min(D,d),N=Math.min(C,h);s&&(s>1?(E=w?w*s:E,z=E/s,_=D*s):(z=m?m/s:z,E=z*s,N=C/s)),g.y<0&&(g.height=Math.max(g.height+g.y,z),g.y=0),g.x<0&&(g.width=Math.max(g.width+g.x,E),g.x=0);const O=d-(g.x+g.width);O<0&&(g.x=Math.min(g.x,d-E),g.width+=O);const G=h-(g.y+g.height);if(G<0&&(g.y=Math.min(g.y,h-z),g.height+=G),g.width<E&&((f==="sw"||f=="nw")&&(g.x-=E-g.width),g.width=E),g.height<z&&((f==="nw"||f=="ne")&&(g.y-=z-g.height),g.height=z),g.width>_&&((f==="sw"||f=="nw")&&(g.x-=_-g.width),g.width=_),g.height>N&&((f==="nw"||f=="ne")&&(g.y-=N-g.height),g.height=N),s){const ie=g.width/g.height;if(ie<s){const Q=Math.max(g.width/s,z);(f==="nw"||f=="ne")&&(g.y-=Q-g.height),g.height=Q}else if(ie>s){const Q=Math.max(g.height*s,E);(f==="sw"||f=="nw")&&(g.x-=Q-g.width),g.width=Q}}return g}function ny(o,s,f,d){const h={...o};return s==="ArrowLeft"?d==="nw"?(h.x-=f,h.y-=f,h.width+=f,h.height+=f):d==="w"?(h.x-=f,h.width+=f):d==="sw"?(h.x-=f,h.width+=f,h.height+=f):d==="ne"?(h.y+=f,h.width-=f,h.height-=f):d==="e"?h.width-=f:d==="se"&&(h.width-=f,h.height-=f):s==="ArrowRight"&&(d==="nw"?(h.x+=f,h.y+=f,h.width-=f,h.height-=f):d==="w"?(h.x+=f,h.width-=f):d==="sw"?(h.x+=f,h.width-=f,h.height-=f):d==="ne"?(h.y-=f,h.width+=f,h.height+=f):d==="e"?h.width+=f:d==="se"&&(h.width+=f,h.height+=f)),s==="ArrowUp"?d==="nw"?(h.x-=f,h.y-=f,h.width+=f,h.height+=f):d==="n"?(h.y-=f,h.height+=f):d==="ne"?(h.y-=f,h.width+=f,h.height+=f):d==="sw"?(h.x+=f,h.width-=f,h.height-=f):d==="s"?h.height-=f:d==="se"&&(h.width-=f,h.height-=f):s==="ArrowDown"&&(d==="nw"?(h.x+=f,h.y+=f,h.width-=f,h.height-=f):d==="n"?(h.y+=f,h.height-=f):d==="ne"?(h.y+=f,h.width-=f,h.height-=f):d==="sw"?(h.x-=f,h.width+=f,h.height+=f):d==="s"?h.height+=f:d==="se"&&(h.width+=f,h.height+=f)),h}const li={capture:!0,passive:!1};let ay=0;const Pa=class Zn extends v.PureComponent{constructor(){super(...arguments),Et(this,"docMoveBound",!1),Et(this,"mouseDownOnCrop",!1),Et(this,"dragStarted",!1),Et(this,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),Et(this,"componentRef",v.createRef()),Et(this,"mediaRef",v.createRef()),Et(this,"resizeObserver"),Et(this,"initChangeCalled",!1),Et(this,"instanceId",`rc-${ay++}`),Et(this,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),Et(this,"onCropPointerDown",s=>{const{crop:f,disabled:d}=this.props,h=this.getBox();if(!f)return;const m=Ia(f,h.width,h.height);if(d)return;s.cancelable&&s.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const w=s.target.dataset.ord,D=!!w;let C=s.clientX,g=s.clientY,E=m.x,z=m.y;if(w){const _=s.clientX-h.x,N=s.clientY-h.y;let O=0,G=0;w==="ne"||w=="e"?(O=_-(m.x+m.width),G=N-m.y,E=m.x,z=m.y+m.height):w==="se"||w==="s"?(O=_-(m.x+m.width),G=N-(m.y+m.height),E=m.x,z=m.y):w==="sw"||w=="w"?(O=_-m.x,G=N-(m.y+m.height),E=m.x+m.width,z=m.y):(w==="nw"||w=="n")&&(O=_-m.x,G=N-m.y,E=m.x+m.width,z=m.y+m.height),C=E+h.x+O,g=z+h.y+G}this.evData={startClientX:C,startClientY:g,startCropX:E,startCropY:z,clientX:s.clientX,clientY:s.clientY,isResize:D,ord:w},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})}),Et(this,"onComponentPointerDown",s=>{const{crop:f,disabled:d,locked:h,keepSelection:m,onChange:w}=this.props,D=this.getBox();if(d||h||m&&f)return;s.cancelable&&s.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const C=s.clientX-D.x,g=s.clientY-D.y,E={unit:"px",x:C,y:g,width:0,height:0};this.evData={startClientX:s.clientX,startClientY:s.clientY,startCropX:C,startCropY:g,clientX:s.clientX,clientY:s.clientY,isResize:!0},this.mouseDownOnCrop=!0,w(Ia(E,D.width,D.height),ai(E,D.width,D.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}),Et(this,"onDocPointerMove",s=>{const{crop:f,disabled:d,onChange:h,onDragStart:m}=this.props,w=this.getBox();if(d||!f||!this.mouseDownOnCrop)return;s.cancelable&&s.preventDefault(),this.dragStarted||(this.dragStarted=!0,m&&m(s));const{evData:D}=this;D.clientX=s.clientX,D.clientY=s.clientY;let C;D.isResize?C=this.resizeCrop():C=this.dragCrop(),kp(f,C)||h(Ia(C,w.width,w.height),ai(C,w.width,w.height))}),Et(this,"onComponentKeyDown",s=>{const{crop:f,disabled:d,onChange:h,onComplete:m}=this.props;if(d)return;const w=s.key;let D=!1;if(!f)return;const C=this.getBox(),g=this.makePixelCrop(C),E=(navigator.platform.match("Mac")?s.metaKey:s.ctrlKey)?Zn.nudgeStepLarge:s.shiftKey?Zn.nudgeStepMedium:Zn.nudgeStep;if(w==="ArrowLeft"?(g.x-=E,D=!0):w==="ArrowRight"?(g.x+=E,D=!0):w==="ArrowUp"?(g.y-=E,D=!0):w==="ArrowDown"&&(g.y+=E,D=!0),D){s.cancelable&&s.preventDefault(),g.x=ni(g.x,0,C.width-g.width),g.y=ni(g.y,0,C.height-g.height);const z=Ia(g,C.width,C.height),_=ai(g,C.width,C.height);h(z,_),m&&m(z,_)}}),Et(this,"onHandlerKeyDown",(s,f)=>{const{aspect:d=0,crop:h,disabled:m,minWidth:w=0,minHeight:D=0,maxWidth:C,maxHeight:g,onChange:E,onComplete:z}=this.props,_=this.getBox();if(m||!h)return;if(s.key==="ArrowUp"||s.key==="ArrowDown"||s.key==="ArrowLeft"||s.key==="ArrowRight")s.stopPropagation(),s.preventDefault();else return;const N=(navigator.platform.match("Mac")?s.metaKey:s.ctrlKey)?Zn.nudgeStepLarge:s.shiftKey?Zn.nudgeStepMedium:Zn.nudgeStep,O=Ia(h,_.width,_.height),G=ny(O,s.key,N,f),ie=zp(G,d,f,_.width,_.height,w,D,C,g);if(!kp(h,ie)){const Q=ai(ie,_.width,_.height);E(ie,Q),z&&z(ie,Q)}}),Et(this,"onDocPointerDone",s=>{const{crop:f,disabled:d,onComplete:h,onDragEnd:m}=this.props,w=this.getBox();this.unbindDocMove(),!(d||!f)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,m&&m(s),h&&h(Ia(f,w.width,w.height),ai(f,w.width,w.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),Et(this,"onDragFocus",()=>{var s;(s=this.componentRef.current)==null||s.scrollTo(0,0)})}get document(){return document}getBox(){const s=this.mediaRef.current;if(!s)return{x:0,y:0,width:0,height:0};const{x:f,y:d,width:h,height:m}=s.getBoundingClientRect();return{x:f,y:d,width:h,height:m}}componentDidUpdate(s){const{crop:f,onComplete:d}=this.props;if(d&&!s.crop&&f){const{width:h,height:m}=this.getBox();h&&m&&d(Ia(f,h,m),ai(f,h,m))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,li),this.document.addEventListener("pointerup",this.onDocPointerDone,li),this.document.addEventListener("pointercancel",this.onDocPointerDone,li),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,li),this.document.removeEventListener("pointerup",this.onDocPointerDone,li),this.document.removeEventListener("pointercancel",this.onDocPointerDone,li),this.docMoveBound=!1)}getCropStyle(){const{crop:s}=this.props;if(s)return{top:`${s.y}${s.unit}`,left:`${s.x}${s.unit}`,width:`${s.width}${s.unit}`,height:`${s.height}${s.unit}`}}dragCrop(){const{evData:s}=this,f=this.getBox(),d=this.makePixelCrop(f),h=s.clientX-s.startClientX,m=s.clientY-s.startClientY;return d.x=ni(s.startCropX+h,0,f.width-d.width),d.y=ni(s.startCropY+m,0,f.height-d.height),d}getPointRegion(s,f,d,h){const{evData:m}=this,w=m.clientX-s.x,D=m.clientY-s.y;let C;h&&f?C=f==="nw"||f==="n"||f==="ne":C=D<m.startCropY;let g;return d&&f?g=f==="nw"||f==="w"||f==="sw":g=w<m.startCropX,g?C?"nw":"sw":C?"ne":"se"}resolveMinDimensions(s,f,d=0,h=0){const m=Math.min(d,s.width),w=Math.min(h,s.height);return!f||!m&&!w?[m,w]:f>1?m?[m,m/f]:[w*f,w]:w?[w*f,w]:[m,m/f]}resizeCrop(){const{evData:s}=this,{aspect:f=0,maxWidth:d,maxHeight:h}=this.props,m=this.getBox(),[w,D]=this.resolveMinDimensions(m,f,this.props.minWidth,this.props.minHeight);let C=this.makePixelCrop(m);const g=this.getPointRegion(m,s.ord,w,D),E=s.ord||g;let z=s.clientX-s.startClientX,_=s.clientY-s.startClientY;(w&&E==="nw"||E==="w"||E==="sw")&&(z=Math.min(z,-w)),(D&&E==="nw"||E==="n"||E==="ne")&&(_=Math.min(_,-D));const N={unit:"px",x:0,y:0,width:0,height:0};g==="ne"?(N.x=s.startCropX,N.width=z,f?(N.height=N.width/f,N.y=s.startCropY-N.height):(N.height=Math.abs(_),N.y=s.startCropY-N.height)):g==="se"?(N.x=s.startCropX,N.y=s.startCropY,N.width=z,f?N.height=N.width/f:N.height=_):g==="sw"?(N.x=s.startCropX+z,N.y=s.startCropY,N.width=Math.abs(z),f?N.height=N.width/f:N.height=_):g==="nw"&&(N.x=s.startCropX+z,N.width=Math.abs(z),f?(N.height=N.width/f,N.y=s.startCropY-N.height):(N.height=Math.abs(_),N.y=s.startCropY+_));const O=zp(N,f,g,m.width,m.height,w,D,d,h);return f||Zn.xyOrds.indexOf(E)>-1?C=O:Zn.xOrds.indexOf(E)>-1?(C.x=O.x,C.width=O.width):Zn.yOrds.indexOf(E)>-1&&(C.y=O.y,C.height=O.height),C.x=ni(C.x,0,m.width-C.width),C.y=ni(C.y,0,m.height-C.height),C}renderCropSelection(){const{ariaLabels:s=Zn.defaultProps.ariaLabels,disabled:f,locked:d,renderSelectionAddon:h,ruleOfThirds:m,crop:w}=this.props,D=this.getCropStyle();if(w)return rt.createElement("div",{style:D,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":s.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!f&&!d&&rt.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},rt.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),rt.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),rt.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),rt.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),rt.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":s.nwDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"nw"),role:"button"}),rt.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":s.nDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"n"),role:"button"}),rt.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":s.neDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"ne"),role:"button"}),rt.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":s.eDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"e"),role:"button"}),rt.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":s.seDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"se"),role:"button"}),rt.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":s.sDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"s"),role:"button"}),rt.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":s.swDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"sw"),role:"button"}),rt.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":s.wDragHandle,onKeyDown:C=>this.onHandlerKeyDown(C,"w"),role:"button"})),h&&rt.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:C=>C.stopPropagation()},h(this.state)),m&&rt.createElement(rt.Fragment,null,rt.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),rt.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(s){const f={...Br,...this.props.crop||{}};return Ia(f,s.width,s.height)}render(){const{aspect:s,children:f,circularCrop:d,className:h,crop:m,disabled:w,locked:D,style:C,ruleOfThirds:g}=this.props,{cropIsActive:E,newCropIsBeingDrawn:z}=this.state,_=m?this.renderCropSelection():null,N=ty("ReactCrop",h,E&&"ReactCrop--active",w&&"ReactCrop--disabled",D&&"ReactCrop--locked",z&&"ReactCrop--new-crop",m&&s&&"ReactCrop--fixed-aspect",m&&d&&"ReactCrop--circular-crop",m&&g&&"ReactCrop--rule-of-thirds",!this.dragStarted&&m&&!m.width&&!m.height&&"ReactCrop--invisible-crop",d&&"ReactCrop--no-animate");return rt.createElement("div",{ref:this.componentRef,className:N,style:C},rt.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},f),m?rt.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},rt.createElement("defs",null,rt.createElement("mask",{id:`hole-${this.instanceId}`},rt.createElement("rect",{width:"100%",height:"100%",fill:"white"}),d?rt.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"}):rt.createElement("rect",{x:`${m.x}${m.unit}`,y:`${m.y}${m.unit}`,width:`${m.width}${m.unit}`,height:`${m.height}${m.unit}`,fill:"black"}))),rt.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,_)}};Et(Pa,"xOrds",["e","w"]),Et(Pa,"yOrds",["n","s"]),Et(Pa,"xyOrds",["nw","ne","se","sw"]),Et(Pa,"nudgeStep",1),Et(Pa,"nudgeStepMedium",10),Et(Pa,"nudgeStepLarge",100),Et(Pa,"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 ly=Pa;const iy=ln`
86
+ from { opacity: 0; }
87
+ to { opacity: 1; }
88
+ `,be={overlay:y("position:fixed;inset:0;z-index:10001;display:flex;background:transparent;animation:",iy," 0.15s ease-out;font-family:",ci,";",""),container:y(Sl," display:flex;flex:1;margin:24px;background:",c.surface,";border:1px solid ",c.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:",c.background,";overflow:hidden;.ReactCrop__crop-selection{border:2px solid ",c.primary,";}",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},closeBtn:y("padding:8px;background:",c.surface,";border:1px solid ",c.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:",c.surfaceHover,";border-color:",c.borderHover,";}",""),closeIcon:y("width:20px;height:20px;color:",c.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:",B.sm,";pointer-events:none;white-space:nowrap;",""),successBanner:y("position:absolute;top:24px;left:50%;transform:translateX(-50%);background:#22c55e;color:#fff;padding:12px 24px;border-radius:8px;font-size:",B.sm,";font-weight:600;pointer-events:none;z-index:10;animation:fadeInOut 3s ease-in-out forwards;@keyframes fadeInOut{0%{opacity:0;transform:translateX(-50%) scale(0.9);}10%{opacity:1;transform:translateX(-50%) scale(1);}90%{opacity:1;transform:translateX(-50%) scale(1);}100%{opacity:0;transform:translateX(-50%) scale(0.9);}}",""),cropWrapper:{name:"12wysvm",styles:"max-width:100%;max-height:calc(100vh - 150px);img{max-width:100%;max-height:calc(100vh - 150px);display:block;}"},sidebar:y("width:280px;background:",c.surface,";border-left:1px solid ",c.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:y("padding:16px 20px;border-bottom:1px solid ",c.border,";",""),sidebarTitle:y("font-size:",B.base,";font-weight:600;color:",c.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:",B.sm,";font-weight:600;color:",c.text,";",""),subSectionLabel:y("font-size:",B.xs,";font-weight:500;color:",c.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:",B.sm,";border:1px solid ",c.border,";background:",c.surface,";color:",c.text,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover:not(:disabled){background-color:",c.surfaceHover,";border-color:",c.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),aspectBtnActive:y("background-color:",c.primary,";border-color:",c.primary,";color:white;&:hover:not(:disabled){background-color:",c.primary,";border-color:",c.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:",B.sm,";font-weight:500;background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",c.text,";&:hover:not(:disabled){background-color:",c.surfaceHover,";border-color:",c.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),rotateIcon:{name:"157xhr7",styles:"width:16px;height:16px"},rotatePreview:y("width:80px;height:80px;border:1px solid ",c.border,";border-radius:6px;overflow:hidden;display:flex;align-items:center;justify-content:center;background:",c.background,";margin:8px auto;img{max-width:100%;max-height:100%;object-fit:contain;transition:transform 0.3s ease;}",""),resizeRow:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},resizeInput:y("width:80px;min-width:0;padding:8px 6px;font-size:",B.sm,";border:1px solid ",c.border,";border-radius:6px;background:",c.surface,";color:",c.text,";text-align:center;&:focus{outline:none;border-color:",c.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;background:",c.surfaceHover,";}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}-moz-appearance:textfield;",""),resizeX:y("font-size:",B.sm,";color:",c.textMuted,";",""),qualitySlider:y("width:100%;height:6px;border-radius:3px;background:",c.border,";outline:none;cursor:pointer;&::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:",c.primary,";cursor:pointer;}&::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:",c.primary,";cursor:pointer;border:none;}",""),qualityRow:{name:"uh5xjc",styles:"display:flex;align-items:center;gap:12px"},qualityValue:y("min-width:40px;font-size:",B.sm,";color:",c.text,";text-align:right;",""),fileSize:y("font-size:",B.sm,";color:",c.textMuted,";padding:8px 0;",""),sidebarFooter:y("padding:16px 20px;border-top:1px solid ",c.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:",B.base,";font-weight:500;background:",c.primary,";border:1px solid ",c.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:white;&:hover:not(:disabled){background-color:",c.primaryHover,";border-color:",c.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:",B.base,";font-weight:500;background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",c.text,";&:hover{background-color:",c.surfaceHover,";border-color:",c.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:",B.xs,";color:",c.textMuted,";font-style:italic;",""),clearBtn:y("margin-top:8px;padding:6px 12px;font-size:",B.xs,";color:",c.textSecondary,";background:transparent;border:1px solid ",c.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;&:hover{background:",c.surfaceHover,";color:",c.text,";}","")},oy=[{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 ry(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(2)} MB`}function sy({imagePath:o,imageSrc:s,dimensions:f,fileSize:d,onClose:h,onSaveComplete:m,triggerRefresh:w}){const D=v.useRef(null),[C,g]=v.useState(),[E,z]=v.useState(),[_,N]=v.useState(void 0),[O,G]=v.useState(f.width),[ie,Q]=v.useState(f.height),[re,ne]=v.useState(!1),[ue,V]=v.useState(!1),[P,I]=v.useState({width:f.width,height:f.height}),[te,j]=v.useState(1),[K,fe]=v.useState(!1),[$,ae]=v.useState(0),[W,ve]=v.useState(!1),T=O!==P.width||ie!==P.height,[J,F]=v.useState(0),[Me,qe]=v.useState(0),[S,U]=v.useState(!1),[ee,oe]=v.useState(0),[Ce,Ee]=v.useState(null),[Ye,xt]=v.useState(d),[Re,on]=v.useState(95),[$e,ut]=v.useState(0),mt=$e!==0,Xt=Le=>{const we=Le.currentTarget,{naturalWidth:We,naturalHeight:yt,width:Ge,height:ze}=we;I({width:We,height:yt}),j(We/Ge),V(!0),G(We),Q(yt)},Ht=()=>{if(!ue||!D.current||K||T||mt)return;const Le=D.current.width,we=D.current.height;if(fe(!0),_){const We=Le/we;let yt,Ge;_>We?(yt=100,Ge=We/_*100):(Ge=100,yt=_/We*100);const ze={unit:"%",x:(100-yt)/2,y:(100-Ge)/2,width:yt,height:Ge};g(ze);const St={unit:"px",x:Math.round(ze.x/100*Le),y:Math.round(ze.y/100*we),width:Math.round(ze.width/100*Le),height:Math.round(ze.height/100*we)};z(St)}else g({unit:"%",x:0,y:0,width:100,height:100}),z({unit:"px",x:0,y:0,width:Le,height:we})},rn=()=>{fe(!1),g(void 0),z(void 0)};v.useEffect(()=>{if(E&&ue&&te>0){const Le=Math.round(E.width*te),we=Math.round(E.height*te);F(Le),qe(we)}else K||(F(0),qe(0))},[E,ue,te,K]);const Pt=()=>{ut(Le=>(Le+90)%360)},vn=()=>{ut(Le=>(Le-90+360)%360)},en=()=>{ut(0)},dt=()=>{W&&m({name:o.split("/").pop()||"",path:o,type:"file",dimensions:P}),h()},Qt=Le=>{if(N(Le),!ue||!D.current)return;const we=D.current.width,We=D.current.height;if(Le){const yt=we/We;let Ge,ze;Le>yt?(Ge=100,ze=yt/Le*100):(ze=100,Ge=Le/yt*100);const St={unit:"%",x:(100-Ge)/2,y:(100-ze)/2,width:Ge,height:ze};g(St);const Tt={unit:"px",x:Math.round(St.x/100*we),y:Math.round(St.y/100*We),width:Math.round(St.width/100*we),height:Math.round(St.height/100*We)};z(Tt)}else g({unit:"%",x:0,y:0,width:100,height:100}),z({unit:"px",x:0,y:0,width:we,height:We})},zt=P.width/P.height,za=Le=>{if(K)return;const we=parseInt(Le.target.value)||0;G(we),we>0&&Q(Math.round(we/zt))},Bt=Le=>{if(K)return;const we=parseInt(Le.target.value)||0;Q(we),we>0&&G(Math.round(we*zt))},xn=()=>{G(P.width),Q(P.height)},aa=Le=>{if(!E||!D.current)return;const we=parseInt(Le.target.value)||0;if(we<=0)return;let We=Me;_&&(We=Math.round(we/_));const yt=we/te,Ge=We/te,ze={unit:"px",x:E.x,y:E.y,width:yt,height:Ge},St=D.current.width-ze.x,Tt=D.current.height-ze.y;ze.width=Math.min(yt,St),ze.height=Math.min(Ge,Tt),z(ze),g({unit:"px",x:ze.x,y:ze.y,width:ze.width,height:ze.height})},De=Le=>{if(!E||!D.current)return;const we=parseInt(Le.target.value)||0;if(we<=0)return;let We=J;_&&(We=Math.round(we*_));const yt=We/te,Ge=we/te,ze={unit:"px",x:E.x,y:E.y,width:yt,height:Ge},St=D.current.width-ze.x,Tt=D.current.height-ze.y;ze.width=Math.min(yt,St),ze.height=Math.min(Ge,Tt),z(ze),g({unit:"px",x:ze.x,y:ze.y,width:ze.width,height:ze.height})},un=async()=>{if(ue){ne(!0);try{const Le=E?{x:Math.round(E.x*te),y:Math.round(E.y*te),width:Math.round(E.width*te),height:Math.round(E.height*te)}:{x:0,y:0,width:P.width,height:P.height};let we=K?J:T?O:P.width,We=K?Me:T?ie:P.height;if($e===90||$e===270){const ze=we;we=We,We=ze}const Ge=await(await fetch("/api/studio/edit-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:o,crop:Le,rotation:$e,resize:{width:we,height:We},quality:Re})})).json();Ge.success?(w(),m(Ge.updatedItem),I({width:Ge.dimensions.width,height:Ge.dimensions.height}),G(Ge.dimensions.width),Q(Ge.dimensions.height),Ge.updatedItem?.size&&xt(Ge.updatedItem.size),fe(!1),g(void 0),z(void 0),ut(0),ve(!0),ae(Date.now()),oe(ze=>ze+1),U(!0),setTimeout(()=>U(!1),3e3)):(console.error("Edit failed:",Ge.error),Ee(Ge.error||"Failed to save image"))}catch(Le){console.error("Edit error:",Le),Ee("An error occurred while saving the image")}finally{ne(!1)}}};return b("div",{css:be.overlay,children:[b("div",{css:be.container,children:[b("div",{css:be.main,children:[r("div",{css:be.headerButtons,children:r("button",{css:be.closeBtn,onClick:dt,children:r("svg",{css:be.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})}),b("div",{css:be.rotationWrapper,onClick:Ht,children:[r(ly,{crop:K?C:void 0,onChange:Le=>g(Le),onComplete:Le=>z(Le),aspect:_,css:be.cropWrapper,disabled:!K,children:r("img",{ref:D,src:$?`${s}?v=${$}`:s,alt:"Edit",onLoad:Xt,style:{cursor:K?"crosshair":"pointer"}})}),!K&&ue&&r("div",{css:be.cropHint,children:mt?"Save rotation first to enable crop":T?"Save resize first to enable crop":"Click to enable crop selection"}),S&&r("div",{css:be.successBanner,children:"Image updated"},ee)]})]}),b("div",{css:be.sidebar,children:[r("div",{css:be.sidebarHeader,children:r("h2",{css:be.sidebarTitle,children:"Edit Image"})}),b("div",{css:be.sidebarContent,children:[b("div",{css:be.section,children:[r("span",{css:be.sectionLabel,children:"Crop Selection"}),r("span",{css:be.subSectionLabel,children:"Aspect Ratio"}),r("div",{css:be.aspectButtons,children:oy.map(Le=>r("button",{css:[be.aspectBtn,_===Le.value&&be.aspectBtnActive,"",""],onClick:()=>Qt(Le.value),disabled:T||mt,children:Le.label},Le.label))}),K&&b(nt,{children:[r("span",{css:be.subSectionLabel,children:"Selection Size"}),b("div",{css:be.resizeRow,children:[r("input",{type:"number",css:be.resizeInput,value:J,onChange:aa,min:1}),r("span",{css:be.resizeX,children:"×"}),r("input",{type:"number",css:be.resizeInput,value:Me,onChange:De,min:1}),r("span",{css:be.resizeX,children:"px"})]})]}),r("p",{css:be.hint,children:mt?"Save rotation first to enable crop":T?"Save resize first to enable crop":K?"Drag corners to resize crop area":"Click image to enable crop"}),K&&r("button",{css:be.clearBtn,onClick:rn,children:"Clear Selection"})]}),b("div",{css:be.section,children:[r("span",{css:be.sectionLabel,children:"Rotation"}),r("div",{css:be.rotatePreview,children:r("img",{src:$?`${s}?v=${$}`:s,alt:"Rotation preview",style:{transform:`rotate(${$e}deg)`}})}),b("div",{css:be.rotateButtons,children:[b("button",{css:be.rotateBtn,onClick:vn,disabled:re||K||T,children:[r("svg",{css:be.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),"CCW"]}),b("button",{css:be.rotateBtn,onClick:Pt,disabled:re||K||T,children:[r("svg",{css:be.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 10h-10a8 8 0 00-8 8v2M21 10l-6 6m6-6l-6-6"})}),"CW"]})]}),mt&&r("button",{css:be.clearBtn,onClick:en,children:"Reset Rotation"}),r("p",{css:be.hint,children:K||T?"Save other changes first to rotate":mt?"Click Save Changes to apply rotation":"Preview rotation before saving"})]}),b("div",{css:be.section,children:[r("span",{css:be.sectionLabel,children:"Resize Image"}),b("div",{css:be.resizeRow,children:[r("input",{type:"number",css:be.resizeInput,value:O,onChange:za,min:1,disabled:K||mt}),r("span",{css:be.resizeX,children:"×"}),r("input",{type:"number",css:be.resizeInput,value:ie,onChange:Bt,min:1,disabled:K||mt}),r("span",{css:be.resizeX,children:"px"})]}),T&&!K&&!mt&&r("button",{css:be.clearBtn,onClick:xn,children:"Reset to Original"}),mt?r("p",{css:be.hint,children:"Save rotation first to resize"}):K?r("p",{css:be.hint,children:"Clear crop selection to resize"}):T?r("p",{css:be.hint,children:"Save to apply resize, then crop"}):r("p",{css:be.hint,children:"Maintains aspect ratio"})]}),b("div",{css:be.section,children:[r("span",{css:be.sectionLabel,children:"Quality"}),b("div",{css:be.qualityRow,children:[r("input",{type:"range",css:be.qualitySlider,min:1,max:100,value:Re,onChange:Le=>on(parseInt(Le.target.value))}),b("span",{css:be.qualityValue,children:[Re,"%"]})]}),r("p",{css:be.hint,children:"Lower quality = smaller file size"})]}),b("div",{css:be.section,children:[r("span",{css:be.sectionLabel,children:"File Size"}),r("p",{css:be.fileSize,children:ry(Ye)})]})]}),b("div",{css:be.sidebarFooter,children:[r("button",{css:be.actionBtn,onClick:un,disabled:re||!ue,children:re?b(nt,{children:[r("span",{css:be.spinner}),"Saving..."]}):"Save Changes"}),r("button",{css:be.cancelBtn,onClick:dt,disabled:re,children:"Close"})]})]})]}),Ce&&r(pu,{title:"Error",message:Ce,onClose:()=>Ee(null)})]})}const cy=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],uy=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function dy(o){const s=o.toLowerCase().substring(o.lastIndexOf("."));return cy.includes(s)}function fy(o){const s=o.toLowerCase().substring(o.lastIndexOf("."));return uy.includes(s)}const ce={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:",c.surface,";border:1px solid ",c.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:",c.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:",c.surface,";border:1px solid ",c.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:",c.surfaceHover,";border-color:",c.borderHover,";}",""),copyIcon:y("width:20px;height:20px;color:",c.textSecondary,";",""),statusIcon:y("display:flex;align-items:center;justify-content:center;padding:8px;background:",c.surface,";border:1px solid ",c.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:",c.surface,";border:1px solid ",c.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:",c.surfaceHover,";border-color:",c.borderHover,";}",""),mainCloseIcon:y("width:20px;height:20px;color:",c.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:",c.surface,";border-radius:12px;border:1px solid ",c.border,";",""),fileIcon:y("width:80px;height:80px;color:",c.textMuted,";margin-bottom:16px;",""),fileName:y("font-size:",B.lg,";font-weight:600;color:",c.text,";margin:0;",""),sidebar:y("width:280px;background:",c.surface,";border-left:1px solid ",c.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:y("padding:16px 20px;border-bottom:1px solid ",c.border,";",""),sidebarTitle:y("font-size:",B.base,";font-weight:600;color:",c.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:",B.sm,";",""),infoLabel:y("color:",c.textSecondary,";",""),infoValue:y("color:",c.text,";font-weight:500;text-align:right;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),infoValueWrap:y("color:",c.text,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;",""),infoLink:y("color:",c.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:",c.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:",B.base,";font-weight:500;background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",c.text,";text-align:left;&:hover:not(:disabled){background-color:",c.surfaceHover,";border-color:",c.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),actionBtnDanger:y("color:",c.danger,";&:hover:not(:disabled){background-color:",c.dangerLight,";border-color:",c.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 hy(){const{focusedItem:o,setFocusedItem:s,triggerRefresh:f,fileItems:d,setEditedImageKey:h,requestDelete:m,requestMove:w,requestSync:D,requestDownload:C,requestProcess:g,setProcessMode:E,actionState:z}=ri(),[_,N]=v.useState(!1),[O,G]=v.useState(!1),[ie,Q]=v.useState({current:0,total:1,percent:0,status:"processing",message:"Renaming..."}),[re,ne]=v.useState(!1),[ue,V]=v.useState(null),[P,I]=v.useState(!1),[te,j]=v.useState(!1),[K,fe]=v.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),[$,ae]=v.useState(!1),[W,ve]=v.useState(0),T=z.showProgress,J=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.isCloud||o.hasUpdate),Me=ut=>{s(ut),ve(Date.now()),h(ut.path)};if(!o)return null;const qe=dy(o.name),S=fy(o.name),U="/"+o.path.replace(/^public\//,""),ee=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${U}`:U,oe=W?`${ee}?v=${W}`:ee,Ce=typeof window<"u"?window.location.origin:"",Ee=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${U}`:`${Ce}${U}`,Ye=()=>{s(null)},xt=()=>{navigator.clipboard.writeText(Ee),I(!0),setTimeout(()=>I(!1),1500)},Re=async ut=>{if(ut&&ut!==o.name){N(!1),G(!0),Q({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});try{const mt=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:o.path,newName:ut})});if(!mt.body)throw new Error("No response body");const Xt=mt.body.getReader(),Ht=new TextDecoder;let rn="",Pt="";for(;;){const{done:vn,value:en}=await Xt.read();if(vn)break;rn+=Ht.decode(en,{stream:!0});const dt=rn.split(`
89
+ `);rn=dt.pop()||"";for(const Qt of dt){if(!Qt.startsWith("data: "))continue;const zt=JSON.parse(Qt.slice(6));zt.type==="start"?Q({current:0,total:zt.total,percent:0,status:"processing",message:zt.message}):zt.type==="progress"?Q({current:zt.current,total:zt.total,percent:Math.round(zt.current/zt.total*100),status:"processing",message:zt.message}):zt.type==="complete"?(Pt=zt.newPath,Q({current:zt.renamed,total:zt.renamed,percent:100,status:"complete",message:"Renamed successfully"})):zt.type==="error"&&(Q(za=>({...za,status:"error",message:zt.message})),V({title:"Rename Failed",message:zt.message}))}}Pt&&(s({...o,path:Pt,name:Pt.split("/").pop()||ut}),f())}catch(mt){console.error("Rename error:",mt),Q(Xt=>({...Xt,status:"error",message:"Failed to rename"})),V({title:"Rename Failed",message:"An error occurred while renaming the file"})}}},on=async()=>{if(o){j(!0),fe({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."});try{const ut=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+o.path.replace(/^public\//,"")})});if(!ut.ok){const Ht=await ut.json();fe({current:0,total:3,percent:0,status:"error",message:Ht.error||"Failed to generate favicons"});return}const mt=ut.body?.getReader(),Xt=new TextDecoder;if(mt){let Ht="";for(;;){const{done:rn,value:Pt}=await mt.read();if(rn)break;Ht+=Xt.decode(Pt,{stream:!0});const vn=Ht.split(`
90
+ `);Ht=vn.pop()||"";for(const en of vn)if(en.startsWith("data: "))try{const dt=JSON.parse(en.slice(6));dt.type==="start"?fe(Qt=>({...Qt,total:dt.total})):dt.type==="progress"?fe({current:dt.current,total:dt.total,percent:dt.percent,status:"processing",message:dt.message}):dt.type==="complete"?fe({current:dt.processed,total:dt.processed,percent:100,status:dt.errors>0?"error":"complete",message:dt.message}):dt.type==="error"&&fe(Qt=>({...Qt,status:"error",message:dt.message}))}catch{}}}}catch(ut){console.error("Favicon generation error:",ut),fe({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},$e=()=>qe?r("img",{css:ce.image,src:oe,alt:o.name}):S?r("video",{css:ce.video,src:oe,controls:!0}):b("div",{css:ce.filePlaceholder,children:[r("svg",{css:ce.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}),r("p",{css:ce.fileName,children:o.name})]});return b(nt,{children:[ue&&r(pu,{title:ue.title,message:ue.message,onClose:()=>V(null)}),r(Gp,{isOpen:re,onClose:()=>ne(!1)}),_&&r(Ur,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:o.name,placeholder:"Enter new filename",confirmLabel:"Rename",onConfirm:Re,onCancel:()=>N(!1)}),O&&r(xl,{title:"Renaming",progress:ie,onClose:()=>{G(!1),f()}}),te&&r(xl,{title:"Generating Favicons",progress:K,onClose:()=>j(!1)}),r("div",{css:ce.overlay,onClick:Ye,children:b("div",{css:ce.container,onClick:ut=>ut.stopPropagation(),children:[b("div",{css:ce.main,children:[b("div",{css:ce.headerButtons,children:[o.cdnPushed&&!o.isRemote&&r("span",{css:ce.statusIcon,title:"Pushed to CDN",children:r("svg",{css:ce.cloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}),o.isRemote&&r("span",{css:ce.statusIcon,title:"Remote image",children:r("svg",{css:ce.globeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})})}),b("button",{css:ce.copyBtn,onClick:xt,title:"Copy file path",children:[P&&r("span",{css:ce.tooltip,children:"Copied!"}),r("svg",{css:ce.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),r("button",{css:ce.mainCloseBtn,onClick:Ye,"aria-label":"Close",children:r("svg",{css:ce.mainCloseIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),r("div",{css:ce.mediaWrapper,children:$e()})]}),b("div",{css:ce.sidebar,children:[r("div",{css:ce.sidebarHeader,children:r("h3",{css:ce.sidebarTitle,children:"Details"})}),b("div",{css:ce.sidebarContent,children:[b("div",{css:ce.info,children:[b("div",{css:ce.infoRow,children:[r("span",{css:ce.infoLabel,children:"Name"}),r("span",{css:ce.infoValueWrap,children:o.name})]}),b("div",{css:ce.infoRow,children:[r("span",{css:ce.infoLabel,children:"Path"}),r("span",{css:ce.infoValueWrap,children:o.path.replace(/^public\//,"")})]}),o.size!==void 0&&b("div",{css:ce.infoRow,children:[r("span",{css:ce.infoLabel,children:"Size"}),r("span",{css:ce.infoValue,children:py(o.size)})]}),o.dimensions&&b("div",{css:ce.infoRow,children:[r("span",{css:ce.infoLabel,children:"Dimensions"}),b("span",{css:ce.infoValue,children:[o.dimensions.width," × ",o.dimensions.height]})]}),(o.hasSm||o.hasMd||o.hasLg||o.hasFull)&&b("div",{css:ce.infoRow,children:[r("span",{css:ce.infoLabel,children:"Thumbnails"}),r("span",{css:ce.infoValue,children:b("span",{css:ce.thumbChips,children:[o.hasSm&&r("span",{css:ce.thumbChip,children:"SM"}),o.hasMd&&r("span",{css:ce.thumbChip,children:"MD"}),o.hasLg&&r("span",{css:ce.thumbChip,children:"LG"}),o.hasFull&&r("span",{css:ce.thumbChip,children:"FULL"})]})})]}),b("div",{css:ce.infoRow,children:[r("span",{css:ce.infoLabel,children:"CDN Status"}),r("span",{css:ce.infoValue,children:o.cdnPushed?o.isRemote?"Remote":"Pushed":"Local"})]}),b("div",{css:ce.infoRow,children:[r("span",{css:ce.infoLabel,children:"URL"}),r("a",{href:Ee,target:"_blank",rel:"noopener noreferrer",css:ce.infoLink,title:Ee,children:Ee})]})]}),b("div",{css:ce.actions,children:[b("button",{css:ce.actionBtn,onClick:()=>N(!0),disabled:o.isProtected,children:[r("svg",{css:ce.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),"Rename"]}),qe&&b("button",{css:ce.actionBtn,onClick:()=>ae(!0),disabled:T||!F,title:F?void 0:"Download image first to edit",children:[r("svg",{css:ce.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14M14 8l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2"})}),F?"Edit Image":"Download to Edit"]}),b("button",{css:ce.actionBtn,onClick:()=>w([o.path]),disabled:T||o.isProtected,children:[r("svg",{css:ce.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})}),"Move"]}),b("button",{css:[ce.actionBtn,ce.actionBtnCloud,"",""],onClick:()=>D([o.path],d),disabled:T||o.isProtected||o.cdnPushed&&!o.isRemote,title:o.cdnPushed&&!o.isRemote?"Already in R2":void 0,children:[r("svg",{css:ce.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),"Push to CDN"]}),b("button",{css:[ce.actionBtn,ce.actionBtnCloud,"",""],onClick:()=>C([o.path],d),disabled:T||!o.cdnPushed||o.isRemote,title:o.cdnPushed?o.isRemote?"Remote image":"Download from CDN to local":"Not on CDN",children:[r("svg",{css:ce.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"})}),"Download from CDN"]}),b("button",{css:ce.actionBtn,onClick:()=>{E("generate"),g([o.path])},disabled:T||o.isProtected,children:[r("svg",{css:ce.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),"Generate Thumbnails"]}),(o.hasSm||o.hasMd||o.hasLg||o.hasFull)&&b("button",{css:ce.actionBtn,onClick:()=>{E("remove"),g([o.path])},disabled:T||o.isProtected,children:[r("svg",{css:ce.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Remove Thumbnails"]}),J&&b("button",{css:ce.actionBtn,onClick:on,disabled:te||o.isProtected,children:[r("svg",{css:ce.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"})}),"Generate Favicons"]}),b("button",{css:[ce.actionBtn,ce.actionBtnDanger,"",""],onClick:()=>m([o.path]),disabled:T||o.isProtected,children:[r("svg",{css:ce.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Delete"]})]})]})]})]})}),$&&o.dimensions&&r(sy,{imagePath:o.path,imageSrc:oe,dimensions:o.dimensions,fileSize:o.size||0,onClose:()=>ae(!1),onSaveComplete:Me,triggerRefresh:f})]})}function py(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}const vl={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:",c.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:",c.danger,";flex-shrink:0;",""),title:y("font-size:",B.lg,";font-weight:600;color:",c.text,";margin:0;",""),message:y("font-size:",B.base,";color:",c.textSecondary,";margin:0 0 20px 0;line-height:1.5;",""),button:y("width:100%;padding:10px 16px;border-radius:6px;font-size:",B.base,";font-weight:500;border:none;background:",c.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",c.primaryHover,";}","")};function my(){const{error:o,clearError:s}=ri();return o?r("div",{css:vl.overlay,onClick:s,children:b("div",{css:vl.modal,onClick:f=>f.stopPropagation(),children:[b("div",{css:vl.header,children:[r("svg",{css:vl.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),r("h3",{css:vl.title,children:o.title})]}),r("p",{css:vl.message,children:o.message}),r("button",{css:vl.button,onClick:s,children:"OK"})]})}):null}const Mp={showProgress:!1,progressTitle:"",progressState:{current:0,total:0,percent:0,status:"processing"},showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1,actionPaths:[],syncImageCount:0,syncHasRemote:!1,syncHasLocal:!1,processMode:"generate",downloadImageCount:0,downloadTotalSelected:0};function gy({triggerRefresh:o,clearSelection:s,setFocusedItem:f,showError:d}){const[h,m]=v.useState(Mp),w=v.useCallback(te=>{m(j=>({...j,progressState:typeof te=="function"?te(j.progressState):{...j.progressState,...te}}))},[]),D=v.useCallback(te=>{m(j=>({...j,showProgress:te}))},[]),C=v.useCallback(te=>{m(j=>({...j,progressTitle:te}))},[]),g=qp({setShowProgress:D,setProgressTitle:C,setProgressState:w,triggerRefresh:o}),E=v.useCallback(te=>{m(j=>({...j,actionPaths:te,showDeleteConfirm:!0}))},[]),z=v.useCallback(te=>{m(j=>({...j,actionPaths:te,showMoveModal:!0}))},[]),_=v.useCallback((te,j)=>{const K=te.map(ae=>"/"+ae.replace(/^public\//,""));let fe=!1,$=!1;for(const ae of te){const W=j.find(ve=>ve.path===ae);W&&(W.isRemote?fe=!0:W.cdnPushed||($=!0))}m(ae=>({...ae,actionPaths:te,syncImageCount:K.length,syncHasRemote:fe,syncHasLocal:$,showSyncConfirm:!0}))},[]),N=v.useCallback((te,j)=>{const K=[];for(const fe of te){const $=j.find(ae=>ae.path===fe);$&&$.cdnPushed&&!$.isRemote&&K.push(fe)}m(fe=>({...fe,actionPaths:K,downloadImageCount:K.length,downloadTotalSelected:te.length,showDownloadConfirm:!0}))},[]),O=v.useCallback(te=>{m(j=>({...j,actionPaths:te,showProcessConfirm:!0}))},[]),G=v.useCallback(te=>{m(j=>({...j,processMode:te}))},[]),ie=v.useCallback(()=>{m(te=>({...te,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),Q=v.useCallback(()=>{m(Mp)},[]),re=v.useCallback(()=>{g.stop()},[g]),ne=v.useCallback(async()=>{const te=h.actionPaths;m(j=>({...j,showDeleteConfirm:!1}));try{const j=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:te})});if(j.ok)s(),f(null),o();else{const K=await j.json();d("Delete Failed",K.error||"Unknown error")}}catch(j){console.error("Delete error:",j),d("Delete Failed","Delete failed. Check console for details.")}},[h.actionPaths,s,f,o,d]),ue=v.useCallback(async te=>{const j=h.actionPaths;m(K=>({...K,showMoveModal:!1})),await g.execute({endpoint:"/api/studio/move",body:{paths:j,destination:te},title:"Moving Files",onComplete:K=>{K.errors&&K.errors>0&&K.errorMessages?.length&&d("Move Failed",K.errorMessages.join(`
91
+ `)),s(),f(null)}})},[h.actionPaths,s,f,d,g]),V=v.useCallback(async()=>{const j=h.actionPaths.map($=>"/"+$.replace(/^public\//,""));m($=>({...$,showSyncConfirm:!1,showProgress:!0,progressTitle:"Pushing to CDN",progressState:{current:0,total:j.length,percent:0,status:"processing",message:"Pushing to CDN..."}}));let K=0;const fe=[];for(let $=0;$<j.length;$++){const ae=j[$];try{const W=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[ae]})});if(W.ok)K++;else{const ve=await W.json();fe.push(`${ae}: ${ve.error||"Unknown error"}`)}}catch(W){fe.push(`${ae}: ${W instanceof Error?W.message:"Unknown error"}`)}w({current:$+1,total:j.length,percent:Math.round(($+1)/j.length*100),status:"processing",message:`Pushed ${ae}`})}w({current:j.length,total:j.length,percent:100,status:fe.length>0?"error":"complete",message:`Pushed ${K} file${K!==1?"s":""}${fe.length>0?`, ${fe.length} error${fe.length!==1?"s":""}`:""}`}),fe.length>0&&d("Push Errors",fe.join(`
92
+ `)),s(),o()},[h.actionPaths,s,o,d,w]),P=v.useCallback(async()=>{const te=h.actionPaths,j=h.processMode,K=te.map(W=>{const ve=W.replace(/^public\//,"");return ve.startsWith("/")?ve:`/${ve}`}),fe=j==="remove",$=fe?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",ae=fe?"Removing Thumbnails":"Generating Thumbnails";m(W=>({...W,showProcessConfirm:!1})),await g.execute({endpoint:$,body:{imageKeys:K},title:ae})},[h.actionPaths,h.processMode,g]),I=v.useCallback(async()=>{const te=h.progressState.orphanedFiles;if(!(!te||te.length===0))try{const j=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:te})});if(j.ok)w(K=>({...K,orphanedFiles:void 0,message:K.message?.replace(/Found \d+ orphaned thumbnail\(s\).*/,"Orphaned thumbnails deleted.")})),o();else{const K=await j.json();d("Delete Failed",K.error||"Failed to delete orphaned files")}}catch(j){console.error("Delete orphans error:",j),d("Delete Failed","Failed to delete orphaned files. Check console for details.")}},[h.progressState.orphanedFiles,o,d,w]);return{actionState:h,setActionState:m,requestDelete:E,requestMove:z,requestSync:_,requestDownload:N,requestProcess:O,setProcessMode:G,cancelAction:ie,closeProgress:Q,stopProcessing:re,confirmDelete:ne,confirmMove:ue,confirmSync:V,confirmProcess:P,deleteOrphans:I}}const yy="36px",Ke={container:{name:"xt6tct",styles:"flex:1;display:flex;flex-direction:column;overflow:hidden"},toolbar:y("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",c.surface,";border-bottom:1px solid ",c.border,";overflow:visible;min-width:0;@media (min-width: 768px){padding:12px 24px;}",""),toolbarLeft:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},toolbarRight:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},btn:y("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",yy,";padding:0 14px;border-radius:6px;font-size:",B.base,";font-weight:500;background:",c.surface,";border:1px solid ",c.border,";cursor:pointer;transition:all 0.15s ease;color:",c.text,";letter-spacing:-0.01em;&:hover:not(:disabled){background-color:",c.surfaceHover,";border-color:",c.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:y("background:",c.primary,";border-color:",c.primary,";color:white;&:hover:not(:disabled){background:",c.primaryHover,";border-color:",c.primaryHover,";}",""),btnIcon:{name:"157xhr7",styles:"width:16px;height:16px"},content:{name:"1ilfm5c",styles:"flex:1;display:flex;overflow:hidden;padding:20px 24px;gap:24px"},leftPanel:{name:"1ny2dco",styles:"flex:2;display:flex;flex-direction:column;overflow:auto"},rightPanel:y("flex:1;display:flex;flex-direction:column;overflow:auto;min-width:280px;max-width:350px;background:",c.surface,";border:1px solid ",c.border,";border-radius:8px;",""),panelHeader:y("padding:12px 16px;font-size:",B.sm,";font-weight:600;color:",c.textSecondary,";text-transform:uppercase;letter-spacing:0.05em;border-bottom:1px solid ",c.border,";",""),panelContent:{name:"3p8lan",styles:"padding:12px;overflow:auto"},sectionTitle:y("font-size:",B.sm,";font-weight:600;color:",c.textSecondary,";text-transform:uppercase;letter-spacing:0.05em;margin:0 0 12px;",""),familiesGrid:{name:"13w5rh7",styles:"display:grid;grid-template-columns:repeat(auto-fill, minmax(200px, 1fr));gap:12px"},familyCard:y("background:",c.surface,";border:1px solid ",c.border,";border-radius:8px;padding:16px;cursor:pointer;transition:all 0.15s ease;&:hover{border-color:",c.borderHover,";box-shadow:0 2px 8px ",c.shadow,";}",""),familyCardExpanded:{name:"18iuzk9",styles:"grid-column:1/-1"},familyName:y("font-size:",B.base,";font-weight:600;color:",c.text,";margin:0 0 4px;display:flex;align-items:center;gap:8px;",""),familyCount:y("font-size:",B.sm,";color:",c.textSecondary,";margin:0 0 12px;",""),weightsRow:{name:"8fdgzc",styles:"display:flex;flex-wrap:wrap;gap:4px"},weightChip:y("display:inline-flex;align-items:center;padding:2px 8px;background:",c.background,";border-radius:4px;font-size:",B.xs,";color:",c.textSecondary,";font-weight:500;",""),filesGrid:y("display:grid;grid-template-columns:repeat(auto-fill, minmax(180px, 1fr));gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid ",c.border,";",""),fileItem:y("display:flex;align-items:center;gap:8px;padding:8px;background:",c.background,";border-radius:4px;font-size:",B.sm,";color:",c.text,";",""),fileIcon:y("width:14px;height:14px;color:",c.textSecondary,";flex-shrink:0;",""),fileName:{name:"1h52dri",styles:"overflow:hidden;text-overflow:ellipsis;white-space:nowrap"},configRow:y("display:flex;align-items:center;justify-content:space-between;padding:10px 12px;border-radius:6px;transition:background 0.15s ease;&:hover{background:",c.background,";}",""),configType:y("font-size:",B.base,";font-weight:500;color:",c.text,";",""),configFamily:y("font-size:",B.sm,";color:",c.textSecondary,";font-family:'SF Mono',Monaco,'Courier New',monospace;",""),configArrow:y("color:",c.textMuted,";margin:0 8px;",""),emptyState:y("display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px;color:",c.textSecondary,";text-align:center;",""),emptyIcon:y("width:48px;height:48px;color:",c.textMuted,";margin-bottom:16px;",""),emptyTitle:y("font-size:",B.lg,";font-weight:600;color:",c.text,";margin:0 0 8px;",""),emptyDescription:y("font-size:",B.base,";margin:0;",""),dropOverlay:y("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",c.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:",c.primary,";font-size:",B.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"},loading:y("display:flex;align-items:center;justify-content:center;flex:1;color:",c.textSecondary,";","")};function by(){return r("svg",{css:Ke.btnIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})})}function vy(){return r("svg",{css:Ke.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 12h16m-7 6h7"})})}function xy(){return r("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2h-6l-2-2H5a2 2 0 00-2 2z"})})}function Sy({isOpen:o}){return r("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,style:{transform:o?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.15s ease"},children:r("polyline",{points:"6 9 12 15 18 9"})})}function wy({onOpenUploadModal:o,isDragging:s,refreshKey:f}){const[d,h]=v.useState(null),[m,w]=v.useState(!0),[D,C]=v.useState(null),g=v.useCallback(async()=>{try{w(!0);const _=await fetch("/api/studio/fonts/list");if(_.ok){const N=await _.json();h(N)}}catch(_){console.error("Failed to fetch fonts:",_)}finally{w(!1)}},[]);v.useEffect(()=>{g()},[g,f]);const E=v.useCallback(_=>{C(N=>N===_?null:_)},[]);if(m)return r("div",{css:Ke.container,children:r("div",{css:Ke.loading,children:"Loading fonts..."})});const z=!d||d.families.length===0&&d.configs.length===0;return b("div",{css:Ke.container,children:[b("div",{css:Ke.toolbar,children:[r("div",{css:Ke.toolbarLeft,children:b("button",{css:[Ke.btn,Ke.btnPrimary,"",""],onClick:()=>o(),children:[r(by,{}),"Add New"]})}),r("div",{css:Ke.toolbarRight,children:d&&b("span",{style:{color:c.textSecondary,fontSize:B.sm},children:[d.families.length," font ",d.families.length===1?"family":"families"]})})]}),b("div",{css:Ke.content,style:{position:"relative"},children:[s&&r("div",{css:Ke.dropOverlay,children:b("div",{css:Ke.dropMessage,children:[r("svg",{css:Ke.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})}),r("span",{children:"Drop TTF files to upload"})]})}),z?b("div",{css:Ke.emptyState,children:[r("svg",{css:Ke.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 6h16M4 12h16m-7 6h7"})}),r("h2",{css:Ke.emptyTitle,children:"No fonts yet"}),r("p",{css:Ke.emptyDescription,children:'Drag and drop TTF files here or click "Add New" to upload fonts.'})]}):b(nt,{children:[b("div",{css:Ke.leftPanel,children:[r("h3",{css:Ke.sectionTitle,children:"Font Families (_fonts/)"}),r("div",{css:Ke.familiesGrid,children:d?.families.map(_=>{const N=D===_.name;return b("div",{css:[Ke.familyCard,N&&Ke.familyCardExpanded,"",""],onClick:()=>E(_.name),children:[b("h4",{css:Ke.familyName,children:[r(xy,{}),_.name,r(Sy,{isOpen:N})]}),b("p",{css:Ke.familyCount,children:[_.fileCount," ",_.fileCount===1?"file":"files"]}),r("div",{css:Ke.weightsRow,children:_.weights.map(O=>r("span",{css:Ke.weightChip,children:O},O))}),N&&r("div",{css:Ke.filesGrid,children:_.files.map(O=>b("div",{css:Ke.fileItem,children:[r(vy,{}),r("span",{css:Ke.fileName,children:O.name})]},O.path))})]},_.name)})})]}),b("div",{css:Ke.rightPanel,children:[r("div",{css:Ke.panelHeader,children:"Font Configs (src/fonts/)"}),r("div",{css:Ke.panelContent,children:d?.configs.length===0?r("p",{style:{color:c.textMuted,fontSize:B.sm,margin:0},children:"No font configs found"}):d?.configs.map(_=>b("div",{css:Ke.configRow,children:[r("span",{css:Ke.configType,children:_.type}),r("span",{css:Ke.configArrow,children:"→"}),r("span",{css:Ke.configFamily,children:_.family})]},_.path))})]})]})]})]})}const Cy=ln`
93
+ from { opacity: 0; }
94
+ to { opacity: 1; }
95
+ `,ky=ln`
96
+ from {
97
+ opacity: 0;
98
+ transform: translateY(-8px) scale(0.98);
99
+ }
100
+ to {
101
+ opacity: 1;
102
+ transform: translateY(0) scale(1);
103
+ }
104
+ `,Ae={overlay:y("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",Cy," 0.15s ease-out;font-family:",ci,";",""),modal:y(Sl," background-color:",c.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:600px;width:90%;max-height:85vh;animation:",ky," 0.2s ease-out;overflow:hidden;display:flex;flex-direction:column;",""),header:y("padding:24px 24px 16px;border-bottom:1px solid ",c.border,";",""),title:y("font-size:",B.lg,";font-weight:600;color:",c.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"1y1z8xh",styles:"padding:24px;overflow-y:auto;flex:1"},dropzone:y("border:2px dashed ",c.border,";border-radius:8px;padding:40px 24px;text-align:center;cursor:pointer;transition:all 0.15s;&:hover{border-color:",c.primary,";background-color:",c.primaryLight,";}",""),dropzoneActive:y("border-color:",c.primary,";background-color:",c.primaryLight,";",""),dropzoneIcon:y("width:48px;height:48px;margin:0 auto 16px;color:",c.textMuted,";",""),dropzoneText:y("font-size:",B.base,";color:",c.text,";margin:0 0 4px;",""),dropzoneHint:y("font-size:",B.sm,";color:",c.textSecondary,";margin:0;",""),fileInput:{name:"eivff4",styles:"display:none"},filesList:{name:"iqoq9n",styles:"margin-top:20px"},filesHeader:{name:"ef4pk",styles:"display:flex;align-items:center;justify-content:space-between;margin-bottom:12px"},filesTitle:y("font-size:",B.sm,";font-weight:600;color:",c.textSecondary,";text-transform:uppercase;letter-spacing:0.05em;margin:0;",""),clearBtn:y("font-size:",B.sm,";color:",c.primary,";background:none;border:none;cursor:pointer;padding:0;&:hover{text-decoration:underline;}",""),fileItem:y("display:flex;align-items:center;gap:12px;padding:12px;background:",c.background,";border-radius:8px;margin-bottom:8px;&:last-child{margin-bottom:0;}",""),fileIcon:y("width:32px;height:32px;color:",c.textMuted,";flex-shrink:0;",""),fileInfo:{name:"fxp7t8",styles:"flex:1;min-width:0"},fileName:y("font-size:",B.base,";color:",c.text,";margin:0 0 2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),filePath:y("font-size:",B.sm,";color:",c.textSecondary,";margin:0;font-family:'SF Mono',Monaco,'Courier New',monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),fileWarning:y("font-size:",B.xs,";color:#d97706;margin:4px 0 0;display:flex;align-items:center;gap:4px;",""),fileActions:{name:"3ilzp0",styles:"display:flex;gap:8px;flex-shrink:0"},editBtn:y("padding:6px 12px;font-size:",B.sm,";color:",c.primary,";background:none;border:1px solid ",c.primary,";border-radius:4px;cursor:pointer;transition:all 0.15s;&:hover{background:",c.primaryLight,";}",""),removeBtn:y("padding:6px 8px;font-size:",B.sm,";color:",c.danger,";background:none;border:none;cursor:pointer;&:hover{text-decoration:underline;}",""),instructions:y("margin-top:20px;padding:16px;background:",c.primaryLight,";border-radius:8px;border:1px solid rgba(99, 91, 255, 0.2);",""),instructionsTitle:y("font-size:",B.sm,";font-weight:600;color:",c.primary,";margin:0 0 8px;",""),instructionsText:y("font-size:",B.sm,";color:",c.text,";margin:0 0 8px;line-height:1.5;",""),instructionsCode:y("font-family:'SF Mono',Monaco,'Courier New',monospace;font-size:",B.xs,";color:",c.textSecondary,";background:",c.surface,";padding:8px 12px;border-radius:4px;margin:8px 0 0;display:block;",""),editForm:y("margin-top:12px;padding:12px;background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;",""),editRow:{name:"uedb6y",styles:"display:flex;gap:8px;margin-bottom:8px;&:last-child{margin-bottom:0;}"},editField:{name:"82a6rk",styles:"flex:1"},editLabel:y("font-size:",B.xs,";color:",c.textSecondary,";margin:0 0 4px;display:block;",""),editInput:y("width:100%;padding:8px 10px;font-size:",B.sm,";border:1px solid ",c.border,";border-radius:4px;&:focus{outline:none;border-color:",c.primary,";}",""),editSelect:y("width:100%;padding:8px 10px;font-size:",B.sm,";border:1px solid ",c.border,";border-radius:4px;background:white;cursor:pointer;&:focus{outline:none;border-color:",c.primary,";}",""),editActions:{name:"mf1i0w",styles:"display:flex;gap:8px;justify-content:flex-end;margin-top:12px"},footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",c.border,";background-color:",c.background,";",""),btn:y("padding:10px 18px;font-size:",B.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",c.surface,";border:1px solid ",c.border,";color:",c.text,";&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),btnConfirm:y("background-color:",c.primary,";border:1px solid ",c.primary,";color:white;&:hover:not(:disabled){background-color:",c.primaryHover,";border-color:",c.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}","")},Qp=["thin","extralight","light","regular","medium","semibold","bold","extrabold","black"];function zy(o){const s=o.replace(/\.(ttf|woff2?|otf)$/i,""),f=s.toLowerCase(),h=f.includes("italic")?"italic":"normal",m=s.split(/[-_]/);if(m.length===1)return{basename:f.replace("italic","").trim(),weight:"regular",style:h,isValid:!1};const w=m[0].toLowerCase(),D=m.slice(1).join("").toLowerCase().replace("italic","");let C="regular",g=!1;for(const E of Qp)if(D.includes(E)){C=E,g=!0;break}return g||(D===""||D==="regular"||D==="normal")&&(C="regular",g=!0),{basename:w,weight:C,style:h,isValid:g}}function Dp(o,s,f){const h=`${o}-${s}${f==="italic"?"italic":""}.ttf`;return`_fonts/${o}/${h}`}function My({onClose:o,onUploadComplete:s,initialFiles:f}){const[d,h]=v.useState([]),[m,w]=v.useState(!1),[D,C]=v.useState(!1),[g,E]=v.useState(null),[z,_]=v.useState(""),[N,O]=v.useState(""),[G,ie]=v.useState(""),Q=v.useRef(null),re=v.useCallback($=>{const W=$.filter(ve=>ve.name.toLowerCase().endsWith(".ttf")).map(ve=>{const{basename:T,weight:J,style:F,isValid:Me}=zy(ve.name);return{file:ve,basename:T,weight:J,style:F,isValid:Me,targetPath:Dp(T,J,F)}});h(ve=>[...ve,...W])},[]);v.useEffect(()=>{f&&f.length>0&&re(f)},[f,re]);const ne=v.useCallback($=>{$&&re(Array.from($))},[re]),ue=v.useCallback($=>{$.preventDefault(),w(!1),ne($.dataTransfer.files)},[ne]),V=v.useCallback($=>{h(ae=>ae.filter((W,ve)=>ve!==$)),g===$&&E(null)},[g]),P=v.useCallback(()=>{h([]),E(null)},[]),I=v.useCallback($=>{const ae=d[$];_(ae.basename),O(ae.weight),ie(ae.style),E($)},[d]),te=v.useCallback(()=>{g!==null&&(h($=>$.map((ae,W)=>W===g?{...ae,basename:z.toLowerCase(),weight:N,style:G,isValid:!0,targetPath:Dp(z.toLowerCase(),N,G)}:ae)),E(null))},[g,z,N,G]),j=v.useCallback(()=>{E(null)},[]),K=v.useCallback(async()=>{if(d.length!==0){C(!0);try{const $=new FormData;d.forEach(ve=>{$.append("files",ve.file)});const ae={};d.forEach(ve=>{ae[ve.file.name]={basename:ve.basename,weight:ve.weight,style:ve.style}}),$.append("renames",JSON.stringify(ae)),(await fetch("/api/studio/fonts/upload",{method:"POST",body:$})).ok?(s(),o()):console.error("Upload failed")}catch($){console.error("Upload error:",$)}finally{C(!1)}}},[d,o,s]),fe=d.some($=>!$.isValid);return r("div",{css:Ae.overlay,onClick:o,children:b("div",{css:Ae.modal,onClick:$=>$.stopPropagation(),children:[r("div",{css:Ae.header,children:r("h2",{css:Ae.title,children:"Upload Fonts"})}),b("div",{css:Ae.body,children:[b("div",{css:[Ae.dropzone,m&&Ae.dropzoneActive,"",""],onClick:()=>Q.current?.click(),onDragOver:$=>{$.preventDefault(),w(!0)},onDragLeave:()=>w(!1),onDrop:ue,children:[r("svg",{css:Ae.dropzoneIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})}),r("p",{css:Ae.dropzoneText,children:"Drop TTF files here or click to browse"}),r("p",{css:Ae.dropzoneHint,children:"Only .ttf files are supported"})]}),r("input",{ref:Q,type:"file",accept:".ttf",multiple:!0,css:Ae.fileInput,onChange:$=>ne($.target.files)}),d.length>0&&b("div",{css:Ae.filesList,children:[b("div",{css:Ae.filesHeader,children:[b("h3",{css:Ae.filesTitle,children:["Files to Upload (",d.length,")"]}),r("button",{css:Ae.clearBtn,onClick:P,children:"Clear all"})]}),d.map(($,ae)=>b("div",{children:[b("div",{css:Ae.fileItem,children:[r("svg",{css:Ae.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 6h16M4 12h16m-7 6h7"})}),b("div",{css:Ae.fileInfo,children:[r("p",{css:Ae.fileName,children:$.file.name}),b("p",{css:Ae.filePath,children:["→ ",$.targetPath]}),!$.isValid&&b("p",{css:Ae.fileWarning,children:[r("svg",{width:"12",height:"12",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),`Filename doesn't match convention - will default to "`,$.weight,'"']})]}),b("div",{css:Ae.fileActions,children:[r("button",{css:Ae.editBtn,onClick:()=>I(ae),children:"Rename"}),r("button",{css:Ae.removeBtn,onClick:()=>V(ae),children:"Remove"})]})]}),g===ae&&b("div",{css:Ae.editForm,children:[r("div",{css:Ae.editRow,children:b("div",{css:Ae.editField,children:[r("label",{css:Ae.editLabel,children:"Family Name (basename)"}),r("input",{css:Ae.editInput,value:z,onChange:W=>_(W.target.value),placeholder:"e.g., raleway"})]})}),b("div",{css:Ae.editRow,children:[b("div",{css:Ae.editField,children:[r("label",{css:Ae.editLabel,children:"Weight"}),r("select",{css:Ae.editSelect,value:N,onChange:W=>O(W.target.value),children:Qp.map(W=>r("option",{value:W,children:W},W))})]}),b("div",{css:Ae.editField,children:[r("label",{css:Ae.editLabel,children:"Style"}),b("select",{css:Ae.editSelect,value:G,onChange:W=>ie(W.target.value),children:[r("option",{value:"normal",children:"normal"}),r("option",{value:"italic",children:"italic"})]})]})]}),b("div",{css:Ae.editActions,children:[r("button",{css:[Ae.btn,Ae.btnCancel,"",""],style:{padding:"6px 12px",fontSize:B.sm},onClick:j,children:"Cancel"}),r("button",{css:[Ae.btn,Ae.btnConfirm,"",""],style:{padding:"6px 12px",fontSize:B.sm},onClick:te,children:"Save"})]})]})]},ae))]}),fe&&b("div",{css:Ae.instructions,children:[r("h4",{css:Ae.instructionsTitle,children:"Naming Convention"}),b("p",{css:Ae.instructionsText,children:["Font files should follow this pattern: ",r("strong",{children:"{family}-{weight}.ttf"})]}),r("p",{css:Ae.instructionsText,children:'Click "Rename" on any file above to set the correct family name and weight.'}),b("code",{css:Ae.instructionsCode,children:["Valid weights: thin, extralight, light, regular, medium, semibold, bold, extrabold, black",`
105
+ `,'Add "italic" suffix for italics: Raleway-BoldItalic.ttf']})]})]}),b("div",{css:Ae.footer,children:[r("button",{css:[Ae.btn,Ae.btnCancel,"",""],onClick:o,children:"Cancel"}),r("button",{css:[Ae.btn,Ae.btnConfirm,"",""],onClick:K,disabled:d.length===0||D,children:D?"Uploading...":`Upload ${d.length} ${d.length===1?"file":"files"}`})]})]})})}const Dy="36px",vt={container:y(Sl," display:flex;flex-direction:column;height:100%;background:",c.background,";",""),header:y("display:flex;align-items:center;justify-content:space-between;padding:12px 24px;background:",c.surface,";border-bottom:1px solid ",c.border,";position:relative;",""),titleDropdown:{name:"bjn8wh",styles:"position:relative"},titleButton:y("display:flex;align-items:center;gap:6px;font-size:19px!important;font-weight:600;color:",c.text,";background:transparent;border:none;padding:4px 8px;margin:-4px -8px;border-radius:6px;cursor:pointer;letter-spacing:-0.02em;transition:background 0.15s ease;&:hover{background:",c.surfaceHover,";}",""),titleChevron:y("width:18px;height:18px;color:",c.textSecondary,";transition:transform 0.15s ease;margin-top:2px;stroke-width:2.5;",""),titleChevronOpen:{name:"21xn5r",styles:"transform:rotate(180deg)"},dropdownMenu:y("position:absolute;top:calc(100% + 8px);left:0;background:",c.surface,";border:1px solid ",c.border,";border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);min-width:180px;padding:4px;z-index:100;",""),dropdownItem:y("display:block;width:100%;padding:10px 12px;background:transparent;border:none;border-radius:6px;font-size:19px!important;font-weight:600;letter-spacing:-0.02em;color:",c.text,";cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover{background:",c.surfaceHover,";}",""),dropdownItemActive:y("color:",c.primary,";&:hover{background:rgba(99, 91, 255, 0.1);color:",c.primaryHover,";}",""),headerLeft:{name:"16ur2v6",styles:"display:flex;align-items:center;gap:12px;flex:1;min-width:0"},headerCenter:{name:"1fsejhz",styles:"position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;max-width:50%"},breadcrumbs:y("display:flex;align-items:center;gap:6px;font-size:",B.base,";color:",c.textSecondary,";overflow:hidden;",""),breadcrumbSeparator:y("color:",c.border,";flex-shrink:0;",""),breadcrumbItem:y("color:",c.textSecondary,";text-decoration:none;cursor:pointer;transition:color 0.15s ease;white-space:nowrap;&:hover{color:",c.primary,";}",""),breadcrumbCurrent:y("color:",c.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:",c.textMuted,";background:transparent;border:none;border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{color:",c.text,";background:",c.surface,";}",""),headerActions:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},headerBtn:y("height:",Dy,";padding:0 12px;background:",c.surface,";border:1px solid ",c.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",c.surfaceHover,";border-color:",c.borderHover,";}",""),headerIcon:y("width:16px;height:16px;color:",c.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 ",c.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:",c.primary,";font-size:",B.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"}};function Ey({onClose:o,isVisible:s=!0,standaloneMode:f=!1,workspacePath:d,siteUrl:h}){const m=o||(()=>{}),[w,D]=v.useState("public"),[C,g]=v.useState(new Set),[E,z]=v.useState(null),[_,N]=v.useState("grid"),[O,G]=v.useState(null),[ie,Q]=v.useState(null),[re,ne]=v.useState(!1),[ue,V]=v.useState(0),[P,I]=v.useState(!1),[te,j]=v.useState(""),[K,fe]=v.useState(null),[$,ae]=v.useState([]),[W,ve]=v.useState(!1),[T,J]=v.useState("media"),[F,Me]=v.useState(!1),qe=v.useRef(null),[S,U]=v.useState(!1),[ee,oe]=v.useState(!1),[Ce,Ee]=v.useState([]),[Ye,xt]=v.useState(0),Re=v.useCallback(()=>{V(he=>he+1)},[]),[on,$e]=v.useState(null),ut=v.useCallback(he=>{$e({path:he,key:Date.now()})},[]);v.useEffect(()=>{if(O&&$.length>0){const he=$.find(wt=>wt.path===O.path);he&&JSON.stringify(he)!==JSON.stringify(O)&&G(he)}},[$,O]);const mt=v.useCallback(()=>{I(!0)},[]),Xt=v.useCallback(()=>{I(!1)},[]),Ht=v.useCallback((he,wt)=>{fe({title:he,message:wt})},[]),rn=v.useCallback(()=>{fe(null)},[]),Pt=v.useCallback(he=>{he.preventDefault(),he.stopPropagation(),ve(!0)},[]),vn=v.useCallback(he=>{he.preventDefault(),he.stopPropagation(),ve(!1)},[]),en=v.useCallback(async he=>{he.preventDefault(),he.stopPropagation(),ve(!1);const wt=Array.from(he.dataTransfer.files);if(wt.length!==0&&!(w==="public/images"||w.startsWith("public/images/"))){for(const tn of wt){const dn=new FormData;dn.append("file",tn),dn.append("path",w);try{await fetch("/api/studio/upload",{method:"POST",body:dn})}catch(An){console.error("Upload error:",An)}}Re()}},[w,Re]),dt=v.useCallback(()=>{if(w==="public")return;const he=w.split("/");he.pop(),D(he.join("/")||"public"),g(new Set)},[w]),Qt=v.useCallback(he=>{D(he),g(new Set),G(null)},[]),zt=v.useCallback(he=>{g(wt=>{const tn=new Set(wt);return tn.has(he)?tn.delete(he):tn.add(he),tn}),z(he)},[]),za=v.useCallback((he,wt,tn)=>{const dn=tn.findIndex(Rn=>Rn.path===he),An=tn.findIndex(Rn=>Rn.path===wt);if(dn===-1||An===-1)return;const la=Math.min(dn,An),Gn=Math.max(dn,An);g(Rn=>{const Fn=new Set(Rn);for(let el=la;el<=Gn;el++)Fn.add(tn[el].path);return Fn}),z(wt)},[]),Bt=v.useCallback(he=>{g(new Set(he.map(wt=>wt.path)))},[]),xn=v.useCallback(()=>{g(new Set)},[]),aa=v.useCallback(he=>{G(he)},[]),De=gy({triggerRefresh:Re,clearSelection:xn,setFocusedItem:aa,showError:Ht}),un=v.useCallback(he=>{if(he.key==="Escape"){const wt=he.target;if(wt.tagName==="INPUT"||wt.tagName==="TEXTAREA")return;O?G(null):f||m()}},[m,O,f]);v.useEffect(()=>(s&&(document.addEventListener("keydown",un),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",un),document.body.style.overflow=""}),[un,s]),v.useEffect(()=>{const he=wt=>{qe.current&&!qe.current.contains(wt.target)&&Me(!1)};return F&&document.addEventListener("mousedown",he),()=>{document.removeEventListener("mousedown",he)}},[F]);const Le=v.useCallback(()=>{Me(he=>!he)},[]),we=v.useCallback(he=>{J(he),Me(!1)},[]),We=v.useCallback(he=>{he.preventDefault(),he.stopPropagation(),U(!0)},[]),yt=v.useCallback(he=>{he.preventDefault(),he.stopPropagation(),U(!1)},[]),Ge=v.useCallback(he=>{he.preventDefault(),he.stopPropagation(),U(!1);const wt=Array.from(he.dataTransfer.files).filter(tn=>tn.name.toLowerCase().endsWith(".ttf"));wt.length>0&&(Ee(wt),oe(!0))},[]),ze=v.useCallback(he=>{Ee(he||[]),oe(!0)},[]),St=v.useCallback(()=>{xt(he=>he+1)},[]),Tt={isOpen:!0,openStudio:()=>{},closeStudio:m,toggleStudio:m,currentPath:w,setCurrentPath:Qt,navigateUp:dt,selectedItems:C,toggleSelection:zt,selectRange:za,selectAll:Bt,clearSelection:xn,lastSelectedPath:E,viewMode:_,setViewMode:N,focusedItem:O,setFocusedItem:G,meta:ie,setMeta:Q,isLoading:re,setIsLoading:ne,refreshKey:ue,triggerRefresh:Re,editedImageKey:on,setEditedImageKey:ut,scanRequested:P,triggerScan:mt,clearScanRequest:Xt,searchQuery:te,setSearchQuery:j,error:K,showError:Ht,clearError:rn,fileItems:$,setFileItems:ae,actionState:De.actionState,requestDelete:De.requestDelete,requestMove:De.requestMove,requestSync:De.requestSync,requestDownload:De.requestDownload,requestProcess:De.requestProcess,setProcessMode:De.setProcessMode,confirmDelete:De.confirmDelete,confirmMove:De.confirmMove,confirmSync:De.confirmSync,confirmProcess:De.confirmProcess,cancelAction:De.cancelAction,closeProgress:De.closeProgress,stopProcessing:De.stopProcessing,deleteOrphans:De.deleteOrphans};return r(jp.Provider,{value:Tt,children:b("div",{css:vt.container,children:[b("div",{css:vt.header,children:[r("div",{css:vt.headerLeft,children:b("div",{css:vt.titleDropdown,ref:qe,children:[b("button",{css:vt.titleButton,onClick:Le,children:[r("span",{children:"gallop.studio"}),r(Uy,{isOpen:F})]}),F&&b("div",{css:vt.dropdownMenu,children:[r("button",{css:[vt.dropdownItem,T==="media"&&vt.dropdownItemActive,"",""],onClick:()=>we("media"),children:"media & files"}),r("button",{css:[vt.dropdownItem,T==="fonts"&&vt.dropdownItemActive,"",""],onClick:()=>we("fonts"),children:"fonts"})]})]})}),r("div",{css:vt.headerCenter,children:r(Ly,{currentPath:w,onNavigate:Qt,projectName:d?d.split("/").pop():void 0})}),b("div",{css:vt.headerActions,children:[h&&r("a",{href:h,target:"_blank",rel:"noopener noreferrer",css:vt.headerIconBtn,title:`Open ${h}`,children:r(_y,{})}),!f&&r("button",{css:vt.headerBtn,onClick:m,"aria-label":"Close Studio",children:r(Oy,{})})]})]}),T==="media"?b(nt,{children:[r(k1,{}),b("div",{css:vt.content,onDragOver:Pt,onDragLeave:vn,onDrop:en,children:[W&&r("div",{css:vt.dropOverlay,children:b("div",{css:vt.dropMessage,children:[r("svg",{css:vt.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})}),r("span",{children:"Drop files to upload"})]})}),r("div",{css:vt.fileBrowser,children:_==="grid"?r(Q1,{}):r($1,{})})]}),O&&r(hy,{}),r(my,{}),De.actionState.showDeleteConfirm&&r(ro,{title:"Delete Files",message:`Are you sure you want to delete ${De.actionState.actionPaths.length} item${De.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:De.confirmDelete,onCancel:De.cancelAction}),De.actionState.showSyncConfirm&&r(ro,{title:"Push to CDN",message:`Push ${De.actionState.syncImageCount} image${De.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${De.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${De.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:De.confirmSync,onCancel:De.cancelAction}),De.actionState.showProcessConfirm&&r(Ry,{imageCount:De.actionState.actionPaths.length,mode:De.actionState.processMode,onConfirm:De.confirmProcess,onCancel:De.cancelAction}),De.actionState.showMoveModal&&r(Yp,{selectedItems:new Set(De.actionState.actionPaths),currentPath:w,onMove:he=>De.confirmMove(he),onCancel:De.cancelAction}),De.actionState.showProgress&&r(xl,{title:De.actionState.progressTitle,progress:De.actionState.progressState,onStop:De.stopProcessing,onDeleteOrphans:De.deleteOrphans,onClose:De.closeProgress})]}):r("div",{style:{flex:1,display:"flex",flexDirection:"column"},onDragOver:We,onDragLeave:yt,onDrop:Ge,children:r(wy,{onOpenUploadModal:ze,isDragging:S,refreshKey:Ye})}),ee&&r(My,{onClose:()=>oe(!1),onUploadComplete:St,initialFiles:Ce})]})})}var Ty={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},Ay={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 Ry({imageCount:o,mode:s,onConfirm:f,onCancel:d}){const h={overlay:Ay,container:y("background:",c.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:",B.lg,";font-weight:600;color:",c.text,";margin:0 0 16px;",""),message:y("font-size:",B.base,";color:",c.textSecondary,";margin:0 0 20px;line-height:1.5;",""),actions:Ty,cancelBtn:y("padding:10px 20px;border:1px solid ",c.border,";border-radius:8px;background:",c.background,";color:",c.text,";font-size:",B.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",c.surfaceHover,";border-color:",c.borderHover,";}",""),confirmBtn:y("padding:10px 20px;border:none;border-radius:8px;background:",c.primary,";color:white;font-size:",B.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",c.primaryHover,";}",""),confirmBtnDanger:y("background:",c.danger,";&:hover{background:#dc2626;}","")},m=s==="remove",w=m?"Remove Thumbnails":"Generate Thumbnails",D=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 r("div",{css:h.overlay,onClick:d,children:b("div",{css:h.container,onClick:g=>g.stopPropagation(),children:[r("h2",{css:h.title,children:w}),r("p",{css:h.message,children:D}),b("div",{css:h.actions,children:[r("button",{css:h.cancelBtn,onClick:d,children:"Cancel"}),r("button",{css:[h.confirmBtn,m&&h.confirmBtnDanger,"",""],onClick:f,children:C})]})]})})}function Ly({currentPath:o,onNavigate:s,projectName:f}){const d=o.split("/").filter(Boolean),h=d.map((m,w)=>({name:w===0&&m==="public"&&f?f:m,path:d.slice(0,w+1).join("/")}));return r("div",{css:vt.breadcrumbs,children:h.map((m,w)=>b("span",{style:{display:"flex",alignItems:"center",gap:6},children:[w>0&&r("span",{css:vt.breadcrumbSeparator,children:"/"}),w===h.length-1?r("span",{css:vt.breadcrumbCurrent,children:m.name}):r("span",{css:vt.breadcrumbItem,onClick:()=>s(m.path),children:m.name})]},m.path))})}function _y(){return b("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("circle",{cx:"12",cy:"12",r:"10"}),r("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),r("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})}function Oy(){return b("svg",{css:vt.headerIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function Uy({isOpen:o}){return r("svg",{css:[vt.titleChevron,o&&vt.titleChevronOpen,"",""],viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:r("polyline",{points:"6 9 12 15 18 9"})})}const Kp=document.getElementById("root");if(!Kp)throw new Error("Root element not found");const Hy=window.__STUDIO_WORKSPACE__||"Unknown",By=window.__STUDIO_SITE_URL__||"";o1.createRoot(Kp).render(r(v.StrictMode,{children:r("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:r(Ey,{isVisible:!0,standaloneMode:!0,workspacePath:Hy,siteUrl:By})})}));