@gallop.software/studio 2.3.95 → 2.3.97

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,92 @@
1
+ function Wm(o,r){for(var f=0;f<r.length;f++){const u=r[f];if(typeof u!="string"&&!Array.isArray(u)){for(const h in u)if(h!=="default"&&!(h in o)){const m=Object.getOwnPropertyDescriptor(u,h);m&&Object.defineProperty(o,h,m.get?m:{enumerable:!0,get:()=>u[h]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))u(h);new MutationObserver(h=>{for(const m of h)if(m.type==="childList")for(const S of m.addedNodes)S.tagName==="LINK"&&S.rel==="modulepreload"&&u(S)}).observe(document,{childList:!0,subtree:!0});function f(h){const m={};return h.integrity&&(m.integrity=h.integrity),h.referrerPolicy&&(m.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?m.credentials="include":h.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function u(h){if(h.ep)return;h.ep=!0;const m=f(h);fetch(h.href,m)}})();function Im(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Zc={exports:{}},Fi={};var Ih;function Pm(){if(Ih)return Fi;Ih=1;var o=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function f(u,h,m){var S=null;if(m!==void 0&&(S=""+m),h.key!==void 0&&(S=""+h.key),"key"in h){m={};for(var T in h)T!=="key"&&(m[T]=h[T])}else m=h;return h=m.ref,{$$typeof:o,type:u,key:S,ref:h!==void 0?h:null,props:m}}return Fi.Fragment=r,Fi.jsx=f,Fi.jsxs=f,Fi}var Ph;function eg(){return Ph||(Ph=1,Zc.exports=Pm()),Zc.exports}var eo=eg(),Jc={exports:{}},Re={};var e0;function tg(){if(e0)return Re;e0=1;var o=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),S=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),z=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),j=Symbol.iterator;function G(b){return b===null||typeof b!="object"?null:(b=j&&b[j]||b["@@iterator"],typeof b=="function"?b:null)}var H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},V=Object.assign,ae={};function Z(b,_,F){this.props=b,this.context=_,this.refs=ae,this.updater=F||H}Z.prototype.isReactComponent={},Z.prototype.setState=function(b,_){if(typeof b!="object"&&typeof b!="function"&&b!=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,b,_,"setState")},Z.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function re(){}re.prototype=Z.prototype;function P(b,_,F){this.props=b,this.context=_,this.refs=ae,this.updater=F||H}var be=P.prototype=new re;be.constructor=P,V(be,Z.prototype),be.isPureReactComponent=!0;var U=Array.isArray;function fe(){}var $={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function B(b,_,F){var se=F.ref;return{$$typeof:o,type:b,key:_,ref:se!==void 0?se:null,props:F}}function ie(b,_){return B(b.type,_,b.props)}function ve(b){return typeof b=="object"&&b!==null&&b.$$typeof===o}function ne(b){var _={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(F){return _[F]})}var I=/\/+/g;function we(b,_){return typeof b=="object"&&b!==null&&b.key!=null?ne(""+b.key):_.toString(36)}function _e(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(fe,fe):(b.status="pending",b.then(function(_){b.status==="pending"&&(b.status="fulfilled",b.value=_)},function(_){b.status==="pending"&&(b.status="rejected",b.reason=_)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function R(b,_,F,se,xe){var Oe=typeof b;(Oe==="undefined"||Oe==="boolean")&&(b=null);var Ne=!1;if(b===null)Ne=!0;else switch(Oe){case"bigint":case"string":case"number":Ne=!0;break;case"object":switch(b.$$typeof){case o:case r:Ne=!0;break;case O:return Ne=b._init,R(Ne(b._payload),_,F,se,xe)}}if(Ne)return xe=xe(b),Ne=se===""?"."+we(b,0):se,U(xe)?(F="",Ne!=null&&(F=Ne.replace(I,"$&/")+"/"),R(xe,_,F,"",function(_t){return _t})):xe!=null&&(ve(xe)&&(xe=ie(xe,F+(xe.key==null||b&&b.key===xe.key?"":(""+xe.key).replace(I,"$&/")+"/")+Ne)),_.push(xe)),1;Ne=0;var Ye=se===""?".":se+":";if(U(b))for(var Me=0;Me<b.length;Me++)se=b[Me],Oe=Ye+we(se,Me),Ne+=R(se,_,F,Oe,xe);else if(Me=G(b),typeof Me=="function")for(b=Me.call(b),Me=0;!(se=b.next()).done;)se=se.value,Oe=Ye+we(se,Me++),Ne+=R(se,_,F,Oe,xe);else if(Oe==="object"){if(typeof b.then=="function")return R(_e(b),_,F,se,xe);throw _=String(b),Error("Objects are not valid as a React child (found: "+(_==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":_)+"). If you meant to render a collection of children, use an array instead.")}return Ne}function q(b,_,F){if(b==null)return b;var se=[],xe=0;return R(b,se,"","",function(Oe){return _.call(F,Oe,xe++)}),se}function ue(b){if(b._status===-1){var _=b._result;_=_(),_.then(function(F){(b._status===0||b._status===-1)&&(b._status=1,b._result=F)},function(F){(b._status===0||b._status===-1)&&(b._status=2,b._result=F)}),b._status===-1&&(b._status=0,b._result=_)}if(b._status===1)return b._result.default;throw b._result}var Le=typeof reportError=="function"?reportError:function(b){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var _=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof b=="object"&&b!==null&&typeof b.message=="string"?String(b.message):String(b),error:b});if(!window.dispatchEvent(_))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",b);return}console.error(b)},W={map:q,forEach:function(b,_,F){q(b,function(){_.apply(this,arguments)},F)},count:function(b){var _=0;return q(b,function(){_++}),_},toArray:function(b){return q(b,function(_){return _})||[]},only:function(b){if(!ve(b))throw Error("React.Children.only expected to receive a single React element child.");return b}};return Re.Activity=D,Re.Children=W,Re.Component=Z,Re.Fragment=f,Re.Profiler=h,Re.PureComponent=P,Re.StrictMode=u,Re.Suspense=z,Re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,Re.__COMPILER_RUNTIME={__proto__:null,c:function(b){return $.H.useMemoCache(b)}},Re.cache=function(b){return function(){return b.apply(null,arguments)}},Re.cacheSignal=function(){return null},Re.cloneElement=function(b,_,F){if(b==null)throw Error("The argument must be a React element, but you passed "+b+".");var se=V({},b.props),xe=b.key;if(_!=null)for(Oe in _.key!==void 0&&(xe=""+_.key),_)!J.call(_,Oe)||Oe==="key"||Oe==="__self"||Oe==="__source"||Oe==="ref"&&_.ref===void 0||(se[Oe]=_[Oe]);var Oe=arguments.length-2;if(Oe===1)se.children=F;else if(1<Oe){for(var Ne=Array(Oe),Ye=0;Ye<Oe;Ye++)Ne[Ye]=arguments[Ye+2];se.children=Ne}return B(b.type,xe,se)},Re.createContext=function(b){return b={$$typeof:S,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null},b.Provider=b,b.Consumer={$$typeof:m,_context:b},b},Re.createElement=function(b,_,F){var se,xe={},Oe=null;if(_!=null)for(se in _.key!==void 0&&(Oe=""+_.key),_)J.call(_,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(xe[se]=_[se]);var Ne=arguments.length-2;if(Ne===1)xe.children=F;else if(1<Ne){for(var Ye=Array(Ne),Me=0;Me<Ne;Me++)Ye[Me]=arguments[Me+2];xe.children=Ye}if(b&&b.defaultProps)for(se in Ne=b.defaultProps,Ne)xe[se]===void 0&&(xe[se]=Ne[se]);return B(b,Oe,xe)},Re.createRef=function(){return{current:null}},Re.forwardRef=function(b){return{$$typeof:T,render:b}},Re.isValidElement=ve,Re.lazy=function(b){return{$$typeof:O,_payload:{_status:-1,_result:b},_init:ue}},Re.memo=function(b,_){return{$$typeof:g,type:b,compare:_===void 0?null:_}},Re.startTransition=function(b){var _=$.T,F={};$.T=F;try{var se=b(),xe=$.S;xe!==null&&xe(F,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(fe,Le)}catch(Oe){Le(Oe)}finally{_!==null&&F.types!==null&&(_.types=F.types),$.T=_}},Re.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},Re.use=function(b){return $.H.use(b)},Re.useActionState=function(b,_,F){return $.H.useActionState(b,_,F)},Re.useCallback=function(b,_){return $.H.useCallback(b,_)},Re.useContext=function(b){return $.H.useContext(b)},Re.useDebugValue=function(){},Re.useDeferredValue=function(b,_){return $.H.useDeferredValue(b,_)},Re.useEffect=function(b,_){return $.H.useEffect(b,_)},Re.useEffectEvent=function(b){return $.H.useEffectEvent(b)},Re.useId=function(){return $.H.useId()},Re.useImperativeHandle=function(b,_,F){return $.H.useImperativeHandle(b,_,F)},Re.useInsertionEffect=function(b,_){return $.H.useInsertionEffect(b,_)},Re.useLayoutEffect=function(b,_){return $.H.useLayoutEffect(b,_)},Re.useMemo=function(b,_){return $.H.useMemo(b,_)},Re.useOptimistic=function(b,_){return $.H.useOptimistic(b,_)},Re.useReducer=function(b,_,F){return $.H.useReducer(b,_,F)},Re.useRef=function(b){return $.H.useRef(b)},Re.useState=function(b){return $.H.useState(b)},Re.useSyncExternalStore=function(b,_,F){return $.H.useSyncExternalStore(b,_,F)},Re.useTransition=function(){return $.H.useTransition()},Re.version="19.2.4",Re}var t0;function ou(){return t0||(t0=1,Jc.exports=tg()),Jc.exports}var w=ou();const et=Im(w),n0=Wm({__proto__:null,default:et},[w]);function ng(o){if(o.sheet)return o.sheet;for(var r=0;r<document.styleSheets.length;r++)if(document.styleSheets[r].ownerNode===o)return document.styleSheets[r]}function ag(o){var r=document.createElement("style");return r.setAttribute("data-emotion",o.key),o.nonce!==void 0&&r.setAttribute("nonce",o.nonce),r.appendChild(document.createTextNode("")),r.setAttribute("data-s",""),r}var lg=(function(){function o(f){var u=this;this._insertTag=function(h){var m;u.tags.length===0?u.insertionPoint?m=u.insertionPoint.nextSibling:u.prepend?m=u.container.firstChild:m=u.before:m=u.tags[u.tags.length-1].nextSibling,u.container.insertBefore(h,m),u.tags.push(h)},this.isSpeedy=f.speedy===void 0?!0:f.speedy,this.tags=[],this.ctr=0,this.nonce=f.nonce,this.key=f.key,this.container=f.container,this.prepend=f.prepend,this.insertionPoint=f.insertionPoint,this.before=null}var r=o.prototype;return r.hydrate=function(u){u.forEach(this._insertTag)},r.insert=function(u){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(ag(this));var h=this.tags[this.tags.length-1];if(this.isSpeedy){var m=ng(h);try{m.insertRule(u,m.cssRules.length)}catch{}}else h.appendChild(document.createTextNode(u));this.ctr++},r.flush=function(){this.tags.forEach(function(u){var h;return(h=u.parentNode)==null?void 0:h.removeChild(u)}),this.tags=[],this.ctr=0},o})(),Yt="-ms-",Tr="-moz-",We="-webkit-",z0="comm",ru="rule",su="decl",ig="@import",M0="@keyframes",og="@layer",rg=Math.abs,Rr=String.fromCharCode,sg=Object.assign;function cg(o,r){return Nt(o,0)^45?(((r<<2^Nt(o,0))<<2^Nt(o,1))<<2^Nt(o,2))<<2^Nt(o,3):0}function D0(o){return o.trim()}function ug(o,r){return(o=r.exec(o))?o[0]:o}function Ie(o,r,f){return o.replace(r,f)}function au(o,r){return o.indexOf(r)}function Nt(o,r){return o.charCodeAt(r)|0}function to(o,r,f){return o.slice(r,f)}function Un(o){return o.length}function cu(o){return o.length}function zr(o,r){return r.push(o),o}function dg(o,r){return o.map(r).join("")}var _r=1,Fl=1,k0=0,en=0,Et=0,Wl="";function Or(o,r,f,u,h,m,S){return{value:o,root:r,parent:f,type:u,props:h,children:m,line:_r,column:Fl,length:S,return:""}}function $i(o,r){return sg(Or("",null,null,"",null,null,0),o,{length:-o.length},r)}function fg(){return Et}function hg(){return Et=en>0?Nt(Wl,--en):0,Fl--,Et===10&&(Fl=1,_r--),Et}function dn(){return Et=en<k0?Nt(Wl,en++):0,Fl++,Et===10&&(Fl=1,_r++),Et}function Bn(){return Nt(Wl,en)}function Mr(){return en}function lo(o,r){return to(Wl,o,r)}function no(o){switch(o){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function E0(o){return _r=Fl=1,k0=Un(Wl=o),en=0,[]}function T0(o){return Wl="",o}function Dr(o){return D0(lo(en-1,lu(o===91?o+2:o===40?o+1:o)))}function pg(o){for(;(Et=Bn())&&Et<33;)dn();return no(o)>2||no(Et)>3?"":" "}function mg(o,r){for(;--r&&dn()&&!(Et<48||Et>102||Et>57&&Et<65||Et>70&&Et<97););return lo(o,Mr()+(r<6&&Bn()==32&&dn()==32))}function lu(o){for(;dn();)switch(Et){case o:return en;case 34:case 39:o!==34&&o!==39&&lu(Et);break;case 40:o===41&&lu(o);break;case 92:dn();break}return en}function gg(o,r){for(;dn()&&o+Et!==57;)if(o+Et===84&&Bn()===47)break;return"/*"+lo(r,en-1)+"*"+Rr(o===47?o:dn())}function yg(o){for(;!no(Bn());)dn();return lo(o,en)}function bg(o){return T0(kr("",null,null,null,[""],o=E0(o),0,[0],o))}function kr(o,r,f,u,h,m,S,T,z){for(var g=0,O=0,D=S,j=0,G=0,H=0,V=1,ae=1,Z=1,re=0,P="",be=h,U=m,fe=u,$=P;ae;)switch(H=re,re=dn()){case 40:if(H!=108&&Nt($,D-1)==58){au($+=Ie(Dr(re),"&","&\f"),"&\f")!=-1&&(Z=-1);break}case 34:case 39:case 91:$+=Dr(re);break;case 9:case 10:case 13:case 32:$+=pg(H);break;case 92:$+=mg(Mr()-1,7);continue;case 47:switch(Bn()){case 42:case 47:zr(vg(gg(dn(),Mr()),r,f),z);break;default:$+="/"}break;case 123*V:T[g++]=Un($)*Z;case 125*V:case 59:case 0:switch(re){case 0:case 125:ae=0;case 59+O:Z==-1&&($=Ie($,/\f/g,"")),G>0&&Un($)-D&&zr(G>32?l0($+";",u,f,D-1):l0(Ie($," ","")+";",u,f,D-2),z);break;case 59:$+=";";default:if(zr(fe=a0($,r,f,g,O,h,T,P,be=[],U=[],D),m),re===123)if(O===0)kr($,r,fe,fe,be,m,D,T,U);else switch(j===99&&Nt($,3)===110?100:j){case 100:case 108:case 109:case 115:kr(o,fe,fe,u&&zr(a0(o,fe,fe,0,0,h,T,P,h,be=[],D),U),h,U,D,T,u?be:U);break;default:kr($,fe,fe,fe,[""],U,0,T,U)}}g=O=G=0,V=Z=1,P=$="",D=S;break;case 58:D=1+Un($),G=H;default:if(V<1){if(re==123)--V;else if(re==125&&V++==0&&hg()==125)continue}switch($+=Rr(re),re*V){case 38:Z=O>0?1:($+="\f",-1);break;case 44:T[g++]=(Un($)-1)*Z,Z=1;break;case 64:Bn()===45&&($+=Dr(dn())),j=Bn(),O=D=Un(P=$+=yg(Mr())),re++;break;case 45:H===45&&Un($)==2&&(V=0)}}return m}function a0(o,r,f,u,h,m,S,T,z,g,O){for(var D=h-1,j=h===0?m:[""],G=cu(j),H=0,V=0,ae=0;H<u;++H)for(var Z=0,re=to(o,D+1,D=rg(V=S[H])),P=o;Z<G;++Z)(P=D0(V>0?j[Z]+" "+re:Ie(re,/&\f/g,j[Z])))&&(z[ae++]=P);return Or(o,r,f,h===0?ru:T,z,g,O)}function vg(o,r,f){return Or(o,r,f,z0,Rr(fg()),to(o,2,-2),0)}function l0(o,r,f,u){return Or(o,r,f,su,to(o,0,u),to(o,u+1,-1),u)}function Jl(o,r){for(var f="",u=cu(o),h=0;h<u;h++)f+=r(o[h],h,o,r)||"";return f}function xg(o,r,f,u){switch(o.type){case og:if(o.children.length)break;case ig:case su:return o.return=o.return||o.value;case z0:return"";case M0:return o.return=o.value+"{"+Jl(o.children,u)+"}";case ru:o.value=o.props.join(",")}return Un(f=Jl(o.children,u))?o.return=o.value+"{"+f+"}":""}function Sg(o){var r=cu(o);return function(f,u,h,m){for(var S="",T=0;T<r;T++)S+=o[T](f,u,h,m)||"";return S}}function Cg(o){return function(r){r.root||(r=r.return)&&o(r)}}function wg(o){var r=Object.create(null);return function(f){return r[f]===void 0&&(r[f]=o(f)),r[f]}}var zg=function(r,f,u){for(var h=0,m=0;h=m,m=Bn(),h===38&&m===12&&(f[u]=1),!no(m);)dn();return lo(r,en)},Mg=function(r,f){var u=-1,h=44;do switch(no(h)){case 0:h===38&&Bn()===12&&(f[u]=1),r[u]+=zg(en-1,f,u);break;case 2:r[u]+=Dr(h);break;case 4:if(h===44){r[++u]=Bn()===58?"&\f":"",f[u]=r[u].length;break}default:r[u]+=Rr(h)}while(h=dn());return r},Dg=function(r,f){return T0(Mg(E0(r),f))},i0=new WeakMap,kg=function(r){if(!(r.type!=="rule"||!r.parent||r.length<1)){for(var f=r.value,u=r.parent,h=r.column===u.column&&r.line===u.line;u.type!=="rule";)if(u=u.parent,!u)return;if(!(r.props.length===1&&f.charCodeAt(0)!==58&&!i0.get(u))&&!h){i0.set(r,!0);for(var m=[],S=Dg(f,m),T=u.props,z=0,g=0;z<S.length;z++)for(var O=0;O<T.length;O++,g++)r.props[g]=m[z]?S[z].replace(/&\f/g,T[O]):T[O]+" "+S[z]}}},Eg=function(r){if(r.type==="decl"){var f=r.value;f.charCodeAt(0)===108&&f.charCodeAt(2)===98&&(r.return="",r.value="")}};function A0(o,r){switch(cg(o,r)){case 5103:return We+"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 We+o+o;case 5349:case 4246:case 4810:case 6968:case 2756:return We+o+Tr+o+Yt+o+o;case 6828:case 4268:return We+o+Yt+o+o;case 6165:return We+o+Yt+"flex-"+o+o;case 5187:return We+o+Ie(o,/(\w+).+(:[^]+)/,We+"box-$1$2"+Yt+"flex-$1$2")+o;case 5443:return We+o+Yt+"flex-item-"+Ie(o,/flex-|-self/,"")+o;case 4675:return We+o+Yt+"flex-line-pack"+Ie(o,/align-content|flex-|-self/,"")+o;case 5548:return We+o+Yt+Ie(o,"shrink","negative")+o;case 5292:return We+o+Yt+Ie(o,"basis","preferred-size")+o;case 6060:return We+"box-"+Ie(o,"-grow","")+We+o+Yt+Ie(o,"grow","positive")+o;case 4554:return We+Ie(o,/([^-])(transform)/g,"$1"+We+"$2")+o;case 6187:return Ie(Ie(Ie(o,/(zoom-|grab)/,We+"$1"),/(image-set)/,We+"$1"),o,"")+o;case 5495:case 3959:return Ie(o,/(image-set\([^]*)/,We+"$1$`$1");case 4968:return Ie(Ie(o,/(.+:)(flex-)?(.*)/,We+"box-pack:$3"+Yt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+We+o+o;case 4095:case 3583:case 4068:case 2532:return Ie(o,/(.+)-inline(.+)/,We+"$1$2")+o;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Un(o)-1-r>6)switch(Nt(o,r+1)){case 109:if(Nt(o,r+4)!==45)break;case 102:return Ie(o,/(.+:)(.+)-([^]+)/,"$1"+We+"$2-$3$1"+Tr+(Nt(o,r+3)==108?"$3":"$2-$3"))+o;case 115:return~au(o,"stretch")?A0(Ie(o,"stretch","fill-available"),r)+o:o}break;case 4949:if(Nt(o,r+1)!==115)break;case 6444:switch(Nt(o,Un(o)-3-(~au(o,"!important")&&10))){case 107:return Ie(o,":",":"+We)+o;case 101:return Ie(o,/(.+:)([^;!]+)(;|!.+)?/,"$1"+We+(Nt(o,14)===45?"inline-":"")+"box$3$1"+We+"$2$3$1"+Yt+"$2box$3")+o}break;case 5936:switch(Nt(o,r+11)){case 114:return We+o+Yt+Ie(o,/[svh]\w+-[tblr]{2}/,"tb")+o;case 108:return We+o+Yt+Ie(o,/[svh]\w+-[tblr]{2}/,"tb-rl")+o;case 45:return We+o+Yt+Ie(o,/[svh]\w+-[tblr]{2}/,"lr")+o}return We+o+Yt+o+o}return o}var Tg=function(r,f,u,h){if(r.length>-1&&!r.return)switch(r.type){case su:r.return=A0(r.value,r.length);break;case M0:return Jl([$i(r,{value:Ie(r.value,"@","@"+We)})],h);case ru:if(r.length)return dg(r.props,function(m){switch(ug(m,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Jl([$i(r,{props:[Ie(m,/:(read-\w+)/,":"+Tr+"$1")]})],h);case"::placeholder":return Jl([$i(r,{props:[Ie(m,/:(plac\w+)/,":"+We+"input-$1")]}),$i(r,{props:[Ie(m,/:(plac\w+)/,":"+Tr+"$1")]}),$i(r,{props:[Ie(m,/:(plac\w+)/,Yt+"input-$1")]})],h)}return""})}},Ag=[Tg],Rg=function(r){var f=r.key;if(f==="css"){var u=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(u,function(V){var ae=V.getAttribute("data-emotion");ae.indexOf(" ")!==-1&&(document.head.appendChild(V),V.setAttribute("data-s",""))})}var h=r.stylisPlugins||Ag,m={},S,T=[];S=r.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+f+' "]'),function(V){for(var ae=V.getAttribute("data-emotion").split(" "),Z=1;Z<ae.length;Z++)m[ae[Z]]=!0;T.push(V)});var z,g=[kg,Eg];{var O,D=[xg,Cg(function(V){O.insert(V)})],j=Sg(g.concat(h,D)),G=function(ae){return Jl(bg(ae),j)};z=function(ae,Z,re,P){O=re,G(ae?ae+"{"+Z.styles+"}":Z.styles),P&&(H.inserted[Z.name]=!0)}}var H={key:f,sheet:new lg({key:f,container:S,nonce:r.nonce,speedy:r.speedy,prepend:r.prepend,insertionPoint:r.insertionPoint}),nonce:r.nonce,inserted:m,registered:{},insert:z};return H.sheet.hydrate(T),H},Fc={exports:{}},Pe={};var o0;function _g(){if(o0)return Pe;o0=1;var o=typeof Symbol=="function"&&Symbol.for,r=o?Symbol.for("react.element"):60103,f=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,h=o?Symbol.for("react.strict_mode"):60108,m=o?Symbol.for("react.profiler"):60114,S=o?Symbol.for("react.provider"):60109,T=o?Symbol.for("react.context"):60110,z=o?Symbol.for("react.async_mode"):60111,g=o?Symbol.for("react.concurrent_mode"):60111,O=o?Symbol.for("react.forward_ref"):60112,D=o?Symbol.for("react.suspense"):60113,j=o?Symbol.for("react.suspense_list"):60120,G=o?Symbol.for("react.memo"):60115,H=o?Symbol.for("react.lazy"):60116,V=o?Symbol.for("react.block"):60121,ae=o?Symbol.for("react.fundamental"):60117,Z=o?Symbol.for("react.responder"):60118,re=o?Symbol.for("react.scope"):60119;function P(U){if(typeof U=="object"&&U!==null){var fe=U.$$typeof;switch(fe){case r:switch(U=U.type,U){case z:case g:case u:case m:case h:case D:return U;default:switch(U=U&&U.$$typeof,U){case T:case O:case H:case G:case S:return U;default:return fe}}case f:return fe}}}function be(U){return P(U)===g}return Pe.AsyncMode=z,Pe.ConcurrentMode=g,Pe.ContextConsumer=T,Pe.ContextProvider=S,Pe.Element=r,Pe.ForwardRef=O,Pe.Fragment=u,Pe.Lazy=H,Pe.Memo=G,Pe.Portal=f,Pe.Profiler=m,Pe.StrictMode=h,Pe.Suspense=D,Pe.isAsyncMode=function(U){return be(U)||P(U)===z},Pe.isConcurrentMode=be,Pe.isContextConsumer=function(U){return P(U)===T},Pe.isContextProvider=function(U){return P(U)===S},Pe.isElement=function(U){return typeof U=="object"&&U!==null&&U.$$typeof===r},Pe.isForwardRef=function(U){return P(U)===O},Pe.isFragment=function(U){return P(U)===u},Pe.isLazy=function(U){return P(U)===H},Pe.isMemo=function(U){return P(U)===G},Pe.isPortal=function(U){return P(U)===f},Pe.isProfiler=function(U){return P(U)===m},Pe.isStrictMode=function(U){return P(U)===h},Pe.isSuspense=function(U){return P(U)===D},Pe.isValidElementType=function(U){return typeof U=="string"||typeof U=="function"||U===u||U===g||U===m||U===h||U===D||U===j||typeof U=="object"&&U!==null&&(U.$$typeof===H||U.$$typeof===G||U.$$typeof===S||U.$$typeof===T||U.$$typeof===O||U.$$typeof===ae||U.$$typeof===Z||U.$$typeof===re||U.$$typeof===V)},Pe.typeOf=P,Pe}var r0;function Og(){return r0||(r0=1,Fc.exports=_g()),Fc.exports}var $c,s0;function Lg(){if(s0)return $c;s0=1;var o=Og(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},f={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},u={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},h={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},m={};m[o.ForwardRef]=u,m[o.Memo]=h;function S(H){return o.isMemo(H)?h:m[H.$$typeof]||r}var T=Object.defineProperty,z=Object.getOwnPropertyNames,g=Object.getOwnPropertySymbols,O=Object.getOwnPropertyDescriptor,D=Object.getPrototypeOf,j=Object.prototype;function G(H,V,ae){if(typeof V!="string"){if(j){var Z=D(V);Z&&Z!==j&&G(H,Z,ae)}var re=z(V);g&&(re=re.concat(g(V)));for(var P=S(H),be=S(V),U=0;U<re.length;++U){var fe=re[U];if(!f[fe]&&!(ae&&ae[fe])&&!(be&&be[fe])&&!(P&&P[fe])){var $=O(V,fe);try{T(H,fe,$)}catch{}}}}return H}return $c=G,$c}Lg();var Ug=!0;function Hg(o,r,f){var u="";return f.split(" ").forEach(function(h){o[h]!==void 0?r.push(o[h]+";"):h&&(u+=h+" ")}),u}var R0=function(r,f,u){var h=r.key+"-"+f.name;(u===!1||Ug===!1)&&r.registered[h]===void 0&&(r.registered[h]=f.styles)},Bg=function(r,f,u){R0(r,f,u);var h=r.key+"-"+f.name;if(r.inserted[f.name]===void 0){var m=f;do r.insert(f===m?"."+h:"",m,r.sheet,!0),m=m.next;while(m!==void 0)}};function Ng(o){for(var r=0,f,u=0,h=o.length;h>=4;++u,h-=4)f=o.charCodeAt(u)&255|(o.charCodeAt(++u)&255)<<8|(o.charCodeAt(++u)&255)<<16|(o.charCodeAt(++u)&255)<<24,f=(f&65535)*1540483477+((f>>>16)*59797<<16),f^=f>>>24,r=(f&65535)*1540483477+((f>>>16)*59797<<16)^(r&65535)*1540483477+((r>>>16)*59797<<16);switch(h){case 3:r^=(o.charCodeAt(u+2)&255)<<16;case 2:r^=(o.charCodeAt(u+1)&255)<<8;case 1:r^=o.charCodeAt(u)&255,r=(r&65535)*1540483477+((r>>>16)*59797<<16)}return r^=r>>>13,r=(r&65535)*1540483477+((r>>>16)*59797<<16),((r^r>>>15)>>>0).toString(36)}var jg={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},qg=/[A-Z]|^ms/g,Yg=/_EMO_([^_]+?)_([^]*?)_EMO_/g,_0=function(r){return r.charCodeAt(1)===45},c0=function(r){return r!=null&&typeof r!="boolean"},Wc=wg(function(o){return _0(o)?o:o.replace(qg,"-$&").toLowerCase()}),u0=function(r,f){switch(r){case"animation":case"animationName":if(typeof f=="string")return f.replace(Yg,function(u,h,m){return Hn={name:h,styles:m,next:Hn},h})}return jg[r]!==1&&!_0(r)&&typeof f=="number"&&f!==0?f+"px":f};function ao(o,r,f){if(f==null)return"";var u=f;if(u.__emotion_styles!==void 0)return u;switch(typeof f){case"boolean":return"";case"object":{var h=f;if(h.anim===1)return Hn={name:h.name,styles:h.styles,next:Hn},h.name;var m=f;if(m.styles!==void 0){var S=m.next;if(S!==void 0)for(;S!==void 0;)Hn={name:S.name,styles:S.styles,next:Hn},S=S.next;var T=m.styles+";";return T}return Gg(o,r,f)}case"function":{if(o!==void 0){var z=Hn,g=f(o);return Hn=z,ao(o,r,g)}break}}var O=f;return O}function Gg(o,r,f){var u="";if(Array.isArray(f))for(var h=0;h<f.length;h++)u+=ao(o,r,f[h])+";";else for(var m in f){var S=f[m];if(typeof S!="object"){var T=S;c0(T)&&(u+=Wc(m)+":"+u0(m,T)+";")}else if(Array.isArray(S)&&typeof S[0]=="string"&&r==null)for(var z=0;z<S.length;z++)c0(S[z])&&(u+=Wc(m)+":"+u0(m,S[z])+";");else{var g=ao(o,r,S);switch(m){case"animation":case"animationName":{u+=Wc(m)+":"+g+";";break}default:u+=m+"{"+g+"}"}}}return u}var d0=/label:\s*([^\s;{]+)\s*(;|$)/g,Hn;function O0(o,r,f){if(o.length===1&&typeof o[0]=="object"&&o[0]!==null&&o[0].styles!==void 0)return o[0];var u=!0,h="";Hn=void 0;var m=o[0];if(m==null||m.raw===void 0)u=!1,h+=ao(f,r,m);else{var S=m;h+=S[0]}for(var T=1;T<o.length;T++)if(h+=ao(f,r,o[T]),u){var z=m;h+=z[T]}d0.lastIndex=0;for(var g="",O;(O=d0.exec(h))!==null;)g+="-"+O[1];var D=Ng(h)+g;return{name:D,styles:h,next:Hn}}var Xg=function(r){return r()},Vg=n0.useInsertionEffect?n0.useInsertionEffect:!1,Qg=Vg||Xg,L0=w.createContext(typeof HTMLElement<"u"?Rg({key:"css"}):null);L0.Provider;var Kg=function(r){return w.forwardRef(function(f,u){var h=w.useContext(L0);return r(f,h,u)})},Zg=w.createContext({}),io={}.hasOwnProperty,iu="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",uu=function(r,f){var u={};for(var h in f)io.call(f,h)&&(u[h]=f[h]);return u[iu]=r,u},Jg=function(r){var f=r.cache,u=r.serialized,h=r.isStringTag;return R0(f,u,h),Qg(function(){return Bg(f,u,h)}),null},Fg=Kg(function(o,r,f){var u=o.css;typeof u=="string"&&r.registered[u]!==void 0&&(u=r.registered[u]);var h=o[iu],m=[u],S="";typeof o.className=="string"?S=Hg(r.registered,m,o.className):o.className!=null&&(S=o.className+" ");var T=O0(m,void 0,w.useContext(Zg));S+=r.key+"-"+T.name;var z={};for(var g in o)io.call(o,g)&&g!=="css"&&g!==iu&&(z[g]=o[g]);return z.className=S,f&&(z.ref=f),w.createElement(w.Fragment,null,w.createElement(Jg,{cache:r,serialized:T,isStringTag:typeof h=="string"}),w.createElement(h,z))}),du=Fg,ct=eo.Fragment,s=function(r,f,u){return io.call(f,"css")?eo.jsx(du,uu(r,f),u):eo.jsx(r,f,u)},v=function(r,f,u){return io.call(f,"css")?eo.jsxs(du,uu(r,f),u):eo.jsxs(r,f,u)},Ic={exports:{}},Wi={},Pc={exports:{}},eu={};var f0;function $g(){return f0||(f0=1,(function(o){function r(R,q){var ue=R.length;R.push(q);e:for(;0<ue;){var Le=ue-1>>>1,W=R[Le];if(0<h(W,q))R[Le]=q,R[ue]=W,ue=Le;else break e}}function f(R){return R.length===0?null:R[0]}function u(R){if(R.length===0)return null;var q=R[0],ue=R.pop();if(ue!==q){R[0]=ue;e:for(var Le=0,W=R.length,b=W>>>1;Le<b;){var _=2*(Le+1)-1,F=R[_],se=_+1,xe=R[se];if(0>h(F,ue))se<W&&0>h(xe,F)?(R[Le]=xe,R[se]=ue,Le=se):(R[Le]=F,R[_]=ue,Le=_);else if(se<W&&0>h(xe,ue))R[Le]=xe,R[se]=ue,Le=se;else break e}}return q}function h(R,q){var ue=R.sortIndex-q.sortIndex;return ue!==0?ue:R.id-q.id}if(o.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;o.unstable_now=function(){return m.now()}}else{var S=Date,T=S.now();o.unstable_now=function(){return S.now()-T}}var z=[],g=[],O=1,D=null,j=3,G=!1,H=!1,V=!1,ae=!1,Z=typeof setTimeout=="function"?setTimeout:null,re=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;function be(R){for(var q=f(g);q!==null;){if(q.callback===null)u(g);else if(q.startTime<=R)u(g),q.sortIndex=q.expirationTime,r(z,q);else break;q=f(g)}}function U(R){if(V=!1,be(R),!H)if(f(z)!==null)H=!0,fe||(fe=!0,ne());else{var q=f(g);q!==null&&_e(U,q.startTime-R)}}var fe=!1,$=-1,J=5,B=-1;function ie(){return ae?!0:!(o.unstable_now()-B<J)}function ve(){if(ae=!1,fe){var R=o.unstable_now();B=R;var q=!0;try{e:{H=!1,V&&(V=!1,re($),$=-1),G=!0;var ue=j;try{t:{for(be(R),D=f(z);D!==null&&!(D.expirationTime>R&&ie());){var Le=D.callback;if(typeof Le=="function"){D.callback=null,j=D.priorityLevel;var W=Le(D.expirationTime<=R);if(R=o.unstable_now(),typeof W=="function"){D.callback=W,be(R),q=!0;break t}D===f(z)&&u(z),be(R)}else u(z);D=f(z)}if(D!==null)q=!0;else{var b=f(g);b!==null&&_e(U,b.startTime-R),q=!1}}break e}finally{D=null,j=ue,G=!1}q=void 0}}finally{q?ne():fe=!1}}}var ne;if(typeof P=="function")ne=function(){P(ve)};else if(typeof MessageChannel<"u"){var I=new MessageChannel,we=I.port2;I.port1.onmessage=ve,ne=function(){we.postMessage(null)}}else ne=function(){Z(ve,0)};function _e(R,q){$=Z(function(){R(o.unstable_now())},q)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(R){R.callback=null},o.unstable_forceFrameRate=function(R){0>R||125<R?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<R?Math.floor(1e3/R):5},o.unstable_getCurrentPriorityLevel=function(){return j},o.unstable_next=function(R){switch(j){case 1:case 2:case 3:var q=3;break;default:q=j}var ue=j;j=q;try{return R()}finally{j=ue}},o.unstable_requestPaint=function(){ae=!0},o.unstable_runWithPriority=function(R,q){switch(R){case 1:case 2:case 3:case 4:case 5:break;default:R=3}var ue=j;j=R;try{return q()}finally{j=ue}},o.unstable_scheduleCallback=function(R,q,ue){var Le=o.unstable_now();switch(typeof ue=="object"&&ue!==null?(ue=ue.delay,ue=typeof ue=="number"&&0<ue?Le+ue:Le):ue=Le,R){case 1:var W=-1;break;case 2:W=250;break;case 5:W=1073741823;break;case 4:W=1e4;break;default:W=5e3}return W=ue+W,R={id:O++,callback:q,priorityLevel:R,startTime:ue,expirationTime:W,sortIndex:-1},ue>Le?(R.sortIndex=ue,r(g,R),f(z)===null&&R===f(g)&&(V?(re($),$=-1):V=!0,_e(U,ue-Le))):(R.sortIndex=W,r(z,R),H||G||(H=!0,fe||(fe=!0,ne()))),R},o.unstable_shouldYield=ie,o.unstable_wrapCallback=function(R){var q=j;return function(){var ue=j;j=q;try{return R.apply(this,arguments)}finally{j=ue}}}})(eu)),eu}var h0;function Wg(){return h0||(h0=1,Pc.exports=$g()),Pc.exports}var tu={exports:{}},qt={};var p0;function Ig(){if(p0)return qt;p0=1;var o=ou();function r(z){var g="https://react.dev/errors/"+z;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var O=2;O<arguments.length;O++)g+="&args[]="+encodeURIComponent(arguments[O])}return"Minified React error #"+z+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var u={d:{f,r:function(){throw Error(r(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},h=Symbol.for("react.portal");function m(z,g,O){var D=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:D==null?null:""+D,children:z,containerInfo:g,implementation:O}}var S=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function T(z,g){if(z==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,qt.createPortal=function(z,g){var O=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(r(299));return m(z,g,null,O)},qt.flushSync=function(z){var g=S.T,O=u.p;try{if(S.T=null,u.p=2,z)return z()}finally{S.T=g,u.p=O,u.d.f()}},qt.preconnect=function(z,g){typeof z=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,u.d.C(z,g))},qt.prefetchDNS=function(z){typeof z=="string"&&u.d.D(z)},qt.preinit=function(z,g){if(typeof z=="string"&&g&&typeof g.as=="string"){var O=g.as,D=T(O,g.crossOrigin),j=typeof g.integrity=="string"?g.integrity:void 0,G=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;O==="style"?u.d.S(z,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:D,integrity:j,fetchPriority:G}):O==="script"&&u.d.X(z,{crossOrigin:D,integrity:j,fetchPriority:G,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},qt.preinitModule=function(z,g){if(typeof z=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var O=T(g.as,g.crossOrigin);u.d.M(z,{crossOrigin:O,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&u.d.M(z)},qt.preload=function(z,g){if(typeof z=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var O=g.as,D=T(O,g.crossOrigin);u.d.L(z,O,{crossOrigin:D,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})}},qt.preloadModule=function(z,g){if(typeof z=="string")if(g){var O=T(g.as,g.crossOrigin);u.d.m(z,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:O,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else u.d.m(z)},qt.requestFormReset=function(z){u.d.r(z)},qt.unstable_batchedUpdates=function(z,g){return z(g)},qt.useFormState=function(z,g,O){return S.H.useFormState(z,g,O)},qt.useFormStatus=function(){return S.H.useHostTransitionStatus()},qt.version="19.2.4",qt}var m0;function Pg(){if(m0)return tu.exports;m0=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(r){console.error(r)}}return o(),tu.exports=Ig(),tu.exports}var g0;function e1(){if(g0)return Wi;g0=1;var o=Wg(),r=ou(),f=Pg();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function S(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function T(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 z(e){if(m(e)!==e)throw Error(u(188))}function g(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,a=t;;){var l=n.return;if(l===null)break;var i=l.alternate;if(i===null){if(a=l.return,a!==null){n=a;continue}break}if(l.child===i.child){for(i=l.child;i;){if(i===n)return z(l),e;if(i===a)return z(l),t;i=i.sibling}throw Error(u(188))}if(n.return!==a.return)n=l,a=i;else{for(var c=!1,p=l.child;p;){if(p===n){c=!0,n=l,a=i;break}if(p===a){c=!0,a=l,n=i;break}p=p.sibling}if(!c){for(p=i.child;p;){if(p===n){c=!0,n=i,a=l;break}if(p===a){c=!0,a=i,n=l;break}p=p.sibling}if(!c)throw Error(u(189))}}if(n.alternate!==a)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function O(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=O(e),t!==null)return t;e=e.sibling}return null}var D=Object.assign,j=Symbol.for("react.element"),G=Symbol.for("react.transitional.element"),H=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),ae=Symbol.for("react.strict_mode"),Z=Symbol.for("react.profiler"),re=Symbol.for("react.consumer"),P=Symbol.for("react.context"),be=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),fe=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),ie=Symbol.for("react.memo_cache_sentinel"),ve=Symbol.iterator;function ne(e){return e===null||typeof e!="object"?null:(e=ve&&e[ve]||e["@@iterator"],typeof e=="function"?e:null)}var I=Symbol.for("react.client.reference");function we(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===I?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case V:return"Fragment";case Z:return"Profiler";case ae:return"StrictMode";case U:return"Suspense";case fe:return"SuspenseList";case B:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case H:return"Portal";case P:return e.displayName||"Context";case re:return(e._context.displayName||"Context")+".Consumer";case be:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $:return t=e.displayName||null,t!==null?t:we(e.type)||"Memo";case J:t=e._payload,e=e._init;try{return we(e(t))}catch{}}return null}var _e=Array.isArray,R=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue={pending:!1,data:null,method:null,action:null},Le=[],W=-1;function b(e){return{current:e}}function _(e){0>W||(e.current=Le[W],Le[W]=null,W--)}function F(e,t){W++,Le[W]=e.current,e.current=t}var se=b(null),xe=b(null),Oe=b(null),Ne=b(null);function Ye(e,t){switch(F(Oe,t),F(xe,e),F(se,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Sh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Sh(t),e=Ch(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}_(se),F(se,e)}function Me(){_(se),_(xe),_(Oe)}function _t(e){e.memoizedState!==null&&F(Ne,e);var t=se.current,n=Ch(t,e.type);t!==n&&(F(xe,e),F(se,n))}function le(e){xe.current===e&&(_(se),_(xe)),Ne.current===e&&(_(Ne),Qi._currentValue=ue)}var Gt,Xt;function Ce(e){if(Gt===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Gt=t&&t[1]||"",Xt=-1<n.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Gt+e+Xt}var tt=!1;function Qe(e,t){if(!e||tt)return"";tt=!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(L){var A=L}Reflect.construct(e,[],X)}else{try{X.call()}catch(L){A=L}e.call(X.prototype)}}else{try{throw Error()}catch(L){A=L}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(L){if(L&&A&&typeof L.stack=="string")return[L.stack,A.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),c=i[0],p=i[1];if(c&&p){var x=c.split(`
4
+ `),E=p.split(`
5
+ `);for(l=a=0;a<x.length&&!x[a].includes("DetermineComponentFrameRoot");)a++;for(;l<E.length&&!E[l].includes("DetermineComponentFrameRoot");)l++;if(a===x.length||l===E.length)for(a=x.length-1,l=E.length-1;1<=a&&0<=l&&x[a]!==E[l];)l--;for(;1<=a&&0<=l;a--,l--)if(x[a]!==E[l]){if(a!==1||l!==1)do if(a--,l--,0>l||x[a]!==E[l]){var N=`
6
+ `+x[a].replace(" at new "," at ");return e.displayName&&N.includes("<anonymous>")&&(N=N.replace("<anonymous>",e.displayName)),N}while(1<=a&&0<=l);break}}}finally{tt=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Ce(n):""}function Ct(e,t){switch(e.tag){case 26:case 27:case 5:return Ce(e.type);case 16:return Ce("Lazy");case 13:return e.child!==t&&t!==null?Ce("Suspense Fallback"):Ce("Suspense");case 19:return Ce("SuspenseList");case 0:case 15:return Qe(e.type,!1);case 11:return Qe(e.type.render,!1);case 1:return Qe(e.type,!0);case 31:return Ce("Activity");default:return""}}function rt(e){try{var t="",n=null;do t+=Ct(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}}var wn=Object.prototype.hasOwnProperty,Ha=o.unstable_scheduleCallback,fn=o.unstable_cancelCallback,Pl=o.unstable_shouldYield,rl=o.unstable_requestPaint,jt=o.unstable_now,oa=o.unstable_getCurrentPriorityLevel,ei=o.unstable_ImmediatePriority,Ba=o.unstable_UserBlockingPriority,ra=o.unstable_NormalPriority,ti=o.unstable_LowPriority,wt=o.unstable_IdlePriority,Na=o.log,Lr=o.unstable_setDisableYieldValue,Nn=null,Vt=null;function zn(e){if(typeof Na=="function"&&Lr(e),Vt&&typeof Vt.setStrictMode=="function")try{Vt.setStrictMode(Nn,e)}catch{}}var Qt=Math.clz32?Math.clz32:Br,Ur=Math.log,Hr=Math.LN2;function Br(e){return e>>>=0,e===0?32:31-(Ur(e)/Hr|0)|0}var sl=256,cl=262144,ja=4194304;function jn(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 ul(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var l=0,i=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var p=a&134217727;return p!==0?(a=p&~i,a!==0?l=jn(a):(c&=p,c!==0?l=jn(c):n||(n=p&~e,n!==0&&(l=jn(n))))):(p=a&~i,p!==0?l=jn(p):c!==0?l=jn(c):n||(n=a&~e,n!==0&&(l=jn(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 qa(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Nr(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ro(){var e=ja;return ja<<=1,(ja&62914560)===0&&(ja=4194304),e}function ni(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ya(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function jr(e,t,n,a,l,i){var c=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var p=e.entanglements,x=e.expirationTimes,E=e.hiddenUpdates;for(n=c&~n;0<n;){var N=31-Qt(n),X=1<<N;p[N]=0,x[N]=-1;var A=E[N];if(A!==null)for(E[N]=null,N=0;N<A.length;N++){var L=A[N];L!==null&&(L.lane&=-536870913)}n&=~X}a!==0&&so(e,a,0),i!==0&&l===0&&e.tag!==0&&(e.suspendedLanes|=i&~(c&~t))}function so(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Qt(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function co(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Qt(n),l=1<<a;l&t|e[a]&t&&(e[a]|=t),n&=~l}}function ai(e,t){var n=t&-t;return n=(n&42)!==0?1:qn(n),(n&(e.suspendedLanes|t))!==0?0:n}function qn(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function li(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function uo(){var e=q.p;return e!==0?e:(e=window.event,e===void 0?32:Qh(e.type))}function Mn(e,t){var n=q.p;try{return q.p=e,t()}finally{q.p=n}}var An=Math.random().toString(36).slice(2),ht="__reactFiber$"+An,vt="__reactProps$"+An,nn="__reactContainer$"+An,dl="__reactEvents$"+An,sa="__reactListeners$"+An,ca="__reactHandles$"+An,ii="__reactResources$"+An,Ga="__reactMarker$"+An;function oi(e){delete e[ht],delete e[vt],delete e[dl],delete e[sa],delete e[ca]}function Yn(e){var t=e[ht];if(t)return t;for(var n=e.parentNode;n;){if(t=n[nn]||n[ht]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Th(e);e!==null;){if(n=e[ht])return n;e=Th(e)}return t}e=n,n=e.parentNode}return null}function ce(e){if(e=e[ht]||e[nn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ee(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function he(e){var t=e[ii];return t||(t=e[ii]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function pe(e){e[Ga]=!0}var De=new Set,Ee={};function Ke(e,t){Ze(e,t),Ze(e+"Capture",t)}function Ze(e,t){for(Ee[e]=t,e=0;e<t.length;e++)De.add(t[e])}var Te=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]*$"),Kt={},ri={};function X0(e){return wn.call(ri,e)?!0:wn.call(Kt,e)?!1:Te.test(e)?ri[e]=!0:(Kt[e]=!0,!1)}function fo(e,t,n){if(X0(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function ho(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Gn(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 hn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function V0(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var l=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(c){n=""+c,i.call(this,c)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(c){n=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qr(e){if(!e._valueTracker){var t=fu(e)?"checked":"value";e._valueTracker=V0(e,t,""+e[t])}}function hu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=fu(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function po(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Q0=/[\n"\\]/g;function pn(e){return e.replace(Q0,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Yr(e,t,n,a,l,i,c,p){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+hn(t)):e.value!==""+hn(t)&&(e.value=""+hn(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?Gr(e,c,hn(t)):n!=null?Gr(e,c,hn(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=""+hn(p):e.removeAttribute("name")}function pu(e,t,n,a,l,i,c,p){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){qr(e);return}n=n!=null?""+hn(n):"",t=t!=null?""+hn(t):n,p||t===e.value||(e.value=t),e.defaultValue=t}a=a??l,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=p?e.checked:!!a,e.defaultChecked=!!a,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),qr(e)}function Gr(e,t,n){t==="number"&&po(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function fl(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=""+hn(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 mu(e,t,n){if(t!=null&&(t=""+hn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+hn(n):""}function gu(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(u(92));if(_e(a)){if(1<a.length)throw Error(u(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=hn(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),qr(e)}function hl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var K0=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 yu(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||K0.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function bu(e,t,n){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var l in t)a=t[l],t.hasOwnProperty(l)&&n[l]!==a&&yu(e,l,a)}else for(var i in t)t.hasOwnProperty(i)&&yu(e,i,t[i])}function Xr(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Z0=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"]]),J0=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function mo(e){return J0.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Xn(){}var Vr=null;function Qr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var pl=null,ml=null;function vu(e){var t=ce(e);if(t&&(e=t.stateNode)){var n=e[vt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Yr(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+pn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var l=a[vt]||null;if(!l)throw Error(u(90));Yr(a,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&hu(a)}break e;case"textarea":mu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&fl(e,!!n.multiple,t,!1)}}}var Kr=!1;function xu(e,t,n){if(Kr)return e(t,n);Kr=!0;try{var a=e(t);return a}finally{if(Kr=!1,(pl!==null||ml!==null)&&(nr(),pl&&(t=pl,e=ml,ml=pl=null,vu(t),e)))for(t=0;t<e.length;t++)vu(e[t])}}function si(e,t){var n=e.stateNode;if(n===null)return null;var a=n[vt]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(u(231,t,typeof n));return n}var Vn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zr=!1;if(Vn)try{var ci={};Object.defineProperty(ci,"passive",{get:function(){Zr=!0}}),window.addEventListener("test",ci,ci),window.removeEventListener("test",ci,ci)}catch{Zr=!1}var ua=null,Jr=null,go=null;function Su(){if(go)return go;var e,t=Jr,n=t.length,a,l="value"in ua?ua.value:ua.textContent,i=l.length;for(e=0;e<n&&t[e]===l[e];e++);var c=n-e;for(a=1;a<=c&&t[n-a]===l[i-a];a++);return go=l.slice(e,1<a?1-a:void 0)}function yo(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function bo(){return!0}function Cu(){return!1}function Jt(e){function t(n,a,l,i,c){this._reactName=n,this._targetInst=l,this.type=a,this.nativeEvent=i,this.target=c,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(n=e[p],this[p]=n?n(i):i[p]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?bo:Cu,this.isPropagationStopped=Cu,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=bo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=bo)},persist:function(){},isPersistent:bo}),t}var Xa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},vo=Jt(Xa),ui=D({},Xa,{view:0,detail:0}),F0=Jt(ui),Fr,$r,di,xo=D({},ui,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ir,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==di&&(di&&e.type==="mousemove"?(Fr=e.screenX-di.screenX,$r=e.screenY-di.screenY):$r=Fr=0,di=e),Fr)},movementY:function(e){return"movementY"in e?e.movementY:$r}}),wu=Jt(xo),$0=D({},xo,{dataTransfer:0}),W0=Jt($0),I0=D({},ui,{relatedTarget:0}),Wr=Jt(I0),P0=D({},Xa,{animationName:0,elapsedTime:0,pseudoElement:0}),ep=Jt(P0),tp=D({},Xa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),np=Jt(tp),ap=D({},Xa,{data:0}),zu=Jt(ap),lp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ip={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"},op={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function rp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=op[e])?!!t[e]:!1}function Ir(){return rp}var sp=D({},ui,{key:function(e){if(e.key){var t=lp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=yo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?ip[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ir,charCode:function(e){return e.type==="keypress"?yo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?yo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),cp=Jt(sp),up=D({},xo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mu=Jt(up),dp=D({},ui,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ir}),fp=Jt(dp),hp=D({},Xa,{propertyName:0,elapsedTime:0,pseudoElement:0}),pp=Jt(hp),mp=D({},xo,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),gp=Jt(mp),yp=D({},Xa,{newState:0,oldState:0}),bp=Jt(yp),vp=[9,13,27,32],Pr=Vn&&"CompositionEvent"in window,fi=null;Vn&&"documentMode"in document&&(fi=document.documentMode);var xp=Vn&&"TextEvent"in window&&!fi,Du=Vn&&(!Pr||fi&&8<fi&&11>=fi),ku=" ",Eu=!1;function Tu(e,t){switch(e){case"keyup":return vp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Au(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var gl=!1;function Sp(e,t){switch(e){case"compositionend":return Au(t);case"keypress":return t.which!==32?null:(Eu=!0,ku);case"textInput":return e=t.data,e===ku&&Eu?null:e;default:return null}}function Cp(e,t){if(gl)return e==="compositionend"||!Pr&&Tu(e,t)?(e=Su(),go=Jr=ua=null,gl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Du&&t.locale!=="ko"?null:t.data;default:return null}}var wp={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 Ru(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!wp[e.type]:t==="textarea"}function _u(e,t,n,a){pl?ml?ml.push(a):ml=[a]:pl=a,t=cr(t,"onChange"),0<t.length&&(n=new vo("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var hi=null,pi=null;function zp(e){mh(e,0)}function So(e){var t=ee(e);if(hu(t))return e}function Ou(e,t){if(e==="change")return t}var Lu=!1;if(Vn){var es;if(Vn){var ts="oninput"in document;if(!ts){var Uu=document.createElement("div");Uu.setAttribute("oninput","return;"),ts=typeof Uu.oninput=="function"}es=ts}else es=!1;Lu=es&&(!document.documentMode||9<document.documentMode)}function Hu(){hi&&(hi.detachEvent("onpropertychange",Bu),pi=hi=null)}function Bu(e){if(e.propertyName==="value"&&So(pi)){var t=[];_u(t,pi,e,Qr(e)),xu(zp,t)}}function Mp(e,t,n){e==="focusin"?(Hu(),hi=t,pi=n,hi.attachEvent("onpropertychange",Bu)):e==="focusout"&&Hu()}function Dp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return So(pi)}function kp(e,t){if(e==="click")return So(t)}function Ep(e,t){if(e==="input"||e==="change")return So(t)}function Tp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var an=typeof Object.is=="function"?Object.is:Tp;function mi(e,t){if(an(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(!wn.call(t,l)||!an(e[l],t[l]))return!1}return!0}function Nu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ju(e,t){var n=Nu(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=Nu(n)}}function qu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?qu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=po(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=po(e.document)}return t}function ns(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var Ap=Vn&&"documentMode"in document&&11>=document.documentMode,yl=null,as=null,gi=null,ls=!1;function Gu(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ls||yl==null||yl!==po(a)||(a=yl,"selectionStart"in a&&ns(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),gi&&mi(gi,a)||(gi=a,a=cr(as,"onSelect"),0<a.length&&(t=new vo("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=yl)))}function Va(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var bl={animationend:Va("Animation","AnimationEnd"),animationiteration:Va("Animation","AnimationIteration"),animationstart:Va("Animation","AnimationStart"),transitionrun:Va("Transition","TransitionRun"),transitionstart:Va("Transition","TransitionStart"),transitioncancel:Va("Transition","TransitionCancel"),transitionend:Va("Transition","TransitionEnd")},is={},Xu={};Vn&&(Xu=document.createElement("div").style,"AnimationEvent"in window||(delete bl.animationend.animation,delete bl.animationiteration.animation,delete bl.animationstart.animation),"TransitionEvent"in window||delete bl.transitionend.transition);function Qa(e){if(is[e])return is[e];if(!bl[e])return e;var t=bl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Xu)return is[e]=t[n];return e}var Vu=Qa("animationend"),Qu=Qa("animationiteration"),Ku=Qa("animationstart"),Rp=Qa("transitionrun"),_p=Qa("transitionstart"),Op=Qa("transitioncancel"),Zu=Qa("transitionend"),Ju=new Map,os="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");os.push("scrollEnd");function Dn(e,t){Ju.set(e,t),Ke(t,[e])}var Co=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},mn=[],vl=0,rs=0;function wo(){for(var e=vl,t=rs=vl=0;t<e;){var n=mn[t];mn[t++]=null;var a=mn[t];mn[t++]=null;var l=mn[t];mn[t++]=null;var i=mn[t];if(mn[t++]=null,a!==null&&l!==null){var c=a.pending;c===null?l.next=l:(l.next=c.next,c.next=l),a.pending=l}i!==0&&Fu(n,l,i)}}function zo(e,t,n,a){mn[vl++]=e,mn[vl++]=t,mn[vl++]=n,mn[vl++]=a,rs|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function ss(e,t,n,a){return zo(e,t,n,a),Mo(e)}function Ka(e,t){return zo(e,null,null,t),Mo(e)}function Fu(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-Qt(n),e=i.hiddenUpdates,a=e[l],a===null?e[l]=[t]:a.push(t),t.lane=n|536870912),i):null}function Mo(e){if(50<Ni)throw Ni=0,yc=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var xl={};function Lp(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 ln(e,t,n,a){return new Lp(e,t,n,a)}function cs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qn(e,t){var n=e.alternate;return n===null?(n=ln(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 $u(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 Do(e,t,n,a,l,i){var c=0;if(a=e,typeof e=="function")cs(e)&&(c=1);else if(typeof e=="string")c=jm(e,n,se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case B:return e=ln(31,n,t,l),e.elementType=B,e.lanes=i,e;case V:return Za(n.children,l,i,t);case ae:c=8,l|=24;break;case Z:return e=ln(12,n,t,l|2),e.elementType=Z,e.lanes=i,e;case U:return e=ln(13,n,t,l),e.elementType=U,e.lanes=i,e;case fe:return e=ln(19,n,t,l),e.elementType=fe,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case P:c=10;break e;case re:c=9;break e;case be:c=11;break e;case $:c=14;break e;case J:c=16,a=null;break e}c=29,n=Error(u(130,e===null?"null":typeof e,"")),a=null}return t=ln(c,n,t,l),t.elementType=e,t.type=a,t.lanes=i,t}function Za(e,t,n,a){return e=ln(7,e,a,t),e.lanes=n,e}function us(e,t,n){return e=ln(6,e,null,t),e.lanes=n,e}function Wu(e){var t=ln(18,null,null,0);return t.stateNode=e,t}function ds(e,t,n){return t=ln(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Iu=new WeakMap;function gn(e,t){if(typeof e=="object"&&e!==null){var n=Iu.get(e);return n!==void 0?n:(t={value:e,source:t,stack:rt(t)},Iu.set(e,t),t)}return{value:e,source:t,stack:rt(t)}}var Sl=[],Cl=0,ko=null,yi=0,yn=[],bn=0,da=null,Rn=1,_n="";function Kn(e,t){Sl[Cl++]=yi,Sl[Cl++]=ko,ko=e,yi=t}function Pu(e,t,n){yn[bn++]=Rn,yn[bn++]=_n,yn[bn++]=da,da=e;var a=Rn;e=_n;var l=32-Qt(a)-1;a&=~(1<<l),n+=1;var i=32-Qt(t)+l;if(30<i){var c=l-l%5;i=(a&(1<<c)-1).toString(32),a>>=c,l-=c,Rn=1<<32-Qt(t)+l|n<<l|a,_n=i+e}else Rn=1<<i|n<<l|a,_n=e}function fs(e){e.return!==null&&(Kn(e,1),Pu(e,1,0))}function hs(e){for(;e===ko;)ko=Sl[--Cl],Sl[Cl]=null,yi=Sl[--Cl],Sl[Cl]=null;for(;e===da;)da=yn[--bn],yn[bn]=null,_n=yn[--bn],yn[bn]=null,Rn=yn[--bn],yn[bn]=null}function ed(e,t){yn[bn++]=Rn,yn[bn++]=_n,yn[bn++]=da,Rn=t.id,_n=t.overflow,da=e}var Ot=null,dt=null,Ve=!1,fa=null,vn=!1,ps=Error(u(519));function ha(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw bi(gn(t,e)),ps}function td(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[ht]=e,t[vt]=a,n){case"dialog":qe("cancel",t),qe("close",t);break;case"iframe":case"object":case"embed":qe("load",t);break;case"video":case"audio":for(n=0;n<qi.length;n++)qe(qi[n],t);break;case"source":qe("error",t);break;case"img":case"image":case"link":qe("error",t),qe("load",t);break;case"details":qe("toggle",t);break;case"input":qe("invalid",t),pu(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),gu(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||vh(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=Xn),t=!0):t=!1,t||ha(e,!0)}function nd(e){for(Ot=e.return;Ot;)switch(Ot.tag){case 5:case 31:case 13:vn=!1;return;case 27:case 3:vn=!0;return;default:Ot=Ot.return}}function wl(e){if(e!==Ot)return!1;if(!Ve)return nd(e),Ve=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||_c(e.type,e.memoizedProps)),n=!n),n&&dt&&ha(e),nd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));dt=Eh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));dt=Eh(e)}else t===27?(t=dt,ka(e.type)?(e=Bc,Bc=null,dt=e):dt=t):dt=Ot?Sn(e.stateNode.nextSibling):null;return!0}function Ja(){dt=Ot=null,Ve=!1}function ms(){var e=fa;return e!==null&&(It===null?It=e:It.push.apply(It,e),fa=null),e}function bi(e){fa===null?fa=[e]:fa.push(e)}var gs=b(null),Fa=null,Zn=null;function pa(e,t,n){F(gs,t._currentValue),t._currentValue=n}function Jn(e){e._currentValue=gs.current,_(gs)}function ys(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function bs(e,t,n,a){var l=e.child;for(l!==null&&(l.return=e);l!==null;){var i=l.dependencies;if(i!==null){var c=l.child;i=i.firstContext;e:for(;i!==null;){var p=i;i=l;for(var x=0;x<t.length;x++)if(p.context===t[x]){i.lanes|=n,p=i.alternate,p!==null&&(p.lanes|=n),ys(i.return,n,e),a||(c=null);break e}i=p.next}}else if(l.tag===18){if(c=l.return,c===null)throw Error(u(341));c.lanes|=n,i=c.alternate,i!==null&&(i.lanes|=n),ys(c,n,e),c=null}else c=l.child;if(c!==null)c.return=l;else for(c=l;c!==null;){if(c===e){c=null;break}if(l=c.sibling,l!==null){l.return=c.return,c=l;break}c=c.return}l=c}}function zl(e,t,n,a){e=null;for(var l=t,i=!1;l!==null;){if(!i){if((l.flags&524288)!==0)i=!0;else if((l.flags&262144)!==0)break}if(l.tag===10){var c=l.alternate;if(c===null)throw Error(u(387));if(c=c.memoizedProps,c!==null){var p=l.type;an(l.pendingProps.value,c.value)||(e!==null?e.push(p):e=[p])}}else if(l===Ne.current){if(c=l.alternate,c===null)throw Error(u(387));c.memoizedState.memoizedState!==l.memoizedState.memoizedState&&(e!==null?e.push(Qi):e=[Qi])}l=l.return}e!==null&&bs(t,e,n,a),t.flags|=262144}function Eo(e){for(e=e.firstContext;e!==null;){if(!an(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function $a(e){Fa=e,Zn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Lt(e){return ad(Fa,e)}function To(e,t){return Fa===null&&$a(e),ad(e,t)}function ad(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Zn===null){if(e===null)throw Error(u(308));Zn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Zn=Zn.next=t;return n}var Up=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()})}},Hp=o.unstable_scheduleCallback,Bp=o.unstable_NormalPriority,zt={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vs(){return{controller:new Up,data:new Map,refCount:0}}function vi(e){e.refCount--,e.refCount===0&&Hp(Bp,function(){e.controller.abort()})}var xi=null,xs=0,Ml=0,Dl=null;function Np(e,t){if(xi===null){var n=xi=[];xs=0,Ml=wc(),Dl={status:"pending",value:void 0,then:function(a){n.push(a)}}}return xs++,t.then(ld,ld),t}function ld(){if(--xs===0&&xi!==null){Dl!==null&&(Dl.status="fulfilled");var e=xi;xi=null,Ml=0,Dl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function jp(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 id=R.S;R.S=function(e,t){Xf=jt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Np(e,t),id!==null&&id(e,t)};var Wa=b(null);function Ss(){var e=Wa.current;return e!==null?e:st.pooledCache}function Ao(e,t){t===null?F(Wa,Wa.current):F(Wa,t.pool)}function od(){var e=Ss();return e===null?null:{parent:zt._currentValue,pool:e}}var kl=Error(u(460)),Cs=Error(u(474)),Ro=Error(u(542)),_o={then:function(){}};function rd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function sd(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Xn,Xn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ud(e),e;default:if(typeof t.status=="string")t.then(Xn,Xn);else{if(e=st,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var l=t;l.status="fulfilled",l.value=a}},function(a){if(t.status==="pending"){var l=t;l.status="rejected",l.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,ud(e),e}throw Pa=t,kl}}function Ia(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Pa=n,kl):n}}var Pa=null;function cd(){if(Pa===null)throw Error(u(459));var e=Pa;return Pa=null,e}function ud(e){if(e===kl||e===Ro)throw Error(u(483))}var El=null,Si=0;function Oo(e){var t=Si;return Si+=1,El===null&&(El=[]),sd(El,e,t)}function Ci(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Lo(e,t){throw t.$$typeof===j?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function dd(e){function t(M,C){if(e){var k=M.deletions;k===null?(M.deletions=[C],M.flags|=16):k.push(C)}}function n(M,C){if(!e)return null;for(;C!==null;)t(M,C),C=C.sibling;return null}function a(M){for(var C=new Map;M!==null;)M.key!==null?C.set(M.key,M):C.set(M.index,M),M=M.sibling;return C}function l(M,C){return M=Qn(M,C),M.index=0,M.sibling=null,M}function i(M,C,k){return M.index=k,e?(k=M.alternate,k!==null?(k=k.index,k<C?(M.flags|=67108866,C):k):(M.flags|=67108866,C)):(M.flags|=1048576,C)}function c(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function p(M,C,k,Y){return C===null||C.tag!==6?(C=us(k,M.mode,Y),C.return=M,C):(C=l(C,k),C.return=M,C)}function x(M,C,k,Y){var Se=k.type;return Se===V?N(M,C,k.props.children,Y,k.key):C!==null&&(C.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===J&&Ia(Se)===C.type)?(C=l(C,k.props),Ci(C,k),C.return=M,C):(C=Do(k.type,k.key,k.props,null,M.mode,Y),Ci(C,k),C.return=M,C)}function E(M,C,k,Y){return C===null||C.tag!==4||C.stateNode.containerInfo!==k.containerInfo||C.stateNode.implementation!==k.implementation?(C=ds(k,M.mode,Y),C.return=M,C):(C=l(C,k.children||[]),C.return=M,C)}function N(M,C,k,Y,Se){return C===null||C.tag!==7?(C=Za(k,M.mode,Y,Se),C.return=M,C):(C=l(C,k),C.return=M,C)}function X(M,C,k){if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return C=us(""+C,M.mode,k),C.return=M,C;if(typeof C=="object"&&C!==null){switch(C.$$typeof){case G:return k=Do(C.type,C.key,C.props,null,M.mode,k),Ci(k,C),k.return=M,k;case H:return C=ds(C,M.mode,k),C.return=M,C;case J:return C=Ia(C),X(M,C,k)}if(_e(C)||ne(C))return C=Za(C,M.mode,k,null),C.return=M,C;if(typeof C.then=="function")return X(M,Oo(C),k);if(C.$$typeof===P)return X(M,To(M,C),k);Lo(M,C)}return null}function A(M,C,k,Y){var Se=C!==null?C.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return Se!==null?null:p(M,C,""+k,Y);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case G:return k.key===Se?x(M,C,k,Y):null;case H:return k.key===Se?E(M,C,k,Y):null;case J:return k=Ia(k),A(M,C,k,Y)}if(_e(k)||ne(k))return Se!==null?null:N(M,C,k,Y,null);if(typeof k.then=="function")return A(M,C,Oo(k),Y);if(k.$$typeof===P)return A(M,C,To(M,k),Y);Lo(M,k)}return null}function L(M,C,k,Y,Se){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return M=M.get(k)||null,p(C,M,""+Y,Se);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case G:return M=M.get(Y.key===null?k:Y.key)||null,x(C,M,Y,Se);case H:return M=M.get(Y.key===null?k:Y.key)||null,E(C,M,Y,Se);case J:return Y=Ia(Y),L(M,C,k,Y,Se)}if(_e(Y)||ne(Y))return M=M.get(k)||null,N(C,M,Y,Se,null);if(typeof Y.then=="function")return L(M,C,k,Oo(Y),Se);if(Y.$$typeof===P)return L(M,C,k,To(C,Y),Se);Lo(C,Y)}return null}function de(M,C,k,Y){for(var Se=null,Je=null,ge=C,Be=C=0,Xe=null;ge!==null&&Be<k.length;Be++){ge.index>Be?(Xe=ge,ge=null):Xe=ge.sibling;var Fe=A(M,ge,k[Be],Y);if(Fe===null){ge===null&&(ge=Xe);break}e&&ge&&Fe.alternate===null&&t(M,ge),C=i(Fe,C,Be),Je===null?Se=Fe:Je.sibling=Fe,Je=Fe,ge=Xe}if(Be===k.length)return n(M,ge),Ve&&Kn(M,Be),Se;if(ge===null){for(;Be<k.length;Be++)ge=X(M,k[Be],Y),ge!==null&&(C=i(ge,C,Be),Je===null?Se=ge:Je.sibling=ge,Je=ge);return Ve&&Kn(M,Be),Se}for(ge=a(ge);Be<k.length;Be++)Xe=L(ge,M,Be,k[Be],Y),Xe!==null&&(e&&Xe.alternate!==null&&ge.delete(Xe.key===null?Be:Xe.key),C=i(Xe,C,Be),Je===null?Se=Xe:Je.sibling=Xe,Je=Xe);return e&&ge.forEach(function(_a){return t(M,_a)}),Ve&&Kn(M,Be),Se}function ze(M,C,k,Y){if(k==null)throw Error(u(151));for(var Se=null,Je=null,ge=C,Be=C=0,Xe=null,Fe=k.next();ge!==null&&!Fe.done;Be++,Fe=k.next()){ge.index>Be?(Xe=ge,ge=null):Xe=ge.sibling;var _a=A(M,ge,Fe.value,Y);if(_a===null){ge===null&&(ge=Xe);break}e&&ge&&_a.alternate===null&&t(M,ge),C=i(_a,C,Be),Je===null?Se=_a:Je.sibling=_a,Je=_a,ge=Xe}if(Fe.done)return n(M,ge),Ve&&Kn(M,Be),Se;if(ge===null){for(;!Fe.done;Be++,Fe=k.next())Fe=X(M,Fe.value,Y),Fe!==null&&(C=i(Fe,C,Be),Je===null?Se=Fe:Je.sibling=Fe,Je=Fe);return Ve&&Kn(M,Be),Se}for(ge=a(ge);!Fe.done;Be++,Fe=k.next())Fe=L(ge,M,Be,Fe.value,Y),Fe!==null&&(e&&Fe.alternate!==null&&ge.delete(Fe.key===null?Be:Fe.key),C=i(Fe,C,Be),Je===null?Se=Fe:Je.sibling=Fe,Je=Fe);return e&&ge.forEach(function($m){return t(M,$m)}),Ve&&Kn(M,Be),Se}function ot(M,C,k,Y){if(typeof k=="object"&&k!==null&&k.type===V&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case G:e:{for(var Se=k.key;C!==null;){if(C.key===Se){if(Se=k.type,Se===V){if(C.tag===7){n(M,C.sibling),Y=l(C,k.props.children),Y.return=M,M=Y;break e}}else if(C.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===J&&Ia(Se)===C.type){n(M,C.sibling),Y=l(C,k.props),Ci(Y,k),Y.return=M,M=Y;break e}n(M,C);break}else t(M,C);C=C.sibling}k.type===V?(Y=Za(k.props.children,M.mode,Y,k.key),Y.return=M,M=Y):(Y=Do(k.type,k.key,k.props,null,M.mode,Y),Ci(Y,k),Y.return=M,M=Y)}return c(M);case H:e:{for(Se=k.key;C!==null;){if(C.key===Se)if(C.tag===4&&C.stateNode.containerInfo===k.containerInfo&&C.stateNode.implementation===k.implementation){n(M,C.sibling),Y=l(C,k.children||[]),Y.return=M,M=Y;break e}else{n(M,C);break}else t(M,C);C=C.sibling}Y=ds(k,M.mode,Y),Y.return=M,M=Y}return c(M);case J:return k=Ia(k),ot(M,C,k,Y)}if(_e(k))return de(M,C,k,Y);if(ne(k)){if(Se=ne(k),typeof Se!="function")throw Error(u(150));return k=Se.call(k),ze(M,C,k,Y)}if(typeof k.then=="function")return ot(M,C,Oo(k),Y);if(k.$$typeof===P)return ot(M,C,To(M,k),Y);Lo(M,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,C!==null&&C.tag===6?(n(M,C.sibling),Y=l(C,k),Y.return=M,M=Y):(n(M,C),Y=us(k,M.mode,Y),Y.return=M,M=Y),c(M)):n(M,C)}return function(M,C,k,Y){try{Si=0;var Se=ot(M,C,k,Y);return El=null,Se}catch(ge){if(ge===kl||ge===Ro)throw ge;var Je=ln(29,ge,null,M.mode);return Je.lanes=Y,Je.return=M,Je}}}var el=dd(!0),fd=dd(!1),ma=!1;function ws(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function zs(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ga(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ya(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,($e&2)!==0){var l=a.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),a.pending=t,t=Mo(e),Fu(e,null,n),t}return zo(e,a,t,n),Mo(e)}function wi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,co(e,n)}}function Ms(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var l=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var c={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?l=i=c:i=i.next=c,n=n.next}while(n!==null);i===null?l=i=t:i=i.next=t}else l=i=t;n={baseState:a.baseState,firstBaseUpdate:l,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ds=!1;function zi(){if(Ds){var e=Dl;if(e!==null)throw e}}function Mi(e,t,n,a){Ds=!1;var l=e.updateQueue;ma=!1;var i=l.firstBaseUpdate,c=l.lastBaseUpdate,p=l.shared.pending;if(p!==null){l.shared.pending=null;var x=p,E=x.next;x.next=null,c===null?i=E:c.next=E,c=x;var N=e.alternate;N!==null&&(N=N.updateQueue,p=N.lastBaseUpdate,p!==c&&(p===null?N.firstBaseUpdate=E:p.next=E,N.lastBaseUpdate=x))}if(i!==null){var X=l.baseState;c=0,N=E=x=null,p=i;do{var A=p.lane&-536870913,L=A!==p.lane;if(L?(Ge&A)===A:(a&A)===A){A!==0&&A===Ml&&(Ds=!0),N!==null&&(N=N.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var de=e,ze=p;A=t;var ot=n;switch(ze.tag){case 1:if(de=ze.payload,typeof de=="function"){X=de.call(ot,X,A);break e}X=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=ze.payload,A=typeof de=="function"?de.call(ot,X,A):de,A==null)break e;X=D({},X,A);break e;case 2:ma=!0}}A=p.callback,A!==null&&(e.flags|=64,L&&(e.flags|=8192),L=l.callbacks,L===null?l.callbacks=[A]:L.push(A))}else L={lane:A,tag:p.tag,payload:p.payload,callback:p.callback,next:null},N===null?(E=N=L,x=X):N=N.next=L,c|=A;if(p=p.next,p===null){if(p=l.shared.pending,p===null)break;L=p,p=L.next,L.next=null,l.lastBaseUpdate=L,l.shared.pending=null}}while(!0);N===null&&(x=X),l.baseState=x,l.firstBaseUpdate=E,l.lastBaseUpdate=N,i===null&&(l.shared.lanes=0),Ca|=c,e.lanes=c,e.memoizedState=X}}function hd(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function pd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)hd(n[e],t)}var Tl=b(null),Uo=b(0);function md(e,t){e=aa,F(Uo,e),F(Tl,t),aa=e|t.baseLanes}function ks(){F(Uo,aa),F(Tl,Tl.current)}function Es(){aa=Uo.current,_(Tl),_(Uo)}var on=b(null),xn=null;function ba(e){var t=e.alternate;F(xt,xt.current&1),F(on,e),xn===null&&(t===null||Tl.current!==null||t.memoizedState!==null)&&(xn=e)}function Ts(e){F(xt,xt.current),F(on,e),xn===null&&(xn=e)}function gd(e){e.tag===22?(F(xt,xt.current),F(on,e),xn===null&&(xn=e)):va()}function va(){F(xt,xt.current),F(on,on.current)}function rn(e){_(on),xn===e&&(xn=null),_(xt)}var xt=b(0);function Ho(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Uc(n)||Hc(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Fn=0,Ue=null,lt=null,Mt=null,Bo=!1,Al=!1,tl=!1,No=0,Di=0,Rl=null,qp=0;function gt(){throw Error(u(321))}function As(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!an(e[n],t[n]))return!1;return!0}function Rs(e,t,n,a,l,i){return Fn=i,Ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,R.H=e===null||e.memoizedState===null?Pd:Ks,tl=!1,i=n(a,l),tl=!1,Al&&(i=bd(t,n,a,l)),yd(e),i}function yd(e){R.H=Ti;var t=lt!==null&&lt.next!==null;if(Fn=0,Mt=lt=Ue=null,Bo=!1,Di=0,Rl=null,t)throw Error(u(300));e===null||Dt||(e=e.dependencies,e!==null&&Eo(e)&&(Dt=!0))}function bd(e,t,n,a){Ue=e;var l=0;do{if(Al&&(Rl=null),Di=0,Al=!1,25<=l)throw Error(u(301));if(l+=1,Mt=lt=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}R.H=ef,i=t(n,a)}while(Al);return i}function Yp(){var e=R.H,t=e.useState()[0];return t=typeof t.then=="function"?ki(t):t,e=e.useState()[0],(lt!==null?lt.memoizedState:null)!==e&&(Ue.flags|=1024),t}function _s(){var e=No!==0;return No=0,e}function Os(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Ls(e){if(Bo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Bo=!1}Fn=0,Mt=lt=Ue=null,Al=!1,Di=No=0,Rl=null}function Zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Mt===null?Ue.memoizedState=Mt=e:Mt=Mt.next=e,Mt}function St(){if(lt===null){var e=Ue.alternate;e=e!==null?e.memoizedState:null}else e=lt.next;var t=Mt===null?Ue.memoizedState:Mt.next;if(t!==null)Mt=t,lt=e;else{if(e===null)throw Ue.alternate===null?Error(u(467)):Error(u(310));lt=e,e={memoizedState:lt.memoizedState,baseState:lt.baseState,baseQueue:lt.baseQueue,queue:lt.queue,next:null},Mt===null?Ue.memoizedState=Mt=e:Mt=Mt.next=e}return Mt}function jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ki(e){var t=Di;return Di+=1,Rl===null&&(Rl=[]),e=sd(Rl,e,t),t=Ue,(Mt===null?t.memoizedState:Mt.next)===null&&(t=t.alternate,R.H=t===null||t.memoizedState===null?Pd:Ks),e}function qo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ki(e);if(e.$$typeof===P)return Lt(e)}throw Error(u(438,String(e)))}function Us(e){var t=null,n=Ue.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=Ue.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(l){return l.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=jo(),Ue.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]=ie;return t.index++,n}function $n(e,t){return typeof t=="function"?t(e):t}function Yo(e){var t=St();return Hs(t,lt,e)}function Hs(e,t,n){var a=e.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=n;var l=e.baseQueue,i=a.pending;if(i!==null){if(l!==null){var c=l.next;l.next=i.next,i.next=c}t.baseQueue=l=i,a.pending=null}if(i=e.baseState,l===null)e.memoizedState=i;else{t=l.next;var p=c=null,x=null,E=t,N=!1;do{var X=E.lane&-536870913;if(X!==E.lane?(Ge&X)===X:(Fn&X)===X){var A=E.revertLane;if(A===0)x!==null&&(x=x.next={lane:0,revertLane:0,gesture:null,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null}),X===Ml&&(N=!0);else if((Fn&A)===A){E=E.next,A===Ml&&(N=!0);continue}else X={lane:0,revertLane:E.revertLane,gesture:null,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null},x===null?(p=x=X,c=i):x=x.next=X,Ue.lanes|=A,Ca|=A;X=E.action,tl&&n(i,X),i=E.hasEagerState?E.eagerState:n(i,X)}else A={lane:X,revertLane:E.revertLane,gesture:E.gesture,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null},x===null?(p=x=A,c=i):x=x.next=A,Ue.lanes|=X,Ca|=X;E=E.next}while(E!==null&&E!==t);if(x===null?c=i:x.next=p,!an(i,e.memoizedState)&&(Dt=!0,N&&(n=Dl,n!==null)))throw n;e.memoizedState=i,e.baseState=c,e.baseQueue=x,a.lastRenderedState=i}return l===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Bs(e){var t=St(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var a=n.dispatch,l=n.pending,i=t.memoizedState;if(l!==null){n.pending=null;var c=l=l.next;do i=e(i,c.action),c=c.next;while(c!==l);an(i,t.memoizedState)||(Dt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,a]}function vd(e,t,n){var a=Ue,l=St(),i=Ve;if(i){if(n===void 0)throw Error(u(407));n=n()}else n=t();var c=!an((lt||l).memoizedState,n);if(c&&(l.memoizedState=n,Dt=!0),l=l.queue,qs(Cd.bind(null,a,l,e),[e]),l.getSnapshot!==t||c||Mt!==null&&Mt.memoizedState.tag&1){if(a.flags|=2048,_l(9,{destroy:void 0},Sd.bind(null,a,l,n,t),null),st===null)throw Error(u(349));i||(Fn&127)!==0||xd(a,t,n)}return n}function xd(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Ue.updateQueue,t===null?(t=jo(),Ue.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Sd(e,t,n,a){t.value=n,t.getSnapshot=a,wd(t)&&zd(e)}function Cd(e,t,n){return n(function(){wd(t)&&zd(e)})}function wd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!an(e,n)}catch{return!0}}function zd(e){var t=Ka(e,2);t!==null&&Pt(t,e,2)}function Ns(e){var t=Zt();if(typeof e=="function"){var n=e;if(e=n(),tl){zn(!0);try{n()}finally{zn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:e},t}function Md(e,t,n,a){return e.baseState=n,Hs(e,lt,typeof a=="function"?a:$n)}function Gp(e,t,n,a,l){if(Vo(e))throw Error(u(485));if(e=t.action,e!==null){var i={payload:l,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){i.listeners.push(c)}};R.T!==null?n(!0):i.isTransition=!1,a(i),n=t.pending,n===null?(i.next=t.pending=i,Dd(t,i)):(i.next=n.next,t.pending=n.next=i)}}function Dd(e,t){var n=t.action,a=t.payload,l=e.state;if(t.isTransition){var i=R.T,c={};R.T=c;try{var p=n(l,a),x=R.S;x!==null&&x(c,p),kd(e,t,p)}catch(E){js(e,t,E)}finally{i!==null&&c.types!==null&&(i.types=c.types),R.T=i}}else try{i=n(l,a),kd(e,t,i)}catch(E){js(e,t,E)}}function kd(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Ed(e,t,a)},function(a){return js(e,t,a)}):Ed(e,t,n)}function Ed(e,t,n){t.status="fulfilled",t.value=n,Td(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Dd(e,n)))}function js(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Td(t),t=t.next;while(t!==a)}e.action=null}function Td(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ad(e,t){return t}function Rd(e,t){if(Ve){var n=st.formState;if(n!==null){e:{var a=Ue;if(Ve){if(dt){t:{for(var l=dt,i=vn;l.nodeType!==8;){if(!i){l=null;break t}if(l=Sn(l.nextSibling),l===null){l=null;break t}}i=l.data,l=i==="F!"||i==="F"?l:null}if(l){dt=Sn(l.nextSibling),a=l.data==="F!";break e}}ha(a)}a=!1}a&&(t=n[0])}}return n=Zt(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ad,lastRenderedState:t},n.queue=a,n=$d.bind(null,Ue,a),a.dispatch=n,a=Ns(!1),i=Qs.bind(null,Ue,!1,a.queue),a=Zt(),l={state:t,dispatch:null,action:e,pending:null},a.queue=l,n=Gp.bind(null,Ue,l,i,n),l.dispatch=n,a.memoizedState=e,[t,n,!1]}function _d(e){var t=St();return Od(t,lt,e)}function Od(e,t,n){if(t=Hs(e,t,Ad)[0],e=Yo($n)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=ki(t)}catch(c){throw c===kl?Ro:c}else a=t;t=St();var l=t.queue,i=l.dispatch;return n!==t.memoizedState&&(Ue.flags|=2048,_l(9,{destroy:void 0},Xp.bind(null,l,n),null)),[a,i,e]}function Xp(e,t){e.action=t}function Ld(e){var t=St(),n=lt;if(n!==null)return Od(t,n,e);St(),t=t.memoizedState,n=St();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function _l(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=Ue.updateQueue,t===null&&(t=jo(),Ue.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 Ud(){return St().memoizedState}function Go(e,t,n,a){var l=Zt();Ue.flags|=e,l.memoizedState=_l(1|t,{destroy:void 0},n,a===void 0?null:a)}function Xo(e,t,n,a){var l=St();a=a===void 0?null:a;var i=l.memoizedState.inst;lt!==null&&a!==null&&As(a,lt.memoizedState.deps)?l.memoizedState=_l(t,i,n,a):(Ue.flags|=e,l.memoizedState=_l(1|t,i,n,a))}function Hd(e,t){Go(8390656,8,e,t)}function qs(e,t){Xo(2048,8,e,t)}function Vp(e){Ue.flags|=4;var t=Ue.updateQueue;if(t===null)t=jo(),Ue.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Bd(e){var t=St().memoizedState;return Vp({ref:t,nextImpl:e}),function(){if(($e&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Nd(e,t){return Xo(4,2,e,t)}function jd(e,t){return Xo(4,4,e,t)}function qd(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 Yd(e,t,n){n=n!=null?n.concat([e]):null,Xo(4,4,qd.bind(null,t,e),n)}function Ys(){}function Gd(e,t){var n=St();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&As(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Xd(e,t){var n=St();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&As(t,a[1]))return a[0];if(a=e(),tl){zn(!0);try{e()}finally{zn(!1)}}return n.memoizedState=[a,t],a}function Gs(e,t,n){return n===void 0||(Fn&1073741824)!==0&&(Ge&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Qf(),Ue.lanes|=e,Ca|=e,n)}function Vd(e,t,n,a){return an(n,t)?n:Tl.current!==null?(e=Gs(e,n,a),an(e,t)||(Dt=!0),e):(Fn&42)===0||(Fn&1073741824)!==0&&(Ge&261930)===0?(Dt=!0,e.memoizedState=n):(e=Qf(),Ue.lanes|=e,Ca|=e,t)}function Qd(e,t,n,a,l){var i=q.p;q.p=i!==0&&8>i?i:8;var c=R.T,p={};R.T=p,Qs(e,!1,t,n);try{var x=l(),E=R.S;if(E!==null&&E(p,x),x!==null&&typeof x=="object"&&typeof x.then=="function"){var N=jp(x,a);Ei(e,t,N,un(e))}else Ei(e,t,a,un(e))}catch(X){Ei(e,t,{then:function(){},status:"rejected",reason:X},un())}finally{q.p=i,c!==null&&p.types!==null&&(c.types=p.types),R.T=c}}function Qp(){}function Xs(e,t,n,a){if(e.tag!==5)throw Error(u(476));var l=Kd(e).queue;Qd(e,l,t,ue,n===null?Qp:function(){return Zd(e),n(a)})}function Kd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ue,baseState:ue,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:ue},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Zd(e){var t=Kd(e);t.next===null&&(t=e.alternate.memoizedState),Ei(e,t.next.queue,{},un())}function Vs(){return Lt(Qi)}function Jd(){return St().memoizedState}function Fd(){return St().memoizedState}function Kp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=un();e=ga(n);var a=ya(t,e,n);a!==null&&(Pt(a,t,n),wi(a,t,n)),t={cache:vs()},e.payload=t;return}t=t.return}}function Zp(e,t,n){var a=un();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Vo(e)?Wd(t,n):(n=ss(e,t,n,a),n!==null&&(Pt(n,e,a),Id(n,t,a)))}function $d(e,t,n){var a=un();Ei(e,t,n,a)}function Ei(e,t,n,a){var l={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vo(e))Wd(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var c=t.lastRenderedState,p=i(c,n);if(l.hasEagerState=!0,l.eagerState=p,an(p,c))return zo(e,t,l,0),st===null&&wo(),!1}catch{}if(n=ss(e,t,l,a),n!==null)return Pt(n,e,a),Id(n,t,a),!0}return!1}function Qs(e,t,n,a){if(a={lane:2,revertLane:wc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Vo(e)){if(t)throw Error(u(479))}else t=ss(e,n,a,2),t!==null&&Pt(t,e,2)}function Vo(e){var t=e.alternate;return e===Ue||t!==null&&t===Ue}function Wd(e,t){Al=Bo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Id(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,co(e,n)}}var Ti={readContext:Lt,use:qo,useCallback:gt,useContext:gt,useEffect:gt,useImperativeHandle:gt,useLayoutEffect:gt,useInsertionEffect:gt,useMemo:gt,useReducer:gt,useRef:gt,useState:gt,useDebugValue:gt,useDeferredValue:gt,useTransition:gt,useSyncExternalStore:gt,useId:gt,useHostTransitionStatus:gt,useFormState:gt,useActionState:gt,useOptimistic:gt,useMemoCache:gt,useCacheRefresh:gt};Ti.useEffectEvent=gt;var Pd={readContext:Lt,use:qo,useCallback:function(e,t){return Zt().memoizedState=[e,t===void 0?null:t],e},useContext:Lt,useEffect:Hd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Go(4194308,4,qd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Go(4194308,4,e,t)},useInsertionEffect:function(e,t){Go(4,2,e,t)},useMemo:function(e,t){var n=Zt();t=t===void 0?null:t;var a=e();if(tl){zn(!0);try{e()}finally{zn(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=Zt();if(n!==void 0){var l=n(t);if(tl){zn(!0);try{n(t)}finally{zn(!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=Zp.bind(null,Ue,e),[a.memoizedState,e]},useRef:function(e){var t=Zt();return e={current:e},t.memoizedState=e},useState:function(e){e=Ns(e);var t=e.queue,n=$d.bind(null,Ue,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ys,useDeferredValue:function(e,t){var n=Zt();return Gs(n,e,t)},useTransition:function(){var e=Ns(!1);return e=Qd.bind(null,Ue,e.queue,!0,!1),Zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=Ue,l=Zt();if(Ve){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),st===null)throw Error(u(349));(Ge&127)!==0||xd(a,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,Hd(Cd.bind(null,a,i,e),[e]),a.flags|=2048,_l(9,{destroy:void 0},Sd.bind(null,a,i,n,t),null),n},useId:function(){var e=Zt(),t=st.identifierPrefix;if(Ve){var n=_n,a=Rn;n=(a&~(1<<32-Qt(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=No++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=qp++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Vs,useFormState:Rd,useActionState:Rd,useOptimistic:function(e){var t=Zt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Qs.bind(null,Ue,!0,n),n.dispatch=t,[e,t]},useMemoCache:Us,useCacheRefresh:function(){return Zt().memoizedState=Kp.bind(null,Ue)},useEffectEvent:function(e){var t=Zt(),n={impl:e};return t.memoizedState=n,function(){if(($e&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}},Ks={readContext:Lt,use:qo,useCallback:Gd,useContext:Lt,useEffect:qs,useImperativeHandle:Yd,useInsertionEffect:Nd,useLayoutEffect:jd,useMemo:Xd,useReducer:Yo,useRef:Ud,useState:function(){return Yo($n)},useDebugValue:Ys,useDeferredValue:function(e,t){var n=St();return Vd(n,lt.memoizedState,e,t)},useTransition:function(){var e=Yo($n)[0],t=St().memoizedState;return[typeof e=="boolean"?e:ki(e),t]},useSyncExternalStore:vd,useId:Jd,useHostTransitionStatus:Vs,useFormState:_d,useActionState:_d,useOptimistic:function(e,t){var n=St();return Md(n,lt,e,t)},useMemoCache:Us,useCacheRefresh:Fd};Ks.useEffectEvent=Bd;var ef={readContext:Lt,use:qo,useCallback:Gd,useContext:Lt,useEffect:qs,useImperativeHandle:Yd,useInsertionEffect:Nd,useLayoutEffect:jd,useMemo:Xd,useReducer:Bs,useRef:Ud,useState:function(){return Bs($n)},useDebugValue:Ys,useDeferredValue:function(e,t){var n=St();return lt===null?Gs(n,e,t):Vd(n,lt.memoizedState,e,t)},useTransition:function(){var e=Bs($n)[0],t=St().memoizedState;return[typeof e=="boolean"?e:ki(e),t]},useSyncExternalStore:vd,useId:Jd,useHostTransitionStatus:Vs,useFormState:Ld,useActionState:Ld,useOptimistic:function(e,t){var n=St();return lt!==null?Md(n,lt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Us,useCacheRefresh:Fd};ef.useEffectEvent=Bd;function Zs(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Js={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=un(),l=ga(a);l.payload=t,n!=null&&(l.callback=n),t=ya(e,l,a),t!==null&&(Pt(t,e,a),wi(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=un(),l=ga(a);l.tag=1,l.payload=t,n!=null&&(l.callback=n),t=ya(e,l,a),t!==null&&(Pt(t,e,a),wi(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=un(),a=ga(n);a.tag=2,t!=null&&(a.callback=t),t=ya(e,a,n),t!==null&&(Pt(t,e,n),wi(t,e,n))}};function tf(e,t,n,a,l,i,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,c):t.prototype&&t.prototype.isPureReactComponent?!mi(n,a)||!mi(l,i):!0}function nf(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Js.enqueueReplaceState(t,t.state,null)}function nl(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=D({},n));for(var l in e)n[l]===void 0&&(n[l]=e[l])}return n}function af(e){Co(e)}function lf(e){console.error(e)}function of(e){Co(e)}function Qo(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function rf(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(l){setTimeout(function(){throw l})}}function Fs(e,t,n){return n=ga(n),n.tag=3,n.payload={element:null},n.callback=function(){Qo(e,t)},n}function sf(e){return e=ga(e),e.tag=3,e}function cf(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(){rf(t,n,a)}}var c=n.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){rf(t,n,a),typeof l!="function"&&(wa===null?wa=new Set([this]):wa.add(this));var p=a.stack;this.componentDidCatch(a.value,{componentStack:p!==null?p:""})})}function Jp(e,t,n,a,l){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&zl(t,n,l,!0),n=on.current,n!==null){switch(n.tag){case 31:case 13:return xn===null?ar():n.alternate===null&&yt===0&&(yt=3),n.flags&=-257,n.flags|=65536,n.lanes=l,a===_o?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),xc(e,a,l)),!1;case 22:return n.flags|=65536,a===_o?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),xc(e,a,l)),!1}throw Error(u(435,n.tag))}return xc(e,a,l),ar(),!1}if(Ve)return t=on.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=l,a!==ps&&(e=Error(u(422),{cause:a}),bi(gn(e,n)))):(a!==ps&&(t=Error(u(423),{cause:a}),bi(gn(t,n))),e=e.current.alternate,e.flags|=65536,l&=-l,e.lanes|=l,a=gn(a,n),l=Fs(e.stateNode,a,l),Ms(e,l),yt!==4&&(yt=2)),!1;var i=Error(u(520),{cause:a});if(i=gn(i,n),Bi===null?Bi=[i]:Bi.push(i),yt!==4&&(yt=2),t===null)return!0;a=gn(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=l&-l,n.lanes|=e,e=Fs(n.stateNode,a,e),Ms(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(wa===null||!wa.has(i))))return n.flags|=65536,l&=-l,n.lanes|=l,l=sf(l),cf(l,e,n,a),Ms(n,l),!1}n=n.return}while(n!==null);return!1}var $s=Error(u(461)),Dt=!1;function Ut(e,t,n,a){t.child=e===null?fd(t,null,n,a):el(t,e.child,n,a)}function uf(e,t,n,a,l){n=n.render;var i=t.ref;if("ref"in a){var c={};for(var p in a)p!=="ref"&&(c[p]=a[p])}else c=a;return $a(t),a=Rs(e,t,n,c,i,l),p=_s(),e!==null&&!Dt?(Os(e,t,l),Wn(e,t,l)):(Ve&&p&&fs(t),t.flags|=1,Ut(e,t,a,l),t.child)}function df(e,t,n,a,l){if(e===null){var i=n.type;return typeof i=="function"&&!cs(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,ff(e,t,i,a,l)):(e=Do(n.type,null,a,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!lc(e,l)){var c=i.memoizedProps;if(n=n.compare,n=n!==null?n:mi,n(c,a)&&e.ref===t.ref)return Wn(e,t,l)}return t.flags|=1,e=Qn(i,a),e.ref=t.ref,e.return=t,t.child=e}function ff(e,t,n,a,l){if(e!==null){var i=e.memoizedProps;if(mi(i,a)&&e.ref===t.ref)if(Dt=!1,t.pendingProps=a=i,lc(e,l))(e.flags&131072)!==0&&(Dt=!0);else return t.lanes=e.lanes,Wn(e,t,l)}return Ws(e,t,n,a,l)}function hf(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 pf(e,t,i,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ao(t,i!==null?i.cachePool:null),i!==null?md(t,i):ks(),gd(t);else return a=t.lanes=536870912,pf(e,t,i!==null?i.baseLanes|n:n,n,a)}else i!==null?(Ao(t,i.cachePool),md(t,i),va(),t.memoizedState=null):(e!==null&&Ao(t,null),ks(),va());return Ut(e,t,l,n),t.child}function Ai(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function pf(e,t,n,a,l){var i=Ss();return i=i===null?null:{parent:zt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&Ao(t,null),ks(),gd(t),e!==null&&zl(e,t,a,!0),t.childLanes=l,null}function Ko(e,t){return t=Jo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function mf(e,t,n){return el(t,e.child,null,n),e=Ko(t,t.pendingProps),e.flags|=2,rn(t),t.memoizedState=null,e}function Fp(e,t,n){var a=t.pendingProps,l=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ve){if(a.mode==="hidden")return e=Ko(t,a),t.lanes=536870912,Ai(null,e);if(Ts(t),(e=dt)?(e=kh(e,vn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:da!==null?{id:Rn,overflow:_n}:null,retryLane:536870912,hydrationErrors:null},n=Wu(e),n.return=t,t.child=n,Ot=t,dt=null)):e=null,e===null)throw ha(t);return t.lanes=536870912,null}return Ko(t,a)}var i=e.memoizedState;if(i!==null){var c=i.dehydrated;if(Ts(t),l)if(t.flags&256)t.flags&=-257,t=mf(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(Dt||zl(e,t,n,!1),l=(n&e.childLanes)!==0,Dt||l){if(a=st,a!==null&&(c=ai(a,n),c!==0&&c!==i.retryLane))throw i.retryLane=c,Ka(e,c),Pt(a,e,c),$s;ar(),t=mf(e,t,n)}else e=i.treeContext,dt=Sn(c.nextSibling),Ot=t,Ve=!0,fa=null,vn=!1,e!==null&&ed(t,e),t=Ko(t,a),t.flags|=4096;return t}return e=Qn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Zo(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(u(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Ws(e,t,n,a,l){return $a(t),n=Rs(e,t,n,a,void 0,l),a=_s(),e!==null&&!Dt?(Os(e,t,l),Wn(e,t,l)):(Ve&&a&&fs(t),t.flags|=1,Ut(e,t,n,l),t.child)}function gf(e,t,n,a,l,i){return $a(t),t.updateQueue=null,n=bd(t,a,n,l),yd(e),a=_s(),e!==null&&!Dt?(Os(e,t,i),Wn(e,t,i)):(Ve&&a&&fs(t),t.flags|=1,Ut(e,t,n,i),t.child)}function yf(e,t,n,a,l){if($a(t),t.stateNode===null){var i=xl,c=n.contextType;typeof c=="object"&&c!==null&&(i=Lt(c)),i=new n(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Js,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},ws(t),c=n.contextType,i.context=typeof c=="object"&&c!==null?Lt(c):xl,i.state=t.memoizedState,c=n.getDerivedStateFromProps,typeof c=="function"&&(Zs(t,n,c,a),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(c=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),c!==i.state&&Js.enqueueReplaceState(i,i.state,null),Mi(t,a,i,l),zi(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var p=t.memoizedProps,x=nl(n,p);i.props=x;var E=i.context,N=n.contextType;c=xl,typeof N=="object"&&N!==null&&(c=Lt(N));var X=n.getDerivedStateFromProps;N=typeof X=="function"||typeof i.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,N||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(p||E!==c)&&nf(t,i,a,c),ma=!1;var A=t.memoizedState;i.state=A,Mi(t,a,i,l),zi(),E=t.memoizedState,p||A!==E||ma?(typeof X=="function"&&(Zs(t,n,X,a),E=t.memoizedState),(x=ma||tf(t,n,x,a,A,E,c))?(N||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=E),i.props=a,i.state=E,i.context=c,a=x):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,zs(e,t),c=t.memoizedProps,N=nl(n,c),i.props=N,X=t.pendingProps,A=i.context,E=n.contextType,x=xl,typeof E=="object"&&E!==null&&(x=Lt(E)),p=n.getDerivedStateFromProps,(E=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==X||A!==x)&&nf(t,i,a,x),ma=!1,A=t.memoizedState,i.state=A,Mi(t,a,i,l),zi();var L=t.memoizedState;c!==X||A!==L||ma||e!==null&&e.dependencies!==null&&Eo(e.dependencies)?(typeof p=="function"&&(Zs(t,n,p,a),L=t.memoizedState),(N=ma||tf(t,n,N,a,A,L,x)||e!==null&&e.dependencies!==null&&Eo(e.dependencies))?(E||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,L,x),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,L,x)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=L),i.props=a,i.state=L,i.context=x,a=N):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&A===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&A===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,Zo(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=el(t,e.child,null,l),t.child=el(t,null,n,l)):Ut(e,t,n,l),t.memoizedState=i.state,e=t.child):e=Wn(e,t,l),e}function bf(e,t,n,a){return Ja(),t.flags|=256,Ut(e,t,n,a),t.child}var Is={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ps(e){return{baseLanes:e,cachePool:od()}}function ec(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=cn),e}function vf(e,t,n){var a=t.pendingProps,l=!1,i=(t.flags&128)!==0,c;if((c=i)||(c=e!==null&&e.memoizedState===null?!1:(xt.current&2)!==0),c&&(l=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ve){if(l?ba(t):va(),(e=dt)?(e=kh(e,vn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:da!==null?{id:Rn,overflow:_n}:null,retryLane:536870912,hydrationErrors:null},n=Wu(e),n.return=t,t.child=n,Ot=t,dt=null)):e=null,e===null)throw ha(t);return Hc(e)?t.lanes=32:t.lanes=536870912,null}var p=a.children;return a=a.fallback,l?(va(),l=t.mode,p=Jo({mode:"hidden",children:p},l),a=Za(a,l,n,null),p.return=t,a.return=t,p.sibling=a,t.child=p,a=t.child,a.memoizedState=Ps(n),a.childLanes=ec(e,c,n),t.memoizedState=Is,Ai(null,a)):(ba(t),tc(t,p))}var x=e.memoizedState;if(x!==null&&(p=x.dehydrated,p!==null)){if(i)t.flags&256?(ba(t),t.flags&=-257,t=nc(e,t,n)):t.memoizedState!==null?(va(),t.child=e.child,t.flags|=128,t=null):(va(),p=a.fallback,l=t.mode,a=Jo({mode:"visible",children:a.children},l),p=Za(p,l,n,null),p.flags|=2,a.return=t,p.return=t,a.sibling=p,t.child=a,el(t,e.child,null,n),a=t.child,a.memoizedState=Ps(n),a.childLanes=ec(e,c,n),t.memoizedState=Is,t=Ai(null,a));else if(ba(t),Hc(p)){if(c=p.nextSibling&&p.nextSibling.dataset,c)var E=c.dgst;c=E,a=Error(u(419)),a.stack="",a.digest=c,bi({value:a,source:null,stack:null}),t=nc(e,t,n)}else if(Dt||zl(e,t,n,!1),c=(n&e.childLanes)!==0,Dt||c){if(c=st,c!==null&&(a=ai(c,n),a!==0&&a!==x.retryLane))throw x.retryLane=a,Ka(e,a),Pt(c,e,a),$s;Uc(p)||ar(),t=nc(e,t,n)}else Uc(p)?(t.flags|=192,t.child=e.child,t=null):(e=x.treeContext,dt=Sn(p.nextSibling),Ot=t,Ve=!0,fa=null,vn=!1,e!==null&&ed(t,e),t=tc(t,a.children),t.flags|=4096);return t}return l?(va(),p=a.fallback,l=t.mode,x=e.child,E=x.sibling,a=Qn(x,{mode:"hidden",children:a.children}),a.subtreeFlags=x.subtreeFlags&65011712,E!==null?p=Qn(E,p):(p=Za(p,l,n,null),p.flags|=2),p.return=t,a.return=t,a.sibling=p,t.child=a,Ai(null,a),a=t.child,p=e.child.memoizedState,p===null?p=Ps(n):(l=p.cachePool,l!==null?(x=zt._currentValue,l=l.parent!==x?{parent:x,pool:x}:l):l=od(),p={baseLanes:p.baseLanes|n,cachePool:l}),a.memoizedState=p,a.childLanes=ec(e,c,n),t.memoizedState=Is,Ai(e.child,a)):(ba(t),n=e.child,e=n.sibling,n=Qn(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(c=t.deletions,c===null?(t.deletions=[e],t.flags|=16):c.push(e)),t.child=n,t.memoizedState=null,n)}function tc(e,t){return t=Jo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Jo(e,t){return e=ln(22,e,null,t),e.lanes=0,e}function nc(e,t,n){return el(t,e.child,null,n),e=tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function xf(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),ys(e.return,t,n)}function ac(e,t,n,a,l,i){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:l,treeForkCount:i}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=a,c.tail=n,c.tailMode=l,c.treeForkCount=i)}function Sf(e,t,n){var a=t.pendingProps,l=a.revealOrder,i=a.tail;a=a.children;var c=xt.current,p=(c&2)!==0;if(p?(c=c&1|2,t.flags|=128):c&=1,F(xt,c),Ut(e,t,a,n),a=Ve?yi:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&xf(e,n,t);else if(e.tag===19)xf(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&Ho(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),ac(t,!1,l,n,i,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&Ho(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}ac(t,!0,n,null,i,a);break;case"together":ac(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Wn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ca|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(zl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=Qn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Qn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function lc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Eo(e)))}function $p(e,t,n){switch(t.tag){case 3:Ye(t,t.stateNode.containerInfo),pa(t,zt,e.memoizedState.cache),Ja();break;case 27:case 5:_t(t);break;case 4:Ye(t,t.stateNode.containerInfo);break;case 10:pa(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ts(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(ba(t),t.flags|=128,null):(n&t.child.childLanes)!==0?vf(e,t,n):(ba(t),e=Wn(e,t,n),e!==null?e.sibling:null);ba(t);break;case 19:var l=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(zl(e,t,n,!1),a=(n&t.childLanes)!==0),l){if(a)return Sf(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),F(xt,xt.current),a)break;return null;case 22:return t.lanes=0,hf(e,t,n,t.pendingProps);case 24:pa(t,zt,e.memoizedState.cache)}return Wn(e,t,n)}function Cf(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Dt=!0;else{if(!lc(e,n)&&(t.flags&128)===0)return Dt=!1,$p(e,t,n);Dt=(e.flags&131072)!==0}else Dt=!1,Ve&&(t.flags&1048576)!==0&&Pu(t,yi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Ia(t.elementType),t.type=e,typeof e=="function")cs(e)?(a=nl(e,a),t.tag=1,t=yf(null,t,e,a,n)):(t.tag=0,t=Ws(null,t,e,a,n));else{if(e!=null){var l=e.$$typeof;if(l===be){t.tag=11,t=uf(null,t,e,a,n);break e}else if(l===$){t.tag=14,t=df(null,t,e,a,n);break e}}throw t=we(e)||e,Error(u(306,t,""))}}return t;case 0:return Ws(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,l=nl(a,t.pendingProps),yf(e,t,a,l,n);case 3:e:{if(Ye(t,t.stateNode.containerInfo),e===null)throw Error(u(387));a=t.pendingProps;var i=t.memoizedState;l=i.element,zs(e,t),Mi(t,a,null,n);var c=t.memoizedState;if(a=c.cache,pa(t,zt,a),a!==i.cache&&bs(t,[zt],n,!0),zi(),a=c.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=bf(e,t,a,n);break e}else if(a!==l){l=gn(Error(u(424)),t),bi(l),t=bf(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,dt=Sn(e.firstChild),Ot=t,Ve=!0,fa=null,vn=!0,n=fd(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ja(),a===l){t=Wn(e,t,n);break e}Ut(e,t,a,n)}t=t.child}return t;case 26:return Zo(e,t),e===null?(n=Oh(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ve||(n=t.type,e=t.pendingProps,a=ur(Oe.current).createElement(n),a[ht]=t,a[vt]=e,Ht(a,n,e),pe(a),t.stateNode=a):t.memoizedState=Oh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return _t(t),e===null&&Ve&&(a=t.stateNode=Ah(t.type,t.pendingProps,Oe.current),Ot=t,vn=!0,l=dt,ka(t.type)?(Bc=l,dt=Sn(a.firstChild)):dt=l),Ut(e,t,t.pendingProps.children,n),Zo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ve&&((l=a=dt)&&(a=Dm(a,t.type,t.pendingProps,vn),a!==null?(t.stateNode=a,Ot=t,dt=Sn(a.firstChild),vn=!1,l=!0):l=!1),l||ha(t)),_t(t),l=t.type,i=t.pendingProps,c=e!==null?e.memoizedProps:null,a=i.children,_c(l,i)?a=null:c!==null&&_c(l,c)&&(t.flags|=32),t.memoizedState!==null&&(l=Rs(e,t,Yp,null,null,n),Qi._currentValue=l),Zo(e,t),Ut(e,t,a,n),t.child;case 6:return e===null&&Ve&&((e=n=dt)&&(n=km(n,t.pendingProps,vn),n!==null?(t.stateNode=n,Ot=t,dt=null,e=!0):e=!1),e||ha(t)),null;case 13:return vf(e,t,n);case 4:return Ye(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=el(t,null,a,n):Ut(e,t,a,n),t.child;case 11:return uf(e,t,t.type,t.pendingProps,n);case 7:return Ut(e,t,t.pendingProps,n),t.child;case 8:return Ut(e,t,t.pendingProps.children,n),t.child;case 12:return Ut(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,pa(t,t.type,a.value),Ut(e,t,a.children,n),t.child;case 9:return l=t.type._context,a=t.pendingProps.children,$a(t),l=Lt(l),a=a(l),t.flags|=1,Ut(e,t,a,n),t.child;case 14:return df(e,t,t.type,t.pendingProps,n);case 15:return ff(e,t,t.type,t.pendingProps,n);case 19:return Sf(e,t,n);case 31:return Fp(e,t,n);case 22:return hf(e,t,n,t.pendingProps);case 24:return $a(t),a=Lt(zt),e===null?(l=Ss(),l===null&&(l=st,i=vs(),l.pooledCache=i,i.refCount++,i!==null&&(l.pooledCacheLanes|=n),l=i),t.memoizedState={parent:a,cache:l},ws(t),pa(t,zt,l)):((e.lanes&n)!==0&&(zs(e,t),Mi(t,null,null,n),zi()),l=e.memoizedState,i=t.memoizedState,l.parent!==a?(l={parent:a,cache:a},t.memoizedState=l,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=l),pa(t,zt,a)):(a=i.cache,pa(t,zt,a),a!==l.cache&&bs(t,[zt],n,!0))),Ut(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function In(e){e.flags|=4}function ic(e,t,n,a,l){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(l&335544128)===l)if(e.stateNode.complete)e.flags|=8192;else if(Ff())e.flags|=8192;else throw Pa=_o,Cs}else e.flags&=-16777217}function wf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Nh(t))if(Ff())e.flags|=8192;else throw Pa=_o,Cs}function Fo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?ro():536870912,e.lanes|=t,Hl|=t)}function Ri(e,t){if(!Ve)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 ft(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 Wp(e,t,n){var a=t.pendingProps;switch(hs(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ft(t),null;case 1:return ft(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Jn(zt),Me(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(wl(t)?In(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ms())),ft(t),null;case 26:var l=t.type,i=t.memoizedState;return e===null?(In(t),i!==null?(ft(t),wf(t,i)):(ft(t),ic(t,l,null,a,n))):i?i!==e.memoizedState?(In(t),ft(t),wf(t,i)):(ft(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&In(t),ft(t),ic(t,l,e,a,n)),null;case 27:if(le(t),n=Oe.current,l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&In(t);else{if(!a){if(t.stateNode===null)throw Error(u(166));return ft(t),null}e=se.current,wl(t)?td(t):(e=Ah(l,a,n),t.stateNode=e,In(t))}return ft(t),null;case 5:if(le(t),l=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&In(t);else{if(!a){if(t.stateNode===null)throw Error(u(166));return ft(t),null}if(i=se.current,wl(t))td(t);else{var c=ur(Oe.current);switch(i){case 1:i=c.createElementNS("http://www.w3.org/2000/svg",l);break;case 2:i=c.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;default:switch(l){case"svg":i=c.createElementNS("http://www.w3.org/2000/svg",l);break;case"math":i=c.createElementNS("http://www.w3.org/1998/Math/MathML",l);break;case"script":i=c.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?c.createElement("select",{is:a.is}):c.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?c.createElement(l,{is:a.is}):c.createElement(l)}}i[ht]=t,i[vt]=a;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=i;e:switch(Ht(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&&In(t)}}return ft(t),ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&In(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(u(166));if(e=Oe.current,wl(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,l=Ot,l!==null)switch(l.tag){case 27:case 5:a=l.memoizedProps}e[ht]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||vh(e.nodeValue,n)),e||ha(t,!0)}else e=ur(e).createTextNode(a),e[ht]=t,t.stateNode=e}return ft(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=wl(t),n!==null){if(e===null){if(!a)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[ht]=t}else Ja(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ft(t),e=!1}else n=ms(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(rn(t),t):(rn(t),null);if((t.flags&128)!==0)throw Error(u(558))}return ft(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(l=wl(t),a!==null&&a.dehydrated!==null){if(e===null){if(!l)throw Error(u(318));if(l=t.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(u(317));l[ht]=t}else Ja(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ft(t),l=!1}else l=ms(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),l=!0;if(!l)return t.flags&256?(rn(t),t):(rn(t),null)}return rn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,l=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(l=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==l&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Fo(t,t.updateQueue),ft(t),null);case 4:return Me(),e===null&&kc(t.stateNode.containerInfo),ft(t),null;case 10:return Jn(t.type),ft(t),null;case 19:if(_(xt),a=t.memoizedState,a===null)return ft(t),null;if(l=(t.flags&128)!==0,i=a.rendering,i===null)if(l)Ri(a,!1);else{if(yt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Ho(e),i!==null){for(t.flags|=128,Ri(a,!1),e=i.updateQueue,t.updateQueue=e,Fo(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)$u(n,e),n=n.sibling;return F(xt,xt.current&1|2),Ve&&Kn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&jt()>er&&(t.flags|=128,l=!0,Ri(a,!1),t.lanes=4194304)}else{if(!l)if(e=Ho(i),e!==null){if(t.flags|=128,l=!0,e=e.updateQueue,t.updateQueue=e,Fo(t,e),Ri(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!Ve)return ft(t),null}else 2*jt()-a.renderingStartTime>er&&n!==536870912&&(t.flags|=128,l=!0,Ri(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=jt(),e.sibling=null,n=xt.current,F(xt,l?n&1|2:n&1),Ve&&Kn(t,a.treeForkCount),e):(ft(t),null);case 22:case 23:return rn(t),Es(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(ft(t),t.subtreeFlags&6&&(t.flags|=8192)):ft(t),n=t.updateQueue,n!==null&&Fo(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&_(Wa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Jn(zt),ft(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Ip(e,t){switch(hs(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Jn(zt),Me(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return le(t),null;case 31:if(t.memoizedState!==null){if(rn(t),t.alternate===null)throw Error(u(340));Ja()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(rn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Ja()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _(xt),null;case 4:return Me(),null;case 10:return Jn(t.type),null;case 22:case 23:return rn(t),Es(),e!==null&&_(Wa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Jn(zt),null;case 25:return null;default:return null}}function zf(e,t){switch(hs(t),t.tag){case 3:Jn(zt),Me();break;case 26:case 27:case 5:le(t);break;case 4:Me();break;case 31:t.memoizedState!==null&&rn(t);break;case 13:rn(t);break;case 19:_(xt);break;case 10:Jn(t.type);break;case 22:case 23:rn(t),Es(),e!==null&&_(Wa);break;case 24:Jn(zt)}}function _i(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var l=a.next;n=l;do{if((n.tag&e)===e){a=void 0;var i=n.create,c=n.inst;a=i(),c.destroy=a}n=n.next}while(n!==l)}}catch(p){at(t,t.return,p)}}function xa(e,t,n){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var i=l.next;a=i;do{if((a.tag&e)===e){var c=a.inst,p=c.destroy;if(p!==void 0){c.destroy=void 0,l=t;var x=n,E=p;try{E()}catch(N){at(l,x,N)}}}a=a.next}while(a!==i)}}catch(N){at(t,t.return,N)}}function Mf(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{pd(t,n)}catch(a){at(e,e.return,a)}}}function Df(e,t,n){n.props=nl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){at(e,t,a)}}function Oi(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(l){at(e,t,l)}}function On(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(l){at(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){at(e,t,l)}else n.current=null}function kf(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){at(e,e.return,l)}}function oc(e,t,n){try{var a=e.stateNode;xm(a,e.type,n,t),a[vt]=t}catch(l){at(e,e.return,l)}}function Ef(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ka(e.type)||e.tag===4}function rc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ef(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&&ka(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function sc(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Xn));else if(a!==4&&(a===27&&ka(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(sc(e,t,n),e=e.sibling;e!==null;)sc(e,t,n),e=e.sibling}function $o(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&ka(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($o(e,t,n),e=e.sibling;e!==null;)$o(e,t,n),e=e.sibling}function Tf(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,l=t.attributes;l.length;)t.removeAttributeNode(l[0]);Ht(t,a,n),t[ht]=e,t[vt]=n}catch(i){at(e,e.return,i)}}var Pn=!1,kt=!1,cc=!1,Af=typeof WeakSet=="function"?WeakSet:Set,At=null;function Pp(e,t){if(e=e.containerInfo,Ac=yr,e=Yu(e),ns(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var l=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var c=0,p=-1,x=-1,E=0,N=0,X=e,A=null;t:for(;;){for(var L;X!==n||l!==0&&X.nodeType!==3||(p=c+l),X!==i||a!==0&&X.nodeType!==3||(x=c+a),X.nodeType===3&&(c+=X.nodeValue.length),(L=X.firstChild)!==null;)A=X,X=L;for(;;){if(X===e)break t;if(A===n&&++E===l&&(p=c),A===i&&++N===a&&(x=c),(L=X.nextSibling)!==null)break;X=A,A=X.parentNode}X=L}n=p===-1||x===-1?null:{start:p,end:x}}else n=null}n=n||{start:0,end:0}}else n=null;for(Rc={focusedElem:e,selectionRange:n},yr=!1,At=t;At!==null;)if(t=At,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,At=e;else for(;At!==null;){switch(t=At,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 de=nl(n.type,l);e=a.getSnapshotBeforeUpdate(de,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(ze){at(n,n.return,ze)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Lc(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Lc(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,At=e;break}At=t.return}}function Rf(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:ta(e,n),a&4&&_i(5,n);break;case 1:if(ta(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(c){at(n,n.return,c)}else{var l=nl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(l,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){at(n,n.return,c)}}a&64&&Mf(n),a&512&&Oi(n,n.return);break;case 3:if(ta(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{pd(e,t)}catch(c){at(n,n.return,c)}}break;case 27:t===null&&a&4&&Tf(n);case 26:case 5:ta(e,n),t===null&&a&4&&kf(n),a&512&&Oi(n,n.return);break;case 12:ta(e,n);break;case 31:ta(e,n),a&4&&Lf(e,n);break;case 13:ta(e,n),a&4&&Uf(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=sm.bind(null,n),Em(e,n))));break;case 22:if(a=n.memoizedState!==null||Pn,!a){t=t!==null&&t.memoizedState!==null||kt,l=Pn;var i=kt;Pn=a,(kt=t)&&!i?na(e,n,(n.subtreeFlags&8772)!==0):ta(e,n),Pn=l,kt=i}break;case 30:break;default:ta(e,n)}}function _f(e){var t=e.alternate;t!==null&&(e.alternate=null,_f(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&oi(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var pt=null,Ft=!1;function ea(e,t,n){for(n=n.child;n!==null;)Of(e,t,n),n=n.sibling}function Of(e,t,n){if(Vt&&typeof Vt.onCommitFiberUnmount=="function")try{Vt.onCommitFiberUnmount(Nn,n)}catch{}switch(n.tag){case 26:kt||On(n,t),ea(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:kt||On(n,t);var a=pt,l=Ft;ka(n.type)&&(pt=n.stateNode,Ft=!1),ea(e,t,n),Gi(n.stateNode),pt=a,Ft=l;break;case 5:kt||On(n,t);case 6:if(a=pt,l=Ft,pt=null,ea(e,t,n),pt=a,Ft=l,pt!==null)if(Ft)try{(pt.nodeType===9?pt.body:pt.nodeName==="HTML"?pt.ownerDocument.body:pt).removeChild(n.stateNode)}catch(i){at(n,t,i)}else try{pt.removeChild(n.stateNode)}catch(i){at(n,t,i)}break;case 18:pt!==null&&(Ft?(e=pt,Mh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Vl(e)):Mh(pt,n.stateNode));break;case 4:a=pt,l=Ft,pt=n.stateNode.containerInfo,Ft=!0,ea(e,t,n),pt=a,Ft=l;break;case 0:case 11:case 14:case 15:xa(2,n,t),kt||xa(4,n,t),ea(e,t,n);break;case 1:kt||(On(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Df(n,t,a)),ea(e,t,n);break;case 21:ea(e,t,n);break;case 22:kt=(a=kt)||n.memoizedState!==null,ea(e,t,n),kt=a;break;default:ea(e,t,n)}}function Lf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Vl(e)}catch(n){at(t,t.return,n)}}}function Uf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Vl(e)}catch(n){at(t,t.return,n)}}function em(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Af),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Af),t;default:throw Error(u(435,e.tag))}}function Wo(e,t){var n=em(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var l=cm.bind(null,e,a);a.then(l,l)}})}function $t(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var l=n[a],i=e,c=t,p=c;e:for(;p!==null;){switch(p.tag){case 27:if(ka(p.type)){pt=p.stateNode,Ft=!1;break e}break;case 5:pt=p.stateNode,Ft=!1;break e;case 3:case 4:pt=p.stateNode.containerInfo,Ft=!0;break e}p=p.return}if(pt===null)throw Error(u(160));Of(i,c,l),pt=null,Ft=!1,i=l.alternate,i!==null&&(i.return=null),l.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Hf(t,e),t=t.sibling}var kn=null;function Hf(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:$t(t,e),Wt(e),a&4&&(xa(3,e,e.return),_i(3,e),xa(5,e,e.return));break;case 1:$t(t,e),Wt(e),a&512&&(kt||n===null||On(n,n.return)),a&64&&Pn&&(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=kn;if($t(t,e),Wt(e),a&512&&(kt||n===null||On(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[Ga]||i[ht]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=l.createElement(a),l.head.insertBefore(i,l.querySelector("head > title"))),Ht(i,a,n),i[ht]=e,pe(i),a=i;break e;case"link":var c=Hh("link","href",l).get(a+(n.href||""));if(c){for(var p=0;p<c.length;p++)if(i=c[p],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){c.splice(p,1);break t}}i=l.createElement(a),Ht(i,a,n),l.head.appendChild(i);break;case"meta":if(c=Hh("meta","content",l).get(a+(n.content||""))){for(p=0;p<c.length;p++)if(i=c[p],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){c.splice(p,1);break t}}i=l.createElement(a),Ht(i,a,n),l.head.appendChild(i);break;default:throw Error(u(468,a))}i[ht]=e,pe(i),a=i}e.stateNode=a}else Bh(l,e.type,e.stateNode);else e.stateNode=Uh(l,a,e.memoizedProps);else i!==a?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,a===null?Bh(l,e.type,e.stateNode):Uh(l,a,e.memoizedProps)):a===null&&e.stateNode!==null&&oc(e,e.memoizedProps,n.memoizedProps)}break;case 27:$t(t,e),Wt(e),a&512&&(kt||n===null||On(n,n.return)),n!==null&&a&4&&oc(e,e.memoizedProps,n.memoizedProps);break;case 5:if($t(t,e),Wt(e),a&512&&(kt||n===null||On(n,n.return)),e.flags&32){l=e.stateNode;try{hl(l,"")}catch(de){at(e,e.return,de)}}a&4&&e.stateNode!=null&&(l=e.memoizedProps,oc(e,l,n!==null?n.memoizedProps:l)),a&1024&&(cc=!0);break;case 6:if($t(t,e),Wt(e),a&4){if(e.stateNode===null)throw Error(u(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(de){at(e,e.return,de)}}break;case 3:if(hr=null,l=kn,kn=dr(t.containerInfo),$t(t,e),kn=l,Wt(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Vl(t.containerInfo)}catch(de){at(e,e.return,de)}cc&&(cc=!1,Bf(e));break;case 4:a=kn,kn=dr(e.stateNode.containerInfo),$t(t,e),Wt(e),kn=a;break;case 12:$t(t,e),Wt(e);break;case 31:$t(t,e),Wt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Wo(e,a)));break;case 13:$t(t,e),Wt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Po=jt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Wo(e,a)));break;case 22:l=e.memoizedState!==null;var x=n!==null&&n.memoizedState!==null,E=Pn,N=kt;if(Pn=E||l,kt=N||x,$t(t,e),kt=N,Pn=E,Wt(e),a&8192)e:for(t=e.stateNode,t._visibility=l?t._visibility&-2:t._visibility|1,l&&(n===null||x||Pn||kt||al(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){x=n=t;try{if(i=x.stateNode,l)c=i.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{p=x.stateNode;var X=x.memoizedProps.style,A=X!=null&&X.hasOwnProperty("display")?X.display:null;p.style.display=A==null||typeof A=="boolean"?"":(""+A).trim()}}catch(de){at(x,x.return,de)}}}else if(t.tag===6){if(n===null){x=t;try{x.stateNode.nodeValue=l?"":x.memoizedProps}catch(de){at(x,x.return,de)}}}else if(t.tag===18){if(n===null){x=t;try{var L=x.stateNode;l?Dh(L,!0):Dh(x.stateNode,!1)}catch(de){at(x,x.return,de)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,Wo(e,n))));break;case 19:$t(t,e),Wt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Wo(e,a)));break;case 30:break;case 21:break;default:$t(t,e),Wt(e)}}function Wt(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Ef(a)){n=a;break}a=a.return}if(n==null)throw Error(u(160));switch(n.tag){case 27:var l=n.stateNode,i=rc(e);$o(e,i,l);break;case 5:var c=n.stateNode;n.flags&32&&(hl(c,""),n.flags&=-33);var p=rc(e);$o(e,p,c);break;case 3:case 4:var x=n.stateNode.containerInfo,E=rc(e);sc(e,E,x);break;default:throw Error(u(161))}}catch(N){at(e,e.return,N)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Bf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Bf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ta(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Rf(e,t.alternate,t),t=t.sibling}function al(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:xa(4,t,t.return),al(t);break;case 1:On(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Df(t,t.return,n),al(t);break;case 27:Gi(t.stateNode);case 26:case 5:On(t,t.return),al(t);break;case 22:t.memoizedState===null&&al(t);break;case 30:al(t);break;default:al(t)}e=e.sibling}}function na(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,l=e,i=t,c=i.flags;switch(i.tag){case 0:case 11:case 15:na(l,i,n),_i(4,i);break;case 1:if(na(l,i,n),a=i,l=a.stateNode,typeof l.componentDidMount=="function")try{l.componentDidMount()}catch(E){at(a,a.return,E)}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++)hd(x[l],p)}catch(E){at(a,a.return,E)}}n&&c&64&&Mf(i),Oi(i,i.return);break;case 27:Tf(i);case 26:case 5:na(l,i,n),n&&a===null&&c&4&&kf(i),Oi(i,i.return);break;case 12:na(l,i,n);break;case 31:na(l,i,n),n&&c&4&&Lf(l,i);break;case 13:na(l,i,n),n&&c&4&&Uf(l,i);break;case 22:i.memoizedState===null&&na(l,i,n),Oi(i,i.return);break;case 30:break;default:na(l,i,n)}t=t.sibling}}function uc(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&vi(n))}function dc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&vi(e))}function En(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Nf(e,t,n,a),t=t.sibling}function Nf(e,t,n,a){var l=t.flags;switch(t.tag){case 0:case 11:case 15:En(e,t,n,a),l&2048&&_i(9,t);break;case 1:En(e,t,n,a);break;case 3:En(e,t,n,a),l&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&vi(e)));break;case 12:if(l&2048){En(e,t,n,a),e=t.stateNode;try{var i=t.memoizedProps,c=i.id,p=i.onPostCommit;typeof p=="function"&&p(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(x){at(t,t.return,x)}}else En(e,t,n,a);break;case 31:En(e,t,n,a);break;case 13:En(e,t,n,a);break;case 23:break;case 22:i=t.stateNode,c=t.alternate,t.memoizedState!==null?i._visibility&2?En(e,t,n,a):Li(e,t):i._visibility&2?En(e,t,n,a):(i._visibility|=2,Ol(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),l&2048&&uc(c,t);break;case 24:En(e,t,n,a),l&2048&&dc(t.alternate,t);break;default:En(e,t,n,a)}}function Ol(e,t,n,a,l){for(l=l&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,c=t,p=n,x=a,E=c.flags;switch(c.tag){case 0:case 11:case 15:Ol(i,c,p,x,l),_i(8,c);break;case 23:break;case 22:var N=c.stateNode;c.memoizedState!==null?N._visibility&2?Ol(i,c,p,x,l):Li(i,c):(N._visibility|=2,Ol(i,c,p,x,l)),l&&E&2048&&uc(c.alternate,c);break;case 24:Ol(i,c,p,x,l),l&&E&2048&&dc(c.alternate,c);break;default:Ol(i,c,p,x,l)}t=t.sibling}}function Li(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,l=a.flags;switch(a.tag){case 22:Li(n,a),l&2048&&uc(a.alternate,a);break;case 24:Li(n,a),l&2048&&dc(a.alternate,a);break;default:Li(n,a)}t=t.sibling}}var Ui=8192;function Ll(e,t,n){if(e.subtreeFlags&Ui)for(e=e.child;e!==null;)jf(e,t,n),e=e.sibling}function jf(e,t,n){switch(e.tag){case 26:Ll(e,t,n),e.flags&Ui&&e.memoizedState!==null&&qm(n,kn,e.memoizedState,e.memoizedProps);break;case 5:Ll(e,t,n);break;case 3:case 4:var a=kn;kn=dr(e.stateNode.containerInfo),Ll(e,t,n),kn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Ui,Ui=16777216,Ll(e,t,n),Ui=a):Ll(e,t,n));break;default:Ll(e,t,n)}}function qf(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Hi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];At=a,Gf(a,e)}qf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Yf(e),e=e.sibling}function Yf(e){switch(e.tag){case 0:case 11:case 15:Hi(e),e.flags&2048&&xa(9,e,e.return);break;case 3:Hi(e);break;case 12:Hi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Io(e)):Hi(e);break;default:Hi(e)}}function Io(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];At=a,Gf(a,e)}qf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:xa(8,t,t.return),Io(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Io(t));break;default:Io(t)}e=e.sibling}}function Gf(e,t){for(;At!==null;){var n=At;switch(n.tag){case 0:case 11:case 15:xa(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:vi(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,At=a;else e:for(n=e;At!==null;){a=At;var l=a.sibling,i=a.return;if(_f(a),a===n){At=null;break e}if(l!==null){l.return=i,At=l;break e}At=i}}}var tm={getCacheForType:function(e){var t=Lt(zt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Lt(zt).controller.signal}},nm=typeof WeakMap=="function"?WeakMap:Map,$e=0,st=null,je=null,Ge=0,nt=0,sn=null,Sa=!1,Ul=!1,fc=!1,aa=0,yt=0,Ca=0,ll=0,hc=0,cn=0,Hl=0,Bi=null,It=null,pc=!1,Po=0,Xf=0,er=1/0,tr=null,wa=null,Tt=0,za=null,Bl=null,la=0,mc=0,gc=null,Vf=null,Ni=0,yc=null;function un(){return($e&2)!==0&&Ge!==0?Ge&-Ge:R.T!==null?wc():uo()}function Qf(){if(cn===0)if((Ge&536870912)===0||Ve){var e=cl;cl<<=1,(cl&3932160)===0&&(cl=262144),cn=e}else cn=536870912;return e=on.current,e!==null&&(e.flags|=32),cn}function Pt(e,t,n){(e===st&&(nt===2||nt===9)||e.cancelPendingCommit!==null)&&(Nl(e,0),Ma(e,Ge,cn,!1)),Ya(e,n),(($e&2)===0||e!==st)&&(e===st&&(($e&2)===0&&(ll|=n),yt===4&&Ma(e,Ge,cn,!1)),Ln(e))}function Kf(e,t,n){if(($e&6)!==0)throw Error(u(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||qa(e,t),l=a?im(e,t):vc(e,t,!0),i=a;do{if(l===0){Ul&&!a&&Ma(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!am(n)){l=vc(e,t,!1),i=!1;continue}if(l===2){if(i=t,e.errorRecoveryDisabledLanes&i)var c=0;else c=e.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){t=c;e:{var p=e;l=Bi;var x=p.current.memoizedState.isDehydrated;if(x&&(Nl(p,c).flags|=256),c=vc(p,c,!1),c!==2){if(fc&&!x){p.errorRecoveryDisabledLanes|=i,ll|=i,l=4;break e}i=It,It=l,i!==null&&(It===null?It=i:It.push.apply(It,i))}l=c}if(i=!1,l!==2)continue}}if(l===1){Nl(e,0),Ma(e,t,0,!0);break}e:{switch(a=e,i=l,i){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:Ma(a,t,cn,!Sa);break e;case 2:It=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(l=Po+300-jt(),10<l)){if(Ma(a,t,cn,!Sa),ul(a,0,!0)!==0)break e;la=t,a.timeoutHandle=wh(Zf.bind(null,a,n,It,tr,pc,t,cn,ll,Hl,Sa,i,"Throttled",-0,0),l);break e}Zf(a,n,It,tr,pc,t,cn,ll,Hl,Sa,i,null,-0,0)}}break}while(!0);Ln(e)}function Zf(e,t,n,a,l,i,c,p,x,E,N,X,A,L){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:Xn},jf(t,i,X);var de=(i&62914560)===i?Po-jt():(i&4194048)===i?Xf-jt():0;if(de=Ym(X,de),de!==null){la=i,e.cancelPendingCommit=de(th.bind(null,e,t,i,n,a,l,c,p,x,N,X,null,A,L)),Ma(e,i,c,!E);return}}th(e,t,i,n,a,l,c,p,x)}function am(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var l=n[a],i=l.getSnapshot;l=l.value;try{if(!an(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 Ma(e,t,n,a){t&=~hc,t&=~ll,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var l=t;0<l;){var i=31-Qt(l),c=1<<i;a[i]=-1,l&=~c}n!==0&&so(e,n,t)}function nr(){return($e&6)===0?(ji(0),!1):!0}function bc(){if(je!==null){if(nt===0)var e=je.return;else e=je,Zn=Fa=null,Ls(e),El=null,Si=0,e=je;for(;e!==null;)zf(e.alternate,e),e=e.return;je=null}}function Nl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,wm(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),la=0,bc(),st=e,je=n=Qn(e.current,null),Ge=t,nt=0,sn=null,Sa=!1,Ul=qa(e,t),fc=!1,Hl=cn=hc=ll=Ca=yt=0,It=Bi=null,pc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var l=31-Qt(a),i=1<<l;t|=e[l],a&=~i}return aa=t,wo(),n}function Jf(e,t){Ue=null,R.H=Ti,t===kl||t===Ro?(t=cd(),nt=3):t===Cs?(t=cd(),nt=4):nt=t===$s?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,sn=t,je===null&&(yt=1,Qo(e,gn(t,e.current)))}function Ff(){var e=on.current;return e===null?!0:(Ge&4194048)===Ge?xn===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?e===xn:!1}function $f(){var e=R.H;return R.H=Ti,e===null?Ti:e}function Wf(){var e=R.A;return R.A=tm,e}function ar(){yt=4,Sa||(Ge&4194048)!==Ge&&on.current!==null||(Ul=!0),(Ca&134217727)===0&&(ll&134217727)===0||st===null||Ma(st,Ge,cn,!1)}function vc(e,t,n){var a=$e;$e|=2;var l=$f(),i=Wf();(st!==e||Ge!==t)&&(tr=null,Nl(e,t)),t=!1;var c=yt;e:do try{if(nt!==0&&je!==null){var p=je,x=sn;switch(nt){case 8:bc(),c=6;break e;case 3:case 2:case 9:case 6:on.current===null&&(t=!0);var E=nt;if(nt=0,sn=null,jl(e,p,x,E),n&&Ul){c=0;break e}break;default:E=nt,nt=0,sn=null,jl(e,p,x,E)}}lm(),c=yt;break}catch(N){Jf(e,N)}while(!0);return t&&e.shellSuspendCounter++,Zn=Fa=null,$e=a,R.H=l,R.A=i,je===null&&(st=null,Ge=0,wo()),c}function lm(){for(;je!==null;)If(je)}function im(e,t){var n=$e;$e|=2;var a=$f(),l=Wf();st!==e||Ge!==t?(tr=null,er=jt()+500,Nl(e,t)):Ul=qa(e,t);e:do try{if(nt!==0&&je!==null){t=je;var i=sn;t:switch(nt){case 1:nt=0,sn=null,jl(e,t,i,1);break;case 2:case 9:if(rd(i)){nt=0,sn=null,Pf(t);break}t=function(){nt!==2&&nt!==9||st!==e||(nt=7),Ln(e)},i.then(t,t);break e;case 3:nt=7;break e;case 4:nt=5;break e;case 7:rd(i)?(nt=0,sn=null,Pf(t)):(nt=0,sn=null,jl(e,t,i,7));break;case 5:var c=null;switch(je.tag){case 26:c=je.memoizedState;case 5:case 27:var p=je;if(c?Nh(c):p.stateNode.complete){nt=0,sn=null;var x=p.sibling;if(x!==null)je=x;else{var E=p.return;E!==null?(je=E,lr(E)):je=null}break t}}nt=0,sn=null,jl(e,t,i,5);break;case 6:nt=0,sn=null,jl(e,t,i,6);break;case 8:bc(),yt=6;break e;default:throw Error(u(462))}}om();break}catch(N){Jf(e,N)}while(!0);return Zn=Fa=null,R.H=a,R.A=l,$e=n,je!==null?0:(st=null,Ge=0,wo(),yt)}function om(){for(;je!==null&&!Pl();)If(je)}function If(e){var t=Cf(e.alternate,e,aa);e.memoizedProps=e.pendingProps,t===null?lr(e):je=t}function Pf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=gf(n,t,t.pendingProps,t.type,void 0,Ge);break;case 11:t=gf(n,t,t.pendingProps,t.type.render,t.ref,Ge);break;case 5:Ls(t);default:zf(n,t),t=je=$u(t,aa),t=Cf(n,t,aa)}e.memoizedProps=e.pendingProps,t===null?lr(e):je=t}function jl(e,t,n,a){Zn=Fa=null,Ls(t),El=null,Si=0;var l=t.return;try{if(Jp(e,l,t,n,Ge)){yt=1,Qo(e,gn(n,e.current)),je=null;return}}catch(i){if(l!==null)throw je=l,i;yt=1,Qo(e,gn(n,e.current)),je=null;return}t.flags&32768?(Ve||a===1?e=!0:Ul||(Ge&536870912)!==0?e=!1:(Sa=e=!0,(a===2||a===9||a===3||a===6)&&(a=on.current,a!==null&&a.tag===13&&(a.flags|=16384))),eh(t,e)):lr(t)}function lr(e){var t=e;do{if((t.flags&32768)!==0){eh(t,Sa);return}e=t.return;var n=Wp(t.alternate,t,aa);if(n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);yt===0&&(yt=5)}function eh(e,t){do{var n=Ip(e.alternate,e);if(n!==null){n.flags&=32767,je=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=n}while(e!==null);yt=6,je=null}function th(e,t,n,a,l,i,c,p,x){e.cancelPendingCommit=null;do ir();while(Tt!==0);if(($e&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(i=t.lanes|t.childLanes,i|=rs,jr(e,n,i,c,p,x),e===st&&(je=st=null,Ge=0),Bl=t,za=e,la=n,mc=i,gc=l,Vf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,um(ra,function(){return oh(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=R.T,R.T=null,l=q.p,q.p=2,c=$e,$e|=4;try{Pp(e,t,n)}finally{$e=c,q.p=l,R.T=a}}Tt=1,nh(),ah(),lh()}}function nh(){if(Tt===1){Tt=0;var e=za,t=Bl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=R.T,R.T=null;var a=q.p;q.p=2;var l=$e;$e|=4;try{Hf(t,e);var i=Rc,c=Yu(e.containerInfo),p=i.focusedElem,x=i.selectionRange;if(c!==p&&p&&p.ownerDocument&&qu(p.ownerDocument.documentElement,p)){if(x!==null&&ns(p)){var E=x.start,N=x.end;if(N===void 0&&(N=E),"selectionStart"in p)p.selectionStart=E,p.selectionEnd=Math.min(N,p.value.length);else{var X=p.ownerDocument||document,A=X&&X.defaultView||window;if(A.getSelection){var L=A.getSelection(),de=p.textContent.length,ze=Math.min(x.start,de),ot=x.end===void 0?ze:Math.min(x.end,de);!L.extend&&ze>ot&&(c=ot,ot=ze,ze=c);var M=ju(p,ze),C=ju(p,ot);if(M&&C&&(L.rangeCount!==1||L.anchorNode!==M.node||L.anchorOffset!==M.offset||L.focusNode!==C.node||L.focusOffset!==C.offset)){var k=X.createRange();k.setStart(M.node,M.offset),L.removeAllRanges(),ze>ot?(L.addRange(k),L.extend(C.node,C.offset)):(k.setEnd(C.node,C.offset),L.addRange(k))}}}}for(X=[],L=p;L=L.parentNode;)L.nodeType===1&&X.push({element:L,left:L.scrollLeft,top:L.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}}yr=!!Ac,Rc=Ac=null}finally{$e=l,q.p=a,R.T=n}}e.current=t,Tt=2}}function ah(){if(Tt===2){Tt=0;var e=za,t=Bl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=R.T,R.T=null;var a=q.p;q.p=2;var l=$e;$e|=4;try{Rf(e,t.alternate,t)}finally{$e=l,q.p=a,R.T=n}}Tt=3}}function lh(){if(Tt===4||Tt===3){Tt=0,rl();var e=za,t=Bl,n=la,a=Vf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Tt=5:(Tt=0,Bl=za=null,ih(e,e.pendingLanes));var l=e.pendingLanes;if(l===0&&(wa=null),li(n),t=t.stateNode,Vt&&typeof Vt.onCommitFiberRoot=="function")try{Vt.onCommitFiberRoot(Nn,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=R.T,l=q.p,q.p=2,R.T=null;try{for(var i=e.onRecoverableError,c=0;c<a.length;c++){var p=a[c];i(p.value,{componentStack:p.stack})}}finally{R.T=t,q.p=l}}(la&3)!==0&&ir(),Ln(e),l=e.pendingLanes,(n&261930)!==0&&(l&42)!==0?e===yc?Ni++:(Ni=0,yc=e):Ni=0,ji(0)}}function ih(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,vi(t)))}function ir(){return nh(),ah(),lh(),oh()}function oh(){if(Tt!==5)return!1;var e=za,t=mc;mc=0;var n=li(la),a=R.T,l=q.p;try{q.p=32>n?32:n,R.T=null,n=gc,gc=null;var i=za,c=la;if(Tt=0,Bl=za=null,la=0,($e&6)!==0)throw Error(u(331));var p=$e;if($e|=4,Yf(i.current),Nf(i,i.current,c,n),$e=p,ji(0,!1),Vt&&typeof Vt.onPostCommitFiberRoot=="function")try{Vt.onPostCommitFiberRoot(Nn,i)}catch{}return!0}finally{q.p=l,R.T=a,ih(e,t)}}function rh(e,t,n){t=gn(n,t),t=Fs(e.stateNode,t,2),e=ya(e,t,2),e!==null&&(Ya(e,2),Ln(e))}function at(e,t,n){if(e.tag===3)rh(e,e,n);else for(;t!==null;){if(t.tag===3){rh(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(wa===null||!wa.has(a))){e=gn(n,e),n=sf(2),a=ya(t,n,2),a!==null&&(cf(n,a,t,e),Ya(a,2),Ln(a));break}}t=t.return}}function xc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new nm;var l=new Set;a.set(t,l)}else l=a.get(t),l===void 0&&(l=new Set,a.set(t,l));l.has(n)||(fc=!0,l.add(n),e=rm.bind(null,e,t,n),t.then(e,e))}function rm(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,st===e&&(Ge&n)===n&&(yt===4||yt===3&&(Ge&62914560)===Ge&&300>jt()-Po?($e&2)===0&&Nl(e,0):hc|=n,Hl===Ge&&(Hl=0)),Ln(e)}function sh(e,t){t===0&&(t=ro()),e=Ka(e,t),e!==null&&(Ya(e,t),Ln(e))}function sm(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),sh(e,n)}function cm(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(u(314))}a!==null&&a.delete(t),sh(e,n)}function um(e,t){return Ha(e,t)}var or=null,ql=null,Sc=!1,rr=!1,Cc=!1,Da=0;function Ln(e){e!==ql&&e.next===null&&(ql===null?or=ql=e:ql=ql.next=e),rr=!0,Sc||(Sc=!0,fm())}function ji(e,t){if(!Cc&&rr){Cc=!0;do for(var n=!1,a=or;a!==null;){if(e!==0){var l=a.pendingLanes;if(l===0)var i=0;else{var c=a.suspendedLanes,p=a.pingedLanes;i=(1<<31-Qt(42|e)+1)-1,i&=l&~(c&~p),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,fh(a,i))}else i=Ge,i=ul(a,a===st?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||qa(a,i)||(n=!0,fh(a,i));a=a.next}while(n);Cc=!1}}function dm(){ch()}function ch(){rr=Sc=!1;var e=0;Da!==0&&Cm()&&(e=Da);for(var t=jt(),n=null,a=or;a!==null;){var l=a.next,i=uh(a,t);i===0?(a.next=null,n===null?or=l:n.next=l,l===null&&(ql=n)):(n=a,(e!==0||(i&3)!==0)&&(rr=!0)),a=l}Tt!==0&&Tt!==5||ji(e),Da!==0&&(Da=0)}function uh(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,l=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var c=31-Qt(i),p=1<<c,x=l[c];x===-1?((p&n)===0||(p&a)!==0)&&(l[c]=Nr(p,t)):x<=t&&(e.expiredLanes|=p),i&=~p}if(t=st,n=Ge,n=ul(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(nt===2||nt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&fn(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||qa(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&fn(a),li(n)){case 2:case 8:n=Ba;break;case 32:n=ra;break;case 268435456:n=wt;break;default:n=ra}return a=dh.bind(null,e),n=Ha(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&fn(a),e.callbackPriority=2,e.callbackNode=null,2}function dh(e,t){if(Tt!==0&&Tt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(ir()&&e.callbackNode!==n)return null;var a=Ge;return a=ul(e,e===st?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Kf(e,a,t),uh(e,jt()),e.callbackNode!=null&&e.callbackNode===n?dh.bind(null,e):null)}function fh(e,t){if(ir())return null;Kf(e,t,!0)}function fm(){zm(function(){($e&6)!==0?Ha(ei,dm):ch()})}function wc(){if(Da===0){var e=Ml;e===0&&(e=sl,sl<<=1,(sl&261888)===0&&(sl=256)),Da=e}return Da}function hh(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:mo(""+e)}function ph(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function hm(e,t,n,a,l){if(t==="submit"&&n&&n.stateNode===l){var i=hh((l[vt]||null).action),c=a.submitter;c&&(t=(t=c[vt]||null)?hh(t.formAction):c.getAttribute("formAction"),t!==null&&(i=t,c=null));var p=new vo("action","action",null,a,l);e.push({event:p,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Da!==0){var x=c?ph(l,c):new FormData(l);Xs(n,{pending:!0,data:x,method:l.method,action:i},null,x)}}else typeof i=="function"&&(p.preventDefault(),x=c?ph(l,c):new FormData(l),Xs(n,{pending:!0,data:x,method:l.method,action:i},i,x))},currentTarget:l}]})}}for(var zc=0;zc<os.length;zc++){var Mc=os[zc],pm=Mc.toLowerCase(),mm=Mc[0].toUpperCase()+Mc.slice(1);Dn(pm,"on"+mm)}Dn(Vu,"onAnimationEnd"),Dn(Qu,"onAnimationIteration"),Dn(Ku,"onAnimationStart"),Dn("dblclick","onDoubleClick"),Dn("focusin","onFocus"),Dn("focusout","onBlur"),Dn(Rp,"onTransitionRun"),Dn(_p,"onTransitionStart"),Dn(Op,"onTransitionCancel"),Dn(Zu,"onTransitionEnd"),Ze("onMouseEnter",["mouseout","mouseover"]),Ze("onMouseLeave",["mouseout","mouseover"]),Ze("onPointerEnter",["pointerout","pointerover"]),Ze("onPointerLeave",["pointerout","pointerover"]),Ke("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ke("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ke("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ke("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ke("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ke("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),gm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(qi));function mh(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],l=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var c=a.length-1;0<=c;c--){var p=a[c],x=p.instance,E=p.currentTarget;if(p=p.listener,x!==i&&l.isPropagationStopped())break e;i=p,l.currentTarget=E;try{i(l)}catch(N){Co(N)}l.currentTarget=null,i=x}else for(c=0;c<a.length;c++){if(p=a[c],x=p.instance,E=p.currentTarget,p=p.listener,x!==i&&l.isPropagationStopped())break e;i=p,l.currentTarget=E;try{i(l)}catch(N){Co(N)}l.currentTarget=null,i=x}}}}function qe(e,t){var n=t[dl];n===void 0&&(n=t[dl]=new Set);var a=e+"__bubble";n.has(a)||(gh(t,e,2,!1),n.add(a))}function Dc(e,t,n){var a=0;t&&(a|=4),gh(n,e,a,t)}var sr="_reactListening"+Math.random().toString(36).slice(2);function kc(e){if(!e[sr]){e[sr]=!0,De.forEach(function(n){n!=="selectionchange"&&(gm.has(n)||Dc(n,!1,e),Dc(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[sr]||(t[sr]=!0,Dc("selectionchange",!1,t))}}function gh(e,t,n,a){switch(Qh(t)){case 2:var l=Vm;break;case 8:l=Qm;break;default:l=Gc}n=l.bind(null,t,n,e),l=void 0,!Zr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(l=!0),a?l!==void 0?e.addEventListener(t,n,{capture:!0,passive:l}):e.addEventListener(t,n,!0):l!==void 0?e.addEventListener(t,n,{passive:l}):e.addEventListener(t,n,!1)}function Ec(e,t,n,a,l){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var c=a.tag;if(c===3||c===4){var p=a.stateNode.containerInfo;if(p===l)break;if(c===4)for(c=a.return;c!==null;){var x=c.tag;if((x===3||x===4)&&c.stateNode.containerInfo===l)return;c=c.return}for(;p!==null;){if(c=Yn(p),c===null)return;if(x=c.tag,x===5||x===6||x===26||x===27){a=i=c;continue e}p=p.parentNode}}a=a.return}xu(function(){var E=i,N=Qr(n),X=[];e:{var A=Ju.get(e);if(A!==void 0){var L=vo,de=e;switch(e){case"keypress":if(yo(n)===0)break e;case"keydown":case"keyup":L=cp;break;case"focusin":de="focus",L=Wr;break;case"focusout":de="blur",L=Wr;break;case"beforeblur":case"afterblur":L=Wr;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=wu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=W0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=fp;break;case Vu:case Qu:case Ku:L=ep;break;case Zu:L=pp;break;case"scroll":case"scrollend":L=F0;break;case"wheel":L=gp;break;case"copy":case"cut":case"paste":L=np;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=Mu;break;case"toggle":case"beforetoggle":L=bp}var ze=(t&4)!==0,ot=!ze&&(e==="scroll"||e==="scrollend"),M=ze?A!==null?A+"Capture":null:A;ze=[];for(var C=E,k;C!==null;){var Y=C;if(k=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||k===null||M===null||(Y=si(C,M),Y!=null&&ze.push(Yi(C,Y,k))),ot)break;C=C.return}0<ze.length&&(A=new L(A,de,null,n,N),X.push({event:A,listeners:ze}))}}if((t&7)===0){e:{if(A=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",A&&n!==Vr&&(de=n.relatedTarget||n.fromElement)&&(Yn(de)||de[nn]))break e;if((L||A)&&(A=N.window===N?N:(A=N.ownerDocument)?A.defaultView||A.parentWindow:window,L?(de=n.relatedTarget||n.toElement,L=E,de=de?Yn(de):null,de!==null&&(ot=m(de),ze=de.tag,de!==ot||ze!==5&&ze!==27&&ze!==6)&&(de=null)):(L=null,de=E),L!==de)){if(ze=wu,Y="onMouseLeave",M="onMouseEnter",C="mouse",(e==="pointerout"||e==="pointerover")&&(ze=Mu,Y="onPointerLeave",M="onPointerEnter",C="pointer"),ot=L==null?A:ee(L),k=de==null?A:ee(de),A=new ze(Y,C+"leave",L,n,N),A.target=ot,A.relatedTarget=k,Y=null,Yn(N)===E&&(ze=new ze(M,C+"enter",de,n,N),ze.target=k,ze.relatedTarget=ot,Y=ze),ot=Y,L&&de)t:{for(ze=ym,M=L,C=de,k=0,Y=M;Y;Y=ze(Y))k++;Y=0;for(var Se=C;Se;Se=ze(Se))Y++;for(;0<k-Y;)M=ze(M),k--;for(;0<Y-k;)C=ze(C),Y--;for(;k--;){if(M===C||C!==null&&M===C.alternate){ze=M;break t}M=ze(M),C=ze(C)}ze=null}else ze=null;L!==null&&yh(X,A,L,ze,!1),de!==null&&ot!==null&&yh(X,ot,de,ze,!0)}}e:{if(A=E?ee(E):window,L=A.nodeName&&A.nodeName.toLowerCase(),L==="select"||L==="input"&&A.type==="file")var Je=Ou;else if(Ru(A))if(Lu)Je=Ep;else{Je=Dp;var ge=Mp}else L=A.nodeName,!L||L.toLowerCase()!=="input"||A.type!=="checkbox"&&A.type!=="radio"?E&&Xr(E.elementType)&&(Je=Ou):Je=kp;if(Je&&(Je=Je(e,E))){_u(X,Je,n,N);break e}ge&&ge(e,A,E),e==="focusout"&&E&&A.type==="number"&&E.memoizedProps.value!=null&&Gr(A,"number",A.value)}switch(ge=E?ee(E):window,e){case"focusin":(Ru(ge)||ge.contentEditable==="true")&&(yl=ge,as=E,gi=null);break;case"focusout":gi=as=yl=null;break;case"mousedown":ls=!0;break;case"contextmenu":case"mouseup":case"dragend":ls=!1,Gu(X,n,N);break;case"selectionchange":if(Ap)break;case"keydown":case"keyup":Gu(X,n,N)}var Be;if(Pr)e:{switch(e){case"compositionstart":var Xe="onCompositionStart";break e;case"compositionend":Xe="onCompositionEnd";break e;case"compositionupdate":Xe="onCompositionUpdate";break e}Xe=void 0}else gl?Tu(e,n)&&(Xe="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Xe="onCompositionStart");Xe&&(Du&&n.locale!=="ko"&&(gl||Xe!=="onCompositionStart"?Xe==="onCompositionEnd"&&gl&&(Be=Su()):(ua=N,Jr="value"in ua?ua.value:ua.textContent,gl=!0)),ge=cr(E,Xe),0<ge.length&&(Xe=new zu(Xe,e,null,n,N),X.push({event:Xe,listeners:ge}),Be?Xe.data=Be:(Be=Au(n),Be!==null&&(Xe.data=Be)))),(Be=xp?Sp(e,n):Cp(e,n))&&(Xe=cr(E,"onBeforeInput"),0<Xe.length&&(ge=new zu("onBeforeInput","beforeinput",null,n,N),X.push({event:ge,listeners:Xe}),ge.data=Be)),hm(X,e,E,n,N)}mh(X,t)})}function Yi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function cr(e,t){for(var n=t+"Capture",a=[];e!==null;){var l=e,i=l.stateNode;if(l=l.tag,l!==5&&l!==26&&l!==27||i===null||(l=si(e,n),l!=null&&a.unshift(Yi(e,l,i)),l=si(e,t),l!=null&&a.push(Yi(e,l,i))),e.tag===3)return a;e=e.return}return[]}function ym(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function yh(e,t,n,a,l){for(var i=t._reactName,c=[];n!==null&&n!==a;){var p=n,x=p.alternate,E=p.stateNode;if(p=p.tag,x!==null&&x===a)break;p!==5&&p!==26&&p!==27||E===null||(x=E,l?(E=si(n,i),E!=null&&c.unshift(Yi(n,E,x))):l||(E=si(n,i),E!=null&&c.push(Yi(n,E,x)))),n=n.return}c.length!==0&&e.push({event:t,listeners:c})}var bm=/\r\n?/g,vm=/\u0000|\uFFFD/g;function bh(e){return(typeof e=="string"?e:""+e).replace(bm,`
9
+ `).replace(vm,"")}function vh(e,t){return t=bh(t),bh(e)===t}function it(e,t,n,a,l,i){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||hl(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&hl(e,""+a);break;case"className":ho(e,"class",a);break;case"tabIndex":ho(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ho(e,n,a);break;case"style":bu(e,a,i);break;case"data":if(t!=="object"){ho(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=mo(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&it(e,t,"name",l.name,l,null),it(e,t,"formEncType",l.formEncType,l,null),it(e,t,"formMethod",l.formMethod,l,null),it(e,t,"formTarget",l.formTarget,l,null)):(it(e,t,"encType",l.encType,l,null),it(e,t,"method",l.method,l,null),it(e,t,"target",l.target,l,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=mo(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=Xn);break;case"onScroll":a!=null&&qe("scroll",e);break;case"onScrollEnd":a!=null&&qe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=mo(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":qe("beforetoggle",e),qe("toggle",e),fo(e,"popover",a);break;case"xlinkActuate":Gn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Gn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Gn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Gn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Gn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Gn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Gn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Gn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Gn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":fo(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Z0.get(n)||n,fo(e,n,a))}}function Tc(e,t,n,a,l,i){switch(n){case"style":bu(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(n=a.__html,n!=null){if(l.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"children":typeof a=="string"?hl(e,a):(typeof a=="number"||typeof a=="bigint")&&hl(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=Xn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Ee.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[vt]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,l),typeof a=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,l);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):fo(e,n,a)}}}function Ht(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",e),qe("load",e);var a=!1,l=!1,i;for(i in n)if(n.hasOwnProperty(i)){var c=n[i];if(c!=null)switch(i){case"src":a=!0;break;case"srcSet":l=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:it(e,t,i,c,n,null)}}l&&it(e,t,"srcSet",n.srcSet,n,null),a&&it(e,t,"src",n.src,n,null);return;case"input":qe("invalid",e);var p=i=c=l=null,x=null,E=null;for(a in n)if(n.hasOwnProperty(a)){var N=n[a];if(N!=null)switch(a){case"name":l=N;break;case"type":c=N;break;case"checked":x=N;break;case"defaultChecked":E=N;break;case"value":i=N;break;case"defaultValue":p=N;break;case"children":case"dangerouslySetInnerHTML":if(N!=null)throw Error(u(137,t));break;default:it(e,t,a,N,n,null)}}pu(e,i,p,x,E,c,l,!1);return;case"select":qe("invalid",e),a=c=i=null;for(l in n)if(n.hasOwnProperty(l)&&(p=n[l],p!=null))switch(l){case"value":i=p;break;case"defaultValue":c=p;break;case"multiple":a=p;default:it(e,t,l,p,n,null)}t=i,n=c,e.multiple=!!a,t!=null?fl(e,!!a,t,!1):n!=null&&fl(e,!!a,n,!0);return;case"textarea":qe("invalid",e),i=l=a=null;for(c in n)if(n.hasOwnProperty(c)&&(p=n[c],p!=null))switch(c){case"value":a=p;break;case"defaultValue":l=p;break;case"children":i=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(u(91));break;default:it(e,t,c,p,n,null)}gu(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":it(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<qi.length;a++)qe(qi[a],e);break;case"image":qe("error",e),qe("load",e);break;case"details":qe("toggle",e);break;case"embed":case"source":case"link":qe("error",e),qe("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(E in n)if(n.hasOwnProperty(E)&&(a=n[E],a!=null))switch(E){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:it(e,t,E,a,n,null)}return;default:if(Xr(t)){for(N in n)n.hasOwnProperty(N)&&(a=n[N],a!==void 0&&Tc(e,t,N,a,n,void 0));return}}for(p in n)n.hasOwnProperty(p)&&(a=n[p],a!=null&&it(e,t,p,a,n,null))}function xm(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var l=null,i=null,c=null,p=null,x=null,E=null,N=null;for(L in n){var X=n[L];if(n.hasOwnProperty(L)&&X!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":x=X;default:a.hasOwnProperty(L)||it(e,t,L,null,a,X)}}for(var A in a){var L=a[A];if(X=n[A],a.hasOwnProperty(A)&&(L!=null||X!=null))switch(A){case"type":i=L;break;case"name":l=L;break;case"checked":E=L;break;case"defaultChecked":N=L;break;case"value":c=L;break;case"defaultValue":p=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(u(137,t));break;default:L!==X&&it(e,t,A,L,a,X)}}Yr(e,c,p,x,E,N,i,l);return;case"select":L=c=p=A=null;for(i in n)if(x=n[i],n.hasOwnProperty(i)&&x!=null)switch(i){case"value":break;case"multiple":L=x;default:a.hasOwnProperty(i)||it(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":A=i;break;case"defaultValue":p=i;break;case"multiple":c=i;default:i!==x&&it(e,t,l,i,a,x)}t=p,n=c,a=L,A!=null?fl(e,!!n,A,!1):!!a!=!!n&&(t!=null?fl(e,!!n,t,!0):fl(e,!!n,n?[]:"",!1));return;case"textarea":L=A=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:it(e,t,p,null,a,l)}for(c in a)if(l=a[c],i=n[c],a.hasOwnProperty(c)&&(l!=null||i!=null))switch(c){case"value":A=l;break;case"defaultValue":L=l;break;case"children":break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(u(91));break;default:l!==i&&it(e,t,c,l,a,i)}mu(e,A,L);return;case"option":for(var de in n)A=n[de],n.hasOwnProperty(de)&&A!=null&&!a.hasOwnProperty(de)&&(de==="selected"?e.selected=!1:it(e,t,de,null,a,A));for(x in a)A=a[x],L=n[x],a.hasOwnProperty(x)&&A!==L&&(A!=null||L!=null)&&(x==="selected"?e.selected=A&&typeof A!="function"&&typeof A!="symbol":it(e,t,x,A,a,L));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var ze in n)A=n[ze],n.hasOwnProperty(ze)&&A!=null&&!a.hasOwnProperty(ze)&&it(e,t,ze,null,a,A);for(E in a)if(A=a[E],L=n[E],a.hasOwnProperty(E)&&A!==L&&(A!=null||L!=null))switch(E){case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(u(137,t));break;default:it(e,t,E,A,a,L)}return;default:if(Xr(t)){for(var ot in n)A=n[ot],n.hasOwnProperty(ot)&&A!==void 0&&!a.hasOwnProperty(ot)&&Tc(e,t,ot,void 0,a,A);for(N in a)A=a[N],L=n[N],!a.hasOwnProperty(N)||A===L||A===void 0&&L===void 0||Tc(e,t,N,A,a,L);return}}for(var M in n)A=n[M],n.hasOwnProperty(M)&&A!=null&&!a.hasOwnProperty(M)&&it(e,t,M,null,a,A);for(X in a)A=a[X],L=n[X],!a.hasOwnProperty(X)||A===L||A==null&&L==null||it(e,t,X,A,a,L)}function xh(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Sm(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var l=n[a],i=l.transferSize,c=l.initiatorType,p=l.duration;if(i&&p&&xh(c)){for(c=0,p=l.responseEnd,a+=1;a<n.length;a++){var x=n[a],E=x.startTime;if(E>p)break;var N=x.transferSize,X=x.initiatorType;N&&xh(X)&&(x=x.responseEnd,c+=N*(x<p?1:(p-E)/(x-E)))}if(--a,t+=8*(i+c)/(l.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Ac=null,Rc=null;function ur(e){return e.nodeType===9?e:e.ownerDocument}function Sh(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 Ch(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function _c(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Oc=null;function Cm(){var e=window.event;return e&&e.type==="popstate"?e===Oc?!1:(Oc=e,!0):(Oc=null,!1)}var wh=typeof setTimeout=="function"?setTimeout:void 0,wm=typeof clearTimeout=="function"?clearTimeout:void 0,zh=typeof Promise=="function"?Promise:void 0,zm=typeof queueMicrotask=="function"?queueMicrotask:typeof zh<"u"?function(e){return zh.resolve(null).then(e).catch(Mm)}:wh;function Mm(e){setTimeout(function(){throw e})}function ka(e){return e==="head"}function Mh(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),Vl(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")Gi(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Gi(n);for(var i=n.firstChild;i;){var c=i.nextSibling,p=i.nodeName;i[Ga]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=c}}else n==="body"&&Gi(e.ownerDocument.body);n=l}while(n);Vl(t)}function Dh(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Lc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Lc(n),oi(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Dm(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[Ga])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=Sn(e.nextSibling),e===null)break}return null}function km(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Sn(e.nextSibling),e===null))return null;return e}function kh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Sn(e.nextSibling),e===null))return null;return e}function Uc(e){return e.data==="$?"||e.data==="$~"}function Hc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Em(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Sn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Bc=null;function Eh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Sn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Th(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 Ah(e,t,n){switch(t=ur(n),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function Gi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);oi(e)}var Cn=new Map,Rh=new Set;function dr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ia=q.d;q.d={f:Tm,r:Am,D:Rm,C:_m,L:Om,m:Lm,X:Hm,S:Um,M:Bm};function Tm(){var e=ia.f(),t=nr();return e||t}function Am(e){var t=ce(e);t!==null&&t.tag===5&&t.type==="form"?Zd(t):ia.r(e)}var Yl=typeof document>"u"?null:document;function _h(e,t,n){var a=Yl;if(a&&typeof t=="string"&&t){var l=pn(t);l='link[rel="'+e+'"][href="'+l+'"]',typeof n=="string"&&(l+='[crossorigin="'+n+'"]'),Rh.has(l)||(Rh.add(l),e={rel:e,crossOrigin:n,href:t},a.querySelector(l)===null&&(t=a.createElement("link"),Ht(t,"link",e),pe(t),a.head.appendChild(t)))}}function Rm(e){ia.D(e),_h("dns-prefetch",e,null)}function _m(e,t){ia.C(e,t),_h("preconnect",e,t)}function Om(e,t,n){ia.L(e,t,n);var a=Yl;if(a&&e&&t){var l='link[rel="preload"][as="'+pn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(l+='[imagesrcset="'+pn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(l+='[imagesizes="'+pn(n.imageSizes)+'"]')):l+='[href="'+pn(e)+'"]';var i=l;switch(t){case"style":i=Gl(e);break;case"script":i=Xl(e)}Cn.has(i)||(e=D({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),Cn.set(i,e),a.querySelector(l)!==null||t==="style"&&a.querySelector(Xi(i))||t==="script"&&a.querySelector(Vi(i))||(t=a.createElement("link"),Ht(t,"link",e),pe(t),a.head.appendChild(t)))}}function Lm(e,t){ia.m(e,t);var n=Yl;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",l='link[rel="modulepreload"][as="'+pn(a)+'"][href="'+pn(e)+'"]',i=l;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Xl(e)}if(!Cn.has(i)&&(e=D({rel:"modulepreload",href:e},t),Cn.set(i,e),n.querySelector(l)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Vi(i)))return}a=n.createElement("link"),Ht(a,"link",e),pe(a),n.head.appendChild(a)}}}function Um(e,t,n){ia.S(e,t,n);var a=Yl;if(a&&e){var l=he(a).hoistableStyles,i=Gl(e);t=t||"default";var c=l.get(i);if(!c){var p={loading:0,preload:null};if(c=a.querySelector(Xi(i)))p.loading=5;else{e=D({rel:"stylesheet",href:e,"data-precedence":t},n),(n=Cn.get(i))&&Nc(e,n);var x=c=a.createElement("link");pe(x),Ht(x,"link",e),x._p=new Promise(function(E,N){x.onload=E,x.onerror=N}),x.addEventListener("load",function(){p.loading|=1}),x.addEventListener("error",function(){p.loading|=2}),p.loading|=4,fr(c,t,a)}c={type:"stylesheet",instance:c,count:1,state:p},l.set(i,c)}}}function Hm(e,t){ia.X(e,t);var n=Yl;if(n&&e){var a=he(n).hoistableScripts,l=Xl(e),i=a.get(l);i||(i=n.querySelector(Vi(l)),i||(e=D({src:e,async:!0},t),(t=Cn.get(l))&&jc(e,t),i=n.createElement("script"),pe(i),Ht(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(l,i))}}function Bm(e,t){ia.M(e,t);var n=Yl;if(n&&e){var a=he(n).hoistableScripts,l=Xl(e),i=a.get(l);i||(i=n.querySelector(Vi(l)),i||(e=D({src:e,async:!0,type:"module"},t),(t=Cn.get(l))&&jc(e,t),i=n.createElement("script"),pe(i),Ht(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(l,i))}}function Oh(e,t,n,a){var l=(l=Oe.current)?dr(l):null;if(!l)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Gl(n.href),n=he(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=Gl(n.href);var i=he(l).hoistableStyles,c=i.get(e);if(c||(l=l.ownerDocument||l,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,c),(i=l.querySelector(Xi(e)))&&!i._p&&(c.instance=i,c.state.loading=5),Cn.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},Cn.set(e,n),i||Nm(l,e,n,c.state))),t&&a===null)throw Error(u(528,""));return c}if(t&&a!==null)throw Error(u(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Xl(n),n=he(l).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Gl(e){return'href="'+pn(e)+'"'}function Xi(e){return'link[rel="stylesheet"]['+e+"]"}function Lh(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Nm(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Ht(t,"link",n),pe(t),e.head.appendChild(t))}function Xl(e){return'[src="'+pn(e)+'"]'}function Vi(e){return"script[async]"+e}function Uh(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+pn(n.href)+'"]');if(a)return t.instance=a,pe(a),a;var l=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),pe(a),Ht(a,"style",l),fr(a,n.precedence,e),t.instance=a;case"stylesheet":l=Gl(n.href);var i=e.querySelector(Xi(l));if(i)return t.state.loading|=4,t.instance=i,pe(i),i;a=Lh(n),(l=Cn.get(l))&&Nc(a,l),i=(e.ownerDocument||e).createElement("link"),pe(i);var c=i;return c._p=new Promise(function(p,x){c.onload=p,c.onerror=x}),Ht(i,"link",a),t.state.loading|=4,fr(i,n.precedence,e),t.instance=i;case"script":return i=Xl(n.src),(l=e.querySelector(Vi(i)))?(t.instance=l,pe(l),l):(a=n,(l=Cn.get(i))&&(a=D({},n),jc(a,l)),e=e.ownerDocument||e,l=e.createElement("script"),pe(l),Ht(l,"link",a),e.head.appendChild(l),t.instance=l);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,fr(a,n.precedence,e));return t.instance}function fr(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),l=a.length?a[a.length-1]:null,i=l,c=0;c<a.length;c++){var p=a[c];if(p.dataset.precedence===t)i=p;else if(i!==l)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Nc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function jc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var hr=null;function Hh(e,t,n){if(hr===null){var a=new Map,l=hr=new Map;l.set(n,a)}else l=hr,a=l.get(n),a||(a=new Map,l.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),l=0;l<n.length;l++){var i=n[l];if(!(i[Ga]||i[ht]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var c=i.getAttribute(t)||"";c=e+c;var p=a.get(c);p?p.push(i):a.set(c,[i])}}return a}function Bh(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function jm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Nh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function qm(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var l=Gl(a.href),i=t.querySelector(Xi(l));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=pr.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,pe(i);return}i=t.ownerDocument||t,a=Lh(a),(l=Cn.get(l))&&Nc(a,l),i=i.createElement("link"),pe(i);var c=i;c._p=new Promise(function(p,x){c.onload=p,c.onerror=x}),Ht(i,"link",a),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=pr.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var qc=0;function Ym(e,t){return e.stylesheets&&e.count===0&&gr(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&gr(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&qc===0&&(qc=62500*Sm());var l=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&gr(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>qc?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(l)}}:null}function pr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)gr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var mr=null;function gr(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mr=new Map,t.forEach(Gm,e),mr=null,pr.call(e))}function Gm(e,t){if(!(t.state.loading&4)){var n=mr.get(e);if(n)var a=n.get(null);else{n=new Map,mr.set(e,n);for(var l=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<l.length;i++){var c=l[i];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(n.set(c.dataset.precedence,c),a=c)}a&&n.set(null,a)}l=t.instance,c=l.getAttribute("data-precedence"),i=n.get(c)||a,i===a&&n.set(null,l),n.set(c,l),this.count++,a=pr.bind(this),l.addEventListener("load",a),l.addEventListener("error",a),i?i.parentNode.insertBefore(l,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(l,e.firstChild)),t.state.loading|=4}}var Qi={$$typeof:P,Provider:null,Consumer:null,_currentValue:ue,_currentValue2:ue,_threadCount:0};function Xm(e,t,n,a,l,i,c,p,x){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ni(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ni(0),this.hiddenUpdates=ni(null),this.identifierPrefix=a,this.onUncaughtError=l,this.onCaughtError=i,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=x,this.incompleteTransitions=new Map}function jh(e,t,n,a,l,i,c,p,x,E,N,X){return e=new Xm(e,t,n,c,x,E,N,X,p),t=1,i===!0&&(t|=24),i=ln(3,null,null,t),e.current=i,i.stateNode=e,t=vs(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:n,cache:t},ws(i),e}function qh(e){return e?(e=xl,e):xl}function Yh(e,t,n,a,l,i){l=qh(l),a.context===null?a.context=l:a.pendingContext=l,a=ga(t),a.payload={element:n},i=i===void 0?null:i,i!==null&&(a.callback=i),n=ya(e,a,t),n!==null&&(Pt(n,e,t),wi(n,e,t))}function Gh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Yc(e,t){Gh(e,t),(e=e.alternate)&&Gh(e,t)}function Xh(e){if(e.tag===13||e.tag===31){var t=Ka(e,67108864);t!==null&&Pt(t,e,67108864),Yc(e,67108864)}}function Vh(e){if(e.tag===13||e.tag===31){var t=un();t=qn(t);var n=Ka(e,t);n!==null&&Pt(n,e,t),Yc(e,t)}}var yr=!0;function Vm(e,t,n,a){var l=R.T;R.T=null;var i=q.p;try{q.p=2,Gc(e,t,n,a)}finally{q.p=i,R.T=l}}function Qm(e,t,n,a){var l=R.T;R.T=null;var i=q.p;try{q.p=8,Gc(e,t,n,a)}finally{q.p=i,R.T=l}}function Gc(e,t,n,a){if(yr){var l=Xc(a);if(l===null)Ec(e,t,a,br,n),Kh(e,a);else if(Zm(l,e,t,n,a))a.stopPropagation();else if(Kh(e,a),t&4&&-1<Km.indexOf(e)){for(;l!==null;){var i=ce(l);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var c=jn(i.pendingLanes);if(c!==0){var p=i;for(p.pendingLanes|=2,p.entangledLanes|=2;c;){var x=1<<31-Qt(c);p.entanglements[1]|=x,c&=~x}Ln(i),($e&6)===0&&(er=jt()+500,ji(0))}}break;case 31:case 13:p=Ka(i,2),p!==null&&Pt(p,i,2),nr(),Yc(i,2)}if(i=Xc(a),i===null&&Ec(e,t,a,br,n),i===l)break;l=i}l!==null&&a.stopPropagation()}else Ec(e,t,a,null,n)}}function Xc(e){return e=Qr(e),Vc(e)}var br=null;function Vc(e){if(br=null,e=Yn(e),e!==null){var t=m(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=S(t),e!==null)return e;e=null}else if(n===31){if(e=T(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return br=e,null}function Qh(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(oa()){case ei:return 2;case Ba:return 8;case ra:case ti:return 32;case wt:return 268435456;default:return 32}default:return 32}}var Qc=!1,Ea=null,Ta=null,Aa=null,Ki=new Map,Zi=new Map,Ra=[],Km="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Kh(e,t){switch(e){case"focusin":case"focusout":Ea=null;break;case"dragenter":case"dragleave":Ta=null;break;case"mouseover":case"mouseout":Aa=null;break;case"pointerover":case"pointerout":Ki.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Zi.delete(t.pointerId)}}function Ji(e,t,n,a,l,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:i,targetContainers:[l]},t!==null&&(t=ce(t),t!==null&&Xh(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,l!==null&&t.indexOf(l)===-1&&t.push(l),e)}function Zm(e,t,n,a,l){switch(t){case"focusin":return Ea=Ji(Ea,e,t,n,a,l),!0;case"dragenter":return Ta=Ji(Ta,e,t,n,a,l),!0;case"mouseover":return Aa=Ji(Aa,e,t,n,a,l),!0;case"pointerover":var i=l.pointerId;return Ki.set(i,Ji(Ki.get(i)||null,e,t,n,a,l)),!0;case"gotpointercapture":return i=l.pointerId,Zi.set(i,Ji(Zi.get(i)||null,e,t,n,a,l)),!0}return!1}function Zh(e){var t=Yn(e.target);if(t!==null){var n=m(t);if(n!==null){if(t=n.tag,t===13){if(t=S(n),t!==null){e.blockedOn=t,Mn(e.priority,function(){Vh(n)});return}}else if(t===31){if(t=T(n),t!==null){e.blockedOn=t,Mn(e.priority,function(){Vh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function vr(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xc(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Vr=a,n.target.dispatchEvent(a),Vr=null}else return t=ce(n),t!==null&&Xh(t),e.blockedOn=n,!1;t.shift()}return!0}function Jh(e,t,n){vr(e)&&n.delete(t)}function Jm(){Qc=!1,Ea!==null&&vr(Ea)&&(Ea=null),Ta!==null&&vr(Ta)&&(Ta=null),Aa!==null&&vr(Aa)&&(Aa=null),Ki.forEach(Jh),Zi.forEach(Jh)}function xr(e,t){e.blockedOn===t&&(e.blockedOn=null,Qc||(Qc=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Jm)))}var Sr=null;function Fh(e){Sr!==e&&(Sr=e,o.unstable_scheduleCallback(o.unstable_NormalPriority,function(){Sr===e&&(Sr=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],l=e[t+2];if(typeof a!="function"){if(Vc(a||n)===null)continue;break}var i=ce(n);i!==null&&(e.splice(t,3),t-=3,Xs(i,{pending:!0,data:l,method:n.method,action:a},a,l))}}))}function Vl(e){function t(x){return xr(x,e)}Ea!==null&&xr(Ea,e),Ta!==null&&xr(Ta,e),Aa!==null&&xr(Aa,e),Ki.forEach(t),Zi.forEach(t);for(var n=0;n<Ra.length;n++){var a=Ra[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ra.length&&(n=Ra[0],n.blockedOn===null);)Zh(n),n.blockedOn===null&&Ra.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var l=n[a],i=n[a+1],c=l[vt]||null;if(typeof i=="function")c||Fh(n);else if(c){var p=null;if(i&&i.hasAttribute("formAction")){if(l=i,c=i[vt]||null)p=c.formAction;else if(Vc(l)!==null)continue}else p=c.action;typeof p=="function"?n[a+1]=p:(n.splice(a,3),a-=3),Fh(n)}}}function $h(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(c){return l=c})},focusReset:"manual",scroll:"manual"})}function t(){l!==null&&(l(),l=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,l=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),l!==null&&(l(),l=null)}}}function Kc(e){this._internalRoot=e}Cr.prototype.render=Kc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var n=t.current,a=un();Yh(n,a,e,t,null,null)},Cr.prototype.unmount=Kc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Yh(e.current,2,null,e,null,null),nr(),t[nn]=null}};function Cr(e){this._internalRoot=e}Cr.prototype.unstable_scheduleHydration=function(e){if(e){var t=uo();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ra.length&&t!==0&&t<Ra[n].priority;n++);Ra.splice(n,0,e),n===0&&Zh(e)}};var Wh=r.version;if(Wh!=="19.2.4")throw Error(u(527,Wh,"19.2.4"));q.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=g(t),e=e!==null?O(e):null,e=e===null?null:e.stateNode,e};var Fm={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:R,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wr.isDisabled&&wr.supportsFiber)try{Nn=wr.inject(Fm),Vt=wr}catch{}}return Wi.createRoot=function(e,t){if(!h(e))throw Error(u(299));var n=!1,a="",l=af,i=lf,c=of;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(l=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=jh(e,1,!1,null,null,n,a,null,l,i,c,$h),e[nn]=t.current,kc(e),new Kc(t)},Wi.hydrateRoot=function(e,t,n){if(!h(e))throw Error(u(299));var a=!1,l="",i=af,c=lf,p=of,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&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(p=n.onRecoverableError),n.formState!==void 0&&(x=n.formState)),t=jh(e,1,!0,t,n??null,a,l,x,i,c,p,$h),t.context=qh(null),n=t.current,a=un(),a=qn(a),l=ga(a),l.callback=null,ya(n,l,a),n=a,t.current.lanes=n,Ya(t,n),Ln(t),e[nn]=t.current,kc(e),new Cr(t)},Wi.version="19.2.4",Wi}var y0;function t1(){if(y0)return Ic.exports;y0=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(r){console.error(r)}}return o(),Ic.exports=e1(),Ic.exports}var n1=t1(),b0=function(r,f){var u=arguments;if(f==null||!io.call(f,"css"))return w.createElement.apply(void 0,u);var h=u.length,m=new Array(h);m[0]=du,m[1]=uu(r,f);for(var S=2;S<h;S++)m[S]=u[S];return w.createElement.apply(null,m)};(function(o){var r;r||(r=o.JSX||(o.JSX={}))})(b0||(b0={}));function y(){for(var o=arguments.length,r=new Array(o),f=0;f<o;f++)r[f]=arguments[f];return O0(r)}function tn(){var o=y.apply(void 0,arguments),r="animation-"+o.name;return{name:r,styles:"@keyframes "+r+"{"+o.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const a1={showProgress:!1,progressTitle:"",progressState:{current:0,total:0,percent:0,status:"processing"},showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1,actionPaths:[],syncImageCount:0,syncHasRemote:!1,syncHasLocal:!1,processMode:"generate",downloadImageCount:0,downloadTotalSelected:0},l1={isOpen:!1,openStudio:()=>{},closeStudio:()=>{},toggleStudio:()=>{},currentPath:"public",setCurrentPath:()=>{},navigateUp:()=>{},selectedItems:new Set,toggleSelection:()=>{},selectRange:()=>{},selectAll:()=>{},clearSelection:()=>{},lastSelectedPath:null,viewMode:"grid",setViewMode:()=>{},focusedItem:null,setFocusedItem:()=>{},meta:null,setMeta:()=>{},isLoading:!1,setIsLoading:()=>{},refreshKey:0,triggerRefresh:()=>{},scanRequested:!1,triggerScan:()=>{},clearScanRequest:()=>{},searchQuery:"",setSearchQuery:()=>{},error:null,showError:()=>{},clearError:()=>{},fileItems:[],setFileItems:()=>{},actionState:a1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestDownload:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},deleteOrphans:async()=>{}},U0=w.createContext(l1);function $l(){return w.useContext(U0)}const oo="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Ubuntu, sans-serif",d={primary:"#635bff",primaryHover:"#5851e5",primaryLight:"#f0f0ff",background:"#f6f9fc",surface:"#ffffff",surfaceHover:"#f6f9fc",border:"#d8dee4",borderLight:"#e3e8ee",borderHover:"#c1c9d2",text:"#1a1f36",textSecondary:"#697386",textMuted:"#8792a2",success:"#0d7d4d",successLight:"#e6f7ef",danger:"#df1b41",dangerHover:"#c41535",dangerLight:"#fff5f7",imagesFolder:"#8b5cf6",hover:"#e8ecf0"},K={xs:"13px",sm:"14px",base:"16px",lg:"19px",xl:"22px"},Il=y("font-family:",oo,";font-size:",K.base,";line-height:1.5;color:",d.text,";-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;*,*::before,*::after{box-sizing:border-box;}button,input,select,textarea{font-family:inherit;font-size:inherit;}",""),i1=tn`
10
+ from { opacity: 0; }
11
+ to { opacity: 1; }
12
+ `,o1=tn`
13
+ from {
14
+ opacity: 0;
15
+ transform: translateY(-8px) scale(0.98);
16
+ }
17
+ to {
18
+ opacity: 1;
19
+ transform: translateY(0) scale(1);
20
+ }
21
+ `,r1=tn`
22
+ from { transform: rotate(0deg); }
23
+ to { transform: rotate(360deg); }
24
+ `,ke={overlay:y("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",i1," 0.15s ease-out;font-family:",oo,";",""),modal:y(Il," background-color:",d.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);max-width:420px;width:90%;animation:",o1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",K.lg,";font-weight:600;color:",d.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"5e7rpo",styles:"padding:12px 24px 24px"},message:y("font-size:",K.base,";color:",d.textSecondary,";margin:0;line-height:1.6;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",d.border,";background-color:",d.background,";",""),btn:y("padding:10px 18px;font-size:",K.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",d.surface,";border:1px solid ",d.border,";color:",d.text,";&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),btnConfirm:y("background-color:",d.primary,";border:1px solid ",d.primary,";color:white;&:hover{background-color:",d.primaryHover,";border-color:",d.primaryHover,";}",""),btnDanger:y("background-color:",d.danger,";border:1px solid ",d.danger,";color:white;&:hover{background-color:",d.dangerHover,";border-color:",d.dangerHover,";}","")};function Pi({title:o,message:r,confirmLabel:f="Confirm",cancelLabel:u="Cancel",variant:h="default",onConfirm:m,onCancel:S}){return s("div",{css:ke.overlay,onClick:S,children:v("div",{css:ke.modal,onClick:T=>T.stopPropagation(),children:[s("div",{css:ke.header,children:s("h3",{css:ke.title,children:o})}),s("div",{css:ke.body,children:s("p",{css:ke.message,children:r})}),v("div",{css:ke.footer,children:[s("button",{css:[ke.btn,ke.btnCancel,"",""],onClick:S,children:u}),s("button",{css:[ke.btn,h==="danger"?ke.btnDanger:ke.btnConfirm,"",""],onClick:m,children:f})]})]})})}const s1={input:y("width:100%;padding:10px 12px;font-size:",K.base,";border:1px solid ",d.border,";border-radius:6px;background:",d.surface,";color:",d.text,";margin-top:12px;transition:all 0.15s ease;&:focus{outline:none;border-color:",d.primary,";box-shadow:0 0 0 2px ",d.primaryLight,";}&::placeholder{color:",d.textMuted,";}","")};function Er({title:o,message:r,inputLabel:f,defaultValue:u="",placeholder:h,confirmLabel:m="Confirm",cancelLabel:S="Cancel",isLoading:T=!1,loadingLabel:z="Processing...",onConfirm:g,onCancel:O}){const[D,j]=et.useState(u),G=H=>{H.preventDefault(),D.trim()&&!T&&g(D.trim())};return s("div",{css:ke.overlay,onClick:T?void 0:O,children:s("div",{css:ke.modal,onClick:H=>H.stopPropagation(),children:v("form",{onSubmit:G,children:[s("div",{css:ke.header,children:s("h3",{css:ke.title,children:o})}),v("div",{css:ke.body,children:[r&&s("p",{css:ke.message,children:r}),f&&s("label",{css:ke.message,children:f}),s("input",{css:s1.input,type:"text",value:D,onChange:H=>j(H.target.value),placeholder:h,autoFocus:!0,disabled:T})]}),v("div",{css:ke.footer,children:[s("button",{type:"button",css:[ke.btn,ke.btnCancel,"",""],onClick:O,disabled:T,children:S}),s("button",{type:"submit",css:[ke.btn,ke.btnConfirm,"",""],disabled:!D.trim()||T,children:T?v(ct,{children:[s("span",{css:y("display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:",r1," 0.75s linear infinite;margin-right:6px;","")}),z]}):m})]})]})})})}function H0({title:o,message:r,buttonLabel:f="OK",onClose:u}){return s("div",{css:ke.overlay,onClick:u,children:v("div",{css:ke.modal,onClick:h=>h.stopPropagation(),children:[s("div",{css:ke.header,children:s("h3",{css:ke.title,children:o})}),s("div",{css:ke.body,children:s("p",{css:ke.message,children:r})}),s("div",{css:ke.footer,children:s("button",{css:[ke.btn,ke.btnConfirm,"",""],onClick:u,children:f})})]})})}const Oa={progressContainer:{name:"yz1nei",styles:"margin-top:16px"},progressBar:y("width:100%;height:8px;background-color:",d.background,";border-radius:4px;overflow:hidden;margin-bottom:12px;",""),progressFill:y("height:100%;background:linear-gradient(90deg, ",d.primary,", ",d.primaryHover,");border-radius:4px;transition:width 0.3s ease;",""),progressText:y("font-size:",K.sm,";color:",d.textSecondary,";margin:0;display:flex;justify-content:space-between;align-items:center;",""),currentFile:y("font-size:",K.xs,";color:",d.textMuted,";margin:8px 0 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),errorList:{name:"1lw22n1",styles:"margin-top:12px;padding:12px;background:#fef2f2;border:1px solid #fecaca;border-radius:6px;max-height:200px;overflow-y:auto"},errorItem:y("font-size:",K.xs,";color:#991b1b;margin:0 0 4px;&:last-child{margin-bottom:0;}","")};function ol({title:o,progress:r,onClose:f,onDeleteOrphans:u,onStop:h}){const m=r.status==="complete",S=r.status==="error",T=r.status==="stopped",z=r.status==="stopping",g=m||S||T,O=!g||z;return s("div",{css:ke.overlay,children:v("div",{css:ke.modal,onClick:D=>D.stopPropagation(),children:[s("div",{css:ke.header,children:s("h3",{css:ke.title,children:o})}),s("div",{css:ke.body,children:S?s("p",{css:ke.message,children:r.message||"An error occurred"}):T?v("p",{css:ke.message,children:["Processing stopped. Processed ",r.processed??r.current," image",(r.processed??r.current)!==1?"s":""," before stopping."]}):m?v(ct,{children:[v("p",{css:ke.message,children:[r.message?r.message:r.isMove?v(ct,{children:["Moved ",r.processed," file",r.processed!==1?"s":"",".",r.errors!==void 0&&r.errors>0?v(ct,{children:[" ",r.errors," error",r.errors!==1?"s":""," occurred."]}):null]}):r.isScan?v(ct,{children:[r.alreadyProcessed!==void 0&&r.alreadyProcessed>0?v(ct,{children:[r.alreadyProcessed," image",r.alreadyProcessed!==1?"s":""," already exist. "]}):null,"Scanned ",r.processed," new image",r.processed!==1?"s":"",".",r.orphanedEntries!==void 0&&r.orphanedEntries>0?v(ct,{children:[" Removed ",r.orphanedEntries," orphaned entr",r.orphanedEntries!==1?"ies":"y","."]}):null,r.pendingUpdates!==void 0&&r.pendingUpdates>0?v(ct,{children:[" ",r.pendingUpdates," file",r.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):v(ct,{children:["Processed ",r.processed," new image",r.processed!==1?"s":"",".",r.alreadyProcessed!==void 0&&r.alreadyProcessed>0?v(ct,{children:[" ",r.alreadyProcessed," already processed."]}):null]}),r.orphansRemoved!==void 0&&r.orphansRemoved>0?v(ct,{children:[" Removed ",r.orphansRemoved," orphaned thumbnail",r.orphansRemoved!==1?"s":"","."]}):null]}),r.errorMessages&&r.errorMessages.length>0&&v("div",{css:Oa.errorList,children:[r.errorMessages.slice(0,10).map((D,j)=>s("p",{css:Oa.errorItem,children:D},j)),r.errorMessages.length>10&&v("p",{css:Oa.errorItem,children:["...and ",r.errorMessages.length-10," more"]})]})]}):v(ct,{children:[s("p",{css:ke.message,children:r.status==="cleanup"?r.message||"Cleaning up...":r.message||"Processing..."}),v("div",{css:Oa.progressContainer,children:[s("div",{css:Oa.progressBar,children:s("div",{css:Oa.progressFill,style:{width:`${r.percent}%`}})}),v("div",{css:Oa.progressText,children:[v("span",{children:[r.current," of ",r.total]}),v("span",{children:[r.percent,"%"]})]}),r.currentFile&&s("p",{css:Oa.currentFile,title:r.currentFile,children:r.currentFile})]})]})}),v("div",{css:ke.footer,children:[O&&h&&s("button",{css:[ke.btn,ke.btnDanger,"",""],onClick:h,disabled:r.status==="stopping",children:r.status==="stopping"?"Stopping...":"Stop"}),g&&r.orphanedFiles&&r.orphanedFiles.length>0&&u&&v("button",{css:[ke.btn,ke.btnDanger,"",""],onClick:u,children:["Delete ",r.orphanedFiles.length," Orphan",r.orphanedFiles.length!==1?"s":""]}),g&&s("button",{css:[ke.btn,ke.btnConfirm,"",""],onClick:f,children:"Done"})]})]})})}function B0(o){const{setShowProgress:r,setProgressTitle:f,setProgressState:u,triggerRefresh:h}=o,m=w.useRef(null),S=w.useRef(!1),T=w.useRef(!1),z=w.useRef(null),g=w.useCallback(()=>{m.current&&m.current.abort()},[]);return{execute:w.useCallback(async D=>{const{endpoint:j,body:G,title:H,onComplete:V,onError:ae}=D;if(S.current){console.warn("Streaming operation already in progress");return}S.current=!0,T.current=!1;const re=`${j.split("/").pop()?.replace("-stream","")||"op"}-${Date.now()}-${Math.random().toString(36).slice(2)}`;z.current=re;const P=new AbortController;m.current=P;const be=async()=>{T.current=!0,u(U=>({...U,status:"stopping"}));try{await fetch("/api/studio/cancel-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationId:re})})}catch{}};P.signal.addEventListener("abort",be),f(H),r(!0),u({current:0,total:0,percent:0,status:"processing",message:`Starting ${H.toLowerCase()}...`});try{const U=await fetch(j,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...G,operationId:re})});if(!U.ok){const B=await U.json().catch(()=>({}));throw new Error(B.error||`Request failed: ${U.status}`)}if(!U.body)throw new Error("No response body");const fe=U.body.getReader(),$=new TextDecoder;let J="";try{for(;;){const{done:B,value:ie}=await fe.read();if(B)break;J+=$.decode(ie,{stream:!0});const ve=J.split(`
25
+
26
+ `);J=ve.pop()||"";for(const ne of ve)if(ne.startsWith("data: "))try{const I=JSON.parse(ne.slice(6));if(I.type==="start")u(we=>({...we,total:I.total||we.total}));else if(I.type==="progress")u({current:I.current||0,total:I.total||0,percent:I.percent||Math.round((I.current||0)/(I.total||1)*100),status:"processing",currentFile:I.currentFile,message:I.message});else if(I.type==="cleanup")u(we=>({...we,status:"cleanup",message:I.message}));else if(I.type==="complete"){const we=I.cancelled===!0,_e=I.processed??I.moved??I.renamed??I.pushed??I.downloaded??I.added??I.imported??I.deleted??I.current??0;u({current:_e,total:_e,percent:100,status:we?"stopped":I.errors&&I.errors>0?"error":"complete",message:I.message,processed:_e,errors:I.errors,orphanedFiles:I.orphanedFiles}),h(),V?.(I)}else I.type==="error"&&(u(we=>({...we,status:"error",message:I.message})),ae?.(I.message||"Unknown error"))}catch{}}}catch(B){if(!T.current)throw B}finally{P.signal.removeEventListener("abort",be)}}catch(U){if(!T.current){const fe=U instanceof Error?U.message:"Operation failed";console.error(`${H} error:`,U),u({current:0,total:0,percent:0,status:"error",message:fe}),ae?.(fe)}}finally{S.current=!1,m.current=null,z.current=null}},[r,f,u,h]),stop:g,get isRunning(){return S.current}}}const c1=tn`
27
+ from { opacity: 0; }
28
+ to { opacity: 1; }
29
+ `,u1=tn`
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
+ `,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:",c1," 0.15s ease-out;font-family:",oo,";",""),modal:y(Il," background-color:",d.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);max-width:480px;width:90%;max-height:80vh;display:flex;flex-direction:column;animation:",u1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",K.lg,";font-weight:600;color:",d.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"zizupt",styles:"padding:12px 24px 24px;flex:1;overflow-y:auto;min-height:200px;max-height:400px"},message:y("font-size:",K.base,";color:",d.textSecondary,";margin:0 0 16px;line-height:1.6;",""),folderList:{name:"1axgfg3",styles:"display:flex;flex-direction:column;gap:0"},folderItem:y("display:flex;align-items:center;gap:8px;padding:8px 12px;border-radius:6px;cursor:pointer;transition:all 0.15s ease;border:1px solid transparent;position:relative;&:hover{background-color:",d.surfaceHover,";}",""),treeIndent:{name:"197dxto",styles:"display:flex;align-items:center;height:100%"},treeLine:y("width:16px;height:100%;position:relative;flex-shrink:0;&::before{content:'';position:absolute;left:8px;top:0;bottom:50%;width:0;border-left:1px dashed ",d.textSecondary,";}&::after{content:'';position:absolute;left:8px;top:50%;width:8px;height:0;border-top:1px dashed ",d.textSecondary,";}",""),folderItemSelected:y("background-color:",d.primaryLight,";border-color:",d.primary,";&:hover{background-color:",d.primaryLight,";}",""),folderItemDisabled:{name:"181lhkw",styles:"opacity:0.5;cursor:not-allowed;&:hover{background-color:transparent;}"},folderIcon:{name:"17bs1oo",styles:"width:20px;height:20px;color:#f9935e;flex-shrink:0"},folderName:y("font-size:",K.base,";color:",d.text,";flex:1;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",d.border,";background-color:",d.background,";",""),btn:y("padding:10px 18px;font-size:",K.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",d.surface,";border:1px solid ",d.border,";color:",d.text,";&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),btnConfirm:y("background-color:",d.primary,";border:1px solid ",d.primary,";color:white;&:hover:not(:disabled){background-color:",d.primaryHover,";border-color:",d.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),loading:y("display:flex;align-items:center;justify-content:center;padding:40px;color:",d.textSecondary,";",""),spinner:y("width:24px;height:24px;border-radius:50%;border:3px solid ",d.border,";border-top-color:",d.primary,";animation:spin 0.8s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}","")};function N0({selectedItems:o,currentPath:r,onMove:f,onCancel:u}){const[h,m]=w.useState([]),[S,T]=w.useState(!0),[z,g]=w.useState(null);w.useEffect(()=>{async function H(){try{const V=await fetch("/api/studio/list-folders");if(V.ok){const ae=await V.json();console.log("Loaded folders:",ae),m(ae.folders||[])}else console.error("Failed to load folders:",V.status,await V.text())}catch(V){console.error("Failed to load folders:",V)}finally{T(!1)}}H()},[]);const O=Array.from(o),D=h.filter(H=>!O.some(V=>H.path===V||H.path.startsWith(V+"/"))),j=H=>H===r,G=()=>{z&&f(z)};return s("div",{css:bt.overlay,onClick:u,children:v("div",{css:bt.modal,onClick:H=>H.stopPropagation(),children:[s("div",{css:bt.header,children:s("h3",{css:bt.title,children:"Move Items"})}),v("div",{css:bt.body,children:[v("p",{css:bt.message,children:["Select a destination folder for ",o.size," item",o.size!==1?"s":"",":"]}),S?s("div",{css:bt.loading,children:s("div",{css:bt.spinner})}):D.length===0?s("div",{css:bt.loading,children:"No available folders to move to."}):s("div",{css:bt.folderList,children:D.map(H=>{const V=j(H.path);return v("div",{css:[bt.folderItem,z===H.path&&bt.folderItemSelected,V&&bt.folderItemDisabled,"",""],style:{paddingLeft:12},onClick:()=>!V&&g(H.path),children:[H.depth>0&&s("div",{css:bt.treeIndent,children:Array.from({length:H.depth}).map((ae,Z)=>s("div",{css:bt.treeLine},Z))}),s("svg",{css:bt.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:s("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),v("span",{css:bt.folderName,children:[H.name,V&&" (current)"]})]},H.path)})})]}),v("div",{css:bt.footer,children:[s("button",{css:[bt.btn,bt.btnCancel,"",""],onClick:u,children:"Cancel"}),s("button",{css:[bt.btn,bt.btnConfirm,"",""],onClick:G,disabled:!z,children:"Move Here"})]})]})})}const d1=`CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
39
+ CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key
40
+ CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_key
41
+ CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
42
+ CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev
43
+ NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev`,me={overlay:{name:"8ivopw",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.6);display:flex;align-items:center;justify-content:center;z-index:1100;padding:20px"},modal:y("background:",d.surface,";border-radius:12px;max-width:560px;width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 20px 40px rgba(0, 0, 0, 0.3);",""),header:y("display:flex;align-items:center;gap:12px;padding:20px 24px;border-bottom:1px solid ",d.border,";",""),icon:y("width:32px;height:32px;color:",d.primary,";flex-shrink:0;",""),title:y("font-size:",K.xl,";font-weight:600;color:",d.text,";margin:0;",""),closeBtn:y("margin-left:auto;background:none;border:none;padding:4px;cursor:pointer;color:",d.textMuted,";border-radius:4px;&:hover{color:",d.text,";background:",d.surfaceHover,";}",""),closeIcon:{name:"1aynuae",styles:"width:20px;height:20px"},content:{name:"vxuddk",styles:"padding:24px"},intro:y("font-size:",K.base,";color:",d.textSecondary,";margin:0 0 20px 0;line-height:1.6;",""),steps:{name:"1fs2p21",styles:"list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:16px"},step:{name:"1wesxqa",styles:"display:flex;gap:12px"},stepNumber:y("width:28px;height:28px;border-radius:50%;background:",d.primaryLight,";color:",d.primary,";font-size:",K.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:",K.base,";font-weight:500;color:",d.text,";margin:0 0 4px 0;",""),stepDesc:y("font-size:",K.sm,";color:",d.textSecondary,";margin:0;line-height:1.5;",""),link:y("color:",d.primary,";text-decoration:none;font-weight:500;&:hover{text-decoration:underline;}",""),envVarsWrapper:{name:"1ksolcl",styles:"position:relative;margin-top:20px"},envVars:y("background:",d.background,";border:1px solid ",d.border,";border-radius:8px;padding:16px;padding-right:48px;font-family:'SF Mono',Monaco,'Cascadia Code',monospace;font-size:13px;line-height:1.8;color:",d.text,";overflow-x:auto;",""),envVar:{name:"4zleql",styles:"display:block"},envKey:y("color:",d.primary,";",""),envValue:y("color:",d.textSecondary,";",""),copyBtn:y("position:absolute;top:8px;right:8px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:",d.surface,";border:1px solid ",d.border,";border-radius:6px;cursor:pointer;color:",d.textMuted,";transition:all 0.15s ease;&:hover{background:",d.surfaceHover,";color:",d.text,";border-color:#d0d5dd;}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},copiedTooltip:{name:"9a5yd1",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;&::before{content:'';position:absolute;right:-4px;top:50%;transform:translateY(-50%);border-left:4px solid #1a1f36;border-top:4px solid transparent;border-bottom:4px solid transparent;}"},footer:y("padding:16px 24px;border-top:1px solid ",d.border,";display:flex;justify-content:flex-end;gap:12px;",""),docsBtn:y("padding:10px 16px;border-radius:6px;font-size:",K.base,";font-weight:500;border:1px solid ",d.border,";background:",d.surface,";color:",d.text,";cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:all 0.15s ease;&:hover{background:",d.surfaceHover,";border-color:#d0d5dd;}",""),doneBtn:y("padding:10px 20px;border-radius:6px;font-size:",K.base,";font-weight:500;border:none;background:",d.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",d.primaryHover,";}",""),externalIcon:{name:"1djxupe",styles:"width:14px;height:14px"}};function j0({isOpen:o,onClose:r}){const[f,u]=w.useState(!1),h=async()=>{try{await navigator.clipboard.writeText(d1),u(!0),setTimeout(()=>u(!1),2e3)}catch(m){console.error("Failed to copy:",m)}};return o?s("div",{css:me.overlay,onClick:r,children:v("div",{css:me.modal,onClick:m=>m.stopPropagation(),children:[v("div",{css:me.header,children:[s("svg",{css:me.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),s("h2",{css:me.title,children:"Set Up CDN Storage"}),s("button",{css:me.closeBtn,onClick:r,children:s("svg",{css:me.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),v("div",{css:me.content,children:[s("p",{css:me.intro,children:"Sync your images to Cloudflare R2 for faster global delivery. R2 offers generous free tier with no egress fees."}),v("ol",{css:me.steps,children:[v("li",{css:me.step,children:[s("span",{css:me.stepNumber,children:"1"}),v("div",{css:me.stepContent,children:[s("h4",{css:me.stepTitle,children:"Create a Cloudflare account"}),v("p",{css:me.stepDesc,children:["Sign up at"," ",s("a",{css:me.link,href:"https://dash.cloudflare.com/sign-up",target:"_blank",rel:"noopener noreferrer",children:"dash.cloudflare.com"})," ","if you don't have one already."]})]})]}),v("li",{css:me.step,children:[s("span",{css:me.stepNumber,children:"2"}),v("div",{css:me.stepContent,children:[s("h4",{css:me.stepTitle,children:"Create an R2 bucket"}),v("p",{css:me.stepDesc,children:["Go to R2 in your Cloudflare dashboard and create a new bucket. Choose a name like ",s("code",{children:"my-images"}),"."]})]})]}),v("li",{css:me.step,children:[s("span",{css:me.stepNumber,children:"3"}),v("div",{css:me.stepContent,children:[s("h4",{css:me.stepTitle,children:"Enable public access"}),v("p",{css:me.stepDesc,children:['In bucket settings, enable "Public Access" and copy the public URL (e.g., ',s("code",{children:"https://pub-xxx.r2.dev"}),")."]})]})]}),v("li",{css:me.step,children:[s("span",{css:me.stepNumber,children:"4"}),v("div",{css:me.stepContent,children:[s("h4",{css:me.stepTitle,children:"Create API token"}),s("p",{css:me.stepDesc,children:'Go to R2 → Manage R2 API Tokens → Create API Token. Select "Object Read & Write" permissions for your bucket.'})]})]}),v("li",{css:me.step,children:[s("span",{css:me.stepNumber,children:"5"}),v("div",{css:me.stepContent,children:[s("h4",{css:me.stepTitle,children:"Add environment variables"}),v("p",{css:me.stepDesc,children:["Add these to your ",s("code",{children:".env.local"})," file:"]})]})]})]}),v("div",{css:me.envVarsWrapper,children:[v("div",{css:me.envVars,children:[v("span",{css:me.envVar,children:[s("span",{css:me.envKey,children:"CLOUDFLARE_R2_ACCOUNT_ID"}),"=",s("span",{css:me.envValue,children:"your_account_id"})]}),v("span",{css:me.envVar,children:[s("span",{css:me.envKey,children:"CLOUDFLARE_R2_ACCESS_KEY_ID"}),"=",s("span",{css:me.envValue,children:"your_access_key"})]}),v("span",{css:me.envVar,children:[s("span",{css:me.envKey,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY"}),"=",s("span",{css:me.envValue,children:"your_secret_key"})]}),v("span",{css:me.envVar,children:[s("span",{css:me.envKey,children:"CLOUDFLARE_R2_BUCKET_NAME"}),"=",s("span",{css:me.envValue,children:"your_bucket_name"})]}),v("span",{css:me.envVar,children:[s("span",{css:me.envKey,children:"CLOUDFLARE_R2_PUBLIC_URL"}),"=",s("span",{css:me.envValue,children:"https://pub-xxx.r2.dev"})]}),v("span",{css:me.envVar,children:[s("span",{css:me.envKey,children:"NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL"}),"=",s("span",{css:me.envValue,children:"https://pub-xxx.r2.dev"})]})]}),v("button",{css:me.copyBtn,onClick:h,title:"Copy to clipboard",children:[f&&s("span",{css:me.copiedTooltip,children:"Copied!"}),s("svg",{css:me.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})]})]})]}),v("div",{css:me.footer,children:[v("a",{css:me.docsBtn,href:"https://developers.cloudflare.com/r2/get-started/",target:"_blank",rel:"noopener noreferrer",children:["R2 Documentation",s("svg",{css:me.externalIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]}),s("button",{css:me.doneBtn,onClick:r,children:"Got it"})]})]})}):null}const f1=tn`
44
+ from { opacity: 0; }
45
+ to { opacity: 1; }
46
+ `,h1=tn`
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
+ `,ut={overlay:y("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",f1," 0.15s ease-out;font-family:",oo,";",""),modal:y(Il," background-color:",d.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);max-width:520px;width:90%;animation:",h1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:y("font-size:",K.lg,";font-weight:600;color:",d.text,";margin:0;letter-spacing:-0.02em;",""),tabs:y("display:flex;gap:0;margin-top:16px;border-bottom:1px solid ",d.border,";",""),tab:y("padding:12px 20px;font-size:",K.base,";font-weight:500;color:",d.textSecondary,";background:none;border:none;cursor:pointer;position:relative;transition:color 0.15s;&:hover{color:",d.text,";}",""),tabActive:y("color:",d.primary,";&::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background-color:",d.primary,";}",""),body:{name:"1po9b7e",styles:"padding:24px;min-height:200px"},dropzone:y("border:2px dashed ",d.border,";border-radius:8px;padding:40px 24px;text-align:center;cursor:pointer;transition:all 0.15s;&:hover{border-color:",d.primary,";background-color:",d.primaryLight,";}",""),dropzoneActive:y("border-color:",d.primary,";background-color:",d.primaryLight,";",""),dropzoneIcon:y("width:48px;height:48px;margin:0 auto 16px;color:",d.textMuted,";",""),dropzoneText:y("font-size:",K.base,";color:",d.text,";margin:0 0 4px;",""),dropzoneHint:y("font-size:",K.sm,";color:",d.textSecondary,";margin:0;",""),textarea:y("width:100%;min-height:150px;padding:12px;font-size:",K.sm,";font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;border:1px solid ",d.border,";border-radius:8px;resize:vertical;&:focus{outline:none;border-color:",d.primary,";box-shadow:0 0 0 3px ",d.primaryLight,";}&::placeholder{color:",d.textMuted,";}",""),textareaLabel:y("font-size:",K.sm,";color:",d.textSecondary,";margin:0 0 8px;",""),footer:y("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",d.border,";background-color:",d.background,";",""),btn:y("padding:10px 18px;font-size:",K.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:y("background-color:",d.surface,";border:1px solid ",d.border,";color:",d.text,";&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),btnConfirm:y("background-color:",d.primary,";border:1px solid ",d.primary,";color:white;&:hover:not(:disabled){background-color:",d.primaryHover,";border-color:",d.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),fileInput:{name:"eivff4",styles:"display:none"},selectedFiles:y("margin-top:16px;padding:12px;background-color:",d.background,";border-radius:6px;font-size:",K.sm,";color:",d.text,";","")};function p1({currentPath:o,onClose:r,onUploadComplete:f,streamingOperation:u,setShowProgress:h,setProgressTitle:m,setProgressState:S}){const[T,z]=w.useState("upload"),[g,O]=w.useState([]),[D,j]=w.useState(""),[G,H]=w.useState(!1),[V,ae]=w.useState(!1),[Z,re]=w.useState(!1),P=w.useRef(null),be=w.useCallback(B=>{B&&O(Array.from(B))},[]),U=w.useCallback(B=>{B.preventDefault(),H(!1),be(B.dataTransfer.files)},[be]),fe=w.useRef(!1),$=w.useCallback(async()=>{if(g.length!==0){if(h&&m&&S){r(),fe.current=!1,m("Uploading Files"),h(!0),S({current:0,total:g.length,percent:0,status:"processing",message:"Uploading..."});let B=0;const ie=[];for(let ve=0;ve<g.length;ve++){if(fe.current){S(we=>({...we,status:"stopped",message:`Stopped. Uploaded ${B} file${B!==1?"s":""}.`})),f();return}const ne=g[ve],I=new FormData;I.append("file",ne),I.append("path",o);try{(await fetch("/api/studio/upload",{method:"POST",body:I})).ok?B++:ie.push(ne.name)}catch{ie.push(ne.name)}S({current:ve+1,total:g.length,percent:Math.round((ve+1)/g.length*100),status:"processing",currentFile:ne.name})}S({current:g.length,total:g.length,percent:100,status:"complete",message:`Uploaded ${B} file${B!==1?"s":""}.${ie.length>0?` ${ie.length} failed.`:""}`}),f();return}ae(!0);try{for(const B of g){const ie=new FormData;ie.append("file",B),ie.append("path",o),await fetch("/api/studio/upload",{method:"POST",body:ie})}f(),r()}catch(B){console.error("Upload failed:",B)}finally{ae(!1)}}},[g,o,f,r,h,m,S]),J=w.useCallback(async()=>{const B=D.split(`
56
+ `).map(ie=>ie.trim()).filter(ie=>ie.length>0);if(B.length!==0){if(u){r(),await u.execute({endpoint:"/api/studio/import",body:{urls:B},title:"Importing URLs",onComplete:()=>{f()}});return}re(!0);try{const ve=(await fetch("/api/studio/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:B})})).body?.getReader();if(!ve)throw new Error("No reader");const ne=new TextDecoder;for(;;){const{done:I,value:we}=await ve.read();if(I)break;const R=ne.decode(we).split(`
57
+
58
+ `).filter(q=>q.startsWith("data: "));for(const q of R)JSON.parse(q.replace("data: ","")).type==="complete"&&(f(),r())}}catch(ie){console.error("Import failed:",ie)}finally{re(!1)}}},[D,f,r,u]);return s("div",{css:ut.overlay,onClick:r,children:v("div",{css:ut.modal,onClick:B=>B.stopPropagation(),children:[v("div",{css:ut.header,children:[s("h3",{css:ut.title,children:"Add New"}),v("div",{css:ut.tabs,children:[s("button",{css:[ut.tab,T==="upload"&&ut.tabActive,"",""],onClick:()=>z("upload"),children:"Upload Files"}),s("button",{css:[ut.tab,T==="import"&&ut.tabActive,"",""],onClick:()=>z("import"),children:"Import URLs"})]})]}),s("div",{css:ut.body,children:T==="upload"?v(ct,{children:[v("div",{css:[ut.dropzone,G&&ut.dropzoneActive,"",""],onClick:()=>P.current?.click(),onDragOver:B=>{B.preventDefault(),H(!0)},onDragLeave:()=>H(!1),onDrop:U,children:[s("svg",{css:ut.dropzoneIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),s("p",{css:ut.dropzoneText,children:"Drop files here or click to browse"}),s("p",{css:ut.dropzoneHint,children:"Supports images and other media files"})]}),s("input",{ref:P,type:"file",multiple:!0,css:ut.fileInput,onChange:B=>be(B.target.files)}),g.length>0&&v("div",{css:ut.selectedFiles,children:[g.length," file",g.length!==1?"s":""," selected"]})]}):v(ct,{children:[s("p",{css:ut.textareaLabel,children:"Paste image URLs (one per line)"}),s("textarea",{css:ut.textarea,value:D,onChange:B=>j(B.target.value),placeholder:`https://cdn.example.com/photos/image1.jpg
59
+ https://cdn.example.com/photos/image2.jpg`})]})}),v("div",{css:ut.footer,children:[s("button",{css:[ut.btn,ut.btnCancel,"",""],onClick:r,children:"Cancel"}),T==="upload"?s("button",{css:[ut.btn,ut.btnConfirm,"",""],onClick:$,disabled:g.length===0||V,children:V?"Uploading...":"Upload"}):s("button",{css:[ut.btn,ut.btnConfirm,"",""],onClick:J,disabled:!D.trim()||Z,children:Z?"Importing...":"Import"})]})]})})}const m1="36px",Ae={btn:y("height:",m1,";padding:0 12px;background:",d.surface,";border:1px solid ",d.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),icon:y("width:16px;height:16px;color:",d.textSecondary,";",""),overlay:{name:"1cy1r91",styles:"position:fixed;top:0;right:0;bottom:0;left:0;z-index:10000;display:flex;align-items:flex-start;justify-content:center;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);overflow-y:auto;scroll-behavior:smooth;padding:48px 24px"},panel:y(Il," position:relative;background-color:",d.surface,";border-radius:12px;box-shadow:0 30px 60px -12px rgba(50, 50, 93, 0.25),0 18px 36px -18px rgba(0, 0, 0, 0.3);width:100%;max-width:512px;padding:24px;margin:auto 0;",""),header:{name:"1o4fids",styles:"display:flex;align-items:center;justify-content:space-between;margin-bottom:24px"},title:y("font-size:",K.xl,";font-weight:600;color:",d.text,";margin:0;letter-spacing:-0.02em;",""),closeBtn:y("padding:6px;background:",d.surface,";border:1px solid ",d.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),sections:{name:"klisov",styles:"display:flex;flex-direction:column;gap:24px"},sectionTitle:y("font-size:",K.base,";font-weight:600;color:",d.text,";margin:0 0 12px 0;",""),description:y("font-size:",K.sm,";color:",d.textSecondary,";margin:0 0 12px 0;",""),codeWrapper:{name:"bjn8wh",styles:"position:relative"},code:y("background-color:",d.background,";border-radius:8px;padding:12px;padding-right:40px;font-family:'SF Mono',Monaco,Consolas,monospace;font-size:",K.xs,";color:",d.textSecondary,";border:1px solid ",d.border,";overflow-x:auto;white-space:nowrap;",""),copyBtn:y("position:absolute;top:8px;right:8px;padding:4px;background:",d.surface,";border:1px solid ",d.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),tooltip:{name:"6eskey",styles:"position:absolute;bottom:100%;left:50%;transform:translateX(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-bottom:6px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;top:100%;left:50%;transform:translateX(-50%);border:4px solid transparent;border-top-color:#1a1f36;}"},copyIcon:y("width:14px;height:14px;color:",d.textSecondary,";",""),codeLine:{name:"1bbvuqp",styles:"margin:0 0 4px 0;&:last-child{margin:0;}"},input:y("width:100%;padding:10px 14px;border:1px solid ",d.border,";border-radius:6px;font-size:",K.base,";color:",d.text,";background:",d.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",d.primary,";box-shadow:0 0 0 3px ",d.primaryLight,";}&::placeholder{color:",d.textMuted,";}",""),grid:{name:"xtlr5l",styles:"display:grid;grid-template-columns:repeat(3, 1fr);gap:12px"},label:y("font-size:",K.xs,";font-weight:500;color:",d.textSecondary,";display:block;margin-bottom:6px;",""),footer:y("margin-top:24px;padding-top:20px;border-top:1px solid ",d.border,";display:flex;justify-content:flex-end;gap:12px;",""),cancelBtn:y("padding:10px 18px;font-size:",K.base,";font-weight:500;color:",d.text,";background:",d.surface,";border:1px solid ",d.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),saveBtn:y("padding:10px 18px;font-size:",K.base,";font-weight:500;color:white;background-color:",d.primary,";border:1px solid ",d.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",d.primaryHover,";border-color:",d.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),cdnList:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},cdnRow:{name:"197tvr9",styles:"display:flex;gap:8px;align-items:center"},cdnInput:y("flex:1;padding:8px 12px;border:1px solid ",d.border,";border-radius:6px;font-size:",K.sm,";color:",d.text,";background:",d.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",d.primary,";box-shadow:0 0 0 3px ",d.primaryLight,";}",""),cdnIndex:y("font-size:",K.xs,";color:",d.textMuted,";width:24px;text-align:center;flex-shrink:0;",""),cdnDeleteBtn:y("padding:6px;background:none;border:none;cursor:pointer;color:",d.textMuted,";transition:color 0.15s;flex-shrink:0;&:hover{color:",d.danger,";}",""),cdnAddBtn:y("padding:8px 12px;font-size:",K.sm,";font-weight:500;color:",d.primary,";background:",d.primaryLight,";border:1px dashed ",d.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;gap:6px;margin-top:8px;&:hover{background:",d.surface,";}",""),warning:y("font-size:",K.xs,";color:",d.danger,";margin-top:8px;padding:8px 12px;background:",d.dangerLight,";border-radius:6px;","")};function g1(){const[o,r]=w.useState(!1);return v(ct,{children:[s("button",{css:Ae.btn,onClick:()=>r(!0),"aria-label":"Settings",children:v("svg",{css:Ae.icon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[s("circle",{cx:"12",cy:"12",r:"3"}),s("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06a1.65 1.65 0 00.33-1.82 1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06a1.65 1.65 0 001.82.33H9a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06a1.65 1.65 0 00-.33 1.82V9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z"})]})}),o&&s(b1,{onClose:()=>r(!1)})]})}const y1=`# Dev site link (opens from Studio header)
60
+ STUDIO_DEV_SITE_URL=http://localhost:3000
61
+
62
+ # Cloudflare R2 Storage
63
+ CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
64
+ CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id
65
+ CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key
66
+ CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
67
+ CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function b1({onClose:o}){const{triggerRefresh:r}=$l(),[f,u]=w.useState(!1),[h,m]=w.useState([]),[S,T]=w.useState(!0),[z,g]=w.useState(!1),[O,D]=w.useState(!1);w.useEffect(()=>{async function Z(){try{const P=await(await fetch("/api/studio/cdns")).json();m(P.cdns||[])}catch(re){console.error("Failed to load CDN URLs:",re)}finally{T(!1)}}Z()},[]);const j=()=>{navigator.clipboard.writeText(y1),u(!0),setTimeout(()=>u(!1),2e3)},G=w.useCallback((Z,re)=>{m(P=>{const be=[...P];return be[Z]=re,be}),D(!0)},[]),H=w.useCallback(()=>{m(Z=>[...Z,""]),D(!0)},[]),V=w.useCallback(Z=>{m(re=>re.filter((P,be)=>be!==Z)),D(!0)},[]),ae=w.useCallback(async()=>{g(!0);try{(await fetch("/api/studio/cdns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cdns:h})})).ok&&(D(!1),r(),o())}catch(Z){console.error("Failed to save CDN URLs:",Z)}finally{g(!1)}},[h,r,o]);return s("div",{css:Ae.overlay,onClick:o,children:v("div",{css:Ae.panel,onClick:Z=>Z.stopPropagation(),children:[v("div",{css:Ae.header,children:[s("h2",{css:Ae.title,children:"Settings"}),s("button",{css:Ae.closeBtn,onClick:o,children:s("svg",{css:Ae.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),v("div",{css:Ae.sections,children:[v("section",{children:[s("h3",{css:Ae.sectionTitle,children:"CDN URLs"}),s("p",{css:Ae.description,children:"Manage CDN base URLs used by your images:"}),S?s("p",{css:Ae.description,children:"Loading..."}):v(ct,{children:[s("div",{css:Ae.cdnList,children:h.map((Z,re)=>v("div",{css:Ae.cdnRow,children:[s("span",{css:Ae.cdnIndex,children:re}),s("input",{css:Ae.cdnInput,type:"text",value:Z,onChange:P=>G(re,P.target.value),placeholder:"https://cdn.example.com"}),s("button",{css:Ae.cdnDeleteBtn,onClick:()=>V(re),title:"Delete CDN URL",children:s("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]},re))}),v("button",{css:Ae.cdnAddBtn,onClick:H,children:[s("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add CDN URL"]}),h.length>0&&s("p",{css:Ae.warning,children:"Warning: Changing CDN URLs may break image references. The index numbers correspond to image `c` values."})]})]}),v("section",{children:[s("h3",{css:Ae.sectionTitle,children:"Environment Variables"}),v("p",{css:Ae.description,children:["Configure in ",s("code",{children:".env.local"})," file (local development only, not needed in production):"]}),v("div",{css:Ae.codeWrapper,children:[v("button",{css:Ae.copyBtn,onClick:j,title:"Copy to clipboard",children:[f&&s("span",{css:Ae.tooltip,children:"Copied!"}),s("svg",{css:Ae.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),v("div",{css:Ae.code,children:[s("p",{css:Ae.codeLine,children:"NEXT_PUBLIC_PRODUCTION_URL=http://localhost:3000"}),s("p",{css:Ae.codeLine,children:" "}),s("p",{css:Ae.codeLine,children:"# Cloudflare R2 Storage"}),s("p",{css:Ae.codeLine,children:"CLOUDFLARE_R2_ACCOUNT_ID=your_account_id"}),s("p",{css:Ae.codeLine,children:"CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id"}),s("p",{css:Ae.codeLine,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key"}),s("p",{css:Ae.codeLine,children:"CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name"}),s("p",{css:Ae.codeLine,children:"CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com"})]})]})]}),v("section",{children:[s("h3",{css:Ae.sectionTitle,children:"Thumbnail Sizes"}),v("div",{css:Ae.grid,children:[v("div",{children:[s("label",{css:Ae.label,children:"Small"}),s("input",{css:Ae.input,type:"number",defaultValue:300})]}),v("div",{children:[s("label",{css:Ae.label,children:"Medium"}),s("input",{css:Ae.input,type:"number",defaultValue:700})]}),v("div",{children:[s("label",{css:Ae.label,children:"Large"}),s("input",{css:Ae.input,type:"number",defaultValue:1400})]})]})]})]}),v("div",{css:Ae.footer,children:[s("button",{css:Ae.cancelBtn,onClick:o,children:"Cancel"}),s("button",{css:Ae.saveBtn,onClick:ae,disabled:z||!O,children:z?"Saving...":"Save Changes"})]})]})})}const nu="36px",v1=tn`
68
+ to { transform: rotate(360deg); }
69
+ `,ye={toolbar:y("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",d.surface,";border-bottom:1px solid ",d.border,";overflow:visible;min-width:0;@media (min-width: 768px){padding:12px 24px;}",""),left:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},right:{name:"17nohj2",styles:"display:flex;flex-wrap:nowrap;flex-shrink:0;align-items:center;gap:8px"},btn:y("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",nu,";padding:0 14px;border-radius:6px;font-size:",K.base,";font-weight:500;background:",d.surface,";border:1px solid ",d.border,";cursor:pointer;transition:all 0.15s ease;color:",d.text,";letter-spacing:-0.01em;&:hover:not(:disabled){background-color:",d.surfaceHover,";border-color:",d.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:y("background:",d.primary,";border-color:",d.primary,";color:white;&:hover:not(:disabled){background:",d.primaryHover,";border-color:",d.primaryHover,";}",""),btnDanger:y("color:",d.danger,";&:hover:not(:disabled){background-color:",d.dangerLight,";border-color:",d.danger,";}",""),btnCloud:{name:"1lzbs29",styles:"color:#f59e0b;&:hover:not(:disabled){background-color:rgba(245, 158, 11, 0.1);border-color:#f59e0b;}"},cloudDropdownWrapper:{name:"bjn8wh",styles:"position:relative"},dropdownArrow:{name:"1j1hlpy",styles:"width:12px;height:12px;margin-left:4px"},cloudDropdown:y("position:absolute;top:100%;left:0;z-index:1000;min-width:160px;margin-top:4px;background:white;border:1px solid ",d.border,";border-radius:6px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;",""),cloudDropdownItem:y("display:flex;align-items:center;gap:8px;width:100%;padding:10px 14px;border:none;background:none;font-size:",K.sm,";color:",d.text,";cursor:pointer;text-align:left;white-space:nowrap;&:hover{background-color:",d.hover,";}svg{width:16px;height:16px;flex-shrink:0;color:#f59e0b;}",""),cloudDropdownItemDefault:y("svg{color:",d.text,";}",""),cloudDropdownItemDanger:y("color:",d.danger,";svg{color:",d.danger,";}",""),cloudDropdownDivider:y("height:1px;background-color:",d.border,";margin:4px 0;",""),icon:{name:"157xhr7",styles:"width:16px;height:16px"},iconSpin:y("animation:",v1," 1s linear infinite;",""),selectionCount:y("font-size:",K.base,";color:",d.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:y("color:",d.primary,";background:none;border:none;cursor:pointer;font-size:",K.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),divider:y("width:1px;height:24px;background:",d.border,";margin:0 4px;",""),viewToggle:y("display:flex;align-items:center;height:",nu,";background-color:",d.surface,";border:1px solid ",d.border,";border-radius:6px;overflow:hidden;",""),searchWrapper:{name:"9iujih",styles:"position:relative;display:flex;align-items:center"},searchInput:y("height:",nu,";padding:0 32px 0 12px;border:1px solid ",d.border,";border-radius:6px;font-size:",K.base,";background:",d.surface,";color:",d.text,";width:180px;transition:all 0.15s ease;&:focus{outline:none;border-color:",d.primary,";box-shadow:0 0 0 2px ",d.primaryLight,";}&::placeholder{color:",d.textMuted,";}",""),searchClearBtn:y("position:absolute;right:5px;top:5px;bottom:5px;background:",d.primary,";border:none;padding:0 6px;cursor:pointer;color:white;display:flex;align-items:center;justify-content:center;border-radius:4px;transition:all 0.15s ease;&:hover{background:",d.primaryHover,";}",""),viewBtn:y("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",d.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",d.text,";background-color:",d.surfaceHover,";}",""),viewBtnActive:y("background-color:",d.primaryLight,";color:",d.primary,";&:hover{background-color:",d.primaryLight,";color:",d.primary,";}","")};function x1(){const{selectedItems:o,viewMode:r,setViewMode:f,clearSelection:u,currentPath:h,triggerRefresh:m,focusedItem:S,scanRequested:T,clearScanRequest:z,fileItems:g,requestProcess:O,setProcessMode:D,actionState:j,cancelAction:G}=$l(),H=w.useRef(null),V=w.useRef(null),[ae,Z]=w.useState(!1),[re,P]=w.useState(!1),[be,U]=w.useState(!1),[fe,$]=w.useState(!1),[J,B]=w.useState(!1),[ie,ve]=w.useState(0),[ne,I]=w.useState(!1),[we,_e]=w.useState(0),[R,q]=w.useState(!1),[ue,Le]=w.useState(!1),[W,b]=w.useState(!1),[_,F]=w.useState(0),[se,xe]=w.useState(!1),[Oe,Ne]=w.useState("Processing Images"),[Ye,Me]=w.useState({current:0,total:0,percent:0,status:"processing"}),[_t,le]=w.useState(null),[Gt,Xt]=w.useState(!1),[Ce,tt]=w.useState(!1),[Qe,Ct]=w.useState(!1),[rt,wn]=w.useState(!1),[Ha,fn]=w.useState(!1),[Pl,rl]=w.useState(!1),[jt,oa]=w.useState(!1),[ei,Ba]=w.useState(!1),ra=w.useRef(null),ti=w.useRef(null),wt=B0({setShowProgress:xe,setProgressTitle:Ne,setProgressState:Me,triggerRefresh:m}),Na=h==="public/images"||h.startsWith("public/images/");w.useCallback(()=>{H.current?.click()},[]);const Lr=w.useCallback(()=>{$(!0),m(),setTimeout(()=>$(!1),600)},[m]),Nn=w.useCallback(async()=>{U(!0),Ne("Scanning Files"),xe(!0),Me({current:0,total:0,percent:0,status:"processing",message:"Scanning for files..."});try{const ee=(await fetch("/api/studio/scan",{method:"POST"})).body?.getReader();if(!ee)throw new Error("No reader");const he=new TextDecoder;let pe="";for(;;){const{done:De,value:Ee}=await ee.read();if(De)break;pe+=he.decode(Ee,{stream:!0});const Ke=pe.split(`
70
+
71
+ `);pe=Ke.pop()||"";for(const Ze of Ke){if(!Ze.startsWith("data: "))continue;const Te=JSON.parse(Ze.slice(6));if(Te.type==="start")Me({current:0,total:Te.total,percent:0,status:"processing",message:`Scanning ${Te.total} files...`});else if(Te.type==="progress")Me({current:Te.current,total:Te.total,percent:Te.percent,status:"processing",currentFile:Te.currentFile});else if(Te.type==="cleanup")Me(Kt=>({...Kt,message:Te.message}));else if(Te.type==="complete"){let Kt=Te.renamed>0?`${Te.renamed} file(s) renamed due to conflicts. `:"";Te.orphanedFiles&&Te.orphanedFiles.length>0&&(Kt+=`Found ${Te.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),Me({current:Te.total||0,total:Te.total||0,percent:100,status:"complete",processed:Te.added,alreadyProcessed:Te.existingCount,errors:Te.errors,orphanedFiles:Te.orphanedFiles,pendingUpdates:Te.pendingUpdates,orphanedEntries:Te.orphanedEntries,message:Kt||void 0,isScan:!0}),m()}else Te.type==="error"&&Me({current:0,total:0,percent:0,status:"error",message:Te.message||"Scan failed"})}}}catch(ce){console.error("Scan error:",ce),Me({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{U(!1)}},[m]);w.useEffect(()=>{const ce=ee=>{ra.current&&!ra.current.contains(ee.target)&&oa(!1),ti.current&&!ti.current.contains(ee.target)&&Ba(!1)};return document.addEventListener("mousedown",ce),()=>document.removeEventListener("mousedown",ce)},[]),w.useEffect(()=>{T&&!be&&(z(),Nn())},[T,be,z,Nn]);const Vt=w.useCallback(async ce=>{const ee=ce.target.files;if(!ee||ee.length===0)return;const he=Array.from(ee);he.length>1?(Me({current:0,total:he.length,percent:0,status:"processing",message:"Uploading files..."}),xe(!0)):P(!0);let pe=0,De=0;try{for(let Ee=0;Ee<he.length;Ee++){const Ke=he[Ee],Ze=new FormData;Ze.append("file",Ke),Ze.append("path",h);try{const Te=await fetch("/api/studio/upload",{method:"POST",body:Ze});if(Te.ok)pe++;else{const Kt=await Te.json();De++,he.length===1&&(Te.status>=500?(console.error("Upload error:",Kt),le({title:"Upload Failed",message:`Failed to upload ${Ke.name}: ${Kt.error||"Unknown error"}`})):le({title:"Cannot Upload Here",message:Kt.error||"Upload not allowed in this location."}))}}catch{De++}he.length>1&&Me({current:Ee+1,total:he.length,percent:Math.round((Ee+1)/he.length*100),status:"processing",currentFile:Ke.name})}he.length>1&&Me({current:he.length,total:he.length,percent:100,status:"complete",processed:pe,errors:De}),m()}catch(Ee){console.error("Upload error:",Ee),he.length>1?Me({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):le({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{P(!1),H.current&&(H.current.value="")}},[h,m]),zn=w.useCallback(async ce=>{if(o.size>0){const he=Array.from(o),pe=he.filter(Ee=>(Ee.split("/").pop()||"").includes(".")&&!Ee.endsWith("/")),De=he.filter(Ee=>!(Ee.split("/").pop()||"").includes(".")||Ee.endsWith("/"));if(De.length>0)try{const Ke=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(De.join(","))}`)).json();if(Ke.images)for(const Ze of Ke.images){const Te=`public/${Ze}`;pe.includes(Te)||pe.push(Te)}}catch(Ee){console.error("Failed to get folder files:",Ee)}if(pe.length===0){le({title:"No Files Found",message:"No files found in the selected items."});return}D(ce),O(pe)}else try{const pe=await(await fetch("/api/studio/count-images")).json();if(!pe.images||pe.images.length===0){le({title:"No Images Found",message:"No images found in the public folder to process."});return}const De=pe.images.map(Ee=>`public/${Ee}`);D(ce),O(De)}catch(he){console.error("Failed to get images:",he),le({title:"Error",message:"Failed to get images."})}},[o,O,D]),Qt=w.useCallback(()=>{wt.stop(),V.current&&(Me(ce=>({...ce,status:"stopping"})),V.current.abort())},[wt]),Ur=w.useCallback(async()=>{const ce=Ye.orphanedFiles;if(!(!ce||ce.length===0))try{const ee=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:ce})}),he=await ee.json();ee.ok?(Me(pe=>({...pe,orphanedFiles:void 0,orphansRemoved:he.deleted,message:`Deleted ${he.deleted} orphaned thumbnail${he.deleted!==1?"s":""}.`})),m()):le({title:"Delete Failed",message:he.error||"Failed to delete orphaned files."})}catch(ee){console.error("Delete orphans error:",ee),le({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[Ye.orphanedFiles,m]),Hr=w.useCallback(async()=>{if(o.size===0)return;const ce=Array.from(o),ee=ce.filter(De=>(De.split("/").pop()||"").includes(".")&&!De.endsWith("/")),he=ce.filter(De=>!(De.split("/").pop()||"").includes(".")||De.endsWith("/"));let pe=ee.length;if(he.length>0)try{const Ee=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(he.join(","))}`)).json();Ee.images&&(pe+=Ee.images.length)}catch(De){console.error("Failed to get folder files:",De)}ve(pe),B(!0)},[o]),Br=w.useCallback(async()=>{B(!1);const ce=Array.from(o);ce.length!==0&&await wt.execute({endpoint:"/api/studio/delete-stream",body:{paths:ce},title:"Deleting Files",onComplete:()=>{u()}})},[o,u,wt]),sl=w.useCallback(async()=>{if(o.size===0)return;const ce=Array.from(o),ee=ce.filter(Ze=>(Ze.split("/").pop()||"").includes(".")&&!Ze.endsWith("/")),he=ce.filter(Ze=>!(Ze.split("/").pop()||"").includes(".")||Ze.endsWith("/")),pe=he.length>0;if(pe)try{const Te=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(he.join(","))}`)).json();if(Te.images)for(const Kt of Te.images){const ri=`public/${Kt}`;ee.includes(ri)||ee.push(ri)}}catch(Ze){console.error("Failed to get folder files:",Ze)}if(ee.length===0){le({title:"No Files Found",message:"No files found in the selected items."});return}let De=!1,Ee=!1,Ke=0;for(const Ze of ee){const Te=g.find(Kt=>Kt.path===Ze);Te?Te.isRemote?De=!0:Te.cdnPushed?Ke++:Ee=!0:pe&&(Ee=!0)}if(!pe&&Ke===ee.length){le({title:"Already Pushed",message:`All ${ee.length} file${ee.length!==1?"s are":" is"} already on the CDN.`});return}_e(ee.length),q(De),Le(Ee),I(!0)},[o,g]),cl=w.useCallback(async()=>{I(!1);const ce=Array.from(o),ee=ce.filter(De=>(De.split("/").pop()||"").includes(".")&&!De.endsWith("/")),he=ce.filter(De=>!(De.split("/").pop()||"").includes(".")||De.endsWith("/"));if(he.length>0)try{const Ee=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(he.join(","))}`)).json();if(Ee.images)for(const Ke of Ee.images){const Ze=`public/${Ke}`;ee.includes(Ze)||ee.push(Ze)}}catch(De){console.error("Failed to get folder files:",De)}const pe=ee.map(De=>"/"+De.replace(/^public\//,""));pe.length!==0&&await wt.execute({endpoint:"/api/studio/sync-stream",body:{imageKeys:pe},title:"Pushing to CDN",onComplete:()=>{u()},onError:De=>{(De.includes("R2 not configured")||De.includes("CLOUDFLARE_R2"))&&(xe(!1),fn(!0))}})},[o,u,wt]),[ja,jn]=w.useState([]),[ul,qa]=w.useState(0),Nr=w.useCallback(async()=>{if(o.size===0)return;const ce=Array.from(o),ee=ce.filter(Ee=>(Ee.split("/").pop()||"").includes(".")&&!Ee.endsWith("/")),he=ce.filter(Ee=>!(Ee.split("/").pop()||"").includes(".")||Ee.endsWith("/")),pe=he.length>0;if(pe)try{const Ke=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(he.join(","))}`)).json();if(Ke.images)for(const Ze of Ke.images){const Te=`public/${Ze}`;ee.includes(Te)||ee.push(Te)}}catch(Ee){console.error("Failed to get folder files:",Ee)}if(ee.length===0){le({title:"No Files Found",message:"No files found in the selected items."});return}let De;if(pe)De=ee;else if(De=ee.filter(Ee=>{const Ke=g.find(Ze=>Ze.path===Ee);return Ke&&Ke.cdnPushed&&!Ke.isRemote}),De.length===0){le({title:"No CDN Files",message:`None of the ${ee.length} selected file${ee.length!==1?"s are":" is"} on the CDN.`});return}jn(De),qa(ee.length),F(De.length),b(!0)},[o,g]),ro=w.useCallback(async()=>{b(!1),j.showDownloadConfirm&&G();const ee=(j.showDownloadConfirm?j.actionPaths:ja).map(he=>"/"+he.replace(/^public\//,""));await wt.execute({endpoint:"/api/studio/download-stream",body:{imageKeys:ee},title:"Downloading from CDN",onComplete:()=>u()})},[ja,u,j.showDownloadConfirm,j.actionPaths,G,wt]),ni=w.useCallback(async()=>{if(o.size===0)return;const ee=Array.from(o).filter(he=>{const pe=g.find(De=>De.path===he);return pe&&(pe.hasUpdate||pe.type==="folder"&&pe.updateCount&&pe.updateCount>0)});if(ee.length===0){le({title:"No Updates",message:"No files with pending updates in selection."});return}await wt.execute({endpoint:"/api/studio/push-updates-stream",body:{paths:ee},title:"Pushing Updates",onComplete:()=>u()})},[o,g,u,wt]),Ya=w.useCallback(async()=>{if(o.size===0)return;const ee=Array.from(o).filter(he=>{const pe=g.find(De=>De.path===he);return pe&&(pe.hasUpdate||pe.type==="folder"&&pe.updateCount&&pe.updateCount>0)});if(ee.length!==0)try{const he=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:ee})});if(he.ok)u(),m();else{const pe=await he.json();le({title:"Cancel Failed",message:pe.error||"Unknown error"})}}catch(he){console.error("Cancel updates error:",he),le({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[o,g,u,m]),jr=w.useCallback(async ce=>{Xt(!1);try{const ee=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:h,name:ce})});if(ee.ok)m();else{const he=await ee.json();le({title:"Create Folder Failed",message:he.error||"Unknown error"})}}catch(ee){console.error("Create folder error:",ee),le({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[h,m]),so=w.useCallback(()=>{o.size!==0&&wn(!0)},[o]),co=w.useCallback(async ce=>{const ee=Array.from(o);await wt.execute({endpoint:"/api/studio/move",body:{paths:ee,destination:ce},title:"Moving Files",onComplete:()=>u()})},[o,u,wt]),{searchQuery:ai,setSearchQuery:qn}=$l(),li=w.useCallback(ce=>{qn(ce.target.value)},[qn]),uo=w.useCallback(ce=>{ce.key==="Escape"&&(ce.stopPropagation(),qn(""),ce.target.blur())},[qn]),Mn=o.size>0;Mn&&Array.from(o).some(ce=>{const ee=g.find(he=>he.path===ce);return ee&&ee.cdnPushed&&!ee.isRemote}),Mn&&Array.from(o).every(ce=>{const ee=g.find(he=>he.path===ce);return ee&&ee.type==="file"&&ee.cdnPushed&&!ee.isRemote});const An=Mn&&Array.from(o).some(ce=>{const ee=g.find(he=>he.path===ce);return ee&&(ee.hasUpdate||ee.type==="folder"&&ee.updateCount&&ee.updateCount>0)}),ht=Array.from(o),vt=ht.length===1&&!ht[0].includes("."),nn=vt?ht[0]:null,dl=nn&&nn.split("/").pop()||"",sa=ht.length===1&&ht[0].includes("."),ca=sa?ht[0]:null,ii=ca&&ca.split("/").pop()||"",Ga=w.useCallback(async ce=>{nn&&(tt(!1),await wt.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:nn,newName:ce},title:"Renaming Folder",onComplete:()=>u()}))},[nn,u,wt]),oi=w.useCallback(async ce=>{ca&&(Ct(!1),await wt.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:ca,newName:ce},title:"Renaming File",onComplete:()=>u()}))},[ca,u,wt]),Yn=v(ct,{children:[(W||j.showDownloadConfirm)&&s(Pi,{title:"Download from CDN",message:(()=>{const ce=j.showDownloadConfirm?j.downloadImageCount:_,ee=j.showDownloadConfirm?j.downloadTotalSelected:ul;return ee>ce?`Download ${ce} of ${ee} selected file${ee!==1?"s":""} from Cloudflare R2? (${ee-ce} not on CDN)`:`Download ${ce} image${ce!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`})(),confirmLabel:"Download",onConfirm:ro,onCancel:()=>{b(!1),j.showDownloadConfirm&&G()}}),se&&s(ol,{title:Oe,progress:Ye,onStop:Qt,onDeleteOrphans:Ur,onClose:()=>{xe(!1),Me({current:0,total:0,percent:0,status:"processing"}),m()}})]});return S?Yn:v(ct,{children:[Yn,J&&s(Pi,{title:"Delete Items",message:`Are you sure you want to delete ${ie} file${ie!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Br,onCancel:()=>B(!1)}),ne&&s(Pi,{title:"Push to CDN",message:`Push ${we} image${we!==1?"s":""} to Cloudflare R2?${R?" Remote images will be downloaded first.":""}${ue?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:cl,onCancel:()=>I(!1)}),Gt&&s(Er,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:jr,onCancel:()=>Xt(!1)}),rt&&s(N0,{selectedItems:o,currentPath:h,onMove:ce=>{wn(!1),co(ce)},onCancel:()=>wn(!1)}),Ce&&nn&&s(Er,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:dl,defaultValue:dl,confirmLabel:"Rename",onConfirm:Ga,onCancel:()=>tt(!1)}),Qe&&ca&&s(Er,{title:"Rename File",message:"Enter a new name for the file:",placeholder:ii,defaultValue:ii,confirmLabel:"Rename",onConfirm:oi,onCancel:()=>Ct(!1)}),_t&&s(H0,{title:_t.title,message:_t.message,onClose:()=>{le(null),m()}}),s(j0,{isOpen:Ha,onClose:()=>fn(!1)}),ae&&s(p1,{currentPath:h,onClose:()=>Z(!1),onUploadComplete:()=>{Z(!1),m()},streamingOperation:wt,setShowProgress:xe,setProgressTitle:Ne,setProgressState:Me}),v("div",{css:ye.toolbar,children:[s("input",{ref:H,type:"file",multiple:!0,accept:"image/*,video/*,audio/*,.pdf",onChange:Vt,style:{display:"none"}}),v("div",{css:ye.left,children:[v("button",{css:[ye.btn,ye.btnPrimary,"",""],onClick:()=>Z(!0),disabled:re||Na,children:[s(S1,{}),"Add New"]}),v("button",{css:ye.btn,onClick:()=>{sa?Ct(!0):vt?tt(!0):Xt(!0)},disabled:Na&&!vt&&!sa,title:Na&&!vt&&!sa?"Cannot create folders in protected images folder":void 0,children:[sa||vt?s(D1,{}):s(M1,{}),sa?"Rename File":vt?"Rename Folder":"New Folder"]}),s("div",{css:ye.divider}),v("div",{css:ye.cloudDropdownWrapper,ref:ti,children:[v("button",{css:ye.btn,onClick:()=>Ba(!ei),disabled:j.showProgress||Na,title:Na?"Cannot process images folder":void 0,children:[s(O1,{}),"Thumbnails",s("svg",{css:ye.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),ei&&v("div",{css:ye.cloudDropdown,children:[v("button",{css:[ye.cloudDropdownItem,ye.cloudDropdownItemDefault,"",""],onClick:()=>{Ba(!1),zn("generate")},children:[s(L1,{}),"Generate Thumbnails"]}),v("button",{css:[ye.cloudDropdownItem,ye.cloudDropdownItemDanger,"",""],onClick:()=>{Ba(!1),zn("remove")},children:[s(U1,{}),"Remove Thumbnails"]})]})]}),v("button",{css:[ye.btn,ye.btnDanger,"",""],onClick:Hr,disabled:!Mn,children:[s(z1,{}),"Delete"]}),v("button",{css:ye.btn,onClick:so,disabled:!Mn,children:[s(k1,{}),"Move"]}),v("div",{css:ye.cloudDropdownWrapper,ref:ra,children:[v("button",{css:[ye.btn,ye.btnCloud,"",""],onClick:()=>oa(!jt),disabled:!Mn,children:[s(v0,{}),"Cloud",s("svg",{css:ye.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),jt&&Mn&&v("div",{css:ye.cloudDropdown,children:[An&&v(ct,{children:[v("button",{css:ye.cloudDropdownItem,onClick:()=>{oa(!1),ni()},children:[s(E1,{}),"Push Update"]}),v("button",{css:[ye.cloudDropdownItem,ye.cloudDropdownItemDanger,"",""],onClick:()=>{oa(!1),Ya()},children:[s(T1,{}),"Cancel Update"]}),s("div",{css:ye.cloudDropdownDivider})]}),v("button",{css:ye.cloudDropdownItem,onClick:()=>{oa(!1),sl()},children:[s(v0,{}),"Push CDN"]}),v("button",{css:ye.cloudDropdownItem,onClick:()=>{oa(!1),Nr()},children:[s(A1,{}),"Download"]})]})]}),v("div",{css:ye.searchWrapper,children:[s("input",{css:ye.searchInput,type:"text",placeholder:"Search images...",value:ai,onChange:li,onKeyDown:uo}),ai&&s("button",{css:ye.searchClearBtn,onClick:()=>qn(""),title:"Clear search",children:s("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),v("div",{css:ye.right,children:[Mn&&v("span",{css:ye.selectionCount,children:[o.size," selected",s("button",{css:ye.clearBtn,onClick:u,children:"Clear"})]}),v("button",{css:ye.btn,onClick:Nn,disabled:be,children:[s(C1,{spinning:be}),"Scan"]}),s("button",{css:ye.btn,onClick:Lr,title:"Refresh view",disabled:fe,children:s(w1,{spinning:fe})}),v("div",{css:ye.viewToggle,children:[s("button",{css:[ye.viewBtn,r==="grid"&&ye.viewBtnActive,"",""],onClick:()=>f("grid"),"aria-label":"Grid view",children:s(R1,{})}),s("button",{css:[ye.viewBtn,r==="list"&&ye.viewBtnActive,"",""],onClick:()=>f("list"),"aria-label":"List view",children:s(_1,{})})]}),s(g1,{})]})]})]})}function S1(){return s("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}function C1({spinning:o}){return s("svg",{css:[ye.icon,o&&ye.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function w1({spinning:o}){return s("svg",{css:[ye.icon,o&&ye.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}function z1(){return s("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}function M1(){return s("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"})})}function D1(){return s("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}function k1(){return s("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})})}function v0(){return s("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})})}function E1(){return s("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}function T1(){return s("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function A1(){return s("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"})})}function R1(){return s("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"})})}function _1(){return s("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function O1(){return s("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}function L1(){return s("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}function U1(){return s("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}class H1{async get(r){const f=await fetch(r,{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!f.ok){const u=await f.json().catch(()=>({}));throw new Error(u.error||`Request failed: ${f.status}`)}return f.json()}async post(r,f){const u=await fetch(r,{method:"POST",headers:f?{"Content-Type":"application/json"}:void 0,body:f?JSON.stringify(f):void 0});if(!u.ok){const h=await u.json().catch(()=>({}));throw new Error(h.error||`Request failed: ${u.status}`)}return u.json()}async list(r="public"){return this.get(`/api/studio/list?path=${encodeURIComponent(r)}`)}async search(r,f="public"){return this.get(`/api/studio/search?q=${encodeURIComponent(r)}&path=${encodeURIComponent(f)}`)}async listFolders(){return this.get("/api/studio/list-folders")}async countImages(){return this.get("/api/studio/count-images")}async folderImages(r){return this.get(`/api/studio/folder-images?folders=${encodeURIComponent(r.join(","))}`)}async upload(r,f="public"){const u=new FormData;u.append("file",r),u.append("path",f);const h=await fetch("/api/studio/upload",{method:"POST",body:u});if(!h.ok){const m=await h.json().catch(()=>({}));throw new Error(m.error||`Upload failed: ${h.status}`)}return h.json()}async delete(r){return this.post("/api/studio/delete",{paths:r})}async createFolder(r,f){return this.post("/api/studio/create-folder",{parentPath:r,name:f})}async rename(r,f){return this.post("/api/studio/rename",{oldPath:r,newName:f})}async move(r,f){return this.post("/api/studio/move",{paths:r,destination:f})}async push(r){return this.post("/api/studio/sync",{imageKeys:r})}async reprocess(r){return this.post("/api/studio/reprocess",{imageKeys:r})}processAllStream(){return new EventSource("/api/studio/process-all")}async checkFeaturedImage(){return this.get("/api/studio/check-featured-image")}async getFeaturedImageOptions(){return this.get("/api/studio/featured-image-options")}}const Ii=new H1;function q0(){const{currentPath:o,setCurrentPath:r,navigateUp:f,selectedItems:u,toggleSelection:h,selectRange:m,lastSelectedPath:S,selectAll:T,clearSelection:z,refreshKey:g,setFocusedItem:O,triggerRefresh:D,triggerScan:j,searchQuery:G,showError:H,setFileItems:V}=$l(),[ae,Z]=w.useState([]),[re,P]=w.useState(!0),[be,U]=w.useState(!1),[fe,$]=w.useState(null),J=w.useRef(!0),B=w.useRef(o);w.useEffect(()=>{async function W(){const b=B.current!==o;(J.current||b)&&P(!0),B.current=o;try{const _=G&&G.length>=2?await Ii.search(G,o):await Ii.list(o),F=_.items||[];Z(F),V(F),U(_.isEmpty===!0)}catch(_){const F=_ instanceof Error?_.message:"Failed to load items";H("Load Error",F),Z([]),V([]),U(!1)}P(!1),J.current=!1}W()},[o,g,G,H,V]),w.useEffect(()=>{async function W(){if(o!=="public"){$(null);return}try{const b=await Ii.checkFeaturedImage();$(b)}catch{$(null)}}W()},[o,g]);const ie=o==="public",ve=G&&G.length>=2,ne=[...ae].sort((W,b)=>W.type==="folder"&&b.type!=="folder"?-1:W.type!=="folder"&&b.type==="folder"?1:W.name.localeCompare(b.name)),I=ne.length>0&&ne.every(W=>u.has(W.path)),we=ne.some(W=>u.has(W.path)),_e=w.useCallback((W,b)=>{b.shiftKey&&S?m(S,W.path,ne):h(W.path)},[S,m,ne,h]),R=w.useCallback(W=>{W.type==="folder"?r(W.path):O(W)},[r,O]),q=w.useCallback(async W=>{try{const b="/"+W.path.replace(/^public\//,"");await Ii.reprocess([b]),D()}catch(b){const _=b instanceof Error?b.message:"Failed to generate thumbnail";H("Processing Error",_)}},[D,H]),ue=w.useCallback(()=>{I?z():T(ne)},[I,z,T,ne]),Le=fe&&!fe.exists?fe:null;return{items:ae,loading:re,sortedItems:ne,metaEmpty:be,missingFeaturedImage:Le,isAtRoot:ie,isSearching:ve,allItemsSelected:I,someItemsSelected:we,currentPath:o,selectedItems:u,navigateUp:f,handleItemClick:_e,handleOpen:R,handleGenerateThumbnail:q,handleSelectAll:ue,triggerScan:j,triggerRefresh:D}}const B1=tn`
72
+ from { opacity: 0; }
73
+ to { opacity: 1; }
74
+ `,N1=tn`
75
+ from { transform: translateY(-20px); opacity: 0; }
76
+ to { transform: translateY(0); opacity: 1; }
77
+ `,j1=tn`
78
+ to { transform: rotate(360deg); }
79
+ `,Bt={overlay:y("position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;background:rgba(0, 0, 0, 0.5);animation:",B1," 0.15s ease;",""),modal:y("background:",d.surface,";border-radius:12px;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);width:100%;max-width:440px;animation:",N1," 0.2s ease;overflow:hidden;",""),header:y("padding:20px 24px;border-bottom:1px solid ",d.border,";",""),title:y("font-size:",K.lg,";font-weight:600;color:",d.text,";margin:0;",""),subtitle:y("font-size:",K.sm,";color:",d.textSecondary,";margin:4px 0 0 0;",""),body:{name:"1a7zdz",styles:"padding:24px;display:flex;flex-direction:column;gap:12px"},loading:{name:"uphaut",styles:"display:flex;align-items:center;justify-content:center;padding:40px"},spinner:y("width:24px;height:24px;border-radius:50%;border:2px solid ",d.border,";border-top-color:",d.primary,";animation:",j1," 0.8s linear infinite;",""),urlButton:y("display:flex;flex-direction:column;align-items:flex-start;gap:4px;padding:16px 20px;background:",d.background,";border:1px solid ",d.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;text-align:left;&:hover:not(:disabled){background:",d.surfaceHover,";border-color:",d.primary,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),urlLabel:y("font-size:",K.xs,";font-weight:600;color:",d.textSecondary,";text-transform:uppercase;letter-spacing:0.05em;",""),urlValue:y("font-size:",K.base,";font-weight:500;color:",d.text,";word-break:break-all;",""),noOptions:y("padding:20px;text-align:center;color:",d.textSecondary,";font-size:",K.sm,";",""),footer:y("padding:16px 24px;border-top:1px solid ",d.border,";display:flex;justify-content:flex-end;",""),cancelBtn:y("padding:10px 20px;font-size:",K.base,";font-weight:500;background:",d.surface,";border:1px solid ",d.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",d.text,";&:hover{background:",d.surfaceHover,";border-color:",d.borderHover,";}","")};function Y0({isOpen:o,onClose:r,onSelect:f}){const[u,h]=w.useState(!0),[m,S]=w.useState(null),[T,z]=w.useState(null);if(w.useEffect(()=>{if(!o)return;async function O(){h(!0);try{const D=await Ii.getFeaturedImageOptions();S(D.devUrl),z(D.productionUrl)}catch(D){console.error("Failed to load featured image options:",D)}h(!1)}O()},[o]),!o)return null;const g=m||T;return s("div",{css:Bt.overlay,onClick:r,children:v("div",{css:Bt.modal,onClick:O=>O.stopPropagation(),children:[v("div",{css:Bt.header,children:[s("h2",{css:Bt.title,children:"Generate Screenshot"}),s("p",{css:Bt.subtitle,children:"Choose which URL to screenshot"})]}),s("div",{css:Bt.body,children:u?s("div",{css:Bt.loading,children:s("div",{css:Bt.spinner})}):g?v(ct,{children:[m&&v("button",{css:Bt.urlButton,onClick:()=>f(m),children:[s("span",{css:Bt.urlLabel,children:"Development"}),s("span",{css:Bt.urlValue,children:m})]}),T&&v("button",{css:Bt.urlButton,onClick:()=>f(T),children:[s("span",{css:Bt.urlLabel,children:"Production"}),s("span",{css:Bt.urlValue,children:T})]})]}):v("div",{css:Bt.noOptions,children:["No URLs configured. Set ",s("code",{children:"NEXT_PUBLIC_PRODUCTION_URL"})," in .env.local and/or .env.production."]})}),s("div",{css:Bt.footer,children:s("button",{css:Bt.cancelBtn,onClick:r,children:"Cancel"})})]})})}const q1=tn`
80
+ to { transform: rotate(360deg); }
81
+ `,te={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:y("width:32px;height:32px;border-radius:50%;border:3px solid ",d.border,";border-top-color:",d.primary,";animation:",q1," 0.8s linear infinite;",""),empty:y("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",d.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:y("font-size:",K.base,";margin:0 0 4px 0;&:last-child{color:",d.textMuted,";font-size:",K.sm,";}",""),scanButton:y("margin-top:16px;padding:10px 24px;font-size:",K.base,";font-weight:500;background:",d.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",d.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),grid:{name:"el23hk",styles:"display:grid;grid-template-columns:1fr;gap:12px;@media (min-width: 480px){grid-template-columns:repeat(2, 1fr);}@media (min-width: 768px){grid-template-columns:repeat(3, 1fr);}@media (min-width: 1024px){grid-template-columns:repeat(4, 1fr);}@media (min-width: 1280px){grid-template-columns:repeat(5, 1fr);}"},item:y("position:relative;border-radius:8px;border:1px solid ",d.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",d.surface,";user-select:none;box-shadow:0 1px 2px rgba(0, 0, 0, 0.04);&:hover{border-color:#d0d5dd;box-shadow:0 2px 4px rgba(0, 0, 0, 0.06);}",""),itemSelected:y("border-color:",d.primary,";box-shadow:0 0 0 1px ",d.primary,";&:hover{border-color:",d.primary,";box-shadow:0 0 0 1px ",d.primary,";}",""),parentItem:y("cursor:pointer;&:hover{border-color:",d.primary,";}",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:y("width:18px;height:18px;accent-color:",d.primary,";cursor:pointer;",""),content:y("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",d.background,";",""),contentCloud:y("",""),contentRemote:y("",""),folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},imagesFolderIcon:y("width:56px;height:56px;color:",d.imagesFolder,";",""),imagesFolderWrapper:{name:"bjn8wh",styles:"position:relative"},lockIcon:y("position:absolute;bottom:4px;right:4px;width:16px;height:16px;color:",d.imagesFolder,";background:white;border-radius:50%;padding:2px;",""),parentIcon:y("width:56px;height:56px;color:",d.textMuted,";",""),fileIcon:y("width:40px;height:40px;color:",d.textMuted,";",""),image:{name:"rm1wug",styles:"max-width:100%;max-height:100%;object-fit:contain;border-radius:4px"},label:y("padding:10px 12px;background-color:",d.surface,";border-top:1px solid ",d.borderLight,";",""),labelRow:{name:"1gkgtms",styles:"display:flex;flex-direction:column;gap:2px"},labelText:{name:"fxp7t8",styles:"flex:1;min-width:0"},copyBtn:y("position:absolute;top:4px;right:4px;z-index:10;height:28px;width:28px;color:",d.textMuted,";background:transparent;border:none;padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",d.text,";}",""),copyIcon:{name:"1eg0rk6",styles:"width:18px;height:18px"},folderStats:{name:"905wvx",styles:"display:flex;align-items:center;gap:8px;margin:2px 0 0 0"},folderStat:y("display:flex;align-items:center;gap:3px;font-size:",K.xs,";",""),folderStatLocal:y("color:",d.textMuted,";",""),folderStatCloud:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatRemote:{name:"1lukubv",styles:"color:#ef4444"},folderStatUpdate:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatIconCloud:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},folderStatIconLocal:y("width:14px;height:14px;color:",d.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:y("color:#f59e0b;font-size:",K.xs,";",""),updateCloudIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateSyncIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},statusRow:{name:"1b1nq65",styles:"display:flex;align-items:center;justify-content:space-between;margin:2px 0 0 0;gap:4px"},statusLeft:{name:"1j5vobt",styles:"display:flex;align-items:center;gap:4px"},thumbChips:{name:"x2l7ss",styles:"display:flex;align-items:center;gap:3px;margin-left:auto"},thumbChip:y("display:inline-flex;align-items:center;justify-content:center;padding:1px 4px;font-size:9px;font-weight:600;border-radius:3px;background:rgba(0, 0, 0, 0.08);color:",d.textMuted,";text-transform:uppercase;letter-spacing:0.02em;",""),storedIconCloud:{name:"1e09qmx",styles:"width:16px;height:16px;color:#f59e0b"},storedIconRemote:{name:"1mrh6ju",styles:"width:16px;height:16px;color:#ef4444"},tooltip:{name:"qoyfdh",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;z-index:100;&::before{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},openBtn:y("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",K.sm,";font-weight:500;color:",d.primary,";background:",d.surface,";border:1px solid ",d.border,";padding:0 8px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:flex;align-items:center;box-shadow:0 1px 2px rgba(0, 0, 0, 0.08);&:hover{background-color:",d.primaryLight,";border-color:",d.primary,";}",""),featuredPlaceholder:y("position:relative;border-radius:8px;border:2px dashed ",d.success,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",d.background,";&:hover{border-color:",d.success,";background-color:",d.successLight,";}",""),featuredContent:{name:"y8o17o",styles:"position:relative;aspect-ratio:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:16px;gap:8px"},featuredIcon:y("width:40px;height:40px;color:",d.success,";",""),featuredText:y("font-size:",K.sm,";color:",d.success,";text-align:center;font-weight:500;",""),featuredLabel:y("padding:10px 12px;background-color:",d.surface,";border-top:1px solid ",d.borderLight,";",""),name:y("font-size:",K.sm,";font-weight:500;color:",d.text,";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;letter-spacing:-0.01em;direction:rtl;text-align:left;",""),size:y("font-size:",K.xs,";color:",d.textMuted,";margin:2px 0 0 0;",""),selectAllRow:y("display:flex;align-items:center;margin-bottom:16px;padding:12px 16px;background:",d.surface,";border-radius:8px;border:1px solid ",d.border,";",""),selectAllLabel:y("display:flex;align-items:center;gap:10px;font-size:",K.base,";font-weight:500;color:",d.textSecondary,";cursor:pointer;&:hover{color:",d.text,";}",""),selectAllCheckbox:y("width:16px;height:16px;accent-color:",d.primary,";","")};function Y1(){const{loading:o,sortedItems:r,metaEmpty:f,missingFeaturedImage:u,isAtRoot:h,isSearching:m,allItemsSelected:S,someItemsSelected:T,selectedItems:z,navigateUp:g,handleItemClick:O,handleOpen:D,handleGenerateThumbnail:j,handleSelectAll:G,triggerScan:H,triggerRefresh:V}=q0(),[ae,Z]=w.useState(!1),[re,P]=w.useState(!1),[be,U]=w.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),fe=()=>{Z(!0)},$=async J=>{Z(!1),P(!0),U({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const B=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:J})});if(!B.ok){const ne=await B.json();U({current:0,total:4,percent:0,status:"error",message:ne.error||"Failed to generate screenshot"});return}const ie=B.body?.getReader(),ve=new TextDecoder;if(ie){let ne="";for(;;){const{done:I,value:we}=await ie.read();if(I)break;ne+=ve.decode(we,{stream:!0});const _e=ne.split(`
82
+ `);ne=_e.pop()||"";for(const R of _e)if(R.startsWith("data: "))try{const q=JSON.parse(R.slice(6));q.type==="start"?U(ue=>({...ue,total:q.total,message:`Screenshotting ${q.url}...`})):q.type==="progress"?U({current:q.current,total:q.total,percent:q.percent,status:"processing",message:q.message}):q.type==="complete"?(U({current:q.processed,total:q.processed,percent:100,status:q.errors>0?"error":"complete",message:q.message}),V()):q.type==="error"&&U(ue=>({...ue,status:"error",message:q.message}))}catch{}}}}catch(B){console.error("Featured image generation error:",B),U({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return o?v(ct,{children:[re&&s(ol,{title:"Generating Screenshot",progress:be,onClose:()=>P(!1)}),s("div",{css:te.loading,children:s("div",{css:te.spinner})})]}):f&&h?v("div",{css:te.empty,children:[s("svg",{css:te.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),s("p",{css:te.emptyText,children:"No files tracked yet"}),s("p",{css:te.emptyText,children:"Click Scan to discover files in your public folder"}),s("button",{css:te.scanButton,onClick:H,children:"Scan for Files"})]}):r.length===0&&h?v("div",{css:te.empty,children:[s("svg",{css:te.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),s("p",{css:te.emptyText,children:"No files in this folder"}),s("p",{css:te.emptyText,children:"Upload images or click Scan in the toolbar"})]}):v(ct,{children:[s(Y0,{isOpen:ae,onClose:()=>Z(!1),onSelect:$}),re&&s(ol,{title:"Generating Screenshot",progress:be,onClose:()=>P(!1)}),v("div",{children:[r.length>0&&s("div",{css:te.selectAllRow,children:v("label",{css:te.selectAllLabel,children:[s("input",{type:"checkbox",css:te.selectAllCheckbox,checked:S,ref:J=>{J&&(J.indeterminate=T&&!S)},onChange:G}),"Select all (",r.length,")"]})}),v("div",{css:te.grid,children:[!h&&!m&&v("div",{css:[te.item,te.parentItem,"",""],onClick:g,children:[s("div",{css:te.content,children:s("svg",{css:te.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}),v("div",{css:te.label,children:[s("p",{css:te.name,children:".."}),s("p",{css:te.size,children:"Parent folder"})]})]}),r.map(J=>s(X1,{item:J,isSelected:z.has(J.path),onClick:B=>O(J,B),onOpen:()=>D(J),onGenerateThumbnail:()=>j(J)},J.path)),h&&u&&!m&&v("div",{css:te.featuredPlaceholder,onClick:fe,title:`Generate ${u.filename}`,children:[v("div",{css:te.featuredContent,children:[s("svg",{css:te.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),s("span",{css:te.featuredText,children:"Generate Screenshot"})]}),v("div",{css:te.featuredLabel,children:[s("p",{css:te.name,children:u.filename}),s("p",{css:te.size,children:"Click to screenshot homepage"})]})]})]})]})]})}function G1(o){return o.includes("/images/sm/")?"SM":o.includes("/images/md/")?"MD":o.includes("/images/lg/")?"LG":o.includes("/images/full/")?"FULL":null}function X1({item:o,isSelected:r,onClick:f,onOpen:u,onGenerateThumbnail:h}){const[m,S]=w.useState(!1),T=o.type==="folder",z=!T&&o.thumbnail!==void 0,g=o.isProtected||T&&o.name==="images"&&o.path==="public/images",O=G1(o.path),D=!T&&(o.hasSm||o.hasMd||o.hasLg||o.hasFull||O),j=H=>{H.stopPropagation();const V="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(V),S(!0),setTimeout(()=>S(!1),1500)},G=H=>{if(g){H.stopPropagation(),u();return}f(H)};return v("div",{css:[te.item,r&&!g&&te.itemSelected,"",""],onClick:G,children:[!g&&s("div",{css:te.checkboxWrapper,onClick:H=>H.stopPropagation(),children:s("input",{type:"checkbox",css:te.checkbox,checked:r,onChange:()=>f({})})}),v("div",{css:[te.content,o.isCloud&&te.contentCloud,o.isRemote&&te.contentRemote,"",""],children:[v("button",{css:te.copyBtn,onClick:j,title:"Copy file path",children:[m&&s("span",{css:te.tooltip,children:"Copied!"}),s("svg",{css:te.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),s("button",{css:te.openBtn,onClick:H=>{H.stopPropagation(),u()},children:"Open"}),T?g?v("div",{css:te.imagesFolderWrapper,children:[s("svg",{css:te.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:s("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),s("svg",{css:te.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:s("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})]}):s("svg",{css:te.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:s("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}):z&&o.thumbnail?s("img",{css:te.image,src:o.thumbnail,alt:o.name,loading:"lazy"}):s("svg",{css:te.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})]}),s("div",{css:te.label,children:s("div",{css:te.labelRow,children:v("div",{css:te.labelText,children:[s("p",{css:te.name,title:o.name,children:o.name}),T?v("div",{css:te.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&v("span",{css:[te.folderStat,te.folderStatLocal,"",""],title:`${o.localCount} local`,children:[s("svg",{css:te.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),o.localCount]}),o.cloudCount!==void 0&&o.cloudCount>0&&v("span",{css:[te.folderStat,te.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[s("svg",{css:te.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),o.cloudCount]}),o.remoteCount!==void 0&&o.remoteCount>0&&v("span",{css:[te.folderStat,te.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[s("svg",{css:te.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),o.remoteCount]}),o.updateCount!==void 0&&o.updateCount>0&&v("span",{css:[te.folderStat,te.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[s("svg",{css:te.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),o.updateCount]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount!==void 0&&v("span",{css:te.size,children:[o.fileCount," files"]})]}):v("div",{css:te.statusRow,children:[s("div",{css:te.statusLeft,children:o.hasUpdate?v(ct,{children:[s("svg",{css:te.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),s("svg",{css:te.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),s("span",{css:te.updateLabel,children:"update"})]}):o.cdnPushed?s("svg",{css:o.isRemote?te.storedIconRemote:te.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.isRemote?s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}):s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}):o.size!==void 0?s("span",{css:te.size,children:V1(o.size)}):null}),D&&s("span",{css:te.thumbChips,children:O?s("span",{css:te.thumbChip,children:O}):v(ct,{children:[o.hasSm&&s("span",{css:te.thumbChip,children:"SM"}),o.hasMd&&s("span",{css:te.thumbChip,children:"MD"}),o.hasLg&&s("span",{css:te.thumbChip,children:"LG"}),o.hasFull&&s("span",{css:te.thumbChip,children:"FULL"})]})})]})]})})})]})}function V1(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}const Q1=tn`
83
+ to { transform: rotate(360deg); }
84
+ `,Q={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:y("width:32px;height:32px;border-radius:50%;border:3px solid ",d.border,";border-top-color:",d.primary,";animation:",Q1," 0.8s linear infinite;",""),empty:y("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",d.textSecondary,";",""),emptyHint:y("font-size:",K.sm,";color:",d.textMuted,";margin-top:4px;",""),scanButton:y("margin-top:16px;padding:10px 24px;font-size:",K.base,";font-weight:500;background:",d.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",d.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),tableWrapper:y("background:",d.surface,";border-radius:8px;border:1px solid ",d.border,";overflow-x:auto;",""),table:{name:"nufjao",styles:"width:100%;min-width:600px;border-collapse:collapse;white-space:nowrap"},th:y("text-align:left;font-size:11px;color:",d.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",d.background,";border-bottom:1px solid ",d.border,";",""),thCheckbox:{name:"5iz1wr",styles:"width:48px"},thSize:{name:"yct5co",styles:"width:96px"},thDimensions:{name:"gu2s0e",styles:"width:128px"},thCdn:{name:"yct5co",styles:"width:96px"},tbody:y("",""),row:y("cursor:pointer;transition:background-color 0.15s ease;user-select:none;&:hover{background-color:",d.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",d.borderLight,";}",""),rowSelected:y("background-color:",d.primaryLight,";&:hover{background-color:",d.primaryLight,";}",""),parentRow:y("cursor:pointer;border-bottom:1px solid ",d.border,";&:hover{background-color:",d.surfaceHover,";}",""),td:{name:"i563hg",styles:"padding:12px 16px"},checkboxCell:{name:"sahq4q",styles:"padding:12px 16px;cursor:pointer;vertical-align:middle"},checkbox:y("width:18px;height:18px;accent-color:",d.primary,";cursor:pointer;display:block;",""),actionsCell:{name:"1w56d5c",styles:"display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;flex-shrink:0"},copyBtn:y("position:relative;flex-shrink:0;height:32px;width:32px;font-size:",K.xs,";color:",d.textSecondary,";background:",d.surface,";border:1px solid ",d.border,";padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;justify-content:center;&:hover{background:",d.surfaceHover,";border-color:",d.borderHover,";color:",d.text,";}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},folderStats:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},folderStat:y("display:flex;align-items:center;gap:3px;font-size:",K.xs,";",""),folderStatLocal:y("color:",d.textMuted,";",""),folderStatCloud:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatRemote:{name:"1lukubv",styles:"color:#ef4444"},folderStatUpdate:{name:"1t8qh25",styles:"color:#f59e0b"},folderStatIconCloud:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},folderStatIconLocal:y("width:14px;height:14px;color:",d.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:y("display:flex;align-items:center;gap:4px;color:#f59e0b;font-size:",K.xs,";",""),updateCloudIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateSyncIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},storedLabel:{name:"s5xdrg",styles:"display:flex;align-items:center"},storedIconCloud:{name:"1e09qmx",styles:"width:16px;height:16px;color:#f59e0b"},storedIconRemote:{name:"1mrh6ju",styles:"width:16px;height:16px;color:#ef4444"},tooltip:{name:"1bu1odp",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},nameCell:{name:"9s3nhy",styles:"display:flex;align-items:center;gap:12px;flex:1"},thumbnailWrapper:{name:"f01c4l",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:4px"},thumbnailCloud:y("",""),thumbnailRemote:y("",""),folderIconWrapper:{name:"xfecxx",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0"},folderIcon:{name:"a45yt2",styles:"width:24px;height:24px;color:#f9935e"},imagesFolderWrapper:{name:"iqqile",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;position:relative;align-items:center"},imagesFolderIcon:y("width:24px;height:24px;color:",d.imagesFolder,";",""),lockIcon:y("width:10px;height:10px;color:",d.imagesFolder,";margin-left:-6px;margin-top:8px;",""),parentIcon:y("width:20px;height:20px;color:",d.textMuted,";flex-shrink:0;",""),fileIcon:y("width:20px;height:20px;color:",d.textMuted,";flex-shrink:0;",""),thumbnail:y("max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;border:1px solid ",d.borderLight,";",""),name:y("font-size:",K.base,";font-weight:500;color:",d.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:y("font-size:",K.sm,";color:",d.textSecondary,";",""),cdnBadge:y("display:inline-flex;align-items:center;gap:4px;font-size:",K.xs,";font-weight:500;color:",d.success,";",""),cdnBadgeRemote:y("display:inline-flex;align-items:center;font-size:",K.xs,";font-weight:500;color:#ef4444;",""),cdnIcon:{name:"1suksrg",styles:"width:12px;height:12px"},cdnEmpty:y("font-size:",K.sm,";color:",d.textMuted,";",""),featuredRow:y("cursor:pointer;transition:background-color 0.15s ease;border:2px dashed ",d.success,";&:hover{background-color:",d.successLight,";}td{border-bottom:none!important;}",""),featuredIcon:y("width:24px;height:24px;color:",d.success,";",""),featuredText:y("color:",d.success,";font-weight:500;",""),openBtn:y("height:32px;font-size:",K.sm,";font-weight:500;color:",d.primary,";background:",d.surface,";border:1px solid ",d.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",d.primaryLight,";border-color:",d.primary,";}","")};function K1(){const{loading:o,sortedItems:r,metaEmpty:f,missingFeaturedImage:u,isAtRoot:h,isSearching:m,allItemsSelected:S,someItemsSelected:T,selectedItems:z,navigateUp:g,handleItemClick:O,handleOpen:D,handleGenerateThumbnail:j,handleSelectAll:G,triggerScan:H,triggerRefresh:V}=q0(),[ae,Z]=w.useState(!1),[re,P]=w.useState(!1),[be,U]=w.useState({current:0,total:3,percent:0,status:"processing",message:"Generating screenshot..."}),fe=()=>{Z(!0)},$=async J=>{Z(!1),P(!0),U({current:0,total:4,percent:0,status:"processing",message:"Starting..."});try{const B=await fetch("/api/studio/generate-featured-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:J})});if(!B.ok){const ne=await B.json();U({current:0,total:4,percent:0,status:"error",message:ne.error||"Failed to generate screenshot"});return}const ie=B.body?.getReader(),ve=new TextDecoder;if(ie){let ne="";for(;;){const{done:I,value:we}=await ie.read();if(I)break;ne+=ve.decode(we,{stream:!0});const _e=ne.split(`
85
+ `);ne=_e.pop()||"";for(const R of _e)if(R.startsWith("data: "))try{const q=JSON.parse(R.slice(6));q.type==="start"?U(ue=>({...ue,total:q.total,message:`Screenshotting ${q.url}...`})):q.type==="progress"?U({current:q.current,total:q.total,percent:q.percent,status:"processing",message:q.message}):q.type==="complete"?(U({current:q.processed,total:q.processed,percent:100,status:q.errors>0?"error":"complete",message:q.message}),V()):q.type==="error"&&U(ue=>({...ue,status:"error",message:q.message}))}catch{}}}}catch(B){console.error("Featured image generation error:",B),U({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating the screenshot"})}};return o?s("div",{css:Q.loading,children:s("div",{css:Q.spinner})}):f&&h?v("div",{css:Q.empty,children:[s("p",{children:"No files tracked yet"}),s("p",{css:Q.emptyHint,children:"Click Scan to discover files in your public folder"}),s("button",{css:Q.scanButton,onClick:H,children:"Scan for Files"})]}):r.length===0&&h?v("div",{css:Q.empty,children:[s("p",{children:"No files in this folder"}),s("p",{css:Q.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):v(ct,{children:[s(Y0,{isOpen:ae,onClose:()=>Z(!1),onSelect:$}),re&&s(ol,{title:"Generating Screenshot",progress:be,onClose:()=>P(!1)}),s("div",{css:Q.tableWrapper,children:v("table",{css:Q.table,children:[s("thead",{children:v("tr",{children:[s("th",{css:[Q.th,Q.thCheckbox,"",""],children:r.length>0&&s("input",{type:"checkbox",css:Q.checkbox,checked:S,ref:J=>{J&&(J.indeterminate=T&&!S)},onChange:G})}),s("th",{css:Q.th,children:"Name"}),s("th",{css:[Q.th,Q.thSize,"",""],children:"Size"}),s("th",{css:[Q.th,Q.thDimensions,"",""],children:"Dimensions"}),s("th",{css:[Q.th,Q.thCdn,"",""],children:"CDN"})]})}),v("tbody",{css:Q.tbody,children:[!h&&!m&&v("tr",{css:Q.parentRow,onClick:g,children:[s("td",{css:Q.td}),s("td",{css:Q.td,children:v("div",{css:Q.nameCell,children:[s("svg",{css:Q.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),s("span",{css:Q.name,children:".."})]})}),s("td",{css:[Q.td,Q.meta,"",""],children:"--"}),s("td",{css:[Q.td,Q.meta,"",""],children:"Parent folder"}),s("td",{css:Q.td,children:"--"})]}),r.map(J=>s(Z1,{item:J,isSelected:z.has(J.path),onClick:B=>O(J,B),onOpen:()=>D(J),onGenerateThumbnail:()=>j(J)},J.path)),h&&u&&!m&&v("tr",{css:Q.featuredRow,onClick:fe,title:`Generate ${u.filename}`,children:[s("td",{css:Q.td}),s("td",{css:Q.td,children:v("div",{css:Q.nameCell,children:[s("div",{css:Q.folderIconWrapper,children:s("svg",{css:Q.featuredIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}),s("span",{css:[Q.name,Q.featuredText,"",""],children:u.filename})]})}),s("td",{css:[Q.td,Q.meta,Q.featuredText,"",""],children:"--"}),s("td",{css:[Q.td,Q.meta,Q.featuredText,"",""],children:"Click to generate"}),s("td",{css:[Q.td,Q.featuredText,"",""],children:"--"})]})]})]})})]})}function Z1({item:o,isSelected:r,onClick:f,onOpen:u,onGenerateThumbnail:h}){const[m,S]=w.useState(!1),T=o.type==="folder",z=!T&&o.thumbnail!==void 0,g=o.isProtected||T&&o.name==="images"&&o.path==="public/images",O=j=>{j.stopPropagation();const G="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(G),S(!0),setTimeout(()=>S(!1),1500)},D=j=>{if(g){j.stopPropagation(),u();return}f(j)};return v("tr",{css:[Q.row,r&&!g&&Q.rowSelected,"",""],onClick:D,children:[s("td",{css:[Q.td,Q.checkboxCell,"",""],onClick:j=>j.stopPropagation(),children:!g&&s("input",{type:"checkbox",css:Q.checkbox,checked:r,onChange:()=>f({})})}),s("td",{css:Q.td,children:v("div",{css:Q.nameCell,children:[T?g?v("div",{css:Q.imagesFolderWrapper,children:[s("svg",{css:Q.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:s("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),s("svg",{css:Q.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:s("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})]}):s("div",{css:Q.folderIconWrapper,children:s("svg",{css:Q.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:s("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}):z&&o.thumbnail?s("div",{css:[Q.thumbnailWrapper,o.isCloud&&Q.thumbnailCloud,o.isRemote&&Q.thumbnailRemote,"",""],children:s("img",{css:Q.thumbnail,src:o.thumbnail,alt:o.name,loading:"lazy"})}):s("div",{css:[Q.thumbnailWrapper,o.isCloud&&Q.thumbnailCloud,o.isRemote&&Q.thumbnailRemote,"",""],children:s("svg",{css:Q.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})}),s("span",{css:Q.name,title:o.name,children:J1(o.name)}),v("div",{css:Q.actionsCell,children:[v("button",{css:Q.copyBtn,onClick:O,title:"Copy file path",children:[m&&s("span",{css:Q.tooltip,children:"Copied!"}),s("svg",{css:Q.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),s("button",{css:Q.openBtn,onClick:j=>{j.stopPropagation(),u()},children:"Open"})]})]})}),s("td",{css:[Q.td,Q.meta,"",""],children:T?v("div",{css:Q.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&v("span",{css:[Q.folderStat,Q.folderStatLocal,"",""],title:`${o.localCount} local`,children:[s("svg",{css:Q.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),o.localCount]}),o.cloudCount!==void 0&&o.cloudCount>0&&v("span",{css:[Q.folderStat,Q.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[s("svg",{css:Q.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),o.cloudCount]}),o.remoteCount!==void 0&&o.remoteCount>0&&v("span",{css:[Q.folderStat,Q.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[s("svg",{css:Q.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),o.remoteCount]}),o.updateCount!==void 0&&o.updateCount>0&&v("span",{css:[Q.folderStat,Q.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[s("svg",{css:Q.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),o.updateCount]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount!==void 0&&v("span",{children:[o.fileCount," files"]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount===void 0&&"--"]}):o.hasUpdate?v("span",{css:Q.updateLabel,children:[s("svg",{css:Q.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),s("svg",{css:Q.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"update"]}):o.cdnPushed?s("span",{css:Q.storedLabel,children:s("svg",{css:o.isRemote?Q.storedIconRemote:Q.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.isRemote?s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}):s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}):o.size!==void 0?x0(o.size):"--"}),s("td",{css:[Q.td,Q.meta,"",""],children:T?o.totalSize!==void 0?x0(o.totalSize):"--":o.dimensions?`${o.dimensions.width}x${o.dimensions.height}`:"--"}),s("td",{css:Q.td,children:o.cdnPushed?o.isRemote?s("span",{css:Q.cdnBadgeRemote,children:"Remote"}):v("span",{css:Q.cdnBadge,children:[s("svg",{css:Q.cdnIcon,fill:"currentColor",viewBox:"0 0 20 20",children:s("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Pushed"]}):s("span",{css:Q.cdnEmpty,children:"--"})})]})}function x0(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}function J1(o,r=32){if(o.length<=r)return o;const f=o.lastIndexOf("."),u=f>0?o.substring(f):"",h=f>0?o.substring(0,f):o,m=r-u.length-3;if(m<6)return o.substring(0,r-3)+"...";const S=Math.ceil(m/2),T=Math.floor(m/2);return h.substring(0,S)+"..."+h.substring(h.length-T)+u}var F1=Object.defineProperty,$1=(o,r,f)=>r in o?F1(o,r,{enumerable:!0,configurable:!0,writable:!0,value:f}):o[r]=f,mt=(o,r,f)=>$1(o,typeof r!="symbol"?r+"":r,f);const Ar={x:0,y:0,width:0,height:0,unit:"px"},Ql=(o,r,f)=>Math.min(Math.max(o,r),f),W1=(...o)=>o.filter(r=>r&&typeof r=="string").join(" "),S0=(o,r)=>o===r||o.width===r.width&&o.height===r.height&&o.x===r.x&&o.y===r.y&&o.unit===r.unit;function Kl(o,r,f){return o.unit==="%"?{...Ar,...o,unit:"%"}:{unit:"%",x:o.x?o.x/r*100:0,y:o.y?o.y/f*100:0,width:o.width?o.width/r*100:0,height:o.height?o.height/f*100:0}}function La(o,r,f){return o.unit?o.unit==="px"?{...Ar,...o,unit:"px"}:{unit:"px",x:o.x?o.x*r/100:0,y:o.y?o.y*f/100:0,width:o.width?o.width*r/100:0,height:o.height?o.height*f/100:0}:{...Ar,...o,unit:"px"}}function C0(o,r,f,u,h,m=0,S=0,T=u,z=h){const g={...o};let O=Math.min(m,u),D=Math.min(S,h),j=Math.min(T,u),G=Math.min(z,h);r&&(r>1?(O=S?S*r:O,D=O/r,j=T*r):(D=m?m/r:D,O=D*r,G=z/r)),g.y<0&&(g.height=Math.max(g.height+g.y,D),g.y=0),g.x<0&&(g.width=Math.max(g.width+g.x,O),g.x=0);const H=u-(g.x+g.width);H<0&&(g.x=Math.min(g.x,u-O),g.width+=H);const V=h-(g.y+g.height);if(V<0&&(g.y=Math.min(g.y,h-D),g.height+=V),g.width<O&&((f==="sw"||f=="nw")&&(g.x-=O-g.width),g.width=O),g.height<D&&((f==="nw"||f=="ne")&&(g.y-=D-g.height),g.height=D),g.width>j&&((f==="sw"||f=="nw")&&(g.x-=j-g.width),g.width=j),g.height>G&&((f==="nw"||f=="ne")&&(g.y-=G-g.height),g.height=G),r){const ae=g.width/g.height;if(ae<r){const Z=Math.max(g.width/r,D);(f==="nw"||f=="ne")&&(g.y-=Z-g.height),g.height=Z}else if(ae>r){const Z=Math.max(g.height*r,O);(f==="sw"||f=="nw")&&(g.x-=Z-g.width),g.width=Z}}return g}function I1(o,r,f,u){const h={...o};return r==="ArrowLeft"?u==="nw"?(h.x-=f,h.y-=f,h.width+=f,h.height+=f):u==="w"?(h.x-=f,h.width+=f):u==="sw"?(h.x-=f,h.width+=f,h.height+=f):u==="ne"?(h.y+=f,h.width-=f,h.height-=f):u==="e"?h.width-=f:u==="se"&&(h.width-=f,h.height-=f):r==="ArrowRight"&&(u==="nw"?(h.x+=f,h.y+=f,h.width-=f,h.height-=f):u==="w"?(h.x+=f,h.width-=f):u==="sw"?(h.x+=f,h.width-=f,h.height-=f):u==="ne"?(h.y-=f,h.width+=f,h.height+=f):u==="e"?h.width+=f:u==="se"&&(h.width+=f,h.height+=f)),r==="ArrowUp"?u==="nw"?(h.x-=f,h.y-=f,h.width+=f,h.height+=f):u==="n"?(h.y-=f,h.height+=f):u==="ne"?(h.y-=f,h.width+=f,h.height+=f):u==="sw"?(h.x+=f,h.width-=f,h.height-=f):u==="s"?h.height-=f:u==="se"&&(h.width-=f,h.height-=f):r==="ArrowDown"&&(u==="nw"?(h.x+=f,h.y+=f,h.width-=f,h.height-=f):u==="n"?(h.y+=f,h.height-=f):u==="ne"?(h.y+=f,h.width-=f,h.height-=f):u==="sw"?(h.x-=f,h.width+=f,h.height+=f):u==="s"?h.height+=f:u==="se"&&(h.width+=f,h.height+=f)),h}const Zl={capture:!0,passive:!1};let P1=0;const Ua=class Tn extends w.PureComponent{constructor(){super(...arguments),mt(this,"docMoveBound",!1),mt(this,"mouseDownOnCrop",!1),mt(this,"dragStarted",!1),mt(this,"evData",{startClientX:0,startClientY:0,startCropX:0,startCropY:0,clientX:0,clientY:0,isResize:!0}),mt(this,"componentRef",w.createRef()),mt(this,"mediaRef",w.createRef()),mt(this,"resizeObserver"),mt(this,"initChangeCalled",!1),mt(this,"instanceId",`rc-${P1++}`),mt(this,"state",{cropIsActive:!1,newCropIsBeingDrawn:!1}),mt(this,"onCropPointerDown",r=>{const{crop:f,disabled:u}=this.props,h=this.getBox();if(!f)return;const m=La(f,h.width,h.height);if(u)return;r.cancelable&&r.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const S=r.target.dataset.ord,T=!!S;let z=r.clientX,g=r.clientY,O=m.x,D=m.y;if(S){const j=r.clientX-h.x,G=r.clientY-h.y;let H=0,V=0;S==="ne"||S=="e"?(H=j-(m.x+m.width),V=G-m.y,O=m.x,D=m.y+m.height):S==="se"||S==="s"?(H=j-(m.x+m.width),V=G-(m.y+m.height),O=m.x,D=m.y):S==="sw"||S=="w"?(H=j-m.x,V=G-(m.y+m.height),O=m.x+m.width,D=m.y):(S==="nw"||S=="n")&&(H=j-m.x,V=G-m.y,O=m.x+m.width,D=m.y+m.height),z=O+h.x+H,g=D+h.y+V}this.evData={startClientX:z,startClientY:g,startCropX:O,startCropY:D,clientX:r.clientX,clientY:r.clientY,isResize:T,ord:S},this.mouseDownOnCrop=!0,this.setState({cropIsActive:!0})}),mt(this,"onComponentPointerDown",r=>{const{crop:f,disabled:u,locked:h,keepSelection:m,onChange:S}=this.props,T=this.getBox();if(u||h||m&&f)return;r.cancelable&&r.preventDefault(),this.bindDocMove(),this.componentRef.current.focus({preventScroll:!0});const z=r.clientX-T.x,g=r.clientY-T.y,O={unit:"px",x:z,y:g,width:0,height:0};this.evData={startClientX:r.clientX,startClientY:r.clientY,startCropX:z,startCropY:g,clientX:r.clientX,clientY:r.clientY,isResize:!0},this.mouseDownOnCrop=!0,S(La(O,T.width,T.height),Kl(O,T.width,T.height)),this.setState({cropIsActive:!0,newCropIsBeingDrawn:!0})}),mt(this,"onDocPointerMove",r=>{const{crop:f,disabled:u,onChange:h,onDragStart:m}=this.props,S=this.getBox();if(u||!f||!this.mouseDownOnCrop)return;r.cancelable&&r.preventDefault(),this.dragStarted||(this.dragStarted=!0,m&&m(r));const{evData:T}=this;T.clientX=r.clientX,T.clientY=r.clientY;let z;T.isResize?z=this.resizeCrop():z=this.dragCrop(),S0(f,z)||h(La(z,S.width,S.height),Kl(z,S.width,S.height))}),mt(this,"onComponentKeyDown",r=>{const{crop:f,disabled:u,onChange:h,onComplete:m}=this.props;if(u)return;const S=r.key;let T=!1;if(!f)return;const z=this.getBox(),g=this.makePixelCrop(z),O=(navigator.platform.match("Mac")?r.metaKey:r.ctrlKey)?Tn.nudgeStepLarge:r.shiftKey?Tn.nudgeStepMedium:Tn.nudgeStep;if(S==="ArrowLeft"?(g.x-=O,T=!0):S==="ArrowRight"?(g.x+=O,T=!0):S==="ArrowUp"?(g.y-=O,T=!0):S==="ArrowDown"&&(g.y+=O,T=!0),T){r.cancelable&&r.preventDefault(),g.x=Ql(g.x,0,z.width-g.width),g.y=Ql(g.y,0,z.height-g.height);const D=La(g,z.width,z.height),j=Kl(g,z.width,z.height);h(D,j),m&&m(D,j)}}),mt(this,"onHandlerKeyDown",(r,f)=>{const{aspect:u=0,crop:h,disabled:m,minWidth:S=0,minHeight:T=0,maxWidth:z,maxHeight:g,onChange:O,onComplete:D}=this.props,j=this.getBox();if(m||!h)return;if(r.key==="ArrowUp"||r.key==="ArrowDown"||r.key==="ArrowLeft"||r.key==="ArrowRight")r.stopPropagation(),r.preventDefault();else return;const G=(navigator.platform.match("Mac")?r.metaKey:r.ctrlKey)?Tn.nudgeStepLarge:r.shiftKey?Tn.nudgeStepMedium:Tn.nudgeStep,H=La(h,j.width,j.height),V=I1(H,r.key,G,f),ae=C0(V,u,f,j.width,j.height,S,T,z,g);if(!S0(h,ae)){const Z=Kl(ae,j.width,j.height);O(ae,Z),D&&D(ae,Z)}}),mt(this,"onDocPointerDone",r=>{const{crop:f,disabled:u,onComplete:h,onDragEnd:m}=this.props,S=this.getBox();this.unbindDocMove(),!(u||!f)&&this.mouseDownOnCrop&&(this.mouseDownOnCrop=!1,this.dragStarted=!1,m&&m(r),h&&h(La(f,S.width,S.height),Kl(f,S.width,S.height)),this.setState({cropIsActive:!1,newCropIsBeingDrawn:!1}))}),mt(this,"onDragFocus",()=>{var r;(r=this.componentRef.current)==null||r.scrollTo(0,0)})}get document(){return document}getBox(){const r=this.mediaRef.current;if(!r)return{x:0,y:0,width:0,height:0};const{x:f,y:u,width:h,height:m}=r.getBoundingClientRect();return{x:f,y:u,width:h,height:m}}componentDidUpdate(r){const{crop:f,onComplete:u}=this.props;if(u&&!r.crop&&f){const{width:h,height:m}=this.getBox();h&&m&&u(La(f,h,m),Kl(f,h,m))}}componentWillUnmount(){this.resizeObserver&&this.resizeObserver.disconnect(),this.unbindDocMove()}bindDocMove(){this.docMoveBound||(this.document.addEventListener("pointermove",this.onDocPointerMove,Zl),this.document.addEventListener("pointerup",this.onDocPointerDone,Zl),this.document.addEventListener("pointercancel",this.onDocPointerDone,Zl),this.docMoveBound=!0)}unbindDocMove(){this.docMoveBound&&(this.document.removeEventListener("pointermove",this.onDocPointerMove,Zl),this.document.removeEventListener("pointerup",this.onDocPointerDone,Zl),this.document.removeEventListener("pointercancel",this.onDocPointerDone,Zl),this.docMoveBound=!1)}getCropStyle(){const{crop:r}=this.props;if(r)return{top:`${r.y}${r.unit}`,left:`${r.x}${r.unit}`,width:`${r.width}${r.unit}`,height:`${r.height}${r.unit}`}}dragCrop(){const{evData:r}=this,f=this.getBox(),u=this.makePixelCrop(f),h=r.clientX-r.startClientX,m=r.clientY-r.startClientY;return u.x=Ql(r.startCropX+h,0,f.width-u.width),u.y=Ql(r.startCropY+m,0,f.height-u.height),u}getPointRegion(r,f,u,h){const{evData:m}=this,S=m.clientX-r.x,T=m.clientY-r.y;let z;h&&f?z=f==="nw"||f==="n"||f==="ne":z=T<m.startCropY;let g;return u&&f?g=f==="nw"||f==="w"||f==="sw":g=S<m.startCropX,g?z?"nw":"sw":z?"ne":"se"}resolveMinDimensions(r,f,u=0,h=0){const m=Math.min(u,r.width),S=Math.min(h,r.height);return!f||!m&&!S?[m,S]:f>1?m?[m,m/f]:[S*f,S]:S?[S*f,S]:[m,m/f]}resizeCrop(){const{evData:r}=this,{aspect:f=0,maxWidth:u,maxHeight:h}=this.props,m=this.getBox(),[S,T]=this.resolveMinDimensions(m,f,this.props.minWidth,this.props.minHeight);let z=this.makePixelCrop(m);const g=this.getPointRegion(m,r.ord,S,T),O=r.ord||g;let D=r.clientX-r.startClientX,j=r.clientY-r.startClientY;(S&&O==="nw"||O==="w"||O==="sw")&&(D=Math.min(D,-S)),(T&&O==="nw"||O==="n"||O==="ne")&&(j=Math.min(j,-T));const G={unit:"px",x:0,y:0,width:0,height:0};g==="ne"?(G.x=r.startCropX,G.width=D,f?(G.height=G.width/f,G.y=r.startCropY-G.height):(G.height=Math.abs(j),G.y=r.startCropY-G.height)):g==="se"?(G.x=r.startCropX,G.y=r.startCropY,G.width=D,f?G.height=G.width/f:G.height=j):g==="sw"?(G.x=r.startCropX+D,G.y=r.startCropY,G.width=Math.abs(D),f?G.height=G.width/f:G.height=j):g==="nw"&&(G.x=r.startCropX+D,G.width=Math.abs(D),f?(G.height=G.width/f,G.y=r.startCropY-G.height):(G.height=Math.abs(j),G.y=r.startCropY+j));const H=C0(G,f,g,m.width,m.height,S,T,u,h);return f||Tn.xyOrds.indexOf(O)>-1?z=H:Tn.xOrds.indexOf(O)>-1?(z.x=H.x,z.width=H.width):Tn.yOrds.indexOf(O)>-1&&(z.y=H.y,z.height=H.height),z.x=Ql(z.x,0,m.width-z.width),z.y=Ql(z.y,0,m.height-z.height),z}renderCropSelection(){const{ariaLabels:r=Tn.defaultProps.ariaLabels,disabled:f,locked:u,renderSelectionAddon:h,ruleOfThirds:m,crop:S}=this.props,T=this.getCropStyle();if(S)return et.createElement("div",{style:T,className:"ReactCrop__crop-selection",onPointerDown:this.onCropPointerDown,"aria-label":r.cropArea,tabIndex:0,onKeyDown:this.onComponentKeyDown,role:"group"},!f&&!u&&et.createElement("div",{className:"ReactCrop__drag-elements",onFocus:this.onDragFocus},et.createElement("div",{className:"ReactCrop__drag-bar ord-n","data-ord":"n"}),et.createElement("div",{className:"ReactCrop__drag-bar ord-e","data-ord":"e"}),et.createElement("div",{className:"ReactCrop__drag-bar ord-s","data-ord":"s"}),et.createElement("div",{className:"ReactCrop__drag-bar ord-w","data-ord":"w"}),et.createElement("div",{className:"ReactCrop__drag-handle ord-nw","data-ord":"nw",tabIndex:0,"aria-label":r.nwDragHandle,onKeyDown:z=>this.onHandlerKeyDown(z,"nw"),role:"button"}),et.createElement("div",{className:"ReactCrop__drag-handle ord-n","data-ord":"n",tabIndex:0,"aria-label":r.nDragHandle,onKeyDown:z=>this.onHandlerKeyDown(z,"n"),role:"button"}),et.createElement("div",{className:"ReactCrop__drag-handle ord-ne","data-ord":"ne",tabIndex:0,"aria-label":r.neDragHandle,onKeyDown:z=>this.onHandlerKeyDown(z,"ne"),role:"button"}),et.createElement("div",{className:"ReactCrop__drag-handle ord-e","data-ord":"e",tabIndex:0,"aria-label":r.eDragHandle,onKeyDown:z=>this.onHandlerKeyDown(z,"e"),role:"button"}),et.createElement("div",{className:"ReactCrop__drag-handle ord-se","data-ord":"se",tabIndex:0,"aria-label":r.seDragHandle,onKeyDown:z=>this.onHandlerKeyDown(z,"se"),role:"button"}),et.createElement("div",{className:"ReactCrop__drag-handle ord-s","data-ord":"s",tabIndex:0,"aria-label":r.sDragHandle,onKeyDown:z=>this.onHandlerKeyDown(z,"s"),role:"button"}),et.createElement("div",{className:"ReactCrop__drag-handle ord-sw","data-ord":"sw",tabIndex:0,"aria-label":r.swDragHandle,onKeyDown:z=>this.onHandlerKeyDown(z,"sw"),role:"button"}),et.createElement("div",{className:"ReactCrop__drag-handle ord-w","data-ord":"w",tabIndex:0,"aria-label":r.wDragHandle,onKeyDown:z=>this.onHandlerKeyDown(z,"w"),role:"button"})),h&&et.createElement("div",{className:"ReactCrop__selection-addon",onPointerDown:z=>z.stopPropagation()},h(this.state)),m&&et.createElement(et.Fragment,null,et.createElement("div",{className:"ReactCrop__rule-of-thirds-hz"}),et.createElement("div",{className:"ReactCrop__rule-of-thirds-vt"})))}makePixelCrop(r){const f={...Ar,...this.props.crop||{}};return La(f,r.width,r.height)}render(){const{aspect:r,children:f,circularCrop:u,className:h,crop:m,disabled:S,locked:T,style:z,ruleOfThirds:g}=this.props,{cropIsActive:O,newCropIsBeingDrawn:D}=this.state,j=m?this.renderCropSelection():null,G=W1("ReactCrop",h,O&&"ReactCrop--active",S&&"ReactCrop--disabled",T&&"ReactCrop--locked",D&&"ReactCrop--new-crop",m&&r&&"ReactCrop--fixed-aspect",m&&u&&"ReactCrop--circular-crop",m&&g&&"ReactCrop--rule-of-thirds",!this.dragStarted&&m&&!m.width&&!m.height&&"ReactCrop--invisible-crop",u&&"ReactCrop--no-animate");return et.createElement("div",{ref:this.componentRef,className:G,style:z},et.createElement("div",{ref:this.mediaRef,className:"ReactCrop__child-wrapper",onPointerDown:this.onComponentPointerDown},f),m?et.createElement("svg",{className:"ReactCrop__crop-mask",width:"100%",height:"100%"},et.createElement("defs",null,et.createElement("mask",{id:`hole-${this.instanceId}`},et.createElement("rect",{width:"100%",height:"100%",fill:"white"}),u?et.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"}):et.createElement("rect",{x:`${m.x}${m.unit}`,y:`${m.y}${m.unit}`,width:`${m.width}${m.unit}`,height:`${m.height}${m.unit}`,fill:"black"}))),et.createElement("rect",{fill:"black",fillOpacity:.5,width:"100%",height:"100%",mask:`url(#hole-${this.instanceId})`})):void 0,j)}};mt(Ua,"xOrds",["e","w"]),mt(Ua,"yOrds",["n","s"]),mt(Ua,"xyOrds",["nw","ne","se","sw"]),mt(Ua,"nudgeStep",1),mt(Ua,"nudgeStepMedium",10),mt(Ua,"nudgeStepLarge",100),mt(Ua,"defaultProps",{ariaLabels:{cropArea:"Use the arrow keys to move the crop selection area",nwDragHandle:"Use the arrow keys to move the north west drag handle to change the crop selection area",nDragHandle:"Use the up and down arrow keys to move the north drag handle to change the crop selection area",neDragHandle:"Use the arrow keys to move the north east drag handle to change the crop selection area",eDragHandle:"Use the up and down arrow keys to move the east drag handle to change the crop selection area",seDragHandle:"Use the arrow keys to move the south east drag handle to change the crop selection area",sDragHandle:"Use the up and down arrow keys to move the south drag handle to change the crop selection area",swDragHandle:"Use the arrow keys to move the south west drag handle to change the crop selection area",wDragHandle:"Use the up and down arrow keys to move the west drag handle to change the crop selection area"}});let e2=Ua;const t2=tn`
86
+ from { opacity: 0; }
87
+ to { opacity: 1; }
88
+ `,He={overlay:y("position:fixed;inset:0;z-index:10001;display:flex;background:transparent;animation:",t2," 0.15s ease-out;font-family:",oo,";",""),container:y(Il," display:flex;flex:1;margin:24px;background:",d.surface,";border:1px solid ",d.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:y("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",d.background,";overflow:hidden;.ReactCrop__crop-selection{border:2px solid ",d.primary,";}",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},closeBtn:y("padding:8px;background:",d.surface,";border:1px solid ",d.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),closeIcon:y("width:20px;height:20px;color:",d.textSecondary,";",""),cropWrapper:{name:"12wysvm",styles:"max-width:100%;max-height:calc(100vh - 150px);img{max-width:100%;max-height:calc(100vh - 150px);display:block;}"},sidebar:y("width:280px;background:",d.surface,";border-left:1px solid ",d.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:y("padding:16px 20px;border-bottom:1px solid ",d.border,";",""),sidebarTitle:y("font-size:",K.base,";font-weight:600;color:",d.text,";margin:0;",""),sidebarContent:{name:"1uv1qvv",styles:"flex:1;padding:20px;overflow:auto;display:flex;flex-direction:column;gap:20px"},section:{name:"1c3pogw",styles:"display:flex;flex-direction:column;gap:10px"},sectionLabel:y("font-size:",K.sm,";font-weight:600;color:",d.text,";",""),aspectButtons:{name:"13l5m7f",styles:"display:flex;gap:6px;flex-wrap:wrap"},aspectBtn:y("padding:6px 10px;font-size:",K.sm,";border:1px solid ",d.border,";background:",d.surface,";color:",d.text,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),aspectBtnActive:y("background-color:",d.primary,";border-color:",d.primary,";color:white;&:hover{background-color:",d.primaryHover,";border-color:",d.primaryHover,";}",""),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:",K.sm,";font-weight:500;background:",d.surface,";border:1px solid ",d.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",d.text,";&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),rotateIcon:{name:"157xhr7",styles:"width:16px;height:16px"},infoRow:y("display:flex;justify-content:space-between;font-size:",K.sm,";",""),infoLabel:y("color:",d.textSecondary,";",""),infoValue:y("color:",d.text,";font-weight:500;",""),resizeRow:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},resizeInput:y("width:80px;min-width:0;padding:8px 6px;font-size:",K.sm,";border:1px solid ",d.border,";border-radius:6px;background:",d.surface,";color:",d.text,";text-align:center;&:focus{outline:none;border-color:",d.primary,";}&::-webkit-outer-spin-button,&::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}-moz-appearance:textfield;",""),resizeX:y("font-size:",K.sm,";color:",d.textMuted,";",""),sidebarFooter:y("padding:16px 20px;border-top:1px solid ",d.border,";display:flex;flex-direction:column;gap:8px;",""),actionBtn:y("display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;font-size:",K.base,";font-weight:500;background:",d.primary,";border:1px solid ",d.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:white;&:hover:not(:disabled){background-color:",d.primaryHover,";border-color:",d.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),cancelBtn:y("display:flex;align-items:center;justify-content:center;gap:10px;width:100%;padding:12px 14px;font-size:",K.base,";font-weight:500;background:",d.surface,";border:1px solid ",d.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",d.text,";&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),spinner:{name:"1b4712p",styles:"width:16px;height:16px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:spin 0.75s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}"},hint:y("font-size:",K.xs,";color:",d.textMuted,";font-style:italic;","")},n2=[{label:"Free",value:void 0},{label:"1:1",value:1},{label:"4:3",value:4/3},{label:"3:2",value:3/2},{label:"16:9",value:16/9},{label:"2:3",value:2/3},{label:"9:16",value:9/16}];function a2({imagePath:o,imageSrc:r,dimensions:f,onClose:u,onSaveComplete:h,triggerRefresh:m}){const S=w.useRef(null),[T,z]=w.useState(),[g,O]=w.useState(),[D,j]=w.useState(0),[G,H]=w.useState(void 0),[V,ae]=w.useState(f.width),[Z,re]=w.useState(f.height),[P,be]=w.useState(!1),[U,fe]=w.useState(!1),[$,J]=w.useState({width:f.width,height:f.height}),[B,ie]=w.useState(1),ve=W=>{const b=W.currentTarget,{naturalWidth:_,naturalHeight:F,width:se}=b;J({width:_,height:F}),ie(_/se),fe(!0),ae(_),re(F),z({unit:"%",x:0,y:0,width:100,height:100})};w.useEffect(()=>{if(g&&U&&B>0){const W=Math.round(g.width*B),b=Math.round(g.height*B);ae(W),re(b)}},[g,U,B]);const ne=()=>{j(W=>(W+90)%360)},I=()=>{j(W=>(W-90+360)%360)},we=W=>{if(H(W),W&&U){const b=$.width/$.height;let _,F;W>b?(_=100,F=b/W*100):(F=100,_=W/b*100),z({unit:"%",x:(100-_)/2,y:(100-F)/2,width:_,height:F})}},_e=W=>{const b=parseInt(W.target.value)||0;ae(b),G&&b>0&&re(Math.round(b/G))},R=W=>{const b=parseInt(W.target.value)||0;re(b),G&&b>0&&ae(Math.round(b*G))},q=async()=>{if(!(!g||!U)){be(!0);try{const W={x:Math.round(g.x*B),y:Math.round(g.y*B),width:Math.round(g.width*B),height:Math.round(g.height*B)},_=await(await fetch("/api/studio/edit-image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:o,crop:W,rotation:D,resize:{width:V,height:Z}})})).json();_.success?(m(),h(_.updatedItem),u()):(console.error("Edit failed:",_.error),alert(_.error||"Failed to save image"))}catch(W){console.error("Edit error:",W),alert("An error occurred while saving the image")}finally{be(!1)}}},ue=g?Math.round(g.width*B):$.width,Le=g?Math.round(g.height*B):$.height;return s("div",{css:He.overlay,children:v("div",{css:He.container,children:[v("div",{css:He.main,children:[s("div",{css:He.headerButtons,children:s("button",{css:He.closeBtn,onClick:u,children:s("svg",{css:He.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})}),s(e2,{crop:T,onChange:W=>z(W),onComplete:W=>O(W),aspect:G,css:He.cropWrapper,children:s("img",{ref:S,src:r,alt:"Edit",onLoad:ve})})]}),v("div",{css:He.sidebar,children:[s("div",{css:He.sidebarHeader,children:s("h2",{css:He.sidebarTitle,children:"Edit Image"})}),v("div",{css:He.sidebarContent,children:[v("div",{css:He.section,children:[s("span",{css:He.sectionLabel,children:"Aspect Ratio"}),s("div",{css:He.aspectButtons,children:n2.map(W=>s("button",{css:[He.aspectBtn,G===W.value&&He.aspectBtnActive,"",""],onClick:()=>we(W.value),children:W.label},W.label))}),s("p",{css:He.hint,children:"Drag corners to resize crop area"})]}),v("div",{css:He.section,children:[s("span",{css:He.sectionLabel,children:"Rotation"}),v("div",{css:He.rotateButtons,children:[v("button",{css:He.rotateBtn,onClick:I,children:[s("svg",{css:He.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),"CCW"]}),v("button",{css:He.rotateBtn,onClick:ne,children:[s("svg",{css:He.rotateIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 10h-10a8 8 0 00-8 8v2M21 10l-6 6m6-6l-6-6"})}),"CW"]})]}),D!==0&&v("p",{css:He.hint,children:["Will rotate ",D,"° on save"]})]}),v("div",{css:He.section,children:[s("span",{css:He.sectionLabel,children:"Crop Selection"}),v("div",{css:He.infoRow,children:[s("span",{css:He.infoLabel,children:"Size"}),v("span",{css:He.infoValue,children:[ue," × ",Le," px"]})]})]}),v("div",{css:He.section,children:[s("span",{css:He.sectionLabel,children:"Output Size"}),v("div",{css:He.resizeRow,children:[s("input",{type:"number",css:He.resizeInput,value:V,onChange:_e,min:1}),s("span",{css:He.resizeX,children:"×"}),s("input",{type:"number",css:He.resizeInput,value:Z,onChange:R,min:1}),s("span",{css:He.resizeX,children:"px"})]}),s("p",{css:He.hint,children:"Modify to resize the output"})]})]}),v("div",{css:He.sidebarFooter,children:[s("button",{css:He.actionBtn,onClick:q,disabled:P||!g,children:P?v(ct,{children:[s("span",{css:He.spinner}),"Saving..."]}):"Save Changes"}),s("button",{css:He.cancelBtn,onClick:u,disabled:P,children:"Cancel"})]})]})]})})}const l2=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],i2=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function o2(o){const r=o.toLowerCase().substring(o.lastIndexOf("."));return l2.includes(r)}function r2(o){const r=o.toLowerCase().substring(o.lastIndexOf("."));return i2.includes(r)}const oe={overlay:{name:"1crgpqk",styles:"position:absolute;top:0;left:0;right:0;bottom:0;z-index:100;display:flex;background:transparent"},container:y("display:flex;flex:1;margin:24px;background:",d.surface,";border:1px solid ",d.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:y("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",d.background,";overflow:auto;",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},copyBtn:y("position:relative;padding:8px;background:",d.surface,";border:1px solid ",d.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),copyIcon:y("width:20px;height:20px;color:",d.textSecondary,";",""),statusIcon:y("display:flex;align-items:center;justify-content:center;padding:8px;background:",d.surface,";border:1px solid ",d.border,";border-radius:8px;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);",""),cloudIcon:{name:"1byef48",styles:"width:22px;height:22px;color:#f59e0b;transform:translateY(1px)"},globeIcon:{name:"jso3j5",styles:"width:20px;height:20px;color:#ef4444"},tooltip:{name:"1w9prgf",styles:"position:absolute;right:100%;top:50%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:8px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},mainCloseBtn:y("padding:8px;background:",d.surface,";border:1px solid ",d.border,";border-radius:8px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),mainCloseIcon:y("width:20px;height:20px;color:",d.textSecondary,";",""),mediaWrapper:{name:"zr0bjt",styles:"max-width:100%;max-height:100%;display:flex;align-items:center;justify-content:center"},image:{name:"4gte4n",styles:"max-width:100%;max-height:calc(100vh - 200px);object-fit:contain;border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1)"},video:{name:"1talud7",styles:"max-width:100%;max-height:calc(100vh - 200px);border-radius:8px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.1)"},filePlaceholder:y("display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px;background:",d.surface,";border-radius:12px;border:1px solid ",d.border,";",""),fileIcon:y("width:80px;height:80px;color:",d.textMuted,";margin-bottom:16px;",""),fileName:y("font-size:",K.lg,";font-weight:600;color:",d.text,";margin:0;",""),sidebar:y("width:280px;background:",d.surface,";border-left:1px solid ",d.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:y("padding:16px 20px;border-bottom:1px solid ",d.border,";",""),sidebarTitle:y("font-size:",K.base,";font-weight:600;color:",d.text,";margin:0;",""),sidebarContent:{name:"esl95u",styles:"flex:1;padding:20px;overflow:auto"},info:{name:"bh1r16",styles:"display:flex;flex-direction:column;gap:12px;margin-bottom:24px"},infoRow:y("display:flex;justify-content:space-between;font-size:",K.sm,";",""),infoLabel:y("color:",d.textSecondary,";",""),infoValue:y("color:",d.text,";font-weight:500;text-align:right;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),infoValueWrap:y("color:",d.text,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;",""),infoLink:y("color:",d.primary,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;text-decoration:none;&:hover{text-decoration:underline;}",""),thumbChips:{name:"1w7hks3",styles:"display:flex;gap:4px;flex-wrap:wrap;justify-content:flex-end"},thumbChip:y("font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:",d.primary,";color:white;",""),actions:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},actionBtn:y("display:flex;align-items:center;gap:10px;width:100%;padding:12px 14px;font-size:",K.base,";font-weight:500;background:",d.surface,";border:1px solid ",d.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",d.text,";text-align:left;&:hover:not(:disabled){background-color:",d.surfaceHover,";border-color:",d.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),actionBtnDanger:y("color:",d.danger,";&:hover:not(:disabled){background-color:",d.dangerLight,";border-color:",d.danger,";}",""),actionBtnCloud:{name:"1lzbs29",styles:"color:#f59e0b;&:hover:not(:disabled){background-color:rgba(245, 158, 11, 0.1);border-color:#f59e0b;}"},actionIcon:{name:"a4lfw4",styles:"width:16px;height:16px;flex-shrink:0"}};function s2(){const{focusedItem:o,setFocusedItem:r,triggerRefresh:f,fileItems:u,requestDelete:h,requestMove:m,requestSync:S,requestDownload:T,requestProcess:z,setProcessMode:g,actionState:O}=$l(),[D,j]=w.useState(!1),[G,H]=w.useState(!1),[V,ae]=w.useState({current:0,total:1,percent:0,status:"processing",message:"Renaming..."}),[Z,re]=w.useState(!1),[P,be]=w.useState(null),[U,fe]=w.useState(!1),[$,J]=w.useState(!1),[B,ie]=w.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),[ve,ne]=w.useState(!1),I=O.showProgress,we=o?o.name.toLowerCase()==="favicon.png"||o.name.toLowerCase()==="favicon.jpg":!1,_e=o&&!o.isProtected&&/\.(jpg|jpeg|png|webp|gif)$/i.test(o.name)&&(!o.cdnPushed||o.hasUpdate||!o.isRemote),R=Ye=>{r(Ye)};if(!o)return null;const q=o2(o.name),ue=r2(o.name),Le="/"+o.path.replace(/^public\//,""),W=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${Le}`:Le,b=typeof window<"u"?window.location.origin:"",_=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${Le}`:`${b}${Le}`,F=()=>{r(null)},se=()=>{navigator.clipboard.writeText(_),fe(!0),setTimeout(()=>fe(!1),1500)},xe=async Ye=>{if(Ye&&Ye!==o.name){j(!1),H(!0),ae({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});try{const Me=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:o.path,newName:Ye})});if(!Me.body)throw new Error("No response body");const _t=Me.body.getReader(),le=new TextDecoder;let Gt="",Xt="";for(;;){const{done:Ce,value:tt}=await _t.read();if(Ce)break;Gt+=le.decode(tt,{stream:!0});const Qe=Gt.split(`
89
+ `);Gt=Qe.pop()||"";for(const Ct of Qe){if(!Ct.startsWith("data: "))continue;const rt=JSON.parse(Ct.slice(6));rt.type==="start"?ae({current:0,total:rt.total,percent:0,status:"processing",message:rt.message}):rt.type==="progress"?ae({current:rt.current,total:rt.total,percent:Math.round(rt.current/rt.total*100),status:"processing",message:rt.message}):rt.type==="complete"?(Xt=rt.newPath,ae({current:rt.renamed,total:rt.renamed,percent:100,status:"complete",message:"Renamed successfully"})):rt.type==="error"&&(ae(wn=>({...wn,status:"error",message:rt.message})),be({title:"Rename Failed",message:rt.message}))}}Xt&&(r({...o,path:Xt,name:Xt.split("/").pop()||Ye}),f())}catch(Me){console.error("Rename error:",Me),ae(_t=>({..._t,status:"error",message:"Failed to rename"})),be({title:"Rename Failed",message:"An error occurred while renaming the file"})}}},Oe=async()=>{if(o){J(!0),ie({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."});try{const Ye=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+o.path.replace(/^public\//,"")})});if(!Ye.ok){const le=await Ye.json();ie({current:0,total:3,percent:0,status:"error",message:le.error||"Failed to generate favicons"});return}const Me=Ye.body?.getReader(),_t=new TextDecoder;if(Me){let le="";for(;;){const{done:Gt,value:Xt}=await Me.read();if(Gt)break;le+=_t.decode(Xt,{stream:!0});const Ce=le.split(`
90
+ `);le=Ce.pop()||"";for(const tt of Ce)if(tt.startsWith("data: "))try{const Qe=JSON.parse(tt.slice(6));Qe.type==="start"?ie(Ct=>({...Ct,total:Qe.total})):Qe.type==="progress"?ie({current:Qe.current,total:Qe.total,percent:Qe.percent,status:"processing",message:Qe.message}):Qe.type==="complete"?ie({current:Qe.processed,total:Qe.processed,percent:100,status:Qe.errors>0?"error":"complete",message:Qe.message}):Qe.type==="error"&&ie(Ct=>({...Ct,status:"error",message:Qe.message}))}catch{}}}}catch(Ye){console.error("Favicon generation error:",Ye),ie({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},Ne=()=>q?s("img",{css:oe.image,src:W,alt:o.name}):ue?s("video",{css:oe.video,src:W,controls:!0}):v("div",{css:oe.filePlaceholder,children:[s("svg",{css:oe.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}),s("p",{css:oe.fileName,children:o.name})]});return v(ct,{children:[P&&s(H0,{title:P.title,message:P.message,onClose:()=>be(null)}),s(j0,{isOpen:Z,onClose:()=>re(!1)}),D&&s(Er,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:o.name,placeholder:"Enter new filename",confirmLabel:"Rename",onConfirm:xe,onCancel:()=>j(!1)}),G&&s(ol,{title:"Renaming",progress:V,onClose:()=>{H(!1),f()}}),$&&s(ol,{title:"Generating Favicons",progress:B,onClose:()=>J(!1)}),s("div",{css:oe.overlay,onClick:F,children:v("div",{css:oe.container,onClick:Ye=>Ye.stopPropagation(),children:[v("div",{css:oe.main,children:[v("div",{css:oe.headerButtons,children:[o.cdnPushed&&!o.isRemote&&s("span",{css:oe.statusIcon,title:"Pushed to CDN",children:s("svg",{css:oe.cloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}),o.isRemote&&s("span",{css:oe.statusIcon,title:"Remote image",children:s("svg",{css:oe.globeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})})}),v("button",{css:oe.copyBtn,onClick:se,title:"Copy file path",children:[U&&s("span",{css:oe.tooltip,children:"Copied!"}),s("svg",{css:oe.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),s("button",{css:oe.mainCloseBtn,onClick:F,"aria-label":"Close",children:s("svg",{css:oe.mainCloseIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),s("div",{css:oe.mediaWrapper,children:Ne()})]}),v("div",{css:oe.sidebar,children:[s("div",{css:oe.sidebarHeader,children:s("h3",{css:oe.sidebarTitle,children:"Details"})}),v("div",{css:oe.sidebarContent,children:[v("div",{css:oe.info,children:[v("div",{css:oe.infoRow,children:[s("span",{css:oe.infoLabel,children:"Name"}),s("span",{css:oe.infoValueWrap,children:o.name})]}),v("div",{css:oe.infoRow,children:[s("span",{css:oe.infoLabel,children:"Path"}),s("span",{css:oe.infoValueWrap,children:o.path.replace(/^public\//,"")})]}),o.size!==void 0&&v("div",{css:oe.infoRow,children:[s("span",{css:oe.infoLabel,children:"Size"}),s("span",{css:oe.infoValue,children:c2(o.size)})]}),o.dimensions&&v("div",{css:oe.infoRow,children:[s("span",{css:oe.infoLabel,children:"Dimensions"}),v("span",{css:oe.infoValue,children:[o.dimensions.width," × ",o.dimensions.height]})]}),(o.hasSm||o.hasMd||o.hasLg||o.hasFull)&&v("div",{css:oe.infoRow,children:[s("span",{css:oe.infoLabel,children:"Thumbnails"}),s("span",{css:oe.infoValue,children:v("span",{css:oe.thumbChips,children:[o.hasSm&&s("span",{css:oe.thumbChip,children:"SM"}),o.hasMd&&s("span",{css:oe.thumbChip,children:"MD"}),o.hasLg&&s("span",{css:oe.thumbChip,children:"LG"}),o.hasFull&&s("span",{css:oe.thumbChip,children:"FULL"})]})})]}),v("div",{css:oe.infoRow,children:[s("span",{css:oe.infoLabel,children:"CDN Status"}),s("span",{css:oe.infoValue,children:o.cdnPushed?o.isRemote?"Remote":"Pushed":"Local"})]}),v("div",{css:oe.infoRow,children:[s("span",{css:oe.infoLabel,children:"URL"}),s("a",{href:_,target:"_blank",rel:"noopener noreferrer",css:oe.infoLink,title:_,children:_})]})]}),v("div",{css:oe.actions,children:[v("button",{css:oe.actionBtn,onClick:()=>j(!0),disabled:o.isProtected,children:[s("svg",{css:oe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),"Rename"]}),q&&v("button",{css:oe.actionBtn,onClick:()=>ne(!0),disabled:I||!_e,title:_e?void 0:"Download image first to edit",children:[s("svg",{css:oe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14M14 8l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2"})}),"Edit Image"]}),v("button",{css:oe.actionBtn,onClick:()=>m([o.path]),disabled:I||o.isProtected,children:[s("svg",{css:oe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})}),"Move"]}),v("button",{css:[oe.actionBtn,oe.actionBtnCloud,"",""],onClick:()=>S([o.path],u),disabled:I||o.isProtected||o.cdnPushed&&!o.isRemote,title:o.cdnPushed&&!o.isRemote?"Already in R2":void 0,children:[s("svg",{css:oe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),"Push to CDN"]}),v("button",{css:[oe.actionBtn,oe.actionBtnCloud,"",""],onClick:()=>T([o.path],u),disabled:I||!o.cdnPushed||o.isRemote,title:o.cdnPushed?o.isRemote?"Remote image":"Download from CDN to local":"Not on CDN",children:[s("svg",{css:oe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"})}),"Download from CDN"]}),v("button",{css:oe.actionBtn,onClick:()=>{g("generate"),z([o.path])},disabled:I||o.isProtected,children:[s("svg",{css:oe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),"Generate Thumbnails"]}),(o.hasSm||o.hasMd||o.hasLg||o.hasFull)&&v("button",{css:oe.actionBtn,onClick:()=>{g("remove"),z([o.path])},disabled:I||o.isProtected,children:[s("svg",{css:oe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Remove Thumbnails"]}),we&&v("button",{css:oe.actionBtn,onClick:Oe,disabled:$||o.isProtected,children:[s("svg",{css:oe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"})}),"Generate Favicons"]}),v("button",{css:[oe.actionBtn,oe.actionBtnDanger,"",""],onClick:()=>h([o.path]),disabled:I||o.isProtected,children:[s("svg",{css:oe.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Delete"]})]})]})]})]})}),ve&&o.dimensions&&s(a2,{imagePath:o.path,imageSrc:W,dimensions:o.dimensions,onClose:()=>ne(!1),onSaveComplete:R,triggerRefresh:f})]})}function c2(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}const il={overlay:{name:"1u8n9cx",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1100"},modal:y("background:",d.surface,";border-radius:12px;padding:24px;max-width:400px;width:90%;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),header:{name:"c6eghz",styles:"display:flex;align-items:center;gap:12px;margin-bottom:12px"},icon:y("width:24px;height:24px;color:",d.danger,";flex-shrink:0;",""),title:y("font-size:",K.lg,";font-weight:600;color:",d.text,";margin:0;",""),message:y("font-size:",K.base,";color:",d.textSecondary,";margin:0 0 20px 0;line-height:1.5;",""),button:y("width:100%;padding:10px 16px;border-radius:6px;font-size:",K.base,";font-weight:500;border:none;background:",d.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",d.primaryHover,";}","")};function u2(){const{error:o,clearError:r}=$l();return o?s("div",{css:il.overlay,onClick:r,children:v("div",{css:il.modal,onClick:f=>f.stopPropagation(),children:[v("div",{css:il.header,children:[s("svg",{css:il.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),s("h3",{css:il.title,children:o.title})]}),s("p",{css:il.message,children:o.message}),s("button",{css:il.button,onClick:r,children:"OK"})]})}):null}const w0={showProgress:!1,progressTitle:"",progressState:{current:0,total:0,percent:0,status:"processing"},showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1,actionPaths:[],syncImageCount:0,syncHasRemote:!1,syncHasLocal:!1,processMode:"generate",downloadImageCount:0,downloadTotalSelected:0};function d2({triggerRefresh:o,clearSelection:r,setFocusedItem:f,showError:u}){const[h,m]=w.useState(w0),S=w.useCallback(J=>{m(B=>({...B,progressState:typeof J=="function"?J(B.progressState):{...B.progressState,...J}}))},[]),T=w.useCallback(J=>{m(B=>({...B,showProgress:J}))},[]),z=w.useCallback(J=>{m(B=>({...B,progressTitle:J}))},[]),g=B0({setShowProgress:T,setProgressTitle:z,setProgressState:S,triggerRefresh:o}),O=w.useCallback(J=>{m(B=>({...B,actionPaths:J,showDeleteConfirm:!0}))},[]),D=w.useCallback(J=>{m(B=>({...B,actionPaths:J,showMoveModal:!0}))},[]),j=w.useCallback((J,B)=>{const ie=J.map(I=>"/"+I.replace(/^public\//,""));let ve=!1,ne=!1;for(const I of J){const we=B.find(_e=>_e.path===I);we&&(we.isRemote?ve=!0:we.cdnPushed||(ne=!0))}m(I=>({...I,actionPaths:J,syncImageCount:ie.length,syncHasRemote:ve,syncHasLocal:ne,showSyncConfirm:!0}))},[]),G=w.useCallback((J,B)=>{const ie=[];for(const ve of J){const ne=B.find(I=>I.path===ve);ne&&ne.cdnPushed&&!ne.isRemote&&ie.push(ve)}m(ve=>({...ve,actionPaths:ie,downloadImageCount:ie.length,downloadTotalSelected:J.length,showDownloadConfirm:!0}))},[]),H=w.useCallback(J=>{m(B=>({...B,actionPaths:J,showProcessConfirm:!0}))},[]),V=w.useCallback(J=>{m(B=>({...B,processMode:J}))},[]),ae=w.useCallback(()=>{m(J=>({...J,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),Z=w.useCallback(()=>{m(w0)},[]),re=w.useCallback(()=>{g.stop()},[g]),P=w.useCallback(async()=>{const J=h.actionPaths;m(B=>({...B,showDeleteConfirm:!1}));try{const B=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:J})});if(B.ok)r(),f(null),o();else{const ie=await B.json();u("Delete Failed",ie.error||"Unknown error")}}catch(B){console.error("Delete error:",B),u("Delete Failed","Delete failed. Check console for details.")}},[h.actionPaths,r,f,o,u]),be=w.useCallback(async J=>{const B=h.actionPaths;m(ie=>({...ie,showMoveModal:!1})),await g.execute({endpoint:"/api/studio/move",body:{paths:B,destination:J},title:"Moving Files",onComplete:ie=>{ie.errors&&ie.errors>0&&ie.errorMessages?.length&&u("Move Failed",ie.errorMessages.join(`
91
+ `)),r(),f(null)}})},[h.actionPaths,r,f,u,g]),U=w.useCallback(async()=>{const B=h.actionPaths.map(ne=>"/"+ne.replace(/^public\//,""));m(ne=>({...ne,showSyncConfirm:!1,showProgress:!0,progressTitle:"Pushing to CDN",progressState:{current:0,total:B.length,percent:0,status:"processing",message:"Pushing to CDN..."}}));let ie=0;const ve=[];for(let ne=0;ne<B.length;ne++){const I=B[ne];try{const we=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[I]})});if(we.ok)ie++;else{const _e=await we.json();ve.push(`${I}: ${_e.error||"Unknown error"}`)}}catch(we){ve.push(`${I}: ${we instanceof Error?we.message:"Unknown error"}`)}S({current:ne+1,total:B.length,percent:Math.round((ne+1)/B.length*100),status:"processing",message:`Pushed ${I}`})}S({current:B.length,total:B.length,percent:100,status:ve.length>0?"error":"complete",message:`Pushed ${ie} file${ie!==1?"s":""}${ve.length>0?`, ${ve.length} error${ve.length!==1?"s":""}`:""}`}),ve.length>0&&u("Push Errors",ve.join(`
92
+ `)),r(),o()},[h.actionPaths,r,o,u,S]),fe=w.useCallback(async()=>{const J=h.actionPaths,B=h.processMode,ie=J.map(we=>{const _e=we.replace(/^public\//,"");return _e.startsWith("/")?_e:`/${_e}`}),ve=B==="remove",ne=ve?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",I=ve?"Removing Thumbnails":"Generating Thumbnails";m(we=>({...we,showProcessConfirm:!1})),await g.execute({endpoint:ne,body:{imageKeys:ie},title:I})},[h.actionPaths,h.processMode,g]),$=w.useCallback(async()=>{const J=h.progressState.orphanedFiles;if(!(!J||J.length===0))try{const B=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:J})});if(B.ok)S(ie=>({...ie,orphanedFiles:void 0,message:ie.message?.replace(/Found \d+ orphaned thumbnail\(s\).*/,"Orphaned thumbnails deleted.")})),o();else{const ie=await B.json();u("Delete Failed",ie.error||"Failed to delete orphaned files")}}catch(B){console.error("Delete orphans error:",B),u("Delete Failed","Failed to delete orphaned files. Check console for details.")}},[h.progressState.orphanedFiles,o,u,S]);return{actionState:h,setActionState:m,requestDelete:O,requestMove:D,requestSync:j,requestDownload:G,requestProcess:H,setProcessMode:V,cancelAction:ae,closeProgress:Z,stopProcessing:re,confirmDelete:P,confirmMove:be,confirmSync:U,confirmProcess:fe,deleteOrphans:$}}const f2="36px",Rt={container:y(Il," display:flex;flex-direction:column;height:100%;background:",d.background,";",""),header:y("display:flex;align-items:center;justify-content:space-between;padding:12px 24px;background:",d.surface,";border-bottom:1px solid ",d.border,";position:relative;",""),title:y("font-size:",K.lg,";font-weight:600;color:",d.text,";margin:0;letter-spacing:-0.02em;flex-shrink:0;",""),headerLeft:{name:"16ur2v6",styles:"display:flex;align-items:center;gap:12px;flex:1;min-width:0"},headerCenter:{name:"1fsejhz",styles:"position:absolute;left:50%;transform:translateX(-50%);display:flex;align-items:center;max-width:50%"},breadcrumbs:y("display:flex;align-items:center;gap:6px;font-size:",K.base,";color:",d.textSecondary,";overflow:hidden;",""),breadcrumbSeparator:y("color:",d.border,";flex-shrink:0;",""),breadcrumbItem:y("color:",d.textSecondary,";text-decoration:none;cursor:pointer;transition:color 0.15s ease;white-space:nowrap;&:hover{color:",d.primary,";}",""),breadcrumbCurrent:y("color:",d.text,";font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),headerIconBtn:y("display:flex;align-items:center;justify-content:center;width:32px;height:32px;color:",d.textMuted,";background:transparent;border:none;border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{color:",d.text,";background:",d.surface,";}",""),headerActions:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},headerBtn:y("height:",f2,";padding:0 12px;background:",d.surface,";border:1px solid ",d.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",d.surfaceHover,";border-color:",d.borderHover,";}",""),headerIcon:y("width:16px;height:16px;color:",d.textSecondary,";",""),content:{name:"1rtaly3",styles:"flex:1;display:flex;overflow:hidden"},fileBrowser:{name:"upomw9",styles:"flex:1;min-width:0;overflow:auto;padding:20px 24px;display:flex;flex-direction:column"},dropOverlay:y("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",d.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:y("display:flex;flex-direction:column;align-items:center;gap:12px;color:",d.primary,";font-size:",K.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"}};function h2({onClose:o,isVisible:r=!0,standaloneMode:f=!1,workspacePath:u,siteUrl:h}){const m=o||(()=>{}),[S,T]=w.useState("public"),[z,g]=w.useState(new Set),[O,D]=w.useState(null),[j,G]=w.useState("grid"),[H,V]=w.useState(null),[ae,Z]=w.useState(null),[re,P]=w.useState(!1),[be,U]=w.useState(0),[fe,$]=w.useState(!1),[J,B]=w.useState(""),[ie,ve]=w.useState(null),[ne,I]=w.useState([]),[we,_e]=w.useState(!1),R=w.useCallback(()=>{U(Ce=>Ce+1)},[]);w.useEffect(()=>{if(H&&ne.length>0){const Ce=ne.find(tt=>tt.path===H.path);Ce&&JSON.stringify(Ce)!==JSON.stringify(H)&&V(Ce)}},[ne,H]);const q=w.useCallback(()=>{$(!0)},[]),ue=w.useCallback(()=>{$(!1)},[]),Le=w.useCallback((Ce,tt)=>{ve({title:Ce,message:tt})},[]),W=w.useCallback(()=>{ve(null)},[]),b=w.useCallback(Ce=>{Ce.preventDefault(),Ce.stopPropagation(),_e(!0)},[]),_=w.useCallback(Ce=>{Ce.preventDefault(),Ce.stopPropagation(),_e(!1)},[]),F=w.useCallback(async Ce=>{Ce.preventDefault(),Ce.stopPropagation(),_e(!1);const tt=Array.from(Ce.dataTransfer.files);if(tt.length!==0&&!(S==="public/images"||S.startsWith("public/images/"))){for(const Qe of tt){const Ct=new FormData;Ct.append("file",Qe),Ct.append("path",S);try{await fetch("/api/studio/upload",{method:"POST",body:Ct})}catch(rt){console.error("Upload error:",rt)}}R()}},[S,R]),se=w.useCallback(()=>{if(S==="public")return;const Ce=S.split("/");Ce.pop(),T(Ce.join("/")||"public"),g(new Set)},[S]),xe=w.useCallback(Ce=>{T(Ce),g(new Set),V(null)},[]),Oe=w.useCallback(Ce=>{g(tt=>{const Qe=new Set(tt);return Qe.has(Ce)?Qe.delete(Ce):Qe.add(Ce),Qe}),D(Ce)},[]),Ne=w.useCallback((Ce,tt,Qe)=>{const Ct=Qe.findIndex(fn=>fn.path===Ce),rt=Qe.findIndex(fn=>fn.path===tt);if(Ct===-1||rt===-1)return;const wn=Math.min(Ct,rt),Ha=Math.max(Ct,rt);g(fn=>{const Pl=new Set(fn);for(let rl=wn;rl<=Ha;rl++)Pl.add(Qe[rl].path);return Pl}),D(tt)},[]),Ye=w.useCallback(Ce=>{g(new Set(Ce.map(tt=>tt.path)))},[]),Me=w.useCallback(()=>{g(new Set)},[]),_t=w.useCallback(Ce=>{V(Ce)},[]),le=d2({triggerRefresh:R,clearSelection:Me,setFocusedItem:_t,showError:Le}),Gt=w.useCallback(Ce=>{if(Ce.key==="Escape"){const tt=Ce.target;if(tt.tagName==="INPUT"||tt.tagName==="TEXTAREA")return;H?V(null):f||m()}},[m,H,f]);w.useEffect(()=>(r&&(document.addEventListener("keydown",Gt),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",Gt),document.body.style.overflow=""}),[Gt,r]);const Xt={isOpen:!0,openStudio:()=>{},closeStudio:m,toggleStudio:m,currentPath:S,setCurrentPath:xe,navigateUp:se,selectedItems:z,toggleSelection:Oe,selectRange:Ne,selectAll:Ye,clearSelection:Me,lastSelectedPath:O,viewMode:j,setViewMode:G,focusedItem:H,setFocusedItem:V,meta:ae,setMeta:Z,isLoading:re,setIsLoading:P,refreshKey:be,triggerRefresh:R,scanRequested:fe,triggerScan:q,clearScanRequest:ue,searchQuery:J,setSearchQuery:B,error:ie,showError:Le,clearError:W,fileItems:ne,setFileItems:I,actionState:le.actionState,requestDelete:le.requestDelete,requestMove:le.requestMove,requestSync:le.requestSync,requestDownload:le.requestDownload,requestProcess:le.requestProcess,setProcessMode:le.setProcessMode,confirmDelete:le.confirmDelete,confirmMove:le.confirmMove,confirmSync:le.confirmSync,confirmProcess:le.confirmProcess,cancelAction:le.cancelAction,closeProgress:le.closeProgress,stopProcessing:le.stopProcessing,deleteOrphans:le.deleteOrphans};return s(U0.Provider,{value:Xt,children:v("div",{css:Rt.container,children:[v("div",{css:Rt.header,children:[s("div",{css:Rt.headerLeft,children:s("h1",{css:Rt.title,children:"gallop.studio"})}),s("div",{css:Rt.headerCenter,children:s(y2,{currentPath:S,onNavigate:xe,projectName:u?u.split("/").pop():void 0})}),v("div",{css:Rt.headerActions,children:[h&&s("a",{href:h,target:"_blank",rel:"noopener noreferrer",css:Rt.headerIconBtn,title:`Open ${h}`,children:s(b2,{})}),!f&&s("button",{css:Rt.headerBtn,onClick:m,"aria-label":"Close Studio",children:s(v2,{})})]})]}),s(x1,{}),v("div",{css:Rt.content,onDragOver:b,onDragLeave:_,onDrop:F,children:[we&&s("div",{css:Rt.dropOverlay,children:v("div",{css:Rt.dropMessage,children:[s("svg",{css:Rt.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:s("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})}),s("span",{children:"Drop files to upload"})]})}),s("div",{css:Rt.fileBrowser,children:j==="grid"?s(Y1,{}):s(K1,{})})]}),H&&s(s2,{}),s(u2,{}),le.actionState.showDeleteConfirm&&s(Pi,{title:"Delete Files",message:`Are you sure you want to delete ${le.actionState.actionPaths.length} item${le.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:le.confirmDelete,onCancel:le.cancelAction}),le.actionState.showSyncConfirm&&s(Pi,{title:"Push to CDN",message:`Push ${le.actionState.syncImageCount} image${le.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${le.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${le.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:le.confirmSync,onCancel:le.cancelAction}),le.actionState.showProcessConfirm&&s(g2,{imageCount:le.actionState.actionPaths.length,mode:le.actionState.processMode,onConfirm:le.confirmProcess,onCancel:le.cancelAction}),le.actionState.showMoveModal&&s(N0,{selectedItems:new Set(le.actionState.actionPaths),currentPath:S,onMove:Ce=>le.confirmMove(Ce),onCancel:le.cancelAction}),le.actionState.showProgress&&s(ol,{title:le.actionState.progressTitle,progress:le.actionState.progressState,onStop:le.stopProcessing,onDeleteOrphans:le.deleteOrphans,onClose:le.closeProgress})]})})}var p2={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},m2={name:"1ca3l8d",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:10000"};function g2({imageCount:o,mode:r,onConfirm:f,onCancel:u}){const h={overlay:m2,container:y("background:",d.surface,";border-radius:12px;padding:24px;max-width:420px;width:90%;box-shadow:0 20px 25px -5px rgba(0, 0, 0, 0.1),0 10px 10px -5px rgba(0, 0, 0, 0.04);",""),title:y("font-size:",K.lg,";font-weight:600;color:",d.text,";margin:0 0 16px;",""),message:y("font-size:",K.base,";color:",d.textSecondary,";margin:0 0 20px;line-height:1.5;",""),actions:p2,cancelBtn:y("padding:10px 20px;border:1px solid ",d.border,";border-radius:8px;background:",d.background,";color:",d.text,";font-size:",K.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",d.surfaceHover,";border-color:",d.borderHover,";}",""),confirmBtn:y("padding:10px 20px;border:none;border-radius:8px;background:",d.primary,";color:white;font-size:",K.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",d.primaryHover,";}",""),confirmBtnDanger:y("background:",d.danger,";&:hover{background:#dc2626;}","")},m=r==="remove",S=m?"Remove Thumbnails":"Generate Thumbnails",T=m?`Remove generated thumbnails for ${o} image${o!==1?"s":""}? Original images will be kept.`:`Generate thumbnails for ${o} image${o!==1?"s":""}?`,z=m?"Remove":"Generate";return s("div",{css:h.overlay,onClick:u,children:v("div",{css:h.container,onClick:g=>g.stopPropagation(),children:[s("h2",{css:h.title,children:S}),s("p",{css:h.message,children:T}),v("div",{css:h.actions,children:[s("button",{css:h.cancelBtn,onClick:u,children:"Cancel"}),s("button",{css:[h.confirmBtn,m&&h.confirmBtnDanger,"",""],onClick:f,children:z})]})]})})}function y2({currentPath:o,onNavigate:r,projectName:f}){const u=o.split("/").filter(Boolean),h=u.map((m,S)=>({name:S===0&&m==="public"&&f?f:m,path:u.slice(0,S+1).join("/")}));return s("div",{css:Rt.breadcrumbs,children:h.map((m,S)=>v("span",{style:{display:"flex",alignItems:"center",gap:6},children:[S>0&&s("span",{css:Rt.breadcrumbSeparator,children:"/"}),S===h.length-1?s("span",{css:Rt.breadcrumbCurrent,children:m.name}):s("span",{css:Rt.breadcrumbItem,onClick:()=>r(m.path),children:m.name})]},m.path))})}function b2(){return v("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[s("circle",{cx:"12",cy:"12",r:"10"}),s("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),s("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})}function v2(){return v("svg",{css:Rt.headerIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[s("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),s("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}const G0=document.getElementById("root");if(!G0)throw new Error("Root element not found");const x2=window.__STUDIO_WORKSPACE__||"Unknown",S2=window.__STUDIO_SITE_URL__||"";n1.createRoot(G0).render(s(w.StrictMode,{children:s("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:s(h2,{isVisible:!0,standaloneMode:!0,workspacePath:x2,siteUrl:S2})})}));