@telepat/rilo 0.1.0 → 0.1.7

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,13 @@
1
+ (function(){const D=document.createElement("link").relList;if(D&&D.supports&&D.supports("modulepreload"))return;for(const E of document.querySelectorAll('link[rel="modulepreload"]'))d(E);new MutationObserver(E=>{for(const R of E)if(R.type==="childList")for(const q of R.addedNodes)q.tagName==="LINK"&&q.rel==="modulepreload"&&d(q)}).observe(document,{childList:!0,subtree:!0});function _(E){const R={};return E.integrity&&(R.integrity=E.integrity),E.referrerPolicy&&(R.referrerPolicy=E.referrerPolicy),E.crossOrigin==="use-credentials"?R.credentials="include":E.crossOrigin==="anonymous"?R.credentials="omit":R.credentials="same-origin",R}function d(E){if(E.ep)return;E.ep=!0;const R=_(E);fetch(E.href,R)}})();var Hs={exports:{}},ti={};var wd;function Uh(){if(wd)return ti;wd=1;var m=Symbol.for("react.transitional.element"),D=Symbol.for("react.fragment");function _(d,E,R){var q=null;if(R!==void 0&&(q=""+R),E.key!==void 0&&(q=""+E.key),"key"in E){R={};for(var G in E)G!=="key"&&(R[G]=E[G])}else R=E;return E=R.ref,{$$typeof:m,type:d,key:q,ref:E!==void 0?E:null,props:R}}return ti.Fragment=D,ti.jsx=_,ti.jsxs=_,ti}var Fd;function Rh(){return Fd||(Fd=1,Hs.exports=Uh()),Hs.exports}var n=Rh(),Bs={exports:{}},re={};var Jd;function Mh(){if(Jd)return re;Jd=1;var m=Symbol.for("react.transitional.element"),D=Symbol.for("react.portal"),_=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),R=Symbol.for("react.consumer"),q=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),te=Symbol.iterator;function se(f){return f===null||typeof f!="object"?null:(f=te&&f[te]||f["@@iterator"],typeof f=="function"?f:null)}var H={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Y=Object.assign,fe={};function be(f,z,V){this.props=f,this.context=z,this.refs=fe,this.updater=V||H}be.prototype.isReactComponent={},be.prototype.setState=function(f,z){if(typeof f!="object"&&typeof f!="function"&&f!=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,f,z,"setState")},be.prototype.forceUpdate=function(f){this.updater.enqueueForceUpdate(this,f,"forceUpdate")};function Ye(){}Ye.prototype=be.prototype;function W(f,z,V){this.props=f,this.context=z,this.refs=fe,this.updater=V||H}var I=W.prototype=new Ye;I.constructor=W,Y(I,be.prototype),I.isPureReactComponent=!0;var ce=Array.isArray;function $(){}var ie={H:null,A:null,T:null,S:null},Te=Object.prototype.hasOwnProperty;function Me(f,z,V){var X=V.ref;return{$$typeof:m,type:f,key:z,ref:X!==void 0?X:null,props:V}}function ue(f,z){return Me(f.type,z,f.props)}function Ee(f){return typeof f=="object"&&f!==null&&f.$$typeof===m}function j(f){var z={"=":"=0",":":"=2"};return"$"+f.replace(/[=:]/g,function(V){return z[V]})}var B=/\/+/g;function ee(f,z){return typeof f=="object"&&f!==null&&f.key!=null?j(""+f.key):z.toString(36)}function ze(f){switch(f.status){case"fulfilled":return f.value;case"rejected":throw f.reason;default:switch(typeof f.status=="string"?f.then($,$):(f.status="pending",f.then(function(z){f.status==="pending"&&(f.status="fulfilled",f.value=z)},function(z){f.status==="pending"&&(f.status="rejected",f.reason=z)})),f.status){case"fulfilled":return f.value;case"rejected":throw f.reason}}throw f}function S(f,z,V,X,le){var oe=typeof f;(oe==="undefined"||oe==="boolean")&&(f=null);var o=!1;if(f===null)o=!0;else switch(oe){case"bigint":case"string":case"number":o=!0;break;case"object":switch(f.$$typeof){case m:case D:o=!0;break;case F:return o=f._init,S(o(f._payload),z,V,X,le)}}if(o)return le=le(f),o=X===""?"."+ee(f,0):X,ce(le)?(V="",o!=null&&(V=o.replace(B,"$&/")+"/"),S(le,z,V,"",function(ml){return ml})):le!=null&&(Ee(le)&&(le=ue(le,V+(le.key==null||f&&f.key===le.key?"":(""+le.key).replace(B,"$&/")+"/")+o)),z.push(le)),1;o=0;var p=X===""?".":X+":";if(ce(f))for(var ge=0;ge<f.length;ge++)X=f[ge],oe=p+ee(X,ge),o+=S(X,z,V,oe,le);else if(ge=se(f),typeof ge=="function")for(f=ge.call(f),ge=0;!(X=f.next()).done;)X=X.value,oe=p+ee(X,ge++),o+=S(X,z,V,oe,le);else if(oe==="object"){if(typeof f.then=="function")return S(ze(f),z,V,X,le);throw z=String(f),Error("Objects are not valid as a React child (found: "+(z==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":z)+"). If you meant to render a collection of children, use an array instead.")}return o}function k(f,z,V){if(f==null)return f;var X=[],le=0;return S(f,X,"","",function(oe){return z.call(V,oe,le++)}),X}function w(f){if(f._status===-1){var z=f._result;z=z(),z.then(function(V){(f._status===0||f._status===-1)&&(f._status=1,f._result=V)},function(V){(f._status===0||f._status===-1)&&(f._status=2,f._result=V)}),f._status===-1&&(f._status=0,f._result=z)}if(f._status===1)return f._result.default;throw f._result}var T=typeof reportError=="function"?reportError:function(f){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof f=="object"&&f!==null&&typeof f.message=="string"?String(f.message):String(f),error:f});if(!window.dispatchEvent(z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",f);return}console.error(f)},M={map:k,forEach:function(f,z,V){k(f,function(){z.apply(this,arguments)},V)},count:function(f){var z=0;return k(f,function(){z++}),z},toArray:function(f){return k(f,function(z){return z})||[]},only:function(f){if(!Ee(f))throw Error("React.Children.only expected to receive a single React element child.");return f}};return re.Activity=L,re.Children=M,re.Component=be,re.Fragment=_,re.Profiler=E,re.PureComponent=W,re.StrictMode=d,re.Suspense=U,re.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ie,re.__COMPILER_RUNTIME={__proto__:null,c:function(f){return ie.H.useMemoCache(f)}},re.cache=function(f){return function(){return f.apply(null,arguments)}},re.cacheSignal=function(){return null},re.cloneElement=function(f,z,V){if(f==null)throw Error("The argument must be a React element, but you passed "+f+".");var X=Y({},f.props),le=f.key;if(z!=null)for(oe in z.key!==void 0&&(le=""+z.key),z)!Te.call(z,oe)||oe==="key"||oe==="__self"||oe==="__source"||oe==="ref"&&z.ref===void 0||(X[oe]=z[oe]);var oe=arguments.length-2;if(oe===1)X.children=V;else if(1<oe){for(var o=Array(oe),p=0;p<oe;p++)o[p]=arguments[p+2];X.children=o}return Me(f.type,le,X)},re.createContext=function(f){return f={$$typeof:q,_currentValue:f,_currentValue2:f,_threadCount:0,Provider:null,Consumer:null},f.Provider=f,f.Consumer={$$typeof:R,_context:f},f},re.createElement=function(f,z,V){var X,le={},oe=null;if(z!=null)for(X in z.key!==void 0&&(oe=""+z.key),z)Te.call(z,X)&&X!=="key"&&X!=="__self"&&X!=="__source"&&(le[X]=z[X]);var o=arguments.length-2;if(o===1)le.children=V;else if(1<o){for(var p=Array(o),ge=0;ge<o;ge++)p[ge]=arguments[ge+2];le.children=p}if(f&&f.defaultProps)for(X in o=f.defaultProps,o)le[X]===void 0&&(le[X]=o[X]);return Me(f,oe,le)},re.createRef=function(){return{current:null}},re.forwardRef=function(f){return{$$typeof:G,render:f}},re.isValidElement=Ee,re.lazy=function(f){return{$$typeof:F,_payload:{_status:-1,_result:f},_init:w}},re.memo=function(f,z){return{$$typeof:g,type:f,compare:z===void 0?null:z}},re.startTransition=function(f){var z=ie.T,V={};ie.T=V;try{var X=f(),le=ie.S;le!==null&&le(V,X),typeof X=="object"&&X!==null&&typeof X.then=="function"&&X.then($,T)}catch(oe){T(oe)}finally{z!==null&&V.types!==null&&(z.types=V.types),ie.T=z}},re.unstable_useCacheRefresh=function(){return ie.H.useCacheRefresh()},re.use=function(f){return ie.H.use(f)},re.useActionState=function(f,z,V){return ie.H.useActionState(f,z,V)},re.useCallback=function(f,z){return ie.H.useCallback(f,z)},re.useContext=function(f){return ie.H.useContext(f)},re.useDebugValue=function(){},re.useDeferredValue=function(f,z){return ie.H.useDeferredValue(f,z)},re.useEffect=function(f,z){return ie.H.useEffect(f,z)},re.useEffectEvent=function(f){return ie.H.useEffectEvent(f)},re.useId=function(){return ie.H.useId()},re.useImperativeHandle=function(f,z,V){return ie.H.useImperativeHandle(f,z,V)},re.useInsertionEffect=function(f,z){return ie.H.useInsertionEffect(f,z)},re.useLayoutEffect=function(f,z){return ie.H.useLayoutEffect(f,z)},re.useMemo=function(f,z){return ie.H.useMemo(f,z)},re.useOptimistic=function(f,z){return ie.H.useOptimistic(f,z)},re.useReducer=function(f,z,V){return ie.H.useReducer(f,z,V)},re.useRef=function(f){return ie.H.useRef(f)},re.useState=function(f){return ie.H.useState(f)},re.useSyncExternalStore=function(f,z,V){return ie.H.useSyncExternalStore(f,z,V)},re.useTransition=function(){return ie.H.useTransition()},re.version="19.2.4",re}var $d;function $s(){return $d||($d=1,Bs.exports=Mh()),Bs.exports}var K=$s(),ks={exports:{}},ni={},Vs={exports:{}},Ys={};var Wd;function qh(){return Wd||(Wd=1,(function(m){function D(S,k){var w=S.length;S.push(k);e:for(;0<w;){var T=w-1>>>1,M=S[T];if(0<E(M,k))S[T]=k,S[w]=M,w=T;else break e}}function _(S){return S.length===0?null:S[0]}function d(S){if(S.length===0)return null;var k=S[0],w=S.pop();if(w!==k){S[0]=w;e:for(var T=0,M=S.length,f=M>>>1;T<f;){var z=2*(T+1)-1,V=S[z],X=z+1,le=S[X];if(0>E(V,w))X<M&&0>E(le,V)?(S[T]=le,S[X]=w,T=X):(S[T]=V,S[z]=w,T=z);else if(X<M&&0>E(le,w))S[T]=le,S[X]=w,T=X;else break e}}return k}function E(S,k){var w=S.sortIndex-k.sortIndex;return w!==0?w:S.id-k.id}if(m.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var R=performance;m.unstable_now=function(){return R.now()}}else{var q=Date,G=q.now();m.unstable_now=function(){return q.now()-G}}var U=[],g=[],F=1,L=null,te=3,se=!1,H=!1,Y=!1,fe=!1,be=typeof setTimeout=="function"?setTimeout:null,Ye=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function I(S){for(var k=_(g);k!==null;){if(k.callback===null)d(g);else if(k.startTime<=S)d(g),k.sortIndex=k.expirationTime,D(U,k);else break;k=_(g)}}function ce(S){if(Y=!1,I(S),!H)if(_(U)!==null)H=!0,$||($=!0,j());else{var k=_(g);k!==null&&ze(ce,k.startTime-S)}}var $=!1,ie=-1,Te=5,Me=-1;function ue(){return fe?!0:!(m.unstable_now()-Me<Te)}function Ee(){if(fe=!1,$){var S=m.unstable_now();Me=S;var k=!0;try{e:{H=!1,Y&&(Y=!1,Ye(ie),ie=-1),se=!0;var w=te;try{l:{for(I(S),L=_(U);L!==null&&!(L.expirationTime>S&&ue());){var T=L.callback;if(typeof T=="function"){L.callback=null,te=L.priorityLevel;var M=T(L.expirationTime<=S);if(S=m.unstable_now(),typeof M=="function"){L.callback=M,I(S),k=!0;break l}L===_(U)&&d(U),I(S)}else d(U);L=_(U)}if(L!==null)k=!0;else{var f=_(g);f!==null&&ze(ce,f.startTime-S),k=!1}}break e}finally{L=null,te=w,se=!1}k=void 0}}finally{k?j():$=!1}}}var j;if(typeof W=="function")j=function(){W(Ee)};else if(typeof MessageChannel<"u"){var B=new MessageChannel,ee=B.port2;B.port1.onmessage=Ee,j=function(){ee.postMessage(null)}}else j=function(){be(Ee,0)};function ze(S,k){ie=be(function(){S(m.unstable_now())},k)}m.unstable_IdlePriority=5,m.unstable_ImmediatePriority=1,m.unstable_LowPriority=4,m.unstable_NormalPriority=3,m.unstable_Profiling=null,m.unstable_UserBlockingPriority=2,m.unstable_cancelCallback=function(S){S.callback=null},m.unstable_forceFrameRate=function(S){0>S||125<S?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Te=0<S?Math.floor(1e3/S):5},m.unstable_getCurrentPriorityLevel=function(){return te},m.unstable_next=function(S){switch(te){case 1:case 2:case 3:var k=3;break;default:k=te}var w=te;te=k;try{return S()}finally{te=w}},m.unstable_requestPaint=function(){fe=!0},m.unstable_runWithPriority=function(S,k){switch(S){case 1:case 2:case 3:case 4:case 5:break;default:S=3}var w=te;te=S;try{return k()}finally{te=w}},m.unstable_scheduleCallback=function(S,k,w){var T=m.unstable_now();switch(typeof w=="object"&&w!==null?(w=w.delay,w=typeof w=="number"&&0<w?T+w:T):w=T,S){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=w+M,S={id:F++,callback:k,priorityLevel:S,startTime:w,expirationTime:M,sortIndex:-1},w>T?(S.sortIndex=w,D(g,S),_(U)===null&&S===_(g)&&(Y?(Ye(ie),ie=-1):Y=!0,ze(ce,w-T))):(S.sortIndex=M,D(U,S),H||se||(H=!0,$||($=!0,j()))),S},m.unstable_shouldYield=ue,m.unstable_wrapCallback=function(S){var k=te;return function(){var w=te;te=k;try{return S.apply(this,arguments)}finally{te=w}}}})(Ys)),Ys}var Id;function Hh(){return Id||(Id=1,Vs.exports=qh()),Vs.exports}var Gs={exports:{}},ol={};var Pd;function Bh(){if(Pd)return ol;Pd=1;var m=$s();function D(U){var g="https://react.dev/errors/"+U;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var F=2;F<arguments.length;F++)g+="&args[]="+encodeURIComponent(arguments[F])}return"Minified React error #"+U+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function _(){}var d={d:{f:_,r:function(){throw Error(D(522))},D:_,C:_,L:_,m:_,X:_,S:_,M:_},p:0,findDOMNode:null},E=Symbol.for("react.portal");function R(U,g,F){var L=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:E,key:L==null?null:""+L,children:U,containerInfo:g,implementation:F}}var q=m.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function G(U,g){if(U==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return ol.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=d,ol.createPortal=function(U,g){var F=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(D(299));return R(U,g,null,F)},ol.flushSync=function(U){var g=q.T,F=d.p;try{if(q.T=null,d.p=2,U)return U()}finally{q.T=g,d.p=F,d.d.f()}},ol.preconnect=function(U,g){typeof U=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,d.d.C(U,g))},ol.prefetchDNS=function(U){typeof U=="string"&&d.d.D(U)},ol.preinit=function(U,g){if(typeof U=="string"&&g&&typeof g.as=="string"){var F=g.as,L=G(F,g.crossOrigin),te=typeof g.integrity=="string"?g.integrity:void 0,se=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;F==="style"?d.d.S(U,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:L,integrity:te,fetchPriority:se}):F==="script"&&d.d.X(U,{crossOrigin:L,integrity:te,fetchPriority:se,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},ol.preinitModule=function(U,g){if(typeof U=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var F=G(g.as,g.crossOrigin);d.d.M(U,{crossOrigin:F,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&d.d.M(U)},ol.preload=function(U,g){if(typeof U=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var F=g.as,L=G(F,g.crossOrigin);d.d.L(U,F,{crossOrigin:L,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},ol.preloadModule=function(U,g){if(typeof U=="string")if(g){var F=G(g.as,g.crossOrigin);d.d.m(U,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:F,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else d.d.m(U)},ol.requestFormReset=function(U){d.d.r(U)},ol.unstable_batchedUpdates=function(U,g){return U(g)},ol.useFormState=function(U,g,F){return q.H.useFormState(U,g,F)},ol.useFormStatus=function(){return q.H.useHostTransitionStatus()},ol.version="19.2.4",ol}var em;function kh(){if(em)return Gs.exports;em=1;function m(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(m)}catch(D){console.error(D)}}return m(),Gs.exports=Bh(),Gs.exports}var lm;function Vh(){if(lm)return ni;lm=1;var m=Hh(),D=$s(),_=kh();function d(e){var l="https://react.dev/errors/"+e;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)l+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function E(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function R(e){var l=e,a=e;if(e.alternate)for(;l.return;)l=l.return;else{e=l;do l=e,(l.flags&4098)!==0&&(a=l.return),e=l.return;while(e)}return l.tag===3?a:null}function q(e){if(e.tag===13){var l=e.memoizedState;if(l===null&&(e=e.alternate,e!==null&&(l=e.memoizedState)),l!==null)return l.dehydrated}return null}function G(e){if(e.tag===31){var l=e.memoizedState;if(l===null&&(e=e.alternate,e!==null&&(l=e.memoizedState)),l!==null)return l.dehydrated}return null}function U(e){if(R(e)!==e)throw Error(d(188))}function g(e){var l=e.alternate;if(!l){if(l=R(e),l===null)throw Error(d(188));return l!==e?null:e}for(var a=e,t=l;;){var i=a.return;if(i===null)break;var c=i.alternate;if(c===null){if(t=i.return,t!==null){a=t;continue}break}if(i.child===c.child){for(c=i.child;c;){if(c===a)return U(i),e;if(c===t)return U(i),l;c=c.sibling}throw Error(d(188))}if(a.return!==t.return)a=i,t=c;else{for(var u=!1,s=i.child;s;){if(s===a){u=!0,a=i,t=c;break}if(s===t){u=!0,t=i,a=c;break}s=s.sibling}if(!u){for(s=c.child;s;){if(s===a){u=!0,a=c,t=i;break}if(s===t){u=!0,t=c,a=i;break}s=s.sibling}if(!u)throw Error(d(189))}}if(a.alternate!==t)throw Error(d(190))}if(a.tag!==3)throw Error(d(188));return a.stateNode.current===a?e:l}function F(e){var l=e.tag;if(l===5||l===26||l===27||l===6)return e;for(e=e.child;e!==null;){if(l=F(e),l!==null)return l;e=e.sibling}return null}var L=Object.assign,te=Symbol.for("react.element"),se=Symbol.for("react.transitional.element"),H=Symbol.for("react.portal"),Y=Symbol.for("react.fragment"),fe=Symbol.for("react.strict_mode"),be=Symbol.for("react.profiler"),Ye=Symbol.for("react.consumer"),W=Symbol.for("react.context"),I=Symbol.for("react.forward_ref"),ce=Symbol.for("react.suspense"),$=Symbol.for("react.suspense_list"),ie=Symbol.for("react.memo"),Te=Symbol.for("react.lazy"),Me=Symbol.for("react.activity"),ue=Symbol.for("react.memo_cache_sentinel"),Ee=Symbol.iterator;function j(e){return e===null||typeof e!="object"?null:(e=Ee&&e[Ee]||e["@@iterator"],typeof e=="function"?e:null)}var B=Symbol.for("react.client.reference");function ee(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===B?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Y:return"Fragment";case be:return"Profiler";case fe:return"StrictMode";case ce:return"Suspense";case $:return"SuspenseList";case Me:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case H:return"Portal";case W:return e.displayName||"Context";case Ye:return(e._context.displayName||"Context")+".Consumer";case I:var l=e.render;return e=e.displayName,e||(e=l.displayName||l.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ie:return l=e.displayName||null,l!==null?l:ee(e.type)||"Memo";case Te:l=e._payload,e=e._init;try{return ee(e(l))}catch{}}return null}var ze=Array.isArray,S=D.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k=_.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,w={pending:!1,data:null,method:null,action:null},T=[],M=-1;function f(e){return{current:e}}function z(e){0>M||(e.current=T[M],T[M]=null,M--)}function V(e,l){M++,T[M]=e.current,e.current=l}var X=f(null),le=f(null),oe=f(null),o=f(null);function p(e,l){switch(V(oe,l),V(le,e),V(X,null),l.nodeType){case 9:case 11:e=(e=l.documentElement)&&(e=e.namespaceURI)?pd(e):0;break;default:if(e=l.tagName,l=l.namespaceURI)l=pd(l),e=vd(l,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}z(X),V(X,e)}function ge(){z(X),z(le),z(oe)}function ml(e){e.memoizedState!==null&&V(o,e);var l=X.current,a=vd(l,e.type);l!==a&&(V(le,e),V(X,a))}function la(e){le.current===e&&(z(X),z(le)),o.current===e&&(z(o),Pn._currentValue=w)}var Dl,fl;function Ul(e){if(Dl===void 0)try{throw Error()}catch(a){var l=a.stack.trim().match(/\n( *(at )?)/);Dl=l&&l[1]||"",fl=-1<a.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Dl+e+fl}var Fl=!1;function za(e,l){if(!e||Fl)return"";Fl=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var t={DetermineComponentFrameRoot:function(){try{if(l){var O=function(){throw Error()};if(Object.defineProperty(O.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(O,[])}catch(N){var y=N}Reflect.construct(e,[],O)}else{try{O.call()}catch(N){y=N}e.call(O.prototype)}}else{try{throw Error()}catch(N){y=N}(O=e())&&typeof O.catch=="function"&&O.catch(function(){})}}catch(N){if(N&&y&&typeof N.stack=="string")return[N.stack,y.stack]}return[null,null]}};t.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(t.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(t.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=t.DetermineComponentFrameRoot(),u=c[0],s=c[1];if(u&&s){var r=u.split(`
4
+ `),x=s.split(`
5
+ `);for(i=t=0;t<r.length&&!r[t].includes("DetermineComponentFrameRoot");)t++;for(;i<x.length&&!x[i].includes("DetermineComponentFrameRoot");)i++;if(t===r.length||i===x.length)for(t=r.length-1,i=x.length-1;1<=t&&0<=i&&r[t]!==x[i];)i--;for(;1<=t&&0<=i;t--,i--)if(r[t]!==x[i]){if(t!==1||i!==1)do if(t--,i--,0>i||r[t]!==x[i]){var C=`
6
+ `+r[t].replace(" at new "," at ");return e.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",e.displayName)),C}while(1<=t&&0<=i);break}}}finally{Fl=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?Ul(a):""}function _t(e,l){switch(e.tag){case 26:case 27:case 5:return Ul(e.type);case 16:return Ul("Lazy");case 13:return e.child!==l&&l!==null?Ul("Suspense Fallback"):Ul("Suspense");case 19:return Ul("SuspenseList");case 0:case 15:return za(e.type,!1);case 11:return za(e.type.render,!1);case 1:return za(e.type,!0);case 31:return Ul("Activity");default:return""}}function Ca(e){try{var l="",a=null;do l+=_t(e,a),a=e,e=e.return;while(e);return l}catch(t){return`
7
+ Error generating stack: `+t.message+`
8
+ `+t.stack}}var aa=Object.prototype.hasOwnProperty,lt=m.unstable_scheduleCallback,at=m.unstable_cancelCallback,Xl=m.unstable_shouldYield,ta=m.unstable_requestPaint,el=m.unstable_now,na=m.unstable_getCurrentPriorityLevel,gl=m.unstable_ImmediatePriority,Ql=m.unstable_UserBlockingPriority,Ea=m.unstable_NormalPriority,dn=m.unstable_LowPriority,Aa=m.unstable_IdlePriority,he=m.log,mn=m.unstable_setDisableYieldValue,Jl=null,Ge=null;function _l(e){if(typeof he=="function"&&mn(e),Ge&&typeof Ge.setStrictMode=="function")try{Ge.setStrictMode(Jl,e)}catch{}}var rl=Math.clz32?Math.clz32:_c,jc=Math.log,Nc=Math.LN2;function _c(e){return e>>>=0,e===0?32:31-(jc(e)/Nc|0)|0}var tt=256,St=262144,Tt=4194304;function ia(e){var l=e&42;if(l!==0)return l;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 zt(e,l,a){var t=e.pendingLanes;if(t===0)return 0;var i=0,c=e.suspendedLanes,u=e.pingedLanes;e=e.warmLanes;var s=t&134217727;return s!==0?(t=s&~c,t!==0?i=ia(t):(u&=s,u!==0?i=ia(u):a||(a=s&~e,a!==0&&(i=ia(a))))):(s=t&~c,s!==0?i=ia(s):u!==0?i=ia(u):a||(a=t&~e,a!==0&&(i=ia(a)))),i===0?0:l!==0&&l!==i&&(l&c)===0&&(c=i&-i,a=l&-l,c>=a||c===32&&(a&4194048)!==0)?l:i}function nt(e,l){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&l)===0}function Sc(e,l){switch(e){case 1:case 2:case 4:case 8:case 64:return l+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 l+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 Q(){var e=Tt;return Tt<<=1,(Tt&62914560)===0&&(Tt=4194304),e}function ae(e){for(var l=[],a=0;31>a;a++)l.push(e);return l}function Ne(e,l){e.pendingLanes|=l,l!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function qe(e,l,a,t,i,c){var u=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var s=e.entanglements,r=e.expirationTimes,x=e.hiddenUpdates;for(a=u&~a;0<a;){var C=31-rl(a),O=1<<C;s[C]=0,r[C]=-1;var y=x[C];if(y!==null)for(x[C]=null,C=0;C<y.length;C++){var N=y[C];N!==null&&(N.lane&=-536870913)}a&=~O}t!==0&&sl(e,t,0),c!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=c&~(u&~l))}function sl(e,l,a){e.pendingLanes|=l,e.suspendedLanes&=~l;var t=31-rl(l);e.entangledLanes|=l,e.entanglements[t]=e.entanglements[t]|1073741824|a&261930}function it(e,l){var a=e.entangledLanes|=l;for(e=e.entanglements;a;){var t=31-rl(a),i=1<<t;i&l|e[t]&l&&(e[t]|=l),a&=~i}}function Is(e,l){var a=l&-l;return a=(a&42)!==0?1:Tc(a),(a&(e.suspendedLanes|l))!==0?0:a}function Tc(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 zc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ps(){var e=k.p;return e!==0?e:(e=window.event,e===void 0?32:Yd(e.type))}function eo(e,l){var a=k.p;try{return k.p=e,l()}finally{k.p=a}}var Oa=Math.random().toString(36).slice(2),ll="__reactFiber$"+Oa,hl="__reactProps$"+Oa,Ct="__reactContainer$"+Oa,Cc="__reactEvents$"+Oa,jm="__reactListeners$"+Oa,Nm="__reactHandles$"+Oa,lo="__reactResources$"+Oa,gn="__reactMarker$"+Oa;function Ec(e){delete e[ll],delete e[hl],delete e[Cc],delete e[jm],delete e[Nm]}function Et(e){var l=e[ll];if(l)return l;for(var a=e.parentNode;a;){if(l=a[Ct]||a[ll]){if(a=l.alternate,l.child!==null||a!==null&&a.child!==null)for(e=Sd(e);e!==null;){if(a=e[ll])return a;e=Sd(e)}return l}e=a,a=e.parentNode}return null}function At(e){if(e=e[ll]||e[Ct]){var l=e.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return e}return null}function hn(e){var l=e.tag;if(l===5||l===26||l===27||l===6)return e.stateNode;throw Error(d(33))}function Ot(e){var l=e[lo];return l||(l=e[lo]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function Ie(e){e[gn]=!0}var ao=new Set,to={};function ct(e,l){Dt(e,l),Dt(e+"Capture",l)}function Dt(e,l){for(to[e]=l,e=0;e<l.length;e++)ao.add(l[e])}var _m=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]*$"),no={},io={};function Sm(e){return aa.call(io,e)?!0:aa.call(no,e)?!1:_m.test(e)?io[e]=!0:(no[e]=!0,!1)}function ci(e,l,a){if(Sm(l))if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(l);return;case"boolean":var t=l.toLowerCase().slice(0,5);if(t!=="data-"&&t!=="aria-"){e.removeAttribute(l);return}}e.setAttribute(l,""+a)}}function ui(e,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttribute(l,""+a)}}function ca(e,l,a,t){if(t===null)e.removeAttribute(a);else{switch(typeof t){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(l,a,""+t)}}function Rl(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function co(e){var l=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function Tm(e,l,a){var t=Object.getOwnPropertyDescriptor(e.constructor.prototype,l);if(!e.hasOwnProperty(l)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var i=t.get,c=t.set;return Object.defineProperty(e,l,{configurable:!0,get:function(){return i.call(this)},set:function(u){a=""+u,c.call(this,u)}}),Object.defineProperty(e,l,{enumerable:t.enumerable}),{getValue:function(){return a},setValue:function(u){a=""+u},stopTracking:function(){e._valueTracker=null,delete e[l]}}}}function Ac(e){if(!e._valueTracker){var l=co(e)?"checked":"value";e._valueTracker=Tm(e,l,""+e[l])}}function uo(e){if(!e)return!1;var l=e._valueTracker;if(!l)return!0;var a=l.getValue(),t="";return e&&(t=co(e)?e.checked?"true":"false":e.value),e=t,e!==a?(l.setValue(e),!0):!1}function si(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 zm=/[\n"\\]/g;function Ml(e){return e.replace(zm,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function Oc(e,l,a,t,i,c,u,s){e.name="",u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?e.type=u:e.removeAttribute("type"),l!=null?u==="number"?(l===0&&e.value===""||e.value!=l)&&(e.value=""+Rl(l)):e.value!==""+Rl(l)&&(e.value=""+Rl(l)):u!=="submit"&&u!=="reset"||e.removeAttribute("value"),l!=null?Dc(e,u,Rl(l)):a!=null?Dc(e,u,Rl(a)):t!=null&&e.removeAttribute("value"),i==null&&c!=null&&(e.defaultChecked=!!c),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.name=""+Rl(s):e.removeAttribute("name")}function so(e,l,a,t,i,c,u,s){if(c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.type=c),l!=null||a!=null){if(!(c!=="submit"&&c!=="reset"||l!=null)){Ac(e);return}a=a!=null?""+Rl(a):"",l=l!=null?""+Rl(l):a,s||l===e.value||(e.value=l),e.defaultValue=l}t=t??i,t=typeof t!="function"&&typeof t!="symbol"&&!!t,e.checked=s?e.checked:!!t,e.defaultChecked=!!t,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.name=u),Ac(e)}function Dc(e,l,a){l==="number"&&si(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Ut(e,l,a,t){if(e=e.options,l){l={};for(var i=0;i<a.length;i++)l["$"+a[i]]=!0;for(a=0;a<e.length;a++)i=l.hasOwnProperty("$"+e[a].value),e[a].selected!==i&&(e[a].selected=i),i&&t&&(e[a].defaultSelected=!0)}else{for(a=""+Rl(a),l=null,i=0;i<e.length;i++){if(e[i].value===a){e[i].selected=!0,t&&(e[i].defaultSelected=!0);return}l!==null||e[i].disabled||(l=e[i])}l!==null&&(l.selected=!0)}}function oo(e,l,a){if(l!=null&&(l=""+Rl(l),l!==e.value&&(e.value=l),a==null)){e.defaultValue!==l&&(e.defaultValue=l);return}e.defaultValue=a!=null?""+Rl(a):""}function fo(e,l,a,t){if(l==null){if(t!=null){if(a!=null)throw Error(d(92));if(ze(t)){if(1<t.length)throw Error(d(93));t=t[0]}a=t}a==null&&(a=""),l=a}a=Rl(l),e.defaultValue=a,t=e.textContent,t===a&&t!==""&&t!==null&&(e.value=t),Ac(e)}function Rt(e,l){if(l){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=l;return}}e.textContent=l}var Cm=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 ro(e,l,a){var t=l.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?t?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="":t?e.setProperty(l,a):typeof a!="number"||a===0||Cm.has(l)?l==="float"?e.cssFloat=a:e[l]=(""+a).trim():e[l]=a+"px"}function mo(e,l,a){if(l!=null&&typeof l!="object")throw Error(d(62));if(e=e.style,a!=null){for(var t in a)!a.hasOwnProperty(t)||l!=null&&l.hasOwnProperty(t)||(t.indexOf("--")===0?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="");for(var i in l)t=l[i],l.hasOwnProperty(i)&&a[i]!==t&&ro(e,i,t)}else for(var c in l)l.hasOwnProperty(c)&&ro(e,c,l[c])}function Uc(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 Em=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"]]),Am=/^[\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 oi(e){return Am.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ua(){}var Rc=null;function Mc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Mt=null,qt=null;function go(e){var l=At(e);if(l&&(e=l.stateNode)){var a=e[hl]||null;e:switch(e=l.stateNode,l.type){case"input":if(Oc(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),l=a.name,a.type==="radio"&&l!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+Ml(""+l)+'"][type="radio"]'),l=0;l<a.length;l++){var t=a[l];if(t!==e&&t.form===e.form){var i=t[hl]||null;if(!i)throw Error(d(90));Oc(t,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(l=0;l<a.length;l++)t=a[l],t.form===e.form&&uo(t)}break e;case"textarea":oo(e,a.value,a.defaultValue);break e;case"select":l=a.value,l!=null&&Ut(e,!!a.multiple,l,!1)}}}var qc=!1;function ho(e,l,a){if(qc)return e(l,a);qc=!0;try{var t=e(l);return t}finally{if(qc=!1,(Mt!==null||qt!==null)&&($i(),Mt&&(l=Mt,e=qt,qt=Mt=null,go(l),e)))for(l=0;l<e.length;l++)go(e[l])}}function pn(e,l){var a=e.stateNode;if(a===null)return null;var t=a[hl]||null;if(t===null)return null;a=t[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(t=!t.disabled)||(e=e.type,t=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!t;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(d(231,l,typeof a));return a}var sa=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Hc=!1;if(sa)try{var vn={};Object.defineProperty(vn,"passive",{get:function(){Hc=!0}}),window.addEventListener("test",vn,vn),window.removeEventListener("test",vn,vn)}catch{Hc=!1}var Da=null,Bc=null,fi=null;function po(){if(fi)return fi;var e,l=Bc,a=l.length,t,i="value"in Da?Da.value:Da.textContent,c=i.length;for(e=0;e<a&&l[e]===i[e];e++);var u=a-e;for(t=1;t<=u&&l[a-t]===i[c-t];t++);return fi=i.slice(e,1<t?1-t:void 0)}function ri(e){var l=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&l===13&&(e=13)):e=l,e===10&&(e=13),32<=e||e===13?e:0}function di(){return!0}function vo(){return!1}function pl(e){function l(a,t,i,c,u){this._reactName=a,this._targetInst=i,this.type=t,this.nativeEvent=c,this.target=u,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(a=e[s],this[s]=a?a(c):c[s]);return this.isDefaultPrevented=(c.defaultPrevented!=null?c.defaultPrevented:c.returnValue===!1)?di:vo,this.isPropagationStopped=vo,this}return L(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=di)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=di)},persist:function(){},isPersistent:di}),l}var ut={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mi=pl(ut),bn=L({},ut,{view:0,detail:0}),Om=pl(bn),kc,Vc,xn,gi=L({},bn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Gc,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!==xn&&(xn&&e.type==="mousemove"?(kc=e.screenX-xn.screenX,Vc=e.screenY-xn.screenY):Vc=kc=0,xn=e),kc)},movementY:function(e){return"movementY"in e?e.movementY:Vc}}),bo=pl(gi),Dm=L({},gi,{dataTransfer:0}),Um=pl(Dm),Rm=L({},bn,{relatedTarget:0}),Yc=pl(Rm),Mm=L({},ut,{animationName:0,elapsedTime:0,pseudoElement:0}),qm=pl(Mm),Hm=L({},ut,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Bm=pl(Hm),km=L({},ut,{data:0}),xo=pl(km),Vm={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ym={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"},Gm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Lm(e){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(e):(e=Gm[e])?!!l[e]:!1}function Gc(){return Lm}var Xm=L({},bn,{key:function(e){if(e.key){var l=Vm[e.key]||e.key;if(l!=="Unidentified")return l}return e.type==="keypress"?(e=ri(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ym[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Gc,charCode:function(e){return e.type==="keypress"?ri(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ri(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Qm=pl(Xm),Km=L({},gi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yo=pl(Km),Zm=L({},bn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Gc}),wm=pl(Zm),Fm=L({},ut,{propertyName:0,elapsedTime:0,pseudoElement:0}),Jm=pl(Fm),$m=L({},gi,{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}),Wm=pl($m),Im=L({},ut,{newState:0,oldState:0}),Pm=pl(Im),eg=[9,13,27,32],Lc=sa&&"CompositionEvent"in window,yn=null;sa&&"documentMode"in document&&(yn=document.documentMode);var lg=sa&&"TextEvent"in window&&!yn,jo=sa&&(!Lc||yn&&8<yn&&11>=yn),No=" ",_o=!1;function So(e,l){switch(e){case"keyup":return eg.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function To(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ht=!1;function ag(e,l){switch(e){case"compositionend":return To(l);case"keypress":return l.which!==32?null:(_o=!0,No);case"textInput":return e=l.data,e===No&&_o?null:e;default:return null}}function tg(e,l){if(Ht)return e==="compositionend"||!Lc&&So(e,l)?(e=po(),fi=Bc=Da=null,Ht=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return jo&&l.locale!=="ko"?null:l.data;default:return null}}var ng={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 zo(e){var l=e&&e.nodeName&&e.nodeName.toLowerCase();return l==="input"?!!ng[e.type]:l==="textarea"}function Co(e,l,a,t){Mt?qt?qt.push(t):qt=[t]:Mt=t,l=tc(l,"onChange"),0<l.length&&(a=new mi("onChange","change",null,a,t),e.push({event:a,listeners:l}))}var jn=null,Nn=null;function ig(e){fd(e,0)}function hi(e){var l=hn(e);if(uo(l))return e}function Eo(e,l){if(e==="change")return l}var Ao=!1;if(sa){var Xc;if(sa){var Qc="oninput"in document;if(!Qc){var Oo=document.createElement("div");Oo.setAttribute("oninput","return;"),Qc=typeof Oo.oninput=="function"}Xc=Qc}else Xc=!1;Ao=Xc&&(!document.documentMode||9<document.documentMode)}function Do(){jn&&(jn.detachEvent("onpropertychange",Uo),Nn=jn=null)}function Uo(e){if(e.propertyName==="value"&&hi(Nn)){var l=[];Co(l,Nn,e,Mc(e)),ho(ig,l)}}function cg(e,l,a){e==="focusin"?(Do(),jn=l,Nn=a,jn.attachEvent("onpropertychange",Uo)):e==="focusout"&&Do()}function ug(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return hi(Nn)}function sg(e,l){if(e==="click")return hi(l)}function og(e,l){if(e==="input"||e==="change")return hi(l)}function fg(e,l){return e===l&&(e!==0||1/e===1/l)||e!==e&&l!==l}var Sl=typeof Object.is=="function"?Object.is:fg;function _n(e,l){if(Sl(e,l))return!0;if(typeof e!="object"||e===null||typeof l!="object"||l===null)return!1;var a=Object.keys(e),t=Object.keys(l);if(a.length!==t.length)return!1;for(t=0;t<a.length;t++){var i=a[t];if(!aa.call(l,i)||!Sl(e[i],l[i]))return!1}return!0}function Ro(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Mo(e,l){var a=Ro(e);e=0;for(var t;a;){if(a.nodeType===3){if(t=e+a.textContent.length,e<=l&&t>=l)return{node:a,offset:l-e};e=t}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Ro(a)}}function qo(e,l){return e&&l?e===l?!0:e&&e.nodeType===3?!1:l&&l.nodeType===3?qo(e,l.parentNode):"contains"in e?e.contains(l):e.compareDocumentPosition?!!(e.compareDocumentPosition(l)&16):!1:!1}function Ho(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var l=si(e.document);l instanceof e.HTMLIFrameElement;){try{var a=typeof l.contentWindow.location.href=="string"}catch{a=!1}if(a)e=l.contentWindow;else break;l=si(e.document)}return l}function Kc(e){var l=e&&e.nodeName&&e.nodeName.toLowerCase();return l&&(l==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||l==="textarea"||e.contentEditable==="true")}var rg=sa&&"documentMode"in document&&11>=document.documentMode,Bt=null,Zc=null,Sn=null,wc=!1;function Bo(e,l,a){var t=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;wc||Bt==null||Bt!==si(t)||(t=Bt,"selectionStart"in t&&Kc(t)?t={start:t.selectionStart,end:t.selectionEnd}:(t=(t.ownerDocument&&t.ownerDocument.defaultView||window).getSelection(),t={anchorNode:t.anchorNode,anchorOffset:t.anchorOffset,focusNode:t.focusNode,focusOffset:t.focusOffset}),Sn&&_n(Sn,t)||(Sn=t,t=tc(Zc,"onSelect"),0<t.length&&(l=new mi("onSelect","select",null,l,a),e.push({event:l,listeners:t}),l.target=Bt)))}function st(e,l){var a={};return a[e.toLowerCase()]=l.toLowerCase(),a["Webkit"+e]="webkit"+l,a["Moz"+e]="moz"+l,a}var kt={animationend:st("Animation","AnimationEnd"),animationiteration:st("Animation","AnimationIteration"),animationstart:st("Animation","AnimationStart"),transitionrun:st("Transition","TransitionRun"),transitionstart:st("Transition","TransitionStart"),transitioncancel:st("Transition","TransitionCancel"),transitionend:st("Transition","TransitionEnd")},Fc={},ko={};sa&&(ko=document.createElement("div").style,"AnimationEvent"in window||(delete kt.animationend.animation,delete kt.animationiteration.animation,delete kt.animationstart.animation),"TransitionEvent"in window||delete kt.transitionend.transition);function ot(e){if(Fc[e])return Fc[e];if(!kt[e])return e;var l=kt[e],a;for(a in l)if(l.hasOwnProperty(a)&&a in ko)return Fc[e]=l[a];return e}var Vo=ot("animationend"),Yo=ot("animationiteration"),Go=ot("animationstart"),dg=ot("transitionrun"),mg=ot("transitionstart"),gg=ot("transitioncancel"),Lo=ot("transitionend"),Xo=new Map,Jc="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(" ");Jc.push("scrollEnd");function Kl(e,l){Xo.set(e,l),ct(l,[e])}var pi=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=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(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},ql=[],Vt=0,$c=0;function vi(){for(var e=Vt,l=$c=Vt=0;l<e;){var a=ql[l];ql[l++]=null;var t=ql[l];ql[l++]=null;var i=ql[l];ql[l++]=null;var c=ql[l];if(ql[l++]=null,t!==null&&i!==null){var u=t.pending;u===null?i.next=i:(i.next=u.next,u.next=i),t.pending=i}c!==0&&Qo(a,i,c)}}function bi(e,l,a,t){ql[Vt++]=e,ql[Vt++]=l,ql[Vt++]=a,ql[Vt++]=t,$c|=t,e.lanes|=t,e=e.alternate,e!==null&&(e.lanes|=t)}function Wc(e,l,a,t){return bi(e,l,a,t),xi(e)}function ft(e,l){return bi(e,null,null,l),xi(e)}function Qo(e,l,a){e.lanes|=a;var t=e.alternate;t!==null&&(t.lanes|=a);for(var i=!1,c=e.return;c!==null;)c.childLanes|=a,t=c.alternate,t!==null&&(t.childLanes|=a),c.tag===22&&(e=c.stateNode,e===null||e._visibility&1||(i=!0)),e=c,c=c.return;return e.tag===3?(c=e.stateNode,i&&l!==null&&(i=31-rl(a),e=c.hiddenUpdates,t=e[i],t===null?e[i]=[l]:t.push(l),l.lane=a|536870912),c):null}function xi(e){if(50<Zn)throw Zn=0,cs=null,Error(d(185));for(var l=e.return;l!==null;)e=l,l=e.return;return e.tag===3?e.stateNode:null}var Yt={};function hg(e,l,a,t){this.tag=e,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=t,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tl(e,l,a,t){return new hg(e,l,a,t)}function Ic(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oa(e,l){var a=e.alternate;return a===null?(a=Tl(e.tag,l,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=l,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,l=e.dependencies,a.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function Ko(e,l){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=l,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,l=a.dependencies,e.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),e}function yi(e,l,a,t,i,c){var u=0;if(t=e,typeof e=="function")Ic(e)&&(u=1);else if(typeof e=="string")u=yh(e,a,X.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Me:return e=Tl(31,a,l,i),e.elementType=Me,e.lanes=c,e;case Y:return rt(a.children,i,c,l);case fe:u=8,i|=24;break;case be:return e=Tl(12,a,l,i|2),e.elementType=be,e.lanes=c,e;case ce:return e=Tl(13,a,l,i),e.elementType=ce,e.lanes=c,e;case $:return e=Tl(19,a,l,i),e.elementType=$,e.lanes=c,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W:u=10;break e;case Ye:u=9;break e;case I:u=11;break e;case ie:u=14;break e;case Te:u=16,t=null;break e}u=29,a=Error(d(130,e===null?"null":typeof e,"")),t=null}return l=Tl(u,a,l,i),l.elementType=e,l.type=t,l.lanes=c,l}function rt(e,l,a,t){return e=Tl(7,e,t,l),e.lanes=a,e}function Pc(e,l,a){return e=Tl(6,e,null,l),e.lanes=a,e}function Zo(e){var l=Tl(18,null,null,0);return l.stateNode=e,l}function eu(e,l,a){return l=Tl(4,e.children!==null?e.children:[],e.key,l),l.lanes=a,l.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},l}var wo=new WeakMap;function Hl(e,l){if(typeof e=="object"&&e!==null){var a=wo.get(e);return a!==void 0?a:(l={value:e,source:l,stack:Ca(l)},wo.set(e,l),l)}return{value:e,source:l,stack:Ca(l)}}var Gt=[],Lt=0,ji=null,Tn=0,Bl=[],kl=0,Ua=null,$l=1,Wl="";function fa(e,l){Gt[Lt++]=Tn,Gt[Lt++]=ji,ji=e,Tn=l}function Fo(e,l,a){Bl[kl++]=$l,Bl[kl++]=Wl,Bl[kl++]=Ua,Ua=e;var t=$l;e=Wl;var i=32-rl(t)-1;t&=~(1<<i),a+=1;var c=32-rl(l)+i;if(30<c){var u=i-i%5;c=(t&(1<<u)-1).toString(32),t>>=u,i-=u,$l=1<<32-rl(l)+i|a<<i|t,Wl=c+e}else $l=1<<c|a<<i|t,Wl=e}function lu(e){e.return!==null&&(fa(e,1),Fo(e,1,0))}function au(e){for(;e===ji;)ji=Gt[--Lt],Gt[Lt]=null,Tn=Gt[--Lt],Gt[Lt]=null;for(;e===Ua;)Ua=Bl[--kl],Bl[kl]=null,Wl=Bl[--kl],Bl[kl]=null,$l=Bl[--kl],Bl[kl]=null}function Jo(e,l){Bl[kl++]=$l,Bl[kl++]=Wl,Bl[kl++]=Ua,$l=l.id,Wl=l.overflow,Ua=e}var al=null,Be=null,je=!1,Ra=null,Vl=!1,tu=Error(d(519));function Ma(e){var l=Error(d(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw zn(Hl(l,e)),tu}function $o(e){var l=e.stateNode,a=e.type,t=e.memoizedProps;switch(l[ll]=e,l[hl]=t,a){case"dialog":ve("cancel",l),ve("close",l);break;case"iframe":case"object":case"embed":ve("load",l);break;case"video":case"audio":for(a=0;a<Fn.length;a++)ve(Fn[a],l);break;case"source":ve("error",l);break;case"img":case"image":case"link":ve("error",l),ve("load",l);break;case"details":ve("toggle",l);break;case"input":ve("invalid",l),so(l,t.value,t.defaultValue,t.checked,t.defaultChecked,t.type,t.name,!0);break;case"select":ve("invalid",l);break;case"textarea":ve("invalid",l),fo(l,t.value,t.defaultValue,t.children)}a=t.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||l.textContent===""+a||t.suppressHydrationWarning===!0||gd(l.textContent,a)?(t.popover!=null&&(ve("beforetoggle",l),ve("toggle",l)),t.onScroll!=null&&ve("scroll",l),t.onScrollEnd!=null&&ve("scrollend",l),t.onClick!=null&&(l.onclick=ua),l=!0):l=!1,l||Ma(e,!0)}function Wo(e){for(al=e.return;al;)switch(al.tag){case 5:case 31:case 13:Vl=!1;return;case 27:case 3:Vl=!0;return;default:al=al.return}}function Xt(e){if(e!==al)return!1;if(!je)return Wo(e),je=!0,!1;var l=e.tag,a;if((a=l!==3&&l!==27)&&((a=l===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||js(e.type,e.memoizedProps)),a=!a),a&&Be&&Ma(e),Wo(e),l===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));Be=_d(e)}else if(l===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(317));Be=_d(e)}else l===27?(l=Be,Fa(e.type)?(e=zs,zs=null,Be=e):Be=l):Be=al?Gl(e.stateNode.nextSibling):null;return!0}function dt(){Be=al=null,je=!1}function nu(){var e=Ra;return e!==null&&(yl===null?yl=e:yl.push.apply(yl,e),Ra=null),e}function zn(e){Ra===null?Ra=[e]:Ra.push(e)}var iu=f(null),mt=null,ra=null;function qa(e,l,a){V(iu,l._currentValue),l._currentValue=a}function da(e){e._currentValue=iu.current,z(iu)}function cu(e,l,a){for(;e!==null;){var t=e.alternate;if((e.childLanes&l)!==l?(e.childLanes|=l,t!==null&&(t.childLanes|=l)):t!==null&&(t.childLanes&l)!==l&&(t.childLanes|=l),e===a)break;e=e.return}}function uu(e,l,a,t){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var c=i.dependencies;if(c!==null){var u=i.child;c=c.firstContext;e:for(;c!==null;){var s=c;c=i;for(var r=0;r<l.length;r++)if(s.context===l[r]){c.lanes|=a,s=c.alternate,s!==null&&(s.lanes|=a),cu(c.return,a,e),t||(u=null);break e}c=s.next}}else if(i.tag===18){if(u=i.return,u===null)throw Error(d(341));u.lanes|=a,c=u.alternate,c!==null&&(c.lanes|=a),cu(u,a,e),u=null}else u=i.child;if(u!==null)u.return=i;else for(u=i;u!==null;){if(u===e){u=null;break}if(i=u.sibling,i!==null){i.return=u.return,u=i;break}u=u.return}i=u}}function Qt(e,l,a,t){e=null;for(var i=l,c=!1;i!==null;){if(!c){if((i.flags&524288)!==0)c=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var u=i.alternate;if(u===null)throw Error(d(387));if(u=u.memoizedProps,u!==null){var s=i.type;Sl(i.pendingProps.value,u.value)||(e!==null?e.push(s):e=[s])}}else if(i===o.current){if(u=i.alternate,u===null)throw Error(d(387));u.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Pn):e=[Pn])}i=i.return}e!==null&&uu(l,e,a,t),l.flags|=262144}function Ni(e){for(e=e.firstContext;e!==null;){if(!Sl(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function gt(e){mt=e,ra=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function tl(e){return Io(mt,e)}function _i(e,l){return mt===null&&gt(e),Io(e,l)}function Io(e,l){var a=l._currentValue;if(l={context:l,memoizedValue:a,next:null},ra===null){if(e===null)throw Error(d(308));ra=l,e.dependencies={lanes:0,firstContext:l},e.flags|=524288}else ra=ra.next=l;return a}var pg=typeof AbortController<"u"?AbortController:function(){var e=[],l=this.signal={aborted:!1,addEventListener:function(a,t){e.push(t)}};this.abort=function(){l.aborted=!0,e.forEach(function(a){return a()})}},vg=m.unstable_scheduleCallback,bg=m.unstable_NormalPriority,we={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function su(){return{controller:new pg,data:new Map,refCount:0}}function Cn(e){e.refCount--,e.refCount===0&&vg(bg,function(){e.controller.abort()})}var En=null,ou=0,Kt=0,Zt=null;function xg(e,l){if(En===null){var a=En=[];ou=0,Kt=ds(),Zt={status:"pending",value:void 0,then:function(t){a.push(t)}}}return ou++,l.then(Po,Po),l}function Po(){if(--ou===0&&En!==null){Zt!==null&&(Zt.status="fulfilled");var e=En;En=null,Kt=0,Zt=null;for(var l=0;l<e.length;l++)(0,e[l])()}}function yg(e,l){var a=[],t={status:"pending",value:null,reason:null,then:function(i){a.push(i)}};return e.then(function(){t.status="fulfilled",t.value=l;for(var i=0;i<a.length;i++)(0,a[i])(l)},function(i){for(t.status="rejected",t.reason=i,i=0;i<a.length;i++)(0,a[i])(void 0)}),t}var ef=S.S;S.S=function(e,l){kr=el(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&xg(e,l),ef!==null&&ef(e,l)};var ht=f(null);function fu(){var e=ht.current;return e!==null?e:He.pooledCache}function Si(e,l){l===null?V(ht,ht.current):V(ht,l.pool)}function lf(){var e=fu();return e===null?null:{parent:we._currentValue,pool:e}}var wt=Error(d(460)),ru=Error(d(474)),Ti=Error(d(542)),zi={then:function(){}};function af(e){return e=e.status,e==="fulfilled"||e==="rejected"}function tf(e,l,a){switch(a=e[a],a===void 0?e.push(l):a!==l&&(l.then(ua,ua),l=a),l.status){case"fulfilled":return l.value;case"rejected":throw e=l.reason,cf(e),e;default:if(typeof l.status=="string")l.then(ua,ua);else{if(e=He,e!==null&&100<e.shellSuspendCounter)throw Error(d(482));e=l,e.status="pending",e.then(function(t){if(l.status==="pending"){var i=l;i.status="fulfilled",i.value=t}},function(t){if(l.status==="pending"){var i=l;i.status="rejected",i.reason=t}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw e=l.reason,cf(e),e}throw vt=l,wt}}function pt(e){try{var l=e._init;return l(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(vt=a,wt):a}}var vt=null;function nf(){if(vt===null)throw Error(d(459));var e=vt;return vt=null,e}function cf(e){if(e===wt||e===Ti)throw Error(d(483))}var Ft=null,An=0;function Ci(e){var l=An;return An+=1,Ft===null&&(Ft=[]),tf(Ft,e,l)}function On(e,l){l=l.props.ref,e.ref=l!==void 0?l:null}function Ei(e,l){throw l.$$typeof===te?Error(d(525)):(e=Object.prototype.toString.call(l),Error(d(31,e==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":e)))}function uf(e){function l(v,h){if(e){var b=v.deletions;b===null?(v.deletions=[h],v.flags|=16):b.push(h)}}function a(v,h){if(!e)return null;for(;h!==null;)l(v,h),h=h.sibling;return null}function t(v){for(var h=new Map;v!==null;)v.key!==null?h.set(v.key,v):h.set(v.index,v),v=v.sibling;return h}function i(v,h){return v=oa(v,h),v.index=0,v.sibling=null,v}function c(v,h,b){return v.index=b,e?(b=v.alternate,b!==null?(b=b.index,b<h?(v.flags|=67108866,h):b):(v.flags|=67108866,h)):(v.flags|=1048576,h)}function u(v){return e&&v.alternate===null&&(v.flags|=67108866),v}function s(v,h,b,A){return h===null||h.tag!==6?(h=Pc(b,v.mode,A),h.return=v,h):(h=i(h,b),h.return=v,h)}function r(v,h,b,A){var P=b.type;return P===Y?C(v,h,b.props.children,A,b.key):h!==null&&(h.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Te&&pt(P)===h.type)?(h=i(h,b.props),On(h,b),h.return=v,h):(h=yi(b.type,b.key,b.props,null,v.mode,A),On(h,b),h.return=v,h)}function x(v,h,b,A){return h===null||h.tag!==4||h.stateNode.containerInfo!==b.containerInfo||h.stateNode.implementation!==b.implementation?(h=eu(b,v.mode,A),h.return=v,h):(h=i(h,b.children||[]),h.return=v,h)}function C(v,h,b,A,P){return h===null||h.tag!==7?(h=rt(b,v.mode,A,P),h.return=v,h):(h=i(h,b),h.return=v,h)}function O(v,h,b){if(typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint")return h=Pc(""+h,v.mode,b),h.return=v,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case se:return b=yi(h.type,h.key,h.props,null,v.mode,b),On(b,h),b.return=v,b;case H:return h=eu(h,v.mode,b),h.return=v,h;case Te:return h=pt(h),O(v,h,b)}if(ze(h)||j(h))return h=rt(h,v.mode,b,null),h.return=v,h;if(typeof h.then=="function")return O(v,Ci(h),b);if(h.$$typeof===W)return O(v,_i(v,h),b);Ei(v,h)}return null}function y(v,h,b,A){var P=h!==null?h.key:null;if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return P!==null?null:s(v,h,""+b,A);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case se:return b.key===P?r(v,h,b,A):null;case H:return b.key===P?x(v,h,b,A):null;case Te:return b=pt(b),y(v,h,b,A)}if(ze(b)||j(b))return P!==null?null:C(v,h,b,A,null);if(typeof b.then=="function")return y(v,h,Ci(b),A);if(b.$$typeof===W)return y(v,h,_i(v,b),A);Ei(v,b)}return null}function N(v,h,b,A,P){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return v=v.get(b)||null,s(h,v,""+A,P);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case se:return v=v.get(A.key===null?b:A.key)||null,r(h,v,A,P);case H:return v=v.get(A.key===null?b:A.key)||null,x(h,v,A,P);case Te:return A=pt(A),N(v,h,b,A,P)}if(ze(A)||j(A))return v=v.get(b)||null,C(h,v,A,P,null);if(typeof A.then=="function")return N(v,h,b,Ci(A),P);if(A.$$typeof===W)return N(v,h,b,_i(h,A),P);Ei(h,A)}return null}function Z(v,h,b,A){for(var P=null,_e=null,J=h,me=h=0,ye=null;J!==null&&me<b.length;me++){J.index>me?(ye=J,J=null):ye=J.sibling;var Se=y(v,J,b[me],A);if(Se===null){J===null&&(J=ye);break}e&&J&&Se.alternate===null&&l(v,J),h=c(Se,h,me),_e===null?P=Se:_e.sibling=Se,_e=Se,J=ye}if(me===b.length)return a(v,J),je&&fa(v,me),P;if(J===null){for(;me<b.length;me++)J=O(v,b[me],A),J!==null&&(h=c(J,h,me),_e===null?P=J:_e.sibling=J,_e=J);return je&&fa(v,me),P}for(J=t(J);me<b.length;me++)ye=N(J,v,me,b[me],A),ye!==null&&(e&&ye.alternate!==null&&J.delete(ye.key===null?me:ye.key),h=c(ye,h,me),_e===null?P=ye:_e.sibling=ye,_e=ye);return e&&J.forEach(function(Pa){return l(v,Pa)}),je&&fa(v,me),P}function ne(v,h,b,A){if(b==null)throw Error(d(151));for(var P=null,_e=null,J=h,me=h=0,ye=null,Se=b.next();J!==null&&!Se.done;me++,Se=b.next()){J.index>me?(ye=J,J=null):ye=J.sibling;var Pa=y(v,J,Se.value,A);if(Pa===null){J===null&&(J=ye);break}e&&J&&Pa.alternate===null&&l(v,J),h=c(Pa,h,me),_e===null?P=Pa:_e.sibling=Pa,_e=Pa,J=ye}if(Se.done)return a(v,J),je&&fa(v,me),P;if(J===null){for(;!Se.done;me++,Se=b.next())Se=O(v,Se.value,A),Se!==null&&(h=c(Se,h,me),_e===null?P=Se:_e.sibling=Se,_e=Se);return je&&fa(v,me),P}for(J=t(J);!Se.done;me++,Se=b.next())Se=N(J,v,me,Se.value,A),Se!==null&&(e&&Se.alternate!==null&&J.delete(Se.key===null?me:Se.key),h=c(Se,h,me),_e===null?P=Se:_e.sibling=Se,_e=Se);return e&&J.forEach(function(Dh){return l(v,Dh)}),je&&fa(v,me),P}function Re(v,h,b,A){if(typeof b=="object"&&b!==null&&b.type===Y&&b.key===null&&(b=b.props.children),typeof b=="object"&&b!==null){switch(b.$$typeof){case se:e:{for(var P=b.key;h!==null;){if(h.key===P){if(P=b.type,P===Y){if(h.tag===7){a(v,h.sibling),A=i(h,b.props.children),A.return=v,v=A;break e}}else if(h.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===Te&&pt(P)===h.type){a(v,h.sibling),A=i(h,b.props),On(A,b),A.return=v,v=A;break e}a(v,h);break}else l(v,h);h=h.sibling}b.type===Y?(A=rt(b.props.children,v.mode,A,b.key),A.return=v,v=A):(A=yi(b.type,b.key,b.props,null,v.mode,A),On(A,b),A.return=v,v=A)}return u(v);case H:e:{for(P=b.key;h!==null;){if(h.key===P)if(h.tag===4&&h.stateNode.containerInfo===b.containerInfo&&h.stateNode.implementation===b.implementation){a(v,h.sibling),A=i(h,b.children||[]),A.return=v,v=A;break e}else{a(v,h);break}else l(v,h);h=h.sibling}A=eu(b,v.mode,A),A.return=v,v=A}return u(v);case Te:return b=pt(b),Re(v,h,b,A)}if(ze(b))return Z(v,h,b,A);if(j(b)){if(P=j(b),typeof P!="function")throw Error(d(150));return b=P.call(b),ne(v,h,b,A)}if(typeof b.then=="function")return Re(v,h,Ci(b),A);if(b.$$typeof===W)return Re(v,h,_i(v,b),A);Ei(v,b)}return typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint"?(b=""+b,h!==null&&h.tag===6?(a(v,h.sibling),A=i(h,b),A.return=v,v=A):(a(v,h),A=Pc(b,v.mode,A),A.return=v,v=A),u(v)):a(v,h)}return function(v,h,b,A){try{An=0;var P=Re(v,h,b,A);return Ft=null,P}catch(J){if(J===wt||J===Ti)throw J;var _e=Tl(29,J,null,v.mode);return _e.lanes=A,_e.return=v,_e}}}var bt=uf(!0),sf=uf(!1),Ha=!1;function du(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mu(e,l){e=e.updateQueue,l.updateQueue===e&&(l.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ka(e,l,a){var t=e.updateQueue;if(t===null)return null;if(t=t.shared,(Ce&2)!==0){var i=t.pending;return i===null?l.next=l:(l.next=i.next,i.next=l),t.pending=l,l=xi(e),Qo(e,null,a),l}return bi(e,t,l,a),xi(e)}function Dn(e,l,a){if(l=l.updateQueue,l!==null&&(l=l.shared,(a&4194048)!==0)){var t=l.lanes;t&=e.pendingLanes,a|=t,l.lanes=a,it(e,a)}}function gu(e,l){var a=e.updateQueue,t=e.alternate;if(t!==null&&(t=t.updateQueue,a===t)){var i=null,c=null;if(a=a.firstBaseUpdate,a!==null){do{var u={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};c===null?i=c=u:c=c.next=u,a=a.next}while(a!==null);c===null?i=c=l:c=c.next=l}else i=c=l;a={baseState:t.baseState,firstBaseUpdate:i,lastBaseUpdate:c,shared:t.shared,callbacks:t.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=l:e.next=l,a.lastBaseUpdate=l}var hu=!1;function Un(){if(hu){var e=Zt;if(e!==null)throw e}}function Rn(e,l,a,t){hu=!1;var i=e.updateQueue;Ha=!1;var c=i.firstBaseUpdate,u=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var r=s,x=r.next;r.next=null,u===null?c=x:u.next=x,u=r;var C=e.alternate;C!==null&&(C=C.updateQueue,s=C.lastBaseUpdate,s!==u&&(s===null?C.firstBaseUpdate=x:s.next=x,C.lastBaseUpdate=r))}if(c!==null){var O=i.baseState;u=0,C=x=r=null,s=c;do{var y=s.lane&-536870913,N=y!==s.lane;if(N?(xe&y)===y:(t&y)===y){y!==0&&y===Kt&&(hu=!0),C!==null&&(C=C.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var Z=e,ne=s;y=l;var Re=a;switch(ne.tag){case 1:if(Z=ne.payload,typeof Z=="function"){O=Z.call(Re,O,y);break e}O=Z;break e;case 3:Z.flags=Z.flags&-65537|128;case 0:if(Z=ne.payload,y=typeof Z=="function"?Z.call(Re,O,y):Z,y==null)break e;O=L({},O,y);break e;case 2:Ha=!0}}y=s.callback,y!==null&&(e.flags|=64,N&&(e.flags|=8192),N=i.callbacks,N===null?i.callbacks=[y]:N.push(y))}else N={lane:y,tag:s.tag,payload:s.payload,callback:s.callback,next:null},C===null?(x=C=N,r=O):C=C.next=N,u|=y;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;N=s,s=N.next,N.next=null,i.lastBaseUpdate=N,i.shared.pending=null}}while(!0);C===null&&(r=O),i.baseState=r,i.firstBaseUpdate=x,i.lastBaseUpdate=C,c===null&&(i.shared.lanes=0),Xa|=u,e.lanes=u,e.memoizedState=O}}function of(e,l){if(typeof e!="function")throw Error(d(191,e));e.call(l)}function ff(e,l){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)of(a[e],l)}var Jt=f(null),Ai=f(0);function rf(e,l){e=ja,V(Ai,e),V(Jt,l),ja=e|l.baseLanes}function pu(){V(Ai,ja),V(Jt,Jt.current)}function vu(){ja=Ai.current,z(Jt),z(Ai)}var zl=f(null),Yl=null;function Va(e){var l=e.alternate;V(Qe,Qe.current&1),V(zl,e),Yl===null&&(l===null||Jt.current!==null||l.memoizedState!==null)&&(Yl=e)}function bu(e){V(Qe,Qe.current),V(zl,e),Yl===null&&(Yl=e)}function df(e){e.tag===22?(V(Qe,Qe.current),V(zl,e),Yl===null&&(Yl=e)):Ya()}function Ya(){V(Qe,Qe.current),V(zl,zl.current)}function Cl(e){z(zl),Yl===e&&(Yl=null),z(Qe)}var Qe=f(0);function Oi(e){for(var l=e;l!==null;){if(l.tag===13){var a=l.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Ss(a)||Ts(a)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===e)break;for(;l.sibling===null;){if(l.return===null||l.return===e)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var ma=0,de=null,De=null,Fe=null,Di=!1,$t=!1,xt=!1,Ui=0,Mn=0,Wt=null,jg=0;function Le(){throw Error(d(321))}function xu(e,l){if(l===null)return!1;for(var a=0;a<l.length&&a<e.length;a++)if(!Sl(e[a],l[a]))return!1;return!0}function yu(e,l,a,t,i,c){return ma=c,de=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,S.H=e===null||e.memoizedState===null?Jf:qu,xt=!1,c=a(t,i),xt=!1,$t&&(c=gf(l,a,t,i)),mf(e),c}function mf(e){S.H=Bn;var l=De!==null&&De.next!==null;if(ma=0,Fe=De=de=null,Di=!1,Mn=0,Wt=null,l)throw Error(d(300));e===null||Je||(e=e.dependencies,e!==null&&Ni(e)&&(Je=!0))}function gf(e,l,a,t){de=e;var i=0;do{if($t&&(Wt=null),Mn=0,$t=!1,25<=i)throw Error(d(301));if(i+=1,Fe=De=null,e.updateQueue!=null){var c=e.updateQueue;c.lastEffect=null,c.events=null,c.stores=null,c.memoCache!=null&&(c.memoCache.index=0)}S.H=$f,c=l(a,t)}while($t);return c}function Ng(){var e=S.H,l=e.useState()[0];return l=typeof l.then=="function"?qn(l):l,e=e.useState()[0],(De!==null?De.memoizedState:null)!==e&&(de.flags|=1024),l}function ju(){var e=Ui!==0;return Ui=0,e}function Nu(e,l,a){l.updateQueue=e.updateQueue,l.flags&=-2053,e.lanes&=~a}function _u(e){if(Di){for(e=e.memoizedState;e!==null;){var l=e.queue;l!==null&&(l.pending=null),e=e.next}Di=!1}ma=0,Fe=De=de=null,$t=!1,Mn=Ui=0,Wt=null}function dl(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fe===null?de.memoizedState=Fe=e:Fe=Fe.next=e,Fe}function Ke(){if(De===null){var e=de.alternate;e=e!==null?e.memoizedState:null}else e=De.next;var l=Fe===null?de.memoizedState:Fe.next;if(l!==null)Fe=l,De=e;else{if(e===null)throw de.alternate===null?Error(d(467)):Error(d(310));De=e,e={memoizedState:De.memoizedState,baseState:De.baseState,baseQueue:De.baseQueue,queue:De.queue,next:null},Fe===null?de.memoizedState=Fe=e:Fe=Fe.next=e}return Fe}function Ri(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qn(e){var l=Mn;return Mn+=1,Wt===null&&(Wt=[]),e=tf(Wt,e,l),l=de,(Fe===null?l.memoizedState:Fe.next)===null&&(l=l.alternate,S.H=l===null||l.memoizedState===null?Jf:qu),e}function Mi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return qn(e);if(e.$$typeof===W)return tl(e)}throw Error(d(438,String(e)))}function Su(e){var l=null,a=de.updateQueue;if(a!==null&&(l=a.memoCache),l==null){var t=de.alternate;t!==null&&(t=t.updateQueue,t!==null&&(t=t.memoCache,t!=null&&(l={data:t.data.map(function(i){return i.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),a===null&&(a=Ri(),de.updateQueue=a),a.memoCache=l,a=l.data[l.index],a===void 0)for(a=l.data[l.index]=Array(e),t=0;t<e;t++)a[t]=ue;return l.index++,a}function ga(e,l){return typeof l=="function"?l(e):l}function qi(e){var l=Ke();return Tu(l,De,e)}function Tu(e,l,a){var t=e.queue;if(t===null)throw Error(d(311));t.lastRenderedReducer=a;var i=e.baseQueue,c=t.pending;if(c!==null){if(i!==null){var u=i.next;i.next=c.next,c.next=u}l.baseQueue=i=c,t.pending=null}if(c=e.baseState,i===null)e.memoizedState=c;else{l=i.next;var s=u=null,r=null,x=l,C=!1;do{var O=x.lane&-536870913;if(O!==x.lane?(xe&O)===O:(ma&O)===O){var y=x.revertLane;if(y===0)r!==null&&(r=r.next={lane:0,revertLane:0,gesture:null,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null}),O===Kt&&(C=!0);else if((ma&y)===y){x=x.next,y===Kt&&(C=!0);continue}else O={lane:0,revertLane:x.revertLane,gesture:null,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null},r===null?(s=r=O,u=c):r=r.next=O,de.lanes|=y,Xa|=y;O=x.action,xt&&a(c,O),c=x.hasEagerState?x.eagerState:a(c,O)}else y={lane:O,revertLane:x.revertLane,gesture:x.gesture,action:x.action,hasEagerState:x.hasEagerState,eagerState:x.eagerState,next:null},r===null?(s=r=y,u=c):r=r.next=y,de.lanes|=O,Xa|=O;x=x.next}while(x!==null&&x!==l);if(r===null?u=c:r.next=s,!Sl(c,e.memoizedState)&&(Je=!0,C&&(a=Zt,a!==null)))throw a;e.memoizedState=c,e.baseState=u,e.baseQueue=r,t.lastRenderedState=c}return i===null&&(t.lanes=0),[e.memoizedState,t.dispatch]}function zu(e){var l=Ke(),a=l.queue;if(a===null)throw Error(d(311));a.lastRenderedReducer=e;var t=a.dispatch,i=a.pending,c=l.memoizedState;if(i!==null){a.pending=null;var u=i=i.next;do c=e(c,u.action),u=u.next;while(u!==i);Sl(c,l.memoizedState)||(Je=!0),l.memoizedState=c,l.baseQueue===null&&(l.baseState=c),a.lastRenderedState=c}return[c,t]}function hf(e,l,a){var t=de,i=Ke(),c=je;if(c){if(a===void 0)throw Error(d(407));a=a()}else a=l();var u=!Sl((De||i).memoizedState,a);if(u&&(i.memoizedState=a,Je=!0),i=i.queue,Au(bf.bind(null,t,i,e),[e]),i.getSnapshot!==l||u||Fe!==null&&Fe.memoizedState.tag&1){if(t.flags|=2048,It(9,{destroy:void 0},vf.bind(null,t,i,a,l),null),He===null)throw Error(d(349));c||(ma&127)!==0||pf(t,l,a)}return a}function pf(e,l,a){e.flags|=16384,e={getSnapshot:l,value:a},l=de.updateQueue,l===null?(l=Ri(),de.updateQueue=l,l.stores=[e]):(a=l.stores,a===null?l.stores=[e]:a.push(e))}function vf(e,l,a,t){l.value=a,l.getSnapshot=t,xf(l)&&yf(e)}function bf(e,l,a){return a(function(){xf(l)&&yf(e)})}function xf(e){var l=e.getSnapshot;e=e.value;try{var a=l();return!Sl(e,a)}catch{return!0}}function yf(e){var l=ft(e,2);l!==null&&jl(l,e,2)}function Cu(e){var l=dl();if(typeof e=="function"){var a=e;if(e=a(),xt){_l(!0);try{a()}finally{_l(!1)}}}return l.memoizedState=l.baseState=e,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:e},l}function jf(e,l,a,t){return e.baseState=a,Tu(e,De,typeof t=="function"?t:ga)}function _g(e,l,a,t,i){if(ki(e))throw Error(d(485));if(e=l.action,e!==null){var c={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(u){c.listeners.push(u)}};S.T!==null?a(!0):c.isTransition=!1,t(c),a=l.pending,a===null?(c.next=l.pending=c,Nf(l,c)):(c.next=a.next,l.pending=a.next=c)}}function Nf(e,l){var a=l.action,t=l.payload,i=e.state;if(l.isTransition){var c=S.T,u={};S.T=u;try{var s=a(i,t),r=S.S;r!==null&&r(u,s),_f(e,l,s)}catch(x){Eu(e,l,x)}finally{c!==null&&u.types!==null&&(c.types=u.types),S.T=c}}else try{c=a(i,t),_f(e,l,c)}catch(x){Eu(e,l,x)}}function _f(e,l,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(t){Sf(e,l,t)},function(t){return Eu(e,l,t)}):Sf(e,l,a)}function Sf(e,l,a){l.status="fulfilled",l.value=a,Tf(l),e.state=a,l=e.pending,l!==null&&(a=l.next,a===l?e.pending=null:(a=a.next,l.next=a,Nf(e,a)))}function Eu(e,l,a){var t=e.pending;if(e.pending=null,t!==null){t=t.next;do l.status="rejected",l.reason=a,Tf(l),l=l.next;while(l!==t)}e.action=null}function Tf(e){e=e.listeners;for(var l=0;l<e.length;l++)(0,e[l])()}function zf(e,l){return l}function Cf(e,l){if(je){var a=He.formState;if(a!==null){e:{var t=de;if(je){if(Be){l:{for(var i=Be,c=Vl;i.nodeType!==8;){if(!c){i=null;break l}if(i=Gl(i.nextSibling),i===null){i=null;break l}}c=i.data,i=c==="F!"||c==="F"?i:null}if(i){Be=Gl(i.nextSibling),t=i.data==="F!";break e}}Ma(t)}t=!1}t&&(l=a[0])}}return a=dl(),a.memoizedState=a.baseState=l,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zf,lastRenderedState:l},a.queue=t,a=Zf.bind(null,de,t),t.dispatch=a,t=Cu(!1),c=Mu.bind(null,de,!1,t.queue),t=dl(),i={state:l,dispatch:null,action:e,pending:null},t.queue=i,a=_g.bind(null,de,i,c,a),i.dispatch=a,t.memoizedState=e,[l,a,!1]}function Ef(e){var l=Ke();return Af(l,De,e)}function Af(e,l,a){if(l=Tu(e,l,zf)[0],e=qi(ga)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var t=qn(l)}catch(u){throw u===wt?Ti:u}else t=l;l=Ke();var i=l.queue,c=i.dispatch;return a!==l.memoizedState&&(de.flags|=2048,It(9,{destroy:void 0},Sg.bind(null,i,a),null)),[t,c,e]}function Sg(e,l){e.action=l}function Of(e){var l=Ke(),a=De;if(a!==null)return Af(l,a,e);Ke(),l=l.memoizedState,a=Ke();var t=a.queue.dispatch;return a.memoizedState=e,[l,t,!1]}function It(e,l,a,t){return e={tag:e,create:a,deps:t,inst:l,next:null},l=de.updateQueue,l===null&&(l=Ri(),de.updateQueue=l),a=l.lastEffect,a===null?l.lastEffect=e.next=e:(t=a.next,a.next=e,e.next=t,l.lastEffect=e),e}function Df(){return Ke().memoizedState}function Hi(e,l,a,t){var i=dl();de.flags|=e,i.memoizedState=It(1|l,{destroy:void 0},a,t===void 0?null:t)}function Bi(e,l,a,t){var i=Ke();t=t===void 0?null:t;var c=i.memoizedState.inst;De!==null&&t!==null&&xu(t,De.memoizedState.deps)?i.memoizedState=It(l,c,a,t):(de.flags|=e,i.memoizedState=It(1|l,c,a,t))}function Uf(e,l){Hi(8390656,8,e,l)}function Au(e,l){Bi(2048,8,e,l)}function Tg(e){de.flags|=4;var l=de.updateQueue;if(l===null)l=Ri(),de.updateQueue=l,l.events=[e];else{var a=l.events;a===null?l.events=[e]:a.push(e)}}function Rf(e){var l=Ke().memoizedState;return Tg({ref:l,nextImpl:e}),function(){if((Ce&2)!==0)throw Error(d(440));return l.impl.apply(void 0,arguments)}}function Mf(e,l){return Bi(4,2,e,l)}function qf(e,l){return Bi(4,4,e,l)}function Hf(e,l){if(typeof l=="function"){e=e();var a=l(e);return function(){typeof a=="function"?a():l(null)}}if(l!=null)return e=e(),l.current=e,function(){l.current=null}}function Bf(e,l,a){a=a!=null?a.concat([e]):null,Bi(4,4,Hf.bind(null,l,e),a)}function Ou(){}function kf(e,l){var a=Ke();l=l===void 0?null:l;var t=a.memoizedState;return l!==null&&xu(l,t[1])?t[0]:(a.memoizedState=[e,l],e)}function Vf(e,l){var a=Ke();l=l===void 0?null:l;var t=a.memoizedState;if(l!==null&&xu(l,t[1]))return t[0];if(t=e(),xt){_l(!0);try{e()}finally{_l(!1)}}return a.memoizedState=[t,l],t}function Du(e,l,a){return a===void 0||(ma&1073741824)!==0&&(xe&261930)===0?e.memoizedState=l:(e.memoizedState=a,e=Yr(),de.lanes|=e,Xa|=e,a)}function Yf(e,l,a,t){return Sl(a,l)?a:Jt.current!==null?(e=Du(e,a,t),Sl(e,l)||(Je=!0),e):(ma&42)===0||(ma&1073741824)!==0&&(xe&261930)===0?(Je=!0,e.memoizedState=a):(e=Yr(),de.lanes|=e,Xa|=e,l)}function Gf(e,l,a,t,i){var c=k.p;k.p=c!==0&&8>c?c:8;var u=S.T,s={};S.T=s,Mu(e,!1,l,a);try{var r=i(),x=S.S;if(x!==null&&x(s,r),r!==null&&typeof r=="object"&&typeof r.then=="function"){var C=yg(r,t);Hn(e,l,C,Ol(e))}else Hn(e,l,t,Ol(e))}catch(O){Hn(e,l,{then:function(){},status:"rejected",reason:O},Ol())}finally{k.p=c,u!==null&&s.types!==null&&(u.types=s.types),S.T=u}}function zg(){}function Uu(e,l,a,t){if(e.tag!==5)throw Error(d(476));var i=Lf(e).queue;Gf(e,i,l,w,a===null?zg:function(){return Xf(e),a(t)})}function Lf(e){var l=e.memoizedState;if(l!==null)return l;l={memoizedState:w,baseState:w,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:w},next:null};var a={};return l.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ga,lastRenderedState:a},next:null},e.memoizedState=l,e=e.alternate,e!==null&&(e.memoizedState=l),l}function Xf(e){var l=Lf(e);l.next===null&&(l=e.alternate.memoizedState),Hn(e,l.next.queue,{},Ol())}function Ru(){return tl(Pn)}function Qf(){return Ke().memoizedState}function Kf(){return Ke().memoizedState}function Cg(e){for(var l=e.return;l!==null;){switch(l.tag){case 24:case 3:var a=Ol();e=Ba(a);var t=ka(l,e,a);t!==null&&(jl(t,l,a),Dn(t,l,a)),l={cache:su()},e.payload=l;return}l=l.return}}function Eg(e,l,a){var t=Ol();a={lane:t,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},ki(e)?wf(l,a):(a=Wc(e,l,a,t),a!==null&&(jl(a,e,t),Ff(a,l,t)))}function Zf(e,l,a){var t=Ol();Hn(e,l,a,t)}function Hn(e,l,a,t){var i={lane:t,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(ki(e))wf(l,i);else{var c=e.alternate;if(e.lanes===0&&(c===null||c.lanes===0)&&(c=l.lastRenderedReducer,c!==null))try{var u=l.lastRenderedState,s=c(u,a);if(i.hasEagerState=!0,i.eagerState=s,Sl(s,u))return bi(e,l,i,0),He===null&&vi(),!1}catch{}if(a=Wc(e,l,i,t),a!==null)return jl(a,e,t),Ff(a,l,t),!0}return!1}function Mu(e,l,a,t){if(t={lane:2,revertLane:ds(),gesture:null,action:t,hasEagerState:!1,eagerState:null,next:null},ki(e)){if(l)throw Error(d(479))}else l=Wc(e,a,t,2),l!==null&&jl(l,e,2)}function ki(e){var l=e.alternate;return e===de||l!==null&&l===de}function wf(e,l){$t=Di=!0;var a=e.pending;a===null?l.next=l:(l.next=a.next,a.next=l),e.pending=l}function Ff(e,l,a){if((a&4194048)!==0){var t=l.lanes;t&=e.pendingLanes,a|=t,l.lanes=a,it(e,a)}}var Bn={readContext:tl,use:Mi,useCallback:Le,useContext:Le,useEffect:Le,useImperativeHandle:Le,useLayoutEffect:Le,useInsertionEffect:Le,useMemo:Le,useReducer:Le,useRef:Le,useState:Le,useDebugValue:Le,useDeferredValue:Le,useTransition:Le,useSyncExternalStore:Le,useId:Le,useHostTransitionStatus:Le,useFormState:Le,useActionState:Le,useOptimistic:Le,useMemoCache:Le,useCacheRefresh:Le};Bn.useEffectEvent=Le;var Jf={readContext:tl,use:Mi,useCallback:function(e,l){return dl().memoizedState=[e,l===void 0?null:l],e},useContext:tl,useEffect:Uf,useImperativeHandle:function(e,l,a){a=a!=null?a.concat([e]):null,Hi(4194308,4,Hf.bind(null,l,e),a)},useLayoutEffect:function(e,l){return Hi(4194308,4,e,l)},useInsertionEffect:function(e,l){Hi(4,2,e,l)},useMemo:function(e,l){var a=dl();l=l===void 0?null:l;var t=e();if(xt){_l(!0);try{e()}finally{_l(!1)}}return a.memoizedState=[t,l],t},useReducer:function(e,l,a){var t=dl();if(a!==void 0){var i=a(l);if(xt){_l(!0);try{a(l)}finally{_l(!1)}}}else i=l;return t.memoizedState=t.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},t.queue=e,e=e.dispatch=Eg.bind(null,de,e),[t.memoizedState,e]},useRef:function(e){var l=dl();return e={current:e},l.memoizedState=e},useState:function(e){e=Cu(e);var l=e.queue,a=Zf.bind(null,de,l);return l.dispatch=a,[e.memoizedState,a]},useDebugValue:Ou,useDeferredValue:function(e,l){var a=dl();return Du(a,e,l)},useTransition:function(){var e=Cu(!1);return e=Gf.bind(null,de,e.queue,!0,!1),dl().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,l,a){var t=de,i=dl();if(je){if(a===void 0)throw Error(d(407));a=a()}else{if(a=l(),He===null)throw Error(d(349));(xe&127)!==0||pf(t,l,a)}i.memoizedState=a;var c={value:a,getSnapshot:l};return i.queue=c,Uf(bf.bind(null,t,c,e),[e]),t.flags|=2048,It(9,{destroy:void 0},vf.bind(null,t,c,a,l),null),a},useId:function(){var e=dl(),l=He.identifierPrefix;if(je){var a=Wl,t=$l;a=(t&~(1<<32-rl(t)-1)).toString(32)+a,l="_"+l+"R_"+a,a=Ui++,0<a&&(l+="H"+a.toString(32)),l+="_"}else a=jg++,l="_"+l+"r_"+a.toString(32)+"_";return e.memoizedState=l},useHostTransitionStatus:Ru,useFormState:Cf,useActionState:Cf,useOptimistic:function(e){var l=dl();l.memoizedState=l.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=a,l=Mu.bind(null,de,!0,a),a.dispatch=l,[e,l]},useMemoCache:Su,useCacheRefresh:function(){return dl().memoizedState=Cg.bind(null,de)},useEffectEvent:function(e){var l=dl(),a={impl:e};return l.memoizedState=a,function(){if((Ce&2)!==0)throw Error(d(440));return a.impl.apply(void 0,arguments)}}},qu={readContext:tl,use:Mi,useCallback:kf,useContext:tl,useEffect:Au,useImperativeHandle:Bf,useInsertionEffect:Mf,useLayoutEffect:qf,useMemo:Vf,useReducer:qi,useRef:Df,useState:function(){return qi(ga)},useDebugValue:Ou,useDeferredValue:function(e,l){var a=Ke();return Yf(a,De.memoizedState,e,l)},useTransition:function(){var e=qi(ga)[0],l=Ke().memoizedState;return[typeof e=="boolean"?e:qn(e),l]},useSyncExternalStore:hf,useId:Qf,useHostTransitionStatus:Ru,useFormState:Ef,useActionState:Ef,useOptimistic:function(e,l){var a=Ke();return jf(a,De,e,l)},useMemoCache:Su,useCacheRefresh:Kf};qu.useEffectEvent=Rf;var $f={readContext:tl,use:Mi,useCallback:kf,useContext:tl,useEffect:Au,useImperativeHandle:Bf,useInsertionEffect:Mf,useLayoutEffect:qf,useMemo:Vf,useReducer:zu,useRef:Df,useState:function(){return zu(ga)},useDebugValue:Ou,useDeferredValue:function(e,l){var a=Ke();return De===null?Du(a,e,l):Yf(a,De.memoizedState,e,l)},useTransition:function(){var e=zu(ga)[0],l=Ke().memoizedState;return[typeof e=="boolean"?e:qn(e),l]},useSyncExternalStore:hf,useId:Qf,useHostTransitionStatus:Ru,useFormState:Of,useActionState:Of,useOptimistic:function(e,l){var a=Ke();return De!==null?jf(a,De,e,l):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Su,useCacheRefresh:Kf};$f.useEffectEvent=Rf;function Hu(e,l,a,t){l=e.memoizedState,a=a(t,l),a=a==null?l:L({},l,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var Bu={enqueueSetState:function(e,l,a){e=e._reactInternals;var t=Ol(),i=Ba(t);i.payload=l,a!=null&&(i.callback=a),l=ka(e,i,t),l!==null&&(jl(l,e,t),Dn(l,e,t))},enqueueReplaceState:function(e,l,a){e=e._reactInternals;var t=Ol(),i=Ba(t);i.tag=1,i.payload=l,a!=null&&(i.callback=a),l=ka(e,i,t),l!==null&&(jl(l,e,t),Dn(l,e,t))},enqueueForceUpdate:function(e,l){e=e._reactInternals;var a=Ol(),t=Ba(a);t.tag=2,l!=null&&(t.callback=l),l=ka(e,t,a),l!==null&&(jl(l,e,a),Dn(l,e,a))}};function Wf(e,l,a,t,i,c,u){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(t,c,u):l.prototype&&l.prototype.isPureReactComponent?!_n(a,t)||!_n(i,c):!0}function If(e,l,a,t){e=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(a,t),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(a,t),l.state!==e&&Bu.enqueueReplaceState(l,l.state,null)}function yt(e,l){var a=l;if("ref"in l){a={};for(var t in l)t!=="ref"&&(a[t]=l[t])}if(e=e.defaultProps){a===l&&(a=L({},a));for(var i in e)a[i]===void 0&&(a[i]=e[i])}return a}function Pf(e){pi(e)}function er(e){console.error(e)}function lr(e){pi(e)}function Vi(e,l){try{var a=e.onUncaughtError;a(l.value,{componentStack:l.stack})}catch(t){setTimeout(function(){throw t})}}function ar(e,l,a){try{var t=e.onCaughtError;t(a.value,{componentStack:a.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function ku(e,l,a){return a=Ba(a),a.tag=3,a.payload={element:null},a.callback=function(){Vi(e,l)},a}function tr(e){return e=Ba(e),e.tag=3,e}function nr(e,l,a,t){var i=a.type.getDerivedStateFromError;if(typeof i=="function"){var c=t.value;e.payload=function(){return i(c)},e.callback=function(){ar(l,a,t)}}var u=a.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(e.callback=function(){ar(l,a,t),typeof i!="function"&&(Qa===null?Qa=new Set([this]):Qa.add(this));var s=t.stack;this.componentDidCatch(t.value,{componentStack:s!==null?s:""})})}function Ag(e,l,a,t,i){if(a.flags|=32768,t!==null&&typeof t=="object"&&typeof t.then=="function"){if(l=a.alternate,l!==null&&Qt(l,a,i,!0),a=zl.current,a!==null){switch(a.tag){case 31:case 13:return Yl===null?Wi():a.alternate===null&&Xe===0&&(Xe=3),a.flags&=-257,a.flags|=65536,a.lanes=i,t===zi?a.flags|=16384:(l=a.updateQueue,l===null?a.updateQueue=new Set([t]):l.add(t),os(e,t,i)),!1;case 22:return a.flags|=65536,t===zi?a.flags|=16384:(l=a.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([t])},a.updateQueue=l):(a=l.retryQueue,a===null?l.retryQueue=new Set([t]):a.add(t)),os(e,t,i)),!1}throw Error(d(435,a.tag))}return os(e,t,i),Wi(),!1}if(je)return l=zl.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=i,t!==tu&&(e=Error(d(422),{cause:t}),zn(Hl(e,a)))):(t!==tu&&(l=Error(d(423),{cause:t}),zn(Hl(l,a))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,t=Hl(t,a),i=ku(e.stateNode,t,i),gu(e,i),Xe!==4&&(Xe=2)),!1;var c=Error(d(520),{cause:t});if(c=Hl(c,a),Kn===null?Kn=[c]:Kn.push(c),Xe!==4&&(Xe=2),l===null)return!0;t=Hl(t,a),a=l;do{switch(a.tag){case 3:return a.flags|=65536,e=i&-i,a.lanes|=e,e=ku(a.stateNode,t,e),gu(a,e),!1;case 1:if(l=a.type,c=a.stateNode,(a.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||c!==null&&typeof c.componentDidCatch=="function"&&(Qa===null||!Qa.has(c))))return a.flags|=65536,i&=-i,a.lanes|=i,i=tr(i),nr(i,e,a,t),gu(a,i),!1}a=a.return}while(a!==null);return!1}var Vu=Error(d(461)),Je=!1;function nl(e,l,a,t){l.child=e===null?sf(l,null,a,t):bt(l,e.child,a,t)}function ir(e,l,a,t,i){a=a.render;var c=l.ref;if("ref"in t){var u={};for(var s in t)s!=="ref"&&(u[s]=t[s])}else u=t;return gt(l),t=yu(e,l,a,u,c,i),s=ju(),e!==null&&!Je?(Nu(e,l,i),ha(e,l,i)):(je&&s&&lu(l),l.flags|=1,nl(e,l,t,i),l.child)}function cr(e,l,a,t,i){if(e===null){var c=a.type;return typeof c=="function"&&!Ic(c)&&c.defaultProps===void 0&&a.compare===null?(l.tag=15,l.type=c,ur(e,l,c,t,i)):(e=yi(a.type,null,t,l,l.mode,i),e.ref=l.ref,e.return=l,l.child=e)}if(c=e.child,!wu(e,i)){var u=c.memoizedProps;if(a=a.compare,a=a!==null?a:_n,a(u,t)&&e.ref===l.ref)return ha(e,l,i)}return l.flags|=1,e=oa(c,t),e.ref=l.ref,e.return=l,l.child=e}function ur(e,l,a,t,i){if(e!==null){var c=e.memoizedProps;if(_n(c,t)&&e.ref===l.ref)if(Je=!1,l.pendingProps=t=c,wu(e,i))(e.flags&131072)!==0&&(Je=!0);else return l.lanes=e.lanes,ha(e,l,i)}return Yu(e,l,a,t,i)}function sr(e,l,a,t){var i=t.children,c=e!==null?e.memoizedState:null;if(e===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.mode==="hidden"){if((l.flags&128)!==0){if(c=c!==null?c.baseLanes|a:a,e!==null){for(t=l.child=e.child,i=0;t!==null;)i=i|t.lanes|t.childLanes,t=t.sibling;t=i&~c}else t=0,l.child=null;return or(e,l,c,a,t)}if((a&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},e!==null&&Si(l,c!==null?c.cachePool:null),c!==null?rf(l,c):pu(),df(l);else return t=l.lanes=536870912,or(e,l,c!==null?c.baseLanes|a:a,a,t)}else c!==null?(Si(l,c.cachePool),rf(l,c),Ya(),l.memoizedState=null):(e!==null&&Si(l,null),pu(),Ya());return nl(e,l,i,a),l.child}function kn(e,l){return e!==null&&e.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function or(e,l,a,t,i){var c=fu();return c=c===null?null:{parent:we._currentValue,pool:c},l.memoizedState={baseLanes:a,cachePool:c},e!==null&&Si(l,null),pu(),df(l),e!==null&&Qt(e,l,t,!0),l.childLanes=i,null}function Yi(e,l){return l=Li({mode:l.mode,children:l.children},e.mode),l.ref=e.ref,e.child=l,l.return=e,l}function fr(e,l,a){return bt(l,e.child,null,a),e=Yi(l,l.pendingProps),e.flags|=2,Cl(l),l.memoizedState=null,e}function Og(e,l,a){var t=l.pendingProps,i=(l.flags&128)!==0;if(l.flags&=-129,e===null){if(je){if(t.mode==="hidden")return e=Yi(l,t),l.lanes=536870912,kn(null,e);if(bu(l),(e=Be)?(e=Nd(e,Vl),e=e!==null&&e.data==="&"?e:null,e!==null&&(l.memoizedState={dehydrated:e,treeContext:Ua!==null?{id:$l,overflow:Wl}:null,retryLane:536870912,hydrationErrors:null},a=Zo(e),a.return=l,l.child=a,al=l,Be=null)):e=null,e===null)throw Ma(l);return l.lanes=536870912,null}return Yi(l,t)}var c=e.memoizedState;if(c!==null){var u=c.dehydrated;if(bu(l),i)if(l.flags&256)l.flags&=-257,l=fr(e,l,a);else if(l.memoizedState!==null)l.child=e.child,l.flags|=128,l=null;else throw Error(d(558));else if(Je||Qt(e,l,a,!1),i=(a&e.childLanes)!==0,Je||i){if(t=He,t!==null&&(u=Is(t,a),u!==0&&u!==c.retryLane))throw c.retryLane=u,ft(e,u),jl(t,e,u),Vu;Wi(),l=fr(e,l,a)}else e=c.treeContext,Be=Gl(u.nextSibling),al=l,je=!0,Ra=null,Vl=!1,e!==null&&Jo(l,e),l=Yi(l,t),l.flags|=4096;return l}return e=oa(e.child,{mode:t.mode,children:t.children}),e.ref=l.ref,l.child=e,e.return=l,e}function Gi(e,l){var a=l.ref;if(a===null)e!==null&&e.ref!==null&&(l.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(d(284));(e===null||e.ref!==a)&&(l.flags|=4194816)}}function Yu(e,l,a,t,i){return gt(l),a=yu(e,l,a,t,void 0,i),t=ju(),e!==null&&!Je?(Nu(e,l,i),ha(e,l,i)):(je&&t&&lu(l),l.flags|=1,nl(e,l,a,i),l.child)}function rr(e,l,a,t,i,c){return gt(l),l.updateQueue=null,a=gf(l,t,a,i),mf(e),t=ju(),e!==null&&!Je?(Nu(e,l,c),ha(e,l,c)):(je&&t&&lu(l),l.flags|=1,nl(e,l,a,c),l.child)}function dr(e,l,a,t,i){if(gt(l),l.stateNode===null){var c=Yt,u=a.contextType;typeof u=="object"&&u!==null&&(c=tl(u)),c=new a(t,c),l.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,c.updater=Bu,l.stateNode=c,c._reactInternals=l,c=l.stateNode,c.props=t,c.state=l.memoizedState,c.refs={},du(l),u=a.contextType,c.context=typeof u=="object"&&u!==null?tl(u):Yt,c.state=l.memoizedState,u=a.getDerivedStateFromProps,typeof u=="function"&&(Hu(l,a,u,t),c.state=l.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(u=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),u!==c.state&&Bu.enqueueReplaceState(c,c.state,null),Rn(l,t,c,i),Un(),c.state=l.memoizedState),typeof c.componentDidMount=="function"&&(l.flags|=4194308),t=!0}else if(e===null){c=l.stateNode;var s=l.memoizedProps,r=yt(a,s);c.props=r;var x=c.context,C=a.contextType;u=Yt,typeof C=="object"&&C!==null&&(u=tl(C));var O=a.getDerivedStateFromProps;C=typeof O=="function"||typeof c.getSnapshotBeforeUpdate=="function",s=l.pendingProps!==s,C||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(s||x!==u)&&If(l,c,t,u),Ha=!1;var y=l.memoizedState;c.state=y,Rn(l,t,c,i),Un(),x=l.memoizedState,s||y!==x||Ha?(typeof O=="function"&&(Hu(l,a,O,t),x=l.memoizedState),(r=Ha||Wf(l,a,r,t,y,x,u))?(C||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount()),typeof c.componentDidMount=="function"&&(l.flags|=4194308)):(typeof c.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=t,l.memoizedState=x),c.props=t,c.state=x,c.context=u,t=r):(typeof c.componentDidMount=="function"&&(l.flags|=4194308),t=!1)}else{c=l.stateNode,mu(e,l),u=l.memoizedProps,C=yt(a,u),c.props=C,O=l.pendingProps,y=c.context,x=a.contextType,r=Yt,typeof x=="object"&&x!==null&&(r=tl(x)),s=a.getDerivedStateFromProps,(x=typeof s=="function"||typeof c.getSnapshotBeforeUpdate=="function")||typeof c.UNSAFE_componentWillReceiveProps!="function"&&typeof c.componentWillReceiveProps!="function"||(u!==O||y!==r)&&If(l,c,t,r),Ha=!1,y=l.memoizedState,c.state=y,Rn(l,t,c,i),Un();var N=l.memoizedState;u!==O||y!==N||Ha||e!==null&&e.dependencies!==null&&Ni(e.dependencies)?(typeof s=="function"&&(Hu(l,a,s,t),N=l.memoizedState),(C=Ha||Wf(l,a,C,t,y,N,r)||e!==null&&e.dependencies!==null&&Ni(e.dependencies))?(x||typeof c.UNSAFE_componentWillUpdate!="function"&&typeof c.componentWillUpdate!="function"||(typeof c.componentWillUpdate=="function"&&c.componentWillUpdate(t,N,r),typeof c.UNSAFE_componentWillUpdate=="function"&&c.UNSAFE_componentWillUpdate(t,N,r)),typeof c.componentDidUpdate=="function"&&(l.flags|=4),typeof c.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof c.componentDidUpdate!="function"||u===e.memoizedProps&&y===e.memoizedState||(l.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&y===e.memoizedState||(l.flags|=1024),l.memoizedProps=t,l.memoizedState=N),c.props=t,c.state=N,c.context=r,t=C):(typeof c.componentDidUpdate!="function"||u===e.memoizedProps&&y===e.memoizedState||(l.flags|=4),typeof c.getSnapshotBeforeUpdate!="function"||u===e.memoizedProps&&y===e.memoizedState||(l.flags|=1024),t=!1)}return c=t,Gi(e,l),t=(l.flags&128)!==0,c||t?(c=l.stateNode,a=t&&typeof a.getDerivedStateFromError!="function"?null:c.render(),l.flags|=1,e!==null&&t?(l.child=bt(l,e.child,null,i),l.child=bt(l,null,a,i)):nl(e,l,a,i),l.memoizedState=c.state,e=l.child):e=ha(e,l,i),e}function mr(e,l,a,t){return dt(),l.flags|=256,nl(e,l,a,t),l.child}var Gu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Lu(e){return{baseLanes:e,cachePool:lf()}}function Xu(e,l,a){return e=e!==null?e.childLanes&~a:0,l&&(e|=Al),e}function gr(e,l,a){var t=l.pendingProps,i=!1,c=(l.flags&128)!==0,u;if((u=c)||(u=e!==null&&e.memoizedState===null?!1:(Qe.current&2)!==0),u&&(i=!0,l.flags&=-129),u=(l.flags&32)!==0,l.flags&=-33,e===null){if(je){if(i?Va(l):Ya(),(e=Be)?(e=Nd(e,Vl),e=e!==null&&e.data!=="&"?e:null,e!==null&&(l.memoizedState={dehydrated:e,treeContext:Ua!==null?{id:$l,overflow:Wl}:null,retryLane:536870912,hydrationErrors:null},a=Zo(e),a.return=l,l.child=a,al=l,Be=null)):e=null,e===null)throw Ma(l);return Ts(e)?l.lanes=32:l.lanes=536870912,null}var s=t.children;return t=t.fallback,i?(Ya(),i=l.mode,s=Li({mode:"hidden",children:s},i),t=rt(t,i,a,null),s.return=l,t.return=l,s.sibling=t,l.child=s,t=l.child,t.memoizedState=Lu(a),t.childLanes=Xu(e,u,a),l.memoizedState=Gu,kn(null,t)):(Va(l),Qu(l,s))}var r=e.memoizedState;if(r!==null&&(s=r.dehydrated,s!==null)){if(c)l.flags&256?(Va(l),l.flags&=-257,l=Ku(e,l,a)):l.memoizedState!==null?(Ya(),l.child=e.child,l.flags|=128,l=null):(Ya(),s=t.fallback,i=l.mode,t=Li({mode:"visible",children:t.children},i),s=rt(s,i,a,null),s.flags|=2,t.return=l,s.return=l,t.sibling=s,l.child=t,bt(l,e.child,null,a),t=l.child,t.memoizedState=Lu(a),t.childLanes=Xu(e,u,a),l.memoizedState=Gu,l=kn(null,t));else if(Va(l),Ts(s)){if(u=s.nextSibling&&s.nextSibling.dataset,u)var x=u.dgst;u=x,t=Error(d(419)),t.stack="",t.digest=u,zn({value:t,source:null,stack:null}),l=Ku(e,l,a)}else if(Je||Qt(e,l,a,!1),u=(a&e.childLanes)!==0,Je||u){if(u=He,u!==null&&(t=Is(u,a),t!==0&&t!==r.retryLane))throw r.retryLane=t,ft(e,t),jl(u,e,t),Vu;Ss(s)||Wi(),l=Ku(e,l,a)}else Ss(s)?(l.flags|=192,l.child=e.child,l=null):(e=r.treeContext,Be=Gl(s.nextSibling),al=l,je=!0,Ra=null,Vl=!1,e!==null&&Jo(l,e),l=Qu(l,t.children),l.flags|=4096);return l}return i?(Ya(),s=t.fallback,i=l.mode,r=e.child,x=r.sibling,t=oa(r,{mode:"hidden",children:t.children}),t.subtreeFlags=r.subtreeFlags&65011712,x!==null?s=oa(x,s):(s=rt(s,i,a,null),s.flags|=2),s.return=l,t.return=l,t.sibling=s,l.child=t,kn(null,t),t=l.child,s=e.child.memoizedState,s===null?s=Lu(a):(i=s.cachePool,i!==null?(r=we._currentValue,i=i.parent!==r?{parent:r,pool:r}:i):i=lf(),s={baseLanes:s.baseLanes|a,cachePool:i}),t.memoizedState=s,t.childLanes=Xu(e,u,a),l.memoizedState=Gu,kn(e.child,t)):(Va(l),a=e.child,e=a.sibling,a=oa(a,{mode:"visible",children:t.children}),a.return=l,a.sibling=null,e!==null&&(u=l.deletions,u===null?(l.deletions=[e],l.flags|=16):u.push(e)),l.child=a,l.memoizedState=null,a)}function Qu(e,l){return l=Li({mode:"visible",children:l},e.mode),l.return=e,e.child=l}function Li(e,l){return e=Tl(22,e,null,l),e.lanes=0,e}function Ku(e,l,a){return bt(l,e.child,null,a),e=Qu(l,l.pendingProps.children),e.flags|=2,l.memoizedState=null,e}function hr(e,l,a){e.lanes|=l;var t=e.alternate;t!==null&&(t.lanes|=l),cu(e.return,l,a)}function Zu(e,l,a,t,i,c){var u=e.memoizedState;u===null?e.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:t,tail:a,tailMode:i,treeForkCount:c}:(u.isBackwards=l,u.rendering=null,u.renderingStartTime=0,u.last=t,u.tail=a,u.tailMode=i,u.treeForkCount=c)}function pr(e,l,a){var t=l.pendingProps,i=t.revealOrder,c=t.tail;t=t.children;var u=Qe.current,s=(u&2)!==0;if(s?(u=u&1|2,l.flags|=128):u&=1,V(Qe,u),nl(e,l,t,a),t=je?Tn:0,!s&&e!==null&&(e.flags&128)!==0)e:for(e=l.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&hr(e,a,l);else if(e.tag===19)hr(e,a,l);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===l)break e;for(;e.sibling===null;){if(e.return===null||e.return===l)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(a=l.child,i=null;a!==null;)e=a.alternate,e!==null&&Oi(e)===null&&(i=a),a=a.sibling;a=i,a===null?(i=l.child,l.child=null):(i=a.sibling,a.sibling=null),Zu(l,!1,i,a,c,t);break;case"backwards":case"unstable_legacy-backwards":for(a=null,i=l.child,l.child=null;i!==null;){if(e=i.alternate,e!==null&&Oi(e)===null){l.child=i;break}e=i.sibling,i.sibling=a,a=i,i=e}Zu(l,!0,a,null,c,t);break;case"together":Zu(l,!1,null,null,void 0,t);break;default:l.memoizedState=null}return l.child}function ha(e,l,a){if(e!==null&&(l.dependencies=e.dependencies),Xa|=l.lanes,(a&l.childLanes)===0)if(e!==null){if(Qt(e,l,a,!1),(a&l.childLanes)===0)return null}else return null;if(e!==null&&l.child!==e.child)throw Error(d(153));if(l.child!==null){for(e=l.child,a=oa(e,e.pendingProps),l.child=a,a.return=l;e.sibling!==null;)e=e.sibling,a=a.sibling=oa(e,e.pendingProps),a.return=l;a.sibling=null}return l.child}function wu(e,l){return(e.lanes&l)!==0?!0:(e=e.dependencies,!!(e!==null&&Ni(e)))}function Dg(e,l,a){switch(l.tag){case 3:p(l,l.stateNode.containerInfo),qa(l,we,e.memoizedState.cache),dt();break;case 27:case 5:ml(l);break;case 4:p(l,l.stateNode.containerInfo);break;case 10:qa(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,bu(l),null;break;case 13:var t=l.memoizedState;if(t!==null)return t.dehydrated!==null?(Va(l),l.flags|=128,null):(a&l.child.childLanes)!==0?gr(e,l,a):(Va(l),e=ha(e,l,a),e!==null?e.sibling:null);Va(l);break;case 19:var i=(e.flags&128)!==0;if(t=(a&l.childLanes)!==0,t||(Qt(e,l,a,!1),t=(a&l.childLanes)!==0),i){if(t)return pr(e,l,a);l.flags|=128}if(i=l.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),V(Qe,Qe.current),t)break;return null;case 22:return l.lanes=0,sr(e,l,a,l.pendingProps);case 24:qa(l,we,e.memoizedState.cache)}return ha(e,l,a)}function vr(e,l,a){if(e!==null)if(e.memoizedProps!==l.pendingProps)Je=!0;else{if(!wu(e,a)&&(l.flags&128)===0)return Je=!1,Dg(e,l,a);Je=(e.flags&131072)!==0}else Je=!1,je&&(l.flags&1048576)!==0&&Fo(l,Tn,l.index);switch(l.lanes=0,l.tag){case 16:e:{var t=l.pendingProps;if(e=pt(l.elementType),l.type=e,typeof e=="function")Ic(e)?(t=yt(e,t),l.tag=1,l=dr(null,l,e,t,a)):(l.tag=0,l=Yu(null,l,e,t,a));else{if(e!=null){var i=e.$$typeof;if(i===I){l.tag=11,l=ir(null,l,e,t,a);break e}else if(i===ie){l.tag=14,l=cr(null,l,e,t,a);break e}}throw l=ee(e)||e,Error(d(306,l,""))}}return l;case 0:return Yu(e,l,l.type,l.pendingProps,a);case 1:return t=l.type,i=yt(t,l.pendingProps),dr(e,l,t,i,a);case 3:e:{if(p(l,l.stateNode.containerInfo),e===null)throw Error(d(387));t=l.pendingProps;var c=l.memoizedState;i=c.element,mu(e,l),Rn(l,t,null,a);var u=l.memoizedState;if(t=u.cache,qa(l,we,t),t!==c.cache&&uu(l,[we],a,!0),Un(),t=u.element,c.isDehydrated)if(c={element:t,isDehydrated:!1,cache:u.cache},l.updateQueue.baseState=c,l.memoizedState=c,l.flags&256){l=mr(e,l,t,a);break e}else if(t!==i){i=Hl(Error(d(424)),l),zn(i),l=mr(e,l,t,a);break e}else for(e=l.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Be=Gl(e.firstChild),al=l,je=!0,Ra=null,Vl=!0,a=sf(l,null,t,a),l.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(dt(),t===i){l=ha(e,l,a);break e}nl(e,l,t,a)}l=l.child}return l;case 26:return Gi(e,l),e===null?(a=Ed(l.type,null,l.pendingProps,null))?l.memoizedState=a:je||(a=l.type,e=l.pendingProps,t=nc(oe.current).createElement(a),t[ll]=l,t[hl]=e,il(t,a,e),Ie(t),l.stateNode=t):l.memoizedState=Ed(l.type,e.memoizedProps,l.pendingProps,e.memoizedState),null;case 27:return ml(l),e===null&&je&&(t=l.stateNode=Td(l.type,l.pendingProps,oe.current),al=l,Vl=!0,i=Be,Fa(l.type)?(zs=i,Be=Gl(t.firstChild)):Be=i),nl(e,l,l.pendingProps.children,a),Gi(e,l),e===null&&(l.flags|=4194304),l.child;case 5:return e===null&&je&&((i=t=Be)&&(t=uh(t,l.type,l.pendingProps,Vl),t!==null?(l.stateNode=t,al=l,Be=Gl(t.firstChild),Vl=!1,i=!0):i=!1),i||Ma(l)),ml(l),i=l.type,c=l.pendingProps,u=e!==null?e.memoizedProps:null,t=c.children,js(i,c)?t=null:u!==null&&js(i,u)&&(l.flags|=32),l.memoizedState!==null&&(i=yu(e,l,Ng,null,null,a),Pn._currentValue=i),Gi(e,l),nl(e,l,t,a),l.child;case 6:return e===null&&je&&((e=a=Be)&&(a=sh(a,l.pendingProps,Vl),a!==null?(l.stateNode=a,al=l,Be=null,e=!0):e=!1),e||Ma(l)),null;case 13:return gr(e,l,a);case 4:return p(l,l.stateNode.containerInfo),t=l.pendingProps,e===null?l.child=bt(l,null,t,a):nl(e,l,t,a),l.child;case 11:return ir(e,l,l.type,l.pendingProps,a);case 7:return nl(e,l,l.pendingProps,a),l.child;case 8:return nl(e,l,l.pendingProps.children,a),l.child;case 12:return nl(e,l,l.pendingProps.children,a),l.child;case 10:return t=l.pendingProps,qa(l,l.type,t.value),nl(e,l,t.children,a),l.child;case 9:return i=l.type._context,t=l.pendingProps.children,gt(l),i=tl(i),t=t(i),l.flags|=1,nl(e,l,t,a),l.child;case 14:return cr(e,l,l.type,l.pendingProps,a);case 15:return ur(e,l,l.type,l.pendingProps,a);case 19:return pr(e,l,a);case 31:return Og(e,l,a);case 22:return sr(e,l,a,l.pendingProps);case 24:return gt(l),t=tl(we),e===null?(i=fu(),i===null&&(i=He,c=su(),i.pooledCache=c,c.refCount++,c!==null&&(i.pooledCacheLanes|=a),i=c),l.memoizedState={parent:t,cache:i},du(l),qa(l,we,i)):((e.lanes&a)!==0&&(mu(e,l),Rn(l,null,null,a),Un()),i=e.memoizedState,c=l.memoizedState,i.parent!==t?(i={parent:t,cache:t},l.memoizedState=i,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=i),qa(l,we,t)):(t=c.cache,qa(l,we,t),t!==i.cache&&uu(l,[we],a,!0))),nl(e,l,l.pendingProps.children,a),l.child;case 29:throw l.pendingProps}throw Error(d(156,l.tag))}function pa(e){e.flags|=4}function Fu(e,l,a,t,i){if((l=(e.mode&32)!==0)&&(l=!1),l){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Qr())e.flags|=8192;else throw vt=zi,ru}else e.flags&=-16777217}function br(e,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Rd(l))if(Qr())e.flags|=8192;else throw vt=zi,ru}function Xi(e,l){l!==null&&(e.flags|=4),e.flags&16384&&(l=e.tag!==22?Q():536870912,e.lanes|=l,an|=l)}function Vn(e,l){if(!je)switch(e.tailMode){case"hidden":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var t=null;a!==null;)a.alternate!==null&&(t=a),a=a.sibling;t===null?l||e.tail===null?e.tail=null:e.tail.sibling=null:t.sibling=null}}function ke(e){var l=e.alternate!==null&&e.alternate.child===e.child,a=0,t=0;if(l)for(var i=e.child;i!==null;)a|=i.lanes|i.childLanes,t|=i.subtreeFlags&65011712,t|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)a|=i.lanes|i.childLanes,t|=i.subtreeFlags,t|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=t,e.childLanes=a,l}function Ug(e,l,a){var t=l.pendingProps;switch(au(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ke(l),null;case 1:return ke(l),null;case 3:return a=l.stateNode,t=null,e!==null&&(t=e.memoizedState.cache),l.memoizedState.cache!==t&&(l.flags|=2048),da(we),ge(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(Xt(l)?pa(l):e===null||e.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,nu())),ke(l),null;case 26:var i=l.type,c=l.memoizedState;return e===null?(pa(l),c!==null?(ke(l),br(l,c)):(ke(l),Fu(l,i,null,t,a))):c?c!==e.memoizedState?(pa(l),ke(l),br(l,c)):(ke(l),l.flags&=-16777217):(e=e.memoizedProps,e!==t&&pa(l),ke(l),Fu(l,i,e,t,a)),null;case 27:if(la(l),a=oe.current,i=l.type,e!==null&&l.stateNode!=null)e.memoizedProps!==t&&pa(l);else{if(!t){if(l.stateNode===null)throw Error(d(166));return ke(l),null}e=X.current,Xt(l)?$o(l):(e=Td(i,t,a),l.stateNode=e,pa(l))}return ke(l),null;case 5:if(la(l),i=l.type,e!==null&&l.stateNode!=null)e.memoizedProps!==t&&pa(l);else{if(!t){if(l.stateNode===null)throw Error(d(166));return ke(l),null}if(c=X.current,Xt(l))$o(l);else{var u=nc(oe.current);switch(c){case 1:c=u.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:c=u.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":c=u.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":c=u.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":c=u.createElement("div"),c.innerHTML="<script><\/script>",c=c.removeChild(c.firstChild);break;case"select":c=typeof t.is=="string"?u.createElement("select",{is:t.is}):u.createElement("select"),t.multiple?c.multiple=!0:t.size&&(c.size=t.size);break;default:c=typeof t.is=="string"?u.createElement(i,{is:t.is}):u.createElement(i)}}c[ll]=l,c[hl]=t;e:for(u=l.child;u!==null;){if(u.tag===5||u.tag===6)c.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break e;for(;u.sibling===null;){if(u.return===null||u.return===l)break e;u=u.return}u.sibling.return=u.return,u=u.sibling}l.stateNode=c;e:switch(il(c,i,t),i){case"button":case"input":case"select":case"textarea":t=!!t.autoFocus;break e;case"img":t=!0;break e;default:t=!1}t&&pa(l)}}return ke(l),Fu(l,l.type,e===null?null:e.memoizedProps,l.pendingProps,a),null;case 6:if(e&&l.stateNode!=null)e.memoizedProps!==t&&pa(l);else{if(typeof t!="string"&&l.stateNode===null)throw Error(d(166));if(e=oe.current,Xt(l)){if(e=l.stateNode,a=l.memoizedProps,t=null,i=al,i!==null)switch(i.tag){case 27:case 5:t=i.memoizedProps}e[ll]=l,e=!!(e.nodeValue===a||t!==null&&t.suppressHydrationWarning===!0||gd(e.nodeValue,a)),e||Ma(l,!0)}else e=nc(e).createTextNode(t),e[ll]=l,l.stateNode=e}return ke(l),null;case 31:if(a=l.memoizedState,e===null||e.memoizedState!==null){if(t=Xt(l),a!==null){if(e===null){if(!t)throw Error(d(318));if(e=l.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(d(557));e[ll]=l}else dt(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;ke(l),e=!1}else a=nu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return l.flags&256?(Cl(l),l):(Cl(l),null);if((l.flags&128)!==0)throw Error(d(558))}return ke(l),null;case 13:if(t=l.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=Xt(l),t!==null&&t.dehydrated!==null){if(e===null){if(!i)throw Error(d(318));if(i=l.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(d(317));i[ll]=l}else dt(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;ke(l),i=!1}else i=nu(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return l.flags&256?(Cl(l),l):(Cl(l),null)}return Cl(l),(l.flags&128)!==0?(l.lanes=a,l):(a=t!==null,e=e!==null&&e.memoizedState!==null,a&&(t=l.child,i=null,t.alternate!==null&&t.alternate.memoizedState!==null&&t.alternate.memoizedState.cachePool!==null&&(i=t.alternate.memoizedState.cachePool.pool),c=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(c=t.memoizedState.cachePool.pool),c!==i&&(t.flags|=2048)),a!==e&&a&&(l.child.flags|=8192),Xi(l,l.updateQueue),ke(l),null);case 4:return ge(),e===null&&ps(l.stateNode.containerInfo),ke(l),null;case 10:return da(l.type),ke(l),null;case 19:if(z(Qe),t=l.memoizedState,t===null)return ke(l),null;if(i=(l.flags&128)!==0,c=t.rendering,c===null)if(i)Vn(t,!1);else{if(Xe!==0||e!==null&&(e.flags&128)!==0)for(e=l.child;e!==null;){if(c=Oi(e),c!==null){for(l.flags|=128,Vn(t,!1),e=c.updateQueue,l.updateQueue=e,Xi(l,e),l.subtreeFlags=0,e=a,a=l.child;a!==null;)Ko(a,e),a=a.sibling;return V(Qe,Qe.current&1|2),je&&fa(l,t.treeForkCount),l.child}e=e.sibling}t.tail!==null&&el()>Fi&&(l.flags|=128,i=!0,Vn(t,!1),l.lanes=4194304)}else{if(!i)if(e=Oi(c),e!==null){if(l.flags|=128,i=!0,e=e.updateQueue,l.updateQueue=e,Xi(l,e),Vn(t,!0),t.tail===null&&t.tailMode==="hidden"&&!c.alternate&&!je)return ke(l),null}else 2*el()-t.renderingStartTime>Fi&&a!==536870912&&(l.flags|=128,i=!0,Vn(t,!1),l.lanes=4194304);t.isBackwards?(c.sibling=l.child,l.child=c):(e=t.last,e!==null?e.sibling=c:l.child=c,t.last=c)}return t.tail!==null?(e=t.tail,t.rendering=e,t.tail=e.sibling,t.renderingStartTime=el(),e.sibling=null,a=Qe.current,V(Qe,i?a&1|2:a&1),je&&fa(l,t.treeForkCount),e):(ke(l),null);case 22:case 23:return Cl(l),vu(),t=l.memoizedState!==null,e!==null?e.memoizedState!==null!==t&&(l.flags|=8192):t&&(l.flags|=8192),t?(a&536870912)!==0&&(l.flags&128)===0&&(ke(l),l.subtreeFlags&6&&(l.flags|=8192)):ke(l),a=l.updateQueue,a!==null&&Xi(l,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),t=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(t=l.memoizedState.cachePool.pool),t!==a&&(l.flags|=2048),e!==null&&z(ht),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),l.memoizedState.cache!==a&&(l.flags|=2048),da(we),ke(l),null;case 25:return null;case 30:return null}throw Error(d(156,l.tag))}function Rg(e,l){switch(au(l),l.tag){case 1:return e=l.flags,e&65536?(l.flags=e&-65537|128,l):null;case 3:return da(we),ge(),e=l.flags,(e&65536)!==0&&(e&128)===0?(l.flags=e&-65537|128,l):null;case 26:case 27:case 5:return la(l),null;case 31:if(l.memoizedState!==null){if(Cl(l),l.alternate===null)throw Error(d(340));dt()}return e=l.flags,e&65536?(l.flags=e&-65537|128,l):null;case 13:if(Cl(l),e=l.memoizedState,e!==null&&e.dehydrated!==null){if(l.alternate===null)throw Error(d(340));dt()}return e=l.flags,e&65536?(l.flags=e&-65537|128,l):null;case 19:return z(Qe),null;case 4:return ge(),null;case 10:return da(l.type),null;case 22:case 23:return Cl(l),vu(),e!==null&&z(ht),e=l.flags,e&65536?(l.flags=e&-65537|128,l):null;case 24:return da(we),null;case 25:return null;default:return null}}function xr(e,l){switch(au(l),l.tag){case 3:da(we),ge();break;case 26:case 27:case 5:la(l);break;case 4:ge();break;case 31:l.memoizedState!==null&&Cl(l);break;case 13:Cl(l);break;case 19:z(Qe);break;case 10:da(l.type);break;case 22:case 23:Cl(l),vu(),e!==null&&z(ht);break;case 24:da(we)}}function Yn(e,l){try{var a=l.updateQueue,t=a!==null?a.lastEffect:null;if(t!==null){var i=t.next;a=i;do{if((a.tag&e)===e){t=void 0;var c=a.create,u=a.inst;t=c(),u.destroy=t}a=a.next}while(a!==i)}}catch(s){Oe(l,l.return,s)}}function Ga(e,l,a){try{var t=l.updateQueue,i=t!==null?t.lastEffect:null;if(i!==null){var c=i.next;t=c;do{if((t.tag&e)===e){var u=t.inst,s=u.destroy;if(s!==void 0){u.destroy=void 0,i=l;var r=a,x=s;try{x()}catch(C){Oe(i,r,C)}}}t=t.next}while(t!==c)}}catch(C){Oe(l,l.return,C)}}function yr(e){var l=e.updateQueue;if(l!==null){var a=e.stateNode;try{ff(l,a)}catch(t){Oe(e,e.return,t)}}}function jr(e,l,a){a.props=yt(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(t){Oe(e,l,t)}}function Gn(e,l){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var t=e.stateNode;break;case 30:t=e.stateNode;break;default:t=e.stateNode}typeof a=="function"?e.refCleanup=a(t):a.current=t}}catch(i){Oe(e,l,i)}}function Il(e,l){var a=e.ref,t=e.refCleanup;if(a!==null)if(typeof t=="function")try{t()}catch(i){Oe(e,l,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(i){Oe(e,l,i)}else a.current=null}function Nr(e){var l=e.type,a=e.memoizedProps,t=e.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":a.autoFocus&&t.focus();break e;case"img":a.src?t.src=a.src:a.srcSet&&(t.srcset=a.srcSet)}}catch(i){Oe(e,e.return,i)}}function Ju(e,l,a){try{var t=e.stateNode;lh(t,e.type,a,l),t[hl]=l}catch(i){Oe(e,e.return,i)}}function _r(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Fa(e.type)||e.tag===4}function $u(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||_r(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&&Fa(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 Wu(e,l,a){var t=e.tag;if(t===5||t===6)e=e.stateNode,l?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,l):(l=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,l.appendChild(e),a=a._reactRootContainer,a!=null||l.onclick!==null||(l.onclick=ua));else if(t!==4&&(t===27&&Fa(e.type)&&(a=e.stateNode,l=null),e=e.child,e!==null))for(Wu(e,l,a),e=e.sibling;e!==null;)Wu(e,l,a),e=e.sibling}function Qi(e,l,a){var t=e.tag;if(t===5||t===6)e=e.stateNode,l?a.insertBefore(e,l):a.appendChild(e);else if(t!==4&&(t===27&&Fa(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(Qi(e,l,a),e=e.sibling;e!==null;)Qi(e,l,a),e=e.sibling}function Sr(e){var l=e.stateNode,a=e.memoizedProps;try{for(var t=e.type,i=l.attributes;i.length;)l.removeAttributeNode(i[0]);il(l,t,a),l[ll]=e,l[hl]=a}catch(c){Oe(e,e.return,c)}}var va=!1,$e=!1,Iu=!1,Tr=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function Mg(e,l){if(e=e.containerInfo,xs=rc,e=Ho(e),Kc(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var t=a.getSelection&&a.getSelection();if(t&&t.rangeCount!==0){a=t.anchorNode;var i=t.anchorOffset,c=t.focusNode;t=t.focusOffset;try{a.nodeType,c.nodeType}catch{a=null;break e}var u=0,s=-1,r=-1,x=0,C=0,O=e,y=null;l:for(;;){for(var N;O!==a||i!==0&&O.nodeType!==3||(s=u+i),O!==c||t!==0&&O.nodeType!==3||(r=u+t),O.nodeType===3&&(u+=O.nodeValue.length),(N=O.firstChild)!==null;)y=O,O=N;for(;;){if(O===e)break l;if(y===a&&++x===i&&(s=u),y===c&&++C===t&&(r=u),(N=O.nextSibling)!==null)break;O=y,y=O.parentNode}O=N}a=s===-1||r===-1?null:{start:s,end:r}}else a=null}a=a||{start:0,end:0}}else a=null;for(ys={focusedElem:e,selectionRange:a},rc=!1,Pe=l;Pe!==null;)if(l=Pe,e=l.child,(l.subtreeFlags&1028)!==0&&e!==null)e.return=l,Pe=e;else for(;Pe!==null;){switch(l=Pe,c=l.alternate,e=l.flags,l.tag){case 0:if((e&4)!==0&&(e=l.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)i=e[a],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&c!==null){e=void 0,a=l,i=c.memoizedProps,c=c.memoizedState,t=a.stateNode;try{var Z=yt(a.type,i);e=t.getSnapshotBeforeUpdate(Z,c),t.__reactInternalSnapshotBeforeUpdate=e}catch(ne){Oe(a,a.return,ne)}}break;case 3:if((e&1024)!==0){if(e=l.stateNode.containerInfo,a=e.nodeType,a===9)_s(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":_s(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(d(163))}if(e=l.sibling,e!==null){e.return=l.return,Pe=e;break}Pe=l.return}}function zr(e,l,a){var t=a.flags;switch(a.tag){case 0:case 11:case 15:xa(e,a),t&4&&Yn(5,a);break;case 1:if(xa(e,a),t&4)if(e=a.stateNode,l===null)try{e.componentDidMount()}catch(u){Oe(a,a.return,u)}else{var i=yt(a.type,l.memoizedProps);l=l.memoizedState;try{e.componentDidUpdate(i,l,e.__reactInternalSnapshotBeforeUpdate)}catch(u){Oe(a,a.return,u)}}t&64&&yr(a),t&512&&Gn(a,a.return);break;case 3:if(xa(e,a),t&64&&(e=a.updateQueue,e!==null)){if(l=null,a.child!==null)switch(a.child.tag){case 27:case 5:l=a.child.stateNode;break;case 1:l=a.child.stateNode}try{ff(e,l)}catch(u){Oe(a,a.return,u)}}break;case 27:l===null&&t&4&&Sr(a);case 26:case 5:xa(e,a),l===null&&t&4&&Nr(a),t&512&&Gn(a,a.return);break;case 12:xa(e,a);break;case 31:xa(e,a),t&4&&Ar(e,a);break;case 13:xa(e,a),t&4&&Or(e,a),t&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=Xg.bind(null,a),oh(e,a))));break;case 22:if(t=a.memoizedState!==null||va,!t){l=l!==null&&l.memoizedState!==null||$e,i=va;var c=$e;va=t,($e=l)&&!c?ya(e,a,(a.subtreeFlags&8772)!==0):xa(e,a),va=i,$e=c}break;case 30:break;default:xa(e,a)}}function Cr(e){var l=e.alternate;l!==null&&(e.alternate=null,Cr(l)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(l=e.stateNode,l!==null&&Ec(l)),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 Ve=null,vl=!1;function ba(e,l,a){for(a=a.child;a!==null;)Er(e,l,a),a=a.sibling}function Er(e,l,a){if(Ge&&typeof Ge.onCommitFiberUnmount=="function")try{Ge.onCommitFiberUnmount(Jl,a)}catch{}switch(a.tag){case 26:$e||Il(a,l),ba(e,l,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:$e||Il(a,l);var t=Ve,i=vl;Fa(a.type)&&(Ve=a.stateNode,vl=!1),ba(e,l,a),$n(a.stateNode),Ve=t,vl=i;break;case 5:$e||Il(a,l);case 6:if(t=Ve,i=vl,Ve=null,ba(e,l,a),Ve=t,vl=i,Ve!==null)if(vl)try{(Ve.nodeType===9?Ve.body:Ve.nodeName==="HTML"?Ve.ownerDocument.body:Ve).removeChild(a.stateNode)}catch(c){Oe(a,l,c)}else try{Ve.removeChild(a.stateNode)}catch(c){Oe(a,l,c)}break;case 18:Ve!==null&&(vl?(e=Ve,yd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),rn(e)):yd(Ve,a.stateNode));break;case 4:t=Ve,i=vl,Ve=a.stateNode.containerInfo,vl=!0,ba(e,l,a),Ve=t,vl=i;break;case 0:case 11:case 14:case 15:Ga(2,a,l),$e||Ga(4,a,l),ba(e,l,a);break;case 1:$e||(Il(a,l),t=a.stateNode,typeof t.componentWillUnmount=="function"&&jr(a,l,t)),ba(e,l,a);break;case 21:ba(e,l,a);break;case 22:$e=(t=$e)||a.memoizedState!==null,ba(e,l,a),$e=t;break;default:ba(e,l,a)}}function Ar(e,l){if(l.memoizedState===null&&(e=l.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{rn(e)}catch(a){Oe(l,l.return,a)}}}function Or(e,l){if(l.memoizedState===null&&(e=l.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{rn(e)}catch(a){Oe(l,l.return,a)}}function qg(e){switch(e.tag){case 31:case 13:case 19:var l=e.stateNode;return l===null&&(l=e.stateNode=new Tr),l;case 22:return e=e.stateNode,l=e._retryCache,l===null&&(l=e._retryCache=new Tr),l;default:throw Error(d(435,e.tag))}}function Ki(e,l){var a=qg(e);l.forEach(function(t){if(!a.has(t)){a.add(t);var i=Qg.bind(null,e,t);t.then(i,i)}})}function bl(e,l){var a=l.deletions;if(a!==null)for(var t=0;t<a.length;t++){var i=a[t],c=e,u=l,s=u;e:for(;s!==null;){switch(s.tag){case 27:if(Fa(s.type)){Ve=s.stateNode,vl=!1;break e}break;case 5:Ve=s.stateNode,vl=!1;break e;case 3:case 4:Ve=s.stateNode.containerInfo,vl=!0;break e}s=s.return}if(Ve===null)throw Error(d(160));Er(c,u,i),Ve=null,vl=!1,c=i.alternate,c!==null&&(c.return=null),i.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)Dr(l,e),l=l.sibling}var Zl=null;function Dr(e,l){var a=e.alternate,t=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:bl(l,e),xl(e),t&4&&(Ga(3,e,e.return),Yn(3,e),Ga(5,e,e.return));break;case 1:bl(l,e),xl(e),t&512&&($e||a===null||Il(a,a.return)),t&64&&va&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?t:a.concat(t))));break;case 26:var i=Zl;if(bl(l,e),xl(e),t&512&&($e||a===null||Il(a,a.return)),t&4){var c=a!==null?a.memoizedState:null;if(t=e.memoizedState,a===null)if(t===null)if(e.stateNode===null){e:{t=e.type,a=e.memoizedProps,i=i.ownerDocument||i;l:switch(t){case"title":c=i.getElementsByTagName("title")[0],(!c||c[gn]||c[ll]||c.namespaceURI==="http://www.w3.org/2000/svg"||c.hasAttribute("itemprop"))&&(c=i.createElement(t),i.head.insertBefore(c,i.querySelector("head > title"))),il(c,t,a),c[ll]=e,Ie(c),t=c;break e;case"link":var u=Dd("link","href",i).get(t+(a.href||""));if(u){for(var s=0;s<u.length;s++)if(c=u[s],c.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&c.getAttribute("rel")===(a.rel==null?null:a.rel)&&c.getAttribute("title")===(a.title==null?null:a.title)&&c.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){u.splice(s,1);break l}}c=i.createElement(t),il(c,t,a),i.head.appendChild(c);break;case"meta":if(u=Dd("meta","content",i).get(t+(a.content||""))){for(s=0;s<u.length;s++)if(c=u[s],c.getAttribute("content")===(a.content==null?null:""+a.content)&&c.getAttribute("name")===(a.name==null?null:a.name)&&c.getAttribute("property")===(a.property==null?null:a.property)&&c.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&c.getAttribute("charset")===(a.charSet==null?null:a.charSet)){u.splice(s,1);break l}}c=i.createElement(t),il(c,t,a),i.head.appendChild(c);break;default:throw Error(d(468,t))}c[ll]=e,Ie(c),t=c}e.stateNode=t}else Ud(i,e.type,e.stateNode);else e.stateNode=Od(i,t,e.memoizedProps);else c!==t?(c===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):c.count--,t===null?Ud(i,e.type,e.stateNode):Od(i,t,e.memoizedProps)):t===null&&e.stateNode!==null&&Ju(e,e.memoizedProps,a.memoizedProps)}break;case 27:bl(l,e),xl(e),t&512&&($e||a===null||Il(a,a.return)),a!==null&&t&4&&Ju(e,e.memoizedProps,a.memoizedProps);break;case 5:if(bl(l,e),xl(e),t&512&&($e||a===null||Il(a,a.return)),e.flags&32){i=e.stateNode;try{Rt(i,"")}catch(Z){Oe(e,e.return,Z)}}t&4&&e.stateNode!=null&&(i=e.memoizedProps,Ju(e,i,a!==null?a.memoizedProps:i)),t&1024&&(Iu=!0);break;case 6:if(bl(l,e),xl(e),t&4){if(e.stateNode===null)throw Error(d(162));t=e.memoizedProps,a=e.stateNode;try{a.nodeValue=t}catch(Z){Oe(e,e.return,Z)}}break;case 3:if(uc=null,i=Zl,Zl=ic(l.containerInfo),bl(l,e),Zl=i,xl(e),t&4&&a!==null&&a.memoizedState.isDehydrated)try{rn(l.containerInfo)}catch(Z){Oe(e,e.return,Z)}Iu&&(Iu=!1,Ur(e));break;case 4:t=Zl,Zl=ic(e.stateNode.containerInfo),bl(l,e),xl(e),Zl=t;break;case 12:bl(l,e),xl(e);break;case 31:bl(l,e),xl(e),t&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Ki(e,t)));break;case 13:bl(l,e),xl(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(wi=el()),t&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Ki(e,t)));break;case 22:i=e.memoizedState!==null;var r=a!==null&&a.memoizedState!==null,x=va,C=$e;if(va=x||i,$e=C||r,bl(l,e),$e=C,va=x,xl(e),t&8192)e:for(l=e.stateNode,l._visibility=i?l._visibility&-2:l._visibility|1,i&&(a===null||r||va||$e||jt(e)),a=null,l=e;;){if(l.tag===5||l.tag===26){if(a===null){r=a=l;try{if(c=r.stateNode,i)u=c.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none";else{s=r.stateNode;var O=r.memoizedProps.style,y=O!=null&&O.hasOwnProperty("display")?O.display:null;s.style.display=y==null||typeof y=="boolean"?"":(""+y).trim()}}catch(Z){Oe(r,r.return,Z)}}}else if(l.tag===6){if(a===null){r=l;try{r.stateNode.nodeValue=i?"":r.memoizedProps}catch(Z){Oe(r,r.return,Z)}}}else if(l.tag===18){if(a===null){r=l;try{var N=r.stateNode;i?jd(N,!0):jd(r.stateNode,!1)}catch(Z){Oe(r,r.return,Z)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===e)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===e)break e;for(;l.sibling===null;){if(l.return===null||l.return===e)break e;a===l&&(a=null),l=l.return}a===l&&(a=null),l.sibling.return=l.return,l=l.sibling}t&4&&(t=e.updateQueue,t!==null&&(a=t.retryQueue,a!==null&&(t.retryQueue=null,Ki(e,a))));break;case 19:bl(l,e),xl(e),t&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Ki(e,t)));break;case 30:break;case 21:break;default:bl(l,e),xl(e)}}function xl(e){var l=e.flags;if(l&2){try{for(var a,t=e.return;t!==null;){if(_r(t)){a=t;break}t=t.return}if(a==null)throw Error(d(160));switch(a.tag){case 27:var i=a.stateNode,c=$u(e);Qi(e,c,i);break;case 5:var u=a.stateNode;a.flags&32&&(Rt(u,""),a.flags&=-33);var s=$u(e);Qi(e,s,u);break;case 3:case 4:var r=a.stateNode.containerInfo,x=$u(e);Wu(e,x,r);break;default:throw Error(d(161))}}catch(C){Oe(e,e.return,C)}e.flags&=-3}l&4096&&(e.flags&=-4097)}function Ur(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var l=e;Ur(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),e=e.sibling}}function xa(e,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)zr(e,l.alternate,l),l=l.sibling}function jt(e){for(e=e.child;e!==null;){var l=e;switch(l.tag){case 0:case 11:case 14:case 15:Ga(4,l,l.return),jt(l);break;case 1:Il(l,l.return);var a=l.stateNode;typeof a.componentWillUnmount=="function"&&jr(l,l.return,a),jt(l);break;case 27:$n(l.stateNode);case 26:case 5:Il(l,l.return),jt(l);break;case 22:l.memoizedState===null&&jt(l);break;case 30:jt(l);break;default:jt(l)}e=e.sibling}}function ya(e,l,a){for(a=a&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var t=l.alternate,i=e,c=l,u=c.flags;switch(c.tag){case 0:case 11:case 15:ya(i,c,a),Yn(4,c);break;case 1:if(ya(i,c,a),t=c,i=t.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(x){Oe(t,t.return,x)}if(t=c,i=t.updateQueue,i!==null){var s=t.stateNode;try{var r=i.shared.hiddenCallbacks;if(r!==null)for(i.shared.hiddenCallbacks=null,i=0;i<r.length;i++)of(r[i],s)}catch(x){Oe(t,t.return,x)}}a&&u&64&&yr(c),Gn(c,c.return);break;case 27:Sr(c);case 26:case 5:ya(i,c,a),a&&t===null&&u&4&&Nr(c),Gn(c,c.return);break;case 12:ya(i,c,a);break;case 31:ya(i,c,a),a&&u&4&&Ar(i,c);break;case 13:ya(i,c,a),a&&u&4&&Or(i,c);break;case 22:c.memoizedState===null&&ya(i,c,a),Gn(c,c.return);break;case 30:break;default:ya(i,c,a)}l=l.sibling}}function Pu(e,l){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(e=l.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Cn(a))}function es(e,l){e=null,l.alternate!==null&&(e=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==e&&(l.refCount++,e!=null&&Cn(e))}function wl(e,l,a,t){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)Rr(e,l,a,t),l=l.sibling}function Rr(e,l,a,t){var i=l.flags;switch(l.tag){case 0:case 11:case 15:wl(e,l,a,t),i&2048&&Yn(9,l);break;case 1:wl(e,l,a,t);break;case 3:wl(e,l,a,t),i&2048&&(e=null,l.alternate!==null&&(e=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==e&&(l.refCount++,e!=null&&Cn(e)));break;case 12:if(i&2048){wl(e,l,a,t),e=l.stateNode;try{var c=l.memoizedProps,u=c.id,s=c.onPostCommit;typeof s=="function"&&s(u,l.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(r){Oe(l,l.return,r)}}else wl(e,l,a,t);break;case 31:wl(e,l,a,t);break;case 13:wl(e,l,a,t);break;case 23:break;case 22:c=l.stateNode,u=l.alternate,l.memoizedState!==null?c._visibility&2?wl(e,l,a,t):Ln(e,l):c._visibility&2?wl(e,l,a,t):(c._visibility|=2,Pt(e,l,a,t,(l.subtreeFlags&10256)!==0||!1)),i&2048&&Pu(u,l);break;case 24:wl(e,l,a,t),i&2048&&es(l.alternate,l);break;default:wl(e,l,a,t)}}function Pt(e,l,a,t,i){for(i=i&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var c=e,u=l,s=a,r=t,x=u.flags;switch(u.tag){case 0:case 11:case 15:Pt(c,u,s,r,i),Yn(8,u);break;case 23:break;case 22:var C=u.stateNode;u.memoizedState!==null?C._visibility&2?Pt(c,u,s,r,i):Ln(c,u):(C._visibility|=2,Pt(c,u,s,r,i)),i&&x&2048&&Pu(u.alternate,u);break;case 24:Pt(c,u,s,r,i),i&&x&2048&&es(u.alternate,u);break;default:Pt(c,u,s,r,i)}l=l.sibling}}function Ln(e,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var a=e,t=l,i=t.flags;switch(t.tag){case 22:Ln(a,t),i&2048&&Pu(t.alternate,t);break;case 24:Ln(a,t),i&2048&&es(t.alternate,t);break;default:Ln(a,t)}l=l.sibling}}var Xn=8192;function en(e,l,a){if(e.subtreeFlags&Xn)for(e=e.child;e!==null;)Mr(e,l,a),e=e.sibling}function Mr(e,l,a){switch(e.tag){case 26:en(e,l,a),e.flags&Xn&&e.memoizedState!==null&&jh(a,Zl,e.memoizedState,e.memoizedProps);break;case 5:en(e,l,a);break;case 3:case 4:var t=Zl;Zl=ic(e.stateNode.containerInfo),en(e,l,a),Zl=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=Xn,Xn=16777216,en(e,l,a),Xn=t):en(e,l,a));break;default:en(e,l,a)}}function qr(e){var l=e.alternate;if(l!==null&&(e=l.child,e!==null)){l.child=null;do l=e.sibling,e.sibling=null,e=l;while(e!==null)}}function Qn(e){var l=e.deletions;if((e.flags&16)!==0){if(l!==null)for(var a=0;a<l.length;a++){var t=l[a];Pe=t,Br(t,e)}qr(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Hr(e),e=e.sibling}function Hr(e){switch(e.tag){case 0:case 11:case 15:Qn(e),e.flags&2048&&Ga(9,e,e.return);break;case 3:Qn(e);break;case 12:Qn(e);break;case 22:var l=e.stateNode;e.memoizedState!==null&&l._visibility&2&&(e.return===null||e.return.tag!==13)?(l._visibility&=-3,Zi(e)):Qn(e);break;default:Qn(e)}}function Zi(e){var l=e.deletions;if((e.flags&16)!==0){if(l!==null)for(var a=0;a<l.length;a++){var t=l[a];Pe=t,Br(t,e)}qr(e)}for(e=e.child;e!==null;){switch(l=e,l.tag){case 0:case 11:case 15:Ga(8,l,l.return),Zi(l);break;case 22:a=l.stateNode,a._visibility&2&&(a._visibility&=-3,Zi(l));break;default:Zi(l)}e=e.sibling}}function Br(e,l){for(;Pe!==null;){var a=Pe;switch(a.tag){case 0:case 11:case 15:Ga(8,a,l);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var t=a.memoizedState.cachePool.pool;t!=null&&t.refCount++}break;case 24:Cn(a.memoizedState.cache)}if(t=a.child,t!==null)t.return=a,Pe=t;else e:for(a=e;Pe!==null;){t=Pe;var i=t.sibling,c=t.return;if(Cr(t),t===a){Pe=null;break e}if(i!==null){i.return=c,Pe=i;break e}Pe=c}}}var Hg={getCacheForType:function(e){var l=tl(we),a=l.data.get(e);return a===void 0&&(a=e(),l.data.set(e,a)),a},cacheSignal:function(){return tl(we).controller.signal}},Bg=typeof WeakMap=="function"?WeakMap:Map,Ce=0,He=null,pe=null,xe=0,Ae=0,El=null,La=!1,ln=!1,ls=!1,ja=0,Xe=0,Xa=0,Nt=0,as=0,Al=0,an=0,Kn=null,yl=null,ts=!1,wi=0,kr=0,Fi=1/0,Ji=null,Qa=null,We=0,Ka=null,tn=null,Na=0,ns=0,is=null,Vr=null,Zn=0,cs=null;function Ol(){return(Ce&2)!==0&&xe!==0?xe&-xe:S.T!==null?ds():Ps()}function Yr(){if(Al===0)if((xe&536870912)===0||je){var e=St;St<<=1,(St&3932160)===0&&(St=262144),Al=e}else Al=536870912;return e=zl.current,e!==null&&(e.flags|=32),Al}function jl(e,l,a){(e===He&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)&&(nn(e,0),Za(e,xe,Al,!1)),Ne(e,a),((Ce&2)===0||e!==He)&&(e===He&&((Ce&2)===0&&(Nt|=a),Xe===4&&Za(e,xe,Al,!1)),Pl(e))}function Gr(e,l,a){if((Ce&6)!==0)throw Error(d(327));var t=!a&&(l&127)===0&&(l&e.expiredLanes)===0||nt(e,l),i=t?Yg(e,l):ss(e,l,!0),c=t;do{if(i===0){ln&&!t&&Za(e,l,0,!1);break}else{if(a=e.current.alternate,c&&!kg(a)){i=ss(e,l,!1),c=!1;continue}if(i===2){if(c=l,e.errorRecoveryDisabledLanes&c)var u=0;else u=e.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){l=u;e:{var s=e;i=Kn;var r=s.current.memoizedState.isDehydrated;if(r&&(nn(s,u).flags|=256),u=ss(s,u,!1),u!==2){if(ls&&!r){s.errorRecoveryDisabledLanes|=c,Nt|=c,i=4;break e}c=yl,yl=i,c!==null&&(yl===null?yl=c:yl.push.apply(yl,c))}i=u}if(c=!1,i!==2)continue}}if(i===1){nn(e,0),Za(e,l,0,!0);break}e:{switch(t=e,c=i,c){case 0:case 1:throw Error(d(345));case 4:if((l&4194048)!==l)break;case 6:Za(t,l,Al,!La);break e;case 2:yl=null;break;case 3:case 5:break;default:throw Error(d(329))}if((l&62914560)===l&&(i=wi+300-el(),10<i)){if(Za(t,l,Al,!La),zt(t,0,!0)!==0)break e;Na=l,t.timeoutHandle=bd(Lr.bind(null,t,a,yl,Ji,ts,l,Al,Nt,an,La,c,"Throttled",-0,0),i);break e}Lr(t,a,yl,Ji,ts,l,Al,Nt,an,La,c,null,-0,0)}}break}while(!0);Pl(e)}function Lr(e,l,a,t,i,c,u,s,r,x,C,O,y,N){if(e.timeoutHandle=-1,O=l.subtreeFlags,O&8192||(O&16785408)===16785408){O={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ua},Mr(l,c,O);var Z=(c&62914560)===c?wi-el():(c&4194048)===c?kr-el():0;if(Z=Nh(O,Z),Z!==null){Na=c,e.cancelPendingCommit=Z($r.bind(null,e,l,c,a,t,i,u,s,r,C,O,null,y,N)),Za(e,c,u,!x);return}}$r(e,l,c,a,t,i,u,s,r)}function kg(e){for(var l=e;;){var a=l.tag;if((a===0||a===11||a===15)&&l.flags&16384&&(a=l.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var t=0;t<a.length;t++){var i=a[t],c=i.getSnapshot;i=i.value;try{if(!Sl(c(),i))return!1}catch{return!1}}if(a=l.child,l.subtreeFlags&16384&&a!==null)a.return=l,l=a;else{if(l===e)break;for(;l.sibling===null;){if(l.return===null||l.return===e)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function Za(e,l,a,t){l&=~as,l&=~Nt,e.suspendedLanes|=l,e.pingedLanes&=~l,t&&(e.warmLanes|=l),t=e.expirationTimes;for(var i=l;0<i;){var c=31-rl(i),u=1<<c;t[c]=-1,i&=~u}a!==0&&sl(e,a,l)}function $i(){return(Ce&6)===0?(wn(0),!1):!0}function us(){if(pe!==null){if(Ae===0)var e=pe.return;else e=pe,ra=mt=null,_u(e),Ft=null,An=0,e=pe;for(;e!==null;)xr(e.alternate,e),e=e.return;pe=null}}function nn(e,l){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,nh(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Na=0,us(),He=e,pe=a=oa(e.current,null),xe=l,Ae=0,El=null,La=!1,ln=nt(e,l),ls=!1,an=Al=as=Nt=Xa=Xe=0,yl=Kn=null,ts=!1,(l&8)!==0&&(l|=l&32);var t=e.entangledLanes;if(t!==0)for(e=e.entanglements,t&=l;0<t;){var i=31-rl(t),c=1<<i;l|=e[i],t&=~c}return ja=l,vi(),a}function Xr(e,l){de=null,S.H=Bn,l===wt||l===Ti?(l=nf(),Ae=3):l===ru?(l=nf(),Ae=4):Ae=l===Vu?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,El=l,pe===null&&(Xe=1,Vi(e,Hl(l,e.current)))}function Qr(){var e=zl.current;return e===null?!0:(xe&4194048)===xe?Yl===null:(xe&62914560)===xe||(xe&536870912)!==0?e===Yl:!1}function Kr(){var e=S.H;return S.H=Bn,e===null?Bn:e}function Zr(){var e=S.A;return S.A=Hg,e}function Wi(){Xe=4,La||(xe&4194048)!==xe&&zl.current!==null||(ln=!0),(Xa&134217727)===0&&(Nt&134217727)===0||He===null||Za(He,xe,Al,!1)}function ss(e,l,a){var t=Ce;Ce|=2;var i=Kr(),c=Zr();(He!==e||xe!==l)&&(Ji=null,nn(e,l)),l=!1;var u=Xe;e:do try{if(Ae!==0&&pe!==null){var s=pe,r=El;switch(Ae){case 8:us(),u=6;break e;case 3:case 2:case 9:case 6:zl.current===null&&(l=!0);var x=Ae;if(Ae=0,El=null,cn(e,s,r,x),a&&ln){u=0;break e}break;default:x=Ae,Ae=0,El=null,cn(e,s,r,x)}}Vg(),u=Xe;break}catch(C){Xr(e,C)}while(!0);return l&&e.shellSuspendCounter++,ra=mt=null,Ce=t,S.H=i,S.A=c,pe===null&&(He=null,xe=0,vi()),u}function Vg(){for(;pe!==null;)wr(pe)}function Yg(e,l){var a=Ce;Ce|=2;var t=Kr(),i=Zr();He!==e||xe!==l?(Ji=null,Fi=el()+500,nn(e,l)):ln=nt(e,l);e:do try{if(Ae!==0&&pe!==null){l=pe;var c=El;l:switch(Ae){case 1:Ae=0,El=null,cn(e,l,c,1);break;case 2:case 9:if(af(c)){Ae=0,El=null,Fr(l);break}l=function(){Ae!==2&&Ae!==9||He!==e||(Ae=7),Pl(e)},c.then(l,l);break e;case 3:Ae=7;break e;case 4:Ae=5;break e;case 7:af(c)?(Ae=0,El=null,Fr(l)):(Ae=0,El=null,cn(e,l,c,7));break;case 5:var u=null;switch(pe.tag){case 26:u=pe.memoizedState;case 5:case 27:var s=pe;if(u?Rd(u):s.stateNode.complete){Ae=0,El=null;var r=s.sibling;if(r!==null)pe=r;else{var x=s.return;x!==null?(pe=x,Ii(x)):pe=null}break l}}Ae=0,El=null,cn(e,l,c,5);break;case 6:Ae=0,El=null,cn(e,l,c,6);break;case 8:us(),Xe=6;break e;default:throw Error(d(462))}}Gg();break}catch(C){Xr(e,C)}while(!0);return ra=mt=null,S.H=t,S.A=i,Ce=a,pe!==null?0:(He=null,xe=0,vi(),Xe)}function Gg(){for(;pe!==null&&!Xl();)wr(pe)}function wr(e){var l=vr(e.alternate,e,ja);e.memoizedProps=e.pendingProps,l===null?Ii(e):pe=l}function Fr(e){var l=e,a=l.alternate;switch(l.tag){case 15:case 0:l=rr(a,l,l.pendingProps,l.type,void 0,xe);break;case 11:l=rr(a,l,l.pendingProps,l.type.render,l.ref,xe);break;case 5:_u(l);default:xr(a,l),l=pe=Ko(l,ja),l=vr(a,l,ja)}e.memoizedProps=e.pendingProps,l===null?Ii(e):pe=l}function cn(e,l,a,t){ra=mt=null,_u(l),Ft=null,An=0;var i=l.return;try{if(Ag(e,i,l,a,xe)){Xe=1,Vi(e,Hl(a,e.current)),pe=null;return}}catch(c){if(i!==null)throw pe=i,c;Xe=1,Vi(e,Hl(a,e.current)),pe=null;return}l.flags&32768?(je||t===1?e=!0:ln||(xe&536870912)!==0?e=!1:(La=e=!0,(t===2||t===9||t===3||t===6)&&(t=zl.current,t!==null&&t.tag===13&&(t.flags|=16384))),Jr(l,e)):Ii(l)}function Ii(e){var l=e;do{if((l.flags&32768)!==0){Jr(l,La);return}e=l.return;var a=Ug(l.alternate,l,ja);if(a!==null){pe=a;return}if(l=l.sibling,l!==null){pe=l;return}pe=l=e}while(l!==null);Xe===0&&(Xe=5)}function Jr(e,l){do{var a=Rg(e.alternate,e);if(a!==null){a.flags&=32767,pe=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!l&&(e=e.sibling,e!==null)){pe=e;return}pe=e=a}while(e!==null);Xe=6,pe=null}function $r(e,l,a,t,i,c,u,s,r){e.cancelPendingCommit=null;do Pi();while(We!==0);if((Ce&6)!==0)throw Error(d(327));if(l!==null){if(l===e.current)throw Error(d(177));if(c=l.lanes|l.childLanes,c|=$c,qe(e,a,c,u,s,r),e===He&&(pe=He=null,xe=0),tn=l,Ka=e,Na=a,ns=c,is=i,Vr=t,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Kg(Ea,function(){return ld(),null})):(e.callbackNode=null,e.callbackPriority=0),t=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||t){t=S.T,S.T=null,i=k.p,k.p=2,u=Ce,Ce|=4;try{Mg(e,l,a)}finally{Ce=u,k.p=i,S.T=t}}We=1,Wr(),Ir(),Pr()}}function Wr(){if(We===1){We=0;var e=Ka,l=tn,a=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||a){a=S.T,S.T=null;var t=k.p;k.p=2;var i=Ce;Ce|=4;try{Dr(l,e);var c=ys,u=Ho(e.containerInfo),s=c.focusedElem,r=c.selectionRange;if(u!==s&&s&&s.ownerDocument&&qo(s.ownerDocument.documentElement,s)){if(r!==null&&Kc(s)){var x=r.start,C=r.end;if(C===void 0&&(C=x),"selectionStart"in s)s.selectionStart=x,s.selectionEnd=Math.min(C,s.value.length);else{var O=s.ownerDocument||document,y=O&&O.defaultView||window;if(y.getSelection){var N=y.getSelection(),Z=s.textContent.length,ne=Math.min(r.start,Z),Re=r.end===void 0?ne:Math.min(r.end,Z);!N.extend&&ne>Re&&(u=Re,Re=ne,ne=u);var v=Mo(s,ne),h=Mo(s,Re);if(v&&h&&(N.rangeCount!==1||N.anchorNode!==v.node||N.anchorOffset!==v.offset||N.focusNode!==h.node||N.focusOffset!==h.offset)){var b=O.createRange();b.setStart(v.node,v.offset),N.removeAllRanges(),ne>Re?(N.addRange(b),N.extend(h.node,h.offset)):(b.setEnd(h.node,h.offset),N.addRange(b))}}}}for(O=[],N=s;N=N.parentNode;)N.nodeType===1&&O.push({element:N,left:N.scrollLeft,top:N.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<O.length;s++){var A=O[s];A.element.scrollLeft=A.left,A.element.scrollTop=A.top}}rc=!!xs,ys=xs=null}finally{Ce=i,k.p=t,S.T=a}}e.current=l,We=2}}function Ir(){if(We===2){We=0;var e=Ka,l=tn,a=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||a){a=S.T,S.T=null;var t=k.p;k.p=2;var i=Ce;Ce|=4;try{zr(e,l.alternate,l)}finally{Ce=i,k.p=t,S.T=a}}We=3}}function Pr(){if(We===4||We===3){We=0,ta();var e=Ka,l=tn,a=Na,t=Vr;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?We=5:(We=0,tn=Ka=null,ed(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Qa=null),zc(a),l=l.stateNode,Ge&&typeof Ge.onCommitFiberRoot=="function")try{Ge.onCommitFiberRoot(Jl,l,void 0,(l.current.flags&128)===128)}catch{}if(t!==null){l=S.T,i=k.p,k.p=2,S.T=null;try{for(var c=e.onRecoverableError,u=0;u<t.length;u++){var s=t[u];c(s.value,{componentStack:s.stack})}}finally{S.T=l,k.p=i}}(Na&3)!==0&&Pi(),Pl(e),i=e.pendingLanes,(a&261930)!==0&&(i&42)!==0?e===cs?Zn++:(Zn=0,cs=e):Zn=0,wn(0)}}function ed(e,l){(e.pooledCacheLanes&=l)===0&&(l=e.pooledCache,l!=null&&(e.pooledCache=null,Cn(l)))}function Pi(){return Wr(),Ir(),Pr(),ld()}function ld(){if(We!==5)return!1;var e=Ka,l=ns;ns=0;var a=zc(Na),t=S.T,i=k.p;try{k.p=32>a?32:a,S.T=null,a=is,is=null;var c=Ka,u=Na;if(We=0,tn=Ka=null,Na=0,(Ce&6)!==0)throw Error(d(331));var s=Ce;if(Ce|=4,Hr(c.current),Rr(c,c.current,u,a),Ce=s,wn(0,!1),Ge&&typeof Ge.onPostCommitFiberRoot=="function")try{Ge.onPostCommitFiberRoot(Jl,c)}catch{}return!0}finally{k.p=i,S.T=t,ed(e,l)}}function ad(e,l,a){l=Hl(a,l),l=ku(e.stateNode,l,2),e=ka(e,l,2),e!==null&&(Ne(e,2),Pl(e))}function Oe(e,l,a){if(e.tag===3)ad(e,e,a);else for(;l!==null;){if(l.tag===3){ad(l,e,a);break}else if(l.tag===1){var t=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof t.componentDidCatch=="function"&&(Qa===null||!Qa.has(t))){e=Hl(a,e),a=tr(2),t=ka(l,a,2),t!==null&&(nr(a,t,l,e),Ne(t,2),Pl(t));break}}l=l.return}}function os(e,l,a){var t=e.pingCache;if(t===null){t=e.pingCache=new Bg;var i=new Set;t.set(l,i)}else i=t.get(l),i===void 0&&(i=new Set,t.set(l,i));i.has(a)||(ls=!0,i.add(a),e=Lg.bind(null,e,l,a),l.then(e,e))}function Lg(e,l,a){var t=e.pingCache;t!==null&&t.delete(l),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,He===e&&(xe&a)===a&&(Xe===4||Xe===3&&(xe&62914560)===xe&&300>el()-wi?(Ce&2)===0&&nn(e,0):as|=a,an===xe&&(an=0)),Pl(e)}function td(e,l){l===0&&(l=Q()),e=ft(e,l),e!==null&&(Ne(e,l),Pl(e))}function Xg(e){var l=e.memoizedState,a=0;l!==null&&(a=l.retryLane),td(e,a)}function Qg(e,l){var a=0;switch(e.tag){case 31:case 13:var t=e.stateNode,i=e.memoizedState;i!==null&&(a=i.retryLane);break;case 19:t=e.stateNode;break;case 22:t=e.stateNode._retryCache;break;default:throw Error(d(314))}t!==null&&t.delete(l),td(e,a)}function Kg(e,l){return lt(e,l)}var ec=null,un=null,fs=!1,lc=!1,rs=!1,wa=0;function Pl(e){e!==un&&e.next===null&&(un===null?ec=un=e:un=un.next=e),lc=!0,fs||(fs=!0,wg())}function wn(e,l){if(!rs&&lc){rs=!0;do for(var a=!1,t=ec;t!==null;){if(e!==0){var i=t.pendingLanes;if(i===0)var c=0;else{var u=t.suspendedLanes,s=t.pingedLanes;c=(1<<31-rl(42|e)+1)-1,c&=i&~(u&~s),c=c&201326741?c&201326741|1:c?c|2:0}c!==0&&(a=!0,ud(t,c))}else c=xe,c=zt(t,t===He?c:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),(c&3)===0||nt(t,c)||(a=!0,ud(t,c));t=t.next}while(a);rs=!1}}function Zg(){nd()}function nd(){lc=fs=!1;var e=0;wa!==0&&th()&&(e=wa);for(var l=el(),a=null,t=ec;t!==null;){var i=t.next,c=id(t,l);c===0?(t.next=null,a===null?ec=i:a.next=i,i===null&&(un=a)):(a=t,(e!==0||(c&3)!==0)&&(lc=!0)),t=i}We!==0&&We!==5||wn(e),wa!==0&&(wa=0)}function id(e,l){for(var a=e.suspendedLanes,t=e.pingedLanes,i=e.expirationTimes,c=e.pendingLanes&-62914561;0<c;){var u=31-rl(c),s=1<<u,r=i[u];r===-1?((s&a)===0||(s&t)!==0)&&(i[u]=Sc(s,l)):r<=l&&(e.expiredLanes|=s),c&=~s}if(l=He,a=xe,a=zt(e,e===l?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),t=e.callbackNode,a===0||e===l&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)return t!==null&&t!==null&&at(t),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||nt(e,a)){if(l=a&-a,l===e.callbackPriority)return l;switch(t!==null&&at(t),zc(a)){case 2:case 8:a=Ql;break;case 32:a=Ea;break;case 268435456:a=Aa;break;default:a=Ea}return t=cd.bind(null,e),a=lt(a,t),e.callbackPriority=l,e.callbackNode=a,l}return t!==null&&t!==null&&at(t),e.callbackPriority=2,e.callbackNode=null,2}function cd(e,l){if(We!==0&&We!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Pi()&&e.callbackNode!==a)return null;var t=xe;return t=zt(e,e===He?t:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),t===0?null:(Gr(e,t,l),id(e,el()),e.callbackNode!=null&&e.callbackNode===a?cd.bind(null,e):null)}function ud(e,l){if(Pi())return null;Gr(e,l,!0)}function wg(){ih(function(){(Ce&6)!==0?lt(gl,Zg):nd()})}function ds(){if(wa===0){var e=Kt;e===0&&(e=tt,tt<<=1,(tt&261888)===0&&(tt=256)),wa=e}return wa}function sd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:oi(""+e)}function od(e,l){var a=l.ownerDocument.createElement("input");return a.name=l.name,a.value=l.value,e.id&&a.setAttribute("form",e.id),l.parentNode.insertBefore(a,l),e=new FormData(e),a.parentNode.removeChild(a),e}function Fg(e,l,a,t,i){if(l==="submit"&&a&&a.stateNode===i){var c=sd((i[hl]||null).action),u=t.submitter;u&&(l=(l=u[hl]||null)?sd(l.formAction):u.getAttribute("formAction"),l!==null&&(c=l,u=null));var s=new mi("action","action",null,t,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(t.defaultPrevented){if(wa!==0){var r=u?od(i,u):new FormData(i);Uu(a,{pending:!0,data:r,method:i.method,action:c},null,r)}}else typeof c=="function"&&(s.preventDefault(),r=u?od(i,u):new FormData(i),Uu(a,{pending:!0,data:r,method:i.method,action:c},c,r))},currentTarget:i}]})}}for(var ms=0;ms<Jc.length;ms++){var gs=Jc[ms],Jg=gs.toLowerCase(),$g=gs[0].toUpperCase()+gs.slice(1);Kl(Jg,"on"+$g)}Kl(Vo,"onAnimationEnd"),Kl(Yo,"onAnimationIteration"),Kl(Go,"onAnimationStart"),Kl("dblclick","onDoubleClick"),Kl("focusin","onFocus"),Kl("focusout","onBlur"),Kl(dg,"onTransitionRun"),Kl(mg,"onTransitionStart"),Kl(gg,"onTransitionCancel"),Kl(Lo,"onTransitionEnd"),Dt("onMouseEnter",["mouseout","mouseover"]),Dt("onMouseLeave",["mouseout","mouseover"]),Dt("onPointerEnter",["pointerout","pointerover"]),Dt("onPointerLeave",["pointerout","pointerover"]),ct("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ct("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ct("onBeforeInput",["compositionend","keypress","textInput","paste"]),ct("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ct("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ct("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Fn="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(" "),Wg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Fn));function fd(e,l){l=(l&4)!==0;for(var a=0;a<e.length;a++){var t=e[a],i=t.event;t=t.listeners;e:{var c=void 0;if(l)for(var u=t.length-1;0<=u;u--){var s=t[u],r=s.instance,x=s.currentTarget;if(s=s.listener,r!==c&&i.isPropagationStopped())break e;c=s,i.currentTarget=x;try{c(i)}catch(C){pi(C)}i.currentTarget=null,c=r}else for(u=0;u<t.length;u++){if(s=t[u],r=s.instance,x=s.currentTarget,s=s.listener,r!==c&&i.isPropagationStopped())break e;c=s,i.currentTarget=x;try{c(i)}catch(C){pi(C)}i.currentTarget=null,c=r}}}}function ve(e,l){var a=l[Cc];a===void 0&&(a=l[Cc]=new Set);var t=e+"__bubble";a.has(t)||(rd(l,e,2,!1),a.add(t))}function hs(e,l,a){var t=0;l&&(t|=4),rd(a,e,t,l)}var ac="_reactListening"+Math.random().toString(36).slice(2);function ps(e){if(!e[ac]){e[ac]=!0,ao.forEach(function(a){a!=="selectionchange"&&(Wg.has(a)||hs(a,!1,e),hs(a,!0,e))});var l=e.nodeType===9?e:e.ownerDocument;l===null||l[ac]||(l[ac]=!0,hs("selectionchange",!1,l))}}function rd(e,l,a,t){switch(Yd(l)){case 2:var i=Th;break;case 8:i=zh;break;default:i=Ds}a=i.bind(null,l,a,e),i=void 0,!Hc||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(i=!0),t?i!==void 0?e.addEventListener(l,a,{capture:!0,passive:i}):e.addEventListener(l,a,!0):i!==void 0?e.addEventListener(l,a,{passive:i}):e.addEventListener(l,a,!1)}function vs(e,l,a,t,i){var c=t;if((l&1)===0&&(l&2)===0&&t!==null)e:for(;;){if(t===null)return;var u=t.tag;if(u===3||u===4){var s=t.stateNode.containerInfo;if(s===i)break;if(u===4)for(u=t.return;u!==null;){var r=u.tag;if((r===3||r===4)&&u.stateNode.containerInfo===i)return;u=u.return}for(;s!==null;){if(u=Et(s),u===null)return;if(r=u.tag,r===5||r===6||r===26||r===27){t=c=u;continue e}s=s.parentNode}}t=t.return}ho(function(){var x=c,C=Mc(a),O=[];e:{var y=Xo.get(e);if(y!==void 0){var N=mi,Z=e;switch(e){case"keypress":if(ri(a)===0)break e;case"keydown":case"keyup":N=Qm;break;case"focusin":Z="focus",N=Yc;break;case"focusout":Z="blur",N=Yc;break;case"beforeblur":case"afterblur":N=Yc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":N=bo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":N=Um;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":N=wm;break;case Vo:case Yo:case Go:N=qm;break;case Lo:N=Jm;break;case"scroll":case"scrollend":N=Om;break;case"wheel":N=Wm;break;case"copy":case"cut":case"paste":N=Bm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":N=yo;break;case"toggle":case"beforetoggle":N=Pm}var ne=(l&4)!==0,Re=!ne&&(e==="scroll"||e==="scrollend"),v=ne?y!==null?y+"Capture":null:y;ne=[];for(var h=x,b;h!==null;){var A=h;if(b=A.stateNode,A=A.tag,A!==5&&A!==26&&A!==27||b===null||v===null||(A=pn(h,v),A!=null&&ne.push(Jn(h,A,b))),Re)break;h=h.return}0<ne.length&&(y=new N(y,Z,null,a,C),O.push({event:y,listeners:ne}))}}if((l&7)===0){e:{if(y=e==="mouseover"||e==="pointerover",N=e==="mouseout"||e==="pointerout",y&&a!==Rc&&(Z=a.relatedTarget||a.fromElement)&&(Et(Z)||Z[Ct]))break e;if((N||y)&&(y=C.window===C?C:(y=C.ownerDocument)?y.defaultView||y.parentWindow:window,N?(Z=a.relatedTarget||a.toElement,N=x,Z=Z?Et(Z):null,Z!==null&&(Re=R(Z),ne=Z.tag,Z!==Re||ne!==5&&ne!==27&&ne!==6)&&(Z=null)):(N=null,Z=x),N!==Z)){if(ne=bo,A="onMouseLeave",v="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(ne=yo,A="onPointerLeave",v="onPointerEnter",h="pointer"),Re=N==null?y:hn(N),b=Z==null?y:hn(Z),y=new ne(A,h+"leave",N,a,C),y.target=Re,y.relatedTarget=b,A=null,Et(C)===x&&(ne=new ne(v,h+"enter",Z,a,C),ne.target=b,ne.relatedTarget=Re,A=ne),Re=A,N&&Z)l:{for(ne=Ig,v=N,h=Z,b=0,A=v;A;A=ne(A))b++;A=0;for(var P=h;P;P=ne(P))A++;for(;0<b-A;)v=ne(v),b--;for(;0<A-b;)h=ne(h),A--;for(;b--;){if(v===h||h!==null&&v===h.alternate){ne=v;break l}v=ne(v),h=ne(h)}ne=null}else ne=null;N!==null&&dd(O,y,N,ne,!1),Z!==null&&Re!==null&&dd(O,Re,Z,ne,!0)}}e:{if(y=x?hn(x):window,N=y.nodeName&&y.nodeName.toLowerCase(),N==="select"||N==="input"&&y.type==="file")var _e=Eo;else if(zo(y))if(Ao)_e=og;else{_e=ug;var J=cg}else N=y.nodeName,!N||N.toLowerCase()!=="input"||y.type!=="checkbox"&&y.type!=="radio"?x&&Uc(x.elementType)&&(_e=Eo):_e=sg;if(_e&&(_e=_e(e,x))){Co(O,_e,a,C);break e}J&&J(e,y,x),e==="focusout"&&x&&y.type==="number"&&x.memoizedProps.value!=null&&Dc(y,"number",y.value)}switch(J=x?hn(x):window,e){case"focusin":(zo(J)||J.contentEditable==="true")&&(Bt=J,Zc=x,Sn=null);break;case"focusout":Sn=Zc=Bt=null;break;case"mousedown":wc=!0;break;case"contextmenu":case"mouseup":case"dragend":wc=!1,Bo(O,a,C);break;case"selectionchange":if(rg)break;case"keydown":case"keyup":Bo(O,a,C)}var me;if(Lc)e:{switch(e){case"compositionstart":var ye="onCompositionStart";break e;case"compositionend":ye="onCompositionEnd";break e;case"compositionupdate":ye="onCompositionUpdate";break e}ye=void 0}else Ht?So(e,a)&&(ye="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(ye="onCompositionStart");ye&&(jo&&a.locale!=="ko"&&(Ht||ye!=="onCompositionStart"?ye==="onCompositionEnd"&&Ht&&(me=po()):(Da=C,Bc="value"in Da?Da.value:Da.textContent,Ht=!0)),J=tc(x,ye),0<J.length&&(ye=new xo(ye,e,null,a,C),O.push({event:ye,listeners:J}),me?ye.data=me:(me=To(a),me!==null&&(ye.data=me)))),(me=lg?ag(e,a):tg(e,a))&&(ye=tc(x,"onBeforeInput"),0<ye.length&&(J=new xo("onBeforeInput","beforeinput",null,a,C),O.push({event:J,listeners:ye}),J.data=me)),Fg(O,e,x,a,C)}fd(O,l)})}function Jn(e,l,a){return{instance:e,listener:l,currentTarget:a}}function tc(e,l){for(var a=l+"Capture",t=[];e!==null;){var i=e,c=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||c===null||(i=pn(e,a),i!=null&&t.unshift(Jn(e,i,c)),i=pn(e,l),i!=null&&t.push(Jn(e,i,c))),e.tag===3)return t;e=e.return}return[]}function Ig(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function dd(e,l,a,t,i){for(var c=l._reactName,u=[];a!==null&&a!==t;){var s=a,r=s.alternate,x=s.stateNode;if(s=s.tag,r!==null&&r===t)break;s!==5&&s!==26&&s!==27||x===null||(r=x,i?(x=pn(a,c),x!=null&&u.unshift(Jn(a,x,r))):i||(x=pn(a,c),x!=null&&u.push(Jn(a,x,r)))),a=a.return}u.length!==0&&e.push({event:l,listeners:u})}var Pg=/\r\n?/g,eh=/\u0000|\uFFFD/g;function md(e){return(typeof e=="string"?e:""+e).replace(Pg,`
9
+ `).replace(eh,"")}function gd(e,l){return l=md(l),md(e)===l}function Ue(e,l,a,t,i,c){switch(a){case"children":typeof t=="string"?l==="body"||l==="textarea"&&t===""||Rt(e,t):(typeof t=="number"||typeof t=="bigint")&&l!=="body"&&Rt(e,""+t);break;case"className":ui(e,"class",t);break;case"tabIndex":ui(e,"tabindex",t);break;case"dir":case"role":case"viewBox":case"width":case"height":ui(e,a,t);break;case"style":mo(e,t,c);break;case"data":if(l!=="object"){ui(e,"data",t);break}case"src":case"href":if(t===""&&(l!=="a"||a!=="href")){e.removeAttribute(a);break}if(t==null||typeof t=="function"||typeof t=="symbol"||typeof t=="boolean"){e.removeAttribute(a);break}t=oi(""+t),e.setAttribute(a,t);break;case"action":case"formAction":if(typeof t=="function"){e.setAttribute(a,"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 c=="function"&&(a==="formAction"?(l!=="input"&&Ue(e,l,"name",i.name,i,null),Ue(e,l,"formEncType",i.formEncType,i,null),Ue(e,l,"formMethod",i.formMethod,i,null),Ue(e,l,"formTarget",i.formTarget,i,null)):(Ue(e,l,"encType",i.encType,i,null),Ue(e,l,"method",i.method,i,null),Ue(e,l,"target",i.target,i,null)));if(t==null||typeof t=="symbol"||typeof t=="boolean"){e.removeAttribute(a);break}t=oi(""+t),e.setAttribute(a,t);break;case"onClick":t!=null&&(e.onclick=ua);break;case"onScroll":t!=null&&ve("scroll",e);break;case"onScrollEnd":t!=null&&ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(t!=null){if(typeof t!="object"||!("__html"in t))throw Error(d(61));if(a=t.__html,a!=null){if(i.children!=null)throw Error(d(60));e.innerHTML=a}}break;case"multiple":e.multiple=t&&typeof t!="function"&&typeof t!="symbol";break;case"muted":e.muted=t&&typeof t!="function"&&typeof t!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(t==null||typeof t=="function"||typeof t=="boolean"||typeof t=="symbol"){e.removeAttribute("xlink:href");break}a=oi(""+t),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":t!=null&&typeof t!="function"&&typeof t!="symbol"?e.setAttribute(a,""+t):e.removeAttribute(a);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":t&&typeof t!="function"&&typeof t!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":t===!0?e.setAttribute(a,""):t!==!1&&t!=null&&typeof t!="function"&&typeof t!="symbol"?e.setAttribute(a,t):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":t!=null&&typeof t!="function"&&typeof t!="symbol"&&!isNaN(t)&&1<=t?e.setAttribute(a,t):e.removeAttribute(a);break;case"rowSpan":case"start":t==null||typeof t=="function"||typeof t=="symbol"||isNaN(t)?e.removeAttribute(a):e.setAttribute(a,t);break;case"popover":ve("beforetoggle",e),ve("toggle",e),ci(e,"popover",t);break;case"xlinkActuate":ca(e,"http://www.w3.org/1999/xlink","xlink:actuate",t);break;case"xlinkArcrole":ca(e,"http://www.w3.org/1999/xlink","xlink:arcrole",t);break;case"xlinkRole":ca(e,"http://www.w3.org/1999/xlink","xlink:role",t);break;case"xlinkShow":ca(e,"http://www.w3.org/1999/xlink","xlink:show",t);break;case"xlinkTitle":ca(e,"http://www.w3.org/1999/xlink","xlink:title",t);break;case"xlinkType":ca(e,"http://www.w3.org/1999/xlink","xlink:type",t);break;case"xmlBase":ca(e,"http://www.w3.org/XML/1998/namespace","xml:base",t);break;case"xmlLang":ca(e,"http://www.w3.org/XML/1998/namespace","xml:lang",t);break;case"xmlSpace":ca(e,"http://www.w3.org/XML/1998/namespace","xml:space",t);break;case"is":ci(e,"is",t);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Em.get(a)||a,ci(e,a,t))}}function bs(e,l,a,t,i,c){switch(a){case"style":mo(e,t,c);break;case"dangerouslySetInnerHTML":if(t!=null){if(typeof t!="object"||!("__html"in t))throw Error(d(61));if(a=t.__html,a!=null){if(i.children!=null)throw Error(d(60));e.innerHTML=a}}break;case"children":typeof t=="string"?Rt(e,t):(typeof t=="number"||typeof t=="bigint")&&Rt(e,""+t);break;case"onScroll":t!=null&&ve("scroll",e);break;case"onScrollEnd":t!=null&&ve("scrollend",e);break;case"onClick":t!=null&&(e.onclick=ua);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!to.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(i=a.endsWith("Capture"),l=a.slice(2,i?a.length-7:void 0),c=e[hl]||null,c=c!=null?c[a]:null,typeof c=="function"&&e.removeEventListener(l,c,i),typeof t=="function")){typeof c!="function"&&c!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(l,t,i);break e}a in e?e[a]=t:t===!0?e.setAttribute(a,""):ci(e,a,t)}}}function il(e,l,a){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ve("error",e),ve("load",e);var t=!1,i=!1,c;for(c in a)if(a.hasOwnProperty(c)){var u=a[c];if(u!=null)switch(c){case"src":t=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(d(137,l));default:Ue(e,l,c,u,a,null)}}i&&Ue(e,l,"srcSet",a.srcSet,a,null),t&&Ue(e,l,"src",a.src,a,null);return;case"input":ve("invalid",e);var s=c=u=i=null,r=null,x=null;for(t in a)if(a.hasOwnProperty(t)){var C=a[t];if(C!=null)switch(t){case"name":i=C;break;case"type":u=C;break;case"checked":r=C;break;case"defaultChecked":x=C;break;case"value":c=C;break;case"defaultValue":s=C;break;case"children":case"dangerouslySetInnerHTML":if(C!=null)throw Error(d(137,l));break;default:Ue(e,l,t,C,a,null)}}so(e,c,s,r,x,u,i,!1);return;case"select":ve("invalid",e),t=u=c=null;for(i in a)if(a.hasOwnProperty(i)&&(s=a[i],s!=null))switch(i){case"value":c=s;break;case"defaultValue":u=s;break;case"multiple":t=s;default:Ue(e,l,i,s,a,null)}l=c,a=u,e.multiple=!!t,l!=null?Ut(e,!!t,l,!1):a!=null&&Ut(e,!!t,a,!0);return;case"textarea":ve("invalid",e),c=i=t=null;for(u in a)if(a.hasOwnProperty(u)&&(s=a[u],s!=null))switch(u){case"value":t=s;break;case"defaultValue":i=s;break;case"children":c=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(d(91));break;default:Ue(e,l,u,s,a,null)}fo(e,t,i,c);return;case"option":for(r in a)a.hasOwnProperty(r)&&(t=a[r],t!=null)&&(r==="selected"?e.selected=t&&typeof t!="function"&&typeof t!="symbol":Ue(e,l,r,t,a,null));return;case"dialog":ve("beforetoggle",e),ve("toggle",e),ve("cancel",e),ve("close",e);break;case"iframe":case"object":ve("load",e);break;case"video":case"audio":for(t=0;t<Fn.length;t++)ve(Fn[t],e);break;case"image":ve("error",e),ve("load",e);break;case"details":ve("toggle",e);break;case"embed":case"source":case"link":ve("error",e),ve("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(x in a)if(a.hasOwnProperty(x)&&(t=a[x],t!=null))switch(x){case"children":case"dangerouslySetInnerHTML":throw Error(d(137,l));default:Ue(e,l,x,t,a,null)}return;default:if(Uc(l)){for(C in a)a.hasOwnProperty(C)&&(t=a[C],t!==void 0&&bs(e,l,C,t,a,void 0));return}}for(s in a)a.hasOwnProperty(s)&&(t=a[s],t!=null&&Ue(e,l,s,t,a,null))}function lh(e,l,a,t){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,c=null,u=null,s=null,r=null,x=null,C=null;for(N in a){var O=a[N];if(a.hasOwnProperty(N)&&O!=null)switch(N){case"checked":break;case"value":break;case"defaultValue":r=O;default:t.hasOwnProperty(N)||Ue(e,l,N,null,t,O)}}for(var y in t){var N=t[y];if(O=a[y],t.hasOwnProperty(y)&&(N!=null||O!=null))switch(y){case"type":c=N;break;case"name":i=N;break;case"checked":x=N;break;case"defaultChecked":C=N;break;case"value":u=N;break;case"defaultValue":s=N;break;case"children":case"dangerouslySetInnerHTML":if(N!=null)throw Error(d(137,l));break;default:N!==O&&Ue(e,l,y,N,t,O)}}Oc(e,u,s,r,x,C,c,i);return;case"select":N=u=s=y=null;for(c in a)if(r=a[c],a.hasOwnProperty(c)&&r!=null)switch(c){case"value":break;case"multiple":N=r;default:t.hasOwnProperty(c)||Ue(e,l,c,null,t,r)}for(i in t)if(c=t[i],r=a[i],t.hasOwnProperty(i)&&(c!=null||r!=null))switch(i){case"value":y=c;break;case"defaultValue":s=c;break;case"multiple":u=c;default:c!==r&&Ue(e,l,i,c,t,r)}l=s,a=u,t=N,y!=null?Ut(e,!!a,y,!1):!!t!=!!a&&(l!=null?Ut(e,!!a,l,!0):Ut(e,!!a,a?[]:"",!1));return;case"textarea":N=y=null;for(s in a)if(i=a[s],a.hasOwnProperty(s)&&i!=null&&!t.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:Ue(e,l,s,null,t,i)}for(u in t)if(i=t[u],c=a[u],t.hasOwnProperty(u)&&(i!=null||c!=null))switch(u){case"value":y=i;break;case"defaultValue":N=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(d(91));break;default:i!==c&&Ue(e,l,u,i,t,c)}oo(e,y,N);return;case"option":for(var Z in a)y=a[Z],a.hasOwnProperty(Z)&&y!=null&&!t.hasOwnProperty(Z)&&(Z==="selected"?e.selected=!1:Ue(e,l,Z,null,t,y));for(r in t)y=t[r],N=a[r],t.hasOwnProperty(r)&&y!==N&&(y!=null||N!=null)&&(r==="selected"?e.selected=y&&typeof y!="function"&&typeof y!="symbol":Ue(e,l,r,y,t,N));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 ne in a)y=a[ne],a.hasOwnProperty(ne)&&y!=null&&!t.hasOwnProperty(ne)&&Ue(e,l,ne,null,t,y);for(x in t)if(y=t[x],N=a[x],t.hasOwnProperty(x)&&y!==N&&(y!=null||N!=null))switch(x){case"children":case"dangerouslySetInnerHTML":if(y!=null)throw Error(d(137,l));break;default:Ue(e,l,x,y,t,N)}return;default:if(Uc(l)){for(var Re in a)y=a[Re],a.hasOwnProperty(Re)&&y!==void 0&&!t.hasOwnProperty(Re)&&bs(e,l,Re,void 0,t,y);for(C in t)y=t[C],N=a[C],!t.hasOwnProperty(C)||y===N||y===void 0&&N===void 0||bs(e,l,C,y,t,N);return}}for(var v in a)y=a[v],a.hasOwnProperty(v)&&y!=null&&!t.hasOwnProperty(v)&&Ue(e,l,v,null,t,y);for(O in t)y=t[O],N=a[O],!t.hasOwnProperty(O)||y===N||y==null&&N==null||Ue(e,l,O,y,t,N)}function hd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function ah(){if(typeof performance.getEntriesByType=="function"){for(var e=0,l=0,a=performance.getEntriesByType("resource"),t=0;t<a.length;t++){var i=a[t],c=i.transferSize,u=i.initiatorType,s=i.duration;if(c&&s&&hd(u)){for(u=0,s=i.responseEnd,t+=1;t<a.length;t++){var r=a[t],x=r.startTime;if(x>s)break;var C=r.transferSize,O=r.initiatorType;C&&hd(O)&&(r=r.responseEnd,u+=C*(r<s?1:(s-x)/(r-x)))}if(--t,l+=8*(c+u)/(i.duration/1e3),e++,10<e)break}}if(0<e)return l/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var xs=null,ys=null;function nc(e){return e.nodeType===9?e:e.ownerDocument}function pd(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 vd(e,l){if(e===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&l==="foreignObject"?0:e}function js(e,l){return e==="textarea"||e==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var Ns=null;function th(){var e=window.event;return e&&e.type==="popstate"?e===Ns?!1:(Ns=e,!0):(Ns=null,!1)}var bd=typeof setTimeout=="function"?setTimeout:void 0,nh=typeof clearTimeout=="function"?clearTimeout:void 0,xd=typeof Promise=="function"?Promise:void 0,ih=typeof queueMicrotask=="function"?queueMicrotask:typeof xd<"u"?function(e){return xd.resolve(null).then(e).catch(ch)}:bd;function ch(e){setTimeout(function(){throw e})}function Fa(e){return e==="head"}function yd(e,l){var a=l,t=0;do{var i=a.nextSibling;if(e.removeChild(a),i&&i.nodeType===8)if(a=i.data,a==="/$"||a==="/&"){if(t===0){e.removeChild(i),rn(l);return}t--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")t++;else if(a==="html")$n(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,$n(a);for(var c=a.firstChild;c;){var u=c.nextSibling,s=c.nodeName;c[gn]||s==="SCRIPT"||s==="STYLE"||s==="LINK"&&c.rel.toLowerCase()==="stylesheet"||a.removeChild(c),c=u}}else a==="body"&&$n(e.ownerDocument.body);a=i}while(a);rn(l)}function jd(e,l){var a=e;e=0;do{var t=a.nextSibling;if(a.nodeType===1?l?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(l?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),t&&t.nodeType===8)if(a=t.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=t}while(a)}function _s(e){var l=e.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var a=l;switch(l=l.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":_s(a),Ec(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function uh(e,l,a,t){for(;e.nodeType===1;){var i=a;if(e.nodeName.toLowerCase()!==l.toLowerCase()){if(!t&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(t){if(!e[gn])switch(l){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(c=e.getAttribute("rel"),c==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(c!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(c=e.getAttribute("src"),(c!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&c&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(l==="input"&&e.type==="hidden"){var c=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===c)return e}else return e;if(e=Gl(e.nextSibling),e===null)break}return null}function sh(e,l,a){if(l==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=Gl(e.nextSibling),e===null))return null;return e}function Nd(e,l){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Gl(e.nextSibling),e===null))return null;return e}function Ss(e){return e.data==="$?"||e.data==="$~"}function Ts(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function oh(e,l){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=l;else if(e.data!=="$?"||a.readyState!=="loading")l();else{var t=function(){l(),a.removeEventListener("DOMContentLoaded",t)};a.addEventListener("DOMContentLoaded",t),e._reactRetry=t}}function Gl(e){for(;e!=null;e=e.nextSibling){var l=e.nodeType;if(l===1||l===3)break;if(l===8){if(l=e.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return e}var zs=null;function _d(e){e=e.nextSibling;for(var l=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(l===0)return Gl(e.nextSibling);l--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||l++}e=e.nextSibling}return null}function Sd(e){e=e.previousSibling;for(var l=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(l===0)return e;l--}else a!=="/$"&&a!=="/&"||l++}e=e.previousSibling}return null}function Td(e,l,a){switch(l=nc(a),e){case"html":if(e=l.documentElement,!e)throw Error(d(452));return e;case"head":if(e=l.head,!e)throw Error(d(453));return e;case"body":if(e=l.body,!e)throw Error(d(454));return e;default:throw Error(d(451))}}function $n(e){for(var l=e.attributes;l.length;)e.removeAttributeNode(l[0]);Ec(e)}var Ll=new Map,zd=new Set;function ic(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var _a=k.d;k.d={f:fh,r:rh,D:dh,C:mh,L:gh,m:hh,X:vh,S:ph,M:bh};function fh(){var e=_a.f(),l=$i();return e||l}function rh(e){var l=At(e);l!==null&&l.tag===5&&l.type==="form"?Xf(l):_a.r(e)}var sn=typeof document>"u"?null:document;function Cd(e,l,a){var t=sn;if(t&&typeof l=="string"&&l){var i=Ml(l);i='link[rel="'+e+'"][href="'+i+'"]',typeof a=="string"&&(i+='[crossorigin="'+a+'"]'),zd.has(i)||(zd.add(i),e={rel:e,crossOrigin:a,href:l},t.querySelector(i)===null&&(l=t.createElement("link"),il(l,"link",e),Ie(l),t.head.appendChild(l)))}}function dh(e){_a.D(e),Cd("dns-prefetch",e,null)}function mh(e,l){_a.C(e,l),Cd("preconnect",e,l)}function gh(e,l,a){_a.L(e,l,a);var t=sn;if(t&&e&&l){var i='link[rel="preload"][as="'+Ml(l)+'"]';l==="image"&&a&&a.imageSrcSet?(i+='[imagesrcset="'+Ml(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(i+='[imagesizes="'+Ml(a.imageSizes)+'"]')):i+='[href="'+Ml(e)+'"]';var c=i;switch(l){case"style":c=on(e);break;case"script":c=fn(e)}Ll.has(c)||(e=L({rel:"preload",href:l==="image"&&a&&a.imageSrcSet?void 0:e,as:l},a),Ll.set(c,e),t.querySelector(i)!==null||l==="style"&&t.querySelector(Wn(c))||l==="script"&&t.querySelector(In(c))||(l=t.createElement("link"),il(l,"link",e),Ie(l),t.head.appendChild(l)))}}function hh(e,l){_a.m(e,l);var a=sn;if(a&&e){var t=l&&typeof l.as=="string"?l.as:"script",i='link[rel="modulepreload"][as="'+Ml(t)+'"][href="'+Ml(e)+'"]',c=i;switch(t){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":c=fn(e)}if(!Ll.has(c)&&(e=L({rel:"modulepreload",href:e},l),Ll.set(c,e),a.querySelector(i)===null)){switch(t){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(In(c)))return}t=a.createElement("link"),il(t,"link",e),Ie(t),a.head.appendChild(t)}}}function ph(e,l,a){_a.S(e,l,a);var t=sn;if(t&&e){var i=Ot(t).hoistableStyles,c=on(e);l=l||"default";var u=i.get(c);if(!u){var s={loading:0,preload:null};if(u=t.querySelector(Wn(c)))s.loading=5;else{e=L({rel:"stylesheet",href:e,"data-precedence":l},a),(a=Ll.get(c))&&Cs(e,a);var r=u=t.createElement("link");Ie(r),il(r,"link",e),r._p=new Promise(function(x,C){r.onload=x,r.onerror=C}),r.addEventListener("load",function(){s.loading|=1}),r.addEventListener("error",function(){s.loading|=2}),s.loading|=4,cc(u,l,t)}u={type:"stylesheet",instance:u,count:1,state:s},i.set(c,u)}}}function vh(e,l){_a.X(e,l);var a=sn;if(a&&e){var t=Ot(a).hoistableScripts,i=fn(e),c=t.get(i);c||(c=a.querySelector(In(i)),c||(e=L({src:e,async:!0},l),(l=Ll.get(i))&&Es(e,l),c=a.createElement("script"),Ie(c),il(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},t.set(i,c))}}function bh(e,l){_a.M(e,l);var a=sn;if(a&&e){var t=Ot(a).hoistableScripts,i=fn(e),c=t.get(i);c||(c=a.querySelector(In(i)),c||(e=L({src:e,async:!0,type:"module"},l),(l=Ll.get(i))&&Es(e,l),c=a.createElement("script"),Ie(c),il(c,"link",e),a.head.appendChild(c)),c={type:"script",instance:c,count:1,state:null},t.set(i,c))}}function Ed(e,l,a,t){var i=(i=oe.current)?ic(i):null;if(!i)throw Error(d(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(l=on(a.href),a=Ot(i).hoistableStyles,t=a.get(l),t||(t={type:"style",instance:null,count:0,state:null},a.set(l,t)),t):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=on(a.href);var c=Ot(i).hoistableStyles,u=c.get(e);if(u||(i=i.ownerDocument||i,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},c.set(e,u),(c=i.querySelector(Wn(e)))&&!c._p&&(u.instance=c,u.state.loading=5),Ll.has(e)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Ll.set(e,a),c||xh(i,e,a,u.state))),l&&t===null)throw Error(d(528,""));return u}if(l&&t!==null)throw Error(d(529,""));return null;case"script":return l=a.async,a=a.src,typeof a=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=fn(a),a=Ot(i).hoistableScripts,t=a.get(l),t||(t={type:"script",instance:null,count:0,state:null},a.set(l,t)),t):{type:"void",instance:null,count:0,state:null};default:throw Error(d(444,e))}}function on(e){return'href="'+Ml(e)+'"'}function Wn(e){return'link[rel="stylesheet"]['+e+"]"}function Ad(e){return L({},e,{"data-precedence":e.precedence,precedence:null})}function xh(e,l,a,t){e.querySelector('link[rel="preload"][as="style"]['+l+"]")?t.loading=1:(l=e.createElement("link"),t.preload=l,l.addEventListener("load",function(){return t.loading|=1}),l.addEventListener("error",function(){return t.loading|=2}),il(l,"link",a),Ie(l),e.head.appendChild(l))}function fn(e){return'[src="'+Ml(e)+'"]'}function In(e){return"script[async]"+e}function Od(e,l,a){if(l.count++,l.instance===null)switch(l.type){case"style":var t=e.querySelector('style[data-href~="'+Ml(a.href)+'"]');if(t)return l.instance=t,Ie(t),t;var i=L({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return t=(e.ownerDocument||e).createElement("style"),Ie(t),il(t,"style",i),cc(t,a.precedence,e),l.instance=t;case"stylesheet":i=on(a.href);var c=e.querySelector(Wn(i));if(c)return l.state.loading|=4,l.instance=c,Ie(c),c;t=Ad(a),(i=Ll.get(i))&&Cs(t,i),c=(e.ownerDocument||e).createElement("link"),Ie(c);var u=c;return u._p=new Promise(function(s,r){u.onload=s,u.onerror=r}),il(c,"link",t),l.state.loading|=4,cc(c,a.precedence,e),l.instance=c;case"script":return c=fn(a.src),(i=e.querySelector(In(c)))?(l.instance=i,Ie(i),i):(t=a,(i=Ll.get(c))&&(t=L({},a),Es(t,i)),e=e.ownerDocument||e,i=e.createElement("script"),Ie(i),il(i,"link",t),e.head.appendChild(i),l.instance=i);case"void":return null;default:throw Error(d(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(t=l.instance,l.state.loading|=4,cc(t,a.precedence,e));return l.instance}function cc(e,l,a){for(var t=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=t.length?t[t.length-1]:null,c=i,u=0;u<t.length;u++){var s=t[u];if(s.dataset.precedence===l)c=s;else if(c!==i)break}c?c.parentNode.insertBefore(e,c.nextSibling):(l=a.nodeType===9?a.head:a,l.insertBefore(e,l.firstChild))}function Cs(e,l){e.crossOrigin==null&&(e.crossOrigin=l.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=l.referrerPolicy),e.title==null&&(e.title=l.title)}function Es(e,l){e.crossOrigin==null&&(e.crossOrigin=l.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=l.referrerPolicy),e.integrity==null&&(e.integrity=l.integrity)}var uc=null;function Dd(e,l,a){if(uc===null){var t=new Map,i=uc=new Map;i.set(a,t)}else i=uc,t=i.get(a),t||(t=new Map,i.set(a,t));if(t.has(e))return t;for(t.set(e,null),a=a.getElementsByTagName(e),i=0;i<a.length;i++){var c=a[i];if(!(c[gn]||c[ll]||e==="link"&&c.getAttribute("rel")==="stylesheet")&&c.namespaceURI!=="http://www.w3.org/2000/svg"){var u=c.getAttribute(l)||"";u=e+u;var s=t.get(u);s?s.push(c):t.set(u,[c])}}return t}function Ud(e,l,a){e=e.ownerDocument||e,e.head.insertBefore(a,l==="title"?e.querySelector("head > title"):null)}function yh(e,l,a){if(a===1||l.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;return l.rel==="stylesheet"?(e=l.disabled,typeof l.precedence=="string"&&e==null):!0;case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function Rd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function jh(e,l,a,t){if(a.type==="stylesheet"&&(typeof t.media!="string"||matchMedia(t.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var i=on(t.href),c=l.querySelector(Wn(i));if(c){l=c._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(e.count++,e=sc.bind(e),l.then(e,e)),a.state.loading|=4,a.instance=c,Ie(c);return}c=l.ownerDocument||l,t=Ad(t),(i=Ll.get(i))&&Cs(t,i),c=c.createElement("link"),Ie(c);var u=c;u._p=new Promise(function(s,r){u.onload=s,u.onerror=r}),il(c,"link",t),a.instance=c}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,l),(l=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=sc.bind(e),l.addEventListener("load",a),l.addEventListener("error",a))}}var As=0;function Nh(e,l){return e.stylesheets&&e.count===0&&fc(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var t=setTimeout(function(){if(e.stylesheets&&fc(e,e.stylesheets),e.unsuspend){var c=e.unsuspend;e.unsuspend=null,c()}},6e4+l);0<e.imgBytes&&As===0&&(As=62500*ah());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&fc(e,e.stylesheets),e.unsuspend)){var c=e.unsuspend;e.unsuspend=null,c()}},(e.imgBytes>As?50:800)+l);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(t),clearTimeout(i)}}:null}function sc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)fc(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var oc=null;function fc(e,l){e.stylesheets=null,e.unsuspend!==null&&(e.count++,oc=new Map,l.forEach(_h,e),oc=null,sc.call(e))}function _h(e,l){if(!(l.state.loading&4)){var a=oc.get(e);if(a)var t=a.get(null);else{a=new Map,oc.set(e,a);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),c=0;c<i.length;c++){var u=i[c];(u.nodeName==="LINK"||u.getAttribute("media")!=="not all")&&(a.set(u.dataset.precedence,u),t=u)}t&&a.set(null,t)}i=l.instance,u=i.getAttribute("data-precedence"),c=a.get(u)||t,c===t&&a.set(null,i),a.set(u,i),this.count++,t=sc.bind(this),i.addEventListener("load",t),i.addEventListener("error",t),c?c.parentNode.insertBefore(i,c.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),l.state.loading|=4}}var Pn={$$typeof:W,Provider:null,Consumer:null,_currentValue:w,_currentValue2:w,_threadCount:0};function Sh(e,l,a,t,i,c,u,s,r){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=ae(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ae(0),this.hiddenUpdates=ae(null),this.identifierPrefix=t,this.onUncaughtError=i,this.onCaughtError=c,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=r,this.incompleteTransitions=new Map}function Md(e,l,a,t,i,c,u,s,r,x,C,O){return e=new Sh(e,l,a,u,r,x,C,O,s),l=1,c===!0&&(l|=24),c=Tl(3,null,null,l),e.current=c,c.stateNode=e,l=su(),l.refCount++,e.pooledCache=l,l.refCount++,c.memoizedState={element:t,isDehydrated:a,cache:l},du(c),e}function qd(e){return e?(e=Yt,e):Yt}function Hd(e,l,a,t,i,c){i=qd(i),t.context===null?t.context=i:t.pendingContext=i,t=Ba(l),t.payload={element:a},c=c===void 0?null:c,c!==null&&(t.callback=c),a=ka(e,t,l),a!==null&&(jl(a,e,l),Dn(a,e,l))}function Bd(e,l){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<l?a:l}}function Os(e,l){Bd(e,l),(e=e.alternate)&&Bd(e,l)}function kd(e){if(e.tag===13||e.tag===31){var l=ft(e,67108864);l!==null&&jl(l,e,67108864),Os(e,67108864)}}function Vd(e){if(e.tag===13||e.tag===31){var l=Ol();l=Tc(l);var a=ft(e,l);a!==null&&jl(a,e,l),Os(e,l)}}var rc=!0;function Th(e,l,a,t){var i=S.T;S.T=null;var c=k.p;try{k.p=2,Ds(e,l,a,t)}finally{k.p=c,S.T=i}}function zh(e,l,a,t){var i=S.T;S.T=null;var c=k.p;try{k.p=8,Ds(e,l,a,t)}finally{k.p=c,S.T=i}}function Ds(e,l,a,t){if(rc){var i=Us(t);if(i===null)vs(e,l,t,dc,a),Gd(e,t);else if(Eh(i,e,l,a,t))t.stopPropagation();else if(Gd(e,t),l&4&&-1<Ch.indexOf(e)){for(;i!==null;){var c=At(i);if(c!==null)switch(c.tag){case 3:if(c=c.stateNode,c.current.memoizedState.isDehydrated){var u=ia(c.pendingLanes);if(u!==0){var s=c;for(s.pendingLanes|=2,s.entangledLanes|=2;u;){var r=1<<31-rl(u);s.entanglements[1]|=r,u&=~r}Pl(c),(Ce&6)===0&&(Fi=el()+500,wn(0))}}break;case 31:case 13:s=ft(c,2),s!==null&&jl(s,c,2),$i(),Os(c,2)}if(c=Us(t),c===null&&vs(e,l,t,dc,a),c===i)break;i=c}i!==null&&t.stopPropagation()}else vs(e,l,t,null,a)}}function Us(e){return e=Mc(e),Rs(e)}var dc=null;function Rs(e){if(dc=null,e=Et(e),e!==null){var l=R(e);if(l===null)e=null;else{var a=l.tag;if(a===13){if(e=q(l),e!==null)return e;e=null}else if(a===31){if(e=G(l),e!==null)return e;e=null}else if(a===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;e=null}else l!==e&&(e=null)}}return dc=e,null}function Yd(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(na()){case gl:return 2;case Ql:return 8;case Ea:case dn:return 32;case Aa:return 268435456;default:return 32}default:return 32}}var Ms=!1,Ja=null,$a=null,Wa=null,ei=new Map,li=new Map,Ia=[],Ch="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 Gd(e,l){switch(e){case"focusin":case"focusout":Ja=null;break;case"dragenter":case"dragleave":$a=null;break;case"mouseover":case"mouseout":Wa=null;break;case"pointerover":case"pointerout":ei.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":li.delete(l.pointerId)}}function ai(e,l,a,t,i,c){return e===null||e.nativeEvent!==c?(e={blockedOn:l,domEventName:a,eventSystemFlags:t,nativeEvent:c,targetContainers:[i]},l!==null&&(l=At(l),l!==null&&kd(l)),e):(e.eventSystemFlags|=t,l=e.targetContainers,i!==null&&l.indexOf(i)===-1&&l.push(i),e)}function Eh(e,l,a,t,i){switch(l){case"focusin":return Ja=ai(Ja,e,l,a,t,i),!0;case"dragenter":return $a=ai($a,e,l,a,t,i),!0;case"mouseover":return Wa=ai(Wa,e,l,a,t,i),!0;case"pointerover":var c=i.pointerId;return ei.set(c,ai(ei.get(c)||null,e,l,a,t,i)),!0;case"gotpointercapture":return c=i.pointerId,li.set(c,ai(li.get(c)||null,e,l,a,t,i)),!0}return!1}function Ld(e){var l=Et(e.target);if(l!==null){var a=R(l);if(a!==null){if(l=a.tag,l===13){if(l=q(a),l!==null){e.blockedOn=l,eo(e.priority,function(){Vd(a)});return}}else if(l===31){if(l=G(a),l!==null){e.blockedOn=l,eo(e.priority,function(){Vd(a)});return}}else if(l===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mc(e){if(e.blockedOn!==null)return!1;for(var l=e.targetContainers;0<l.length;){var a=Us(e.nativeEvent);if(a===null){a=e.nativeEvent;var t=new a.constructor(a.type,a);Rc=t,a.target.dispatchEvent(t),Rc=null}else return l=At(a),l!==null&&kd(l),e.blockedOn=a,!1;l.shift()}return!0}function Xd(e,l,a){mc(e)&&a.delete(l)}function Ah(){Ms=!1,Ja!==null&&mc(Ja)&&(Ja=null),$a!==null&&mc($a)&&($a=null),Wa!==null&&mc(Wa)&&(Wa=null),ei.forEach(Xd),li.forEach(Xd)}function gc(e,l){e.blockedOn===l&&(e.blockedOn=null,Ms||(Ms=!0,m.unstable_scheduleCallback(m.unstable_NormalPriority,Ah)))}var hc=null;function Qd(e){hc!==e&&(hc=e,m.unstable_scheduleCallback(m.unstable_NormalPriority,function(){hc===e&&(hc=null);for(var l=0;l<e.length;l+=3){var a=e[l],t=e[l+1],i=e[l+2];if(typeof t!="function"){if(Rs(t||a)===null)continue;break}var c=At(a);c!==null&&(e.splice(l,3),l-=3,Uu(c,{pending:!0,data:i,method:a.method,action:t},t,i))}}))}function rn(e){function l(r){return gc(r,e)}Ja!==null&&gc(Ja,e),$a!==null&&gc($a,e),Wa!==null&&gc(Wa,e),ei.forEach(l),li.forEach(l);for(var a=0;a<Ia.length;a++){var t=Ia[a];t.blockedOn===e&&(t.blockedOn=null)}for(;0<Ia.length&&(a=Ia[0],a.blockedOn===null);)Ld(a),a.blockedOn===null&&Ia.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(t=0;t<a.length;t+=3){var i=a[t],c=a[t+1],u=i[hl]||null;if(typeof c=="function")u||Qd(a);else if(u){var s=null;if(c&&c.hasAttribute("formAction")){if(i=c,u=c[hl]||null)s=u.formAction;else if(Rs(i)!==null)continue}else s=u.action;typeof s=="function"?a[t+1]=s:(a.splice(t,3),t-=3),Qd(a)}}}function Kd(){function e(c){c.canIntercept&&c.info==="react-transition"&&c.intercept({handler:function(){return new Promise(function(u){return i=u})},focusReset:"manual",scroll:"manual"})}function l(){i!==null&&(i(),i=null),t||setTimeout(a,20)}function a(){if(!t&&!navigation.transition){var c=navigation.currentEntry;c&&c.url!=null&&navigation.navigate(c.url,{state:c.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var t=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(a,100),function(){t=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),i!==null&&(i(),i=null)}}}function qs(e){this._internalRoot=e}pc.prototype.render=qs.prototype.render=function(e){var l=this._internalRoot;if(l===null)throw Error(d(409));var a=l.current,t=Ol();Hd(a,t,e,l,null,null)},pc.prototype.unmount=qs.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var l=e.containerInfo;Hd(e.current,2,null,e,null,null),$i(),l[Ct]=null}};function pc(e){this._internalRoot=e}pc.prototype.unstable_scheduleHydration=function(e){if(e){var l=Ps();e={blockedOn:null,target:e,priority:l};for(var a=0;a<Ia.length&&l!==0&&l<Ia[a].priority;a++);Ia.splice(a,0,e),a===0&&Ld(e)}};var Zd=D.version;if(Zd!=="19.2.4")throw Error(d(527,Zd,"19.2.4"));k.findDOMNode=function(e){var l=e._reactInternals;if(l===void 0)throw typeof e.render=="function"?Error(d(188)):(e=Object.keys(e).join(","),Error(d(268,e)));return e=g(l),e=e!==null?F(e):null,e=e===null?null:e.stateNode,e};var Oh={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:S,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vc.isDisabled&&vc.supportsFiber)try{Jl=vc.inject(Oh),Ge=vc}catch{}}return ni.createRoot=function(e,l){if(!E(e))throw Error(d(299));var a=!1,t="",i=Pf,c=er,u=lr;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(t=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(c=l.onCaughtError),l.onRecoverableError!==void 0&&(u=l.onRecoverableError)),l=Md(e,1,!1,null,null,a,t,null,i,c,u,Kd),e[Ct]=l.current,ps(e),new qs(l)},ni.hydrateRoot=function(e,l,a){if(!E(e))throw Error(d(299));var t=!1,i="",c=Pf,u=er,s=lr,r=null;return a!=null&&(a.unstable_strictMode===!0&&(t=!0),a.identifierPrefix!==void 0&&(i=a.identifierPrefix),a.onUncaughtError!==void 0&&(c=a.onUncaughtError),a.onCaughtError!==void 0&&(u=a.onCaughtError),a.onRecoverableError!==void 0&&(s=a.onRecoverableError),a.formState!==void 0&&(r=a.formState)),l=Md(e,1,!0,l,a??null,t,i,r,c,u,s,Kd),l.context=qd(null),a=l.current,t=Ol(),t=Tc(t),i=Ba(t),i.callback=null,ka(a,i,t),a=t,l.current.lanes=a,Ne(l,a),Pl(l),e[Ct]=l.current,ps(e),new pc(l)},ni.version="19.2.4",ni}var am;function Yh(){if(am)return ks.exports;am=1;function m(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(m)}catch(D){console.error(D)}}return m(),ks.exports=Vh(),ks.exports}var Gh=Yh();const xm=typeof window<"u"&&window.__RILO_CONFIG__?window.__RILO_CONFIG__:{},Lh=typeof window<"u"&&window.location?window.location.origin:"http://localhost:5173",yc=xm.apiBaseUrl||void 0||Lh,ii=xm.apiBearerToken||void 0||"";function ym(m,D){const _=new URL(m,yc.endsWith("/")?yc:`${yc}/`);if(D)for(const[d,E]of Object.entries(D))E!=null&&E!==""&&_.searchParams.set(d,String(E));return _}async function ea(m,{method:D="GET",body:_,searchParams:d}={}){const E=await fetch(ym(m,d),{method:D,headers:{...ii?{authorization:`Bearer ${ii}`}:{},..._?{"content-type":"application/json"}:{}},..._?{body:JSON.stringify(_)}:{}});let R;try{R=await E.json()}catch{R=void 0}if(!E.ok){const q=R?.error||`Request failed with status ${E.status}`,G=new Error(q);throw G.status=E.status,G.payload=R,G}return R}function Xh(){return ea("/projects")}function Qh(m){return ea("/projects",{method:"POST",body:m})}function tm(m){return ea(`/projects/${encodeURIComponent(m)}`)}function nm(m){return ea(`/projects/${encodeURIComponent(m)}/prompts`)}function Ls(m,D){return ea(`/projects/${encodeURIComponent(m)}/content`,{method:"PATCH",body:D})}function Kh(m,D){return ea(`/projects/${encodeURIComponent(m)}/config`,{method:"PATCH",body:{config:D}})}function im(m,D){return ea(`/projects/${encodeURIComponent(m)}/regenerate`,{method:"POST",body:D})}function Zh(m){return ea(`/jobs/${encodeURIComponent(m)}`)}function wh(m){return ea(`/projects/${encodeURIComponent(m)}/analytics`)}function Fh(m){return ea(`/projects/${encodeURIComponent(m)}/analytics/runs`)}function Jh(m,D){const _=D.split("/").map(d=>encodeURIComponent(d)).join("/");return`/projects/${encodeURIComponent(m)}/assets/${_}`}function bc(m,D,_=""){return!D||typeof D!="object"?"":D.referenceType==="url"?D.value||"":D.path?ym(Jh(m,D.path),{...ii?{access_token:ii}:{},..._?{v:_}:{}}).toString():""}function $h(){return{apiBaseUrl:yc,hasToken:!!ii}}function Wh({apiBaseUrl:m,hasToken:D,loadingProjects:_,projects:d,selectedProject:E,onSelectProject:R,onShowCreate:q,onRefreshProjects:G}){return n.jsxs("aside",{className:"sidebar",children:[n.jsxs("div",{className:"sidebar-header",children:[n.jsx("span",{className:"brand-wordmark","aria-label":"Rilo",children:"Rilo"}),!D&&n.jsx("span",{className:"badge badge-fail",children:"No token"})]}),n.jsxs("div",{className:"sidebar-section",children:[n.jsxs("div",{className:"sidebar-row",children:[n.jsx("span",{className:"sidebar-section-title",children:"Projects"}),n.jsx("button",{type:"button",className:"btn btn-sm btn-primary",onClick:q,children:"+ New"})]}),_?n.jsx("p",{className:"muted size-sm",children:"Loading…"}):n.jsxs("ul",{className:"project-list",children:[d.map(U=>n.jsx("li",{children:n.jsx("button",{type:"button",className:`project-item${U===E?" project-item-active":""}`,onClick:()=>R(U),children:U})},U)),d.length===0&&n.jsx("li",{children:n.jsx("p",{className:"muted size-sm",children:"No projects yet."})})]}),n.jsx("button",{type:"button",className:"btn btn-ghost btn-sm",onClick:G,disabled:_,children:"↻ Refresh list"})]}),n.jsx("div",{className:"sidebar-footer",children:n.jsx("span",{className:"muted size-xs",children:m})})]})}function Ih({status:m}){const D={pending:"badge badge-pending",running:"badge badge-running",completed:"badge badge-ok",failed:"badge badge-fail",paused:"badge badge-paused"}[m]||"badge";return n.jsx("span",{className:D,children:m||"unknown"})}const cm=["script","voiceover","keyframes","segments","compose"],Ph=["align","burnin"],um={script:"Script",voiceover:"Voice",keyframes:"Keyframes",segments:"Segments",compose:"Compose",align:"Align",burnin:"Burn In"};function ep({steps:m,running:D,activeStep:_,includeSubtitleStages:d=!0}){const E=d?[...cm,...Ph]:cm,R=D?E.includes(_)?_:E.find(q=>!m?.[q])||null:null;return n.jsx("div",{className:"step-dots",children:E.map(q=>{const U=m?.[q]?"dot dot-done":q===R?"dot dot-running":"dot dot-idle";return n.jsx("span",{className:U,title:um[q],children:n.jsx("span",{className:"dot-label",children:um[q]})},q)})})}function lp({tabs:m,active:D,onChange:_}){let d=!1;return n.jsx("div",{className:"tab-bar",role:"tablist",children:m.map(E=>{const R=E.align==="right"&&!d;return R&&(d=!0),n.jsxs(K.Fragment,{children:[R&&n.jsx("span",{className:"tab-spacer","aria-hidden":"true"}),n.jsxs("button",{role:"tab",type:"button",className:E.id===D?"tab tab-active":"tab","aria-selected":E.id===D,onClick:()=>_(E.id),children:[E.label,E.count!=null&&n.jsx("span",{className:"tab-count",children:E.count})]})]},E.id)})})}function ap({selectedProject:m,runStatus:D,isRunning:_,isPaused:d,loadingDetails:E,steps:R,activeStep:q,includeSubtitleStages:G,tabs:U,activeTab:g,onRefresh:F,onRegenerate:L,onForceRestart:te,onContinue:se,onChangeTab:H}){return n.jsxs("div",{className:"project-header",children:[n.jsxs("div",{className:"project-header-top",children:[n.jsxs("div",{className:"project-title-row",children:[n.jsx("h2",{className:"project-name",children:m}),n.jsx(Ih,{status:D}),_&&n.jsx("span",{className:"spinner","aria-label":"Running"})]}),n.jsxs("div",{className:"header-actions",children:[n.jsx("button",{type:"button",className:"btn btn-ghost btn-sm",onClick:F,disabled:E,children:E?"…":"↻ Refresh"}),d?n.jsx("button",{type:"button",className:"btn btn-primary btn-sm",onClick:se,children:"▶ Continue to video generation"}):n.jsx("button",{type:"button",className:"btn btn-secondary btn-sm",onClick:L,disabled:_,children:"▶ Regenerate"}),n.jsx("button",{type:"button",className:"btn btn-ghost btn-sm btn-danger",onClick:te,disabled:_,children:"↺ Force restart"})]})]}),d&&n.jsx("div",{className:"pause-banner",children:"🖼 Keyframes are ready for review. Update prompts and regenerate individual images until satisfied, then continue to video generation."}),R&&n.jsx(ep,{steps:R,running:_,activeStep:q,includeSubtitleStages:G}),n.jsx(lp,{tabs:U,active:g,onChange:H})]})}function tp({storyText:m,dirty:D,savingContent:_,onStoryChange:d,onSave:E}){return n.jsx("div",{className:"tab-pane",children:n.jsxs("div",{className:"editor-grid",children:[n.jsxs("div",{className:"field full-width",children:[n.jsx("label",{className:"field-label",children:"Story"}),n.jsx("textarea",{value:m,rows:12,onChange:R=>d(R.target.value)})]}),n.jsxs("div",{className:"full-width save-row",children:[n.jsx("button",{type:"button",className:"btn btn-primary",onClick:E,disabled:!D||_,children:_?"Saving…":D?"● Save changes":"Up to date"}),D&&n.jsx("span",{className:"muted size-sm",children:"Unsaved changes"})]})]})})}const np={"deepseek-ai/deepseek-v3":{displayName:"DeepSeek V3",url:"https://replicate.com/deepseek-ai/deepseek-v3",pricingLabel:"$0.00145 / 1k tokens (in + out)"},"minimax/speech-02-turbo":{displayName:"Minimax Speech 02 Turbo",url:"https://replicate.com/minimax/speech-02-turbo",pricingLabel:"$0.06 / 1k input tokens"},"resemble-ai/chatterbox-turbo":{displayName:"Chatterbox Turbo",url:"https://replicate.com/resemble-ai/chatterbox-turbo",pricingLabel:"$0.025 / 1k input characters"},"prunaai/z-image-turbo":{displayName:"Z Image Turbo",url:"https://replicate.com/prunaai/z-image-turbo",pricingLabel:"Tiered by output megapixels (~$0.0025–$0.0115 / image)"},"black-forest-labs/flux-2-pro":{displayName:"FLUX 2 Pro",url:"https://replicate.com/black-forest-labs/flux-2-pro",pricingLabel:"Multi-property pricing on Replicate (run + megapixels)"},"black-forest-labs/flux-schnell":{displayName:"FLUX Schnell",url:"https://replicate.com/black-forest-labs/flux-schnell",pricingLabel:"$0.003 / output image"},"google/nano-banana-pro":{displayName:"Nano Banana Pro",url:"https://replicate.com/google/nano-banana-pro",pricingLabel:"Tiered by resolution ($0.15-$0.30 / output image)"},"bytedance/seedream-4":{displayName:"Seedream 4",url:"https://replicate.com/bytedance/seedream-4",pricingLabel:"$0.03 / output image"},"wan-video/wan-2.2-i2v-fast":{displayName:"Wan 2.2 I2V Fast",url:"https://replicate.com/wan-video/wan-2.2-i2v-fast",pricingLabel:"~$0.05 / 5 s clip (480p)"},"kwaivgi/kling-v3-video":{displayName:"Kling V3 Video",url:"https://replicate.com/kwaivgi/kling-v3-video",pricingLabel:"Mode/audio tiered per-second pricing on Replicate"},"pixverse/pixverse-v5.6":{displayName:"PixVerse v5.6",url:"https://replicate.com/pixverse/pixverse-v5.6",pricingLabel:"Quality-tiered per-second pricing on Replicate ($0.07-$0.15 / s)"},"google/veo-3.1":{displayName:"Veo 3.1",url:"https://replicate.com/google/veo-3.1",pricingLabel:"Audio-tiered per-second pricing on Replicate ($0.20-$0.40 / s)"},"google/veo-3.1-fast":{displayName:"Veo 3.1 Fast",url:"https://replicate.com/google/veo-3.1-fast",pricingLabel:"Audio-tiered per-second pricing on Replicate ($0.10-$0.15 / s)"}};function et({modelId:m,title:D,configDirty:_,savingConfig:d,isRunning:E,onSaveConfig:R,children:q}){const[G,U]=K.useState(!1),g=np[m]||null,F=g?.displayName||m||"—",L=g?.url||null,te=g?.pricingLabel||null;return n.jsxs("div",{className:"model-config-section",children:[n.jsxs("button",{type:"button",className:"model-config-toggle",onClick:()=>U(se=>!se),"aria-expanded":G,children:[n.jsxs("div",{className:"model-config-summary",children:[n.jsx("span",{className:"model-config-title muted size-sm",children:D}),n.jsx("span",{className:"model-config-name",children:F}),L&&n.jsx("a",{href:L,target:"_blank",rel:"noopener noreferrer",className:"model-config-url muted size-sm",onClick:se=>se.stopPropagation(),children:m}),!L&&m&&n.jsx("span",{className:"model-config-url muted size-sm",children:m}),te&&n.jsx("span",{className:"model-config-pricing muted size-sm",children:te})]}),n.jsx("span",{className:"model-config-chevron","aria-hidden":"true",children:G?"▲":"▼"})]}),G&&n.jsx("div",{className:"model-config-body",children:n.jsxs("form",{className:"config-form",onSubmit:se=>{se.preventDefault(),R()},children:[n.jsx("div",{className:"config-form-fields",children:q}),n.jsxs("div",{className:"config-form-actions",children:[n.jsx("button",{type:"submit",className:"btn btn-primary",disabled:!_||d||E,children:d?"Saving…":"Save Config"}),_&&n.jsx("span",{className:"muted size-sm",children:"Unsaved changes"})]})]})})]})}function Ks({id:m,value:D,onChange:_,options:d=[],placeholder:E,className:R,inputStyle:q,getOptionStyle:G,renderOption:U}){const[g,F]=K.useState(!1),[L,te]=K.useState(D??""),se=K.useRef(null);K.useEffect(()=>{te(D??"")},[D]);const H=L.trim().toLowerCase(),Y=H?[...d.filter(W=>W.toLowerCase().includes(H)),...d.filter(W=>!W.toLowerCase().includes(H))]:d;function fe(W){const I=W.target.value;te(I),_(I||void 0),F(!0)}function be(W){te(W),_(W),F(!1)}function Ye(W){se.current?.contains(W.relatedTarget)||F(!1)}return n.jsxs("div",{className:"combo-box",ref:se,onBlur:Ye,children:[n.jsx("input",{id:m,type:"text",className:R,style:q,placeholder:E,value:L,autoComplete:"off",onFocus:()=>F(!0),onChange:fe}),g&&Y.length>0&&n.jsx("ul",{className:"combo-box-list",role:"listbox",children:Y.map(W=>n.jsx("li",{role:"option","aria-selected":W===D,className:`combo-box-option${W===D?" combo-box-option--active":""}`,style:typeof G=="function"?G(W):void 0,onMouseDown:I=>{I.preventDefault(),be(W)},children:typeof U=="function"?U(W):W},W))})]})}const Xs=["Arial","Helvetica","Verdana","Tahoma","Trebuchet MS","Gill Sans","Futura","Avenir Next","Bebas Neue","Oswald","Poppins","Roboto","Open Sans","Lato","Noto Sans","Source Sans Pro","Inter","Times New Roman","Georgia"],Zs=[{id:"custom",label:"Custom (no preset)",description:"Start from your current caption style without applying a template.",defaults:null},{id:"social_center_punch",label:"Social Center Punch",description:"Few words, center emphasis, thick border, high contrast.",defaults:{position:"center",fontName:"Bebas Neue",fontSize:108,bold:!0,italic:!1,makeUppercase:!0,primaryColor:"#ffffff",activeColor:"#ffe066",outlineColor:"#111111",outline:4,shadow:0,backgroundEnabled:!0,backgroundColor:"#000000",backgroundOpacity:.45,marginV:120,maxWordsPerLine:4,maxLines:2,highlightMode:"spoken_upcoming"}},{id:"social_center_clean",label:"Social Center Clean",description:"Centered captions with cleaner typography and lighter border.",defaults:{position:"center",fontName:"Poppins",fontSize:92,bold:!0,italic:!1,makeUppercase:!0,primaryColor:"#ffffff",activeColor:"#9ae6ff",outlineColor:"#111111",outline:3,shadow:0,backgroundEnabled:!0,backgroundColor:"#000000",backgroundOpacity:.45,marginV:120,maxWordsPerLine:4,maxLines:2,highlightMode:"current_only"}},{id:"social_center_story",label:"Social Center Story",description:"Centered storytelling style with calmer emphasis and roomier pacing.",defaults:{position:"center",fontName:"Avenir Next",fontSize:82,bold:!0,italic:!1,makeUppercase:!0,primaryColor:"#ffffff",activeColor:"#b8f2ff",outlineColor:"#111111",outline:3,shadow:0,backgroundEnabled:!0,backgroundColor:"#000000",backgroundOpacity:.4,marginV:108,maxWordsPerLine:5,maxLines:2,highlightMode:"current_only"}}],Nl={pruna:"prunaai/z-image-turbo",flux:"black-forest-labs/flux-2-pro",fluxSchnell:"black-forest-labs/flux-schnell",nanoBananaPro:"google/nano-banana-pro",seedream4:"bytedance/seedream-4"},cl={wan:"wan-video/wan-2.2-i2v-fast",klingV3:"kwaivgi/kling-v3-video",pixverseV56:"pixverse/pixverse-v5.6",veo31:"google/veo-3.1",veo31Fast:"google/veo-3.1-fast"},Sa={minimax:"minimax/speech-02-turbo",chatterboxTurbo:"resemble-ai/chatterbox-turbo",kokoro82m:"jaaari/kokoro-82m"},sm=["emotion","pitch","speed","volume","voice_id","audio_format","sample_rate","bitrate","channel","language_boost","subtitle_enable","english_normalization"],om=["voice","temperature","top_p","top_k","repetition_penalty","seed"],ip=["voice","speed"],cp=["Aaron","Abigail","Anaya","Andy","Archer","Brian","Chloe","Dylan","Emmanuel","Ethan","Evelyn","Gavin","Gordon","Ivan","Laura","Lucy","Madison","Marisol","Meera","Walter"],up=["af_alloy","af_aoede","af_bella","af_jessica","af_kore","af_nicole","af_nova","af_river","af_sarah","af_sky","am_adam","am_echo","am_eric","am_fenrir","am_liam","am_michael","am_onyx","am_puck","bf_alice","bf_emma","bf_isabella","bf_lily","bm_daniel","bm_fable","bm_george","bm_lewis","ff_siwis","hf_alpha","hf_beta","hm_omega","hm_psi","if_sara","im_nicola","jf_alpha","jf_gongitsune","jf_nezumi","jf_tebukuro","jm_kumo","zf_xiaobei","zf_xiaoni","zf_xiaoxiao","zf_xiaoyi","zm_yunjian","zm_yunxi","zm_yunxia","zm_yunyang"],sp={standard:{withAudio:.252,withoutAudio:.168},pro:{withAudio:.336,withoutAudio:.224}},op={"360p":.07,"540p":.07,"720p":.09,"1080p":.15},fm={standardWithoutAudio:.2,withoutAudio:.1};function rm(m){return Zs.find(D=>D.id===m)||Zs[0]}function fp(m){if(typeof document>"u")return m;const _=document.createElement("canvas").getContext("2d");if(!_)return m;const d="mmmmmmmmmmlliOO00",E="72px",R=["monospace","serif","sans-serif"],q=U=>(_.font=`${E} ${U}`,_.measureText(d).width),G=Object.fromEntries(R.map(U=>[U,q(U)]));return m.filter(U=>R.some(g=>q(`"${U}", ${g}`)!==G[g]))}function rp({configDraft:m,projectConfig:D,mediaW:_,mediaH:d,configDirty:E,savingConfig:R,isRunning:q,onPatchConfig:G,onPatchModel:U,onPatchModelOption:g,onPatchOptionalInt:F,onSaveConfig:L}){const te=m?.models||{},se=m?.modelOptions?.textToText||{},H=m?.subtitleOptions||{},[Y,fe]=K.useState("video"),[be,Ye]=K.useState(Xs),[W,I]=K.useState(!1);K.useEffect(()=>{const o=fp(Xs);Ye(o.length>0?o:Xs),I(!0)},[]);const ce=K.useMemo(()=>{const o=String(H.fontName||"").trim();return o?be.includes(o)?be:[o,...be]:be},[be,H.fontName]),$=rm(H.templateId||"custom"),ie=o=>/^#[0-9a-fA-F]{6}$/.test(String(o||"").trim()),Te=(o,p)=>ie(o)?o:p,Me=o=>{const p=rm(o);p.defaults&&G("subtitleOptions",{...H,...p.defaults,templateId:p.id,enabled:!0})},ue=m?.modelOptions?.textToImage||{},Ee=te.textToImage||Nl.pruna;function j(o){U("textToImage",o);const p=ge=>ge.forEach(ml=>g("textToImage",ml,void 0));o===Nl.flux?p(["num_inference_steps","guidance_scale","go_fast","num_outputs","disable_safety_checker","megapixels","resolution","safety_filter_level","allow_fallback_model","size","sequential_image_generation","max_images","enhance_prompt"]):o===Nl.fluxSchnell?p(["guidance_scale","safety_tolerance","num_inference_steps","output_format","resolution","safety_filter_level","allow_fallback_model","size","sequential_image_generation","max_images","enhance_prompt"]):o===Nl.nanoBananaPro?p(["num_inference_steps","guidance_scale","safety_tolerance","seed","go_fast","output_quality","num_outputs","disable_safety_checker","megapixels","output_format","size","sequential_image_generation","max_images","enhance_prompt"]):o===Nl.seedream4?p(["num_inference_steps","guidance_scale","safety_tolerance","seed","go_fast","output_quality","num_outputs","disable_safety_checker","megapixels","output_format","resolution","safety_filter_level","allow_fallback_model"]):p(["safety_tolerance","num_outputs","disable_safety_checker","megapixels","resolution","safety_filter_level","allow_fallback_model","size","sequential_image_generation","max_images","enhance_prompt"])}function B(){return Ee===Nl.flux?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-safety",children:"Safety Tolerance"}),n.jsx("input",{id:"cfg-kf-safety",type:"number",className:"config-input",min:1,max:5,step:1,placeholder:"2",value:ue.safety_tolerance??"",onChange:o=>{const p=o.target.value===""?void 0:parseInt(o.target.value,10);g("textToImage","safety_tolerance",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsxs("label",{className:"config-form-label",htmlFor:"cfg-kf-seed",children:["Seed ",n.jsx("span",{className:"config-form-optional",children:"(optional)"})]}),n.jsx("input",{id:"cfg-kf-seed",type:"number",className:"config-input",step:1,placeholder:"random",value:ue.seed??"",onChange:o=>{const p=o.target.value===""?null:parseInt(o.target.value,10);g("textToImage","seed",Number.isNaN(p)?null:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-output-format",children:"Output Format"}),n.jsxs("select",{id:"cfg-kf-output-format",className:"config-select",value:ue.output_format??"webp",onChange:o=>g("textToImage","output_format",o.target.value),children:[n.jsx("option",{value:"webp",children:"webp"}),n.jsx("option",{value:"png",children:"png"}),n.jsx("option",{value:"jpg",children:"jpg"}),n.jsx("option",{value:"jpeg",children:"jpeg"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-quality",children:"Output Quality"}),n.jsx("input",{id:"cfg-kf-quality",type:"number",className:"config-input",min:0,max:100,step:1,placeholder:"80",value:ue.output_quality??"",onChange:o=>{const p=o.target.value===""?void 0:parseInt(o.target.value,10);g("textToImage","output_quality",Number.isNaN(p)?void 0:p)}})]})]}):Ee===Nl.fluxSchnell?n.jsxs(n.Fragment,{children:[n.jsxs("p",{className:"muted size-sm",children:["FLUX Schnell uses project ",n.jsx("code",{children:"aspectRatio"})," and ignores custom ",n.jsx("code",{children:"keyframeWidth"}),"/",n.jsx("code",{children:"keyframeHeight"})," overrides."]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-num-outputs",children:"Number of Outputs"}),n.jsx("input",{id:"cfg-kf-num-outputs",type:"number",className:"config-input",min:1,max:4,step:1,placeholder:"1",value:ue.num_outputs??"",onChange:o=>{const p=o.target.value===""?void 0:parseInt(o.target.value,10);g("textToImage","num_outputs",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-steps",children:"Inference Steps"}),n.jsx("input",{id:"cfg-kf-steps",type:"number",className:"config-input",min:1,max:4,step:1,placeholder:"4",value:ue.num_inference_steps??"",onChange:o=>{const p=o.target.value===""?void 0:parseInt(o.target.value,10);g("textToImage","num_inference_steps",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsxs("label",{className:"config-form-label",htmlFor:"cfg-kf-seed",children:["Seed ",n.jsx("span",{className:"config-form-optional",children:"(optional)"})]}),n.jsx("input",{id:"cfg-kf-seed",type:"number",className:"config-input",step:1,placeholder:"random",value:ue.seed??"",onChange:o=>{const p=o.target.value===""?null:parseInt(o.target.value,10);g("textToImage","seed",Number.isNaN(p)?null:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-output-format",children:"Output Format"}),n.jsxs("select",{id:"cfg-kf-output-format",className:"config-select",value:ue.output_format??"webp",onChange:o=>g("textToImage","output_format",o.target.value),children:[n.jsx("option",{value:"webp",children:"webp"}),n.jsx("option",{value:"jpg",children:"jpg"}),n.jsx("option",{value:"png",children:"png"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-quality",children:"Output Quality"}),n.jsx("input",{id:"cfg-kf-quality",type:"number",className:"config-input",min:0,max:100,step:1,placeholder:"80",value:ue.output_quality??"",onChange:o=>{const p=o.target.value===""?void 0:parseInt(o.target.value,10);g("textToImage","output_quality",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-disable-safety",children:"Disable Safety Checker"}),n.jsx("input",{id:"cfg-kf-disable-safety",type:"checkbox",checked:ue.disable_safety_checker??!1,onChange:o=>g("textToImage","disable_safety_checker",o.target.checked)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-go-fast",children:"Go Fast"}),n.jsx("input",{id:"cfg-kf-go-fast",type:"checkbox",checked:ue.go_fast??!0,onChange:o=>g("textToImage","go_fast",o.target.checked)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-megapixels",children:"Megapixels"}),n.jsx("input",{id:"cfg-kf-megapixels",type:"text",className:"config-input",placeholder:"1",value:ue.megapixels??"",onChange:o=>g("textToImage","megapixels",o.target.value||void 0)})]})]}):Ee===Nl.nanoBananaPro?n.jsxs(n.Fragment,{children:[n.jsxs("p",{className:"muted size-sm",children:["Nano Banana Pro uses project ",n.jsx("code",{children:"aspectRatio"})," and ignores custom ",n.jsx("code",{children:"keyframeWidth"}),"/",n.jsx("code",{children:"keyframeHeight"})," overrides."]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-resolution",children:"Resolution"}),n.jsxs("select",{id:"cfg-kf-resolution",className:"config-select",value:ue.resolution??"2K",onChange:o=>g("textToImage","resolution",o.target.value),children:[n.jsx("option",{value:"1K",children:"1K"}),n.jsx("option",{value:"2K",children:"2K"}),n.jsx("option",{value:"4K",children:"4K"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-output-format",children:"Output Format"}),n.jsxs("select",{id:"cfg-kf-output-format",className:"config-select",value:ue.output_format??"jpg",onChange:o=>g("textToImage","output_format",o.target.value),children:[n.jsx("option",{value:"jpg",children:"jpg"}),n.jsx("option",{value:"png",children:"png"}),n.jsx("option",{value:"webp",children:"webp"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-safety-level",children:"Safety Filter Level"}),n.jsxs("select",{id:"cfg-kf-safety-level",className:"config-select",value:ue.safety_filter_level??"block_only_high",onChange:o=>g("textToImage","safety_filter_level",o.target.value),children:[n.jsx("option",{value:"block_low_and_above",children:"block_low_and_above"}),n.jsx("option",{value:"block_medium_and_above",children:"block_medium_and_above"}),n.jsx("option",{value:"block_only_high",children:"block_only_high"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-allow-fallback",children:"Allow Fallback Model"}),n.jsx("input",{id:"cfg-kf-allow-fallback",type:"checkbox",checked:ue.allow_fallback_model??!1,onChange:o=>g("textToImage","allow_fallback_model",o.target.checked)})]})]}):Ee===Nl.seedream4?n.jsxs(n.Fragment,{children:[n.jsxs("p",{className:"muted size-sm",children:["Seedream 4 uses project ",n.jsx("code",{children:"aspectRatio"})," and preset sizes (",n.jsx("code",{children:"1K"}),", ",n.jsx("code",{children:"2K"}),", ",n.jsx("code",{children:"4K"}),")."]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-size",children:"Size"}),n.jsxs("select",{id:"cfg-kf-size",className:"config-select",value:ue.size??"2K",onChange:o=>g("textToImage","size",o.target.value),children:[n.jsx("option",{value:"1K",children:"1K"}),n.jsx("option",{value:"2K",children:"2K"}),n.jsx("option",{value:"4K",children:"4K"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-seq-gen",children:"Sequential Image Generation"}),n.jsxs("select",{id:"cfg-kf-seq-gen",className:"config-select",value:ue.sequential_image_generation??"disabled",onChange:o=>g("textToImage","sequential_image_generation",o.target.value),children:[n.jsx("option",{value:"disabled",children:"disabled"}),n.jsx("option",{value:"auto",children:"auto"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-max-images",children:"Max Images"}),n.jsx("input",{id:"cfg-kf-max-images",type:"number",className:"config-input",min:1,max:15,step:1,placeholder:"1",value:ue.max_images??"",onChange:o=>{const p=o.target.value===""?void 0:parseInt(o.target.value,10);g("textToImage","max_images",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-enhance",children:"Enhance Prompt"}),n.jsx("input",{id:"cfg-kf-enhance",type:"checkbox",checked:ue.enhance_prompt??!0,onChange:o=>g("textToImage","enhance_prompt",o.target.checked)})]})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-steps",children:"Inference Steps"}),n.jsx("input",{id:"cfg-kf-steps",type:"number",className:"config-input",min:1,max:50,step:1,placeholder:"8",value:ue.num_inference_steps??"",onChange:o=>{const p=o.target.value===""?void 0:parseInt(o.target.value,10);g("textToImage","num_inference_steps",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-guidance",children:"Guidance Scale"}),n.jsx("input",{id:"cfg-kf-guidance",type:"number",className:"config-input",min:0,max:20,step:.1,placeholder:"0",value:ue.guidance_scale??"",onChange:o=>{const p=o.target.value===""?void 0:parseFloat(o.target.value);g("textToImage","guidance_scale",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsxs("label",{className:"config-form-label",htmlFor:"cfg-kf-seed",children:["Seed ",n.jsx("span",{className:"config-form-optional",children:"(optional)"})]}),n.jsx("input",{id:"cfg-kf-seed",type:"number",className:"config-input",step:1,placeholder:"random",value:ue.seed??"",onChange:o=>{const p=o.target.value===""?null:parseInt(o.target.value,10);g("textToImage","seed",Number.isNaN(p)?null:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-output-format",children:"Output Format"}),n.jsxs("select",{id:"cfg-kf-output-format",className:"config-select",value:ue.output_format??"jpg",onChange:o=>g("textToImage","output_format",o.target.value),children:[n.jsx("option",{value:"jpg",children:"jpg"}),n.jsx("option",{value:"jpeg",children:"jpeg"}),n.jsx("option",{value:"png",children:"png"}),n.jsx("option",{value:"webp",children:"webp"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-quality",children:"Output Quality"}),n.jsx("input",{id:"cfg-kf-quality",type:"number",className:"config-input",min:0,max:100,step:1,placeholder:"80",value:ue.output_quality??"",onChange:o=>{const p=o.target.value===""?void 0:parseInt(o.target.value,10);g("textToImage","output_quality",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-go-fast",children:"Go Fast"}),n.jsx("input",{id:"cfg-kf-go-fast",type:"checkbox",checked:ue.go_fast??!1,onChange:o=>g("textToImage","go_fast",o.target.checked)})]})]})}const ee=m?.modelOptions?.imageTextToVideo||{},ze=te.imageTextToVideo||cl.wan;function S(o){U("imageTextToVideo",o);const p=ge=>ge.forEach(ml=>g("imageTextToVideo",ml,void 0));o===cl.wan?p(["negative_prompt","mode","generate_audio","quality","generate_audio_switch","thinking_type","resolution"]):o===cl.klingV3?(p(["interpolate_output","go_fast","sample_shift","seed","disable_safety_checker","lora_weights_transformer","lora_scale_transformer","lora_weights_transformer_2","lora_scale_transformer_2","quality","generate_audio_switch","thinking_type","resolution"]),g("imageTextToVideo","generate_audio",!1)):o===cl.pixverseV56?(p(["interpolate_output","go_fast","sample_shift","disable_safety_checker","lora_weights_transformer","lora_scale_transformer","lora_weights_transformer_2","lora_scale_transformer_2","mode","generate_audio","resolution"]),g("imageTextToVideo","generate_audio_switch",!1)):(o===cl.veo31||o===cl.veo31Fast)&&(p(["interpolate_output","go_fast","sample_shift","disable_safety_checker","lora_weights_transformer","lora_scale_transformer","lora_weights_transformer_2","lora_scale_transformer_2","mode","quality","generate_audio_switch","thinking_type"]),g("imageTextToVideo","generate_audio",!1))}function k(){const o=ee.mode==="standard"?"standard":"pro";return`Estimated cost for current settings: $${(sp[o].withoutAudio*5).toFixed(2)} per 5s segment.`}function w(){const o=["360p","540p","720p","1080p"].includes(ee.quality)?ee.quality:"540p";return`Estimated cost for current settings: $${(op[o]*5).toFixed(2)} per 5s segment (${o}).`}function T(){return`Estimated cost for current settings: $${((ze===cl.veo31?fm.standardWithoutAudio:fm.withoutAudio)*5).toFixed(2)} per 5s segment (audio disabled).`}function M(){if(ze===cl.klingV3)return n.jsxs(n.Fragment,{children:[n.jsxs("p",{className:"muted size-sm",children:["Kling v3 uses start/end keyframes and fixed ",n.jsx("code",{children:"duration=5s"}),"."]}),n.jsx("p",{className:"muted size-sm",children:k()}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-seg-negative-prompt",children:"Negative Prompt"}),n.jsx("textarea",{id:"cfg-seg-negative-prompt",className:"config-input",rows:3,placeholder:"Optional exclusions",value:ee.negative_prompt??"",onChange:o=>g("imageTextToVideo","negative_prompt",o.target.value||null)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-seg-mode",children:"Mode"}),n.jsxs("select",{id:"cfg-seg-mode",className:"config-select",value:ee.mode??"pro",onChange:o=>g("imageTextToVideo","mode",o.target.value),children:[n.jsx("option",{value:"standard",children:"standard (720p)"}),n.jsx("option",{value:"pro",children:"pro (1080p)"})]})]}),n.jsx("p",{className:"muted size-sm",children:"Native audio generation is currently disabled for this model."})]});if(ze===cl.pixverseV56)return n.jsxs(n.Fragment,{children:[n.jsxs("p",{className:"muted size-sm",children:["PixVerse v5.6 uses start/end keyframes and fixed ",n.jsx("code",{children:"duration=5s"}),"."]}),n.jsx("p",{className:"muted size-sm",children:w()}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-seg-quality",children:"Quality"}),n.jsxs("select",{id:"cfg-seg-quality",className:"config-select",value:ee.quality??"540p",onChange:o=>g("imageTextToVideo","quality",o.target.value),children:[n.jsx("option",{value:"360p",children:"360p"}),n.jsx("option",{value:"540p",children:"540p"}),n.jsx("option",{value:"720p",children:"720p"}),n.jsx("option",{value:"1080p",children:"1080p"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-seg-negative-prompt",children:"Negative Prompt"}),n.jsx("textarea",{id:"cfg-seg-negative-prompt",className:"config-input",rows:3,placeholder:"Optional exclusions",value:ee.negative_prompt??"",onChange:o=>g("imageTextToVideo","negative_prompt",o.target.value||null)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsxs("label",{className:"config-form-label",htmlFor:"cfg-seg-seed",children:["Seed ",n.jsx("span",{className:"config-form-optional",children:"(optional)"})]}),n.jsx("input",{id:"cfg-seg-seed",type:"number",className:"config-input",step:1,placeholder:"random",value:ee.seed??"",onChange:o=>{const p=o.target.value===""?null:parseInt(o.target.value,10);g("imageTextToVideo","seed",Number.isNaN(p)?null:p)}})]}),n.jsx("p",{className:"muted size-sm",children:"Native audio generation is currently disabled for this model."}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-seg-thinking-type",children:"Thinking Type"}),n.jsx("input",{id:"cfg-seg-thinking-type",type:"text",className:"config-input",placeholder:"auto",value:ee.thinking_type??"",onChange:o=>g("imageTextToVideo","thinking_type",o.target.value||void 0)})]})]});if(ze===cl.veo31||ze===cl.veo31Fast){const o=ze===cl.veo31?"Veo 3.1":"Veo 3.1 Fast";return n.jsxs(n.Fragment,{children:[n.jsxs("p",{className:"muted size-sm",children:[o," uses start/end keyframes and fixed ",n.jsx("code",{children:"duration=5s"}),"."]}),n.jsx("p",{className:"muted size-sm",children:T()}),n.jsx("p",{className:"muted size-sm",children:"Native audio generation is currently disabled for this model."}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-seg-resolution",children:"Resolution"}),n.jsxs("select",{id:"cfg-seg-resolution",className:"config-select",value:ee.resolution??"1080p",onChange:p=>g("imageTextToVideo","resolution",p.target.value),children:[n.jsx("option",{value:"720p",children:"720p"}),n.jsx("option",{value:"1080p",children:"1080p"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-seg-negative-prompt",children:"Negative Prompt"}),n.jsx("textarea",{id:"cfg-seg-negative-prompt",className:"config-input",rows:3,placeholder:"Optional exclusions",value:ee.negative_prompt??"",onChange:p=>g("imageTextToVideo","negative_prompt",p.target.value||null)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsxs("label",{className:"config-form-label",htmlFor:"cfg-seg-seed",children:["Seed ",n.jsx("span",{className:"config-form-optional",children:"(optional)"})]}),n.jsx("input",{id:"cfg-seg-seed",type:"number",className:"config-input",step:1,placeholder:"random",value:ee.seed??"",onChange:p=>{const ge=p.target.value===""?null:parseInt(p.target.value,10);g("imageTextToVideo","seed",Number.isNaN(ge)?null:ge)}})]})]})}return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-seg-sample-shift",children:"Sample Shift"}),n.jsx("input",{id:"cfg-seg-sample-shift",type:"number",className:"config-input",min:1,max:20,step:.1,placeholder:"12",value:ee.sample_shift??"",onChange:o=>{const p=o.target.value===""?void 0:parseFloat(o.target.value);g("imageTextToVideo","sample_shift",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsxs("label",{className:"config-form-label",htmlFor:"cfg-seg-seed",children:["Seed ",n.jsx("span",{className:"config-form-optional",children:"(optional)"})]}),n.jsx("input",{id:"cfg-seg-seed",type:"number",className:"config-input",step:1,placeholder:"random",value:ee.seed??"",onChange:o=>{const p=o.target.value===""?null:parseInt(o.target.value,10);g("imageTextToVideo","seed",Number.isNaN(p)?null:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsxs("label",{className:"config-form-label",htmlFor:"cfg-seg-lora1",children:["LoRA Weights ",n.jsx("span",{className:"config-form-optional",children:"(optional)"})]}),n.jsx("input",{id:"cfg-seg-lora1",type:"text",className:"config-input",placeholder:"none",value:ee.lora_weights_transformer??"",onChange:o=>g("imageTextToVideo","lora_weights_transformer",o.target.value||null)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-seg-lora1-scale",children:"LoRA Scale"}),n.jsx("input",{id:"cfg-seg-lora1-scale",type:"number",className:"config-input",step:.1,placeholder:"1",value:ee.lora_scale_transformer??"",onChange:o=>{const p=o.target.value===""?void 0:parseFloat(o.target.value);g("imageTextToVideo","lora_scale_transformer",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsxs("label",{className:"config-form-label",htmlFor:"cfg-seg-lora2",children:["LoRA Weights 2 ",n.jsx("span",{className:"config-form-optional",children:"(optional)"})]}),n.jsx("input",{id:"cfg-seg-lora2",type:"text",className:"config-input",placeholder:"none",value:ee.lora_weights_transformer_2??"",onChange:o=>g("imageTextToVideo","lora_weights_transformer_2",o.target.value||null)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-seg-lora2-scale",children:"LoRA Scale 2"}),n.jsx("input",{id:"cfg-seg-lora2-scale",type:"number",className:"config-input",step:.1,placeholder:"1",value:ee.lora_scale_transformer_2??"",onChange:o=>{const p=o.target.value===""?void 0:parseFloat(o.target.value);g("imageTextToVideo","lora_scale_transformer_2",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-seg-go-fast",children:"Go Fast"}),n.jsx("input",{id:"cfg-seg-go-fast",type:"checkbox",checked:ee.go_fast??!0,onChange:o=>g("imageTextToVideo","go_fast",o.target.checked)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-seg-interpolate",children:"Interpolate Output"}),n.jsx("input",{id:"cfg-seg-interpolate",type:"checkbox",checked:ee.interpolate_output??!1,onChange:o=>g("imageTextToVideo","interpolate_output",o.target.checked)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-seg-safety",children:"Disable Safety Checker"}),n.jsx("input",{id:"cfg-seg-safety",type:"checkbox",checked:ee.disable_safety_checker??!1,onChange:o=>g("imageTextToVideo","disable_safety_checker",o.target.checked)})]})]})}const f=m?.modelOptions?.textToSpeech||{},z=te.textToSpeech||Sa.minimax,V=z===Sa.minimax,X=z===Sa.chatterboxTurbo,le=z===Sa.kokoro82m;function oe(o){U("textToSpeech",o),o===Sa.minimax?[...om,...ip].forEach(p=>g("textToSpeech",p,void 0)):o===Sa.chatterboxTurbo?[...sm,"speed"].forEach(p=>g("textToSpeech",p,void 0)):[...sm,...om].forEach(p=>g("textToSpeech",p,void 0))}return n.jsx("div",{className:"tab-pane",children:m?n.jsxs(n.Fragment,{children:[n.jsx("div",{className:"config-inner-tab-bar",role:"tablist","aria-label":"Config sections",children:[{id:"video",label:"Video"},{id:"captions",label:"Captions"},{id:"models",label:"Models"},{id:"raw",label:"Raw"}].map(({id:o,label:p})=>n.jsx("button",{role:"tab",type:"button",className:`config-inner-tab${Y===o?" config-inner-tab-active":""}`,"aria-selected":Y===o,onClick:()=>fe(o),children:p},o))}),Y==="video"&&n.jsxs("form",{className:"config-form",onSubmit:o=>{o.preventDefault(),L()},children:[n.jsxs("div",{className:"config-form-fields",children:[n.jsxs("section",{className:"config-group","aria-labelledby":"cfg-group-video",children:[n.jsxs("header",{className:"config-group-header",children:[n.jsx("h3",{id:"cfg-group-video",className:"config-group-title",children:"Video Setup"}),n.jsx("p",{className:"config-group-note muted size-sm",children:"Output shape and overall timing."})]}),n.jsxs("div",{className:"config-group-grid",children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-aspect",children:"Aspect Ratio"}),n.jsxs("select",{id:"cfg-aspect",className:"config-select",value:m.aspectRatio||"9:16",onChange:o=>G("aspectRatio",o.target.value),children:[n.jsx("option",{value:"9:16",children:"9:16 — Portrait"}),n.jsx("option",{value:"16:9",children:"16:9 — Landscape"}),n.jsx("option",{value:"1:1",children:"1:1 — Square"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-duration",children:"Target Duration (sec)"}),n.jsx("input",{id:"cfg-duration",type:"number",className:"config-input",min:5,max:600,step:1,value:m.targetDurationSec??"",onChange:o=>{const p=parseInt(o.target.value,10);isNaN(p)||G("targetDurationSec",p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-finalduration",children:"Final Duration Mode"}),n.jsxs("select",{id:"cfg-finalduration",className:"config-select",value:m.finalDurationMode||"match_audio",onChange:o=>G("finalDurationMode",o.target.value),children:[n.jsx("option",{value:"match_audio",children:"Match Audio"}),n.jsx("option",{value:"match_visual",children:"Match Visual"})]})]})]})]}),n.jsxs("section",{className:"config-group","aria-labelledby":"cfg-group-keyframes",children:[n.jsxs("header",{className:"config-group-header",children:[n.jsx("h3",{id:"cfg-group-keyframes",className:"config-group-title",children:"Frame Resolution"}),n.jsx("p",{className:"config-group-note muted size-sm",children:"Leave width/height empty to auto-resolve from aspect ratio."})]}),n.jsxs("div",{className:"config-group-grid",children:[n.jsxs("div",{className:"config-form-field",children:[n.jsxs("label",{className:"config-form-label",htmlFor:"cfg-kfw",children:["Keyframe Width ",n.jsx("span",{className:"config-form-optional",children:"(optional)"})]}),n.jsx("input",{id:"cfg-kfw",type:"number",className:"config-input",min:64,max:2048,step:1,placeholder:"auto",value:m.keyframeWidth??"",onChange:o=>F("keyframeWidth",o.target.value)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsxs("label",{className:"config-form-label",htmlFor:"cfg-kfh",children:["Keyframe Height ",n.jsx("span",{className:"config-form-optional",children:"(optional)"})]}),n.jsx("input",{id:"cfg-kfh",type:"number",className:"config-input",min:64,max:2048,step:1,placeholder:"auto",value:m.keyframeHeight??"",onChange:o=>F("keyframeHeight",o.target.value)})]}),n.jsxs("div",{className:"config-form-field config-form-field--readonly",children:[n.jsx("span",{className:"config-form-label",children:"Resolved Size"}),n.jsx("span",{className:"config-value",children:`${_} × ${d}`})]})]})]})]}),n.jsxs("div",{className:"config-form-actions",children:[n.jsx("button",{type:"submit",className:"btn btn-primary",disabled:!E||R||q,children:R?"Saving…":"Save Config"}),E&&n.jsx("span",{className:"muted size-sm",children:"Unsaved changes"})]})]}),Y==="captions"&&n.jsxs("form",{className:"config-form",onSubmit:o=>{o.preventDefault(),L()},children:[n.jsx("div",{className:"config-form-fields",children:n.jsxs("section",{className:"config-group","aria-labelledby":"cfg-group-subtitles",children:[n.jsxs("header",{className:"config-group-header",children:[n.jsx("h3",{id:"cfg-group-subtitles",className:"config-group-title",children:"Subtitles"}),n.jsx("p",{className:"config-group-note muted size-sm",children:"Style and readability controls for caption burn-in."})]}),n.jsxs("div",{className:"config-group-grid",children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-enabled",children:"Subtitle Burn-In"}),n.jsxs("select",{id:"cfg-sub-enabled",className:"config-select",value:H.enabled?"on":"off",onChange:o=>G("subtitleOptions",{...H,enabled:o.target.value==="on"}),children:[n.jsx("option",{value:"off",children:"Off"}),n.jsx("option",{value:"on",children:"On"})]})]}),H.enabled&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-template",children:"Caption Template"}),n.jsx("select",{id:"cfg-sub-template",className:"config-select",value:H.templateId||"custom",onChange:o=>G("subtitleOptions",{...H,templateId:o.target.value}),children:Zs.map(o=>n.jsx("option",{value:o.id,children:o.label},o.id))}),n.jsx("p",{className:"muted size-sm",children:$.description}),n.jsxs("div",{className:"config-inline-actions",children:[n.jsx("button",{type:"button",className:"btn",disabled:(H.templateId||"custom")==="custom",onClick:()=>Me(H.templateId||"custom"),children:"Apply Template"}),n.jsx("button",{type:"button",className:"btn",disabled:(H.templateId||"custom")==="custom",onClick:()=>Me(H.templateId||"custom"),children:"Reset To Template"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-font",children:"Subtitle Font"}),n.jsx(Ks,{id:"cfg-sub-font",className:"config-input",placeholder:"Poppins",value:H.fontName||"",options:ce,inputStyle:{fontFamily:H.fontName?`"${H.fontName}", sans-serif`:void 0},getOptionStyle:o=>({fontFamily:`"${o}", sans-serif`}),onChange:o=>G("subtitleOptions",{...H,fontName:o||""})}),n.jsx("p",{className:"muted size-sm",children:W?`Showing ${ce.length} likely available fonts on this device (you can still type any font name).`:"Detecting available fonts on this device..."})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-position",children:"Subtitle Position"}),n.jsxs("select",{id:"cfg-sub-position",className:"config-select",value:H.position||"center",onChange:o=>G("subtitleOptions",{...H,position:o.target.value}),children:[n.jsx("option",{value:"center",children:"Center"}),n.jsx("option",{value:"bottom",children:"Bottom"}),n.jsx("option",{value:"top",children:"Top"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-highlight-mode",children:"Highlight Mode"}),n.jsxs("select",{id:"cfg-sub-highlight-mode",className:"config-select",value:H.highlightMode||"spoken_upcoming",onChange:o=>G("subtitleOptions",{...H,highlightMode:o.target.value}),children:[n.jsx("option",{value:"spoken_upcoming",children:"Spoken vs Upcoming"}),n.jsx("option",{value:"current_only",children:"Current Word Only"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-size",children:"Subtitle Size"}),n.jsx("input",{id:"cfg-sub-size",type:"number",className:"config-input",min:16,max:120,step:1,value:H.fontSize??"",onChange:o=>{const p=parseInt(o.target.value,10);isNaN(p)||G("subtitleOptions",{...H,fontSize:p})}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-bold",children:"Weight"}),n.jsxs("select",{id:"cfg-sub-bold",className:"config-select",value:H.bold===!1?"regular":"bold",onChange:o=>G("subtitleOptions",{...H,bold:o.target.value==="bold"}),children:[n.jsx("option",{value:"bold",children:"Bold"}),n.jsx("option",{value:"regular",children:"Regular"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-italic",children:"Italic"}),n.jsxs("select",{id:"cfg-sub-italic",className:"config-select",value:H.italic?"on":"off",onChange:o=>G("subtitleOptions",{...H,italic:o.target.value==="on"}),children:[n.jsx("option",{value:"off",children:"Off"}),n.jsx("option",{value:"on",children:"On"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-uppercase",children:"Uppercase Captions"}),n.jsxs("select",{id:"cfg-sub-uppercase",className:"config-select",value:H.makeUppercase?"on":"off",onChange:o=>G("subtitleOptions",{...H,makeUppercase:o.target.value==="on"}),children:[n.jsx("option",{value:"off",children:"Off"}),n.jsx("option",{value:"on",children:"On"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-primary",children:"Base Color"}),n.jsxs("div",{className:"config-color-input-row",children:[n.jsx("input",{type:"color",className:"config-color-picker",value:Te(H.primaryColor,"#ffffff"),onChange:o=>G("subtitleOptions",{...H,primaryColor:o.target.value}),"aria-label":"Choose subtitle base color"}),n.jsx("input",{id:"cfg-sub-primary",type:"text",className:"config-input",placeholder:"#ffffff",value:H.primaryColor||"",onChange:o=>G("subtitleOptions",{...H,primaryColor:o.target.value})})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-active",children:"Active Word Color"}),n.jsxs("div",{className:"config-color-input-row",children:[n.jsx("input",{type:"color",className:"config-color-picker",value:Te(H.activeColor,"#ffe066"),onChange:o=>G("subtitleOptions",{...H,activeColor:o.target.value}),"aria-label":"Choose subtitle active word color"}),n.jsx("input",{id:"cfg-sub-active",type:"text",className:"config-input",placeholder:"#ffe066",value:H.activeColor||"",onChange:o=>G("subtitleOptions",{...H,activeColor:o.target.value})})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-outline-color",children:"Border Color"}),n.jsxs("div",{className:"config-color-input-row",children:[n.jsx("input",{type:"color",className:"config-color-picker",value:Te(H.outlineColor,"#111111"),onChange:o=>G("subtitleOptions",{...H,outlineColor:o.target.value}),"aria-label":"Choose subtitle border color"}),n.jsx("input",{id:"cfg-sub-outline-color",type:"text",className:"config-input",placeholder:"#111111",value:H.outlineColor||"",onChange:o=>G("subtitleOptions",{...H,outlineColor:o.target.value})})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-outline",children:"Border Width"}),n.jsx("input",{id:"cfg-sub-outline",type:"number",className:"config-input",min:0,max:12,step:1,value:H.outline??"",onChange:o=>{const p=parseInt(o.target.value,10);isNaN(p)||G("subtitleOptions",{...H,outline:p})}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-shadow",children:"Shadow"}),n.jsx("input",{id:"cfg-sub-shadow",type:"number",className:"config-input",min:0,max:12,step:1,value:H.shadow??"",onChange:o=>{const p=parseInt(o.target.value,10);isNaN(p)||G("subtitleOptions",{...H,shadow:p})}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-margin-v",children:"Vertical Margin"}),n.jsx("input",{id:"cfg-sub-margin-v",type:"number",className:"config-input",min:0,max:400,step:1,value:H.marginV??"",onChange:o=>{const p=parseInt(o.target.value,10);isNaN(p)||G("subtitleOptions",{...H,marginV:p})}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-background-enabled",children:"Background Box"}),n.jsxs("select",{id:"cfg-sub-background-enabled",className:"config-select",value:H.backgroundEnabled?"on":"off",onChange:o=>G("subtitleOptions",{...H,backgroundEnabled:o.target.value==="on"}),children:[n.jsx("option",{value:"off",children:"Off"}),n.jsx("option",{value:"on",children:"On"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-background-color",children:"Background Color"}),n.jsxs("div",{className:"config-color-input-row",children:[n.jsx("input",{type:"color",className:"config-color-picker",value:Te(H.backgroundColor,"#000000"),onChange:o=>G("subtitleOptions",{...H,backgroundColor:o.target.value}),"aria-label":"Choose subtitle background color"}),n.jsx("input",{id:"cfg-sub-background-color",type:"text",className:"config-input",placeholder:"#000000",value:H.backgroundColor||"",onChange:o=>G("subtitleOptions",{...H,backgroundColor:o.target.value})})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-background-opacity",children:"Background Opacity"}),n.jsx("input",{id:"cfg-sub-background-opacity",type:"number",className:"config-input",min:0,max:.85,step:.05,value:H.backgroundOpacity??"",onChange:o=>{const p=Number.parseFloat(o.target.value);Number.isNaN(p)||G("subtitleOptions",{...H,backgroundOpacity:p})}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-max-words",children:"Words Per Caption"}),n.jsx("input",{id:"cfg-sub-max-words",type:"number",className:"config-input",min:1,max:20,step:1,value:H.maxWordsPerLine??"",onChange:o=>{const p=parseInt(o.target.value,10);isNaN(p)||G("subtitleOptions",{...H,maxWordsPerLine:p})}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-sub-max-lines",children:"Max Lines"}),n.jsx("input",{id:"cfg-sub-max-lines",type:"number",className:"config-input",min:1,max:3,step:1,value:H.maxLines??"",onChange:o=>{const p=parseInt(o.target.value,10);isNaN(p)||G("subtitleOptions",{...H,maxLines:p})}})]})]})]})]})}),n.jsxs("div",{className:"config-form-actions",children:[n.jsx("button",{type:"submit",className:"btn btn-primary",disabled:!E||R||q,children:R?"Saving…":"Save Config"}),E&&n.jsx("span",{className:"muted size-sm",children:"Unsaved changes"})]})]}),Y==="models"&&n.jsxs(n.Fragment,{children:[n.jsxs(et,{modelId:te.textToText,title:"Text to Text Model",configDirty:E,savingConfig:R,isRunning:q,onSaveConfig:L,children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-model-text",children:"Model ID"}),n.jsx("input",{id:"cfg-model-text",type:"text",className:"config-input",value:te.textToText||"",onChange:o=>U("textToText",o.target.value)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-ttt-max-tokens",children:"Max Tokens"}),n.jsx("input",{id:"cfg-ttt-max-tokens",type:"number",className:"config-input",min:1,max:8192,step:1,placeholder:"2048",value:se.max_tokens??"",onChange:o=>{const p=o.target.value===""?void 0:parseInt(o.target.value,10);g("textToText","max_tokens",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-ttt-temperature",children:"Temperature"}),n.jsx("input",{id:"cfg-ttt-temperature",type:"number",className:"config-input",min:0,max:2,step:.01,placeholder:"0.1",value:se.temperature??"",onChange:o=>{const p=o.target.value===""?void 0:parseFloat(o.target.value);g("textToText","temperature",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-ttt-presence",children:"Presence Penalty"}),n.jsx("input",{id:"cfg-ttt-presence",type:"number",className:"config-input",min:-2,max:2,step:.01,placeholder:"0",value:se.presence_penalty??"",onChange:o=>{const p=o.target.value===""?void 0:parseFloat(o.target.value);g("textToText","presence_penalty",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-ttt-frequency",children:"Frequency Penalty"}),n.jsx("input",{id:"cfg-ttt-frequency",type:"number",className:"config-input",min:-2,max:2,step:.01,placeholder:"0",value:se.frequency_penalty??"",onChange:o=>{const p=o.target.value===""?void 0:parseFloat(o.target.value);g("textToText","frequency_penalty",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-ttt-top-p",children:"Top P"}),n.jsx("input",{id:"cfg-ttt-top-p",type:"number",className:"config-input",min:0,max:1,step:.01,placeholder:"1",value:se.top_p??"",onChange:o=>{const p=o.target.value===""?void 0:parseFloat(o.target.value);g("textToText","top_p",Number.isNaN(p)?void 0:p)}})]})]}),n.jsxs(et,{modelId:Ee,title:"Keyframe Model",configDirty:E,savingConfig:R,isRunning:q,onSaveConfig:L,children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-kf-model",children:"Model"}),n.jsxs("select",{id:"cfg-kf-model",className:"config-select",value:Ee,onChange:o=>j(o.target.value),children:[n.jsx("option",{value:Nl.pruna,children:"Z Image Turbo (`prunaai/z-image-turbo`)"}),n.jsx("option",{value:Nl.flux,children:"FLUX 2 Pro (`black-forest-labs/flux-2-pro`)"}),n.jsx("option",{value:Nl.fluxSchnell,children:"FLUX Schnell (`black-forest-labs/flux-schnell`)"}),n.jsx("option",{value:Nl.nanoBananaPro,children:"Nano Banana Pro (`google/nano-banana-pro`)"}),n.jsx("option",{value:Nl.seedream4,children:"Seedream 4 (`bytedance/seedream-4`)"})]})]}),B()]}),n.jsxs(et,{modelId:ze,title:"Segment Model",configDirty:E,savingConfig:R,isRunning:q,onSaveConfig:L,children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-seg-model",children:"Model"}),n.jsxs("select",{id:"cfg-seg-model",className:"config-select",value:ze,onChange:o=>S(o.target.value),children:[n.jsx("option",{value:cl.wan,children:"Wan 2.2 I2V Fast (`wan-video/wan-2.2-i2v-fast`)"}),n.jsx("option",{value:cl.klingV3,children:"Kling V3 Video (`kwaivgi/kling-v3-video`)"}),n.jsx("option",{value:cl.pixverseV56,children:"PixVerse v5.6 (`pixverse/pixverse-v5.6`)"}),n.jsx("option",{value:cl.veo31,children:"Veo 3.1 (`google/veo-3.1`)"}),n.jsx("option",{value:cl.veo31Fast,children:"Veo 3.1 Fast (`google/veo-3.1-fast`)"})]})]}),M()]}),n.jsxs(et,{modelId:z,title:"Voice Model",configDirty:E,savingConfig:R,isRunning:q,onSaveConfig:L,children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-model",children:"Model"}),n.jsxs("select",{id:"cfg-voice-model",className:"config-select",value:z,onChange:o=>oe(o.target.value),children:[n.jsx("option",{value:Sa.minimax,children:"minimax/speech-02-turbo"}),n.jsx("option",{value:Sa.chatterboxTurbo,children:"resemble-ai/chatterbox-turbo"}),n.jsx("option",{value:Sa.kokoro82m,children:"jaaari/kokoro-82m"})]})]}),V&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-id",children:"Voice ID"}),n.jsx(Ks,{id:"cfg-voice-id",className:"config-input",placeholder:"Wise_Woman",value:f.voice_id??"",onChange:o=>g("textToSpeech","voice_id",o),options:["Wise_Woman","Deep_Voice_Man","Imposing_Manner","Friendly_Person","Lively_Girl","Young_Knight"]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-emotion",children:"Emotion"}),n.jsx("select",{id:"cfg-voice-emotion",className:"config-select",value:f.emotion??"auto",onChange:o=>g("textToSpeech","emotion",o.target.value),children:["auto","neutral","happy","sad","angry","fearful","disgusted","surprised","calm","fluent"].map(o=>n.jsx("option",{value:o,children:o},o))})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-speed",children:"Speed"}),n.jsx("input",{id:"cfg-voice-speed",type:"number",className:"config-input",min:.5,max:2,step:.05,placeholder:"1",value:f.speed??"",onChange:o=>{const p=o.target.value===""?void 0:parseFloat(o.target.value);g("textToSpeech","speed",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-pitch",children:"Pitch"}),n.jsx("input",{id:"cfg-voice-pitch",type:"number",className:"config-input",min:-12,max:12,step:1,placeholder:"0",value:f.pitch??"",onChange:o=>{const p=o.target.value===""?void 0:parseInt(o.target.value,10);g("textToSpeech","pitch",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-volume",children:"Volume"}),n.jsx("input",{id:"cfg-voice-volume",type:"number",className:"config-input",min:0,max:10,step:.1,placeholder:"1",value:f.volume??"",onChange:o=>{const p=o.target.value===""?void 0:parseFloat(o.target.value);g("textToSpeech","volume",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-audio-format",children:"Audio Format"}),n.jsxs("select",{id:"cfg-voice-audio-format",className:"config-select",value:f.audio_format??"mp3",onChange:o=>g("textToSpeech","audio_format",o.target.value),children:[n.jsx("option",{value:"mp3",children:"mp3"}),n.jsx("option",{value:"wav",children:"wav"}),n.jsx("option",{value:"flac",children:"flac"}),n.jsx("option",{value:"pcm",children:"pcm"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-channel",children:"Channel"}),n.jsxs("select",{id:"cfg-voice-channel",className:"config-select",value:f.channel??"mono",onChange:o=>g("textToSpeech","channel",o.target.value),children:[n.jsx("option",{value:"mono",children:"mono"}),n.jsx("option",{value:"stereo",children:"stereo"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-sample-rate",children:"Sample Rate (Hz)"}),n.jsx("input",{id:"cfg-voice-sample-rate",type:"number",className:"config-input",min:8e3,max:44100,step:100,placeholder:"32000",value:f.sample_rate??"",onChange:o=>{const p=o.target.value===""?void 0:parseInt(o.target.value,10);g("textToSpeech","sample_rate",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-bitrate",children:"Bitrate (bps)"}),n.jsx("input",{id:"cfg-voice-bitrate",type:"number",className:"config-input",min:32e3,max:256e3,step:1e3,placeholder:"128000",value:f.bitrate??"",onChange:o=>{const p=o.target.value===""?void 0:parseInt(o.target.value,10);g("textToSpeech","bitrate",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-lang-boost",children:"Language Boost"}),n.jsx("input",{id:"cfg-voice-lang-boost",type:"text",className:"config-input",list:"cfg-voice-lang-list",placeholder:"None",value:f.language_boost??"",onChange:o=>g("textToSpeech","language_boost",o.target.value||void 0)}),n.jsx("datalist",{id:"cfg-voice-lang-list",children:["None","Automatic","en","zh","ja","ko","es","fr","de","pt"].map(o=>n.jsx("option",{value:o},o))})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-subtitle",children:"Subtitle Enable"}),n.jsx("input",{id:"cfg-voice-subtitle",type:"checkbox",checked:f.subtitle_enable??!1,onChange:o=>g("textToSpeech","subtitle_enable",o.target.checked)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-en-norm",children:"English Normalization"}),n.jsx("input",{id:"cfg-voice-en-norm",type:"checkbox",checked:f.english_normalization??!1,onChange:o=>g("textToSpeech","english_normalization",o.target.checked)})]})]}),X&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-chatterbox-voice",children:"Voice"}),n.jsx("select",{id:"cfg-voice-chatterbox-voice",className:"config-select",value:f.voice??"Andy",onChange:o=>g("textToSpeech","voice",o.target.value),children:cp.map(o=>n.jsx("option",{value:o,children:o},o))})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-chatterbox-temperature",children:"Temperature"}),n.jsx("input",{id:"cfg-voice-chatterbox-temperature",type:"number",className:"config-input",min:.05,max:2,step:.01,placeholder:"0.8",value:f.temperature??"",onChange:o=>{const p=o.target.value===""?void 0:parseFloat(o.target.value);g("textToSpeech","temperature",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-chatterbox-top-p",children:"Top P"}),n.jsx("input",{id:"cfg-voice-chatterbox-top-p",type:"number",className:"config-input",min:.5,max:1,step:.01,placeholder:"0.95",value:f.top_p??"",onChange:o=>{const p=o.target.value===""?void 0:parseFloat(o.target.value);g("textToSpeech","top_p",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-chatterbox-top-k",children:"Top K"}),n.jsx("input",{id:"cfg-voice-chatterbox-top-k",type:"number",className:"config-input",min:1,max:2e3,step:1,placeholder:"1000",value:f.top_k??"",onChange:o=>{const p=o.target.value===""?void 0:parseInt(o.target.value,10);g("textToSpeech","top_k",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-chatterbox-repetition",children:"Repetition Penalty"}),n.jsx("input",{id:"cfg-voice-chatterbox-repetition",type:"number",className:"config-input",min:1,max:2,step:.01,placeholder:"1.2",value:f.repetition_penalty??"",onChange:o=>{const p=o.target.value===""?void 0:parseFloat(o.target.value);g("textToSpeech","repetition_penalty",Number.isNaN(p)?void 0:p)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-chatterbox-seed",children:"Seed"}),n.jsx("input",{id:"cfg-voice-chatterbox-seed",type:"number",className:"config-input",min:0,step:1,placeholder:"Random",value:f.seed??"",onChange:o=>{const p=o.target.value===""?null:parseInt(o.target.value,10);g("textToSpeech","seed",Number.isNaN(p)?void 0:p)}})]}),n.jsx("div",{className:"config-form-field",children:n.jsxs("p",{className:"muted size-sm",style:{margin:0},children:["Voice cloning via ",n.jsx("code",{children:"reference_audio"})," is supported by this model but disabled in this app for now."]})})]}),le&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-kokoro-voice",children:"Voice"}),n.jsx("select",{id:"cfg-voice-kokoro-voice",className:"config-select",value:f.voice??"af_bella",onChange:o=>g("textToSpeech","voice",o.target.value),children:up.map(o=>n.jsx("option",{value:o,children:o},o))})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"cfg-voice-kokoro-speed",children:"Speed"}),n.jsx("input",{id:"cfg-voice-kokoro-speed",type:"number",className:"config-input",min:.1,max:5,step:.1,placeholder:"1",value:f.speed??"",onChange:o=>{const p=o.target.value===""?void 0:parseFloat(o.target.value);g("textToSpeech","speed",Number.isNaN(p)?void 0:p)}})]})]})]})]}),Y==="raw"&&n.jsxs("section",{children:[n.jsx("h3",{className:"section-label",children:"Raw config"}),n.jsx("pre",{className:"config-json",children:JSON.stringify(D,null,2)})]})]}):n.jsx("div",{className:"empty-state",children:n.jsx("p",{className:"muted",children:"No project config found."})})})}const Ta={minimax:"minimax/speech-02-turbo",chatterboxTurbo:"resemble-ai/chatterbox-turbo",kokoro82m:"jaaari/kokoro-82m"},dm=["emotion","pitch","speed","volume","voice_id","audio_format","sample_rate","bitrate","channel","language_boost","subtitle_enable","english_normalization"],mm=["voice","temperature","top_p","top_k","repetition_penalty","seed"],dp=["voice","speed"],mp=["Aaron","Abigail","Anaya","Andy","Archer","Brian","Chloe","Dylan","Emmanuel","Ethan","Evelyn","Gavin","Gordon","Ivan","Laura","Lucy","Madison","Marisol","Meera","Walter"],gp=["af_alloy","af_aoede","af_bella","af_jessica","af_kore","af_nicole","af_nova","af_river","af_sarah","af_sky","am_adam","am_echo","am_eric","am_fenrir","am_liam","am_michael","am_onyx","am_puck","bf_alice","bf_emma","bf_isabella","bf_lily","bm_daniel","bm_fable","bm_george","bm_lewis","ff_siwis","hf_alpha","hf_beta","hm_omega","hm_psi","if_sara","im_nicola","jf_alpha","jf_gongitsune","jf_nezumi","jf_tebukuro","jm_kumo","zf_xiaobei","zf_xiaoni","zf_xiaoxiao","zf_xiaoyi","zm_yunjian","zm_yunxi","zm_yunxia","zm_yunyang"];function hp({voiceAsset:m,selectedProject:D,assetCacheKey:_,isRunning:d,busy:E,scriptBusy:R,scriptText:q,dirty:G,savingContent:U,onScriptChange:g,onSave:F,toDisplayAssetUrl:L,onRegenerateVoice:te,onRegenerateScript:se,configDraft:H,onPatchModel:Y,onPatchModelOption:fe,configDirty:be,savingConfig:Ye,onSaveConfig:W}){const I=H?.models||{},ce=H?.modelOptions?.textToSpeech||{},$=I.textToSpeech||Ta.minimax,ie=$===Ta.minimax,Te=$===Ta.chatterboxTurbo,Me=$===Ta.kokoro82m;function ue(j){for(const B of j)fe("textToSpeech",B,void 0)}function Ee(j){if(Y("textToSpeech",j),j===Ta.minimax){ue([...mm,...dp]);return}if(j===Ta.chatterboxTurbo){ue([...dm,"speed"]);return}ue([...dm,...mm])}return n.jsxs("div",{className:"tab-pane",children:[n.jsxs(et,{modelId:$,configDirty:be,savingConfig:Ye,isRunning:d,onSaveConfig:W,children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-model",children:"Model"}),n.jsxs("select",{id:"voice-model",className:"config-select",value:$,onChange:j=>Ee(j.target.value),children:[n.jsx("option",{value:Ta.minimax,children:"minimax/speech-02-turbo"}),n.jsx("option",{value:Ta.chatterboxTurbo,children:"resemble-ai/chatterbox-turbo"}),n.jsx("option",{value:Ta.kokoro82m,children:"jaaari/kokoro-82m"})]})]}),ie&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-id",children:"Voice ID"}),n.jsx(Ks,{id:"voice-id",className:"config-input",placeholder:"Wise_Woman",value:ce.voice_id??"",onChange:j=>fe("textToSpeech","voice_id",j),options:["Wise_Woman","Deep_Voice_Man","Imposing_Manner","Friendly_Person","Lively_Girl","Young_Knight"]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-emotion",children:"Emotion"}),n.jsxs("select",{id:"voice-emotion",className:"config-select",value:ce.emotion??"auto",onChange:j=>fe("textToSpeech","emotion",j.target.value),children:[n.jsx("option",{value:"auto",children:"auto"}),n.jsx("option",{value:"neutral",children:"neutral"}),n.jsx("option",{value:"happy",children:"happy"}),n.jsx("option",{value:"sad",children:"sad"}),n.jsx("option",{value:"angry",children:"angry"}),n.jsx("option",{value:"fearful",children:"fearful"}),n.jsx("option",{value:"disgusted",children:"disgusted"}),n.jsx("option",{value:"surprised",children:"surprised"}),n.jsx("option",{value:"calm",children:"calm"}),n.jsx("option",{value:"fluent",children:"fluent"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-speed",children:"Speed"}),n.jsx("input",{id:"voice-speed",type:"number",className:"config-input",min:.5,max:2,step:.05,placeholder:"1",value:ce.speed??"",onChange:j=>{const B=j.target.value===""?void 0:parseFloat(j.target.value);fe("textToSpeech","speed",Number.isNaN(B)?void 0:B)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-pitch",children:"Pitch"}),n.jsx("input",{id:"voice-pitch",type:"number",className:"config-input",min:-12,max:12,step:1,placeholder:"0",value:ce.pitch??"",onChange:j=>{const B=j.target.value===""?void 0:parseInt(j.target.value,10);fe("textToSpeech","pitch",Number.isNaN(B)?void 0:B)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-volume",children:"Volume"}),n.jsx("input",{id:"voice-volume",type:"number",className:"config-input",min:0,max:10,step:.1,placeholder:"1",value:ce.volume??"",onChange:j=>{const B=j.target.value===""?void 0:parseFloat(j.target.value);fe("textToSpeech","volume",Number.isNaN(B)?void 0:B)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-audio-format",children:"Audio Format"}),n.jsxs("select",{id:"voice-audio-format",className:"config-select",value:ce.audio_format??"mp3",onChange:j=>fe("textToSpeech","audio_format",j.target.value),children:[n.jsx("option",{value:"mp3",children:"mp3"}),n.jsx("option",{value:"wav",children:"wav"}),n.jsx("option",{value:"flac",children:"flac"}),n.jsx("option",{value:"pcm",children:"pcm"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-channel",children:"Channel"}),n.jsxs("select",{id:"voice-channel",className:"config-select",value:ce.channel??"mono",onChange:j=>fe("textToSpeech","channel",j.target.value),children:[n.jsx("option",{value:"mono",children:"mono"}),n.jsx("option",{value:"stereo",children:"stereo"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-sample-rate",children:"Sample Rate (Hz)"}),n.jsx("input",{id:"voice-sample-rate",type:"number",className:"config-input",min:8e3,max:44100,step:100,placeholder:"32000",value:ce.sample_rate??"",onChange:j=>{const B=j.target.value===""?void 0:parseInt(j.target.value,10);fe("textToSpeech","sample_rate",Number.isNaN(B)?void 0:B)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-bitrate",children:"Bitrate (bps)"}),n.jsx("input",{id:"voice-bitrate",type:"number",className:"config-input",min:32e3,max:256e3,step:1e3,placeholder:"128000",value:ce.bitrate??"",onChange:j=>{const B=j.target.value===""?void 0:parseInt(j.target.value,10);fe("textToSpeech","bitrate",Number.isNaN(B)?void 0:B)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-lang-boost",children:"Language Boost"}),n.jsx("input",{id:"voice-lang-boost",type:"text",className:"config-input",list:"voice-lang-list",placeholder:"None",value:ce.language_boost??"",onChange:j=>fe("textToSpeech","language_boost",j.target.value||void 0)}),n.jsxs("datalist",{id:"voice-lang-list",children:[n.jsx("option",{value:"None"}),n.jsx("option",{value:"Automatic"}),n.jsx("option",{value:"en"}),n.jsx("option",{value:"zh"}),n.jsx("option",{value:"ja"}),n.jsx("option",{value:"ko"}),n.jsx("option",{value:"es"}),n.jsx("option",{value:"fr"}),n.jsx("option",{value:"de"}),n.jsx("option",{value:"pt"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-subtitle",children:"Subtitle Enable"}),n.jsx("input",{id:"voice-subtitle",type:"checkbox",checked:ce.subtitle_enable??!1,onChange:j=>fe("textToSpeech","subtitle_enable",j.target.checked)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-en-norm",children:"English Normalization"}),n.jsx("input",{id:"voice-en-norm",type:"checkbox",checked:ce.english_normalization??!1,onChange:j=>fe("textToSpeech","english_normalization",j.target.checked)})]})]}),Te&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-chatterbox-voice",children:"Voice"}),n.jsx("select",{id:"voice-chatterbox-voice",className:"config-select",value:ce.voice??"Andy",onChange:j=>fe("textToSpeech","voice",j.target.value),children:mp.map(j=>n.jsx("option",{value:j,children:j},j))})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-chatterbox-temperature",children:"Temperature"}),n.jsx("input",{id:"voice-chatterbox-temperature",type:"number",className:"config-input",min:.05,max:2,step:.01,placeholder:"0.8",value:ce.temperature??"",onChange:j=>{const B=j.target.value===""?void 0:parseFloat(j.target.value);fe("textToSpeech","temperature",Number.isNaN(B)?void 0:B)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-chatterbox-top-p",children:"Top P"}),n.jsx("input",{id:"voice-chatterbox-top-p",type:"number",className:"config-input",min:.5,max:1,step:.01,placeholder:"0.95",value:ce.top_p??"",onChange:j=>{const B=j.target.value===""?void 0:parseFloat(j.target.value);fe("textToSpeech","top_p",Number.isNaN(B)?void 0:B)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-chatterbox-top-k",children:"Top K"}),n.jsx("input",{id:"voice-chatterbox-top-k",type:"number",className:"config-input",min:1,max:2e3,step:1,placeholder:"1000",value:ce.top_k??"",onChange:j=>{const B=j.target.value===""?void 0:parseInt(j.target.value,10);fe("textToSpeech","top_k",Number.isNaN(B)?void 0:B)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-chatterbox-repetition",children:"Repetition Penalty"}),n.jsx("input",{id:"voice-chatterbox-repetition",type:"number",className:"config-input",min:1,max:2,step:.01,placeholder:"1.2",value:ce.repetition_penalty??"",onChange:j=>{const B=j.target.value===""?void 0:parseFloat(j.target.value);fe("textToSpeech","repetition_penalty",Number.isNaN(B)?void 0:B)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-chatterbox-seed",children:"Seed"}),n.jsx("input",{id:"voice-chatterbox-seed",type:"number",className:"config-input",min:0,step:1,placeholder:"Random",value:ce.seed??"",onChange:j=>{const B=j.target.value===""?null:parseInt(j.target.value,10);fe("textToSpeech","seed",Number.isNaN(B)?void 0:B)}})]}),n.jsx("div",{className:"config-form-field",children:n.jsxs("p",{className:"muted size-sm",style:{margin:0},children:["Voice cloning via ",n.jsx("code",{children:"reference_audio"})," is supported by this model but disabled in this app for now."]})})]}),Me&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-kokoro-voice",children:"Voice"}),n.jsx("select",{id:"voice-kokoro-voice",className:"config-select",value:ce.voice??"af_bella",onChange:j=>fe("textToSpeech","voice",j.target.value),children:gp.map(j=>n.jsx("option",{value:j,children:j},j))})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"voice-kokoro-speed",children:"Speed"}),n.jsx("input",{id:"voice-kokoro-speed",type:"number",className:"config-input",min:.1,max:5,step:.1,placeholder:"1",value:ce.speed??"",onChange:j=>{const B=j.target.value===""?void 0:parseFloat(j.target.value);fe("textToSpeech","speed",Number.isNaN(B)?void 0:B)}})]})]})]}),n.jsxs("div",{className:"editor-grid",children:[n.jsxs("div",{className:"field full-width",children:[n.jsx("label",{className:"field-label",children:"Script"}),n.jsx("textarea",{value:q,rows:10,onChange:j=>g(j.target.value)})]}),n.jsxs("div",{className:"full-width save-row",children:[n.jsx("button",{type:"button",className:"btn btn-primary",onClick:F,disabled:!G||U,children:U?"Saving…":G?"● Save changes":"Up to date"}),n.jsx("button",{type:"button",className:"btn btn-ghost btn-sm",onClick:se,disabled:d||R,children:R?"Regenerating…":"↺ Regenerate script"}),G&&n.jsx("span",{className:"muted size-sm",children:"Unsaved changes"})]})]}),m?n.jsxs("section",{className:"final-video-section",children:[n.jsx("h3",{className:"section-label",children:"Generated voice"}),n.jsx("audio",{src:L(D,m,`${_}-${m.path}`),controls:!0,preload:"metadata",className:"full-width"},`${_}-voice`),n.jsx("div",{className:"save-row",style:{marginTop:"0.75rem"},children:n.jsx("button",{type:"button",className:"btn btn-ghost btn-sm",onClick:te,disabled:d||E,children:E?"Regenerating…":"↺ Regenerate voice"})})]}):n.jsxs("div",{className:"empty-state",children:[n.jsx("p",{className:"muted",children:"No generated voiceover yet."}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:te,disabled:d||E,children:E?"Regenerating…":"↺ Regenerate voice"})]})]})}function Ws({ar:m,children:D}){return n.jsx("div",{className:"media-wrap",style:{"--ar":m},children:D})}const Ze={pruna:"prunaai/z-image-turbo",flux:"black-forest-labs/flux-2-pro",fluxSchnell:"black-forest-labs/flux-schnell",nanoBananaPro:"google/nano-banana-pro",seedream4:"bytedance/seedream-4"};function pp({assets:m,shots:D,selectedProject:_,isRunning:d,activeStep:E,regeneratingMap:R,mediaCss:q,mediaColMin:G,assetCacheKey:U,toDisplayAssetUrl:g,onSaveShotPrompts:F,onRegenerateProject:L,onTargetedRegenerate:te,configDraft:se,onPatchModel:H,onPatchModelOption:Y,configDirty:fe,savingConfig:be,onSaveConfig:Ye}){const W=Math.max(m.length,D.length),I=se?.models||{},ce=I.textToImage||"",$=se?.modelOptions?.textToImage||{},[ie,Te]=K.useState(null),[Me,ue]=K.useState(""),[Ee,j]=K.useState(null),B=K.useRef(null);K.useEffect(()=>{const T=B.current;T&&(T.style.height="auto",T.style.height=`${T.scrollHeight}px`)},[Me]);function ee(T){Te(T),ue(D[T]??"")}function ze(){Te(null),ue("")}async function S(T){const M=D.map((f,z)=>z===T?Me:f);for(;M.length<=T;)M.push("");M[T]=Me,j(T);try{await F(M.join(`
10
+ `)),Te(null),ue("")}finally{j(null)}}function k(T){H("textToImage",T);const M=f=>{for(const z of f)Y("textToImage",z,void 0)};if(T===Ze.flux){M(["num_inference_steps","guidance_scale","go_fast","num_outputs","disable_safety_checker","megapixels","resolution","safety_filter_level","allow_fallback_model","size","sequential_image_generation","max_images","enhance_prompt"]);return}if(T===Ze.fluxSchnell){M(["guidance_scale","safety_tolerance","num_inference_steps","output_format","resolution","safety_filter_level","allow_fallback_model","size","sequential_image_generation","max_images","enhance_prompt"]);return}if(T===Ze.nanoBananaPro){M(["num_inference_steps","guidance_scale","safety_tolerance","seed","go_fast","output_quality","num_outputs","disable_safety_checker","megapixels","output_format","size","sequential_image_generation","max_images","enhance_prompt"]);return}if(T===Ze.seedream4){M(["num_inference_steps","guidance_scale","safety_tolerance","seed","go_fast","output_quality","num_outputs","disable_safety_checker","megapixels","output_format","resolution","safety_filter_level","allow_fallback_model"]);return}T===Ze.pruna&&M(["safety_tolerance","num_outputs","disable_safety_checker","megapixels","resolution","safety_filter_level","allow_fallback_model","size","sequential_image_generation","max_images","enhance_prompt"])}function w(){return ce===Ze.flux?n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-safety",children:"Safety Tolerance"}),n.jsx("input",{id:"kf-safety",type:"number",className:"config-input",min:1,max:5,step:1,placeholder:"2",value:$.safety_tolerance??"",onChange:T=>{const M=T.target.value===""?void 0:parseInt(T.target.value,10);Y("textToImage","safety_tolerance",Number.isNaN(M)?void 0:M)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsxs("label",{className:"config-form-label",htmlFor:"kf-seed",children:["Seed ",n.jsx("span",{className:"config-form-optional",children:"(optional)"})]}),n.jsx("input",{id:"kf-seed",type:"number",className:"config-input",step:1,placeholder:"random",value:$.seed??"",onChange:T=>{const M=T.target.value===""?null:parseInt(T.target.value,10);Y("textToImage","seed",Number.isNaN(M)?null:M)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-output-format",children:"Output Format"}),n.jsxs("select",{id:"kf-output-format",className:"config-select",value:$.output_format??"webp",onChange:T=>Y("textToImage","output_format",T.target.value),children:[n.jsx("option",{value:"webp",children:"webp"}),n.jsx("option",{value:"png",children:"png"}),n.jsx("option",{value:"jpg",children:"jpg"}),n.jsx("option",{value:"jpeg",children:"jpeg"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-quality",children:"Output Quality"}),n.jsx("input",{id:"kf-quality",type:"number",className:"config-input",min:0,max:100,step:1,placeholder:"80",value:$.output_quality??"",onChange:T=>{const M=T.target.value===""?void 0:parseInt(T.target.value,10);Y("textToImage","output_quality",Number.isNaN(M)?void 0:M)}})]})]}):ce===Ze.fluxSchnell?n.jsxs(n.Fragment,{children:[n.jsxs("p",{className:"muted size-sm",children:["FLUX Schnell uses project ",n.jsx("code",{children:"aspectRatio"})," and ignores custom ",n.jsx("code",{children:"keyframeWidth"}),"/",n.jsx("code",{children:"keyframeHeight"})," overrides."]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-num-outputs",children:"Number of Outputs"}),n.jsx("input",{id:"kf-num-outputs",type:"number",className:"config-input",min:1,max:4,step:1,placeholder:"1",value:$.num_outputs??"",onChange:T=>{const M=T.target.value===""?void 0:parseInt(T.target.value,10);Y("textToImage","num_outputs",Number.isNaN(M)?void 0:M)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-steps",children:"Inference Steps"}),n.jsx("input",{id:"kf-steps",type:"number",className:"config-input",min:1,max:4,step:1,placeholder:"4",value:$.num_inference_steps??"",onChange:T=>{const M=T.target.value===""?void 0:parseInt(T.target.value,10);Y("textToImage","num_inference_steps",Number.isNaN(M)?void 0:M)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsxs("label",{className:"config-form-label",htmlFor:"kf-seed",children:["Seed ",n.jsx("span",{className:"config-form-optional",children:"(optional)"})]}),n.jsx("input",{id:"kf-seed",type:"number",className:"config-input",step:1,placeholder:"random",value:$.seed??"",onChange:T=>{const M=T.target.value===""?null:parseInt(T.target.value,10);Y("textToImage","seed",Number.isNaN(M)?null:M)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-output-format",children:"Output Format"}),n.jsxs("select",{id:"kf-output-format",className:"config-select",value:$.output_format??"webp",onChange:T=>Y("textToImage","output_format",T.target.value),children:[n.jsx("option",{value:"webp",children:"webp"}),n.jsx("option",{value:"jpg",children:"jpg"}),n.jsx("option",{value:"png",children:"png"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-quality",children:"Output Quality"}),n.jsx("input",{id:"kf-quality",type:"number",className:"config-input",min:0,max:100,step:1,placeholder:"80",value:$.output_quality??"",onChange:T=>{const M=T.target.value===""?void 0:parseInt(T.target.value,10);Y("textToImage","output_quality",Number.isNaN(M)?void 0:M)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-disable-safety",children:"Disable Safety Checker"}),n.jsx("input",{id:"kf-disable-safety",type:"checkbox",checked:$.disable_safety_checker??!1,onChange:T=>Y("textToImage","disable_safety_checker",T.target.checked)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-go-fast",children:"Go Fast"}),n.jsx("input",{id:"kf-go-fast",type:"checkbox",checked:$.go_fast??!0,onChange:T=>Y("textToImage","go_fast",T.target.checked)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-megapixels",children:"Megapixels"}),n.jsx("input",{id:"kf-megapixels",type:"text",className:"config-input",placeholder:"1",value:$.megapixels??"",onChange:T=>Y("textToImage","megapixels",T.target.value||void 0)})]})]}):ce===Ze.nanoBananaPro?n.jsxs(n.Fragment,{children:[n.jsxs("p",{className:"muted size-sm",children:["Nano Banana Pro uses project ",n.jsx("code",{children:"aspectRatio"})," and ignores custom ",n.jsx("code",{children:"keyframeWidth"}),"/",n.jsx("code",{children:"keyframeHeight"})," overrides."]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-resolution",children:"Resolution"}),n.jsxs("select",{id:"kf-resolution",className:"config-select",value:$.resolution??"2K",onChange:T=>Y("textToImage","resolution",T.target.value),children:[n.jsx("option",{value:"1K",children:"1K"}),n.jsx("option",{value:"2K",children:"2K"}),n.jsx("option",{value:"4K",children:"4K"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-output-format",children:"Output Format"}),n.jsxs("select",{id:"kf-output-format",className:"config-select",value:$.output_format??"jpg",onChange:T=>Y("textToImage","output_format",T.target.value),children:[n.jsx("option",{value:"jpg",children:"jpg"}),n.jsx("option",{value:"png",children:"png"}),n.jsx("option",{value:"webp",children:"webp"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-safety-level",children:"Safety Filter Level"}),n.jsxs("select",{id:"kf-safety-level",className:"config-select",value:$.safety_filter_level??"block_only_high",onChange:T=>Y("textToImage","safety_filter_level",T.target.value),children:[n.jsx("option",{value:"block_low_and_above",children:"block_low_and_above"}),n.jsx("option",{value:"block_medium_and_above",children:"block_medium_and_above"}),n.jsx("option",{value:"block_only_high",children:"block_only_high"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-allow-fallback",children:"Allow Fallback Model"}),n.jsx("input",{id:"kf-allow-fallback",type:"checkbox",checked:$.allow_fallback_model??!1,onChange:T=>Y("textToImage","allow_fallback_model",T.target.checked)})]})]}):ce===Ze.seedream4?n.jsxs(n.Fragment,{children:[n.jsxs("p",{className:"muted size-sm",children:["Seedream 4 uses project ",n.jsx("code",{children:"aspectRatio"})," and preset sizes (",n.jsx("code",{children:"1K"}),", ",n.jsx("code",{children:"2K"}),", ",n.jsx("code",{children:"4K"}),")."]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-size",children:"Size"}),n.jsxs("select",{id:"kf-size",className:"config-select",value:$.size??"2K",onChange:T=>Y("textToImage","size",T.target.value),children:[n.jsx("option",{value:"1K",children:"1K"}),n.jsx("option",{value:"2K",children:"2K"}),n.jsx("option",{value:"4K",children:"4K"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-seq-gen",children:"Sequential Image Generation"}),n.jsxs("select",{id:"kf-seq-gen",className:"config-select",value:$.sequential_image_generation??"disabled",onChange:T=>Y("textToImage","sequential_image_generation",T.target.value),children:[n.jsx("option",{value:"disabled",children:"disabled"}),n.jsx("option",{value:"auto",children:"auto"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-max-images",children:"Max Images"}),n.jsx("input",{id:"kf-max-images",type:"number",className:"config-input",min:1,max:15,step:1,placeholder:"1",value:$.max_images??"",onChange:T=>{const M=T.target.value===""?void 0:parseInt(T.target.value,10);Y("textToImage","max_images",Number.isNaN(M)?void 0:M)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-enhance",children:"Enhance Prompt"}),n.jsx("input",{id:"kf-enhance",type:"checkbox",checked:$.enhance_prompt??!0,onChange:T=>Y("textToImage","enhance_prompt",T.target.checked)})]})]}):n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-steps",children:"Inference Steps"}),n.jsx("input",{id:"kf-steps",type:"number",className:"config-input",min:1,max:50,step:1,placeholder:"8",value:$.num_inference_steps??"",onChange:T=>{const M=T.target.value===""?void 0:parseInt(T.target.value,10);Y("textToImage","num_inference_steps",Number.isNaN(M)?void 0:M)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-guidance",children:"Guidance Scale"}),n.jsx("input",{id:"kf-guidance",type:"number",className:"config-input",min:0,max:20,step:.1,placeholder:"0",value:$.guidance_scale??"",onChange:T=>{const M=T.target.value===""?void 0:parseFloat(T.target.value);Y("textToImage","guidance_scale",Number.isNaN(M)?void 0:M)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsxs("label",{className:"config-form-label",htmlFor:"kf-seed",children:["Seed ",n.jsx("span",{className:"config-form-optional",children:"(optional)"})]}),n.jsx("input",{id:"kf-seed",type:"number",className:"config-input",step:1,placeholder:"random",value:$.seed??"",onChange:T=>{const M=T.target.value===""?null:parseInt(T.target.value,10);Y("textToImage","seed",Number.isNaN(M)?null:M)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-output-format",children:"Output Format"}),n.jsxs("select",{id:"kf-output-format",className:"config-select",value:$.output_format??"jpg",onChange:T=>Y("textToImage","output_format",T.target.value),children:[n.jsx("option",{value:"jpg",children:"jpg"}),n.jsx("option",{value:"jpeg",children:"jpeg"}),n.jsx("option",{value:"png",children:"png"}),n.jsx("option",{value:"webp",children:"webp"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-quality",children:"Output Quality"}),n.jsx("input",{id:"kf-quality",type:"number",className:"config-input",min:0,max:100,step:1,placeholder:"80",value:$.output_quality??"",onChange:T=>{const M=T.target.value===""?void 0:parseInt(T.target.value,10);Y("textToImage","output_quality",Number.isNaN(M)?void 0:M)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-go-fast",children:"Go Fast"}),n.jsx("input",{id:"kf-go-fast",type:"checkbox",checked:$.go_fast??!1,onChange:T=>Y("textToImage","go_fast",T.target.checked)})]})]})}return W===0?n.jsxs("div",{className:"tab-pane",children:[n.jsxs(et,{modelId:I.textToImage,configDirty:fe,savingConfig:be,isRunning:d,onSaveConfig:Ye,children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-model",children:"Model ID"}),n.jsxs("select",{id:"kf-model",className:"config-select",value:I.textToImage||Ze.pruna,onChange:T=>k(T.target.value),children:[n.jsx("option",{value:Ze.pruna,children:"Z Image Turbo (`prunaai/z-image-turbo`)"}),n.jsx("option",{value:Ze.flux,children:"FLUX 2 Pro (`black-forest-labs/flux-2-pro`)"}),n.jsx("option",{value:Ze.fluxSchnell,children:"FLUX Schnell (`black-forest-labs/flux-schnell`)"}),n.jsx("option",{value:Ze.nanoBananaPro,children:"Nano Banana Pro (`google/nano-banana-pro`)"}),n.jsx("option",{value:Ze.seedream4,children:"Seedream 4 (`bytedance/seedream-4`)"})]})]}),w()]}),n.jsxs("div",{className:"empty-state",children:[n.jsx("p",{className:"muted",children:"No keyframes generated yet."}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:L,disabled:d,children:"▶ Regenerate project"})]})]}):n.jsxs("div",{className:"tab-pane",children:[n.jsxs(et,{modelId:I.textToImage,configDirty:fe,savingConfig:be,isRunning:d,onSaveConfig:Ye,children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"kf-model",children:"Model ID"}),n.jsxs("select",{id:"kf-model",className:"config-select",value:I.textToImage||Ze.pruna,onChange:T=>k(T.target.value),children:[n.jsx("option",{value:Ze.pruna,children:"Z Image Turbo (`prunaai/z-image-turbo`)"}),n.jsx("option",{value:Ze.flux,children:"FLUX 2 Pro (`black-forest-labs/flux-2-pro`)"}),n.jsx("option",{value:Ze.fluxSchnell,children:"FLUX Schnell (`black-forest-labs/flux-schnell`)"}),n.jsx("option",{value:Ze.nanoBananaPro,children:"Nano Banana Pro (`google/nano-banana-pro`)"}),n.jsx("option",{value:Ze.seedream4,children:"Seedream 4 (`bytedance/seedream-4`)"})]})]}),w()]}),n.jsx("div",{className:"asset-grid",style:{"--grid-col-min":G},children:Array.from({length:W},(T,M)=>{const f=m[M]||null,z=`keyframe-${M}`,V=!!R[z],X=!f&&d&&E==="keyframes"&&M===m.length,le=!f&&!X,oe=ie===M,o=Ee===M,p=D[M]??"";return n.jsxs("article",{className:"asset-card",children:[n.jsxs("div",{className:"asset-status-row",children:[n.jsxs("div",{className:"asset-index",children:["#",M+1]}),X&&n.jsx("span",{className:"badge badge-running",children:"Generating"}),le&&n.jsx("span",{className:"badge badge-pending",children:"Pending"})]}),n.jsx(Ws,{ar:q,children:V||X?n.jsx("div",{className:"media-placeholder",children:n.jsxs("div",{className:"media-placeholder-content",children:[n.jsx("span",{className:"spinner"}),n.jsx("span",{className:"media-placeholder-title",children:"Generating keyframe"})]})}):le?n.jsx("div",{className:"media-placeholder",children:n.jsx("div",{className:"media-placeholder-content",children:n.jsx("span",{className:"media-placeholder-title",children:"Pending keyframe"})})}):n.jsx("img",{src:g(_,f,`${U}-${f.path}`),alt:`Keyframe ${M+1}`,loading:"lazy"})}),n.jsx("div",{className:"card-prompt",children:oe?n.jsxs(n.Fragment,{children:[n.jsx("textarea",{ref:B,value:Me,autoFocus:!0,onChange:ge=>ue(ge.target.value),className:"prompt-textarea"}),n.jsxs("div",{className:"prompt-edit-actions",children:[n.jsx("button",{type:"button",className:"btn btn-primary btn-sm",onClick:()=>S(M),disabled:o,children:o?"Saving…":"Save"}),n.jsx("button",{type:"button",className:"btn btn-ghost btn-sm",onClick:ze,disabled:o,children:"Cancel"})]})]}):n.jsxs("div",{className:"card-prompt-row",children:[n.jsx("p",{className:"prompt-text",children:p||n.jsx("em",{className:"muted",children:"No prompt"})}),n.jsx("button",{type:"button",className:"btn btn-ghost btn-sm card-prompt-edit-btn",onClick:()=>ee(M),disabled:d||V||X,title:"Edit prompt",children:"✎"})]})}),n.jsx("button",{type:"button",className:"btn btn-ghost btn-sm full-width",onClick:()=>te("keyframe",M),disabled:!f||V||d||X,children:V||X?"Regenerating…":f?"↺ Regenerate":"Waiting for generation"})]},f?.path||`keyframe-slot-${M}`)})})]})}const ul={wan:"wan-video/wan-2.2-i2v-fast",klingV3:"kwaivgi/kling-v3-video",pixverseV56:"pixverse/pixverse-v5.6",veo31:"google/veo-3.1",veo31Fast:"google/veo-3.1-fast"},vp={standard:{withAudio:.252,withoutAudio:.168},pro:{withAudio:.336,withoutAudio:.224}},bp={"360p":.07,"540p":.07,"720p":.09,"1080p":.15},gm={standardWithoutAudio:.2,withoutAudio:.1};function xp({assets:m,expectedCount:D,selectedProject:_,isRunning:d,activeStep:E,activeSegmentIndex:R,regeneratingMap:q,mediaCss:G,mediaColMin:U,assetCacheKey:g,toDisplayAssetUrl:F,onRegenerateProject:L,onTargetedRegenerate:te,configDraft:se,onPatchModel:H,onPatchModelOption:Y,configDirty:fe,savingConfig:be,onSaveConfig:Ye}){const W=se?.models||{},I=se?.modelOptions?.imageTextToVideo||{},ce=Math.max(m.length,D||0);function $(){const j=I.mode==="standard"?"standard":"pro";return`Estimated cost for current settings: $${(vp[j].withoutAudio*5).toFixed(2)} per 5s segment.`}function ie(){const j=["360p","540p","720p","1080p"].includes(I.quality)?I.quality:"540p";return`Estimated cost for current settings: $${(bp[j]*5).toFixed(2)} per 5s segment (${j}).`}function Te(){return`Estimated cost for current settings: $${((W.imageTextToVideo===ul.veo31?gm.standardWithoutAudio:gm.withoutAudio)*5).toFixed(2)} per 5s segment (audio disabled).`}function Me(j){H("imageTextToVideo",j);const B=ee=>{for(const ze of ee)Y("imageTextToVideo",ze,void 0)};if(j===ul.wan){B(["negative_prompt","mode","generate_audio","quality","generate_audio_switch","thinking_type","resolution"]);return}if(j===ul.klingV3){B(["interpolate_output","go_fast","sample_shift","seed","disable_safety_checker","lora_weights_transformer","lora_scale_transformer","lora_weights_transformer_2","lora_scale_transformer_2","quality","generate_audio_switch","thinking_type","resolution"]),Y("imageTextToVideo","generate_audio",!1);return}if(j===ul.pixverseV56){B(["interpolate_output","go_fast","sample_shift","disable_safety_checker","lora_weights_transformer","lora_scale_transformer","lora_weights_transformer_2","lora_scale_transformer_2","mode","generate_audio","resolution"]),Y("imageTextToVideo","generate_audio_switch",!1);return}(j===ul.veo31||j===ul.veo31Fast)&&(B(["interpolate_output","go_fast","sample_shift","disable_safety_checker","lora_weights_transformer","lora_scale_transformer","lora_weights_transformer_2","lora_scale_transformer_2","mode","quality","generate_audio_switch","thinking_type"]),Y("imageTextToVideo","generate_audio",!1))}function ue(){if(W.imageTextToVideo===ul.klingV3)return n.jsxs(n.Fragment,{children:[n.jsxs("p",{className:"muted size-sm",children:["Kling v3 uses start/end keyframes and fixed ",n.jsx("code",{children:"duration=5s"}),"."]}),n.jsx("p",{className:"muted size-sm",children:$()}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"seg-negative-prompt",children:"Negative Prompt"}),n.jsx("textarea",{id:"seg-negative-prompt",className:"config-input",rows:3,placeholder:"Optional exclusions",value:I.negative_prompt??"",onChange:j=>Y("imageTextToVideo","negative_prompt",j.target.value||null)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"seg-mode",children:"Mode"}),n.jsxs("select",{id:"seg-mode",className:"config-select",value:I.mode??"pro",onChange:j=>Y("imageTextToVideo","mode",j.target.value),children:[n.jsx("option",{value:"standard",children:"standard (720p)"}),n.jsx("option",{value:"pro",children:"pro (1080p)"})]})]}),n.jsx("p",{className:"muted size-sm",children:"Native audio generation is currently disabled for this model."})]});if(W.imageTextToVideo===ul.pixverseV56)return n.jsxs(n.Fragment,{children:[n.jsxs("p",{className:"muted size-sm",children:["PixVerse v5.6 uses start/end keyframes and fixed ",n.jsx("code",{children:"duration=5s"}),"."]}),n.jsx("p",{className:"muted size-sm",children:ie()}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"seg-quality",children:"Quality"}),n.jsxs("select",{id:"seg-quality",className:"config-select",value:I.quality??"540p",onChange:j=>Y("imageTextToVideo","quality",j.target.value),children:[n.jsx("option",{value:"360p",children:"360p"}),n.jsx("option",{value:"540p",children:"540p"}),n.jsx("option",{value:"720p",children:"720p"}),n.jsx("option",{value:"1080p",children:"1080p"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"seg-negative-prompt",children:"Negative Prompt"}),n.jsx("textarea",{id:"seg-negative-prompt",className:"config-input",rows:3,placeholder:"Optional exclusions",value:I.negative_prompt??"",onChange:j=>Y("imageTextToVideo","negative_prompt",j.target.value||null)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsxs("label",{className:"config-form-label",htmlFor:"seg-seed",children:["Seed ",n.jsx("span",{className:"config-form-optional",children:"(optional)"})]}),n.jsx("input",{id:"seg-seed",type:"number",className:"config-input",step:1,placeholder:"random",value:I.seed??"",onChange:j=>{const B=j.target.value===""?null:parseInt(j.target.value,10);Y("imageTextToVideo","seed",Number.isNaN(B)?null:B)}})]}),n.jsx("p",{className:"muted size-sm",children:"Native audio generation is currently disabled for this model."}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"seg-thinking-type",children:"Thinking Type"}),n.jsx("input",{id:"seg-thinking-type",type:"text",className:"config-input",placeholder:"auto",value:I.thinking_type??"",onChange:j=>Y("imageTextToVideo","thinking_type",j.target.value||void 0)})]})]});if(W.imageTextToVideo===ul.veo31||W.imageTextToVideo===ul.veo31Fast){const j=W.imageTextToVideo===ul.veo31?"Veo 3.1":"Veo 3.1 Fast";return n.jsxs(n.Fragment,{children:[n.jsxs("p",{className:"muted size-sm",children:[j," uses start/end keyframes and fixed ",n.jsx("code",{children:"duration=5s"}),"."]}),n.jsx("p",{className:"muted size-sm",children:Te()}),n.jsx("p",{className:"muted size-sm",children:"Native audio generation is currently disabled for this model."}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"seg-resolution",children:"Resolution"}),n.jsxs("select",{id:"seg-resolution",className:"config-select",value:I.resolution??"1080p",onChange:B=>Y("imageTextToVideo","resolution",B.target.value),children:[n.jsx("option",{value:"720p",children:"720p"}),n.jsx("option",{value:"1080p",children:"1080p"})]})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"seg-negative-prompt",children:"Negative Prompt"}),n.jsx("textarea",{id:"seg-negative-prompt",className:"config-input",rows:3,placeholder:"Optional exclusions",value:I.negative_prompt??"",onChange:B=>Y("imageTextToVideo","negative_prompt",B.target.value||null)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsxs("label",{className:"config-form-label",htmlFor:"seg-seed",children:["Seed ",n.jsx("span",{className:"config-form-optional",children:"(optional)"})]}),n.jsx("input",{id:"seg-seed",type:"number",className:"config-input",step:1,placeholder:"random",value:I.seed??"",onChange:B=>{const ee=B.target.value===""?null:parseInt(B.target.value,10);Y("imageTextToVideo","seed",Number.isNaN(ee)?null:ee)}})]})]})}return n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"seg-sample-shift",children:"Sample Shift"}),n.jsx("input",{id:"seg-sample-shift",type:"number",className:"config-input",min:1,max:20,step:.1,placeholder:"12",value:I.sample_shift??"",onChange:j=>{const B=j.target.value===""?void 0:parseFloat(j.target.value);Y("imageTextToVideo","sample_shift",Number.isNaN(B)?void 0:B)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsxs("label",{className:"config-form-label",htmlFor:"seg-seed",children:["Seed ",n.jsx("span",{className:"config-form-optional",children:"(optional)"})]}),n.jsx("input",{id:"seg-seed",type:"number",className:"config-input",step:1,placeholder:"random",value:I.seed??"",onChange:j=>{const B=j.target.value===""?null:parseInt(j.target.value,10);Y("imageTextToVideo","seed",Number.isNaN(B)?null:B)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsxs("label",{className:"config-form-label",htmlFor:"seg-lora1",children:["LoRA Weights ",n.jsx("span",{className:"config-form-optional",children:"(optional)"})]}),n.jsx("input",{id:"seg-lora1",type:"text",className:"config-input",placeholder:"none",value:I.lora_weights_transformer??"",onChange:j=>Y("imageTextToVideo","lora_weights_transformer",j.target.value||null)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"seg-lora1-scale",children:"LoRA Scale"}),n.jsx("input",{id:"seg-lora1-scale",type:"number",className:"config-input",step:.1,placeholder:"1",value:I.lora_scale_transformer??"",onChange:j=>{const B=j.target.value===""?void 0:parseFloat(j.target.value);Y("imageTextToVideo","lora_scale_transformer",Number.isNaN(B)?void 0:B)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsxs("label",{className:"config-form-label",htmlFor:"seg-lora2",children:["LoRA Weights 2 ",n.jsx("span",{className:"config-form-optional",children:"(optional)"})]}),n.jsx("input",{id:"seg-lora2",type:"text",className:"config-input",placeholder:"none",value:I.lora_weights_transformer_2??"",onChange:j=>Y("imageTextToVideo","lora_weights_transformer_2",j.target.value||null)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"seg-lora2-scale",children:"LoRA Scale 2"}),n.jsx("input",{id:"seg-lora2-scale",type:"number",className:"config-input",step:.1,placeholder:"1",value:I.lora_scale_transformer_2??"",onChange:j=>{const B=j.target.value===""?void 0:parseFloat(j.target.value);Y("imageTextToVideo","lora_scale_transformer_2",Number.isNaN(B)?void 0:B)}})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"seg-go-fast",children:"Go Fast"}),n.jsx("input",{id:"seg-go-fast",type:"checkbox",checked:I.go_fast??!0,onChange:j=>Y("imageTextToVideo","go_fast",j.target.checked)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"seg-interpolate",children:"Interpolate Output"}),n.jsx("input",{id:"seg-interpolate",type:"checkbox",checked:I.interpolate_output??!1,onChange:j=>Y("imageTextToVideo","interpolate_output",j.target.checked)})]}),n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"seg-safety",children:"Disable Safety Checker"}),n.jsx("input",{id:"seg-safety",type:"checkbox",checked:I.disable_safety_checker??!1,onChange:j=>Y("imageTextToVideo","disable_safety_checker",j.target.checked)})]})]})}const Ee=n.jsxs(et,{modelId:W.imageTextToVideo,configDirty:fe,savingConfig:be,isRunning:d,onSaveConfig:Ye,children:[n.jsxs("div",{className:"config-form-field",children:[n.jsx("label",{className:"config-form-label",htmlFor:"seg-model",children:"Model ID"}),n.jsxs("select",{id:"seg-model",className:"config-select",value:W.imageTextToVideo||ul.wan,onChange:j=>Me(j.target.value),children:[n.jsx("option",{value:ul.wan,children:"Wan 2.2 I2V Fast (`wan-video/wan-2.2-i2v-fast`)"}),n.jsx("option",{value:ul.klingV3,children:"Kling V3 Video (`kwaivgi/kling-v3-video`)"}),n.jsx("option",{value:ul.pixverseV56,children:"PixVerse v5.6 (`pixverse/pixverse-v5.6`)"}),n.jsx("option",{value:ul.veo31,children:"Veo 3.1 (`google/veo-3.1`)"}),n.jsx("option",{value:ul.veo31Fast,children:"Veo 3.1 Fast (`google/veo-3.1-fast`)"})]})]}),ue()]});return ce===0?n.jsxs("div",{className:"tab-pane",children:[Ee,n.jsxs("div",{className:"empty-state",children:[n.jsx("p",{className:"muted",children:"No segments generated yet."}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:L,disabled:d,children:"▶ Regenerate project"})]})]}):n.jsxs("div",{className:"tab-pane",children:[Ee,n.jsx("div",{className:"asset-grid",style:{"--grid-col-min":U},children:Array.from({length:ce},(j,B)=>{const ee=m[B]||null,ze=`segment-${B}`,S=!!q[ze],k=Number.isInteger(R)&&d&&E==="segments"&&R===B,w=!ee&&d&&E==="segments"&&!Number.isInteger(R)&&B===m.length,T=k||w,M=!ee&&!T;return n.jsxs("article",{className:"asset-card",children:[n.jsxs("div",{className:"asset-status-row",children:[n.jsxs("div",{className:"asset-index",children:["#",B+1]}),T&&n.jsx("span",{className:"badge badge-running",children:"Generating"}),M&&n.jsx("span",{className:"badge badge-pending",children:"Pending"})]}),n.jsx(Ws,{ar:G,children:S||T?n.jsx("div",{className:"media-placeholder",children:n.jsxs("div",{className:"media-placeholder-content",children:[n.jsx("span",{className:"spinner"}),n.jsx("span",{className:"media-placeholder-title",children:"Generating segment"})]})}):M?n.jsx("div",{className:"media-placeholder",children:n.jsx("div",{className:"media-placeholder-content",children:n.jsx("span",{className:"media-placeholder-title",children:"Pending segment"})})}):n.jsx("video",{src:F(_,ee,`${g}-${ee.path}`),controls:!0,preload:"metadata"},`${g}-${ee.path}`)}),n.jsx("button",{type:"button",className:"btn btn-ghost btn-sm full-width",onClick:()=>te("segment",B),disabled:!ee||S||d||T,children:S||T?"Regenerating…":ee?"↺ Regenerate":"Waiting for generation"})]},ee?.path||`segment-slot-${B}`)})})]})}function yp({finalVideo:m,selectedProject:D,assetCacheKey:_,mediaCss:d,isRunning:E,subtitleEnabled:R,alignBusy:q,burninBusy:G,toDisplayAssetUrl:U,onRegenerateProject:g,onRegenerateAlign:F,onRegenerateBurnin:L}){return n.jsx("div",{className:"tab-pane tab-pane-output",children:m?n.jsxs("section",{className:"final-video-section",children:[n.jsx("h3",{className:"section-label",children:"Final video"}),n.jsx("div",{className:"final-video-wrap",children:n.jsx(Ws,{ar:d,children:n.jsx("video",{src:U(D,m,`${_}-${m.path}`),controls:!0,preload:"metadata"},`${_}-final`)})}),R&&n.jsxs("div",{className:"output-actions-row",children:[n.jsx("button",{type:"button",className:"btn btn-ghost btn-sm",onClick:F,disabled:E||q||G,children:q?"Re-aligning…":"↺ Re-align subtitles"}),n.jsx("button",{type:"button",className:"btn btn-secondary btn-sm",onClick:L,disabled:E||G||q,children:G?"Re-burning…":"↺ Re-burn subtitles"})]})]}):n.jsxs("div",{className:"empty-state",children:[n.jsx("p",{className:"muted",children:"No final video yet."}),n.jsx("button",{type:"button",className:"btn btn-secondary",onClick:g,disabled:E,children:"▶ Regenerate project"})]})})}const jp={script:"Script",voiceover:"Voice",keyframes:"Keyframes",segments:"Segments",compose:"Compose",align:"Align",burnin:"Burn In"},hm=["script","voiceover","keyframes","segments","compose","align","burnin"];function Np(m){return m?hm:hm.filter(D=>D!=="align"&&D!=="burnin")}function ws(m){if(!Number.isFinite(m)||m<=0)return"—";const D=Math.round(m/1e3);if(D<60)return`${D}s`;const _=Math.floor(D/60),d=D%60;return d?`${_}m ${d}s`:`${_}m`}function Fs(m){return Number.isFinite(m)?m<.01?"<$0.01":`$${m.toFixed(2)}`:"—"}function _p(m){if(!m)return"—";try{return new Date(m).toLocaleString(void 0,{dateStyle:"short",timeStyle:"short"})}catch{return m}}function Sp({status:m}){const D={completed:"run-badge run-badge-ok",failed:"run-badge run-badge-fail",running:"run-badge run-badge-running"},_={completed:"Completed",failed:"Failed",running:"Running"};return n.jsx("span",{className:D[m]||"run-badge",children:_[m]||m})}function Tp({status:m}){return m==="succeeded"?n.jsx("span",{className:"stage-dot stage-dot-ok",title:"Succeeded"}):m==="reused"?n.jsx("span",{className:"stage-dot stage-dot-reused",title:"Reused"}):m==="failed"?n.jsx("span",{className:"stage-dot stage-dot-fail",title:"Failed"}):m==="running"?n.jsx("span",{className:"stage-dot stage-dot-running",title:"Running"}):n.jsx("span",{className:"stage-dot stage-dot-idle",title:"Pending"})}function zp({run:m,includeSubtitleStages:D}){const[_,d]=K.useState(!1),E=Np(D);return n.jsxs("div",{className:"run-row",children:[n.jsxs("button",{type:"button",className:"run-row-header",onClick:()=>d(R=>!R),"aria-expanded":_,children:[n.jsx(Sp,{status:m.status}),n.jsx("span",{className:"run-row-date",children:_p(m.invokedAt)}),n.jsx("span",{className:"run-row-meta",children:ws(m.totalDurationMs)}),n.jsxs("span",{className:"run-row-meta",children:[m.totals?.predictionCount??0," pred."]}),n.jsx("span",{className:"run-row-meta run-row-cost",children:Fs(m.totals?.costUsd)}),n.jsx("span",{className:"run-row-chevron",children:_?"▲":"▼"})]}),_&&n.jsx("div",{className:"run-stages",children:n.jsxs("table",{className:"stages-table",children:[n.jsx("thead",{children:n.jsxs("tr",{children:[n.jsx("th",{children:"Stage"}),n.jsx("th",{children:"Status"}),n.jsx("th",{children:"Duration"}),n.jsx("th",{children:"Predictions"}),n.jsx("th",{children:"Est. Cost"})]})}),n.jsx("tbody",{children:E.map(R=>{const q=m.stages?.[R];return q?n.jsxs("tr",{className:q.status==="pending"?"stage-row-pending":"",children:[n.jsxs("td",{className:"stage-name-cell",children:[n.jsx(Tp,{status:q.status}),jp[R]||R]}),n.jsx("td",{className:"stage-status-cell",children:q.reused?"reused":q.status}),n.jsx("td",{children:ws(q.durationMs)}),n.jsx("td",{children:q.predictionCount??0}),n.jsx("td",{children:Fs(q.costUsd)})]},R):null})})]})})]})}function Cp({selectedProject:m,includeSubtitleStages:D=!0}){const[_,d]=K.useState(null),[E,R]=K.useState([]),[q,G]=K.useState(!1),[U,g]=K.useState(null);return K.useEffect(()=>{if(!m)return;let F=!1;return G(!0),g(null),Promise.all([wh(m),Fh(m)]).then(([L,te])=>{F||(d(L.summary||null),R(te.runs||[]))}).catch(L=>{F||g(L.message||"Failed to load analytics")}).finally(()=>{F||G(!1)}),()=>{F=!0}},[m]),q?n.jsx("div",{className:"tab-pane analytics-pane",children:n.jsx("p",{className:"muted",children:"Loading analytics…"})}):U?n.jsx("div",{className:"tab-pane analytics-pane",children:n.jsx("p",{className:"analytics-error",children:U})}):n.jsxs("div",{className:"tab-pane analytics-pane",children:[_&&n.jsxs("div",{className:"analytics-summary",children:[n.jsxs("div",{className:"analytics-stat-card",children:[n.jsx("span",{className:"stat-value",children:_.totalRuns}),n.jsx("span",{className:"stat-label",children:"Total Runs"})]}),n.jsxs("div",{className:"analytics-stat-card",children:[n.jsxs("span",{className:"stat-value",children:[n.jsx("span",{className:"stat-ok",children:_.completedRuns}),_.failedRuns>0&&n.jsxs(n.Fragment,{children:[" / ",n.jsx("span",{className:"stat-fail",children:_.failedRuns})]})]}),n.jsx("span",{className:"stat-label",children:"Done / Failed"})]}),n.jsxs("div",{className:"analytics-stat-card",children:[n.jsx("span",{className:"stat-value",children:ws(_.averageDurationMs)}),n.jsx("span",{className:"stat-label",children:"Avg Duration"})]}),n.jsxs("div",{className:"analytics-stat-card",children:[n.jsx("span",{className:"stat-value",children:Number.isFinite(_.totalCostUsd)?Fs(_.totalCostUsd):"—"}),n.jsx("span",{className:"stat-label",children:"Est. Total Cost"})]})]}),E.length===0&&!q&&n.jsx("p",{className:"muted analytics-empty",children:"No runs recorded yet."}),E.length>0&&n.jsxs("div",{className:"analytics-runs",children:[n.jsx("p",{className:"analytics-runs-title",children:"Recent runs"}),E.map(F=>n.jsx(zp,{run:F,includeSubtitleStages:D},F.runId))]})]})}function Ep({open:m,title:D,onClose:_,children:d}){const E=K.useRef(null);return K.useEffect(()=>{if(!m)return;const R=q=>{q.key==="Escape"&&_()};return window.addEventListener("keydown",R),E.current?.focus(),()=>window.removeEventListener("keydown",R)},[m,_]),m?n.jsx("div",{className:"modal-overlay",onClick:R=>{R.target===R.currentTarget&&_()},children:n.jsxs("div",{className:"modal-panel",ref:E,role:"dialog","aria-modal":"true",tabIndex:-1,children:[n.jsxs("div",{className:"modal-header",children:[n.jsx("span",{className:"modal-title",children:D}),n.jsx("button",{className:"modal-close",type:"button",onClick:_,"aria-label":"Close",children:"✕"})]}),n.jsx("div",{className:"modal-body",children:d})]})}):null}function Ap({open:m,creatingProject:D,createProjectName:_,createProjectStory:d,onClose:E,onSubmit:R,onNameChange:q,onStoryChange:G}){return n.jsx(Ep,{open:m,title:"New project",onClose:E,children:n.jsxs("form",{className:"modal-form",onSubmit:R,children:[n.jsxs("div",{className:"field",children:[n.jsx("label",{className:"field-label",children:"Project name"}),n.jsx("input",{type:"text",placeholder:"my-project-name",value:_,onChange:U=>q(U.target.value),required:!0,autoFocus:!0}),n.jsx("span",{className:"field-hint",children:"Lowercase letters, numbers, hyphens, underscores"})]}),n.jsxs("div",{className:"field",children:[n.jsxs("label",{className:"field-label",children:["Story ",n.jsx("span",{className:"field-hint",children:"(optional)"})]}),n.jsx("textarea",{placeholder:"Paste your story here…",value:d,onChange:U=>G(U.target.value),rows:6})]}),n.jsxs("div",{className:"modal-actions",children:[n.jsx("button",{type:"button",className:"btn btn-ghost",onClick:E,children:"Cancel"}),n.jsx("button",{type:"submit",className:"btn btn-primary",disabled:D,children:D?"Creating…":"Create project"})]})]})})}const pm={"9:16":[576,1024],"16:9":[1024,576],"1:1":[1024,1024]},vm=3e3,Js={textToText:"deepseek-ai/deepseek-v3",textToSpeech:"minimax/speech-02-turbo",textToImage:"prunaai/z-image-turbo",imageTextToVideo:"wan-video/wan-2.2-i2v-fast"},Op=[];function Dp(m,D){const _=D?.keyframeSizeKey;if(_){const[R,q]=_.split("x").map(Number);if(R>0&&q>0)return{width:R,height:q}}if(Number.isInteger(m?.keyframeWidth)&&Number.isInteger(m?.keyframeHeight))return{width:m.keyframeWidth,height:m.keyframeHeight};const[d,E]=pm[m?.aspectRatio]||pm["9:16"];return{width:d,height:E}}function bm(m){return[...m].sort((D,_)=>D.path.localeCompare(_.path))}function Qs(m){return m.split(`
11
+ `).map(D=>D.trim()).filter(Boolean)}function xc(m){return!m||typeof m!="object"?null:{...m,models:{...Js,...m.models||{}},modelOptions:{...m.modelOptions||{}}}}function Up(){const[m,D]=K.useState([]),[_,d]=K.useState(""),[E,R]=K.useState(null),[q,G]=K.useState(null),[U,g]=K.useState(""),[F,L]=K.useState(!1),[te,se]=K.useState(!1),[H,Y]=K.useState(!1),[fe,be]=K.useState(!1),[Ye,W]=K.useState({}),[I,ce]=K.useState(""),[$,ie]=K.useState(""),[Te,Me]=K.useState(0),[ue,Ee]=K.useState(""),[j,B]=K.useState(""),[ee,ze]=K.useState(!1),[S,k]=K.useState(""),[w,T]=K.useState(""),[M,f]=K.useState(""),[z,V]=K.useState(!1),[X,le]=K.useState(!1),[oe,o]=K.useState(null),[p,ge]=K.useState(!1),[ml,la]=K.useState(!1),Dl=$h(),fl=K.useMemo(()=>E?.assets||Op,[E]),Ul=K.useMemo(()=>fl.find(Q=>Q.path==="assets/audio/voiceover.mp3")||fl.find(Q=>Q.path.startsWith("assets/audio/"))||null,[fl]),Fl=K.useMemo(()=>bm(fl.filter(Q=>Q.path.startsWith("assets/keyframes/"))),[fl]),za=K.useMemo(()=>bm(fl.filter(Q=>Q.path.startsWith("assets/segments/"))),[fl]),_t=K.useMemo(()=>fl.find(Q=>Q.path==="final_captioned.mp4")||fl.find(Q=>Q.path==="final.mp4")||null,[fl]),{width:Ca,height:aa}=Dp(E?.config,E?.runState?.artifacts),lt=`${Ca}/${aa}`,at=`${Math.min(320,Math.max(120,Math.round(220*Ca/aa)))}px`,Xl=q?.status||E?.runState?.status,ta=Xl==="running"||Xl==="pending",el=Xl==="paused",na=(ta?q?.steps:null)||E?.runState?.steps,gl=ta&&typeof q?.payload?.activeStep=="string"?q.payload.activeStep:null,Ql=ta&&Number.isInteger(q?.payload?.activeSegmentIndex)?q.payload.activeSegmentIndex:null,dn=ta&&Array.isArray(q?.payload?.changedShotIndexes)&&q.payload.changedShotIndexes.length>0?{...na,keyframes:gl==="segments"||gl==="compose",segments:gl==="compose",compose:!1}:na,Aa=[{id:"story",label:"Story"},{id:"config",label:"Project Config"},{id:"voice",label:"Voice",count:Ul?1:null},{id:"keyframes",label:"Keyframes",count:Fl.length||null},{id:"segments",label:"Segments",count:za.length||null},{id:"output",label:"Output",count:_t?1:null},{id:"analytics",label:"Analytics",align:"right"}],he=K.useCallback((Q,ae=!1)=>{if(ae){ie(Q),ce("");return}ce(Q),ie("")},[]),mn=K.useCallback(()=>{ce(""),ie("")},[]),Jl=K.useCallback(async()=>{L(!0);try{const Q=await Xh();D(Q.projects||[]),!_&&Q.projects?.length&&d(Q.projects[0])}catch(Q){he(Q.message,!0)}finally{L(!1)}},[he,_]),Ge=K.useCallback(async Q=>{if(!Q){R(null);return}se(!0);try{const[ae,Ne]=await Promise.all([tm(Q),nm(Q)]);R(ae),k(ae.story||""),T(Ne.script||ae.runState?.artifacts?.script||""),f((Ne.shots||ae.runState?.artifacts?.shots||[]).join(`
12
+ `)),V(!1),le(!1),o(xc(ae.config)),ge(!1),Me(qe=>qe+1)}catch(ae){he(ae.message,!0)}finally{se(!1)}},[he]),_l=K.useCallback(async Q=>{if(Q)try{const[ae,Ne]=await Promise.all([tm(Q),nm(Q)]);R(ae),X||T(Ne.script||ae.runState?.artifacts?.script||""),z||f((Ne.shots||ae.runState?.artifacts?.shots||[]).join(`
13
+ `))}catch{}},[X,z]);K.useEffect(()=>{Jl()},[Jl]),K.useEffect(()=>{Ge(_),G(null),g(""),mn()},[mn,Ge,_]),K.useEffect(()=>{if(!I&&!$)return;const Q=setTimeout(()=>{ce(""),ie("")},5e3);return()=>clearTimeout(Q)},[I,$]),K.useEffect(()=>{if(!_||!U)return;let Q=!1;const ae=async()=>{try{const qe=await Zh(U);if(Q)return;if(G(qe),qe.status==="completed"||qe.status==="failed"||qe.status==="paused"){g(""),qe.status==="failed"?he(`Job failed: ${qe.error||"unknown error"}`,!0):qe.status==="paused"?he("Keyframes ready — review and continue when happy."):he("Generation complete."),await Ge(_);return}await _l(_)}catch(qe){Q||(he(qe.message,!0),g(""))}};ae();const Ne=setInterval(ae,vm);return()=>{Q=!0,clearInterval(Ne)}},[U,he,Ge,_l,_]),K.useEffect(()=>{if(!(!!_&&!U&&(Xl==="running"||Xl==="pending")))return;let ae=!1;const Ne=async()=>{ae||await _l(_)};Ne();const qe=setInterval(Ne,vm);return()=>{ae=!0,clearInterval(qe)}},[_,U,_l,Xl]);async function rl(Q,ae){Q.preventDefault(),ze(!0);try{const Ne=await Qh({project:ue,story:j});Ee(""),B(""),he(`Project "${Ne.project}" created.`),await Jl(),d(Ne.project),typeof ae=="function"&&ae(Ne)}catch(Ne){he(Ne.message,!0)}finally{ze(!1)}}async function jc(){if(_){Y(!0);try{await Ls(_,{story:S,shots:Qs(M)}),he("Story saved."),V(!1),await Ge(_)}catch(Q){he(Q.message,!0)}finally{Y(!1)}}}async function Nc(){if(_){be(!0);try{await Ls(_,{script:w}),he("Script saved."),le(!1),await Ge(_)}catch(Q){he(Q.message,!0)}finally{be(!1)}}}async function _c(Q){if(_)try{await Ls(_,{shots:Qs(Q)}),he("Prompt saved."),f(Q)}catch(ae){throw he(ae.message,!0),ae}}function tt(Q,ae){o(Ne=>{const qe={...Ne};return ae==null?delete qe[Q]:qe[Q]=ae,qe}),ge(!0)}function St(Q,ae){const Ne=ae===""?void 0:parseInt(ae,10);tt(Q,Number.isNaN(Ne)?void 0:Ne)}function Tt(Q,ae){o(Ne=>{const qe=xc(Ne)||xc({})||{models:{...Js}},sl=typeof ae=="string"?ae.trim():"";return{...qe,models:{...qe.models,[Q]:sl}}}),ge(!0)}function ia(Q,ae,Ne){o(qe=>{const sl=xc(qe)||{models:{...Js},modelOptions:{}},it=sl.modelOptions?.[Q]||{};return{...sl,modelOptions:{...sl.modelOptions||{},[Q]:{...it,[ae]:Ne}}}}),ge(!0)}async function zt(){if(!(!_||!oe)){la(!0);try{await Kh(_,oe),he("Config saved."),ge(!1),await Ge(_)}catch(Q){he(Q.message,!0)}finally{la(!1)}}}async function nt(Q){if(_)try{const ae=await im(_,{forceRestart:Q});ae.jobId?(g(ae.jobId),he("Generation started.")):he("Regeneration request accepted.")}catch(ae){if(ae.status===409&&ae.payload?.jobId){g(ae.payload.jobId),he("Attached to active job.");return}he(ae.message,!0)}}async function Sc(Q,ae){if(!_)return;const Ne=new Set(["voiceover","script","align","burnin"]),qe=Ne.has(Q)?Q:`${Q}-${ae}`;W(sl=>({...sl,[qe]:!0}));try{await im(_,Ne.has(Q)?{targetType:Q}:{targetType:Q,index:ae}),he(Q==="voiceover"?"Voiceover regenerated.":Q==="script"?"Script regenerated.":Q==="align"?"Subtitles re-aligned.":Q==="burnin"?"Subtitle burn-in completed.":`${Q==="keyframe"?"Keyframe":"Segment"} ${ae+1} regenerated.`),await Ge(_),Me(sl=>sl+1)}catch(sl){he(sl.message,!0)}finally{W(sl=>{const it={...sl};return delete it[qe],it})}}return{apiConfig:Dl,projects:m,selectedProject:_,setSelectedProject:d,projectDetails:E,loadingProjects:F,loadingDetails:te,savingStoryContent:H,savingScriptContent:fe,regeneratingMap:Ye,message:I,errorMessage:$,clearToast:mn,assetCacheKey:Te,createProjectName:ue,setCreateProjectName:Ee,createProjectStory:j,setCreateProjectStory:B,creatingProject:ee,storyText:S,scriptText:w,shotsText:M,storyDirty:z,scriptDirty:X,setStoryText:k,setScriptText:T,setShotsText:f,setStoryDirty:V,setScriptDirty:le,configDraft:oe,configDirty:p,savingConfig:ml,patchConfig:tt,patchConfigModel:Tt,patchConfigModelOption:ia,patchOptionalIntConfig:St,keyframes:Fl,segments:za,voiceAsset:Ul,finalVideo:_t,mediaW:Ca,mediaH:aa,mediaCss:lt,mediaColMin:at,runStatus:Xl,isRunning:ta,isPaused:el,steps:dn,activeStep:gl,activeSegmentIndex:Ql,tabs:Aa,loadProjects:Jl,loadProjectDetails:Ge,parseShotsText:Qs,handleCreateProject:rl,handleSaveStoryContent:jc,handleSaveScriptContent:Nc,handleSaveShotPrompts:_c,handleSaveConfig:zt,handleRunRegenerate:nt,handleTargetedRegenerate:Sc}}function Rp(){const[m,D]=K.useState("story"),[_,d]=K.useState(!1),{apiConfig:E,projects:R,selectedProject:q,setSelectedProject:G,projectDetails:U,loadingProjects:g,loadingDetails:F,savingStoryContent:L,savingScriptContent:te,regeneratingMap:se,message:H,errorMessage:Y,clearToast:fe,assetCacheKey:be,createProjectName:Ye,setCreateProjectName:W,createProjectStory:I,setCreateProjectStory:ce,creatingProject:$,storyText:ie,scriptText:Te,shotsText:Me,storyDirty:ue,scriptDirty:Ee,setStoryText:j,setScriptText:B,setStoryDirty:ee,setScriptDirty:ze,configDraft:S,configDirty:k,savingConfig:w,patchConfig:T,patchConfigModel:M,patchConfigModelOption:f,patchOptionalIntConfig:z,keyframes:V,segments:X,voiceAsset:le,finalVideo:oe,mediaW:o,mediaH:p,mediaCss:ge,mediaColMin:ml,runStatus:la,isRunning:Dl,isPaused:fl,steps:Ul,activeStep:Fl,activeSegmentIndex:za,tabs:_t,loadProjects:Ca,loadProjectDetails:aa,parseShotsText:lt,handleCreateProject:at,handleSaveStoryContent:Xl,handleSaveScriptContent:ta,handleSaveShotPrompts:el,handleSaveConfig:na,handleRunRegenerate:gl,handleTargetedRegenerate:Ql}=Up(),Ea=lt(Me),dn=Math.max(0,Ea.length-1),Aa=!!(S?.subtitleOptions?.enabled??U?.config?.subtitleOptions?.enabled);return K.useEffect(()=>{D("story")},[q]),n.jsxs("div",{className:"app-shell",children:[n.jsx(Wh,{apiBaseUrl:E.apiBaseUrl,hasToken:E.hasToken,loadingProjects:g,projects:R,selectedProject:q,onSelectProject:G,onShowCreate:()=>d(!0),onRefreshProjects:Ca}),n.jsx("div",{className:"main-area",children:q?n.jsxs(n.Fragment,{children:[n.jsx(ap,{selectedProject:q,runStatus:la,isRunning:Dl,isPaused:fl,loadingDetails:F,steps:Ul,activeStep:Fl,includeSubtitleStages:Aa,tabs:_t,activeTab:m,onRefresh:()=>aa(q),onRegenerate:()=>gl(!1),onForceRestart:()=>gl(!0),onContinue:()=>gl(!1),onChangeTab:D}),n.jsxs("div",{className:"tab-content",children:[m==="story"&&n.jsx(tp,{storyText:ie,dirty:ue,savingContent:L,onStoryChange:he=>{j(he),ee(!0)},onSave:Xl}),m==="config"&&n.jsx(rp,{configDraft:S,projectConfig:U?.config,mediaW:o,mediaH:p,configDirty:k,savingConfig:w,isRunning:Dl,onPatchConfig:T,onPatchModel:M,onPatchModelOption:f,onPatchOptionalInt:z,onSaveConfig:na}),m==="voice"&&n.jsx(hp,{voiceAsset:le,selectedProject:q,assetCacheKey:be,isRunning:Dl,busy:!!se.voiceover,scriptBusy:!!se.script,scriptText:Te,dirty:Ee,savingContent:te,onScriptChange:he=>{B(he),ze(!0)},onSave:ta,toDisplayAssetUrl:bc,onRegenerateVoice:()=>Ql("voiceover"),onRegenerateScript:()=>Ql("script"),configDraft:S,onPatchModel:M,onPatchModelOption:f,configDirty:k,savingConfig:w,onSaveConfig:na}),m==="keyframes"&&n.jsx(pp,{assets:V,shots:Ea,selectedProject:q,isRunning:Dl,activeStep:Fl,activeSegmentIndex:za,regeneratingMap:se,mediaCss:ge,mediaColMin:ml,assetCacheKey:be,toDisplayAssetUrl:bc,onSaveShotPrompts:el,onRegenerateProject:()=>gl(!1),onTargetedRegenerate:Ql,configDraft:S,onPatchModel:M,onPatchModelOption:f,configDirty:k,savingConfig:w,onSaveConfig:na}),m==="segments"&&n.jsx(xp,{assets:X,expectedCount:dn,selectedProject:q,isRunning:Dl,activeStep:Fl,regeneratingMap:se,mediaCss:ge,mediaColMin:ml,assetCacheKey:be,toDisplayAssetUrl:bc,onRegenerateProject:()=>gl(!1),onTargetedRegenerate:Ql,configDraft:S,onPatchModel:M,onPatchModelOption:f,configDirty:k,savingConfig:w,onSaveConfig:na}),m==="output"&&n.jsx(yp,{finalVideo:oe,selectedProject:q,assetCacheKey:be,mediaCss:ge,isRunning:Dl,subtitleEnabled:Aa,alignBusy:!!se.align,burninBusy:!!se.burnin,toDisplayAssetUrl:bc,onRegenerateProject:()=>gl(!1),onRegenerateAlign:()=>Ql("align"),onRegenerateBurnin:()=>Ql("burnin")}),m==="analytics"&&n.jsx(Cp,{selectedProject:q,includeSubtitleStages:Aa})]})]}):n.jsxs("div",{className:"empty-state",children:[n.jsx("div",{className:"empty-state-brand","aria-label":"Rilo",children:"Rilo"}),n.jsx("p",{className:"empty-state-title",children:"Select a project to get started"}),n.jsx("p",{className:"muted size-sm",children:"Pick an existing project from the sidebar, or create a new one."}),n.jsx("button",{type:"button",className:"btn btn-primary",onClick:()=>d(!0),children:"+ New project"})]})}),(H||Y)&&n.jsxs("div",{className:`toast-popup ${Y?"toast-error":"toast-ok"}`,children:[n.jsx("span",{children:Y||H}),n.jsx("button",{type:"button",className:"toast-close",onClick:fe,children:"✕"})]}),n.jsx(Ap,{open:_,creatingProject:$,createProjectName:Ye,createProjectStory:I,onClose:()=>d(!1),onSubmit:he=>at(he,()=>d(!1)),onNameChange:W,onStoryChange:ce})]})}Gh.createRoot(document.getElementById("root")).render(n.jsx(K.StrictMode,{children:n.jsx(Rp,{})}));