@gallop.software/studio 2.3.66 → 2.3.67
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,79 @@
|
|
|
1
|
+
function Nm(o,s){for(var h=0;h<s.length;h++){const u=s[h];if(typeof u!="string"&&!Array.isArray(u)){for(const p in u)if(p!=="default"&&!(p in o)){const g=Object.getOwnPropertyDescriptor(u,p);g&&Object.defineProperty(o,p,g.get?g:{enumerable:!0,get:()=>u[p]})}}}return Object.freeze(Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}))}(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const p of document.querySelectorAll('link[rel="modulepreload"]'))u(p);new MutationObserver(p=>{for(const g of p)if(g.type==="childList")for(const A of g.addedNodes)A.tagName==="LINK"&&A.rel==="modulepreload"&&u(A)}).observe(document,{childList:!0,subtree:!0});function h(p){const g={};return p.integrity&&(g.integrity=p.integrity),p.referrerPolicy&&(g.referrerPolicy=p.referrerPolicy),p.crossOrigin==="use-credentials"?g.credentials="include":p.crossOrigin==="anonymous"?g.credentials="omit":g.credentials="same-origin",g}function u(p){if(p.ep)return;p.ep=!0;const g=h(p);fetch(p.href,g)}})();function jm(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Rs={exports:{}},Ri={};var q0;function qm(){if(q0)return Ri;q0=1;var o=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function h(u,p,g){var A=null;if(g!==void 0&&(A=""+g),p.key!==void 0&&(A=""+p.key),"key"in p){g={};for(var H in p)H!=="key"&&(g[H]=p[H])}else g=p;return p=g.ref,{$$typeof:o,type:u,key:A,ref:p!==void 0?p:null,props:g}}return Ri.Fragment=s,Ri.jsx=h,Ri.jsxs=h,Ri}var Y0;function Ym(){return Y0||(Y0=1,Rs.exports=qm()),Rs.exports}var Hi=Ym(),Os={exports:{}},_e={};var G0;function Gm(){if(G0)return _e;G0=1;var o=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),p=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),A=Symbol.for("react.context"),H=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),y=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),O=Symbol.for("react.activity"),G=Symbol.iterator;function ie(v){return v===null||typeof v!="object"?null:(v=G&&v[G]||v["@@iterator"],typeof v=="function"?v:null)}var _={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},V=Object.assign,me={};function F(v,U,Z){this.props=v,this.context=U,this.refs=me,this.updater=Z||_}F.prototype.isReactComponent={},F.prototype.setState=function(v,U){if(typeof v!="object"&&typeof v!="function"&&v!=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,v,U,"setState")},F.prototype.forceUpdate=function(v){this.updater.enqueueForceUpdate(this,v,"forceUpdate")};function ue(){}ue.prototype=F.prototype;function $(v,U,Z){this.props=v,this.context=U,this.refs=me,this.updater=Z||_}var we=$.prototype=new ue;we.constructor=$,V(we,F.prototype),we.isPureReactComponent=!0;var N=Array.isArray;function ve(){}var Q={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function q(v,U,Z){var K=Z.ref;return{$$typeof:o,type:v,key:U,ref:K!==void 0?K:null,props:Z}}function W(v,U){return q(v.type,U,v.props)}function ge(v){return typeof v=="object"&&v!==null&&v.$$typeof===o}function Se(v){var U={"=":"=0",":":"=2"};return"$"+v.replace(/[=:]/g,function(Z){return U[Z]})}var le=/\/+/g;function Ae(v,U){return typeof v=="object"&&v!==null&&v.key!=null?Se(""+v.key):U.toString(36)}function He(v){switch(v.status){case"fulfilled":return v.value;case"rejected":throw v.reason;default:switch(typeof v.status=="string"?v.then(ve,ve):(v.status="pending",v.then(function(U){v.status==="pending"&&(v.status="fulfilled",v.value=U)},function(U){v.status==="pending"&&(v.status="rejected",v.reason=U)})),v.status){case"fulfilled":return v.value;case"rejected":throw v.reason}}throw v}function D(v,U,Z,K,te){var ze=typeof v;(ze==="undefined"||ze==="boolean")&&(v=null);var he=!1;if(v===null)he=!0;else switch(ze){case"bigint":case"string":case"number":he=!0;break;case"object":switch(v.$$typeof){case o:case s:he=!0;break;case Y:return he=v._init,D(he(v._payload),U,Z,K,te)}}if(he)return te=te(v),he=K===""?"."+Ae(v,0):K,N(te)?(Z="",he!=null&&(Z=he.replace(le,"$&/")+"/"),D(te,U,Z,"",function(Vt){return Vt})):te!=null&&(ge(te)&&(te=W(te,Z+(te.key==null||v&&v.key===te.key?"":(""+te.key).replace(le,"$&/")+"/")+he)),U.push(te)),1;he=0;var ot=K===""?".":K+":";if(N(v))for(var Ye=0;Ye<v.length;Ye++)K=v[Ye],ze=ot+Ae(K,Ye),he+=D(K,U,Z,ze,te);else if(Ye=ie(v),typeof Ye=="function")for(v=Ye.call(v),Ye=0;!(K=v.next()).done;)K=K.value,ze=ot+Ae(K,Ye++),he+=D(K,U,Z,ze,te);else if(ze==="object"){if(typeof v.then=="function")return D(He(v),U,Z,K,te);throw U=String(v),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(v).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return he}function j(v,U,Z){if(v==null)return v;var K=[],te=0;return D(v,K,"","",function(ze){return U.call(Z,ze,te++)}),K}function P(v){if(v._status===-1){var U=v._result;U=U(),U.then(function(Z){(v._status===0||v._status===-1)&&(v._status=1,v._result=Z)},function(Z){(v._status===0||v._status===-1)&&(v._status=2,v._result=Z)}),v._status===-1&&(v._status=0,v._result=U)}if(v._status===1)return v._result.default;throw v._result}var De=typeof reportError=="function"?reportError:function(v){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof v=="object"&&v!==null&&typeof v.message=="string"?String(v.message):String(v),error:v});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",v);return}console.error(v)},Ue={map:j,forEach:function(v,U,Z){j(v,function(){U.apply(this,arguments)},Z)},count:function(v){var U=0;return j(v,function(){U++}),U},toArray:function(v){return j(v,function(U){return U})||[]},only:function(v){if(!ge(v))throw Error("React.Children.only expected to receive a single React element child.");return v}};return _e.Activity=O,_e.Children=Ue,_e.Component=F,_e.Fragment=h,_e.Profiler=p,_e.PureComponent=$,_e.StrictMode=u,_e.Suspense=k,_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,_e.__COMPILER_RUNTIME={__proto__:null,c:function(v){return Q.H.useMemoCache(v)}},_e.cache=function(v){return function(){return v.apply(null,arguments)}},_e.cacheSignal=function(){return null},_e.cloneElement=function(v,U,Z){if(v==null)throw Error("The argument must be a React element, but you passed "+v+".");var K=V({},v.props),te=v.key;if(U!=null)for(ze in U.key!==void 0&&(te=""+U.key),U)!ae.call(U,ze)||ze==="key"||ze==="__self"||ze==="__source"||ze==="ref"&&U.ref===void 0||(K[ze]=U[ze]);var ze=arguments.length-2;if(ze===1)K.children=Z;else if(1<ze){for(var he=Array(ze),ot=0;ot<ze;ot++)he[ot]=arguments[ot+2];K.children=he}return q(v.type,te,K)},_e.createContext=function(v){return v={$$typeof:A,_currentValue:v,_currentValue2:v,_threadCount:0,Provider:null,Consumer:null},v.Provider=v,v.Consumer={$$typeof:g,_context:v},v},_e.createElement=function(v,U,Z){var K,te={},ze=null;if(U!=null)for(K in U.key!==void 0&&(ze=""+U.key),U)ae.call(U,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(te[K]=U[K]);var he=arguments.length-2;if(he===1)te.children=Z;else if(1<he){for(var ot=Array(he),Ye=0;Ye<he;Ye++)ot[Ye]=arguments[Ye+2];te.children=ot}if(v&&v.defaultProps)for(K in he=v.defaultProps,he)te[K]===void 0&&(te[K]=he[K]);return q(v,ze,te)},_e.createRef=function(){return{current:null}},_e.forwardRef=function(v){return{$$typeof:H,render:v}},_e.isValidElement=ge,_e.lazy=function(v){return{$$typeof:Y,_payload:{_status:-1,_result:v},_init:P}},_e.memo=function(v,U){return{$$typeof:y,type:v,compare:U===void 0?null:U}},_e.startTransition=function(v){var U=Q.T,Z={};Q.T=Z;try{var K=v(),te=Q.S;te!==null&&te(Z,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(ve,De)}catch(ze){De(ze)}finally{U!==null&&Z.types!==null&&(U.types=Z.types),Q.T=U}},_e.unstable_useCacheRefresh=function(){return Q.H.useCacheRefresh()},_e.use=function(v){return Q.H.use(v)},_e.useActionState=function(v,U,Z){return Q.H.useActionState(v,U,Z)},_e.useCallback=function(v,U){return Q.H.useCallback(v,U)},_e.useContext=function(v){return Q.H.useContext(v)},_e.useDebugValue=function(){},_e.useDeferredValue=function(v,U){return Q.H.useDeferredValue(v,U)},_e.useEffect=function(v,U){return Q.H.useEffect(v,U)},_e.useEffectEvent=function(v){return Q.H.useEffectEvent(v)},_e.useId=function(){return Q.H.useId()},_e.useImperativeHandle=function(v,U,Z){return Q.H.useImperativeHandle(v,U,Z)},_e.useInsertionEffect=function(v,U){return Q.H.useInsertionEffect(v,U)},_e.useLayoutEffect=function(v,U){return Q.H.useLayoutEffect(v,U)},_e.useMemo=function(v,U){return Q.H.useMemo(v,U)},_e.useOptimistic=function(v,U){return Q.H.useOptimistic(v,U)},_e.useReducer=function(v,U,Z){return Q.H.useReducer(v,U,Z)},_e.useRef=function(v){return Q.H.useRef(v)},_e.useState=function(v){return Q.H.useState(v)},_e.useSyncExternalStore=function(v,U,Z){return Q.H.useSyncExternalStore(v,U,Z)},_e.useTransition=function(){return Q.H.useTransition()},_e.version="19.2.4",_e}var V0;function Zs(){return V0||(V0=1,Os.exports=Gm()),Os.exports}var w=Zs();const uh=jm(w),X0=Nm({__proto__:null,default:uh},[w]);function Vm(o){if(o.sheet)return o.sheet;for(var s=0;s<document.styleSheets.length;s++)if(document.styleSheets[s].ownerNode===o)return document.styleSheets[s]}function Xm(o){var s=document.createElement("style");return s.setAttribute("data-emotion",o.key),o.nonce!==void 0&&s.setAttribute("nonce",o.nonce),s.appendChild(document.createTextNode("")),s.setAttribute("data-s",""),s}var Qm=(function(){function o(h){var u=this;this._insertTag=function(p){var g;u.tags.length===0?u.insertionPoint?g=u.insertionPoint.nextSibling:u.prepend?g=u.container.firstChild:g=u.before:g=u.tags[u.tags.length-1].nextSibling,u.container.insertBefore(p,g),u.tags.push(p)},this.isSpeedy=h.speedy===void 0?!0:h.speedy,this.tags=[],this.ctr=0,this.nonce=h.nonce,this.key=h.key,this.container=h.container,this.prepend=h.prepend,this.insertionPoint=h.insertionPoint,this.before=null}var s=o.prototype;return s.hydrate=function(u){u.forEach(this._insertTag)},s.insert=function(u){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(Xm(this));var p=this.tags[this.tags.length-1];if(this.isSpeedy){var g=Vm(p);try{g.insertRule(u,g.cssRules.length)}catch{}}else p.appendChild(document.createTextNode(u));this.ctr++},s.flush=function(){this.tags.forEach(function(u){var p;return(p=u.parentNode)==null?void 0:p.removeChild(u)}),this.tags=[],this.ctr=0},o})(),Ht="-ms-",dc="-moz-",Je="-webkit-",fh="comm",Ks="rule",Js="decl",Zm="@import",dh="@keyframes",Km="@layer",Jm=Math.abs,pc=String.fromCharCode,Fm=Object.assign;function $m(o,s){return Rt(o,0)^45?(((s<<2^Rt(o,0))<<2^Rt(o,1))<<2^Rt(o,2))<<2^Rt(o,3):0}function hh(o){return o.trim()}function Wm(o,s){return(o=s.exec(o))?o[0]:o}function Fe(o,s,h){return o.replace(s,h)}function Vs(o,s){return o.indexOf(s)}function Rt(o,s){return o.charCodeAt(s)|0}function Bi(o,s,h){return o.slice(s,h)}function kn(o){return o.length}function Fs(o){return o.length}function cc(o,s){return s.push(o),o}function Im(o,s){return o.map(s).join("")}var mc=1,Ba=1,ph=0,$t=0,Ct=0,ja="";function gc(o,s,h,u,p,g,A){return{value:o,root:s,parent:h,type:u,props:p,children:g,line:mc,column:Ba,length:A,return:""}}function Oi(o,s){return Fm(gc("",null,null,"",null,null,0),o,{length:-o.length},s)}function Pm(){return Ct}function e1(){return Ct=$t>0?Rt(ja,--$t):0,Ba--,Ct===10&&(Ba=1,mc--),Ct}function an(){return Ct=$t<ph?Rt(ja,$t++):0,Ba++,Ct===10&&(Ba=1,mc++),Ct}function Rn(){return Rt(ja,$t)}function rc(){return $t}function qi(o,s){return Bi(ja,o,s)}function Ni(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 mh(o){return mc=Ba=1,ph=kn(ja=o),$t=0,[]}function gh(o){return ja="",o}function sc(o){return hh(qi($t-1,Xs(o===91?o+2:o===40?o+1:o)))}function t1(o){for(;(Ct=Rn())&&Ct<33;)an();return Ni(o)>2||Ni(Ct)>3?"":" "}function n1(o,s){for(;--s&&an()&&!(Ct<48||Ct>102||Ct>57&&Ct<65||Ct>70&&Ct<97););return qi(o,rc()+(s<6&&Rn()==32&&an()==32))}function Xs(o){for(;an();)switch(Ct){case o:return $t;case 34:case 39:o!==34&&o!==39&&Xs(Ct);break;case 40:o===41&&Xs(o);break;case 92:an();break}return $t}function l1(o,s){for(;an()&&o+Ct!==57;)if(o+Ct===84&&Rn()===47)break;return"/*"+qi(s,$t-1)+"*"+pc(o===47?o:an())}function a1(o){for(;!Ni(Rn());)an();return qi(o,$t)}function i1(o){return gh(uc("",null,null,null,[""],o=mh(o),0,[0],o))}function uc(o,s,h,u,p,g,A,H,k){for(var y=0,Y=0,O=A,G=0,ie=0,_=0,V=1,me=1,F=1,ue=0,$="",we=p,N=g,ve=u,Q=$;me;)switch(_=ue,ue=an()){case 40:if(_!=108&&Rt(Q,O-1)==58){Vs(Q+=Fe(sc(ue),"&","&\f"),"&\f")!=-1&&(F=-1);break}case 34:case 39:case 91:Q+=sc(ue);break;case 9:case 10:case 13:case 32:Q+=t1(_);break;case 92:Q+=n1(rc()-1,7);continue;case 47:switch(Rn()){case 42:case 47:cc(o1(l1(an(),rc()),s,h),k);break;default:Q+="/"}break;case 123*V:H[y++]=kn(Q)*F;case 125*V:case 59:case 0:switch(ue){case 0:case 125:me=0;case 59+Y:F==-1&&(Q=Fe(Q,/\f/g,"")),ie>0&&kn(Q)-O&&cc(ie>32?Z0(Q+";",u,h,O-1):Z0(Fe(Q," ","")+";",u,h,O-2),k);break;case 59:Q+=";";default:if(cc(ve=Q0(Q,s,h,y,Y,p,H,$,we=[],N=[],O),g),ue===123)if(Y===0)uc(Q,s,ve,ve,we,g,O,H,N);else switch(G===99&&Rt(Q,3)===110?100:G){case 100:case 108:case 109:case 115:uc(o,ve,ve,u&&cc(Q0(o,ve,ve,0,0,p,H,$,p,we=[],O),N),p,N,O,H,u?we:N);break;default:uc(Q,ve,ve,ve,[""],N,0,H,N)}}y=Y=ie=0,V=F=1,$=Q="",O=A;break;case 58:O=1+kn(Q),ie=_;default:if(V<1){if(ue==123)--V;else if(ue==125&&V++==0&&e1()==125)continue}switch(Q+=pc(ue),ue*V){case 38:F=Y>0?1:(Q+="\f",-1);break;case 44:H[y++]=(kn(Q)-1)*F,F=1;break;case 64:Rn()===45&&(Q+=sc(an())),G=Rn(),Y=O=kn($=Q+=a1(rc())),ue++;break;case 45:_===45&&kn(Q)==2&&(V=0)}}return g}function Q0(o,s,h,u,p,g,A,H,k,y,Y){for(var O=p-1,G=p===0?g:[""],ie=Fs(G),_=0,V=0,me=0;_<u;++_)for(var F=0,ue=Bi(o,O+1,O=Jm(V=A[_])),$=o;F<ie;++F)($=hh(V>0?G[F]+" "+ue:Fe(ue,/&\f/g,G[F])))&&(k[me++]=$);return gc(o,s,h,p===0?Ks:H,k,y,Y)}function o1(o,s,h){return gc(o,s,h,fh,pc(Pm()),Bi(o,2,-2),0)}function Z0(o,s,h,u){return gc(o,s,h,Js,Bi(o,0,u),Bi(o,u+1,-1),u)}function Ha(o,s){for(var h="",u=Fs(o),p=0;p<u;p++)h+=s(o[p],p,o,s)||"";return h}function c1(o,s,h,u){switch(o.type){case Km:if(o.children.length)break;case Zm:case Js:return o.return=o.return||o.value;case fh:return"";case dh:return o.return=o.value+"{"+Ha(o.children,u)+"}";case Ks:o.value=o.props.join(",")}return kn(h=Ha(o.children,u))?o.return=o.value+"{"+h+"}":""}function r1(o){var s=Fs(o);return function(h,u,p,g){for(var A="",H=0;H<s;H++)A+=o[H](h,u,p,g)||"";return A}}function s1(o){return function(s){s.root||(s=s.return)&&o(s)}}function u1(o){var s=Object.create(null);return function(h){return s[h]===void 0&&(s[h]=o(h)),s[h]}}var f1=function(s,h,u){for(var p=0,g=0;p=g,g=Rn(),p===38&&g===12&&(h[u]=1),!Ni(g);)an();return qi(s,$t)},d1=function(s,h){var u=-1,p=44;do switch(Ni(p)){case 0:p===38&&Rn()===12&&(h[u]=1),s[u]+=f1($t-1,h,u);break;case 2:s[u]+=sc(p);break;case 4:if(p===44){s[++u]=Rn()===58?"&\f":"",h[u]=s[u].length;break}default:s[u]+=pc(p)}while(p=an());return s},h1=function(s,h){return gh(d1(mh(s),h))},K0=new WeakMap,p1=function(s){if(!(s.type!=="rule"||!s.parent||s.length<1)){for(var h=s.value,u=s.parent,p=s.column===u.column&&s.line===u.line;u.type!=="rule";)if(u=u.parent,!u)return;if(!(s.props.length===1&&h.charCodeAt(0)!==58&&!K0.get(u))&&!p){K0.set(s,!0);for(var g=[],A=h1(h,g),H=u.props,k=0,y=0;k<A.length;k++)for(var Y=0;Y<H.length;Y++,y++)s.props[y]=g[k]?A[k].replace(/&\f/g,H[Y]):H[Y]+" "+A[k]}}},m1=function(s){if(s.type==="decl"){var h=s.value;h.charCodeAt(0)===108&&h.charCodeAt(2)===98&&(s.return="",s.value="")}};function yh(o,s){switch($m(o,s)){case 5103:return Je+"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 Je+o+o;case 5349:case 4246:case 4810:case 6968:case 2756:return Je+o+dc+o+Ht+o+o;case 6828:case 4268:return Je+o+Ht+o+o;case 6165:return Je+o+Ht+"flex-"+o+o;case 5187:return Je+o+Fe(o,/(\w+).+(:[^]+)/,Je+"box-$1$2"+Ht+"flex-$1$2")+o;case 5443:return Je+o+Ht+"flex-item-"+Fe(o,/flex-|-self/,"")+o;case 4675:return Je+o+Ht+"flex-line-pack"+Fe(o,/align-content|flex-|-self/,"")+o;case 5548:return Je+o+Ht+Fe(o,"shrink","negative")+o;case 5292:return Je+o+Ht+Fe(o,"basis","preferred-size")+o;case 6060:return Je+"box-"+Fe(o,"-grow","")+Je+o+Ht+Fe(o,"grow","positive")+o;case 4554:return Je+Fe(o,/([^-])(transform)/g,"$1"+Je+"$2")+o;case 6187:return Fe(Fe(Fe(o,/(zoom-|grab)/,Je+"$1"),/(image-set)/,Je+"$1"),o,"")+o;case 5495:case 3959:return Fe(o,/(image-set\([^]*)/,Je+"$1$`$1");case 4968:return Fe(Fe(o,/(.+:)(flex-)?(.*)/,Je+"box-pack:$3"+Ht+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Je+o+o;case 4095:case 3583:case 4068:case 2532:return Fe(o,/(.+)-inline(.+)/,Je+"$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(kn(o)-1-s>6)switch(Rt(o,s+1)){case 109:if(Rt(o,s+4)!==45)break;case 102:return Fe(o,/(.+:)(.+)-([^]+)/,"$1"+Je+"$2-$3$1"+dc+(Rt(o,s+3)==108?"$3":"$2-$3"))+o;case 115:return~Vs(o,"stretch")?yh(Fe(o,"stretch","fill-available"),s)+o:o}break;case 4949:if(Rt(o,s+1)!==115)break;case 6444:switch(Rt(o,kn(o)-3-(~Vs(o,"!important")&&10))){case 107:return Fe(o,":",":"+Je)+o;case 101:return Fe(o,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Je+(Rt(o,14)===45?"inline-":"")+"box$3$1"+Je+"$2$3$1"+Ht+"$2box$3")+o}break;case 5936:switch(Rt(o,s+11)){case 114:return Je+o+Ht+Fe(o,/[svh]\w+-[tblr]{2}/,"tb")+o;case 108:return Je+o+Ht+Fe(o,/[svh]\w+-[tblr]{2}/,"tb-rl")+o;case 45:return Je+o+Ht+Fe(o,/[svh]\w+-[tblr]{2}/,"lr")+o}return Je+o+Ht+o+o}return o}var g1=function(s,h,u,p){if(s.length>-1&&!s.return)switch(s.type){case Js:s.return=yh(s.value,s.length);break;case dh:return Ha([Oi(s,{value:Fe(s.value,"@","@"+Je)})],p);case Ks:if(s.length)return Im(s.props,function(g){switch(Wm(g,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ha([Oi(s,{props:[Fe(g,/:(read-\w+)/,":"+dc+"$1")]})],p);case"::placeholder":return Ha([Oi(s,{props:[Fe(g,/:(plac\w+)/,":"+Je+"input-$1")]}),Oi(s,{props:[Fe(g,/:(plac\w+)/,":"+dc+"$1")]}),Oi(s,{props:[Fe(g,/:(plac\w+)/,Ht+"input-$1")]})],p)}return""})}},y1=[g1],v1=function(s){var h=s.key;if(h==="css"){var u=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(u,function(V){var me=V.getAttribute("data-emotion");me.indexOf(" ")!==-1&&(document.head.appendChild(V),V.setAttribute("data-s",""))})}var p=s.stylisPlugins||y1,g={},A,H=[];A=s.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+h+' "]'),function(V){for(var me=V.getAttribute("data-emotion").split(" "),F=1;F<me.length;F++)g[me[F]]=!0;H.push(V)});var k,y=[p1,m1];{var Y,O=[c1,s1(function(V){Y.insert(V)})],G=r1(y.concat(p,O)),ie=function(me){return Ha(i1(me),G)};k=function(me,F,ue,$){Y=ue,ie(me?me+"{"+F.styles+"}":F.styles),$&&(_.inserted[F.name]=!0)}}var _={key:h,sheet:new Qm({key:h,container:A,nonce:s.nonce,speedy:s.speedy,prepend:s.prepend,insertionPoint:s.insertionPoint}),nonce:s.nonce,inserted:g,registered:{},insert:k};return _.sheet.hydrate(H),_},Ls={exports:{}},$e={};var J0;function b1(){if(J0)return $e;J0=1;var o=typeof Symbol=="function"&&Symbol.for,s=o?Symbol.for("react.element"):60103,h=o?Symbol.for("react.portal"):60106,u=o?Symbol.for("react.fragment"):60107,p=o?Symbol.for("react.strict_mode"):60108,g=o?Symbol.for("react.profiler"):60114,A=o?Symbol.for("react.provider"):60109,H=o?Symbol.for("react.context"):60110,k=o?Symbol.for("react.async_mode"):60111,y=o?Symbol.for("react.concurrent_mode"):60111,Y=o?Symbol.for("react.forward_ref"):60112,O=o?Symbol.for("react.suspense"):60113,G=o?Symbol.for("react.suspense_list"):60120,ie=o?Symbol.for("react.memo"):60115,_=o?Symbol.for("react.lazy"):60116,V=o?Symbol.for("react.block"):60121,me=o?Symbol.for("react.fundamental"):60117,F=o?Symbol.for("react.responder"):60118,ue=o?Symbol.for("react.scope"):60119;function $(N){if(typeof N=="object"&&N!==null){var ve=N.$$typeof;switch(ve){case s:switch(N=N.type,N){case k:case y:case u:case g:case p:case O:return N;default:switch(N=N&&N.$$typeof,N){case H:case Y:case _:case ie:case A:return N;default:return ve}}case h:return ve}}}function we(N){return $(N)===y}return $e.AsyncMode=k,$e.ConcurrentMode=y,$e.ContextConsumer=H,$e.ContextProvider=A,$e.Element=s,$e.ForwardRef=Y,$e.Fragment=u,$e.Lazy=_,$e.Memo=ie,$e.Portal=h,$e.Profiler=g,$e.StrictMode=p,$e.Suspense=O,$e.isAsyncMode=function(N){return we(N)||$(N)===k},$e.isConcurrentMode=we,$e.isContextConsumer=function(N){return $(N)===H},$e.isContextProvider=function(N){return $(N)===A},$e.isElement=function(N){return typeof N=="object"&&N!==null&&N.$$typeof===s},$e.isForwardRef=function(N){return $(N)===Y},$e.isFragment=function(N){return $(N)===u},$e.isLazy=function(N){return $(N)===_},$e.isMemo=function(N){return $(N)===ie},$e.isPortal=function(N){return $(N)===h},$e.isProfiler=function(N){return $(N)===g},$e.isStrictMode=function(N){return $(N)===p},$e.isSuspense=function(N){return $(N)===O},$e.isValidElementType=function(N){return typeof N=="string"||typeof N=="function"||N===u||N===y||N===g||N===p||N===O||N===G||typeof N=="object"&&N!==null&&(N.$$typeof===_||N.$$typeof===ie||N.$$typeof===A||N.$$typeof===H||N.$$typeof===Y||N.$$typeof===me||N.$$typeof===F||N.$$typeof===ue||N.$$typeof===V)},$e.typeOf=$,$e}var F0;function x1(){return F0||(F0=1,Ls.exports=b1()),Ls.exports}var Us,$0;function S1(){if($0)return Us;$0=1;var o=x1(),s={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},h={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},p={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},g={};g[o.ForwardRef]=u,g[o.Memo]=p;function A(_){return o.isMemo(_)?p:g[_.$$typeof]||s}var H=Object.defineProperty,k=Object.getOwnPropertyNames,y=Object.getOwnPropertySymbols,Y=Object.getOwnPropertyDescriptor,O=Object.getPrototypeOf,G=Object.prototype;function ie(_,V,me){if(typeof V!="string"){if(G){var F=O(V);F&&F!==G&&ie(_,F,me)}var ue=k(V);y&&(ue=ue.concat(y(V)));for(var $=A(_),we=A(V),N=0;N<ue.length;++N){var ve=ue[N];if(!h[ve]&&!(me&&me[ve])&&!(we&&we[ve])&&!($&&$[ve])){var Q=Y(V,ve);try{H(_,ve,Q)}catch{}}}}return _}return Us=ie,Us}S1();var C1=!0;function w1(o,s,h){var u="";return h.split(" ").forEach(function(p){o[p]!==void 0?s.push(o[p]+";"):p&&(u+=p+" ")}),u}var vh=function(s,h,u){var p=s.key+"-"+h.name;(u===!1||C1===!1)&&s.registered[p]===void 0&&(s.registered[p]=h.styles)},z1=function(s,h,u){vh(s,h,u);var p=s.key+"-"+h.name;if(s.inserted[h.name]===void 0){var g=h;do s.insert(h===g?"."+p:"",g,s.sheet,!0),g=g.next;while(g!==void 0)}};function M1(o){for(var s=0,h,u=0,p=o.length;p>=4;++u,p-=4)h=o.charCodeAt(u)&255|(o.charCodeAt(++u)&255)<<8|(o.charCodeAt(++u)&255)<<16|(o.charCodeAt(++u)&255)<<24,h=(h&65535)*1540483477+((h>>>16)*59797<<16),h^=h>>>24,s=(h&65535)*1540483477+((h>>>16)*59797<<16)^(s&65535)*1540483477+((s>>>16)*59797<<16);switch(p){case 3:s^=(o.charCodeAt(u+2)&255)<<16;case 2:s^=(o.charCodeAt(u+1)&255)<<8;case 1:s^=o.charCodeAt(u)&255,s=(s&65535)*1540483477+((s>>>16)*59797<<16)}return s^=s>>>13,s=(s&65535)*1540483477+((s>>>16)*59797<<16),((s^s>>>15)>>>0).toString(36)}var T1={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},A1=/[A-Z]|^ms/g,E1=/_EMO_([^_]+?)_([^]*?)_EMO_/g,bh=function(s){return s.charCodeAt(1)===45},W0=function(s){return s!=null&&typeof s!="boolean"},Hs=u1(function(o){return bh(o)?o:o.replace(A1,"-$&").toLowerCase()}),I0=function(s,h){switch(s){case"animation":case"animationName":if(typeof h=="string")return h.replace(E1,function(u,p,g){return _n={name:p,styles:g,next:_n},p})}return T1[s]!==1&&!bh(s)&&typeof h=="number"&&h!==0?h+"px":h};function ji(o,s,h){if(h==null)return"";var u=h;if(u.__emotion_styles!==void 0)return u;switch(typeof h){case"boolean":return"";case"object":{var p=h;if(p.anim===1)return _n={name:p.name,styles:p.styles,next:_n},p.name;var g=h;if(g.styles!==void 0){var A=g.next;if(A!==void 0)for(;A!==void 0;)_n={name:A.name,styles:A.styles,next:_n},A=A.next;var H=g.styles+";";return H}return D1(o,s,h)}case"function":{if(o!==void 0){var k=_n,y=h(o);return _n=k,ji(o,s,y)}break}}var Y=h;return Y}function D1(o,s,h){var u="";if(Array.isArray(h))for(var p=0;p<h.length;p++)u+=ji(o,s,h[p])+";";else for(var g in h){var A=h[g];if(typeof A!="object"){var H=A;W0(H)&&(u+=Hs(g)+":"+I0(g,H)+";")}else if(Array.isArray(A)&&typeof A[0]=="string"&&s==null)for(var k=0;k<A.length;k++)W0(A[k])&&(u+=Hs(g)+":"+I0(g,A[k])+";");else{var y=ji(o,s,A);switch(g){case"animation":case"animationName":{u+=Hs(g)+":"+y+";";break}default:u+=g+"{"+y+"}"}}}return u}var P0=/label:\s*([^\s;{]+)\s*(;|$)/g,_n;function xh(o,s,h){if(o.length===1&&typeof o[0]=="object"&&o[0]!==null&&o[0].styles!==void 0)return o[0];var u=!0,p="";_n=void 0;var g=o[0];if(g==null||g.raw===void 0)u=!1,p+=ji(h,s,g);else{var A=g;p+=A[0]}for(var H=1;H<o.length;H++)if(p+=ji(h,s,o[H]),u){var k=g;p+=k[H]}P0.lastIndex=0;for(var y="",Y;(Y=P0.exec(p))!==null;)y+="-"+Y[1];var O=M1(p)+y;return{name:O,styles:p,next:_n}}var k1=function(s){return s()},_1=X0.useInsertionEffect?X0.useInsertionEffect:!1,R1=_1||k1,Sh=w.createContext(typeof HTMLElement<"u"?v1({key:"css"}):null);Sh.Provider;var O1=function(s){return w.forwardRef(function(h,u){var p=w.useContext(Sh);return s(h,p,u)})},L1=w.createContext({}),Yi={}.hasOwnProperty,Qs="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",$s=function(s,h){var u={};for(var p in h)Yi.call(h,p)&&(u[p]=h[p]);return u[Qs]=s,u},U1=function(s){var h=s.cache,u=s.serialized,p=s.isStringTag;return vh(h,u,p),R1(function(){return z1(h,u,p)}),null},H1=O1(function(o,s,h){var u=o.css;typeof u=="string"&&s.registered[u]!==void 0&&(u=s.registered[u]);var p=o[Qs],g=[u],A="";typeof o.className=="string"?A=w1(s.registered,g,o.className):o.className!=null&&(A=o.className+" ");var H=xh(g,void 0,w.useContext(L1));A+=s.key+"-"+H.name;var k={};for(var y in o)Yi.call(o,y)&&y!=="css"&&y!==Qs&&(k[y]=o[y]);return k.className=A,h&&(k.ref=h),w.createElement(w.Fragment,null,w.createElement(U1,{cache:s,serialized:H,isStringTag:typeof p=="string"}),w.createElement(p,k))}),Ws=H1,pt=Hi.Fragment,r=function(s,h,u){return Yi.call(h,"css")?Hi.jsx(Ws,$s(s,h),u):Hi.jsx(s,h,u)},S=function(s,h,u){return Yi.call(h,"css")?Hi.jsxs(Ws,$s(s,h),u):Hi.jsxs(s,h,u)},Bs={exports:{}},Li={},Ns={exports:{}},js={};var eh;function B1(){return eh||(eh=1,(function(o){function s(D,j){var P=D.length;D.push(j);e:for(;0<P;){var De=P-1>>>1,Ue=D[De];if(0<p(Ue,j))D[De]=j,D[P]=Ue,P=De;else break e}}function h(D){return D.length===0?null:D[0]}function u(D){if(D.length===0)return null;var j=D[0],P=D.pop();if(P!==j){D[0]=P;e:for(var De=0,Ue=D.length,v=Ue>>>1;De<v;){var U=2*(De+1)-1,Z=D[U],K=U+1,te=D[K];if(0>p(Z,P))K<Ue&&0>p(te,Z)?(D[De]=te,D[K]=P,De=K):(D[De]=Z,D[U]=P,De=U);else if(K<Ue&&0>p(te,P))D[De]=te,D[K]=P,De=K;else break e}}return j}function p(D,j){var P=D.sortIndex-j.sortIndex;return P!==0?P:D.id-j.id}if(o.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var g=performance;o.unstable_now=function(){return g.now()}}else{var A=Date,H=A.now();o.unstable_now=function(){return A.now()-H}}var k=[],y=[],Y=1,O=null,G=3,ie=!1,_=!1,V=!1,me=!1,F=typeof setTimeout=="function"?setTimeout:null,ue=typeof clearTimeout=="function"?clearTimeout:null,$=typeof setImmediate<"u"?setImmediate:null;function we(D){for(var j=h(y);j!==null;){if(j.callback===null)u(y);else if(j.startTime<=D)u(y),j.sortIndex=j.expirationTime,s(k,j);else break;j=h(y)}}function N(D){if(V=!1,we(D),!_)if(h(k)!==null)_=!0,ve||(ve=!0,Se());else{var j=h(y);j!==null&&He(N,j.startTime-D)}}var ve=!1,Q=-1,ae=5,q=-1;function W(){return me?!0:!(o.unstable_now()-q<ae)}function ge(){if(me=!1,ve){var D=o.unstable_now();q=D;var j=!0;try{e:{_=!1,V&&(V=!1,ue(Q),Q=-1),ie=!0;var P=G;try{t:{for(we(D),O=h(k);O!==null&&!(O.expirationTime>D&&W());){var De=O.callback;if(typeof De=="function"){O.callback=null,G=O.priorityLevel;var Ue=De(O.expirationTime<=D);if(D=o.unstable_now(),typeof Ue=="function"){O.callback=Ue,we(D),j=!0;break t}O===h(k)&&u(k),we(D)}else u(k);O=h(k)}if(O!==null)j=!0;else{var v=h(y);v!==null&&He(N,v.startTime-D),j=!1}}break e}finally{O=null,G=P,ie=!1}j=void 0}}finally{j?Se():ve=!1}}}var Se;if(typeof $=="function")Se=function(){$(ge)};else if(typeof MessageChannel<"u"){var le=new MessageChannel,Ae=le.port2;le.port1.onmessage=ge,Se=function(){Ae.postMessage(null)}}else Se=function(){F(ge,0)};function He(D,j){Q=F(function(){D(o.unstable_now())},j)}o.unstable_IdlePriority=5,o.unstable_ImmediatePriority=1,o.unstable_LowPriority=4,o.unstable_NormalPriority=3,o.unstable_Profiling=null,o.unstable_UserBlockingPriority=2,o.unstable_cancelCallback=function(D){D.callback=null},o.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ae=0<D?Math.floor(1e3/D):5},o.unstable_getCurrentPriorityLevel=function(){return G},o.unstable_next=function(D){switch(G){case 1:case 2:case 3:var j=3;break;default:j=G}var P=G;G=j;try{return D()}finally{G=P}},o.unstable_requestPaint=function(){me=!0},o.unstable_runWithPriority=function(D,j){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var P=G;G=D;try{return j()}finally{G=P}},o.unstable_scheduleCallback=function(D,j,P){var De=o.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?De+P:De):P=De,D){case 1:var Ue=-1;break;case 2:Ue=250;break;case 5:Ue=1073741823;break;case 4:Ue=1e4;break;default:Ue=5e3}return Ue=P+Ue,D={id:Y++,callback:j,priorityLevel:D,startTime:P,expirationTime:Ue,sortIndex:-1},P>De?(D.sortIndex=P,s(y,D),h(k)===null&&D===h(y)&&(V?(ue(Q),Q=-1):V=!0,He(N,P-De))):(D.sortIndex=Ue,s(k,D),_||ie||(_=!0,ve||(ve=!0,Se()))),D},o.unstable_shouldYield=W,o.unstable_wrapCallback=function(D){var j=G;return function(){var P=G;G=j;try{return D.apply(this,arguments)}finally{G=P}}}})(js)),js}var th;function N1(){return th||(th=1,Ns.exports=B1()),Ns.exports}var qs={exports:{}},Ut={};var nh;function j1(){if(nh)return Ut;nh=1;var o=Zs();function s(k){var y="https://react.dev/errors/"+k;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var Y=2;Y<arguments.length;Y++)y+="&args[]="+encodeURIComponent(arguments[Y])}return"Minified React error #"+k+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(){}var u={d:{f:h,r:function(){throw Error(s(522))},D:h,C:h,L:h,m:h,X:h,S:h,M:h},p:0,findDOMNode:null},p=Symbol.for("react.portal");function g(k,y,Y){var O=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:p,key:O==null?null:""+O,children:k,containerInfo:y,implementation:Y}}var A=o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function H(k,y){if(k==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return Ut.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Ut.createPortal=function(k,y){var Y=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(s(299));return g(k,y,null,Y)},Ut.flushSync=function(k){var y=A.T,Y=u.p;try{if(A.T=null,u.p=2,k)return k()}finally{A.T=y,u.p=Y,u.d.f()}},Ut.preconnect=function(k,y){typeof k=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,u.d.C(k,y))},Ut.prefetchDNS=function(k){typeof k=="string"&&u.d.D(k)},Ut.preinit=function(k,y){if(typeof k=="string"&&y&&typeof y.as=="string"){var Y=y.as,O=H(Y,y.crossOrigin),G=typeof y.integrity=="string"?y.integrity:void 0,ie=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;Y==="style"?u.d.S(k,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:O,integrity:G,fetchPriority:ie}):Y==="script"&&u.d.X(k,{crossOrigin:O,integrity:G,fetchPriority:ie,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},Ut.preinitModule=function(k,y){if(typeof k=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var Y=H(y.as,y.crossOrigin);u.d.M(k,{crossOrigin:Y,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0})}}else y==null&&u.d.M(k)},Ut.preload=function(k,y){if(typeof k=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var Y=y.as,O=H(Y,y.crossOrigin);u.d.L(k,Y,{crossOrigin:O,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},Ut.preloadModule=function(k,y){if(typeof k=="string")if(y){var Y=H(y.as,y.crossOrigin);u.d.m(k,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:Y,integrity:typeof y.integrity=="string"?y.integrity:void 0})}else u.d.m(k)},Ut.requestFormReset=function(k){u.d.r(k)},Ut.unstable_batchedUpdates=function(k,y){return k(y)},Ut.useFormState=function(k,y,Y){return A.H.useFormState(k,y,Y)},Ut.useFormStatus=function(){return A.H.useHostTransitionStatus()},Ut.version="19.2.4",Ut}var lh;function q1(){if(lh)return qs.exports;lh=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(s){console.error(s)}}return o(),qs.exports=j1(),qs.exports}var ah;function Y1(){if(ah)return Li;ah=1;var o=N1(),s=Zs(),h=q1();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 p(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function g(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 A(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 H(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 k(e){if(g(e)!==e)throw Error(u(188))}function y(e){var t=e.alternate;if(!t){if(t=g(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,l=t;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return k(a),e;if(i===l)return k(a),t;i=i.sibling}throw Error(u(188))}if(n.return!==l.return)n=a,l=i;else{for(var c=!1,d=a.child;d;){if(d===n){c=!0,n=a,l=i;break}if(d===l){c=!0,l=a,n=i;break}d=d.sibling}if(!c){for(d=i.child;d;){if(d===n){c=!0,n=i,l=a;break}if(d===l){c=!0,l=i,n=a;break}d=d.sibling}if(!c)throw Error(u(189))}}if(n.alternate!==l)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function Y(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=Y(e),t!==null)return t;e=e.sibling}return null}var O=Object.assign,G=Symbol.for("react.element"),ie=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),me=Symbol.for("react.strict_mode"),F=Symbol.for("react.profiler"),ue=Symbol.for("react.consumer"),$=Symbol.for("react.context"),we=Symbol.for("react.forward_ref"),N=Symbol.for("react.suspense"),ve=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),ae=Symbol.for("react.lazy"),q=Symbol.for("react.activity"),W=Symbol.for("react.memo_cache_sentinel"),ge=Symbol.iterator;function Se(e){return e===null||typeof e!="object"?null:(e=ge&&e[ge]||e["@@iterator"],typeof e=="function"?e:null)}var le=Symbol.for("react.client.reference");function Ae(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===le?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case V:return"Fragment";case F:return"Profiler";case me:return"StrictMode";case N:return"Suspense";case ve:return"SuspenseList";case q:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case _:return"Portal";case $:return e.displayName||"Context";case ue:return(e._context.displayName||"Context")+".Consumer";case we:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Q:return t=e.displayName||null,t!==null?t:Ae(e.type)||"Memo";case ae:t=e._payload,e=e._init;try{return Ae(e(t))}catch{}}return null}var He=Array.isArray,D=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,j=h.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},De=[],Ue=-1;function v(e){return{current:e}}function U(e){0>Ue||(e.current=De[Ue],De[Ue]=null,Ue--)}function Z(e,t){Ue++,De[Ue]=e.current,e.current=t}var K=v(null),te=v(null),ze=v(null),he=v(null);function ot(e,t){switch(Z(ze,t),Z(te,e),Z(K,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?s0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=s0(t),e=u0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(K),Z(K,e)}function Ye(){U(K),U(te),U(ze)}function Vt(e){e.memoizedState!==null&&Z(he,e);var t=K.current,n=u0(t,e.type);t!==n&&(Z(te,e),Z(K,n))}function be(e){te.current===e&&(U(K),U(te)),he.current===e&&(U(he),Ei._currentValue=P)}var nt,Bt;function oe(e){if(nt===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);nt=t&&t[1]||"",Bt=-1<n.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+nt+e+Bt}var at=!1;function Ot(e,t){if(!e||at)return"";at=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var B=function(){throw Error()};if(Object.defineProperty(B.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(B,[])}catch(E){var T=E}Reflect.construct(e,[],B)}else{try{B.call()}catch(E){T=E}e.call(B.prototype)}}else{try{throw Error()}catch(E){T=E}(B=e())&&typeof B.catch=="function"&&B.catch(function(){})}}catch(E){if(E&&T&&typeof E.stack=="string")return[E.stack,T.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),c=i[0],d=i[1];if(c&&d){var m=c.split(`
|
|
4
|
+
`),M=d.split(`
|
|
5
|
+
`);for(a=l=0;l<m.length&&!m[l].includes("DetermineComponentFrameRoot");)l++;for(;a<M.length&&!M[a].includes("DetermineComponentFrameRoot");)a++;if(l===m.length||a===M.length)for(l=m.length-1,a=M.length-1;1<=l&&0<=a&&m[l]!==M[a];)a--;for(;1<=l&&0<=a;l--,a--)if(m[l]!==M[a]){if(l!==1||a!==1)do if(l--,a--,0>a||m[l]!==M[a]){var R=`
|
|
6
|
+
`+m[l].replace(" at new "," at ");return e.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",e.displayName)),R}while(1<=l&&0<=a);break}}}finally{at=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?oe(n):""}function on(e,t){switch(e.tag){case 26:case 27:case 5:return oe(e.type);case 16:return oe("Lazy");case 13:return e.child!==t&&t!==null?oe("Suspense Fallback"):oe("Suspense");case 19:return oe("SuspenseList");case 0:case 15:return Ot(e.type,!1);case 11:return Ot(e.type.render,!1);case 1:return Ot(e.type,!0);case 31:return oe("Activity");default:return""}}function Ln(e){try{var t="",n=null;do t+=on(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
|
|
7
|
+
Error generating stack: `+l.message+`
|
|
8
|
+
`+l.stack}}var $l=Object.prototype.hasOwnProperty,tl=o.unstable_scheduleCallback,Lt=o.unstable_cancelCallback,Dl=o.unstable_shouldYield,Cn=o.unstable_requestPaint,Tt=o.unstable_now,qa=o.unstable_getCurrentPriorityLevel,yt=o.unstable_ImmediatePriority,nl=o.unstable_UserBlockingPriority,ll=o.unstable_NormalPriority,vc=o.unstable_LowPriority,Ya=o.unstable_IdlePriority,bc=o.log,xc=o.unstable_setDisableYieldValue,kl=null,Nt=null;function wn(e){if(typeof bc=="function"&&xc(e),Nt&&typeof Nt.setStrictMode=="function")try{Nt.setStrictMode(kl,e)}catch{}}var jt=Math.clz32?Math.clz32:Cc,Vi=Math.log,Sc=Math.LN2;function Cc(e){return e>>>=0,e===0?32:31-(Vi(e)/Sc|0)|0}var Wl=256,Il=262144,Pl=4194304;function Un(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 ea(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var a=0,i=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var d=l&134217727;return d!==0?(l=d&~i,l!==0?a=Un(l):(c&=d,c!==0?a=Un(c):n||(n=d&~e,n!==0&&(a=Un(n))))):(d=l&~i,d!==0?a=Un(d):c!==0?a=Un(c):n||(n=l&~e,n!==0&&(a=Un(n)))),a===0?0:t!==0&&t!==a&&(t&i)===0&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function _l(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function wc(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 Xi(){var e=Pl;return Pl<<=1,(Pl&62914560)===0&&(Pl=4194304),e}function ta(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function yn(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function zc(e,t,n,l,a,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 d=e.entanglements,m=e.expirationTimes,M=e.hiddenUpdates;for(n=c&~n;0<n;){var R=31-jt(n),B=1<<R;d[R]=0,m[R]=-1;var T=M[R];if(T!==null)for(M[R]=null,R=0;R<T.length;R++){var E=T[R];E!==null&&(E.lane&=-536870913)}n&=~B}l!==0&&Qi(e,l,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(c&~t))}function Qi(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-jt(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function vn(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-jt(n),a=1<<l;a&t|e[l]&t&&(e[l]|=t),n&=~a}}function Zi(e,t){var n=t&-t;return n=(n&42)!==0?1:zn(n),(n&(e.suspendedLanes|t))!==0?0:n}function zn(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Mn(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Hn(){var e=j.p;return e!==0?e:(e=window.event,e===void 0?32:O0(e.type))}function Ga(e,t){var n=j.p;try{return j.p=e,t()}finally{j.p=n}}var qt=Math.random().toString(36).slice(2),st="__reactFiber$"+qt,At="__reactProps$"+qt,al="__reactContainer$"+qt,Va="__reactEvents$"+qt,Ki="__reactListeners$"+qt,fe="__reactHandles$"+qt,I="__reactResources$"+qt,pe="__reactMarker$"+qt;function Le(e){delete e[st],delete e[At],delete e[Va],delete e[Ki],delete e[fe]}function ke(e){var t=e[st];if(t)return t;for(var n=e.parentNode;n;){if(t=n[al]||n[st]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=y0(e);e!==null;){if(n=e[st])return n;e=y0(e)}return t}e=n,n=e.parentNode}return null}function Te(e){if(e=e[st]||e[al]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ze(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Ve(e){var t=e[I];return t||(t=e[I]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function re(e){e[pe]=!0}var Yt=new Set,Xa={};function Rl(e,t){na(e,t),na(e+"Capture",t)}function na(e,t){for(Xa[e]=t,e=0;e<t.length;e++)Yt.add(t[e])}var Dh=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]*$"),Is={},Ps={};function kh(e){return $l.call(Ps,e)?!0:$l.call(Is,e)?!1:Dh.test(e)?Ps[e]=!0:(Is[e]=!0,!1)}function Ji(e,t,n){if(kh(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Fi(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 Bn(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function cn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function eu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _h(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var a=l.get,i=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(c){n=""+c,i.call(this,c)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(c){n=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Mc(e){if(!e._valueTracker){var t=eu(e)?"checked":"value";e._valueTracker=_h(e,t,""+e[t])}}function tu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=eu(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function $i(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 Rh=/[\n"\\]/g;function rn(e){return e.replace(Rh,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Tc(e,t,n,l,a,i,c,d){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=""+cn(t)):e.value!==""+cn(t)&&(e.value=""+cn(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?Ac(e,c,cn(t)):n!=null?Ac(e,c,cn(n)):l!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.name=""+cn(d):e.removeAttribute("name")}function nu(e,t,n,l,a,i,c,d){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)){Mc(e);return}n=n!=null?""+cn(n):"",t=t!=null?""+cn(t):n,d||t===e.value||(e.value=t),e.defaultValue=t}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=d?e.checked:!!l,e.defaultChecked=!!l,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),Mc(e)}function Ac(e,t,n){t==="number"&&$i(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function la(e,t,n,l){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&l&&(e[n].defaultSelected=!0)}else{for(n=""+cn(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,l&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function lu(e,t,n){if(t!=null&&(t=""+cn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+cn(n):""}function au(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(u(92));if(He(l)){if(1<l.length)throw Error(u(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=cn(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),Mc(e)}function aa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Oh=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 iu(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||Oh.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function ou(e,t,n){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var a in t)l=t[a],t.hasOwnProperty(a)&&n[a]!==l&&iu(e,a,l)}else for(var i in t)t.hasOwnProperty(i)&&iu(e,i,t[i])}function Ec(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 Lh=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"]]),Uh=/^[\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 Wi(e){return Uh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Nn(){}var Dc=null;function kc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ia=null,oa=null;function cu(e){var t=Te(e);if(t&&(e=t.stateNode)){var n=e[At]||null;e:switch(e=t.stateNode,t.type){case"input":if(Tc(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="'+rn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var a=l[At]||null;if(!a)throw Error(u(90));Tc(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&tu(l)}break e;case"textarea":lu(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&la(e,!!n.multiple,t,!1)}}}var _c=!1;function ru(e,t,n){if(_c)return e(t,n);_c=!0;try{var l=e(t);return l}finally{if(_c=!1,(ia!==null||oa!==null)&&(jo(),ia&&(t=ia,e=oa,oa=ia=null,cu(t),e)))for(t=0;t<e.length;t++)cu(e[t])}}function Qa(e,t){var n=e.stateNode;if(n===null)return null;var l=n[At]||null;if(l===null)return null;n=l[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":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(u(231,t,typeof n));return n}var jn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Rc=!1;if(jn)try{var Za={};Object.defineProperty(Za,"passive",{get:function(){Rc=!0}}),window.addEventListener("test",Za,Za),window.removeEventListener("test",Za,Za)}catch{Rc=!1}var il=null,Oc=null,Ii=null;function su(){if(Ii)return Ii;var e,t=Oc,n=t.length,l,a="value"in il?il.value:il.textContent,i=a.length;for(e=0;e<n&&t[e]===a[e];e++);var c=n-e;for(l=1;l<=c&&t[n-l]===a[i-l];l++);return Ii=a.slice(e,1<l?1-l:void 0)}function Pi(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 eo(){return!0}function uu(){return!1}function Xt(e){function t(n,l,a,i,c){this._reactName=n,this._targetInst=a,this.type=l,this.nativeEvent=i,this.target=c,this.currentTarget=null;for(var d in e)e.hasOwnProperty(d)&&(n=e[d],this[d]=n?n(i):i[d]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?eo:uu,this.isPropagationStopped=uu,this}return O(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=eo)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=eo)},persist:function(){},isPersistent:eo}),t}var Ol={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},to=Xt(Ol),Ka=O({},Ol,{view:0,detail:0}),Hh=Xt(Ka),Lc,Uc,Ja,no=O({},Ka,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bc,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!==Ja&&(Ja&&e.type==="mousemove"?(Lc=e.screenX-Ja.screenX,Uc=e.screenY-Ja.screenY):Uc=Lc=0,Ja=e),Lc)},movementY:function(e){return"movementY"in e?e.movementY:Uc}}),fu=Xt(no),Bh=O({},no,{dataTransfer:0}),Nh=Xt(Bh),jh=O({},Ka,{relatedTarget:0}),Hc=Xt(jh),qh=O({},Ol,{animationName:0,elapsedTime:0,pseudoElement:0}),Yh=Xt(qh),Gh=O({},Ol,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Vh=Xt(Gh),Xh=O({},Ol,{data:0}),du=Xt(Xh),Qh={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Zh={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"},Kh={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Jh(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Kh[e])?!!t[e]:!1}function Bc(){return Jh}var Fh=O({},Ka,{key:function(e){if(e.key){var t=Qh[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Pi(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Zh[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bc,charCode:function(e){return e.type==="keypress"?Pi(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Pi(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),$h=Xt(Fh),Wh=O({},no,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),hu=Xt(Wh),Ih=O({},Ka,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bc}),Ph=Xt(Ih),ep=O({},Ol,{propertyName:0,elapsedTime:0,pseudoElement:0}),tp=Xt(ep),np=O({},no,{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}),lp=Xt(np),ap=O({},Ol,{newState:0,oldState:0}),ip=Xt(ap),op=[9,13,27,32],Nc=jn&&"CompositionEvent"in window,Fa=null;jn&&"documentMode"in document&&(Fa=document.documentMode);var cp=jn&&"TextEvent"in window&&!Fa,pu=jn&&(!Nc||Fa&&8<Fa&&11>=Fa),mu=" ",gu=!1;function yu(e,t){switch(e){case"keyup":return op.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function vu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ca=!1;function rp(e,t){switch(e){case"compositionend":return vu(t);case"keypress":return t.which!==32?null:(gu=!0,mu);case"textInput":return e=t.data,e===mu&&gu?null:e;default:return null}}function sp(e,t){if(ca)return e==="compositionend"||!Nc&&yu(e,t)?(e=su(),Ii=Oc=il=null,ca=!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 pu&&t.locale!=="ko"?null:t.data;default:return null}}var up={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 bu(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!up[e.type]:t==="textarea"}function xu(e,t,n,l){ia?oa?oa.push(l):oa=[l]:ia=l,t=Zo(t,"onChange"),0<t.length&&(n=new to("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var $a=null,Wa=null;function fp(e){l0(e,0)}function lo(e){var t=Ze(e);if(tu(t))return e}function Su(e,t){if(e==="change")return t}var Cu=!1;if(jn){var jc;if(jn){var qc="oninput"in document;if(!qc){var wu=document.createElement("div");wu.setAttribute("oninput","return;"),qc=typeof wu.oninput=="function"}jc=qc}else jc=!1;Cu=jc&&(!document.documentMode||9<document.documentMode)}function zu(){$a&&($a.detachEvent("onpropertychange",Mu),Wa=$a=null)}function Mu(e){if(e.propertyName==="value"&&lo(Wa)){var t=[];xu(t,Wa,e,kc(e)),ru(fp,t)}}function dp(e,t,n){e==="focusin"?(zu(),$a=t,Wa=n,$a.attachEvent("onpropertychange",Mu)):e==="focusout"&&zu()}function hp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return lo(Wa)}function pp(e,t){if(e==="click")return lo(t)}function mp(e,t){if(e==="input"||e==="change")return lo(t)}function gp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Wt=typeof Object.is=="function"?Object.is:gp;function Ia(e,t){if(Wt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var a=n[l];if(!$l.call(t,a)||!Wt(e[a],t[a]))return!1}return!0}function Tu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Au(e,t){var n=Tu(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Tu(n)}}function Eu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Eu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Du(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=$i(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=$i(e.document)}return t}function Yc(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 yp=jn&&"documentMode"in document&&11>=document.documentMode,ra=null,Gc=null,Pa=null,Vc=!1;function ku(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Vc||ra==null||ra!==$i(l)||(l=ra,"selectionStart"in l&&Yc(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Pa&&Ia(Pa,l)||(Pa=l,l=Zo(Gc,"onSelect"),0<l.length&&(t=new to("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=ra)))}function Ll(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var sa={animationend:Ll("Animation","AnimationEnd"),animationiteration:Ll("Animation","AnimationIteration"),animationstart:Ll("Animation","AnimationStart"),transitionrun:Ll("Transition","TransitionRun"),transitionstart:Ll("Transition","TransitionStart"),transitioncancel:Ll("Transition","TransitionCancel"),transitionend:Ll("Transition","TransitionEnd")},Xc={},_u={};jn&&(_u=document.createElement("div").style,"AnimationEvent"in window||(delete sa.animationend.animation,delete sa.animationiteration.animation,delete sa.animationstart.animation),"TransitionEvent"in window||delete sa.transitionend.transition);function Ul(e){if(Xc[e])return Xc[e];if(!sa[e])return e;var t=sa[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in _u)return Xc[e]=t[n];return e}var Ru=Ul("animationend"),Ou=Ul("animationiteration"),Lu=Ul("animationstart"),vp=Ul("transitionrun"),bp=Ul("transitionstart"),xp=Ul("transitioncancel"),Uu=Ul("transitionend"),Hu=new Map,Qc="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(" ");Qc.push("scrollEnd");function bn(e,t){Hu.set(e,t),Rl(t,[e])}var ao=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)},sn=[],ua=0,Zc=0;function io(){for(var e=ua,t=Zc=ua=0;t<e;){var n=sn[t];sn[t++]=null;var l=sn[t];sn[t++]=null;var a=sn[t];sn[t++]=null;var i=sn[t];if(sn[t++]=null,l!==null&&a!==null){var c=l.pending;c===null?a.next=a:(a.next=c.next,c.next=a),l.pending=a}i!==0&&Bu(n,a,i)}}function oo(e,t,n,l){sn[ua++]=e,sn[ua++]=t,sn[ua++]=n,sn[ua++]=l,Zc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Kc(e,t,n,l){return oo(e,t,n,l),co(e)}function Hl(e,t){return oo(e,null,null,t),co(e)}function Bu(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var a=!1,i=e.return;i!==null;)i.childLanes|=n,l=i.alternate,l!==null&&(l.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(a=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,a&&t!==null&&(a=31-jt(n),e=i.hiddenUpdates,l=e[a],l===null?e[a]=[t]:l.push(t),t.lane=n|536870912),i):null}function co(e){if(50<Si)throw Si=0,ns=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var fa={};function Sp(e,t,n,l){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=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function It(e,t,n,l){return new Sp(e,t,n,l)}function Jc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qn(e,t){var n=e.alternate;return n===null?(n=It(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 Nu(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 ro(e,t,n,l,a,i){var c=0;if(l=e,typeof e=="function")Jc(e)&&(c=1);else if(typeof e=="string")c=Tm(e,n,K.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case q:return e=It(31,n,t,a),e.elementType=q,e.lanes=i,e;case V:return Bl(n.children,a,i,t);case me:c=8,a|=24;break;case F:return e=It(12,n,t,a|2),e.elementType=F,e.lanes=i,e;case N:return e=It(13,n,t,a),e.elementType=N,e.lanes=i,e;case ve:return e=It(19,n,t,a),e.elementType=ve,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case $:c=10;break e;case ue:c=9;break e;case we:c=11;break e;case Q:c=14;break e;case ae:c=16,l=null;break e}c=29,n=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=It(c,n,t,a),t.elementType=e,t.type=l,t.lanes=i,t}function Bl(e,t,n,l){return e=It(7,e,l,t),e.lanes=n,e}function Fc(e,t,n){return e=It(6,e,null,t),e.lanes=n,e}function ju(e){var t=It(18,null,null,0);return t.stateNode=e,t}function $c(e,t,n){return t=It(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var qu=new WeakMap;function un(e,t){if(typeof e=="object"&&e!==null){var n=qu.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Ln(t)},qu.set(e,t),t)}return{value:e,source:t,stack:Ln(t)}}var da=[],ha=0,so=null,ei=0,fn=[],dn=0,ol=null,Tn=1,An="";function Yn(e,t){da[ha++]=ei,da[ha++]=so,so=e,ei=t}function Yu(e,t,n){fn[dn++]=Tn,fn[dn++]=An,fn[dn++]=ol,ol=e;var l=Tn;e=An;var a=32-jt(l)-1;l&=~(1<<a),n+=1;var i=32-jt(t)+a;if(30<i){var c=a-a%5;i=(l&(1<<c)-1).toString(32),l>>=c,a-=c,Tn=1<<32-jt(t)+a|n<<a|l,An=i+e}else Tn=1<<i|n<<a|l,An=e}function Wc(e){e.return!==null&&(Yn(e,1),Yu(e,1,0))}function Ic(e){for(;e===so;)so=da[--ha],da[ha]=null,ei=da[--ha],da[ha]=null;for(;e===ol;)ol=fn[--dn],fn[dn]=null,An=fn[--dn],fn[dn]=null,Tn=fn[--dn],fn[dn]=null}function Gu(e,t){fn[dn++]=Tn,fn[dn++]=An,fn[dn++]=ol,Tn=t.id,An=t.overflow,ol=e}var Et=null,ct=null,Ge=!1,cl=null,hn=!1,Pc=Error(u(519));function rl(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ti(un(t,e)),Pc}function Vu(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[st]=e,t[At]=l,n){case"dialog":Ne("cancel",t),Ne("close",t);break;case"iframe":case"object":case"embed":Ne("load",t);break;case"video":case"audio":for(n=0;n<wi.length;n++)Ne(wi[n],t);break;case"source":Ne("error",t);break;case"img":case"image":case"link":Ne("error",t),Ne("load",t);break;case"details":Ne("toggle",t);break;case"input":Ne("invalid",t),nu(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":Ne("invalid",t);break;case"textarea":Ne("invalid",t),au(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||c0(t.textContent,n)?(l.popover!=null&&(Ne("beforetoggle",t),Ne("toggle",t)),l.onScroll!=null&&Ne("scroll",t),l.onScrollEnd!=null&&Ne("scrollend",t),l.onClick!=null&&(t.onclick=Nn),t=!0):t=!1,t||rl(e,!0)}function Xu(e){for(Et=e.return;Et;)switch(Et.tag){case 5:case 31:case 13:hn=!1;return;case 27:case 3:hn=!0;return;default:Et=Et.return}}function pa(e){if(e!==Et)return!1;if(!Ge)return Xu(e),Ge=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||ys(e.type,e.memoizedProps)),n=!n),n&&ct&&rl(e),Xu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));ct=g0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));ct=g0(e)}else t===27?(t=ct,Cl(e.type)?(e=Cs,Cs=null,ct=e):ct=t):ct=Et?mn(e.stateNode.nextSibling):null;return!0}function Nl(){ct=Et=null,Ge=!1}function er(){var e=cl;return e!==null&&(Jt===null?Jt=e:Jt.push.apply(Jt,e),cl=null),e}function ti(e){cl===null?cl=[e]:cl.push(e)}var tr=v(null),jl=null,Gn=null;function sl(e,t,n){Z(tr,t._currentValue),t._currentValue=n}function Vn(e){e._currentValue=tr.current,U(tr)}function nr(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function lr(e,t,n,l){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var i=a.dependencies;if(i!==null){var c=a.child;i=i.firstContext;e:for(;i!==null;){var d=i;i=a;for(var m=0;m<t.length;m++)if(d.context===t[m]){i.lanes|=n,d=i.alternate,d!==null&&(d.lanes|=n),nr(i.return,n,e),l||(c=null);break e}i=d.next}}else if(a.tag===18){if(c=a.return,c===null)throw Error(u(341));c.lanes|=n,i=c.alternate,i!==null&&(i.lanes|=n),nr(c,n,e),c=null}else c=a.child;if(c!==null)c.return=a;else for(c=a;c!==null;){if(c===e){c=null;break}if(a=c.sibling,a!==null){a.return=c.return,c=a;break}c=c.return}a=c}}function ma(e,t,n,l){e=null;for(var a=t,i=!1;a!==null;){if(!i){if((a.flags&524288)!==0)i=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var c=a.alternate;if(c===null)throw Error(u(387));if(c=c.memoizedProps,c!==null){var d=a.type;Wt(a.pendingProps.value,c.value)||(e!==null?e.push(d):e=[d])}}else if(a===he.current){if(c=a.alternate,c===null)throw Error(u(387));c.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(Ei):e=[Ei])}a=a.return}e!==null&&lr(t,e,n,l),t.flags|=262144}function uo(e){for(e=e.firstContext;e!==null;){if(!Wt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ql(e){jl=e,Gn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Dt(e){return Qu(jl,e)}function fo(e,t){return jl===null&&ql(e),Qu(e,t)}function Qu(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Gn===null){if(e===null)throw Error(u(308));Gn=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Gn=Gn.next=t;return n}var Cp=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},wp=o.unstable_scheduleCallback,zp=o.unstable_NormalPriority,vt={$$typeof:$,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ar(){return{controller:new Cp,data:new Map,refCount:0}}function ni(e){e.refCount--,e.refCount===0&&wp(zp,function(){e.controller.abort()})}var li=null,ir=0,ga=0,ya=null;function Mp(e,t){if(li===null){var n=li=[];ir=0,ga=rs(),ya={status:"pending",value:void 0,then:function(l){n.push(l)}}}return ir++,t.then(Zu,Zu),t}function Zu(){if(--ir===0&&li!==null){ya!==null&&(ya.status="fulfilled");var e=li;li=null,ga=0,ya=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Tp(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(l.status="rejected",l.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),l}var Ku=D.S;D.S=function(e,t){_d=Tt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Mp(e,t),Ku!==null&&Ku(e,t)};var Yl=v(null);function or(){var e=Yl.current;return e!==null?e:lt.pooledCache}function ho(e,t){t===null?Z(Yl,Yl.current):Z(Yl,t.pool)}function Ju(){var e=or();return e===null?null:{parent:vt._currentValue,pool:e}}var va=Error(u(460)),cr=Error(u(474)),po=Error(u(542)),mo={then:function(){}};function Fu(e){return e=e.status,e==="fulfilled"||e==="rejected"}function $u(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Nn,Nn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Iu(e),e;default:if(typeof t.status=="string")t.then(Nn,Nn);else{if(e=lt,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=l}},function(l){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Iu(e),e}throw Vl=t,va}}function Gl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Vl=n,va):n}}var Vl=null;function Wu(){if(Vl===null)throw Error(u(459));var e=Vl;return Vl=null,e}function Iu(e){if(e===va||e===po)throw Error(u(483))}var ba=null,ai=0;function go(e){var t=ai;return ai+=1,ba===null&&(ba=[]),$u(ba,e,t)}function ii(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function yo(e,t){throw t.$$typeof===G?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Pu(e){function t(C,b){if(e){var z=C.deletions;z===null?(C.deletions=[b],C.flags|=16):z.push(b)}}function n(C,b){if(!e)return null;for(;b!==null;)t(C,b),b=b.sibling;return null}function l(C){for(var b=new Map;C!==null;)C.key!==null?b.set(C.key,C):b.set(C.index,C),C=C.sibling;return b}function a(C,b){return C=qn(C,b),C.index=0,C.sibling=null,C}function i(C,b,z){return C.index=z,e?(z=C.alternate,z!==null?(z=z.index,z<b?(C.flags|=67108866,b):z):(C.flags|=67108866,b)):(C.flags|=1048576,b)}function c(C){return e&&C.alternate===null&&(C.flags|=67108866),C}function d(C,b,z,L){return b===null||b.tag!==6?(b=Fc(z,C.mode,L),b.return=C,b):(b=a(b,z),b.return=C,b)}function m(C,b,z,L){var xe=z.type;return xe===V?R(C,b,z.props.children,L,z.key):b!==null&&(b.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===ae&&Gl(xe)===b.type)?(b=a(b,z.props),ii(b,z),b.return=C,b):(b=ro(z.type,z.key,z.props,null,C.mode,L),ii(b,z),b.return=C,b)}function M(C,b,z,L){return b===null||b.tag!==4||b.stateNode.containerInfo!==z.containerInfo||b.stateNode.implementation!==z.implementation?(b=$c(z,C.mode,L),b.return=C,b):(b=a(b,z.children||[]),b.return=C,b)}function R(C,b,z,L,xe){return b===null||b.tag!==7?(b=Bl(z,C.mode,L,xe),b.return=C,b):(b=a(b,z),b.return=C,b)}function B(C,b,z){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return b=Fc(""+b,C.mode,z),b.return=C,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case ie:return z=ro(b.type,b.key,b.props,null,C.mode,z),ii(z,b),z.return=C,z;case _:return b=$c(b,C.mode,z),b.return=C,b;case ae:return b=Gl(b),B(C,b,z)}if(He(b)||Se(b))return b=Bl(b,C.mode,z,null),b.return=C,b;if(typeof b.then=="function")return B(C,go(b),z);if(b.$$typeof===$)return B(C,fo(C,b),z);yo(C,b)}return null}function T(C,b,z,L){var xe=b!==null?b.key:null;if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return xe!==null?null:d(C,b,""+z,L);if(typeof z=="object"&&z!==null){switch(z.$$typeof){case ie:return z.key===xe?m(C,b,z,L):null;case _:return z.key===xe?M(C,b,z,L):null;case ae:return z=Gl(z),T(C,b,z,L)}if(He(z)||Se(z))return xe!==null?null:R(C,b,z,L,null);if(typeof z.then=="function")return T(C,b,go(z),L);if(z.$$typeof===$)return T(C,b,fo(C,z),L);yo(C,z)}return null}function E(C,b,z,L,xe){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return C=C.get(z)||null,d(b,C,""+L,xe);if(typeof L=="object"&&L!==null){switch(L.$$typeof){case ie:return C=C.get(L.key===null?z:L.key)||null,m(b,C,L,xe);case _:return C=C.get(L.key===null?z:L.key)||null,M(b,C,L,xe);case ae:return L=Gl(L),E(C,b,z,L,xe)}if(He(L)||Se(L))return C=C.get(z)||null,R(b,C,L,xe,null);if(typeof L.then=="function")return E(C,b,z,go(L),xe);if(L.$$typeof===$)return E(C,b,z,fo(b,L),xe);yo(b,L)}return null}function ce(C,b,z,L){for(var xe=null,Xe=null,de=b,Oe=b=0,qe=null;de!==null&&Oe<z.length;Oe++){de.index>Oe?(qe=de,de=null):qe=de.sibling;var Qe=T(C,de,z[Oe],L);if(Qe===null){de===null&&(de=qe);break}e&&de&&Qe.alternate===null&&t(C,de),b=i(Qe,b,Oe),Xe===null?xe=Qe:Xe.sibling=Qe,Xe=Qe,de=qe}if(Oe===z.length)return n(C,de),Ge&&Yn(C,Oe),xe;if(de===null){for(;Oe<z.length;Oe++)de=B(C,z[Oe],L),de!==null&&(b=i(de,b,Oe),Xe===null?xe=de:Xe.sibling=de,Xe=de);return Ge&&Yn(C,Oe),xe}for(de=l(de);Oe<z.length;Oe++)qe=E(de,C,Oe,z[Oe],L),qe!==null&&(e&&qe.alternate!==null&&de.delete(qe.key===null?Oe:qe.key),b=i(qe,b,Oe),Xe===null?xe=qe:Xe.sibling=qe,Xe=qe);return e&&de.forEach(function(Al){return t(C,Al)}),Ge&&Yn(C,Oe),xe}function Ce(C,b,z,L){if(z==null)throw Error(u(151));for(var xe=null,Xe=null,de=b,Oe=b=0,qe=null,Qe=z.next();de!==null&&!Qe.done;Oe++,Qe=z.next()){de.index>Oe?(qe=de,de=null):qe=de.sibling;var Al=T(C,de,Qe.value,L);if(Al===null){de===null&&(de=qe);break}e&&de&&Al.alternate===null&&t(C,de),b=i(Al,b,Oe),Xe===null?xe=Al:Xe.sibling=Al,Xe=Al,de=qe}if(Qe.done)return n(C,de),Ge&&Yn(C,Oe),xe;if(de===null){for(;!Qe.done;Oe++,Qe=z.next())Qe=B(C,Qe.value,L),Qe!==null&&(b=i(Qe,b,Oe),Xe===null?xe=Qe:Xe.sibling=Qe,Xe=Qe);return Ge&&Yn(C,Oe),xe}for(de=l(de);!Qe.done;Oe++,Qe=z.next())Qe=E(de,C,Oe,Qe.value,L),Qe!==null&&(e&&Qe.alternate!==null&&de.delete(Qe.key===null?Oe:Qe.key),b=i(Qe,b,Oe),Xe===null?xe=Qe:Xe.sibling=Qe,Xe=Qe);return e&&de.forEach(function(Bm){return t(C,Bm)}),Ge&&Yn(C,Oe),xe}function tt(C,b,z,L){if(typeof z=="object"&&z!==null&&z.type===V&&z.key===null&&(z=z.props.children),typeof z=="object"&&z!==null){switch(z.$$typeof){case ie:e:{for(var xe=z.key;b!==null;){if(b.key===xe){if(xe=z.type,xe===V){if(b.tag===7){n(C,b.sibling),L=a(b,z.props.children),L.return=C,C=L;break e}}else if(b.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===ae&&Gl(xe)===b.type){n(C,b.sibling),L=a(b,z.props),ii(L,z),L.return=C,C=L;break e}n(C,b);break}else t(C,b);b=b.sibling}z.type===V?(L=Bl(z.props.children,C.mode,L,z.key),L.return=C,C=L):(L=ro(z.type,z.key,z.props,null,C.mode,L),ii(L,z),L.return=C,C=L)}return c(C);case _:e:{for(xe=z.key;b!==null;){if(b.key===xe)if(b.tag===4&&b.stateNode.containerInfo===z.containerInfo&&b.stateNode.implementation===z.implementation){n(C,b.sibling),L=a(b,z.children||[]),L.return=C,C=L;break e}else{n(C,b);break}else t(C,b);b=b.sibling}L=$c(z,C.mode,L),L.return=C,C=L}return c(C);case ae:return z=Gl(z),tt(C,b,z,L)}if(He(z))return ce(C,b,z,L);if(Se(z)){if(xe=Se(z),typeof xe!="function")throw Error(u(150));return z=xe.call(z),Ce(C,b,z,L)}if(typeof z.then=="function")return tt(C,b,go(z),L);if(z.$$typeof===$)return tt(C,b,fo(C,z),L);yo(C,z)}return typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint"?(z=""+z,b!==null&&b.tag===6?(n(C,b.sibling),L=a(b,z),L.return=C,C=L):(n(C,b),L=Fc(z,C.mode,L),L.return=C,C=L),c(C)):n(C,b)}return function(C,b,z,L){try{ai=0;var xe=tt(C,b,z,L);return ba=null,xe}catch(de){if(de===va||de===po)throw de;var Xe=It(29,de,null,C.mode);return Xe.lanes=L,Xe.return=C,Xe}}}var Xl=Pu(!0),ef=Pu(!1),ul=!1;function rr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function sr(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 fl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function dl(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ke&2)!==0){var a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,t=co(e),Bu(e,null,n),t}return oo(e,l,t,n),co(e)}function oi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,vn(e,n)}}function ur(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=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?a=i=c:i=i.next=c,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var fr=!1;function ci(){if(fr){var e=ya;if(e!==null)throw e}}function ri(e,t,n,l){fr=!1;var a=e.updateQueue;ul=!1;var i=a.firstBaseUpdate,c=a.lastBaseUpdate,d=a.shared.pending;if(d!==null){a.shared.pending=null;var m=d,M=m.next;m.next=null,c===null?i=M:c.next=M,c=m;var R=e.alternate;R!==null&&(R=R.updateQueue,d=R.lastBaseUpdate,d!==c&&(d===null?R.firstBaseUpdate=M:d.next=M,R.lastBaseUpdate=m))}if(i!==null){var B=a.baseState;c=0,R=M=m=null,d=i;do{var T=d.lane&-536870913,E=T!==d.lane;if(E?(je&T)===T:(l&T)===T){T!==0&&T===ga&&(fr=!0),R!==null&&(R=R.next={lane:0,tag:d.tag,payload:d.payload,callback:null,next:null});e:{var ce=e,Ce=d;T=t;var tt=n;switch(Ce.tag){case 1:if(ce=Ce.payload,typeof ce=="function"){B=ce.call(tt,B,T);break e}B=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=Ce.payload,T=typeof ce=="function"?ce.call(tt,B,T):ce,T==null)break e;B=O({},B,T);break e;case 2:ul=!0}}T=d.callback,T!==null&&(e.flags|=64,E&&(e.flags|=8192),E=a.callbacks,E===null?a.callbacks=[T]:E.push(T))}else E={lane:T,tag:d.tag,payload:d.payload,callback:d.callback,next:null},R===null?(M=R=E,m=B):R=R.next=E,c|=T;if(d=d.next,d===null){if(d=a.shared.pending,d===null)break;E=d,d=E.next,E.next=null,a.lastBaseUpdate=E,a.shared.pending=null}}while(!0);R===null&&(m=B),a.baseState=m,a.firstBaseUpdate=M,a.lastBaseUpdate=R,i===null&&(a.shared.lanes=0),yl|=c,e.lanes=c,e.memoizedState=B}}function tf(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function nf(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)tf(n[e],t)}var xa=v(null),vo=v(0);function lf(e,t){e=In,Z(vo,e),Z(xa,t),In=e|t.baseLanes}function dr(){Z(vo,In),Z(xa,xa.current)}function hr(){In=vo.current,U(xa),U(vo)}var Pt=v(null),pn=null;function hl(e){var t=e.alternate;Z(mt,mt.current&1),Z(Pt,e),pn===null&&(t===null||xa.current!==null||t.memoizedState!==null)&&(pn=e)}function pr(e){Z(mt,mt.current),Z(Pt,e),pn===null&&(pn=e)}function af(e){e.tag===22?(Z(mt,mt.current),Z(Pt,e),pn===null&&(pn=e)):pl()}function pl(){Z(mt,mt.current),Z(Pt,Pt.current)}function en(e){U(Pt),pn===e&&(pn=null),U(mt)}var mt=v(0);function bo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||xs(n)||Ss(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 Xn=0,Re=null,Pe=null,bt=null,xo=!1,Sa=!1,Ql=!1,So=0,si=0,Ca=null,Ap=0;function ft(){throw Error(u(321))}function mr(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Wt(e[n],t[n]))return!1;return!0}function gr(e,t,n,l,a,i){return Xn=i,Re=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?Gf:_r,Ql=!1,i=n(l,a),Ql=!1,Sa&&(i=cf(t,n,l,a)),of(e),i}function of(e){D.H=di;var t=Pe!==null&&Pe.next!==null;if(Xn=0,bt=Pe=Re=null,xo=!1,si=0,Ca=null,t)throw Error(u(300));e===null||xt||(e=e.dependencies,e!==null&&uo(e)&&(xt=!0))}function cf(e,t,n,l){Re=e;var a=0;do{if(Sa&&(Ca=null),si=0,Sa=!1,25<=a)throw Error(u(301));if(a+=1,bt=Pe=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}D.H=Vf,i=t(n,l)}while(Sa);return i}function Ep(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?ui(t):t,e=e.useState()[0],(Pe!==null?Pe.memoizedState:null)!==e&&(Re.flags|=1024),t}function yr(){var e=So!==0;return So=0,e}function vr(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function br(e){if(xo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}xo=!1}Xn=0,bt=Pe=Re=null,Sa=!1,si=So=0,Ca=null}function Gt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bt===null?Re.memoizedState=bt=e:bt=bt.next=e,bt}function gt(){if(Pe===null){var e=Re.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var t=bt===null?Re.memoizedState:bt.next;if(t!==null)bt=t,Pe=e;else{if(e===null)throw Re.alternate===null?Error(u(467)):Error(u(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},bt===null?Re.memoizedState=bt=e:bt=bt.next=e}return bt}function Co(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ui(e){var t=si;return si+=1,Ca===null&&(Ca=[]),e=$u(Ca,e,t),t=Re,(bt===null?t.memoizedState:bt.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?Gf:_r),e}function wo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ui(e);if(e.$$typeof===$)return Dt(e)}throw Error(u(438,String(e)))}function xr(e){var t=null,n=Re.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=Re.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Co(),Re.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=W;return t.index++,n}function Qn(e,t){return typeof t=="function"?t(e):t}function zo(e){var t=gt();return Sr(t,Pe,e)}function Sr(e,t,n){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=n;var a=e.baseQueue,i=l.pending;if(i!==null){if(a!==null){var c=a.next;a.next=i.next,i.next=c}t.baseQueue=a=i,l.pending=null}if(i=e.baseState,a===null)e.memoizedState=i;else{t=a.next;var d=c=null,m=null,M=t,R=!1;do{var B=M.lane&-536870913;if(B!==M.lane?(je&B)===B:(Xn&B)===B){var T=M.revertLane;if(T===0)m!==null&&(m=m.next={lane:0,revertLane:0,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null}),B===ga&&(R=!0);else if((Xn&T)===T){M=M.next,T===ga&&(R=!0);continue}else B={lane:0,revertLane:M.revertLane,gesture:null,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},m===null?(d=m=B,c=i):m=m.next=B,Re.lanes|=T,yl|=T;B=M.action,Ql&&n(i,B),i=M.hasEagerState?M.eagerState:n(i,B)}else T={lane:B,revertLane:M.revertLane,gesture:M.gesture,action:M.action,hasEagerState:M.hasEagerState,eagerState:M.eagerState,next:null},m===null?(d=m=T,c=i):m=m.next=T,Re.lanes|=B,yl|=B;M=M.next}while(M!==null&&M!==t);if(m===null?c=i:m.next=d,!Wt(i,e.memoizedState)&&(xt=!0,R&&(n=ya,n!==null)))throw n;e.memoizedState=i,e.baseState=c,e.baseQueue=m,l.lastRenderedState=i}return a===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function Cr(e){var t=gt(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var l=n.dispatch,a=n.pending,i=t.memoizedState;if(a!==null){n.pending=null;var c=a=a.next;do i=e(i,c.action),c=c.next;while(c!==a);Wt(i,t.memoizedState)||(xt=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,l]}function rf(e,t,n){var l=Re,a=gt(),i=Ge;if(i){if(n===void 0)throw Error(u(407));n=n()}else n=t();var c=!Wt((Pe||a).memoizedState,n);if(c&&(a.memoizedState=n,xt=!0),a=a.queue,Mr(ff.bind(null,l,a,e),[e]),a.getSnapshot!==t||c||bt!==null&&bt.memoizedState.tag&1){if(l.flags|=2048,wa(9,{destroy:void 0},uf.bind(null,l,a,n,t),null),lt===null)throw Error(u(349));i||(Xn&127)!==0||sf(l,t,n)}return n}function sf(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Re.updateQueue,t===null?(t=Co(),Re.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function uf(e,t,n,l){t.value=n,t.getSnapshot=l,df(t)&&hf(e)}function ff(e,t,n){return n(function(){df(t)&&hf(e)})}function df(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Wt(e,n)}catch{return!0}}function hf(e){var t=Hl(e,2);t!==null&&Ft(t,e,2)}function wr(e){var t=Gt();if(typeof e=="function"){var n=e;if(e=n(),Ql){wn(!0);try{n()}finally{wn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:e},t}function pf(e,t,n,l){return e.baseState=n,Sr(e,Pe,typeof l=="function"?l:Qn)}function Dp(e,t,n,l,a){if(Ao(e))throw Error(u(485));if(e=t.action,e!==null){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){i.listeners.push(c)}};D.T!==null?n(!0):i.isTransition=!1,l(i),n=t.pending,n===null?(i.next=t.pending=i,mf(t,i)):(i.next=n.next,t.pending=n.next=i)}}function mf(e,t){var n=t.action,l=t.payload,a=e.state;if(t.isTransition){var i=D.T,c={};D.T=c;try{var d=n(a,l),m=D.S;m!==null&&m(c,d),gf(e,t,d)}catch(M){zr(e,t,M)}finally{i!==null&&c.types!==null&&(i.types=c.types),D.T=i}}else try{i=n(a,l),gf(e,t,i)}catch(M){zr(e,t,M)}}function gf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){yf(e,t,l)},function(l){return zr(e,t,l)}):yf(e,t,n)}function yf(e,t,n){t.status="fulfilled",t.value=n,vf(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,mf(e,n)))}function zr(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,vf(t),t=t.next;while(t!==l)}e.action=null}function vf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function bf(e,t){return t}function xf(e,t){if(Ge){var n=lt.formState;if(n!==null){e:{var l=Re;if(Ge){if(ct){t:{for(var a=ct,i=hn;a.nodeType!==8;){if(!i){a=null;break t}if(a=mn(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){ct=mn(a.nextSibling),l=a.data==="F!";break e}}rl(l)}l=!1}l&&(t=n[0])}}return n=Gt(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:bf,lastRenderedState:t},n.queue=l,n=jf.bind(null,Re,l),l.dispatch=n,l=wr(!1),i=kr.bind(null,Re,!1,l.queue),l=Gt(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=Dp.bind(null,Re,a,i,n),a.dispatch=n,l.memoizedState=e,[t,n,!1]}function Sf(e){var t=gt();return Cf(t,Pe,e)}function Cf(e,t,n){if(t=Sr(e,t,bf)[0],e=zo(Qn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=ui(t)}catch(c){throw c===va?po:c}else l=t;t=gt();var a=t.queue,i=a.dispatch;return n!==t.memoizedState&&(Re.flags|=2048,wa(9,{destroy:void 0},kp.bind(null,a,n),null)),[l,i,e]}function kp(e,t){e.action=t}function wf(e){var t=gt(),n=Pe;if(n!==null)return Cf(t,n,e);gt(),t=t.memoizedState,n=gt();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function wa(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=Re.updateQueue,t===null&&(t=Co(),Re.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function zf(){return gt().memoizedState}function Mo(e,t,n,l){var a=Gt();Re.flags|=e,a.memoizedState=wa(1|t,{destroy:void 0},n,l===void 0?null:l)}function To(e,t,n,l){var a=gt();l=l===void 0?null:l;var i=a.memoizedState.inst;Pe!==null&&l!==null&&mr(l,Pe.memoizedState.deps)?a.memoizedState=wa(t,i,n,l):(Re.flags|=e,a.memoizedState=wa(1|t,i,n,l))}function Mf(e,t){Mo(8390656,8,e,t)}function Mr(e,t){To(2048,8,e,t)}function _p(e){Re.flags|=4;var t=Re.updateQueue;if(t===null)t=Co(),Re.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Tf(e){var t=gt().memoizedState;return _p({ref:t,nextImpl:e}),function(){if((Ke&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Af(e,t){return To(4,2,e,t)}function Ef(e,t){return To(4,4,e,t)}function Df(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 kf(e,t,n){n=n!=null?n.concat([e]):null,To(4,4,Df.bind(null,t,e),n)}function Tr(){}function _f(e,t){var n=gt();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&mr(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Rf(e,t){var n=gt();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&mr(t,l[1]))return l[0];if(l=e(),Ql){wn(!0);try{e()}finally{wn(!1)}}return n.memoizedState=[l,t],l}function Ar(e,t,n){return n===void 0||(Xn&1073741824)!==0&&(je&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Od(),Re.lanes|=e,yl|=e,n)}function Of(e,t,n,l){return Wt(n,t)?n:xa.current!==null?(e=Ar(e,n,l),Wt(e,t)||(xt=!0),e):(Xn&42)===0||(Xn&1073741824)!==0&&(je&261930)===0?(xt=!0,e.memoizedState=n):(e=Od(),Re.lanes|=e,yl|=e,t)}function Lf(e,t,n,l,a){var i=j.p;j.p=i!==0&&8>i?i:8;var c=D.T,d={};D.T=d,kr(e,!1,t,n);try{var m=a(),M=D.S;if(M!==null&&M(d,m),m!==null&&typeof m=="object"&&typeof m.then=="function"){var R=Tp(m,l);fi(e,t,R,ln(e))}else fi(e,t,l,ln(e))}catch(B){fi(e,t,{then:function(){},status:"rejected",reason:B},ln())}finally{j.p=i,c!==null&&d.types!==null&&(c.types=d.types),D.T=c}}function Rp(){}function Er(e,t,n,l){if(e.tag!==5)throw Error(u(476));var a=Uf(e).queue;Lf(e,a,t,P,n===null?Rp:function(){return Hf(e),n(l)})}function Uf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:P},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Hf(e){var t=Uf(e);t.next===null&&(t=e.alternate.memoizedState),fi(e,t.next.queue,{},ln())}function Dr(){return Dt(Ei)}function Bf(){return gt().memoizedState}function Nf(){return gt().memoizedState}function Op(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=ln();e=fl(n);var l=dl(t,e,n);l!==null&&(Ft(l,t,n),oi(l,t,n)),t={cache:ar()},e.payload=t;return}t=t.return}}function Lp(e,t,n){var l=ln();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ao(e)?qf(t,n):(n=Kc(e,t,n,l),n!==null&&(Ft(n,e,l),Yf(n,t,l)))}function jf(e,t,n){var l=ln();fi(e,t,n,l)}function fi(e,t,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ao(e))qf(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var c=t.lastRenderedState,d=i(c,n);if(a.hasEagerState=!0,a.eagerState=d,Wt(d,c))return oo(e,t,a,0),lt===null&&io(),!1}catch{}if(n=Kc(e,t,a,l),n!==null)return Ft(n,e,l),Yf(n,t,l),!0}return!1}function kr(e,t,n,l){if(l={lane:2,revertLane:rs(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ao(e)){if(t)throw Error(u(479))}else t=Kc(e,n,l,2),t!==null&&Ft(t,e,2)}function Ao(e){var t=e.alternate;return e===Re||t!==null&&t===Re}function qf(e,t){Sa=xo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Yf(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,vn(e,n)}}var di={readContext:Dt,use:wo,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useLayoutEffect:ft,useInsertionEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useSyncExternalStore:ft,useId:ft,useHostTransitionStatus:ft,useFormState:ft,useActionState:ft,useOptimistic:ft,useMemoCache:ft,useCacheRefresh:ft};di.useEffectEvent=ft;var Gf={readContext:Dt,use:wo,useCallback:function(e,t){return Gt().memoizedState=[e,t===void 0?null:t],e},useContext:Dt,useEffect:Mf,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Mo(4194308,4,Df.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Mo(4194308,4,e,t)},useInsertionEffect:function(e,t){Mo(4,2,e,t)},useMemo:function(e,t){var n=Gt();t=t===void 0?null:t;var l=e();if(Ql){wn(!0);try{e()}finally{wn(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=Gt();if(n!==void 0){var a=n(t);if(Ql){wn(!0);try{n(t)}finally{wn(!1)}}}else a=t;return l.memoizedState=l.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},l.queue=e,e=e.dispatch=Lp.bind(null,Re,e),[l.memoizedState,e]},useRef:function(e){var t=Gt();return e={current:e},t.memoizedState=e},useState:function(e){e=wr(e);var t=e.queue,n=jf.bind(null,Re,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Tr,useDeferredValue:function(e,t){var n=Gt();return Ar(n,e,t)},useTransition:function(){var e=wr(!1);return e=Lf.bind(null,Re,e.queue,!0,!1),Gt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=Re,a=Gt();if(Ge){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),lt===null)throw Error(u(349));(je&127)!==0||sf(l,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,Mf(ff.bind(null,l,i,e),[e]),l.flags|=2048,wa(9,{destroy:void 0},uf.bind(null,l,i,n,t),null),n},useId:function(){var e=Gt(),t=lt.identifierPrefix;if(Ge){var n=An,l=Tn;n=(l&~(1<<32-jt(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=So++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Ap++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Dr,useFormState:xf,useActionState:xf,useOptimistic:function(e){var t=Gt();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=kr.bind(null,Re,!0,n),n.dispatch=t,[e,t]},useMemoCache:xr,useCacheRefresh:function(){return Gt().memoizedState=Op.bind(null,Re)},useEffectEvent:function(e){var t=Gt(),n={impl:e};return t.memoizedState=n,function(){if((Ke&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}},_r={readContext:Dt,use:wo,useCallback:_f,useContext:Dt,useEffect:Mr,useImperativeHandle:kf,useInsertionEffect:Af,useLayoutEffect:Ef,useMemo:Rf,useReducer:zo,useRef:zf,useState:function(){return zo(Qn)},useDebugValue:Tr,useDeferredValue:function(e,t){var n=gt();return Of(n,Pe.memoizedState,e,t)},useTransition:function(){var e=zo(Qn)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:ui(e),t]},useSyncExternalStore:rf,useId:Bf,useHostTransitionStatus:Dr,useFormState:Sf,useActionState:Sf,useOptimistic:function(e,t){var n=gt();return pf(n,Pe,e,t)},useMemoCache:xr,useCacheRefresh:Nf};_r.useEffectEvent=Tf;var Vf={readContext:Dt,use:wo,useCallback:_f,useContext:Dt,useEffect:Mr,useImperativeHandle:kf,useInsertionEffect:Af,useLayoutEffect:Ef,useMemo:Rf,useReducer:Cr,useRef:zf,useState:function(){return Cr(Qn)},useDebugValue:Tr,useDeferredValue:function(e,t){var n=gt();return Pe===null?Ar(n,e,t):Of(n,Pe.memoizedState,e,t)},useTransition:function(){var e=Cr(Qn)[0],t=gt().memoizedState;return[typeof e=="boolean"?e:ui(e),t]},useSyncExternalStore:rf,useId:Bf,useHostTransitionStatus:Dr,useFormState:wf,useActionState:wf,useOptimistic:function(e,t){var n=gt();return Pe!==null?pf(n,Pe,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:xr,useCacheRefresh:Nf};Vf.useEffectEvent=Tf;function Rr(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:O({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Or={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=ln(),a=fl(l);a.payload=t,n!=null&&(a.callback=n),t=dl(e,a,l),t!==null&&(Ft(t,e,l),oi(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=ln(),a=fl(l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=dl(e,a,l),t!==null&&(Ft(t,e,l),oi(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ln(),l=fl(n);l.tag=2,t!=null&&(l.callback=t),t=dl(e,l,n),t!==null&&(Ft(t,e,n),oi(t,e,n))}};function Xf(e,t,n,l,a,i,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,c):t.prototype&&t.prototype.isPureReactComponent?!Ia(n,l)||!Ia(a,i):!0}function Qf(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&Or.enqueueReplaceState(t,t.state,null)}function Zl(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=O({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function Zf(e){ao(e)}function Kf(e){console.error(e)}function Jf(e){ao(e)}function Eo(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Ff(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Lr(e,t,n){return n=fl(n),n.tag=3,n.payload={element:null},n.callback=function(){Eo(e,t)},n}function $f(e){return e=fl(e),e.tag=3,e}function Wf(e,t,n,l){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var i=l.value;e.payload=function(){return a(i)},e.callback=function(){Ff(t,n,l)}}var c=n.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){Ff(t,n,l),typeof a!="function"&&(vl===null?vl=new Set([this]):vl.add(this));var d=l.stack;this.componentDidCatch(l.value,{componentStack:d!==null?d:""})})}function Up(e,t,n,l,a){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&ma(t,n,a,!0),n=Pt.current,n!==null){switch(n.tag){case 31:case 13:return pn===null?qo():n.alternate===null&&dt===0&&(dt=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===mo?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),is(e,l,a)),!1;case 22:return n.flags|=65536,l===mo?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),is(e,l,a)),!1}throw Error(u(435,n.tag))}return is(e,l,a),qo(),!1}if(Ge)return t=Pt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,l!==Pc&&(e=Error(u(422),{cause:l}),ti(un(e,n)))):(l!==Pc&&(t=Error(u(423),{cause:l}),ti(un(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=un(l,n),a=Lr(e.stateNode,l,a),ur(e,a),dt!==4&&(dt=2)),!1;var i=Error(u(520),{cause:l});if(i=un(i,n),xi===null?xi=[i]:xi.push(i),dt!==4&&(dt=2),t===null)return!0;l=un(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Lr(n.stateNode,l,e),ur(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"&&(vl===null||!vl.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,a=$f(a),Wf(a,e,n,l),ur(n,a),!1}n=n.return}while(n!==null);return!1}var Ur=Error(u(461)),xt=!1;function kt(e,t,n,l){t.child=e===null?ef(t,null,n,l):Xl(t,e.child,n,l)}function If(e,t,n,l,a){n=n.render;var i=t.ref;if("ref"in l){var c={};for(var d in l)d!=="ref"&&(c[d]=l[d])}else c=l;return ql(t),l=gr(e,t,n,c,i,a),d=yr(),e!==null&&!xt?(vr(e,t,a),Zn(e,t,a)):(Ge&&d&&Wc(t),t.flags|=1,kt(e,t,l,a),t.child)}function Pf(e,t,n,l,a){if(e===null){var i=n.type;return typeof i=="function"&&!Jc(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,ed(e,t,i,l,a)):(e=ro(n.type,null,l,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Vr(e,a)){var c=i.memoizedProps;if(n=n.compare,n=n!==null?n:Ia,n(c,l)&&e.ref===t.ref)return Zn(e,t,a)}return t.flags|=1,e=qn(i,l),e.ref=t.ref,e.return=t,t.child=e}function ed(e,t,n,l,a){if(e!==null){var i=e.memoizedProps;if(Ia(i,l)&&e.ref===t.ref)if(xt=!1,t.pendingProps=l=i,Vr(e,a))(e.flags&131072)!==0&&(xt=!0);else return t.lanes=e.lanes,Zn(e,t,a)}return Hr(e,t,n,l,a)}function td(e,t,n,l){var a=l.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|n:n,e!==null){for(l=t.child=e.child,a=0;l!==null;)a=a|l.lanes|l.childLanes,l=l.sibling;l=a&~i}else l=0,t.child=null;return nd(e,t,i,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ho(t,i!==null?i.cachePool:null),i!==null?lf(t,i):dr(),af(t);else return l=t.lanes=536870912,nd(e,t,i!==null?i.baseLanes|n:n,n,l)}else i!==null?(ho(t,i.cachePool),lf(t,i),pl(),t.memoizedState=null):(e!==null&&ho(t,null),dr(),pl());return kt(e,t,a,n),t.child}function hi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function nd(e,t,n,l,a){var i=or();return i=i===null?null:{parent:vt._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&ho(t,null),dr(),af(t),e!==null&&ma(e,t,l,!0),t.childLanes=a,null}function Do(e,t){return t=_o({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function ld(e,t,n){return Xl(t,e.child,null,n),e=Do(t,t.pendingProps),e.flags|=2,en(t),t.memoizedState=null,e}function Hp(e,t,n){var l=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ge){if(l.mode==="hidden")return e=Do(t,l),t.lanes=536870912,hi(null,e);if(pr(t),(e=ct)?(e=m0(e,hn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ol!==null?{id:Tn,overflow:An}:null,retryLane:536870912,hydrationErrors:null},n=ju(e),n.return=t,t.child=n,Et=t,ct=null)):e=null,e===null)throw rl(t);return t.lanes=536870912,null}return Do(t,l)}var i=e.memoizedState;if(i!==null){var c=i.dehydrated;if(pr(t),a)if(t.flags&256)t.flags&=-257,t=ld(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(xt||ma(e,t,n,!1),a=(n&e.childLanes)!==0,xt||a){if(l=lt,l!==null&&(c=Zi(l,n),c!==0&&c!==i.retryLane))throw i.retryLane=c,Hl(e,c),Ft(l,e,c),Ur;qo(),t=ld(e,t,n)}else e=i.treeContext,ct=mn(c.nextSibling),Et=t,Ge=!0,cl=null,hn=!1,e!==null&&Gu(t,e),t=Do(t,l),t.flags|=4096;return t}return e=qn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ko(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 Hr(e,t,n,l,a){return ql(t),n=gr(e,t,n,l,void 0,a),l=yr(),e!==null&&!xt?(vr(e,t,a),Zn(e,t,a)):(Ge&&l&&Wc(t),t.flags|=1,kt(e,t,n,a),t.child)}function ad(e,t,n,l,a,i){return ql(t),t.updateQueue=null,n=cf(t,l,n,a),of(e),l=yr(),e!==null&&!xt?(vr(e,t,i),Zn(e,t,i)):(Ge&&l&&Wc(t),t.flags|=1,kt(e,t,n,i),t.child)}function id(e,t,n,l,a){if(ql(t),t.stateNode===null){var i=fa,c=n.contextType;typeof c=="object"&&c!==null&&(i=Dt(c)),i=new n(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Or,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},rr(t),c=n.contextType,i.context=typeof c=="object"&&c!==null?Dt(c):fa,i.state=t.memoizedState,c=n.getDerivedStateFromProps,typeof c=="function"&&(Rr(t,n,c,l),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&&Or.enqueueReplaceState(i,i.state,null),ri(t,l,i,a),ci(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var d=t.memoizedProps,m=Zl(n,d);i.props=m;var M=i.context,R=n.contextType;c=fa,typeof R=="object"&&R!==null&&(c=Dt(R));var B=n.getDerivedStateFromProps;R=typeof B=="function"||typeof i.getSnapshotBeforeUpdate=="function",d=t.pendingProps!==d,R||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(d||M!==c)&&Qf(t,i,l,c),ul=!1;var T=t.memoizedState;i.state=T,ri(t,l,i,a),ci(),M=t.memoizedState,d||T!==M||ul?(typeof B=="function"&&(Rr(t,n,B,l),M=t.memoizedState),(m=ul||Xf(t,n,m,l,T,M,c))?(R||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=l,t.memoizedState=M),i.props=l,i.state=M,i.context=c,l=m):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,sr(e,t),c=t.memoizedProps,R=Zl(n,c),i.props=R,B=t.pendingProps,T=i.context,M=n.contextType,m=fa,typeof M=="object"&&M!==null&&(m=Dt(M)),d=n.getDerivedStateFromProps,(M=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==B||T!==m)&&Qf(t,i,l,m),ul=!1,T=t.memoizedState,i.state=T,ri(t,l,i,a),ci();var E=t.memoizedState;c!==B||T!==E||ul||e!==null&&e.dependencies!==null&&uo(e.dependencies)?(typeof d=="function"&&(Rr(t,n,d,l),E=t.memoizedState),(R=ul||Xf(t,n,R,l,T,E,m)||e!==null&&e.dependencies!==null&&uo(e.dependencies))?(M||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,E,m),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,E,m)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=E),i.props=l,i.state=E,i.context=m,l=R):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,ko(e,t),l=(t.flags&128)!==0,i||l?(i=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&l?(t.child=Xl(t,e.child,null,a),t.child=Xl(t,null,n,a)):kt(e,t,n,a),t.memoizedState=i.state,e=t.child):e=Zn(e,t,a),e}function od(e,t,n,l){return Nl(),t.flags|=256,kt(e,t,n,l),t.child}var Br={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Nr(e){return{baseLanes:e,cachePool:Ju()}}function jr(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=nn),e}function cd(e,t,n){var l=t.pendingProps,a=!1,i=(t.flags&128)!==0,c;if((c=i)||(c=e!==null&&e.memoizedState===null?!1:(mt.current&2)!==0),c&&(a=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ge){if(a?hl(t):pl(),(e=ct)?(e=m0(e,hn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:ol!==null?{id:Tn,overflow:An}:null,retryLane:536870912,hydrationErrors:null},n=ju(e),n.return=t,t.child=n,Et=t,ct=null)):e=null,e===null)throw rl(t);return Ss(e)?t.lanes=32:t.lanes=536870912,null}var d=l.children;return l=l.fallback,a?(pl(),a=t.mode,d=_o({mode:"hidden",children:d},a),l=Bl(l,a,n,null),d.return=t,l.return=t,d.sibling=l,t.child=d,l=t.child,l.memoizedState=Nr(n),l.childLanes=jr(e,c,n),t.memoizedState=Br,hi(null,l)):(hl(t),qr(t,d))}var m=e.memoizedState;if(m!==null&&(d=m.dehydrated,d!==null)){if(i)t.flags&256?(hl(t),t.flags&=-257,t=Yr(e,t,n)):t.memoizedState!==null?(pl(),t.child=e.child,t.flags|=128,t=null):(pl(),d=l.fallback,a=t.mode,l=_o({mode:"visible",children:l.children},a),d=Bl(d,a,n,null),d.flags|=2,l.return=t,d.return=t,l.sibling=d,t.child=l,Xl(t,e.child,null,n),l=t.child,l.memoizedState=Nr(n),l.childLanes=jr(e,c,n),t.memoizedState=Br,t=hi(null,l));else if(hl(t),Ss(d)){if(c=d.nextSibling&&d.nextSibling.dataset,c)var M=c.dgst;c=M,l=Error(u(419)),l.stack="",l.digest=c,ti({value:l,source:null,stack:null}),t=Yr(e,t,n)}else if(xt||ma(e,t,n,!1),c=(n&e.childLanes)!==0,xt||c){if(c=lt,c!==null&&(l=Zi(c,n),l!==0&&l!==m.retryLane))throw m.retryLane=l,Hl(e,l),Ft(c,e,l),Ur;xs(d)||qo(),t=Yr(e,t,n)}else xs(d)?(t.flags|=192,t.child=e.child,t=null):(e=m.treeContext,ct=mn(d.nextSibling),Et=t,Ge=!0,cl=null,hn=!1,e!==null&&Gu(t,e),t=qr(t,l.children),t.flags|=4096);return t}return a?(pl(),d=l.fallback,a=t.mode,m=e.child,M=m.sibling,l=qn(m,{mode:"hidden",children:l.children}),l.subtreeFlags=m.subtreeFlags&65011712,M!==null?d=qn(M,d):(d=Bl(d,a,n,null),d.flags|=2),d.return=t,l.return=t,l.sibling=d,t.child=l,hi(null,l),l=t.child,d=e.child.memoizedState,d===null?d=Nr(n):(a=d.cachePool,a!==null?(m=vt._currentValue,a=a.parent!==m?{parent:m,pool:m}:a):a=Ju(),d={baseLanes:d.baseLanes|n,cachePool:a}),l.memoizedState=d,l.childLanes=jr(e,c,n),t.memoizedState=Br,hi(e.child,l)):(hl(t),n=e.child,e=n.sibling,n=qn(n,{mode:"visible",children:l.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 qr(e,t){return t=_o({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function _o(e,t){return e=It(22,e,null,t),e.lanes=0,e}function Yr(e,t,n){return Xl(t,e.child,null,n),e=qr(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function rd(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),nr(e.return,t,n)}function Gr(e,t,n,l,a,i){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:a,treeForkCount:i}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=l,c.tail=n,c.tailMode=a,c.treeForkCount=i)}function sd(e,t,n){var l=t.pendingProps,a=l.revealOrder,i=l.tail;l=l.children;var c=mt.current,d=(c&2)!==0;if(d?(c=c&1|2,t.flags|=128):c&=1,Z(mt,c),kt(e,t,l,n),l=Ge?ei:0,!d&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&rd(e,n,t);else if(e.tag===19)rd(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(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&bo(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),Gr(t,!1,a,n,i,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&bo(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}Gr(t,!0,n,null,i,l);break;case"together":Gr(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Zn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),yl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ma(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 Vr(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&uo(e)))}function Bp(e,t,n){switch(t.tag){case 3:ot(t,t.stateNode.containerInfo),sl(t,vt,e.memoizedState.cache),Nl();break;case 27:case 5:Vt(t);break;case 4:ot(t,t.stateNode.containerInfo);break;case 10:sl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,pr(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(hl(t),t.flags|=128,null):(n&t.child.childLanes)!==0?cd(e,t,n):(hl(t),e=Zn(e,t,n),e!==null?e.sibling:null);hl(t);break;case 19:var a=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(ma(e,t,n,!1),l=(n&t.childLanes)!==0),a){if(l)return sd(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Z(mt,mt.current),l)break;return null;case 22:return t.lanes=0,td(e,t,n,t.pendingProps);case 24:sl(t,vt,e.memoizedState.cache)}return Zn(e,t,n)}function ud(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)xt=!0;else{if(!Vr(e,n)&&(t.flags&128)===0)return xt=!1,Bp(e,t,n);xt=(e.flags&131072)!==0}else xt=!1,Ge&&(t.flags&1048576)!==0&&Yu(t,ei,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Gl(t.elementType),t.type=e,typeof e=="function")Jc(e)?(l=Zl(e,l),t.tag=1,t=id(null,t,e,l,n)):(t.tag=0,t=Hr(null,t,e,l,n));else{if(e!=null){var a=e.$$typeof;if(a===we){t.tag=11,t=If(null,t,e,l,n);break e}else if(a===Q){t.tag=14,t=Pf(null,t,e,l,n);break e}}throw t=Ae(e)||e,Error(u(306,t,""))}}return t;case 0:return Hr(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,a=Zl(l,t.pendingProps),id(e,t,l,a,n);case 3:e:{if(ot(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var i=t.memoizedState;a=i.element,sr(e,t),ri(t,l,null,n);var c=t.memoizedState;if(l=c.cache,sl(t,vt,l),l!==i.cache&&lr(t,[vt],n,!0),ci(),l=c.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=od(e,t,l,n);break e}else if(l!==a){a=un(Error(u(424)),t),ti(a),t=od(e,t,l,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,ct=mn(e.firstChild),Et=t,Ge=!0,cl=null,hn=!0,n=ef(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Nl(),l===a){t=Zn(e,t,n);break e}kt(e,t,l,n)}t=t.child}return t;case 26:return ko(e,t),e===null?(n=S0(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ge||(n=t.type,e=t.pendingProps,l=Ko(ze.current).createElement(n),l[st]=t,l[At]=e,_t(l,n,e),re(l),t.stateNode=l):t.memoizedState=S0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Vt(t),e===null&&Ge&&(l=t.stateNode=v0(t.type,t.pendingProps,ze.current),Et=t,hn=!0,a=ct,Cl(t.type)?(Cs=a,ct=mn(l.firstChild)):ct=a),kt(e,t,t.pendingProps.children,n),ko(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ge&&((a=l=ct)&&(l=hm(l,t.type,t.pendingProps,hn),l!==null?(t.stateNode=l,Et=t,ct=mn(l.firstChild),hn=!1,a=!0):a=!1),a||rl(t)),Vt(t),a=t.type,i=t.pendingProps,c=e!==null?e.memoizedProps:null,l=i.children,ys(a,i)?l=null:c!==null&&ys(a,c)&&(t.flags|=32),t.memoizedState!==null&&(a=gr(e,t,Ep,null,null,n),Ei._currentValue=a),ko(e,t),kt(e,t,l,n),t.child;case 6:return e===null&&Ge&&((e=n=ct)&&(n=pm(n,t.pendingProps,hn),n!==null?(t.stateNode=n,Et=t,ct=null,e=!0):e=!1),e||rl(t)),null;case 13:return cd(e,t,n);case 4:return ot(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Xl(t,null,l,n):kt(e,t,l,n),t.child;case 11:return If(e,t,t.type,t.pendingProps,n);case 7:return kt(e,t,t.pendingProps,n),t.child;case 8:return kt(e,t,t.pendingProps.children,n),t.child;case 12:return kt(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,sl(t,t.type,l.value),kt(e,t,l.children,n),t.child;case 9:return a=t.type._context,l=t.pendingProps.children,ql(t),a=Dt(a),l=l(a),t.flags|=1,kt(e,t,l,n),t.child;case 14:return Pf(e,t,t.type,t.pendingProps,n);case 15:return ed(e,t,t.type,t.pendingProps,n);case 19:return sd(e,t,n);case 31:return Hp(e,t,n);case 22:return td(e,t,n,t.pendingProps);case 24:return ql(t),l=Dt(vt),e===null?(a=or(),a===null&&(a=lt,i=ar(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=n),a=i),t.memoizedState={parent:l,cache:a},rr(t),sl(t,vt,a)):((e.lanes&n)!==0&&(sr(e,t),ri(t,null,null,n),ci()),a=e.memoizedState,i=t.memoizedState,a.parent!==l?(a={parent:l,cache:l},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),sl(t,vt,l)):(l=i.cache,sl(t,vt,l),l!==a.cache&&lr(t,[vt],n,!0))),kt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Kn(e){e.flags|=4}function Xr(e,t,n,l,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(Bd())e.flags|=8192;else throw Vl=mo,cr}else e.flags&=-16777217}function fd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!T0(t))if(Bd())e.flags|=8192;else throw Vl=mo,cr}function Ro(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Xi():536870912,e.lanes|=t,Aa|=t)}function pi(e,t){if(!Ge)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 l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function rt(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags&65011712,l|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function Np(e,t,n){var l=t.pendingProps;switch(Ic(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(t),null;case 1:return rt(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Vn(vt),Ye(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(pa(t)?Kn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,er())),rt(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(Kn(t),i!==null?(rt(t),fd(t,i)):(rt(t),Xr(t,a,null,l,n))):i?i!==e.memoizedState?(Kn(t),rt(t),fd(t,i)):(rt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&Kn(t),rt(t),Xr(t,a,e,l,n)),null;case 27:if(be(t),n=ze.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Kn(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return rt(t),null}e=K.current,pa(t)?Vu(t):(e=v0(a,l,n),t.stateNode=e,Kn(t))}return rt(t),null;case 5:if(be(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&Kn(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return rt(t),null}if(i=K.current,pa(t))Vu(t);else{var c=Ko(ze.current);switch(i){case 1:i=c.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=c.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=c.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=c.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=c.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?c.createElement("select",{is:l.is}):c.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?c.createElement(a,{is:l.is}):c.createElement(a)}}i[st]=t,i[At]=l;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(_t(i,a,l),a){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Kn(t)}}return rt(t),Xr(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&Kn(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=ze.current,pa(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=Et,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[st]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||c0(e.nodeValue,n)),e||rl(t,!0)}else e=Ko(e).createTextNode(l),e[st]=t,t.stateNode=e}return rt(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=pa(t),n!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[st]=t}else Nl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;rt(t),e=!1}else n=er(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(en(t),t):(en(t),null);if((t.flags&128)!==0)throw Error(u(558))}return rt(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=pa(t),l!==null&&l.dehydrated!==null){if(e===null){if(!a)throw Error(u(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(u(317));a[st]=t}else Nl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;rt(t),a=!1}else a=er(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(en(t),t):(en(t),null)}return en(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==a&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ro(t,t.updateQueue),rt(t),null);case 4:return Ye(),e===null&&ds(t.stateNode.containerInfo),rt(t),null;case 10:return Vn(t.type),rt(t),null;case 19:if(U(mt),l=t.memoizedState,l===null)return rt(t),null;if(a=(t.flags&128)!==0,i=l.rendering,i===null)if(a)pi(l,!1);else{if(dt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=bo(e),i!==null){for(t.flags|=128,pi(l,!1),e=i.updateQueue,t.updateQueue=e,Ro(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Nu(n,e),n=n.sibling;return Z(mt,mt.current&1|2),Ge&&Yn(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&Tt()>Bo&&(t.flags|=128,a=!0,pi(l,!1),t.lanes=4194304)}else{if(!a)if(e=bo(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ro(t,e),pi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!Ge)return rt(t),null}else 2*Tt()-l.renderingStartTime>Bo&&n!==536870912&&(t.flags|=128,a=!0,pi(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=Tt(),e.sibling=null,n=mt.current,Z(mt,a?n&1|2:n&1),Ge&&Yn(t,l.treeForkCount),e):(rt(t),null);case 22:case 23:return en(t),hr(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(rt(t),t.subtreeFlags&6&&(t.flags|=8192)):rt(t),n=t.updateQueue,n!==null&&Ro(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&U(Yl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Vn(vt),rt(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function jp(e,t){switch(Ic(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Vn(vt),Ye(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return be(t),null;case 31:if(t.memoizedState!==null){if(en(t),t.alternate===null)throw Error(u(340));Nl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(en(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));Nl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(mt),null;case 4:return Ye(),null;case 10:return Vn(t.type),null;case 22:case 23:return en(t),hr(),e!==null&&U(Yl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Vn(vt),null;case 25:return null;default:return null}}function dd(e,t){switch(Ic(t),t.tag){case 3:Vn(vt),Ye();break;case 26:case 27:case 5:be(t);break;case 4:Ye();break;case 31:t.memoizedState!==null&&en(t);break;case 13:en(t);break;case 19:U(mt);break;case 10:Vn(t.type);break;case 22:case 23:en(t),hr(),e!==null&&U(Yl);break;case 24:Vn(vt)}}function mi(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&e)===e){l=void 0;var i=n.create,c=n.inst;l=i(),c.destroy=l}n=n.next}while(n!==a)}}catch(d){Ie(t,t.return,d)}}function ml(e,t,n){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var i=a.next;l=i;do{if((l.tag&e)===e){var c=l.inst,d=c.destroy;if(d!==void 0){c.destroy=void 0,a=t;var m=n,M=d;try{M()}catch(R){Ie(a,m,R)}}}l=l.next}while(l!==i)}}catch(R){Ie(t,t.return,R)}}function hd(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{nf(t,n)}catch(l){Ie(e,e.return,l)}}}function pd(e,t,n){n.props=Zl(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Ie(e,t,l)}}function gi(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(a){Ie(e,t,a)}}function En(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){Ie(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Ie(e,t,a)}else n.current=null}function md(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(a){Ie(e,e.return,a)}}function Qr(e,t,n){try{var l=e.stateNode;cm(l,e.type,n,t),l[At]=t}catch(a){Ie(e,e.return,a)}}function gd(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Cl(e.type)||e.tag===4}function Zr(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gd(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&&Cl(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 Kr(e,t,n){var l=e.tag;if(l===5||l===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=Nn));else if(l!==4&&(l===27&&Cl(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Kr(e,t,n),e=e.sibling;e!==null;)Kr(e,t,n),e=e.sibling}function Oo(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&Cl(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Oo(e,t,n),e=e.sibling;e!==null;)Oo(e,t,n),e=e.sibling}function yd(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);_t(t,l,n),t[st]=e,t[At]=n}catch(i){Ie(e,e.return,i)}}var Jn=!1,St=!1,Jr=!1,vd=typeof WeakSet=="function"?WeakSet:Set,zt=null;function qp(e,t){if(e=e.containerInfo,ms=ec,e=Du(e),Yc(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var a=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var c=0,d=-1,m=-1,M=0,R=0,B=e,T=null;t:for(;;){for(var E;B!==n||a!==0&&B.nodeType!==3||(d=c+a),B!==i||l!==0&&B.nodeType!==3||(m=c+l),B.nodeType===3&&(c+=B.nodeValue.length),(E=B.firstChild)!==null;)T=B,B=E;for(;;){if(B===e)break t;if(T===n&&++M===a&&(d=c),T===i&&++R===l&&(m=c),(E=B.nextSibling)!==null)break;B=T,T=B.parentNode}B=E}n=d===-1||m===-1?null:{start:d,end:m}}else n=null}n=n||{start:0,end:0}}else n=null;for(gs={focusedElem:e,selectionRange:n},ec=!1,zt=t;zt!==null;)if(t=zt,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,zt=e;else for(;zt!==null;){switch(t=zt,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++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,n=t,a=i.memoizedProps,i=i.memoizedState,l=n.stateNode;try{var ce=Zl(n.type,a);e=l.getSnapshotBeforeUpdate(ce,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(Ce){Ie(n,n.return,Ce)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)bs(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":bs(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,zt=e;break}zt=t.return}}function bd(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:$n(e,n),l&4&&mi(5,n);break;case 1:if($n(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(c){Ie(n,n.return,c)}else{var a=Zl(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){Ie(n,n.return,c)}}l&64&&hd(n),l&512&&gi(n,n.return);break;case 3:if($n(e,n),l&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{nf(e,t)}catch(c){Ie(n,n.return,c)}}break;case 27:t===null&&l&4&&yd(n);case 26:case 5:$n(e,n),t===null&&l&4&&md(n),l&512&&gi(n,n.return);break;case 12:$n(e,n);break;case 31:$n(e,n),l&4&&Cd(e,n);break;case 13:$n(e,n),l&4&&wd(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Fp.bind(null,n),mm(e,n))));break;case 22:if(l=n.memoizedState!==null||Jn,!l){t=t!==null&&t.memoizedState!==null||St,a=Jn;var i=St;Jn=l,(St=t)&&!i?Wn(e,n,(n.subtreeFlags&8772)!==0):$n(e,n),Jn=a,St=i}break;case 30:break;default:$n(e,n)}}function xd(e){var t=e.alternate;t!==null&&(e.alternate=null,xd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Le(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 ut=null,Qt=!1;function Fn(e,t,n){for(n=n.child;n!==null;)Sd(e,t,n),n=n.sibling}function Sd(e,t,n){if(Nt&&typeof Nt.onCommitFiberUnmount=="function")try{Nt.onCommitFiberUnmount(kl,n)}catch{}switch(n.tag){case 26:St||En(n,t),Fn(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:St||En(n,t);var l=ut,a=Qt;Cl(n.type)&&(ut=n.stateNode,Qt=!1),Fn(e,t,n),Mi(n.stateNode),ut=l,Qt=a;break;case 5:St||En(n,t);case 6:if(l=ut,a=Qt,ut=null,Fn(e,t,n),ut=l,Qt=a,ut!==null)if(Qt)try{(ut.nodeType===9?ut.body:ut.nodeName==="HTML"?ut.ownerDocument.body:ut).removeChild(n.stateNode)}catch(i){Ie(n,t,i)}else try{ut.removeChild(n.stateNode)}catch(i){Ie(n,t,i)}break;case 18:ut!==null&&(Qt?(e=ut,h0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Ua(e)):h0(ut,n.stateNode));break;case 4:l=ut,a=Qt,ut=n.stateNode.containerInfo,Qt=!0,Fn(e,t,n),ut=l,Qt=a;break;case 0:case 11:case 14:case 15:ml(2,n,t),St||ml(4,n,t),Fn(e,t,n);break;case 1:St||(En(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&pd(n,t,l)),Fn(e,t,n);break;case 21:Fn(e,t,n);break;case 22:St=(l=St)||n.memoizedState!==null,Fn(e,t,n),St=l;break;default:Fn(e,t,n)}}function Cd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ua(e)}catch(n){Ie(t,t.return,n)}}}function wd(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ua(e)}catch(n){Ie(t,t.return,n)}}function Yp(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new vd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new vd),t;default:throw Error(u(435,e.tag))}}function Lo(e,t){var n=Yp(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var a=$p.bind(null,e,l);l.then(a,a)}})}function Zt(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l],i=e,c=t,d=c;e:for(;d!==null;){switch(d.tag){case 27:if(Cl(d.type)){ut=d.stateNode,Qt=!1;break e}break;case 5:ut=d.stateNode,Qt=!1;break e;case 3:case 4:ut=d.stateNode.containerInfo,Qt=!0;break e}d=d.return}if(ut===null)throw Error(u(160));Sd(i,c,a),ut=null,Qt=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)zd(t,e),t=t.sibling}var xn=null;function zd(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Zt(t,e),Kt(e),l&4&&(ml(3,e,e.return),mi(3,e),ml(5,e,e.return));break;case 1:Zt(t,e),Kt(e),l&512&&(St||n===null||En(n,n.return)),l&64&&Jn&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var a=xn;if(Zt(t,e),Kt(e),l&512&&(St||n===null||En(n,n.return)),l&4){var i=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(l){case"title":i=a.getElementsByTagName("title")[0],(!i||i[pe]||i[st]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(l),a.head.insertBefore(i,a.querySelector("head > title"))),_t(i,l,n),i[st]=e,re(i),l=i;break e;case"link":var c=z0("link","href",a).get(l+(n.href||""));if(c){for(var d=0;d<c.length;d++)if(i=c[d],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(d,1);break t}}i=a.createElement(l),_t(i,l,n),a.head.appendChild(i);break;case"meta":if(c=z0("meta","content",a).get(l+(n.content||""))){for(d=0;d<c.length;d++)if(i=c[d],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(d,1);break t}}i=a.createElement(l),_t(i,l,n),a.head.appendChild(i);break;default:throw Error(u(468,l))}i[st]=e,re(i),l=i}e.stateNode=l}else M0(a,e.type,e.stateNode);else e.stateNode=w0(a,l,e.memoizedProps);else i!==l?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,l===null?M0(a,e.type,e.stateNode):w0(a,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Qr(e,e.memoizedProps,n.memoizedProps)}break;case 27:Zt(t,e),Kt(e),l&512&&(St||n===null||En(n,n.return)),n!==null&&l&4&&Qr(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Zt(t,e),Kt(e),l&512&&(St||n===null||En(n,n.return)),e.flags&32){a=e.stateNode;try{aa(a,"")}catch(ce){Ie(e,e.return,ce)}}l&4&&e.stateNode!=null&&(a=e.memoizedProps,Qr(e,a,n!==null?n.memoizedProps:a)),l&1024&&(Jr=!0);break;case 6:if(Zt(t,e),Kt(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(ce){Ie(e,e.return,ce)}}break;case 3:if($o=null,a=xn,xn=Jo(t.containerInfo),Zt(t,e),xn=a,Kt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Ua(t.containerInfo)}catch(ce){Ie(e,e.return,ce)}Jr&&(Jr=!1,Md(e));break;case 4:l=xn,xn=Jo(e.stateNode.containerInfo),Zt(t,e),Kt(e),xn=l;break;case 12:Zt(t,e),Kt(e);break;case 31:Zt(t,e),Kt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Lo(e,l)));break;case 13:Zt(t,e),Kt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Ho=Tt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Lo(e,l)));break;case 22:a=e.memoizedState!==null;var m=n!==null&&n.memoizedState!==null,M=Jn,R=St;if(Jn=M||a,St=R||m,Zt(t,e),St=R,Jn=M,Kt(e),l&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||m||Jn||St||Kl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){m=n=t;try{if(i=m.stateNode,a)c=i.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{d=m.stateNode;var B=m.memoizedProps.style,T=B!=null&&B.hasOwnProperty("display")?B.display:null;d.style.display=T==null||typeof T=="boolean"?"":(""+T).trim()}}catch(ce){Ie(m,m.return,ce)}}}else if(t.tag===6){if(n===null){m=t;try{m.stateNode.nodeValue=a?"":m.memoizedProps}catch(ce){Ie(m,m.return,ce)}}}else if(t.tag===18){if(n===null){m=t;try{var E=m.stateNode;a?p0(E,!0):p0(m.stateNode,!1)}catch(ce){Ie(m,m.return,ce)}}}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}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,Lo(e,n))));break;case 19:Zt(t,e),Kt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,Lo(e,l)));break;case 30:break;case 21:break;default:Zt(t,e),Kt(e)}}function Kt(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(gd(l)){n=l;break}l=l.return}if(n==null)throw Error(u(160));switch(n.tag){case 27:var a=n.stateNode,i=Zr(e);Oo(e,i,a);break;case 5:var c=n.stateNode;n.flags&32&&(aa(c,""),n.flags&=-33);var d=Zr(e);Oo(e,d,c);break;case 3:case 4:var m=n.stateNode.containerInfo,M=Zr(e);Kr(e,M,m);break;default:throw Error(u(161))}}catch(R){Ie(e,e.return,R)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Md(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Md(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function $n(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)bd(e,t.alternate,t),t=t.sibling}function Kl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:ml(4,t,t.return),Kl(t);break;case 1:En(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&pd(t,t.return,n),Kl(t);break;case 27:Mi(t.stateNode);case 26:case 5:En(t,t.return),Kl(t);break;case 22:t.memoizedState===null&&Kl(t);break;case 30:Kl(t);break;default:Kl(t)}e=e.sibling}}function Wn(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,a=e,i=t,c=i.flags;switch(i.tag){case 0:case 11:case 15:Wn(a,i,n),mi(4,i);break;case 1:if(Wn(a,i,n),l=i,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(M){Ie(l,l.return,M)}if(l=i,a=l.updateQueue,a!==null){var d=l.stateNode;try{var m=a.shared.hiddenCallbacks;if(m!==null)for(a.shared.hiddenCallbacks=null,a=0;a<m.length;a++)tf(m[a],d)}catch(M){Ie(l,l.return,M)}}n&&c&64&&hd(i),gi(i,i.return);break;case 27:yd(i);case 26:case 5:Wn(a,i,n),n&&l===null&&c&4&&md(i),gi(i,i.return);break;case 12:Wn(a,i,n);break;case 31:Wn(a,i,n),n&&c&4&&Cd(a,i);break;case 13:Wn(a,i,n),n&&c&4&&wd(a,i);break;case 22:i.memoizedState===null&&Wn(a,i,n),gi(i,i.return);break;case 30:break;default:Wn(a,i,n)}t=t.sibling}}function Fr(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&&ni(n))}function $r(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ni(e))}function Sn(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Td(e,t,n,l),t=t.sibling}function Td(e,t,n,l){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Sn(e,t,n,l),a&2048&&mi(9,t);break;case 1:Sn(e,t,n,l);break;case 3:Sn(e,t,n,l),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ni(e)));break;case 12:if(a&2048){Sn(e,t,n,l),e=t.stateNode;try{var i=t.memoizedProps,c=i.id,d=i.onPostCommit;typeof d=="function"&&d(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(m){Ie(t,t.return,m)}}else Sn(e,t,n,l);break;case 31:Sn(e,t,n,l);break;case 13:Sn(e,t,n,l);break;case 23:break;case 22:i=t.stateNode,c=t.alternate,t.memoizedState!==null?i._visibility&2?Sn(e,t,n,l):yi(e,t):i._visibility&2?Sn(e,t,n,l):(i._visibility|=2,za(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),a&2048&&Fr(c,t);break;case 24:Sn(e,t,n,l),a&2048&&$r(t.alternate,t);break;default:Sn(e,t,n,l)}}function za(e,t,n,l,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,c=t,d=n,m=l,M=c.flags;switch(c.tag){case 0:case 11:case 15:za(i,c,d,m,a),mi(8,c);break;case 23:break;case 22:var R=c.stateNode;c.memoizedState!==null?R._visibility&2?za(i,c,d,m,a):yi(i,c):(R._visibility|=2,za(i,c,d,m,a)),a&&M&2048&&Fr(c.alternate,c);break;case 24:za(i,c,d,m,a),a&&M&2048&&$r(c.alternate,c);break;default:za(i,c,d,m,a)}t=t.sibling}}function yi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,a=l.flags;switch(l.tag){case 22:yi(n,l),a&2048&&Fr(l.alternate,l);break;case 24:yi(n,l),a&2048&&$r(l.alternate,l);break;default:yi(n,l)}t=t.sibling}}var vi=8192;function Ma(e,t,n){if(e.subtreeFlags&vi)for(e=e.child;e!==null;)Ad(e,t,n),e=e.sibling}function Ad(e,t,n){switch(e.tag){case 26:Ma(e,t,n),e.flags&vi&&e.memoizedState!==null&&Am(n,xn,e.memoizedState,e.memoizedProps);break;case 5:Ma(e,t,n);break;case 3:case 4:var l=xn;xn=Jo(e.stateNode.containerInfo),Ma(e,t,n),xn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=vi,vi=16777216,Ma(e,t,n),vi=l):Ma(e,t,n));break;default:Ma(e,t,n)}}function Ed(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 bi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];zt=l,kd(l,e)}Ed(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Dd(e),e=e.sibling}function Dd(e){switch(e.tag){case 0:case 11:case 15:bi(e),e.flags&2048&&ml(9,e,e.return);break;case 3:bi(e);break;case 12:bi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Uo(e)):bi(e);break;default:bi(e)}}function Uo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];zt=l,kd(l,e)}Ed(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:ml(8,t,t.return),Uo(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Uo(t));break;default:Uo(t)}e=e.sibling}}function kd(e,t){for(;zt!==null;){var n=zt;switch(n.tag){case 0:case 11:case 15:ml(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ni(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,zt=l;else e:for(n=e;zt!==null;){l=zt;var a=l.sibling,i=l.return;if(xd(l),l===n){zt=null;break e}if(a!==null){a.return=i,zt=a;break e}zt=i}}}var Gp={getCacheForType:function(e){var t=Dt(vt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Dt(vt).controller.signal}},Vp=typeof WeakMap=="function"?WeakMap:Map,Ke=0,lt=null,Be=null,je=0,We=0,tn=null,gl=!1,Ta=!1,Wr=!1,In=0,dt=0,yl=0,Jl=0,Ir=0,nn=0,Aa=0,xi=null,Jt=null,Pr=!1,Ho=0,_d=0,Bo=1/0,No=null,vl=null,wt=0,bl=null,Ea=null,Pn=0,es=0,ts=null,Rd=null,Si=0,ns=null;function ln(){return(Ke&2)!==0&&je!==0?je&-je:D.T!==null?rs():Hn()}function Od(){if(nn===0)if((je&536870912)===0||Ge){var e=Il;Il<<=1,(Il&3932160)===0&&(Il=262144),nn=e}else nn=536870912;return e=Pt.current,e!==null&&(e.flags|=32),nn}function Ft(e,t,n){(e===lt&&(We===2||We===9)||e.cancelPendingCommit!==null)&&(Da(e,0),xl(e,je,nn,!1)),yn(e,n),((Ke&2)===0||e!==lt)&&(e===lt&&((Ke&2)===0&&(Jl|=n),dt===4&&xl(e,je,nn,!1)),Dn(e))}function Ld(e,t,n){if((Ke&6)!==0)throw Error(u(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||_l(e,t),a=l?Zp(e,t):as(e,t,!0),i=l;do{if(a===0){Ta&&!l&&xl(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!Xp(n)){a=as(e,t,!1),i=!1;continue}if(a===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 d=e;a=xi;var m=d.current.memoizedState.isDehydrated;if(m&&(Da(d,c).flags|=256),c=as(d,c,!1),c!==2){if(Wr&&!m){d.errorRecoveryDisabledLanes|=i,Jl|=i,a=4;break e}i=Jt,Jt=a,i!==null&&(Jt===null?Jt=i:Jt.push.apply(Jt,i))}a=c}if(i=!1,a!==2)continue}}if(a===1){Da(e,0),xl(e,t,0,!0);break}e:{switch(l=e,i=a,i){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:xl(l,t,nn,!gl);break e;case 2:Jt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(a=Ho+300-Tt(),10<a)){if(xl(l,t,nn,!gl),ea(l,0,!0)!==0)break e;Pn=t,l.timeoutHandle=f0(Ud.bind(null,l,n,Jt,No,Pr,t,nn,Jl,Aa,gl,i,"Throttled",-0,0),a);break e}Ud(l,n,Jt,No,Pr,t,nn,Jl,Aa,gl,i,null,-0,0)}}break}while(!0);Dn(e)}function Ud(e,t,n,l,a,i,c,d,m,M,R,B,T,E){if(e.timeoutHandle=-1,B=t.subtreeFlags,B&8192||(B&16785408)===16785408){B={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Nn},Ad(t,i,B);var ce=(i&62914560)===i?Ho-Tt():(i&4194048)===i?_d-Tt():0;if(ce=Em(B,ce),ce!==null){Pn=i,e.cancelPendingCommit=ce(Vd.bind(null,e,t,i,n,l,a,c,d,m,R,B,null,T,E)),xl(e,i,c,!M);return}}Vd(e,t,i,n,l,a,c,d,m)}function Xp(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 l=0;l<n.length;l++){var a=n[l],i=a.getSnapshot;a=a.value;try{if(!Wt(i(),a))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 xl(e,t,n,l){t&=~Ir,t&=~Jl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var a=t;0<a;){var i=31-jt(a),c=1<<i;l[i]=-1,a&=~c}n!==0&&Qi(e,n,t)}function jo(){return(Ke&6)===0?(Ci(0),!1):!0}function ls(){if(Be!==null){if(We===0)var e=Be.return;else e=Be,Gn=jl=null,br(e),ba=null,ai=0,e=Be;for(;e!==null;)dd(e.alternate,e),e=e.return;Be=null}}function Da(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,um(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Pn=0,ls(),lt=e,Be=n=qn(e.current,null),je=t,We=0,tn=null,gl=!1,Ta=_l(e,t),Wr=!1,Aa=nn=Ir=Jl=yl=dt=0,Jt=xi=null,Pr=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-jt(l),i=1<<a;t|=e[a],l&=~i}return In=t,io(),n}function Hd(e,t){Re=null,D.H=di,t===va||t===po?(t=Wu(),We=3):t===cr?(t=Wu(),We=4):We=t===Ur?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,tn=t,Be===null&&(dt=1,Eo(e,un(t,e.current)))}function Bd(){var e=Pt.current;return e===null?!0:(je&4194048)===je?pn===null:(je&62914560)===je||(je&536870912)!==0?e===pn:!1}function Nd(){var e=D.H;return D.H=di,e===null?di:e}function jd(){var e=D.A;return D.A=Gp,e}function qo(){dt=4,gl||(je&4194048)!==je&&Pt.current!==null||(Ta=!0),(yl&134217727)===0&&(Jl&134217727)===0||lt===null||xl(lt,je,nn,!1)}function as(e,t,n){var l=Ke;Ke|=2;var a=Nd(),i=jd();(lt!==e||je!==t)&&(No=null,Da(e,t)),t=!1;var c=dt;e:do try{if(We!==0&&Be!==null){var d=Be,m=tn;switch(We){case 8:ls(),c=6;break e;case 3:case 2:case 9:case 6:Pt.current===null&&(t=!0);var M=We;if(We=0,tn=null,ka(e,d,m,M),n&&Ta){c=0;break e}break;default:M=We,We=0,tn=null,ka(e,d,m,M)}}Qp(),c=dt;break}catch(R){Hd(e,R)}while(!0);return t&&e.shellSuspendCounter++,Gn=jl=null,Ke=l,D.H=a,D.A=i,Be===null&&(lt=null,je=0,io()),c}function Qp(){for(;Be!==null;)qd(Be)}function Zp(e,t){var n=Ke;Ke|=2;var l=Nd(),a=jd();lt!==e||je!==t?(No=null,Bo=Tt()+500,Da(e,t)):Ta=_l(e,t);e:do try{if(We!==0&&Be!==null){t=Be;var i=tn;t:switch(We){case 1:We=0,tn=null,ka(e,t,i,1);break;case 2:case 9:if(Fu(i)){We=0,tn=null,Yd(t);break}t=function(){We!==2&&We!==9||lt!==e||(We=7),Dn(e)},i.then(t,t);break e;case 3:We=7;break e;case 4:We=5;break e;case 7:Fu(i)?(We=0,tn=null,Yd(t)):(We=0,tn=null,ka(e,t,i,7));break;case 5:var c=null;switch(Be.tag){case 26:c=Be.memoizedState;case 5:case 27:var d=Be;if(c?T0(c):d.stateNode.complete){We=0,tn=null;var m=d.sibling;if(m!==null)Be=m;else{var M=d.return;M!==null?(Be=M,Yo(M)):Be=null}break t}}We=0,tn=null,ka(e,t,i,5);break;case 6:We=0,tn=null,ka(e,t,i,6);break;case 8:ls(),dt=6;break e;default:throw Error(u(462))}}Kp();break}catch(R){Hd(e,R)}while(!0);return Gn=jl=null,D.H=l,D.A=a,Ke=n,Be!==null?0:(lt=null,je=0,io(),dt)}function Kp(){for(;Be!==null&&!Dl();)qd(Be)}function qd(e){var t=ud(e.alternate,e,In);e.memoizedProps=e.pendingProps,t===null?Yo(e):Be=t}function Yd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=ad(n,t,t.pendingProps,t.type,void 0,je);break;case 11:t=ad(n,t,t.pendingProps,t.type.render,t.ref,je);break;case 5:br(t);default:dd(n,t),t=Be=Nu(t,In),t=ud(n,t,In)}e.memoizedProps=e.pendingProps,t===null?Yo(e):Be=t}function ka(e,t,n,l){Gn=jl=null,br(t),ba=null,ai=0;var a=t.return;try{if(Up(e,a,t,n,je)){dt=1,Eo(e,un(n,e.current)),Be=null;return}}catch(i){if(a!==null)throw Be=a,i;dt=1,Eo(e,un(n,e.current)),Be=null;return}t.flags&32768?(Ge||l===1?e=!0:Ta||(je&536870912)!==0?e=!1:(gl=e=!0,(l===2||l===9||l===3||l===6)&&(l=Pt.current,l!==null&&l.tag===13&&(l.flags|=16384))),Gd(t,e)):Yo(t)}function Yo(e){var t=e;do{if((t.flags&32768)!==0){Gd(t,gl);return}e=t.return;var n=Np(t.alternate,t,In);if(n!==null){Be=n;return}if(t=t.sibling,t!==null){Be=t;return}Be=t=e}while(t!==null);dt===0&&(dt=5)}function Gd(e,t){do{var n=jp(e.alternate,e);if(n!==null){n.flags&=32767,Be=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Be=e;return}Be=e=n}while(e!==null);dt=6,Be=null}function Vd(e,t,n,l,a,i,c,d,m){e.cancelPendingCommit=null;do Go();while(wt!==0);if((Ke&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(i=t.lanes|t.childLanes,i|=Zc,zc(e,n,i,c,d,m),e===lt&&(Be=lt=null,je=0),Ea=t,bl=e,Pn=n,es=i,ts=a,Rd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Wp(ll,function(){return Jd(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null,a=j.p,j.p=2,c=Ke,Ke|=4;try{qp(e,t,n)}finally{Ke=c,j.p=a,D.T=l}}wt=1,Xd(),Qd(),Zd()}}function Xd(){if(wt===1){wt=0;var e=bl,t=Ea,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=D.T,D.T=null;var l=j.p;j.p=2;var a=Ke;Ke|=4;try{zd(t,e);var i=gs,c=Du(e.containerInfo),d=i.focusedElem,m=i.selectionRange;if(c!==d&&d&&d.ownerDocument&&Eu(d.ownerDocument.documentElement,d)){if(m!==null&&Yc(d)){var M=m.start,R=m.end;if(R===void 0&&(R=M),"selectionStart"in d)d.selectionStart=M,d.selectionEnd=Math.min(R,d.value.length);else{var B=d.ownerDocument||document,T=B&&B.defaultView||window;if(T.getSelection){var E=T.getSelection(),ce=d.textContent.length,Ce=Math.min(m.start,ce),tt=m.end===void 0?Ce:Math.min(m.end,ce);!E.extend&&Ce>tt&&(c=tt,tt=Ce,Ce=c);var C=Au(d,Ce),b=Au(d,tt);if(C&&b&&(E.rangeCount!==1||E.anchorNode!==C.node||E.anchorOffset!==C.offset||E.focusNode!==b.node||E.focusOffset!==b.offset)){var z=B.createRange();z.setStart(C.node,C.offset),E.removeAllRanges(),Ce>tt?(E.addRange(z),E.extend(b.node,b.offset)):(z.setEnd(b.node,b.offset),E.addRange(z))}}}}for(B=[],E=d;E=E.parentNode;)E.nodeType===1&&B.push({element:E,left:E.scrollLeft,top:E.scrollTop});for(typeof d.focus=="function"&&d.focus(),d=0;d<B.length;d++){var L=B[d];L.element.scrollLeft=L.left,L.element.scrollTop=L.top}}ec=!!ms,gs=ms=null}finally{Ke=a,j.p=l,D.T=n}}e.current=t,wt=2}}function Qd(){if(wt===2){wt=0;var e=bl,t=Ea,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=D.T,D.T=null;var l=j.p;j.p=2;var a=Ke;Ke|=4;try{bd(e,t.alternate,t)}finally{Ke=a,j.p=l,D.T=n}}wt=3}}function Zd(){if(wt===4||wt===3){wt=0,Cn();var e=bl,t=Ea,n=Pn,l=Rd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?wt=5:(wt=0,Ea=bl=null,Kd(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(vl=null),Mn(n),t=t.stateNode,Nt&&typeof Nt.onCommitFiberRoot=="function")try{Nt.onCommitFiberRoot(kl,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=D.T,a=j.p,j.p=2,D.T=null;try{for(var i=e.onRecoverableError,c=0;c<l.length;c++){var d=l[c];i(d.value,{componentStack:d.stack})}}finally{D.T=t,j.p=a}}(Pn&3)!==0&&Go(),Dn(e),a=e.pendingLanes,(n&261930)!==0&&(a&42)!==0?e===ns?Si++:(Si=0,ns=e):Si=0,Ci(0)}}function Kd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ni(t)))}function Go(){return Xd(),Qd(),Zd(),Jd()}function Jd(){if(wt!==5)return!1;var e=bl,t=es;es=0;var n=Mn(Pn),l=D.T,a=j.p;try{j.p=32>n?32:n,D.T=null,n=ts,ts=null;var i=bl,c=Pn;if(wt=0,Ea=bl=null,Pn=0,(Ke&6)!==0)throw Error(u(331));var d=Ke;if(Ke|=4,Dd(i.current),Td(i,i.current,c,n),Ke=d,Ci(0,!1),Nt&&typeof Nt.onPostCommitFiberRoot=="function")try{Nt.onPostCommitFiberRoot(kl,i)}catch{}return!0}finally{j.p=a,D.T=l,Kd(e,t)}}function Fd(e,t,n){t=un(n,t),t=Lr(e.stateNode,t,2),e=dl(e,t,2),e!==null&&(yn(e,2),Dn(e))}function Ie(e,t,n){if(e.tag===3)Fd(e,e,n);else for(;t!==null;){if(t.tag===3){Fd(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(vl===null||!vl.has(l))){e=un(n,e),n=$f(2),l=dl(t,n,2),l!==null&&(Wf(n,l,t,e),yn(l,2),Dn(l));break}}t=t.return}}function is(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new Vp;var a=new Set;l.set(t,a)}else a=l.get(t),a===void 0&&(a=new Set,l.set(t,a));a.has(n)||(Wr=!0,a.add(n),e=Jp.bind(null,e,t,n),t.then(e,e))}function Jp(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,lt===e&&(je&n)===n&&(dt===4||dt===3&&(je&62914560)===je&&300>Tt()-Ho?(Ke&2)===0&&Da(e,0):Ir|=n,Aa===je&&(Aa=0)),Dn(e)}function $d(e,t){t===0&&(t=Xi()),e=Hl(e,t),e!==null&&(yn(e,t),Dn(e))}function Fp(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),$d(e,n)}function $p(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),$d(e,n)}function Wp(e,t){return tl(e,t)}var Vo=null,_a=null,os=!1,Xo=!1,cs=!1,Sl=0;function Dn(e){e!==_a&&e.next===null&&(_a===null?Vo=_a=e:_a=_a.next=e),Xo=!0,os||(os=!0,Pp())}function Ci(e,t){if(!cs&&Xo){cs=!0;do for(var n=!1,l=Vo;l!==null;){if(e!==0){var a=l.pendingLanes;if(a===0)var i=0;else{var c=l.suspendedLanes,d=l.pingedLanes;i=(1<<31-jt(42|e)+1)-1,i&=a&~(c&~d),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,e0(l,i))}else i=je,i=ea(l,l===lt?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||_l(l,i)||(n=!0,e0(l,i));l=l.next}while(n);cs=!1}}function Ip(){Wd()}function Wd(){Xo=os=!1;var e=0;Sl!==0&&sm()&&(e=Sl);for(var t=Tt(),n=null,l=Vo;l!==null;){var a=l.next,i=Id(l,t);i===0?(l.next=null,n===null?Vo=a:n.next=a,a===null&&(_a=n)):(n=l,(e!==0||(i&3)!==0)&&(Xo=!0)),l=a}wt!==0&&wt!==5||Ci(e),Sl!==0&&(Sl=0)}function Id(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var c=31-jt(i),d=1<<c,m=a[c];m===-1?((d&n)===0||(d&l)!==0)&&(a[c]=wc(d,t)):m<=t&&(e.expiredLanes|=d),i&=~d}if(t=lt,n=je,n=ea(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(We===2||We===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Lt(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||_l(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Lt(l),Mn(n)){case 2:case 8:n=nl;break;case 32:n=ll;break;case 268435456:n=Ya;break;default:n=ll}return l=Pd.bind(null,e),n=tl(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Lt(l),e.callbackPriority=2,e.callbackNode=null,2}function Pd(e,t){if(wt!==0&&wt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Go()&&e.callbackNode!==n)return null;var l=je;return l=ea(e,e===lt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Ld(e,l,t),Id(e,Tt()),e.callbackNode!=null&&e.callbackNode===n?Pd.bind(null,e):null)}function e0(e,t){if(Go())return null;Ld(e,t,!0)}function Pp(){fm(function(){(Ke&6)!==0?tl(yt,Ip):Wd()})}function rs(){if(Sl===0){var e=ga;e===0&&(e=Wl,Wl<<=1,(Wl&261888)===0&&(Wl=256)),Sl=e}return Sl}function t0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Wi(""+e)}function n0(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 em(e,t,n,l,a){if(t==="submit"&&n&&n.stateNode===a){var i=t0((a[At]||null).action),c=l.submitter;c&&(t=(t=c[At]||null)?t0(t.formAction):c.getAttribute("formAction"),t!==null&&(i=t,c=null));var d=new to("action","action",null,l,a);e.push({event:d,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Sl!==0){var m=c?n0(a,c):new FormData(a);Er(n,{pending:!0,data:m,method:a.method,action:i},null,m)}}else typeof i=="function"&&(d.preventDefault(),m=c?n0(a,c):new FormData(a),Er(n,{pending:!0,data:m,method:a.method,action:i},i,m))},currentTarget:a}]})}}for(var ss=0;ss<Qc.length;ss++){var us=Qc[ss],tm=us.toLowerCase(),nm=us[0].toUpperCase()+us.slice(1);bn(tm,"on"+nm)}bn(Ru,"onAnimationEnd"),bn(Ou,"onAnimationIteration"),bn(Lu,"onAnimationStart"),bn("dblclick","onDoubleClick"),bn("focusin","onFocus"),bn("focusout","onBlur"),bn(vp,"onTransitionRun"),bn(bp,"onTransitionStart"),bn(xp,"onTransitionCancel"),bn(Uu,"onTransitionEnd"),na("onMouseEnter",["mouseout","mouseover"]),na("onMouseLeave",["mouseout","mouseover"]),na("onPointerEnter",["pointerout","pointerover"]),na("onPointerLeave",["pointerout","pointerover"]),Rl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Rl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Rl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Rl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Rl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Rl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var wi="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(" "),lm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(wi));function l0(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],a=l.event;l=l.listeners;e:{var i=void 0;if(t)for(var c=l.length-1;0<=c;c--){var d=l[c],m=d.instance,M=d.currentTarget;if(d=d.listener,m!==i&&a.isPropagationStopped())break e;i=d,a.currentTarget=M;try{i(a)}catch(R){ao(R)}a.currentTarget=null,i=m}else for(c=0;c<l.length;c++){if(d=l[c],m=d.instance,M=d.currentTarget,d=d.listener,m!==i&&a.isPropagationStopped())break e;i=d,a.currentTarget=M;try{i(a)}catch(R){ao(R)}a.currentTarget=null,i=m}}}}function Ne(e,t){var n=t[Va];n===void 0&&(n=t[Va]=new Set);var l=e+"__bubble";n.has(l)||(a0(t,e,2,!1),n.add(l))}function fs(e,t,n){var l=0;t&&(l|=4),a0(n,e,l,t)}var Qo="_reactListening"+Math.random().toString(36).slice(2);function ds(e){if(!e[Qo]){e[Qo]=!0,Yt.forEach(function(n){n!=="selectionchange"&&(lm.has(n)||fs(n,!1,e),fs(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Qo]||(t[Qo]=!0,fs("selectionchange",!1,t))}}function a0(e,t,n,l){switch(O0(t)){case 2:var a=_m;break;case 8:a=Rm;break;default:a=As}n=a.bind(null,t,n,e),a=void 0,!Rc||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),l?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function hs(e,t,n,l,a){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var c=l.tag;if(c===3||c===4){var d=l.stateNode.containerInfo;if(d===a)break;if(c===4)for(c=l.return;c!==null;){var m=c.tag;if((m===3||m===4)&&c.stateNode.containerInfo===a)return;c=c.return}for(;d!==null;){if(c=ke(d),c===null)return;if(m=c.tag,m===5||m===6||m===26||m===27){l=i=c;continue e}d=d.parentNode}}l=l.return}ru(function(){var M=i,R=kc(n),B=[];e:{var T=Hu.get(e);if(T!==void 0){var E=to,ce=e;switch(e){case"keypress":if(Pi(n)===0)break e;case"keydown":case"keyup":E=$h;break;case"focusin":ce="focus",E=Hc;break;case"focusout":ce="blur",E=Hc;break;case"beforeblur":case"afterblur":E=Hc;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":E=fu;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":E=Nh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":E=Ph;break;case Ru:case Ou:case Lu:E=Yh;break;case Uu:E=tp;break;case"scroll":case"scrollend":E=Hh;break;case"wheel":E=lp;break;case"copy":case"cut":case"paste":E=Vh;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":E=hu;break;case"toggle":case"beforetoggle":E=ip}var Ce=(t&4)!==0,tt=!Ce&&(e==="scroll"||e==="scrollend"),C=Ce?T!==null?T+"Capture":null:T;Ce=[];for(var b=M,z;b!==null;){var L=b;if(z=L.stateNode,L=L.tag,L!==5&&L!==26&&L!==27||z===null||C===null||(L=Qa(b,C),L!=null&&Ce.push(zi(b,L,z))),tt)break;b=b.return}0<Ce.length&&(T=new E(T,ce,null,n,R),B.push({event:T,listeners:Ce}))}}if((t&7)===0){e:{if(T=e==="mouseover"||e==="pointerover",E=e==="mouseout"||e==="pointerout",T&&n!==Dc&&(ce=n.relatedTarget||n.fromElement)&&(ke(ce)||ce[al]))break e;if((E||T)&&(T=R.window===R?R:(T=R.ownerDocument)?T.defaultView||T.parentWindow:window,E?(ce=n.relatedTarget||n.toElement,E=M,ce=ce?ke(ce):null,ce!==null&&(tt=g(ce),Ce=ce.tag,ce!==tt||Ce!==5&&Ce!==27&&Ce!==6)&&(ce=null)):(E=null,ce=M),E!==ce)){if(Ce=fu,L="onMouseLeave",C="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(Ce=hu,L="onPointerLeave",C="onPointerEnter",b="pointer"),tt=E==null?T:Ze(E),z=ce==null?T:Ze(ce),T=new Ce(L,b+"leave",E,n,R),T.target=tt,T.relatedTarget=z,L=null,ke(R)===M&&(Ce=new Ce(C,b+"enter",ce,n,R),Ce.target=z,Ce.relatedTarget=tt,L=Ce),tt=L,E&&ce)t:{for(Ce=am,C=E,b=ce,z=0,L=C;L;L=Ce(L))z++;L=0;for(var xe=b;xe;xe=Ce(xe))L++;for(;0<z-L;)C=Ce(C),z--;for(;0<L-z;)b=Ce(b),L--;for(;z--;){if(C===b||b!==null&&C===b.alternate){Ce=C;break t}C=Ce(C),b=Ce(b)}Ce=null}else Ce=null;E!==null&&i0(B,T,E,Ce,!1),ce!==null&&tt!==null&&i0(B,tt,ce,Ce,!0)}}e:{if(T=M?Ze(M):window,E=T.nodeName&&T.nodeName.toLowerCase(),E==="select"||E==="input"&&T.type==="file")var Xe=Su;else if(bu(T))if(Cu)Xe=mp;else{Xe=hp;var de=dp}else E=T.nodeName,!E||E.toLowerCase()!=="input"||T.type!=="checkbox"&&T.type!=="radio"?M&&Ec(M.elementType)&&(Xe=Su):Xe=pp;if(Xe&&(Xe=Xe(e,M))){xu(B,Xe,n,R);break e}de&&de(e,T,M),e==="focusout"&&M&&T.type==="number"&&M.memoizedProps.value!=null&&Ac(T,"number",T.value)}switch(de=M?Ze(M):window,e){case"focusin":(bu(de)||de.contentEditable==="true")&&(ra=de,Gc=M,Pa=null);break;case"focusout":Pa=Gc=ra=null;break;case"mousedown":Vc=!0;break;case"contextmenu":case"mouseup":case"dragend":Vc=!1,ku(B,n,R);break;case"selectionchange":if(yp)break;case"keydown":case"keyup":ku(B,n,R)}var Oe;if(Nc)e:{switch(e){case"compositionstart":var qe="onCompositionStart";break e;case"compositionend":qe="onCompositionEnd";break e;case"compositionupdate":qe="onCompositionUpdate";break e}qe=void 0}else ca?yu(e,n)&&(qe="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(qe="onCompositionStart");qe&&(pu&&n.locale!=="ko"&&(ca||qe!=="onCompositionStart"?qe==="onCompositionEnd"&&ca&&(Oe=su()):(il=R,Oc="value"in il?il.value:il.textContent,ca=!0)),de=Zo(M,qe),0<de.length&&(qe=new du(qe,e,null,n,R),B.push({event:qe,listeners:de}),Oe?qe.data=Oe:(Oe=vu(n),Oe!==null&&(qe.data=Oe)))),(Oe=cp?rp(e,n):sp(e,n))&&(qe=Zo(M,"onBeforeInput"),0<qe.length&&(de=new du("onBeforeInput","beforeinput",null,n,R),B.push({event:de,listeners:qe}),de.data=Oe)),em(B,e,M,n,R)}l0(B,t)})}function zi(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zo(e,t){for(var n=t+"Capture",l=[];e!==null;){var a=e,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=Qa(e,n),a!=null&&l.unshift(zi(e,a,i)),a=Qa(e,t),a!=null&&l.push(zi(e,a,i))),e.tag===3)return l;e=e.return}return[]}function am(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function i0(e,t,n,l,a){for(var i=t._reactName,c=[];n!==null&&n!==l;){var d=n,m=d.alternate,M=d.stateNode;if(d=d.tag,m!==null&&m===l)break;d!==5&&d!==26&&d!==27||M===null||(m=M,a?(M=Qa(n,i),M!=null&&c.unshift(zi(n,M,m))):a||(M=Qa(n,i),M!=null&&c.push(zi(n,M,m)))),n=n.return}c.length!==0&&e.push({event:t,listeners:c})}var im=/\r\n?/g,om=/\u0000|\uFFFD/g;function o0(e){return(typeof e=="string"?e:""+e).replace(im,`
|
|
9
|
+
`).replace(om,"")}function c0(e,t){return t=o0(t),o0(e)===t}function et(e,t,n,l,a,i){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||aa(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&aa(e,""+l);break;case"className":Fi(e,"class",l);break;case"tabIndex":Fi(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Fi(e,n,l);break;case"style":ou(e,l,i);break;case"data":if(t!=="object"){Fi(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=Wi(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="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"&&et(e,t,"name",a.name,a,null),et(e,t,"formEncType",a.formEncType,a,null),et(e,t,"formMethod",a.formMethod,a,null),et(e,t,"formTarget",a.formTarget,a,null)):(et(e,t,"encType",a.encType,a,null),et(e,t,"method",a.method,a,null),et(e,t,"target",a.target,a,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=Wi(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Nn);break;case"onScroll":l!=null&&Ne("scroll",e);break;case"onScrollEnd":l!=null&&Ne("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=Wi(""+l),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":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":Ne("beforetoggle",e),Ne("toggle",e),Ji(e,"popover",l);break;case"xlinkActuate":Bn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Bn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Bn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Bn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Bn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Bn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Bn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Bn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Bn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ji(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Lh.get(n)||n,Ji(e,n,l))}}function ps(e,t,n,l,a,i){switch(n){case"style":ou(e,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"children":typeof l=="string"?aa(e,l):(typeof l=="number"||typeof l=="bigint")&&aa(e,""+l);break;case"onScroll":l!=null&&Ne("scroll",e);break;case"onScrollEnd":l!=null&&Ne("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Nn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Xa.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),i=e[At]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,a),typeof l=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,a);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):Ji(e,n,l)}}}function _t(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ne("error",e),Ne("load",e);var l=!1,a=!1,i;for(i in n)if(n.hasOwnProperty(i)){var c=n[i];if(c!=null)switch(i){case"src":l=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:et(e,t,i,c,n,null)}}a&&et(e,t,"srcSet",n.srcSet,n,null),l&&et(e,t,"src",n.src,n,null);return;case"input":Ne("invalid",e);var d=i=c=a=null,m=null,M=null;for(l in n)if(n.hasOwnProperty(l)){var R=n[l];if(R!=null)switch(l){case"name":a=R;break;case"type":c=R;break;case"checked":m=R;break;case"defaultChecked":M=R;break;case"value":i=R;break;case"defaultValue":d=R;break;case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(u(137,t));break;default:et(e,t,l,R,n,null)}}nu(e,i,d,m,M,c,a,!1);return;case"select":Ne("invalid",e),l=c=i=null;for(a in n)if(n.hasOwnProperty(a)&&(d=n[a],d!=null))switch(a){case"value":i=d;break;case"defaultValue":c=d;break;case"multiple":l=d;default:et(e,t,a,d,n,null)}t=i,n=c,e.multiple=!!l,t!=null?la(e,!!l,t,!1):n!=null&&la(e,!!l,n,!0);return;case"textarea":Ne("invalid",e),i=a=l=null;for(c in n)if(n.hasOwnProperty(c)&&(d=n[c],d!=null))switch(c){case"value":l=d;break;case"defaultValue":a=d;break;case"children":i=d;break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(u(91));break;default:et(e,t,c,d,n,null)}au(e,l,a,i);return;case"option":for(m in n)n.hasOwnProperty(m)&&(l=n[m],l!=null)&&(m==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":et(e,t,m,l,n,null));return;case"dialog":Ne("beforetoggle",e),Ne("toggle",e),Ne("cancel",e),Ne("close",e);break;case"iframe":case"object":Ne("load",e);break;case"video":case"audio":for(l=0;l<wi.length;l++)Ne(wi[l],e);break;case"image":Ne("error",e),Ne("load",e);break;case"details":Ne("toggle",e);break;case"embed":case"source":case"link":Ne("error",e),Ne("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(M in n)if(n.hasOwnProperty(M)&&(l=n[M],l!=null))switch(M){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:et(e,t,M,l,n,null)}return;default:if(Ec(t)){for(R in n)n.hasOwnProperty(R)&&(l=n[R],l!==void 0&&ps(e,t,R,l,n,void 0));return}}for(d in n)n.hasOwnProperty(d)&&(l=n[d],l!=null&&et(e,t,d,l,n,null))}function cm(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,c=null,d=null,m=null,M=null,R=null;for(E in n){var B=n[E];if(n.hasOwnProperty(E)&&B!=null)switch(E){case"checked":break;case"value":break;case"defaultValue":m=B;default:l.hasOwnProperty(E)||et(e,t,E,null,l,B)}}for(var T in l){var E=l[T];if(B=n[T],l.hasOwnProperty(T)&&(E!=null||B!=null))switch(T){case"type":i=E;break;case"name":a=E;break;case"checked":M=E;break;case"defaultChecked":R=E;break;case"value":c=E;break;case"defaultValue":d=E;break;case"children":case"dangerouslySetInnerHTML":if(E!=null)throw Error(u(137,t));break;default:E!==B&&et(e,t,T,E,l,B)}}Tc(e,c,d,m,M,R,i,a);return;case"select":E=c=d=T=null;for(i in n)if(m=n[i],n.hasOwnProperty(i)&&m!=null)switch(i){case"value":break;case"multiple":E=m;default:l.hasOwnProperty(i)||et(e,t,i,null,l,m)}for(a in l)if(i=l[a],m=n[a],l.hasOwnProperty(a)&&(i!=null||m!=null))switch(a){case"value":T=i;break;case"defaultValue":d=i;break;case"multiple":c=i;default:i!==m&&et(e,t,a,i,l,m)}t=d,n=c,l=E,T!=null?la(e,!!n,T,!1):!!l!=!!n&&(t!=null?la(e,!!n,t,!0):la(e,!!n,n?[]:"",!1));return;case"textarea":E=T=null;for(d in n)if(a=n[d],n.hasOwnProperty(d)&&a!=null&&!l.hasOwnProperty(d))switch(d){case"value":break;case"children":break;default:et(e,t,d,null,l,a)}for(c in l)if(a=l[c],i=n[c],l.hasOwnProperty(c)&&(a!=null||i!=null))switch(c){case"value":T=a;break;case"defaultValue":E=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(u(91));break;default:a!==i&&et(e,t,c,a,l,i)}lu(e,T,E);return;case"option":for(var ce in n)T=n[ce],n.hasOwnProperty(ce)&&T!=null&&!l.hasOwnProperty(ce)&&(ce==="selected"?e.selected=!1:et(e,t,ce,null,l,T));for(m in l)T=l[m],E=n[m],l.hasOwnProperty(m)&&T!==E&&(T!=null||E!=null)&&(m==="selected"?e.selected=T&&typeof T!="function"&&typeof T!="symbol":et(e,t,m,T,l,E));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 Ce in n)T=n[Ce],n.hasOwnProperty(Ce)&&T!=null&&!l.hasOwnProperty(Ce)&&et(e,t,Ce,null,l,T);for(M in l)if(T=l[M],E=n[M],l.hasOwnProperty(M)&&T!==E&&(T!=null||E!=null))switch(M){case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(u(137,t));break;default:et(e,t,M,T,l,E)}return;default:if(Ec(t)){for(var tt in n)T=n[tt],n.hasOwnProperty(tt)&&T!==void 0&&!l.hasOwnProperty(tt)&&ps(e,t,tt,void 0,l,T);for(R in l)T=l[R],E=n[R],!l.hasOwnProperty(R)||T===E||T===void 0&&E===void 0||ps(e,t,R,T,l,E);return}}for(var C in n)T=n[C],n.hasOwnProperty(C)&&T!=null&&!l.hasOwnProperty(C)&&et(e,t,C,null,l,T);for(B in l)T=l[B],E=n[B],!l.hasOwnProperty(B)||T===E||T==null&&E==null||et(e,t,B,T,l,E)}function r0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function rm(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var a=n[l],i=a.transferSize,c=a.initiatorType,d=a.duration;if(i&&d&&r0(c)){for(c=0,d=a.responseEnd,l+=1;l<n.length;l++){var m=n[l],M=m.startTime;if(M>d)break;var R=m.transferSize,B=m.initiatorType;R&&r0(B)&&(m=m.responseEnd,c+=R*(m<d?1:(d-M)/(m-M)))}if(--l,t+=8*(i+c)/(a.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 ms=null,gs=null;function Ko(e){return e.nodeType===9?e:e.ownerDocument}function s0(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 u0(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 ys(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 vs=null;function sm(){var e=window.event;return e&&e.type==="popstate"?e===vs?!1:(vs=e,!0):(vs=null,!1)}var f0=typeof setTimeout=="function"?setTimeout:void 0,um=typeof clearTimeout=="function"?clearTimeout:void 0,d0=typeof Promise=="function"?Promise:void 0,fm=typeof queueMicrotask=="function"?queueMicrotask:typeof d0<"u"?function(e){return d0.resolve(null).then(e).catch(dm)}:f0;function dm(e){setTimeout(function(){throw e})}function Cl(e){return e==="head"}function h0(e,t){var n=t,l=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(a),Ua(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")Mi(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Mi(n);for(var i=n.firstChild;i;){var c=i.nextSibling,d=i.nodeName;i[pe]||d==="SCRIPT"||d==="STYLE"||d==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=c}}else n==="body"&&Mi(e.ownerDocument.body);n=a}while(n);Ua(t)}function p0(e,t){var n=e;e=0;do{var l=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||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function bs(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":bs(n),Le(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function hm(e,t,n,l){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[pe])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!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=mn(e.nextSibling),e===null)break}return null}function pm(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=mn(e.nextSibling),e===null))return null;return e}function m0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=mn(e.nextSibling),e===null))return null;return e}function xs(e){return e.data==="$?"||e.data==="$~"}function Ss(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function mm(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function mn(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 Cs=null;function g0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return mn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function y0(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 v0(e,t,n){switch(t=Ko(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 Mi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Le(e)}var gn=new Map,b0=new Set;function Jo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var el=j.d;j.d={f:gm,r:ym,D:vm,C:bm,L:xm,m:Sm,X:wm,S:Cm,M:zm};function gm(){var e=el.f(),t=jo();return e||t}function ym(e){var t=Te(e);t!==null&&t.tag===5&&t.type==="form"?Hf(t):el.r(e)}var Ra=typeof document>"u"?null:document;function x0(e,t,n){var l=Ra;if(l&&typeof t=="string"&&t){var a=rn(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),b0.has(a)||(b0.add(a),e={rel:e,crossOrigin:n,href:t},l.querySelector(a)===null&&(t=l.createElement("link"),_t(t,"link",e),re(t),l.head.appendChild(t)))}}function vm(e){el.D(e),x0("dns-prefetch",e,null)}function bm(e,t){el.C(e,t),x0("preconnect",e,t)}function xm(e,t,n){el.L(e,t,n);var l=Ra;if(l&&e&&t){var a='link[rel="preload"][as="'+rn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+rn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+rn(n.imageSizes)+'"]')):a+='[href="'+rn(e)+'"]';var i=a;switch(t){case"style":i=Oa(e);break;case"script":i=La(e)}gn.has(i)||(e=O({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),gn.set(i,e),l.querySelector(a)!==null||t==="style"&&l.querySelector(Ti(i))||t==="script"&&l.querySelector(Ai(i))||(t=l.createElement("link"),_t(t,"link",e),re(t),l.head.appendChild(t)))}}function Sm(e,t){el.m(e,t);var n=Ra;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+rn(l)+'"][href="'+rn(e)+'"]',i=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=La(e)}if(!gn.has(i)&&(e=O({rel:"modulepreload",href:e},t),gn.set(i,e),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ai(i)))return}l=n.createElement("link"),_t(l,"link",e),re(l),n.head.appendChild(l)}}}function Cm(e,t,n){el.S(e,t,n);var l=Ra;if(l&&e){var a=Ve(l).hoistableStyles,i=Oa(e);t=t||"default";var c=a.get(i);if(!c){var d={loading:0,preload:null};if(c=l.querySelector(Ti(i)))d.loading=5;else{e=O({rel:"stylesheet",href:e,"data-precedence":t},n),(n=gn.get(i))&&ws(e,n);var m=c=l.createElement("link");re(m),_t(m,"link",e),m._p=new Promise(function(M,R){m.onload=M,m.onerror=R}),m.addEventListener("load",function(){d.loading|=1}),m.addEventListener("error",function(){d.loading|=2}),d.loading|=4,Fo(c,t,l)}c={type:"stylesheet",instance:c,count:1,state:d},a.set(i,c)}}}function wm(e,t){el.X(e,t);var n=Ra;if(n&&e){var l=Ve(n).hoistableScripts,a=La(e),i=l.get(a);i||(i=n.querySelector(Ai(a)),i||(e=O({src:e,async:!0},t),(t=gn.get(a))&&zs(e,t),i=n.createElement("script"),re(i),_t(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function zm(e,t){el.M(e,t);var n=Ra;if(n&&e){var l=Ve(n).hoistableScripts,a=La(e),i=l.get(a);i||(i=n.querySelector(Ai(a)),i||(e=O({src:e,async:!0,type:"module"},t),(t=gn.get(a))&&zs(e,t),i=n.createElement("script"),re(i),_t(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function S0(e,t,n,l){var a=(a=ze.current)?Jo(a):null;if(!a)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Oa(n.href),n=Ve(a).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Oa(n.href);var i=Ve(a).hoistableStyles,c=i.get(e);if(c||(a=a.ownerDocument||a,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,c),(i=a.querySelector(Ti(e)))&&!i._p&&(c.instance=i,c.state.loading=5),gn.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},gn.set(e,n),i||Mm(a,e,n,c.state))),t&&l===null)throw Error(u(528,""));return c}if(t&&l!==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=La(n),n=Ve(a).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Oa(e){return'href="'+rn(e)+'"'}function Ti(e){return'link[rel="stylesheet"]['+e+"]"}function C0(e){return O({},e,{"data-precedence":e.precedence,precedence:null})}function Mm(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),_t(t,"link",n),re(t),e.head.appendChild(t))}function La(e){return'[src="'+rn(e)+'"]'}function Ai(e){return"script[async]"+e}function w0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+rn(n.href)+'"]');if(l)return t.instance=l,re(l),l;var a=O({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),re(l),_t(l,"style",a),Fo(l,n.precedence,e),t.instance=l;case"stylesheet":a=Oa(n.href);var i=e.querySelector(Ti(a));if(i)return t.state.loading|=4,t.instance=i,re(i),i;l=C0(n),(a=gn.get(a))&&ws(l,a),i=(e.ownerDocument||e).createElement("link"),re(i);var c=i;return c._p=new Promise(function(d,m){c.onload=d,c.onerror=m}),_t(i,"link",l),t.state.loading|=4,Fo(i,n.precedence,e),t.instance=i;case"script":return i=La(n.src),(a=e.querySelector(Ai(i)))?(t.instance=a,re(a),a):(l=n,(a=gn.get(i))&&(l=O({},n),zs(l,a)),e=e.ownerDocument||e,a=e.createElement("script"),re(a),_t(a,"link",l),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Fo(l,n.precedence,e));return t.instance}function Fo(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,i=a,c=0;c<l.length;c++){var d=l[c];if(d.dataset.precedence===t)i=d;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function ws(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function zs(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var $o=null;function z0(e,t,n){if($o===null){var l=new Map,a=$o=new Map;a.set(n,l)}else a=$o,l=a.get(n),l||(l=new Map,a.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var i=n[a];if(!(i[pe]||i[st]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var c=i.getAttribute(t)||"";c=e+c;var d=l.get(c);d?d.push(i):l.set(c,[i])}}return l}function M0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Tm(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 T0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Am(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var a=Oa(l.href),i=t.querySelector(Ti(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Wo.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,re(i);return}i=t.ownerDocument||t,l=C0(l),(a=gn.get(a))&&ws(l,a),i=i.createElement("link"),re(i);var c=i;c._p=new Promise(function(d,m){c.onload=d,c.onerror=m}),_t(i,"link",l),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=Wo.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Ms=0;function Em(e,t){return e.stylesheets&&e.count===0&&Po(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&Po(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Ms===0&&(Ms=62500*rm());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Po(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Ms?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function Wo(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Po(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Io=null;function Po(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Io=new Map,t.forEach(Dm,e),Io=null,Wo.call(e))}function Dm(e,t){if(!(t.state.loading&4)){var n=Io.get(e);if(n)var l=n.get(null);else{n=new Map,Io.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var c=a[i];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(n.set(c.dataset.precedence,c),l=c)}l&&n.set(null,l)}a=t.instance,c=a.getAttribute("data-precedence"),i=n.get(c)||l,i===l&&n.set(null,a),n.set(c,a),this.count++,l=Wo.bind(this),a.addEventListener("load",l),a.addEventListener("error",l),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var Ei={$$typeof:$,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function km(e,t,n,l,a,i,c,d,m){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=ta(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ta(0),this.hiddenUpdates=ta(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=m,this.incompleteTransitions=new Map}function A0(e,t,n,l,a,i,c,d,m,M,R,B){return e=new km(e,t,n,c,m,M,R,B,d),t=1,i===!0&&(t|=24),i=It(3,null,null,t),e.current=i,i.stateNode=e,t=ar(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:n,cache:t},rr(i),e}function E0(e){return e?(e=fa,e):fa}function D0(e,t,n,l,a,i){a=E0(a),l.context===null?l.context=a:l.pendingContext=a,l=fl(t),l.payload={element:n},i=i===void 0?null:i,i!==null&&(l.callback=i),n=dl(e,l,t),n!==null&&(Ft(n,e,t),oi(n,e,t))}function k0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ts(e,t){k0(e,t),(e=e.alternate)&&k0(e,t)}function _0(e){if(e.tag===13||e.tag===31){var t=Hl(e,67108864);t!==null&&Ft(t,e,67108864),Ts(e,67108864)}}function R0(e){if(e.tag===13||e.tag===31){var t=ln();t=zn(t);var n=Hl(e,t);n!==null&&Ft(n,e,t),Ts(e,t)}}var ec=!0;function _m(e,t,n,l){var a=D.T;D.T=null;var i=j.p;try{j.p=2,As(e,t,n,l)}finally{j.p=i,D.T=a}}function Rm(e,t,n,l){var a=D.T;D.T=null;var i=j.p;try{j.p=8,As(e,t,n,l)}finally{j.p=i,D.T=a}}function As(e,t,n,l){if(ec){var a=Es(l);if(a===null)hs(e,t,l,tc,n),L0(e,l);else if(Lm(a,e,t,n,l))l.stopPropagation();else if(L0(e,l),t&4&&-1<Om.indexOf(e)){for(;a!==null;){var i=Te(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var c=Un(i.pendingLanes);if(c!==0){var d=i;for(d.pendingLanes|=2,d.entangledLanes|=2;c;){var m=1<<31-jt(c);d.entanglements[1]|=m,c&=~m}Dn(i),(Ke&6)===0&&(Bo=Tt()+500,Ci(0))}}break;case 31:case 13:d=Hl(i,2),d!==null&&Ft(d,i,2),jo(),Ts(i,2)}if(i=Es(l),i===null&&hs(e,t,l,tc,n),i===a)break;a=i}a!==null&&l.stopPropagation()}else hs(e,t,l,null,n)}}function Es(e){return e=kc(e),Ds(e)}var tc=null;function Ds(e){if(tc=null,e=ke(e),e!==null){var t=g(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=A(t),e!==null)return e;e=null}else if(n===31){if(e=H(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 tc=e,null}function O0(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(qa()){case yt:return 2;case nl:return 8;case ll:case vc:return 32;case Ya:return 268435456;default:return 32}default:return 32}}var ks=!1,wl=null,zl=null,Ml=null,Di=new Map,ki=new Map,Tl=[],Om="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 L0(e,t){switch(e){case"focusin":case"focusout":wl=null;break;case"dragenter":case"dragleave":zl=null;break;case"mouseover":case"mouseout":Ml=null;break;case"pointerover":case"pointerout":Di.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ki.delete(t.pointerId)}}function _i(e,t,n,l,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:i,targetContainers:[a]},t!==null&&(t=Te(t),t!==null&&_0(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Lm(e,t,n,l,a){switch(t){case"focusin":return wl=_i(wl,e,t,n,l,a),!0;case"dragenter":return zl=_i(zl,e,t,n,l,a),!0;case"mouseover":return Ml=_i(Ml,e,t,n,l,a),!0;case"pointerover":var i=a.pointerId;return Di.set(i,_i(Di.get(i)||null,e,t,n,l,a)),!0;case"gotpointercapture":return i=a.pointerId,ki.set(i,_i(ki.get(i)||null,e,t,n,l,a)),!0}return!1}function U0(e){var t=ke(e.target);if(t!==null){var n=g(t);if(n!==null){if(t=n.tag,t===13){if(t=A(n),t!==null){e.blockedOn=t,Ga(e.priority,function(){R0(n)});return}}else if(t===31){if(t=H(n),t!==null){e.blockedOn=t,Ga(e.priority,function(){R0(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 nc(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Es(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);Dc=l,n.target.dispatchEvent(l),Dc=null}else return t=Te(n),t!==null&&_0(t),e.blockedOn=n,!1;t.shift()}return!0}function H0(e,t,n){nc(e)&&n.delete(t)}function Um(){ks=!1,wl!==null&&nc(wl)&&(wl=null),zl!==null&&nc(zl)&&(zl=null),Ml!==null&&nc(Ml)&&(Ml=null),Di.forEach(H0),ki.forEach(H0)}function lc(e,t){e.blockedOn===t&&(e.blockedOn=null,ks||(ks=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Um)))}var ac=null;function B0(e){ac!==e&&(ac=e,o.unstable_scheduleCallback(o.unstable_NormalPriority,function(){ac===e&&(ac=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],a=e[t+2];if(typeof l!="function"){if(Ds(l||n)===null)continue;break}var i=Te(n);i!==null&&(e.splice(t,3),t-=3,Er(i,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function Ua(e){function t(m){return lc(m,e)}wl!==null&&lc(wl,e),zl!==null&&lc(zl,e),Ml!==null&&lc(Ml,e),Di.forEach(t),ki.forEach(t);for(var n=0;n<Tl.length;n++){var l=Tl[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Tl.length&&(n=Tl[0],n.blockedOn===null);)U0(n),n.blockedOn===null&&Tl.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var a=n[l],i=n[l+1],c=a[At]||null;if(typeof i=="function")c||B0(n);else if(c){var d=null;if(i&&i.hasAttribute("formAction")){if(a=i,c=i[At]||null)d=c.formAction;else if(Ds(a)!==null)continue}else d=c.action;typeof d=="function"?n[l+1]=d:(n.splice(l,3),l-=3),B0(n)}}}function N0(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(c){return a=c})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),l||setTimeout(n,20)}function n(){if(!l&&!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 l=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function _s(e){this._internalRoot=e}ic.prototype.render=_s.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var n=t.current,l=ln();D0(n,l,e,t,null,null)},ic.prototype.unmount=_s.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;D0(e.current,2,null,e,null,null),jo(),t[al]=null}};function ic(e){this._internalRoot=e}ic.prototype.unstable_scheduleHydration=function(e){if(e){var t=Hn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Tl.length&&t!==0&&t<Tl[n].priority;n++);Tl.splice(n,0,e),n===0&&U0(e)}};var j0=s.version;if(j0!=="19.2.4")throw Error(u(527,j0,"19.2.4"));j.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=y(t),e=e!==null?Y(e):null,e=e===null?null:e.stateNode,e};var Hm={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var oc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!oc.isDisabled&&oc.supportsFiber)try{kl=oc.inject(Hm),Nt=oc}catch{}}return Li.createRoot=function(e,t){if(!p(e))throw Error(u(299));var n=!1,l="",a=Zf,i=Kf,c=Jf;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=A0(e,1,!1,null,null,n,l,null,a,i,c,N0),e[al]=t.current,ds(e),new _s(t)},Li.hydrateRoot=function(e,t,n){if(!p(e))throw Error(u(299));var l=!1,a="",i=Zf,c=Kf,d=Jf,m=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(d=n.onRecoverableError),n.formState!==void 0&&(m=n.formState)),t=A0(e,1,!0,t,n??null,l,a,m,i,c,d,N0),t.context=E0(null),n=t.current,l=ln(),l=zn(l),a=fl(l),a.callback=null,dl(n,a,l),n=l,t.current.lanes=n,yn(t,n),Dn(t),e[al]=t.current,ds(e),new ic(t)},Li.version="19.2.4",Li}var ih;function G1(){if(ih)return Bs.exports;ih=1;function o(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(o)}catch(s){console.error(s)}}return o(),Bs.exports=Y1(),Bs.exports}var V1=G1(),oh=function(s,h){var u=arguments;if(h==null||!Yi.call(h,"css"))return w.createElement.apply(void 0,u);var p=u.length,g=new Array(p);g[0]=Ws,g[1]=$s(s,h);for(var A=2;A<p;A++)g[A]=u[A];return w.createElement.apply(null,g)};(function(o){var s;s||(s=o.JSX||(o.JSX={}))})(oh||(oh={}));function x(){for(var o=arguments.length,s=new Array(o),h=0;h<o;h++)s[h]=arguments[h];return xh(s)}function On(){var o=x.apply(void 0,arguments),s="animation-"+o.name;return{name:s,styles:"@keyframes "+s+"{"+o.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}const X1={showProgress:!1,progressTitle:"",progressState:{current:0,total:0,percent:0,status:"processing"},showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,actionPaths:[],syncImageCount:0,syncHasRemote:!1,syncHasLocal:!1,processMode:"generate"},Q1={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:X1,requestDelete:()=>{},requestMove:()=>{},requestSync:()=>{},requestDownload:()=>{},requestProcess:()=>{},setProcessMode:()=>{},confirmDelete:async()=>{},confirmMove:async()=>{},confirmSync:async()=>{},confirmProcess:async()=>{},cancelAction:()=>{},closeProgress:()=>{},stopProcessing:()=>{},deleteOrphans:async()=>{}},Ch=w.createContext(Q1);function Na(){return w.useContext(Ch)}const yc="-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Ubuntu, sans-serif",f={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",danger:"#df1b41",dangerHover:"#c41535",dangerLight:"#fff5f7",imagesFolder:"#8b5cf6"},J={xs:"13px",sm:"14px",base:"16px",lg:"19px",xl:"22px"},Gi=x("font-family:",yc,";font-size:",J.base,";line-height:1.5;color:",f.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;}",""),Z1=On`
|
|
10
|
+
from { opacity: 0; }
|
|
11
|
+
to { opacity: 1; }
|
|
12
|
+
`,K1=On`
|
|
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
|
+
`,J1=On`
|
|
22
|
+
from { transform: rotate(0deg); }
|
|
23
|
+
to { transform: rotate(360deg); }
|
|
24
|
+
`,Me={overlay:x("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:",Z1," 0.15s ease-out;font-family:",yc,";",""),modal:x(Gi," background-color:",f.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:",K1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:x("font-size:",J.lg,";font-weight:600;color:",f.text,";margin:0;letter-spacing:-0.02em;",""),body:{name:"5e7rpo",styles:"padding:12px 24px 24px"},message:x("font-size:",J.base,";color:",f.textSecondary,";margin:0;line-height:1.6;",""),footer:x("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",f.border,";background-color:",f.background,";",""),btn:x("padding:10px 18px;font-size:",J.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:x("background-color:",f.surface,";border:1px solid ",f.border,";color:",f.text,";&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),btnConfirm:x("background-color:",f.primary,";border:1px solid ",f.primary,";color:white;&:hover{background-color:",f.primaryHover,";border-color:",f.primaryHover,";}",""),btnDanger:x("background-color:",f.danger,";border:1px solid ",f.danger,";color:white;&:hover{background-color:",f.dangerHover,";border-color:",f.dangerHover,";}","")};function Ui({title:o,message:s,confirmLabel:h="Confirm",cancelLabel:u="Cancel",variant:p="default",onConfirm:g,onCancel:A}){return r("div",{css:Me.overlay,onClick:A,children:S("div",{css:Me.modal,onClick:H=>H.stopPropagation(),children:[r("div",{css:Me.header,children:r("h3",{css:Me.title,children:o})}),r("div",{css:Me.body,children:r("p",{css:Me.message,children:s})}),S("div",{css:Me.footer,children:[r("button",{css:[Me.btn,Me.btnCancel,"",""],onClick:A,children:u}),r("button",{css:[Me.btn,p==="danger"?Me.btnDanger:Me.btnConfirm,"",""],onClick:g,children:h})]})]})})}const F1={input:x("width:100%;padding:10px 12px;font-size:",J.base,";border:1px solid ",f.border,";border-radius:6px;background:",f.surface,";color:",f.text,";margin-top:12px;transition:all 0.15s ease;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 2px ",f.primaryLight,";}&::placeholder{color:",f.textMuted,";}","")};function fc({title:o,message:s,inputLabel:h,defaultValue:u="",placeholder:p,confirmLabel:g="Confirm",cancelLabel:A="Cancel",isLoading:H=!1,loadingLabel:k="Processing...",onConfirm:y,onCancel:Y}){const[O,G]=uh.useState(u),ie=_=>{_.preventDefault(),O.trim()&&!H&&y(O.trim())};return r("div",{css:Me.overlay,onClick:H?void 0:Y,children:r("div",{css:Me.modal,onClick:_=>_.stopPropagation(),children:S("form",{onSubmit:ie,children:[r("div",{css:Me.header,children:r("h3",{css:Me.title,children:o})}),S("div",{css:Me.body,children:[s&&r("p",{css:Me.message,children:s}),h&&r("label",{css:Me.message,children:h}),r("input",{css:F1.input,type:"text",value:O,onChange:_=>G(_.target.value),placeholder:p,autoFocus:!0,disabled:H})]}),S("div",{css:Me.footer,children:[r("button",{type:"button",css:[Me.btn,Me.btnCancel,"",""],onClick:Y,disabled:H,children:A}),r("button",{type:"submit",css:[Me.btn,Me.btnConfirm,"",""],disabled:!O.trim()||H,children:H?S(pt,{children:[r("span",{css:x("display:inline-block;width:14px;height:14px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:",J1," 0.75s linear infinite;margin-right:6px;","")}),k]}):g})]})]})})})}function wh({title:o,message:s,buttonLabel:h="OK",onClose:u}){return r("div",{css:Me.overlay,onClick:u,children:S("div",{css:Me.modal,onClick:p=>p.stopPropagation(),children:[r("div",{css:Me.header,children:r("h3",{css:Me.title,children:o})}),r("div",{css:Me.body,children:r("p",{css:Me.message,children:s})}),r("div",{css:Me.footer,children:r("button",{css:[Me.btn,Me.btnConfirm,"",""],onClick:u,children:h})})]})})}const El={progressContainer:{name:"yz1nei",styles:"margin-top:16px"},progressBar:x("width:100%;height:8px;background-color:",f.background,";border-radius:4px;overflow:hidden;margin-bottom:12px;",""),progressFill:x("height:100%;background:linear-gradient(90deg, ",f.primary,", ",f.primaryHover,");border-radius:4px;transition:width 0.3s ease;",""),progressText:x("font-size:",J.sm,";color:",f.textSecondary,";margin:0;display:flex;justify-content:space-between;align-items:center;",""),currentFile:x("font-size:",J.xs,";color:",f.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:x("font-size:",J.xs,";color:#991b1b;margin:0 0 4px;&:last-child{margin-bottom:0;}","")};function hc({title:o,progress:s,onClose:h,onDeleteOrphans:u,onStop:p}){const g=s.status==="complete",A=s.status==="error",H=s.status==="stopped",k=s.status==="stopping",y=g||A||H,Y=!y||k;return r("div",{css:Me.overlay,children:S("div",{css:Me.modal,onClick:O=>O.stopPropagation(),children:[r("div",{css:Me.header,children:r("h3",{css:Me.title,children:o})}),r("div",{css:Me.body,children:A?r("p",{css:Me.message,children:s.message||"An error occurred"}):H?S("p",{css:Me.message,children:["Processing stopped. Processed ",s.processed??s.current," image",(s.processed??s.current)!==1?"s":""," before stopping."]}):g?S(pt,{children:[S("p",{css:Me.message,children:[s.message?s.message:s.isMove?S(pt,{children:["Moved ",s.processed," file",s.processed!==1?"s":"",".",s.errors!==void 0&&s.errors>0?S(pt,{children:[" ",s.errors," error",s.errors!==1?"s":""," occurred."]}):null]}):s.isScan?S(pt,{children:[s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?S(pt,{children:[s.alreadyProcessed," image",s.alreadyProcessed!==1?"s":""," already exist. "]}):null,"Scanned ",s.processed," new image",s.processed!==1?"s":"",".",s.orphanedEntries!==void 0&&s.orphanedEntries>0?S(pt,{children:[" Removed ",s.orphanedEntries," orphaned entr",s.orphanedEntries!==1?"ies":"y","."]}):null,s.pendingUpdates!==void 0&&s.pendingUpdates>0?S(pt,{children:[" ",s.pendingUpdates," file",s.pendingUpdates!==1?"s have":" has"," local updates pending."]}):null]}):S(pt,{children:["Processed ",s.processed," new image",s.processed!==1?"s":"",".",s.alreadyProcessed!==void 0&&s.alreadyProcessed>0?S(pt,{children:[" ",s.alreadyProcessed," already processed."]}):null]}),s.orphansRemoved!==void 0&&s.orphansRemoved>0?S(pt,{children:[" Removed ",s.orphansRemoved," orphaned thumbnail",s.orphansRemoved!==1?"s":"","."]}):null]}),s.errorMessages&&s.errorMessages.length>0&&S("div",{css:El.errorList,children:[s.errorMessages.slice(0,10).map((O,G)=>r("p",{css:El.errorItem,children:O},G)),s.errorMessages.length>10&&S("p",{css:El.errorItem,children:["...and ",s.errorMessages.length-10," more"]})]})]}):S(pt,{children:[r("p",{css:Me.message,children:s.status==="cleanup"?s.message||"Cleaning up...":s.message||"Processing..."}),S("div",{css:El.progressContainer,children:[r("div",{css:El.progressBar,children:r("div",{css:El.progressFill,style:{width:`${s.percent}%`}})}),S("div",{css:El.progressText,children:[S("span",{children:[s.current," of ",s.total]}),S("span",{children:[s.percent,"%"]})]}),s.currentFile&&r("p",{css:El.currentFile,title:s.currentFile,children:s.currentFile})]})]})}),S("div",{css:Me.footer,children:[Y&&p&&r("button",{css:[Me.btn,Me.btnDanger,"",""],onClick:p,disabled:s.status==="stopping",children:s.status==="stopping"?"Stopping...":"Stop"}),y&&s.orphanedFiles&&s.orphanedFiles.length>0&&u&&S("button",{css:[Me.btn,Me.btnDanger,"",""],onClick:u,children:["Delete ",s.orphanedFiles.length," Orphan",s.orphanedFiles.length!==1?"s":""]}),y&&r("button",{css:[Me.btn,Me.btnConfirm,"",""],onClick:h,children:"Done"})]})]})})}function zh(o){const{setShowProgress:s,setProgressTitle:h,setProgressState:u,triggerRefresh:p}=o,g=w.useRef(null),A=w.useRef(!1),H=w.useRef(!1),k=w.useRef(null),y=w.useCallback(()=>{g.current&&g.current.abort()},[]);return{execute:w.useCallback(async O=>{const{endpoint:G,body:ie,title:_,onComplete:V,onError:me}=O;if(A.current){console.warn("Streaming operation already in progress");return}A.current=!0,H.current=!1;const ue=`${G.split("/").pop()?.replace("-stream","")||"op"}-${Date.now()}-${Math.random().toString(36).slice(2)}`;k.current=ue;const $=new AbortController;g.current=$;const we=async()=>{H.current=!0,u(N=>({...N,status:"stopping"}));try{await fetch("/api/studio/cancel-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({operationId:ue})})}catch{}};$.signal.addEventListener("abort",we),h(_),s(!0),u({current:0,total:0,percent:0,status:"processing",message:`Starting ${_.toLowerCase()}...`});try{const N=await fetch(G,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...ie,operationId:ue})});if(!N.ok){const q=await N.json().catch(()=>({}));throw new Error(q.error||`Request failed: ${N.status}`)}if(!N.body)throw new Error("No response body");const ve=N.body.getReader(),Q=new TextDecoder;let ae="";try{for(;;){const{done:q,value:W}=await ve.read();if(q)break;ae+=Q.decode(W,{stream:!0});const ge=ae.split(`
|
|
25
|
+
|
|
26
|
+
`);ae=ge.pop()||"";for(const Se of ge)if(Se.startsWith("data: "))try{const le=JSON.parse(Se.slice(6));if(le.type==="start")u(Ae=>({...Ae,total:le.total||Ae.total}));else if(le.type==="progress")u({current:le.current||0,total:le.total||0,percent:le.percent||Math.round((le.current||0)/(le.total||1)*100),status:"processing",currentFile:le.currentFile,message:le.message});else if(le.type==="cleanup")u(Ae=>({...Ae,status:"cleanup",message:le.message}));else if(le.type==="complete"){const Ae=le.cancelled===!0,He=le.processed??le.moved??le.renamed??le.pushed??le.downloaded??le.added??le.imported??le.deleted??le.current??0;u({current:He,total:He,percent:100,status:Ae?"stopped":le.errors&&le.errors>0?"error":"complete",message:le.message,processed:He,errors:le.errors,orphanedFiles:le.orphanedFiles}),p(),V?.(le)}else le.type==="error"&&(u(Ae=>({...Ae,status:"error",message:le.message})),me?.(le.message||"Unknown error"))}catch{}}}catch(q){if(!H.current)throw q}finally{$.signal.removeEventListener("abort",we)}}catch(N){if(!H.current){const ve=N instanceof Error?N.message:"Operation failed";console.error(`${_} error:`,N),u({current:0,total:0,percent:0,status:"error",message:ve}),me?.(ve)}}finally{A.current=!1,g.current=null,k.current=null}},[s,h,u,p]),stop:y,get isRunning(){return A.current}}}const $1=On`
|
|
27
|
+
from { opacity: 0; }
|
|
28
|
+
to { opacity: 1; }
|
|
29
|
+
`,W1=On`
|
|
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
|
+
`,ht={overlay:x("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:",$1," 0.15s ease-out;font-family:",yc,";",""),modal:x(Gi," background-color:",f.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:",W1," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:x("font-size:",J.lg,";font-weight:600;color:",f.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:x("font-size:",J.base,";color:",f.textSecondary,";margin:0 0 16px;line-height:1.6;",""),folderList:{name:"1axgfg3",styles:"display:flex;flex-direction:column;gap:0"},folderItem:x("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:",f.surfaceHover,";}",""),treeIndent:{name:"197dxto",styles:"display:flex;align-items:center;height:100%"},treeLine:x("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 ",f.textSecondary,";}&::after{content:'';position:absolute;left:8px;top:50%;width:8px;height:0;border-top:1px dashed ",f.textSecondary,";}",""),folderItemSelected:x("background-color:",f.primaryLight,";border-color:",f.primary,";&:hover{background-color:",f.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:x("font-size:",J.base,";color:",f.text,";flex:1;",""),footer:x("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",f.border,";background-color:",f.background,";",""),btn:x("padding:10px 18px;font-size:",J.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:x("background-color:",f.surface,";border:1px solid ",f.border,";color:",f.text,";&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),btnConfirm:x("background-color:",f.primary,";border:1px solid ",f.primary,";color:white;&:hover:not(:disabled){background-color:",f.primaryHover,";border-color:",f.primaryHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),loading:x("display:flex;align-items:center;justify-content:center;padding:40px;color:",f.textSecondary,";",""),spinner:x("width:24px;height:24px;border-radius:50%;border:3px solid ",f.border,";border-top-color:",f.primary,";animation:spin 0.8s linear infinite;@keyframes spin{to{transform:rotate(360deg);}}","")};function Mh({selectedItems:o,currentPath:s,onMove:h,onCancel:u}){const[p,g]=w.useState([]),[A,H]=w.useState(!0),[k,y]=w.useState(null);w.useEffect(()=>{async function _(){try{const V=await fetch("/api/studio/list-folders");if(V.ok){const me=await V.json();console.log("Loaded folders:",me),g(me.folders||[])}else console.error("Failed to load folders:",V.status,await V.text())}catch(V){console.error("Failed to load folders:",V)}finally{H(!1)}}_()},[]);const Y=Array.from(o),O=p.filter(_=>!Y.some(V=>_.path===V||_.path.startsWith(V+"/"))),G=_=>_===s,ie=()=>{k&&h(k)};return r("div",{css:ht.overlay,onClick:u,children:S("div",{css:ht.modal,onClick:_=>_.stopPropagation(),children:[r("div",{css:ht.header,children:r("h3",{css:ht.title,children:"Move Items"})}),S("div",{css:ht.body,children:[S("p",{css:ht.message,children:["Select a destination folder for ",o.size," item",o.size!==1?"s":"",":"]}),A?r("div",{css:ht.loading,children:r("div",{css:ht.spinner})}):O.length===0?r("div",{css:ht.loading,children:"No available folders to move to."}):r("div",{css:ht.folderList,children:O.map(_=>{const V=G(_.path);return S("div",{css:[ht.folderItem,k===_.path&&ht.folderItemSelected,V&&ht.folderItemDisabled,"",""],style:{paddingLeft:12},onClick:()=>!V&&y(_.path),children:[_.depth>0&&r("div",{css:ht.treeIndent,children:Array.from({length:_.depth}).map((me,F)=>r("div",{css:ht.treeLine},F))}),r("svg",{css:ht.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),S("span",{css:ht.folderName,children:[_.name,V&&" (current)"]})]},_.path)})})]}),S("div",{css:ht.footer,children:[r("button",{css:[ht.btn,ht.btnCancel,"",""],onClick:u,children:"Cancel"}),r("button",{css:[ht.btn,ht.btnConfirm,"",""],onClick:ie,disabled:!k,children:"Move Here"})]})]})})}const I1=`CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
|
|
39
|
+
CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key
|
|
40
|
+
CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_key
|
|
41
|
+
CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
|
|
42
|
+
CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev
|
|
43
|
+
NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL=https://pub-xxx.r2.dev`,se={overlay:{name:"8ivopw",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.6);display:flex;align-items:center;justify-content:center;z-index:1100;padding:20px"},modal:x("background:",f.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:x("display:flex;align-items:center;gap:12px;padding:20px 24px;border-bottom:1px solid ",f.border,";",""),icon:x("width:32px;height:32px;color:",f.primary,";flex-shrink:0;",""),title:x("font-size:",J.xl,";font-weight:600;color:",f.text,";margin:0;",""),closeBtn:x("margin-left:auto;background:none;border:none;padding:4px;cursor:pointer;color:",f.textMuted,";border-radius:4px;&:hover{color:",f.text,";background:",f.surfaceHover,";}",""),closeIcon:{name:"1aynuae",styles:"width:20px;height:20px"},content:{name:"vxuddk",styles:"padding:24px"},intro:x("font-size:",J.base,";color:",f.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:x("width:28px;height:28px;border-radius:50%;background:",f.primaryLight,";color:",f.primary,";font-size:",J.sm,";font-weight:600;display:flex;align-items:center;justify-content:center;flex-shrink:0;",""),stepContent:{name:"pkc2k3",styles:"flex:1;padding-top:3px"},stepTitle:x("font-size:",J.base,";font-weight:500;color:",f.text,";margin:0 0 4px 0;",""),stepDesc:x("font-size:",J.sm,";color:",f.textSecondary,";margin:0;line-height:1.5;",""),link:x("color:",f.primary,";text-decoration:none;font-weight:500;&:hover{text-decoration:underline;}",""),envVarsWrapper:{name:"1ksolcl",styles:"position:relative;margin-top:20px"},envVars:x("background:",f.background,";border:1px solid ",f.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:",f.text,";overflow-x:auto;",""),envVar:{name:"4zleql",styles:"display:block"},envKey:x("color:",f.primary,";",""),envValue:x("color:",f.textSecondary,";",""),copyBtn:x("position:absolute;top:8px;right:8px;width:32px;height:32px;display:flex;align-items:center;justify-content:center;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;color:",f.textMuted,";transition:all 0.15s ease;&:hover{background:",f.surfaceHover,";color:",f.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:x("padding:16px 24px;border-top:1px solid ",f.border,";display:flex;justify-content:flex-end;gap:12px;",""),docsBtn:x("padding:10px 16px;border-radius:6px;font-size:",J.base,";font-weight:500;border:1px solid ",f.border,";background:",f.surface,";color:",f.text,";cursor:pointer;text-decoration:none;display:inline-flex;align-items:center;gap:6px;transition:all 0.15s ease;&:hover{background:",f.surfaceHover,";border-color:#d0d5dd;}",""),doneBtn:x("padding:10px 20px;border-radius:6px;font-size:",J.base,";font-weight:500;border:none;background:",f.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",f.primaryHover,";}",""),externalIcon:{name:"1djxupe",styles:"width:14px;height:14px"}};function Th({isOpen:o,onClose:s}){const[h,u]=w.useState(!1),p=async()=>{try{await navigator.clipboard.writeText(I1),u(!0),setTimeout(()=>u(!1),2e3)}catch(g){console.error("Failed to copy:",g)}};return o?r("div",{css:se.overlay,onClick:s,children:S("div",{css:se.modal,onClick:g=>g.stopPropagation(),children:[S("div",{css:se.header,children:[r("svg",{css:se.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),r("h2",{css:se.title,children:"Set Up CDN Storage"}),r("button",{css:se.closeBtn,onClick:s,children:r("svg",{css:se.closeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),S("div",{css:se.content,children:[r("p",{css:se.intro,children:"Sync your images to Cloudflare R2 for faster global delivery. R2 offers generous free tier with no egress fees."}),S("ol",{css:se.steps,children:[S("li",{css:se.step,children:[r("span",{css:se.stepNumber,children:"1"}),S("div",{css:se.stepContent,children:[r("h4",{css:se.stepTitle,children:"Create a Cloudflare account"}),S("p",{css:se.stepDesc,children:["Sign up at"," ",r("a",{css:se.link,href:"https://dash.cloudflare.com/sign-up",target:"_blank",rel:"noopener noreferrer",children:"dash.cloudflare.com"})," ","if you don't have one already."]})]})]}),S("li",{css:se.step,children:[r("span",{css:se.stepNumber,children:"2"}),S("div",{css:se.stepContent,children:[r("h4",{css:se.stepTitle,children:"Create an R2 bucket"}),S("p",{css:se.stepDesc,children:["Go to R2 in your Cloudflare dashboard and create a new bucket. Choose a name like ",r("code",{children:"my-images"}),"."]})]})]}),S("li",{css:se.step,children:[r("span",{css:se.stepNumber,children:"3"}),S("div",{css:se.stepContent,children:[r("h4",{css:se.stepTitle,children:"Enable public access"}),S("p",{css:se.stepDesc,children:['In bucket settings, enable "Public Access" and copy the public URL (e.g., ',r("code",{children:"https://pub-xxx.r2.dev"}),")."]})]})]}),S("li",{css:se.step,children:[r("span",{css:se.stepNumber,children:"4"}),S("div",{css:se.stepContent,children:[r("h4",{css:se.stepTitle,children:"Create API token"}),r("p",{css:se.stepDesc,children:'Go to R2 → Manage R2 API Tokens → Create API Token. Select "Object Read & Write" permissions for your bucket.'})]})]}),S("li",{css:se.step,children:[r("span",{css:se.stepNumber,children:"5"}),S("div",{css:se.stepContent,children:[r("h4",{css:se.stepTitle,children:"Add environment variables"}),S("p",{css:se.stepDesc,children:["Add these to your ",r("code",{children:".env.local"})," file:"]})]})]})]}),S("div",{css:se.envVarsWrapper,children:[S("div",{css:se.envVars,children:[S("span",{css:se.envVar,children:[r("span",{css:se.envKey,children:"CLOUDFLARE_R2_ACCOUNT_ID"}),"=",r("span",{css:se.envValue,children:"your_account_id"})]}),S("span",{css:se.envVar,children:[r("span",{css:se.envKey,children:"CLOUDFLARE_R2_ACCESS_KEY_ID"}),"=",r("span",{css:se.envValue,children:"your_access_key"})]}),S("span",{css:se.envVar,children:[r("span",{css:se.envKey,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY"}),"=",r("span",{css:se.envValue,children:"your_secret_key"})]}),S("span",{css:se.envVar,children:[r("span",{css:se.envKey,children:"CLOUDFLARE_R2_BUCKET_NAME"}),"=",r("span",{css:se.envValue,children:"your_bucket_name"})]}),S("span",{css:se.envVar,children:[r("span",{css:se.envKey,children:"CLOUDFLARE_R2_PUBLIC_URL"}),"=",r("span",{css:se.envValue,children:"https://pub-xxx.r2.dev"})]}),S("span",{css:se.envVar,children:[r("span",{css:se.envKey,children:"NEXT_PUBLIC_CLOUDFLARE_R2_PUBLIC_URL"}),"=",r("span",{css:se.envValue,children:"https://pub-xxx.r2.dev"})]})]}),S("button",{css:se.copyBtn,onClick:p,title:"Copy to clipboard",children:[h&&r("span",{css:se.copiedTooltip,children:"Copied!"}),r("svg",{css:se.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})]})]})]}),S("div",{css:se.footer,children:[S("a",{css:se.docsBtn,href:"https://developers.cloudflare.com/r2/get-started/",target:"_blank",rel:"noopener noreferrer",children:["R2 Documentation",r("svg",{css:se.externalIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]}),r("button",{css:se.doneBtn,onClick:s,children:"Got it"})]})]})}):null}const P1=On`
|
|
44
|
+
from { opacity: 0; }
|
|
45
|
+
to { opacity: 1; }
|
|
46
|
+
`,eg=On`
|
|
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
|
+
`,it={overlay:x("position:fixed;inset:0;background-color:rgba(26, 31, 54, 0.4);backdrop-filter:blur(4px);display:flex;align-items:center;justify-content:center;z-index:10000;animation:",P1," 0.15s ease-out;font-family:",yc,";",""),modal:x(Gi," background-color:",f.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:",eg," 0.2s ease-out;overflow:hidden;",""),header:{name:"nsgk6m",styles:"padding:24px 24px 0"},title:x("font-size:",J.lg,";font-weight:600;color:",f.text,";margin:0;letter-spacing:-0.02em;",""),tabs:x("display:flex;gap:0;margin-top:16px;border-bottom:1px solid ",f.border,";",""),tab:x("padding:12px 20px;font-size:",J.base,";font-weight:500;color:",f.textSecondary,";background:none;border:none;cursor:pointer;position:relative;transition:color 0.15s;&:hover{color:",f.text,";}",""),tabActive:x("color:",f.primary,";&::after{content:'';position:absolute;bottom:-1px;left:0;right:0;height:2px;background-color:",f.primary,";}",""),body:{name:"1po9b7e",styles:"padding:24px;min-height:200px"},dropzone:x("border:2px dashed ",f.border,";border-radius:8px;padding:40px 24px;text-align:center;cursor:pointer;transition:all 0.15s;&:hover{border-color:",f.primary,";background-color:",f.primaryLight,";}",""),dropzoneActive:x("border-color:",f.primary,";background-color:",f.primaryLight,";",""),dropzoneIcon:x("width:48px;height:48px;margin:0 auto 16px;color:",f.textMuted,";",""),dropzoneText:x("font-size:",J.base,";color:",f.text,";margin:0 0 4px;",""),dropzoneHint:x("font-size:",J.sm,";color:",f.textSecondary,";margin:0;",""),textarea:x("width:100%;min-height:150px;padding:12px;font-size:",J.sm,";font-family:ui-monospace,SFMono-Regular,'SF Mono',Menlo,Consolas,monospace;border:1px solid ",f.border,";border-radius:8px;resize:vertical;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 3px ",f.primaryLight,";}&::placeholder{color:",f.textMuted,";}",""),textareaLabel:x("font-size:",J.sm,";color:",f.textSecondary,";margin:0 0 8px;",""),footer:x("display:flex;justify-content:flex-end;gap:12px;padding:16px 24px;border-top:1px solid ",f.border,";background-color:",f.background,";",""),btn:x("padding:10px 18px;font-size:",J.base,";font-weight:500;border-radius:6px;cursor:pointer;transition:all 0.15s ease;letter-spacing:-0.01em;",""),btnCancel:x("background-color:",f.surface,";border:1px solid ",f.border,";color:",f.text,";&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),btnConfirm:x("background-color:",f.primary,";border:1px solid ",f.primary,";color:white;&:hover:not(:disabled){background-color:",f.primaryHover,";border-color:",f.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),fileInput:{name:"eivff4",styles:"display:none"},selectedFiles:x("margin-top:16px;padding:12px;background-color:",f.background,";border-radius:6px;font-size:",J.sm,";color:",f.text,";","")};function tg({currentPath:o,onClose:s,onUploadComplete:h,streamingOperation:u,setShowProgress:p,setProgressTitle:g,setProgressState:A}){const[H,k]=w.useState("upload"),[y,Y]=w.useState([]),[O,G]=w.useState(""),[ie,_]=w.useState(!1),[V,me]=w.useState(!1),[F,ue]=w.useState(!1),$=w.useRef(null),we=w.useCallback(q=>{q&&Y(Array.from(q))},[]),N=w.useCallback(q=>{q.preventDefault(),_(!1),we(q.dataTransfer.files)},[we]),ve=w.useRef(!1),Q=w.useCallback(async()=>{if(y.length!==0){if(p&&g&&A){s(),ve.current=!1,g("Uploading Files"),p(!0),A({current:0,total:y.length,percent:0,status:"processing",message:"Uploading..."});let q=0;const W=[];for(let ge=0;ge<y.length;ge++){if(ve.current){A(Ae=>({...Ae,status:"stopped",message:`Stopped. Uploaded ${q} file${q!==1?"s":""}.`})),h();return}const Se=y[ge],le=new FormData;le.append("file",Se),le.append("path",o);try{(await fetch("/api/studio/upload",{method:"POST",body:le})).ok?q++:W.push(Se.name)}catch{W.push(Se.name)}A({current:ge+1,total:y.length,percent:Math.round((ge+1)/y.length*100),status:"processing",currentFile:Se.name})}A({current:y.length,total:y.length,percent:100,status:"complete",message:`Uploaded ${q} file${q!==1?"s":""}.${W.length>0?` ${W.length} failed.`:""}`}),h();return}me(!0);try{for(const q of y){const W=new FormData;W.append("file",q),W.append("path",o),await fetch("/api/studio/upload",{method:"POST",body:W})}h(),s()}catch(q){console.error("Upload failed:",q)}finally{me(!1)}}},[y,o,h,s,p,g,A]),ae=w.useCallback(async()=>{const q=O.split(`
|
|
56
|
+
`).map(W=>W.trim()).filter(W=>W.length>0);if(q.length!==0){if(u){s(),await u.execute({endpoint:"/api/studio/import",body:{urls:q},title:"Importing URLs",onComplete:()=>{h()}});return}ue(!0);try{const ge=(await fetch("/api/studio/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({urls:q})})).body?.getReader();if(!ge)throw new Error("No reader");const Se=new TextDecoder;for(;;){const{done:le,value:Ae}=await ge.read();if(le)break;const D=Se.decode(Ae).split(`
|
|
57
|
+
|
|
58
|
+
`).filter(j=>j.startsWith("data: "));for(const j of D)JSON.parse(j.replace("data: ","")).type==="complete"&&(h(),s())}}catch(W){console.error("Import failed:",W)}finally{ue(!1)}}},[O,h,s,u]);return r("div",{css:it.overlay,onClick:s,children:S("div",{css:it.modal,onClick:q=>q.stopPropagation(),children:[S("div",{css:it.header,children:[r("h3",{css:it.title,children:"Add New"}),S("div",{css:it.tabs,children:[r("button",{css:[it.tab,H==="upload"&&it.tabActive,"",""],onClick:()=>k("upload"),children:"Upload Files"}),r("button",{css:[it.tab,H==="import"&&it.tabActive,"",""],onClick:()=>k("import"),children:"Import URLs"})]})]}),r("div",{css:it.body,children:H==="upload"?S(pt,{children:[S("div",{css:[it.dropzone,ie&&it.dropzoneActive,"",""],onClick:()=>$.current?.click(),onDragOver:q=>{q.preventDefault(),_(!0)},onDragLeave:()=>_(!1),onDrop:N,children:[r("svg",{css:it.dropzoneIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),r("p",{css:it.dropzoneText,children:"Drop files here or click to browse"}),r("p",{css:it.dropzoneHint,children:"Supports images and other media files"})]}),r("input",{ref:$,type:"file",multiple:!0,css:it.fileInput,onChange:q=>we(q.target.files)}),y.length>0&&S("div",{css:it.selectedFiles,children:[y.length," file",y.length!==1?"s":""," selected"]})]}):S(pt,{children:[r("p",{css:it.textareaLabel,children:"Paste image URLs (one per line)"}),r("textarea",{css:it.textarea,value:O,onChange:q=>G(q.target.value),placeholder:`https://cdn.example.com/photos/image1.jpg
|
|
59
|
+
https://cdn.example.com/photos/image2.jpg`})]})}),S("div",{css:it.footer,children:[r("button",{css:[it.btn,it.btnCancel,"",""],onClick:s,children:"Cancel"}),H==="upload"?r("button",{css:[it.btn,it.btnConfirm,"",""],onClick:Q,disabled:y.length===0||V,children:V?"Uploading...":"Upload"}):r("button",{css:[it.btn,it.btnConfirm,"",""],onClick:ae,disabled:!O.trim()||F,children:F?"Importing...":"Import"})]})]})})}const Ys="36px",ng=On`
|
|
60
|
+
to { transform: rotate(360deg); }
|
|
61
|
+
`,ye={toolbar:x("display:flex;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:8px;padding:12px 16px;background-color:",f.surface,";border-bottom:1px solid ",f.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:x("display:inline-flex;align-items:center;justify-content:center;gap:6px;height:",Ys,";padding:0 14px;border-radius:6px;font-size:",J.base,";font-weight:500;background:",f.surface,";border:1px solid ",f.border,";cursor:pointer;transition:all 0.15s ease;color:",f.text,";letter-spacing:-0.01em;&:hover:not(:disabled){background-color:",f.surfaceHover,";border-color:",f.borderHover,";}&:disabled{cursor:not-allowed;opacity:0.5;}",""),btnPrimary:x("background:",f.primary,";border-color:",f.primary,";color:white;&:hover:not(:disabled){background:",f.primaryHover,";border-color:",f.primaryHover,";}",""),btnDanger:x("color:",f.danger,";&:hover:not(:disabled){background-color:",f.dangerLight,";border-color:",f.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:x("position:absolute;top:100%;left:0;z-index:1000;min-width:160px;margin-top:4px;background:white;border:1px solid ",f.border,";border-radius:6px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.15);overflow:hidden;",""),cloudDropdownItem:x("display:flex;align-items:center;gap:8px;width:100%;padding:10px 14px;border:none;background:none;font-size:",J.sm,";color:",f.text,";cursor:pointer;text-align:left;white-space:nowrap;&:hover{background-color:",f.hover,";}svg{width:16px;height:16px;flex-shrink:0;color:#f59e0b;}",""),cloudDropdownItemDefault:x("svg{color:",f.text,";}",""),cloudDropdownItemDanger:x("color:",f.danger,";svg{color:",f.danger,";}",""),cloudDropdownDivider:x("height:1px;background-color:",f.border,";margin:4px 0;",""),icon:{name:"157xhr7",styles:"width:16px;height:16px"},iconSpin:x("animation:",ng," 1s linear infinite;",""),selectionCount:x("font-size:",J.base,";color:",f.textSecondary,";display:flex;align-items:center;gap:8px;margin-right:8px;",""),clearBtn:x("color:",f.primary,";background:none;border:none;cursor:pointer;font-size:",J.base,";font-weight:500;padding:0;&:hover{text-decoration:underline;}",""),divider:x("width:1px;height:24px;background:",f.border,";margin:0 4px;",""),viewToggle:x("display:flex;align-items:center;height:",Ys,";background-color:",f.surface,";border:1px solid ",f.border,";border-radius:6px;overflow:hidden;",""),searchWrapper:{name:"9iujih",styles:"position:relative;display:flex;align-items:center"},searchInput:x("height:",Ys,";padding:0 32px 0 12px;border:1px solid ",f.border,";border-radius:6px;font-size:",J.base,";background:",f.surface,";color:",f.text,";width:180px;transition:all 0.15s ease;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 2px ",f.primaryLight,";}&::placeholder{color:",f.textMuted,";}",""),searchClearBtn:x("position:absolute;right:5px;top:5px;bottom:5px;background:",f.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:",f.primaryHover,";}",""),viewBtn:x("height:100%;padding:0 10px;background:transparent;border:none;cursor:pointer;color:",f.textSecondary,";transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{color:",f.text,";background-color:",f.surfaceHover,";}",""),viewBtnActive:x("background-color:",f.primaryLight,";color:",f.primary,";&:hover{background-color:",f.primaryLight,";color:",f.primary,";}","")};function lg(){const{selectedItems:o,viewMode:s,setViewMode:h,clearSelection:u,currentPath:p,triggerRefresh:g,focusedItem:A,scanRequested:H,clearScanRequest:k,fileItems:y,requestProcess:Y,setProcessMode:O,actionState:G,cancelAction:ie}=Na(),_=w.useRef(null),V=w.useRef(null),[me,F]=w.useState(!1),[ue,$]=w.useState(!1),[we,N]=w.useState(!1),[ve,Q]=w.useState(!1),[ae,q]=w.useState(!1),[W,ge]=w.useState(0),[Se,le]=w.useState(!1),[Ae,He]=w.useState(!1),[D,j]=w.useState(!1),[P,De]=w.useState(0),[Ue,v]=w.useState(!1),[U,Z]=w.useState("Processing Images"),[K,te]=w.useState({current:0,total:0,percent:0,status:"processing"}),[ze,he]=w.useState(null),[ot,Ye]=w.useState(!1),[Vt,be]=w.useState(!1),[nt,Bt]=w.useState(!1),[oe,at]=w.useState(!1),[Ot,on]=w.useState(!1),[Ln,$l]=w.useState(!1),[tl,Lt]=w.useState(!1),[Dl,Cn]=w.useState(!1),Tt=w.useRef(null),qa=w.useRef(null),yt=zh({setShowProgress:v,setProgressTitle:Z,setProgressState:te,triggerRefresh:g}),nl=p==="public/images"||p.startsWith("public/images/");w.useCallback(()=>{_.current?.click()},[]);const ll=w.useCallback(async()=>{N(!0),Z("Scanning Files"),v(!0),te({current:0,total:0,percent:0,status:"processing",message:"Scanning for files..."});try{const I=(await fetch("/api/studio/scan",{method:"POST"})).body?.getReader();if(!I)throw new Error("No reader");const pe=new TextDecoder;let Le="";for(;;){const{done:ke,value:Te}=await I.read();if(ke)break;Le+=pe.decode(Te,{stream:!0});const Ze=Le.split(`
|
|
62
|
+
|
|
63
|
+
`);Le=Ze.pop()||"";for(const Ve of Ze){if(!Ve.startsWith("data: "))continue;const re=JSON.parse(Ve.slice(6));if(re.type==="start")te({current:0,total:re.total,percent:0,status:"processing",message:`Scanning ${re.total} files...`});else if(re.type==="progress")te({current:re.current,total:re.total,percent:re.percent,status:"processing",currentFile:re.currentFile});else if(re.type==="cleanup")te(Yt=>({...Yt,message:re.message}));else if(re.type==="complete"){let Yt=re.renamed>0?`${re.renamed} file(s) renamed due to conflicts. `:"";re.orphanedFiles&&re.orphanedFiles.length>0&&(Yt+=`Found ${re.orphanedFiles.length} orphaned thumbnail(s) in images folder.`),te({current:re.total||0,total:re.total||0,percent:100,status:"complete",processed:re.added,alreadyProcessed:re.existingCount,errors:re.errors,orphanedFiles:re.orphanedFiles,pendingUpdates:re.pendingUpdates,orphanedEntries:re.orphanedEntries,message:Yt||void 0,isScan:!0}),g()}else re.type==="error"&&te({current:0,total:0,percent:0,status:"error",message:re.message||"Scan failed"})}}}catch(fe){console.error("Scan error:",fe),te({current:0,total:0,percent:0,status:"error",message:"Scan failed"})}finally{N(!1)}},[g]);w.useEffect(()=>{const fe=I=>{Tt.current&&!Tt.current.contains(I.target)&&Lt(!1),qa.current&&!qa.current.contains(I.target)&&Cn(!1)};return document.addEventListener("mousedown",fe),()=>document.removeEventListener("mousedown",fe)},[]),w.useEffect(()=>{H&&!we&&(k(),ll())},[H,we,k,ll]);const vc=w.useCallback(async fe=>{const I=fe.target.files;if(!I||I.length===0)return;const pe=Array.from(I);pe.length>1?(te({current:0,total:pe.length,percent:0,status:"processing",message:"Uploading files..."}),v(!0)):$(!0);let Le=0,ke=0;try{for(let Te=0;Te<pe.length;Te++){const Ze=pe[Te],Ve=new FormData;Ve.append("file",Ze),Ve.append("path",p);try{const re=await fetch("/api/studio/upload",{method:"POST",body:Ve});if(re.ok)Le++;else{const Yt=await re.json();ke++,pe.length===1&&(re.status>=500?(console.error("Upload error:",Yt),he({title:"Upload Failed",message:`Failed to upload ${Ze.name}: ${Yt.error||"Unknown error"}`})):he({title:"Cannot Upload Here",message:Yt.error||"Upload not allowed in this location."}))}}catch{ke++}pe.length>1&&te({current:Te+1,total:pe.length,percent:Math.round((Te+1)/pe.length*100),status:"processing",currentFile:Ze.name})}pe.length>1&&te({current:pe.length,total:pe.length,percent:100,status:"complete",processed:Le,errors:ke}),g()}catch(Te){console.error("Upload error:",Te),pe.length>1?te({current:0,total:0,percent:0,status:"error",message:"Upload failed."}):he({title:"Upload Failed",message:"Upload failed. Check console for details."})}finally{$(!1),_.current&&(_.current.value="")}},[p,g]),Ya=w.useCallback(async fe=>{if(o.size>0){const pe=Array.from(o),Le=pe.filter(Te=>(Te.split("/").pop()||"").includes(".")&&!Te.endsWith("/")),ke=pe.filter(Te=>!(Te.split("/").pop()||"").includes(".")||Te.endsWith("/"));if(ke.length>0)try{const Ze=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(ke.join(","))}`)).json();if(Ze.images)for(const Ve of Ze.images){const re=`public/${Ve}`;Le.includes(re)||Le.push(re)}}catch(Te){console.error("Failed to get folder files:",Te)}if(Le.length===0){he({title:"No Files Found",message:"No files found in the selected items."});return}O(fe),Y(Le)}else try{const Le=await(await fetch("/api/studio/count-images")).json();if(!Le.images||Le.images.length===0){he({title:"No Images Found",message:"No images found in the public folder to process."});return}const ke=Le.images.map(Te=>`public/${Te}`);O(fe),Y(ke)}catch(pe){console.error("Failed to get images:",pe),he({title:"Error",message:"Failed to get images."})}},[o,Y,O]),bc=w.useCallback(()=>{yt.stop(),V.current&&(te(fe=>({...fe,status:"stopping"})),V.current.abort())},[yt]),xc=w.useCallback(async()=>{const fe=K.orphanedFiles;if(!(!fe||fe.length===0))try{const I=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:fe})}),pe=await I.json();I.ok?(te(Le=>({...Le,orphanedFiles:void 0,orphansRemoved:pe.deleted,message:`Deleted ${pe.deleted} orphaned thumbnail${pe.deleted!==1?"s":""}.`})),g()):he({title:"Delete Failed",message:pe.error||"Failed to delete orphaned files."})}catch(I){console.error("Delete orphans error:",I),he({title:"Delete Failed",message:"Failed to delete orphaned files. Check console for details."})}},[K.orphanedFiles,g]),kl=w.useCallback(()=>{o.size!==0&&Q(!0)},[o]),Nt=w.useCallback(async()=>{Q(!1);const fe=Array.from(o);fe.length!==0&&await yt.execute({endpoint:"/api/studio/delete-stream",body:{paths:fe},title:"Deleting Files",onComplete:()=>{u()}})},[o,u,yt]),wn=w.useCallback(async()=>{if(o.size===0)return;const fe=Array.from(o),I=fe.filter(Ve=>(Ve.split("/").pop()||"").includes(".")&&!Ve.endsWith("/")),pe=fe.filter(Ve=>!(Ve.split("/").pop()||"").includes(".")||Ve.endsWith("/")),Le=pe.length>0;if(Le)try{const re=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(pe.join(","))}`)).json();if(re.images)for(const Yt of re.images){const Xa=`public/${Yt}`;I.includes(Xa)||I.push(Xa)}}catch(Ve){console.error("Failed to get folder files:",Ve)}if(I.length===0){he({title:"No Files Found",message:"No files found in the selected items."});return}let ke=!1,Te=!1,Ze=0;for(const Ve of I){const re=y.find(Yt=>Yt.path===Ve);re?re.isRemote?ke=!0:re.cdnPushed?Ze++:Te=!0:Le&&(Te=!0)}if(!Le&&Ze===I.length){he({title:"Already Pushed",message:`All ${I.length} file${I.length!==1?"s are":" is"} already on the CDN.`});return}ge(I.length),le(ke),He(Te),q(!0)},[o,y]),jt=w.useCallback(async()=>{q(!1);const fe=Array.from(o),I=fe.filter(ke=>(ke.split("/").pop()||"").includes(".")&&!ke.endsWith("/")),pe=fe.filter(ke=>!(ke.split("/").pop()||"").includes(".")||ke.endsWith("/"));if(pe.length>0)try{const Te=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(pe.join(","))}`)).json();if(Te.images)for(const Ze of Te.images){const Ve=`public/${Ze}`;I.includes(Ve)||I.push(Ve)}}catch(ke){console.error("Failed to get folder files:",ke)}const Le=I.map(ke=>"/"+ke.replace(/^public\//,""));Le.length!==0&&await yt.execute({endpoint:"/api/studio/sync-stream",body:{imageKeys:Le},title:"Pushing to CDN",onComplete:()=>{u()},onError:ke=>{(ke.includes("R2 not configured")||ke.includes("CLOUDFLARE_R2"))&&(v(!1),on(!0))}})},[o,u,yt]),[Vi,Sc]=w.useState([]),[Cc,Wl]=w.useState(0),Il=w.useCallback(async()=>{if(o.size===0)return;const fe=Array.from(o),I=fe.filter(Te=>(Te.split("/").pop()||"").includes(".")&&!Te.endsWith("/")),pe=fe.filter(Te=>!(Te.split("/").pop()||"").includes(".")||Te.endsWith("/")),Le=pe.length>0;if(Le)try{const Ze=await(await fetch(`/api/studio/folder-images?folders=${encodeURIComponent(pe.join(","))}`)).json();if(Ze.images)for(const Ve of Ze.images){const re=`public/${Ve}`;I.includes(re)||I.push(re)}}catch(Te){console.error("Failed to get folder files:",Te)}if(I.length===0){he({title:"No Files Found",message:"No files found in the selected items."});return}let ke;if(Le)ke=I;else if(ke=I.filter(Te=>{const Ze=y.find(Ve=>Ve.path===Te);return Ze&&Ze.cdnPushed&&!Ze.isRemote}),ke.length===0){he({title:"No CDN Files",message:`None of the ${I.length} selected file${I.length!==1?"s are":" is"} on the CDN.`});return}Sc(ke),Wl(I.length),De(ke.length),j(!0)},[o,y]),Pl=w.useCallback(async()=>{j(!1),G.showDownloadConfirm&&ie();const I=(G.showDownloadConfirm?G.actionPaths:Vi).map(pe=>"/"+pe.replace(/^public\//,""));await yt.execute({endpoint:"/api/studio/download-stream",body:{imageKeys:I},title:"Downloading from CDN",onComplete:()=>u()})},[Vi,u,G.showDownloadConfirm,G.actionPaths,ie,yt]),Un=w.useCallback(async()=>{if(o.size===0)return;const I=Array.from(o).filter(pe=>{const Le=y.find(ke=>ke.path===pe);return Le&&Le.hasUpdate});if(I.length===0){he({title:"No Updates",message:"No files with pending updates in selection."});return}await yt.execute({endpoint:"/api/studio/push-updates-stream",body:{paths:I},title:"Pushing Updates",onComplete:()=>u()})},[o,y,u,yt]),ea=w.useCallback(async()=>{if(o.size===0)return;const I=Array.from(o).filter(pe=>{const Le=y.find(ke=>ke.path===pe);return Le&&Le.hasUpdate});if(I.length!==0)try{const pe=await fetch("/api/studio/cancel-updates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:I})});if(pe.ok)u(),g();else{const Le=await pe.json();he({title:"Cancel Failed",message:Le.error||"Unknown error"})}}catch(pe){console.error("Cancel updates error:",pe),he({title:"Cancel Failed",message:"Failed to cancel updates. Check console for details."})}},[o,y,u,g]),_l=w.useCallback(async fe=>{Ye(!1);try{const I=await fetch("/api/studio/create-folder",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({parentPath:p,name:fe})});if(I.ok)g();else{const pe=await I.json();he({title:"Create Folder Failed",message:pe.error||"Unknown error"})}}catch(I){console.error("Create folder error:",I),he({title:"Create Folder Failed",message:"Failed to create folder. Check console for details."})}},[p,g]),wc=w.useCallback(()=>{o.size!==0&&at(!0)},[o]),Xi=w.useCallback(async fe=>{const I=Array.from(o);await yt.execute({endpoint:"/api/studio/move",body:{paths:I,destination:fe},title:"Moving Files",onComplete:()=>u()})},[o,u,yt]),{searchQuery:ta,setSearchQuery:yn}=Na(),zc=w.useCallback(fe=>{yn(fe.target.value)},[yn]),Qi=w.useCallback(fe=>{fe.key==="Escape"&&(fe.stopPropagation(),yn(""),fe.target.blur())},[yn]),vn=o.size>0;vn&&Array.from(o).some(fe=>{const I=y.find(pe=>pe.path===fe);return I&&I.cdnPushed&&!I.isRemote}),vn&&Array.from(o).every(fe=>{const I=y.find(pe=>pe.path===fe);return I&&I.type==="file"&&I.cdnPushed&&!I.isRemote});const Zi=vn&&Array.from(o).some(fe=>{const I=y.find(pe=>pe.path===fe);return I&&I.hasUpdate}),zn=Array.from(o),Mn=zn.length===1&&!zn[0].includes("."),Hn=Mn?zn[0]:null,Ga=Hn&&Hn.split("/").pop()||"",qt=zn.length===1&&zn[0].includes("."),st=qt?zn[0]:null,At=st&&st.split("/").pop()||"",al=w.useCallback(async fe=>{Hn&&(be(!1),await yt.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:Hn,newName:fe},title:"Renaming Folder",onComplete:()=>u()}))},[Hn,u,yt]),Va=w.useCallback(async fe=>{st&&(Bt(!1),await yt.execute({endpoint:"/api/studio/rename-stream",body:{oldPath:st,newName:fe},title:"Renaming File",onComplete:()=>u()}))},[st,u,yt]),Ki=S(pt,{children:[(D||G.showDownloadConfirm)&&r(Ui,{title:"Download from CDN",message:(()=>{const fe=G.showDownloadConfirm?G.downloadImageCount:P,I=G.showDownloadConfirm?G.downloadTotalSelected:Cc;return I>fe?`Download ${fe} of ${I} selected file${I!==1?"s":""} from Cloudflare R2? (${I-fe} not on CDN)`:`Download ${fe} image${fe!==1?"s":""} from Cloudflare R2 to local storage? Images will be removed from the CDN.`})(),confirmLabel:"Download",onConfirm:Pl,onCancel:()=>{j(!1),G.showDownloadConfirm&&ie()}}),Ue&&r(hc,{title:U,progress:K,onStop:bc,onDeleteOrphans:xc,onClose:()=>{v(!1),te({current:0,total:0,percent:0,status:"processing"}),g()}})]});return A?Ki:S(pt,{children:[Ki,ve&&r(Ui,{title:"Delete Items",message:`Are you sure you want to delete ${o.size} item(s)? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:Nt,onCancel:()=>Q(!1)}),ae&&r(Ui,{title:"Push to CDN",message:`Push ${W} image${W!==1?"s":""} to Cloudflare R2?${Se?" Remote images will be downloaded first.":""}${Ae?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:jt,onCancel:()=>q(!1)}),ot&&r(fc,{title:"New Folder",message:"Enter a name for the new folder:",placeholder:"Folder name",confirmLabel:"Create",onConfirm:_l,onCancel:()=>Ye(!1)}),oe&&r(Mh,{selectedItems:o,currentPath:p,onMove:fe=>{at(!1),Xi(fe)},onCancel:()=>at(!1)}),Vt&&Hn&&r(fc,{title:"Rename Folder",message:"Enter a new name for the folder:",placeholder:Ga,defaultValue:Ga,confirmLabel:"Rename",onConfirm:al,onCancel:()=>be(!1)}),nt&&st&&r(fc,{title:"Rename File",message:"Enter a new name for the file:",placeholder:At,defaultValue:At,confirmLabel:"Rename",onConfirm:Va,onCancel:()=>Bt(!1)}),ze&&r(wh,{title:ze.title,message:ze.message,onClose:()=>{he(null),g()}}),r(Th,{isOpen:Ot,onClose:()=>on(!1)}),me&&r(tg,{currentPath:p,onClose:()=>F(!1),onUploadComplete:()=>{F(!1),g()},streamingOperation:yt,setShowProgress:v,setProgressTitle:Z,setProgressState:te}),S("div",{css:ye.toolbar,children:[r("input",{ref:_,type:"file",multiple:!0,accept:"image/*,video/*,audio/*,.pdf",onChange:vc,style:{display:"none"}}),S("div",{css:ye.left,children:[S("button",{css:[ye.btn,ye.btnPrimary,"",""],onClick:()=>F(!0),disabled:ue||nl,children:[r(ag,{}),"Add New"]}),S("button",{css:ye.btn,onClick:()=>{qt?Bt(!0):Mn?be(!0):Ye(!0)},disabled:nl&&!Mn&&!qt,title:nl&&!Mn&&!qt?"Cannot create folders in protected images folder":void 0,children:[qt||Mn?r(sg,{}):r(rg,{}),qt?"Rename File":Mn?"Rename Folder":"New Folder"]}),r("div",{css:ye.divider}),S("div",{css:ye.cloudDropdownWrapper,ref:qa,children:[S("button",{css:ye.btn,onClick:()=>Cn(!Dl),disabled:G.showProgress||nl,title:nl?"Cannot process images folder":void 0,children:[r(gg,{}),"Thumbnails",r("svg",{css:ye.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),Dl&&S("div",{css:ye.cloudDropdown,children:[S("button",{css:[ye.cloudDropdownItem,ye.cloudDropdownItemDefault,"",""],onClick:()=>{Cn(!1),Ya("generate")},children:[r(yg,{}),"Generate Thumbnails"]}),S("button",{css:[ye.cloudDropdownItem,ye.cloudDropdownItemDanger,"",""],onClick:()=>{Cn(!1),Ya("remove")},children:[r(vg,{}),"Remove Thumbnails"]})]})]}),S("button",{css:[ye.btn,ye.btnDanger,"",""],onClick:kl,disabled:!vn,children:[r(cg,{}),"Delete"]}),S("button",{css:ye.btn,onClick:wc,disabled:!vn,children:[r(ug,{}),"Move"]}),S("div",{css:ye.cloudDropdownWrapper,ref:Tt,children:[S("button",{css:[ye.btn,ye.btnCloud,"",""],onClick:()=>Lt(!tl),disabled:!vn,children:[r(ch,{}),"Cloud",r("svg",{css:ye.dropdownArrow,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),tl&&vn&&S("div",{css:ye.cloudDropdown,children:[Zi&&S(pt,{children:[S("button",{css:ye.cloudDropdownItem,onClick:()=>{Lt(!1),Un()},children:[r(fg,{}),"Push Update"]}),S("button",{css:[ye.cloudDropdownItem,ye.cloudDropdownItemDanger,"",""],onClick:()=>{Lt(!1),ea()},children:[r(dg,{}),"Cancel Update"]}),r("div",{css:ye.cloudDropdownDivider})]}),S("button",{css:ye.cloudDropdownItem,onClick:()=>{Lt(!1),wn()},children:[r(ch,{}),"Push CDN"]}),S("button",{css:ye.cloudDropdownItem,onClick:()=>{Lt(!1),Il()},children:[r(hg,{}),"Download"]})]})]}),S("div",{css:ye.searchWrapper,children:[r("input",{css:ye.searchInput,type:"text",placeholder:"Search images...",value:ta,onChange:zc,onKeyDown:Qi}),ta&&r("button",{css:ye.searchClearBtn,onClick:()=>yn(""),title:"Clear search",children:r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),S("div",{css:ye.right,children:[vn&&S("span",{css:ye.selectionCount,children:[o.size," selected",r("button",{css:ye.clearBtn,onClick:u,children:"Clear"})]}),S("button",{css:ye.btn,onClick:ll,disabled:we,children:[r(ig,{spinning:we}),"Scan"]}),r("button",{css:ye.btn,onClick:g,title:"Refresh view",children:r(og,{})}),S("div",{css:ye.viewToggle,children:[r("button",{css:[ye.viewBtn,s==="grid"&&ye.viewBtnActive,"",""],onClick:()=>h("grid"),"aria-label":"Grid view",children:r(pg,{})}),r("button",{css:[ye.viewBtn,s==="list"&&ye.viewBtnActive,"",""],onClick:()=>h("list"),"aria-label":"List view",children:r(mg,{})})]})]})]})]})}function ag(){return r("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})})}function ig({spinning:o}){return r("svg",{css:[ye.icon,o&&ye.iconSpin,"",""],fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})})}function og(){return r("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}function cg(){return r("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}function rg(){return r("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 13h6m-3-3v6m-9 1V7a2 2 0 012-2h6l2 2h6a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2z"})})}function sg(){return r("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}function ug(){return r("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})})}function ch(){return r("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})})}function fg(){return r("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})})}function dg(){return r("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}function hg(){return r("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"})})}function pg(){return r("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2V6zM14 6a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2V6zM4 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2H6a2 2 0 01-2-2v-2zM14 16a2 2 0 012-2h2a2 2 0 012 2v2a2 2 0 01-2 2h-2a2 2 0 01-2-2v-2z"})})}function mg(){return r("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 6h16M4 10h16M4 14h16M4 18h16"})})}function gg(){return r("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}function yg(){return r("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})})}function vg(){return r("svg",{css:ye.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})}class bg{async get(s){const h=await fetch(s,{cache:"no-store",headers:{"Cache-Control":"no-cache"}});if(!h.ok){const u=await h.json().catch(()=>({}));throw new Error(u.error||`Request failed: ${h.status}`)}return h.json()}async post(s,h){const u=await fetch(s,{method:"POST",headers:h?{"Content-Type":"application/json"}:void 0,body:h?JSON.stringify(h):void 0});if(!u.ok){const p=await u.json().catch(()=>({}));throw new Error(p.error||`Request failed: ${u.status}`)}return u.json()}async list(s="public"){return this.get(`/api/studio/list?path=${encodeURIComponent(s)}`)}async search(s){return this.get(`/api/studio/search?q=${encodeURIComponent(s)}`)}async listFolders(){return this.get("/api/studio/list-folders")}async countImages(){return this.get("/api/studio/count-images")}async folderImages(s){return this.get(`/api/studio/folder-images?folders=${encodeURIComponent(s.join(","))}`)}async upload(s,h="public"){const u=new FormData;u.append("file",s),u.append("path",h);const p=await fetch("/api/studio/upload",{method:"POST",body:u});if(!p.ok){const g=await p.json().catch(()=>({}));throw new Error(g.error||`Upload failed: ${p.status}`)}return p.json()}async delete(s){return this.post("/api/studio/delete",{paths:s})}async createFolder(s,h){return this.post("/api/studio/create-folder",{parentPath:s,name:h})}async rename(s,h){return this.post("/api/studio/rename",{oldPath:s,newName:h})}async move(s,h){return this.post("/api/studio/move",{paths:s,destination:h})}async push(s){return this.post("/api/studio/sync",{imageKeys:s})}async reprocess(s){return this.post("/api/studio/reprocess",{imageKeys:s})}processAllStream(){return new EventSource("/api/studio/process-all")}}const Gs=new bg;function Ah(){const{currentPath:o,setCurrentPath:s,navigateUp:h,selectedItems:u,toggleSelection:p,selectRange:g,lastSelectedPath:A,selectAll:H,clearSelection:k,refreshKey:y,setFocusedItem:Y,triggerRefresh:O,triggerScan:G,searchQuery:ie,showError:_,setFileItems:V}=Na(),[me,F]=w.useState([]),[ue,$]=w.useState(!0),[we,N]=w.useState(!1),ve=w.useRef(!0),Q=w.useRef(o);w.useEffect(()=>{async function j(){const P=Q.current!==o;(ve.current||P)&&$(!0),Q.current=o;try{const De=ie&&ie.length>=2?await Gs.search(ie):await Gs.list(o),Ue=De.items||[];F(Ue),V(Ue),N(De.isEmpty===!0)}catch(De){const Ue=De instanceof Error?De.message:"Failed to load items";_("Load Error",Ue),F([]),V([]),N(!1)}$(!1),ve.current=!1}j()},[o,y,ie,_,V]);const ae=o==="public",q=ie&&ie.length>=2,W=[...me].sort((j,P)=>j.type==="folder"&&P.type!=="folder"?-1:j.type!=="folder"&&P.type==="folder"?1:j.name.localeCompare(P.name)),ge=W.length>0&&W.every(j=>u.has(j.path)),Se=W.some(j=>u.has(j.path)),le=w.useCallback((j,P)=>{P.shiftKey&&A?g(A,j.path,W):p(j.path)},[A,g,W,p]),Ae=w.useCallback(j=>{j.type==="folder"?s(j.path):Y(j)},[s,Y]),He=w.useCallback(async j=>{try{const P="/"+j.path.replace(/^public\//,"");await Gs.reprocess([P]),O()}catch(P){const De=P instanceof Error?P.message:"Failed to generate thumbnail";_("Processing Error",De)}},[O,_]),D=w.useCallback(()=>{ge?k():H(W)},[ge,k,H,W]);return{items:me,loading:ue,sortedItems:W,metaEmpty:we,isAtRoot:ae,isSearching:q,allItemsSelected:ge,someItemsSelected:Se,currentPath:o,selectedItems:u,navigateUp:h,handleItemClick:le,handleOpen:Ae,handleGenerateThumbnail:He,handleSelectAll:D,triggerScan:G}}const xg=On`
|
|
64
|
+
to { transform: rotate(360deg); }
|
|
65
|
+
`,ee={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:x("width:32px;height:32px;border-radius:50%;border:3px solid ",f.border,";border-top-color:",f.primary,";animation:",xg," 0.8s linear infinite;",""),empty:x("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",f.textSecondary,";",""),emptyIcon:{name:"1o3cbsn",styles:"width:48px;height:48px;margin-bottom:16px;opacity:0.5"},emptyText:x("font-size:",J.base,";margin:0 0 4px 0;&:last-child{color:",f.textMuted,";font-size:",J.sm,";}",""),scanButton:x("margin-top:16px;padding:10px 24px;font-size:",J.base,";font-weight:500;background:",f.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",f.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:x("position:relative;border-radius:8px;border:1px solid ",f.border,";overflow:hidden;cursor:pointer;transition:all 0.15s ease;background-color:",f.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:x("border-color:",f.primary,";box-shadow:0 0 0 1px ",f.primary,";&:hover{border-color:",f.primary,";box-shadow:0 0 0 1px ",f.primary,";}",""),parentItem:x("cursor:pointer;&:hover{border-color:",f.primary,";}",""),checkboxWrapper:{name:"v3lnpt",styles:"position:absolute;top:0;left:0;z-index:10;padding:8px;cursor:pointer"},checkbox:x("width:18px;height:18px;accent-color:",f.primary,";cursor:pointer;",""),content:x("position:relative;aspect-ratio:1;display:flex;align-items:center;justify-content:center;padding:16px;background:",f.background,";",""),contentCloud:{name:"1szc702",styles:"background:#fff7ed"},contentRemote:{name:"qtxye9",styles:"background:#fef2f2"},folderIcon:{name:"k1w47f",styles:"width:56px;height:56px;color:#f9935e"},imagesFolderIcon:x("width:56px;height:56px;color:",f.imagesFolder,";",""),imagesFolderWrapper:{name:"bjn8wh",styles:"position:relative"},lockIcon:x("position:absolute;bottom:4px;right:4px;width:16px;height:16px;color:",f.imagesFolder,";background:white;border-radius:50%;padding:2px;",""),parentIcon:x("width:56px;height:56px;color:",f.textMuted,";",""),fileIcon:x("width:40px;height:40px;color:",f.textMuted,";",""),image:{name:"rm1wug",styles:"max-width:100%;max-height:100%;object-fit:contain;border-radius:4px"},label:x("padding:10px 12px;background-color:",f.surface,";border-top:1px solid ",f.borderLight,";",""),labelRow:{name:"1gkgtms",styles:"display:flex;flex-direction:column;gap:2px"},labelText:{name:"fxp7t8",styles:"flex:1;min-width:0"},copyBtn:x("position:absolute;top:4px;right:4px;z-index:10;height:28px;width:28px;color:",f.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:",f.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:x("display:flex;align-items:center;gap:3px;font-size:",J.xs,";",""),folderStatLocal:x("color:",f.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:x("width:14px;height:14px;color:",f.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:x("color:#f59e0b;font-size:",J.xs,";",""),updateCloudIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateSyncIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},statusRow:{name:"1b1nq65",styles:"display:flex;align-items:center;justify-content:space-between;margin:2px 0 0 0;gap:4px"},statusLeft:{name:"1j5vobt",styles:"display:flex;align-items:center;gap:4px"},thumbChips:{name:"x2l7ss",styles:"display:flex;align-items:center;gap:3px;margin-left:auto"},thumbChip:x("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:",f.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:x("position:absolute;bottom:8px;right:8px;z-index:10;height:28px;font-size:",J.sm,";font-weight:500;color:",f.primary,";background:",f.surface,";border:1px solid ",f.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:",f.primaryLight,";border-color:",f.primary,";}",""),name:x("font-size:",J.sm,";font-weight:500;color:",f.text,";white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin:0;letter-spacing:-0.01em;direction:rtl;text-align:left;",""),size:x("font-size:",J.xs,";color:",f.textMuted,";margin:2px 0 0 0;",""),selectAllRow:x("display:flex;align-items:center;margin-bottom:16px;padding:12px 16px;background:",f.surface,";border-radius:8px;border:1px solid ",f.border,";",""),selectAllLabel:x("display:flex;align-items:center;gap:10px;font-size:",J.base,";font-weight:500;color:",f.textSecondary,";cursor:pointer;&:hover{color:",f.text,";}",""),selectAllCheckbox:x("width:16px;height:16px;accent-color:",f.primary,";","")};function Sg(){const{loading:o,sortedItems:s,metaEmpty:h,isAtRoot:u,isSearching:p,allItemsSelected:g,someItemsSelected:A,selectedItems:H,navigateUp:k,handleItemClick:y,handleOpen:Y,handleGenerateThumbnail:O,handleSelectAll:G,triggerScan:ie}=Ah();return o?r("div",{css:ee.loading,children:r("div",{css:ee.spinner})}):h&&u?S("div",{css:ee.empty,children:[r("svg",{css:ee.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"})}),r("p",{css:ee.emptyText,children:"No files tracked yet"}),r("p",{css:ee.emptyText,children:"Click Scan to discover files in your public folder"}),r("button",{css:ee.scanButton,onClick:ie,children:"Scan for Files"})]}):s.length===0&&u?S("div",{css:ee.empty,children:[r("svg",{css:ee.emptyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),r("p",{css:ee.emptyText,children:"No files in this folder"}),r("p",{css:ee.emptyText,children:"Upload images or click Scan in the toolbar"})]}):S("div",{children:[s.length>0&&r("div",{css:ee.selectAllRow,children:S("label",{css:ee.selectAllLabel,children:[r("input",{type:"checkbox",css:ee.selectAllCheckbox,checked:g,ref:_=>{_&&(_.indeterminate=A&&!g)},onChange:G}),"Select all (",s.length,")"]})}),S("div",{css:ee.grid,children:[!u&&!p&&S("div",{css:[ee.item,ee.parentItem,"",""],onClick:k,children:[r("div",{css:ee.content,children:r("svg",{css:ee.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})})}),S("div",{css:ee.label,children:[r("p",{css:ee.name,children:".."}),r("p",{css:ee.size,children:"Parent folder"})]})]}),s.map(_=>r(wg,{item:_,isSelected:H.has(_.path),onClick:V=>y(_,V),onOpen:()=>Y(_),onGenerateThumbnail:()=>O(_)},_.path))]})]})}function Cg(o){return o.includes("/images/sm/")?"SM":o.includes("/images/md/")?"MD":o.includes("/images/lg/")?"LG":o.includes("/images/full/")?"FULL":null}function wg({item:o,isSelected:s,onClick:h,onOpen:u,onGenerateThumbnail:p}){const[g,A]=w.useState(!1),H=o.type==="folder",k=!H&&o.thumbnail!==void 0,y=o.isProtected||H&&o.name==="images"&&o.path==="public/images",Y=Cg(o.path),O=!H&&(o.hasSm||o.hasMd||o.hasLg||o.hasFull||Y),G=_=>{_.stopPropagation();const V="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(V),A(!0),setTimeout(()=>A(!1),1500)},ie=_=>{if(y){_.stopPropagation(),u();return}h(_)};return S("div",{css:[ee.item,s&&!y&&ee.itemSelected,"",""],onClick:ie,children:[!y&&r("div",{css:ee.checkboxWrapper,onClick:_=>_.stopPropagation(),children:r("input",{type:"checkbox",css:ee.checkbox,checked:s,onChange:()=>h({})})}),S("div",{css:[ee.content,o.isCloud&&ee.contentCloud,o.isRemote&&ee.contentRemote,"",""],children:[S("button",{css:ee.copyBtn,onClick:G,title:"Copy file path",children:[g&&r("span",{css:ee.tooltip,children:"Copied!"}),r("svg",{css:ee.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),r("button",{css:ee.openBtn,onClick:_=>{_.stopPropagation(),u()},children:"Open"}),H?y?S("div",{css:ee.imagesFolderWrapper,children:[r("svg",{css:ee.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),r("svg",{css:ee.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})]}):r("svg",{css:ee.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}):k&&o.thumbnail?r("img",{css:ee.image,src:o.thumbnail,alt:o.name,loading:"lazy"}):r("svg",{css:ee.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})]}),r("div",{css:ee.label,children:r("div",{css:ee.labelRow,children:S("div",{css:ee.labelText,children:[r("p",{css:ee.name,title:o.name,children:o.name}),H?S("div",{css:ee.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&S("span",{css:[ee.folderStat,ee.folderStatLocal,"",""],title:`${o.localCount} local`,children:[r("svg",{css:ee.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),o.localCount]}),o.cloudCount!==void 0&&o.cloudCount>0&&S("span",{css:[ee.folderStat,ee.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[r("svg",{css:ee.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),o.cloudCount]}),o.remoteCount!==void 0&&o.remoteCount>0&&S("span",{css:[ee.folderStat,ee.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[r("svg",{css:ee.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),o.remoteCount]}),o.updateCount!==void 0&&o.updateCount>0&&S("span",{css:[ee.folderStat,ee.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[r("svg",{css:ee.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),o.updateCount]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount!==void 0&&S("span",{css:ee.size,children:[o.fileCount," files"]})]}):S("div",{css:ee.statusRow,children:[r("div",{css:ee.statusLeft,children:o.hasUpdate?S(pt,{children:[r("svg",{css:ee.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),r("svg",{css:ee.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),r("span",{css:ee.updateLabel,children:"update"})]}):o.cdnPushed?r("svg",{css:o.isRemote?ee.storedIconRemote:ee.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.isRemote?r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}):r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}):o.size!==void 0?r("span",{css:ee.size,children:zg(o.size)}):null}),O&&r("span",{css:ee.thumbChips,children:Y?r("span",{css:ee.thumbChip,children:Y}):S(pt,{children:[o.hasSm&&r("span",{css:ee.thumbChip,children:"SM"}),o.hasMd&&r("span",{css:ee.thumbChip,children:"MD"}),o.hasLg&&r("span",{css:ee.thumbChip,children:"LG"}),o.hasFull&&r("span",{css:ee.thumbChip,children:"FULL"})]})})]})]})})})]})}function zg(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}const Mg=On`
|
|
66
|
+
to { transform: rotate(360deg); }
|
|
67
|
+
`,X={loading:{name:"1d2ui9i",styles:"display:flex;align-items:center;justify-content:center;flex:1;min-height:300px"},spinner:x("width:32px;height:32px;border-radius:50%;border:3px solid ",f.border,";border-top-color:",f.primary,";animation:",Mg," 0.8s linear infinite;",""),empty:x("display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1;min-height:300px;color:",f.textSecondary,";",""),emptyHint:x("font-size:",J.sm,";color:",f.textMuted,";margin-top:4px;",""),scanButton:x("margin-top:16px;padding:10px 24px;font-size:",J.base,";font-weight:500;background:",f.primary,";color:white;border:none;border-radius:8px;cursor:pointer;transition:background 0.15s ease;&:hover:not(:disabled){background:",f.primaryHover,";}&:disabled{opacity:0.6;cursor:not-allowed;}",""),tableWrapper:x("background:",f.surface,";border-radius:8px;border:1px solid ",f.border,";overflow-x:auto;",""),table:{name:"nufjao",styles:"width:100%;min-width:600px;border-collapse:collapse;white-space:nowrap"},th:x("text-align:left;font-size:11px;color:",f.textMuted,";text-transform:uppercase;letter-spacing:0.05em;padding:12px 16px;font-weight:600;background:",f.background,";border-bottom:1px solid ",f.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:x("",""),row:x("cursor:pointer;transition:background-color 0.15s ease;user-select:none;&:hover{background-color:",f.surfaceHover,";}&:not(:last-child) td{border-bottom:1px solid ",f.borderLight,";}",""),rowSelected:x("background-color:",f.primaryLight,";&:hover{background-color:",f.primaryLight,";}",""),parentRow:x("cursor:pointer;border-bottom:1px solid ",f.border,";&:hover{background-color:",f.surfaceHover,";}",""),td:{name:"i563hg",styles:"padding:12px 16px"},checkboxCell:{name:"sahq4q",styles:"padding:12px 16px;cursor:pointer;vertical-align:middle"},checkbox:x("width:18px;height:18px;accent-color:",f.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:x("position:relative;flex-shrink:0;height:32px;width:32px;font-size:",J.xs,";color:",f.textSecondary,";background:",f.surface,";border:1px solid ",f.border,";padding:0;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;justify-content:center;&:hover{background:",f.surfaceHover,";border-color:",f.borderHover,";color:",f.text,";}",""),copyIcon:{name:"157xhr7",styles:"width:16px;height:16px"},folderStats:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},folderStat:x("display:flex;align-items:center;gap:3px;font-size:",J.xs,";",""),folderStatLocal:x("color:",f.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:x("width:14px;height:14px;color:",f.textSecondary,";",""),folderStatIconRemote:{name:"efr29r",styles:"width:14px;height:14px;color:#ef4444"},folderStatIconUpdate:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateLabel:x("display:flex;align-items:center;gap:4px;color:#f59e0b;font-size:",J.xs,";",""),updateCloudIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},updateSyncIcon:{name:"1pgx8p4",styles:"width:14px;height:14px;color:#f59e0b"},storedLabel:{name:"s5xdrg",styles:"display:flex;align-items:center"},storedIconCloud:{name:"1e09qmx",styles:"width:16px;height:16px;color:#f59e0b"},storedIconRemote:{name:"1mrh6ju",styles:"width:16px;height:16px;color:#ef4444"},tooltip:{name:"1bu1odp",styles:"position:absolute;top:50%;right:100%;transform:translateY(-50%);background:#1a1f36;color:white;padding:4px 8px;border-radius:4px;font-size:12px;white-space:nowrap;margin-right:6px;pointer-events:none;z-index:100;&::after{content:'';position:absolute;left:100%;top:50%;transform:translateY(-50%);border:4px solid transparent;border-left-color:#1a1f36;}"},nameCell:{name:"9s3nhy",styles:"display:flex;align-items:center;gap:12px;flex:1"},thumbnailWrapper:{name:"f01c4l",styles:"width:48px;height:36px;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:4px"},thumbnailCloud:{name:"1szc702",styles:"background:#fff7ed"},thumbnailRemote:{name:"qtxye9",styles:"background:#fef2f2"},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:x("width:24px;height:24px;color:",f.imagesFolder,";",""),lockIcon:x("width:10px;height:10px;color:",f.imagesFolder,";margin-left:-6px;margin-top:8px;",""),parentIcon:x("width:20px;height:20px;color:",f.textMuted,";flex-shrink:0;",""),fileIcon:x("width:20px;height:20px;color:",f.textMuted,";flex-shrink:0;",""),thumbnail:x("max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;border-radius:4px;border:1px solid ",f.borderLight,";",""),name:x("font-size:",J.base,";font-weight:500;color:",f.text,";letter-spacing:-0.01em;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:300px;",""),meta:x("font-size:",J.sm,";color:",f.textSecondary,";",""),cdnBadge:x("display:inline-flex;align-items:center;gap:4px;font-size:",J.xs,";font-weight:500;color:",f.success,";",""),cdnBadgeRemote:x("display:inline-flex;align-items:center;font-size:",J.xs,";font-weight:500;color:#ef4444;",""),cdnIcon:{name:"1suksrg",styles:"width:12px;height:12px"},cdnEmpty:x("font-size:",J.sm,";color:",f.textMuted,";",""),openBtn:x("height:32px;font-size:",J.sm,";font-weight:500;color:",f.primary,";background:",f.surface,";border:1px solid ",f.border,";padding:0 14px;cursor:pointer;border-radius:4px;transition:all 0.15s ease;display:inline-flex;align-items:center;&:hover{background-color:",f.primaryLight,";border-color:",f.primary,";}","")};function Tg(){const{loading:o,sortedItems:s,metaEmpty:h,isAtRoot:u,isSearching:p,allItemsSelected:g,someItemsSelected:A,selectedItems:H,navigateUp:k,handleItemClick:y,handleOpen:Y,handleGenerateThumbnail:O,handleSelectAll:G,triggerScan:ie}=Ah();return o?r("div",{css:X.loading,children:r("div",{css:X.spinner})}):h&&u?S("div",{css:X.empty,children:[r("p",{children:"No files tracked yet"}),r("p",{css:X.emptyHint,children:"Click Scan to discover files in your public folder"}),r("button",{css:X.scanButton,onClick:ie,children:"Scan for Files"})]}):s.length===0&&u?S("div",{css:X.empty,children:[r("p",{children:"No files in this folder"}),r("p",{css:X.emptyHint,children:"Upload images or click Scan in the toolbar"})]}):r("div",{css:X.tableWrapper,children:S("table",{css:X.table,children:[r("thead",{children:S("tr",{children:[r("th",{css:[X.th,X.thCheckbox,"",""],children:s.length>0&&r("input",{type:"checkbox",css:X.checkbox,checked:g,ref:_=>{_&&(_.indeterminate=A&&!g)},onChange:G})}),r("th",{css:X.th,children:"Name"}),r("th",{css:[X.th,X.thSize,"",""],children:"Size"}),r("th",{css:[X.th,X.thDimensions,"",""],children:"Dimensions"}),r("th",{css:[X.th,X.thCdn,"",""],children:"CDN"})]})}),S("tbody",{css:X.tbody,children:[!u&&!p&&S("tr",{css:X.parentRow,onClick:k,children:[r("td",{css:X.td}),r("td",{css:X.td,children:S("div",{css:X.nameCell,children:[r("svg",{css:X.parentIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M3 10h10a8 8 0 018 8v2M3 10l6 6m-6-6l6-6"})}),r("span",{css:X.name,children:".."})]})}),r("td",{css:[X.td,X.meta,"",""],children:"--"}),r("td",{css:[X.td,X.meta,"",""],children:"Parent folder"}),r("td",{css:X.td,children:"--"})]}),s.map(_=>r(Ag,{item:_,isSelected:H.has(_.path),onClick:V=>y(_,V),onOpen:()=>Y(_),onGenerateThumbnail:()=>O(_)},_.path))]})]})})}function Ag({item:o,isSelected:s,onClick:h,onOpen:u,onGenerateThumbnail:p}){const[g,A]=w.useState(!1),H=o.type==="folder",k=!H&&o.thumbnail!==void 0,y=o.isProtected||H&&o.name==="images"&&o.path==="public/images",Y=G=>{G.stopPropagation();const ie="/"+o.path.replace(/^public\//,"");navigator.clipboard.writeText(ie),A(!0),setTimeout(()=>A(!1),1500)},O=G=>{if(y){G.stopPropagation(),u();return}h(G)};return S("tr",{css:[X.row,s&&!y&&X.rowSelected,"",""],onClick:O,children:[r("td",{css:[X.td,X.checkboxCell,"",""],onClick:G=>G.stopPropagation(),children:!y&&r("input",{type:"checkbox",css:X.checkbox,checked:s,onChange:()=>h({})})}),r("td",{css:X.td,children:S("div",{css:X.nameCell,children:[H?y?S("div",{css:X.imagesFolderWrapper,children:[r("svg",{css:X.imagesFolderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})}),r("svg",{css:X.lockIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("path",{fillRule:"evenodd",d:"M5 9V7a5 5 0 0110 0v2a2 2 0 012 2v5a2 2 0 01-2 2H5a2 2 0 01-2-2v-5a2 2 0 012-2zm8-2v2H7V7a3 3 0 016 0z",clipRule:"evenodd"})})]}):r("div",{css:X.folderIconWrapper,children:r("svg",{css:X.folderIcon,fill:"currentColor",viewBox:"0 0 24 24",children:r("path",{d:"M10 4H4a2 2 0 00-2 2v12a2 2 0 002 2h16a2 2 0 002-2V8a2 2 0 00-2-2h-8l-2-2z"})})}):k&&o.thumbnail?r("div",{css:[X.thumbnailWrapper,o.isCloud&&X.thumbnailCloud,o.isRemote&&X.thumbnailRemote,"",""],children:r("img",{css:X.thumbnail,src:o.thumbnail,alt:o.name,loading:"lazy"})}):r("div",{css:[X.thumbnailWrapper,o.isCloud&&X.thumbnailCloud,o.isRemote&&X.thumbnailRemote,"",""],children:r("svg",{css:X.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})})}),r("span",{css:X.name,title:o.name,children:Eg(o.name)}),S("div",{css:X.actionsCell,children:[S("button",{css:X.copyBtn,onClick:Y,title:"Copy file path",children:[g&&r("span",{css:X.tooltip,children:"Copied!"}),r("svg",{css:X.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),r("button",{css:X.openBtn,onClick:G=>{G.stopPropagation(),u()},children:"Open"})]})]})}),r("td",{css:[X.td,X.meta,"",""],children:H?S("div",{css:X.folderStats,children:[o.localCount!==void 0&&o.localCount>0&&S("span",{css:[X.folderStat,X.folderStatLocal,"",""],title:`${o.localCount} local`,children:[r("svg",{css:X.folderStatIconLocal,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),o.localCount]}),o.cloudCount!==void 0&&o.cloudCount>0&&S("span",{css:[X.folderStat,X.folderStatCloud,"",""],title:`${o.cloudCount} in cloud`,children:[r("svg",{css:X.folderStatIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),o.cloudCount]}),o.remoteCount!==void 0&&o.remoteCount>0&&S("span",{css:[X.folderStat,X.folderStatRemote,"",""],title:`${o.remoteCount} remote`,children:[r("svg",{css:X.folderStatIconRemote,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})}),o.remoteCount]}),o.updateCount!==void 0&&o.updateCount>0&&S("span",{css:[X.folderStat,X.folderStatUpdate,"",""],title:`${o.updateCount} pending update${o.updateCount!==1?"s":""}`,children:[r("svg",{css:X.folderStatIconUpdate,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),o.updateCount]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount!==void 0&&S("span",{children:[o.fileCount," files"]}),!o.localCount&&!o.cloudCount&&!o.remoteCount&&!o.updateCount&&o.fileCount===void 0&&"--"]}):o.hasUpdate?S("span",{css:X.updateLabel,children:[r("svg",{css:X.updateCloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})}),r("svg",{css:X.updateSyncIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"})}),"update"]}):o.cdnPushed?r("span",{css:X.storedLabel,children:r("svg",{css:o.isRemote?X.storedIconRemote:X.storedIconCloud,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:o.isRemote?r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"}):r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}):o.size!==void 0?rh(o.size):"--"}),r("td",{css:[X.td,X.meta,"",""],children:H?o.totalSize!==void 0?rh(o.totalSize):"--":o.dimensions?`${o.dimensions.width}x${o.dimensions.height}`:"--"}),r("td",{css:X.td,children:o.cdnPushed?o.isRemote?r("span",{css:X.cdnBadgeRemote,children:"Remote"}):S("span",{css:X.cdnBadge,children:[r("svg",{css:X.cdnIcon,fill:"currentColor",viewBox:"0 0 20 20",children:r("path",{fillRule:"evenodd",d:"M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",clipRule:"evenodd"})}),"Pushed"]}):r("span",{css:X.cdnEmpty,children:"--"})})]})}function rh(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}function Eg(o,s=32){if(o.length<=s)return o;const h=o.lastIndexOf("."),u=h>0?o.substring(h):"",p=h>0?o.substring(0,h):o,g=s-u.length-3;if(g<6)return o.substring(0,s-3)+"...";const A=Math.ceil(g/2),H=Math.floor(g/2);return p.substring(0,A)+"..."+p.substring(p.length-H)+u}const Dg=[".jpg",".jpeg",".png",".gif",".webp",".svg",".ico",".bmp",".tiff",".tif"],kg=[".mp4",".webm",".mov",".avi",".mkv",".m4v"];function _g(o){const s=o.toLowerCase().substring(o.lastIndexOf("."));return Dg.includes(s)}function Rg(o){const s=o.toLowerCase().substring(o.lastIndexOf("."));return kg.includes(s)}const ne={overlay:{name:"1crgpqk",styles:"position:absolute;top:0;left:0;right:0;bottom:0;z-index:100;display:flex;background:transparent"},container:x("display:flex;flex:1;margin:24px;background:",f.surface,";border:1px solid ",f.border,";border-radius:12px;overflow:hidden;box-shadow:0 20px 40px rgba(0, 0, 0, 0.2);",""),main:x("position:relative;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;background:",f.background,";overflow:auto;",""),headerButtons:{name:"8wfhwn",styles:"position:absolute;top:16px;right:16px;display:flex;gap:8px;z-index:10"},copyBtn:x("position:relative;padding:8px;background:",f.surface,";border:1px solid ",f.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:",f.surfaceHover,";border-color:",f.borderHover,";}",""),copyIcon:x("width:20px;height:20px;color:",f.textSecondary,";",""),statusIcon:x("display:flex;align-items:center;justify-content:center;padding:8px;background:",f.surface,";border:1px solid ",f.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:x("padding:8px;background:",f.surface,";border:1px solid ",f.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:",f.surfaceHover,";border-color:",f.borderHover,";}",""),mainCloseIcon:x("width:20px;height:20px;color:",f.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:x("display:flex;flex-direction:column;align-items:center;justify-content:center;padding:48px;background:",f.surface,";border-radius:12px;border:1px solid ",f.border,";",""),fileIcon:x("width:80px;height:80px;color:",f.textMuted,";margin-bottom:16px;",""),fileName:x("font-size:",J.lg,";font-weight:600;color:",f.text,";margin:0;",""),sidebar:x("width:280px;background:",f.surface,";border-left:1px solid ",f.border,";display:flex;flex-direction:column;overflow:hidden;",""),sidebarHeader:x("padding:16px 20px;border-bottom:1px solid ",f.border,";",""),sidebarTitle:x("font-size:",J.base,";font-weight:600;color:",f.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:x("display:flex;justify-content:space-between;font-size:",J.sm,";",""),infoLabel:x("color:",f.textSecondary,";",""),infoValue:x("color:",f.text,";font-weight:500;text-align:right;max-width:160px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;",""),infoValueWrap:x("color:",f.text,";font-weight:500;text-align:right;max-width:160px;word-break:break-all;white-space:normal;",""),infoLink:x("color:",f.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:x("font-size:10px;font-weight:600;padding:2px 6px;border-radius:4px;background:",f.primary,";color:white;",""),actions:{name:"3w0yoi",styles:"display:flex;flex-direction:column;gap:8px"},actionBtn:x("display:flex;align-items:center;gap:10px;width:100%;padding:12px 14px;font-size:",J.base,";font-weight:500;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;color:",f.text,";text-align:left;&:hover:not(:disabled){background-color:",f.surfaceHover,";border-color:",f.borderHover,";}&:disabled{opacity:0.5;cursor:not-allowed;}",""),actionBtnDanger:x("color:",f.danger,";&:hover:not(:disabled){background-color:",f.dangerLight,";border-color:",f.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 Og(){const{focusedItem:o,setFocusedItem:s,triggerRefresh:h,fileItems:u,requestDelete:p,requestMove:g,requestSync:A,requestDownload:H,requestProcess:k,setProcessMode:y,actionState:Y}=Na(),[O,G]=w.useState(!1),[ie,_]=w.useState(!1),[V,me]=w.useState({current:0,total:1,percent:0,status:"processing",message:"Renaming..."}),[F,ue]=w.useState(!1),[$,we]=w.useState(null),[N,ve]=w.useState(!1),[Q,ae]=w.useState(!1),[q,W]=w.useState({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."}),ge=Y.showProgress,Se=o?o.name.toLowerCase()==="favicon.png"||o.name.toLowerCase()==="favicon.jpg":!1;if(!o)return null;const le=_g(o.name),Ae=Rg(o.name),He="/"+o.path.replace(/^public\//,""),D=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${He}`:He,j=typeof window<"u"?window.location.origin:"",P=o.cdnPushed&&o.cdnBaseUrl?`${o.cdnBaseUrl}${He}`:`${j}${He}`,De=()=>{s(null)},Ue=()=>{navigator.clipboard.writeText(P),ve(!0),setTimeout(()=>ve(!1),1500)},v=async K=>{if(K&&K!==o.name){G(!1),_(!0),me({current:0,total:1,percent:0,status:"processing",message:"Renaming file..."});try{const te=await fetch("/api/studio/rename-stream",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({oldPath:o.path,newName:K})});if(!te.body)throw new Error("No response body");const ze=te.body.getReader(),he=new TextDecoder;let ot="",Ye="";for(;;){const{done:Vt,value:be}=await ze.read();if(Vt)break;ot+=he.decode(be,{stream:!0});const nt=ot.split(`
|
|
68
|
+
`);ot=nt.pop()||"";for(const Bt of nt){if(!Bt.startsWith("data: "))continue;const oe=JSON.parse(Bt.slice(6));oe.type==="start"?me({current:0,total:oe.total,percent:0,status:"processing",message:oe.message}):oe.type==="progress"?me({current:oe.current,total:oe.total,percent:Math.round(oe.current/oe.total*100),status:"processing",message:oe.message}):oe.type==="complete"?(Ye=oe.newPath,me({current:oe.renamed,total:oe.renamed,percent:100,status:"complete",message:"Renamed successfully"})):oe.type==="error"&&(me(at=>({...at,status:"error",message:oe.message})),we({title:"Rename Failed",message:oe.message}))}}Ye&&(s({...o,path:Ye,name:Ye.split("/").pop()||K}),h())}catch(te){console.error("Rename error:",te),me(ze=>({...ze,status:"error",message:"Failed to rename"})),we({title:"Rename Failed",message:"An error occurred while renaming the file"})}}},U=async()=>{if(o){ae(!0),W({current:0,total:3,percent:0,status:"processing",message:"Generating favicons..."});try{const K=await fetch("/api/studio/generate-favicon",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imagePath:"/"+o.path.replace(/^public\//,"")})});if(!K.ok){const he=await K.json();W({current:0,total:3,percent:0,status:"error",message:he.error||"Failed to generate favicons"});return}const te=K.body?.getReader(),ze=new TextDecoder;if(te){let he="";for(;;){const{done:ot,value:Ye}=await te.read();if(ot)break;he+=ze.decode(Ye,{stream:!0});const Vt=he.split(`
|
|
69
|
+
`);he=Vt.pop()||"";for(const be of Vt)if(be.startsWith("data: "))try{const nt=JSON.parse(be.slice(6));nt.type==="start"?W(Bt=>({...Bt,total:nt.total})):nt.type==="progress"?W({current:nt.current,total:nt.total,percent:nt.percent,status:"processing",message:nt.message}):nt.type==="complete"?W({current:nt.processed,total:nt.processed,percent:100,status:nt.errors>0?"error":"complete",message:nt.message}):nt.type==="error"&&W(Bt=>({...Bt,status:"error",message:nt.message}))}catch{}}}}catch(K){console.error("Favicon generation error:",K),W({current:0,total:3,percent:0,status:"error",message:"An error occurred while generating favicons"})}}},Z=()=>le?r("img",{css:ne.image,src:D,alt:o.name}):Ae?r("video",{css:ne.video,src:D,controls:!0}):S("div",{css:ne.filePlaceholder,children:[r("svg",{css:ne.fileIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 21h10a2 2 0 002-2V9.414a1 1 0 00-.293-.707l-5.414-5.414A1 1 0 0012.586 3H7a2 2 0 00-2 2v14a2 2 0 002 2z"})}),r("p",{css:ne.fileName,children:o.name})]});return S(pt,{children:[$&&r(wh,{title:$.title,message:$.message,onClose:()=>we(null)}),r(Th,{isOpen:F,onClose:()=>ue(!1)}),O&&r(fc,{title:"Rename File",message:"Enter a new name for the file:",defaultValue:o.name,placeholder:"Enter new filename",confirmLabel:"Rename",onConfirm:v,onCancel:()=>G(!1)}),ie&&r(hc,{title:"Renaming",progress:V,onClose:()=>{_(!1),h()}}),Q&&r(hc,{title:"Generating Favicons",progress:q,onClose:()=>ae(!1)}),r("div",{css:ne.overlay,onClick:De,children:S("div",{css:ne.container,onClick:K=>K.stopPropagation(),children:[S("div",{css:ne.main,children:[S("div",{css:ne.headerButtons,children:[o.cdnPushed&&!o.isRemote&&r("span",{css:ne.statusIcon,title:"Pushed to CDN",children:r("svg",{css:ne.cloudIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M3 15a4 4 0 004 4h9a5 5 0 10-.1-9.999 5.002 5.002 0 10-9.78 2.096A4.001 4.001 0 003 15z"})})}),o.isRemote&&r("span",{css:ne.statusIcon,title:"Remote image",children:r("svg",{css:ne.globeIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M21 12a9 9 0 01-9 9m9-9a9 9 0 00-9-9m9 9H3m9 9a9 9 0 01-9-9m9 9c1.657 0 3-4.03 3-9s-1.343-9-3-9m0 18c-1.657 0-3-4.03-3-9s1.343-9 3-9m-9 9a9 9 0 019-9"})})}),S("button",{css:ne.copyBtn,onClick:Ue,title:"Copy file path",children:[N&&r("span",{css:ne.tooltip,children:"Copied!"}),r("svg",{css:ne.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),r("button",{css:ne.mainCloseBtn,onClick:De,"aria-label":"Close",children:r("svg",{css:ne.mainCloseIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),r("div",{css:ne.mediaWrapper,children:Z()})]}),S("div",{css:ne.sidebar,children:[r("div",{css:ne.sidebarHeader,children:r("h3",{css:ne.sidebarTitle,children:"Details"})}),S("div",{css:ne.sidebarContent,children:[S("div",{css:ne.info,children:[S("div",{css:ne.infoRow,children:[r("span",{css:ne.infoLabel,children:"Name"}),r("span",{css:ne.infoValueWrap,children:o.name})]}),S("div",{css:ne.infoRow,children:[r("span",{css:ne.infoLabel,children:"Path"}),r("span",{css:ne.infoValueWrap,children:o.path.replace(/^public\//,"")})]}),o.size!==void 0&&S("div",{css:ne.infoRow,children:[r("span",{css:ne.infoLabel,children:"Size"}),r("span",{css:ne.infoValue,children:Lg(o.size)})]}),o.dimensions&&S("div",{css:ne.infoRow,children:[r("span",{css:ne.infoLabel,children:"Dimensions"}),S("span",{css:ne.infoValue,children:[o.dimensions.width," × ",o.dimensions.height]})]}),(o.hasSm||o.hasMd||o.hasLg||o.hasFull)&&S("div",{css:ne.infoRow,children:[r("span",{css:ne.infoLabel,children:"Thumbnails"}),r("span",{css:ne.infoValue,children:S("span",{css:ne.thumbChips,children:[o.hasSm&&r("span",{css:ne.thumbChip,children:"SM"}),o.hasMd&&r("span",{css:ne.thumbChip,children:"MD"}),o.hasLg&&r("span",{css:ne.thumbChip,children:"LG"}),o.hasFull&&r("span",{css:ne.thumbChip,children:"FULL"})]})})]}),S("div",{css:ne.infoRow,children:[r("span",{css:ne.infoLabel,children:"CDN Status"}),r("span",{css:ne.infoValue,children:o.cdnPushed?o.isRemote?"Remote":"Pushed":"Local"})]}),S("div",{css:ne.infoRow,children:[r("span",{css:ne.infoLabel,children:"URL"}),r("a",{href:P,target:"_blank",rel:"noopener noreferrer",css:ne.infoLink,title:P,children:P})]})]}),S("div",{css:ne.actions,children:[S("button",{css:ne.actionBtn,onClick:()=>G(!0),disabled:o.isProtected,children:[r("svg",{css:ne.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})}),"Rename"]}),S("button",{css:ne.actionBtn,onClick:()=>g([o.path]),disabled:ge||o.isProtected,children:[r("svg",{css:ne.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 7h12m0 0l-4-4m4 4l-4 4m0 6H4m0 0l4 4m-4-4l4-4"})}),"Move"]}),S("button",{css:[ne.actionBtn,ne.actionBtnCloud,"",""],onClick:()=>A([o.path],u),disabled:ge||o.isProtected||o.cdnPushed&&!o.isRemote,title:o.cdnPushed&&!o.isRemote?"Already in R2":void 0,children:[r("svg",{css:ne.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),"Push to CDN"]}),S("button",{css:[ne.actionBtn,ne.actionBtnCloud,"",""],onClick:()=>H([o.path],u),disabled:ge||!o.cdnPushed||o.isRemote,title:o.cdnPushed?o.isRemote?"Remote image":"Download from CDN to local":"Not on CDN",children:[r("svg",{css:ne.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M9 19l3 3m0 0l3-3m-3 3V10"})}),"Download from CDN"]}),S("button",{css:ne.actionBtn,onClick:()=>{y("generate"),k([o.path])},disabled:ge||o.isProtected,children:[r("svg",{css:ne.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})}),"Generate Thumbnails"]}),(o.hasSm||o.hasMd||o.hasLg||o.hasFull)&&S("button",{css:ne.actionBtn,onClick:()=>{y("remove"),k([o.path])},disabled:ge||o.isProtected,children:[r("svg",{css:ne.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Remove Thumbnails"]}),Se&&S("button",{css:ne.actionBtn,onClick:U,disabled:Q||o.isProtected,children:[r("svg",{css:ne.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 3v4M3 5h4M6 17v4m-2-2h4m5-16l2.286 6.857L21 12l-5.714 2.143L13 21l-2.286-6.857L5 12l5.714-2.143L13 3z"})}),"Generate Favicons"]}),S("button",{css:[ne.actionBtn,ne.actionBtnDanger,"",""],onClick:()=>p([o.path]),disabled:ge||o.isProtected,children:[r("svg",{css:ne.actionIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})}),"Delete"]})]})]})]})]})})]})}function Lg(o){return o<1024?`${o} B`:o<1024*1024?`${(o/1024).toFixed(1)} KB`:`${(o/(1024*1024)).toFixed(1)} MB`}const Ug="36px",Ee={btn:x("height:",Ug,";padding:0 12px;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),icon:x("width:16px;height:16px;color:",f.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:x(Gi," position:relative;background-color:",f.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:x("font-size:",J.xl,";font-weight:600;color:",f.text,";margin:0;letter-spacing:-0.02em;",""),closeBtn:x("padding:6px;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),sections:{name:"klisov",styles:"display:flex;flex-direction:column;gap:24px"},sectionTitle:x("font-size:",J.base,";font-weight:600;color:",f.text,";margin:0 0 12px 0;",""),description:x("font-size:",J.sm,";color:",f.textSecondary,";margin:0 0 12px 0;",""),codeWrapper:{name:"bjn8wh",styles:"position:relative"},code:x("background-color:",f.background,";border-radius:8px;padding:12px;padding-right:40px;font-family:'SF Mono',Monaco,Consolas,monospace;font-size:",J.xs,";color:",f.textSecondary,";border:1px solid ",f.border,";overflow-x:auto;white-space:nowrap;",""),copyBtn:x("position:absolute;top:8px;right:8px;padding:4px;background:",f.surface,";border:1px solid ",f.border,";border-radius:4px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",f.surfaceHover,";border-color:",f.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:x("width:14px;height:14px;color:",f.textSecondary,";",""),codeLine:{name:"1bbvuqp",styles:"margin:0 0 4px 0;&:last-child{margin:0;}"},input:x("width:100%;padding:10px 14px;border:1px solid ",f.border,";border-radius:6px;font-size:",J.base,";color:",f.text,";background:",f.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 3px ",f.primaryLight,";}&::placeholder{color:",f.textMuted,";}",""),grid:{name:"xtlr5l",styles:"display:grid;grid-template-columns:repeat(3, 1fr);gap:12px"},label:x("font-size:",J.xs,";font-weight:500;color:",f.textSecondary,";display:block;margin-bottom:6px;",""),footer:x("margin-top:24px;padding-top:20px;border-top:1px solid ",f.border,";display:flex;justify-content:flex-end;gap:12px;",""),cancelBtn:x("padding:10px 18px;font-size:",J.base,";font-weight:500;color:",f.text,";background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),saveBtn:x("padding:10px 18px;font-size:",J.base,";font-weight:500;color:white;background-color:",f.primary,";border:1px solid ",f.primary,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{background-color:",f.primaryHover,";border-color:",f.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:x("flex:1;padding:8px 12px;border:1px solid ",f.border,";border-radius:6px;font-size:",J.sm,";color:",f.text,";background:",f.surface,";transition:all 0.15s ease;&:focus{outline:none;border-color:",f.primary,";box-shadow:0 0 0 3px ",f.primaryLight,";}",""),cdnIndex:x("font-size:",J.xs,";color:",f.textMuted,";width:24px;text-align:center;flex-shrink:0;",""),cdnDeleteBtn:x("padding:6px;background:none;border:none;cursor:pointer;color:",f.textMuted,";transition:color 0.15s;flex-shrink:0;&:hover{color:",f.danger,";}",""),cdnAddBtn:x("padding:8px 12px;font-size:",J.sm,";font-weight:500;color:",f.primary,";background:",f.primaryLight,";border:1px dashed ",f.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:",f.surface,";}",""),warning:x("font-size:",J.xs,";color:",f.danger,";margin-top:8px;padding:8px 12px;background:",f.dangerLight,";border-radius:6px;","")};function Hg(){const[o,s]=w.useState(!1);return S(pt,{children:[r("button",{css:Ee.btn,onClick:()=>s(!0),"aria-label":"Settings",children:S("svg",{css:Ee.icon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("circle",{cx:"12",cy:"12",r:"3"}),r("path",{d:"M19.4 15a1.65 1.65 0 00.33 1.82l.06.06a2 2 0 010 2.83 2 2 0 01-2.83 0l-.06-.06a1.65 1.65 0 00-1.82-.33 1.65 1.65 0 00-1 1.51V21a2 2 0 01-2 2 2 2 0 01-2-2v-.09A1.65 1.65 0 009 19.4a1.65 1.65 0 00-1.82.33l-.06.06a2 2 0 01-2.83 0 2 2 0 010-2.83l.06-.06a1.65 1.65 0 00.33-1.82 1.65 1.65 0 00-1.51-1H3a2 2 0 01-2-2 2 2 0 012-2h.09A1.65 1.65 0 004.6 9a1.65 1.65 0 00-.33-1.82l-.06-.06a2 2 0 010-2.83 2 2 0 012.83 0l.06.06a1.65 1.65 0 001.82.33H9a1.65 1.65 0 001-1.51V3a2 2 0 012-2 2 2 0 012 2v.09a1.65 1.65 0 001 1.51 1.65 1.65 0 001.82-.33l.06-.06a2 2 0 012.83 0 2 2 0 010 2.83l-.06.06a1.65 1.65 0 00-.33 1.82V9a1.65 1.65 0 001.51 1H21a2 2 0 012 2 2 2 0 01-2 2h-.09a1.65 1.65 0 00-1.51 1z"})]})}),o&&r(Ng,{onClose:()=>s(!1)})]})}const Bg=`# Dev site link (opens from Studio header)
|
|
70
|
+
STUDIO_DEV_SITE_URL=http://localhost:3000
|
|
71
|
+
|
|
72
|
+
# Cloudflare R2 Storage
|
|
73
|
+
CLOUDFLARE_R2_ACCOUNT_ID=your_account_id
|
|
74
|
+
CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id
|
|
75
|
+
CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key
|
|
76
|
+
CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name
|
|
77
|
+
CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com`;function Ng({onClose:o}){const{triggerRefresh:s}=Na(),[h,u]=w.useState(!1),[p,g]=w.useState([]),[A,H]=w.useState(!0),[k,y]=w.useState(!1),[Y,O]=w.useState(!1);w.useEffect(()=>{async function F(){try{const $=await(await fetch("/api/studio/cdns")).json();g($.cdns||[])}catch(ue){console.error("Failed to load CDN URLs:",ue)}finally{H(!1)}}F()},[]);const G=()=>{navigator.clipboard.writeText(Bg),u(!0),setTimeout(()=>u(!1),2e3)},ie=w.useCallback((F,ue)=>{g($=>{const we=[...$];return we[F]=ue,we}),O(!0)},[]),_=w.useCallback(()=>{g(F=>[...F,""]),O(!0)},[]),V=w.useCallback(F=>{g(ue=>ue.filter(($,we)=>we!==F)),O(!0)},[]),me=w.useCallback(async()=>{y(!0);try{(await fetch("/api/studio/cdns",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({cdns:p})})).ok&&(O(!1),s(),o())}catch(F){console.error("Failed to save CDN URLs:",F)}finally{y(!1)}},[p,s,o]);return r("div",{css:Ee.overlay,onClick:o,children:S("div",{css:Ee.panel,onClick:F=>F.stopPropagation(),children:[S("div",{css:Ee.header,children:[r("h2",{css:Ee.title,children:"Settings"}),r("button",{css:Ee.closeBtn,onClick:o,children:r("svg",{css:Ee.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),S("div",{css:Ee.sections,children:[S("section",{children:[r("h3",{css:Ee.sectionTitle,children:"CDN URLs"}),r("p",{css:Ee.description,children:"Manage CDN base URLs used by your images:"}),A?r("p",{css:Ee.description,children:"Loading..."}):S(pt,{children:[r("div",{css:Ee.cdnList,children:p.map((F,ue)=>S("div",{css:Ee.cdnRow,children:[r("span",{css:Ee.cdnIndex,children:ue}),r("input",{css:Ee.cdnInput,type:"text",value:F,onChange:$=>ie(ue,$.target.value),placeholder:"https://cdn.example.com"}),r("button",{css:Ee.cdnDeleteBtn,onClick:()=>V(ue),title:"Delete CDN URL",children:r("svg",{width:"16",height:"16",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]},ue))}),S("button",{css:Ee.cdnAddBtn,onClick:_,children:[r("svg",{width:"14",height:"14",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add CDN URL"]}),p.length>0&&r("p",{css:Ee.warning,children:"Warning: Changing CDN URLs may break image references. The index numbers correspond to image `c` values."})]})]}),S("section",{children:[r("h3",{css:Ee.sectionTitle,children:"Environment Variables"}),S("p",{css:Ee.description,children:["Configure in ",r("code",{children:".env.studio"})," file:"]}),S("div",{css:Ee.codeWrapper,children:[S("button",{css:Ee.copyBtn,onClick:G,title:"Copy to clipboard",children:[h&&r("span",{css:Ee.tooltip,children:"Copied!"}),r("svg",{css:Ee.copyIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2"})})]}),S("div",{css:Ee.code,children:[r("p",{css:Ee.codeLine,children:"STUDIO_DEV_SITE_URL=http://localhost:3000"}),r("p",{css:Ee.codeLine,children:" "}),r("p",{css:Ee.codeLine,children:"# Cloudflare R2 Storage"}),r("p",{css:Ee.codeLine,children:"CLOUDFLARE_R2_ACCOUNT_ID=your_account_id"}),r("p",{css:Ee.codeLine,children:"CLOUDFLARE_R2_ACCESS_KEY_ID=your_access_key_id"}),r("p",{css:Ee.codeLine,children:"CLOUDFLARE_R2_SECRET_ACCESS_KEY=your_secret_access_key"}),r("p",{css:Ee.codeLine,children:"CLOUDFLARE_R2_BUCKET_NAME=your_bucket_name"}),r("p",{css:Ee.codeLine,children:"CLOUDFLARE_R2_PUBLIC_URL=https://your-cdn.example.com"})]})]})]}),S("section",{children:[r("h3",{css:Ee.sectionTitle,children:"Thumbnail Sizes"}),S("div",{css:Ee.grid,children:[S("div",{children:[r("label",{css:Ee.label,children:"Small"}),r("input",{css:Ee.input,type:"number",defaultValue:300})]}),S("div",{children:[r("label",{css:Ee.label,children:"Medium"}),r("input",{css:Ee.input,type:"number",defaultValue:700})]}),S("div",{children:[r("label",{css:Ee.label,children:"Large"}),r("input",{css:Ee.input,type:"number",defaultValue:1400})]})]})]})]}),S("div",{css:Ee.footer,children:[r("button",{css:Ee.cancelBtn,onClick:o,children:"Cancel"}),r("button",{css:Ee.saveBtn,onClick:me,disabled:k||!Y,children:k?"Saving...":"Save Changes"})]})]})})}const Fl={overlay:{name:"1u8n9cx",styles:"position:fixed;inset:0;background:rgba(0, 0, 0, 0.5);display:flex;align-items:center;justify-content:center;z-index:1100"},modal:x("background:",f.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:x("width:24px;height:24px;color:",f.danger,";flex-shrink:0;",""),title:x("font-size:",J.lg,";font-weight:600;color:",f.text,";margin:0;",""),message:x("font-size:",J.base,";color:",f.textSecondary,";margin:0 0 20px 0;line-height:1.5;",""),button:x("width:100%;padding:10px 16px;border-radius:6px;font-size:",J.base,";font-weight:500;border:none;background:",f.primary,";color:white;cursor:pointer;transition:background 0.15s ease;&:hover{background:",f.primaryHover,";}","")};function jg(){const{error:o,clearError:s}=Na();return o?r("div",{css:Fl.overlay,onClick:s,children:S("div",{css:Fl.modal,onClick:h=>h.stopPropagation(),children:[S("div",{css:Fl.header,children:[r("svg",{css:Fl.icon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),r("h3",{css:Fl.title,children:o.title})]}),r("p",{css:Fl.message,children:o.message}),r("button",{css:Fl.button,onClick:s,children:"OK"})]})}):null}const sh={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 qg({triggerRefresh:o,clearSelection:s,setFocusedItem:h,showError:u}){const[p,g]=w.useState(sh),A=w.useCallback(ae=>{g(q=>({...q,progressState:typeof ae=="function"?ae(q.progressState):{...q.progressState,...ae}}))},[]),H=w.useCallback(ae=>{g(q=>({...q,showProgress:ae}))},[]),k=w.useCallback(ae=>{g(q=>({...q,progressTitle:ae}))},[]),y=zh({setShowProgress:H,setProgressTitle:k,setProgressState:A,triggerRefresh:o}),Y=w.useCallback(ae=>{g(q=>({...q,actionPaths:ae,showDeleteConfirm:!0}))},[]),O=w.useCallback(ae=>{g(q=>({...q,actionPaths:ae,showMoveModal:!0}))},[]),G=w.useCallback((ae,q)=>{const W=ae.map(le=>"/"+le.replace(/^public\//,""));let ge=!1,Se=!1;for(const le of ae){const Ae=q.find(He=>He.path===le);Ae&&(Ae.isRemote?ge=!0:Ae.cdnPushed||(Se=!0))}g(le=>({...le,actionPaths:ae,syncImageCount:W.length,syncHasRemote:ge,syncHasLocal:Se,showSyncConfirm:!0}))},[]),ie=w.useCallback((ae,q)=>{const W=[];for(const ge of ae){const Se=q.find(le=>le.path===ge);Se&&Se.cdnPushed&&!Se.isRemote&&W.push(ge)}g(ge=>({...ge,actionPaths:W,downloadImageCount:W.length,downloadTotalSelected:ae.length,showDownloadConfirm:!0}))},[]),_=w.useCallback(ae=>{g(q=>({...q,actionPaths:ae,showProcessConfirm:!0}))},[]),V=w.useCallback(ae=>{g(q=>({...q,processMode:ae}))},[]),me=w.useCallback(()=>{g(ae=>({...ae,showDeleteConfirm:!1,showMoveModal:!1,showSyncConfirm:!1,showProcessConfirm:!1,showDownloadConfirm:!1}))},[]),F=w.useCallback(()=>{g(sh)},[]),ue=w.useCallback(()=>{y.stop()},[y]),$=w.useCallback(async()=>{const ae=p.actionPaths;g(q=>({...q,showDeleteConfirm:!1}));try{const q=await fetch("/api/studio/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({paths:ae})});if(q.ok)s(),h(null),o();else{const W=await q.json();u("Delete Failed",W.error||"Unknown error")}}catch(q){console.error("Delete error:",q),u("Delete Failed","Delete failed. Check console for details.")}},[p.actionPaths,s,h,o,u]),we=w.useCallback(async ae=>{const q=p.actionPaths;g(W=>({...W,showMoveModal:!1})),await y.execute({endpoint:"/api/studio/move",body:{paths:q,destination:ae},title:"Moving Files",onComplete:W=>{W.errors&&W.errors>0&&W.errorMessages?.length&&u("Move Failed",W.errorMessages.join(`
|
|
78
|
+
`)),s(),h(null)}})},[p.actionPaths,s,h,u,y]),N=w.useCallback(async()=>{const q=p.actionPaths.map(Se=>"/"+Se.replace(/^public\//,""));g(Se=>({...Se,showSyncConfirm:!1,showProgress:!0,progressTitle:"Pushing to CDN",progressState:{current:0,total:q.length,percent:0,status:"processing",message:"Pushing to CDN..."}}));let W=0;const ge=[];for(let Se=0;Se<q.length;Se++){const le=q[Se];try{const Ae=await fetch("/api/studio/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({imageKeys:[le]})});if(Ae.ok)W++;else{const He=await Ae.json();ge.push(`${le}: ${He.error||"Unknown error"}`)}}catch(Ae){ge.push(`${le}: ${Ae instanceof Error?Ae.message:"Unknown error"}`)}A({current:Se+1,total:q.length,percent:Math.round((Se+1)/q.length*100),status:"processing",message:`Pushed ${le}`})}A({current:q.length,total:q.length,percent:100,status:ge.length>0?"error":"complete",message:`Pushed ${W} file${W!==1?"s":""}${ge.length>0?`, ${ge.length} error${ge.length!==1?"s":""}`:""}`}),ge.length>0&&u("Push Errors",ge.join(`
|
|
79
|
+
`)),s(),o()},[p.actionPaths,s,o,u,A]),ve=w.useCallback(async()=>{const ae=p.actionPaths,q=p.processMode,W=ae.map(Ae=>{const He=Ae.replace(/^public\//,"");return He.startsWith("/")?He:`/${He}`}),ge=q==="remove",Se=ge?"/api/studio/unprocess-stream":"/api/studio/reprocess-stream",le=ge?"Removing Thumbnails":"Generating Thumbnails";g(Ae=>({...Ae,showProcessConfirm:!1})),await y.execute({endpoint:Se,body:{imageKeys:W},title:le})},[p.actionPaths,p.processMode,y]),Q=w.useCallback(async()=>{const ae=p.progressState.orphanedFiles;if(!(!ae||ae.length===0))try{const q=await fetch("/api/studio/delete-orphans",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({files:ae})});if(q.ok)A(W=>({...W,orphanedFiles:void 0,message:W.message?.replace(/Found \d+ orphaned thumbnail\(s\).*/,"Orphaned thumbnails deleted.")})),o();else{const W=await q.json();u("Delete Failed",W.error||"Failed to delete orphaned files")}}catch(q){console.error("Delete orphans error:",q),u("Delete Failed","Failed to delete orphaned files. Check console for details.")}},[p.progressState.orphanedFiles,o,u,A]);return{actionState:p,setActionState:g,requestDelete:Y,requestMove:O,requestSync:G,requestDownload:ie,requestProcess:_,setProcessMode:V,cancelAction:me,closeProgress:F,stopProcessing:ue,confirmDelete:$,confirmMove:we,confirmSync:N,confirmProcess:ve,deleteOrphans:Q}}const Yg="36px",Mt={container:x(Gi," display:flex;flex-direction:column;height:100%;background:",f.background,";",""),header:x("display:flex;align-items:center;justify-content:space-between;padding:12px 24px;background:",f.surface,";border-bottom:1px solid ",f.border,";position:relative;",""),title:x("font-size:",J.lg,";font-weight:600;color:",f.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:x("display:flex;align-items:center;gap:6px;font-size:",J.base,";color:",f.textSecondary,";overflow:hidden;",""),breadcrumbSeparator:x("color:",f.border,";flex-shrink:0;",""),breadcrumbItem:x("color:",f.textSecondary,";text-decoration:none;cursor:pointer;transition:color 0.15s ease;white-space:nowrap;&:hover{color:",f.primary,";}",""),breadcrumbCurrent:x("color:",f.text,";font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;",""),headerIconBtn:x("display:flex;align-items:center;justify-content:center;width:32px;height:32px;color:",f.textMuted,";background:transparent;border:none;border-radius:6px;cursor:pointer;transition:all 0.15s ease;&:hover{color:",f.text,";background:",f.surface,";}",""),headerActions:{name:"1yydxi7",styles:"display:flex;align-items:center;gap:8px"},headerBtn:x("height:",Yg,";padding:0 12px;background:",f.surface,";border:1px solid ",f.border,";border-radius:6px;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;&:hover{background-color:",f.surfaceHover,";border-color:",f.borderHover,";}",""),headerIcon:x("width:16px;height:16px;color:",f.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:x("position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(99, 91, 255, 0.1);border:3px dashed ",f.primary,";border-radius:8px;display:flex;align-items:center;justify-content:center;z-index:50;pointer-events:none;",""),dropMessage:x("display:flex;flex-direction:column;align-items:center;gap:12px;color:",f.primary,";font-size:",J.lg,";font-weight:600;",""),dropIcon:{name:"18jhpep",styles:"width:48px;height:48px"}};function Gg({onClose:o,isVisible:s=!0,standaloneMode:h=!1,workspacePath:u,siteUrl:p}){const g=o||(()=>{}),[A,H]=w.useState("public"),[k,y]=w.useState(new Set),[Y,O]=w.useState(null),[G,ie]=w.useState("grid"),[_,V]=w.useState(null),[me,F]=w.useState(null),[ue,$]=w.useState(!1),[we,N]=w.useState(0),[ve,Q]=w.useState(!1),[ae,q]=w.useState(""),[W,ge]=w.useState(null),[Se,le]=w.useState([]),[Ae,He]=w.useState(!1),D=w.useCallback(()=>{N(oe=>oe+1)},[]);w.useEffect(()=>{if(_&&Se.length>0){const oe=Se.find(at=>at.path===_.path);oe&&JSON.stringify(oe)!==JSON.stringify(_)&&V(oe)}},[Se,_]);const j=w.useCallback(()=>{Q(!0)},[]),P=w.useCallback(()=>{Q(!1)},[]),De=w.useCallback((oe,at)=>{ge({title:oe,message:at})},[]),Ue=w.useCallback(()=>{ge(null)},[]),v=w.useCallback(oe=>{oe.preventDefault(),oe.stopPropagation(),He(!0)},[]),U=w.useCallback(oe=>{oe.preventDefault(),oe.stopPropagation(),He(!1)},[]),Z=w.useCallback(async oe=>{oe.preventDefault(),oe.stopPropagation(),He(!1);const at=Array.from(oe.dataTransfer.files);if(at.length!==0&&!(A==="public/images"||A.startsWith("public/images/"))){for(const Ot of at){const on=new FormData;on.append("file",Ot),on.append("path",A);try{await fetch("/api/studio/upload",{method:"POST",body:on})}catch(Ln){console.error("Upload error:",Ln)}}D()}},[A,D]),K=w.useCallback(()=>{if(A==="public")return;const oe=A.split("/");oe.pop(),H(oe.join("/")||"public"),y(new Set)},[A]),te=w.useCallback(oe=>{H(oe),y(new Set),V(null)},[]),ze=w.useCallback(oe=>{y(at=>{const Ot=new Set(at);return Ot.has(oe)?Ot.delete(oe):Ot.add(oe),Ot}),O(oe)},[]),he=w.useCallback((oe,at,Ot)=>{const on=Ot.findIndex(Lt=>Lt.path===oe),Ln=Ot.findIndex(Lt=>Lt.path===at);if(on===-1||Ln===-1)return;const $l=Math.min(on,Ln),tl=Math.max(on,Ln);y(Lt=>{const Dl=new Set(Lt);for(let Cn=$l;Cn<=tl;Cn++)Dl.add(Ot[Cn].path);return Dl}),O(at)},[]),ot=w.useCallback(oe=>{y(new Set(oe.map(at=>at.path)))},[]),Ye=w.useCallback(()=>{y(new Set)},[]),Vt=w.useCallback(oe=>{V(oe)},[]),be=qg({triggerRefresh:D,clearSelection:Ye,setFocusedItem:Vt,showError:De}),nt=w.useCallback(oe=>{if(oe.key==="Escape"){const at=oe.target;if(at.tagName==="INPUT"||at.tagName==="TEXTAREA")return;_?V(null):h||g()}},[g,_,h]);w.useEffect(()=>(s&&(document.addEventListener("keydown",nt),document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",nt),document.body.style.overflow=""}),[nt,s]);const Bt={isOpen:!0,openStudio:()=>{},closeStudio:g,toggleStudio:g,currentPath:A,setCurrentPath:te,navigateUp:K,selectedItems:k,toggleSelection:ze,selectRange:he,selectAll:ot,clearSelection:Ye,lastSelectedPath:Y,viewMode:G,setViewMode:ie,focusedItem:_,setFocusedItem:V,meta:me,setMeta:F,isLoading:ue,setIsLoading:$,refreshKey:we,triggerRefresh:D,scanRequested:ve,triggerScan:j,clearScanRequest:P,searchQuery:ae,setSearchQuery:q,error:W,showError:De,clearError:Ue,fileItems:Se,setFileItems:le,actionState:be.actionState,requestDelete:be.requestDelete,requestMove:be.requestMove,requestSync:be.requestSync,requestDownload:be.requestDownload,requestProcess:be.requestProcess,setProcessMode:be.setProcessMode,confirmDelete:be.confirmDelete,confirmMove:be.confirmMove,confirmSync:be.confirmSync,confirmProcess:be.confirmProcess,cancelAction:be.cancelAction,closeProgress:be.closeProgress,stopProcessing:be.stopProcessing,deleteOrphans:be.deleteOrphans};return r(Ch.Provider,{value:Bt,children:S("div",{css:Mt.container,children:[S("div",{css:Mt.header,children:[r("div",{css:Mt.headerLeft,children:r("h1",{css:Mt.title,children:"Studio"})}),r("div",{css:Mt.headerCenter,children:r(Zg,{currentPath:A,onNavigate:te,projectName:u?u.split("/").pop():void 0})}),S("div",{css:Mt.headerActions,children:[p&&r("a",{href:p,target:"_blank",rel:"noopener noreferrer",css:Mt.headerIconBtn,title:`Open ${p}`,children:r(Kg,{})}),r(Hg,{}),!h&&r("button",{css:Mt.headerBtn,onClick:g,"aria-label":"Close Studio",children:r(Jg,{})})]})]}),r(lg,{}),S("div",{css:Mt.content,onDragOver:v,onDragLeave:U,onDrop:Z,children:[Ae&&r("div",{css:Mt.dropOverlay,children:S("div",{css:Mt.dropMessage,children:[r("svg",{css:Mt.dropIcon,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:r("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12"})}),r("span",{children:"Drop files to upload"})]})}),r("div",{css:Mt.fileBrowser,children:G==="grid"?r(Sg,{}):r(Tg,{})})]}),_&&r(Og,{}),r(jg,{}),be.actionState.showDeleteConfirm&&r(Ui,{title:"Delete Files",message:`Are you sure you want to delete ${be.actionState.actionPaths.length} item${be.actionState.actionPaths.length!==1?"s":""}? This action cannot be undone.`,confirmLabel:"Delete",variant:"danger",onConfirm:be.confirmDelete,onCancel:be.cancelAction}),be.actionState.showSyncConfirm&&r(Ui,{title:"Push to CDN",message:`Push ${be.actionState.syncImageCount} image${be.actionState.syncImageCount!==1?"s":""} to Cloudflare R2?${be.actionState.syncHasRemote?" Remote images will be downloaded first.":""}${be.actionState.syncHasLocal?" After pushing, local files will be deleted.":""}`,confirmLabel:"Push",onConfirm:be.confirmSync,onCancel:be.cancelAction}),be.actionState.showProcessConfirm&&r(Qg,{imageCount:be.actionState.actionPaths.length,mode:be.actionState.processMode,onConfirm:be.confirmProcess,onCancel:be.cancelAction}),be.actionState.showMoveModal&&r(Mh,{selectedItems:new Set(be.actionState.actionPaths),currentPath:A,onMove:oe=>be.confirmMove(oe),onCancel:be.cancelAction}),be.actionState.showProgress&&r(hc,{title:be.actionState.progressTitle,progress:be.actionState.progressState,onStop:be.stopProcessing,onDeleteOrphans:be.deleteOrphans,onClose:be.closeProgress})]})})}var Vg={name:"1cm5yut",styles:"display:flex;gap:12px;justify-content:flex-end"},Xg={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 Qg({imageCount:o,mode:s,onConfirm:h,onCancel:u}){const p={overlay:Xg,container:x("background:",f.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:x("font-size:",J.lg,";font-weight:600;color:",f.text,";margin:0 0 16px;",""),message:x("font-size:",J.base,";color:",f.textSecondary,";margin:0 0 20px;line-height:1.5;",""),actions:Vg,cancelBtn:x("padding:10px 20px;border:1px solid ",f.border,";border-radius:8px;background:",f.background,";color:",f.text,";font-size:",J.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",f.surfaceHover,";border-color:",f.borderHover,";}",""),confirmBtn:x("padding:10px 20px;border:none;border-radius:8px;background:",f.primary,";color:white;font-size:",J.base,";font-weight:500;cursor:pointer;transition:all 0.15s ease;&:hover{background:",f.primaryHover,";}",""),confirmBtnDanger:x("background:",f.danger,";&:hover{background:#dc2626;}","")},g=s==="remove",A=g?"Remove Thumbnails":"Generate Thumbnails",H=g?`Remove generated thumbnails for ${o} image${o!==1?"s":""}? Original images will be kept.`:`Generate thumbnails for ${o} image${o!==1?"s":""}?`,k=g?"Remove":"Generate";return r("div",{css:p.overlay,onClick:u,children:S("div",{css:p.container,onClick:y=>y.stopPropagation(),children:[r("h2",{css:p.title,children:A}),r("p",{css:p.message,children:H}),S("div",{css:p.actions,children:[r("button",{css:p.cancelBtn,onClick:u,children:"Cancel"}),r("button",{css:[p.confirmBtn,g&&p.confirmBtnDanger,"",""],onClick:h,children:k})]})]})})}function Zg({currentPath:o,onNavigate:s,projectName:h}){const u=o.split("/").filter(Boolean),p=u.map((g,A)=>({name:A===0&&g==="public"&&h?h:g,path:u.slice(0,A+1).join("/")}));return r("div",{css:Mt.breadcrumbs,children:p.map((g,A)=>S("span",{style:{display:"flex",alignItems:"center",gap:6},children:[A>0&&r("span",{css:Mt.breadcrumbSeparator,children:"/"}),A===p.length-1?r("span",{css:Mt.breadcrumbCurrent,children:g.name}):r("span",{css:Mt.breadcrumbItem,onClick:()=>s(g.path),children:g.name})]},g.path))})}function Kg(){return S("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("circle",{cx:"12",cy:"12",r:"10"}),r("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),r("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})}function Jg(){return S("svg",{css:Mt.headerIcon,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[r("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),r("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}const Eh=document.getElementById("root");if(!Eh)throw new Error("Root element not found");const Fg=window.__STUDIO_WORKSPACE__||"Unknown",$g=window.__STUDIO_SITE_URL__||"";V1.createRoot(Eh).render(r(w.StrictMode,{children:r("div",{style:{position:"fixed",top:0,left:0,right:0,bottom:0,background:"#0a0a0a"},children:r(Gg,{isVisible:!0,standaloneMode:!0,workspacePath:Fg,siteUrl:$g})})}));
|
package/dist/client/index.html
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
12
12
|
}
|
|
13
13
|
</style>
|
|
14
|
-
<script type="module" crossorigin src="/assets/index-
|
|
14
|
+
<script type="module" crossorigin src="/assets/index-CVpv3I0V.js"></script>
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="root"></div>
|