@doppelgangerdev/doppelganger 0.4.0 → 0.5.2

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.
Files changed (77) hide show
  1. package/README.md +1 -1
  2. package/agent.js +446 -240
  3. package/dist/assets/index-BXRKDZ1_.css +1 -0
  4. package/dist/assets/index-Deb2QMGx.js +19 -0
  5. package/dist/captures/run_1769042882403_589_agent_1769042884446_initial.png +0 -0
  6. package/dist/captures/run_1769042882403_589_agent_1769042887058.png +0 -0
  7. package/dist/captures/run_1769042882403_589_agent_1769042888468.webm +0 -0
  8. package/dist/captures/run_1769043202318_943_agent_1769043206237.png +0 -0
  9. package/dist/captures/run_1769043202318_943_agent_1769043207415.webm +0 -0
  10. package/dist/captures/run_1769043449517_97_agent_1769043451350_initial.png +0 -0
  11. package/dist/captures/run_1769043449517_97_agent_1769043455038.png +0 -0
  12. package/dist/captures/run_1769043449517_97_agent_1769043456476.webm +0 -0
  13. package/dist/captures/run_1769043471164_239_agent_1769043472720_initial.png +0 -0
  14. package/dist/captures/run_1769043471164_239_agent_1769043474022.png +0 -0
  15. package/dist/captures/run_1769043471164_239_agent_1769043476419.png +0 -0
  16. package/dist/captures/run_1769043471164_239_agent_1769043477795.webm +0 -0
  17. package/dist/captures/run_1769080585290_151_agent_1769080595110.png +0 -0
  18. package/dist/captures/run_1769080585290_151_agent_1769080596335.webm +0 -0
  19. package/dist/index.html +3 -3
  20. package/dist/screenshots/agent_1769037343598.png +0 -0
  21. package/dist/screenshots/agent_1769037357541.png +0 -0
  22. package/dist/screenshots/scrape_1769037382254.png +0 -0
  23. package/dist/screenshots/scrape_1769037413189.png +0 -0
  24. package/dist/screenshots/scrape_1769037449707.png +0 -0
  25. package/dist/screenshots/scrape_1769037461756.png +0 -0
  26. package/dist/screenshots/scrape_1769037490581.png +0 -0
  27. package/dist/screenshots/scrape_1769038242368.png +0 -0
  28. package/headful.js +97 -42
  29. package/package.json +3 -1
  30. package/proxy-rotation.js +212 -154
  31. package/public/captures/run_1769042882403_589_agent_1769042884446_initial.png +0 -0
  32. package/public/captures/run_1769042882403_589_agent_1769042887058.png +0 -0
  33. package/public/captures/run_1769042882403_589_agent_1769042888468.webm +0 -0
  34. package/public/captures/run_1769043202318_943_agent_1769043206237.png +0 -0
  35. package/public/captures/run_1769043202318_943_agent_1769043207415.webm +0 -0
  36. package/public/captures/run_1769043449517_97_agent_1769043451350_initial.png +0 -0
  37. package/public/captures/run_1769043449517_97_agent_1769043455038.png +0 -0
  38. package/public/captures/run_1769043449517_97_agent_1769043456476.webm +0 -0
  39. package/public/captures/run_1769043471164_239_agent_1769043472720_initial.png +0 -0
  40. package/public/captures/run_1769043471164_239_agent_1769043474022.png +0 -0
  41. package/public/captures/run_1769043471164_239_agent_1769043476419.png +0 -0
  42. package/public/captures/run_1769043471164_239_agent_1769043477795.webm +0 -0
  43. package/public/captures/run_1769080585290_151_agent_1769080595110.png +0 -0
  44. package/public/captures/run_1769080585290_151_agent_1769080596335.webm +0 -0
  45. package/public/screenshots/agent_1769037343598.png +0 -0
  46. package/public/screenshots/agent_1769037357541.png +0 -0
  47. package/public/screenshots/scrape_1769037382254.png +0 -0
  48. package/public/screenshots/scrape_1769037413189.png +0 -0
  49. package/public/screenshots/scrape_1769037449707.png +0 -0
  50. package/public/screenshots/scrape_1769037461756.png +0 -0
  51. package/public/screenshots/scrape_1769037490581.png +0 -0
  52. package/public/screenshots/scrape_1769038242368.png +0 -0
  53. package/scrape.js +170 -73
  54. package/server.js +437 -335
  55. package/dist/assets/index-B7ntJ0pF.js +0 -18
  56. package/dist/assets/index-OOTrc7_f.css +0 -1
  57. package/dist/screenshots/agent_1768764625684.png +0 -0
  58. package/dist/screenshots/agent_1768765565909.png +0 -0
  59. package/dist/screenshots/agent_1768765581979.png +0 -0
  60. package/dist/screenshots/scrape_1768764416615.png +0 -0
  61. package/dist/screenshots/scrape_1768764452033.png +0 -0
  62. package/dist/screenshots/scrape_1768765064688.png +0 -0
  63. package/dist/screenshots/scrape_1768765090587.png +0 -0
  64. package/dist/screenshots/scrape_1768765100798.png +0 -0
  65. package/dist/screenshots/scrape_1768765114782.png +0 -0
  66. package/dist/screenshots/scrape_1768765127463.png +0 -0
  67. package/public/screenshots/agent_1768764625684.png +0 -0
  68. package/public/screenshots/agent_1768765565909.png +0 -0
  69. package/public/screenshots/agent_1768765581979.png +0 -0
  70. package/public/screenshots/scrape_1768764416615.png +0 -0
  71. package/public/screenshots/scrape_1768764452033.png +0 -0
  72. package/public/screenshots/scrape_1768765064688.png +0 -0
  73. package/public/screenshots/scrape_1768765090587.png +0 -0
  74. package/public/screenshots/scrape_1768765100798.png +0 -0
  75. package/public/screenshots/scrape_1768765114782.png +0 -0
  76. package/public/screenshots/scrape_1768765127463.png +0 -0
  77. package/public/screenshots/scrape_1768769463201.png +0 -0
@@ -0,0 +1,19 @@
1
+ (function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const f of document.querySelectorAll('link[rel="modulepreload"]'))u(f);new MutationObserver(f=>{for(const p of f)if(p.type==="childList")for(const m of p.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&u(m)}).observe(document,{childList:!0,subtree:!0});function d(f){const p={};return f.integrity&&(p.integrity=f.integrity),f.referrerPolicy&&(p.referrerPolicy=f.referrerPolicy),f.crossOrigin==="use-credentials"?p.credentials="include":f.crossOrigin==="anonymous"?p.credentials="omit":p.credentials="same-origin",p}function u(f){if(f.ep)return;f.ep=!0;const p=d(f);fetch(f.href,p)}})();function np(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var du={exports:{}},wi={};var zh;function I0(){if(zh)return wi;zh=1;var s=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function d(u,f,p){var m=null;if(p!==void 0&&(m=""+p),f.key!==void 0&&(m=""+f.key),"key"in f){p={};for(var S in f)S!=="key"&&(p[S]=f[S])}else p=f;return f=p.ref,{$$typeof:s,type:u,key:m,ref:f!==void 0?f:null,props:p}}return wi.Fragment=c,wi.jsx=d,wi.jsxs=d,wi}var Mh;function P0(){return Mh||(Mh=1,du.exports=I0()),du.exports}var r=P0(),fu={exports:{}},je={};var Oh;function ex(){if(Oh)return je;Oh=1;var s=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),d=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),f=Symbol.for("react.profiler"),p=Symbol.for("react.consumer"),m=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),w=Symbol.for("react.activity"),D=Symbol.iterator;function B(y){return y===null||typeof y!="object"?null:(y=D&&y[D]||y["@@iterator"],typeof y=="function"?y:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,O={};function L(y,q,$){this.props=y,this.context=q,this.refs=O,this.updater=$||R}L.prototype.isReactComponent={},L.prototype.setState=function(y,q){if(typeof y!="object"&&typeof y!="function"&&y!=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,y,q,"setState")},L.prototype.forceUpdate=function(y){this.updater.enqueueForceUpdate(this,y,"forceUpdate")};function G(){}G.prototype=L.prototype;function Z(y,q,$){this.props=y,this.context=q,this.refs=O,this.updater=$||R}var ne=Z.prototype=new G;ne.constructor=Z,j(ne,L.prototype),ne.isPureReactComponent=!0;var te=Array.isArray;function ae(){}var P={H:null,A:null,T:null,S:null},he=Object.prototype.hasOwnProperty;function F(y,q,$){var Q=$.ref;return{$$typeof:s,type:y,key:q,ref:Q!==void 0?Q:null,props:$}}function ve(y,q){return F(y.type,q,y.props)}function Ae(y){return typeof y=="object"&&y!==null&&y.$$typeof===s}function we(y){var q={"=":"=0",":":"=2"};return"$"+y.replace(/[=:]/g,function($){return q[$]})}var Me=/\/+/g;function be(y,q){return typeof y=="object"&&y!==null&&y.key!=null?we(""+y.key):q.toString(36)}function Ie(y){switch(y.status){case"fulfilled":return y.value;case"rejected":throw y.reason;default:switch(typeof y.status=="string"?y.then(ae,ae):(y.status="pending",y.then(function(q){y.status==="pending"&&(y.status="fulfilled",y.value=q)},function(q){y.status==="pending"&&(y.status="rejected",y.reason=q)})),y.status){case"fulfilled":return y.value;case"rejected":throw y.reason}}throw y}function k(y,q,$,Q,ie){var pe=typeof y;(pe==="undefined"||pe==="boolean")&&(y=null);var xe=!1;if(y===null)xe=!0;else switch(pe){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(y.$$typeof){case s:case c:xe=!0;break;case E:return xe=y._init,k(xe(y._payload),q,$,Q,ie)}}if(xe)return ie=ie(y),xe=Q===""?"."+be(y,0):Q,te(ie)?($="",xe!=null&&($=xe.replace(Me,"$&/")+"/"),k(ie,q,$,"",function(Tt){return Tt})):ie!=null&&(Ae(ie)&&(ie=ve(ie,$+(ie.key==null||y&&y.key===ie.key?"":(""+ie.key).replace(Me,"$&/")+"/")+xe)),q.push(ie)),1;xe=0;var Qe=Q===""?".":Q+":";if(te(y))for(var ke=0;ke<y.length;ke++)Q=y[ke],pe=Qe+be(Q,ke),xe+=k(Q,q,$,pe,ie);else if(ke=B(y),typeof ke=="function")for(y=ke.call(y),ke=0;!(Q=y.next()).done;)Q=Q.value,pe=Qe+be(Q,ke++),xe+=k(Q,q,$,pe,ie);else if(pe==="object"){if(typeof y.then=="function")return k(Ie(y),q,$,Q,ie);throw q=String(y),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(y).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.")}return xe}function H(y,q,$){if(y==null)return y;var Q=[],ie=0;return k(y,Q,"","",function(pe){return q.call($,pe,ie++)}),Q}function W(y){if(y._status===-1){var q=y._result;q=q(),q.then(function($){(y._status===0||y._status===-1)&&(y._status=1,y._result=$)},function($){(y._status===0||y._status===-1)&&(y._status=2,y._result=$)}),y._status===-1&&(y._status=0,y._result=q)}if(y._status===1)return y._result.default;throw y._result}var ye=typeof reportError=="function"?reportError:function(y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof y=="object"&&y!==null&&typeof y.message=="string"?String(y.message):String(y),error:y});if(!window.dispatchEvent(q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",y);return}console.error(y)},de={map:H,forEach:function(y,q,$){H(y,function(){q.apply(this,arguments)},$)},count:function(y){var q=0;return H(y,function(){q++}),q},toArray:function(y){return H(y,function(q){return q})||[]},only:function(y){if(!Ae(y))throw Error("React.Children.only expected to receive a single React element child.");return y}};return je.Activity=w,je.Children=de,je.Component=L,je.Fragment=d,je.Profiler=f,je.PureComponent=Z,je.StrictMode=u,je.Suspense=b,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,je.__COMPILER_RUNTIME={__proto__:null,c:function(y){return P.H.useMemoCache(y)}},je.cache=function(y){return function(){return y.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(y,q,$){if(y==null)throw Error("The argument must be a React element, but you passed "+y+".");var Q=j({},y.props),ie=y.key;if(q!=null)for(pe in q.key!==void 0&&(ie=""+q.key),q)!he.call(q,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&q.ref===void 0||(Q[pe]=q[pe]);var pe=arguments.length-2;if(pe===1)Q.children=$;else if(1<pe){for(var xe=Array(pe),Qe=0;Qe<pe;Qe++)xe[Qe]=arguments[Qe+2];Q.children=xe}return F(y.type,ie,Q)},je.createContext=function(y){return y={$$typeof:m,_currentValue:y,_currentValue2:y,_threadCount:0,Provider:null,Consumer:null},y.Provider=y,y.Consumer={$$typeof:p,_context:y},y},je.createElement=function(y,q,$){var Q,ie={},pe=null;if(q!=null)for(Q in q.key!==void 0&&(pe=""+q.key),q)he.call(q,Q)&&Q!=="key"&&Q!=="__self"&&Q!=="__source"&&(ie[Q]=q[Q]);var xe=arguments.length-2;if(xe===1)ie.children=$;else if(1<xe){for(var Qe=Array(xe),ke=0;ke<xe;ke++)Qe[ke]=arguments[ke+2];ie.children=Qe}if(y&&y.defaultProps)for(Q in xe=y.defaultProps,xe)ie[Q]===void 0&&(ie[Q]=xe[Q]);return F(y,pe,ie)},je.createRef=function(){return{current:null}},je.forwardRef=function(y){return{$$typeof:S,render:y}},je.isValidElement=Ae,je.lazy=function(y){return{$$typeof:E,_payload:{_status:-1,_result:y},_init:W}},je.memo=function(y,q){return{$$typeof:x,type:y,compare:q===void 0?null:q}},je.startTransition=function(y){var q=P.T,$={};P.T=$;try{var Q=y(),ie=P.S;ie!==null&&ie($,Q),typeof Q=="object"&&Q!==null&&typeof Q.then=="function"&&Q.then(ae,ye)}catch(pe){ye(pe)}finally{q!==null&&$.types!==null&&(q.types=$.types),P.T=q}},je.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},je.use=function(y){return P.H.use(y)},je.useActionState=function(y,q,$){return P.H.useActionState(y,q,$)},je.useCallback=function(y,q){return P.H.useCallback(y,q)},je.useContext=function(y){return P.H.useContext(y)},je.useDebugValue=function(){},je.useDeferredValue=function(y,q){return P.H.useDeferredValue(y,q)},je.useEffect=function(y,q){return P.H.useEffect(y,q)},je.useEffectEvent=function(y){return P.H.useEffectEvent(y)},je.useId=function(){return P.H.useId()},je.useImperativeHandle=function(y,q,$){return P.H.useImperativeHandle(y,q,$)},je.useInsertionEffect=function(y,q){return P.H.useInsertionEffect(y,q)},je.useLayoutEffect=function(y,q){return P.H.useLayoutEffect(y,q)},je.useMemo=function(y,q){return P.H.useMemo(y,q)},je.useOptimistic=function(y,q){return P.H.useOptimistic(y,q)},je.useReducer=function(y,q,$){return P.H.useReducer(y,q,$)},je.useRef=function(y){return P.H.useRef(y)},je.useState=function(y){return P.H.useState(y)},je.useSyncExternalStore=function(y,q,$){return P.H.useSyncExternalStore(y,q,$)},je.useTransition=function(){return P.H.useTransition()},je.version="19.2.3",je}var Dh;function zu(){return Dh||(Dh=1,fu.exports=ex()),fu.exports}var g=zu();const tx=np(g);var hu={exports:{}},Si={},pu={exports:{}},mu={};var kh;function ax(){return kh||(kh=1,(function(s){function c(k,H){var W=k.length;k.push(H);e:for(;0<W;){var ye=W-1>>>1,de=k[ye];if(0<f(de,H))k[ye]=H,k[W]=de,W=ye;else break e}}function d(k){return k.length===0?null:k[0]}function u(k){if(k.length===0)return null;var H=k[0],W=k.pop();if(W!==H){k[0]=W;e:for(var ye=0,de=k.length,y=de>>>1;ye<y;){var q=2*(ye+1)-1,$=k[q],Q=q+1,ie=k[Q];if(0>f($,W))Q<de&&0>f(ie,$)?(k[ye]=ie,k[Q]=W,ye=Q):(k[ye]=$,k[q]=W,ye=q);else if(Q<de&&0>f(ie,W))k[ye]=ie,k[Q]=W,ye=Q;else break e}}return H}function f(k,H){var W=k.sortIndex-H.sortIndex;return W!==0?W:k.id-H.id}if(s.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var p=performance;s.unstable_now=function(){return p.now()}}else{var m=Date,S=m.now();s.unstable_now=function(){return m.now()-S}}var b=[],x=[],E=1,w=null,D=3,B=!1,R=!1,j=!1,O=!1,L=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,Z=typeof setImmediate<"u"?setImmediate:null;function ne(k){for(var H=d(x);H!==null;){if(H.callback===null)u(x);else if(H.startTime<=k)u(x),H.sortIndex=H.expirationTime,c(b,H);else break;H=d(x)}}function te(k){if(j=!1,ne(k),!R)if(d(b)!==null)R=!0,ae||(ae=!0,we());else{var H=d(x);H!==null&&Ie(te,H.startTime-k)}}var ae=!1,P=-1,he=5,F=-1;function ve(){return O?!0:!(s.unstable_now()-F<he)}function Ae(){if(O=!1,ae){var k=s.unstable_now();F=k;var H=!0;try{e:{R=!1,j&&(j=!1,G(P),P=-1),B=!0;var W=D;try{t:{for(ne(k),w=d(b);w!==null&&!(w.expirationTime>k&&ve());){var ye=w.callback;if(typeof ye=="function"){w.callback=null,D=w.priorityLevel;var de=ye(w.expirationTime<=k);if(k=s.unstable_now(),typeof de=="function"){w.callback=de,ne(k),H=!0;break t}w===d(b)&&u(b),ne(k)}else u(b);w=d(b)}if(w!==null)H=!0;else{var y=d(x);y!==null&&Ie(te,y.startTime-k),H=!1}}break e}finally{w=null,D=W,B=!1}H=void 0}}finally{H?we():ae=!1}}}var we;if(typeof Z=="function")we=function(){Z(Ae)};else if(typeof MessageChannel<"u"){var Me=new MessageChannel,be=Me.port2;Me.port1.onmessage=Ae,we=function(){be.postMessage(null)}}else we=function(){L(Ae,0)};function Ie(k,H){P=L(function(){k(s.unstable_now())},H)}s.unstable_IdlePriority=5,s.unstable_ImmediatePriority=1,s.unstable_LowPriority=4,s.unstable_NormalPriority=3,s.unstable_Profiling=null,s.unstable_UserBlockingPriority=2,s.unstable_cancelCallback=function(k){k.callback=null},s.unstable_forceFrameRate=function(k){0>k||125<k?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):he=0<k?Math.floor(1e3/k):5},s.unstable_getCurrentPriorityLevel=function(){return D},s.unstable_next=function(k){switch(D){case 1:case 2:case 3:var H=3;break;default:H=D}var W=D;D=H;try{return k()}finally{D=W}},s.unstable_requestPaint=function(){O=!0},s.unstable_runWithPriority=function(k,H){switch(k){case 1:case 2:case 3:case 4:case 5:break;default:k=3}var W=D;D=k;try{return H()}finally{D=W}},s.unstable_scheduleCallback=function(k,H,W){var ye=s.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?ye+W:ye):W=ye,k){case 1:var de=-1;break;case 2:de=250;break;case 5:de=1073741823;break;case 4:de=1e4;break;default:de=5e3}return de=W+de,k={id:E++,callback:H,priorityLevel:k,startTime:W,expirationTime:de,sortIndex:-1},W>ye?(k.sortIndex=W,c(x,k),d(b)===null&&k===d(x)&&(j?(G(P),P=-1):j=!0,Ie(te,W-ye))):(k.sortIndex=de,c(b,k),R||B||(R=!0,ae||(ae=!0,we()))),k},s.unstable_shouldYield=ve,s.unstable_wrapCallback=function(k){var H=D;return function(){var W=D;D=H;try{return k.apply(this,arguments)}finally{D=W}}}})(mu)),mu}var Uh;function lx(){return Uh||(Uh=1,pu.exports=ax()),pu.exports}var xu={exports:{}},Mt={};var Lh;function nx(){if(Lh)return Mt;Lh=1;var s=zu();function c(b){var x="https://react.dev/errors/"+b;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var E=2;E<arguments.length;E++)x+="&args[]="+encodeURIComponent(arguments[E])}return"Minified React error #"+b+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(){}var u={d:{f:d,r:function(){throw Error(c(522))},D:d,C:d,L:d,m:d,X:d,S:d,M:d},p:0,findDOMNode:null},f=Symbol.for("react.portal");function p(b,x,E){var w=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:f,key:w==null?null:""+w,children:b,containerInfo:x,implementation:E}}var m=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function S(b,x){if(b==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return Mt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Mt.createPortal=function(b,x){var E=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(c(299));return p(b,x,null,E)},Mt.flushSync=function(b){var x=m.T,E=u.p;try{if(m.T=null,u.p=2,b)return b()}finally{m.T=x,u.p=E,u.d.f()}},Mt.preconnect=function(b,x){typeof b=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,u.d.C(b,x))},Mt.prefetchDNS=function(b){typeof b=="string"&&u.d.D(b)},Mt.preinit=function(b,x){if(typeof b=="string"&&x&&typeof x.as=="string"){var E=x.as,w=S(E,x.crossOrigin),D=typeof x.integrity=="string"?x.integrity:void 0,B=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;E==="style"?u.d.S(b,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:w,integrity:D,fetchPriority:B}):E==="script"&&u.d.X(b,{crossOrigin:w,integrity:D,fetchPriority:B,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},Mt.preinitModule=function(b,x){if(typeof b=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var E=S(x.as,x.crossOrigin);u.d.M(b,{crossOrigin:E,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&u.d.M(b)},Mt.preload=function(b,x){if(typeof b=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var E=x.as,w=S(E,x.crossOrigin);u.d.L(b,E,{crossOrigin:w,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},Mt.preloadModule=function(b,x){if(typeof b=="string")if(x){var E=S(x.as,x.crossOrigin);u.d.m(b,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:E,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else u.d.m(b)},Mt.requestFormReset=function(b){u.d.r(b)},Mt.unstable_batchedUpdates=function(b,x){return b(x)},Mt.useFormState=function(b,x,E){return m.H.useFormState(b,x,E)},Mt.useFormStatus=function(){return m.H.useHostTransitionStatus()},Mt.version="19.2.3",Mt}var Hh;function ix(){if(Hh)return xu.exports;Hh=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(c){console.error(c)}}return s(),xu.exports=nx(),xu.exports}var Bh;function sx(){if(Bh)return Si;Bh=1;var s=lx(),c=zu(),d=ix();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)t+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function p(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function m(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function S(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function b(e){if(p(e)!==e)throw Error(u(188))}function x(e){var t=e.alternate;if(!t){if(t=p(e),t===null)throw Error(u(188));return t!==e?null:e}for(var a=e,l=t;;){var n=a.return;if(n===null)break;var i=n.alternate;if(i===null){if(l=n.return,l!==null){a=l;continue}break}if(n.child===i.child){for(i=n.child;i;){if(i===a)return b(n),e;if(i===l)return b(n),t;i=i.sibling}throw Error(u(188))}if(a.return!==l.return)a=n,l=i;else{for(var o=!1,h=n.child;h;){if(h===a){o=!0,a=n,l=i;break}if(h===l){o=!0,l=n,a=i;break}h=h.sibling}if(!o){for(h=i.child;h;){if(h===a){o=!0,a=i,l=n;break}if(h===l){o=!0,l=i,a=n;break}h=h.sibling}if(!o)throw Error(u(189))}}if(a.alternate!==l)throw Error(u(190))}if(a.tag!==3)throw Error(u(188));return a.stateNode.current===a?e:t}function E(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=E(e),t!==null)return t;e=e.sibling}return null}var w=Object.assign,D=Symbol.for("react.element"),B=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),L=Symbol.for("react.profiler"),G=Symbol.for("react.consumer"),Z=Symbol.for("react.context"),ne=Symbol.for("react.forward_ref"),te=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),he=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),ve=Symbol.for("react.memo_cache_sentinel"),Ae=Symbol.iterator;function we(e){return e===null||typeof e!="object"?null:(e=Ae&&e[Ae]||e["@@iterator"],typeof e=="function"?e:null)}var Me=Symbol.for("react.client.reference");function be(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case L:return"Profiler";case O:return"StrictMode";case te:return"Suspense";case ae:return"SuspenseList";case F:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case Z:return e.displayName||"Context";case G:return(e._context.displayName||"Context")+".Consumer";case ne:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case P:return t=e.displayName||null,t!==null?t:be(e.type)||"Memo";case he:t=e._payload,e=e._init;try{return be(e(t))}catch{}}return null}var Ie=Array.isArray,k=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=d.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W={pending:!1,data:null,method:null,action:null},ye=[],de=-1;function y(e){return{current:e}}function q(e){0>de||(e.current=ye[de],ye[de]=null,de--)}function $(e,t){de++,ye[de]=e.current,e.current=t}var Q=y(null),ie=y(null),pe=y(null),xe=y(null);function Qe(e,t){switch($(pe,t),$(ie,e),$(Q,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?eh(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=eh(t),e=th(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}q(Q),$(Q,e)}function ke(){q(Q),q(ie),q(pe)}function Tt(e){e.memoizedState!==null&&$(xe,e);var t=Q.current,a=th(t,e.type);t!==a&&($(ie,e),$(Q,a))}function fa(e){ie.current===e&&(q(Q),q(ie)),xe.current===e&&(q(xe),gi._currentValue=W)}var ya,va;function _t(e){if(ya===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);ya=t&&t[1]||"",va=-1<a.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+ya+e+va}var ba=!1;function ha(e,t){if(!e||ba)return"";ba=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(U){var M=U}Reflect.construct(e,[],X)}else{try{X.call()}catch(U){M=U}e.call(X.prototype)}}else{try{throw Error()}catch(U){M=U}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(U){if(U&&M&&typeof U.stack=="string")return[U.stack,M.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),o=i[0],h=i[1];if(o&&h){var v=o.split(`
4
+ `),z=h.split(`
5
+ `);for(n=l=0;l<v.length&&!v[l].includes("DetermineComponentFrameRoot");)l++;for(;n<z.length&&!z[n].includes("DetermineComponentFrameRoot");)n++;if(l===v.length||n===z.length)for(l=v.length-1,n=z.length-1;1<=l&&0<=n&&v[l]!==z[n];)n--;for(;1<=l&&0<=n;l--,n--)if(v[l]!==z[n]){if(l!==1||n!==1)do if(l--,n--,0>n||v[l]!==z[n]){var V=`
6
+ `+v[l].replace(" at new "," at ");return e.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",e.displayName)),V}while(1<=l&&0<=n);break}}}finally{ba=!1,Error.prepareStackTrace=a}return(a=e?e.displayName||e.name:"")?_t(a):""}function wa(e,t){switch(e.tag){case 26:case 27:case 5:return _t(e.type);case 16:return _t("Lazy");case 13:return e.child!==t&&t!==null?_t("Suspense Fallback"):_t("Suspense");case 19:return _t("SuspenseList");case 0:case 15:return ha(e.type,!1);case 11:return ha(e.type.render,!1);case 1:return ha(e.type,!0);case 31:return _t("Activity");default:return""}}function se(e){try{var t="",a=null;do t+=wa(e,a),a=e,e=e.return;while(e);return t}catch(l){return`
7
+ Error generating stack: `+l.message+`
8
+ `+l.stack}}var ue=Object.prototype.hasOwnProperty,fe=s.unstable_scheduleCallback,Ne=s.unstable_cancelCallback,mt=s.unstable_shouldYield,Wa=s.unstable_requestPaint,xt=s.unstable_now,It=s.unstable_getCurrentPriorityLevel,_a=s.unstable_ImmediatePriority,K=s.unstable_UserBlockingPriority,le=s.unstable_NormalPriority,ce=s.unstable_LowPriority,ee=s.unstable_IdlePriority,We=s.log,tt=s.unstable_setDisableYieldValue,at=null,Ue=null;function gt(e){if(typeof We=="function"&&tt(e),Ue&&typeof Ue.setStrictMode=="function")try{Ue.setStrictMode(at,e)}catch{}}var it=Math.clz32?Math.clz32:bt,Sl=Math.log,kt=Math.LN2;function bt(e){return e>>>=0,e===0?32:31-(Sl(e)/kt|0)|0}var Pt=256,Rt=262144,jt=4194304;function ea(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function T(e,t,a){var l=e.pendingLanes;if(l===0)return 0;var n=0,i=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var h=l&134217727;return h!==0?(l=h&~i,l!==0?n=ea(l):(o&=h,o!==0?n=ea(o):a||(a=h&~e,a!==0&&(n=ea(a))))):(h=l&~i,h!==0?n=ea(h):o!==0?n=ea(o):a||(a=l&~e,a!==0&&(n=ea(a)))),n===0?0:t!==0&&t!==n&&(t&i)===0&&(i=n&-n,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:n}function C(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function J(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function _e(){var e=jt;return jt<<=1,(jt&62914560)===0&&(jt=4194304),e}function He(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function Fe(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function zt(e,t,a,l,n,i){var o=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 h=e.entanglements,v=e.expirationTimes,z=e.hiddenUpdates;for(a=o&~a;0<a;){var V=31-it(a),X=1<<V;h[V]=0,v[V]=-1;var M=z[V];if(M!==null)for(z[V]=null,V=0;V<M.length;V++){var U=M[V];U!==null&&(U.lane&=-536870913)}a&=~X}l!==0&&Sa(e,l,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(o&~t))}function Sa(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-it(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|a&261930}function jl(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var l=31-it(a),n=1<<l;n&t|e[l]&t&&(e[l]|=t),a&=~n}}function Yl(e,t){var a=t&-t;return a=(a&42)!==0?1:I(a),(a&(e.suspendedLanes|t))!==0?0:a}function I(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 Be(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Fa(){var e=H.p;return e!==0?e:(e=window.event,e===void 0?32:Nh(e.type))}function Ut(e,t){var a=H.p;try{return H.p=e,t()}finally{H.p=a}}var Lt=Math.random().toString(36).slice(2),ct="__reactFiber$"+Lt,Se="__reactProps$"+Lt,Ht="__reactContainer$"+Lt,Nl="__reactEvents$"+Lt,Vp="__reactListeners$"+Lt,Yp="__reactHandles$"+Lt,Bu="__reactResources$"+Lt,Mn="__reactMarker$"+Lt;function lr(e){delete e[ct],delete e[Se],delete e[Nl],delete e[Vp],delete e[Yp]}function Gl(e){var t=e[ct];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Ht]||a[ct]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=ch(e);e!==null;){if(a=e[ct])return a;e=ch(e)}return t}e=a,a=e.parentNode}return null}function Xl(e){if(e=e[ct]||e[Ht]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function On(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Ql(e){var t=e[Bu];return t||(t=e[Bu]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function wt(e){e[Mn]=!0}var qu=new Set,Vu={};function El(e,t){Zl(e,t),Zl(e+"Capture",t)}function Zl(e,t){for(Vu[e]=t,e=0;e<t.length;e++)qu.add(t[e])}var Gp=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]*$"),Yu={},Gu={};function Xp(e){return ue.call(Gu,e)?!0:ue.call(Yu,e)?!1:Gp.test(e)?Gu[e]=!0:(Yu[e]=!0,!1)}function zi(e,t,a){if(Xp(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+a)}}function Mi(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+a)}}function Ra(e,t,a,l){if(l===null)e.removeAttribute(a);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}e.setAttributeNS(t,a,""+l)}}function ta(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Xu(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Qp(e,t,a){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var n=l.get,i=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(o){a=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return a},setValue:function(o){a=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function nr(e){if(!e._valueTracker){var t=Xu(e)?"checked":"value";e._valueTracker=Qp(e,t,""+e[t])}}function Qu(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),l="";return e&&(l=Xu(e)?e.checked?"true":"false":e.value),e=l,e!==a?(t.setValue(e),!0):!1}function Oi(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 Zp=/[\n"\\]/g;function aa(e){return e.replace(Zp,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function ir(e,t,a,l,n,i,o,h){e.name="",o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"?e.type=o:e.removeAttribute("type"),t!=null?o==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+ta(t)):e.value!==""+ta(t)&&(e.value=""+ta(t)):o!=="submit"&&o!=="reset"||e.removeAttribute("value"),t!=null?sr(e,o,ta(t)):a!=null?sr(e,o,ta(a)):l!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?e.name=""+ta(h):e.removeAttribute("name")}function Zu(e,t,a,l,n,i,o,h){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){nr(e);return}a=a!=null?""+ta(a):"",t=t!=null?""+ta(t):a,h||t===e.value||(e.value=t),e.defaultValue=t}l=l??n,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=h?e.checked:!!l,e.defaultChecked=!!l,o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.name=o),nr(e)}function sr(e,t,a){t==="number"&&Oi(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function $l(e,t,a,l){if(e=e.options,t){t={};for(var n=0;n<a.length;n++)t["$"+a[n]]=!0;for(a=0;a<e.length;a++)n=t.hasOwnProperty("$"+e[a].value),e[a].selected!==n&&(e[a].selected=n),n&&l&&(e[a].defaultSelected=!0)}else{for(a=""+ta(a),t=null,n=0;n<e.length;n++){if(e[n].value===a){e[n].selected=!0,l&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function $u(e,t,a){if(t!=null&&(t=""+ta(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+ta(a):""}function Ku(e,t,a,l){if(t==null){if(l!=null){if(a!=null)throw Error(u(92));if(Ie(l)){if(1<l.length)throw Error(u(93));l=l[0]}a=l}a==null&&(a=""),t=a}a=ta(t),e.defaultValue=a,l=e.textContent,l===a&&l!==""&&l!==null&&(e.value=l),nr(e)}function Kl(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}var $p=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function Ju(e,t,a){var l=t.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,a):typeof a!="number"||a===0||$p.has(t)?t==="float"?e.cssFloat=a:e[t]=(""+a).trim():e[t]=a+"px"}function Wu(e,t,a){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,a!=null){for(var l in a)!a.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var n in t)l=t[n],t.hasOwnProperty(n)&&a[n]!==l&&Ju(e,n,l)}else for(var i in t)t.hasOwnProperty(i)&&Ju(e,i,t[i])}function rr(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 Kp=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Jp=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Di(e){return Jp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function za(){}var cr=null;function ur(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jl=null,Wl=null;function Fu(e){var t=Xl(e);if(t&&(e=t.stateNode)){var a=e[Se]||null;e:switch(e=t.stateNode,t.type){case"input":if(ir(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+aa(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var l=a[t];if(l!==e&&l.form===e.form){var n=l[Se]||null;if(!n)throw Error(u(90));ir(l,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<a.length;t++)l=a[t],l.form===e.form&&Qu(l)}break e;case"textarea":$u(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&$l(e,!!a.multiple,t,!1)}}}var or=!1;function Iu(e,t,a){if(or)return e(t,a);or=!0;try{var l=e(t);return l}finally{if(or=!1,(Jl!==null||Wl!==null)&&(ws(),Jl&&(t=Jl,e=Wl,Wl=Jl=null,Fu(t),e)))for(t=0;t<e.length;t++)Fu(e[t])}}function Dn(e,t){var a=e.stateNode;if(a===null)return null;var l=a[Se]||null;if(l===null)return null;a=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error(u(231,t,typeof a));return a}var Ma=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),dr=!1;if(Ma)try{var kn={};Object.defineProperty(kn,"passive",{get:function(){dr=!0}}),window.addEventListener("test",kn,kn),window.removeEventListener("test",kn,kn)}catch{dr=!1}var Ia=null,fr=null,ki=null;function Pu(){if(ki)return ki;var e,t=fr,a=t.length,l,n="value"in Ia?Ia.value:Ia.textContent,i=n.length;for(e=0;e<a&&t[e]===n[e];e++);var o=a-e;for(l=1;l<=o&&t[a-l]===n[i-l];l++);return ki=n.slice(e,1<l?1-l:void 0)}function Ui(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Li(){return!0}function eo(){return!1}function Bt(e){function t(a,l,n,i,o){this._reactName=a,this._targetInst=n,this.type=l,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(a=e[h],this[h]=a?a(i):i[h]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Li:eo,this.isPropagationStopped=eo,this}return w(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Li)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Li)},persist:function(){},isPersistent:Li}),t}var Cl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hi=Bt(Cl),Un=w({},Cl,{view:0,detail:0}),Wp=Bt(Un),hr,pr,Ln,Bi=w({},Un,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:xr,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!==Ln&&(Ln&&e.type==="mousemove"?(hr=e.screenX-Ln.screenX,pr=e.screenY-Ln.screenY):pr=hr=0,Ln=e),hr)},movementY:function(e){return"movementY"in e?e.movementY:pr}}),to=Bt(Bi),Fp=w({},Bi,{dataTransfer:0}),Ip=Bt(Fp),Pp=w({},Un,{relatedTarget:0}),mr=Bt(Pp),em=w({},Cl,{animationName:0,elapsedTime:0,pseudoElement:0}),tm=Bt(em),am=w({},Cl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),lm=Bt(am),nm=w({},Cl,{data:0}),ao=Bt(nm),im={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sm={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"},rm={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function cm(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=rm[e])?!!t[e]:!1}function xr(){return cm}var um=w({},Un,{key:function(e){if(e.key){var t=im[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ui(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?sm[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:xr,charCode:function(e){return e.type==="keypress"?Ui(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ui(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),om=Bt(um),dm=w({},Bi,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lo=Bt(dm),fm=w({},Un,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:xr}),hm=Bt(fm),pm=w({},Cl,{propertyName:0,elapsedTime:0,pseudoElement:0}),mm=Bt(pm),xm=w({},Bi,{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}),gm=Bt(xm),ym=w({},Cl,{newState:0,oldState:0}),vm=Bt(ym),bm=[9,13,27,32],gr=Ma&&"CompositionEvent"in window,Hn=null;Ma&&"documentMode"in document&&(Hn=document.documentMode);var wm=Ma&&"TextEvent"in window&&!Hn,no=Ma&&(!gr||Hn&&8<Hn&&11>=Hn),io=" ",so=!1;function ro(e,t){switch(e){case"keyup":return bm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function co(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fl=!1;function Sm(e,t){switch(e){case"compositionend":return co(t);case"keypress":return t.which!==32?null:(so=!0,io);case"textInput":return e=t.data,e===io&&so?null:e;default:return null}}function jm(e,t){if(Fl)return e==="compositionend"||!gr&&ro(e,t)?(e=Pu(),ki=fr=Ia=null,Fl=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return no&&t.locale!=="ko"?null:t.data;default:return null}}var Nm={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 uo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Nm[e.type]:t==="textarea"}function oo(e,t,a,l){Jl?Wl?Wl.push(l):Wl=[l]:Jl=l,t=Ts(t,"onChange"),0<t.length&&(a=new Hi("onChange","change",null,a,l),e.push({event:a,listeners:t}))}var Bn=null,qn=null;function Em(e){Kf(e,0)}function qi(e){var t=On(e);if(Qu(t))return e}function fo(e,t){if(e==="change")return t}var ho=!1;if(Ma){var yr;if(Ma){var vr="oninput"in document;if(!vr){var po=document.createElement("div");po.setAttribute("oninput","return;"),vr=typeof po.oninput=="function"}yr=vr}else yr=!1;ho=yr&&(!document.documentMode||9<document.documentMode)}function mo(){Bn&&(Bn.detachEvent("onpropertychange",xo),qn=Bn=null)}function xo(e){if(e.propertyName==="value"&&qi(qn)){var t=[];oo(t,qn,e,ur(e)),Iu(Em,t)}}function Cm(e,t,a){e==="focusin"?(mo(),Bn=t,qn=a,Bn.attachEvent("onpropertychange",xo)):e==="focusout"&&mo()}function Am(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qi(qn)}function Tm(e,t){if(e==="click")return qi(t)}function _m(e,t){if(e==="input"||e==="change")return qi(t)}function Rm(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Qt=typeof Object.is=="function"?Object.is:Rm;function Vn(e,t){if(Qt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),l=Object.keys(t);if(a.length!==l.length)return!1;for(l=0;l<a.length;l++){var n=a[l];if(!ue.call(t,n)||!Qt(e[n],t[n]))return!1}return!0}function go(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function yo(e,t){var a=go(e);e=0;for(var l;a;){if(a.nodeType===3){if(l=e+a.textContent.length,e<=t&&l>=t)return{node:a,offset:t-e};e=l}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=go(a)}}function vo(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?vo(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function bo(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Oi(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=Oi(e.document)}return t}function br(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var zm=Ma&&"documentMode"in document&&11>=document.documentMode,Il=null,wr=null,Yn=null,Sr=!1;function wo(e,t,a){var l=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Sr||Il==null||Il!==Oi(l)||(l=Il,"selectionStart"in l&&br(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Yn&&Vn(Yn,l)||(Yn=l,l=Ts(wr,"onSelect"),0<l.length&&(t=new Hi("onSelect","select",null,t,a),e.push({event:t,listeners:l}),t.target=Il)))}function Al(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}var Pl={animationend:Al("Animation","AnimationEnd"),animationiteration:Al("Animation","AnimationIteration"),animationstart:Al("Animation","AnimationStart"),transitionrun:Al("Transition","TransitionRun"),transitionstart:Al("Transition","TransitionStart"),transitioncancel:Al("Transition","TransitionCancel"),transitionend:Al("Transition","TransitionEnd")},jr={},So={};Ma&&(So=document.createElement("div").style,"AnimationEvent"in window||(delete Pl.animationend.animation,delete Pl.animationiteration.animation,delete Pl.animationstart.animation),"TransitionEvent"in window||delete Pl.transitionend.transition);function Tl(e){if(jr[e])return jr[e];if(!Pl[e])return e;var t=Pl[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in So)return jr[e]=t[a];return e}var jo=Tl("animationend"),No=Tl("animationiteration"),Eo=Tl("animationstart"),Mm=Tl("transitionrun"),Om=Tl("transitionstart"),Dm=Tl("transitioncancel"),Co=Tl("transitionend"),Ao=new Map,Nr="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(" ");Nr.push("scrollEnd");function pa(e,t){Ao.set(e,t),El(t,[e])}var Vi=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},la=[],en=0,Er=0;function Yi(){for(var e=en,t=Er=en=0;t<e;){var a=la[t];la[t++]=null;var l=la[t];la[t++]=null;var n=la[t];la[t++]=null;var i=la[t];if(la[t++]=null,l!==null&&n!==null){var o=l.pending;o===null?n.next=n:(n.next=o.next,o.next=n),l.pending=n}i!==0&&To(a,n,i)}}function Gi(e,t,a,l){la[en++]=e,la[en++]=t,la[en++]=a,la[en++]=l,Er|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function Cr(e,t,a,l){return Gi(e,t,a,l),Xi(e)}function _l(e,t){return Gi(e,null,null,t),Xi(e)}function To(e,t,a){e.lanes|=a;var l=e.alternate;l!==null&&(l.lanes|=a);for(var n=!1,i=e.return;i!==null;)i.childLanes|=a,l=i.alternate,l!==null&&(l.childLanes|=a),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(n=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,n&&t!==null&&(n=31-it(a),e=i.hiddenUpdates,l=e[n],l===null?e[n]=[t]:l.push(t),t.lane=a|536870912),i):null}function Xi(e){if(50<oi)throw oi=0,kc=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var tn={};function km(e,t,a,l){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=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Zt(e,t,a,l){return new km(e,t,a,l)}function Ar(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Oa(e,t){var a=e.alternate;return a===null?(a=Zt(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a.alternate=e,e.alternate=a):(a.pendingProps=t,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,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a}function _o(e,t){e.flags&=65011714;var a=e.alternate;return a===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=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,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Qi(e,t,a,l,n,i){var o=0;if(l=e,typeof e=="function")Ar(e)&&(o=1);else if(typeof e=="string")o=q0(e,a,Q.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case F:return e=Zt(31,a,t,n),e.elementType=F,e.lanes=i,e;case j:return Rl(a.children,n,i,t);case O:o=8,n|=24;break;case L:return e=Zt(12,a,t,n|2),e.elementType=L,e.lanes=i,e;case te:return e=Zt(13,a,t,n),e.elementType=te,e.lanes=i,e;case ae:return e=Zt(19,a,t,n),e.elementType=ae,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Z:o=10;break e;case G:o=9;break e;case ne:o=11;break e;case P:o=14;break e;case he:o=16,l=null;break e}o=29,a=Error(u(130,e===null?"null":typeof e,"")),l=null}return t=Zt(o,a,t,n),t.elementType=e,t.type=l,t.lanes=i,t}function Rl(e,t,a,l){return e=Zt(7,e,l,t),e.lanes=a,e}function Tr(e,t,a){return e=Zt(6,e,null,t),e.lanes=a,e}function Ro(e){var t=Zt(18,null,null,0);return t.stateNode=e,t}function _r(e,t,a){return t=Zt(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var zo=new WeakMap;function na(e,t){if(typeof e=="object"&&e!==null){var a=zo.get(e);return a!==void 0?a:(t={value:e,source:t,stack:se(t)},zo.set(e,t),t)}return{value:e,source:t,stack:se(t)}}var an=[],ln=0,Zi=null,Gn=0,ia=[],sa=0,Pa=null,ja=1,Na="";function Da(e,t){an[ln++]=Gn,an[ln++]=Zi,Zi=e,Gn=t}function Mo(e,t,a){ia[sa++]=ja,ia[sa++]=Na,ia[sa++]=Pa,Pa=e;var l=ja;e=Na;var n=32-it(l)-1;l&=~(1<<n),a+=1;var i=32-it(t)+n;if(30<i){var o=n-n%5;i=(l&(1<<o)-1).toString(32),l>>=o,n-=o,ja=1<<32-it(t)+n|a<<n|l,Na=i+e}else ja=1<<i|a<<n|l,Na=e}function Rr(e){e.return!==null&&(Da(e,1),Mo(e,1,0))}function zr(e){for(;e===Zi;)Zi=an[--ln],an[ln]=null,Gn=an[--ln],an[ln]=null;for(;e===Pa;)Pa=ia[--sa],ia[sa]=null,Na=ia[--sa],ia[sa]=null,ja=ia[--sa],ia[sa]=null}function Oo(e,t){ia[sa++]=ja,ia[sa++]=Na,ia[sa++]=Pa,ja=t.id,Na=t.overflow,Pa=e}var Nt=null,Pe=null,Le=!1,el=null,ra=!1,Mr=Error(u(519));function tl(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Xn(na(t,e)),Mr}function Do(e){var t=e.stateNode,a=e.type,l=e.memoizedProps;switch(t[ct]=e,t[Se]=l,a){case"dialog":ze("cancel",t),ze("close",t);break;case"iframe":case"object":case"embed":ze("load",t);break;case"video":case"audio":for(a=0;a<fi.length;a++)ze(fi[a],t);break;case"source":ze("error",t);break;case"img":case"image":case"link":ze("error",t),ze("load",t);break;case"details":ze("toggle",t);break;case"input":ze("invalid",t),Zu(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":ze("invalid",t);break;case"textarea":ze("invalid",t),Ku(t,l.value,l.defaultValue,l.children)}a=l.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||l.suppressHydrationWarning===!0||If(t.textContent,a)?(l.popover!=null&&(ze("beforetoggle",t),ze("toggle",t)),l.onScroll!=null&&ze("scroll",t),l.onScrollEnd!=null&&ze("scrollend",t),l.onClick!=null&&(t.onclick=za),t=!0):t=!1,t||tl(e,!0)}function ko(e){for(Nt=e.return;Nt;)switch(Nt.tag){case 5:case 31:case 13:ra=!1;return;case 27:case 3:ra=!0;return;default:Nt=Nt.return}}function nn(e){if(e!==Nt)return!1;if(!Le)return ko(e),Le=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Wc(e.type,e.memoizedProps)),a=!a),a&&Pe&&tl(e),ko(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Pe=rh(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Pe=rh(e)}else t===27?(t=Pe,ml(e.type)?(e=tu,tu=null,Pe=e):Pe=t):Pe=Nt?ua(e.stateNode.nextSibling):null;return!0}function zl(){Pe=Nt=null,Le=!1}function Or(){var e=el;return e!==null&&(Gt===null?Gt=e:Gt.push.apply(Gt,e),el=null),e}function Xn(e){el===null?el=[e]:el.push(e)}var Dr=y(null),Ml=null,ka=null;function al(e,t,a){$(Dr,t._currentValue),t._currentValue=a}function Ua(e){e._currentValue=Dr.current,q(Dr)}function kr(e,t,a){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===a)break;e=e.return}}function Ur(e,t,a,l){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var i=n.dependencies;if(i!==null){var o=n.child;i=i.firstContext;e:for(;i!==null;){var h=i;i=n;for(var v=0;v<t.length;v++)if(h.context===t[v]){i.lanes|=a,h=i.alternate,h!==null&&(h.lanes|=a),kr(i.return,a,e),l||(o=null);break e}i=h.next}}else if(n.tag===18){if(o=n.return,o===null)throw Error(u(341));o.lanes|=a,i=o.alternate,i!==null&&(i.lanes|=a),kr(o,a,e),o=null}else o=n.child;if(o!==null)o.return=n;else for(o=n;o!==null;){if(o===e){o=null;break}if(n=o.sibling,n!==null){n.return=o.return,o=n;break}o=o.return}n=o}}function sn(e,t,a,l){e=null;for(var n=t,i=!1;n!==null;){if(!i){if((n.flags&524288)!==0)i=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var o=n.alternate;if(o===null)throw Error(u(387));if(o=o.memoizedProps,o!==null){var h=n.type;Qt(n.pendingProps.value,o.value)||(e!==null?e.push(h):e=[h])}}else if(n===xe.current){if(o=n.alternate,o===null)throw Error(u(387));o.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(gi):e=[gi])}n=n.return}e!==null&&Ur(t,e,a,l),t.flags|=262144}function $i(e){for(e=e.firstContext;e!==null;){if(!Qt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ol(e){Ml=e,ka=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Et(e){return Uo(Ml,e)}function Ki(e,t){return Ml===null&&Ol(e),Uo(e,t)}function Uo(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},ka===null){if(e===null)throw Error(u(308));ka=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ka=ka.next=t;return a}var Um=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},Lm=s.unstable_scheduleCallback,Hm=s.unstable_NormalPriority,dt={$$typeof:Z,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lr(){return{controller:new Um,data:new Map,refCount:0}}function Qn(e){e.refCount--,e.refCount===0&&Lm(Hm,function(){e.controller.abort()})}var Zn=null,Hr=0,rn=0,cn=null;function Bm(e,t){if(Zn===null){var a=Zn=[];Hr=0,rn=Vc(),cn={status:"pending",value:void 0,then:function(l){a.push(l)}}}return Hr++,t.then(Lo,Lo),t}function Lo(){if(--Hr===0&&Zn!==null){cn!==null&&(cn.status="fulfilled");var e=Zn;Zn=null,rn=0,cn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function qm(e,t){var a=[],l={status:"pending",value:null,reason:null,then:function(n){a.push(n)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var n=0;n<a.length;n++)(0,a[n])(t)},function(n){for(l.status="rejected",l.reason=n,n=0;n<a.length;n++)(0,a[n])(void 0)}),l}var Ho=k.S;k.S=function(e,t){Sf=xt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Bm(e,t),Ho!==null&&Ho(e,t)};var Dl=y(null);function Br(){var e=Dl.current;return e!==null?e:Je.pooledCache}function Ji(e,t){t===null?$(Dl,Dl.current):$(Dl,t.pool)}function Bo(){var e=Br();return e===null?null:{parent:dt._currentValue,pool:e}}var un=Error(u(460)),qr=Error(u(474)),Wi=Error(u(542)),Fi={then:function(){}};function qo(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Vo(e,t,a){switch(a=e[a],a===void 0?e.push(t):a!==t&&(t.then(za,za),t=a),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Go(e),e;default:if(typeof t.status=="string")t.then(za,za);else{if(e=Je,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=l}},function(l){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Go(e),e}throw Ul=t,un}}function kl(e){try{var t=e._init;return t(e._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Ul=a,un):a}}var Ul=null;function Yo(){if(Ul===null)throw Error(u(459));var e=Ul;return Ul=null,e}function Go(e){if(e===un||e===Wi)throw Error(u(483))}var on=null,$n=0;function Ii(e){var t=$n;return $n+=1,on===null&&(on=[]),Vo(on,e,t)}function Kn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Pi(e,t){throw t.$$typeof===D?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Xo(e){function t(A,N){if(e){var _=A.deletions;_===null?(A.deletions=[N],A.flags|=16):_.push(N)}}function a(A,N){if(!e)return null;for(;N!==null;)t(A,N),N=N.sibling;return null}function l(A){for(var N=new Map;A!==null;)A.key!==null?N.set(A.key,A):N.set(A.index,A),A=A.sibling;return N}function n(A,N){return A=Oa(A,N),A.index=0,A.sibling=null,A}function i(A,N,_){return A.index=_,e?(_=A.alternate,_!==null?(_=_.index,_<N?(A.flags|=67108866,N):_):(A.flags|=67108866,N)):(A.flags|=1048576,N)}function o(A){return e&&A.alternate===null&&(A.flags|=67108866),A}function h(A,N,_,Y){return N===null||N.tag!==6?(N=Tr(_,A.mode,Y),N.return=A,N):(N=n(N,_),N.return=A,N)}function v(A,N,_,Y){var me=_.type;return me===j?V(A,N,_.props.children,Y,_.key):N!==null&&(N.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===he&&kl(me)===N.type)?(N=n(N,_.props),Kn(N,_),N.return=A,N):(N=Qi(_.type,_.key,_.props,null,A.mode,Y),Kn(N,_),N.return=A,N)}function z(A,N,_,Y){return N===null||N.tag!==4||N.stateNode.containerInfo!==_.containerInfo||N.stateNode.implementation!==_.implementation?(N=_r(_,A.mode,Y),N.return=A,N):(N=n(N,_.children||[]),N.return=A,N)}function V(A,N,_,Y,me){return N===null||N.tag!==7?(N=Rl(_,A.mode,Y,me),N.return=A,N):(N=n(N,_),N.return=A,N)}function X(A,N,_){if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return N=Tr(""+N,A.mode,_),N.return=A,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case B:return _=Qi(N.type,N.key,N.props,null,A.mode,_),Kn(_,N),_.return=A,_;case R:return N=_r(N,A.mode,_),N.return=A,N;case he:return N=kl(N),X(A,N,_)}if(Ie(N)||we(N))return N=Rl(N,A.mode,_,null),N.return=A,N;if(typeof N.then=="function")return X(A,Ii(N),_);if(N.$$typeof===Z)return X(A,Ki(A,N),_);Pi(A,N)}return null}function M(A,N,_,Y){var me=N!==null?N.key:null;if(typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint")return me!==null?null:h(A,N,""+_,Y);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case B:return _.key===me?v(A,N,_,Y):null;case R:return _.key===me?z(A,N,_,Y):null;case he:return _=kl(_),M(A,N,_,Y)}if(Ie(_)||we(_))return me!==null?null:V(A,N,_,Y,null);if(typeof _.then=="function")return M(A,N,Ii(_),Y);if(_.$$typeof===Z)return M(A,N,Ki(A,_),Y);Pi(A,_)}return null}function U(A,N,_,Y,me){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return A=A.get(_)||null,h(N,A,""+Y,me);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case B:return A=A.get(Y.key===null?_:Y.key)||null,v(N,A,Y,me);case R:return A=A.get(Y.key===null?_:Y.key)||null,z(N,A,Y,me);case he:return Y=kl(Y),U(A,N,_,Y,me)}if(Ie(Y)||we(Y))return A=A.get(_)||null,V(N,A,Y,me,null);if(typeof Y.then=="function")return U(A,N,_,Ii(Y),me);if(Y.$$typeof===Z)return U(A,N,_,Ki(N,Y),me);Pi(N,Y)}return null}function re(A,N,_,Y){for(var me=null,qe=null,oe=N,Te=N=0,De=null;oe!==null&&Te<_.length;Te++){oe.index>Te?(De=oe,oe=null):De=oe.sibling;var Ve=M(A,oe,_[Te],Y);if(Ve===null){oe===null&&(oe=De);break}e&&oe&&Ve.alternate===null&&t(A,oe),N=i(Ve,N,Te),qe===null?me=Ve:qe.sibling=Ve,qe=Ve,oe=De}if(Te===_.length)return a(A,oe),Le&&Da(A,Te),me;if(oe===null){for(;Te<_.length;Te++)oe=X(A,_[Te],Y),oe!==null&&(N=i(oe,N,Te),qe===null?me=oe:qe.sibling=oe,qe=oe);return Le&&Da(A,Te),me}for(oe=l(oe);Te<_.length;Te++)De=U(oe,A,Te,_[Te],Y),De!==null&&(e&&De.alternate!==null&&oe.delete(De.key===null?Te:De.key),N=i(De,N,Te),qe===null?me=De:qe.sibling=De,qe=De);return e&&oe.forEach(function(bl){return t(A,bl)}),Le&&Da(A,Te),me}function ge(A,N,_,Y){if(_==null)throw Error(u(151));for(var me=null,qe=null,oe=N,Te=N=0,De=null,Ve=_.next();oe!==null&&!Ve.done;Te++,Ve=_.next()){oe.index>Te?(De=oe,oe=null):De=oe.sibling;var bl=M(A,oe,Ve.value,Y);if(bl===null){oe===null&&(oe=De);break}e&&oe&&bl.alternate===null&&t(A,oe),N=i(bl,N,Te),qe===null?me=bl:qe.sibling=bl,qe=bl,oe=De}if(Ve.done)return a(A,oe),Le&&Da(A,Te),me;if(oe===null){for(;!Ve.done;Te++,Ve=_.next())Ve=X(A,Ve.value,Y),Ve!==null&&(N=i(Ve,N,Te),qe===null?me=Ve:qe.sibling=Ve,qe=Ve);return Le&&Da(A,Te),me}for(oe=l(oe);!Ve.done;Te++,Ve=_.next())Ve=U(oe,A,Te,Ve.value,Y),Ve!==null&&(e&&Ve.alternate!==null&&oe.delete(Ve.key===null?Te:Ve.key),N=i(Ve,N,Te),qe===null?me=Ve:qe.sibling=Ve,qe=Ve);return e&&oe.forEach(function(F0){return t(A,F0)}),Le&&Da(A,Te),me}function Ke(A,N,_,Y){if(typeof _=="object"&&_!==null&&_.type===j&&_.key===null&&(_=_.props.children),typeof _=="object"&&_!==null){switch(_.$$typeof){case B:e:{for(var me=_.key;N!==null;){if(N.key===me){if(me=_.type,me===j){if(N.tag===7){a(A,N.sibling),Y=n(N,_.props.children),Y.return=A,A=Y;break e}}else if(N.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===he&&kl(me)===N.type){a(A,N.sibling),Y=n(N,_.props),Kn(Y,_),Y.return=A,A=Y;break e}a(A,N);break}else t(A,N);N=N.sibling}_.type===j?(Y=Rl(_.props.children,A.mode,Y,_.key),Y.return=A,A=Y):(Y=Qi(_.type,_.key,_.props,null,A.mode,Y),Kn(Y,_),Y.return=A,A=Y)}return o(A);case R:e:{for(me=_.key;N!==null;){if(N.key===me)if(N.tag===4&&N.stateNode.containerInfo===_.containerInfo&&N.stateNode.implementation===_.implementation){a(A,N.sibling),Y=n(N,_.children||[]),Y.return=A,A=Y;break e}else{a(A,N);break}else t(A,N);N=N.sibling}Y=_r(_,A.mode,Y),Y.return=A,A=Y}return o(A);case he:return _=kl(_),Ke(A,N,_,Y)}if(Ie(_))return re(A,N,_,Y);if(we(_)){if(me=we(_),typeof me!="function")throw Error(u(150));return _=me.call(_),ge(A,N,_,Y)}if(typeof _.then=="function")return Ke(A,N,Ii(_),Y);if(_.$$typeof===Z)return Ke(A,N,Ki(A,_),Y);Pi(A,_)}return typeof _=="string"&&_!==""||typeof _=="number"||typeof _=="bigint"?(_=""+_,N!==null&&N.tag===6?(a(A,N.sibling),Y=n(N,_),Y.return=A,A=Y):(a(A,N),Y=Tr(_,A.mode,Y),Y.return=A,A=Y),o(A)):a(A,N)}return function(A,N,_,Y){try{$n=0;var me=Ke(A,N,_,Y);return on=null,me}catch(oe){if(oe===un||oe===Wi)throw oe;var qe=Zt(29,oe,null,A.mode);return qe.lanes=Y,qe.return=A,qe}}}var Ll=Xo(!0),Qo=Xo(!1),ll=!1;function Vr(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Yr(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function nl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function il(e,t,a){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ye&2)!==0){var n=l.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),l.pending=t,t=Xi(e),To(e,null,a),t}return Gi(e,l,t,a),Xi(e)}function Jn(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,jl(e,a)}}function Gr(e,t){var a=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,a===l)){var n=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var o={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?n=i=o:i=i.next=o,a=a.next}while(a!==null);i===null?n=i=t:i=i.next=t}else n=i=t;a={baseState:l.baseState,firstBaseUpdate:n,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}var Xr=!1;function Wn(){if(Xr){var e=cn;if(e!==null)throw e}}function Fn(e,t,a,l){Xr=!1;var n=e.updateQueue;ll=!1;var i=n.firstBaseUpdate,o=n.lastBaseUpdate,h=n.shared.pending;if(h!==null){n.shared.pending=null;var v=h,z=v.next;v.next=null,o===null?i=z:o.next=z,o=v;var V=e.alternate;V!==null&&(V=V.updateQueue,h=V.lastBaseUpdate,h!==o&&(h===null?V.firstBaseUpdate=z:h.next=z,V.lastBaseUpdate=v))}if(i!==null){var X=n.baseState;o=0,V=z=v=null,h=i;do{var M=h.lane&-536870913,U=M!==h.lane;if(U?(Oe&M)===M:(l&M)===M){M!==0&&M===rn&&(Xr=!0),V!==null&&(V=V.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{var re=e,ge=h;M=t;var Ke=a;switch(ge.tag){case 1:if(re=ge.payload,typeof re=="function"){X=re.call(Ke,X,M);break e}X=re;break e;case 3:re.flags=re.flags&-65537|128;case 0:if(re=ge.payload,M=typeof re=="function"?re.call(Ke,X,M):re,M==null)break e;X=w({},X,M);break e;case 2:ll=!0}}M=h.callback,M!==null&&(e.flags|=64,U&&(e.flags|=8192),U=n.callbacks,U===null?n.callbacks=[M]:U.push(M))}else U={lane:M,tag:h.tag,payload:h.payload,callback:h.callback,next:null},V===null?(z=V=U,v=X):V=V.next=U,o|=M;if(h=h.next,h===null){if(h=n.shared.pending,h===null)break;U=h,h=U.next,U.next=null,n.lastBaseUpdate=U,n.shared.pending=null}}while(!0);V===null&&(v=X),n.baseState=v,n.firstBaseUpdate=z,n.lastBaseUpdate=V,i===null&&(n.shared.lanes=0),ol|=o,e.lanes=o,e.memoizedState=X}}function Zo(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function $o(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)Zo(a[e],t)}var dn=y(null),es=y(0);function Ko(e,t){e=Qa,$(es,e),$(dn,t),Qa=e|t.baseLanes}function Qr(){$(es,Qa),$(dn,dn.current)}function Zr(){Qa=es.current,q(dn),q(es)}var $t=y(null),ca=null;function sl(e){var t=e.alternate;$(ut,ut.current&1),$($t,e),ca===null&&(t===null||dn.current!==null||t.memoizedState!==null)&&(ca=e)}function $r(e){$(ut,ut.current),$($t,e),ca===null&&(ca=e)}function Jo(e){e.tag===22?($(ut,ut.current),$($t,e),ca===null&&(ca=e)):rl()}function rl(){$(ut,ut.current),$($t,$t.current)}function Kt(e){q($t),ca===e&&(ca=null),q(ut)}var ut=y(0);function ts(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Pc(a)||eu(a)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var La=0,Ce=null,Ze=null,ft=null,as=!1,fn=!1,Hl=!1,ls=0,In=0,hn=null,Vm=0;function st(){throw Error(u(321))}function Kr(e,t){if(t===null)return!1;for(var a=0;a<t.length&&a<e.length;a++)if(!Qt(e[a],t[a]))return!1;return!0}function Jr(e,t,a,l,n,i){return La=i,Ce=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,k.H=e===null||e.memoizedState===null?Md:oc,Hl=!1,i=a(l,n),Hl=!1,fn&&(i=Fo(t,a,l,n)),Wo(e),i}function Wo(e){k.H=ti;var t=Ze!==null&&Ze.next!==null;if(La=0,ft=Ze=Ce=null,as=!1,In=0,hn=null,t)throw Error(u(300));e===null||ht||(e=e.dependencies,e!==null&&$i(e)&&(ht=!0))}function Fo(e,t,a,l){Ce=e;var n=0;do{if(fn&&(hn=null),In=0,fn=!1,25<=n)throw Error(u(301));if(n+=1,ft=Ze=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}k.H=Od,i=t(a,l)}while(fn);return i}function Ym(){var e=k.H,t=e.useState()[0];return t=typeof t.then=="function"?Pn(t):t,e=e.useState()[0],(Ze!==null?Ze.memoizedState:null)!==e&&(Ce.flags|=1024),t}function Wr(){var e=ls!==0;return ls=0,e}function Fr(e,t,a){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~a}function Ir(e){if(as){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}as=!1}La=0,ft=Ze=Ce=null,fn=!1,In=ls=0,hn=null}function Dt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ft===null?Ce.memoizedState=ft=e:ft=ft.next=e,ft}function ot(){if(Ze===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=Ze.next;var t=ft===null?Ce.memoizedState:ft.next;if(t!==null)ft=t,Ze=e;else{if(e===null)throw Ce.alternate===null?Error(u(467)):Error(u(310));Ze=e,e={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},ft===null?Ce.memoizedState=ft=e:ft=ft.next=e}return ft}function ns(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Pn(e){var t=In;return In+=1,hn===null&&(hn=[]),e=Vo(hn,e,t),t=Ce,(ft===null?t.memoizedState:ft.next)===null&&(t=t.alternate,k.H=t===null||t.memoizedState===null?Md:oc),e}function is(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Pn(e);if(e.$$typeof===Z)return Et(e)}throw Error(u(438,String(e)))}function Pr(e){var t=null,a=Ce.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var l=Ce.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=ns(),Ce.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0)for(a=t.data[t.index]=Array(e),l=0;l<e;l++)a[l]=ve;return t.index++,a}function Ha(e,t){return typeof t=="function"?t(e):t}function ss(e){var t=ot();return ec(t,Ze,e)}function ec(e,t,a){var l=e.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=a;var n=e.baseQueue,i=l.pending;if(i!==null){if(n!==null){var o=n.next;n.next=i.next,i.next=o}t.baseQueue=n=i,l.pending=null}if(i=e.baseState,n===null)e.memoizedState=i;else{t=n.next;var h=o=null,v=null,z=t,V=!1;do{var X=z.lane&-536870913;if(X!==z.lane?(Oe&X)===X:(La&X)===X){var M=z.revertLane;if(M===0)v!==null&&(v=v.next={lane:0,revertLane:0,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null}),X===rn&&(V=!0);else if((La&M)===M){z=z.next,M===rn&&(V=!0);continue}else X={lane:0,revertLane:z.revertLane,gesture:null,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},v===null?(h=v=X,o=i):v=v.next=X,Ce.lanes|=M,ol|=M;X=z.action,Hl&&a(i,X),i=z.hasEagerState?z.eagerState:a(i,X)}else M={lane:X,revertLane:z.revertLane,gesture:z.gesture,action:z.action,hasEagerState:z.hasEagerState,eagerState:z.eagerState,next:null},v===null?(h=v=M,o=i):v=v.next=M,Ce.lanes|=X,ol|=X;z=z.next}while(z!==null&&z!==t);if(v===null?o=i:v.next=h,!Qt(i,e.memoizedState)&&(ht=!0,V&&(a=cn,a!==null)))throw a;e.memoizedState=i,e.baseState=o,e.baseQueue=v,l.lastRenderedState=i}return n===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function tc(e){var t=ot(),a=t.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=e;var l=a.dispatch,n=a.pending,i=t.memoizedState;if(n!==null){a.pending=null;var o=n=n.next;do i=e(i,o.action),o=o.next;while(o!==n);Qt(i,t.memoizedState)||(ht=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),a.lastRenderedState=i}return[i,l]}function Io(e,t,a){var l=Ce,n=ot(),i=Le;if(i){if(a===void 0)throw Error(u(407));a=a()}else a=t();var o=!Qt((Ze||n).memoizedState,a);if(o&&(n.memoizedState=a,ht=!0),n=n.queue,nc(td.bind(null,l,n,e),[e]),n.getSnapshot!==t||o||ft!==null&&ft.memoizedState.tag&1){if(l.flags|=2048,pn(9,{destroy:void 0},ed.bind(null,l,n,a,t),null),Je===null)throw Error(u(349));i||(La&127)!==0||Po(l,t,a)}return a}function Po(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=Ce.updateQueue,t===null?(t=ns(),Ce.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function ed(e,t,a,l){t.value=a,t.getSnapshot=l,ad(t)&&ld(e)}function td(e,t,a){return a(function(){ad(t)&&ld(e)})}function ad(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Qt(e,a)}catch{return!0}}function ld(e){var t=_l(e,2);t!==null&&Xt(t,e,2)}function ac(e){var t=Dt();if(typeof e=="function"){var a=e;if(e=a(),Hl){gt(!0);try{a()}finally{gt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ha,lastRenderedState:e},t}function nd(e,t,a,l){return e.baseState=a,ec(e,Ze,typeof l=="function"?l:Ha)}function Gm(e,t,a,l,n){if(us(e))throw Error(u(485));if(e=t.action,e!==null){var i={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};k.T!==null?a(!0):i.isTransition=!1,l(i),a=t.pending,a===null?(i.next=t.pending=i,id(t,i)):(i.next=a.next,t.pending=a.next=i)}}function id(e,t){var a=t.action,l=t.payload,n=e.state;if(t.isTransition){var i=k.T,o={};k.T=o;try{var h=a(n,l),v=k.S;v!==null&&v(o,h),sd(e,t,h)}catch(z){lc(e,t,z)}finally{i!==null&&o.types!==null&&(i.types=o.types),k.T=i}}else try{i=a(n,l),sd(e,t,i)}catch(z){lc(e,t,z)}}function sd(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(l){rd(e,t,l)},function(l){return lc(e,t,l)}):rd(e,t,a)}function rd(e,t,a){t.status="fulfilled",t.value=a,cd(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,id(e,a)))}function lc(e,t,a){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=a,cd(t),t=t.next;while(t!==l)}e.action=null}function cd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function ud(e,t){return t}function od(e,t){if(Le){var a=Je.formState;if(a!==null){e:{var l=Ce;if(Le){if(Pe){t:{for(var n=Pe,i=ra;n.nodeType!==8;){if(!i){n=null;break t}if(n=ua(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){Pe=ua(n.nextSibling),l=n.data==="F!";break e}}tl(l)}l=!1}l&&(t=a[0])}}return a=Dt(),a.memoizedState=a.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ud,lastRenderedState:t},a.queue=l,a=_d.bind(null,Ce,l),l.dispatch=a,l=ac(!1),i=uc.bind(null,Ce,!1,l.queue),l=Dt(),n={state:t,dispatch:null,action:e,pending:null},l.queue=n,a=Gm.bind(null,Ce,n,i,a),n.dispatch=a,l.memoizedState=e,[t,a,!1]}function dd(e){var t=ot();return fd(t,Ze,e)}function fd(e,t,a){if(t=ec(e,t,ud)[0],e=ss(Ha)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Pn(t)}catch(o){throw o===un?Wi:o}else l=t;t=ot();var n=t.queue,i=n.dispatch;return a!==t.memoizedState&&(Ce.flags|=2048,pn(9,{destroy:void 0},Xm.bind(null,n,a),null)),[l,i,e]}function Xm(e,t){e.action=t}function hd(e){var t=ot(),a=Ze;if(a!==null)return fd(t,a,e);ot(),t=t.memoizedState,a=ot();var l=a.queue.dispatch;return a.memoizedState=e,[t,l,!1]}function pn(e,t,a,l){return e={tag:e,create:a,deps:l,inst:t,next:null},t=Ce.updateQueue,t===null&&(t=ns(),Ce.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(l=a.next,a.next=e,e.next=l,t.lastEffect=e),e}function pd(){return ot().memoizedState}function rs(e,t,a,l){var n=Dt();Ce.flags|=e,n.memoizedState=pn(1|t,{destroy:void 0},a,l===void 0?null:l)}function cs(e,t,a,l){var n=ot();l=l===void 0?null:l;var i=n.memoizedState.inst;Ze!==null&&l!==null&&Kr(l,Ze.memoizedState.deps)?n.memoizedState=pn(t,i,a,l):(Ce.flags|=e,n.memoizedState=pn(1|t,i,a,l))}function md(e,t){rs(8390656,8,e,t)}function nc(e,t){cs(2048,8,e,t)}function Qm(e){Ce.flags|=4;var t=Ce.updateQueue;if(t===null)t=ns(),Ce.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function xd(e){var t=ot().memoizedState;return Qm({ref:t,nextImpl:e}),function(){if((Ye&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function gd(e,t){return cs(4,2,e,t)}function yd(e,t){return cs(4,4,e,t)}function vd(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function bd(e,t,a){a=a!=null?a.concat([e]):null,cs(4,4,vd.bind(null,t,e),a)}function ic(){}function wd(e,t){var a=ot();t=t===void 0?null:t;var l=a.memoizedState;return t!==null&&Kr(t,l[1])?l[0]:(a.memoizedState=[e,t],e)}function Sd(e,t){var a=ot();t=t===void 0?null:t;var l=a.memoizedState;if(t!==null&&Kr(t,l[1]))return l[0];if(l=e(),Hl){gt(!0);try{e()}finally{gt(!1)}}return a.memoizedState=[l,t],l}function sc(e,t,a){return a===void 0||(La&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Nf(),Ce.lanes|=e,ol|=e,a)}function jd(e,t,a,l){return Qt(a,t)?a:dn.current!==null?(e=sc(e,a,l),Qt(e,t)||(ht=!0),e):(La&42)===0||(La&1073741824)!==0&&(Oe&261930)===0?(ht=!0,e.memoizedState=a):(e=Nf(),Ce.lanes|=e,ol|=e,t)}function Nd(e,t,a,l,n){var i=H.p;H.p=i!==0&&8>i?i:8;var o=k.T,h={};k.T=h,uc(e,!1,t,a);try{var v=n(),z=k.S;if(z!==null&&z(h,v),v!==null&&typeof v=="object"&&typeof v.then=="function"){var V=qm(v,l);ei(e,t,V,Ft(e))}else ei(e,t,l,Ft(e))}catch(X){ei(e,t,{then:function(){},status:"rejected",reason:X},Ft())}finally{H.p=i,o!==null&&h.types!==null&&(o.types=h.types),k.T=o}}function Zm(){}function rc(e,t,a,l){if(e.tag!==5)throw Error(u(476));var n=Ed(e).queue;Nd(e,n,t,W,a===null?Zm:function(){return Cd(e),a(l)})}function Ed(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:W,baseState:W,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ha,lastRenderedState:W},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ha,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Cd(e){var t=Ed(e);t.next===null&&(t=e.alternate.memoizedState),ei(e,t.next.queue,{},Ft())}function cc(){return Et(gi)}function Ad(){return ot().memoizedState}function Td(){return ot().memoizedState}function $m(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var a=Ft();e=nl(a);var l=il(t,e,a);l!==null&&(Xt(l,t,a),Jn(l,t,a)),t={cache:Lr()},e.payload=t;return}t=t.return}}function Km(e,t,a){var l=Ft();a={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},us(e)?Rd(t,a):(a=Cr(e,t,a,l),a!==null&&(Xt(a,e,l),zd(a,t,l)))}function _d(e,t,a){var l=Ft();ei(e,t,a,l)}function ei(e,t,a,l){var n={lane:l,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(us(e))Rd(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,h=i(o,a);if(n.hasEagerState=!0,n.eagerState=h,Qt(h,o))return Gi(e,t,n,0),Je===null&&Yi(),!1}catch{}if(a=Cr(e,t,n,l),a!==null)return Xt(a,e,l),zd(a,t,l),!0}return!1}function uc(e,t,a,l){if(l={lane:2,revertLane:Vc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},us(e)){if(t)throw Error(u(479))}else t=Cr(e,a,l,2),t!==null&&Xt(t,e,2)}function us(e){var t=e.alternate;return e===Ce||t!==null&&t===Ce}function Rd(e,t){fn=as=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function zd(e,t,a){if((a&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,a|=l,t.lanes=a,jl(e,a)}}var ti={readContext:Et,use:is,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};ti.useEffectEvent=st;var Md={readContext:Et,use:is,useCallback:function(e,t){return Dt().memoizedState=[e,t===void 0?null:t],e},useContext:Et,useEffect:md,useImperativeHandle:function(e,t,a){a=a!=null?a.concat([e]):null,rs(4194308,4,vd.bind(null,t,e),a)},useLayoutEffect:function(e,t){return rs(4194308,4,e,t)},useInsertionEffect:function(e,t){rs(4,2,e,t)},useMemo:function(e,t){var a=Dt();t=t===void 0?null:t;var l=e();if(Hl){gt(!0);try{e()}finally{gt(!1)}}return a.memoizedState=[l,t],l},useReducer:function(e,t,a){var l=Dt();if(a!==void 0){var n=a(t);if(Hl){gt(!0);try{a(t)}finally{gt(!1)}}}else n=t;return l.memoizedState=l.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},l.queue=e,e=e.dispatch=Km.bind(null,Ce,e),[l.memoizedState,e]},useRef:function(e){var t=Dt();return e={current:e},t.memoizedState=e},useState:function(e){e=ac(e);var t=e.queue,a=_d.bind(null,Ce,t);return t.dispatch=a,[e.memoizedState,a]},useDebugValue:ic,useDeferredValue:function(e,t){var a=Dt();return sc(a,e,t)},useTransition:function(){var e=ac(!1);return e=Nd.bind(null,Ce,e.queue,!0,!1),Dt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,a){var l=Ce,n=Dt();if(Le){if(a===void 0)throw Error(u(407));a=a()}else{if(a=t(),Je===null)throw Error(u(349));(Oe&127)!==0||Po(l,t,a)}n.memoizedState=a;var i={value:a,getSnapshot:t};return n.queue=i,md(td.bind(null,l,i,e),[e]),l.flags|=2048,pn(9,{destroy:void 0},ed.bind(null,l,i,a,t),null),a},useId:function(){var e=Dt(),t=Je.identifierPrefix;if(Le){var a=Na,l=ja;a=(l&~(1<<32-it(l)-1)).toString(32)+a,t="_"+t+"R_"+a,a=ls++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Vm++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:cc,useFormState:od,useActionState:od,useOptimistic:function(e){var t=Dt();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=uc.bind(null,Ce,!0,a),a.dispatch=t,[e,t]},useMemoCache:Pr,useCacheRefresh:function(){return Dt().memoizedState=$m.bind(null,Ce)},useEffectEvent:function(e){var t=Dt(),a={impl:e};return t.memoizedState=a,function(){if((Ye&2)!==0)throw Error(u(440));return a.impl.apply(void 0,arguments)}}},oc={readContext:Et,use:is,useCallback:wd,useContext:Et,useEffect:nc,useImperativeHandle:bd,useInsertionEffect:gd,useLayoutEffect:yd,useMemo:Sd,useReducer:ss,useRef:pd,useState:function(){return ss(Ha)},useDebugValue:ic,useDeferredValue:function(e,t){var a=ot();return jd(a,Ze.memoizedState,e,t)},useTransition:function(){var e=ss(Ha)[0],t=ot().memoizedState;return[typeof e=="boolean"?e:Pn(e),t]},useSyncExternalStore:Io,useId:Ad,useHostTransitionStatus:cc,useFormState:dd,useActionState:dd,useOptimistic:function(e,t){var a=ot();return nd(a,Ze,e,t)},useMemoCache:Pr,useCacheRefresh:Td};oc.useEffectEvent=xd;var Od={readContext:Et,use:is,useCallback:wd,useContext:Et,useEffect:nc,useImperativeHandle:bd,useInsertionEffect:gd,useLayoutEffect:yd,useMemo:Sd,useReducer:tc,useRef:pd,useState:function(){return tc(Ha)},useDebugValue:ic,useDeferredValue:function(e,t){var a=ot();return Ze===null?sc(a,e,t):jd(a,Ze.memoizedState,e,t)},useTransition:function(){var e=tc(Ha)[0],t=ot().memoizedState;return[typeof e=="boolean"?e:Pn(e),t]},useSyncExternalStore:Io,useId:Ad,useHostTransitionStatus:cc,useFormState:hd,useActionState:hd,useOptimistic:function(e,t){var a=ot();return Ze!==null?nd(a,Ze,e,t):(a.baseState=e,[e,a.queue.dispatch])},useMemoCache:Pr,useCacheRefresh:Td};Od.useEffectEvent=xd;function dc(e,t,a,l){t=e.memoizedState,a=a(l,t),a=a==null?t:w({},t,a),e.memoizedState=a,e.lanes===0&&(e.updateQueue.baseState=a)}var fc={enqueueSetState:function(e,t,a){e=e._reactInternals;var l=Ft(),n=nl(l);n.payload=t,a!=null&&(n.callback=a),t=il(e,n,l),t!==null&&(Xt(t,e,l),Jn(t,e,l))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var l=Ft(),n=nl(l);n.tag=1,n.payload=t,a!=null&&(n.callback=a),t=il(e,n,l),t!==null&&(Xt(t,e,l),Jn(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=Ft(),l=nl(a);l.tag=2,t!=null&&(l.callback=t),t=il(e,l,a),t!==null&&(Xt(t,e,a),Jn(t,e,a))}};function Dd(e,t,a,l,n,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,o):t.prototype&&t.prototype.isPureReactComponent?!Vn(a,l)||!Vn(n,i):!0}function kd(e,t,a,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,l),t.state!==e&&fc.enqueueReplaceState(t,t.state,null)}function Bl(e,t){var a=t;if("ref"in t){a={};for(var l in t)l!=="ref"&&(a[l]=t[l])}if(e=e.defaultProps){a===t&&(a=w({},a));for(var n in e)a[n]===void 0&&(a[n]=e[n])}return a}function Ud(e){Vi(e)}function Ld(e){console.error(e)}function Hd(e){Vi(e)}function os(e,t){try{var a=e.onUncaughtError;a(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function Bd(e,t,a){try{var l=e.onCaughtError;l(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function hc(e,t,a){return a=nl(a),a.tag=3,a.payload={element:null},a.callback=function(){os(e,t)},a}function qd(e){return e=nl(e),e.tag=3,e}function Vd(e,t,a,l){var n=a.type.getDerivedStateFromError;if(typeof n=="function"){var i=l.value;e.payload=function(){return n(i)},e.callback=function(){Bd(t,a,l)}}var o=a.stateNode;o!==null&&typeof o.componentDidCatch=="function"&&(e.callback=function(){Bd(t,a,l),typeof n!="function"&&(dl===null?dl=new Set([this]):dl.add(this));var h=l.stack;this.componentDidCatch(l.value,{componentStack:h!==null?h:""})})}function Jm(e,t,a,l,n){if(a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=a.alternate,t!==null&&sn(t,a,n,!0),a=$t.current,a!==null){switch(a.tag){case 31:case 13:return ca===null?Ss():a.alternate===null&&rt===0&&(rt=3),a.flags&=-257,a.flags|=65536,a.lanes=n,l===Fi?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([l]):t.add(l),Hc(e,l,n)),!1;case 22:return a.flags|=65536,l===Fi?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([l]):a.add(l)),Hc(e,l,n)),!1}throw Error(u(435,a.tag))}return Hc(e,l,n),Ss(),!1}if(Le)return t=$t.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,l!==Mr&&(e=Error(u(422),{cause:l}),Xn(na(e,a)))):(l!==Mr&&(t=Error(u(423),{cause:l}),Xn(na(t,a))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,l=na(l,a),n=hc(e.stateNode,l,n),Gr(e,n),rt!==4&&(rt=2)),!1;var i=Error(u(520),{cause:l});if(i=na(i,a),ui===null?ui=[i]:ui.push(i),rt!==4&&(rt=2),t===null)return!0;l=na(l,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=n&-n,a.lanes|=e,e=hc(a.stateNode,l,e),Gr(a,e),!1;case 1:if(t=a.type,i=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(dl===null||!dl.has(i))))return a.flags|=65536,n&=-n,a.lanes|=n,n=qd(n),Vd(n,e,a,l),Gr(a,n),!1}a=a.return}while(a!==null);return!1}var pc=Error(u(461)),ht=!1;function Ct(e,t,a,l){t.child=e===null?Qo(t,null,a,l):Ll(t,e.child,a,l)}function Yd(e,t,a,l,n){a=a.render;var i=t.ref;if("ref"in l){var o={};for(var h in l)h!=="ref"&&(o[h]=l[h])}else o=l;return Ol(t),l=Jr(e,t,a,o,i,n),h=Wr(),e!==null&&!ht?(Fr(e,t,n),Ba(e,t,n)):(Le&&h&&Rr(t),t.flags|=1,Ct(e,t,l,n),t.child)}function Gd(e,t,a,l,n){if(e===null){var i=a.type;return typeof i=="function"&&!Ar(i)&&i.defaultProps===void 0&&a.compare===null?(t.tag=15,t.type=i,Xd(e,t,i,l,n)):(e=Qi(a.type,null,l,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Sc(e,n)){var o=i.memoizedProps;if(a=a.compare,a=a!==null?a:Vn,a(o,l)&&e.ref===t.ref)return Ba(e,t,n)}return t.flags|=1,e=Oa(i,l),e.ref=t.ref,e.return=t,t.child=e}function Xd(e,t,a,l,n){if(e!==null){var i=e.memoizedProps;if(Vn(i,l)&&e.ref===t.ref)if(ht=!1,t.pendingProps=l=i,Sc(e,n))(e.flags&131072)!==0&&(ht=!0);else return t.lanes=e.lanes,Ba(e,t,n)}return mc(e,t,a,l,n)}function Qd(e,t,a,l){var n=l.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|a:a,e!==null){for(l=t.child=e.child,n=0;l!==null;)n=n|l.lanes|l.childLanes,l=l.sibling;l=n&~i}else l=0,t.child=null;return Zd(e,t,i,a,l)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ji(t,i!==null?i.cachePool:null),i!==null?Ko(t,i):Qr(),Jo(t);else return l=t.lanes=536870912,Zd(e,t,i!==null?i.baseLanes|a:a,a,l)}else i!==null?(Ji(t,i.cachePool),Ko(t,i),rl(),t.memoizedState=null):(e!==null&&Ji(t,null),Qr(),rl());return Ct(e,t,n,a),t.child}function ai(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Zd(e,t,a,l,n){var i=Br();return i=i===null?null:{parent:dt._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&Ji(t,null),Qr(),Jo(t),e!==null&&sn(e,t,l,!0),t.childLanes=n,null}function ds(e,t){return t=hs({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function $d(e,t,a){return Ll(t,e.child,null,a),e=ds(t,t.pendingProps),e.flags|=2,Kt(t),t.memoizedState=null,e}function Wm(e,t,a){var l=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Le){if(l.mode==="hidden")return e=ds(t,l),t.lanes=536870912,ai(null,e);if($r(t),(e=Pe)?(e=sh(e,ra),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Pa!==null?{id:ja,overflow:Na}:null,retryLane:536870912,hydrationErrors:null},a=Ro(e),a.return=t,t.child=a,Nt=t,Pe=null)):e=null,e===null)throw tl(t);return t.lanes=536870912,null}return ds(t,l)}var i=e.memoizedState;if(i!==null){var o=i.dehydrated;if($r(t),n)if(t.flags&256)t.flags&=-257,t=$d(e,t,a);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(ht||sn(e,t,a,!1),n=(a&e.childLanes)!==0,ht||n){if(l=Je,l!==null&&(o=Yl(l,a),o!==0&&o!==i.retryLane))throw i.retryLane=o,_l(e,o),Xt(l,e,o),pc;Ss(),t=$d(e,t,a)}else e=i.treeContext,Pe=ua(o.nextSibling),Nt=t,Le=!0,el=null,ra=!1,e!==null&&Oo(t,e),t=ds(t,l),t.flags|=4096;return t}return e=Oa(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function fs(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(u(284));(e===null||e.ref!==a)&&(t.flags|=4194816)}}function mc(e,t,a,l,n){return Ol(t),a=Jr(e,t,a,l,void 0,n),l=Wr(),e!==null&&!ht?(Fr(e,t,n),Ba(e,t,n)):(Le&&l&&Rr(t),t.flags|=1,Ct(e,t,a,n),t.child)}function Kd(e,t,a,l,n,i){return Ol(t),t.updateQueue=null,a=Fo(t,l,a,n),Wo(e),l=Wr(),e!==null&&!ht?(Fr(e,t,i),Ba(e,t,i)):(Le&&l&&Rr(t),t.flags|=1,Ct(e,t,a,i),t.child)}function Jd(e,t,a,l,n){if(Ol(t),t.stateNode===null){var i=tn,o=a.contextType;typeof o=="object"&&o!==null&&(i=Et(o)),i=new a(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=fc,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},Vr(t),o=a.contextType,i.context=typeof o=="object"&&o!==null?Et(o):tn,i.state=t.memoizedState,o=a.getDerivedStateFromProps,typeof o=="function"&&(dc(t,a,o,l),i.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(o=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),o!==i.state&&fc.enqueueReplaceState(i,i.state,null),Fn(t,l,i,n),Wn(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var h=t.memoizedProps,v=Bl(a,h);i.props=v;var z=i.context,V=a.contextType;o=tn,typeof V=="object"&&V!==null&&(o=Et(V));var X=a.getDerivedStateFromProps;V=typeof X=="function"||typeof i.getSnapshotBeforeUpdate=="function",h=t.pendingProps!==h,V||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(h||z!==o)&&kd(t,i,l,o),ll=!1;var M=t.memoizedState;i.state=M,Fn(t,l,i,n),Wn(),z=t.memoizedState,h||M!==z||ll?(typeof X=="function"&&(dc(t,a,X,l),z=t.memoizedState),(v=ll||Dd(t,a,v,l,M,z,o))?(V||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=z),i.props=l,i.state=z,i.context=o,l=v):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,Yr(e,t),o=t.memoizedProps,V=Bl(a,o),i.props=V,X=t.pendingProps,M=i.context,z=a.contextType,v=tn,typeof z=="object"&&z!==null&&(v=Et(z)),h=a.getDerivedStateFromProps,(z=typeof h=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(o!==X||M!==v)&&kd(t,i,l,v),ll=!1,M=t.memoizedState,i.state=M,Fn(t,l,i,n),Wn();var U=t.memoizedState;o!==X||M!==U||ll||e!==null&&e.dependencies!==null&&$i(e.dependencies)?(typeof h=="function"&&(dc(t,a,h,l),U=t.memoizedState),(V=ll||Dd(t,a,V,l,M,U,v)||e!==null&&e.dependencies!==null&&$i(e.dependencies))?(z||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,U,v),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,U,v)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=U),i.props=l,i.state=U,i.context=v,l=V):(typeof i.componentDidUpdate!="function"||o===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||o===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,fs(e,t),l=(t.flags&128)!==0,i||l?(i=t.stateNode,a=l&&typeof a.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&l?(t.child=Ll(t,e.child,null,n),t.child=Ll(t,null,a,n)):Ct(e,t,a,n),t.memoizedState=i.state,e=t.child):e=Ba(e,t,n),e}function Wd(e,t,a,l){return zl(),t.flags|=256,Ct(e,t,a,l),t.child}var xc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gc(e){return{baseLanes:e,cachePool:Bo()}}function yc(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=Wt),e}function Fd(e,t,a){var l=t.pendingProps,n=!1,i=(t.flags&128)!==0,o;if((o=i)||(o=e!==null&&e.memoizedState===null?!1:(ut.current&2)!==0),o&&(n=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(Le){if(n?sl(t):rl(),(e=Pe)?(e=sh(e,ra),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Pa!==null?{id:ja,overflow:Na}:null,retryLane:536870912,hydrationErrors:null},a=Ro(e),a.return=t,t.child=a,Nt=t,Pe=null)):e=null,e===null)throw tl(t);return eu(e)?t.lanes=32:t.lanes=536870912,null}var h=l.children;return l=l.fallback,n?(rl(),n=t.mode,h=hs({mode:"hidden",children:h},n),l=Rl(l,n,a,null),h.return=t,l.return=t,h.sibling=l,t.child=h,l=t.child,l.memoizedState=gc(a),l.childLanes=yc(e,o,a),t.memoizedState=xc,ai(null,l)):(sl(t),vc(t,h))}var v=e.memoizedState;if(v!==null&&(h=v.dehydrated,h!==null)){if(i)t.flags&256?(sl(t),t.flags&=-257,t=bc(e,t,a)):t.memoizedState!==null?(rl(),t.child=e.child,t.flags|=128,t=null):(rl(),h=l.fallback,n=t.mode,l=hs({mode:"visible",children:l.children},n),h=Rl(h,n,a,null),h.flags|=2,l.return=t,h.return=t,l.sibling=h,t.child=l,Ll(t,e.child,null,a),l=t.child,l.memoizedState=gc(a),l.childLanes=yc(e,o,a),t.memoizedState=xc,t=ai(null,l));else if(sl(t),eu(h)){if(o=h.nextSibling&&h.nextSibling.dataset,o)var z=o.dgst;o=z,l=Error(u(419)),l.stack="",l.digest=o,Xn({value:l,source:null,stack:null}),t=bc(e,t,a)}else if(ht||sn(e,t,a,!1),o=(a&e.childLanes)!==0,ht||o){if(o=Je,o!==null&&(l=Yl(o,a),l!==0&&l!==v.retryLane))throw v.retryLane=l,_l(e,l),Xt(o,e,l),pc;Pc(h)||Ss(),t=bc(e,t,a)}else Pc(h)?(t.flags|=192,t.child=e.child,t=null):(e=v.treeContext,Pe=ua(h.nextSibling),Nt=t,Le=!0,el=null,ra=!1,e!==null&&Oo(t,e),t=vc(t,l.children),t.flags|=4096);return t}return n?(rl(),h=l.fallback,n=t.mode,v=e.child,z=v.sibling,l=Oa(v,{mode:"hidden",children:l.children}),l.subtreeFlags=v.subtreeFlags&65011712,z!==null?h=Oa(z,h):(h=Rl(h,n,a,null),h.flags|=2),h.return=t,l.return=t,l.sibling=h,t.child=l,ai(null,l),l=t.child,h=e.child.memoizedState,h===null?h=gc(a):(n=h.cachePool,n!==null?(v=dt._currentValue,n=n.parent!==v?{parent:v,pool:v}:n):n=Bo(),h={baseLanes:h.baseLanes|a,cachePool:n}),l.memoizedState=h,l.childLanes=yc(e,o,a),t.memoizedState=xc,ai(e.child,l)):(sl(t),a=e.child,e=a.sibling,a=Oa(a,{mode:"visible",children:l.children}),a.return=t,a.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=a,t.memoizedState=null,a)}function vc(e,t){return t=hs({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function hs(e,t){return e=Zt(22,e,null,t),e.lanes=0,e}function bc(e,t,a){return Ll(t,e.child,null,a),e=vc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Id(e,t,a){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),kr(e.return,t,a)}function wc(e,t,a,l,n,i){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:a,tailMode:n,treeForkCount:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=l,o.tail=a,o.tailMode=n,o.treeForkCount=i)}function Pd(e,t,a){var l=t.pendingProps,n=l.revealOrder,i=l.tail;l=l.children;var o=ut.current,h=(o&2)!==0;if(h?(o=o&1|2,t.flags|=128):o&=1,$(ut,o),Ct(e,t,l,a),l=Le?Gn:0,!h&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Id(e,a,t);else if(e.tag===19)Id(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(n){case"forwards":for(a=t.child,n=null;a!==null;)e=a.alternate,e!==null&&ts(e)===null&&(n=a),a=a.sibling;a=n,a===null?(n=t.child,t.child=null):(n=a.sibling,a.sibling=null),wc(t,!1,n,a,i,l);break;case"backwards":case"unstable_legacy-backwards":for(a=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&ts(e)===null){t.child=n;break}e=n.sibling,n.sibling=a,a=n,n=e}wc(t,!0,a,null,i,l);break;case"together":wc(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function Ba(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),ol|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(sn(e,t,a,!1),(a&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,a=Oa(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Oa(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function Sc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&$i(e)))}function Fm(e,t,a){switch(t.tag){case 3:Qe(t,t.stateNode.containerInfo),al(t,dt,e.memoizedState.cache),zl();break;case 27:case 5:Tt(t);break;case 4:Qe(t,t.stateNode.containerInfo);break;case 10:al(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,$r(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(sl(t),t.flags|=128,null):(a&t.child.childLanes)!==0?Fd(e,t,a):(sl(t),e=Ba(e,t,a),e!==null?e.sibling:null);sl(t);break;case 19:var n=(e.flags&128)!==0;if(l=(a&t.childLanes)!==0,l||(sn(e,t,a,!1),l=(a&t.childLanes)!==0),n){if(l)return Pd(e,t,a);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),$(ut,ut.current),l)break;return null;case 22:return t.lanes=0,Qd(e,t,a,t.pendingProps);case 24:al(t,dt,e.memoizedState.cache)}return Ba(e,t,a)}function ef(e,t,a){if(e!==null)if(e.memoizedProps!==t.pendingProps)ht=!0;else{if(!Sc(e,a)&&(t.flags&128)===0)return ht=!1,Fm(e,t,a);ht=(e.flags&131072)!==0}else ht=!1,Le&&(t.flags&1048576)!==0&&Mo(t,Gn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=kl(t.elementType),t.type=e,typeof e=="function")Ar(e)?(l=Bl(e,l),t.tag=1,t=Jd(null,t,e,l,a)):(t.tag=0,t=mc(null,t,e,l,a));else{if(e!=null){var n=e.$$typeof;if(n===ne){t.tag=11,t=Yd(null,t,e,l,a);break e}else if(n===P){t.tag=14,t=Gd(null,t,e,l,a);break e}}throw t=be(e)||e,Error(u(306,t,""))}}return t;case 0:return mc(e,t,t.type,t.pendingProps,a);case 1:return l=t.type,n=Bl(l,t.pendingProps),Jd(e,t,l,n,a);case 3:e:{if(Qe(t,t.stateNode.containerInfo),e===null)throw Error(u(387));l=t.pendingProps;var i=t.memoizedState;n=i.element,Yr(e,t),Fn(t,l,null,a);var o=t.memoizedState;if(l=o.cache,al(t,dt,l),l!==i.cache&&Ur(t,[dt],a,!0),Wn(),l=o.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Wd(e,t,l,a);break e}else if(l!==n){n=na(Error(u(424)),t),Xn(n),t=Wd(e,t,l,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Pe=ua(e.firstChild),Nt=t,Le=!0,el=null,ra=!0,a=Qo(t,null,l,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(zl(),l===n){t=Ba(e,t,a);break e}Ct(e,t,l,a)}t=t.child}return t;case 26:return fs(e,t),e===null?(a=fh(t.type,null,t.pendingProps,null))?t.memoizedState=a:Le||(a=t.type,e=t.pendingProps,l=_s(pe.current).createElement(a),l[ct]=t,l[Se]=e,At(l,a,e),wt(l),t.stateNode=l):t.memoizedState=fh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Tt(t),e===null&&Le&&(l=t.stateNode=uh(t.type,t.pendingProps,pe.current),Nt=t,ra=!0,n=Pe,ml(t.type)?(tu=n,Pe=ua(l.firstChild)):Pe=n),Ct(e,t,t.pendingProps.children,a),fs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Le&&((n=l=Pe)&&(l=A0(l,t.type,t.pendingProps,ra),l!==null?(t.stateNode=l,Nt=t,Pe=ua(l.firstChild),ra=!1,n=!0):n=!1),n||tl(t)),Tt(t),n=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,l=i.children,Wc(n,i)?l=null:o!==null&&Wc(n,o)&&(t.flags|=32),t.memoizedState!==null&&(n=Jr(e,t,Ym,null,null,a),gi._currentValue=n),fs(e,t),Ct(e,t,l,a),t.child;case 6:return e===null&&Le&&((e=a=Pe)&&(a=T0(a,t.pendingProps,ra),a!==null?(t.stateNode=a,Nt=t,Pe=null,e=!0):e=!1),e||tl(t)),null;case 13:return Fd(e,t,a);case 4:return Qe(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Ll(t,null,l,a):Ct(e,t,l,a),t.child;case 11:return Yd(e,t,t.type,t.pendingProps,a);case 7:return Ct(e,t,t.pendingProps,a),t.child;case 8:return Ct(e,t,t.pendingProps.children,a),t.child;case 12:return Ct(e,t,t.pendingProps.children,a),t.child;case 10:return l=t.pendingProps,al(t,t.type,l.value),Ct(e,t,l.children,a),t.child;case 9:return n=t.type._context,l=t.pendingProps.children,Ol(t),n=Et(n),l=l(n),t.flags|=1,Ct(e,t,l,a),t.child;case 14:return Gd(e,t,t.type,t.pendingProps,a);case 15:return Xd(e,t,t.type,t.pendingProps,a);case 19:return Pd(e,t,a);case 31:return Wm(e,t,a);case 22:return Qd(e,t,a,t.pendingProps);case 24:return Ol(t),l=Et(dt),e===null?(n=Br(),n===null&&(n=Je,i=Lr(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=a),n=i),t.memoizedState={parent:l,cache:n},Vr(t),al(t,dt,n)):((e.lanes&a)!==0&&(Yr(e,t),Fn(t,null,null,a),Wn()),n=e.memoizedState,i=t.memoizedState,n.parent!==l?(n={parent:l,cache:l},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),al(t,dt,l)):(l=i.cache,al(t,dt,l),l!==n.cache&&Ur(t,[dt],a,!0))),Ct(e,t,t.pendingProps.children,a),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function qa(e){e.flags|=4}function jc(e,t,a,l,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(Tf())e.flags|=8192;else throw Ul=Fi,qr}else e.flags&=-16777217}function tf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!gh(t))if(Tf())e.flags|=8192;else throw Ul=Fi,qr}function ps(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?_e():536870912,e.lanes|=t,yn|=t)}function li(e,t){if(!Le)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function et(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,l=0;if(t)for(var n=e.child;n!==null;)a|=n.lanes|n.childLanes,l|=n.subtreeFlags&65011712,l|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)a|=n.lanes|n.childLanes,l|=n.subtreeFlags,l|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=l,e.childLanes=a,t}function Im(e,t,a){var l=t.pendingProps;switch(zr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(t),null;case 1:return et(t),null;case 3:return a=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Ua(dt),ke(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(nn(t)?qa(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Or())),et(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(qa(t),i!==null?(et(t),tf(t,i)):(et(t),jc(t,n,null,l,a))):i?i!==e.memoizedState?(qa(t),et(t),tf(t,i)):(et(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&qa(t),et(t),jc(t,n,e,l,a)),null;case 27:if(fa(t),a=pe.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&qa(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return et(t),null}e=Q.current,nn(t)?Do(t):(e=uh(n,l,a),t.stateNode=e,qa(t))}return et(t),null;case 5:if(fa(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&qa(t);else{if(!l){if(t.stateNode===null)throw Error(u(166));return et(t),null}if(i=Q.current,nn(t))Do(t);else{var o=_s(pe.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=o.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?o.createElement("select",{is:l.is}):o.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?o.createElement(n,{is:l.is}):o.createElement(n)}}i[ct]=t,i[Se]=l;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)i.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break e;for(;o.sibling===null;){if(o.return===null||o.return===t)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=i;e:switch(At(i,n,l),n){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&qa(t)}}return et(t),jc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&qa(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(u(166));if(e=pe.current,nn(t)){if(e=t.stateNode,a=t.memoizedProps,l=null,n=Nt,n!==null)switch(n.tag){case 27:case 5:l=n.memoizedProps}e[ct]=t,e=!!(e.nodeValue===a||l!==null&&l.suppressHydrationWarning===!0||If(e.nodeValue,a)),e||tl(t,!0)}else e=_s(e).createTextNode(l),e[ct]=t,t.stateNode=e}return et(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(l=nn(t),a!==null){if(e===null){if(!l)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[ct]=t}else zl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;et(t),e=!1}else a=Or(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(Kt(t),t):(Kt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return et(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=nn(t),l!==null&&l.dehydrated!==null){if(e===null){if(!n)throw Error(u(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(u(317));n[ct]=t}else zl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;et(t),n=!1}else n=Or(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(Kt(t),t):(Kt(t),null)}return Kt(t),(t.flags&128)!==0?(t.lanes=a,t):(a=l!==null,e=e!==null&&e.memoizedState!==null,a&&(l=t.child,n=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(n=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==n&&(l.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ps(t,t.updateQueue),et(t),null);case 4:return ke(),e===null&&Qc(t.stateNode.containerInfo),et(t),null;case 10:return Ua(t.type),et(t),null;case 19:if(q(ut),l=t.memoizedState,l===null)return et(t),null;if(n=(t.flags&128)!==0,i=l.rendering,i===null)if(n)li(l,!1);else{if(rt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=ts(e),i!==null){for(t.flags|=128,li(l,!1),e=i.updateQueue,t.updateQueue=e,ps(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)_o(a,e),a=a.sibling;return $(ut,ut.current&1|2),Le&&Da(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&&xt()>vs&&(t.flags|=128,n=!0,li(l,!1),t.lanes=4194304)}else{if(!n)if(e=ts(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,ps(t,e),li(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!Le)return et(t),null}else 2*xt()-l.renderingStartTime>vs&&a!==536870912&&(t.flags|=128,n=!0,li(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=xt(),e.sibling=null,a=ut.current,$(ut,n?a&1|2:a&1),Le&&Da(t,l.treeForkCount),e):(et(t),null);case 22:case 23:return Kt(t),Zr(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(a&536870912)!==0&&(t.flags&128)===0&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),a=t.updateQueue,a!==null&&ps(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==a&&(t.flags|=2048),e!==null&&q(Dl),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Ua(dt),et(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Pm(e,t){switch(zr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Ua(dt),ke(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fa(t),null;case 31:if(t.memoizedState!==null){if(Kt(t),t.alternate===null)throw Error(u(340));zl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Kt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));zl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return q(ut),null;case 4:return ke(),null;case 10:return Ua(t.type),null;case 22:case 23:return Kt(t),Zr(),e!==null&&q(Dl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Ua(dt),null;case 25:return null;default:return null}}function af(e,t){switch(zr(t),t.tag){case 3:Ua(dt),ke();break;case 26:case 27:case 5:fa(t);break;case 4:ke();break;case 31:t.memoizedState!==null&&Kt(t);break;case 13:Kt(t);break;case 19:q(ut);break;case 10:Ua(t.type);break;case 22:case 23:Kt(t),Zr(),e!==null&&q(Dl);break;case 24:Ua(dt)}}function ni(e,t){try{var a=t.updateQueue,l=a!==null?a.lastEffect:null;if(l!==null){var n=l.next;a=n;do{if((a.tag&e)===e){l=void 0;var i=a.create,o=a.inst;l=i(),o.destroy=l}a=a.next}while(a!==n)}}catch(h){Xe(t,t.return,h)}}function cl(e,t,a){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var i=n.next;l=i;do{if((l.tag&e)===e){var o=l.inst,h=o.destroy;if(h!==void 0){o.destroy=void 0,n=t;var v=a,z=h;try{z()}catch(V){Xe(n,v,V)}}}l=l.next}while(l!==i)}}catch(V){Xe(t,t.return,V)}}function lf(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;try{$o(t,a)}catch(l){Xe(e,e.return,l)}}}function nf(e,t,a){a.props=Bl(e.type,e.memoizedProps),a.state=e.memoizedState;try{a.componentWillUnmount()}catch(l){Xe(e,t,l)}}function ii(e,t){try{var a=e.ref;if(a!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof a=="function"?e.refCleanup=a(l):a.current=l}}catch(n){Xe(e,t,n)}}function Ea(e,t){var a=e.ref,l=e.refCleanup;if(a!==null)if(typeof l=="function")try{l()}catch(n){Xe(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(n){Xe(e,t,n)}else a.current=null}function sf(e){var t=e.type,a=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&l.focus();break e;case"img":a.src?l.src=a.src:a.srcSet&&(l.srcset=a.srcSet)}}catch(n){Xe(e,e.return,n)}}function Nc(e,t,a){try{var l=e.stateNode;w0(l,e.type,a,t),l[Se]=t}catch(n){Xe(e,e.return,n)}}function rf(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ml(e.type)||e.tag===4}function Ec(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||rf(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ml(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 Cc(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t):(t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=za));else if(l!==4&&(l===27&&ml(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Cc(e,t,a),e=e.sibling;e!==null;)Cc(e,t,a),e=e.sibling}function ms(e,t,a){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(l!==4&&(l===27&&ml(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(ms(e,t,a),e=e.sibling;e!==null;)ms(e,t,a),e=e.sibling}function cf(e){var t=e.stateNode,a=e.memoizedProps;try{for(var l=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);At(t,l,a),t[ct]=e,t[Se]=a}catch(i){Xe(e,e.return,i)}}var Va=!1,pt=!1,Ac=!1,uf=typeof WeakSet=="function"?WeakSet:Set,St=null;function e0(e,t){if(e=e.containerInfo,Kc=Us,e=bo(e),br(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var l=a.getSelection&&a.getSelection();if(l&&l.rangeCount!==0){a=l.anchorNode;var n=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var o=0,h=-1,v=-1,z=0,V=0,X=e,M=null;t:for(;;){for(var U;X!==a||n!==0&&X.nodeType!==3||(h=o+n),X!==i||l!==0&&X.nodeType!==3||(v=o+l),X.nodeType===3&&(o+=X.nodeValue.length),(U=X.firstChild)!==null;)M=X,X=U;for(;;){if(X===e)break t;if(M===a&&++z===n&&(h=o),M===i&&++V===l&&(v=o),(U=X.nextSibling)!==null)break;X=M,M=X.parentNode}X=U}a=h===-1||v===-1?null:{start:h,end:v}}else a=null}a=a||{start:0,end:0}}else a=null;for(Jc={focusedElem:e,selectionRange:a},Us=!1,St=t;St!==null;)if(t=St,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,St=e;else for(;St!==null;){switch(t=St,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)n=e[a],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,a=t,n=i.memoizedProps,i=i.memoizedState,l=a.stateNode;try{var re=Bl(a.type,n);e=l.getSnapshotBeforeUpdate(re,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(ge){Xe(a,a.return,ge)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,a=e.nodeType,a===9)Ic(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Ic(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,St=e;break}St=t.return}}function of(e,t,a){var l=a.flags;switch(a.tag){case 0:case 11:case 15:Ga(e,a),l&4&&ni(5,a);break;case 1:if(Ga(e,a),l&4)if(e=a.stateNode,t===null)try{e.componentDidMount()}catch(o){Xe(a,a.return,o)}else{var n=Bl(a.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Xe(a,a.return,o)}}l&64&&lf(a),l&512&&ii(a,a.return);break;case 3:if(Ga(e,a),l&64&&(e=a.updateQueue,e!==null)){if(t=null,a.child!==null)switch(a.child.tag){case 27:case 5:t=a.child.stateNode;break;case 1:t=a.child.stateNode}try{$o(e,t)}catch(o){Xe(a,a.return,o)}}break;case 27:t===null&&l&4&&cf(a);case 26:case 5:Ga(e,a),t===null&&l&4&&sf(a),l&512&&ii(a,a.return);break;case 12:Ga(e,a);break;case 31:Ga(e,a),l&4&&hf(e,a);break;case 13:Ga(e,a),l&4&&pf(e,a),l&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(a=u0.bind(null,a),_0(e,a))));break;case 22:if(l=a.memoizedState!==null||Va,!l){t=t!==null&&t.memoizedState!==null||pt,n=Va;var i=pt;Va=l,(pt=t)&&!i?Xa(e,a,(a.subtreeFlags&8772)!==0):Ga(e,a),Va=n,pt=i}break;case 30:break;default:Ga(e,a)}}function df(e){var t=e.alternate;t!==null&&(e.alternate=null,df(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&lr(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var lt=null,qt=!1;function Ya(e,t,a){for(a=a.child;a!==null;)ff(e,t,a),a=a.sibling}function ff(e,t,a){if(Ue&&typeof Ue.onCommitFiberUnmount=="function")try{Ue.onCommitFiberUnmount(at,a)}catch{}switch(a.tag){case 26:pt||Ea(a,t),Ya(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:pt||Ea(a,t);var l=lt,n=qt;ml(a.type)&&(lt=a.stateNode,qt=!1),Ya(e,t,a),pi(a.stateNode),lt=l,qt=n;break;case 5:pt||Ea(a,t);case 6:if(l=lt,n=qt,lt=null,Ya(e,t,a),lt=l,qt=n,lt!==null)if(qt)try{(lt.nodeType===9?lt.body:lt.nodeName==="HTML"?lt.ownerDocument.body:lt).removeChild(a.stateNode)}catch(i){Xe(a,t,i)}else try{lt.removeChild(a.stateNode)}catch(i){Xe(a,t,i)}break;case 18:lt!==null&&(qt?(e=lt,nh(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Cn(e)):nh(lt,a.stateNode));break;case 4:l=lt,n=qt,lt=a.stateNode.containerInfo,qt=!0,Ya(e,t,a),lt=l,qt=n;break;case 0:case 11:case 14:case 15:cl(2,a,t),pt||cl(4,a,t),Ya(e,t,a);break;case 1:pt||(Ea(a,t),l=a.stateNode,typeof l.componentWillUnmount=="function"&&nf(a,t,l)),Ya(e,t,a);break;case 21:Ya(e,t,a);break;case 22:pt=(l=pt)||a.memoizedState!==null,Ya(e,t,a),pt=l;break;default:Ya(e,t,a)}}function hf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Cn(e)}catch(a){Xe(t,t.return,a)}}}function pf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Cn(e)}catch(a){Xe(t,t.return,a)}}function t0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new uf),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new uf),t;default:throw Error(u(435,e.tag))}}function xs(e,t){var a=t0(e);t.forEach(function(l){if(!a.has(l)){a.add(l);var n=o0.bind(null,e,l);l.then(n,n)}})}function Vt(e,t){var a=t.deletions;if(a!==null)for(var l=0;l<a.length;l++){var n=a[l],i=e,o=t,h=o;e:for(;h!==null;){switch(h.tag){case 27:if(ml(h.type)){lt=h.stateNode,qt=!1;break e}break;case 5:lt=h.stateNode,qt=!1;break e;case 3:case 4:lt=h.stateNode.containerInfo,qt=!0;break e}h=h.return}if(lt===null)throw Error(u(160));ff(i,o,n),lt=null,qt=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)mf(t,e),t=t.sibling}var ma=null;function mf(e,t){var a=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Vt(t,e),Yt(e),l&4&&(cl(3,e,e.return),ni(3,e),cl(5,e,e.return));break;case 1:Vt(t,e),Yt(e),l&512&&(pt||a===null||Ea(a,a.return)),l&64&&Va&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(a=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=a===null?l:a.concat(l))));break;case 26:var n=ma;if(Vt(t,e),Yt(e),l&512&&(pt||a===null||Ea(a,a.return)),l&4){var i=a!==null?a.memoizedState:null;if(l=e.memoizedState,a===null)if(l===null)if(e.stateNode===null){e:{l=e.type,a=e.memoizedProps,n=n.ownerDocument||n;t:switch(l){case"title":i=n.getElementsByTagName("title")[0],(!i||i[Mn]||i[ct]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=n.createElement(l),n.head.insertBefore(i,n.querySelector("head > title"))),At(i,l,a),i[ct]=e,wt(i),l=i;break e;case"link":var o=mh("link","href",n).get(l+(a.href||""));if(o){for(var h=0;h<o.length;h++)if(i=o[h],i.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&i.getAttribute("rel")===(a.rel==null?null:a.rel)&&i.getAttribute("title")===(a.title==null?null:a.title)&&i.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){o.splice(h,1);break t}}i=n.createElement(l),At(i,l,a),n.head.appendChild(i);break;case"meta":if(o=mh("meta","content",n).get(l+(a.content||""))){for(h=0;h<o.length;h++)if(i=o[h],i.getAttribute("content")===(a.content==null?null:""+a.content)&&i.getAttribute("name")===(a.name==null?null:a.name)&&i.getAttribute("property")===(a.property==null?null:a.property)&&i.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&i.getAttribute("charset")===(a.charSet==null?null:a.charSet)){o.splice(h,1);break t}}i=n.createElement(l),At(i,l,a),n.head.appendChild(i);break;default:throw Error(u(468,l))}i[ct]=e,wt(i),l=i}e.stateNode=l}else xh(n,e.type,e.stateNode);else e.stateNode=ph(n,l,e.memoizedProps);else i!==l?(i===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):i.count--,l===null?xh(n,e.type,e.stateNode):ph(n,l,e.memoizedProps)):l===null&&e.stateNode!==null&&Nc(e,e.memoizedProps,a.memoizedProps)}break;case 27:Vt(t,e),Yt(e),l&512&&(pt||a===null||Ea(a,a.return)),a!==null&&l&4&&Nc(e,e.memoizedProps,a.memoizedProps);break;case 5:if(Vt(t,e),Yt(e),l&512&&(pt||a===null||Ea(a,a.return)),e.flags&32){n=e.stateNode;try{Kl(n,"")}catch(re){Xe(e,e.return,re)}}l&4&&e.stateNode!=null&&(n=e.memoizedProps,Nc(e,n,a!==null?a.memoizedProps:n)),l&1024&&(Ac=!0);break;case 6:if(Vt(t,e),Yt(e),l&4){if(e.stateNode===null)throw Error(u(162));l=e.memoizedProps,a=e.stateNode;try{a.nodeValue=l}catch(re){Xe(e,e.return,re)}}break;case 3:if(Ms=null,n=ma,ma=Rs(t.containerInfo),Vt(t,e),ma=n,Yt(e),l&4&&a!==null&&a.memoizedState.isDehydrated)try{Cn(t.containerInfo)}catch(re){Xe(e,e.return,re)}Ac&&(Ac=!1,xf(e));break;case 4:l=ma,ma=Rs(e.stateNode.containerInfo),Vt(t,e),Yt(e),ma=l;break;case 12:Vt(t,e),Yt(e);break;case 31:Vt(t,e),Yt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,xs(e,l)));break;case 13:Vt(t,e),Yt(e),e.child.flags&8192&&e.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(ys=xt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,xs(e,l)));break;case 22:n=e.memoizedState!==null;var v=a!==null&&a.memoizedState!==null,z=Va,V=pt;if(Va=z||n,pt=V||v,Vt(t,e),pt=V,Va=z,Yt(e),l&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(a===null||v||Va||pt||ql(e)),a=null,t=e;;){if(t.tag===5||t.tag===26){if(a===null){v=a=t;try{if(i=v.stateNode,n)o=i.style,typeof o.setProperty=="function"?o.setProperty("display","none","important"):o.display="none";else{h=v.stateNode;var X=v.memoizedProps.style,M=X!=null&&X.hasOwnProperty("display")?X.display:null;h.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(re){Xe(v,v.return,re)}}}else if(t.tag===6){if(a===null){v=t;try{v.stateNode.nodeValue=n?"":v.memoizedProps}catch(re){Xe(v,v.return,re)}}}else if(t.tag===18){if(a===null){v=t;try{var U=v.stateNode;n?ih(U,!0):ih(v.stateNode,!1)}catch(re){Xe(v,v.return,re)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;a===t&&(a=null),t=t.return}a===t&&(a=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(a=l.retryQueue,a!==null&&(l.retryQueue=null,xs(e,a))));break;case 19:Vt(t,e),Yt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,xs(e,l)));break;case 30:break;case 21:break;default:Vt(t,e),Yt(e)}}function Yt(e){var t=e.flags;if(t&2){try{for(var a,l=e.return;l!==null;){if(rf(l)){a=l;break}l=l.return}if(a==null)throw Error(u(160));switch(a.tag){case 27:var n=a.stateNode,i=Ec(e);ms(e,i,n);break;case 5:var o=a.stateNode;a.flags&32&&(Kl(o,""),a.flags&=-33);var h=Ec(e);ms(e,h,o);break;case 3:case 4:var v=a.stateNode.containerInfo,z=Ec(e);Cc(e,z,v);break;default:throw Error(u(161))}}catch(V){Xe(e,e.return,V)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;xf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Ga(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)of(e,t.alternate,t),t=t.sibling}function ql(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:cl(4,t,t.return),ql(t);break;case 1:Ea(t,t.return);var a=t.stateNode;typeof a.componentWillUnmount=="function"&&nf(t,t.return,a),ql(t);break;case 27:pi(t.stateNode);case 26:case 5:Ea(t,t.return),ql(t);break;case 22:t.memoizedState===null&&ql(t);break;case 30:ql(t);break;default:ql(t)}e=e.sibling}}function Xa(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,n=e,i=t,o=i.flags;switch(i.tag){case 0:case 11:case 15:Xa(n,i,a),ni(4,i);break;case 1:if(Xa(n,i,a),l=i,n=l.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(z){Xe(l,l.return,z)}if(l=i,n=l.updateQueue,n!==null){var h=l.stateNode;try{var v=n.shared.hiddenCallbacks;if(v!==null)for(n.shared.hiddenCallbacks=null,n=0;n<v.length;n++)Zo(v[n],h)}catch(z){Xe(l,l.return,z)}}a&&o&64&&lf(i),ii(i,i.return);break;case 27:cf(i);case 26:case 5:Xa(n,i,a),a&&l===null&&o&4&&sf(i),ii(i,i.return);break;case 12:Xa(n,i,a);break;case 31:Xa(n,i,a),a&&o&4&&hf(n,i);break;case 13:Xa(n,i,a),a&&o&4&&pf(n,i);break;case 22:i.memoizedState===null&&Xa(n,i,a),ii(i,i.return);break;case 30:break;default:Xa(n,i,a)}t=t.sibling}}function Tc(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&e.refCount++,a!=null&&Qn(a))}function _c(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Qn(e))}function xa(e,t,a,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)gf(e,t,a,l),t=t.sibling}function gf(e,t,a,l){var n=t.flags;switch(t.tag){case 0:case 11:case 15:xa(e,t,a,l),n&2048&&ni(9,t);break;case 1:xa(e,t,a,l);break;case 3:xa(e,t,a,l),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Qn(e)));break;case 12:if(n&2048){xa(e,t,a,l),e=t.stateNode;try{var i=t.memoizedProps,o=i.id,h=i.onPostCommit;typeof h=="function"&&h(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(v){Xe(t,t.return,v)}}else xa(e,t,a,l);break;case 31:xa(e,t,a,l);break;case 13:xa(e,t,a,l);break;case 23:break;case 22:i=t.stateNode,o=t.alternate,t.memoizedState!==null?i._visibility&2?xa(e,t,a,l):si(e,t):i._visibility&2?xa(e,t,a,l):(i._visibility|=2,mn(e,t,a,l,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Tc(o,t);break;case 24:xa(e,t,a,l),n&2048&&_c(t.alternate,t);break;default:xa(e,t,a,l)}}function mn(e,t,a,l,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,o=t,h=a,v=l,z=o.flags;switch(o.tag){case 0:case 11:case 15:mn(i,o,h,v,n),ni(8,o);break;case 23:break;case 22:var V=o.stateNode;o.memoizedState!==null?V._visibility&2?mn(i,o,h,v,n):si(i,o):(V._visibility|=2,mn(i,o,h,v,n)),n&&z&2048&&Tc(o.alternate,o);break;case 24:mn(i,o,h,v,n),n&&z&2048&&_c(o.alternate,o);break;default:mn(i,o,h,v,n)}t=t.sibling}}function si(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var a=e,l=t,n=l.flags;switch(l.tag){case 22:si(a,l),n&2048&&Tc(l.alternate,l);break;case 24:si(a,l),n&2048&&_c(l.alternate,l);break;default:si(a,l)}t=t.sibling}}var ri=8192;function xn(e,t,a){if(e.subtreeFlags&ri)for(e=e.child;e!==null;)yf(e,t,a),e=e.sibling}function yf(e,t,a){switch(e.tag){case 26:xn(e,t,a),e.flags&ri&&e.memoizedState!==null&&V0(a,ma,e.memoizedState,e.memoizedProps);break;case 5:xn(e,t,a);break;case 3:case 4:var l=ma;ma=Rs(e.stateNode.containerInfo),xn(e,t,a),ma=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=ri,ri=16777216,xn(e,t,a),ri=l):xn(e,t,a));break;default:xn(e,t,a)}}function vf(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ci(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];St=l,wf(l,e)}vf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)bf(e),e=e.sibling}function bf(e){switch(e.tag){case 0:case 11:case 15:ci(e),e.flags&2048&&cl(9,e,e.return);break;case 3:ci(e);break;case 12:ci(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,gs(e)):ci(e);break;default:ci(e)}}function gs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var l=t[a];St=l,wf(l,e)}vf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:cl(8,t,t.return),gs(t);break;case 22:a=t.stateNode,a._visibility&2&&(a._visibility&=-3,gs(t));break;default:gs(t)}e=e.sibling}}function wf(e,t){for(;St!==null;){var a=St;switch(a.tag){case 0:case 11:case 15:cl(8,a,t);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var l=a.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Qn(a.memoizedState.cache)}if(l=a.child,l!==null)l.return=a,St=l;else e:for(a=e;St!==null;){l=St;var n=l.sibling,i=l.return;if(df(l),l===a){St=null;break e}if(n!==null){n.return=i,St=n;break e}St=i}}}var a0={getCacheForType:function(e){var t=Et(dt),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Et(dt).controller.signal}},l0=typeof WeakMap=="function"?WeakMap:Map,Ye=0,Je=null,Re=null,Oe=0,Ge=0,Jt=null,ul=!1,gn=!1,Rc=!1,Qa=0,rt=0,ol=0,Vl=0,zc=0,Wt=0,yn=0,ui=null,Gt=null,Mc=!1,ys=0,Sf=0,vs=1/0,bs=null,dl=null,yt=0,fl=null,vn=null,Za=0,Oc=0,Dc=null,jf=null,oi=0,kc=null;function Ft(){return(Ye&2)!==0&&Oe!==0?Oe&-Oe:k.T!==null?Vc():Fa()}function Nf(){if(Wt===0)if((Oe&536870912)===0||Le){var e=Rt;Rt<<=1,(Rt&3932160)===0&&(Rt=262144),Wt=e}else Wt=536870912;return e=$t.current,e!==null&&(e.flags|=32),Wt}function Xt(e,t,a){(e===Je&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)&&(bn(e,0),hl(e,Oe,Wt,!1)),Fe(e,a),((Ye&2)===0||e!==Je)&&(e===Je&&((Ye&2)===0&&(Vl|=a),rt===4&&hl(e,Oe,Wt,!1)),Ca(e))}function Ef(e,t,a){if((Ye&6)!==0)throw Error(u(327));var l=!a&&(t&127)===0&&(t&e.expiredLanes)===0||C(e,t),n=l?s0(e,t):Lc(e,t,!0),i=l;do{if(n===0){gn&&!l&&hl(e,t,0,!1);break}else{if(a=e.current.alternate,i&&!n0(a)){n=Lc(e,t,!1),i=!1;continue}if(n===2){if(i=t,e.errorRecoveryDisabledLanes&i)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var h=e;n=ui;var v=h.current.memoizedState.isDehydrated;if(v&&(bn(h,o).flags|=256),o=Lc(h,o,!1),o!==2){if(Rc&&!v){h.errorRecoveryDisabledLanes|=i,Vl|=i,n=4;break e}i=Gt,Gt=n,i!==null&&(Gt===null?Gt=i:Gt.push.apply(Gt,i))}n=o}if(i=!1,n!==2)continue}}if(n===1){bn(e,0),hl(e,t,0,!0);break}e:{switch(l=e,i=n,i){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:hl(l,t,Wt,!ul);break e;case 2:Gt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(n=ys+300-xt(),10<n)){if(hl(l,t,Wt,!ul),T(l,0,!0)!==0)break e;Za=t,l.timeoutHandle=ah(Cf.bind(null,l,a,Gt,bs,Mc,t,Wt,Vl,yn,ul,i,"Throttled",-0,0),n);break e}Cf(l,a,Gt,bs,Mc,t,Wt,Vl,yn,ul,i,null,-0,0)}}break}while(!0);Ca(e)}function Cf(e,t,a,l,n,i,o,h,v,z,V,X,M,U){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:za},yf(t,i,X);var re=(i&62914560)===i?ys-xt():(i&4194048)===i?Sf-xt():0;if(re=Y0(X,re),re!==null){Za=i,e.cancelPendingCommit=re(Df.bind(null,e,t,i,a,l,n,o,h,v,V,X,null,M,U)),hl(e,i,o,!z);return}}Df(e,t,i,a,l,n,o,h,v)}function n0(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var l=0;l<a.length;l++){var n=a[l],i=n.getSnapshot;n=n.value;try{if(!Qt(i(),n))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function hl(e,t,a,l){t&=~zc,t&=~Vl,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var n=t;0<n;){var i=31-it(n),o=1<<i;l[i]=-1,n&=~o}a!==0&&Sa(e,a,t)}function ws(){return(Ye&6)===0?(di(0),!1):!0}function Uc(){if(Re!==null){if(Ge===0)var e=Re.return;else e=Re,ka=Ml=null,Ir(e),on=null,$n=0,e=Re;for(;e!==null;)af(e.alternate,e),e=e.return;Re=null}}function bn(e,t){var a=e.timeoutHandle;a!==-1&&(e.timeoutHandle=-1,N0(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),Za=0,Uc(),Je=e,Re=a=Oa(e.current,null),Oe=t,Ge=0,Jt=null,ul=!1,gn=C(e,t),Rc=!1,yn=Wt=zc=Vl=ol=rt=0,Gt=ui=null,Mc=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var n=31-it(l),i=1<<n;t|=e[n],l&=~i}return Qa=t,Yi(),a}function Af(e,t){Ce=null,k.H=ti,t===un||t===Wi?(t=Yo(),Ge=3):t===qr?(t=Yo(),Ge=4):Ge=t===pc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Jt=t,Re===null&&(rt=1,os(e,na(t,e.current)))}function Tf(){var e=$t.current;return e===null?!0:(Oe&4194048)===Oe?ca===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===ca:!1}function _f(){var e=k.H;return k.H=ti,e===null?ti:e}function Rf(){var e=k.A;return k.A=a0,e}function Ss(){rt=4,ul||(Oe&4194048)!==Oe&&$t.current!==null||(gn=!0),(ol&134217727)===0&&(Vl&134217727)===0||Je===null||hl(Je,Oe,Wt,!1)}function Lc(e,t,a){var l=Ye;Ye|=2;var n=_f(),i=Rf();(Je!==e||Oe!==t)&&(bs=null,bn(e,t)),t=!1;var o=rt;e:do try{if(Ge!==0&&Re!==null){var h=Re,v=Jt;switch(Ge){case 8:Uc(),o=6;break e;case 3:case 2:case 9:case 6:$t.current===null&&(t=!0);var z=Ge;if(Ge=0,Jt=null,wn(e,h,v,z),a&&gn){o=0;break e}break;default:z=Ge,Ge=0,Jt=null,wn(e,h,v,z)}}i0(),o=rt;break}catch(V){Af(e,V)}while(!0);return t&&e.shellSuspendCounter++,ka=Ml=null,Ye=l,k.H=n,k.A=i,Re===null&&(Je=null,Oe=0,Yi()),o}function i0(){for(;Re!==null;)zf(Re)}function s0(e,t){var a=Ye;Ye|=2;var l=_f(),n=Rf();Je!==e||Oe!==t?(bs=null,vs=xt()+500,bn(e,t)):gn=C(e,t);e:do try{if(Ge!==0&&Re!==null){t=Re;var i=Jt;t:switch(Ge){case 1:Ge=0,Jt=null,wn(e,t,i,1);break;case 2:case 9:if(qo(i)){Ge=0,Jt=null,Mf(t);break}t=function(){Ge!==2&&Ge!==9||Je!==e||(Ge=7),Ca(e)},i.then(t,t);break e;case 3:Ge=7;break e;case 4:Ge=5;break e;case 7:qo(i)?(Ge=0,Jt=null,Mf(t)):(Ge=0,Jt=null,wn(e,t,i,7));break;case 5:var o=null;switch(Re.tag){case 26:o=Re.memoizedState;case 5:case 27:var h=Re;if(o?gh(o):h.stateNode.complete){Ge=0,Jt=null;var v=h.sibling;if(v!==null)Re=v;else{var z=h.return;z!==null?(Re=z,js(z)):Re=null}break t}}Ge=0,Jt=null,wn(e,t,i,5);break;case 6:Ge=0,Jt=null,wn(e,t,i,6);break;case 8:Uc(),rt=6;break e;default:throw Error(u(462))}}r0();break}catch(V){Af(e,V)}while(!0);return ka=Ml=null,k.H=l,k.A=n,Ye=a,Re!==null?0:(Je=null,Oe=0,Yi(),rt)}function r0(){for(;Re!==null&&!mt();)zf(Re)}function zf(e){var t=ef(e.alternate,e,Qa);e.memoizedProps=e.pendingProps,t===null?js(e):Re=t}function Mf(e){var t=e,a=t.alternate;switch(t.tag){case 15:case 0:t=Kd(a,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=Kd(a,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:Ir(t);default:af(a,t),t=Re=_o(t,Qa),t=ef(a,t,Qa)}e.memoizedProps=e.pendingProps,t===null?js(e):Re=t}function wn(e,t,a,l){ka=Ml=null,Ir(t),on=null,$n=0;var n=t.return;try{if(Jm(e,n,t,a,Oe)){rt=1,os(e,na(a,e.current)),Re=null;return}}catch(i){if(n!==null)throw Re=n,i;rt=1,os(e,na(a,e.current)),Re=null;return}t.flags&32768?(Le||l===1?e=!0:gn||(Oe&536870912)!==0?e=!1:(ul=e=!0,(l===2||l===9||l===3||l===6)&&(l=$t.current,l!==null&&l.tag===13&&(l.flags|=16384))),Of(t,e)):js(t)}function js(e){var t=e;do{if((t.flags&32768)!==0){Of(t,ul);return}e=t.return;var a=Im(t.alternate,t,Qa);if(a!==null){Re=a;return}if(t=t.sibling,t!==null){Re=t;return}Re=t=e}while(t!==null);rt===0&&(rt=5)}function Of(e,t){do{var a=Pm(e.alternate,e);if(a!==null){a.flags&=32767,Re=a;return}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){Re=e;return}Re=e=a}while(e!==null);rt=6,Re=null}function Df(e,t,a,l,n,i,o,h,v){e.cancelPendingCommit=null;do Ns();while(yt!==0);if((Ye&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(i=t.lanes|t.childLanes,i|=Er,zt(e,a,i,o,h,v),e===Je&&(Re=Je=null,Oe=0),vn=t,fl=e,Za=a,Oc=i,Dc=n,jf=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,d0(le,function(){return Bf(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=k.T,k.T=null,n=H.p,H.p=2,o=Ye,Ye|=4;try{e0(e,t,a)}finally{Ye=o,H.p=n,k.T=l}}yt=1,kf(),Uf(),Lf()}}function kf(){if(yt===1){yt=0;var e=fl,t=vn,a=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||a){a=k.T,k.T=null;var l=H.p;H.p=2;var n=Ye;Ye|=4;try{mf(t,e);var i=Jc,o=bo(e.containerInfo),h=i.focusedElem,v=i.selectionRange;if(o!==h&&h&&h.ownerDocument&&vo(h.ownerDocument.documentElement,h)){if(v!==null&&br(h)){var z=v.start,V=v.end;if(V===void 0&&(V=z),"selectionStart"in h)h.selectionStart=z,h.selectionEnd=Math.min(V,h.value.length);else{var X=h.ownerDocument||document,M=X&&X.defaultView||window;if(M.getSelection){var U=M.getSelection(),re=h.textContent.length,ge=Math.min(v.start,re),Ke=v.end===void 0?ge:Math.min(v.end,re);!U.extend&&ge>Ke&&(o=Ke,Ke=ge,ge=o);var A=yo(h,ge),N=yo(h,Ke);if(A&&N&&(U.rangeCount!==1||U.anchorNode!==A.node||U.anchorOffset!==A.offset||U.focusNode!==N.node||U.focusOffset!==N.offset)){var _=X.createRange();_.setStart(A.node,A.offset),U.removeAllRanges(),ge>Ke?(U.addRange(_),U.extend(N.node,N.offset)):(_.setEnd(N.node,N.offset),U.addRange(_))}}}}for(X=[],U=h;U=U.parentNode;)U.nodeType===1&&X.push({element:U,left:U.scrollLeft,top:U.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<X.length;h++){var Y=X[h];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}Us=!!Kc,Jc=Kc=null}finally{Ye=n,H.p=l,k.T=a}}e.current=t,yt=2}}function Uf(){if(yt===2){yt=0;var e=fl,t=vn,a=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||a){a=k.T,k.T=null;var l=H.p;H.p=2;var n=Ye;Ye|=4;try{of(e,t.alternate,t)}finally{Ye=n,H.p=l,k.T=a}}yt=3}}function Lf(){if(yt===4||yt===3){yt=0,Wa();var e=fl,t=vn,a=Za,l=jf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?yt=5:(yt=0,vn=fl=null,Hf(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(dl=null),Be(a),t=t.stateNode,Ue&&typeof Ue.onCommitFiberRoot=="function")try{Ue.onCommitFiberRoot(at,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=k.T,n=H.p,H.p=2,k.T=null;try{for(var i=e.onRecoverableError,o=0;o<l.length;o++){var h=l[o];i(h.value,{componentStack:h.stack})}}finally{k.T=t,H.p=n}}(Za&3)!==0&&Ns(),Ca(e),n=e.pendingLanes,(a&261930)!==0&&(n&42)!==0?e===kc?oi++:(oi=0,kc=e):oi=0,di(0)}}function Hf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Qn(t)))}function Ns(){return kf(),Uf(),Lf(),Bf()}function Bf(){if(yt!==5)return!1;var e=fl,t=Oc;Oc=0;var a=Be(Za),l=k.T,n=H.p;try{H.p=32>a?32:a,k.T=null,a=Dc,Dc=null;var i=fl,o=Za;if(yt=0,vn=fl=null,Za=0,(Ye&6)!==0)throw Error(u(331));var h=Ye;if(Ye|=4,bf(i.current),gf(i,i.current,o,a),Ye=h,di(0,!1),Ue&&typeof Ue.onPostCommitFiberRoot=="function")try{Ue.onPostCommitFiberRoot(at,i)}catch{}return!0}finally{H.p=n,k.T=l,Hf(e,t)}}function qf(e,t,a){t=na(a,t),t=hc(e.stateNode,t,2),e=il(e,t,2),e!==null&&(Fe(e,2),Ca(e))}function Xe(e,t,a){if(e.tag===3)qf(e,e,a);else for(;t!==null;){if(t.tag===3){qf(t,e,a);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(dl===null||!dl.has(l))){e=na(a,e),a=qd(2),l=il(t,a,2),l!==null&&(Vd(a,l,t,e),Fe(l,2),Ca(l));break}}t=t.return}}function Hc(e,t,a){var l=e.pingCache;if(l===null){l=e.pingCache=new l0;var n=new Set;l.set(t,n)}else n=l.get(t),n===void 0&&(n=new Set,l.set(t,n));n.has(a)||(Rc=!0,n.add(a),e=c0.bind(null,e,t,a),t.then(e,e))}function c0(e,t,a){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,Je===e&&(Oe&a)===a&&(rt===4||rt===3&&(Oe&62914560)===Oe&&300>xt()-ys?(Ye&2)===0&&bn(e,0):zc|=a,yn===Oe&&(yn=0)),Ca(e)}function Vf(e,t){t===0&&(t=_e()),e=_l(e,t),e!==null&&(Fe(e,t),Ca(e))}function u0(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),Vf(e,a)}function o0(e,t){var a=0;switch(e.tag){case 31:case 13:var l=e.stateNode,n=e.memoizedState;n!==null&&(a=n.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(u(314))}l!==null&&l.delete(t),Vf(e,a)}function d0(e,t){return fe(e,t)}var Es=null,Sn=null,Bc=!1,Cs=!1,qc=!1,pl=0;function Ca(e){e!==Sn&&e.next===null&&(Sn===null?Es=Sn=e:Sn=Sn.next=e),Cs=!0,Bc||(Bc=!0,h0())}function di(e,t){if(!qc&&Cs){qc=!0;do for(var a=!1,l=Es;l!==null;){if(e!==0){var n=l.pendingLanes;if(n===0)var i=0;else{var o=l.suspendedLanes,h=l.pingedLanes;i=(1<<31-it(42|e)+1)-1,i&=n&~(o&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,Qf(l,i))}else i=Oe,i=T(l,l===Je?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||C(l,i)||(a=!0,Qf(l,i));l=l.next}while(a);qc=!1}}function f0(){Yf()}function Yf(){Cs=Bc=!1;var e=0;pl!==0&&j0()&&(e=pl);for(var t=xt(),a=null,l=Es;l!==null;){var n=l.next,i=Gf(l,t);i===0?(l.next=null,a===null?Es=n:a.next=n,n===null&&(Sn=a)):(a=l,(e!==0||(i&3)!==0)&&(Cs=!0)),l=n}yt!==0&&yt!==5||di(e),pl!==0&&(pl=0)}function Gf(e,t){for(var a=e.suspendedLanes,l=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var o=31-it(i),h=1<<o,v=n[o];v===-1?((h&a)===0||(h&l)!==0)&&(n[o]=J(h,t)):v<=t&&(e.expiredLanes|=h),i&=~h}if(t=Je,a=Oe,a=T(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,a===0||e===t&&(Ge===2||Ge===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Ne(l),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||C(e,a)){if(t=a&-a,t===e.callbackPriority)return t;switch(l!==null&&Ne(l),Be(a)){case 2:case 8:a=K;break;case 32:a=le;break;case 268435456:a=ee;break;default:a=le}return l=Xf.bind(null,e),a=fe(a,l),e.callbackPriority=t,e.callbackNode=a,t}return l!==null&&l!==null&&Ne(l),e.callbackPriority=2,e.callbackNode=null,2}function Xf(e,t){if(yt!==0&&yt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(Ns()&&e.callbackNode!==a)return null;var l=Oe;return l=T(e,e===Je?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Ef(e,l,t),Gf(e,xt()),e.callbackNode!=null&&e.callbackNode===a?Xf.bind(null,e):null)}function Qf(e,t){if(Ns())return null;Ef(e,t,!0)}function h0(){E0(function(){(Ye&6)!==0?fe(_a,f0):Yf()})}function Vc(){if(pl===0){var e=rn;e===0&&(e=Pt,Pt<<=1,(Pt&261888)===0&&(Pt=256)),pl=e}return pl}function Zf(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Di(""+e)}function $f(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function p0(e,t,a,l,n){if(t==="submit"&&a&&a.stateNode===n){var i=Zf((n[Se]||null).action),o=l.submitter;o&&(t=(t=o[Se]||null)?Zf(t.formAction):o.getAttribute("formAction"),t!==null&&(i=t,o=null));var h=new Hi("action","action",null,l,n);e.push({event:h,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(pl!==0){var v=o?$f(n,o):new FormData(n);rc(a,{pending:!0,data:v,method:n.method,action:i},null,v)}}else typeof i=="function"&&(h.preventDefault(),v=o?$f(n,o):new FormData(n),rc(a,{pending:!0,data:v,method:n.method,action:i},i,v))},currentTarget:n}]})}}for(var Yc=0;Yc<Nr.length;Yc++){var Gc=Nr[Yc],m0=Gc.toLowerCase(),x0=Gc[0].toUpperCase()+Gc.slice(1);pa(m0,"on"+x0)}pa(jo,"onAnimationEnd"),pa(No,"onAnimationIteration"),pa(Eo,"onAnimationStart"),pa("dblclick","onDoubleClick"),pa("focusin","onFocus"),pa("focusout","onBlur"),pa(Mm,"onTransitionRun"),pa(Om,"onTransitionStart"),pa(Dm,"onTransitionCancel"),pa(Co,"onTransitionEnd"),Zl("onMouseEnter",["mouseout","mouseover"]),Zl("onMouseLeave",["mouseout","mouseover"]),Zl("onPointerEnter",["pointerout","pointerover"]),Zl("onPointerLeave",["pointerout","pointerover"]),El("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),El("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),El("onBeforeInput",["compositionend","keypress","textInput","paste"]),El("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),El("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),El("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var fi="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),g0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(fi));function Kf(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var l=e[a],n=l.event;l=l.listeners;e:{var i=void 0;if(t)for(var o=l.length-1;0<=o;o--){var h=l[o],v=h.instance,z=h.currentTarget;if(h=h.listener,v!==i&&n.isPropagationStopped())break e;i=h,n.currentTarget=z;try{i(n)}catch(V){Vi(V)}n.currentTarget=null,i=v}else for(o=0;o<l.length;o++){if(h=l[o],v=h.instance,z=h.currentTarget,h=h.listener,v!==i&&n.isPropagationStopped())break e;i=h,n.currentTarget=z;try{i(n)}catch(V){Vi(V)}n.currentTarget=null,i=v}}}}function ze(e,t){var a=t[Nl];a===void 0&&(a=t[Nl]=new Set);var l=e+"__bubble";a.has(l)||(Jf(t,e,2,!1),a.add(l))}function Xc(e,t,a){var l=0;t&&(l|=4),Jf(a,e,l,t)}var As="_reactListening"+Math.random().toString(36).slice(2);function Qc(e){if(!e[As]){e[As]=!0,qu.forEach(function(a){a!=="selectionchange"&&(g0.has(a)||Xc(a,!1,e),Xc(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[As]||(t[As]=!0,Xc("selectionchange",!1,t))}}function Jf(e,t,a,l){switch(Nh(t)){case 2:var n=Q0;break;case 8:n=Z0;break;default:n=su}a=n.bind(null,t,a,e),n=void 0,!dr||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),l?n!==void 0?e.addEventListener(t,a,{capture:!0,passive:n}):e.addEventListener(t,a,!0):n!==void 0?e.addEventListener(t,a,{passive:n}):e.addEventListener(t,a,!1)}function Zc(e,t,a,l,n){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var o=l.tag;if(o===3||o===4){var h=l.stateNode.containerInfo;if(h===n)break;if(o===4)for(o=l.return;o!==null;){var v=o.tag;if((v===3||v===4)&&o.stateNode.containerInfo===n)return;o=o.return}for(;h!==null;){if(o=Gl(h),o===null)return;if(v=o.tag,v===5||v===6||v===26||v===27){l=i=o;continue e}h=h.parentNode}}l=l.return}Iu(function(){var z=i,V=ur(a),X=[];e:{var M=Ao.get(e);if(M!==void 0){var U=Hi,re=e;switch(e){case"keypress":if(Ui(a)===0)break e;case"keydown":case"keyup":U=om;break;case"focusin":re="focus",U=mr;break;case"focusout":re="blur",U=mr;break;case"beforeblur":case"afterblur":U=mr;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":U=to;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":U=Ip;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":U=hm;break;case jo:case No:case Eo:U=tm;break;case Co:U=mm;break;case"scroll":case"scrollend":U=Wp;break;case"wheel":U=gm;break;case"copy":case"cut":case"paste":U=lm;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":U=lo;break;case"toggle":case"beforetoggle":U=vm}var ge=(t&4)!==0,Ke=!ge&&(e==="scroll"||e==="scrollend"),A=ge?M!==null?M+"Capture":null:M;ge=[];for(var N=z,_;N!==null;){var Y=N;if(_=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||_===null||A===null||(Y=Dn(N,A),Y!=null&&ge.push(hi(N,Y,_))),Ke)break;N=N.return}0<ge.length&&(M=new U(M,re,null,a,V),X.push({event:M,listeners:ge}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",U=e==="mouseout"||e==="pointerout",M&&a!==cr&&(re=a.relatedTarget||a.fromElement)&&(Gl(re)||re[Ht]))break e;if((U||M)&&(M=V.window===V?V:(M=V.ownerDocument)?M.defaultView||M.parentWindow:window,U?(re=a.relatedTarget||a.toElement,U=z,re=re?Gl(re):null,re!==null&&(Ke=p(re),ge=re.tag,re!==Ke||ge!==5&&ge!==27&&ge!==6)&&(re=null)):(U=null,re=z),U!==re)){if(ge=to,Y="onMouseLeave",A="onMouseEnter",N="mouse",(e==="pointerout"||e==="pointerover")&&(ge=lo,Y="onPointerLeave",A="onPointerEnter",N="pointer"),Ke=U==null?M:On(U),_=re==null?M:On(re),M=new ge(Y,N+"leave",U,a,V),M.target=Ke,M.relatedTarget=_,Y=null,Gl(V)===z&&(ge=new ge(A,N+"enter",re,a,V),ge.target=_,ge.relatedTarget=Ke,Y=ge),Ke=Y,U&&re)t:{for(ge=y0,A=U,N=re,_=0,Y=A;Y;Y=ge(Y))_++;Y=0;for(var me=N;me;me=ge(me))Y++;for(;0<_-Y;)A=ge(A),_--;for(;0<Y-_;)N=ge(N),Y--;for(;_--;){if(A===N||N!==null&&A===N.alternate){ge=A;break t}A=ge(A),N=ge(N)}ge=null}else ge=null;U!==null&&Wf(X,M,U,ge,!1),re!==null&&Ke!==null&&Wf(X,Ke,re,ge,!0)}}e:{if(M=z?On(z):window,U=M.nodeName&&M.nodeName.toLowerCase(),U==="select"||U==="input"&&M.type==="file")var qe=fo;else if(uo(M))if(ho)qe=_m;else{qe=Am;var oe=Cm}else U=M.nodeName,!U||U.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?z&&rr(z.elementType)&&(qe=fo):qe=Tm;if(qe&&(qe=qe(e,z))){oo(X,qe,a,V);break e}oe&&oe(e,M,z),e==="focusout"&&z&&M.type==="number"&&z.memoizedProps.value!=null&&sr(M,"number",M.value)}switch(oe=z?On(z):window,e){case"focusin":(uo(oe)||oe.contentEditable==="true")&&(Il=oe,wr=z,Yn=null);break;case"focusout":Yn=wr=Il=null;break;case"mousedown":Sr=!0;break;case"contextmenu":case"mouseup":case"dragend":Sr=!1,wo(X,a,V);break;case"selectionchange":if(zm)break;case"keydown":case"keyup":wo(X,a,V)}var Te;if(gr)e:{switch(e){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else Fl?ro(e,a)&&(De="onCompositionEnd"):e==="keydown"&&a.keyCode===229&&(De="onCompositionStart");De&&(no&&a.locale!=="ko"&&(Fl||De!=="onCompositionStart"?De==="onCompositionEnd"&&Fl&&(Te=Pu()):(Ia=V,fr="value"in Ia?Ia.value:Ia.textContent,Fl=!0)),oe=Ts(z,De),0<oe.length&&(De=new ao(De,e,null,a,V),X.push({event:De,listeners:oe}),Te?De.data=Te:(Te=co(a),Te!==null&&(De.data=Te)))),(Te=wm?Sm(e,a):jm(e,a))&&(De=Ts(z,"onBeforeInput"),0<De.length&&(oe=new ao("onBeforeInput","beforeinput",null,a,V),X.push({event:oe,listeners:De}),oe.data=Te)),p0(X,e,z,a,V)}Kf(X,t)})}function hi(e,t,a){return{instance:e,listener:t,currentTarget:a}}function Ts(e,t){for(var a=t+"Capture",l=[];e!==null;){var n=e,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=Dn(e,a),n!=null&&l.unshift(hi(e,n,i)),n=Dn(e,t),n!=null&&l.push(hi(e,n,i))),e.tag===3)return l;e=e.return}return[]}function y0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Wf(e,t,a,l,n){for(var i=t._reactName,o=[];a!==null&&a!==l;){var h=a,v=h.alternate,z=h.stateNode;if(h=h.tag,v!==null&&v===l)break;h!==5&&h!==26&&h!==27||z===null||(v=z,n?(z=Dn(a,i),z!=null&&o.unshift(hi(a,z,v))):n||(z=Dn(a,i),z!=null&&o.push(hi(a,z,v)))),a=a.return}o.length!==0&&e.push({event:t,listeners:o})}var v0=/\r\n?/g,b0=/\u0000|\uFFFD/g;function Ff(e){return(typeof e=="string"?e:""+e).replace(v0,`
9
+ `).replace(b0,"")}function If(e,t){return t=Ff(t),Ff(e)===t}function $e(e,t,a,l,n,i){switch(a){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Kl(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Kl(e,""+l);break;case"className":Mi(e,"class",l);break;case"tabIndex":Mi(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Mi(e,a,l);break;case"style":Wu(e,l,i);break;case"data":if(t!=="object"){Mi(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||a!=="href")){e.removeAttribute(a);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Di(""+l),e.setAttribute(a,l);break;case"action":case"formAction":if(typeof l=="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 i=="function"&&(a==="formAction"?(t!=="input"&&$e(e,t,"name",n.name,n,null),$e(e,t,"formEncType",n.formEncType,n,null),$e(e,t,"formMethod",n.formMethod,n,null),$e(e,t,"formTarget",n.formTarget,n,null)):($e(e,t,"encType",n.encType,n,null),$e(e,t,"method",n.method,n,null),$e(e,t,"target",n.target,n,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(a);break}l=Di(""+l),e.setAttribute(a,l);break;case"onClick":l!=null&&(e.onclick=za);break;case"onScroll":l!=null&&ze("scroll",e);break;case"onScrollEnd":l!=null&&ze("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(n.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}a=Di(""+l),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":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""+l):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":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":l===!0?e.setAttribute(a,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(a,l):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(a,l):e.removeAttribute(a);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(a):e.setAttribute(a,l);break;case"popover":ze("beforetoggle",e),ze("toggle",e),zi(e,"popover",l);break;case"xlinkActuate":Ra(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Ra(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Ra(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Ra(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Ra(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Ra(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Ra(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Ra(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Ra(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":zi(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=Kp.get(a)||a,zi(e,a,l))}}function $c(e,t,a,l,n,i){switch(a){case"style":Wu(e,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(u(61));if(a=l.__html,a!=null){if(n.children!=null)throw Error(u(60));e.innerHTML=a}}break;case"children":typeof l=="string"?Kl(e,l):(typeof l=="number"||typeof l=="bigint")&&Kl(e,""+l);break;case"onScroll":l!=null&&ze("scroll",e);break;case"onScrollEnd":l!=null&&ze("scrollend",e);break;case"onClick":l!=null&&(e.onclick=za);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Vu.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(n=a.endsWith("Capture"),t=a.slice(2,n?a.length-7:void 0),i=e[Se]||null,i=i!=null?i[a]:null,typeof i=="function"&&e.removeEventListener(t,i,n),typeof l=="function")){typeof i!="function"&&i!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,l,n);break e}a in e?e[a]=l:l===!0?e.setAttribute(a,""):zi(e,a,l)}}}function At(e,t,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ze("error",e),ze("load",e);var l=!1,n=!1,i;for(i in a)if(a.hasOwnProperty(i)){var o=a[i];if(o!=null)switch(i){case"src":l=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:$e(e,t,i,o,a,null)}}n&&$e(e,t,"srcSet",a.srcSet,a,null),l&&$e(e,t,"src",a.src,a,null);return;case"input":ze("invalid",e);var h=i=o=n=null,v=null,z=null;for(l in a)if(a.hasOwnProperty(l)){var V=a[l];if(V!=null)switch(l){case"name":n=V;break;case"type":o=V;break;case"checked":v=V;break;case"defaultChecked":z=V;break;case"value":i=V;break;case"defaultValue":h=V;break;case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(u(137,t));break;default:$e(e,t,l,V,a,null)}}Zu(e,i,h,v,z,o,n,!1);return;case"select":ze("invalid",e),l=o=i=null;for(n in a)if(a.hasOwnProperty(n)&&(h=a[n],h!=null))switch(n){case"value":i=h;break;case"defaultValue":o=h;break;case"multiple":l=h;default:$e(e,t,n,h,a,null)}t=i,a=o,e.multiple=!!l,t!=null?$l(e,!!l,t,!1):a!=null&&$l(e,!!l,a,!0);return;case"textarea":ze("invalid",e),i=n=l=null;for(o in a)if(a.hasOwnProperty(o)&&(h=a[o],h!=null))switch(o){case"value":l=h;break;case"defaultValue":n=h;break;case"children":i=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error(u(91));break;default:$e(e,t,o,h,a,null)}Ku(e,l,n,i);return;case"option":for(v in a)a.hasOwnProperty(v)&&(l=a[v],l!=null)&&(v==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":$e(e,t,v,l,a,null));return;case"dialog":ze("beforetoggle",e),ze("toggle",e),ze("cancel",e),ze("close",e);break;case"iframe":case"object":ze("load",e);break;case"video":case"audio":for(l=0;l<fi.length;l++)ze(fi[l],e);break;case"image":ze("error",e),ze("load",e);break;case"details":ze("toggle",e);break;case"embed":case"source":case"link":ze("error",e),ze("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(z in a)if(a.hasOwnProperty(z)&&(l=a[z],l!=null))switch(z){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:$e(e,t,z,l,a,null)}return;default:if(rr(t)){for(V in a)a.hasOwnProperty(V)&&(l=a[V],l!==void 0&&$c(e,t,V,l,a,void 0));return}}for(h in a)a.hasOwnProperty(h)&&(l=a[h],l!=null&&$e(e,t,h,l,a,null))}function w0(e,t,a,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,i=null,o=null,h=null,v=null,z=null,V=null;for(U in a){var X=a[U];if(a.hasOwnProperty(U)&&X!=null)switch(U){case"checked":break;case"value":break;case"defaultValue":v=X;default:l.hasOwnProperty(U)||$e(e,t,U,null,l,X)}}for(var M in l){var U=l[M];if(X=a[M],l.hasOwnProperty(M)&&(U!=null||X!=null))switch(M){case"type":i=U;break;case"name":n=U;break;case"checked":z=U;break;case"defaultChecked":V=U;break;case"value":o=U;break;case"defaultValue":h=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(u(137,t));break;default:U!==X&&$e(e,t,M,U,l,X)}}ir(e,o,h,v,z,V,i,n);return;case"select":U=o=h=M=null;for(i in a)if(v=a[i],a.hasOwnProperty(i)&&v!=null)switch(i){case"value":break;case"multiple":U=v;default:l.hasOwnProperty(i)||$e(e,t,i,null,l,v)}for(n in l)if(i=l[n],v=a[n],l.hasOwnProperty(n)&&(i!=null||v!=null))switch(n){case"value":M=i;break;case"defaultValue":h=i;break;case"multiple":o=i;default:i!==v&&$e(e,t,n,i,l,v)}t=h,a=o,l=U,M!=null?$l(e,!!a,M,!1):!!l!=!!a&&(t!=null?$l(e,!!a,t,!0):$l(e,!!a,a?[]:"",!1));return;case"textarea":U=M=null;for(h in a)if(n=a[h],a.hasOwnProperty(h)&&n!=null&&!l.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:$e(e,t,h,null,l,n)}for(o in l)if(n=l[o],i=a[o],l.hasOwnProperty(o)&&(n!=null||i!=null))switch(o){case"value":M=n;break;case"defaultValue":U=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(u(91));break;default:n!==i&&$e(e,t,o,n,l,i)}$u(e,M,U);return;case"option":for(var re in a)M=a[re],a.hasOwnProperty(re)&&M!=null&&!l.hasOwnProperty(re)&&(re==="selected"?e.selected=!1:$e(e,t,re,null,l,M));for(v in l)M=l[v],U=a[v],l.hasOwnProperty(v)&&M!==U&&(M!=null||U!=null)&&(v==="selected"?e.selected=M&&typeof M!="function"&&typeof M!="symbol":$e(e,t,v,M,l,U));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 ge in a)M=a[ge],a.hasOwnProperty(ge)&&M!=null&&!l.hasOwnProperty(ge)&&$e(e,t,ge,null,l,M);for(z in l)if(M=l[z],U=a[z],l.hasOwnProperty(z)&&M!==U&&(M!=null||U!=null))switch(z){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(u(137,t));break;default:$e(e,t,z,M,l,U)}return;default:if(rr(t)){for(var Ke in a)M=a[Ke],a.hasOwnProperty(Ke)&&M!==void 0&&!l.hasOwnProperty(Ke)&&$c(e,t,Ke,void 0,l,M);for(V in l)M=l[V],U=a[V],!l.hasOwnProperty(V)||M===U||M===void 0&&U===void 0||$c(e,t,V,M,l,U);return}}for(var A in a)M=a[A],a.hasOwnProperty(A)&&M!=null&&!l.hasOwnProperty(A)&&$e(e,t,A,null,l,M);for(X in l)M=l[X],U=a[X],!l.hasOwnProperty(X)||M===U||M==null&&U==null||$e(e,t,X,M,l,U)}function Pf(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function S0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),l=0;l<a.length;l++){var n=a[l],i=n.transferSize,o=n.initiatorType,h=n.duration;if(i&&h&&Pf(o)){for(o=0,h=n.responseEnd,l+=1;l<a.length;l++){var v=a[l],z=v.startTime;if(z>h)break;var V=v.transferSize,X=v.initiatorType;V&&Pf(X)&&(v=v.responseEnd,o+=V*(v<h?1:(h-z)/(v-z)))}if(--l,t+=8*(i+o)/(n.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Kc=null,Jc=null;function _s(e){return e.nodeType===9?e:e.ownerDocument}function eh(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 th(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Wc(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Fc=null;function j0(){var e=window.event;return e&&e.type==="popstate"?e===Fc?!1:(Fc=e,!0):(Fc=null,!1)}var ah=typeof setTimeout=="function"?setTimeout:void 0,N0=typeof clearTimeout=="function"?clearTimeout:void 0,lh=typeof Promise=="function"?Promise:void 0,E0=typeof queueMicrotask=="function"?queueMicrotask:typeof lh<"u"?function(e){return lh.resolve(null).then(e).catch(C0)}:ah;function C0(e){setTimeout(function(){throw e})}function ml(e){return e==="head"}function nh(e,t){var a=t,l=0;do{var n=a.nextSibling;if(e.removeChild(a),n&&n.nodeType===8)if(a=n.data,a==="/$"||a==="/&"){if(l===0){e.removeChild(n),Cn(t);return}l--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")l++;else if(a==="html")pi(e.ownerDocument.documentElement);else if(a==="head"){a=e.ownerDocument.head,pi(a);for(var i=a.firstChild;i;){var o=i.nextSibling,h=i.nodeName;i[Mn]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||a.removeChild(i),i=o}}else a==="body"&&pi(e.ownerDocument.body);a=n}while(a);Cn(t)}function ih(e,t){var a=e;e=0;do{var l=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),l&&l.nodeType===8)if(a=l.data,a==="/$"){if(e===0)break;e--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||e++;a=l}while(a)}function Ic(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Ic(a),lr(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function A0(e,t,a,l){for(;e.nodeType===1;){var n=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[Mn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=ua(e.nextSibling),e===null)break}return null}function T0(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=ua(e.nextSibling),e===null))return null;return e}function sh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=ua(e.nextSibling),e===null))return null;return e}function Pc(e){return e.data==="$?"||e.data==="$~"}function eu(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function _0(e,t){var a=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||a.readyState!=="loading")t();else{var l=function(){t(),a.removeEventListener("DOMContentLoaded",l)};a.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function ua(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var tu=null;function rh(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="/$"||a==="/&"){if(t===0)return ua(e.nextSibling);t--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||t++}e=e.nextSibling}return null}function ch(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(t===0)return e;t--}else a!=="/$"&&a!=="/&"||t++}e=e.previousSibling}return null}function uh(e,t,a){switch(t=_s(a),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function pi(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);lr(e)}var oa=new Map,oh=new Set;function Rs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var $a=H.d;H.d={f:R0,r:z0,D:M0,C:O0,L:D0,m:k0,X:L0,S:U0,M:H0};function R0(){var e=$a.f(),t=ws();return e||t}function z0(e){var t=Xl(e);t!==null&&t.tag===5&&t.type==="form"?Cd(t):$a.r(e)}var jn=typeof document>"u"?null:document;function dh(e,t,a){var l=jn;if(l&&typeof t=="string"&&t){var n=aa(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof a=="string"&&(n+='[crossorigin="'+a+'"]'),oh.has(n)||(oh.add(n),e={rel:e,crossOrigin:a,href:t},l.querySelector(n)===null&&(t=l.createElement("link"),At(t,"link",e),wt(t),l.head.appendChild(t)))}}function M0(e){$a.D(e),dh("dns-prefetch",e,null)}function O0(e,t){$a.C(e,t),dh("preconnect",e,t)}function D0(e,t,a){$a.L(e,t,a);var l=jn;if(l&&e&&t){var n='link[rel="preload"][as="'+aa(t)+'"]';t==="image"&&a&&a.imageSrcSet?(n+='[imagesrcset="'+aa(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(n+='[imagesizes="'+aa(a.imageSizes)+'"]')):n+='[href="'+aa(e)+'"]';var i=n;switch(t){case"style":i=Nn(e);break;case"script":i=En(e)}oa.has(i)||(e=w({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),oa.set(i,e),l.querySelector(n)!==null||t==="style"&&l.querySelector(mi(i))||t==="script"&&l.querySelector(xi(i))||(t=l.createElement("link"),At(t,"link",e),wt(t),l.head.appendChild(t)))}}function k0(e,t){$a.m(e,t);var a=jn;if(a&&e){var l=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+aa(l)+'"][href="'+aa(e)+'"]',i=n;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=En(e)}if(!oa.has(i)&&(e=w({rel:"modulepreload",href:e},t),oa.set(i,e),a.querySelector(n)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(xi(i)))return}l=a.createElement("link"),At(l,"link",e),wt(l),a.head.appendChild(l)}}}function U0(e,t,a){$a.S(e,t,a);var l=jn;if(l&&e){var n=Ql(l).hoistableStyles,i=Nn(e);t=t||"default";var o=n.get(i);if(!o){var h={loading:0,preload:null};if(o=l.querySelector(mi(i)))h.loading=5;else{e=w({rel:"stylesheet",href:e,"data-precedence":t},a),(a=oa.get(i))&&au(e,a);var v=o=l.createElement("link");wt(v),At(v,"link",e),v._p=new Promise(function(z,V){v.onload=z,v.onerror=V}),v.addEventListener("load",function(){h.loading|=1}),v.addEventListener("error",function(){h.loading|=2}),h.loading|=4,zs(o,t,l)}o={type:"stylesheet",instance:o,count:1,state:h},n.set(i,o)}}}function L0(e,t){$a.X(e,t);var a=jn;if(a&&e){var l=Ql(a).hoistableScripts,n=En(e),i=l.get(n);i||(i=a.querySelector(xi(n)),i||(e=w({src:e,async:!0},t),(t=oa.get(n))&&lu(e,t),i=a.createElement("script"),wt(i),At(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(n,i))}}function H0(e,t){$a.M(e,t);var a=jn;if(a&&e){var l=Ql(a).hoistableScripts,n=En(e),i=l.get(n);i||(i=a.querySelector(xi(n)),i||(e=w({src:e,async:!0,type:"module"},t),(t=oa.get(n))&&lu(e,t),i=a.createElement("script"),wt(i),At(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(n,i))}}function fh(e,t,a,l){var n=(n=pe.current)?Rs(n):null;if(!n)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(t=Nn(a.href),a=Ql(n).hoistableStyles,l=a.get(t),l||(l={type:"style",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Nn(a.href);var i=Ql(n).hoistableStyles,o=i.get(e);if(o||(n=n.ownerDocument||n,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,o),(i=n.querySelector(mi(e)))&&!i._p&&(o.instance=i,o.state.loading=5),oa.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},oa.set(e,a),i||B0(n,e,a,o.state))),t&&l===null)throw Error(u(528,""));return o}if(t&&l!==null)throw Error(u(529,""));return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=En(a),a=Ql(n).hoistableScripts,l=a.get(t),l||(l={type:"script",instance:null,count:0,state:null},a.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Nn(e){return'href="'+aa(e)+'"'}function mi(e){return'link[rel="stylesheet"]['+e+"]"}function hh(e){return w({},e,{"data-precedence":e.precedence,precedence:null})}function B0(e,t,a,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),At(t,"link",a),wt(t),e.head.appendChild(t))}function En(e){return'[src="'+aa(e)+'"]'}function xi(e){return"script[async]"+e}function ph(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+aa(a.href)+'"]');if(l)return t.instance=l,wt(l),l;var n=w({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),wt(l),At(l,"style",n),zs(l,a.precedence,e),t.instance=l;case"stylesheet":n=Nn(a.href);var i=e.querySelector(mi(n));if(i)return t.state.loading|=4,t.instance=i,wt(i),i;l=hh(a),(n=oa.get(n))&&au(l,n),i=(e.ownerDocument||e).createElement("link"),wt(i);var o=i;return o._p=new Promise(function(h,v){o.onload=h,o.onerror=v}),At(i,"link",l),t.state.loading|=4,zs(i,a.precedence,e),t.instance=i;case"script":return i=En(a.src),(n=e.querySelector(xi(i)))?(t.instance=n,wt(n),n):(l=a,(n=oa.get(i))&&(l=w({},a),lu(l,n)),e=e.ownerDocument||e,n=e.createElement("script"),wt(n),At(n,"link",l),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,zs(l,a.precedence,e));return t.instance}function zs(e,t,a){for(var l=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=l.length?l[l.length-1]:null,i=n,o=0;o<l.length;o++){var h=l[o];if(h.dataset.precedence===t)i=h;else if(i!==n)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function au(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function lu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Ms=null;function mh(e,t,a){if(Ms===null){var l=new Map,n=Ms=new Map;n.set(a,l)}else n=Ms,l=n.get(a),l||(l=new Map,n.set(a,l));if(l.has(e))return l;for(l.set(e,null),a=a.getElementsByTagName(e),n=0;n<a.length;n++){var i=a[n];if(!(i[Mn]||i[ct]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(t)||"";o=e+o;var h=l.get(o);h?h.push(i):l.set(o,[i])}}return l}function xh(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function q0(e,t,a){if(a===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function gh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function V0(e,t,a,l){if(a.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var n=Nn(l.href),i=t.querySelector(mi(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Os.bind(e),t.then(e,e)),a.state.loading|=4,a.instance=i,wt(i);return}i=t.ownerDocument||t,l=hh(l),(n=oa.get(n))&&au(l,n),i=i.createElement("link"),wt(i);var o=i;o._p=new Promise(function(h,v){o.onload=h,o.onerror=v}),At(i,"link",l),a.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&3)===0&&(e.count++,a=Os.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}var nu=0;function Y0(e,t){return e.stylesheets&&e.count===0&&ks(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var l=setTimeout(function(){if(e.stylesheets&&ks(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&nu===0&&(nu=62500*S0());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ks(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>nu?50:800)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(n)}}:null}function Os(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ks(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ds=null;function ks(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ds=new Map,t.forEach(G0,e),Ds=null,Os.call(e))}function G0(e,t){if(!(t.state.loading&4)){var a=Ds.get(e);if(a)var l=a.get(null);else{a=new Map,Ds.set(e,a);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var o=n[i];(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")&&(a.set(o.dataset.precedence,o),l=o)}l&&a.set(null,l)}n=t.instance,o=n.getAttribute("data-precedence"),i=a.get(o)||l,i===l&&a.set(null,n),a.set(o,n),this.count++,l=Os.bind(this),n.addEventListener("load",l),n.addEventListener("error",l),i?i.parentNode.insertBefore(n,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var gi={$$typeof:Z,Provider:null,Consumer:null,_currentValue:W,_currentValue2:W,_threadCount:0};function X0(e,t,a,l,n,i,o,h,v){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=He(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=He(0),this.hiddenUpdates=He(null),this.identifierPrefix=l,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=v,this.incompleteTransitions=new Map}function yh(e,t,a,l,n,i,o,h,v,z,V,X){return e=new X0(e,t,a,o,v,z,V,X,h),t=1,i===!0&&(t|=24),i=Zt(3,null,null,t),e.current=i,i.stateNode=e,t=Lr(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:a,cache:t},Vr(i),e}function vh(e){return e?(e=tn,e):tn}function bh(e,t,a,l,n,i){n=vh(n),l.context===null?l.context=n:l.pendingContext=n,l=nl(t),l.payload={element:a},i=i===void 0?null:i,i!==null&&(l.callback=i),a=il(e,l,t),a!==null&&(Xt(a,e,t),Jn(a,e,t))}function wh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function iu(e,t){wh(e,t),(e=e.alternate)&&wh(e,t)}function Sh(e){if(e.tag===13||e.tag===31){var t=_l(e,67108864);t!==null&&Xt(t,e,67108864),iu(e,67108864)}}function jh(e){if(e.tag===13||e.tag===31){var t=Ft();t=I(t);var a=_l(e,t);a!==null&&Xt(a,e,t),iu(e,t)}}var Us=!0;function Q0(e,t,a,l){var n=k.T;k.T=null;var i=H.p;try{H.p=2,su(e,t,a,l)}finally{H.p=i,k.T=n}}function Z0(e,t,a,l){var n=k.T;k.T=null;var i=H.p;try{H.p=8,su(e,t,a,l)}finally{H.p=i,k.T=n}}function su(e,t,a,l){if(Us){var n=ru(l);if(n===null)Zc(e,t,l,Ls,a),Eh(e,l);else if(K0(n,e,t,a,l))l.stopPropagation();else if(Eh(e,l),t&4&&-1<$0.indexOf(e)){for(;n!==null;){var i=Xl(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=ea(i.pendingLanes);if(o!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;o;){var v=1<<31-it(o);h.entanglements[1]|=v,o&=~v}Ca(i),(Ye&6)===0&&(vs=xt()+500,di(0))}}break;case 31:case 13:h=_l(i,2),h!==null&&Xt(h,i,2),ws(),iu(i,2)}if(i=ru(l),i===null&&Zc(e,t,l,Ls,a),i===n)break;n=i}n!==null&&l.stopPropagation()}else Zc(e,t,l,null,a)}}function ru(e){return e=ur(e),cu(e)}var Ls=null;function cu(e){if(Ls=null,e=Gl(e),e!==null){var t=p(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=m(t),e!==null)return e;e=null}else if(a===31){if(e=S(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Ls=e,null}function Nh(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(It()){case _a:return 2;case K:return 8;case le:case ce:return 32;case ee:return 268435456;default:return 32}default:return 32}}var uu=!1,xl=null,gl=null,yl=null,yi=new Map,vi=new Map,vl=[],$0="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 Eh(e,t){switch(e){case"focusin":case"focusout":xl=null;break;case"dragenter":case"dragleave":gl=null;break;case"mouseover":case"mouseout":yl=null;break;case"pointerover":case"pointerout":yi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vi.delete(t.pointerId)}}function bi(e,t,a,l,n,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:a,eventSystemFlags:l,nativeEvent:i,targetContainers:[n]},t!==null&&(t=Xl(t),t!==null&&Sh(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function K0(e,t,a,l,n){switch(t){case"focusin":return xl=bi(xl,e,t,a,l,n),!0;case"dragenter":return gl=bi(gl,e,t,a,l,n),!0;case"mouseover":return yl=bi(yl,e,t,a,l,n),!0;case"pointerover":var i=n.pointerId;return yi.set(i,bi(yi.get(i)||null,e,t,a,l,n)),!0;case"gotpointercapture":return i=n.pointerId,vi.set(i,bi(vi.get(i)||null,e,t,a,l,n)),!0}return!1}function Ch(e){var t=Gl(e.target);if(t!==null){var a=p(t);if(a!==null){if(t=a.tag,t===13){if(t=m(a),t!==null){e.blockedOn=t,Ut(e.priority,function(){jh(a)});return}}else if(t===31){if(t=S(a),t!==null){e.blockedOn=t,Ut(e.priority,function(){jh(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Hs(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=ru(e.nativeEvent);if(a===null){a=e.nativeEvent;var l=new a.constructor(a.type,a);cr=l,a.target.dispatchEvent(l),cr=null}else return t=Xl(a),t!==null&&Sh(t),e.blockedOn=a,!1;t.shift()}return!0}function Ah(e,t,a){Hs(e)&&a.delete(t)}function J0(){uu=!1,xl!==null&&Hs(xl)&&(xl=null),gl!==null&&Hs(gl)&&(gl=null),yl!==null&&Hs(yl)&&(yl=null),yi.forEach(Ah),vi.forEach(Ah)}function Bs(e,t){e.blockedOn===t&&(e.blockedOn=null,uu||(uu=!0,s.unstable_scheduleCallback(s.unstable_NormalPriority,J0)))}var qs=null;function Th(e){qs!==e&&(qs=e,s.unstable_scheduleCallback(s.unstable_NormalPriority,function(){qs===e&&(qs=null);for(var t=0;t<e.length;t+=3){var a=e[t],l=e[t+1],n=e[t+2];if(typeof l!="function"){if(cu(l||a)===null)continue;break}var i=Xl(a);i!==null&&(e.splice(t,3),t-=3,rc(i,{pending:!0,data:n,method:a.method,action:l},l,n))}}))}function Cn(e){function t(v){return Bs(v,e)}xl!==null&&Bs(xl,e),gl!==null&&Bs(gl,e),yl!==null&&Bs(yl,e),yi.forEach(t),vi.forEach(t);for(var a=0;a<vl.length;a++){var l=vl[a];l.blockedOn===e&&(l.blockedOn=null)}for(;0<vl.length&&(a=vl[0],a.blockedOn===null);)Ch(a),a.blockedOn===null&&vl.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(l=0;l<a.length;l+=3){var n=a[l],i=a[l+1],o=n[Se]||null;if(typeof i=="function")o||Th(a);else if(o){var h=null;if(i&&i.hasAttribute("formAction")){if(n=i,o=i[Se]||null)h=o.formAction;else if(cu(n)!==null)continue}else h=o.action;typeof h=="function"?a[l+1]=h:(a.splice(l,3),l-=3),Th(a)}}}function _h(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return n=o})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),l||setTimeout(a,20)}function a(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function ou(e){this._internalRoot=e}Vs.prototype.render=ou.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var a=t.current,l=Ft();bh(a,l,e,t,null,null)},Vs.prototype.unmount=ou.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;bh(e.current,2,null,e,null,null),ws(),t[Ht]=null}};function Vs(e){this._internalRoot=e}Vs.prototype.unstable_scheduleHydration=function(e){if(e){var t=Fa();e={blockedOn:null,target:e,priority:t};for(var a=0;a<vl.length&&t!==0&&t<vl[a].priority;a++);vl.splice(a,0,e),a===0&&Ch(e)}};var Rh=c.version;if(Rh!=="19.2.3")throw Error(u(527,Rh,"19.2.3"));H.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=x(t),e=e!==null?E(e):null,e=e===null?null:e.stateNode,e};var W0={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ys=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ys.isDisabled&&Ys.supportsFiber)try{at=Ys.inject(W0),Ue=Ys}catch{}}return Si.createRoot=function(e,t){if(!f(e))throw Error(u(299));var a=!1,l="",n=Ud,i=Ld,o=Hd;return t!=null&&(t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=yh(e,1,!1,null,null,a,l,null,n,i,o,_h),e[Ht]=t.current,Qc(e),new ou(t)},Si.hydrateRoot=function(e,t,a){if(!f(e))throw Error(u(299));var l=!1,n="",i=Ud,o=Ld,h=Hd,v=null;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(n=a.identifierPrefix),a.onUncaughtError!==void 0&&(i=a.onUncaughtError),a.onCaughtError!==void 0&&(o=a.onCaughtError),a.onRecoverableError!==void 0&&(h=a.onRecoverableError),a.formState!==void 0&&(v=a.formState)),t=yh(e,1,!0,t,a??null,l,n,v,i,o,h,_h),t.context=vh(null),a=t.current,l=Ft(),l=I(l),n=nl(l),n.callback=null,il(a,n,l),a=l,t.current.lanes=a,Fe(t,a),Ca(t),e[Ht]=t.current,Qc(e),new Vs(t)},Si.version="19.2.3",Si}var qh;function rx(){if(qh)return hu.exports;qh=1;function s(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(s)}catch(c){console.error(c)}}return s(),hu.exports=sx(),hu.exports}var cx=rx();const ux=np(cx);var Vh="popstate";function ox(s={}){function c(u,f){let{pathname:p,search:m,hash:S}=u.location;return Eu("",{pathname:p,search:m,hash:S},f.state&&f.state.usr||null,f.state&&f.state.key||"default")}function d(u,f){return typeof f=="string"?f:Ei(f)}return fx(c,d,null,s)}function nt(s,c){if(s===!1||s===null||typeof s>"u")throw new Error(c)}function ga(s,c){if(!s){typeof console<"u"&&console.warn(c);try{throw new Error(c)}catch{}}}function dx(){return Math.random().toString(36).substring(2,10)}function Yh(s,c){return{usr:s.state,key:s.key,idx:c}}function Eu(s,c,d=null,u){return{pathname:typeof s=="string"?s:s.pathname,search:"",hash:"",...typeof c=="string"?_n(c):c,state:d,key:c&&c.key||u||dx()}}function Ei({pathname:s="/",search:c="",hash:d=""}){return c&&c!=="?"&&(s+=c.charAt(0)==="?"?c:"?"+c),d&&d!=="#"&&(s+=d.charAt(0)==="#"?d:"#"+d),s}function _n(s){let c={};if(s){let d=s.indexOf("#");d>=0&&(c.hash=s.substring(d),s=s.substring(0,d));let u=s.indexOf("?");u>=0&&(c.search=s.substring(u),s=s.substring(0,u)),s&&(c.pathname=s)}return c}function fx(s,c,d,u={}){let{window:f=document.defaultView,v5Compat:p=!1}=u,m=f.history,S="POP",b=null,x=E();x==null&&(x=0,m.replaceState({...m.state,idx:x},""));function E(){return(m.state||{idx:null}).idx}function w(){S="POP";let O=E(),L=O==null?null:O-x;x=O,b&&b({action:S,location:j.location,delta:L})}function D(O,L){S="PUSH";let G=Eu(j.location,O,L);x=E()+1;let Z=Yh(G,x),ne=j.createHref(G);try{m.pushState(Z,"",ne)}catch(te){if(te instanceof DOMException&&te.name==="DataCloneError")throw te;f.location.assign(ne)}p&&b&&b({action:S,location:j.location,delta:1})}function B(O,L){S="REPLACE";let G=Eu(j.location,O,L);x=E();let Z=Yh(G,x),ne=j.createHref(G);m.replaceState(Z,"",ne),p&&b&&b({action:S,location:j.location,delta:0})}function R(O){return hx(O)}let j={get action(){return S},get location(){return s(f,m)},listen(O){if(b)throw new Error("A history only accepts one active listener");return f.addEventListener(Vh,w),b=O,()=>{f.removeEventListener(Vh,w),b=null}},createHref(O){return c(f,O)},createURL:R,encodeLocation(O){let L=R(O);return{pathname:L.pathname,search:L.search,hash:L.hash}},push:D,replace:B,go(O){return m.go(O)}};return j}function hx(s,c=!1){let d="http://localhost";typeof window<"u"&&(d=window.location.origin!=="null"?window.location.origin:window.location.href),nt(d,"No window.location.(origin|href) available to create URL");let u=typeof s=="string"?s:Ei(s);return u=u.replace(/ $/,"%20"),!c&&u.startsWith("//")&&(u=d+u),new URL(u,d)}function ip(s,c,d="/"){return px(s,c,d,!1)}function px(s,c,d,u){let f=typeof c=="string"?_n(c):c,p=Ja(f.pathname||"/",d);if(p==null)return null;let m=sp(s);mx(m);let S=null;for(let b=0;S==null&&b<m.length;++b){let x=Cx(p);S=Nx(m[b],x,u)}return S}function sp(s,c=[],d=[],u="",f=!1){let p=(m,S,b=f,x)=>{let E={relativePath:x===void 0?m.path||"":x,caseSensitive:m.caseSensitive===!0,childrenIndex:S,route:m};if(E.relativePath.startsWith("/")){if(!E.relativePath.startsWith(u)&&b)return;nt(E.relativePath.startsWith(u),`Absolute route path "${E.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),E.relativePath=E.relativePath.slice(u.length)}let w=Ka([u,E.relativePath]),D=d.concat(E);m.children&&m.children.length>0&&(nt(m.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${w}".`),sp(m.children,c,D,w,b)),!(m.path==null&&!m.index)&&c.push({path:w,score:Sx(w,m.index),routesMeta:D})};return s.forEach((m,S)=>{if(m.path===""||!m.path?.includes("?"))p(m,S);else for(let b of rp(m.path))p(m,S,!0,b)}),c}function rp(s){let c=s.split("/");if(c.length===0)return[];let[d,...u]=c,f=d.endsWith("?"),p=d.replace(/\?$/,"");if(u.length===0)return f?[p,""]:[p];let m=rp(u.join("/")),S=[];return S.push(...m.map(b=>b===""?p:[p,b].join("/"))),f&&S.push(...m),S.map(b=>s.startsWith("/")&&b===""?"/":b)}function mx(s){s.sort((c,d)=>c.score!==d.score?d.score-c.score:jx(c.routesMeta.map(u=>u.childrenIndex),d.routesMeta.map(u=>u.childrenIndex)))}var xx=/^:[\w-]+$/,gx=3,yx=2,vx=1,bx=10,wx=-2,Gh=s=>s==="*";function Sx(s,c){let d=s.split("/"),u=d.length;return d.some(Gh)&&(u+=wx),c&&(u+=yx),d.filter(f=>!Gh(f)).reduce((f,p)=>f+(xx.test(p)?gx:p===""?vx:bx),u)}function jx(s,c){return s.length===c.length&&s.slice(0,-1).every((u,f)=>u===c[f])?s[s.length-1]-c[c.length-1]:0}function Nx(s,c,d=!1){let{routesMeta:u}=s,f={},p="/",m=[];for(let S=0;S<u.length;++S){let b=u[S],x=S===u.length-1,E=p==="/"?c:c.slice(p.length)||"/",w=Ps({path:b.relativePath,caseSensitive:b.caseSensitive,end:x},E),D=b.route;if(!w&&x&&d&&!u[u.length-1].route.index&&(w=Ps({path:b.relativePath,caseSensitive:b.caseSensitive,end:!1},E)),!w)return null;Object.assign(f,w.params),m.push({params:f,pathname:Ka([p,w.pathname]),pathnameBase:Rx(Ka([p,w.pathnameBase])),route:D}),w.pathnameBase!=="/"&&(p=Ka([p,w.pathnameBase]))}return m}function Ps(s,c){typeof s=="string"&&(s={path:s,caseSensitive:!1,end:!0});let[d,u]=Ex(s.path,s.caseSensitive,s.end),f=c.match(d);if(!f)return null;let p=f[0],m=p.replace(/(.)\/+$/,"$1"),S=f.slice(1);return{params:u.reduce((x,{paramName:E,isOptional:w},D)=>{if(E==="*"){let R=S[D]||"";m=p.slice(0,p.length-R.length).replace(/(.)\/+$/,"$1")}const B=S[D];return w&&!B?x[E]=void 0:x[E]=(B||"").replace(/%2F/g,"/"),x},{}),pathname:p,pathnameBase:m,pattern:s}}function Ex(s,c=!1,d=!0){ga(s==="*"||!s.endsWith("*")||s.endsWith("/*"),`Route path "${s}" will be treated as if it were "${s.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${s.replace(/\*$/,"/*")}".`);let u=[],f="^"+s.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(m,S,b)=>(u.push({paramName:S,isOptional:b!=null}),b?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return s.endsWith("*")?(u.push({paramName:"*"}),f+=s==="*"||s==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):d?f+="\\/*$":s!==""&&s!=="/"&&(f+="(?:(?=\\/|$))"),[new RegExp(f,c?void 0:"i"),u]}function Cx(s){try{return s.split("/").map(c=>decodeURIComponent(c).replace(/\//g,"%2F")).join("/")}catch(c){return ga(!1,`The URL path "${s}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${c}).`),s}}function Ja(s,c){if(c==="/")return s;if(!s.toLowerCase().startsWith(c.toLowerCase()))return null;let d=c.endsWith("/")?c.length-1:c.length,u=s.charAt(d);return u&&u!=="/"?null:s.slice(d)||"/"}var cp=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ax=s=>cp.test(s);function Tx(s,c="/"){let{pathname:d,search:u="",hash:f=""}=typeof s=="string"?_n(s):s,p;if(d)if(Ax(d))p=d;else{if(d.includes("//")){let m=d;d=d.replace(/\/\/+/g,"/"),ga(!1,`Pathnames cannot have embedded double slashes - normalizing ${m} -> ${d}`)}d.startsWith("/")?p=Xh(d.substring(1),"/"):p=Xh(d,c)}else p=c;return{pathname:p,search:zx(u),hash:Mx(f)}}function Xh(s,c){let d=c.replace(/\/+$/,"").split("/");return s.split("/").forEach(f=>{f===".."?d.length>1&&d.pop():f!=="."&&d.push(f)}),d.length>1?d.join("/"):"/"}function gu(s,c,d,u){return`Cannot include a '${s}' character in a manually specified \`to.${c}\` field [${JSON.stringify(u)}]. Please separate it out to the \`to.${d}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function _x(s){return s.filter((c,d)=>d===0||c.route.path&&c.route.path.length>0)}function up(s){let c=_x(s);return c.map((d,u)=>u===c.length-1?d.pathname:d.pathnameBase)}function op(s,c,d,u=!1){let f;typeof s=="string"?f=_n(s):(f={...s},nt(!f.pathname||!f.pathname.includes("?"),gu("?","pathname","search",f)),nt(!f.pathname||!f.pathname.includes("#"),gu("#","pathname","hash",f)),nt(!f.search||!f.search.includes("#"),gu("#","search","hash",f)));let p=s===""||f.pathname==="",m=p?"/":f.pathname,S;if(m==null)S=d;else{let w=c.length-1;if(!u&&m.startsWith("..")){let D=m.split("/");for(;D[0]==="..";)D.shift(),w-=1;f.pathname=D.join("/")}S=w>=0?c[w]:"/"}let b=Tx(f,S),x=m&&m!=="/"&&m.endsWith("/"),E=(p||m===".")&&d.endsWith("/");return!b.pathname.endsWith("/")&&(x||E)&&(b.pathname+="/"),b}var Ka=s=>s.join("/").replace(/\/\/+/g,"/"),Rx=s=>s.replace(/\/+$/,"").replace(/^\/*/,"/"),zx=s=>!s||s==="?"?"":s.startsWith("?")?s:"?"+s,Mx=s=>!s||s==="#"?"":s.startsWith("#")?s:"#"+s,Ox=class{constructor(s,c,d,u=!1){this.status=s,this.statusText=c||"",this.internal=u,d instanceof Error?(this.data=d.toString(),this.error=d):this.data=d}};function Dx(s){return s!=null&&typeof s.status=="number"&&typeof s.statusText=="string"&&typeof s.internal=="boolean"&&"data"in s}function kx(s){return s.map(c=>c.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var dp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function fp(s,c){let d=s;if(typeof d!="string"||!cp.test(d))return{absoluteURL:void 0,isExternal:!1,to:d};let u=d,f=!1;if(dp)try{let p=new URL(window.location.href),m=d.startsWith("//")?new URL(p.protocol+d):new URL(d),S=Ja(m.pathname,c);m.origin===p.origin&&S!=null?d=S+m.search+m.hash:f=!0}catch{ga(!1,`<Link to="${d}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:f,to:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var hp=["POST","PUT","PATCH","DELETE"];new Set(hp);var Ux=["GET",...hp];new Set(Ux);var Rn=g.createContext(null);Rn.displayName="DataRouter";var er=g.createContext(null);er.displayName="DataRouterState";var Lx=g.createContext(!1),pp=g.createContext({isTransitioning:!1});pp.displayName="ViewTransition";var Hx=g.createContext(new Map);Hx.displayName="Fetchers";var Bx=g.createContext(null);Bx.displayName="Await";var da=g.createContext(null);da.displayName="Navigation";var Ti=g.createContext(null);Ti.displayName="Location";var Ta=g.createContext({outlet:null,matches:[],isDataRoute:!1});Ta.displayName="Route";var Mu=g.createContext(null);Mu.displayName="RouteError";var mp="REACT_ROUTER_ERROR",qx="REDIRECT",Vx="ROUTE_ERROR_RESPONSE";function Yx(s){if(s.startsWith(`${mp}:${qx}:{`))try{let c=JSON.parse(s.slice(28));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string"&&typeof c.location=="string"&&typeof c.reloadDocument=="boolean"&&typeof c.replace=="boolean")return c}catch{}}function Gx(s){if(s.startsWith(`${mp}:${Vx}:{`))try{let c=JSON.parse(s.slice(40));if(typeof c=="object"&&c&&typeof c.status=="number"&&typeof c.statusText=="string")return new Ox(c.status,c.statusText,c.data)}catch{}}function Xx(s,{relative:c}={}){nt(_i(),"useHref() may be used only in the context of a <Router> component.");let{basename:d,navigator:u}=g.useContext(da),{hash:f,pathname:p,search:m}=Ri(s,{relative:c}),S=p;return d!=="/"&&(S=p==="/"?d:Ka([d,p])),u.createHref({pathname:S,search:m,hash:f})}function _i(){return g.useContext(Ti)!=null}function wl(){return nt(_i(),"useLocation() may be used only in the context of a <Router> component."),g.useContext(Ti).location}var xp="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function gp(s){g.useContext(da).static||g.useLayoutEffect(s)}function zn(){let{isDataRoute:s}=g.useContext(Ta);return s?lg():Qx()}function Qx(){nt(_i(),"useNavigate() may be used only in the context of a <Router> component.");let s=g.useContext(Rn),{basename:c,navigator:d}=g.useContext(da),{matches:u}=g.useContext(Ta),{pathname:f}=wl(),p=JSON.stringify(up(u)),m=g.useRef(!1);return gp(()=>{m.current=!0}),g.useCallback((b,x={})=>{if(ga(m.current,xp),!m.current)return;if(typeof b=="number"){d.go(b);return}let E=op(b,JSON.parse(p),f,x.relative==="path");s==null&&c!=="/"&&(E.pathname=E.pathname==="/"?c:Ka([c,E.pathname])),(x.replace?d.replace:d.push)(E,x.state,x)},[c,d,p,f,s])}g.createContext(null);function yp(){let{matches:s}=g.useContext(Ta),c=s[s.length-1];return c?c.params:{}}function Ri(s,{relative:c}={}){let{matches:d}=g.useContext(Ta),{pathname:u}=wl(),f=JSON.stringify(up(d));return g.useMemo(()=>op(s,JSON.parse(f),u,c==="path"),[s,f,u,c])}function Zx(s,c){return vp(s,c)}function vp(s,c,d,u,f){nt(_i(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:p}=g.useContext(da),{matches:m}=g.useContext(Ta),S=m[m.length-1],b=S?S.params:{},x=S?S.pathname:"/",E=S?S.pathnameBase:"/",w=S&&S.route;{let G=w&&w.path||"";wp(x,!w||G.endsWith("*")||G.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${x}" (under <Route path="${G}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
+
11
+ Please change the parent <Route path="${G}"> to <Route path="${G==="/"?"*":`${G}/*`}">.`)}let D=wl(),B;if(c){let G=typeof c=="string"?_n(c):c;nt(E==="/"||G.pathname?.startsWith(E),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${E}" but pathname "${G.pathname}" was given in the \`location\` prop.`),B=G}else B=D;let R=B.pathname||"/",j=R;if(E!=="/"){let G=E.replace(/^\//,"").split("/");j="/"+R.replace(/^\//,"").split("/").slice(G.length).join("/")}let O=ip(s,{pathname:j});ga(w||O!=null,`No routes matched location "${B.pathname}${B.search}${B.hash}" `),ga(O==null||O[O.length-1].route.element!==void 0||O[O.length-1].route.Component!==void 0||O[O.length-1].route.lazy!==void 0,`Matched leaf route at location "${B.pathname}${B.search}${B.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let L=Fx(O&&O.map(G=>Object.assign({},G,{params:Object.assign({},b,G.params),pathname:Ka([E,p.encodeLocation?p.encodeLocation(G.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathname]),pathnameBase:G.pathnameBase==="/"?E:Ka([E,p.encodeLocation?p.encodeLocation(G.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:G.pathnameBase])})),m,d,u,f);return c&&L?g.createElement(Ti.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...B},navigationType:"POP"}},L):L}function $x(){let s=ag(),c=Dx(s)?`${s.status} ${s.statusText}`:s instanceof Error?s.message:JSON.stringify(s),d=s instanceof Error?s.stack:null,u="rgba(200,200,200, 0.5)",f={padding:"0.5rem",backgroundColor:u},p={padding:"2px 4px",backgroundColor:u},m=null;return console.error("Error handled by React Router default ErrorBoundary:",s),m=g.createElement(g.Fragment,null,g.createElement("p",null,"💿 Hey developer 👋"),g.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",g.createElement("code",{style:p},"ErrorBoundary")," or"," ",g.createElement("code",{style:p},"errorElement")," prop on your route.")),g.createElement(g.Fragment,null,g.createElement("h2",null,"Unexpected Application Error!"),g.createElement("h3",{style:{fontStyle:"italic"}},c),d?g.createElement("pre",{style:f},d):null,m)}var Kx=g.createElement($x,null),bp=class extends g.Component{constructor(s){super(s),this.state={location:s.location,revalidation:s.revalidation,error:s.error}}static getDerivedStateFromError(s){return{error:s}}static getDerivedStateFromProps(s,c){return c.location!==s.location||c.revalidation!=="idle"&&s.revalidation==="idle"?{error:s.error,location:s.location,revalidation:s.revalidation}:{error:s.error!==void 0?s.error:c.error,location:c.location,revalidation:s.revalidation||c.revalidation}}componentDidCatch(s,c){this.props.onError?this.props.onError(s,c):console.error("React Router caught the following error during render",s)}render(){let s=this.state.error;if(this.context&&typeof s=="object"&&s&&"digest"in s&&typeof s.digest=="string"){const d=Gx(s.digest);d&&(s=d)}let c=s!==void 0?g.createElement(Ta.Provider,{value:this.props.routeContext},g.createElement(Mu.Provider,{value:s,children:this.props.component})):this.props.children;return this.context?g.createElement(Jx,{error:s},c):c}};bp.contextType=Lx;var yu=new WeakMap;function Jx({children:s,error:c}){let{basename:d}=g.useContext(da);if(typeof c=="object"&&c&&"digest"in c&&typeof c.digest=="string"){let u=Yx(c.digest);if(u){let f=yu.get(c);if(f)throw f;let p=fp(u.location,d);if(dp&&!yu.get(c))if(p.isExternal||u.reloadDocument)window.location.href=p.absoluteURL||p.to;else{const m=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(p.to,{replace:u.replace}));throw yu.set(c,m),m}return g.createElement("meta",{httpEquiv:"refresh",content:`0;url=${p.absoluteURL||p.to}`})}}return s}function Wx({routeContext:s,match:c,children:d}){let u=g.useContext(Rn);return u&&u.static&&u.staticContext&&(c.route.errorElement||c.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=c.route.id),g.createElement(Ta.Provider,{value:s},d)}function Fx(s,c=[],d=null,u=null,f=null){if(s==null){if(!d)return null;if(d.errors)s=d.matches;else if(c.length===0&&!d.initialized&&d.matches.length>0)s=d.matches;else return null}let p=s,m=d?.errors;if(m!=null){let E=p.findIndex(w=>w.route.id&&m?.[w.route.id]!==void 0);nt(E>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(m).join(",")}`),p=p.slice(0,Math.min(p.length,E+1))}let S=!1,b=-1;if(d)for(let E=0;E<p.length;E++){let w=p[E];if((w.route.HydrateFallback||w.route.hydrateFallbackElement)&&(b=E),w.route.id){let{loaderData:D,errors:B}=d,R=w.route.loader&&!D.hasOwnProperty(w.route.id)&&(!B||B[w.route.id]===void 0);if(w.route.lazy||R){S=!0,b>=0?p=p.slice(0,b+1):p=[p[0]];break}}}let x=d&&u?(E,w)=>{u(E,{location:d.location,params:d.matches?.[0]?.params??{},unstable_pattern:kx(d.matches),errorInfo:w})}:void 0;return p.reduceRight((E,w,D)=>{let B,R=!1,j=null,O=null;d&&(B=m&&w.route.id?m[w.route.id]:void 0,j=w.route.errorElement||Kx,S&&(b<0&&D===0?(wp("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,O=null):b===D&&(R=!0,O=w.route.hydrateFallbackElement||null)));let L=c.concat(p.slice(0,D+1)),G=()=>{let Z;return B?Z=j:R?Z=O:w.route.Component?Z=g.createElement(w.route.Component,null):w.route.element?Z=w.route.element:Z=E,g.createElement(Wx,{match:w,routeContext:{outlet:E,matches:L,isDataRoute:d!=null},children:Z})};return d&&(w.route.ErrorBoundary||w.route.errorElement||D===0)?g.createElement(bp,{location:d.location,revalidation:d.revalidation,component:j,error:B,children:G(),routeContext:{outlet:null,matches:L,isDataRoute:!0},onError:x}):G()},null)}function Ou(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ix(s){let c=g.useContext(Rn);return nt(c,Ou(s)),c}function Px(s){let c=g.useContext(er);return nt(c,Ou(s)),c}function eg(s){let c=g.useContext(Ta);return nt(c,Ou(s)),c}function Du(s){let c=eg(s),d=c.matches[c.matches.length-1];return nt(d.route.id,`${s} can only be used on routes that contain a unique "id"`),d.route.id}function tg(){return Du("useRouteId")}function ag(){let s=g.useContext(Mu),c=Px("useRouteError"),d=Du("useRouteError");return s!==void 0?s:c.errors?.[d]}function lg(){let{router:s}=Ix("useNavigate"),c=Du("useNavigate"),d=g.useRef(!1);return gp(()=>{d.current=!0}),g.useCallback(async(f,p={})=>{ga(d.current,xp),d.current&&(typeof f=="number"?await s.navigate(f):await s.navigate(f,{fromRouteId:c,...p}))},[s,c])}var Qh={};function wp(s,c,d){!c&&!Qh[s]&&(Qh[s]=!0,ga(!1,d))}g.memo(ng);function ng({routes:s,future:c,state:d,onError:u}){return vp(s,void 0,d,u,c)}function Aa(s){nt(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function ig({basename:s="/",children:c=null,location:d,navigationType:u="POP",navigator:f,static:p=!1,unstable_useTransitions:m}){nt(!_i(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let S=s.replace(/^\/*/,"/"),b=g.useMemo(()=>({basename:S,navigator:f,static:p,unstable_useTransitions:m,future:{}}),[S,f,p,m]);typeof d=="string"&&(d=_n(d));let{pathname:x="/",search:E="",hash:w="",state:D=null,key:B="default"}=d,R=g.useMemo(()=>{let j=Ja(x,S);return j==null?null:{location:{pathname:j,search:E,hash:w,state:D,key:B},navigationType:u}},[S,x,E,w,D,B,u]);return ga(R!=null,`<Router basename="${S}"> is not able to match the URL "${x}${E}${w}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:g.createElement(da.Provider,{value:b},g.createElement(Ti.Provider,{children:c,value:R}))}function sg({children:s,location:c}){return Zx(Cu(s),c)}function Cu(s,c=[]){let d=[];return g.Children.forEach(s,(u,f)=>{if(!g.isValidElement(u))return;let p=[...c,f];if(u.type===g.Fragment){d.push.apply(d,Cu(u.props.children,p));return}nt(u.type===Aa,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),nt(!u.props.index||!u.props.children,"An index route cannot have child routes.");let m={id:u.props.id||p.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(m.children=Cu(u.props.children,p)),d.push(m)}),d}var Fs="get",Is="application/x-www-form-urlencoded";function tr(s){return typeof HTMLElement<"u"&&s instanceof HTMLElement}function rg(s){return tr(s)&&s.tagName.toLowerCase()==="button"}function cg(s){return tr(s)&&s.tagName.toLowerCase()==="form"}function ug(s){return tr(s)&&s.tagName.toLowerCase()==="input"}function og(s){return!!(s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)}function dg(s,c){return s.button===0&&(!c||c==="_self")&&!og(s)}var Gs=null;function fg(){if(Gs===null)try{new FormData(document.createElement("form"),0),Gs=!1}catch{Gs=!0}return Gs}var hg=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function vu(s){return s!=null&&!hg.has(s)?(ga(!1,`"${s}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Is}"`),null):s}function pg(s,c){let d,u,f,p,m;if(cg(s)){let S=s.getAttribute("action");u=S?Ja(S,c):null,d=s.getAttribute("method")||Fs,f=vu(s.getAttribute("enctype"))||Is,p=new FormData(s)}else if(rg(s)||ug(s)&&(s.type==="submit"||s.type==="image")){let S=s.form;if(S==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let b=s.getAttribute("formaction")||S.getAttribute("action");if(u=b?Ja(b,c):null,d=s.getAttribute("formmethod")||S.getAttribute("method")||Fs,f=vu(s.getAttribute("formenctype"))||vu(S.getAttribute("enctype"))||Is,p=new FormData(S,s),!fg()){let{name:x,type:E,value:w}=s;if(E==="image"){let D=x?`${x}.`:"";p.append(`${D}x`,"0"),p.append(`${D}y`,"0")}else x&&p.append(x,w)}}else{if(tr(s))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');d=Fs,u=null,f=Is,m=s}return p&&f==="text/plain"&&(m=p,p=void 0),{action:u,method:d.toLowerCase(),encType:f,formData:p,body:m}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function ku(s,c){if(s===!1||s===null||typeof s>"u")throw new Error(c)}function mg(s,c,d){let u=typeof s=="string"?new URL(s,typeof window>"u"?"server://singlefetch/":window.location.origin):s;return u.pathname==="/"?u.pathname=`_root.${d}`:c&&Ja(u.pathname,c)==="/"?u.pathname=`${c.replace(/\/$/,"")}/_root.${d}`:u.pathname=`${u.pathname.replace(/\/$/,"")}.${d}`,u}async function xg(s,c){if(s.id in c)return c[s.id];try{let d=await import(s.module);return c[s.id]=d,d}catch(d){return console.error(`Error loading route module \`${s.module}\`, reloading page...`),console.error(d),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function gg(s){return s==null?!1:s.href==null?s.rel==="preload"&&typeof s.imageSrcSet=="string"&&typeof s.imageSizes=="string":typeof s.rel=="string"&&typeof s.href=="string"}async function yg(s,c,d){let u=await Promise.all(s.map(async f=>{let p=c.routes[f.route.id];if(p){let m=await xg(p,d);return m.links?m.links():[]}return[]}));return Sg(u.flat(1).filter(gg).filter(f=>f.rel==="stylesheet"||f.rel==="preload").map(f=>f.rel==="stylesheet"?{...f,rel:"prefetch",as:"style"}:{...f,rel:"prefetch"}))}function Zh(s,c,d,u,f,p){let m=(b,x)=>d[x]?b.route.id!==d[x].route.id:!0,S=(b,x)=>d[x].pathname!==b.pathname||d[x].route.path?.endsWith("*")&&d[x].params["*"]!==b.params["*"];return p==="assets"?c.filter((b,x)=>m(b,x)||S(b,x)):p==="data"?c.filter((b,x)=>{let E=u.routes[b.route.id];if(!E||!E.hasLoader)return!1;if(m(b,x)||S(b,x))return!0;if(b.route.shouldRevalidate){let w=b.route.shouldRevalidate({currentUrl:new URL(f.pathname+f.search+f.hash,window.origin),currentParams:d[0]?.params||{},nextUrl:new URL(s,window.origin),nextParams:b.params,defaultShouldRevalidate:!0});if(typeof w=="boolean")return w}return!0}):[]}function vg(s,c,{includeHydrateFallback:d}={}){return bg(s.map(u=>{let f=c.routes[u.route.id];if(!f)return[];let p=[f.module];return f.clientActionModule&&(p=p.concat(f.clientActionModule)),f.clientLoaderModule&&(p=p.concat(f.clientLoaderModule)),d&&f.hydrateFallbackModule&&(p=p.concat(f.hydrateFallbackModule)),f.imports&&(p=p.concat(f.imports)),p}).flat(1))}function bg(s){return[...new Set(s)]}function wg(s){let c={},d=Object.keys(s).sort();for(let u of d)c[u]=s[u];return c}function Sg(s,c){let d=new Set;return new Set(c),s.reduce((u,f)=>{let p=JSON.stringify(wg(f));return d.has(p)||(d.add(p),u.push({key:p,link:f})),u},[])}function Sp(){let s=g.useContext(Rn);return ku(s,"You must render this element inside a <DataRouterContext.Provider> element"),s}function jg(){let s=g.useContext(er);return ku(s,"You must render this element inside a <DataRouterStateContext.Provider> element"),s}var Uu=g.createContext(void 0);Uu.displayName="FrameworkContext";function jp(){let s=g.useContext(Uu);return ku(s,"You must render this element inside a <HydratedRouter> element"),s}function Ng(s,c){let d=g.useContext(Uu),[u,f]=g.useState(!1),[p,m]=g.useState(!1),{onFocus:S,onBlur:b,onMouseEnter:x,onMouseLeave:E,onTouchStart:w}=c,D=g.useRef(null);g.useEffect(()=>{if(s==="render"&&m(!0),s==="viewport"){let j=L=>{L.forEach(G=>{m(G.isIntersecting)})},O=new IntersectionObserver(j,{threshold:.5});return D.current&&O.observe(D.current),()=>{O.disconnect()}}},[s]),g.useEffect(()=>{if(u){let j=setTimeout(()=>{m(!0)},100);return()=>{clearTimeout(j)}}},[u]);let B=()=>{f(!0)},R=()=>{f(!1),m(!1)};return d?s!=="intent"?[p,D,{}]:[p,D,{onFocus:ji(S,B),onBlur:ji(b,R),onMouseEnter:ji(x,B),onMouseLeave:ji(E,R),onTouchStart:ji(w,B)}]:[!1,D,{}]}function ji(s,c){return d=>{s&&s(d),d.defaultPrevented||c(d)}}function Eg({page:s,...c}){let{router:d}=Sp(),u=g.useMemo(()=>ip(d.routes,s,d.basename),[d.routes,s,d.basename]);return u?g.createElement(Ag,{page:s,matches:u,...c}):null}function Cg(s){let{manifest:c,routeModules:d}=jp(),[u,f]=g.useState([]);return g.useEffect(()=>{let p=!1;return yg(s,c,d).then(m=>{p||f(m)}),()=>{p=!0}},[s,c,d]),u}function Ag({page:s,matches:c,...d}){let u=wl(),{manifest:f,routeModules:p}=jp(),{basename:m}=Sp(),{loaderData:S,matches:b}=jg(),x=g.useMemo(()=>Zh(s,c,b,f,u,"data"),[s,c,b,f,u]),E=g.useMemo(()=>Zh(s,c,b,f,u,"assets"),[s,c,b,f,u]),w=g.useMemo(()=>{if(s===u.pathname+u.search+u.hash)return[];let R=new Set,j=!1;if(c.forEach(L=>{let G=f.routes[L.route.id];!G||!G.hasLoader||(!x.some(Z=>Z.route.id===L.route.id)&&L.route.id in S&&p[L.route.id]?.shouldRevalidate||G.hasClientLoader?j=!0:R.add(L.route.id))}),R.size===0)return[];let O=mg(s,m,"data");return j&&R.size>0&&O.searchParams.set("_routes",c.filter(L=>R.has(L.route.id)).map(L=>L.route.id).join(",")),[O.pathname+O.search]},[m,S,u,f,x,c,s,p]),D=g.useMemo(()=>vg(E,f),[E,f]),B=Cg(E);return g.createElement(g.Fragment,null,w.map(R=>g.createElement("link",{key:R,rel:"prefetch",as:"fetch",href:R,...d})),D.map(R=>g.createElement("link",{key:R,rel:"modulepreload",href:R,...d})),B.map(({key:R,link:j})=>g.createElement("link",{key:R,nonce:d.nonce,...j})))}function Tg(...s){return c=>{s.forEach(d=>{typeof d=="function"?d(c):d!=null&&(d.current=c)})}}var _g=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{_g&&(window.__reactRouterVersion="7.11.0")}catch{}function Rg({basename:s,children:c,unstable_useTransitions:d,window:u}){let f=g.useRef();f.current==null&&(f.current=ox({window:u,v5Compat:!0}));let p=f.current,[m,S]=g.useState({action:p.action,location:p.location}),b=g.useCallback(x=>{d===!1?S(x):g.startTransition(()=>S(x))},[d]);return g.useLayoutEffect(()=>p.listen(b),[p,b]),g.createElement(ig,{basename:s,children:c,location:m.location,navigationType:m.action,navigator:p,unstable_useTransitions:d})}var Np=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ep=g.forwardRef(function({onClick:c,discover:d="render",prefetch:u="none",relative:f,reloadDocument:p,replace:m,state:S,target:b,to:x,preventScrollReset:E,viewTransition:w,unstable_defaultShouldRevalidate:D,...B},R){let{basename:j,unstable_useTransitions:O}=g.useContext(da),L=typeof x=="string"&&Np.test(x),G=fp(x,j);x=G.to;let Z=Xx(x,{relative:f}),[ne,te,ae]=Ng(u,B),P=Dg(x,{replace:m,state:S,target:b,preventScrollReset:E,relative:f,viewTransition:w,unstable_defaultShouldRevalidate:D,unstable_useTransitions:O});function he(ve){c&&c(ve),ve.defaultPrevented||P(ve)}let F=g.createElement("a",{...B,...ae,href:G.absoluteURL||Z,onClick:G.isExternal||p?c:he,ref:Tg(R,te),target:b,"data-discover":!L&&d==="render"?"true":void 0});return ne&&!L?g.createElement(g.Fragment,null,F,g.createElement(Eg,{page:Z})):F});Ep.displayName="Link";var zg=g.forwardRef(function({"aria-current":c="page",caseSensitive:d=!1,className:u="",end:f=!1,style:p,to:m,viewTransition:S,children:b,...x},E){let w=Ri(m,{relative:x.relative}),D=wl(),B=g.useContext(er),{navigator:R,basename:j}=g.useContext(da),O=B!=null&&Bg(w)&&S===!0,L=R.encodeLocation?R.encodeLocation(w).pathname:w.pathname,G=D.pathname,Z=B&&B.navigation&&B.navigation.location?B.navigation.location.pathname:null;d||(G=G.toLowerCase(),Z=Z?Z.toLowerCase():null,L=L.toLowerCase()),Z&&j&&(Z=Ja(Z,j)||Z);const ne=L!=="/"&&L.endsWith("/")?L.length-1:L.length;let te=G===L||!f&&G.startsWith(L)&&G.charAt(ne)==="/",ae=Z!=null&&(Z===L||!f&&Z.startsWith(L)&&Z.charAt(L.length)==="/"),P={isActive:te,isPending:ae,isTransitioning:O},he=te?c:void 0,F;typeof u=="function"?F=u(P):F=[u,te?"active":null,ae?"pending":null,O?"transitioning":null].filter(Boolean).join(" ");let ve=typeof p=="function"?p(P):p;return g.createElement(Ep,{...x,"aria-current":he,className:F,ref:E,style:ve,to:m,viewTransition:S},typeof b=="function"?b(P):b)});zg.displayName="NavLink";var Mg=g.forwardRef(({discover:s="render",fetcherKey:c,navigate:d,reloadDocument:u,replace:f,state:p,method:m=Fs,action:S,onSubmit:b,relative:x,preventScrollReset:E,viewTransition:w,unstable_defaultShouldRevalidate:D,...B},R)=>{let{unstable_useTransitions:j}=g.useContext(da),O=Lg(),L=Hg(S,{relative:x}),G=m.toLowerCase()==="get"?"get":"post",Z=typeof S=="string"&&Np.test(S),ne=te=>{if(b&&b(te),te.defaultPrevented)return;te.preventDefault();let ae=te.nativeEvent.submitter,P=ae?.getAttribute("formmethod")||m,he=()=>O(ae||te.currentTarget,{fetcherKey:c,method:P,navigate:d,replace:f,state:p,relative:x,preventScrollReset:E,viewTransition:w,unstable_defaultShouldRevalidate:D});j&&d!==!1?g.startTransition(()=>he()):he()};return g.createElement("form",{ref:R,method:G,action:L,onSubmit:u?b:ne,...B,"data-discover":!Z&&s==="render"?"true":void 0})});Mg.displayName="Form";function Og(s){return`${s} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Cp(s){let c=g.useContext(Rn);return nt(c,Og(s)),c}function Dg(s,{target:c,replace:d,state:u,preventScrollReset:f,relative:p,viewTransition:m,unstable_defaultShouldRevalidate:S,unstable_useTransitions:b}={}){let x=zn(),E=wl(),w=Ri(s,{relative:p});return g.useCallback(D=>{if(dg(D,c)){D.preventDefault();let B=d!==void 0?d:Ei(E)===Ei(w),R=()=>x(s,{replace:B,state:u,preventScrollReset:f,relative:p,viewTransition:m,unstable_defaultShouldRevalidate:S});b?g.startTransition(()=>R()):R()}},[E,x,w,d,u,c,s,f,p,m,S,b])}var kg=0,Ug=()=>`__${String(++kg)}__`;function Lg(){let{router:s}=Cp("useSubmit"),{basename:c}=g.useContext(da),d=tg(),u=s.fetch,f=s.navigate;return g.useCallback(async(p,m={})=>{let{action:S,method:b,encType:x,formData:E,body:w}=pg(p,c);if(m.navigate===!1){let D=m.fetcherKey||Ug();await u(D,d,m.action||S,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:E,body:w,formMethod:m.method||b,formEncType:m.encType||x,flushSync:m.flushSync})}else await f(m.action||S,{unstable_defaultShouldRevalidate:m.unstable_defaultShouldRevalidate,preventScrollReset:m.preventScrollReset,formData:E,body:w,formMethod:m.method||b,formEncType:m.encType||x,replace:m.replace,state:m.state,fromRouteId:d,flushSync:m.flushSync,viewTransition:m.viewTransition})},[u,f,c,d])}function Hg(s,{relative:c}={}){let{basename:d}=g.useContext(da),u=g.useContext(Ta);nt(u,"useFormAction must be used inside a RouteContext");let[f]=u.matches.slice(-1),p={...Ri(s||".",{relative:c})},m=wl();if(s==null){p.search=m.search;let S=new URLSearchParams(p.search),b=S.getAll("index");if(b.some(E=>E==="")){S.delete("index"),b.filter(w=>w).forEach(w=>S.append("index",w));let E=S.toString();p.search=E?`?${E}`:""}}return(!s||s===".")&&f.route.index&&(p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index"),d!=="/"&&(p.pathname=p.pathname==="/"?d:Ka([d,p.pathname])),Ei(p)}function Bg(s,{relative:c}={}){let d=g.useContext(pp);nt(d!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=Cp("useViewTransitionState"),f=Ri(s,{relative:c});if(!d.isTransitioning)return!1;let p=Ja(d.currentLocation.pathname,u)||d.currentLocation.pathname,m=Ja(d.nextLocation.pathname,u)||d.nextLocation.pathname;return Ps(f.pathname,m)!=null||Ps(f.pathname,p)!=null}const qg=s=>s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Vg=s=>s.replace(/^([A-Z])|[\s-_]+(\w)/g,(c,d,u)=>u?u.toUpperCase():d.toLowerCase()),$h=s=>{const c=Vg(s);return c.charAt(0).toUpperCase()+c.slice(1)},Ap=(...s)=>s.filter((c,d,u)=>!!c&&c.trim()!==""&&u.indexOf(c)===d).join(" ").trim(),Yg=s=>{for(const c in s)if(c.startsWith("aria-")||c==="role"||c==="title")return!0};var Gg={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const Xg=g.forwardRef(({color:s="currentColor",size:c=24,strokeWidth:d=2,absoluteStrokeWidth:u,className:f="",children:p,iconNode:m,...S},b)=>g.createElement("svg",{ref:b,...Gg,width:c,height:c,stroke:s,strokeWidth:u?Number(d)*24/Number(c):d,className:Ap("lucide",f),...!p&&!Yg(S)&&{"aria-hidden":"true"},...S},[...m.map(([x,E])=>g.createElement(x,E)),...Array.isArray(p)?p:[p]]));const Ee=(s,c)=>{const d=g.forwardRef(({className:u,...f},p)=>g.createElement(Xg,{ref:p,iconNode:c,className:Ap(`lucide-${qg($h(s))}`,`lucide-${s}`,u),...f}));return d.displayName=$h(s),d};const Qg=[["path",{d:"m3 16 4 4 4-4",key:"1co6wj"}],["path",{d:"M7 20V4",key:"1yoxec"}],["path",{d:"m21 8-4-4-4 4",key:"1c9v7m"}],["path",{d:"M17 4v16",key:"7dpous"}]],Zg=Ee("arrow-down-up",Qg);const $g=[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]],Tp=Ee("camera",$g);const Kg=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ci=Ee("check",Kg);const Jg=[["path",{d:"M9 9.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997A1 1 0 0 1 9 14.996z",key:"kmsa83"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Wg=Ee("circle-play",Jg);const Fg=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Ig=Ee("clock",Fg);const Pg=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],ey=Ee("cloud",Pg);const ty=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],ay=Ee("code",ty);const ly=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Ai=Ee("copy",ly);const ny=[["path",{d:"m10 15 5 5 5-5",key:"1hpjnr"}],["path",{d:"M4 4h7a4 4 0 0 1 4 4v12",key:"wcbgct"}]],iy=Ee("corner-right-down",ny);const sy=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],_p=Ee("database",sy);const ry=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],cy=Ee("download",ry);const uy=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],oy=Ee("eye-off",uy);const dy=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],fy=Ee("eye",dy);const hy=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],py=Ee("globe",hy);const my=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],Rp=Ee("history",my);const xy=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],gy=Ee("house",xy);const yy=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],vy=Ee("keyboard",yy);const by=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],wy=Ee("layers",by);const Sy=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],jy=Ee("list",Sy);const Ny=[["path",{d:"m16 17 5-5-5-5",key:"1bji2h"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}]],Ey=Ee("log-out",Ny);const Cy=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],Ay=Ee("monitor",Cy);const Ty=[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]],_y=Ee("mouse-pointer-2",Ty);const Ry=[["path",{d:"M6 8L2 12L6 16",key:"kyvwex"}],["path",{d:"M2 12H22",key:"1m8cig"}]],zy=Ee("move-left",Ry);const My=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Oy=Ee("play",My);const Dy=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],ky=Ee("plus",Dy);const Uy=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],zp=Ee("refresh-cw",Uy);const Ly=[["path",{d:"m17 2 4 4-4 4",key:"nntrym"}],["path",{d:"M3 11v-1a4 4 0 0 1 4-4h14",key:"84bu3i"}],["path",{d:"m7 22-4-4 4-4",key:"1wqhfi"}],["path",{d:"M21 13v1a4 4 0 0 1-4 4H3",key:"1rx37r"}]],Hy=Ee("repeat",Ly);const By=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],qy=Ee("rocket",By);const Vy=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Yy=Ee("settings",Vy);const Gy=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Xy=Ee("shield-check",Gy);const Qy=[["path",{d:"M16 3h5v5",key:"1806ms"}],["path",{d:"M8 3H3v5",key:"15dfkv"}],["path",{d:"M12 22v-8.3a4 4 0 0 0-1.172-2.872L3 3",key:"1qrqzj"}],["path",{d:"m15 9 6-6",key:"ko1vev"}]],Zy=Ee("split",Qy);const $y=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Kh=Ee("square",$y);const Ky=[["path",{d:"M8.34 8.34 2 9.27l5 4.87L5.82 21 12 17.77 18.18 21l-.59-3.43",key:"16m0ql"}],["path",{d:"M18.42 12.76 22 9.27l-6.91-1L12 2l-1.44 2.91",key:"1vt8nq"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]],Jy=Ee("star-off",Ky);const Wy=[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]],Fy=Ee("star",Wy);const Iy=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],Py=Ee("table",Iy);const ev=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],tv=Ee("target",ev);const av=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],lv=Ee("terminal",av);const nv=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Lu=Ee("trash-2",nv);const iv=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],sv=Ee("triangle-alert",iv);const rv=[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]],cv=Ee("type",rv);const uv=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],ov=Ee("upload",uv);const dv=[["path",{d:"M8 21s-4-3-4-9 4-9 4-9",key:"uto9ud"}],["path",{d:"M16 3s4 3 4 9-4 9-4 9",key:"4w2vsq"}],["line",{x1:"15",x2:"9",y1:"9",y2:"15",key:"f7djnv"}],["line",{x1:"9",x2:"15",y1:"9",y2:"15",key:"1shsy8"}]],fv=Ee("variable",dv);const hv=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Hu=Ee("x",hv),pv=({onNavigate:s,onNewTask:c,onLogout:d,currentScreen:u})=>r.jsxs("aside",{className:"w-20 h-full border-r border-white/10 glass flex flex-col items-center py-8 shrink-0 z-50",children:[r.jsx("button",{onClick:()=>s("dashboard"),className:"mb-12 hover:opacity-80 transition-opacity",children:r.jsx("img",{src:"/icon.png",alt:"Logo",className:"w-10 h-10",onError:f=>{f.currentTarget.src="/icon.png"}})}),r.jsxs("div",{className:"flex-1 flex flex-col gap-6",children:[r.jsx("button",{onClick:c,className:"w-12 h-12 rounded-2xl flex items-center justify-center text-white bg-white/5 hover:bg-white/10 transition-all",title:"New Task",children:r.jsx(ky,{className:"w-6 h-6"})}),r.jsx("button",{onClick:()=>s("dashboard"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all ${u==="dashboard"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Dashboard",children:r.jsx(gy,{className:"w-6 h-6"})}),r.jsx("button",{onClick:()=>s("settings"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all ${u==="settings"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Settings",children:r.jsx(Yy,{className:"w-6 h-6"})}),r.jsx("button",{onClick:()=>s("executions"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all ${u==="executions"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Executions",children:r.jsx(Rp,{className:"w-6 h-6"})}),r.jsx("button",{onClick:()=>s("captures"),className:`w-12 h-12 rounded-2xl flex items-center justify-center transition-all ${u==="captures"?"bg-white/10 text-white":"text-gray-500 hover:bg-white/5 hover:text-white"}`,title:"Captures",children:r.jsx(Tp,{className:"w-6 h-6"})})]}),r.jsx("button",{onClick:d,className:"w-12 h-12 rounded-2xl flex items-center justify-center text-gray-500 hover:bg-red-500/10 hover:text-red-500 transition-all",title:"Logout",children:r.jsx(Ey,{className:"w-6 h-6"})})]}),mv=({status:s,onSubmit:c,error:d})=>{const[u,f]=g.useState(""),[p,m]=g.useState(""),[S,b]=g.useState(""),[x,E]=g.useState(""),w=()=>{c(p,S,u,x)};return r.jsxs("div",{className:"fixed inset-0 z-[100] bg-[#020202] flex items-center justify-center",children:[r.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none",style:{backgroundImage:"radial-gradient(#fff 1px, transparent 1px)",backgroundSize:"40px 40px"}}),r.jsxs("div",{className:"w-[400px] glass-card p-10 rounded-[48px] space-y-8 relative",children:[r.jsxs("div",{className:"text-center space-y-2",children:[r.jsx("h1",{className:"text-2xl font-bold tracking-tighter text-white uppercase",children:"Doppelganger"}),r.jsx("p",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-[0.3em]",children:s==="setup"?"Initializing System":"Access Restricted"})]}),r.jsxs("div",{className:"space-y-4",children:[s==="setup"&&r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Name"}),r.jsx("input",{type:"text",value:u,onChange:D=>f(D.target.value),placeholder:"Full Name",className:"w-full bg-white/[0.05] border border-white/10 rounded-2xl px-5 py-4 text-sm focus:outline-none focus:border-white/30 transition-all placeholder:text-gray-600"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Email"}),r.jsx("input",{type:"email",value:p,onChange:D=>m(D.target.value),placeholder:"user@example.com",className:"w-full bg-white/[0.05] border border-white/10 rounded-2xl px-5 py-4 text-sm focus:outline-none focus:border-white/30 transition-all placeholder:text-gray-600"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Password"}),r.jsx("input",{type:"password",value:S,onChange:D=>b(D.target.value),placeholder:"••••••••",className:"w-full bg-white/[0.05] border border-white/10 rounded-2xl px-5 py-4 text-sm focus:outline-none focus:border-white/30 transition-all placeholder:text-gray-600"})]}),s==="setup"&&r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Confirm Password"}),r.jsx("input",{type:"password",value:x,onChange:D=>E(D.target.value),placeholder:"••••••••",className:"w-full bg-white/[0.05] border border-white/10 rounded-2xl px-5 py-4 text-sm focus:outline-none focus:border-white/30 transition-all placeholder:text-gray-600"})]})]}),r.jsx("button",{onClick:w,className:"shine-effect w-full bg-white text-black py-4 rounded-2xl font-bold text-[10px] tracking-[0.3em] uppercase hover:scale-[1.02] active:scale-[0.98] transition-all",children:s==="setup"?"Create Account":"Authenticate"}),d&&r.jsx("div",{className:"text-[9px] font-bold text-red-500 text-center uppercase tracking-widest",children:d})]})]})},Jh=({tasks:s,onNewTask:c,onEditTask:d,onDeleteTask:u,onExportTasks:f,onImportTasks:p})=>{const m=g.useRef(null),S=E=>{try{return E?`https://www.google.com/s2/favicons?domain=${new URL(E).hostname}&sz=64`:null}catch{return null}},b=()=>{m.current?.click()},x=E=>{const w=E.target.files?.[0];w&&p(w),E.target.value=""};return r.jsx("div",{className:"flex-1 overflow-hidden animate-in fade-in duration-500",children:r.jsxs("div",{className:"h-full flex flex-col px-12 py-12 max-w-7xl mx-auto space-y-12 w-full",children:[r.jsxs("div",{className:"flex items-end justify-between",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-[10px] font-bold text-blue-500 uppercase tracking-[0.4em]",children:"Status"}),r.jsx("h2",{className:"text-4xl font-bold tracking-tighter text-white",children:"Dashboard"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("button",{onClick:f,className:"px-4 py-3 rounded-2xl border border-white/10 text-white text-[9px] font-bold uppercase tracking-[0.3em] hover:bg-white/5 transition-all",children:[r.jsx(cy,{className:"w-4 h-4 inline-block mr-2"}),"Export"]}),r.jsxs("button",{onClick:b,className:"px-4 py-3 rounded-2xl border border-white/10 text-white text-[9px] font-bold uppercase tracking-[0.3em] hover:bg-white/5 transition-all",children:[r.jsx(ov,{className:"w-4 h-4 inline-block mr-2"}),"Import"]}),r.jsx("button",{onClick:c,className:"shine-effect bg-white text-black px-8 py-3 rounded-2xl font-bold text-[10px] tracking-[0.2em] uppercase transition-all hover:scale-105 active:scale-95",children:"+ New Task"}),r.jsx("input",{ref:m,type:"file",accept:"application/json",className:"hidden",onChange:x})]})]}),r.jsxs("div",{className:"relative flex-1 min-h-0",children:[r.jsx("div",{className:"pointer-events-none absolute top-0 left-0 right-0 h-10 bg-gradient-to-b from-[#050505] via-[#050505]/50 to-transparent z-10"}),r.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6 overflow-y-auto custom-scrollbar pb-12 pr-4 h-full",children:s.map(E=>{const w=S(E.url);return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] flex flex-col gap-6 group hover:-translate-y-1",children:[r.jsxs("div",{className:"flex justify-between items-start",children:[r.jsx("div",{className:"w-12 h-12 rounded-2xl bg-white/5 border border-white/10 flex items-center justify-center overflow-hidden",children:w?r.jsx("img",{src:w,alt:"",className:"w-6 h-6 object-contain",onError:D=>{D.target.style.display="none"}}):r.jsx(py,{className:"w-5 h-5 text-gray-500"})}),r.jsx("div",{className:"px-3 py-1 rounded-full bg-white/5 text-[7px] font-bold uppercase tracking-widest text-gray-500",children:E.mode})]}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-lg font-bold text-white truncate",children:E.name||"Untitled"}),r.jsx("p",{className:"text-[10px] text-gray-600 font-mono truncate mt-1",children:E.url||"Target undefined"})]}),r.jsxs("div",{className:"flex gap-3 pt-4 border-t border-white/5",children:[r.jsx("button",{onClick:()=>d(E),className:"flex-1 py-2 rounded-xl bg-white text-black text-[9px] font-bold uppercase tracking-widest hover:scale-105 transition-all",children:"Edit Task"}),r.jsx("button",{onClick:()=>u(E.id),className:"w-10 h-10 rounded-xl bg-white/5 border border-white/10 flex items-center justify-center hover:bg-red-500/10 hover:text-red-500 transition-all",children:r.jsx(Hu,{className:"w-4 h-4"})})]})]},E.id)})})]}),s.length===0&&r.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center space-y-6 opacity-20",children:[r.jsx("div",{className:"w-20 h-20 border-2 border-dashed border-white rounded-[40px] flex items-center justify-center text-3xl",children:r.jsx(qy,{className:"w-8 h-8 text-white/70"})}),r.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.3em]",children:"No Tasks Found"})]})]})})},vt=s=>s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;"),xv=new Set(["const","let","var","function","return","if","else","for","while","do","switch","case","break","continue","try","catch","finally","throw","new","class","extends","super","import","from","export","default","await","async","typeof","instanceof","in","of","this"]),Mp=(s,c)=>{const d=/\{\$(\w+)\}/g;let u="",f=0,p;const m=b=>!!c&&(b in c||b==="now"),S=b=>{if(b==="now")return!0;const x=c?c[b]:void 0;return x&&x.value!==""&&x.value!==void 0&&x.value!==null};for(;(p=d.exec(s))!==null;){p.index>f&&(u+=vt(s.substring(f,p.index)));const b=p[1],x=m(b),E=S(b);u+=`<span class="${x?E?"var-highlight-default":"var-highlight":"var-highlight-undefined"}">${vt(p[0])}</span>`,f=d.lastIndex}return u+=vt(s.substring(f)),u},gv=s=>{const c=/("(?:\\.|[^"\\])*")|(-?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b)|\b(true|false|null)\b/g;let d="",u=0,f;for(;(f=c.exec(s))!==null;){f.index>u&&(d+=vt(s.substring(u,f.index)));const p=f[0];if(f[1]){let m=!1,S=f.index+p.length;for(;S<s.length&&/\s/.test(s[S]);)S+=1;s[S]===":"&&(m=!0),d+=`<span class="${m?"code-token-key":"code-token-string"}">${vt(p)}</span>`}else f[2]?d+=`<span class="code-token-number">${vt(p)}</span>`:d+=`<span class="code-token-boolean">${vt(p)}</span>`;u=c.lastIndex}return d+=vt(s.substring(u)),d},yv=(s,c)=>{const d=/(\{\$\w+\})|(\/\/[^\n]*|\/\*[\s\S]*?\*\/)|("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|`(?:\\.|[^`\\])*`)|(\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b)|(\btrue\b|\bfalse\b|\bnull\b|\bundefined\b)|(\b[A-Za-z_]\w*\b)/g;let u="",f=0,p;for(;(p=d.exec(s))!==null;){p.index>f&&(u+=vt(s.substring(f,p.index)));const m=p[0];if(p[1])u+=Mp(m,c);else if(p[2])u+=`<span class="code-token-comment">${vt(m)}</span>`;else if(p[3])u+=`<span class="code-token-string">${vt(m)}</span>`;else if(p[4])u+=`<span class="code-token-number">${vt(m)}</span>`;else if(p[5])u+=`<span class="code-token-boolean">${vt(m)}</span>`;else if(p[6]){const S=xv.has(m)?"code-token-keyword":"code-token-identifier";u+=`<span class="${S}">${vt(m)}</span>`}else u+=vt(m);f=d.lastIndex}return u+=vt(s.substring(f)),u},vv=s=>{const c=/<\/?[^>]+>/g;let d="",u=0,f;for(;(f=c.exec(s))!==null;){f.index>u&&(d+=vt(s.substring(u,f.index)));const p=f[0];let m=vt(p);m=m.replace(/^(&lt;\/?)([A-Za-z0-9-]+)/,'$1<span class="code-token-tag">$2</span>'),m=m.replace(/(\s)([A-Za-z0-9-:]+)(=)/g,'$1<span class="code-token-attr">$2</span>$3'),m=m.replace(/(&quot;.*?&quot;|&#39;.*?&#39;)/g,'<span class="code-token-string">$1</span>'),d+=`<span class="code-token-punct">${m}</span>`,u=c.lastIndex}return d+=vt(s.substring(u)),d},Op=(s,c,d)=>c==="javascript"?yv(s,d):c==="json"?gv(s):c==="html"?vv(s):Mp(s,d),Ot=({value:s,onChange:c,placeholder:d,variables:u,className:f,syntax:p="plain"})=>{const m=g.useRef(null);return g.useEffect(()=>{if(m.current){const S=m.current.innerHTML,b=Op(s,p,u);if(S!==b){const x=window.getSelection();let E=0;if(x&&x.rangeCount>0){const w=x.getRangeAt(0),D=w.cloneRange();D.selectNodeContents(m.current),D.setEnd(w.endContainer,w.endOffset),E=D.toString().length}if(m.current.innerHTML=b,E>0){const w=document.createTreeWalker(m.current,NodeFilter.SHOW_TEXT);let D=0,B=w.nextNode();for(;B;){const R=B.textContent?.length||0;if(D+R>=E){const j=document.createRange();j.setStart(B,E-D),j.collapse(!0),x?.removeAllRanges(),x?.addRange(j);break}D+=R,B=w.nextNode()}}}}},[s,u]),r.jsx("div",{ref:m,contentEditable:!0,className:`rich-input-content w-full bg-transparent focus:outline-none text-white min-h-[1.5rem] ${f}`,"data-placeholder":d,onInput:S=>c(S.currentTarget.textContent||""),onBlur:S=>c(S.currentTarget.textContent||"")})},Tn=({value:s,onChange:c,language:d,placeholder:u,className:f,readOnly:p,variables:m})=>{const S=g.useRef(null),b=g.useRef(null),x=s||u||"",E=!s&&!!u,w=g.useMemo(()=>Op(x,d,m),[x,d,m]);return g.useEffect(()=>{const D=S.current,B=b.current;if(!D||!B)return;const R=()=>{B.scrollTop=D.scrollTop,B.scrollLeft=D.scrollLeft};return D.addEventListener("scroll",R),()=>{D.removeEventListener("scroll",R)}},[]),r.jsxs("div",{className:`code-editor ${f||""}`,onWheel:D=>{const B=S.current;B&&(B.scrollHeight<=B.clientHeight||(B.scrollTop+=D.deltaY,B.scrollLeft+=D.deltaX,B.focus(),D.preventDefault()))},children:[r.jsx("pre",{ref:b,className:`code-editor-pre ${E?"code-editor-placeholder":""}`,"aria-hidden":!0,dangerouslySetInnerHTML:{__html:w}}),r.jsx("textarea",{ref:S,value:s,onChange:D=>c?.(D.target.value),spellCheck:!1,wrap:"off",readOnly:p,className:`code-editor-textarea ${p?"code-editor-textarea-readonly":""}`,"aria-label":"Code editor",tabIndex:p?-1:0})]})},Au=[{type:"click",label:"Click",description:"Click an element"},{type:"type",label:"Type",description:"Type text into a field"},{type:"hover",label:"Hover",description:"Hover an element"},{type:"press",label:"Press",description:"Press a key"},{type:"wait",label:"Wait",description:"Pause for seconds"},{type:"scroll",label:"Scroll",description:"Scroll the page or container"},{type:"javascript",label:"JavaScript",description:"Run custom JS"},{type:"csv",label:"CSV",description:"Parse CSV into rows"},{type:"merge",label:"Merge",description:"Merge inputs into a single output"},{type:"screenshot",label:"Screenshot",description:"Capture a screenshot"},{type:"if",label:"If",description:"Conditional block start"},{type:"else",label:"Else",description:"Conditional alternate path"},{type:"end",label:"End Block",description:"Close a block"},{type:"while",label:"While",description:"Loop while condition true"},{type:"repeat",label:"Repeat N",description:"Repeat block N times"},{type:"foreach",label:"For Each",description:"Loop through items"},{type:"set",label:"Set Variable",description:"Update variable value"},{type:"stop",label:"Stop Task",description:"Stop task with status"},{type:"on_error",label:"On Error",description:"Run on failure"},{type:"start",label:"Start Task",description:"Run another task"}],bv=({open:s,query:c,onQueryChange:d,onClose:u,onSelect:f})=>{const p=g.useRef(null),m=g.useMemo(()=>{const S=c.trim().toLowerCase();return S?Au.filter(b=>b.label.toLowerCase().includes(S)||b.description.toLowerCase().includes(S)):Au},[c]);return s?r.jsx("div",{className:"fixed inset-0 z-[190] flex items-center justify-center bg-black/70 backdrop-blur-sm px-6",onClick:u,children:r.jsxs("div",{className:"glass-card w-full max-w-xl rounded-[28px] border border-white/10 p-6 shadow-2xl",onClick:S=>S.stopPropagation(),children:[r.jsxs("div",{className:"flex items-center justify-between mb-4",children:[r.jsxs("div",{children:[r.jsx("p",{className:"text-[9px] font-bold uppercase tracking-[0.4em] text-gray-500",children:"Add Block"}),r.jsx("p",{className:"text-xs text-gray-400 mt-1",children:"Search actions and control flow blocks."})]}),r.jsx("button",{onClick:u,className:"p-2 rounded-xl border border-white/10 text-white/70 hover:text-white hover:bg-white/5 transition-all","aria-label":"Close",children:r.jsx(Hu,{className:"w-4 h-4"})})]}),r.jsx("input",{ref:S=>{p.current=S,S&&S.focus()},value:c,onChange:S=>d(S.target.value),placeholder:"Type to filter (e.g., if, click, loop)",className:"w-full rounded-xl bg-black/40 border border-white/10 px-4 py-3 text-sm text-white placeholder:text-gray-600 focus:outline-none focus:border-white/30"}),r.jsxs("div",{className:"mt-4 max-h-[320px] overflow-y-auto custom-scrollbar space-y-2",children:[m.map(S=>r.jsxs("button",{onClick:()=>f(S.type),className:"w-full text-left px-4 py-3 rounded-xl border border-white/5 bg-white/[0.02] hover:bg-white/[0.06] transition-all",children:[r.jsx("div",{className:"text-[10px] font-bold uppercase tracking-widest text-white",children:S.label}),r.jsx("div",{className:"text-[9px] text-gray-500 mt-1",children:S.description})]},S.type)),m.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No matches."})]})]})}):null},wv=({task:s,onChange:c,onCopy:d,copiedId:u})=>{const[f,p]=g.useState(()=>JSON.stringify(s,null,2)),[m,S]=g.useState(!1),b=x=>{const E=s,w={...E,...x&&typeof x=="object"?x:{}};return(!w.name||typeof w.name!="string")&&(w.name=E.name||"Task"),(!w.mode||!["scrape","agent","headful"].includes(w.mode))&&(w.mode=E.mode||"agent"),typeof w.wait!="number"&&(w.wait=typeof E.wait=="number"?E.wait:3),w.stealth||(w.stealth=E.stealth),(!w.variables||Array.isArray(w.variables))&&(w.variables=E.variables||{}),Array.isArray(w.actions)||(w.actions=E.actions||[]),w.extractionFormat||(w.extractionFormat=E.extractionFormat||"json"),w.includeShadowDom===void 0&&(w.includeShadowDom=E.includeShadowDom??!0),E.id&&w.id!==E.id&&(w.id=E.id),delete w.versions,delete w.last_opened,w};return g.useEffect(()=>{m||p(JSON.stringify(s,null,2))},[s,m]),r.jsxs("div",{className:"h-full flex flex-col min-h-0",children:[r.jsxs("div",{className:"flex items-center justify-between mb-3",children:[r.jsx("span",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Protocol JSON"}),r.jsxs("button",{onClick:()=>{d(JSON.stringify(s,null,2),"json")},className:`px-4 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 ${u==="json"?"bg-green-500/10 border-green-500/20 text-green-400":"bg-white/5 border-white/10 text-white hover:bg-white/10"}`,children:[u==="json"?r.jsx(Ci,{className:"w-3 h-3"}):r.jsx(Ai,{className:"w-3 h-3"}),u==="json"?"Copied":"Copy"]})]}),r.jsx(Tn,{value:f,onChange:x=>{p(x);try{const E=JSON.parse(x),w=b(E);c(w),S(!1)}catch{S(!0)}},language:"json",className:"flex-1 min-h-0"})]})};function Tu(){return Tu=Object.assign?Object.assign.bind():function(s){for(var c=1;c<arguments.length;c++){var d=arguments[c];for(var u in d)({}).hasOwnProperty.call(d,u)&&(s[u]=d[u])}return s},Tu.apply(null,arguments)}function Wh(s){if(s===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return s}function _u(s,c){return _u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,u){return d.__proto__=u,d},_u(s,c)}function Sv(s,c){s.prototype=Object.create(c.prototype),s.prototype.constructor=s,_u(s,c)}var Fh=Number.isNaN||function(c){return typeof c=="number"&&c!==c};function jv(s,c){return!!(s===c||Fh(s)&&Fh(c))}function Nv(s,c){if(s.length!==c.length)return!1;for(var d=0;d<s.length;d++)if(!jv(s[d],c[d]))return!1;return!0}function bu(s,c){c===void 0&&(c=Nv);var d,u=[],f,p=!1;function m(){for(var S=[],b=0;b<arguments.length;b++)S[b]=arguments[b];return p&&d===this&&c(S,u)||(f=s.apply(this,S),p=!0,d=this,u=S),f}return m}var Ev=typeof performance=="object"&&typeof performance.now=="function",Ih=Ev?function(){return performance.now()}:function(){return Date.now()};function Ph(s){cancelAnimationFrame(s.id)}function Cv(s,c){var d=Ih();function u(){Ih()-d>=c?s.call(null):f.id=requestAnimationFrame(u)}var f={id:requestAnimationFrame(u)};return f}var wu=-1;function ep(s){if(s===void 0&&(s=!1),wu===-1||s){var c=document.createElement("div"),d=c.style;d.width="50px",d.height="50px",d.overflow="scroll",document.body.appendChild(c),wu=c.offsetWidth-c.clientWidth,document.body.removeChild(c)}return wu}var An=null;function tp(s){if(s===void 0&&(s=!1),An===null||s){var c=document.createElement("div"),d=c.style;d.width="50px",d.height="50px",d.overflow="scroll",d.direction="rtl";var u=document.createElement("div"),f=u.style;return f.width="100px",f.height="100px",c.appendChild(u),document.body.appendChild(c),c.scrollLeft>0?An="positive-descending":(c.scrollLeft=1,c.scrollLeft===0?An="negative":An="positive-ascending"),document.body.removeChild(c),An}return An}var Av=150,Tv=function(c,d){return c};function _v(s){var c,d=s.getItemOffset,u=s.getEstimatedTotalSize,f=s.getItemSize,p=s.getOffsetForIndexAndAlignment,m=s.getStartIndexForOffset,S=s.getStopIndexForStartIndex,b=s.initInstanceProps,x=s.shouldResetStyleCacheOnItemSizeChange,E=s.validateProps;return c=(function(w){Sv(D,w);function D(R){var j;return j=w.call(this,R)||this,j._instanceProps=b(j.props,Wh(j)),j._outerRef=void 0,j._resetIsScrollingTimeoutId=null,j.state={instance:Wh(j),isScrolling:!1,scrollDirection:"forward",scrollOffset:typeof j.props.initialScrollOffset=="number"?j.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},j._callOnItemsRendered=void 0,j._callOnItemsRendered=bu(function(O,L,G,Z){return j.props.onItemsRendered({overscanStartIndex:O,overscanStopIndex:L,visibleStartIndex:G,visibleStopIndex:Z})}),j._callOnScroll=void 0,j._callOnScroll=bu(function(O,L,G){return j.props.onScroll({scrollDirection:O,scrollOffset:L,scrollUpdateWasRequested:G})}),j._getItemStyle=void 0,j._getItemStyle=function(O){var L=j.props,G=L.direction,Z=L.itemSize,ne=L.layout,te=j._getItemStyleCache(x&&Z,x&&ne,x&&G),ae;if(te.hasOwnProperty(O))ae=te[O];else{var P=d(j.props,O,j._instanceProps),he=f(j.props,O,j._instanceProps),F=G==="horizontal"||ne==="horizontal",ve=G==="rtl",Ae=F?P:0;te[O]=ae={position:"absolute",left:ve?void 0:Ae,right:ve?Ae:void 0,top:F?0:P,height:F?"100%":he,width:F?he:"100%"}}return ae},j._getItemStyleCache=void 0,j._getItemStyleCache=bu(function(O,L,G){return{}}),j._onScrollHorizontal=function(O){var L=O.currentTarget,G=L.clientWidth,Z=L.scrollLeft,ne=L.scrollWidth;j.setState(function(te){if(te.scrollOffset===Z)return null;var ae=j.props.direction,P=Z;if(ae==="rtl")switch(tp()){case"negative":P=-Z;break;case"positive-descending":P=ne-G-Z;break}return P=Math.max(0,Math.min(P,ne-G)),{isScrolling:!0,scrollDirection:te.scrollOffset<P?"forward":"backward",scrollOffset:P,scrollUpdateWasRequested:!1}},j._resetIsScrollingDebounced)},j._onScrollVertical=function(O){var L=O.currentTarget,G=L.clientHeight,Z=L.scrollHeight,ne=L.scrollTop;j.setState(function(te){if(te.scrollOffset===ne)return null;var ae=Math.max(0,Math.min(ne,Z-G));return{isScrolling:!0,scrollDirection:te.scrollOffset<ae?"forward":"backward",scrollOffset:ae,scrollUpdateWasRequested:!1}},j._resetIsScrollingDebounced)},j._outerRefSetter=function(O){var L=j.props.outerRef;j._outerRef=O,typeof L=="function"?L(O):L!=null&&typeof L=="object"&&L.hasOwnProperty("current")&&(L.current=O)},j._resetIsScrollingDebounced=function(){j._resetIsScrollingTimeoutId!==null&&Ph(j._resetIsScrollingTimeoutId),j._resetIsScrollingTimeoutId=Cv(j._resetIsScrolling,Av)},j._resetIsScrolling=function(){j._resetIsScrollingTimeoutId=null,j.setState({isScrolling:!1},function(){j._getItemStyleCache(-1,null)})},j}D.getDerivedStateFromProps=function(j,O){return Rv(j,O),E(j),null};var B=D.prototype;return B.scrollTo=function(j){j=Math.max(0,j),this.setState(function(O){return O.scrollOffset===j?null:{scrollDirection:O.scrollOffset<j?"forward":"backward",scrollOffset:j,scrollUpdateWasRequested:!0}},this._resetIsScrollingDebounced)},B.scrollToItem=function(j,O){O===void 0&&(O="auto");var L=this.props,G=L.itemCount,Z=L.layout,ne=this.state.scrollOffset;j=Math.max(0,Math.min(j,G-1));var te=0;if(this._outerRef){var ae=this._outerRef;Z==="vertical"?te=ae.scrollWidth>ae.clientWidth?ep():0:te=ae.scrollHeight>ae.clientHeight?ep():0}this.scrollTo(p(this.props,j,O,ne,this._instanceProps,te))},B.componentDidMount=function(){var j=this.props,O=j.direction,L=j.initialScrollOffset,G=j.layout;if(typeof L=="number"&&this._outerRef!=null){var Z=this._outerRef;O==="horizontal"||G==="horizontal"?Z.scrollLeft=L:Z.scrollTop=L}this._callPropsCallbacks()},B.componentDidUpdate=function(){var j=this.props,O=j.direction,L=j.layout,G=this.state,Z=G.scrollOffset,ne=G.scrollUpdateWasRequested;if(ne&&this._outerRef!=null){var te=this._outerRef;if(O==="horizontal"||L==="horizontal")if(O==="rtl")switch(tp()){case"negative":te.scrollLeft=-Z;break;case"positive-ascending":te.scrollLeft=Z;break;default:var ae=te.clientWidth,P=te.scrollWidth;te.scrollLeft=P-ae-Z;break}else te.scrollLeft=Z;else te.scrollTop=Z}this._callPropsCallbacks()},B.componentWillUnmount=function(){this._resetIsScrollingTimeoutId!==null&&Ph(this._resetIsScrollingTimeoutId)},B.render=function(){var j=this.props,O=j.children,L=j.className,G=j.direction,Z=j.height,ne=j.innerRef,te=j.innerElementType,ae=j.innerTagName,P=j.itemCount,he=j.itemData,F=j.itemKey,ve=F===void 0?Tv:F,Ae=j.layout,we=j.outerElementType,Me=j.outerTagName,be=j.style,Ie=j.useIsScrolling,k=j.width,H=this.state.isScrolling,W=G==="horizontal"||Ae==="horizontal",ye=W?this._onScrollHorizontal:this._onScrollVertical,de=this._getRangeToRender(),y=de[0],q=de[1],$=[];if(P>0)for(var Q=y;Q<=q;Q++)$.push(g.createElement(O,{data:he,key:ve(Q,he),index:Q,isScrolling:Ie?H:void 0,style:this._getItemStyle(Q)}));var ie=u(this.props,this._instanceProps);return g.createElement(we||Me||"div",{className:L,onScroll:ye,ref:this._outerRefSetter,style:Tu({position:"relative",height:Z,width:k,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:G},be)},g.createElement(te||ae||"div",{children:$,ref:ne,style:{height:W?"100%":ie,pointerEvents:H?"none":void 0,width:W?ie:"100%"}}))},B._callPropsCallbacks=function(){if(typeof this.props.onItemsRendered=="function"){var j=this.props.itemCount;if(j>0){var O=this._getRangeToRender(),L=O[0],G=O[1],Z=O[2],ne=O[3];this._callOnItemsRendered(L,G,Z,ne)}}if(typeof this.props.onScroll=="function"){var te=this.state,ae=te.scrollDirection,P=te.scrollOffset,he=te.scrollUpdateWasRequested;this._callOnScroll(ae,P,he)}},B._getRangeToRender=function(){var j=this.props,O=j.itemCount,L=j.overscanCount,G=this.state,Z=G.isScrolling,ne=G.scrollDirection,te=G.scrollOffset;if(O===0)return[0,0,0,0];var ae=m(this.props,te,this._instanceProps),P=S(this.props,ae,te,this._instanceProps),he=!Z||ne==="backward"?Math.max(1,L):1,F=!Z||ne==="forward"?Math.max(1,L):1;return[Math.max(0,ae-he),Math.max(0,Math.min(O-1,P+F)),ae,P]},D})(g.PureComponent),c.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},c}var Rv=function(c,d){c.children,c.direction,c.height,c.layout,c.innerTagName,c.outerTagName,c.width,d.instance},ar=_v({getItemOffset:function(c,d){var u=c.itemSize;return d*u},getItemSize:function(c,d){var u=c.itemSize;return u},getEstimatedTotalSize:function(c){var d=c.itemCount,u=c.itemSize;return u*d},getOffsetForIndexAndAlignment:function(c,d,u,f,p,m){var S=c.direction,b=c.height,x=c.itemCount,E=c.itemSize,w=c.layout,D=c.width,B=S==="horizontal"||w==="horizontal",R=B?D:b,j=Math.max(0,x*E-R),O=Math.min(j,d*E),L=Math.max(0,d*E-R+E+m);switch(u==="smart"&&(f>=L-R&&f<=O+R?u="auto":u="center"),u){case"start":return O;case"end":return L;case"center":{var G=Math.round(L+(O-L)/2);return G<Math.ceil(R/2)?0:G>j+Math.floor(R/2)?j:G}default:return f>=L&&f<=O?f:f<L?L:O}},getStartIndexForOffset:function(c,d){var u=c.itemCount,f=c.itemSize;return Math.max(0,Math.min(u-1,Math.floor(d/f)))},getStopIndexForStartIndex:function(c,d,u){var f=c.direction,p=c.height,m=c.itemCount,S=c.itemSize,b=c.layout,x=c.width,E=f==="horizontal"||b==="horizontal",w=d*S,D=E?x:p,B=Math.ceil((D+u-w)/S);return Math.max(0,Math.min(m-1,d+B-1))},initInstanceProps:function(c){},shouldResetStyleCacheOnItemSizeChange:!0,validateProps:function(c){c.itemSize}});const Dp=({capture:s,onDelete:c})=>r.jsxs("div",{className:"rounded-2xl border border-white/10 bg-white/[0.02] overflow-hidden",children:[r.jsxs("div",{className:"p-3 border-b border-white/10 flex items-center justify-between",children:[r.jsx("div",{className:"text-[9px] font-bold text-white uppercase tracking-widest",children:s.type==="recording"?"Recording":"Screenshot"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("a",{href:s.url,target:"_blank",rel:"noreferrer",className:"text-[9px] font-bold uppercase tracking-widest text-blue-300 hover:text-blue-200",children:"Open"}),c&&r.jsx("button",{onClick:()=>c(s.name),className:"text-[9px] font-bold uppercase tracking-widest text-red-300 hover:text-red-200",children:"Delete"})]})]}),r.jsx("div",{className:"bg-black",children:s.type==="recording"?r.jsx("video",{src:s.url,controls:!0,className:"w-full h-64 object-contain bg-black"}):r.jsx("img",{src:s.url,className:"w-full h-64 object-contain bg-black"})}),r.jsx("div",{className:"p-3 text-[9px] text-gray-500 uppercase tracking-widest",children:s.name})]}),Xs=6e4,Su=200,ap=200,Ni=1e6,ju=2e3,Nu=2e3,zv=360,kp=12,Qs=zv+kp,Mv=4,Ov=4,Dv=({index:s,style:c,data:d})=>{const u=d[s];return u?r.jsx("div",{style:{...c,paddingBottom:kp},children:r.jsx(Dp,{capture:u})}):null},kv=s=>`${(s/(1024*1024)).toFixed(2)} MB`,Uv=s=>{if(typeof s=="boolean")return s;if(typeof s=="string"){const c=s.trim().toLowerCase();if(c==="true")return!0;if(c==="false")return!1}return null},Zs=(s,c)=>s.length<=c?{text:s,truncated:!1}:{text:s.slice(0,c),truncated:!0},Lv=s=>!s||s.data===void 0||s.data===null?{reason:"No data to copy."}:{raw:s.data},$s=(s,c,d)=>s.length<=c?s:(d.push(`first ${c.toLocaleString()} chars`),s.slice(0,c)),Hv=s=>{const c=[];if(typeof s=="string")return{text:$s(s,Ni,c),truncated:c.length>0,reason:c.join(", ")};if(Array.isArray(s)){let u=s;s.length>ju&&(u=s.slice(0,ju),c.push(`first ${ju.toLocaleString()} items`));let f="";try{f=JSON.stringify(u,null,2)}catch{f=String(u)}return f=$s(f,Ni,c),{text:f,truncated:c.length>0,reason:c.join(", ")}}if(s&&typeof s=="object"){let u=s;const f=Object.keys(s);f.length>Nu&&(u=f.slice(0,Nu).reduce((m,S)=>(m[S]=s[S],m),{}),c.push(`first ${Nu.toLocaleString()} keys`));let p="";try{p=JSON.stringify(u,null,2)}catch{p=String(u)}return p=$s(p,Ni,c),{text:p,truncated:c.length>0,reason:c.join(", ")}}return{text:$s(String(s),Ni,c),truncated:c.length>0,reason:c.join(", ")}},Bv=s=>{if(typeof s=="string")return s;try{return JSON.stringify(s,null,2)}catch{return String(s)}},lp=s=>{if(!s||s.data===void 0||s.data===null||s.data==="")return{text:"",truncated:!1,language:"plain"};const c=s.data;if(typeof c=="string"){const u=c.trim(),f=u.startsWith("<")&&u.includes(">")?"html":u.startsWith("{")||u.startsWith("[")?"json":"plain",p=Zs(c,Xs);return{text:p.text,truncated:p.truncated,language:f}}if(Array.isArray(c)){const u=c.length>Su?c.slice(0,Su):c,f=JSON.stringify(u,null,2),p=Zs(f,Xs);return{text:p.text,truncated:p.truncated||c.length>Su,language:"json"}}if(c&&typeof c=="object"){const u=Object.keys(c);let f=c,p=!1;u.length>ap&&(p=!0,f=u.slice(0,ap).reduce((b,x)=>(b[x]=c[x],b),{}));const m=JSON.stringify(f,null,2),S=Zs(m,Xs);return{text:S.text,truncated:S.truncated||p,language:"json"}}const d=Zs(String(c),Xs);return{text:d.text,truncated:d.truncated,language:"plain"}},qv=s=>{const c=[];let d=[],u="",f=!1;for(let p=0;p<s.length;p+=1){const m=s[p];f?m==='"'?s[p+1]==='"'?(u+='"',p+=1):f=!1:u+=m:m==='"'?f=!0:m===","?(d.push(u),u=""):m===`
12
+ `?(d.push(u),c.push(d),d=[],u=""):m==="\r"||(u+=m)}return d.push(u),(d.length>1||d[0]!==""||c.length>0)&&c.push(d),c},Vv=s=>{if(!s)return null;if(typeof s=="string"){const c=s.trim();if(!c.includes(",")||!c.includes(`
13
+ `))return null;const d=qv(c).filter(p=>p.some(m=>String(m||"").trim()!==""));if(d.length<2)return null;const u=d[0].map((p,m)=>String(p||"").trim()||`column_${m+1}`),f=d.slice(1);return u.length<2?null:{headers:u,rows:f}}if(Array.isArray(s)){if(s.length===0)return null;if(s.every(c=>c&&typeof c=="object"&&!Array.isArray(c))){const c=[];if(s.forEach(u=>{Object.keys(u).forEach(f=>{c.includes(f)||c.push(f)})}),c.length===0)return null;const d=s.map(u=>c.map(f=>u[f]??""));return{headers:c,rows:d}}if(s.every(c=>Array.isArray(c))){const c=Math.max(...s.map(u=>u.length));return{headers:Array.from({length:c},(u,f)=>`column_${f+1}`),rows:s}}return null}if(s&&typeof s=="object"){const c=Object.keys(s);return c.length===0?null:{headers:c,rows:[c.map(d=>s[d]??"")]}}return null},Yv=(s,c)=>s==null?null:typeof s=="string"?c?{content:s,mime:"text/csv",ext:"csv"}:{content:s,mime:"application/json",ext:"json"}:{content:JSON.stringify(s,null,2),mime:"application/json",ext:"json"},Gv=(s,c,d)=>{const u=new Blob([c],{type:d}),f=URL.createObjectURL(u),p=document.createElement("a");p.href=f,p.download=s,document.body.appendChild(p),p.click(),p.remove(),URL.revokeObjectURL(f)},Up=({results:s,pinnedResults:c,isExecuting:d,isHeadful:u,runId:f,onConfirm:p,onNotify:m,onPin:S,onUnpin:b,fullWidth:x})=>{const[E,w]=g.useState(null),[D,B]=g.useState("raw"),[R,j]=g.useState(()=>c&&!s?"pinned":"latest"),[O,L]=g.useState("checking"),[G,Z]=g.useState(!1),[ne,te]=g.useState(!1),[ae,P]=g.useState([]),he=g.useRef(null),F=R==="pinned"&&c?c:s,ve=Vv(F?.data),Ae=F&&F.data!==void 0&&F.data!==null&&F.data!==""?lp(F):null,we=F?.screenshotUrl?`${F.screenshotUrl}${R==="latest"?`?t=${Date.now()}`:""}`:null,Me=H=>{const W=Uv(H);return W!==null?W?r.jsx(Ci,{className:"w-3 h-3 text-blue-400"}):"":H??""},be=async()=>{te(!0);try{const H=f?`?runId=${encodeURIComponent(f)}`:"",W=await fetch(`/api/data/captures${H}`),ye=W.ok?await W.json():{captures:[]};P(Array.isArray(ye.captures)?ye.captures:[])}catch{P([])}finally{te(!1)}};g.useEffect(()=>{B(ve?"table":"raw")},[F]),g.useEffect(()=>{if(s){j("latest");return}c&&j("pinned")},[s,c]),g.useEffect(()=>{!c&&R==="pinned"&&j("latest")},[c,R]),g.useEffect(()=>{if(!u||R!=="latest")return;let H=!1;return(async()=>{try{const ye=await fetch("/novnc/core/rfb.js",{method:"HEAD",cache:"no-store"});H||L(ye.ok?"novnc":"native")}catch{H||L("native")}})(),()=>{H=!0}},[u,R]);const Ie=async(H,W,ye)=>{if(!H){m("Nothing to copy.","error");return}let de=H;try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(de);else{const y=document.createElement("textarea");y.value=de,y.style.position="fixed",y.style.left="-999999px",y.style.top="-999999px",document.body.appendChild(y),y.focus(),y.select(),document.execCommand("copy"),y.remove()}w(W),setTimeout(()=>w(null),2e3),ye?.truncatedNotice?m("Copied truncated data.","success"):de.length!==H.length&&m("Copied a truncated preview.","success")}catch(y){console.error("Copy failed:",y),m("Copy failed.","error")}};if(u&&R==="latest"){const{origin:H,hostname:W}=window.location,ye=`${H}/novnc.html?host=${W}&path=websockify`,de=()=>{const y=he.current;if(y){if(document.fullscreenElement){document.exitFullscreen().catch(()=>{});return}y.requestFullscreen?.().catch(()=>{})}};return O==="native"?r.jsx("div",{className:"glass-card rounded-[32px] overflow-hidden h-[80vh] w-full relative flex items-center justify-center",children:r.jsx("div",{className:"text-[10px] font-bold uppercase tracking-widest text-gray-500",children:"Headful session running in a native browser window."})}):O==="checking"?r.jsx("div",{className:"glass-card rounded-[32px] overflow-hidden h-[80vh] w-full relative flex items-center justify-center",children:r.jsx("div",{className:"text-[10px] font-bold uppercase tracking-widest text-gray-500",children:"Checking headful viewer..."})}):r.jsxs("div",{ref:he,className:"glass-card rounded-[32px] overflow-hidden h-[80vh] w-full relative",children:[r.jsx("button",{type:"button",onClick:de,className:"absolute top-4 right-4 z-10 px-3 py-2 rounded-xl border border-white/20 bg-black/40 text-[9px] font-bold uppercase tracking-widest text-white/80 hover:bg-black/60 transition-all",title:"Toggle fullscreen",children:"Fullscreen"}),r.jsx("iframe",{src:ye,className:"absolute inset-0 w-full h-full",title:"Headful Browser"})]})}if(!F&&!(d&&R==="latest"))return r.jsxs("div",{className:"h-full flex flex-col items-center justify-center text-center space-y-4 opacity-20",children:[r.jsx("div",{className:"w-16 h-16 border border-white/10 rounded-full flex items-center justify-center",children:r.jsx(lv,{className:"w-6 h-6 text-white"})}),r.jsx("p",{className:"text-[9px] font-bold uppercase tracking-[0.3em]",children:"Ready"})]});const k=x?"space-y-12 relative z-10 w-full":"space-y-12 relative z-10 max-w-5xl mx-auto";return r.jsxs("div",{className:k,children:[r.jsxs("div",{className:"flex items-end justify-between border-b border-white/5 pb-10",children:[r.jsxs("div",{className:"space-y-4",children:[r.jsx("p",{className:"text-[9px] font-bold text-gray-500 uppercase tracking-[0.3em]",children:"Preview"}),r.jsx("h2",{className:"text-xl font-mono text-white truncate max-w-xl tracking-tight italic",children:F?.finalUrl||F?.url||""})]}),r.jsx("div",{className:`px-4 py-2 rounded-xl text-[9px] font-bold uppercase tracking-[0.2em] ${R==="pinned"?"bg-amber-500/10 text-amber-300":d?"bg-blue-500/10 text-blue-400 animate-pulse":"bg-green-500/10 text-green-400"}`,children:R==="pinned"?"Pinned":d?"Running":"Finished"})]}),r.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-8",children:[r.jsxs("div",{className:"glass-card rounded-[32px] overflow-hidden flex flex-col min-h-[400px]",children:[r.jsxs("div",{className:"p-6 border-b border-white/5 flex items-center justify-between text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:[r.jsx("span",{children:"Screenshot"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("span",{className:"text-white/20",children:F?.timestamp||"--:--:--"}),r.jsx("button",{type:"button",onClick:()=>{Z(!0),be()},className:"px-3 py-2 rounded-xl border border-white/10 text-[8px] font-bold uppercase tracking-widest text-white/70 hover:text-white hover:bg-white/5 transition-all",children:"View All Captures"})]})]}),r.jsx("div",{className:"relative bg-black flex-1 flex items-center justify-center overflow-hidden",children:we?r.jsx("img",{src:we,className:"absolute inset-0 w-full h-full object-contain transition-opacity duration-1000"}):r.jsx("div",{className:"text-[8px] font-bold text-white/5 uppercase tracking-widest",children:"Waiting for Frame..."})})]}),r.jsxs("div",{className:"glass-card rounded-[32px] p-8 flex flex-col h-[400px]",children:[r.jsx("span",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest mb-6 border-b border-white/5 pb-4",children:"Activity Log"}),r.jsxs("div",{className:"flex-1 font-mono text-[10px] text-gray-400 space-y-2 overflow-y-auto custom-scrollbar pr-2",children:[F?.logs?.map((H,W)=>r.jsxs("div",{className:"flex gap-2",children:[r.jsx("span",{className:"text-white/10 shrink-0",children:"›"})," ",r.jsx("span",{children:H})]},W)),d&&R==="latest"&&(!F?.logs||F?.logs.length===0)&&r.jsx("div",{className:"animate-pulse",children:"Connecting to kernel..."})]})]})]}),G&&r.jsx("div",{className:"fixed inset-0 z-50 bg-black/70 flex items-center justify-center p-6",children:r.jsxs("div",{className:"glass-card rounded-[32px] w-full max-w-5xl max-h-[85vh] overflow-hidden flex flex-col",children:[r.jsxs("div",{className:"p-6 border-b border-white/10 flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("div",{className:"text-[9px] font-bold text-gray-500 uppercase tracking-widest",children:"Captures"}),r.jsx("div",{className:"text-sm font-bold text-white",children:"Recordings and Screenshots"})]}),r.jsx("button",{onClick:()=>Z(!1),className:"px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all bg-white/5 border-white/10 text-white hover:bg-white/10",children:"Close"})]}),r.jsxs("div",{className:"p-6 overflow-y-auto custom-scrollbar",children:[ne&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading captures..."}),!ne&&ae.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No captures found."}),!ne&&ae.length>0&&r.jsx(ar,{height:Math.min(Math.max(Qs,ae.length*Qs),Qs*Mv),width:"100%",itemCount:ae.length,itemSize:Qs,overscanCount:Ov,itemData:ae,children:Dv})]})]})}),r.jsxs("div",{className:"glass-card rounded-[32px] p-8 flex flex-col relative",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-white/5 pb-4 mb-6",children:[r.jsx("span",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Data"}),r.jsxs("div",{className:"flex items-center gap-2",children:[c&&r.jsx("div",{className:"flex bg-white/5 rounded-lg p-0.5 border border-white/10",children:["latest","pinned"].map(H=>r.jsx("button",{onClick:()=>j(H),className:`px-3 py-1 rounded text-[8px] font-bold uppercase tracking-widest transition-all ${R===H?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:H},H))}),ve&&r.jsx("div",{className:"flex bg-white/5 rounded-lg p-0.5 border border-white/10",children:["table","raw"].map(H=>r.jsx("button",{onClick:()=>B(H),className:`px-3 py-1 rounded text-[8px] font-bold uppercase tracking-widest transition-all ${D===H?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:H},H))}),R==="pinned"?r.jsx("button",{onClick:()=>{b?.(),j("latest")},className:"px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 bg-white/5 border-white/10 text-amber-200 hover:bg-white/10",title:"Unpin data",children:"Unpin"}):r.jsx("button",{onClick:()=>{if(!F){m("No data to pin.","error");return}S?.(F),j("pinned")},className:"px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 bg-white/5 border-white/10 text-white hover:bg-white/10",title:"Pin data",children:c?"Update Pin":"Pin"}),r.jsx("button",{onClick:()=>{const H=Yv(F?.data,ve);if(!H){m("No data to export.","error");return}const W=`doppelganger-data-${new Date().toISOString().replace(/[:.]/g,"-")}.${H.ext}`;Gv(W,H.content,H.mime),m(`Exported ${H.ext.toUpperCase()}.`,"success")},className:"px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 bg-white/5 border-white/10 text-white hover:bg-white/10",title:"Export extracted data",children:"Export"}),r.jsxs("button",{onClick:async()=>{const H=Lv(F);if(H.reason){m(H.reason||"Data too large to copy safely.","error");return}const W=lp(F);let de=Bv(H.raw),y=!1;W.truncated&&(await p({message:"Preview is truncated for performance.",confirmLabel:"Copy full",cancelLabel:"Copy preview"})||(de=W.text||"",y=!0)),de.length>Ni&&(await p({message:`Copying ${kv(de.length)} may freeze your browser.`,confirmLabel:"Copy full",cancelLabel:y?"Copy preview":"Copy truncated"})||(de=Hv(H.raw).text,y=!0)),Ie(de,"data",{skipSizeConfirm:!0,truncatedNotice:y})},className:`px-3 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 ${E==="data"?"bg-green-500/10 border-green-500/20 text-green-400":"bg-white/5 border-white/10 text-white hover:bg-white/10"}`,title:"Copy extracted data",children:[E==="data"?r.jsx(Ci,{className:"w-3 h-3"}):r.jsx(Ai,{className:"w-3 h-3"}),E==="data"?"Copied":"Copy"]})]})]}),Ae?.truncated&&r.jsx("button",{type:"button",onClick:()=>m("Preview truncated for performance.","error"),className:"absolute top-5 right-5 h-2.5 w-2.5 rounded-full bg-amber-400 shadow-[0_0_8px_rgba(251,191,36,0.6)]",title:"Preview truncated"}),r.jsx("div",{className:"max-h-[70vh] overflow-y-auto custom-scrollbar pr-2 relative",children:d&&R==="latest"&&(!F||F.data===void 0)?r.jsx("pre",{className:"font-mono text-[10px] text-blue-300/60 whitespace-pre-wrap leading-relaxed",children:"Buffering data stream..."}):!F||F.data===void 0||F.data===null||F.data===""?r.jsx("pre",{className:"font-mono text-[10px] text-blue-300/60 whitespace-pre-wrap leading-relaxed",children:"No data available."}):r.jsx("div",{children:ve&&D==="table"?r.jsx("div",{className:"overflow-auto custom-scrollbar rounded-2xl border border-white/10",children:r.jsxs("table",{className:"min-w-full table-auto text-[10px] text-left text-white/80 font-mono",children:[r.jsx("thead",{className:"bg-white/5 text-[9px] uppercase tracking-widest text-white/50",children:r.jsx("tr",{children:ve.headers.map(H=>r.jsx("th",{className:"px-3 py-2 border-b border-white/10 whitespace-nowrap",children:H},H))})}),r.jsx("tbody",{children:ve.rows.map((H,W)=>r.jsx("tr",{className:"odd:bg-white/[0.02]",children:ve.headers.map((ye,de)=>r.jsx("td",{className:"px-3 py-2 border-b border-white/5 align-top whitespace-normal break-words",children:Me(H[de])},`${W}-${de}`))},W))})]})}):r.jsx(Tn,{readOnly:!0,value:Ae?.text||"",language:Ae?.language||"plain"})})})]})]})},Xv=({name:s,def:c,updateVariable:d,removeVariable:u})=>{const[f,p]=g.useState(s);return g.useEffect(()=>{p(s)},[s]),r.jsxs("div",{className:"flex gap-2 items-center",children:[r.jsx("input",{type:"text",value:f,onChange:m=>p(m.target.value),onBlur:()=>{f!==s&&d(s,f,c.type,c.value)},className:"var-name flex-1 bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"}),r.jsxs("select",{value:c.type,onChange:m=>d(s,s,m.target.value,c.value),className:"custom-select var-type bg-white/[0.05] border border-white/10 rounded-xl px-2 py-2 text-[8px] font-bold uppercase text-white/40",children:[r.jsx("option",{value:"string",children:"STR"}),r.jsx("option",{value:"number",children:"NUM"}),r.jsx("option",{value:"boolean",children:"BOOL"})]}),r.jsx("div",{className:"flex-1",children:c.type==="boolean"?r.jsxs("select",{value:String(c.value),onChange:m=>d(s,s,c.type,m.target.value),className:"custom-select w-full bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[10px] text-white",children:[r.jsx("option",{value:"true",children:"True"}),r.jsx("option",{value:"false",children:"False"})]}):r.jsx("input",{type:c.type==="number"?"number":"text",value:c.value,onChange:m=>d(s,s,c.type,m.target.value),className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"})}),r.jsx("button",{onClick:()=>u(s),className:"p-2 text-red-500 hover:text-red-400",children:"×"})]})},Lp=({currentTask:s,setCurrentTask:c,tasks:d=[],editorView:u,setEditorView:f,isExecuting:p,onSave:m,onRun:S,results:b,pinnedResults:x,saveMsg:E,onConfirm:w,onNotify:D,onPinResults:B,onUnpinResults:R,onRunSnapshot:j,runId:O,onStop:L})=>{const[G,Z]=g.useState(null),[ne,te]=g.useState(null),ae=g.useRef(null),P=g.useRef(null),[,he]=g.useState(null),[F,ve]=g.useState(null),[Ae,we]=g.useState(null),[Me,be]=g.useState([]),[Ie,k]=g.useState(!1),[H,W]=g.useState(!1),[ye,de]=g.useState(""),[y,q]=g.useState(null),[$,Q]=g.useState(null),[ie,pe]=g.useState(!1),[xe,Qe]=g.useState({}),[ke,Tt]=g.useState([]),[fa,ya]=g.useState(!1),va=()=>{try{const T=localStorage.getItem("doppelganger.layout.leftWidthPct");if(!T)return .3;const C=parseFloat(T);return Number.isNaN(C)?.3:Math.min(.75,Math.max(.25,C))}catch{return .3}},_t=T=>{const J=Math.floor(window.innerWidth*.8);return Math.max(320,Math.min(J,T))},[ba,ha]=g.useState(()=>{if(typeof window>"u")return 360;const T=va();return _t(Math.round(window.innerWidth*T))}),wa=g.useRef(!1),se=d.filter(T=>String(T.id||"")!==String(s.id||"")),ue=fa&&ke.length===1&&ke[0]?.id==="host",fe=1e6,Ne=T=>`${(T/(1024*1024)).toFixed(2)} MB`,mt=async(T,C,J)=>{if(!T){D("Nothing to copy.","error");return}let _e=T;T.length>fe&&(await w({message:`Copying ${Ne(T.length)} may freeze your browser.`,confirmLabel:"Copy full",cancelLabel:"Copy segment"})||(_e=T.slice(0,fe)));try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(_e);else{const He=document.createElement("textarea");He.value=_e,He.style.position="fixed",He.style.left="-999999px",He.style.top="-999999px",document.body.appendChild(He),He.focus(),He.select(),document.execCommand("copy"),He.remove()}Z(C),setTimeout(()=>Z(null),2e3),J?.truncatedNotice||_e.length!==T.length&&D("Copied a truncated preview.","success")}catch(He){console.error("Copy failed:",He),D("Copy failed.","error")}};g.useEffect(()=>{let T=!1;return(async()=>{try{const J=await fetch("/api/settings/proxies",{credentials:"include"});if(!J.ok)throw new Error("Failed to load proxies");const _e=await J.json();if(T)return;Tt(Array.isArray(_e.proxies)?_e.proxies:[])}catch{T||Tt([])}finally{T||ya(!0)}})(),()=>{T=!0}},[]),g.useEffect(()=>{ue&&s.rotateProxies&&c({...s,rotateProxies:!1})},[ue,s,c]);const Wa=new Set(["if","while","repeat","foreach","on_error"]),xt=T=>{const C=(T||"").trim(),J=C.match(/^\{\$([\w.]+)\}$/);return J?J[1]:C},It={string:[{value:"equals",label:"Equals"},{value:"not_equals",label:"Not equal"},{value:"contains",label:"Contains"},{value:"starts_with",label:"Starts with"},{value:"ends_with",label:"Ends with"},{value:"matches",label:"Matches regex"}],number:[{value:"equals",label:"Equals"},{value:"not_equals",label:"Not equal"},{value:"gt",label:"Greater than"},{value:"gte",label:"Greater or equal"},{value:"lt",label:"Less than"},{value:"lte",label:"Less or equal"}],boolean:[{value:"is_true",label:"Is true"},{value:"is_false",label:"Is false"}]},_a=T=>{let C=0;return T.map(J=>{(J.type==="else"||J.type==="end")&&(C=Math.max(0,C-1));const _e=C;return(J.type==="else"||Wa.has(J.type))&&(C+=1),_e})},K=T=>{const C={id:"act_"+Date.now(),type:T,selector:"",value:""};T==="set"&&(C.varName=""),T==="merge"&&(C.varName=""),T==="start"&&(C.value=""),T==="if"&&(C.conditionVar="",C.conditionVarType="string",C.conditionOp="equals",C.conditionValue=""),T==="while"&&(C.conditionVar="",C.conditionVarType="string",C.conditionOp="equals",C.conditionValue=""),c({...s,actions:[...s.actions,C]})},le=T=>{W(!0),de(""),q(T||null)},ce=T=>{c({...s,actions:s.actions.filter(C=>C.id!==T)})},ee=(T,C)=>{c({...s,actions:s.actions.map(J=>J.id===T?{...J,...C}:J)})},We=(T,C)=>{if(T===C)return;const J=[...s.actions],_e=J.findIndex(zt=>zt.id===T),He=J.findIndex(zt=>zt.id===C);if(_e===-1||He===-1)return;const[Fe]=J.splice(_e,1);J.splice(He,0,Fe),c({...s,actions:J})},tt=T=>!T||!(T instanceof HTMLElement)?!1:!!T.closest('input, textarea, select, button, a, [contenteditable="true"], [data-no-drag="true"]'),at=(T,C,J,_e)=>{if(J!==void 0&&_e!==void 0&&Math.abs(T-_e)<14)return J;const He=s.actions;let Fe=He.length-1;for(let zt=0;zt<He.length;zt++){if(He[zt].id===C)continue;const Sa=document.getElementById(`action-${He[zt].id}`);if(!Sa)continue;const jl=Sa.getBoundingClientRect(),Yl=jl.top+jl.height*.4;if(T<Yl){Fe=zt;break}}return Fe},Ue=()=>{if(F){if(Ae!==null&&Ae!==F.index){const T=s.actions[Ae]?.id;T&&We(F.id,T)}ve(null),we(null),ae.current=null}};g.useEffect(()=>{if(!F)return;const T=J=>{if(ae.current!==null&&J.pointerId!==ae.current)return;if(P.current){const Fe=P.current.getBoundingClientRect();J.clientY<Fe.top+28&&(P.current.scrollTop-=14),J.clientY>Fe.bottom-28&&(P.current.scrollTop+=14)}const _e=F.originTop+F.height/2,He=at(J.clientY,F.id,F.index,_e);ve(Fe=>Fe&&{...Fe,currentY:J.clientY}),we(He)},C=J=>{ae.current!==null&&J.pointerId!==ae.current||Ue()};return window.addEventListener("pointermove",T),window.addEventListener("pointerup",C),window.addEventListener("pointercancel",C),()=>{window.removeEventListener("pointermove",T),window.removeEventListener("pointerup",C),window.removeEventListener("pointercancel",C)}},[F,Ae,s.actions]);const gt=()=>{const T="var_"+Date.now().toString().slice(-4);c({...s,variables:{...s.variables,[T]:{type:"string",value:""}}})},it=T=>({...T,id:"act_"+Date.now()+"_"+Math.floor(Math.random()*1e3)}),Sl=(T,C)=>{T.preventDefault();const J=8,_e=200,He=190,Fe=Math.min(Math.max(T.clientX+12,J),window.innerWidth-_e-J),zt=Math.min(Math.max(T.clientY+12,J),window.innerHeight-He-J);te({id:C,x:Fe,y:zt})},kt=()=>te(null);g.useEffect(()=>{if(!ne)return;const T=J=>{J.target?.closest(".action-context-menu")||te(null)},C=J=>{J.key==="Escape"&&te(null)};return window.addEventListener("mousedown",T),window.addEventListener("keydown",C),window.addEventListener("scroll",T,!0),()=>{window.removeEventListener("mousedown",T),window.removeEventListener("keydown",C),window.removeEventListener("scroll",T,!0)}},[ne]),g.useEffect(()=>{if(!O||s.mode!=="agent")return;Qe({});const T=new EventSource(`/api/executions/stream?runId=${encodeURIComponent(O)}`,{withCredentials:!0});return T.onmessage=C=>{if(C.data)try{const J=JSON.parse(C.data);J&&J.actionId&&J.status&&Qe(_e=>({..._e,[J.actionId]:J.status}))}catch{}},T.addEventListener("ready",()=>{}),T.onopen=()=>{},T.onerror=()=>{T.close()},()=>{T.close()}},[O,s.mode]),g.useEffect(()=>{if(typeof window>"u")return;const T=va();ha(_t(Math.round(window.innerWidth*T)))},[]),g.useEffect(()=>{const T=J=>{if(!wa.current)return;const _e=_t(J.clientX);ha(_e)},C=()=>{wa.current=!1,document.body.style.cursor="",document.body.style.userSelect=""};return window.addEventListener("pointermove",T),window.addEventListener("pointerup",C),window.addEventListener("pointercancel",C),()=>{window.removeEventListener("pointermove",T),window.removeEventListener("pointerup",C),window.removeEventListener("pointercancel",C)}},[]);const bt=T=>{const C={...s.variables};delete C[T],c({...s,variables:C})},Pt=(T,C,J,_e)=>{const He={...s.variables};delete He[T];let Fe=_e;J==="number"&&(Fe=parseFloat(_e)||0),J==="boolean"&&(Fe=_e==="true"||_e===!0),He[C]={type:J,value:Fe},c({...s,variables:He})},Rt=async()=>{if(s.id){k(!0);try{const T=await fetch(`/api/tasks/${s.id}/versions`);if(!T.ok)throw new Error("Failed to load versions");const C=await T.json();be(Array.isArray(C.versions)?C.versions:[])}catch{be([])}finally{k(!1)}}},jt=async T=>{if(!(!s.id||!await w("Rollback to this version? Current changes will be saved as a new version.")))try{const J=await fetch(`/api/tasks/${s.id}/rollback`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({versionId:T})});if(!J.ok)throw new Error("Rollback failed");const _e=await J.json();c(_e),D("Rolled back to selected version.","success"),Rt()}catch{D("Rollback failed.","error")}},ea=async T=>{if(s.id){pe(!0);try{const C=await fetch(`/api/tasks/${s.id}/versions/${T}`);if(!C.ok)throw new Error("Failed to load version");const J=await C.json();if(!J?.snapshot)throw new Error("Missing snapshot");Q({id:J.metadata?.id||T,timestamp:J.metadata?.timestamp||Date.now(),snapshot:J.snapshot})}catch{D("Failed to load version snapshot.","error")}finally{pe(!1)}}};return g.useEffect(()=>{u==="history"&&Rt()},[u,s.id]),r.jsxs("div",{className:"flex-1 flex overflow-hidden animate-in fade-in slide-in-from-bottom-4 duration-500",children:[r.jsxs("aside",{className:"glass border-r border-white/10 flex flex-col shrink-0 overflow-hidden",style:{width:ba},children:[r.jsxs("div",{className:"p-8 border-b border-white/10 space-y-6 shrink-0",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("input",{type:"text",value:s.name,onChange:T=>c({...s,name:T.target.value}),placeholder:"Task Name...",className:"bg-transparent text-xl font-bold tracking-tight text-white focus:outline-none border-none p-0 w-full placeholder:text-white/10"}),r.jsxs("div",{className:"flex items-center gap-6",children:[r.jsx("button",{onClick:()=>f("history"),className:"w-8 h-8 rounded-full text-gray-400 hover:text-white hover:bg-white/5 transition-all flex items-center justify-center",title:"Task History",children:r.jsx(Rp,{className:"w-3.5 h-3.5"})}),r.jsx("button",{onClick:m,className:`px-4 py-2 text-[9px] font-bold rounded-full uppercase tracking-widest transition-all ${E==="SAVED"?"text-green-400 border border-green-400/20":"bg-blue-500/10 border border-blue-500/20 text-blue-400 hover:bg-blue-500/20"}`,children:E==="SAVED"?"SAVED":"SAVE"})]})]}),r.jsx("div",{className:"bg-white/5 p-1 rounded-xl flex gap-1 border border-white/5",children:["scrape","agent","headful"].map(T=>r.jsx("button",{onClick:()=>c({...s,mode:T}),className:`flex-1 py-2 text-[9px] font-bold uppercase tracking-widest rounded-lg transition-all ${s.mode===T?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:T==="scrape"?"Scraper":T==="agent"?"Agent":"Headful"},T))}),r.jsxs("div",{className:"flex items-center justify-between px-2",children:[r.jsx("span",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Interface Mode"}),r.jsx("div",{className:"flex bg-white/5 rounded-lg p-0.5 border border-white/5",children:["visual","json","api"].map(T=>r.jsx("button",{onClick:()=>f(T),className:`px-3 py-1 rounded text-[8px] font-bold uppercase tracking-widest transition-all ${u===T?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:T},T))})]})]}),r.jsxs("div",{className:`flex-1 p-8 min-h-0 relative ${u==="json"?"overflow-hidden":"overflow-y-auto custom-scrollbar"} ${u==="visual"?"space-y-8":""}`,children:[u==="visual"&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Target URL"}),r.jsx("div",{className:"w-full bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-sm focus-within:border-white/30 transition-all",children:r.jsx(Ot,{value:s.url,onChange:T=>c({...s,url:T}),variables:s.variables,placeholder:"https://..."})})]}),r.jsx("div",{className:"grid grid-cols-2 gap-4",children:r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Wait (Sec)"}),r.jsx("input",{type:"number",value:s.wait,onChange:T=>c({...s,wait:parseFloat(T.target.value)||0}),className:"w-full bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-sm focus:outline-none focus:border-white/30 transition-all text-white"})]})}),s.mode==="agent"&&r.jsxs("div",{className:"space-y-6 order-1",children:[r.jsxs("div",{className:"space-y-3",ref:P,children:[(()=>{const T=_a(s.actions);return s.actions.map((C,J)=>{const _e=F?.id===C.id,Fe=F&&Ae!==null&&F.index!==Ae&&C.id!==F.id&&(F.index<Ae&&J>F.index&&J<=Ae||F.index>Ae&&J<F.index&&J>=Ae)?(F?.height||0)*(F.index<(Ae??0)?-1:1):0,zt=T[J]||0,Sa=C.disabled?"skipped":xe[C.id],jl=Sa==="running"?"border-yellow-400/60":Sa==="success"?"border-green-400/60":Sa==="error"?"border-red-400/70":Sa==="skipped"?"border-gray-500/40":"",Yl=I=>{const Be="w-3 h-3";return I==="if"||I==="else"?r.jsx(Zy,{className:`${Be} text-blue-400`}):I==="end"?r.jsx(iy,{className:`${Be} text-gray-500`}):I==="while"||I==="repeat"?r.jsx(Hy,{className:`${Be} text-amber-400`}):I==="foreach"?r.jsx(jy,{className:`${Be} text-amber-300`}):I==="on_error"?r.jsx(sv,{className:`${Be} text-red-400`}):I==="set"?r.jsx(fv,{className:`${Be} text-green-400`}):I==="stop"?r.jsx(Kh,{className:`${Be} text-red-400`}):I==="click"?r.jsx(_y,{className:`${Be} text-blue-300`}):I==="type"?r.jsx(cv,{className:`${Be} text-green-300`}):I==="hover"?r.jsx(tv,{className:`${Be} text-purple-300`}):I==="press"?r.jsx(vy,{className:`${Be} text-amber-300`}):I==="wait"?r.jsx(Ig,{className:`${Be} text-slate-300`}):I==="scroll"?r.jsx(Zg,{className:`${Be} text-cyan-300`}):I==="javascript"?r.jsx(ay,{className:`${Be} text-yellow-300`}):I==="csv"?r.jsx(Py,{className:`${Be} text-emerald-300`}):I==="merge"?r.jsx(wy,{className:`${Be} text-emerald-200`}):I==="screenshot"?r.jsx(Tp,{className:`${Be} text-emerald-300`}):I==="start"?r.jsx(Wg,{className:`${Be} text-emerald-300`}):r.jsx("span",{className:"text-[9px] text-white/20",children:"|"})};return r.jsxs("div",{id:`action-${C.id}`,onPointerDown:I=>{if(tt(I.target)||I.button!==0)return;I.preventDefault();const Be=I.currentTarget.getBoundingClientRect(),Fa=I.clientY-Be.top;ae.current=I.pointerId,I.currentTarget.setPointerCapture(I.pointerId),ve({id:C.id,startY:I.clientY,currentY:I.clientY,height:Be.height,index:J,originTop:Be.top,pointerOffset:Fa}),we(J)},onPointerUp:I=>{ae.current!==null&&I.pointerId!==ae.current||Ue()},onContextMenu:I=>Sl(I,C.id),className:`glass-card p-5 rounded-2xl space-y-4 group/item relative transition-[transform,box-shadow,opacity,filter,background-color,border-color] duration-150 ease-[cubic-bezier(0.22,1,0.36,1)] will-change-transform select-none touch-none ${jl} ${_e?"ring-2 ring-white/40 scale-[1.02] -translate-y-0.5 shadow-[0_30px_80px_rgba(0,0,0,0.45)] opacity-85 z-20":""} ${Ae===J&&!_e?"ring-2 ring-blue-400/60 bg-blue-500/5":""} ${C.disabled?"opacity-40 grayscale":""}`,style:{transform:_e?`translateY(${(F?.currentY||0)-(F?.pointerOffset||0)-(F?.originTop||0)}px)`:Fe?`translateY(${Fe}px)`:void 0,marginLeft:zt?zt*12:void 0},children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"text-[8px] font-bold text-white/20 font-mono tracking-tighter",children:(J+1).toString().padStart(2,"0")}),r.jsx("div",{className:"w-4 h-4 flex items-center justify-center",children:Yl(C.type)}),r.jsx("button",{onClick:()=>le(C.id),className:"action-type-select text-[10px] font-bold uppercase tracking-[0.2em] text-blue-400 focus:outline-none cursor-pointer",children:Au.find(I=>I.type===C.type)?.label||C.type})]}),r.jsx("button",{"data-no-drag":"true",onClick:()=>ce(C.id),className:"text-gray-600 hover:text-red-500 transition-colors opacity-0 group-hover/item:opacity-100",children:r.jsx(Hu,{className:"w-4 h-4"})})]}),(C.type==="click"||C.type==="type"||C.type==="hover")&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Selector"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Ot,{value:C.selector||"",onChange:I=>ee(C.id,{selector:I}),variables:s.variables,placeholder:".btn-primary"})})]}),C.type==="scroll"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Selector (Optional)"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Ot,{value:C.selector||"",onChange:I=>ee(C.id,{selector:I}),variables:s.variables,placeholder:".scroll-container or leave empty"})})]}),C.type==="scroll"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Scroll Speed (ms)"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Ot,{value:C.key||"",onChange:I=>ee(C.id,{key:I}),variables:s.variables,placeholder:"500"})})]}),(C.type==="type"||C.type==="wait"||C.type==="scroll"||C.type==="javascript"||C.type==="csv")&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:C.type==="type"?"Content":C.type==="wait"?"Seconds":C.type==="scroll"?"Pixels":C.type==="csv"?"CSV Input":"Script"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:C.type==="javascript"?r.jsx(Tn,{value:C.value||"",onChange:I=>ee(C.id,{value:I}),language:"javascript",variables:s.variables,className:"min-h-[120px]",placeholder:"return document.title"}):C.type==="csv"?r.jsx(Tn,{value:C.value||"",onChange:I=>ee(C.id,{value:I}),language:"plain",variables:s.variables,className:"min-h-[120px]",placeholder:"name,age\\nAda,31"}):r.jsx(Ot,{value:C.value||"",onChange:I=>ee(C.id,{value:I}),variables:s.variables,placeholder:C.type==="type"?"Search keywords":C.type==="wait"?"3":"400"})})]}),C.type==="screenshot"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Label (Optional)"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Ot,{value:C.value||"",onChange:I=>ee(C.id,{value:I}),variables:s.variables,placeholder:"checkout-step"})})]}),C.type==="press"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Key"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Ot,{value:C.key||"",onChange:I=>ee(C.id,{key:I}),variables:s.variables,placeholder:"Enter"})})]}),C.type==="if"&&(()=>{const I=Object.keys(s.variables||{}),Be=xt(C.conditionVar||""),Fa=Be&&s.variables?.[Be]?.type,Ut=C.conditionVarType||Fa||"string",Lt=It[Ut]||It.string,ct=C.conditionOp||Lt[0].value;return r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Condition"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Variable"}),r.jsx("input",{type:"text",list:`if-var-${C.id}`,value:C.conditionVar||"",onChange:Se=>ee(C.id,{conditionVar:Se.target.value}),placeholder:"variable name",className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"}),I.length>0&&r.jsx("datalist",{id:`if-var-${C.id}`,children:I.map(Se=>r.jsx("option",{value:Se},Se))})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Type"}),r.jsxs("select",{value:Ut,onChange:Se=>{const Ht=Se.target.value,Nl=It[Ht]||It.string;ee(C.id,{conditionVarType:Ht,conditionOp:Nl[0].value,conditionValue:Ht==="boolean"?"":C.conditionValue||""})},className:"custom-select w-full bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[8px] font-bold uppercase text-white/60",children:[r.jsx("option",{value:"string",children:"String"}),r.jsx("option",{value:"number",children:"Number"}),r.jsx("option",{value:"boolean",children:"Boolean"})]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Relation"}),r.jsx("select",{value:ct,onChange:Se=>ee(C.id,{conditionOp:Se.target.value}),className:"custom-select w-full bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[8px] font-bold uppercase text-white/60",children:Lt.map(Se=>r.jsx("option",{value:Se.value,children:Se.label},Se.value))})]})]}),Ut!=="boolean"&&r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Value"}),r.jsx("input",{type:Ut==="number"?"number":"text",value:C.conditionValue||"",onChange:Se=>ee(C.id,{conditionValue:Se.target.value}),placeholder:Ut==="number"?"0":"value",className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"})]})]})})(),C.type==="while"&&(()=>{const I=Object.keys(s.variables||{}),Be=xt(C.conditionVar||""),Fa=Be&&s.variables?.[Be]?.type,Ut=C.conditionVarType||Fa||"string",Lt=It[Ut]||It.string,ct=C.conditionOp||Lt[0].value;return r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Condition"}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-2",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Variable"}),r.jsx("input",{type:"text",list:`while-var-${C.id}`,value:C.conditionVar||"",onChange:Se=>ee(C.id,{conditionVar:Se.target.value}),placeholder:"variable name",className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"}),I.length>0&&r.jsx("datalist",{id:`while-var-${C.id}`,children:I.map(Se=>r.jsx("option",{value:Se},Se))})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Type"}),r.jsxs("select",{value:Ut,onChange:Se=>{const Ht=Se.target.value,Nl=It[Ht]||It.string;ee(C.id,{conditionVarType:Ht,conditionOp:Nl[0].value,conditionValue:Ht==="boolean"?"":C.conditionValue||""})},className:"custom-select w-full bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[8px] font-bold uppercase text-white/60",children:[r.jsx("option",{value:"string",children:"String"}),r.jsx("option",{value:"number",children:"Number"}),r.jsx("option",{value:"boolean",children:"Boolean"})]})]}),r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Relation"}),r.jsx("select",{value:ct,onChange:Se=>ee(C.id,{conditionOp:Se.target.value}),className:"custom-select w-full bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[8px] font-bold uppercase text-white/60",children:Lt.map(Se=>r.jsx("option",{value:Se.value,children:Se.label},Se.value))})]})]}),Ut!=="boolean"&&r.jsxs("div",{className:"space-y-1",children:[r.jsx("span",{className:"text-[7px] font-bold text-gray-500 uppercase tracking-widest pl-1",children:"Value"}),r.jsx("input",{type:Ut==="number"?"number":"text",value:C.conditionValue||"",onChange:Se=>ee(C.id,{conditionValue:Se.target.value}),placeholder:Ut==="number"?"0":"value",className:"w-full bg-white/[0.05] border border-white/10 rounded-lg px-3 py-2 text-[10px] text-white"})]})]})})(),C.type==="repeat"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Times"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Ot,{value:C.value||"",onChange:I=>ee(C.id,{value:I}),variables:s.variables,placeholder:"3"})})]}),C.type==="foreach"&&r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Selector (Optional)"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Ot,{value:C.selector||"",onChange:I=>ee(C.id,{selector:I}),variables:s.variables,placeholder:".list-item"})})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Variable (Array Name)"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Ot,{value:C.varName||"",onChange:I=>ee(C.id,{varName:I}),variables:s.variables,placeholder:"items"})})]})]}),C.type==="set"&&r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Variable Name"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Ot,{value:C.varName||"",onChange:I=>ee(C.id,{varName:I}),variables:s.variables,placeholder:"status"})})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Value"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Ot,{value:C.value||"",onChange:I=>ee(C.id,{value:I}),variables:s.variables,placeholder:"ready"})})]})]}),C.type==="merge"&&r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Sources"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Ot,{value:C.value||"",onChange:I=>ee(C.id,{value:I}),variables:s.variables,placeholder:"items, extraItems, {$block.output}"})})]}),r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Target Variable (Optional)"}),r.jsx("div",{className:"bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[11px] focus-within:border-white/20 transition-all",children:r.jsx(Ot,{value:C.varName||"",onChange:I=>ee(C.id,{varName:I}),variables:s.variables,placeholder:"allItems"})})]})]}),C.type==="stop"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Outcome"}),r.jsxs("select",{value:C.value||"success",onChange:I=>ee(C.id,{value:I.target.value}),className:"custom-select w-full bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[9px] font-bold uppercase tracking-[0.2em] text-white/70 focus:outline-none",children:[r.jsx("option",{value:"success",children:"Success"}),r.jsx("option",{value:"error",children:"Error"})]})]}),C.type==="on_error"&&r.jsx("div",{className:"text-[8px] text-gray-600 uppercase tracking-widest",children:"Runs if any action fails."}),C.type==="start"&&r.jsxs("div",{className:"space-y-1.5",children:[r.jsx("label",{className:"text-[7px] font-bold text-gray-600 uppercase tracking-widest pl-1",children:"Task"}),r.jsxs("select",{value:C.value||"",onChange:I=>ee(C.id,{value:I.target.value}),className:"custom-select w-full bg-white/[0.03] border border-white/5 rounded-xl px-3 py-2 text-[9px] font-bold uppercase tracking-[0.2em] text-white/70 focus:outline-none",children:[r.jsx("option",{value:"",disabled:!0,children:"Select task"}),se.length===0&&r.jsx("option",{value:"",disabled:!0,children:"No other tasks"}),se.map(I=>r.jsx("option",{value:I.id,children:I.name||I.id},I.id))]})]})]},C.id)})})(),ne&&(()=>{const T=s.actions.findIndex(J=>J.id===ne.id),C=s.actions[T];return C?r.jsxs("div",{className:"action-context-menu fixed z-50 w-[200px] bg-[#0b0b0b] border border-white/10 rounded-xl shadow-2xl p-2 text-[10px] font-bold uppercase tracking-widest text-white/80",style:{left:ne.x,top:ne.y},children:[r.jsx("button",{onClick:()=>{ee(C.id,{disabled:!C.disabled}),kt()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:C.disabled?"Enable":"Disable"}),r.jsx("button",{onClick:()=>{ce(C.id),kt()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors text-red-400",children:"Delete"}),r.jsx("button",{onClick:()=>{he(it(C)),ce(C.id),kt()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:"Cut"}),r.jsx("button",{onClick:()=>{he(it(C)),kt()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:"Copy"}),r.jsx("button",{onClick:()=>{const J=it(C),_e=[...s.actions];_e.splice(T+1,0,J),c({...s,actions:_e}),kt()},className:"w-full text-left px-3 py-2 rounded-lg hover:bg-white/5 transition-colors",children:"Duplicate"})]}):null})(),r.jsx("button",{onClick:()=>le(),className:"w-full py-3 border border-dashed border-white/20 rounded-xl text-[9px] font-bold uppercase tracking-widest text-gray-500 hover:text-white transition-all bg-white/[0.02]",children:"+ Append Action Seq"})]}),r.jsxs("div",{className:"bg-white/5 rounded-xl p-4 border border-white/5 space-y-4",children:[r.jsx("h4",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest border-b border-white/5 pb-2",children:"Behavior Config"}),r.jsx("div",{className:"grid grid-cols-2 gap-3",children:Object.entries(s.stealth).map(([T,C])=>r.jsxs("label",{className:"flex items-center gap-3 cursor-pointer group",children:[r.jsx("input",{type:"checkbox",checked:C,onChange:J=>c({...s,stealth:{...s.stealth,[T]:J.target.checked},humanTyping:T==="naturalTyping"?J.target.checked:s.humanTyping}),className:"w-3 h-3 rounded bg-transparent border-white/20"}),r.jsx("span",{className:"text-[9px] font-bold text-gray-500 group-hover:text-white transition-all",children:T.replace(/([A-Z])/g," $1").toUpperCase()})]},T))})]})]}),r.jsxs("details",{className:"border-t border-white/10 pt-6 font-sans",children:[r.jsx("summary",{className:"cursor-pointer text-[9px] font-bold text-gray-500 uppercase tracking-[0.2em] hover:text-gray-400 transition-all",children:"Variables (Injectable)"}),r.jsxs("div",{className:"space-y-3 mt-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("p",{className:"text-[8px] text-gray-600",children:"Dynamic Params"}),r.jsx("button",{onClick:gt,className:"px-3 py-1 bg-white/5 border border-white/10 text-white text-[8px] font-bold rounded-lg uppercase tracking-widest hover:bg-white/10 transition-all",children:"+ Add"})]}),r.jsx("div",{className:"space-y-2",children:Object.entries(s.variables).map(([T,C])=>r.jsx(Xv,{name:T,def:C,updateVariable:Pt,removeVariable:bt},T))})]})]}),r.jsxs("details",{className:"border-t border-white/10 pt-6 font-sans",children:[r.jsx("summary",{className:"cursor-pointer text-[9px] font-bold text-gray-500 uppercase tracking-[0.2em] hover:text-gray-400 transition-all",children:"Extraction Script"}),r.jsxs("div",{className:"space-y-3 mt-3",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-[8px] text-gray-600 uppercase tracking-widest",children:"Output format"}),r.jsxs("select",{value:s.extractionFormat||"json",onChange:T=>c({...s,extractionFormat:T.target.value}),className:"custom-select bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[8px] font-bold uppercase text-white/60",children:[r.jsx("option",{value:"json",children:"JSON"}),r.jsx("option",{value:"csv",children:"CSV"})]})]}),r.jsxs("p",{className:"text-[8px] text-gray-600",children:["Process scraped HTML with JavaScript. Use ",r.jsx("code",{className:"text-blue-400 bg-white/5 px-1 py-0.5 rounded",children:"$$data.html()"})," to access the raw HTML."]}),r.jsx("div",{className:"w-full bg-[#050505] border border-white/10 rounded-xl p-4 font-mono text-xs text-green-300 focus-within:border-white/30 resize-none custom-scrollbar leading-relaxed min-h-[200px] whitespace-pre-wrap",children:r.jsx(Ot,{value:s.extractionScript||"",onChange:T=>c({...s,extractionScript:T}),variables:s.variables,syntax:"javascript",placeholder:`// Example: Extract all links
14
+ const html = $$data.html();
15
+ const parser = new DOMParser();
16
+ const doc = parser.parseFromString(html, 'text/html');
17
+ const links = Array.from(doc.querySelectorAll('a')).map(a => a.href);
18
+ return JSON.stringify(links, null, 2);`})})]})]}),s.mode==="scrape"&&r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Selector Filter"}),r.jsx("div",{className:"w-full bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-sm focus-within:border-white/30 transition-all",children:r.jsx(Ot,{value:s.selector||"",onChange:T=>c({...s,selector:T}),variables:s.variables,placeholder:".main-content"})})]}),r.jsxs("div",{className:"pt-4 border-t border-white/10 space-y-3",children:[r.jsxs("label",{className:"flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 hover:bg-white/[0.05] transition-all cursor-pointer group",children:[r.jsx("input",{type:"checkbox",checked:s.rotateUserAgents,onChange:T=>c({...s,rotateUserAgents:T.target.checked}),className:"w-4 h-4 rounded border-white/20 bg-transparent"}),r.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Rotate UA"})]}),r.jsxs("label",{className:`flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 transition-all ${ue?"opacity-50 cursor-not-allowed":"hover:bg-white/[0.05] cursor-pointer group"}`,title:ue?"Configure proxies in Settings → Proxies to enable rotation.":"Rotate proxies per task.",children:[r.jsx("input",{type:"checkbox",checked:s.rotateProxies,onChange:T=>c({...s,rotateProxies:T.target.checked}),disabled:ue,className:"w-4 h-4 rounded border-white/20 bg-transparent"}),r.jsx("span",{className:`text-[10px] font-bold text-gray-500 uppercase tracking-widest ${ue?"":"group-hover:text-white"}`,children:"Rotate Proxies"})]}),r.jsxs("label",{className:"flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 hover:bg-white/[0.05] transition-all cursor-pointer group",children:[r.jsx("input",{type:"checkbox",checked:s.rotateViewport,onChange:T=>c({...s,rotateViewport:T.target.checked}),className:"w-4 h-4 rounded border-white/20 bg-transparent"}),r.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Rotate Viewport"})]}),r.jsxs("label",{className:"flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 hover:bg-white/[0.05] transition-all cursor-pointer group",children:[r.jsx("input",{type:"checkbox",checked:s.includeShadowDom!==!1,onChange:T=>c({...s,includeShadowDom:T.target.checked}),className:"w-4 h-4 rounded border-white/20 bg-transparent"}),r.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Include Shadow DOM in HTML"})]})]})]}),u==="json"&&r.jsx(wv,{task:s,onChange:c,onCopy:(T,C)=>{mt(T,C)},copiedId:G}),u==="api"&&r.jsxs("div",{className:"h-full flex flex-col",children:[r.jsxs("div",{className:"space-y-6 flex-1 flex flex-col min-h-0",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-[0.2em]",children:"Deployment Endpoint"}),r.jsxs("div",{className:"flex gap-2 items-center",children:[r.jsx("input",{type:"text",readOnly:!0,value:s.id?`${window.location.origin}/tasks/${s.id}/api`:"Save task to view endpoint",className:"flex-1 bg-[#050505] border border-white/10 rounded-xl px-4 py-2 font-mono text-xs text-green-300 focus:outline-none"}),r.jsxs("button",{onClick:()=>{const T=s.id?`${window.location.origin}/tasks/${s.id}/api`:"";T&&mt(T,"endpoint")},className:`px-4 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 ${G==="endpoint"?"bg-green-500/10 border-green-500/20 text-green-400":"bg-white/5 border-white/10 text-white hover:bg-white/10"}`,children:[G==="endpoint"?r.jsx(Ci,{className:"w-3 h-3"}):r.jsx(Ai,{className:"w-3 h-3"}),G==="endpoint"?"Copied":"Copy"]})]})]}),r.jsxs("div",{className:"flex-1 flex flex-col min-h-0",children:[r.jsxs("div",{className:"flex items-center justify-between mb-2",children:[r.jsx("label",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Override Variables (JSON)"}),r.jsxs("button",{onClick:()=>{const T={};Object.entries(s.variables).forEach(([C,J])=>T[C]=J.value),mt(JSON.stringify({variables:T},null,2),"vars")},className:`px-4 py-2 border text-[9px] font-bold rounded-xl uppercase transition-all flex items-center gap-2 ${G==="vars"?"bg-green-500/10 border-green-500/20 text-green-400":"bg-white/5 border-white/10 text-white hover:bg-white/10"}`,children:[G==="vars"?r.jsx(Ci,{className:"w-3 h-3"}):r.jsx(Ai,{className:"w-3 h-3"}),G==="vars"?"Copied":"Copy"]})]}),r.jsx(Tn,{readOnly:!0,value:(()=>{const T={};return Object.entries(s.variables).forEach(([C,J])=>T[C]=J.value),JSON.stringify({variables:T},null,2)})(),language:"json",className:"flex-1"})]})]}),r.jsx("p",{className:"text-[8px] text-gray-600 mt-4 font-mono uppercase tracking-widest leading-loose",children:"Automate via HTTP POST to the above endpoint with your API key in the headers."})]}),u==="history"&&r.jsxs("div",{className:"space-y-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsx("span",{className:"text-[9px] font-bold text-gray-400 uppercase tracking-widest",children:"Task Versions"}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{onClick:Rt,className:"px-4 py-2 border border-white/10 text-[9px] font-bold rounded-xl uppercase tracking-widest text-white hover:bg-white/5 transition-all",children:"Refresh"}),r.jsx("button",{onClick:async()=>{if(!s.id||!await w("Clear all task versions?"))return;(await fetch(`/api/tasks/${s.id}/versions/clear`,{method:"POST"})).ok?(D("Version history cleared.","success"),Rt()):D("Clear failed.","error")},className:"px-4 py-2 border border-red-500/20 text-[9px] font-bold rounded-xl uppercase tracking-widest text-red-300 hover:bg-red-500/10 transition-all",children:"Clear"})]})]}),Ie&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading versions..."}),!Ie&&Me.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No versions yet. Save changes to create history."}),r.jsx("div",{className:"space-y-3",children:Me.map(T=>r.jsxs("div",{className:"glass-card p-4 rounded-2xl flex items-center justify-between",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest",children:T.name}),r.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(T.timestamp).toLocaleString()," | ",T.mode]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{onClick:()=>ea(T.id),disabled:ie,className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:ie?"Loading...":"View"}),r.jsx("button",{onClick:()=>jt(T.id),className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Rollback"})]})]},T.id))})]})]}),r.jsx(bv,{open:H,query:ye,onQueryChange:de,onClose:()=>W(!1),onSelect:T=>{y?T==="if"?ee(y,{type:T,conditionVar:"",conditionVarType:"string",conditionOp:"equals",conditionValue:""}):T==="while"?ee(y,{type:T,conditionVar:"",conditionVarType:"string",conditionOp:"equals",conditionValue:""}):ee(y,{type:T}):K(T),W(!1)}}),r.jsx("div",{className:"p-8 border-t border-white/10 backdrop-blur-xl shrink-0",children:r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsxs("button",{onClick:S,disabled:p&&s.mode!=="headful",className:"shine-effect flex-1 bg-white text-black py-4 rounded-2xl font-bold text-[10px] tracking-[0.3em] uppercase transition-all shadow-xl shadow-white/5 flex items-center justify-center gap-3 disabled:opacity-50",children:[p&&s.mode!=="headful"?r.jsx("div",{className:"w-3 h-3 border-2 border-black/20 border-t-black rounded-full animate-spin"}):r.jsx(Oy,{className:"w-3 h-3 fill-black"}),r.jsx("span",{children:p&&s.mode==="headful"?"Stop Headful":p?"Running...":"Run Task"})]}),p&&r.jsx("button",{onClick:()=>L?.(),className:"w-12 h-12 rounded-2xl border border-white/10 text-white/80 hover:text-white hover:bg-white/10 transition-all flex items-center justify-center",title:"Stop task",children:r.jsx(Kh,{className:"w-4 h-4"})})]})})]}),r.jsx("div",{className:"w-2 cursor-col-resize bg-white/5 hover:bg-white/10 transition-colors",onPointerDown:T=>{T.preventDefault(),wa.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none"}}),r.jsxs("main",{className:"flex-1 overflow-y-auto custom-scrollbar bg-[#020202] p-12 relative",children:[r.jsx("div",{className:"absolute inset-0 opacity-[0.02] pointer-events-none",style:{backgroundImage:"radial-gradient(#fff 1px, transparent 1px)",backgroundSize:"40px 40px"}}),r.jsx(Up,{results:b,pinnedResults:x,isExecuting:p,isHeadful:s.mode==="headful",runId:O,onConfirm:w,onNotify:D,onPin:B,onUnpin:R,fullWidth:s.mode==="headful"}),$&&r.jsx("div",{className:"fixed inset-0 z-[210] flex items-center justify-center bg-black/70 backdrop-blur-sm px-6",children:r.jsxs("div",{className:"glass-card w-full max-w-6xl rounded-[32px] border border-white/10 p-8 shadow-2xl flex flex-col max-h-[90vh]",children:[r.jsxs("div",{className:"flex items-center justify-between border-b border-white/5 pb-4 mb-6",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("div",{className:"text-[9px] font-bold text-gray-500 uppercase tracking-[0.3em]",children:"Task Snapshot"}),r.jsx("div",{className:"text-lg font-bold text-white",children:$.snapshot.name}),r.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date($.timestamp).toLocaleString()," | ",$.snapshot.mode]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{onClick:()=>Q(null),className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Close"}),r.jsx("button",{onClick:()=>{j&&j($.snapshot),Q(null)},className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white text-black hover:bg-white/90 transition-all",children:"Run Version"})]})]}),r.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-6 overflow-y-auto custom-scrollbar pr-2 flex-1 min-h-0",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("div",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Snapshot JSON"}),r.jsx(Tn,{readOnly:!0,value:JSON.stringify($.snapshot,null,2),language:"json",className:"min-h-[320px]"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("div",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Output"}),r.jsx("div",{className:"glass-card rounded-2xl p-6 border border-white/10 text-[10px] text-gray-500",children:"No output captured for this snapshot yet. Run this version to see results."})]})]})]})})]})]})},Qv=({apiKey:s,loading:c,saving:d,onRegenerate:u,onCopy:f})=>{const[p,m]=g.useState(!1);return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[r.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:r.jsx(_p,{className:"w-5 h-5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"API Key"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Manage task API access"})]})]}),r.jsxs("div",{className:"flex flex-col gap-4",children:[r.jsxs("div",{className:"rounded-2xl bg-black/40 border border-white/10 px-4 py-3 font-mono text-[10px] text-blue-200/80 break-all min-h-[44px] flex items-center justify-between gap-3",children:[r.jsx("span",{className:s&&!p?"text-[14px] leading-none":void 0,children:c?"Loading...":s?p?s:"••••••••••••••••••••••••••••••••••••••••":"No API key set"}),r.jsx("button",{onClick:()=>m(S=>!S),disabled:!s,className:"p-2 rounded-xl border border-white/10 text-white/70 hover:text-white hover:bg-white/5 transition-all disabled:opacity-50",title:p?"Hide key":"Show key","aria-label":p?"Hide key":"Show key",children:p?r.jsx(oy,{className:"w-4 h-4"}):r.jsx(fy,{className:"w-4 h-4"})})]}),r.jsxs("div",{className:"flex gap-3",children:[r.jsx("button",{onClick:u,disabled:d,className:"flex-1 px-6 py-3 rounded-2xl text-[9px] font-bold uppercase tracking-widest bg-white text-black hover:scale-105 transition-all disabled:opacity-60 disabled:hover:scale-100",children:s?"Rotate Key":"Generate Key"}),r.jsxs("button",{onClick:f,disabled:!s,className:"flex-1 px-6 py-3 rounded-2xl text-[9px] font-bold uppercase tracking-widest border border-white/10 text-white hover:bg-white/5 transition-all disabled:opacity-50 inline-flex items-center justify-center gap-2",children:[r.jsx(Ai,{className:"w-4 h-4"}),"Copy Key"]})]}),r.jsx("p",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"Use this key in `key`, `x-api-key`, or `Authorization: Bearer` headers."})]})]})},Zv=({onClearStorage:s})=>r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[r.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:r.jsx(Lu,{className:"w-5 h-5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Storage"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Manage stored data"})]})]}),r.jsxs("div",{className:"flex gap-4",children:[r.jsx("button",{onClick:()=>s("screenshots"),className:"flex-1 px-6 py-4 bg-red-500/5 border border-red-500/10 text-red-400 rounded-2xl text-[9px] font-bold uppercase tracking-widest hover:bg-red-500/10 transition-all",children:"Clear Captures"}),r.jsx("button",{onClick:()=>s("cookies"),className:"flex-1 px-6 py-4 bg-yellow-500/5 border border-yellow-500/10 text-yellow-400 rounded-2xl text-[9px] font-bold uppercase tracking-widest hover:bg-yellow-500/10 transition-all",children:"Reset Cookies"})]})]}),$v=72,Hp=6,Ks=$v+Hp,Kv=5,Jv=2,Wv=({index:s,style:c,data:d})=>{const u=d.captures[s];return u?r.jsx("div",{style:{...c,paddingBottom:Hp},children:r.jsxs("div",{className:"flex items-center justify-between gap-4 p-4 rounded-2xl border border-white/10 bg-white/[0.02]",children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest",children:u.type==="recording"?"Recording":"Screenshot"}),r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:u.name})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("a",{href:u.url,target:"_blank",rel:"noreferrer",className:"px-3 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white hover:bg-white/5 transition-all","aria-label":`Open ${u.name}`,children:"Open"}),r.jsx("button",{onClick:()=>d.onDelete(u.name),className:"px-3 py-2 rounded-xl border border-red-500/20 text-[9px] font-bold uppercase tracking-widest text-red-300 hover:bg-red-500/10 transition-all",children:"Delete"})]})]})}):null},Fv=({captures:s,loading:c,onRefresh:d,onDelete:u})=>{const f=Math.min(Math.max(Ks,s.length*Ks),Ks*Kv);return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Captures"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Recordings and screenshots"})]}),r.jsx("button",{onClick:d,disabled:c,className:"px-4 py-2 border border-white/10 text-[9px] font-bold rounded-xl uppercase tracking-widest text-white/70 hover:text-white hover:bg-white/5 transition-all disabled:opacity-50",children:"Refresh"})]}),c&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading captures..."}),!c&&s.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No captures found."}),!c&&s.length>0&&r.jsx(ar,{height:f,width:"100%",itemCount:s.length,itemSize:Ks,overscanCount:Jv,itemData:{captures:s,onDelete:u},children:Wv})]})},Iv=({cookies:s,originsCount:c,loading:d,onClear:u,onDelete:f})=>{const[p,m]=g.useState({}),[S,b]=g.useState({}),x=R=>`${R.name}|${R.domain||""}|${R.path||""}|${R.expires||""}`,E=R=>{if(!R)return!1;let j=0;for(let O=0;O<R.length;O+=1){const L=R.charCodeAt(O);(L===9||L===10||L===13||L>=32&&L<=126)&&(j+=1)}return j/R.length>=.85},w=R=>{if(!R)return null;if(/%[0-9A-Fa-f]{2}/.test(R))try{const j=decodeURIComponent(R);if(j!==R&&E(j))return{value:j,kind:"URL"}}catch{}if(/^[A-Za-z0-9+/=]+$/.test(R)&&R.length>=12&&R.length%4===0)try{const j=atob(R);if(j&&E(j))return{value:j,kind:"Base64"}}catch{}return null},D=R=>{const j=x(R);m(O=>({...O,[j]:!O[j]}))},B=R=>{const j=x(R);b(O=>({...O,[j]:!O[j]}))};return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{className:"flex items-center gap-4",children:[r.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:r.jsx(_p,{className:"w-5 h-5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Cookies"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Browser storage state"})]})]}),r.jsx("button",{onClick:u,className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-yellow-500/5 border border-yellow-500/10 text-yellow-400 hover:bg-yellow-500/10 transition-all",children:"Clear Cookies"})]}),d&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading data..."}),!d&&s.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No cookies found."}),r.jsx("div",{className:"space-y-3",children:s.map(R=>{const j=x(R),O=!!p[j],L=R.value||"",G=w(L),Z=!!G&&!!S[j],ne=Z&&G?G.value:L,te=O||ne.length<=120?ne:`${ne.slice(0,120)}...`;return r.jsxs("div",{className:"bg-white/5 border border-white/10 rounded-2xl p-4 space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between gap-4",children:[r.jsxs("div",{className:"min-w-0",children:[r.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest truncate",children:R.name}),r.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[R.domain||"local"," | ",R.path||"/",R.expires?` | ${new Date(R.expires*1e3).toLocaleString()}`:""]})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[G&&r.jsx("button",{onClick:()=>B(R),className:"px-3 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl border border-white/10 text-white/70 hover:text-white hover:bg-white/5 transition-all",children:Z?"Show Raw":`Decode ${G.kind}`}),r.jsx("button",{onClick:()=>f(R),className:"px-3 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-red-500/5 border border-red-500/10 text-red-400 hover:bg-red-500/10 transition-all",children:"Delete"})]})]}),r.jsx("div",{onClick:()=>D(R),className:"cursor-pointer rounded-xl bg-black/40 border border-white/10 px-3 py-2 font-mono text-[10px] text-blue-200/80 whitespace-pre-wrap break-words",title:"Click to expand/collapse",children:te||"(empty)"})]},j)})}),!d&&c>0&&r.jsxs("div",{className:"pt-2 text-[8px] text-gray-600 uppercase tracking-widest",children:["Origins stored: ",c]})]})},Pv=({tab:s,onTabChange:c})=>r.jsxs("div",{className:"flex items-end justify-between mb-8",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-[10px] font-bold text-purple-500 uppercase tracking-[0.4em]",children:"System"}),r.jsx("h2",{className:"text-4xl font-bold tracking-tighter text-white",children:"Settings"})]}),r.jsx("div",{className:"flex bg-white/5 rounded-xl p-1 border border-white/5",children:["system","data","proxies"].map(d=>r.jsx("button",{onClick:()=>c(d),className:`px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-lg transition-all ${s===d?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:d},d))})]}),eb=({splitPercent:s,onChange:c,onReset:d})=>{const u=Number.isFinite(s)?Math.min(75,Math.max(25,s)):30;return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center justify-between",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Layout"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Default editor split"})]}),r.jsx("button",{onClick:d,className:"px-4 py-2 border border-white/10 text-[9px] font-bold rounded-xl uppercase tracking-widest text-white/70 hover:text-white hover:bg-white/5 transition-all",children:"Reset 30/70"})]}),r.jsxs("div",{className:"space-y-3",children:[r.jsxs("div",{className:"flex items-center justify-between text-[9px] font-bold uppercase tracking-widest text-gray-500",children:[r.jsx("span",{children:"Editor"}),r.jsxs("span",{children:[u,"%"]})]}),r.jsx("input",{type:"range",min:25,max:75,step:5,value:u,onChange:f=>c(Math.min(75,Math.max(25,Number(f.target.value)))),className:"w-full accent-white"}),r.jsxs("div",{className:"flex items-center justify-between text-[9px] font-bold uppercase tracking-widest text-gray-500",children:[r.jsx("span",{children:"Preview"}),r.jsxs("span",{children:[100-u,"%"]})]})]})]})},tb=({proxies:s,defaultProxyId:c,includeDefaultInRotation:d,rotationMode:u,loading:f,onRefresh:p,onAdd:m,onImport:S,onUpdate:b,onDelete:x,onSetDefault:E,onToggleIncludeDefault:w,onRotationModeChange:D})=>{const[B,R]=g.useState(""),[j,O]=g.useState(""),[L,G]=g.useState(""),[Z,ne]=g.useState(""),[te,ae]=g.useState(null),[P,he]=g.useState(""),[F,ve]=g.useState(""),[Ae,we]=g.useState(""),[Me,be]=g.useState(""),[Ie,k]=g.useState(""),H=g.useRef(null),W=()=>{B.trim()&&(m({server:B.trim(),username:j.trim()||void 0,password:L.trim()||void 0,label:Z.trim()||void 0}),R(""),O(""),G(""),ne(""))},ye=Q=>{ae(Q.id),he(Q.server),ve(Q.username||""),we(""),be(Q.label||"")},de=()=>{ae(null),he(""),ve(""),we(""),be("")},y=()=>{!te||!P.trim()||(b(te,{server:P.trim(),username:F.trim()||void 0,password:Ae.trim()||void 0,label:Me.trim()||void 0}),de())},q=Q=>{const ie=Q.trim();if(!ie)return null;if(ie.includes("://"))return{server:ie};const pe=ie.split(":");if(pe.length<2)return null;const xe=pe[0]?.trim(),Qe=pe[1]?.trim();if(!xe||!Qe)return null;const ke=pe[2]?pe[2].trim():"",Tt=pe.length>3?pe.slice(3).join(":").trim():"";return{server:`${xe}:${Qe}`,username:ke||void 0,password:Tt||void 0}},$=async Q=>{const ie=Array.from(Q.target.files||[]);if(ie.length)try{const Qe=(await Promise.all(ie.map(ke=>ke.text()))).join(`
19
+ `).split(/\r?\n/).flatMap(ke=>ke.split(/[,;]+/)).map(q).filter(Boolean);if(Qe.length===0){k("No valid proxies found in file.");return}k(""),S(Qe)}catch{k("Failed to read file.")}finally{H.current&&(H.current.value="")}};return r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-6",children:[r.jsxs("div",{className:"flex items-center gap-4 mb-2",children:[r.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:r.jsx(Xy,{className:"w-5 h-5"})}),r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"Proxies"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Set defaults and rotate per task"})]}),r.jsx("div",{className:"ml-auto",children:r.jsxs("button",{onClick:p,disabled:f,className:"px-4 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white hover:bg-white/5 transition-all disabled:opacity-50 inline-flex items-center gap-2",children:[r.jsx(zp,{className:`w-3 h-3 ${f?"animate-spin":""}`}),"Refresh"]})})]}),r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r.jsx("input",{type:"text",placeholder:"Proxy server (host:port or scheme://host:port)",value:B,onChange:Q=>R(Q.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white"}),r.jsx("input",{type:"text",placeholder:"Label (optional)",value:Z,onChange:Q=>ne(Q.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white"}),r.jsx("input",{type:"text",placeholder:"Username (optional)",value:j,onChange:Q=>O(Q.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white"}),r.jsx("input",{type:"password",placeholder:"Password (optional)",value:L,onChange:Q=>G(Q.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("button",{onClick:W,className:"px-6 py-3 rounded-2xl text-[9px] font-bold uppercase tracking-widest bg-white text-black hover:scale-105 transition-all",children:"Add Proxy"}),r.jsx("button",{onClick:()=>H.current?.click(),className:"px-6 py-3 rounded-2xl text-[9px] font-bold uppercase tracking-widest border border-white/10 text-white hover:bg-white/5 transition-all",children:"Import"}),r.jsx("button",{onClick:()=>E("host"),className:`px-6 py-3 rounded-2xl text-[9px] font-bold uppercase tracking-widest border border-white/10 transition-all ${c?"text-white hover:bg-white/5":"bg-white/10 text-white"}`,children:"Use Host IP"})]}),r.jsx("input",{ref:H,type:"file",accept:".txt,text/plain",onChange:$,className:"hidden"}),Ie&&r.jsx("div",{className:"text-[9px] text-red-400 uppercase tracking-widest",children:Ie}),r.jsxs("label",{className:"flex items-center justify-between gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 hover:bg-white/[0.05] transition-all group",children:[r.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Rotation mode"}),r.jsxs("select",{value:u,onChange:Q=>D(Q.target.value==="random"?"random":"round-robin"),className:"bg-white/[0.05] border border-white/10 rounded-xl px-3 py-2 text-[10px] text-white uppercase tracking-widest",children:[r.jsx("option",{value:"round-robin",children:"Round robin"}),r.jsx("option",{value:"random",children:"Random"})]})]}),r.jsxs("label",{className:"flex items-center gap-3 p-3.5 rounded-2xl bg-white/[0.02] border border-white/5 hover:bg-white/[0.05] transition-all cursor-pointer group",children:[r.jsx("input",{type:"checkbox",checked:d,onChange:Q=>w(Q.target.checked),className:"w-4 h-4 rounded border-white/20 bg-transparent"}),r.jsx("span",{className:"text-[10px] font-bold text-gray-500 uppercase tracking-widest group-hover:text-white",children:"Include default IP in rotation pool"})]}),r.jsxs("div",{className:"space-y-3",children:[f&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading proxies..."}),!f&&s.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No proxies saved yet."}),!f&&s.map(Q=>{const ie=Q.id===c,pe=Q.id===te;return r.jsx("div",{className:"flex items-center justify-between gap-4 p-4 rounded-2xl border border-white/10 bg-white/[0.02]",children:pe?r.jsxs("div",{className:"w-full space-y-3",children:[r.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:[r.jsx("input",{type:"text",value:P,onChange:xe=>he(xe.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-2 text-[10px] text-white"}),r.jsx("input",{type:"text",value:Me,onChange:xe=>be(xe.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-2 text-[10px] text-white"}),r.jsx("input",{type:"text",value:F,onChange:xe=>ve(xe.target.value),className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-2 text-[10px] text-white"}),r.jsx("input",{type:"password",value:Ae,onChange:xe=>we(xe.target.value),placeholder:"Password (leave blank to keep)",className:"bg-white/[0.05] border border-white/10 rounded-xl px-4 py-2 text-[10px] text-white"})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{onClick:y,className:"px-3 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white hover:bg-white/5 transition-all",children:"Save"}),r.jsx("button",{onClick:de,className:"px-3 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white/70 hover:bg-white/5 transition-all",children:"Cancel"})]})]}):r.jsxs(r.Fragment,{children:[r.jsxs("div",{className:"space-y-1",children:[r.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest",children:Q.label||Q.server}),r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:Q.server})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsxs("button",{onClick:()=>E(Q.id),className:`px-3 py-2 rounded-xl border text-[9px] font-bold uppercase tracking-widest transition-all inline-flex items-center gap-2 ${ie?"bg-white text-black border-white":"border-white/10 text-white hover:bg-white/5"}`,children:[ie?r.jsx(Fy,{className:"w-3 h-3"}):r.jsx(Jy,{className:"w-3 h-3"}),ie?"Default":"Set Default"]}),Q.id!=="host"&&r.jsxs(r.Fragment,{children:[r.jsx("button",{onClick:()=>ye(Q),className:"px-3 py-2 rounded-xl border border-white/10 text-[9px] font-bold uppercase tracking-widest text-white hover:bg-white/5 transition-all",children:"Edit"}),r.jsxs("button",{onClick:()=>x(Q.id),className:"px-3 py-2 rounded-xl border border-red-500/20 text-[9px] font-bold uppercase tracking-widest text-red-300 hover:bg-red-500/10 transition-all inline-flex items-center gap-2",children:[r.jsx(Lu,{className:"w-3 h-3"}),"Delete"]})]})]})]})},Q.id)})]})]})},ab=({selection:s,options:c,loading:d,onChange:u})=>r.jsxs("div",{className:"glass-card p-8 rounded-[40px] space-y-4",children:[r.jsxs("div",{children:[r.jsx("h3",{className:"text-sm font-bold text-white uppercase tracking-widest",children:"User Agent"}),r.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest mt-1",children:"Default browser identity"})]}),r.jsxs("div",{className:"space-y-2",children:[r.jsxs("select",{value:s,onChange:f=>u(f.target.value),disabled:d,className:"w-full bg-white/[0.05] border border-white/10 rounded-xl px-4 py-3 text-[10px] text-white uppercase tracking-widest disabled:opacity-60",children:[r.jsx("option",{value:"system",children:"System user agent (default)"}),c.map(f=>r.jsx("option",{value:f,children:f},f))]}),r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Applies when rotate UA is disabled in tasks."})]})]}),lb=({onClearStorage:s,onConfirm:c,onNotify:d})=>{const[u,f]=g.useState("system"),[p,m]=g.useState([]),[S,b]=g.useState([]),[x,E]=g.useState([]),[w,D]=g.useState(!1),[B,R]=g.useState(null),[j,O]=g.useState(!1),[L,G]=g.useState(!1),[Z,ne]=g.useState(30),[te,ae]=g.useState([]),[P,he]=g.useState(null),[F,ve]=g.useState(!1),[Ae,we]=g.useState("round-robin"),[Me,be]=g.useState(!1),[Ie,k]=g.useState("system"),[H,W]=g.useState([]),[ye,de]=g.useState(!1),y="doppelganger.layout.leftWidthPct";g.useEffect(()=>{try{const se=localStorage.getItem(y);if(se){const ue=Math.min(75,Math.max(25,Math.round(parseFloat(se)*100)));Number.isNaN(ue)||ne(ue)}}catch{}},[]);const q=async()=>{D(!0);try{const[se,ue]=await Promise.all([fetch("/api/data/captures"),fetch("/api/data/cookies")]),fe=se.ok?await se.json():{captures:[]},Ne=ue.ok?await ue.json():{cookies:[],origins:[]};m(Array.isArray(fe.captures)?fe.captures:[]),b(Array.isArray(Ne.cookies)?Ne.cookies:[]),E(Array.isArray(Ne.origins)?Ne.origins:[])}catch{m([]),b([]),E([])}finally{D(!1)}},$=async se=>{if(!await c(`Delete capture ${se}?`))return;(await fetch(`/api/data/captures/${encodeURIComponent(se)}`,{method:"DELETE"})).ok?(d("Capture deleted.","success"),q()):d("Delete failed.","error")},Q=async se=>{if(!await c(`Delete cookie ${se.name}?`))return;(await fetch("/api/data/cookies/delete",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:se.name,domain:se.domain,path:se.path})})).ok?(d("Cookie deleted.","success"),q()):d("Delete failed.","error")},ie=async()=>{O(!0);try{const se=await fetch("/api/settings/api-key",{credentials:"include"});if(!se.ok){se.status===401&&d("Session expired. Please log in again.","error"),R(null);return}const ue=await se.json();R(ue.apiKey||null)}catch{R(null)}finally{O(!1)}},pe=async()=>{be(!0);try{const se=await fetch("/api/settings/proxies",{credentials:"include"});if(!se.ok){se.status===401&&d("Session expired. Please log in again.","error"),ae([]),he(null),we("round-robin");return}const ue=await se.json();ae(Array.isArray(ue.proxies)?ue.proxies:[]),he(ue.defaultProxyId||null),ve(!!ue.includeDefaultInRotation),we(ue.rotationMode==="random"?"random":"round-robin")}catch{ae([]),he(null),ve(!1),we("round-robin")}finally{be(!1)}},xe=async se=>{be(!0);try{const ue=await fetch("/api/settings/proxies",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(se)});if(!ue.ok){let Ne="";try{const mt=await ue.json();Ne=mt?.error||mt?.message||""}catch{Ne=""}d(`Failed to add proxy${Ne?`: ${Ne}`:""}.`,"error");return}const fe=await ue.json();ae(Array.isArray(fe.proxies)?fe.proxies:[]),he(fe.defaultProxyId||null),ve(!!fe.includeDefaultInRotation),we(fe.rotationMode==="random"?"random":"round-robin"),d("Proxy added.","success")}catch{d("Failed to add proxy.","error")}finally{be(!1)}},Qe=async()=>{de(!0);try{const se=await fetch("/api/settings/user-agent",{credentials:"include"});if(!se.ok){se.status===401&&d("Session expired. Please log in again.","error"),k("system"),W([]);return}const ue=await se.json();k(ue.selection==="system"?"system":String(ue.selection||"system")),W(Array.isArray(ue.userAgents)?ue.userAgents:[])}catch{k("system"),W([])}finally{de(!1)}},ke=async se=>{de(!0);try{const ue=await fetch("/api/settings/user-agent",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({selection:se})});if(!ue.ok){d("Failed to update user agent.","error");return}const fe=await ue.json();k(fe.selection==="system"?"system":String(fe.selection||"system")),W(Array.isArray(fe.userAgents)?fe.userAgents:[]),d("User agent updated.","success")}catch{d("Failed to update user agent.","error")}finally{de(!1)}},Tt=async se=>{if(!se.length){d("No valid proxies found in file.","error");return}be(!0);try{const ue=await fetch("/api/settings/proxies/import",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({proxies:se})});if(!ue.ok){let Ne="";try{const mt=await ue.json();Ne=mt?.error||mt?.message||""}catch{Ne=""}d(`Failed to import proxies${Ne?`: ${Ne}`:""}.`,"error");return}const fe=await ue.json();ae(Array.isArray(fe.proxies)?fe.proxies:[]),he(fe.defaultProxyId||null),ve(!!fe.includeDefaultInRotation),we(fe.rotationMode==="random"?"random":"round-robin"),d("Proxies imported.","success")}catch{d("Failed to import proxies.","error")}finally{be(!1)}},fa=async(se,ue)=>{be(!0);try{const fe=await fetch(`/api/settings/proxies/${encodeURIComponent(se)}`,{method:"PUT",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify(ue)});if(!fe.ok){let mt="";try{const Wa=await fe.json();mt=Wa?.error||Wa?.message||""}catch{mt=""}d(`Failed to update proxy${mt?`: ${mt}`:""}.`,"error");return}const Ne=await fe.json();ae(Array.isArray(Ne.proxies)?Ne.proxies:[]),he(Ne.defaultProxyId||null),ve(!!Ne.includeDefaultInRotation),we(Ne.rotationMode==="random"?"random":"round-robin"),d("Proxy updated.","success")}catch{d("Failed to update proxy.","error")}finally{be(!1)}},ya=async se=>{if(!(se==="host"||!await c("Delete this proxy?"))){be(!0);try{const fe=await fetch(`/api/settings/proxies/${encodeURIComponent(se)}`,{method:"DELETE",credentials:"include"});if(!fe.ok){d("Delete failed.","error");return}const Ne=await fe.json();ae(Array.isArray(Ne.proxies)?Ne.proxies:[]),he(Ne.defaultProxyId||null),ve(!!Ne.includeDefaultInRotation),we(Ne.rotationMode==="random"?"random":"round-robin"),d("Proxy deleted.","success")}catch{d("Delete failed.","error")}finally{be(!1)}}},va=async se=>{const ue=se==="host"?null:se;be(!0);try{const fe=await fetch("/api/settings/proxies/default",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({id:ue})});if(!fe.ok){d("Failed to set default.","error");return}const Ne=await fe.json();ae(Array.isArray(Ne.proxies)?Ne.proxies:[]),he(Ne.defaultProxyId||null),ve(!!Ne.includeDefaultInRotation),we(Ne.rotationMode==="random"?"random":"round-robin"),d("Default proxy updated.","success")}catch{d("Failed to set default.","error")}finally{be(!1)}},_t=async se=>{be(!0);try{const ue=await fetch("/api/settings/proxies/rotation",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({includeDefaultInRotation:se})});if(!ue.ok){d("Failed to update rotation setting.","error");return}const fe=await ue.json();ae(Array.isArray(fe.proxies)?fe.proxies:[]),he(fe.defaultProxyId||null),ve(!!fe.includeDefaultInRotation),we(fe.rotationMode==="random"?"random":"round-robin"),d("Rotation setting updated.","success")}catch{d("Failed to update rotation setting.","error")}finally{be(!1)}},ba=async se=>{be(!0);try{const ue=await fetch("/api/settings/proxies/rotation",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({rotationMode:se})});if(!ue.ok){d("Failed to update rotation mode.","error");return}const fe=await ue.json();ae(Array.isArray(fe.proxies)?fe.proxies:[]),he(fe.defaultProxyId||null),ve(!!fe.includeDefaultInRotation),we(fe.rotationMode==="random"?"random":"round-robin"),d("Rotation mode updated.","success")}catch{d("Failed to update rotation mode.","error")}finally{be(!1)}},ha=async()=>{G(!0);try{const se=await fetch("/api/settings/api-key",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include"});if(!se.ok){let fe="";try{const Ne=await se.json();fe=Ne?.error||Ne?.message||""}catch{fe=""}se.status===401?d("Session expired. Please log in again.","error"):d(`Failed to generate API key${fe?`: ${fe}`:""}.`,"error");return}const ue=await se.json();R(ue.apiKey||null),d("API key generated.","success")}catch{d("Failed to generate API key.","error")}finally{G(!1)}},wa=async()=>{if(B)try{if(navigator.clipboard&&window.isSecureContext)await navigator.clipboard.writeText(B);else{const se=document.createElement("textarea");se.value=B,se.style.position="fixed",se.style.opacity="0",document.body.appendChild(se),se.select();const ue=document.execCommand("copy");if(document.body.removeChild(se),!ue)throw new Error("Copy failed")}d("API key copied.","success")}catch{d("Copy failed.","error")}};return g.useEffect(()=>{u==="data"&&q(),u==="system"&&(ie(),Qe()),u==="proxies"&&pe()},[u]),g.useEffect(()=>{try{localStorage.setItem(y,String(Z/100))}catch{}},[Z]),r.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:r.jsxs("div",{className:"max-w-3xl mx-auto space-y-8",children:[r.jsx(Pv,{tab:u,onTabChange:f}),u==="system"&&r.jsxs(r.Fragment,{children:[r.jsx(Qv,{apiKey:B,loading:j,saving:L,onRegenerate:ha,onCopy:wa}),r.jsx(ab,{selection:Ie,options:H,loading:ye,onChange:ke}),r.jsx(eb,{splitPercent:Z,onChange:ne,onReset:()=>ne(30)}),r.jsx(Zv,{onClearStorage:s})]}),u==="data"&&r.jsxs(r.Fragment,{children:[r.jsx(Fv,{captures:p,loading:w,onRefresh:q,onDelete:$}),r.jsx(Iv,{cookies:S,originsCount:x.length,loading:w,onClear:()=>s("cookies"),onDelete:Q})]}),u==="proxies"&&r.jsx(tb,{proxies:te,defaultProxyId:P,includeDefaultInRotation:F,rotationMode:Ae,loading:Me,onRefresh:pe,onAdd:xe,onImport:Tt,onUpdate:fa,onDelete:ya,onSetDefault:va,onToggleIncludeDefault:_t,onRotationModeChange:ba})]})})},Ru=({title:s="Loading",subtitle:c})=>r.jsxs("div",{className:"fixed inset-0 z-[80] bg-[#020202] flex items-center justify-center",children:[r.jsx("div",{className:"absolute inset-0 opacity-[0.03] pointer-events-none",style:{backgroundImage:"radial-gradient(#fff 1px, transparent 1px)",backgroundSize:"40px 40px"}}),r.jsxs("div",{className:"glass-card p-10 rounded-[40px] text-center space-y-4",children:[r.jsx("div",{className:"w-12 h-12 mx-auto rounded-full border border-white/10 flex items-center justify-center",children:r.jsx("div",{className:"w-5 h-5 border-2 border-white/20 border-t-white rounded-full animate-spin"})}),r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.4em] text-gray-500",children:s}),c&&r.jsx("p",{className:"text-xs font-mono text-white/80",children:c})]})]})]}),Js=140,nb=6,ib=4,sb=({index:s,style:c,data:d})=>{const u=d.items[s];return u?r.jsxs("div",{style:c,onClick:()=>d.navigate(`/executions/${u.id}`),onKeyDown:f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),d.navigate(`/executions/${u.id}`))},role:"button",tabIndex:0,className:"glass-card w-full rounded-2xl p-5 flex items-center gap-4 text-left hover:bg-white/[0.06] transition-all cursor-pointer",children:[r.jsx("div",{className:"w-10 h-10 rounded-2xl bg-white/5 flex items-center justify-center text-gray-400",children:u.source==="api"?r.jsx(ey,{className:"w-5 h-5"}):r.jsx(Ay,{className:"w-5 h-5"})}),r.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[r.jsx("div",{className:"text-[10px] font-bold text-white uppercase tracking-widest truncate",children:u.taskName||u.mode}),r.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(u.timestamp).toLocaleString()," | ",u.source," | ",u.mode," | ",u.status," | ",u.durationMs,"ms"]}),u.url&&r.jsx("div",{className:"text-[9px] text-white/50 truncate font-mono",children:u.url})]}),r.jsx("button",{onClick:f=>{f.stopPropagation(),d.deleteExecution(u.id)},className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-red-500/5 border border-red-500/10 text-red-400 hover:bg-red-500/10 transition-all",children:"Delete"})]}):null},rb=({onConfirm:s,onNotify:c})=>{const d=zn(),[u,f]=g.useState([]),[p,m]=g.useState("all"),[S,b]=g.useState(!1),x=g.useCallback(async()=>{b(!0);try{const B=await fetch("/api/executions");if(!B.ok)throw new Error("Failed to load");const R=await B.json();f(Array.isArray(R.executions)?R.executions:[])}catch{f([])}finally{b(!1)}},[]),E=g.useCallback(async()=>{if(!await s("Clear all executions?"))return;(await fetch("/api/executions/clear",{method:"POST"})).ok?(c("Executions cleared.","success"),x()):c("Clear failed.","error")},[x,s,c]),w=g.useCallback(async B=>{if(!await s("Delete this execution?"))return;(await fetch(`/api/executions/${B}`,{method:"DELETE"})).ok?(c("Execution deleted.","success"),f(O=>O.filter(L=>L.id!==B))):c("Delete failed.","error")},[s,c]);g.useEffect(()=>{x()},[x]);const D=g.useMemo(()=>u.filter(B=>p==="all"?!0:B.source===p),[u,p]);return r.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:r.jsxs("div",{className:"max-w-6xl mx-auto space-y-8",children:[r.jsxs("div",{className:"flex items-end justify-between",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-[10px] font-bold text-blue-400 uppercase tracking-[0.4em]",children:"Executions"}),r.jsx("h2",{className:"text-4xl font-bold tracking-tighter text-white",children:"Run History"})]}),r.jsxs("div",{className:"flex items-center gap-3",children:[r.jsx("div",{className:"flex bg-white/5 rounded-xl p-1 border border-white/5",children:["all","editor","api"].map(B=>r.jsx("button",{onClick:()=>m(B),className:`px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-lg transition-all ${p===B?"bg-white text-black":"text-gray-500 hover:text-white"}`,children:B},B))}),r.jsx("button",{onClick:x,className:"w-10 h-10 rounded-2xl border border-white/10 text-gray-400 hover:text-white hover:bg-white/5 transition-all flex items-center justify-center",title:"Refresh",children:r.jsx(zp,{className:"w-4 h-4"})}),r.jsx("button",{onClick:E,className:"w-10 h-10 rounded-2xl border border-red-500/20 text-red-400 hover:bg-red-500/10 transition-all flex items-center justify-center",title:"Clear all",children:r.jsx(Lu,{className:"w-4 h-4"})})]})]}),S&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading executions..."}),!S&&D.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No executions found."}),!S&&D.length>0&&r.jsx(ar,{height:Math.min(Math.max(Js,D.length*Js),Js*nb),itemCount:D.length,itemSize:Js,width:"100%",overscanCount:ib,itemData:{items:D,deleteExecution:w,navigate:d},children:sb})]})})},cb=s=>{if(!s.result)return null;const c=s.result||{};return{url:s.url||c.url||"",finalUrl:c.final_url||c.finalUrl,html:c.html,data:c.data??c.html??"",screenshotUrl:c.screenshot_url||c.screenshotUrl,logs:c.logs||[],timestamp:new Date(s.timestamp).toLocaleTimeString()}},ub=({onConfirm:s,onNotify:c})=>{const{id:d}=yp(),u=zn(),[f,p]=g.useState(null),[m,S]=g.useState(!1);if(g.useEffect(()=>{(async()=>{if(d){S(!0);try{const E=await fetch(`/api/executions/${d}`);if(!E.ok)throw new Error("Failed to load execution");const w=await E.json();p(w.execution||null)}catch{p(null)}finally{S(!1)}}})()},[d]),m)return r.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:r.jsx("div",{className:"max-w-6xl mx-auto text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading execution..."})});if(!f)return r.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:r.jsxs("div",{className:"max-w-6xl mx-auto space-y-6",children:[r.jsx("button",{onClick:()=>u("/executions"),className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Back"}),r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"Execution not found."})]})});const b=cb(f);return r.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:r.jsxs("div",{className:"max-w-6xl mx-auto space-y-8",children:[r.jsxs("div",{className:"flex items-end justify-between",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-[10px] font-bold text-blue-400 uppercase tracking-[0.4em]",children:"Execution"}),r.jsx("h2",{className:"text-3xl font-bold tracking-tighter text-white",children:f.taskName||f.mode}),r.jsxs("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:[new Date(f.timestamp).toLocaleString()," | ",f.source," | ",f.mode," | ",f.status," | ",f.durationMs,"ms"]})]}),r.jsx("button",{onClick:()=>u("/executions"),className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Back"})]}),r.jsxs("div",{className:"glass-card rounded-[32px] p-8 flex flex-col min-h-[420px]",children:[r.jsx("div",{className:"flex items-center justify-between border-b border-white/5 pb-4 mb-6",children:r.jsx("span",{className:"text-[8px] font-bold text-gray-500 uppercase tracking-widest",children:"Output"})}),b?r.jsx(Up,{results:b,isExecuting:!1,onConfirm:s,onNotify:c,fullWidth:!0}):r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"No output captured."})]})]})})},ob=360,Bp=12,Ws=ob+Bp,db=6,fb=4,hb=({index:s,style:c,data:d})=>{const u=d.captures[s];return u?r.jsx("div",{style:{...c,paddingBottom:Bp},children:r.jsx(Dp,{capture:u,onDelete:d.onDelete})}):null},pb=({onConfirm:s,onNotify:c})=>{const d=zn(),[u,f]=g.useState([]),[p,m]=g.useState(!1),S=async()=>{m(!0);try{const x=await fetch("/api/data/captures"),E=x.ok?await x.json():{captures:[]};f(Array.isArray(E.captures)?E.captures:[])}catch{f([])}finally{m(!1)}},b=g.useCallback(async x=>{if(!await s(`Delete capture ${x}?`))return;(await fetch(`/api/data/captures/${encodeURIComponent(x)}`,{method:"DELETE"})).ok?(f(D=>D.filter(B=>B.name!==x)),c("Capture deleted.","success")):c("Delete failed.","error")},[s,c]);return g.useEffect(()=>{S()},[]),r.jsx("main",{className:"flex-1 p-12 overflow-y-auto custom-scrollbar animate-in fade-in duration-500",children:r.jsxs("div",{className:"max-w-6xl mx-auto space-y-8",children:[r.jsxs("div",{className:"flex items-end justify-between",children:[r.jsxs("div",{className:"space-y-2",children:[r.jsx("p",{className:"text-[10px] font-bold text-blue-400 uppercase tracking-[0.4em]",children:"Captures"}),r.jsx("h2",{className:"text-3xl font-bold tracking-tighter text-white",children:"All Captures"}),r.jsx("div",{className:"text-[8px] text-gray-500 uppercase tracking-[0.2em]",children:"Recordings and screenshots from every run"})]}),r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{onClick:S,className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Refresh"}),r.jsx("button",{onClick:()=>d("/executions"),className:"px-4 py-2 text-[9px] font-bold uppercase tracking-widest rounded-xl bg-white/5 border border-white/10 text-white hover:bg-white/10 transition-all",children:"Executions"})]})]}),r.jsxs("div",{className:"glass-card rounded-[32px] p-8",children:[p&&r.jsx("div",{className:"text-[9px] text-gray-500 uppercase tracking-widest",children:"Loading captures..."}),!p&&u.length===0&&r.jsx("div",{className:"text-[9px] text-gray-600 uppercase tracking-widest",children:"No captures found."}),!p&&u.length>0&&r.jsx("div",{className:"space-y-4",children:r.jsx(ar,{height:Math.min(Math.max(Ws,u.length*Ws),Ws*db),width:"100%",itemCount:u.length,itemSize:Ws,overscanCount:fb,itemData:{captures:u,onDelete:b},children:hb})})]})]})})},qp=({title:s="Not Found",subtitle:c="The page you requested does not exist.",onBack:d})=>r.jsx("div",{className:"h-full flex items-center justify-center px-10",children:r.jsxs("div",{className:"glass-card w-full max-w-2xl rounded-[40px] border border-white/10 p-10 text-center space-y-6",children:[r.jsx("div",{className:"text-[10px] font-bold uppercase tracking-[0.4em] text-gray-500",children:"404"}),r.jsx("h2",{className:"text-3xl font-bold tracking-tighter text-white",children:s}),r.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.25em] text-gray-500",children:c}),d&&r.jsxs("button",{onClick:d,className:"mt-2 inline-flex items-center gap-2 px-6 py-3 rounded-2xl bg-white text-black text-[9px] font-bold uppercase tracking-[0.3em] hover:scale-105 transition-all",children:[r.jsx(zy,{className:"w-4 h-4"}),"Back"]})]})}),mb=({message:s,tone:c,onClose:d})=>{const[u,f]=g.useState(!1);return g.useEffect(()=>{const p=setTimeout(()=>{f(!0)},2500);return()=>clearTimeout(p)},[]),g.useEffect(()=>{if(!u)return;const p=setTimeout(()=>d(),240);return()=>clearTimeout(p)},[u,d]),r.jsx("div",{className:`fixed bottom-6 right-6 z-[220] max-w-sm w-full ${u?"animate-out fade-out slide-out-to-bottom-3 duration-200":"animate-in fade-in slide-in-from-bottom-3 duration-300"}`,children:r.jsxs("div",{className:`glass-card rounded-2xl border border-white/10 p-4 shadow-2xl flex items-start gap-3 ${u?"animate-out fade-out zoom-out-95 duration-200":"animate-in fade-in zoom-in-95 duration-300"}`,children:[r.jsx("div",{className:`mt-1 h-2.5 w-2.5 rounded-full ${c==="error"?"bg-red-400":"bg-emerald-400"}`}),r.jsxs("div",{className:"flex-1",children:[r.jsx("p",{className:"text-[8px] font-bold uppercase tracking-[0.35em] text-gray-500",children:"Notification"}),r.jsx("p",{className:"mt-2 font-mono text-[11px] text-white leading-relaxed",children:s})]}),r.jsx("button",{onClick:()=>f(!0),className:"px-2 py-1 text-[8px] font-bold uppercase tracking-[0.2em] text-white/60 hover:text-white",children:"Close"})]})})},xb=({request:s,onResolve:c})=>r.jsx("div",{className:"fixed inset-0 z-[201] flex items-center justify-center bg-black/70 backdrop-blur-sm px-6",children:r.jsxs("div",{className:"glass-card w-full max-w-md rounded-[32px] border border-white/10 p-8 text-center shadow-2xl",children:[r.jsx("p",{className:"text-[10px] font-bold uppercase tracking-[0.4em] text-gray-500",children:s.title??"Confirm"}),r.jsx("p",{className:"mt-4 font-mono text-sm text-white",children:s.message}),r.jsxs("div",{className:"mt-6 flex gap-4",children:[r.jsx("button",{onClick:()=>c(!1),className:"w-full rounded-2xl px-6 py-3 text-[9px] font-bold uppercase tracking-[0.3em] transition-all bg-white/5 border border-white/10 text-gray-300 hover:bg-white/10",children:s.cancelLabel??"Cancel"}),r.jsx("button",{onClick:()=>c(!0),className:"w-full rounded-2xl px-6 py-3 text-[9px] font-bold uppercase tracking-[0.3em] transition-all bg-white text-black hover:scale-105 shadow-xl shadow-white/10",children:s.confirmLabel??"Confirm"})]})]})}),gb=({tasks:s,loadTasks:c,touchTask:d,currentTask:u,setCurrentTask:f,...p})=>{const{id:m}=yp(),S=zn(),[b,x]=g.useState(!1),[E,w]=g.useState(!1);return g.useEffect(()=>{(async()=>{if(u?.id===m)return;x(!0),w(!1);let B=s;s.length===0&&(B=await c());const R=B.find(j=>String(j.id)===String(m));if(R){const j={...R};(!j.variables||Array.isArray(j.variables))&&(j.variables={}),j.stealth||(j.stealth={allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1}),Array.isArray(j.actions)&&(j.actions=j.actions.map((O,L)=>O&&O.id?O:{...O,id:`act_${Date.now()}_${L}_${Math.floor(Math.random()*1e3)}`})),j.includeShadowDom===void 0&&(j.includeShadowDom=!0),f(j),m&&d(m)}else w(!0);x(!1)})()},[m,s]),E?r.jsx(qp,{title:"Task Not Found",subtitle:"This task does not exist or was deleted.",onBack:()=>S("/dashboard")}):b||!u||String(u.id)!==String(m)?r.jsx(Ru,{title:"Loading Mission Data",subtitle:"Syncing task payload"}):r.jsx(Lp,{currentTask:u,setCurrentTask:f,tasks:s,...p})};function yb(){const s=zn(),c=wl(),[,d]=g.useState(null),[u,f]=g.useState("checking"),[p,m]=g.useState(""),[S,b]=g.useState([]),[x,E]=g.useState(null),[w,D]=g.useState("visual"),[B,R]=g.useState(!1),[j,O]=g.useState(null),[L,G]=g.useState({}),[Z,ne]=g.useState(""),[te,ae]=g.useState(null),[P,he]=g.useState(null),[F,ve]=g.useState(null),Ae=g.useRef(null),we=g.useRef(null),Me=(K,le="success")=>{he({message:K,tone:le}),le==="success"&&setTimeout(()=>{he(ce=>ce&&ce.message===K?null:ce)},2e3)},be=K=>new Promise(le=>{Ae.current=le,ve(typeof K=="string"?{message:K}:K)}),Ie=K=>{const le=Ae.current;Ae.current=null,ve(null),le&&le(K)},k=K=>K&&K[0].toUpperCase()+K.slice(1),H=K=>{if(!K.actions||!Array.isArray(K.actions))return K;let le=!1;const ce=K.actions.map((ee,We)=>ee.id?ee:(le=!0,{...ee,id:`act_${Date.now()}_${We}_${Math.floor(Math.random()*1e3)}`}));return le?{...K,actions:ce}:K},W="doppelganger.pinnedResults",de=(K=>K?.id?String(K.id):"new")(x),y=x&&L[de]||null,q=(K,le)=>{const ce=String(K||"").trim();if(!ce)return"Execution failed.";const ee=ce.toLowerCase();if(le==="headful"){if(ee.includes("missing x server")||ee.includes("$display"))return"Headful browser could not start because no display server is available.";if(ee.includes("failed to connect to the bus"))return"Headful browser could not start due to missing system services."}let We=ce;const tt=We.indexOf("--disable-");return tt>0&&(We=We.slice(0,tt).trim()),We.length>240&&(We=`${We.slice(0,240)}...`),We||"Execution failed."},$=K=>{const le=String(K||"").toLowerCase();return le.includes("missing x server")||le.includes("$display")||le.includes("platform failed to initialize")||le.includes("no display server")},Q=()=>({name:"Imported Task",url:"",mode:"scrape",wait:3,selector:"",rotateUserAgents:!1,rotateProxies:!1,rotateViewport:!1,humanTyping:!1,stealth:{allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1},actions:[],variables:{},includeShadowDom:!0});g.useEffect(()=>{ie()},[]),g.useEffect(()=>{try{const K=localStorage.getItem(W);if(K){const le=JSON.parse(K);le&&typeof le=="object"&&G(le)}}catch{}},[]),g.useEffect(()=>{try{localStorage.setItem(W,JSON.stringify(L))}catch{}},[L]),g.useEffect(()=>{!c.pathname.startsWith("/tasks")&&w==="history"&&D("visual")},[c.pathname,w]),g.useEffect(()=>{if(c.pathname==="/tasks/new"&&!x){const K=ke();E(K),O(null)}},[c.pathname,x]);const ie=async()=>{try{const le=await(await fetch("/api/auth/me")).json();if(le.authenticated)d(le.user),f("authenticated"),xe();else{const ee=await(await fetch("/api/auth/check-setup")).json();f(ee.setupRequired?"setup":"login")}}catch{f("login")}},pe=async(K,le,ce,ee)=>{if(!K||!le)return;if(u==="setup"&&(!ce||le!==ee)){m(ce?"Passwords do not match":"Name required");return}const We=u==="setup"?"/api/auth/setup":"/api/auth/login",tt=u==="setup"?{name:ce,email:K,password:le}:{email:K,password:le};try{(await fetch(We,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(tt)})).ok?(m(""),await ie(),s("/")):m(u==="setup"?"Setup failed":"Invalid credentials")}catch{m("Network error")}},xe=async()=>{try{const ce=[...await(await fetch("/api/tasks")).json()].sort((ee,We)=>(We.last_opened||0)-(ee.last_opened||0));return b(ce),ce}catch(K){return console.error("Failed to load tasks",K),[]}},Qe=async()=>{await be("Are you sure you want to log out?")&&(await fetch("/api/auth/logout",{method:"POST"}),d(null),f("login"),s("/"),Me("Logged out.","success"))};function ke(){return{name:"Task "+Math.floor(Math.random()*100),url:"",mode:"agent",wait:3,selector:"",rotateUserAgents:!1,rotateProxies:!1,rotateViewport:!1,humanTyping:!1,stealth:{allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1},actions:[],variables:{},extractionFormat:"json",includeShadowDom:!0}}const Tt=()=>{const K=ke();E(K),O(null),s("/tasks/new")},fa=K=>{x&&G(le=>({...le,[de]:K}))},ya=()=>{x&&G(K=>{const le={...K};return delete le[de],le})},va=async K=>{try{await fetch(`/api/tasks/${K}/touch`,{method:"POST"}),xe()}catch(le){console.error("Failed to touch task",le)}},_t=K=>{const le={...K};(!le.variables||Array.isArray(le.variables))&&(le.variables={}),le.stealth||(le.stealth={allowTypos:!1,idleMovements:!1,overscroll:!1,deadClicks:!1,fatigue:!1,naturalTyping:!1}),le.rotateProxies===void 0&&(le.rotateProxies=!1),le.rotateViewport===void 0&&(le.rotateViewport=!1),le.extractionFormat||(le.extractionFormat="json"),le.includeShadowDom===void 0&&(le.includeShadowDom=!0);const ce=H(le);E(ce),O(null),s(`/tasks/${K.id}`),K.id&&va(K.id)},ba=async K=>{await be("Are you sure you want to delete this task?")&&(await fetch(`/api/tasks/${K}`,{method:"DELETE"}),xe(),c.pathname.includes(K)&&s("/dashboard"))},ha=async()=>{if(!x)return;const K={...x,last_opened:Date.now()},ce=await(await fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(K)})).json();E(ce),ne("SAVED"),setTimeout(()=>ne(""),2e3),xe(),c.pathname.includes("new")&&s(`/tasks/${ce.id}`,{replace:!0})},wa=async()=>{try{await fetch("/headful/stop",{method:"POST"})}catch(K){console.error("Failed to stop headful session",K)}finally{R(!1)}},se=async()=>{if(x?.mode==="headful"){await wa();return}if(te)try{await fetch("/api/executions/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({runId:te})})}catch(K){console.error("Failed to request stop",K)}we.current&&we.current.abort(),R(!1)},ue=async K=>{const le=K||x;if(!le||!le.url)return;const ce=H(le);x&&ce!==x&&E(ce);const ee=`run_${Date.now()}_${Math.floor(Math.random()*1e3)}`;if(ae(ee),B&&ce.mode==="headful"){await wa();return}R(!0),O({url:ce.url,logs:[],timestamp:"Running..."});let We=null;try{const tt={};Object.entries(ce.variables).forEach(([bt,Pt])=>{tt[bt]=Pt.value});const at=bt=>bt.replace(/\{\$(\w+)\}/g,(Pt,Rt)=>{if(Rt==="now")return new Date().toISOString();const jt=tt[Rt];return jt==null||jt===""?"":String(jt)}),Ue=bt=>typeof bt!="string"?bt:at(bt),gt=ce.mode!=="agent";We={...{...ce,url:gt?at(ce.url||""):ce.url||"",selector:gt?Ue(ce.selector):ce.selector,actions:gt?ce.actions.map(bt=>({...bt,selector:Ue(bt.selector),value:Ue(bt.value),key:Ue(bt.key)})):ce.actions},taskVariables:tt,variables:tt,runSource:"editor",taskId:ce.id,taskName:ce.name,taskSnapshot:ce,runId:ee};const kt=await(async bt=>{const Pt=new AbortController;we.current=Pt;const Rt=await fetch(`/${bt}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(We),signal:Pt.signal});if(!Rt.ok){let jt=null;try{jt=await Rt.json()}catch{jt=null}const ea=new Error(jt?.details||jt?.error||"Request failed");throw ea.code=jt?.error,ea}return Rt.json()})(ce.mode);O({url:ce.url,finalUrl:kt.final_url,html:kt.html,data:kt.data??kt.html??"No data captured.",screenshotUrl:kt.screenshot_url,logs:kt.logs||[],timestamp:new Date().toLocaleTimeString()})}catch(tt){if(tt?.name==="AbortError"){Me("Execution stopped.","success"),R(!1);return}if(ce?.mode==="headful"&&We&&(tt?.code==="HEADFUL_DISPLAY_UNAVAILABLE"||$(tt?.message||String(tt))))try{const Ue=await(async()=>{const gt=new AbortController;we.current=gt;const it=await fetch("/scrape",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(We),signal:gt.signal});if(!it.ok){const Sl=await it.json();throw new Error(Sl.details||Sl.error||"Request failed")}return it.json()})();Ue.logs=["Headful display unavailable; ran headless instead.",...Ue.logs||[]],O({url:ce.url,finalUrl:Ue.final_url,html:Ue.html,data:Ue.data??Ue.html??"No data captured.",screenshotUrl:Ue.screenshot_url,logs:Ue.logs||[],timestamp:new Date().toLocaleTimeString()}),R(!1);return}catch(Ue){const gt=q(Ue?.message||String(Ue),ce?.mode);Me(`Execution crash: ${gt}`,"error"),R(!1);return}const at=q(tt?.message||String(tt),ce?.mode);Me(`Execution crash: ${at}`,"error"),ce?.mode==="headful"&&R(!1)}finally{we.current=null,ce.mode!=="headful"&&R(!1)}},fe=async()=>{await ue()},Ne=async K=>{if(!await be(`Delete all ${K}?`))return;await fetch(K==="screenshots"?"/api/clear-screenshots":"/api/clear-cookies",{method:"POST"}),Me(`${k(K)} cleared.`,"success")},mt=()=>{const K={exportedAt:new Date().toISOString(),tasks:S},le=new Blob([JSON.stringify(K,null,2)],{type:"application/json"}),ce=URL.createObjectURL(le),ee=document.createElement("a"),We=new Date().toISOString().slice(0,10);ee.href=ce,ee.download=`doppelganger-tasks-${We}.json`,document.body.appendChild(ee),ee.click(),ee.remove(),URL.revokeObjectURL(ce),Me("Tasks exported.","success")},Wa=(K,le)=>{if(!K||typeof K!="object")return null;const ce=Q(),ee={...ce,...K};return(!ee.name||typeof ee.name!="string")&&(ee.name=`Imported Task ${le+1}`),(!ee.mode||!["scrape","agent","headful"].includes(ee.mode))&&(ee.mode="scrape"),typeof ee.wait!="number"&&(ee.wait=3),ee.stealth||(ee.stealth=ce.stealth),(!ee.variables||Array.isArray(ee.variables))&&(ee.variables={}),Array.isArray(ee.actions)||(ee.actions=[]),ee.rotateProxies===void 0&&(ee.rotateProxies=!1),delete ee.versions,delete ee.last_opened,ee},xt=async K=>{try{const le=await K.text(),ce=JSON.parse(le),ee=Array.isArray(ce)?ce:ce?.tasks;if(!Array.isArray(ee)){Me("Invalid import file.","error");return}const We=Date.now(),tt=ee.map((at,Ue)=>Wa(at,Ue)).filter(at=>!!at).map(at=>at.id?at:{...at,id:`task_${We}`});if(tt.length===0){Me("No tasks to import.","error");return}await Promise.all(tt.map(at=>fetch("/api/tasks",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(at)}))),await xe(),Me(`Imported ${tt.length} task(s).`,"success")}catch(le){Me(`Import failed: ${le.message||"Unknown error"}`,"error")}},It=()=>c.pathname.startsWith("/tasks")?"editor":c.pathname==="/settings"?"settings":c.pathname==="/executions"?"executions":c.pathname==="/captures"?"captures":"dashboard";let _a;return u==="login"||u==="setup"?_a=r.jsx(mv,{status:u,onSubmit:pe,error:p}):u==="checking"?_a=r.jsx(Ru,{title:"Authenticating",subtitle:"Verifying session state"}):_a=r.jsxs("div",{className:"h-full flex flex-row overflow-hidden bg-[#020202]",children:[r.jsx(pv,{onNavigate:K=>{K==="dashboard"?s("/dashboard"):K==="settings"?s("/settings"):K==="executions"?s("/executions"):K==="captures"&&s("/captures")},onNewTask:Tt,onLogout:Qe,currentScreen:It()}),r.jsxs(sg,{children:[r.jsx(Aa,{path:"/",element:r.jsx(Jh,{tasks:S,onNewTask:Tt,onEditTask:_t,onDeleteTask:ba,onExportTasks:mt,onImportTasks:xt})}),r.jsx(Aa,{path:"/dashboard",element:r.jsx(Jh,{tasks:S,onNewTask:Tt,onEditTask:_t,onDeleteTask:ba,onExportTasks:mt,onImportTasks:xt})}),r.jsx(Aa,{path:"/tasks/new",element:x?r.jsx(Lp,{currentTask:x,setCurrentTask:E,tasks:S,editorView:w,setEditorView:D,isExecuting:B,onSave:ha,onRun:fe,onRunSnapshot:ue,results:j,pinnedResults:y,saveMsg:Z,onConfirm:be,onNotify:Me,onPinResults:fa,onUnpinResults:ya,runId:te,onStop:se}):r.jsx(Ru,{title:"Initializing",subtitle:"Preparing task workspace"})}),r.jsx(Aa,{path:"/tasks/:id",element:r.jsx(gb,{tasks:S,loadTasks:xe,touchTask:va,currentTask:x,setCurrentTask:E,editorView:w,setEditorView:D,isExecuting:B,onSave:ha,onRun:fe,onRunSnapshot:ue,results:j,pinnedResults:y,saveMsg:Z,onConfirm:be,onNotify:Me,onPinResults:fa,onUnpinResults:ya,runId:te,onStop:se})}),r.jsx(Aa,{path:"/settings",element:r.jsx(lb,{onClearStorage:Ne,onConfirm:be,onNotify:Me})}),r.jsx(Aa,{path:"/executions",element:r.jsx(rb,{onConfirm:be,onNotify:Me})}),r.jsx(Aa,{path:"/executions/:id",element:r.jsx(ub,{onConfirm:be,onNotify:Me})}),r.jsx(Aa,{path:"/captures",element:r.jsx(pb,{onConfirm:be,onNotify:Me})}),r.jsx(Aa,{path:"*",element:r.jsx(qp,{onBack:()=>s("/dashboard")})})]})]}),r.jsxs("div",{className:"h-full",children:[P&&r.jsx(mb,{message:P.message,tone:P.tone,onClose:()=>he(null)}),F&&r.jsx(xb,{request:F,onResolve:Ie}),_a]})}ux.createRoot(document.getElementById("root")).render(r.jsx(tx.StrictMode,{children:r.jsx(Rg,{children:r.jsx(yb,{})})}));