comfy-ts 2.7.0 → 2.9.0

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 (104) hide show
  1. package/README.md +20 -13
  2. package/dist/{DefinedWorkflow-BJgt5t0x.js → DefinedWorkflow-BatWaZO1.js} +199 -16
  3. package/dist/DefinedWorkflow-BatWaZO1.js.map +1 -0
  4. package/dist/{DraftsSt-dizp3VcC.js → LogsSt-DFxzQfDc.js} +152 -4
  5. package/dist/LogsSt-DFxzQfDc.js.map +1 -0
  6. package/dist/cli.js +7 -5
  7. package/dist/cli.js.map +1 -1
  8. package/dist/index.cjs +284 -35
  9. package/dist/index.cjs.map +1 -1
  10. package/dist/index.d.cts +125 -7
  11. package/dist/index.d.ts +125 -7
  12. package/dist/index.js +282 -37
  13. package/dist/index.js.map +1 -1
  14. package/dist/run-serve-_nrvJYyt.js +1948 -0
  15. package/dist/run-serve-_nrvJYyt.js.map +1 -0
  16. package/dist/{run-tui-JxlEbb_f.js → run-tui-BLEdTsOX.js} +106 -157
  17. package/dist/run-tui-BLEdTsOX.js.map +1 -0
  18. package/dist/serve-web.js +441 -72
  19. package/dist/{state-CaHeDL-0.js → state-BbgJeCe6.js} +180 -45
  20. package/dist/state-BbgJeCe6.js.map +1 -0
  21. package/dist/web.d.ts +185 -7
  22. package/dist/web.js +235 -36
  23. package/dist/web.js.map +1 -1
  24. package/examples/README.md +1 -0
  25. package/examples/comfy-cloud/sdk.d.ts +4066 -321
  26. package/examples/rvion/04-krea2-turbo-t2i.cflow.ts +18 -2
  27. package/examples/rvion/07-local-llm-text-gen.cflow.ts +220 -0
  28. package/examples/web/tsconfig.json +3 -0
  29. package/extra/README.md +32 -0
  30. package/extra/comfyui-textgen-stream/README.md +35 -0
  31. package/extra/comfyui-textgen-stream/__init__.py +166 -0
  32. package/extra/scripts/fetch_text_encoder.py +137 -0
  33. package/package.json +6 -3
  34. package/src/cli/comfy-ts-cli.ts +3 -1
  35. package/src/cli/serve/ServeApp.ts +754 -40
  36. package/src/cli/serve/applyVarPayload.ts +10 -3
  37. package/src/cli/serve/describeVar.ts +47 -7
  38. package/src/cli/serve/hostProtocol.ts +68 -0
  39. package/src/cli/serve/managerOnlyLoras.ts +27 -0
  40. package/src/cli/serve/run-serve.ts +35 -38
  41. package/src/cli/serve/serveSettings.ts +86 -0
  42. package/src/cli/serve/startupPrint.ts +111 -0
  43. package/src/cli/serve/web/api.ts +97 -1
  44. package/src/cli/serve/web/components/App.tsx +61 -22
  45. package/src/cli/serve/web/components/Gallery.tsx +306 -41
  46. package/src/cli/serve/web/components/Icon.tsx +160 -0
  47. package/src/cli/serve/web/components/PromptEnhancer.tsx +12 -9
  48. package/src/cli/serve/web/components/Sidebar.tsx +43 -19
  49. package/src/cli/serve/web/components/VarsForm.tsx +440 -91
  50. package/src/cli/serve/web/components/controls/BasicControls.tsx +38 -5
  51. package/src/cli/serve/web/components/controls/ImageControl.tsx +3 -2
  52. package/src/cli/serve/web/components/controls/LorasControl.tsx +498 -81
  53. package/src/cli/serve/web/components/controls/PresetPicker.tsx +60 -0
  54. package/src/cli/serve/web/components/controls/SeedControl.tsx +38 -20
  55. package/src/cli/serve/web/components/controls/SizeControl.tsx +3 -2
  56. package/src/cli/serve/web/llm.ts +1 -1
  57. package/src/cli/serve/web/logWeb.ts +6 -0
  58. package/src/cli/serve/web/state/EnhancerSt.ts +8 -15
  59. package/src/cli/serve/web/state/FormSt.ts +74 -18
  60. package/src/cli/serve/web/state/RunSt.ts +22 -1
  61. package/src/cli/serve/web/state/WebSt.ts +814 -22
  62. package/src/cli/serve/web/state/host.ts +206 -0
  63. package/src/cli/serve/web/state/lightbox.ts +44 -0
  64. package/src/cli/serve/web/state/moduleTree.ts +52 -0
  65. package/src/cli/serve/web/state/payload.ts +44 -2
  66. package/src/cli/serve/web/state/urlSelection.ts +53 -0
  67. package/src/cli/serve/web/styles.ts +422 -57
  68. package/src/cli/serve/web/tsconfig.json +4 -0
  69. package/src/cli/tui/components/PickerOverlays.tsx +37 -0
  70. package/src/cli/tui/components/StatusBar.tsx +14 -1
  71. package/src/cli/tui/components/TuiApp.tsx +5 -2
  72. package/src/cli/tui/state/HostSt.ts +3 -2
  73. package/src/cli/tui/state/PickerSt.ts +48 -2
  74. package/src/cli/tui/state/TreeSt.ts +1 -1
  75. package/src/cli/tui/state/TuiSt.ts +2 -1
  76. package/src/coreExports.ts +8 -1
  77. package/src/graph/ComfyNode.ts +58 -1
  78. package/src/host/ComfyHost.ts +13 -2
  79. package/src/host/ComfyManager.ts +31 -13
  80. package/src/host/loraInfoCache.ts +35 -1
  81. package/src/host/loraManagerApi.ts +94 -0
  82. package/src/index.ts +2 -0
  83. package/src/promptEnhancers.ts +102 -0
  84. package/src/runner/ComfyExecution.ts +61 -6
  85. package/src/runner/ComfyWorkflow.ts +18 -4
  86. package/src/runner/ComfyWsApi.ts +3 -0
  87. package/src/runner/describePromptRejection.ts +34 -0
  88. package/src/sdk-generator/ComfySchema.ts +17 -4
  89. package/src/sdk-generator/comfyui-sdk-codegen.ts +56 -2
  90. package/src/utils/ansi.ts +13 -0
  91. package/src/utils/matchesRegex.ts +13 -0
  92. package/src/utils/safeName.ts +29 -0
  93. package/src/utils/stringMap.ts +9 -0
  94. package/src/vars/ComfyVars.ts +61 -10
  95. package/src/vars/presets.ts +17 -0
  96. package/src/web.ts +12 -0
  97. package/dist/DefinedWorkflow-BJgt5t0x.js.map +0 -1
  98. package/dist/DraftsSt-dizp3VcC.js.map +0 -1
  99. package/dist/run-serve-D1Tsuru9.js +0 -1162
  100. package/dist/run-serve-D1Tsuru9.js.map +0 -1
  101. package/dist/run-tui-JxlEbb_f.js.map +0 -1
  102. package/dist/state-CaHeDL-0.js.map +0 -1
  103. package/src/cli/serve/promptEnhancers.ts +0 -69
  104. package/src/cli/serve/safeName.ts +0 -12
package/dist/serve-web.js CHANGED
@@ -1,18 +1,22 @@
1
- var my=Object.create;var{getPrototypeOf:vy,defineProperty:yr,getOwnPropertyNames:gy}=Object;var yy=Object.prototype.hasOwnProperty;function by(t){return this[t]}var _y,Sy,fe=(t,e,n)=>{var l=t!=null&&typeof t==="object";if(l){var a=e?_y??=new WeakMap:Sy??=new WeakMap,i=a.get(t);if(i)return i}n=t!=null?my(vy(t)):{};let o=e||!t||!t.__esModule?yr(n,"default",{value:t,enumerable:!0}):n;if(t&&typeof t==="object"||typeof t==="function"){for(let r of gy(t))if(!yy.call(o,r))yr(o,r,{get:by.bind(t,r),enumerable:!0})}if(l)a.set(t,o);return o};var br=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Ey=(t)=>t;function Oy(t,e){this[t]=Ey.bind(null,e)}var $c=(t,e)=>{for(var n in e)yr(t,n,{get:e[n],enumerable:!0,configurable:!0,set:Oy.bind(e,n)})};var _r=(t,e)=>()=>(t&&(e=t(t=0)),e);function Er(t,e){var n=t.length;t.push(e);t:for(;0<n;){var l=n-1>>>1,a=t[l];if(0<Si(a,e))t[l]=e,t[n]=a,n=l;else break t}}function de(t){return t.length===0?null:t[0]}function Ai(t){if(t.length===0)return null;var e=t[0],n=t.pop();if(n!==e){t[0]=n;t:for(var l=0,a=t.length,i=a>>>1;l<i;){var o=2*(l+1)-1,r=t[o],u=o+1,s=t[u];if(0>Si(r,n))u<a&&0>Si(s,r)?(t[l]=s,t[u]=n,l=u):(t[l]=r,t[o]=n,l=o);else if(u<a&&0>Si(s,n))t[l]=s,t[u]=n,l=u;else break t}}return e}function Si(t,e){var n=t.sortIndex-e.sortIndex;return n!==0?n:t.id-e.id}function Ni(t){for(var e=de(We);e!==null;){if(e.callback===null)Ai(We);else if(e.startTime<=t)Ai(We),e.sortIndex=e.expirationTime,Er(Ee,e);else break;e=de(We)}}function Tr(t){if(ca=!1,Ni(t),!sa)if(de(Ee)!==null)sa=!0,ll||(ll=!0,nl());else{var e=de(We);e!==null&&zr(Tr,e.startTime-t)}}function tf(){return Dr?!0:he()-Pc<xy?!1:!0}function Sr(){if(Dr=!1,ll){var t=he();Pc=t;var e=!0;try{t:{sa=!1,ca&&(ca=!1,Ic(fa),fa=-1),xr=!0;var n=Oi;try{e:{Ni(t);for(Kt=de(Ee);Kt!==null&&!(Kt.expirationTime>t&&tf());){var l=Kt.callback;if(typeof l==="function"){Kt.callback=null,Oi=Kt.priorityLevel;var a=l(Kt.expirationTime<=t);if(t=he(),typeof a==="function"){Kt.callback=a,Ni(t),e=!0;break e}Kt===de(Ee)&&Ai(Ee),Ni(t)}else Ai(Ee);Kt=de(Ee)}if(Kt!==null)e=!0;else{var i=de(We);i!==null&&zr(Tr,i.startTime-t),e=!1}}break t}finally{Kt=null,Oi=n,xr=!1}e=void 0}}finally{e?nl():ll=!1}}}function zr(t,e){fa=Fc(function(){t(he())},e)}var he=void 0,Or,Ei,Nr,Ee,We,Ny=1,Kt=null,Oi=3,xr=!1,sa=!1,ca=!1,Dr=!1,Fc,Ic,Wc,ll=!1,fa=-1,xy=5,Pc=-1,nl,xi,Ar,wr=5,Rr=1,Cr=4,al=3,Mr=2,Ur=function(t){t.callback=null},Vr=function(){return Oi},Br=function(){Dr=!0},il=function(t,e,n){var l=he();switch(typeof n==="object"&&n!==null?(n=n.delay,n=typeof n==="number"&&0<n?l+n:l):n=l,t){case 1:var a=-1;break;case 2:a=250;break;case 5:a=1073741823;break;case 4:a=1e4;break;default:a=5000}return a=n+a,t={id:Ny++,callback:e,priorityLevel:t,startTime:n,expirationTime:a,sortIndex:-1},n>l?(t.sortIndex=n,Er(We,t),de(Ee)===null&&t===de(We)&&(ca?(Ic(fa),fa=-1):ca=!0,zr(Tr,n-l))):(t.sortIndex=a,Er(Ee,t),sa||xr||(sa=!0,ll||(ll=!0,nl()))),t},qr;var ef=_r(()=>{if(typeof performance==="object"&&typeof performance.now==="function")Or=performance,he=function(){return Or.now()};else Ei=Date,Nr=Ei.now(),he=function(){return Ei.now()-Nr};Ee=[],We=[],Fc=typeof setTimeout==="function"?setTimeout:null,Ic=typeof clearTimeout==="function"?clearTimeout:null,Wc=typeof setImmediate<"u"?setImmediate:null;if(typeof Wc==="function")nl=function(){Wc(Sr)};else if(typeof MessageChannel<"u")xi=new MessageChannel,Ar=xi.port2,xi.port1.onmessage=Sr,nl=function(){Ar.postMessage(null)};else nl=function(){Fc(Sr,0)};qr=tf});var Oe=br(function(Ky){var Lr=Symbol.for("react.transitional.element"),Dy=Symbol.for("react.portal"),Ty=Symbol.for("react.fragment"),zy=Symbol.for("react.strict_mode"),wy=Symbol.for("react.profiler"),Ry=Symbol.for("react.consumer"),Cy=Symbol.for("react.context"),My=Symbol.for("react.forward_ref"),Uy=Symbol.for("react.suspense"),Vy=Symbol.for("react.memo"),rf=Symbol.for("react.lazy"),By=Symbol.for("react.activity"),nf=Symbol.iterator;function qy(t){if(t===null||typeof t!=="object")return null;return t=nf&&t[nf]||t["@@iterator"],typeof t==="function"?t:null}var uf={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},sf=Object.assign,cf={};function rl(t,e,n){this.props=t,this.context=e,this.refs=cf,this.updater=n||uf}rl.prototype.isReactComponent={};rl.prototype.setState=function(t,e){if(typeof t!=="object"&&typeof t!=="function"&&t!=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,t,e,"setState")};rl.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function ff(){}ff.prototype=rl.prototype;function Gr(t,e,n){this.props=t,this.context=e,this.refs=cf,this.updater=n||uf}var Yr=Gr.prototype=new ff;Yr.constructor=Gr;sf(Yr,rl.prototype);Yr.isPureReactComponent=!0;var lf=Array.isArray;function Hr(){}var W={H:null,A:null,T:null,S:null},df=Object.prototype.hasOwnProperty;function Kr(t,e,n){var l=n.ref;return{$$typeof:Lr,type:t,key:e,ref:l!==void 0?l:null,props:n}}function jy(t,e){return Kr(t.type,e,t.props)}function Xr(t){return typeof t==="object"&&t!==null&&t.$$typeof===Lr}function Hy(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var af=/\/+/g;function jr(t,e){return typeof t==="object"&&t!==null&&t.key!=null?Hy(""+t.key):e.toString(36)}function Ly(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status==="string"?t.then(Hr,Hr):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function ol(t,e,n,l,a){var i=typeof t;if(i==="undefined"||i==="boolean")t=null;var o=!1;if(t===null)o=!0;else switch(i){case"bigint":case"string":case"number":o=!0;break;case"object":switch(t.$$typeof){case Lr:case Dy:o=!0;break;case rf:return o=t._init,ol(o(t._payload),e,n,l,a)}}if(o)return a=a(t),o=l===""?"."+jr(t,0):l,lf(a)?(n="",o!=null&&(n=o.replace(af,"$&/")+"/"),ol(a,e,n,"",function(s){return s})):a!=null&&(Xr(a)&&(a=jy(a,n+(a.key==null||t&&t.key===a.key?"":(""+a.key).replace(af,"$&/")+"/")+o)),e.push(a)),1;o=0;var r=l===""?".":l+":";if(lf(t))for(var u=0;u<t.length;u++)l=t[u],i=r+jr(l,u),o+=ol(l,e,n,i,a);else if(u=qy(t),typeof u==="function")for(t=u.call(t),u=0;!(l=t.next()).done;)l=l.value,i=r+jr(l,u++),o+=ol(l,e,n,i,a);else if(i==="object"){if(typeof t.then==="function")return ol(Ly(t),e,n,l,a);throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}return o}function Di(t,e,n){if(t==null)return t;var l=[],a=0;return ol(t,l,"","",function(i){return e.call(n,i,a++)}),l}function Gy(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){if(t._status===0||t._status===-1)t._status=1,t._result=n},function(n){if(t._status===0||t._status===-1)t._status=2,t._result=n}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var of=typeof reportError==="function"?reportError:function(t){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t==="object"&&t!==null&&typeof t.message==="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",t);return}console.error(t)},Yy={map:Di,forEach:function(t,e,n){Di(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Di(t,function(){e++}),e},toArray:function(t){return Di(t,function(e){return e})||[]},only:function(t){if(!Xr(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};Ky.Activity=By;Ky.Children=Yy;Ky.Component=rl;Ky.Fragment=Ty;Ky.Profiler=wy;Ky.PureComponent=Gr;Ky.StrictMode=zy;Ky.Suspense=Uy;Ky.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=W;Ky.__COMPILER_RUNTIME={__proto__:null,c:function(t){return W.H.useMemoCache(t)}};Ky.cache=function(t){return function(){return t.apply(null,arguments)}};Ky.cacheSignal=function(){return null};Ky.cloneElement=function(t,e,n){if(t===null||t===void 0)throw Error("The argument must be a React element, but you passed "+t+".");var l=sf({},t.props),a=t.key;if(e!=null)for(i in e.key!==void 0&&(a=""+e.key),e)!df.call(e,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&e.ref===void 0||(l[i]=e[i]);var i=arguments.length-2;if(i===1)l.children=n;else if(1<i){for(var o=Array(i),r=0;r<i;r++)o[r]=arguments[r+2];l.children=o}return Kr(t.type,a,l)};Ky.createContext=function(t){return t={$$typeof:Cy,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:Ry,_context:t},t};Ky.createElement=function(t,e,n){var l,a={},i=null;if(e!=null)for(l in e.key!==void 0&&(i=""+e.key),e)df.call(e,l)&&l!=="key"&&l!=="__self"&&l!=="__source"&&(a[l]=e[l]);var o=arguments.length-2;if(o===1)a.children=n;else if(1<o){for(var r=Array(o),u=0;u<o;u++)r[u]=arguments[u+2];a.children=r}if(t&&t.defaultProps)for(l in o=t.defaultProps,o)a[l]===void 0&&(a[l]=o[l]);return Kr(t,i,a)};Ky.createRef=function(){return{current:null}};Ky.forwardRef=function(t){return{$$typeof:My,render:t}};Ky.isValidElement=Xr;Ky.lazy=function(t){return{$$typeof:rf,_payload:{_status:-1,_result:t},_init:Gy}};Ky.memo=function(t,e){return{$$typeof:Vy,type:t,compare:e===void 0?null:e}};Ky.startTransition=function(t){var e=W.T,n={};W.T=n;try{var l=t(),a=W.S;a!==null&&a(n,l),typeof l==="object"&&l!==null&&typeof l.then==="function"&&l.then(Hr,of)}catch(i){of(i)}finally{e!==null&&n.types!==null&&(e.types=n.types),W.T=e}};Ky.unstable_useCacheRefresh=function(){return W.H.useCacheRefresh()};Ky.use=function(t){return W.H.use(t)};Ky.useActionState=function(t,e,n){return W.H.useActionState(t,e,n)};Ky.useCallback=function(t,e){return W.H.useCallback(t,e)};Ky.useContext=function(t){return W.H.useContext(t)};Ky.useDebugValue=function(){};Ky.useDeferredValue=function(t,e){return W.H.useDeferredValue(t,e)};Ky.useEffect=function(t,e){return W.H.useEffect(t,e)};Ky.useEffectEvent=function(t){return W.H.useEffectEvent(t)};Ky.useId=function(){return W.H.useId()};Ky.useImperativeHandle=function(t,e,n){return W.H.useImperativeHandle(t,e,n)};Ky.useInsertionEffect=function(t,e){return W.H.useInsertionEffect(t,e)};Ky.useLayoutEffect=function(t,e){return W.H.useLayoutEffect(t,e)};Ky.useMemo=function(t,e){return W.H.useMemo(t,e)};Ky.useOptimistic=function(t,e){return W.H.useOptimistic(t,e)};Ky.useReducer=function(t,e,n){return W.H.useReducer(t,e,n)};Ky.useRef=function(t){return W.H.useRef(t)};Ky.useState=function(t){return W.H.useState(t)};Ky.useSyncExternalStore=function(t,e,n){return W.H.useSyncExternalStore(t,e,n)};Ky.useTransition=function(){return W.H.useTransition()};Ky.version="19.2.8"});var Qr={};$c(Qr,{__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE:()=>mf,createPortal:()=>vf,flushSync:()=>gf,preconnect:()=>yf,prefetchDNS:()=>bf,preinit:()=>_f,preinitModule:()=>Sf,preload:()=>Ef,preloadModule:()=>Of,requestFormReset:()=>Nf,unstable_batchedUpdates:()=>xf,useFormState:()=>Af,useFormStatus:()=>Df,version:()=>Tf});function pf(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Fe(){}function Mb(t,e,n){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Cb,key:l==null?null:""+l,children:t,containerInfo:e,implementation:n}}function Ti(t,e){if(t==="font")return"";if(typeof e==="string")return e==="use-credentials"?e:""}var hf,St,Cb,da,mf,vf=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(pf(299));return Mb(t,e,null,n)},gf=function(t){var e=da.T,n=St.p;try{if(da.T=null,St.p=2,t)return t()}finally{da.T=e,St.p=n,St.d.f()}},yf=function(t,e){typeof t==="string"&&(e?(e=e.crossOrigin,e=typeof e==="string"?e==="use-credentials"?e:"":void 0):e=null,St.d.C(t,e))},bf=function(t){typeof t==="string"&&St.d.D(t)},_f=function(t,e){if(typeof t==="string"&&e&&typeof e.as==="string"){var n=e.as,l=Ti(n,e.crossOrigin),a=typeof e.integrity==="string"?e.integrity:void 0,i=typeof e.fetchPriority==="string"?e.fetchPriority:void 0;n==="style"?St.d.S(t,typeof e.precedence==="string"?e.precedence:void 0,{crossOrigin:l,integrity:a,fetchPriority:i}):n==="script"&&St.d.X(t,{crossOrigin:l,integrity:a,fetchPriority:i,nonce:typeof e.nonce==="string"?e.nonce:void 0})}},Sf=function(t,e){if(typeof t==="string")if(typeof e==="object"&&e!==null){if(e.as==null||e.as==="script"){var n=Ti(e.as,e.crossOrigin);St.d.M(t,{crossOrigin:n,integrity:typeof e.integrity==="string"?e.integrity:void 0,nonce:typeof e.nonce==="string"?e.nonce:void 0})}}else e==null&&St.d.M(t)},Ef=function(t,e){if(typeof t==="string"&&typeof e==="object"&&e!==null&&typeof e.as==="string"){var n=e.as,l=Ti(n,e.crossOrigin);St.d.L(t,n,{crossOrigin:l,integrity:typeof e.integrity==="string"?e.integrity:void 0,nonce:typeof e.nonce==="string"?e.nonce:void 0,type:typeof e.type==="string"?e.type:void 0,fetchPriority:typeof e.fetchPriority==="string"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy==="string"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet==="string"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes==="string"?e.imageSizes:void 0,media:typeof e.media==="string"?e.media:void 0})}},Of=function(t,e){if(typeof t==="string")if(e){var n=Ti(e.as,e.crossOrigin);St.d.m(t,{as:typeof e.as==="string"&&e.as!=="script"?e.as:void 0,crossOrigin:n,integrity:typeof e.integrity==="string"?e.integrity:void 0})}else St.d.m(t)},Nf=function(t){St.d.r(t)},xf=function(t,e){return t(e)},Af=function(t,e,n){return da.H.useFormState(t,e,n)},Df=function(){return da.H.useHostTransitionStatus()},Tf="19.2.8";var zf=_r(()=>{hf=fe(Oe(),1);St={d:{f:Fe,r:function(){throw Error(pf(522))},D:Fe,C:Fe,L:Fe,m:Fe,X:Fe,S:Fe,M:Fe},p:0,findDOMNode:null},Cb=Symbol.for("react.portal");da=hf.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;mf=St});var Cf=br(function(uE,Rf){zf();function wf(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=="function")return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(wf)}catch(t){console.error(t)}}wf(),Rf.exports=Qr});var gc={};$c(gc,{createRoot:()=>Ym,hydrateRoot:()=>Km,version:()=>Xm});function _(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function lh(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function ei(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function ah(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function ih(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Mf(t){if(ei(t)!==t)throw Error(_(188))}function Ub(t){var e=t.alternate;if(!e){if(e=ei(t),e===null)throw Error(_(188));return e!==t?null:t}for(var n=t,l=e;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return Mf(a),t;if(i===l)return Mf(a),e;i=i.sibling}throw Error(_(188))}if(n.return!==l.return)n=a,l=i;else{for(var o=!1,r=a.child;r;){if(r===n){o=!0,n=a,l=i;break}if(r===l){o=!0,l=a,n=i;break}r=r.sibling}if(!o){for(r=i.child;r;){if(r===n){o=!0,n=i,l=a;break}if(r===l){o=!0,l=i,n=a;break}r=r.sibling}if(!o)throw Error(_(189))}}if(n.alternate!==l)throw Error(_(190))}if(n.tag!==3)throw Error(_(188));return n.stateNode.current===n?t:e}function oh(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=oh(t),e!==null)return e;t=t.sibling}return null}function ha(t){if(t===null||typeof t!=="object")return null;return t=Uf&&t[Uf]||t["@@iterator"],typeof t==="function"?t:null}function Tu(t){if(t==null)return null;if(typeof t==="function")return t.$$typeof===qb?null:t.displayName||t.name||null;if(typeof t==="string")return t;switch(t){case hl:return"Fragment";case Nu:return"Profiler";case rh:return"StrictMode";case xu:return"Suspense";case Au:return"SuspenseList";case Du:return"Activity"}if(typeof t==="object")switch(t.$$typeof){case ba:return"Portal";case Re:return t.displayName||"Context";case uh:return(t._context.displayName||"Context")+".Consumer";case Ss:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Es:return e=t.displayName||null,e!==null?e:Tu(t.type)||"Memo";case Ie:e=t._payload,t=t._init;try{return Tu(t(e))}catch(n){}}return null}function ye(t){return{current:t}}function ht(t){0>pl||(t.current=zu[pl],zu[pl]=null,pl--)}function k(t,e){pl++,zu[pl]=t.current,t.current=e}function oo(t,e){switch(k(cn,e),k(Ga,t),k(ge,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)?(t=t.namespaceURI)?Hd(t):0:0;break;default:if(t=e.tagName,e=e.namespaceURI)e=Hd(e),t=Tm(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}ht(ge),k(ge,t)}function Cl(){ht(ge),ht(Ga),ht(cn)}function wu(t){t.memoizedState!==null&&k(io,t);var e=ge.current,n=Tm(e,t.type);e!==n&&(k(Ga,t),k(ge,n))}function ro(t){Ga.current===t&&(ht(ge),ht(Ga)),io.current===t&&(ht(io),Ia._currentValue=qn)}function Cn(t){if(Zr===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Zr=e&&e[1]||"",Vf=-1<n.stack.indexOf(`
1
+ var _y=Object.defineProperty;var xy=(e,t,n)=>{for(var a in t)_y(e,a,{get:t[a],set:n[a],enumerable:!0,configurable:!0})};function Um(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=="function")return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Um)}catch(e){console.error(e)}}var Bn={};xy(Bn,{unstable_now:()=>dt,unstable_IdlePriority:()=>ql,unstable_ImmediatePriority:()=>Gl,unstable_LowPriority:()=>Yl,unstable_NormalPriority:()=>Hn,unstable_Profiling:()=>_f,unstable_UserBlockingPriority:()=>Kl,unstable_cancelCallback:()=>Xl,unstable_forceFrameRate:()=>xf,unstable_getCurrentPriorityLevel:()=>Ql,unstable_next:()=>Ef,unstable_requestPaint:()=>Zl,unstable_runWithPriority:()=>wf,unstable_scheduleCallback:()=>jn,unstable_shouldYield:()=>$l,unstable_wrapCallback:()=>Nf},{unstable_now:(N_)=>dt=N_,unstable_IdlePriority:(N_)=>ql=N_,unstable_ImmediatePriority:(N_)=>Gl=N_,unstable_LowPriority:(N_)=>Yl=N_,unstable_NormalPriority:(N_)=>Hn=N_,unstable_Profiling:(N_)=>_f=N_,unstable_UserBlockingPriority:(N_)=>Kl=N_,unstable_cancelCallback:(N_)=>Xl=N_,unstable_forceFrameRate:(N_)=>xf=N_,unstable_getCurrentPriorityLevel:(N_)=>Ql=N_,unstable_next:(N_)=>Ef=N_,unstable_requestPaint:(N_)=>Zl=N_,unstable_runWithPriority:(N_)=>wf=N_,unstable_scheduleCallback:(N_)=>jn=N_,unstable_shouldYield:(N_)=>$l=N_,unstable_wrapCallback:(N_)=>Nf=N_});function Qr(e,t){var n=e.length;e.push(t);e:for(;0<n;){var a=n-1>>>1,i=e[a];if(0<Vl(i,t))e[a]=t,e[n]=i,n=a;else break e}}function St(e){return e.length===0?null:e[0]}function jl(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var a=0,i=e.length,l=i>>>1;a<l;){var o=2*(a+1)-1,r=e[o],u=o+1,c=e[u];if(0>Vl(r,n))u<i&&0>Vl(c,r)?(e[a]=c,e[u]=n,a=u):(e[a]=r,e[o]=n,a=o);else if(u<i&&0>Vl(c,n))e[a]=c,e[u]=n,a=u;else break e}}return t}function Vl(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}var dt=void 0;if(typeof performance==="object"&&typeof performance.now==="function")Zr=performance,dt=function(){return Zr.now()};else Ll=Date,$r=Ll.now(),dt=function(){return Ll.now()-$r};var Zr,Ll,$r,Dt=[],ln=[],Ey=1,$e=null,Oe=3,Jr=!1,Si=!1,_i=!1,Wr=!1,vf=typeof setTimeout==="function"?setTimeout:null,gf=typeof clearTimeout==="function"?clearTimeout:null,mf=typeof setImmediate<"u"?setImmediate:null;function Bl(e){for(var t=St(ln);t!==null;){if(t.callback===null)jl(ln);else if(t.startTime<=e)jl(ln),t.sortIndex=t.expirationTime,Qr(Dt,t);else break;t=St(ln)}}function Pr(e){if(_i=!1,Bl(e),!Si)if(St(Dt)!==null)Si=!0,ga||(ga=!0,va());else{var t=St(ln);t!==null&&Ir(Pr,t.startTime-e)}}var ga=!1,xi=-1,yf=5,bf=-1;function Sf(){return Wr?!0:Bn.unstable_now()-bf<yf?!1:!0}function Xr(){if(Wr=!1,ga){var e=Bn.unstable_now();bf=e;var t=!0;try{e:{Si=!1,_i&&(_i=!1,gf(xi),xi=-1),Jr=!0;var n=Oe;try{t:{Bl(e);for($e=St(Dt);$e!==null&&!($e.expirationTime>e&&Sf());){var a=$e.callback;if(typeof a==="function"){$e.callback=null,Oe=$e.priorityLevel;var i=a($e.expirationTime<=e);if(e=Bn.unstable_now(),typeof i==="function"){$e.callback=i,Bl(e),t=!0;break t}$e===St(Dt)&&jl(Dt),Bl(e)}else jl(Dt);$e=St(Dt)}if($e!==null)t=!0;else{var l=St(ln);l!==null&&Ir(Pr,l.startTime-e),t=!1}}break e}finally{$e=null,Oe=n,Jr=!1}t=void 0}}finally{t?va():ga=!1}}}var va;if(typeof mf==="function")va=function(){mf(Xr)};else if(typeof MessageChannel<"u")Hl=new MessageChannel,Fr=Hl.port2,Hl.port1.onmessage=Xr,va=function(){Fr.postMessage(null)};else va=function(){vf(Xr,0)};var Hl,Fr;function Ir(e,t){xi=vf(function(){e(Bn.unstable_now())},t)}var ql=5,Gl=1,Yl=4,Hn=3,_f=null,Kl=2,Xl=function(e){e.callback=null},xf=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):yf=0<e?Math.floor(1000/e):5},Ql=function(){return Oe},Ef=function(e){switch(Oe){case 1:case 2:case 3:var t=3;break;default:t=Oe}var n=Oe;Oe=t;try{return e()}finally{Oe=n}},Zl=function(){Wr=!0},wf=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Oe;Oe=e;try{return t()}finally{Oe=n}},jn=function(e,t,n){var a=Bn.unstable_now();switch(typeof n==="object"&&n!==null?(n=n.delay,n=typeof n==="number"&&0<n?a+n:a):n=a,e){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5000}return i=n+i,e={id:Ey++,callback:t,priorityLevel:e,startTime:n,expirationTime:i,sortIndex:-1},n>a?(e.sortIndex=n,Qr(ln,e),St(Dt)===null&&e===St(ln)&&(_i?(gf(xi),xi=-1):_i=!0,Ir(Pr,n-a))):(e.sortIndex=i,Qr(Dt,e),Si||Jr||(Si=!0,ga||(ga=!0,va()))),e},$l=Sf,Nf=function(e){var t=Oe;return function(){var n=Oe;Oe=t;try{return e.apply(this,arguments)}finally{Oe=n}}};var wy=Symbol.for("react.forward_ref");var Ny=Symbol.for("react.memo");var Of={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Oy=Object.assign,Af={};function Ei(e,t,n){this.props=e,this.context=t,this.refs=Af,this.updater=n||Of}Ei.prototype.isReactComponent={};Ei.prototype.setState=function(e,t){if(typeof e!=="object"&&typeof e!=="function"&&e!=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,e,t,"setState")};Ei.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Tf(){}Tf.prototype=Ei.prototype;function Df(e,t,n){this.props=e,this.context=t,this.refs=Af,this.updater=n||Of}var es=Df.prototype=new Tf;es.constructor=Df;Oy(es,Ei.prototype);es.isPureReactComponent=!0;var wi={H:null,A:null,T:null,S:null};var Jl=wi;var Ni=function(e){return{$$typeof:wy,render:e}};var Oi=function(e,t){return{$$typeof:Ny,type:e,compare:t===void 0?null:t}};var zf=function(){};var be=function(e,t){return wi.H.useEffect(e,t)};var zt=function(e){return wi.H.useRef(e)},ya=function(e){return wi.H.useState(e)},Fl=function(e,t,n){return wi.H.useSyncExternalStore(e,t,n)};var ns="19.2.8";function Rf(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=="function")return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Rf)}catch(e){console.error(e)}}function Ay(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function on(){}var Ty={d:{f:on,r:function(){throw Error(Ay(522))},D:on,C:on,L:on,m:on,X:on,S:on,M:on},p:0,findDOMNode:null};var as=Ty;Rf();function _(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function zy(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function ml(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function th(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 nh(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 Mf(e){if(ml(e)!==e)throw Error(_(188))}function Ry(e){var t=e.alternate;if(!t){if(t=ml(e),t===null)throw Error(_(188));return t!==e?null:e}for(var n=e,a=t;;){var i=n.return;if(i===null)break;var l=i.alternate;if(l===null){if(a=i.return,a!==null){n=a;continue}break}if(i.child===l.child){for(l=i.child;l;){if(l===n)return Mf(i),e;if(l===a)return Mf(i),t;l=l.sibling}throw Error(_(188))}if(n.return!==a.return)n=i,a=l;else{for(var o=!1,r=i.child;r;){if(r===n){o=!0,n=i,a=l;break}if(r===a){o=!0,a=i,n=l;break}r=r.sibling}if(!o){for(r=l.child;r;){if(r===n){o=!0,n=l,a=i;break}if(r===a){o=!0,a=l,n=i;break}r=r.sibling}if(!o)throw Error(_(189))}}if(n.alternate!==a)throw Error(_(190))}if(n.tag!==3)throw Error(_(188));return n.stateNode.current===n?e:t}function ah(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=ah(e),t!==null)return t;e=e.sibling}return null}var ae=Object.assign,My=Symbol.for("react.element"),Wl=Symbol.for("react.transitional.element"),Ci=Symbol.for("react.portal"),wa=Symbol.for("react.fragment"),ih=Symbol.for("react.strict_mode"),Vs=Symbol.for("react.profiler"),lh=Symbol.for("react.consumer"),Bt=Symbol.for("react.context"),Cu=Symbol.for("react.forward_ref"),Ls=Symbol.for("react.suspense"),Bs=Symbol.for("react.suspense_list"),ku=Symbol.for("react.memo"),rn=Symbol.for("react.lazy"),Hs=Symbol.for("react.activity"),Cy=Symbol.for("react.memo_cache_sentinel"),Cf=Symbol.iterator;function Ai(e){if(e===null||typeof e!=="object")return null;return e=Cf&&e[Cf]||e["@@iterator"],typeof e==="function"?e:null}var ky=Symbol.for("react.client.reference");function js(e){if(e==null)return null;if(typeof e==="function")return e.$$typeof===ky?null:e.displayName||e.name||null;if(typeof e==="string")return e;switch(e){case wa:return"Fragment";case Vs:return"Profiler";case ih:return"StrictMode";case Ls:return"Suspense";case Bs:return"SuspenseList";case Hs:return"Activity"}if(typeof e==="object")switch(e.$$typeof){case Ci:return"Portal";case Bt:return e.displayName||"Context";case lh:return(e._context.displayName||"Context")+".Consumer";case Cu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ku:return t=e.displayName||null,t!==null?t:js(e.type)||"Memo";case rn:t=e._payload,e=e._init;try{return js(e(t))}catch(n){}}return null}var ki=Array.isArray,z=Jl,X=as,Zn={pending:!1,data:null,method:null,action:null},qs=[],Na=-1;function Nt(e){return{current:e}}function ye(e){0>Na||(e.current=qs[Na],qs[Na]=null,Na--)}function P(e,t){Na++,qs[Na]=e.current,e.current=t}var wt=Nt(null),tl=Nt(null),yn=Nt(null),To=Nt(null);function Do(e,t){switch(P(yn,t),P(tl,e),P(wt,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)?(e=e.namespaceURI)?Bd(e):0:0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Bd(t),e=wm(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}ye(wt),P(wt,e)}function Ya(){ye(wt),ye(tl),ye(yn)}function Gs(e){e.memoizedState!==null&&P(To,e);var t=wt.current,n=wm(t,e.type);t!==n&&(P(tl,e),P(wt,n))}function zo(e){tl.current===e&&(ye(wt),ye(tl)),To.current===e&&(ye(To),dl._currentValue=Zn)}var is,kf;function Gn(e){if(is===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);is=t&&t[1]||"",kf=-1<n.stack.indexOf(`
2
2
  at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+Zr+t+Vf}function Jr(t,e){if(!t||kr)return"";kr=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(e){var g=function(){throw Error()};if(Object.defineProperty(g.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(g,[])}catch(v){var d=v}Reflect.construct(t,[],g)}else{try{g.call()}catch(v){d=v}t.call(g.prototype)}}else{try{throw Error()}catch(v){d=v}(g=t())&&typeof g.catch==="function"&&g.catch(function(){})}}catch(v){if(v&&d&&typeof v.stack==="string")return[v.stack,d.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),o=i[0],r=i[1];if(o&&r){var u=o.split(`
4
- `),s=r.split(`
5
- `);for(a=l=0;l<u.length&&!u[l].includes("DetermineComponentFrameRoot");)l++;for(;a<s.length&&!s[a].includes("DetermineComponentFrameRoot");)a++;if(l===u.length||a===s.length)for(l=u.length-1,a=s.length-1;1<=l&&0<=a&&u[l]!==s[a];)a--;for(;1<=l&&0<=a;l--,a--)if(u[l]!==s[a]){if(l!==1||a!==1)do if(l--,a--,0>a||u[l]!==s[a]){var h=`
6
- `+u[l].replace(" at new "," at ");return t.displayName&&h.includes("<anonymous>")&&(h=h.replace("<anonymous>",t.displayName)),h}while(1<=l&&0<=a);break}}}finally{kr=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?Cn(n):""}function jb(t,e){switch(t.tag){case 26:case 27:case 5:return Cn(t.type);case 16:return Cn("Lazy");case 13:return t.child!==e&&e!==null?Cn("Suspense Fallback"):Cn("Suspense");case 19:return Cn("SuspenseList");case 0:case 15:return Jr(t.type,!1);case 11:return Jr(t.type.render,!1);case 1:return Jr(t.type,!0);case 31:return Cn("Activity");default:return""}}function Bf(t){try{var e="",n=null;do e+=jb(t,n),n=t,t=t.return;while(t);return e}catch(l){return`
7
- Error generating stack: `+l.message+`
8
- `+l.stack}}function an(t){if(typeof Kb==="function"&&Xb(t),Vt&&typeof Vt.setStrictMode==="function")try{Vt.setStrictMode(ni,t)}catch(e){}}function kb(t){return t>>>=0,t===0?32:31-(Qb(t)/Zb|0)|0}function Mn(t){var e=t&42;if(e!==0)return e;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Bo(t,e,n){var l=t.pendingLanes;if(l===0)return 0;var a=0,i=t.suspendedLanes,o=t.pingedLanes;t=t.warmLanes;var r=l&134217727;return r!==0?(l=r&~i,l!==0?a=Mn(l):(o&=r,o!==0?a=Mn(o):n||(n=r&~t,n!==0&&(a=Mn(n))))):(r=l&~i,r!==0?a=Mn(r):o!==0?a=Mn(o):n||(n=l&~t,n!==0&&(a=Mn(n)))),a===0?0:e!==0&&e!==a&&(e&i)===0&&(i=a&-a,n=e&-e,i>=n||i===32&&(n&4194048)!==0)?e:a}function li(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Jb(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+5000;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 dh(){var t=Ci;return Ci<<=1,(Ci&62914560)===0&&(Ci=4194304),t}function Wr(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function ai(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function $b(t,e,n,l,a,i){var o=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var{entanglements:r,expirationTimes:u,hiddenUpdates:s}=t;for(n=o&~n;0<n;){var h=31-Bt(n),g=1<<h;r[h]=0,u[h]=-1;var d=s[h];if(d!==null)for(s[h]=null,h=0;h<d.length;h++){var v=d[h];v!==null&&(v.lane&=-536870913)}n&=~g}l!==0&&hh(t,l,0),i!==0&&a===0&&t.tag!==0&&(t.suspendedLanes|=i&~(o&~e))}function hh(t,e,n){t.pendingLanes|=e,t.suspendedLanes&=~e;var l=31-Bt(e);t.entangledLanes|=e,t.entanglements[l]=t.entanglements[l]|1073741824|n&261930}function ph(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var l=31-Bt(n),a=1<<l;a&e|t[l]&e&&(t[l]|=e),n&=~a}}function mh(t,e){var n=e&-e;return n=(n&42)!==0?1:Ns(n),(n&(t.suspendedLanes|e))!==0?0:n}function Ns(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function xs(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function vh(){var t=G.p;if(t!==0)return t;return t=window.event,t===void 0?32:Hm(t.type)}function qf(t,e){var n=G.p;try{return G.p=t,e()}finally{G.p=n}}function As(t){delete t[mt],delete t[Tt],delete t[Cu],delete t[Wb],delete t[Fb]}function ml(t){var e=t[mt];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Kl]||n[mt]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Xd(t);t!==null;){if(n=t[mt])return n;t=Xd(t)}return e}t=n,n=t.parentNode}return null}function Xl(t){if(t=t[mt]||t[Kl]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function Sa(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(_(33))}function xl(t){var e=t[jf];return e||(e=t[jf]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function dt(t){t[ii]=!0}function kn(t,e){Ml(t,e),Ml(t+"Capture",e)}function Ml(t,e){yh[t]=e;for(t=0;t<e.length;t++)gh.add(e[t])}function Pb(t){if(Ru.call(Lf,t))return!0;if(Ru.call(Hf,t))return!1;if(Ib.test(t))return Lf[t]=!0;return Hf[t]=!0,!1}function Ki(t,e,n){if(Pb(e))if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var l=e.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+n)}}function Mi(t,e,n){if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+n)}}function Ne(t,e,n,l){if(l===null)t.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttributeNS(e,n,""+l)}}function Qt(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function bh(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function t0(t,e,n){var l=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof l<"u"&&typeof l.get==="function"&&typeof l.set==="function"){var{get:a,set:i}=l;return Object.defineProperty(t,e,{configurable:!0,get:function(){return a.call(this)},set:function(o){n=""+o,i.call(this,o)}}),Object.defineProperty(t,e,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Mu(t){if(!t._valueTracker){var e=bh(t)?"checked":"value";t._valueTracker=t0(t,e,""+t[e])}}function _h(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),l="";return t&&(l=bh(t)?t.checked?"true":"false":t.value),t=l,t!==n?(e.setValue(t),!0):!1}function so(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch(e){return t.body}}function Jt(t){return t.replace(e0,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Uu(t,e,n,l,a,i,o,r){if(t.name="",o!=null&&typeof o!=="function"&&typeof o!=="symbol"&&typeof o!=="boolean"?t.type=o:t.removeAttribute("type"),e!=null)if(o==="number"){if(e===0&&t.value===""||t.value!=e)t.value=""+Qt(e)}else t.value!==""+Qt(e)&&(t.value=""+Qt(e));else o!=="submit"&&o!=="reset"||t.removeAttribute("value");e!=null?Vu(t,o,Qt(e)):n!=null?Vu(t,o,Qt(n)):l!=null&&t.removeAttribute("value"),a==null&&i!=null&&(t.defaultChecked=!!i),a!=null&&(t.checked=a&&typeof a!=="function"&&typeof a!=="symbol"),r!=null&&typeof r!=="function"&&typeof r!=="symbol"&&typeof r!=="boolean"?t.name=""+Qt(r):t.removeAttribute("name")}function Sh(t,e,n,l,a,i,o,r){if(i!=null&&typeof i!=="function"&&typeof i!=="symbol"&&typeof i!=="boolean"&&(t.type=i),e!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||e!==void 0&&e!==null)){Mu(t);return}n=n!=null?""+Qt(n):"",e=e!=null?""+Qt(e):n,r||e===t.value||(t.value=e),t.defaultValue=e}l=l!=null?l:a,l=typeof l!=="function"&&typeof l!=="symbol"&&!!l,t.checked=r?t.checked:!!l,t.defaultChecked=!!l,o!=null&&typeof o!=="function"&&typeof o!=="symbol"&&typeof o!=="boolean"&&(t.name=o),Mu(t)}function Vu(t,e,n){e==="number"&&so(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function Al(t,e,n,l){if(t=t.options,e){e={};for(var a=0;a<n.length;a++)e["$"+n[a]]=!0;for(n=0;n<t.length;n++)a=e.hasOwnProperty("$"+t[n].value),t[n].selected!==a&&(t[n].selected=a),a&&l&&(t[n].defaultSelected=!0)}else{n=""+Qt(n),e=null;for(a=0;a<t.length;a++){if(t[a].value===n){t[a].selected=!0,l&&(t[a].defaultSelected=!0);return}e!==null||t[a].disabled||(e=t[a])}e!==null&&(e.selected=!0)}}function Eh(t,e,n){if(e!=null&&(e=""+Qt(e),e!==t.value&&(t.value=e),n==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=n!=null?""+Qt(n):""}function Oh(t,e,n,l){if(e==null){if(l!=null){if(n!=null)throw Error(_(92));if(_a(l)){if(1<l.length)throw Error(_(93));l=l[0]}n=l}n==null&&(n=""),e=n}n=Qt(e),t.defaultValue=n,l=t.textContent,l===n&&l!==""&&l!==null&&(t.value=l),Mu(t)}function Ul(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}function Gf(t,e,n){var l=e.indexOf("--")===0;n==null||typeof n==="boolean"||n===""?l?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":l?t.setProperty(e,n):typeof n!=="number"||n===0||n0.has(e)?e==="float"?t.cssFloat=n:t[e]=(""+n).trim():t[e]=n+"px"}function Nh(t,e,n){if(e!=null&&typeof e!=="object")throw Error(_(62));if(t=t.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||e!=null&&e.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="");for(var a in e)l=e[a],e.hasOwnProperty(a)&&n[a]!==l&&Gf(t,a,l)}else for(var i in e)e.hasOwnProperty(i)&&Gf(t,i,e[i])}function Ds(t){if(t.indexOf("-")===-1)return!1;switch(t){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}}function Xi(t){return a0.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Ce(){}function Ts(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}function Yf(t){var e=Xl(t);if(e&&(t=e.stateNode)){var n=t[Tt]||null;t:switch(t=e.stateNode,e.type){case"input":if(Uu(t,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;n=n.querySelectorAll('input[name="'+Jt(""+e)+'"][type="radio"]');for(e=0;e<n.length;e++){var l=n[e];if(l!==t&&l.form===t.form){var a=l[Tt]||null;if(!a)throw Error(_(90));Uu(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(e=0;e<n.length;e++)l=n[e],l.form===t.form&&_h(l)}break t;case"textarea":Eh(t,n.value,n.defaultValue);break t;case"select":e=n.value,e!=null&&Al(t,!!n.multiple,e,!1)}}}function xh(t,e,n){if(Fr)return t(e,n);Fr=!0;try{var l=t(e);return l}finally{if(Fr=!1,vl!==null||Dl!==null){if(Jo(),vl&&(e=vl,t=Dl,Dl=vl=null,Yf(e),t))for(e=0;e<t.length;e++)Yf(t[e])}}}function Ya(t,e){var n=t.stateNode;if(n===null)return null;var l=n[Tt]||null;if(l===null)return null;n=l[e];t:switch(e){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)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break t;default:t=!1}if(t)return null;if(n&&typeof n!=="function")throw Error(_(231,e,typeof n));return n}function Ah(){if(Qi)return Qi;var t,e=zs,n=e.length,l,a="value"in on?on.value:on.textContent,i=a.length;for(t=0;t<n&&e[t]===a[t];t++);var o=n-t;for(l=1;l<=o&&e[n-l]===a[i-l];l++);return Qi=a.slice(t,1<l?1-l:void 0)}function Zi(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Ui(){return!0}function Kf(){return!1}function zt(t){function e(n,l,a,i,o){this._reactName=n,this._targetInst=a,this.type=l,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var r in t)t.hasOwnProperty(r)&&(n=t[r],this[r]=n?n(i):i[r]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ui:Kf,this.isPropagationStopped=Kf,this}return P(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!=="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ui)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!=="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ui)},persist:function(){},isPersistent:Ui}),e}function g0(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=v0[t])?!!e[t]:!1}function ws(){return g0}function Th(t,e){switch(t){case"keyup":return z0.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zh(t){return t=t.detail,typeof t==="object"&&"data"in t?t.data:null}function R0(t,e){switch(t){case"compositionend":return zh(e);case"keypress":if(e.which!==32)return null;return Jf=!0,kf;case"textInput":return t=e.data,t===kf&&Jf?null:t;default:return null}}function C0(t,e){if(gl)return t==="compositionend"||!Rs&&Th(t,e)?(t=Ah(),Qi=zs=on=null,gl=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return Dh&&e.locale!=="ko"?null:e.data;default:return null}}function $f(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!M0[t.type]:e==="textarea"?!0:!1}function wh(t,e,n,l){vl?Dl?Dl.push(l):Dl=[l]:vl=l,e=To(e,"onChange"),0<e.length&&(n=new qo("onChange","change",null,n,l),t.push({event:n,listeners:e}))}function U0(t){xm(t,0)}function Ho(t){var e=Sa(t);if(_h(e))return t}function Wf(t,e){if(t==="change")return e}function Ff(){za&&(za.detachEvent("onpropertychange",Ch),Ka=za=null)}function Ch(t){if(t.propertyName==="value"&&Ho(Ka)){var e=[];wh(e,Ka,t,Ts(t)),xh(U0,e)}}function V0(t,e,n){t==="focusin"?(Ff(),za=e,Ka=n,za.attachEvent("onpropertychange",Ch)):t==="focusout"&&Ff()}function B0(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Ho(Ka)}function q0(t,e){if(t==="click")return Ho(e)}function j0(t,e){if(t==="input"||t==="change")return Ho(e)}function H0(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}function Xa(t,e){if(jt(t,e))return!0;if(typeof t!=="object"||t===null||typeof e!=="object"||e===null)return!1;var n=Object.keys(t),l=Object.keys(e);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var a=n[l];if(!Ru.call(e,a)||!jt(t[a],e[a]))return!1}return!0}function If(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Pf(t,e){var n=If(t);t=0;for(var l;n;){if(n.nodeType===3){if(l=t+n.textContent.length,t<=e&&l>=e)return{node:n,offset:e-t};t=l}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=If(n)}}function Mh(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?Mh(t,e.parentNode):("contains"in t)?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function Uh(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=so(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href==="string"}catch(l){n=!1}if(n)t=e.contentWindow;else break;e=so(t.document)}return e}function Cs(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}function td(t,e,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hu||yl==null||yl!==so(l)||(l=yl,("selectionStart"in l)&&Cs(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}),wa&&Xa(wa,l)||(wa=l,l=To(ju,"onSelect"),0<l.length&&(e=new qo("onSelect","select",null,e,n),t.push({event:e,listeners:l}),e.target=yl)))}function Rn(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}function $n(t){if(eu[t])return eu[t];if(!bl[t])return t;var e=bl[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in Vh)return eu[t]=e[n];return t}function oe(t,e){Lh.set(t,e),kn(e,[t])}function Lo(){for(var t=_l,e=Ms=_l=0;e<t;){var n=Xt[e];Xt[e++]=null;var l=Xt[e];Xt[e++]=null;var a=Xt[e];Xt[e++]=null;var i=Xt[e];if(Xt[e++]=null,l!==null&&a!==null){var o=l.pending;o===null?a.next=a:(a.next=o.next,o.next=a),l.pending=a}i!==0&&Gh(n,a,i)}}function Go(t,e,n,l){Xt[_l++]=t,Xt[_l++]=e,Xt[_l++]=n,Xt[_l++]=l,Ms|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function Us(t,e,n,l){return Go(t,e,n,l),fo(t)}function Wn(t,e){return Go(t,null,null,e),fo(t)}function Gh(t,e,n){t.lanes|=n;var l=t.alternate;l!==null&&(l.lanes|=n);for(var a=!1,i=t.return;i!==null;)i.childLanes|=n,l=i.alternate,l!==null&&(l.childLanes|=n),i.tag===22&&(t=i.stateNode,t===null||t._visibility&1||(a=!0)),t=i,i=i.return;return t.tag===3?(i=t.stateNode,a&&e!==null&&(a=31-Bt(n),t=i.hiddenUpdates,l=t[a],l===null?t[a]=[e]:l.push(e),e.lane=n|536870912),i):null}function fo(t){if(50<Ha)throw Ha=0,rs=null,Error(_(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}function X0(t,e,n,l){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,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 Ct(t,e,n,l){return new X0(t,e,n,l)}function Vs(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Ue(t,e){var n=t.alternate;return n===null?(n=Ct(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&65011712,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n.refCleanup=t.refCleanup,n}function Yh(t,e){t.flags&=65011714;var n=t.alternate;return n===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,t.type=n.type,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function Ji(t,e,n,l,a,i){var o=0;if(l=t,typeof t==="function")Vs(t)&&(o=1);else if(typeof t==="string")o=k_(t,n,ge.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case Du:return t=Ct(31,n,e,a),t.elementType=Du,t.lanes=i,t;case hl:return jn(n.children,a,i,e);case rh:o=8,a|=24;break;case Nu:return t=Ct(12,n,e,a|2),t.elementType=Nu,t.lanes=i,t;case xu:return t=Ct(13,n,e,a),t.elementType=xu,t.lanes=i,t;case Au:return t=Ct(19,n,e,a),t.elementType=Au,t.lanes=i,t;default:if(typeof t==="object"&&t!==null)switch(t.$$typeof){case Re:o=10;break t;case uh:o=9;break t;case Ss:o=11;break t;case Es:o=14;break t;case Ie:o=16,l=null;break t}o=29,n=Error(_(130,t===null?"null":typeof t,"")),l=null}return e=Ct(o,n,e,a),e.elementType=t,e.type=l,e.lanes=i,e}function jn(t,e,n,l){return t=Ct(7,t,l,e),t.lanes=n,t}function nu(t,e,n){return t=Ct(6,t,null,e),t.lanes=n,t}function Kh(t){var e=Ct(18,null,null,0);return e.stateNode=t,e}function lu(t,e,n){return e=Ct(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function $t(t,e){if(typeof t==="object"&&t!==null){var n=ed.get(t);if(n!==void 0)return n;return e={value:t,source:e,stack:Bf(e)},ed.set(t,e),e}return{value:t,source:e,stack:Bf(e)}}function ze(t,e){El[Ol++]=Qa,El[Ol++]=ho,ho=t,Qa=e}function Xh(t,e,n){Zt[kt++]=pe,Zt[kt++]=me,Zt[kt++]=bn,bn=t;var l=pe;t=me;var a=32-Bt(l)-1;l&=~(1<<a),n+=1;var i=32-Bt(e)+a;if(30<i){var o=a-a%5;i=(l&(1<<o)-1).toString(32),l>>=o,a-=o,pe=1<<32-Bt(e)+a|n<<a|l,me=i+t}else pe=1<<i|n<<a|l,me=t}function Bs(t){t.return!==null&&(ze(t,1),Xh(t,1,0))}function qs(t){for(;t===ho;)ho=El[--Ol],El[Ol]=null,Qa=El[--Ol],El[Ol]=null;for(;t===bn;)bn=Zt[--kt],Zt[kt]=null,me=Zt[--kt],Zt[kt]=null,pe=Zt[--kt],Zt[kt]=null}function Qh(t,e){Zt[kt++]=pe,Zt[kt++]=me,Zt[kt++]=bn,pe=e.id,me=e.overflow,bn=t}function _n(t){var e=Error(_(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Za($t(e,t)),Gu}function nd(t){var{stateNode:e,type:n,memoizedProps:l}=t;switch(e[mt]=t,e[Tt]=l,n){case"dialog":V("cancel",e),V("close",e);break;case"iframe":case"object":case"embed":V("load",e);break;case"video":case"audio":for(n=0;n<Wa.length;n++)V(Wa[n],e);break;case"source":V("error",e);break;case"img":case"image":case"link":V("error",e),V("load",e);break;case"details":V("toggle",e);break;case"input":V("invalid",e),Sh(e,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":V("invalid",e);break;case"textarea":V("invalid",e),Oh(e,l.value,l.defaultValue,l.children)}n=l.children,typeof n!=="string"&&typeof n!=="number"&&typeof n!=="bigint"||e.textContent===""+n||l.suppressHydrationWarning===!0||Dm(e.textContent,n)?(l.popover!=null&&(V("beforetoggle",e),V("toggle",e)),l.onScroll!=null&&V("scroll",e),l.onScrollEnd!=null&&V("scrollend",e),l.onClick!=null&&(e.onclick=Ce),e=!0):e=!1,e||_n(t,!0)}function ld(t){for(vt=t.return;vt;)switch(vt.tag){case 5:case 31:case 13:Wt=!1;return;case 27:case 3:Wt=!0;return;default:vt=vt.return}}function ul(t){if(t!==vt)return!1;if(!j)return ld(t),j=!0,!1;var e=t.tag,n;if(n=e!==3&&e!==27){if(n=e===5)n=t.type,n=!(n!=="form"&&n!=="button")||ps(t.type,t.memoizedProps);n=!n}if(n&&I&&_n(t),ld(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(_(317));I=Kd(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(_(317));I=Kd(t)}else e===27?(e=I,Nn(t.type)?(t=ys,ys=null,I=t):I=e):I=vt?It(t.stateNode.nextSibling):null;return!0}function Yn(){I=vt=null,j=!1}function au(){var t=fn;return t!==null&&(At===null?At=t:At.push.apply(At,t),fn=null),t}function Za(t){fn===null?fn=[t]:fn.push(t)}function tn(t,e,n){k(Yu,e._currentValue),e._currentValue=n}function Ve(t){t._currentValue=Yu.current,ht(Yu)}function Ku(t,e,n){for(;t!==null;){var l=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,l!==null&&(l.childLanes|=e)):l!==null&&(l.childLanes&e)!==e&&(l.childLanes|=e),t===n)break;t=t.return}}function Xu(t,e,n,l){var a=t.child;a!==null&&(a.return=t);for(;a!==null;){var i=a.dependencies;if(i!==null){var o=a.child;i=i.firstContext;t:for(;i!==null;){var r=i;i=a;for(var u=0;u<e.length;u++)if(r.context===e[u]){i.lanes|=n,r=i.alternate,r!==null&&(r.lanes|=n),Ku(i.return,n,t),l||(o=null);break t}i=r.next}}else if(a.tag===18){if(o=a.return,o===null)throw Error(_(341));o.lanes|=n,i=o.alternate,i!==null&&(i.lanes|=n),Ku(o,n,t),o=null}else o=a.child;if(o!==null)o.return=a;else for(o=a;o!==null;){if(o===t){o=null;break}if(a=o.sibling,a!==null){a.return=o.return,o=a;break}o=o.return}a=o}}function Ql(t,e,n,l){t=null;for(var a=e,i=!1;a!==null;){if(!i){if((a.flags&524288)!==0)i=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var o=a.alternate;if(o===null)throw Error(_(387));if(o=o.memoizedProps,o!==null){var r=a.type;jt(a.pendingProps.value,o.value)||(t!==null?t.push(r):t=[r])}}else if(a===io.current){if(o=a.alternate,o===null)throw Error(_(387));o.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(t!==null?t.push(Ia):t=[Ia])}a=a.return}t!==null&&Xu(e,t,n,l),e.flags|=262144}function po(t){for(t=t.firstContext;t!==null;){if(!jt(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Kn(t){Fn=t,Me=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function gt(t){return Zh(Fn,t)}function Vi(t,e){return Fn===null&&Kn(t),Zh(t,e)}function Zh(t,e){var n=e._currentValue;if(e={context:e,memoizedValue:n,next:null},Me===null){if(t===null)throw Error(_(308));Me=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Me=Me.next=e;return n}function js(){return{controller:new Q0,data:new Map,refCount:0}}function ri(t){t.refCount--,t.refCount===0&&Z0(k0,function(){t.controller.abort()})}function J0(t,e){if(Ra===null){var n=Ra=[];Qu=0,Vl=sc(),Tl={status:"pending",value:void 0,then:function(l){n.push(l)}}}return Qu++,e.then(ad,ad),e}function ad(){if(--Qu===0&&Ra!==null){Tl!==null&&(Tl.status="fulfilled");var t=Ra;Ra=null,Vl=0,Tl=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function $0(t,e){var n=[],l={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return t.then(function(){l.status="fulfilled",l.value=e;for(var a=0;a<n.length;a++)(0,n[a])(e)},function(a){l.status="rejected",l.reason=a;for(a=0;a<n.length;a++)(0,n[a])(void 0)}),l}function Hs(){var t=Hn.current;return t!==null?t:Z.pooledCache}function $i(t,e){e===null?k(Hn,Hn.current):k(Hn,e.pool)}function kh(){var t=Hs();return t===null?null:{parent:rt._currentValue,pool:t}}function od(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Jh(t,e,n){switch(n=t[n],n===void 0?t.push(e):n!==e&&(e.then(Ce,Ce),e=n),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,ud(t),t;default:if(typeof e.status==="string")e.then(Ce,Ce);else{if(t=Z,t!==null&&100<t.shellSuspendCounter)throw Error(_(482));t=e,t.status="pending",t.then(function(l){if(e.status==="pending"){var a=e;a.status="fulfilled",a.value=l}},function(l){if(e.status==="pending"){var a=e;a.status="rejected",a.reason=l}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,ud(t),t}throw Ln=e,Zl}}function Vn(t){try{var e=t._init;return e(t._payload)}catch(n){if(n!==null&&typeof n==="object"&&typeof n.then==="function")throw Ln=n,Zl;throw n}}function rd(){if(Ln===null)throw Error(_(459));var t=Ln;return Ln=null,t}function ud(t){if(t===Zl||t===Yo)throw Error(_(483))}function Bi(t){var e=ka;return ka+=1,zl===null&&(zl=[]),Jh(zl,t,e)}function ma(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function qi(t,e){if(e.$$typeof===Vb)throw Error(_(525));throw t=Object.prototype.toString.call(e),Error(_(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t))}function $h(t){function e(f,c){if(t){var m=f.deletions;m===null?(f.deletions=[c],f.flags|=16):m.push(c)}}function n(f,c){if(!t)return null;for(;c!==null;)e(f,c),c=c.sibling;return null}function l(f){for(var c=new Map;f!==null;)f.key!==null?c.set(f.key,f):c.set(f.index,f),f=f.sibling;return c}function a(f,c){return f=Ue(f,c),f.index=0,f.sibling=null,f}function i(f,c,m){if(f.index=m,!t)return f.flags|=1048576,c;if(m=f.alternate,m!==null)return m=m.index,m<c?(f.flags|=67108866,c):m;return f.flags|=67108866,c}function o(f){return t&&f.alternate===null&&(f.flags|=67108866),f}function r(f,c,m,b){if(c===null||c.tag!==6)return c=nu(m,f.mode,b),c.return=f,c;return c=a(c,m),c.return=f,c}function u(f,c,m,b){var O=m.type;if(O===hl)return h(f,c,m.props.children,b,m.key);if(c!==null&&(c.elementType===O||typeof O==="object"&&O!==null&&O.$$typeof===Ie&&Vn(O)===c.type))return c=a(c,m.props),ma(c,m),c.return=f,c;return c=Ji(m.type,m.key,m.props,null,f.mode,b),ma(c,m),c.return=f,c}function s(f,c,m,b){if(c===null||c.tag!==4||c.stateNode.containerInfo!==m.containerInfo||c.stateNode.implementation!==m.implementation)return c=lu(m,f.mode,b),c.return=f,c;return c=a(c,m.children||[]),c.return=f,c}function h(f,c,m,b,O){if(c===null||c.tag!==7)return c=jn(m,f.mode,b,O),c.return=f,c;return c=a(c,m),c.return=f,c}function g(f,c,m){if(typeof c==="string"&&c!==""||typeof c==="number"||typeof c==="bigint")return c=nu(""+c,f.mode,m),c.return=f,c;if(typeof c==="object"&&c!==null){switch(c.$$typeof){case zi:return m=Ji(c.type,c.key,c.props,null,f.mode,m),ma(m,c),m.return=f,m;case ba:return c=lu(c,f.mode,m),c.return=f,c;case Ie:return c=Vn(c),g(f,c,m)}if(_a(c)||ha(c))return c=jn(c,f.mode,m,null),c.return=f,c;if(typeof c.then==="function")return g(f,Bi(c),m);if(c.$$typeof===Re)return g(f,Vi(f,c),m);qi(f,c)}return null}function d(f,c,m,b){var O=c!==null?c.key:null;if(typeof m==="string"&&m!==""||typeof m==="number"||typeof m==="bigint")return O!==null?null:r(f,c,""+m,b);if(typeof m==="object"&&m!==null){switch(m.$$typeof){case zi:return m.key===O?u(f,c,m,b):null;case ba:return m.key===O?s(f,c,m,b):null;case Ie:return m=Vn(m),d(f,c,m,b)}if(_a(m)||ha(m))return O!==null?null:h(f,c,m,b,null);if(typeof m.then==="function")return d(f,c,Bi(m),b);if(m.$$typeof===Re)return d(f,c,Vi(f,m),b);qi(f,m)}return null}function v(f,c,m,b,O){if(typeof b==="string"&&b!==""||typeof b==="number"||typeof b==="bigint")return f=f.get(m)||null,r(c,f,""+b,O);if(typeof b==="object"&&b!==null){switch(b.$$typeof){case zi:return f=f.get(b.key===null?m:b.key)||null,u(c,f,b,O);case ba:return f=f.get(b.key===null?m:b.key)||null,s(c,f,b,O);case Ie:return b=Vn(b),v(f,c,m,b,O)}if(_a(b)||ha(b))return f=f.get(m)||null,h(c,f,b,O,null);if(typeof b.then==="function")return v(f,c,m,Bi(b),O);if(b.$$typeof===Re)return v(f,c,m,Vi(c,b),O);qi(c,b)}return null}function E(f,c,m,b){for(var O=null,U=null,N=c,w=c=0,y=null;N!==null&&w<m.length;w++){N.index>w?(y=N,N=null):y=N.sibling;var D=d(f,N,m[w],b);if(D===null){N===null&&(N=y);break}t&&N&&D.alternate===null&&e(f,N),c=i(D,c,w),U===null?O=D:U.sibling=D,U=D,N=y}if(w===m.length)return n(f,N),j&&ze(f,w),O;if(N===null){for(;w<m.length;w++)N=g(f,m[w],b),N!==null&&(c=i(N,c,w),U===null?O=N:U.sibling=N,U=N);return j&&ze(f,w),O}for(N=l(N);w<m.length;w++)y=v(N,f,w,m[w],b),y!==null&&(t&&y.alternate!==null&&N.delete(y.key===null?w:y.key),c=i(y,c,w),U===null?O=y:U.sibling=y,U=y);return t&&N.forEach(function(ct){return e(f,ct)}),j&&ze(f,w),O}function A(f,c,m,b){if(m==null)throw Error(_(151));for(var O=null,U=null,N=c,w=c=0,y=null,D=m.next();N!==null&&!D.done;w++,D=m.next()){N.index>w?(y=N,N=null):y=N.sibling;var ct=d(f,N,D.value,b);if(ct===null){N===null&&(N=y);break}t&&N&&ct.alternate===null&&e(f,N),c=i(ct,c,w),U===null?O=ct:U.sibling=ct,U=ct,N=y}if(D.done)return n(f,N),j&&ze(f,w),O;if(N===null){for(;!D.done;w++,D=m.next())D=g(f,D.value,b),D!==null&&(c=i(D,c,w),U===null?O=D:U.sibling=D,U=D);return j&&ze(f,w),O}for(N=l(N);!D.done;w++,D=m.next())D=v(N,f,w,D.value,b),D!==null&&(t&&D.alternate!==null&&N.delete(D.key===null?w:D.key),c=i(D,c,w),U===null?O=D:U.sibling=D,U=D);return t&&N.forEach(function(wn){return e(f,wn)}),j&&ze(f,w),O}function z(f,c,m,b){if(typeof m==="object"&&m!==null&&m.type===hl&&m.key===null&&(m=m.props.children),typeof m==="object"&&m!==null){switch(m.$$typeof){case zi:t:{for(var O=m.key;c!==null;){if(c.key===O){if(O=m.type,O===hl){if(c.tag===7){n(f,c.sibling),b=a(c,m.props.children),b.return=f,f=b;break t}}else if(c.elementType===O||typeof O==="object"&&O!==null&&O.$$typeof===Ie&&Vn(O)===c.type){n(f,c.sibling),b=a(c,m.props),ma(b,m),b.return=f,f=b;break t}n(f,c);break}else e(f,c);c=c.sibling}m.type===hl?(b=jn(m.props.children,f.mode,b,m.key),b.return=f,f=b):(b=Ji(m.type,m.key,m.props,null,f.mode,b),ma(b,m),b.return=f,f=b)}return o(f);case ba:t:{for(O=m.key;c!==null;){if(c.key===O)if(c.tag===4&&c.stateNode.containerInfo===m.containerInfo&&c.stateNode.implementation===m.implementation){n(f,c.sibling),b=a(c,m.children||[]),b.return=f,f=b;break t}else{n(f,c);break}else e(f,c);c=c.sibling}b=lu(m,f.mode,b),b.return=f,f=b}return o(f);case Ie:return m=Vn(m),z(f,c,m,b)}if(_a(m))return E(f,c,m,b);if(ha(m)){if(O=ha(m),typeof O!=="function")throw Error(_(150));return m=O.call(m),A(f,c,m,b)}if(typeof m.then==="function")return z(f,c,Bi(m),b);if(m.$$typeof===Re)return z(f,c,Vi(f,m),b);qi(f,m)}return typeof m==="string"&&m!==""||typeof m==="number"||typeof m==="bigint"?(m=""+m,c!==null&&c.tag===6?(n(f,c.sibling),b=a(c,m),b.return=f,f=b):(n(f,c),b=nu(m,f.mode,b),b.return=f,f=b),o(f)):n(f,c)}return function(f,c,m,b){try{ka=0;var O=z(f,c,m,b);return zl=null,O}catch(N){if(N===Zl||N===Yo)throw N;var U=Ct(29,N,null,f.mode);return U.lanes=b,U.return=f,U}finally{}}}function Gs(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Zu(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function dn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function hn(t,e,n){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,(L&2)!==0){var a=l.pending;return a===null?e.next=e:(e.next=a.next,a.next=e),l.pending=e,e=fo(t),Gh(t,null,n),e}return Go(t,l,e,n),fo(t)}function Ca(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var l=e.lanes;l&=t.pendingLanes,n|=l,e.lanes=n,ph(t,n)}}function iu(t,e){var{updateQueue:n,alternate:l}=t;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?a=i=e:i=i.next=e}else a=i=e;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function Ma(){if(ku){var t=Tl;if(t!==null)throw t}}function Ua(t,e,n,l){ku=!1;var a=t.updateQueue;Pe=!1;var{firstBaseUpdate:i,lastBaseUpdate:o}=a,r=a.shared.pending;if(r!==null){a.shared.pending=null;var u=r,s=u.next;u.next=null,o===null?i=s:o.next=s,o=u;var h=t.alternate;h!==null&&(h=h.updateQueue,r=h.lastBaseUpdate,r!==o&&(r===null?h.firstBaseUpdate=s:r.next=s,h.lastBaseUpdate=u))}if(i!==null){var g=a.baseState;o=0,h=s=u=null,r=i;do{var d=r.lane&-536870913,v=d!==r.lane;if(v?(q&d)===d:(l&d)===d){d!==0&&d===Vl&&(ku=!0),h!==null&&(h=h.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});t:{var E=t,A=r;d=e;var z=n;switch(A.tag){case 1:if(E=A.payload,typeof E==="function"){g=E.call(z,g,d);break t}g=E;break t;case 3:E.flags=E.flags&-65537|128;case 0:if(E=A.payload,d=typeof E==="function"?E.call(z,g,d):E,d===null||d===void 0)break t;g=P({},g,d);break t;case 2:Pe=!0}}d=r.callback,d!==null&&(t.flags|=64,v&&(t.flags|=8192),v=a.callbacks,v===null?a.callbacks=[d]:v.push(d))}else v={lane:d,tag:r.tag,payload:r.payload,callback:r.callback,next:null},h===null?(s=h=v,u=g):h=h.next=v,o|=d;if(r=r.next,r===null)if(r=a.shared.pending,r===null)break;else v=r,r=v.next,v.next=null,a.lastBaseUpdate=v,a.shared.pending=null}while(1);h===null&&(u=g),a.baseState=u,a.firstBaseUpdate=s,a.lastBaseUpdate=h,i===null&&(a.shared.lanes=0),En|=o,t.lanes=o,t.memoizedState=g}}function Fh(t,e){if(typeof t!=="function")throw Error(_(191,t));t.call(e)}function Ih(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;t<n.length;t++)Fh(n[t],e)}function sd(t,e){t=Ge,k(vo,t),k(Bl,e),Ge=t|e.baseLanes}function Ju(){k(vo,Ge),k(Bl,Bl.current)}function Ys(){Ge=vo.current,ht(Bl),ht(vo)}function en(t){var e=t.alternate;k(lt,lt.current&1),k(Ht,t),Ft===null&&(e===null||Bl.current!==null?Ft=t:e.memoizedState!==null&&(Ft=t))}function $u(t){k(lt,lt.current),k(Ht,t),Ft===null&&(Ft=t)}function Ph(t){t.tag===22?(k(lt,lt.current),k(Ht,t),Ft===null&&(Ft=t)):nn(t)}function nn(){k(lt,lt.current),k(Ht,Ht.current)}function Rt(t){ht(Ht),Ft===t&&(Ft=null),ht(lt)}function go(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||vs(n)||gs(n)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}function et(){throw Error(_(321))}function Ks(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!jt(t[n],e[n]))return!1;return!0}function Xs(t,e,n,l,a,i){return je=i,C=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,T.H=t===null||t.memoizedState===null?wp:ec,Qn=!1,i=n(l,a),Qn=!1,wl&&(i=ep(e,n,l,a)),tp(t),i}function tp(t){T.H=$a;var e=Q!==null&&Q.next!==null;if(je=0,it=Q=C=null,yo=!1,Ja=0,Rl=null,e)throw Error(_(300));t===null||ut||(t=t.dependencies,t!==null&&po(t)&&(ut=!0))}function ep(t,e,n,l){C=t;var a=0;do{if(wl&&(Rl=null),Ja=0,wl=!1,25<=a)throw Error(_(301));if(a+=1,it=Q=null,t.updateQueue!=null){var i=t.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}T.H=Rp,i=e(n,l)}while(wl);return i}function F0(){var t=T.H,e=t.useState()[0];return e=typeof e.then==="function"?ui(e):e,t=t.useState()[0],(Q!==null?Q.memoizedState:null)!==t&&(C.flags|=1024),e}function Qs(){var t=bo!==0;return bo=0,t}function Zs(t,e,n){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~n}function ks(t){if(yo){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}yo=!1}je=0,it=Q=C=null,wl=!1,Ja=bo=0,Rl=null}function Et(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return it===null?C.memoizedState=it=t:it=it.next=t,it}function at(){if(Q===null){var t=C.alternate;t=t!==null?t.memoizedState:null}else t=Q.next;var e=it===null?C.memoizedState:it.next;if(e!==null)it=e,Q=t;else{if(t===null){if(C.alternate===null)throw Error(_(467));throw Error(_(310))}Q=t,t={memoizedState:Q.memoizedState,baseState:Q.baseState,baseQueue:Q.baseQueue,queue:Q.queue,next:null},it===null?C.memoizedState=it=t:it=it.next=t}return it}function Ko(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ui(t){var e=Ja;return Ja+=1,Rl===null&&(Rl=[]),t=Jh(Rl,t,e),e=C,(it===null?e.memoizedState:it.next)===null&&(e=e.alternate,T.H=e===null||e.memoizedState===null?wp:ec),t}function Xo(t){if(t!==null&&typeof t==="object"){if(typeof t.then==="function")return ui(t);if(t.$$typeof===Re)return gt(t)}throw Error(_(438,String(t)))}function Js(t){var e=null,n=C.updateQueue;if(n!==null&&(e=n.memoCache),e==null){var l=C.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(e={data:l.data.map(function(a){return a.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),n===null&&(n=Ko(),C.updateQueue=n),n.memoCache=e,n=e.data[e.index],n===void 0)for(n=e.data[e.index]=Array(t),l=0;l<t;l++)n[l]=Bb;return e.index++,n}function He(t,e){return typeof e==="function"?e(t):e}function Wi(t){var e=at();return $s(e,Q,t)}function $s(t,e,n){var l=t.queue;if(l===null)throw Error(_(311));l.lastRenderedReducer=n;var a=t.baseQueue,i=l.pending;if(i!==null){if(a!==null){var o=a.next;a.next=i.next,i.next=o}e.baseQueue=a=i,l.pending=null}if(i=t.baseState,a===null)t.memoizedState=i;else{e=a.next;var r=o=null,u=null,s=e,h=!1;do{var g=s.lane&-536870913;if(g!==s.lane?(q&g)===g:(je&g)===g){var d=s.revertLane;if(d===0)u!==null&&(u=u.next={lane:0,revertLane:0,gesture:null,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null}),g===Vl&&(h=!0);else if((je&d)===d){s=s.next,d===Vl&&(h=!0);continue}else g={lane:0,revertLane:s.revertLane,gesture:null,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null},u===null?(r=u=g,o=i):u=u.next=g,C.lanes|=d,En|=d;g=s.action,Qn&&n(i,g),i=s.hasEagerState?s.eagerState:n(i,g)}else d={lane:g,revertLane:s.revertLane,gesture:s.gesture,action:s.action,hasEagerState:s.hasEagerState,eagerState:s.eagerState,next:null},u===null?(r=u=d,o=i):u=u.next=d,C.lanes|=g,En|=g;s=s.next}while(s!==null&&s!==e);if(u===null?o=i:u.next=r,!jt(i,t.memoizedState)&&(ut=!0,h&&(n=Tl,n!==null)))throw n;t.memoizedState=i,t.baseState=o,t.baseQueue=u,l.lastRenderedState=i}return a===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function ou(t){var e=at(),n=e.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=t;var{dispatch:l,pending:a}=n,i=e.memoizedState;if(a!==null){n.pending=null;var o=a=a.next;do i=t(i,o.action),o=o.next;while(o!==a);jt(i,e.memoizedState)||(ut=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),n.lastRenderedState=i}return[i,l]}function np(t,e,n){var l=C,a=at(),i=j;if(i){if(n===void 0)throw Error(_(407));n=n()}else n=e();var o=!jt((Q||a).memoizedState,n);if(o&&(a.memoizedState=n,ut=!0),a=a.queue,Ws(ip.bind(null,l,a,t),[t]),a.getSnapshot!==e||o||it!==null&&it.memoizedState.tag&1){if(l.flags|=2048,ql(9,{destroy:void 0},ap.bind(null,l,a,n,e),null),Z===null)throw Error(_(349));i||(je&127)!==0||lp(l,e,n)}return n}function lp(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=C.updateQueue,e===null?(e=Ko(),C.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function ap(t,e,n,l){e.value=n,e.getSnapshot=l,op(e)&&rp(t)}function ip(t,e,n){return n(function(){op(e)&&rp(t)})}function op(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!jt(t,n)}catch(l){return!0}}function rp(t){var e=Wn(t,2);e!==null&&Dt(e,t,2)}function Wu(t){var e=Et();if(typeof t==="function"){var n=t;if(t=n(),Qn){an(!0);try{n()}finally{an(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:He,lastRenderedState:t},e}function up(t,e,n,l){return t.baseState=n,$s(t,Q,typeof l==="function"?l:He)}function I0(t,e,n,l,a){if(Zo(t))throw Error(_(485));if(t=e.action,t!==null){var i={payload:a,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){i.listeners.push(o)}};T.T!==null?n(!0):i.isTransition=!1,l(i),n=e.pending,n===null?(i.next=e.pending=i,sp(e,i)):(i.next=n.next,e.pending=n.next=i)}}function sp(t,e){var{action:n,payload:l}=e,a=t.state;if(e.isTransition){var i=T.T,o={};T.T=o;try{var r=n(a,l),u=T.S;u!==null&&u(o,r),cd(t,e,r)}catch(s){Fu(t,e,s)}finally{i!==null&&o.types!==null&&(i.types=o.types),T.T=i}}else try{i=n(a,l),cd(t,e,i)}catch(s){Fu(t,e,s)}}function cd(t,e,n){n!==null&&typeof n==="object"&&typeof n.then==="function"?n.then(function(l){fd(t,e,l)},function(l){return Fu(t,e,l)}):fd(t,e,n)}function fd(t,e,n){e.status="fulfilled",e.value=n,cp(e),t.state=n,e=t.pending,e!==null&&(n=e.next,n===e?t.pending=null:(n=n.next,e.next=n,sp(t,n)))}function Fu(t,e,n){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do e.status="rejected",e.reason=n,cp(e),e=e.next;while(e!==l)}t.action=null}function cp(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function fp(t,e){return e}function dd(t,e){if(j){var n=Z.formState;if(n!==null){t:{var l=C;if(j){if(I){e:{var a=I;for(var i=Wt;a.nodeType!==8;){if(!i){a=null;break e}if(a=It(a.nextSibling),a===null){a=null;break e}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){I=It(a.nextSibling),l=a.data==="F!";break t}}_n(l)}l=!1}l&&(e=n[0])}}return n=Et(),n.memoizedState=n.baseState=e,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fp,lastRenderedState:e},n.queue=l,n=Dp.bind(null,C,l),l.dispatch=n,l=Wu(!1),i=tc.bind(null,C,!1,l.queue),l=Et(),a={state:e,dispatch:null,action:t,pending:null},l.queue=a,n=I0.bind(null,C,a,i,n),a.dispatch=n,l.memoizedState=t,[e,n,!1]}function hd(t){var e=at();return dp(e,Q,t)}function dp(t,e,n){if(e=$s(t,e,fp)[0],t=Wi(He)[0],typeof e==="object"&&e!==null&&typeof e.then==="function")try{var l=ui(e)}catch(o){if(o===Zl)throw Yo;throw o}else l=e;e=at();var a=e.queue,i=a.dispatch;return n!==e.memoizedState&&(C.flags|=2048,ql(9,{destroy:void 0},P0.bind(null,a,n),null)),[l,i,t]}function P0(t,e){t.action=e}function pd(t){var e=at(),n=Q;if(n!==null)return dp(e,n,t);at(),e=e.memoizedState,n=at();var l=n.queue.dispatch;return n.memoizedState=t,[e,l,!1]}function ql(t,e,n,l){return t={tag:t,create:n,deps:l,inst:e,next:null},e=C.updateQueue,e===null&&(e=Ko(),C.updateQueue=e),n=e.lastEffect,n===null?e.lastEffect=t.next=t:(l=n.next,n.next=t,t.next=l,e.lastEffect=t),t}function hp(){return at().memoizedState}function Fi(t,e,n,l){var a=Et();C.flags|=t,a.memoizedState=ql(1|e,{destroy:void 0},n,l===void 0?null:l)}function Qo(t,e,n,l){var a=at();l=l===void 0?null:l;var i=a.memoizedState.inst;Q!==null&&l!==null&&Ks(l,Q.memoizedState.deps)?a.memoizedState=ql(e,i,n,l):(C.flags|=t,a.memoizedState=ql(1|e,i,n,l))}function md(t,e){Fi(8390656,8,t,e)}function Ws(t,e){Qo(2048,8,t,e)}function t_(t){C.flags|=4;var e=C.updateQueue;if(e===null)e=Ko(),C.updateQueue=e,e.events=[t];else{var n=e.events;n===null?e.events=[t]:n.push(t)}}function pp(t){var e=at().memoizedState;return t_({ref:e,nextImpl:t}),function(){if((L&2)!==0)throw Error(_(440));return e.impl.apply(void 0,arguments)}}function mp(t,e){return Qo(4,2,t,e)}function vp(t,e){return Qo(4,4,t,e)}function gp(t,e){if(typeof e==="function"){t=t();var n=e(t);return function(){typeof n==="function"?n():e(null)}}if(e!==null&&e!==void 0)return t=t(),e.current=t,function(){e.current=null}}function yp(t,e,n){n=n!==null&&n!==void 0?n.concat([t]):null,Qo(4,4,gp.bind(null,e,t),n)}function Fs(){}function bp(t,e){var n=at();e=e===void 0?null:e;var l=n.memoizedState;if(e!==null&&Ks(e,l[1]))return l[0];return n.memoizedState=[t,e],t}function _p(t,e){var n=at();e=e===void 0?null:e;var l=n.memoizedState;if(e!==null&&Ks(e,l[1]))return l[0];if(l=t(),Qn){an(!0);try{t()}finally{an(!1)}}return n.memoizedState=[l,e],l}function Is(t,e,n){if(n===void 0||(je&1073741824)!==0&&(q&261930)===0)return t.memoizedState=e;return t.memoizedState=n,t=um(),C.lanes|=t,En|=t,n}function Sp(t,e,n,l){if(jt(n,e))return n;if(Bl.current!==null)return t=Is(t,n,l),jt(t,e)||(ut=!0),t;if((je&42)===0||(je&1073741824)!==0&&(q&261930)===0)return ut=!0,t.memoizedState=n;return t=um(),C.lanes|=t,En|=t,e}function Ep(t,e,n,l,a){var i=G.p;G.p=i!==0&&8>i?i:8;var o=T.T,r={};T.T=r,tc(t,!1,e,n);try{var u=a(),s=T.S;if(s!==null&&s(r,u),u!==null&&typeof u==="object"&&typeof u.then==="function"){var h=$0(u,l);Va(t,e,h,qt(t))}else Va(t,e,l,qt(t))}catch(g){Va(t,e,{then:function(){},status:"rejected",reason:g},qt())}finally{G.p=i,o!==null&&r.types!==null&&(o.types=r.types),T.T=o}}function e_(){}function Iu(t,e,n,l){if(t.tag!==5)throw Error(_(476));var a=Op(t).queue;Ep(t,a,e,qn,n===null?e_:function(){return Np(t),n(l)})}function Op(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:qn,baseState:qn,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:He,lastRenderedState:qn},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:He,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Np(t){var e=Op(t);e.next===null&&(e=t.alternate.memoizedState),Va(t,e.next.queue,{},qt())}function Ps(){return gt(Ia)}function xp(){return at().memoizedState}function Ap(){return at().memoizedState}function n_(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=qt();t=dn(n);var l=hn(e,t,n);l!==null&&(Dt(l,e,n),Ca(l,e,n)),e={cache:js()},t.payload=e;return}e=e.return}}function l_(t,e,n){var l=qt();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Zo(t)?Tp(e,n):(n=Us(t,e,n,l),n!==null&&(Dt(n,t,l),zp(n,e,l)))}function Dp(t,e,n){var l=qt();Va(t,e,n,l)}function Va(t,e,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Zo(t))Tp(e,a);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var o=e.lastRenderedState,r=i(o,n);if(a.hasEagerState=!0,a.eagerState=r,jt(r,o))return Go(t,e,a,0),Z===null&&Lo(),!1}catch(u){}finally{}if(n=Us(t,e,a,l),n!==null)return Dt(n,t,l),zp(n,e,l),!0}return!1}function tc(t,e,n,l){if(l={lane:2,revertLane:sc(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Zo(t)){if(e)throw Error(_(479))}else e=Us(t,n,l,2),e!==null&&Dt(e,t,2)}function Zo(t){var e=t.alternate;return t===C||e!==null&&e===C}function Tp(t,e){wl=yo=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function zp(t,e,n){if((n&4194048)!==0){var l=e.lanes;l&=t.pendingLanes,n|=l,e.lanes=n,ph(t,n)}}function ru(t,e,n,l){e=t.memoizedState,n=n(l,e),n=n===null||n===void 0?e:P({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}function vd(t,e,n,l,a,i,o){return t=t.stateNode,typeof t.shouldComponentUpdate==="function"?t.shouldComponentUpdate(l,i,o):e.prototype&&e.prototype.isPureReactComponent?!Xa(n,l)||!Xa(a,i):!0}function gd(t,e,n,l){t=e.state,typeof e.componentWillReceiveProps==="function"&&e.componentWillReceiveProps(n,l),typeof e.UNSAFE_componentWillReceiveProps==="function"&&e.UNSAFE_componentWillReceiveProps(n,l),e.state!==t&&Pu.enqueueReplaceState(e,e.state,null)}function Zn(t,e){var n=e;if("ref"in e){n={};for(var l in e)l!=="ref"&&(n[l]=e[l])}if(t=t.defaultProps){n===e&&(n=P({},n));for(var a in t)n[a]===void 0&&(n[a]=t[a])}return n}function Cp(t){co(t)}function Mp(t){console.error(t)}function Up(t){co(t)}function _o(t,e){try{var n=t.onUncaughtError;n(e.value,{componentStack:e.stack})}catch(l){setTimeout(function(){throw l})}}function yd(t,e,n){try{var l=t.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function ts(t,e,n){return n=dn(n),n.tag=3,n.payload={element:null},n.callback=function(){_o(t,e)},n}function Vp(t){return t=dn(t),t.tag=3,t}function Bp(t,e,n,l){var a=n.type.getDerivedStateFromError;if(typeof a==="function"){var i=l.value;t.payload=function(){return a(i)},t.callback=function(){yd(e,n,l)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==="function"&&(t.callback=function(){yd(e,n,l),typeof a!=="function"&&(pn===null?pn=new Set([this]):pn.add(this));var r=l.stack;this.componentDidCatch(l.value,{componentStack:r!==null?r:""})})}function a_(t,e,n,l,a){if(n.flags|=32768,l!==null&&typeof l==="object"&&typeof l.then==="function"){if(e=n.alternate,e!==null&&Ql(e,n,a,!0),n=Ht.current,n!==null){switch(n.tag){case 31:case 13:return Ft===null?xo():n.alternate===null&&nt===0&&(nt=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===mo?n.flags|=16384:(e=n.updateQueue,e===null?n.updateQueue=new Set([l]):e.add(l),yu(t,l,a)),!1;case 22:return n.flags|=65536,l===mo?n.flags|=16384:(e=n.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=e):(n=e.retryQueue,n===null?e.retryQueue=new Set([l]):n.add(l)),yu(t,l,a)),!1}throw Error(_(435,n.tag))}return yu(t,l,a),xo(),!1}if(j)return e=Ht.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=a,l!==Gu&&(t=Error(_(422),{cause:l}),Za($t(t,n)))):(l!==Gu&&(e=Error(_(423),{cause:l}),Za($t(e,n))),t=t.current.alternate,t.flags|=65536,a&=-a,t.lanes|=a,l=$t(l,n),a=ts(t.stateNode,l,a),iu(t,a),nt!==4&&(nt=2)),!1;var i=Error(_(520),{cause:l});if(i=$t(i,n),ja===null?ja=[i]:ja.push(i),nt!==4&&(nt=2),e===null)return!0;l=$t(l,n),n=e;do{switch(n.tag){case 3:return n.flags|=65536,t=a&-a,n.lanes|=t,t=ts(n.stateNode,l,t),iu(n,t),!1;case 1:if(e=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof e.getDerivedStateFromError==="function"||i!==null&&typeof i.componentDidCatch==="function"&&(pn===null||!pn.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Vp(a),Bp(a,t,n,l),iu(n,a),!1}n=n.return}while(n!==null);return!1}function pt(t,e,n,l){e.child=t===null?Wh(e,null,n,l):Xn(e,t.child,n,l)}function bd(t,e,n,l,a){n=n.render;var i=e.ref;if("ref"in l){var o={};for(var r in l)r!=="ref"&&(o[r]=l[r])}else o=l;if(Kn(e),l=Xs(t,e,n,o,i,a),r=Qs(),t!==null&&!ut)return Zs(t,e,a),Le(t,e,a);return j&&r&&Bs(e),e.flags|=1,pt(t,e,l,a),e.child}function _d(t,e,n,l,a){if(t===null){var i=n.type;if(typeof i==="function"&&!Vs(i)&&i.defaultProps===void 0&&n.compare===null)return e.tag=15,e.type=i,qp(t,e,i,l,a);return t=Ji(n.type,null,l,e,e.mode,a),t.ref=e.ref,t.return=e,e.child=t}if(i=t.child,!lc(t,a)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Xa,n(o,l)&&t.ref===e.ref)return Le(t,e,a)}return e.flags|=1,t=Ue(i,l),t.ref=e.ref,t.return=e,e.child=t}function qp(t,e,n,l,a){if(t!==null){var i=t.memoizedProps;if(Xa(i,l)&&t.ref===e.ref)if(ut=!1,e.pendingProps=l=i,lc(t,a))(t.flags&131072)!==0&&(ut=!0);else return e.lanes=t.lanes,Le(t,e,a)}return es(t,e,n,l,a)}function jp(t,e,n,l){var a=l.children,i=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((e.flags&128)!==0){if(i=i!==null?i.baseLanes|n:n,t!==null){l=e.child=t.child;for(a=0;l!==null;)a=a|l.lanes|l.childLanes,l=l.sibling;l=a&~i}else l=0,e.child=null;return Sd(t,e,i,n,l)}if((n&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&$i(e,i!==null?i.cachePool:null),i!==null?sd(e,i):Ju(),Ph(e);else return l=e.lanes=536870912,Sd(t,e,i!==null?i.baseLanes|n:n,n,l)}else i!==null?($i(e,i.cachePool),sd(e,i),nn(e),e.memoizedState=null):(t!==null&&$i(e,null),Ju(),nn(e));return pt(t,e,a,n),e.child}function Na(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function Sd(t,e,n,l,a){var i=Hs();return i=i===null?null:{parent:rt._currentValue,pool:i},e.memoizedState={baseLanes:n,cachePool:i},t!==null&&$i(e,null),Ju(),Ph(e),t!==null&&Ql(t,e,l,!0),e.childLanes=a,null}function Ii(t,e){return e=So({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function Ed(t,e,n){return Xn(e,t.child,null,n),t=Ii(e,e.pendingProps),t.flags|=2,Rt(e),e.memoizedState=null,t}function i_(t,e,n){var l=e.pendingProps,a=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(j){if(l.mode==="hidden")return t=Ii(e,l),e.lanes=536870912,Na(null,t);if($u(e),(t=I)?(t=wm(t,Wt),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:bn!==null?{id:pe,overflow:me}:null,retryLane:536870912,hydrationErrors:null},n=Kh(t),n.return=e,e.child=n,vt=e,I=null)):t=null,t===null)throw _n(e);return e.lanes=536870912,null}return Ii(e,l)}var i=t.memoizedState;if(i!==null){var o=i.dehydrated;if($u(e),a)if(e.flags&256)e.flags&=-257,e=Ed(t,e,n);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(_(558));else if(ut||Ql(t,e,n,!1),a=(n&t.childLanes)!==0,ut||a){if(l=Z,l!==null&&(o=mh(l,n),o!==0&&o!==i.retryLane))throw i.retryLane=o,Wn(t,o),Dt(l,t,o),nc;xo(),e=Ed(t,e,n)}else t=i.treeContext,I=It(o.nextSibling),vt=e,j=!0,fn=null,Wt=!1,t!==null&&Qh(e,t),e=Ii(e,l),e.flags|=4096;return e}return t=Ue(t.child,{mode:l.mode,children:l.children}),t.ref=e.ref,e.child=t,t.return=e,t}function Pi(t,e){var n=e.ref;if(n===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof n!=="function"&&typeof n!=="object")throw Error(_(284));if(t===null||t.ref!==n)e.flags|=4194816}}function es(t,e,n,l,a){if(Kn(e),n=Xs(t,e,n,l,void 0,a),l=Qs(),t!==null&&!ut)return Zs(t,e,a),Le(t,e,a);return j&&l&&Bs(e),e.flags|=1,pt(t,e,n,a),e.child}function Od(t,e,n,l,a,i){if(Kn(e),e.updateQueue=null,n=ep(e,l,n,a),tp(t),l=Qs(),t!==null&&!ut)return Zs(t,e,i),Le(t,e,i);return j&&l&&Bs(e),e.flags|=1,pt(t,e,n,i),e.child}function Nd(t,e,n,l,a){if(Kn(e),e.stateNode===null){var i=Sl,o=n.contextType;typeof o==="object"&&o!==null&&(i=gt(o)),i=new n(l,i),e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Pu,e.stateNode=i,i._reactInternals=e,i=e.stateNode,i.props=l,i.state=e.memoizedState,i.refs={},Gs(e),o=n.contextType,i.context=typeof o==="object"&&o!==null?gt(o):Sl,i.state=e.memoizedState,o=n.getDerivedStateFromProps,typeof o==="function"&&(ru(e,n,o,l),i.state=e.memoizedState),typeof n.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&&Pu.enqueueReplaceState(i,i.state,null),Ua(e,l,i,a),Ma(),i.state=e.memoizedState),typeof i.componentDidMount==="function"&&(e.flags|=4194308),l=!0}else if(t===null){i=e.stateNode;var r=e.memoizedProps,u=Zn(n,r);i.props=u;var s=i.context,h=n.contextType;o=Sl,typeof h==="object"&&h!==null&&(o=gt(h));var g=n.getDerivedStateFromProps;h=typeof g==="function"||typeof i.getSnapshotBeforeUpdate==="function",r=e.pendingProps!==r,h||typeof i.UNSAFE_componentWillReceiveProps!=="function"&&typeof i.componentWillReceiveProps!=="function"||(r||s!==o)&&gd(e,i,l,o),Pe=!1;var d=e.memoizedState;i.state=d,Ua(e,l,i,a),Ma(),s=e.memoizedState,r||d!==s||Pe?(typeof g==="function"&&(ru(e,n,g,l),s=e.memoizedState),(u=Pe||vd(e,n,u,l,d,s,o))?(h||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"&&(e.flags|=4194308)):(typeof i.componentDidMount==="function"&&(e.flags|=4194308),e.memoizedProps=l,e.memoizedState=s),i.props=l,i.state=s,i.context=o,l=u):(typeof i.componentDidMount==="function"&&(e.flags|=4194308),l=!1)}else{i=e.stateNode,Zu(t,e),o=e.memoizedProps,h=Zn(n,o),i.props=h,g=e.pendingProps,d=i.context,s=n.contextType,u=Sl,typeof s==="object"&&s!==null&&(u=gt(s)),r=n.getDerivedStateFromProps,(s=typeof r==="function"||typeof i.getSnapshotBeforeUpdate==="function")||typeof i.UNSAFE_componentWillReceiveProps!=="function"&&typeof i.componentWillReceiveProps!=="function"||(o!==g||d!==u)&&gd(e,i,l,u),Pe=!1,d=e.memoizedState,i.state=d,Ua(e,l,i,a),Ma();var v=e.memoizedState;o!==g||d!==v||Pe||t!==null&&t.dependencies!==null&&po(t.dependencies)?(typeof r==="function"&&(ru(e,n,r,l),v=e.memoizedState),(h=Pe||vd(e,n,h,l,d,v,u)||t!==null&&t.dependencies!==null&&po(t.dependencies))?(s||typeof i.UNSAFE_componentWillUpdate!=="function"&&typeof i.componentWillUpdate!=="function"||(typeof i.componentWillUpdate==="function"&&i.componentWillUpdate(l,v,u),typeof i.UNSAFE_componentWillUpdate==="function"&&i.UNSAFE_componentWillUpdate(l,v,u)),typeof i.componentDidUpdate==="function"&&(e.flags|=4),typeof i.getSnapshotBeforeUpdate==="function"&&(e.flags|=1024)):(typeof i.componentDidUpdate!=="function"||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!=="function"||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=l,e.memoizedState=v),i.props=l,i.state=v,i.context=u,l=h):(typeof i.componentDidUpdate!=="function"||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!=="function"||o===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),l=!1)}return i=l,Pi(t,e),l=(e.flags&128)!==0,i||l?(i=e.stateNode,n=l&&typeof n.getDerivedStateFromError!=="function"?null:i.render(),e.flags|=1,t!==null&&l?(e.child=Xn(e,t.child,null,a),e.child=Xn(e,null,n,a)):pt(t,e,n,a),e.memoizedState=i.state,t=e.child):t=Le(t,e,a),t}function xd(t,e,n,l){return Yn(),e.flags|=256,pt(t,e,n,l),e.child}function su(t){return{baseLanes:t,cachePool:kh()}}function cu(t,e,n){return t=t!==null?t.childLanes&~n:0,e&&(t|=Mt),t}function Hp(t,e,n){var l=e.pendingProps,a=!1,i=(e.flags&128)!==0,o;if((o=i)||(o=t!==null&&t.memoizedState===null?!1:(lt.current&2)!==0),o&&(a=!0,e.flags&=-129),o=(e.flags&32)!==0,e.flags&=-33,t===null){if(j){if(a?en(e):nn(e),(t=I)?(t=wm(t,Wt),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:bn!==null?{id:pe,overflow:me}:null,retryLane:536870912,hydrationErrors:null},n=Kh(t),n.return=e,e.child=n,vt=e,I=null)):t=null,t===null)throw _n(e);return gs(t)?e.lanes=32:e.lanes=536870912,null}var r=l.children;if(l=l.fallback,a)return nn(e),a=e.mode,r=So({mode:"hidden",children:r},a),l=jn(l,a,n,null),r.return=e,l.return=e,r.sibling=l,e.child=r,l=e.child,l.memoizedState=su(n),l.childLanes=cu(t,o,n),e.memoizedState=uu,Na(null,l);return en(e),ns(e,r)}var u=t.memoizedState;if(u!==null&&(r=u.dehydrated,r!==null)){if(i)e.flags&256?(en(e),e.flags&=-257,e=fu(t,e,n)):e.memoizedState!==null?(nn(e),e.child=t.child,e.flags|=128,e=null):(nn(e),r=l.fallback,a=e.mode,l=So({mode:"visible",children:l.children},a),r=jn(r,a,n,null),r.flags|=2,l.return=e,r.return=e,l.sibling=r,e.child=l,Xn(e,t.child,null,n),l=e.child,l.memoizedState=su(n),l.childLanes=cu(t,o,n),e.memoizedState=uu,e=Na(null,l));else if(en(e),gs(r)){if(o=r.nextSibling&&r.nextSibling.dataset,o)var s=o.dgst;o=s,l=Error(_(419)),l.stack="",l.digest=o,Za({value:l,source:null,stack:null}),e=fu(t,e,n)}else if(ut||Ql(t,e,n,!1),o=(n&t.childLanes)!==0,ut||o){if(o=Z,o!==null&&(l=mh(o,n),l!==0&&l!==u.retryLane))throw u.retryLane=l,Wn(t,l),Dt(o,t,l),nc;vs(r)||xo(),e=fu(t,e,n)}else vs(r)?(e.flags|=192,e.child=t.child,e=null):(t=u.treeContext,I=It(r.nextSibling),vt=e,j=!0,fn=null,Wt=!1,t!==null&&Qh(e,t),e=ns(e,l.children),e.flags|=4096);return e}if(a)return nn(e),r=l.fallback,a=e.mode,u=t.child,s=u.sibling,l=Ue(u,{mode:"hidden",children:l.children}),l.subtreeFlags=u.subtreeFlags&65011712,s!==null?r=Ue(s,r):(r=jn(r,a,n,null),r.flags|=2),r.return=e,l.return=e,l.sibling=r,e.child=l,Na(null,l),l=e.child,r=t.child.memoizedState,r===null?r=su(n):(a=r.cachePool,a!==null?(u=rt._currentValue,a=a.parent!==u?{parent:u,pool:u}:a):a=kh(),r={baseLanes:r.baseLanes|n,cachePool:a}),l.memoizedState=r,l.childLanes=cu(t,o,n),e.memoizedState=uu,Na(t.child,l);return en(e),n=t.child,t=n.sibling,n=Ue(n,{mode:"visible",children:l.children}),n.return=e,n.sibling=null,t!==null&&(o=e.deletions,o===null?(e.deletions=[t],e.flags|=16):o.push(t)),e.child=n,e.memoizedState=null,n}function ns(t,e){return e=So({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function So(t,e){return t=Ct(22,t,null,e),t.lanes=0,t}function fu(t,e,n){return Xn(e,t.child,null,n),t=ns(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Ad(t,e,n){t.lanes|=e;var l=t.alternate;l!==null&&(l.lanes|=e),Ku(t.return,e,n)}function du(t,e,n,l,a,i){var o=t.memoizedState;o===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:a,treeForkCount:i}:(o.isBackwards=e,o.rendering=null,o.renderingStartTime=0,o.last=l,o.tail=n,o.tailMode=a,o.treeForkCount=i)}function Lp(t,e,n){var l=e.pendingProps,a=l.revealOrder,i=l.tail;l=l.children;var o=lt.current,r=(o&2)!==0;if(r?(o=o&1|2,e.flags|=128):o&=1,k(lt,o),pt(t,e,l,n),l=j?Qa:0,!r&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Ad(t,n,e);else if(t.tag===19)Ad(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(a){case"forwards":n=e.child;for(a=null;n!==null;)t=n.alternate,t!==null&&go(t)===null&&(a=n),n=n.sibling;n=a,n===null?(a=e.child,e.child=null):(a=n.sibling,n.sibling=null),du(e,!1,a,n,i,l);break;case"backwards":case"unstable_legacy-backwards":n=null,a=e.child;for(e.child=null;a!==null;){if(t=a.alternate,t!==null&&go(t)===null){e.child=a;break}t=a.sibling,a.sibling=n,n=a,a=t}du(e,!0,n,null,i,l);break;case"together":du(e,!1,null,null,void 0,l);break;default:e.memoizedState=null}return e.child}function Le(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),En|=e.lanes,(n&e.childLanes)===0)if(t!==null){if(Ql(t,e,n,!1),(n&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(_(153));if(e.child!==null){t=e.child,n=Ue(t,t.pendingProps),e.child=n;for(n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Ue(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function lc(t,e){if((t.lanes&e)!==0)return!0;return t=t.dependencies,t!==null&&po(t)?!0:!1}function o_(t,e,n){switch(e.tag){case 3:oo(e,e.stateNode.containerInfo),tn(e,rt,t.memoizedState.cache),Yn();break;case 27:case 5:wu(e);break;case 4:oo(e,e.stateNode.containerInfo);break;case 10:tn(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,$u(e),null;break;case 13:var l=e.memoizedState;if(l!==null){if(l.dehydrated!==null)return en(e),e.flags|=128,null;if((n&e.child.childLanes)!==0)return Hp(t,e,n);return en(e),t=Le(t,e,n),t!==null?t.sibling:null}en(e);break;case 19:var a=(t.flags&128)!==0;if(l=(n&e.childLanes)!==0,l||(Ql(t,e,n,!1),l=(n&e.childLanes)!==0),a){if(l)return Lp(t,e,n);e.flags|=128}if(a=e.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),k(lt,lt.current),l)break;else return null;case 22:return e.lanes=0,jp(t,e,n,e.pendingProps);case 24:tn(e,rt,t.memoizedState.cache)}return Le(t,e,n)}function Gp(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps)ut=!0;else{if(!lc(t,n)&&(e.flags&128)===0)return ut=!1,o_(t,e,n);ut=(t.flags&131072)!==0?!0:!1}else ut=!1,j&&(e.flags&1048576)!==0&&Xh(e,Qa,e.index);switch(e.lanes=0,e.tag){case 16:t:{var l=e.pendingProps;if(t=Vn(e.elementType),e.type=t,typeof t==="function")Vs(t)?(l=Zn(t,l),e.tag=1,e=Nd(null,e,t,l,n)):(e.tag=0,e=es(null,e,t,l,n));else{if(t!==void 0&&t!==null){var a=t.$$typeof;if(a===Ss){e.tag=11,e=bd(null,e,t,l,n);break t}else if(a===Es){e.tag=14,e=_d(null,e,t,l,n);break t}}throw e=Tu(t)||t,Error(_(306,e,""))}}return e;case 0:return es(t,e,e.type,e.pendingProps,n);case 1:return l=e.type,a=Zn(l,e.pendingProps),Nd(t,e,l,a,n);case 3:t:{if(oo(e,e.stateNode.containerInfo),t===null)throw Error(_(387));l=e.pendingProps;var i=e.memoizedState;a=i.element,Zu(t,e),Ua(e,l,null,n);var o=e.memoizedState;if(l=o.cache,tn(e,rt,l),l!==i.cache&&Xu(e,[rt],n,!0),Ma(),l=o.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:o.cache},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){e=xd(t,e,l,n);break t}else if(l!==a){a=$t(Error(_(424)),e),Za(a),e=xd(t,e,l,n);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}I=It(t.firstChild),vt=e,j=!0,fn=null,Wt=!0,n=Wh(e,null,l,n);for(e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Yn(),l===a){e=Le(t,e,n);break t}pt(t,e,l,n)}e=e.child}return e;case 26:return Pi(t,e),t===null?(n=Zd(e.type,null,e.pendingProps,null))?e.memoizedState=n:j||(n=e.type,t=e.pendingProps,l=zo(cn.current).createElement(n),l[mt]=e,l[Tt]=t,yt(l,n,t),dt(l),e.stateNode=l):e.memoizedState=Zd(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return wu(e),t===null&&j&&(l=e.stateNode=Rm(e.type,e.pendingProps,cn.current),vt=e,Wt=!0,a=I,Nn(e.type)?(ys=a,I=It(l.firstChild)):I=a),pt(t,e,e.pendingProps.children,n),Pi(t,e),t===null&&(e.flags|=4194304),e.child;case 5:if(t===null&&j){if(a=l=I)l=U_(l,e.type,e.pendingProps,Wt),l!==null?(e.stateNode=l,vt=e,I=It(l.firstChild),Wt=!1,a=!0):a=!1;a||_n(e)}return wu(e),a=e.type,i=e.pendingProps,o=t!==null?t.memoizedProps:null,l=i.children,ps(a,i)?l=null:o!==null&&ps(a,o)&&(e.flags|=32),e.memoizedState!==null&&(a=Xs(t,e,F0,null,null,n),Ia._currentValue=a),Pi(t,e),pt(t,e,l,n),e.child;case 6:if(t===null&&j){if(t=n=I)n=V_(n,e.pendingProps,Wt),n!==null?(e.stateNode=n,vt=e,I=null,t=!0):t=!1;t||_n(e)}return null;case 13:return Hp(t,e,n);case 4:return oo(e,e.stateNode.containerInfo),l=e.pendingProps,t===null?e.child=Xn(e,null,l,n):pt(t,e,l,n),e.child;case 11:return bd(t,e,e.type,e.pendingProps,n);case 7:return pt(t,e,e.pendingProps,n),e.child;case 8:return pt(t,e,e.pendingProps.children,n),e.child;case 12:return pt(t,e,e.pendingProps.children,n),e.child;case 10:return l=e.pendingProps,tn(e,e.type,l.value),pt(t,e,l.children,n),e.child;case 9:return a=e.type._context,l=e.pendingProps.children,Kn(e),a=gt(a),l=l(a),e.flags|=1,pt(t,e,l,n),e.child;case 14:return _d(t,e,e.type,e.pendingProps,n);case 15:return qp(t,e,e.type,e.pendingProps,n);case 19:return Lp(t,e,n);case 31:return i_(t,e,n);case 22:return jp(t,e,n,e.pendingProps);case 24:return Kn(e),l=gt(rt),t===null?(a=Hs(),a===null&&(a=Z,i=js(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=n),a=i),e.memoizedState={parent:l,cache:a},Gs(e),tn(e,rt,a)):((t.lanes&n)!==0&&(Zu(t,e),Ua(e,null,null,n),Ma()),a=t.memoizedState,i=e.memoizedState,a.parent!==l?(a={parent:l,cache:l},e.memoizedState=a,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=a),tn(e,rt,l)):(l=i.cache,tn(e,rt,l),l!==a.cache&&Xu(e,[rt],n,!0))),pt(t,e,e.pendingProps.children,n),e.child;case 29:throw e.pendingProps}throw Error(_(156,e.tag))}function xe(t){t.flags|=4}function hu(t,e,n,l,a){if(e=(t.mode&32)!==0)e=!1;if(e){if(t.flags|=16777216,(a&335544128)===a)if(t.stateNode.complete)t.flags|=8192;else if(fm())t.flags|=8192;else throw Ln=mo,Ls}else t.flags&=-16777217}function Dd(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Um(e))if(fm())t.flags|=8192;else throw Ln=mo,Ls}function ji(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?dh():536870912,t.lanes|=e,jl|=e)}function va(t,e){if(!j)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function F(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,l=0;if(e)for(var a=t.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags&65011712,l|=a.flags&65011712,a.return=t,a=a.sibling;else for(a=t.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=t,a=a.sibling;return t.subtreeFlags|=l,t.childLanes=n,e}function r_(t,e,n){var l=e.pendingProps;switch(qs(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return F(e),null;case 1:return F(e),null;case 3:if(n=e.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),Ve(rt),Cl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),t===null||t.child===null)ul(e)?xe(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,au());return F(e),null;case 26:var{type:a,memoizedState:i}=e;return t===null?(xe(e),i!==null?(F(e),Dd(e,i)):(F(e),hu(e,a,null,l,n))):i?i!==t.memoizedState?(xe(e),F(e),Dd(e,i)):(F(e),e.flags&=-16777217):(t=t.memoizedProps,t!==l&&xe(e),F(e),hu(e,a,t,l,n)),null;case 27:if(ro(e),n=cn.current,a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==l&&xe(e);else{if(!l){if(e.stateNode===null)throw Error(_(166));return F(e),null}t=ge.current,ul(e)?nd(e,t):(t=Rm(a,l,n),e.stateNode=t,xe(e))}return F(e),null;case 5:if(ro(e),a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==l&&xe(e);else{if(!l){if(e.stateNode===null)throw Error(_(166));return F(e),null}if(i=ge.current,ul(e))nd(e,i);else{var o=zo(cn.current);switch(i){case 1:i=o.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=o.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=o.createElementNS("http://www.w3.org/1998/Math/MathML",a);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(a,{is:l.is}):o.createElement(a)}}i[mt]=e,i[Tt]=l;t:for(o=e.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===e)break t;for(;o.sibling===null;){if(o.return===null||o.return===e)break t;o=o.return}o.sibling.return=o.return,o=o.sibling}e.stateNode=i;t:switch(yt(i,a,l),a){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break t;case"img":l=!0;break t;default:l=!1}l&&xe(e)}}return F(e),hu(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,n),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==l&&xe(e);else{if(typeof l!=="string"&&e.stateNode===null)throw Error(_(166));if(t=cn.current,ul(e)){if(t=e.stateNode,n=e.memoizedProps,l=null,a=vt,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}t[mt]=e,t=t.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||Dm(t.nodeValue,n)?!0:!1,t||_n(e,!0)}else t=zo(t).createTextNode(l),t[mt]=e,e.stateNode=t}return F(e),null;case 31:if(n=e.memoizedState,t===null||t.memoizedState!==null){if(l=ul(e),n!==null){if(t===null){if(!l)throw Error(_(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(_(557));t[mt]=e}else Yn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;F(e),t=!1}else n=au(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),t=!0;if(!t){if(e.flags&256)return Rt(e),e;return Rt(e),null}if((e.flags&128)!==0)throw Error(_(558))}return F(e),null;case 13:if(l=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=ul(e),l!==null&&l.dehydrated!==null){if(t===null){if(!a)throw Error(_(318));if(a=e.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(_(317));a[mt]=e}else Yn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;F(e),a=!1}else a=au(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a){if(e.flags&256)return Rt(e),e;return Rt(e),null}}if(Rt(e),(e.flags&128)!==0)return e.lanes=n,e;return n=l!==null,t=t!==null&&t.memoizedState!==null,n&&(l=e.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==a&&(l.flags|=2048)),n!==t&&n&&(e.child.flags|=8192),ji(e,e.updateQueue),F(e),null;case 4:return Cl(),t===null&&cc(e.stateNode.containerInfo),F(e),null;case 10:return Ve(e.type),F(e),null;case 19:if(ht(lt),l=e.memoizedState,l===null)return F(e),null;if(a=(e.flags&128)!==0,i=l.rendering,i===null)if(a)va(l,!1);else{if(nt!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(i=go(t),i!==null){e.flags|=128,va(l,!1),t=i.updateQueue,e.updateQueue=t,ji(e,t),e.subtreeFlags=0,t=n;for(n=e.child;n!==null;)Yh(n,t),n=n.sibling;return k(lt,lt.current&1|2),j&&ze(e,l.treeForkCount),e.child}t=t.sibling}l.tail!==null&&Ut()>Oo&&(e.flags|=128,a=!0,va(l,!1),e.lanes=4194304)}else{if(!a)if(t=go(i),t!==null){if(e.flags|=128,a=!0,t=t.updateQueue,e.updateQueue=t,ji(e,t),va(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!j)return F(e),null}else 2*Ut()-l.renderingStartTime>Oo&&n!==536870912&&(e.flags|=128,a=!0,va(l,!1),e.lanes=4194304);l.isBackwards?(i.sibling=e.child,e.child=i):(t=l.last,t!==null?t.sibling=i:e.child=i,l.last=i)}if(l.tail!==null)return t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=Ut(),t.sibling=null,n=lt.current,k(lt,a?n&1|2:n&1),j&&ze(e,l.treeForkCount),t;return F(e),null;case 22:case 23:return Rt(e),Ys(),l=e.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(e.flags|=8192):l&&(e.flags|=8192),l?(n&536870912)!==0&&(e.flags&128)===0&&(F(e),e.subtreeFlags&6&&(e.flags|=8192)):F(e),n=e.updateQueue,n!==null&&ji(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),l=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),l!==n&&(e.flags|=2048),t!==null&&ht(Hn),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),Ve(rt),F(e),null;case 25:return null;case 30:return null}throw Error(_(156,e.tag))}function u_(t,e){switch(qs(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Ve(rt),Cl(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return ro(e),null;case 31:if(e.memoizedState!==null){if(Rt(e),e.alternate===null)throw Error(_(340));Yn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(Rt(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(_(340));Yn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return ht(lt),null;case 4:return Cl(),null;case 10:return Ve(e.type),null;case 22:case 23:return Rt(e),Ys(),t!==null&&ht(Hn),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Ve(rt),null;case 25:return null;default:return null}}function Yp(t,e){switch(qs(e),e.tag){case 3:Ve(rt),Cl();break;case 26:case 27:case 5:ro(e);break;case 4:Cl();break;case 31:e.memoizedState!==null&&Rt(e);break;case 13:Rt(e);break;case 19:ht(lt);break;case 10:Ve(e.type);break;case 22:case 23:Rt(e),Ys(),t!==null&&ht(Hn);break;case 24:Ve(rt)}}function si(t,e){try{var n=e.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&t)===t){l=void 0;var{create:i,inst:o}=n;l=i(),o.destroy=l}n=n.next}while(n!==a)}}catch(r){K(e,e.return,r)}}function Sn(t,e,n){try{var l=e.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var i=a.next;l=i;do{if((l.tag&t)===t){var o=l.inst,r=o.destroy;if(r!==void 0){o.destroy=void 0,a=e;var u=n,s=r;try{s()}catch(h){K(a,u,h)}}}l=l.next}while(l!==i)}}catch(h){K(e,e.return,h)}}function Kp(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{Ih(e,n)}catch(l){K(t,t.return,l)}}}function Xp(t,e,n){n.props=Zn(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(l){K(t,e,l)}}function Ba(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:l=t.stateNode;break;default:l=t.stateNode}typeof n==="function"?t.refCleanup=n(l):n.current=l}}catch(a){K(t,e,a)}}function ve(t,e){var{ref:n,refCleanup:l}=t;if(n!==null)if(typeof l==="function")try{l()}catch(a){K(t,e,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n==="function")try{n(null)}catch(a){K(t,e,a)}else n.current=null}function Qp(t){var{type:e,memoizedProps:n,stateNode:l}=t;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break t;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(a){K(t,t.return,a)}}function pu(t,e,n){try{var l=t.stateNode;T_(l,t.type,n,e),l[Tt]=e}catch(a){K(t,t.return,a)}}function Zp(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Nn(t.type)||t.tag===4}function mu(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Zp(t.return))return null;t=t.return}t.sibling.return=t.return;for(t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Nn(t.type))continue t;if(t.flags&2)continue t;if(t.child===null||t.tag===4)continue t;else t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function ls(t,e,n){var l=t.tag;if(l===5||l===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!==null&&n!==void 0||e.onclick!==null||(e.onclick=Ce));else if(l!==4&&(l===27&&Nn(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(ls(t,e,n),t=t.sibling;t!==null;)ls(t,e,n),t=t.sibling}function Eo(t,e,n){var l=t.tag;if(l===5||l===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(l!==4&&(l===27&&Nn(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(Eo(t,e,n),t=t.sibling;t!==null;)Eo(t,e,n),t=t.sibling}function kp(t){var{stateNode:e,memoizedProps:n}=t;try{for(var l=t.type,a=e.attributes;a.length;)e.removeAttributeNode(a[0]);yt(e,l,n),e[mt]=t,e[Tt]=n}catch(i){K(t,t.return,i)}}function s_(t,e){if(t=t.containerInfo,ds=Mo,t=Uh(t),Cs(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var{anchorOffset:a,focusNode:i}=l;l=l.focusOffset;try{n.nodeType,i.nodeType}catch(A){n=null;break t}var o=0,r=-1,u=-1,s=0,h=0,g=t,d=null;e:for(;;){for(var v;;){if(g!==n||a!==0&&g.nodeType!==3||(r=o+a),g!==i||l!==0&&g.nodeType!==3||(u=o+l),g.nodeType===3&&(o+=g.nodeValue.length),(v=g.firstChild)===null)break;d=g,g=v}for(;;){if(g===t)break e;if(d===n&&++s===a&&(r=o),d===i&&++h===l&&(u=o),(v=g.nextSibling)!==null)break;g=d,d=g.parentNode}g=v}n=r===-1||u===-1?null:{start:r,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;hs={focusedElem:t,selectionRange:n},Mo=!1;for(ft=e;ft!==null;)if(e=ft,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,ft=t;else for(;ft!==null;){switch(e=ft,i=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(n=0;n<t.length;n++)a=t[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&i!==null){t=void 0,n=e,a=i.memoizedProps,i=i.memoizedState,l=n.stateNode;try{var E=Zn(n.type,a);t=l.getSnapshotBeforeUpdate(E,i),l.__reactInternalSnapshotBeforeUpdate=t}catch(A){K(n,n.return,A)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,n=t.nodeType,n===9)ms(t);else if(n===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":ms(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(_(163))}if(t=e.sibling,t!==null){t.return=e.return,ft=t;break}ft=e.return}}function Jp(t,e,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:De(t,n),l&4&&si(5,n);break;case 1:if(De(t,n),l&4)if(t=n.stateNode,e===null)try{t.componentDidMount()}catch(o){K(n,n.return,o)}else{var a=Zn(n.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(a,e,t.__reactInternalSnapshotBeforeUpdate)}catch(o){K(n,n.return,o)}}l&64&&Kp(n),l&512&&Ba(n,n.return);break;case 3:if(De(t,n),l&64&&(t=n.updateQueue,t!==null)){if(e=null,n.child!==null)switch(n.child.tag){case 27:case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}try{Ih(t,e)}catch(o){K(n,n.return,o)}}break;case 27:e===null&&l&4&&kp(n);case 26:case 5:De(t,n),e===null&&l&4&&Qp(n),l&512&&Ba(n,n.return);break;case 12:De(t,n);break;case 31:De(t,n),l&4&&Fp(t,n);break;case 13:De(t,n),l&4&&Ip(t,n),l&64&&(t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(n=y_.bind(null,n),B_(t,n))));break;case 22:if(l=n.memoizedState!==null||we,!l){e=e!==null&&e.memoizedState!==null||ot,a=we;var i=ot;we=l,(ot=e)&&!i?Te(t,n,(n.subtreeFlags&8772)!==0):De(t,n),we=a,ot=i}break;case 30:break;default:De(t,n)}}function $p(t){var e=t.alternate;e!==null&&(t.alternate=null,$p(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&As(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Ae(t,e,n){for(n=n.child;n!==null;)Wp(t,e,n),n=n.sibling}function Wp(t,e,n){if(Vt&&typeof Vt.onCommitFiberUnmount==="function")try{Vt.onCommitFiberUnmount(ni,n)}catch(i){}switch(n.tag){case 26:ot||ve(n,e),Ae(t,e,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ot||ve(n,e);var l=tt,a=xt;Nn(n.type)&&(tt=n.stateNode,xt=!1),Ae(t,e,n),La(n.stateNode),tt=l,xt=a;break;case 5:ot||ve(n,e);case 6:if(l=tt,a=xt,tt=null,Ae(t,e,n),tt=l,xt=a,tt!==null)if(xt)try{(tt.nodeType===9?tt.body:tt.nodeName==="HTML"?tt.ownerDocument.body:tt).removeChild(n.stateNode)}catch(i){K(n,e,i)}else try{tt.removeChild(n.stateNode)}catch(i){K(n,e,i)}break;case 18:tt!==null&&(xt?(t=tt,Gd(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,n.stateNode),Yl(t)):Gd(tt,n.stateNode));break;case 4:l=tt,a=xt,tt=n.stateNode.containerInfo,xt=!0,Ae(t,e,n),tt=l,xt=a;break;case 0:case 11:case 14:case 15:Sn(2,n,e),ot||Sn(4,n,e),Ae(t,e,n);break;case 1:ot||(ve(n,e),l=n.stateNode,typeof l.componentWillUnmount==="function"&&Xp(n,e,l)),Ae(t,e,n);break;case 21:Ae(t,e,n);break;case 22:ot=(l=ot)||n.memoizedState!==null,Ae(t,e,n),ot=l;break;default:Ae(t,e,n)}}function Fp(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Yl(t)}catch(n){K(e,e.return,n)}}}function Ip(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Yl(t)}catch(n){K(e,e.return,n)}}function c_(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new Td),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new Td),e;default:throw Error(_(435,t.tag))}}function Hi(t,e){var n=c_(t);e.forEach(function(l){if(!n.has(l)){n.add(l);var a=b_.bind(null,t,l);l.then(a,a)}})}function Ot(t,e){var n=e.deletions;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l],i=t,o=e,r=o;t:for(;r!==null;){switch(r.tag){case 27:if(Nn(r.type)){tt=r.stateNode,xt=!1;break t}break;case 5:tt=r.stateNode,xt=!1;break t;case 3:case 4:tt=r.stateNode.containerInfo,xt=!0;break t}r=r.return}if(tt===null)throw Error(_(160));Wp(i,o,a),tt=null,xt=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)Pp(e,t),e=e.sibling}function Pp(t,e){var{alternate:n,flags:l}=t;switch(t.tag){case 0:case 11:case 14:case 15:Ot(e,t),Nt(t),l&4&&(Sn(3,t,t.return),si(3,t),Sn(5,t,t.return));break;case 1:Ot(e,t),Nt(t),l&512&&(ot||n===null||ve(n,n.return)),l&64&&we&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(n=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var a=ie;if(Ot(e,t),Nt(t),l&512&&(ot||n===null||ve(n,n.return)),l&4){var i=n!==null?n.memoizedState:null;if(l=t.memoizedState,n===null)if(l===null)if(t.stateNode===null){t:{l=t.type,n=t.memoizedProps,a=a.ownerDocument||a;e:switch(l){case"title":if(i=a.getElementsByTagName("title")[0],!i||i[ii]||i[mt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))i=a.createElement(l),a.head.insertBefore(i,a.querySelector("head > title"));yt(i,l,n),i[mt]=t,dt(i),l=i;break t;case"link":var o=Jd("link","href",a).get(l+(n.href||""));if(o){for(var r=0;r<o.length;r++)if(i=o[r],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(r,1);break e}}i=a.createElement(l),yt(i,l,n),a.head.appendChild(i);break;case"meta":if(o=Jd("meta","content",a).get(l+(n.content||""))){for(r=0;r<o.length;r++)if(i=o[r],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){o.splice(r,1);break e}}i=a.createElement(l),yt(i,l,n),a.head.appendChild(i);break;default:throw Error(_(468,l))}i[mt]=t,dt(i),l=i}t.stateNode=l}else $d(a,t.type,t.stateNode);else t.stateNode=kd(a,l,t.memoizedProps);else i!==l?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,l===null?$d(a,t.type,t.stateNode):kd(a,l,t.memoizedProps)):l===null&&t.stateNode!==null&&pu(t,t.memoizedProps,n.memoizedProps)}break;case 27:Ot(e,t),Nt(t),l&512&&(ot||n===null||ve(n,n.return)),n!==null&&l&4&&pu(t,t.memoizedProps,n.memoizedProps);break;case 5:if(Ot(e,t),Nt(t),l&512&&(ot||n===null||ve(n,n.return)),t.flags&32){a=t.stateNode;try{Ul(a,"")}catch(E){K(t,t.return,E)}}l&4&&t.stateNode!=null&&(a=t.memoizedProps,pu(t,a,n!==null?n.memoizedProps:a)),l&1024&&(vu=!0);break;case 6:if(Ot(e,t),Nt(t),l&4){if(t.stateNode===null)throw Error(_(162));l=t.memoizedProps,n=t.stateNode;try{n.nodeValue=l}catch(E){K(t,t.return,E)}}break;case 3:if(no=null,a=ie,ie=wo(e.containerInfo),Ot(e,t),ie=a,Nt(t),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Yl(e.containerInfo)}catch(E){K(t,t.return,E)}vu&&(vu=!1,tm(t));break;case 4:l=ie,ie=wo(t.stateNode.containerInfo),Ot(e,t),Nt(t),ie=l;break;case 12:Ot(e,t),Nt(t);break;case 31:Ot(e,t),Nt(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Hi(t,l)));break;case 13:Ot(e,t),Nt(t),t.child.flags&8192&&t.memoizedState!==null!==(n!==null&&n.memoizedState!==null)&&(ko=Ut()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Hi(t,l)));break;case 22:a=t.memoizedState!==null;var u=n!==null&&n.memoizedState!==null,s=we,h=ot;if(we=s||a,ot=h||u,Ot(e,t),ot=h,we=s,Nt(t),l&8192)t:for(e=t.stateNode,e._visibility=a?e._visibility&-2:e._visibility|1,a&&(n===null||u||we||ot||Bn(t)),n=null,e=t;;){if(e.tag===5||e.tag===26){if(n===null){u=n=e;try{if(i=u.stateNode,a)o=i.style,typeof o.setProperty==="function"?o.setProperty("display","none","important"):o.display="none";else{r=u.stateNode;var g=u.memoizedProps.style,d=g!==void 0&&g!==null&&g.hasOwnProperty("display")?g.display:null;r.style.display=d==null||typeof d==="boolean"?"":(""+d).trim()}}catch(E){K(u,u.return,E)}}}else if(e.tag===6){if(n===null){u=e;try{u.stateNode.nodeValue=a?"":u.memoizedProps}catch(E){K(u,u.return,E)}}}else if(e.tag===18){if(n===null){u=e;try{var v=u.stateNode;a?Yd(v,!0):Yd(u.stateNode,!1)}catch(E){K(u,u.return,E)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;n===e&&(n=null),e=e.return}n===e&&(n=null),e.sibling.return=e.return,e=e.sibling}l&4&&(l=t.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,Hi(t,n))));break;case 19:Ot(e,t),Nt(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Hi(t,l)));break;case 30:break;case 21:break;default:Ot(e,t),Nt(t)}}function Nt(t){var e=t.flags;if(e&2){try{for(var n,l=t.return;l!==null;){if(Zp(l)){n=l;break}l=l.return}if(n==null)throw Error(_(160));switch(n.tag){case 27:var a=n.stateNode,i=mu(t);Eo(t,i,a);break;case 5:var o=n.stateNode;n.flags&32&&(Ul(o,""),n.flags&=-33);var r=mu(t);Eo(t,r,o);break;case 3:case 4:var u=n.stateNode.containerInfo,s=mu(t);ls(t,s,u);break;default:throw Error(_(161))}}catch(h){K(t,t.return,h)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function tm(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;tm(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function De(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)Jp(t,e.alternate,e),e=e.sibling}function Bn(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:Sn(4,e,e.return),Bn(e);break;case 1:ve(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount==="function"&&Xp(e,e.return,n),Bn(e);break;case 27:La(e.stateNode);case 26:case 5:ve(e,e.return),Bn(e);break;case 22:e.memoizedState===null&&Bn(e);break;case 30:Bn(e);break;default:Bn(e)}t=t.sibling}}function Te(t,e,n){n=n&&(e.subtreeFlags&8772)!==0;for(e=e.child;e!==null;){var l=e.alternate,a=t,i=e,o=i.flags;switch(i.tag){case 0:case 11:case 15:Te(a,i,n),si(4,i);break;case 1:if(Te(a,i,n),l=i,a=l.stateNode,typeof a.componentDidMount==="function")try{a.componentDidMount()}catch(s){K(l,l.return,s)}if(l=i,a=l.updateQueue,a!==null){var r=l.stateNode;try{var u=a.shared.hiddenCallbacks;if(u!==null)for(a.shared.hiddenCallbacks=null,a=0;a<u.length;a++)Fh(u[a],r)}catch(s){K(l,l.return,s)}}n&&o&64&&Kp(i),Ba(i,i.return);break;case 27:kp(i);case 26:case 5:Te(a,i,n),n&&l===null&&o&4&&Qp(i),Ba(i,i.return);break;case 12:Te(a,i,n);break;case 31:Te(a,i,n),n&&o&4&&Fp(a,i);break;case 13:Te(a,i,n),n&&o&4&&Ip(a,i);break;case 22:i.memoizedState===null&&Te(a,i,n),Ba(i,i.return);break;case 30:break;default:Te(a,i,n)}e=e.sibling}}function ac(t,e){var n=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==n&&(t!=null&&t.refCount++,n!=null&&ri(n))}function ic(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&ri(t))}function ae(t,e,n,l){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)em(t,e,n,l),e=e.sibling}function em(t,e,n,l){var a=e.flags;switch(e.tag){case 0:case 11:case 15:ae(t,e,n,l),a&2048&&si(9,e);break;case 1:ae(t,e,n,l);break;case 3:ae(t,e,n,l),a&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&ri(t)));break;case 12:if(a&2048){ae(t,e,n,l),t=e.stateNode;try{var i=e.memoizedProps,o=i.id,r=i.onPostCommit;typeof r==="function"&&r(o,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(u){K(e,e.return,u)}}else ae(t,e,n,l);break;case 31:ae(t,e,n,l);break;case 13:ae(t,e,n,l);break;case 23:break;case 22:i=e.stateNode,o=e.alternate,e.memoizedState!==null?i._visibility&2?ae(t,e,n,l):qa(t,e):i._visibility&2?ae(t,e,n,l):(i._visibility|=2,cl(t,e,n,l,(e.subtreeFlags&10256)!==0||!1)),a&2048&&ac(o,e);break;case 24:ae(t,e,n,l),a&2048&&ic(e.alternate,e);break;default:ae(t,e,n,l)}}function cl(t,e,n,l,a){a=a&&((e.subtreeFlags&10256)!==0||!1);for(e=e.child;e!==null;){var i=t,o=e,r=n,u=l,s=o.flags;switch(o.tag){case 0:case 11:case 15:cl(i,o,r,u,a),si(8,o);break;case 23:break;case 22:var h=o.stateNode;o.memoizedState!==null?h._visibility&2?cl(i,o,r,u,a):qa(i,o):(h._visibility|=2,cl(i,o,r,u,a)),a&&s&2048&&ac(o.alternate,o);break;case 24:cl(i,o,r,u,a),a&&s&2048&&ic(o.alternate,o);break;default:cl(i,o,r,u,a)}e=e.sibling}}function qa(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var n=t,l=e,a=l.flags;switch(l.tag){case 22:qa(n,l),a&2048&&ac(l.alternate,l);break;case 24:qa(n,l),a&2048&&ic(l.alternate,l);break;default:qa(n,l)}e=e.sibling}}function sl(t,e,n){if(t.subtreeFlags&xa)for(t=t.child;t!==null;)nm(t,e,n),t=t.sibling}function nm(t,e,n){switch(t.tag){case 26:sl(t,e,n),t.flags&xa&&t.memoizedState!==null&&J_(n,ie,t.memoizedState,t.memoizedProps);break;case 5:sl(t,e,n);break;case 3:case 4:var l=ie;ie=wo(t.stateNode.containerInfo),sl(t,e,n),ie=l;break;case 22:t.memoizedState===null&&(l=t.alternate,l!==null&&l.memoizedState!==null?(l=xa,xa=16777216,sl(t,e,n),xa=l):sl(t,e,n));break;default:sl(t,e,n)}}function lm(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function ga(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var l=e[n];ft=l,im(l,t)}lm(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)am(t),t=t.sibling}function am(t){switch(t.tag){case 0:case 11:case 15:ga(t),t.flags&2048&&Sn(9,t,t.return);break;case 3:ga(t);break;case 12:ga(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,to(t)):ga(t);break;default:ga(t)}}function to(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var n=0;n<e.length;n++){var l=e[n];ft=l,im(l,t)}lm(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:Sn(8,e,e.return),to(e);break;case 22:n=e.stateNode,n._visibility&2&&(n._visibility&=-3,to(e));break;default:to(e)}t=t.sibling}}function im(t,e){for(;ft!==null;){var n=ft;switch(n.tag){case 0:case 11:case 15:Sn(8,n,e);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:ri(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,ft=l;else t:for(n=t;ft!==null;){l=ft;var{sibling:a,return:i}=l;if($p(l),l===n){ft=null;break t}if(a!==null){a.return=i,ft=a;break t}ft=i}}}function qt(){return(L&2)!==0&&q!==0?q&-q:T.T!==null?sc():vh()}function um(){if(Mt===0)if((q&536870912)===0||j){var t=Ri;Ri<<=1,(Ri&3932160)===0&&(Ri=262144),Mt=t}else Mt=536870912;return t=Ht.current,t!==null&&(t.flags|=32),Mt}function Dt(t,e,n){if(t===Z&&(Y===2||Y===9)||t.cancelPendingCommit!==null)Ll(t,0),un(t,q,Mt,!1);if(ai(t,n),(L&2)===0||t!==Z)t===Z&&((L&2)===0&&(Gn|=n),nt===4&&un(t,q,Mt,!1)),be(t)}function sm(t,e,n){if((L&6)!==0)throw Error(_(327));var l=!n&&(e&127)===0&&(e&t.expiredLanes)===0||li(t,e),a=l?m_(t,e):gu(t,e,!0),i=l;do{if(a===0){kl&&!l&&un(t,e,0,!1);break}else{if(n=t.current.alternate,i&&!h_(n)){a=gu(t,e,!1),i=!1;continue}if(a===2){if(i=e,t.errorRecoveryDisabledLanes&i)var o=0;else o=t.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){e=o;t:{var r=t;a=ja;var u=r.current.memoizedState.isDehydrated;if(u&&(Ll(r,o).flags|=256),o=gu(r,o,!1),o!==2){if(oc&&!u){r.errorRecoveryDisabledLanes|=i,Gn|=i,a=4;break t}i=At,At=a,i!==null&&(At===null?At=i:At.push.apply(At,i))}a=o}if(i=!1,a!==2)continue}}if(a===1){Ll(t,0),un(t,e,0,!0);break}t:{switch(l=t,i=a,i){case 0:case 1:throw Error(_(345));case 4:if((e&4194048)!==e)break;case 6:un(l,e,Mt,!rn);break t;case 2:At=null;break;case 3:case 5:break;default:throw Error(_(329))}if((e&62914560)===e&&(a=ko+300-Ut(),10<a)){if(un(l,e,Mt,!rn),Bo(l,0,!0)!==0)break t;Be=e,l.timeoutHandle=zm(zd.bind(null,l,n,At,No,as,e,Mt,Gn,jl,rn,i,"Throttled",-0,0),a);break t}zd(l,n,At,No,as,e,Mt,Gn,jl,rn,i,null,-0,0)}}break}while(1);be(t)}function zd(t,e,n,l,a,i,o,r,u,s,h,g,d,v){if(t.timeoutHandle=-1,g=e.subtreeFlags,g&8192||(g&16785408)===16785408){g={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ce},nm(e,i,g);var E=(i&62914560)===i?ko-Ut():(i&4194048)===i?om-Ut():0;if(E=$_(g,E),E!==null){Be=i,t.cancelPendingCommit=E(Rd.bind(null,t,e,i,n,l,a,o,r,u,h,g,null,d,v)),un(t,i,o,!s);return}}Rd(t,e,i,n,l,a,o,r,u)}function h_(t){for(var e=t;;){var n=e.tag;if((n===0||n===11||n===15)&&e.flags&16384&&(n=e.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var a=n[l],i=a.getSnapshot;a=a.value;try{if(!jt(i(),a))return!1}catch(o){return!1}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function un(t,e,n,l){e&=~rc,e&=~Gn,t.suspendedLanes|=e,t.pingedLanes&=~e,l&&(t.warmLanes|=e),l=t.expirationTimes;for(var a=e;0<a;){var i=31-Bt(a),o=1<<i;l[i]=-1,a&=~o}n!==0&&hh(t,n,e)}function Jo(){return(L&6)===0?(ci(0,!1),!1):!0}function uc(){if(B!==null){if(Y===0)var t=B.return;else t=B,Me=Fn=null,ks(t),zl=null,ka=0,t=B;for(;t!==null;)Yp(t.alternate,t),t=t.return;B=null}}function Ll(t,e){var n=t.timeoutHandle;n!==-1&&(t.timeoutHandle=-1,R_(n)),n=t.cancelPendingCommit,n!==null&&(t.cancelPendingCommit=null,n()),Be=0,uc(),Z=t,B=n=Ue(t.current,null),q=e,Y=0,wt=null,rn=!1,kl=li(t,e),oc=!1,jl=Mt=rc=Gn=En=nt=0,At=ja=null,as=!1,(e&8)!==0&&(e|=e&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=e;0<l;){var a=31-Bt(l),i=1<<a;e|=t[a],l&=~i}return Ge=e,Lo(),n}function cm(t,e){C=null,T.H=$a,e===Zl||e===Yo?(e=rd(),Y=3):e===Ls?(e=rd(),Y=4):Y=e===nc?8:e!==null&&typeof e==="object"&&typeof e.then==="function"?6:1,wt=e,B===null&&(nt=1,_o(t,$t(e,t.current)))}function fm(){var t=Ht.current;return t===null?!0:(q&4194048)===q?Ft===null?!0:!1:(q&62914560)===q||(q&536870912)!==0?t===Ft:!1}function dm(){var t=T.H;return T.H=$a,t===null?$a:t}function hm(){var t=T.A;return T.A=f_,t}function xo(){nt=4,rn||(q&4194048)!==q&&Ht.current!==null||(kl=!0),(En&134217727)===0&&(Gn&134217727)===0||Z===null||un(Z,q,Mt,!1)}function gu(t,e,n){var l=L;L|=2;var a=dm(),i=hm();if(Z!==t||q!==e)No=null,Ll(t,e);e=!1;var o=nt;t:do try{if(Y!==0&&B!==null){var r=B,u=wt;switch(Y){case 8:uc(),o=6;break t;case 3:case 2:case 9:case 6:Ht.current===null&&(e=!0);var s=Y;if(Y=0,wt=null,Nl(t,r,u,s),n&&kl){o=0;break t}break;default:s=Y,Y=0,wt=null,Nl(t,r,u,s)}}p_(),o=nt;break}catch(h){cm(t,h)}while(1);return e&&t.shellSuspendCounter++,Me=Fn=null,L=l,T.H=a,T.A=i,B===null&&(Z=null,q=0,Lo()),o}function p_(){for(;B!==null;)pm(B)}function m_(t,e){var n=L;L|=2;var l=dm(),a=hm();Z!==t||q!==e?(No=null,Oo=Ut()+500,Ll(t,e)):kl=li(t,e);t:do try{if(Y!==0&&B!==null){e=B;var i=wt;e:switch(Y){case 1:Y=0,wt=null,Nl(t,e,i,1);break;case 2:case 9:if(od(i)){Y=0,wt=null,wd(e);break}e=function(){Y!==2&&Y!==9||Z!==t||(Y=7),be(t)},i.then(e,e);break t;case 3:Y=7;break t;case 4:Y=5;break t;case 7:od(i)?(Y=0,wt=null,wd(e)):(Y=0,wt=null,Nl(t,e,i,7));break;case 5:var o=null;switch(B.tag){case 26:o=B.memoizedState;case 5:case 27:var r=B;if(o?Um(o):r.stateNode.complete){Y=0,wt=null;var u=r.sibling;if(u!==null)B=u;else{var s=r.return;s!==null?(B=s,$o(s)):B=null}break e}}Y=0,wt=null,Nl(t,e,i,5);break;case 6:Y=0,wt=null,Nl(t,e,i,6);break;case 8:uc(),nt=6;break t;default:throw Error(_(462))}}v_();break}catch(h){cm(t,h)}while(1);if(Me=Fn=null,T.H=l,T.A=a,L=n,B!==null)return 0;return Z=null,q=0,Lo(),nt}function v_(){for(;B!==null&&!Hb();)pm(B)}function pm(t){var e=Gp(t.alternate,t,Ge);t.memoizedProps=t.pendingProps,e===null?$o(t):B=e}function wd(t){var e=t,n=e.alternate;switch(e.tag){case 15:case 0:e=Od(n,e,e.pendingProps,e.type,void 0,q);break;case 11:e=Od(n,e,e.pendingProps,e.type.render,e.ref,q);break;case 5:ks(e);default:Yp(n,e),e=B=Yh(e,Ge),e=Gp(n,e,Ge)}t.memoizedProps=t.pendingProps,e===null?$o(t):B=e}function Nl(t,e,n,l){Me=Fn=null,ks(e),zl=null,ka=0;var a=e.return;try{if(a_(t,a,e,n,q)){nt=1,_o(t,$t(n,t.current)),B=null;return}}catch(i){if(a!==null)throw B=a,i;nt=1,_o(t,$t(n,t.current)),B=null;return}if(e.flags&32768){if(j||l===1)t=!0;else if(kl||(q&536870912)!==0)t=!1;else if(rn=t=!0,l===2||l===9||l===3||l===6)l=Ht.current,l!==null&&l.tag===13&&(l.flags|=16384);mm(e,t)}else $o(e)}function $o(t){var e=t;do{if((e.flags&32768)!==0){mm(e,rn);return}t=e.return;var n=r_(e.alternate,e,Ge);if(n!==null){B=n;return}if(e=e.sibling,e!==null){B=e;return}B=e=t}while(e!==null);nt===0&&(nt=5)}function mm(t,e){do{var n=u_(t.alternate,t);if(n!==null){n.flags&=32767,B=n;return}if(n=t.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!e&&(t=t.sibling,t!==null)){B=t;return}B=t=n}while(t!==null);nt=6,B=null}function Rd(t,e,n,l,a,i,o,r,u){t.cancelPendingCommit=null;do Wo();while(st!==0);if((L&6)!==0)throw Error(_(327));if(e!==null){if(e===t.current)throw Error(_(177));if(i=e.lanes|e.childLanes,i|=Ms,$b(t,n,i,o,r,u),t===Z&&(B=Z=null,q=0),Hl=e,mn=t,Be=n,is=i,os=a,rm=l,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,__(uo,function(){return _m(),null})):(t.callbackNode=null,t.callbackPriority=0),l=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||l){l=T.T,T.T=null,a=G.p,G.p=2,o=L,L|=4;try{s_(t,e,n)}finally{L=o,G.p=a,T.T=l}}st=1,vm(),gm(),ym()}}function vm(){if(st===1){st=0;var t=mn,e=Hl,n=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||n){n=T.T,T.T=null;var l=G.p;G.p=2;var a=L;L|=4;try{Pp(e,t);var i=hs,o=Uh(t.containerInfo),r=i.focusedElem,u=i.selectionRange;if(o!==r&&r&&r.ownerDocument&&Mh(r.ownerDocument.documentElement,r)){if(u!==null&&Cs(r)){var{start:s,end:h}=u;if(h===void 0&&(h=s),"selectionStart"in r)r.selectionStart=s,r.selectionEnd=Math.min(h,r.value.length);else{var g=r.ownerDocument||document,d=g&&g.defaultView||window;if(d.getSelection){var v=d.getSelection(),E=r.textContent.length,A=Math.min(u.start,E),z=u.end===void 0?A:Math.min(u.end,E);!v.extend&&A>z&&(o=z,z=A,A=o);var f=Pf(r,A),c=Pf(r,z);if(f&&c&&(v.rangeCount!==1||v.anchorNode!==f.node||v.anchorOffset!==f.offset||v.focusNode!==c.node||v.focusOffset!==c.offset)){var m=g.createRange();m.setStart(f.node,f.offset),v.removeAllRanges(),A>z?(v.addRange(m),v.extend(c.node,c.offset)):(m.setEnd(c.node,c.offset),v.addRange(m))}}}}g=[];for(v=r;v=v.parentNode;)v.nodeType===1&&g.push({element:v,left:v.scrollLeft,top:v.scrollTop});typeof r.focus==="function"&&r.focus();for(r=0;r<g.length;r++){var b=g[r];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}Mo=!!ds,hs=ds=null}finally{L=a,G.p=l,T.T=n}}t.current=e,st=2}}function gm(){if(st===2){st=0;var t=mn,e=Hl,n=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||n){n=T.T,T.T=null;var l=G.p;G.p=2;var a=L;L|=4;try{Jp(t,e.alternate,e)}finally{L=a,G.p=l,T.T=n}}st=3}}function ym(){if(st===4||st===3){st=0,Lb();var t=mn,e=Hl,n=Be,l=rm;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?st=5:(st=0,Hl=mn=null,bm(t,t.pendingLanes));var a=t.pendingLanes;if(a===0&&(pn=null),xs(n),e=e.stateNode,Vt&&typeof Vt.onCommitFiberRoot==="function")try{Vt.onCommitFiberRoot(ni,e,void 0,(e.current.flags&128)===128)}catch(u){}if(l!==null){e=T.T,a=G.p,G.p=2,T.T=null;try{for(var i=t.onRecoverableError,o=0;o<l.length;o++){var r=l[o];i(r.value,{componentStack:r.stack})}}finally{T.T=e,G.p=a}}(Be&3)!==0&&Wo(),be(t),a=t.pendingLanes,(n&261930)!==0&&(a&42)!==0?t===rs?Ha++:(Ha=0,rs=t):Ha=0,ci(0,!1)}}function bm(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,ri(e)))}function Wo(){return vm(),gm(),ym(),_m()}function _m(){if(st!==5)return!1;var t=mn,e=is;is=0;var n=xs(Be),l=T.T,a=G.p;try{G.p=32>n?32:n,T.T=null,n=os,os=null;var i=mn,o=Be;if(st=0,Hl=mn=null,Be=0,(L&6)!==0)throw Error(_(331));var r=L;if(L|=4,am(i.current),em(i,i.current,o,n),L=r,ci(0,!1),Vt&&typeof Vt.onPostCommitFiberRoot==="function")try{Vt.onPostCommitFiberRoot(ni,i)}catch(u){}return!0}finally{G.p=a,T.T=l,bm(t,e)}}function Cd(t,e,n){e=$t(n,e),e=ts(t.stateNode,e,2),t=hn(t,e,2),t!==null&&(ai(t,2),be(t))}function K(t,e,n){if(t.tag===3)Cd(t,t,n);else for(;e!==null;){if(e.tag===3){Cd(e,t,n);break}else if(e.tag===1){var l=e.stateNode;if(typeof e.type.getDerivedStateFromError==="function"||typeof l.componentDidCatch==="function"&&(pn===null||!pn.has(l))){t=$t(n,t),n=Vp(2),l=hn(e,n,2),l!==null&&(Bp(n,l,e,t),ai(l,2),be(l));break}}e=e.return}}function yu(t,e,n){var l=t.pingCache;if(l===null){l=t.pingCache=new d_;var a=new Set;l.set(e,a)}else a=l.get(e),a===void 0&&(a=new Set,l.set(e,a));a.has(n)||(oc=!0,a.add(n),t=g_.bind(null,t,e,n),e.then(t,t))}function g_(t,e,n){var l=t.pingCache;l!==null&&l.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,Z===t&&(q&n)===n&&(nt===4||nt===3&&(q&62914560)===q&&300>Ut()-ko?(L&2)===0&&Ll(t,0):rc|=n,jl===q&&(jl=0)),be(t)}function Sm(t,e){e===0&&(e=dh()),t=Wn(t,e),t!==null&&(ai(t,e),be(t))}function y_(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),Sm(t,n)}function b_(t,e){var n=0;switch(t.tag){case 31:case 13:var{stateNode:l,memoizedState:a}=t;a!==null&&(n=a.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(_(314))}l!==null&&l.delete(e),Sm(t,n)}function __(t,e){return Os(t,e)}function be(t){t!==fl&&t.next===null&&(fl===null?Ao=fl=t:fl=fl.next=t),Do=!0,us||(us=!0,E_())}function ci(t,e){if(!bu&&Do){bu=!0;do{var n=!1;for(var l=Ao;l!==null;){if(!e)if(t!==0){var a=l.pendingLanes;if(a===0)var i=0;else{var{suspendedLanes:o,pingedLanes:r}=l;i=(1<<31-Bt(42|t)+1)-1,i&=a&~(o&~r),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,Md(l,i))}else i=q,i=Bo(l,l===Z?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||li(l,i)||(n=!0,Md(l,i));l=l.next}}while(n);bu=!1}}function S_(){Em()}function Em(){Do=us=!1;var t=0;sn!==0&&w_()&&(t=sn);for(var e=Ut(),n=null,l=Ao;l!==null;){var a=l.next,i=Om(l,e);if(i===0)l.next=null,n===null?Ao=a:n.next=a,a===null&&(fl=n);else if(n=l,t!==0||(i&3)!==0)Do=!0;l=a}st!==0&&st!==5||ci(t,!1),sn!==0&&(sn=0)}function Om(t,e){for(var{suspendedLanes:n,pingedLanes:l,expirationTimes:a}=t,i=t.pendingLanes&-62914561;0<i;){var o=31-Bt(i),r=1<<o,u=a[o];if(u===-1){if((r&n)===0||(r&l)!==0)a[o]=Jb(r,e)}else u<=e&&(t.expiredLanes|=r);i&=~r}if(e=Z,n=q,n=Bo(t,t===e?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,n===0||t===e&&(Y===2||Y===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&$r(l),t.callbackNode=null,t.callbackPriority=0;if((n&3)===0||li(t,n)){if(e=n&-n,e===t.callbackPriority)return e;switch(l!==null&&$r(l),xs(n)){case 2:case 8:n=ch;break;case 32:n=uo;break;case 268435456:n=fh;break;default:n=uo}return l=Nm.bind(null,t),n=Os(n,l),t.callbackPriority=e,t.callbackNode=n,e}return l!==null&&l!==null&&$r(l),t.callbackPriority=2,t.callbackNode=null,2}function Nm(t,e){if(st!==0&&st!==5)return t.callbackNode=null,t.callbackPriority=0,null;var n=t.callbackNode;if(Wo()&&t.callbackNode!==n)return null;var l=q;if(l=Bo(t,t===Z?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0)return null;return sm(t,l,e),Om(t,Ut()),t.callbackNode!=null&&t.callbackNode===n?Nm.bind(null,t):null}function Md(t,e){if(Wo())return null;sm(t,e,!0)}function E_(){C_(function(){(L&6)!==0?Os(sh,S_):Em()})}function sc(){if(sn===0){var t=Vl;t===0&&(t=wi,wi<<=1,(wi&261888)===0&&(wi=256)),sn=t}return sn}function Ud(t){return t==null||typeof t==="symbol"||typeof t==="boolean"?null:typeof t==="function"?t:Xi(""+t)}function Vd(t,e){var n=e.ownerDocument.createElement("input");return n.name=e.name,n.value=e.value,t.id&&n.setAttribute("form",t.id),e.parentNode.insertBefore(n,e),t=new FormData(t),n.parentNode.removeChild(n),t}function O_(t,e,n,l,a){if(e==="submit"&&n&&n.stateNode===a){var i=Ud((a[Tt]||null).action),o=l.submitter;o&&(e=(e=o[Tt]||null)?Ud(e.formAction):o.getAttribute("formAction"),e!==null&&(i=e,o=null));var r=new qo("action","action",null,l,a);t.push({event:r,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(sn!==0){var u=o?Vd(a,o):new FormData(a);Iu(n,{pending:!0,data:u,method:a.method,action:i},null,u)}}else typeof i==="function"&&(r.preventDefault(),u=o?Vd(a,o):new FormData(a),Iu(n,{pending:!0,data:u,method:a.method,action:i},i,u))},currentTarget:a}]})}}function xm(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var l=t[n],a=l.event;l=l.listeners;t:{var i=void 0;if(e)for(var o=l.length-1;0<=o;o--){var r=l[o],u=r.instance,s=r.currentTarget;if(r=r.listener,u!==i&&a.isPropagationStopped())break t;i=r,a.currentTarget=s;try{i(a)}catch(h){co(h)}a.currentTarget=null,i=u}else for(o=0;o<l.length;o++){if(r=l[o],u=r.instance,s=r.currentTarget,r=r.listener,u!==i&&a.isPropagationStopped())break t;i=r,a.currentTarget=s;try{i(a)}catch(h){co(h)}a.currentTarget=null,i=u}}}}function V(t,e){var n=e[Cu];n===void 0&&(n=e[Cu]=new Set);var l=t+"__bubble";n.has(l)||(Am(e,t,2,!1),n.add(l))}function _u(t,e,n){var l=0;e&&(l|=4),Am(n,t,l,e)}function cc(t){if(!t[Li]){t[Li]=!0,gh.forEach(function(n){n!=="selectionchange"&&(N_.has(n)||_u(n,!1,t),_u(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Li]||(e[Li]=!0,_u("selectionchange",!1,e))}}function Am(t,e,n,l){switch(Hm(e)){case 2:var a=I_;break;case 8:a=P_;break;default:a=pc}n=a.bind(null,e,n,t),a=void 0,!qu||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(a=!0),l?a!==void 0?t.addEventListener(e,n,{capture:!0,passive:a}):t.addEventListener(e,n,!0):a!==void 0?t.addEventListener(e,n,{passive:a}):t.addEventListener(e,n,!1)}function Su(t,e,n,l,a){var i=l;if((e&1)===0&&(e&2)===0&&l!==null)t:for(;;){if(l===null)return;var o=l.tag;if(o===3||o===4){var r=l.stateNode.containerInfo;if(r===a)break;if(o===4)for(o=l.return;o!==null;){var u=o.tag;if((u===3||u===4)&&o.stateNode.containerInfo===a)return;o=o.return}for(;r!==null;){if(o=ml(r),o===null)return;if(u=o.tag,u===5||u===6||u===26||u===27){l=i=o;continue t}r=r.parentNode}}l=l.return}xh(function(){var s=i,h=Ts(n),g=[];t:{var d=Lh.get(t);if(d!==void 0){var v=qo,E=t;switch(t){case"keypress":if(Zi(n)===0)break t;case"keydown":case"keyup":v=b0;break;case"focusin":E="focus",v=tu;break;case"focusout":E="blur",v=tu;break;case"beforeblur":case"afterblur":v=tu;break;case"click":if(n.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":v=Xf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=r0;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=E0;break;case Bh:case qh:case jh:v=c0;break;case Hh:v=N0;break;case"scroll":case"scrollend":v=i0;break;case"wheel":v=A0;break;case"copy":case"cut":case"paste":v=d0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=Zf;break;case"toggle":case"beforetoggle":v=T0}var A=(e&4)!==0,z=!A&&(t==="scroll"||t==="scrollend"),f=A?d!==null?d+"Capture":null:d;A=[];for(var c=s,m;c!==null;){var b=c;if(m=b.stateNode,b=b.tag,b!==5&&b!==26&&b!==27||m===null||f===null||(b=Ya(c,f),b!=null&&A.push(Fa(c,b,m))),z)break;c=c.return}0<A.length&&(d=new v(d,E,null,n,h),g.push({event:d,listeners:A}))}}if((e&7)===0){t:{if(d=t==="mouseover"||t==="pointerover",v=t==="mouseout"||t==="pointerout",d&&n!==Bu&&(E=n.relatedTarget||n.fromElement)&&(ml(E)||E[Kl]))break t;if(v||d){if(d=h.window===h?h:(d=h.ownerDocument)?d.defaultView||d.parentWindow:window,v){if(E=n.relatedTarget||n.toElement,v=s,E=E?ml(E):null,E!==null&&(z=ei(E),A=E.tag,E!==z||A!==5&&A!==27&&A!==6))E=null}else v=null,E=s;if(v!==E){if(A=Xf,b="onMouseLeave",f="onMouseEnter",c="mouse",t==="pointerout"||t==="pointerover")A=Zf,b="onPointerLeave",f="onPointerEnter",c="pointer";if(z=v==null?d:Sa(v),m=E==null?d:Sa(E),d=new A(b,c+"leave",v,n,h),d.target=z,d.relatedTarget=m,b=null,ml(h)===s&&(A=new A(f,c+"enter",E,n,h),A.target=m,A.relatedTarget=z,b=A),z=b,v&&E)e:{A=x_,f=v,c=E,m=0;for(b=f;b;b=A(b))m++;b=0;for(var O=c;O;O=A(O))b++;for(;0<m-b;)f=A(f),m--;for(;0<b-m;)c=A(c),b--;for(;m--;){if(f===c||c!==null&&f===c.alternate){A=f;break e}f=A(f),c=A(c)}A=null}else A=null;v!==null&&Bd(g,d,v,A,!1),E!==null&&z!==null&&Bd(g,z,E,A,!0)}}}t:{if(d=s?Sa(s):window,v=d.nodeName&&d.nodeName.toLowerCase(),v==="select"||v==="input"&&d.type==="file")var U=Wf;else if($f(d))if(Rh)U=j0;else{U=B0;var N=V0}else v=d.nodeName,!v||v.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?s&&Ds(s.elementType)&&(U=Wf):U=q0;if(U&&(U=U(t,s))){wh(g,U,n,h);break t}N&&N(t,d,s),t==="focusout"&&s&&d.type==="number"&&s.memoizedProps.value!=null&&Vu(d,"number",d.value)}switch(N=s?Sa(s):window,t){case"focusin":if($f(N)||N.contentEditable==="true")yl=N,ju=s,wa=null;break;case"focusout":wa=ju=yl=null;break;case"mousedown":Hu=!0;break;case"contextmenu":case"mouseup":case"dragend":Hu=!1,td(g,n,h);break;case"selectionchange":if(L0)break;case"keydown":case"keyup":td(g,n,h)}var w;if(Rs)t:{switch(t){case"compositionstart":var y="onCompositionStart";break t;case"compositionend":y="onCompositionEnd";break t;case"compositionupdate":y="onCompositionUpdate";break t}y=void 0}else gl?Th(t,n)&&(y="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(y="onCompositionStart");if(y&&(Dh&&n.locale!=="ko"&&(gl||y!=="onCompositionStart"?y==="onCompositionEnd"&&gl&&(w=Ah()):(on=h,zs=("value"in on)?on.value:on.textContent,gl=!0)),N=To(s,y),0<N.length&&(y=new Qf(y,t,null,n,h),g.push({event:y,listeners:N}),w?y.data=w:(w=zh(n),w!==null&&(y.data=w)))),w=w0?R0(t,n):C0(t,n))y=To(s,"onBeforeInput"),0<y.length&&(N=new Qf("onBeforeInput","beforeinput",null,n,h),g.push({event:N,listeners:y}),N.data=w);O_(g,t,s,n,h)}xm(g,e)})}function Fa(t,e,n){return{instance:t,listener:e,currentTarget:n}}function To(t,e){for(var n=e+"Capture",l=[];t!==null;){var a=t,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=Ya(t,n),a!=null&&l.unshift(Fa(t,a,i)),a=Ya(t,e),a!=null&&l.push(Fa(t,a,i))),t.tag===3)return l;t=t.return}return[]}function x_(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t?t:null}function Bd(t,e,n,l,a){for(var i=e._reactName,o=[];n!==null&&n!==l;){var r=n,u=r.alternate,s=r.stateNode;if(r=r.tag,u!==null&&u===l)break;r!==5&&r!==26&&r!==27||s===null||(u=s,a?(s=Ya(n,i),s!=null&&o.unshift(Fa(n,s,u))):a||(s=Ya(n,i),s!=null&&o.push(Fa(n,s,u)))),n=n.return}o.length!==0&&t.push({event:e,listeners:o})}function qd(t){return(typeof t==="string"?t:""+t).replace(A_,`
9
- `).replace(D_,"")}function Dm(t,e){return e=qd(e),qd(t)===e?!0:!1}function X(t,e,n,l,a,i){switch(n){case"children":typeof l==="string"?e==="body"||e==="textarea"&&l===""||Ul(t,l):(typeof l==="number"||typeof l==="bigint")&&e!=="body"&&Ul(t,""+l);break;case"className":Mi(t,"class",l);break;case"tabIndex":Mi(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Mi(t,n,l);break;case"style":Nh(t,l,i);break;case"data":if(e!=="object"){Mi(t,"data",l);break}case"src":case"href":if(l===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(l==null||typeof l==="function"||typeof l==="symbol"||typeof l==="boolean"){t.removeAttribute(n);break}l=Xi(""+l),t.setAttribute(n,l);break;case"action":case"formAction":if(typeof l==="function"){t.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i==="function"&&(n==="formAction"?(e!=="input"&&X(t,e,"name",a.name,a,null),X(t,e,"formEncType",a.formEncType,a,null),X(t,e,"formMethod",a.formMethod,a,null),X(t,e,"formTarget",a.formTarget,a,null)):(X(t,e,"encType",a.encType,a,null),X(t,e,"method",a.method,a,null),X(t,e,"target",a.target,a,null)));if(l==null||typeof l==="symbol"||typeof l==="boolean"){t.removeAttribute(n);break}l=Xi(""+l),t.setAttribute(n,l);break;case"onClick":l!=null&&(t.onclick=Ce);break;case"onScroll":l!=null&&V("scroll",t);break;case"onScrollEnd":l!=null&&V("scrollend",t);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!=="object"||!("__html"in l))throw Error(_(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(_(60));t.innerHTML=n}}break;case"multiple":t.multiple=l&&typeof l!=="function"&&typeof l!=="symbol";break;case"muted":t.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"){t.removeAttribute("xlink:href");break}n=Xi(""+l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!=="function"&&typeof l!=="symbol"?t.setAttribute(n,""+l):t.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!=="function"&&typeof l!=="symbol"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":l===!0?t.setAttribute(n,""):l!==!1&&l!=null&&typeof l!=="function"&&typeof l!=="symbol"?t.setAttribute(n,l):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!=="function"&&typeof l!=="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(n,l):t.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l==="function"||typeof l==="symbol"||isNaN(l)?t.removeAttribute(n):t.setAttribute(n,l);break;case"popover":V("beforetoggle",t),V("toggle",t),Ki(t,"popover",l);break;case"xlinkActuate":Ne(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Ne(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Ne(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Ne(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Ne(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Ne(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Ne(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Ne(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Ne(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":Ki(t,"is",l);break;case"innerText":case"textContent":break;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=l0.get(n)||n,Ki(t,n,l)}}function fs(t,e,n,l,a,i){switch(n){case"style":Nh(t,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!=="object"||!("__html"in l))throw Error(_(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(_(60));t.innerHTML=n}}break;case"children":typeof l==="string"?Ul(t,l):(typeof l==="number"||typeof l==="bigint")&&Ul(t,""+l);break;case"onScroll":l!=null&&V("scroll",t);break;case"onScrollEnd":l!=null&&V("scrollend",t);break;case"onClick":l!=null&&(t.onclick=Ce);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!yh.hasOwnProperty(n))t:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),e=n.slice(2,a?n.length-7:void 0),i=t[Tt]||null,i=i!=null?i[n]:null,typeof i==="function"&&t.removeEventListener(e,i,a),typeof l==="function")){typeof i!=="function"&&i!==null&&(n in t?t[n]=null:t.hasAttribute(n)&&t.removeAttribute(n)),t.addEventListener(e,l,a);break t}n in t?t[n]=l:l===!0?t.setAttribute(n,""):Ki(t,n,l)}}}function yt(t,e,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":V("error",t),V("load",t);var l=!1,a=!1,i;for(i in n)if(n.hasOwnProperty(i)){var o=n[i];if(o!=null)switch(i){case"src":l=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(_(137,e));default:X(t,e,i,o,n,null)}}a&&X(t,e,"srcSet",n.srcSet,n,null),l&&X(t,e,"src",n.src,n,null);return;case"input":V("invalid",t);var r=i=o=a=null,u=null,s=null;for(l in n)if(n.hasOwnProperty(l)){var h=n[l];if(h!=null)switch(l){case"name":a=h;break;case"type":o=h;break;case"checked":u=h;break;case"defaultChecked":s=h;break;case"value":i=h;break;case"defaultValue":r=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(_(137,e));break;default:X(t,e,l,h,n,null)}}Sh(t,i,r,u,s,o,a,!1);return;case"select":V("invalid",t),l=o=i=null;for(a in n)if(n.hasOwnProperty(a)&&(r=n[a],r!=null))switch(a){case"value":i=r;break;case"defaultValue":o=r;break;case"multiple":l=r;default:X(t,e,a,r,n,null)}e=i,n=o,t.multiple=!!l,e!=null?Al(t,!!l,e,!1):n!=null&&Al(t,!!l,n,!0);return;case"textarea":V("invalid",t),i=a=l=null;for(o in n)if(n.hasOwnProperty(o)&&(r=n[o],r!=null))switch(o){case"value":l=r;break;case"defaultValue":a=r;break;case"children":i=r;break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(_(91));break;default:X(t,e,o,r,n,null)}Oh(t,l,a,i);return;case"option":for(u in n)if(n.hasOwnProperty(u)&&(l=n[u],l!=null))switch(u){case"selected":t.selected=l&&typeof l!=="function"&&typeof l!=="symbol";break;default:X(t,e,u,l,n,null)}return;case"dialog":V("beforetoggle",t),V("toggle",t),V("cancel",t),V("close",t);break;case"iframe":case"object":V("load",t);break;case"video":case"audio":for(l=0;l<Wa.length;l++)V(Wa[l],t);break;case"image":V("error",t),V("load",t);break;case"details":V("toggle",t);break;case"embed":case"source":case"link":V("error",t),V("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(s in n)if(n.hasOwnProperty(s)&&(l=n[s],l!=null))switch(s){case"children":case"dangerouslySetInnerHTML":throw Error(_(137,e));default:X(t,e,s,l,n,null)}return;default:if(Ds(e)){for(h in n)n.hasOwnProperty(h)&&(l=n[h],l!==void 0&&fs(t,e,h,l,n,void 0));return}}for(r in n)n.hasOwnProperty(r)&&(l=n[r],l!=null&&X(t,e,r,l,n,null))}function T_(t,e,n,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,o=null,r=null,u=null,s=null,h=null;for(v in n){var g=n[v];if(n.hasOwnProperty(v)&&g!=null)switch(v){case"checked":break;case"value":break;case"defaultValue":u=g;default:l.hasOwnProperty(v)||X(t,e,v,null,l,g)}}for(var d in l){var v=l[d];if(g=n[d],l.hasOwnProperty(d)&&(v!=null||g!=null))switch(d){case"type":i=v;break;case"name":a=v;break;case"checked":s=v;break;case"defaultChecked":h=v;break;case"value":o=v;break;case"defaultValue":r=v;break;case"children":case"dangerouslySetInnerHTML":if(v!=null)throw Error(_(137,e));break;default:v!==g&&X(t,e,d,v,l,g)}}Uu(t,o,r,u,s,h,i,a);return;case"select":v=o=r=d=null;for(i in n)if(u=n[i],n.hasOwnProperty(i)&&u!=null)switch(i){case"value":break;case"multiple":v=u;default:l.hasOwnProperty(i)||X(t,e,i,null,l,u)}for(a in l)if(i=l[a],u=n[a],l.hasOwnProperty(a)&&(i!=null||u!=null))switch(a){case"value":d=i;break;case"defaultValue":r=i;break;case"multiple":o=i;default:i!==u&&X(t,e,a,i,l,u)}e=r,n=o,l=v,d!=null?Al(t,!!n,d,!1):!!l!==!!n&&(e!=null?Al(t,!!n,e,!0):Al(t,!!n,n?[]:"",!1));return;case"textarea":v=d=null;for(r in n)if(a=n[r],n.hasOwnProperty(r)&&a!=null&&!l.hasOwnProperty(r))switch(r){case"value":break;case"children":break;default:X(t,e,r,null,l,a)}for(o in l)if(a=l[o],i=n[o],l.hasOwnProperty(o)&&(a!=null||i!=null))switch(o){case"value":d=a;break;case"defaultValue":v=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(_(91));break;default:a!==i&&X(t,e,o,a,l,i)}Eh(t,d,v);return;case"option":for(var E in n)if(d=n[E],n.hasOwnProperty(E)&&d!=null&&!l.hasOwnProperty(E))switch(E){case"selected":t.selected=!1;break;default:X(t,e,E,null,l,d)}for(u in l)if(d=l[u],v=n[u],l.hasOwnProperty(u)&&d!==v&&(d!=null||v!=null))switch(u){case"selected":t.selected=d&&typeof d!=="function"&&typeof d!=="symbol";break;default:X(t,e,u,d,l,v)}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 A in n)d=n[A],n.hasOwnProperty(A)&&d!=null&&!l.hasOwnProperty(A)&&X(t,e,A,null,l,d);for(s in l)if(d=l[s],v=n[s],l.hasOwnProperty(s)&&d!==v&&(d!=null||v!=null))switch(s){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(_(137,e));break;default:X(t,e,s,d,l,v)}return;default:if(Ds(e)){for(var z in n)d=n[z],n.hasOwnProperty(z)&&d!==void 0&&!l.hasOwnProperty(z)&&fs(t,e,z,void 0,l,d);for(h in l)d=l[h],v=n[h],!l.hasOwnProperty(h)||d===v||d===void 0&&v===void 0||fs(t,e,h,d,l,v);return}}for(var f in n)d=n[f],n.hasOwnProperty(f)&&d!=null&&!l.hasOwnProperty(f)&&X(t,e,f,null,l,d);for(g in l)d=l[g],v=n[g],!l.hasOwnProperty(g)||d===v||d==null&&v==null||X(t,e,g,d,l,v)}function jd(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function z_(){if(typeof performance.getEntriesByType==="function"){for(var t=0,e=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var a=n[l],i=a.transferSize,o=a.initiatorType,r=a.duration;if(i&&r&&jd(o)){o=0,r=a.responseEnd;for(l+=1;l<n.length;l++){var u=n[l],s=u.startTime;if(s>r)break;var{transferSize:h,initiatorType:g}=u;h&&jd(g)&&(u=u.responseEnd,o+=h*(u<r?1:(r-s)/(u-s)))}if(--l,e+=8*(i+o)/(a.duration/1000),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t==="number")?t:5}function zo(t){return t.nodeType===9?t:t.ownerDocument}function Hd(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Tm(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function ps(t,e){return t==="textarea"||t==="noscript"||typeof e.children==="string"||typeof e.children==="number"||typeof e.children==="bigint"||typeof e.dangerouslySetInnerHTML==="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}function w_(){var t=window.event;if(t&&t.type==="popstate"){if(t===Eu)return!1;return Eu=t,!0}return Eu=null,!1}function M_(t){setTimeout(function(){throw t})}function Nn(t){return t==="head"}function Gd(t,e){var n=e,l=0;do{var a=n.nextSibling;if(t.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(l===0){t.removeChild(a),Yl(e);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")La(t.ownerDocument.documentElement);else if(n==="head"){n=t.ownerDocument.head,La(n);for(var i=n.firstChild;i;){var{nextSibling:o,nodeName:r}=i;i[ii]||r==="SCRIPT"||r==="STYLE"||r==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=o}}else n==="body"&&La(t.ownerDocument.body);n=a}while(n);Yl(e)}function Yd(t,e){var n=t;t=0;do{var l=n.nextSibling;if(n.nodeType===1?e?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(e?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$")if(t===0)break;else t--;else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||t++;n=l}while(n)}function ms(t){var e=t.firstChild;e&&e.nodeType===10&&(e=e.nextSibling);for(;e;){var n=e;switch(e=e.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":ms(n),As(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}t.removeChild(n)}}function U_(t,e,n,l){for(;t.nodeType===1;){var a=n;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(!l)if(e==="input"&&t.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&t.getAttribute("name")===i)return t}else return t;else if(!t[ii])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(i=t.getAttribute("rel"),i==="stylesheet"&&t.hasAttribute("data-precedence"))break;else if(i!==a.rel||t.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||t.getAttribute("title")!==(a.title==null?null:a.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(i=t.getAttribute("src"),(i!==(a.src==null?null:a.src)||t.getAttribute("type")!==(a.type==null?null:a.type)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}if(t=It(t.nextSibling),t===null)break}return null}function V_(t,e,n){if(e==="")return null;for(;t.nodeType!==3;){if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n)return null;if(t=It(t.nextSibling),t===null)return null}return t}function wm(t,e){for(;t.nodeType!==8;){if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e)return null;if(t=It(t.nextSibling),t===null)return null}return t}function vs(t){return t.data==="$?"||t.data==="$~"}function gs(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function B_(t,e){var n=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||n.readyState!=="loading")e();else{var l=function(){e(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function It(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}function Kd(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"||n==="/&"){if(e===0)return It(t.nextSibling);e--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||e++}t=t.nextSibling}return null}function Xd(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(e===0)return t;e--}else n!=="/$"&&n!=="/&"||e++}t=t.previousSibling}return null}function Rm(t,e,n){switch(e=zo(n),t){case"html":if(t=e.documentElement,!t)throw Error(_(452));return t;case"head":if(t=e.head,!t)throw Error(_(453));return t;case"body":if(t=e.body,!t)throw Error(_(454));return t;default:throw Error(_(451))}}function La(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);As(t)}function wo(t){return typeof t.getRootNode==="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}function q_(){var t=Ye.f(),e=Jo();return t||e}function j_(t){var e=Xl(t);e!==null&&e.tag===5&&e.type==="form"?Np(e):Ye.r(t)}function Cm(t,e,n){var l=Jl;if(l&&typeof e==="string"&&e){var a=Jt(e);a='link[rel="'+t+'"][href="'+a+'"]',typeof n==="string"&&(a+='[crossorigin="'+n+'"]'),Qd.has(a)||(Qd.add(a),t={rel:t,crossOrigin:n,href:e},l.querySelector(a)===null&&(e=l.createElement("link"),yt(e,"link",t),dt(e),l.head.appendChild(e)))}}function H_(t){Ye.D(t),Cm("dns-prefetch",t,null)}function L_(t,e){Ye.C(t,e),Cm("preconnect",t,e)}function G_(t,e,n){Ye.L(t,e,n);var l=Jl;if(l&&t&&e){var a='link[rel="preload"][as="'+Jt(e)+'"]';e==="image"?n&&n.imageSrcSet?(a+='[imagesrcset="'+Jt(n.imageSrcSet)+'"]',typeof n.imageSizes==="string"&&(a+='[imagesizes="'+Jt(n.imageSizes)+'"]')):a+='[href="'+Jt(t)+'"]':a+='[href="'+Jt(t)+'"]';var i=a;switch(e){case"style":i=Gl(t);break;case"script":i=$l(t)}Pt.has(i)||(t=P({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),Pt.set(i,t),l.querySelector(a)!==null||e==="style"&&l.querySelector(fi(i))||e==="script"&&l.querySelector(di(i))||(e=l.createElement("link"),yt(e,"link",t),dt(e),l.head.appendChild(e)))}}function Y_(t,e){Ye.m(t,e);var n=Jl;if(n&&t){var l=e&&typeof e.as==="string"?e.as:"script",a='link[rel="modulepreload"][as="'+Jt(l)+'"][href="'+Jt(t)+'"]',i=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=$l(t)}if(!Pt.has(i)&&(t=P({rel:"modulepreload",href:t},e),Pt.set(i,t),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(di(i)))return}l=n.createElement("link"),yt(l,"link",t),dt(l),n.head.appendChild(l)}}}function K_(t,e,n){Ye.S(t,e,n);var l=Jl;if(l&&t){var a=xl(l).hoistableStyles,i=Gl(t);e=e||"default";var o=a.get(i);if(!o){var r={loading:0,preload:null};if(o=l.querySelector(fi(i)))r.loading=5;else{t=P({rel:"stylesheet",href:t,"data-precedence":e},n),(n=Pt.get(i))&&fc(t,n);var u=o=l.createElement("link");dt(u),yt(u,"link",t),u._p=new Promise(function(s,h){u.onload=s,u.onerror=h}),u.addEventListener("load",function(){r.loading|=1}),u.addEventListener("error",function(){r.loading|=2}),r.loading|=4,eo(o,e,l)}o={type:"stylesheet",instance:o,count:1,state:r},a.set(i,o)}}}function X_(t,e){Ye.X(t,e);var n=Jl;if(n&&t){var l=xl(n).hoistableScripts,a=$l(t),i=l.get(a);i||(i=n.querySelector(di(a)),i||(t=P({src:t,async:!0},e),(e=Pt.get(a))&&dc(t,e),i=n.createElement("script"),dt(i),yt(i,"link",t),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function Q_(t,e){Ye.M(t,e);var n=Jl;if(n&&t){var l=xl(n).hoistableScripts,a=$l(t),i=l.get(a);i||(i=n.querySelector(di(a)),i||(t=P({src:t,async:!0,type:"module"},e),(e=Pt.get(a))&&dc(t,e),i=n.createElement("script"),dt(i),yt(i,"link",t),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function Zd(t,e,n,l){var a=(a=cn.current)?wo(a):null;if(!a)throw Error(_(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence==="string"&&typeof n.href==="string"?(e=Gl(n.href),n=xl(a).hoistableStyles,l=n.get(e),l||(l={type:"style",instance:null,count:0,state:null},n.set(e,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href==="string"&&typeof n.precedence==="string"){t=Gl(n.href);var i=xl(a).hoistableStyles,o=i.get(t);if(o||(a=a.ownerDocument||a,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(t,o),(i=a.querySelector(fi(t)))&&!i._p&&(o.instance=i,o.state.loading=5),Pt.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Pt.set(t,n),i||Z_(a,t,n,o.state))),e&&l===null)throw Error(_(528,""));return o}if(e&&l!==null)throw Error(_(529,""));return null;case"script":return e=n.async,n=n.src,typeof n==="string"&&e&&typeof e!=="function"&&typeof e!=="symbol"?(e=$l(n),n=xl(a).hoistableScripts,l=n.get(e),l||(l={type:"script",instance:null,count:0,state:null},n.set(e,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(_(444,t))}}function Gl(t){return'href="'+Jt(t)+'"'}function fi(t){return'link[rel="stylesheet"]['+t+"]"}function Mm(t){return P({},t,{"data-precedence":t.precedence,precedence:null})}function Z_(t,e,n,l){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?l.loading=1:(e=t.createElement("link"),l.preload=e,e.addEventListener("load",function(){return l.loading|=1}),e.addEventListener("error",function(){return l.loading|=2}),yt(e,"link",n),dt(e),t.head.appendChild(e))}function $l(t){return'[src="'+Jt(t)+'"]'}function di(t){return"script[async]"+t}function kd(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var l=t.querySelector('style[data-href~="'+Jt(n.href)+'"]');if(l)return e.instance=l,dt(l),l;var a=P({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),dt(l),yt(l,"style",a),eo(l,n.precedence,t),e.instance=l;case"stylesheet":a=Gl(n.href);var i=t.querySelector(fi(a));if(i)return e.state.loading|=4,e.instance=i,dt(i),i;l=Mm(n),(a=Pt.get(a))&&fc(l,a),i=(t.ownerDocument||t).createElement("link"),dt(i);var o=i;return o._p=new Promise(function(r,u){o.onload=r,o.onerror=u}),yt(i,"link",l),e.state.loading|=4,eo(i,n.precedence,t),e.instance=i;case"script":if(i=$l(n.src),a=t.querySelector(di(i)))return e.instance=a,dt(a),a;if(l=n,a=Pt.get(i))l=P({},n),dc(l,a);return t=t.ownerDocument||t,a=t.createElement("script"),dt(a),yt(a,"link",l),t.head.appendChild(a),e.instance=a;case"void":return null;default:throw Error(_(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(l=e.instance,e.state.loading|=4,eo(l,n.precedence,t));return e.instance}function eo(t,e,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,i=a,o=0;o<l.length;o++){var r=l[o];if(r.dataset.precedence===e)i=r;else if(i!==a)break}i?i.parentNode.insertBefore(t,i.nextSibling):(e=n.nodeType===9?n.head:n,e.insertBefore(t,e.firstChild))}function fc(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function dc(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}function Jd(t,e,n){if(no===null){var l=new Map,a=no=new Map;a.set(n,l)}else a=no,l=a.get(n),l||(l=new Map,a.set(n,l));if(l.has(t))return l;l.set(t,null),n=n.getElementsByTagName(t);for(a=0;a<n.length;a++){var i=n[a];if(!(i[ii]||i[mt]||t==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var o=i.getAttribute(e)||"";o=t+o;var r=l.get(o);r?r.push(i):l.set(o,[i])}}return l}function $d(t,e,n){t=t.ownerDocument||t,t.head.insertBefore(n,e==="title"?t.querySelector("head > title"):null)}function k_(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!=="string"||typeof e.href!=="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!=="string"||typeof e.href!=="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence==="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!=="function"&&typeof e.async!=="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src==="string")return!0}return!1}function Um(t){return t.type==="stylesheet"&&(t.state.loading&3)===0?!1:!0}function J_(t,e,n,l){if(n.type==="stylesheet"&&(typeof l.media!=="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var a=Gl(l.href),i=e.querySelector(fi(a));if(i){e=i._p,e!==null&&typeof e==="object"&&typeof e.then==="function"&&(t.count++,t=Ro.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=i,dt(i);return}i=e.ownerDocument||e,l=Mm(l),(a=Pt.get(a))&&fc(l,a),i=i.createElement("link"),dt(i);var o=i;o._p=new Promise(function(r,u){o.onload=r,o.onerror=u}),yt(i,"link",l),n.instance=i}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&(n.state.loading&3)===0&&(t.count++,n=Ro.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}function $_(t,e){return t.stylesheets&&t.count===0&&lo(t,t.stylesheets),0<t.count||0<t.imgCount?function(n){var l=setTimeout(function(){if(t.stylesheets&&lo(t,t.stylesheets),t.unsuspend){var i=t.unsuspend;t.unsuspend=null,i()}},60000+e);0<t.imgBytes&&Ou===0&&(Ou=62500*z_());var a=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&lo(t,t.stylesheets),t.unsuspend)){var i=t.unsuspend;t.unsuspend=null,i()}},(t.imgBytes>Ou?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function Ro(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lo(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}function lo(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Co=new Map,e.forEach(W_,t),Co=null,Ro.call(t))}function W_(t,e){if(!(e.state.loading&4)){var n=Co.get(t);if(n)var l=n.get(null);else{n=new Map,Co.set(t,n);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var o=a[i];if(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")n.set(o.dataset.precedence,o),l=o}l&&n.set(null,l)}a=e.instance,o=a.getAttribute("data-precedence"),i=n.get(o)||l,i===l&&n.set(null,a),n.set(o,a),this.count++,l=Ro.bind(this),a.addEventListener("load",l),a.addEventListener("error",l),i?i.parentNode.insertBefore(a,i.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(a,t.firstChild)),e.state.loading|=4}}function F_(t,e,n,l,a,i,o,r,u){this.tag=1,this.containerInfo=t,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=Wr(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wr(0),this.hiddenUpdates=Wr(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=u,this.incompleteTransitions=new Map}function Vm(t,e,n,l,a,i,o,r,u,s,h,g){return t=new F_(t,e,n,o,u,s,h,g,r),e=1,i===!0&&(e|=24),i=Ct(3,null,null,e),t.current=i,i.stateNode=t,e=js(),e.refCount++,t.pooledCache=e,e.refCount++,i.memoizedState={element:l,isDehydrated:n,cache:e},Gs(i),t}function Bm(t){if(!t)return Sl;return t=Sl,t}function qm(t,e,n,l,a,i){a=Bm(a),l.context===null?l.context=a:l.pendingContext=a,l=dn(e),l.payload={element:n},i=i===void 0?null:i,i!==null&&(l.callback=i),n=hn(t,l,e),n!==null&&(Dt(n,t,e),Ca(n,t,e))}function Wd(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function hc(t,e){Wd(t,e),(t=t.alternate)&&Wd(t,e)}function jm(t){if(t.tag===13||t.tag===31){var e=Wn(t,67108864);e!==null&&Dt(e,t,67108864),hc(t,67108864)}}function Fd(t){if(t.tag===13||t.tag===31){var e=qt();e=Ns(e);var n=Wn(t,e);n!==null&&Dt(n,t,e),hc(t,e)}}function I_(t,e,n,l){var a=T.T;T.T=null;var i=G.p;try{G.p=2,pc(t,e,n,l)}finally{G.p=i,T.T=a}}function P_(t,e,n,l){var a=T.T;T.T=null;var i=G.p;try{G.p=8,pc(t,e,n,l)}finally{G.p=i,T.T=a}}function pc(t,e,n,l){if(Mo){var a=bs(l);if(a===null)Su(t,e,l,Uo,n),Id(t,l);else if(e1(a,t,e,n,l))l.stopPropagation();else if(Id(t,l),e&4&&-1<t1.indexOf(t)){for(;a!==null;){var i=Xl(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var o=Mn(i.pendingLanes);if(o!==0){var r=i;r.pendingLanes|=2;for(r.entangledLanes|=2;o;){var u=1<<31-Bt(o);r.entanglements[1]|=u,o&=~u}be(i),(L&6)===0&&(Oo=Ut()+500,ci(0,!1))}}break;case 31:case 13:r=Wn(i,2),r!==null&&Dt(r,i,2),Jo(),hc(i,2)}if(i=bs(l),i===null&&Su(t,e,l,Uo,n),i===a)break;a=i}a!==null&&l.stopPropagation()}else Su(t,e,l,null,n)}}function bs(t){return t=Ts(t),mc(t)}function mc(t){if(Uo=null,t=ml(t),t!==null){var e=ei(t);if(e===null)t=null;else{var n=e.tag;if(n===13){if(t=ah(e),t!==null)return t;t=null}else if(n===31){if(t=ih(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return Uo=t,null}function Hm(t){switch(t){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(Gb()){case sh:return 2;case ch:return 8;case uo:case Yb:return 32;case fh:return 268435456;default:return 32}default:return 32}}function Id(t,e){switch(t){case"focusin":case"focusout":vn=null;break;case"dragenter":case"dragleave":gn=null;break;case"mouseover":case"mouseout":yn=null;break;case"pointerover":case"pointerout":Pa.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":ti.delete(e.pointerId)}}function ya(t,e,n,l,a,i){if(t===null||t.nativeEvent!==i)return t={blockedOn:e,domEventName:n,eventSystemFlags:l,nativeEvent:i,targetContainers:[a]},e!==null&&(e=Xl(e),e!==null&&jm(e)),t;return t.eventSystemFlags|=l,e=t.targetContainers,a!==null&&e.indexOf(a)===-1&&e.push(a),t}function e1(t,e,n,l,a){switch(e){case"focusin":return vn=ya(vn,t,e,n,l,a),!0;case"dragenter":return gn=ya(gn,t,e,n,l,a),!0;case"mouseover":return yn=ya(yn,t,e,n,l,a),!0;case"pointerover":var i=a.pointerId;return Pa.set(i,ya(Pa.get(i)||null,t,e,n,l,a)),!0;case"gotpointercapture":return i=a.pointerId,ti.set(i,ya(ti.get(i)||null,t,e,n,l,a)),!0}return!1}function Lm(t){var e=ml(t.target);if(e!==null){var n=ei(e);if(n!==null){if(e=n.tag,e===13){if(e=ah(n),e!==null){t.blockedOn=e,qf(t.priority,function(){Fd(n)});return}}else if(e===31){if(e=ih(n),e!==null){t.blockedOn=e,qf(t.priority,function(){Fd(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function ao(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=bs(t.nativeEvent);if(n===null){n=t.nativeEvent;var l=new n.constructor(n.type,n);Bu=l,n.target.dispatchEvent(l),Bu=null}else return e=Xl(n),e!==null&&jm(e),t.blockedOn=n,!1;e.shift()}return!0}function Pd(t,e,n){ao(t)&&n.delete(e)}function n1(){_s=!1,vn!==null&&ao(vn)&&(vn=null),gn!==null&&ao(gn)&&(gn=null),yn!==null&&ao(yn)&&(yn=null),Pa.forEach(Pd),ti.forEach(Pd)}function Gi(t,e){t.blockedOn===e&&(t.blockedOn=null,_s||(_s=!0,il(al,n1)))}function th(t){Yi!==t&&(Yi=t,il(al,function(){Yi===t&&(Yi=null);for(var e=0;e<t.length;e+=3){var n=t[e],l=t[e+1],a=t[e+2];if(typeof l!=="function")if(mc(l||n)===null)continue;else break;var i=Xl(n);i!==null&&(t.splice(e,3),e-=3,Iu(i,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function Yl(t){function e(u){return Gi(u,t)}vn!==null&&Gi(vn,t),gn!==null&&Gi(gn,t),yn!==null&&Gi(yn,t),Pa.forEach(e),ti.forEach(e);for(var n=0;n<ln.length;n++){var l=ln[n];l.blockedOn===t&&(l.blockedOn=null)}for(;0<ln.length&&(n=ln[0],n.blockedOn===null);)Lm(n),n.blockedOn===null&&ln.shift();if(n=(t.ownerDocument||t).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var a=n[l],i=n[l+1],o=a[Tt]||null;if(typeof i==="function")o||th(n);else if(o){var r=null;if(i&&i.hasAttribute("formAction")){if(a=i,o=i[Tt]||null)r=o.formAction;else if(mc(a)!==null)continue}else r=o.action;typeof r==="function"?n[l+1]=r:(n.splice(l,3),l-=3),th(n)}}}function Gm(){function t(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(o){return a=o})},focusReset:"manual",scroll:"manual"})}function e(){a!==null&&(a(),a=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation==="object"){var l=!1,a=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),a!==null&&(a(),a=null)}}}function vc(t){this._internalRoot=t}function Fo(t){this._internalRoot=t}var Vo,nh,P,Vb,zi,ba,hl,rh,Nu,uh,Re,Ss,xu,Au,Es,Ie,Du,Bb,Uf,qb,_a,T,G,qn,zu,pl=-1,ge,Ga,cn,io,Zr,Vf,kr=!1,Ru,Os,$r,Hb,Lb,Ut,Gb,sh,ch,uo,Yb,fh,Kb,Xb,ni=null,Vt=null,Bt,Qb,Zb,wi=256,Ri=262144,Ci=4194304,On,mt,Tt,Kl,Cu,Wb,Fb,jf,ii,gh,yh,Ib,Hf,Lf,e0,n0,l0,a0,Bu=null,vl=null,Dl=null,Fr=!1,qe,qu=!1,Un,on=null,zs=null,Qi=null,Jn,qo,oi,i0,Ir,Pr,pa,jo,Xf,o0,r0,u0,tu,s0,c0,f0,d0,h0,Qf,p0,m0,v0,y0,b0,_0,Zf,S0,E0,O0,N0,x0,A0,D0,T0,z0,Rs,Ta=null,w0,Dh,kf,Jf=!1,gl=!1,M0,za=null,Ka=null,Rh=!1,Ea,Oa,ki,jt,L0,yl=null,ju=null,wa=null,Hu=!1,bl,eu,Vh,Bh,qh,jh,G0,Y0,K0,Hh,Lh,Lu,co,Xt,_l=0,Ms=0,Sl,ed,El,Ol=0,ho=null,Qa=0,Zt,kt=0,bn=null,pe=1,me="",vt=null,I=null,j=!1,fn=null,Wt=!1,Gu,Yu,Fn=null,Me=null,Q0,Z0,k0,rt,Ra=null,Qu=0,Vl=0,Tl=null,id,Hn,Zl,Ls,Yo,mo,Ln=null,zl=null,ka=0,Xn,Wh,Pe=!1,ku=!1,Bl,vo,Ht,Ft=null,lt,je=0,C=null,Q=null,it=null,yo=!1,wl=!1,Qn=!1,bo=0,Ja=0,Rl=null,W0=0,$a,wp,ec,Rp,Pu,nc,ut=!1,uu,we=!1,ot=!1,vu=!1,Td,ft=null,tt=null,xt=!1,ie=null,xa=8192,f_,d_,L=0,Z=null,B=null,q=0,Y=0,wt=null,rn=!1,kl=!1,oc=!1,Ge=0,nt=0,En=0,Gn=0,rc=0,Mt=0,jl=0,ja=null,At=null,as=!1,ko=0,om=0,Oo=1/0,No=null,pn=null,st=0,mn=null,Hl=null,Be=0,is=0,os=null,rm=null,Ha=0,rs=null,Ao=null,fl=null,us=!1,Do=!1,bu=!1,sn=0,Da,ss,cs,Aa,Wa,N_,Li,A_,D_,ds=null,hs=null,Eu=null,zm,R_,Ld,C_,ys=null,Pt,Qd,Ye,Jl,no=null,Ou=0,Co=null,Ia,Mo=!0,Uo=null,_s=!1,vn=null,gn=null,yn=null,Pa,ti,ln,t1,Yi=null,eh,l1,dl,Ym=function(t,e){if(!lh(t))throw Error(_(299));var n=!1,l="",a=Cp,i=Mp,o=Up;return e!==null&&e!==void 0&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(l=e.identifierPrefix),e.onUncaughtError!==void 0&&(a=e.onUncaughtError),e.onCaughtError!==void 0&&(i=e.onCaughtError),e.onRecoverableError!==void 0&&(o=e.onRecoverableError)),e=Vm(t,1,!1,null,null,n,l,null,a,i,o,Gm),t[Kl]=e.current,cc(t),new vc(e)},Km=function(t,e,n){if(!lh(t))throw Error(_(299));var l=!1,a="",i=Cp,o=Mp,r=Up,u=null;return n!==null&&n!==void 0&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(r=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),e=Vm(t,1,!0,e,n!=null?n:null,l,a,u,i,o,r,Gm),e.context=Bm(null),n=e.current,l=qt(),l=Ns(l),a=dn(l),a.callback=null,hn(n,a,l),n=l,e.current.lanes=n,ai(e,n),be(e),t[Kl]=e.current,cc(t),new Fo(e)},Xm="19.2.8";var Qm=_r(()=>{ef();Vo=fe(Oe(),1),nh=fe(Cf(),1);P=Object.assign,Vb=Symbol.for("react.element"),zi=Symbol.for("react.transitional.element"),ba=Symbol.for("react.portal"),hl=Symbol.for("react.fragment"),rh=Symbol.for("react.strict_mode"),Nu=Symbol.for("react.profiler"),uh=Symbol.for("react.consumer"),Re=Symbol.for("react.context"),Ss=Symbol.for("react.forward_ref"),xu=Symbol.for("react.suspense"),Au=Symbol.for("react.suspense_list"),Es=Symbol.for("react.memo"),Ie=Symbol.for("react.lazy"),Du=Symbol.for("react.activity"),Bb=Symbol.for("react.memo_cache_sentinel"),Uf=Symbol.iterator;qb=Symbol.for("react.client.reference");_a=Array.isArray,T=Vo.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=nh.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,qn={pending:!1,data:null,method:null,action:null},zu=[];ge=ye(null),Ga=ye(null),cn=ye(null),io=ye(null);Ru=Object.prototype.hasOwnProperty,Os=il,$r=Ur,Hb=qr,Lb=Br,Ut=he,Gb=Vr,sh=Rr,ch=Mr,uo=al,Yb=Cr,fh=wr,Kb=void 0,Xb=void 0;Bt=Math.clz32?Math.clz32:kb,Qb=Math.log,Zb=Math.LN2;On=Math.random().toString(36).slice(2),mt="__reactFiber$"+On,Tt="__reactProps$"+On,Kl="__reactContainer$"+On,Cu="__reactEvents$"+On,Wb="__reactListeners$"+On,Fb="__reactHandles$"+On,jf="__reactResources$"+On,ii="__reactMarker$"+On;gh=new Set,yh={};Ib=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]*$"),Hf={},Lf={};e0=/[\n"\\]/g;n0=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(" "));l0=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"]]),a0=/^[\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;qe=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u");if(qe)try{Un={},Object.defineProperty(Un,"passive",{get:function(){qu=!0}}),window.addEventListener("test",Un,Un),window.removeEventListener("test",Un,Un)}catch(t){qu=!1}Jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},qo=zt(Jn),oi=P({},Jn,{view:0,detail:0}),i0=zt(oi),jo=P({},oi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ws,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){if("movementX"in t)return t.movementX;return t!==pa&&(pa&&t.type==="mousemove"?(Ir=t.screenX-pa.screenX,Pr=t.screenY-pa.screenY):Pr=Ir=0,pa=t),Ir},movementY:function(t){return"movementY"in t?t.movementY:Pr}}),Xf=zt(jo),o0=P({},jo,{dataTransfer:0}),r0=zt(o0),u0=P({},oi,{relatedTarget:0}),tu=zt(u0),s0=P({},Jn,{animationName:0,elapsedTime:0,pseudoElement:0}),c0=zt(s0),f0=P({},Jn,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),d0=zt(f0),h0=P({},Jn,{data:0}),Qf=zt(h0),p0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},m0={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"},v0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};y0=P({},oi,{key:function(t){if(t.key){var e=p0[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Zi(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?m0[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ws,charCode:function(t){return t.type==="keypress"?Zi(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Zi(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),b0=zt(y0),_0=P({},jo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Zf=zt(_0),S0=P({},oi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ws}),E0=zt(S0),O0=P({},Jn,{propertyName:0,elapsedTime:0,pseudoElement:0}),N0=zt(O0),x0=P({},jo,{deltaX:function(t){return"deltaX"in t?t.deltaX:("wheelDeltaX"in t)?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:("wheelDeltaY"in t)?-t.wheelDeltaY:("wheelDelta"in t)?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),A0=zt(x0),D0=P({},Jn,{newState:0,oldState:0}),T0=zt(D0),z0=[9,13,27,32],Rs=qe&&"CompositionEvent"in window;qe&&"documentMode"in document&&(Ta=document.documentMode);w0=qe&&"TextEvent"in window&&!Ta,Dh=qe&&(!Rs||Ta&&8<Ta&&11>=Ta),kf=String.fromCharCode(32);M0={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};if(qe){if(qe){if(Oa="oninput"in document,!Oa)ki=document.createElement("div"),ki.setAttribute("oninput","return;"),Oa=typeof ki.oninput==="function";Ea=Oa}else Ea=!1;Rh=Ea&&(!document.documentMode||9<document.documentMode)}jt=typeof Object.is==="function"?Object.is:H0;L0=qe&&"documentMode"in document&&11>=document.documentMode;bl={animationend:Rn("Animation","AnimationEnd"),animationiteration:Rn("Animation","AnimationIteration"),animationstart:Rn("Animation","AnimationStart"),transitionrun:Rn("Transition","TransitionRun"),transitionstart:Rn("Transition","TransitionStart"),transitioncancel:Rn("Transition","TransitionCancel"),transitionend:Rn("Transition","TransitionEnd")},eu={},Vh={};qe&&(Vh=document.createElement("div").style,("AnimationEvent"in window)||(delete bl.animationend.animation,delete bl.animationiteration.animation,delete bl.animationstart.animation),("TransitionEvent"in window)||delete bl.transitionend.transition);Bh=$n("animationend"),qh=$n("animationiteration"),jh=$n("animationstart"),G0=$n("transitionrun"),Y0=$n("transitionstart"),K0=$n("transitioncancel"),Hh=$n("transitionend"),Lh=new Map,Lu="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(" ");Lu.push("scrollEnd");co=typeof reportError==="function"?reportError:function(t){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t==="object"&&t!==null&&typeof t.message==="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",t);return}console.error(t)},Xt=[];Sl={};ed=new WeakMap;El=[],Zt=[];Gu=Error(_(519));Yu=ye(null);Q0=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(n,l){t.push(l)}};this.abort=function(){e.aborted=!0,t.forEach(function(n){return n()})}},Z0=il,k0=al,rt={$$typeof:Re,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};id=T.S;T.S=function(t,e){om=Ut(),typeof e==="object"&&e!==null&&typeof e.then==="function"&&J0(t,e),id!==null&&id(t,e)};Hn=ye(null);Zl=Error(_(460)),Ls=Error(_(474)),Yo=Error(_(542)),mo={then:function(){}};Xn=$h(!0),Wh=$h(!1);Bl=ye(null),vo=ye(0);Ht=ye(null);lt=ye(0);$a={readContext:gt,use:Xo,useCallback:et,useContext:et,useEffect:et,useImperativeHandle:et,useLayoutEffect:et,useInsertionEffect:et,useMemo:et,useReducer:et,useRef:et,useState:et,useDebugValue:et,useDeferredValue:et,useTransition:et,useSyncExternalStore:et,useId:et,useHostTransitionStatus:et,useFormState:et,useActionState:et,useOptimistic:et,useMemoCache:et,useCacheRefresh:et};$a.useEffectEvent=et;wp={readContext:gt,use:Xo,useCallback:function(t,e){return Et().memoizedState=[t,e===void 0?null:e],t},useContext:gt,useEffect:md,useImperativeHandle:function(t,e,n){n=n!==null&&n!==void 0?n.concat([t]):null,Fi(4194308,4,gp.bind(null,e,t),n)},useLayoutEffect:function(t,e){return Fi(4194308,4,t,e)},useInsertionEffect:function(t,e){Fi(4,2,t,e)},useMemo:function(t,e){var n=Et();e=e===void 0?null:e;var l=t();if(Qn){an(!0);try{t()}finally{an(!1)}}return n.memoizedState=[l,e],l},useReducer:function(t,e,n){var l=Et();if(n!==void 0){var a=n(e);if(Qn){an(!0);try{n(e)}finally{an(!1)}}}else a=e;return l.memoizedState=l.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},l.queue=t,t=t.dispatch=l_.bind(null,C,t),[l.memoizedState,t]},useRef:function(t){var e=Et();return t={current:t},e.memoizedState=t},useState:function(t){t=Wu(t);var e=t.queue,n=Dp.bind(null,C,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:Fs,useDeferredValue:function(t,e){var n=Et();return Is(n,t,e)},useTransition:function(){var t=Wu(!1);return t=Ep.bind(null,C,t.queue,!0,!1),Et().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var l=C,a=Et();if(j){if(n===void 0)throw Error(_(407));n=n()}else{if(n=e(),Z===null)throw Error(_(349));(q&127)!==0||lp(l,e,n)}a.memoizedState=n;var i={value:n,getSnapshot:e};return a.queue=i,md(ip.bind(null,l,i,t),[t]),l.flags|=2048,ql(9,{destroy:void 0},ap.bind(null,l,i,n,e),null),n},useId:function(){var t=Et(),e=Z.identifierPrefix;if(j){var n=me,l=pe;n=(l&~(1<<32-Bt(l)-1)).toString(32)+n,e="_"+e+"R_"+n,n=bo++,0<n&&(e+="H"+n.toString(32)),e+="_"}else n=W0++,e="_"+e+"r_"+n.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:Ps,useFormState:dd,useActionState:dd,useOptimistic:function(t){var e=Et();e.memoizedState=e.baseState=t;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=n,e=tc.bind(null,C,!0,n),n.dispatch=e,[t,e]},useMemoCache:Js,useCacheRefresh:function(){return Et().memoizedState=n_.bind(null,C)},useEffectEvent:function(t){var e=Et(),n={impl:t};return e.memoizedState=n,function(){if((L&2)!==0)throw Error(_(440));return n.impl.apply(void 0,arguments)}}},ec={readContext:gt,use:Xo,useCallback:bp,useContext:gt,useEffect:Ws,useImperativeHandle:yp,useInsertionEffect:mp,useLayoutEffect:vp,useMemo:_p,useReducer:Wi,useRef:hp,useState:function(){return Wi(He)},useDebugValue:Fs,useDeferredValue:function(t,e){var n=at();return Sp(n,Q.memoizedState,t,e)},useTransition:function(){var t=Wi(He)[0],e=at().memoizedState;return[typeof t==="boolean"?t:ui(t),e]},useSyncExternalStore:np,useId:xp,useHostTransitionStatus:Ps,useFormState:hd,useActionState:hd,useOptimistic:function(t,e){var n=at();return up(n,Q,t,e)},useMemoCache:Js,useCacheRefresh:Ap};ec.useEffectEvent=pp;Rp={readContext:gt,use:Xo,useCallback:bp,useContext:gt,useEffect:Ws,useImperativeHandle:yp,useInsertionEffect:mp,useLayoutEffect:vp,useMemo:_p,useReducer:ou,useRef:hp,useState:function(){return ou(He)},useDebugValue:Fs,useDeferredValue:function(t,e){var n=at();return Q===null?Is(n,t,e):Sp(n,Q.memoizedState,t,e)},useTransition:function(){var t=ou(He)[0],e=at().memoizedState;return[typeof t==="boolean"?t:ui(t),e]},useSyncExternalStore:np,useId:xp,useHostTransitionStatus:Ps,useFormState:pd,useActionState:pd,useOptimistic:function(t,e){var n=at();if(Q!==null)return up(n,Q,t,e);return n.baseState=t,[t,n.queue.dispatch]},useMemoCache:Js,useCacheRefresh:Ap};Rp.useEffectEvent=pp;Pu={enqueueSetState:function(t,e,n){t=t._reactInternals;var l=qt(),a=dn(l);a.payload=e,n!==void 0&&n!==null&&(a.callback=n),e=hn(t,a,l),e!==null&&(Dt(e,t,l),Ca(e,t,l))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var l=qt(),a=dn(l);a.tag=1,a.payload=e,n!==void 0&&n!==null&&(a.callback=n),e=hn(t,a,l),e!==null&&(Dt(e,t,l),Ca(e,t,l))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=qt(),l=dn(n);l.tag=2,e!==void 0&&e!==null&&(l.callback=e),e=hn(t,l,n),e!==null&&(Dt(e,t,n),Ca(e,t,n))}};nc=Error(_(461));uu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};Td=typeof WeakSet==="function"?WeakSet:Set;f_={getCacheForType:function(t){var e=gt(rt),n=e.data.get(t);return n===void 0&&(n=t(),e.data.set(t,n)),n},cacheSignal:function(){return gt(rt).controller.signal}},d_=typeof WeakMap==="function"?WeakMap:Map;for(Aa=0;Aa<Lu.length;Aa++)Da=Lu[Aa],ss=Da.toLowerCase(),cs=Da[0].toUpperCase()+Da.slice(1),oe(ss,"on"+cs);oe(Bh,"onAnimationEnd");oe(qh,"onAnimationIteration");oe(jh,"onAnimationStart");oe("dblclick","onDoubleClick");oe("focusin","onFocus");oe("focusout","onBlur");oe(G0,"onTransitionRun");oe(Y0,"onTransitionStart");oe(K0,"onTransitionCancel");oe(Hh,"onTransitionEnd");Ml("onMouseEnter",["mouseout","mouseover"]);Ml("onMouseLeave",["mouseout","mouseover"]);Ml("onPointerEnter",["pointerout","pointerover"]);Ml("onPointerLeave",["pointerout","pointerover"]);kn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));kn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));kn("onBeforeInput",["compositionend","keypress","textInput","paste"]);kn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));kn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));kn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));Wa="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(" "),N_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wa));Li="_reactListening"+Math.random().toString(36).slice(2);A_=/\r\n?/g,D_=/\u0000|\uFFFD/g;zm=typeof setTimeout==="function"?setTimeout:void 0,R_=typeof clearTimeout==="function"?clearTimeout:void 0,Ld=typeof Promise==="function"?Promise:void 0,C_=typeof queueMicrotask==="function"?queueMicrotask:typeof Ld<"u"?function(t){return Ld.resolve(null).then(t).catch(M_)}:zm;Pt=new Map,Qd=new Set;Ye=G.d;G.d={f:q_,r:j_,D:H_,C:L_,L:G_,m:Y_,X:X_,S:K_,M:Q_};Jl=typeof document>"u"?null:document;Ia={$$typeof:Re,Provider:null,Consumer:null,_currentValue:qn,_currentValue2:qn,_threadCount:0};Pa=new Map,ti=new Map,ln=[],t1="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(" ");Fo.prototype.render=vc.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(_(409));var n=e.current,l=qt();qm(n,l,t,e,null,null)};Fo.prototype.unmount=vc.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;qm(t.current,2,null,t,null,null),Jo(),e[Kl]=null}};Fo.prototype.unstable_scheduleHydration=function(t){if(t){var e=vh();t={blockedOn:null,target:t,priority:e};for(var n=0;n<ln.length&&e!==0&&e<ln[n].priority;n++);ln.splice(n,0,t),n===0&&Lm(t)}};eh=Vo.version;if(eh!=="19.2.8")throw Error(_(527,eh,"19.2.8"));G.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0){if(typeof t.render==="function")throw Error(_(188));throw t=Object.keys(t).join(","),Error(_(268,t))}return t=Ub(e),t=t!==null?oh(t):null,t=t===null?null:t.stateNode,t};l1={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:T,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){if(dl=__REACT_DEVTOOLS_GLOBAL_HOOK__,!dl.isDisabled&&dl.supportsFiber)try{ni=dl.inject(l1),Vt=dl}catch(t){}}});var Jm=br(function(sE,km){Qm();function Zm(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=="function")return;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Zm)}catch(t){console.error(t)}}Zm(),km.exports=gc});var fy=fe(Jm(),1);function J(t,...e){throw Error(`[MobX] minified error nr: ${t}${e.length?" "+e.map(String).join(","):""}. See mobx.js.org/errors`)}var{assign:Se,getOwnPropertyDescriptor:Ac,defineProperty:Qe,prototype:or}=Object,_c=[];Object.freeze(_c);var uv={};Object.freeze(uv);var o1=Object.toString();var Fl=()=>{};function Pl(t){return typeof t==="function"}function Sc(t){switch(typeof t){case"string":case"symbol":case"number":return!0}return!1}function rr(t){return t!==null&&typeof t==="object"}function ke(t){if(!rr(t))return!1;let e=Object.getPrototypeOf(t);if(e==null)return!0;let n=In(e,"constructor")&&e.constructor;return typeof n==="function"&&n.toString()===o1}function sv(t){let e=t==null?void 0:t.constructor;if(!e)return!1;if(e.name==="GeneratorFunction"||e.displayName==="GeneratorFunction")return!0;return!1}function cv(t,e,n){Qe(t,e,{enumerable:!1,writable:!0,configurable:!0,value:n})}function r1(t,e,n){Qe(t,e,{enumerable:!1,writable:!1,configurable:!0,value:n})}function el(t,e){let n="isMobX"+t;return e.prototype[n]=!0,function(l){return rr(l)&&l[n]===!0}}function vi(t){return t!=null&&Object.prototype.toString.call(t)==="[object Map]"}function u1(t){let e=Object.getPrototypeOf(t),n=Object.getPrototypeOf(e);return Object.getPrototypeOf(n)===null}function xn(t){return t!=null&&Object.prototype.toString.call(t)==="[object Set]"}function s1(t){let e=Object.keys(t),n=Object.getOwnPropertySymbols(t);if(!n.length)return e;return[...e,...n.filter((l)=>or.propertyIsEnumerable.call(t,l))]}var er=Reflect.ownKeys;function fv(t){return t===null?null:typeof t==="object"?""+t:t}function In(t,e){return or.hasOwnProperty.call(t,e)}var c1=Object.getOwnPropertyDescriptors;function Lt(t,e){return!!(t&e)}function Gt(t,e,n){if(n)t|=e;else t&=~e;return t}var M=Symbol("mobx administration");class ea{constructor(t="Atom"){this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=-1,this.onBOL=void 0,this.onBUOL=void 0,this.name_=t}get isBeingObserved(){return Lt(this.flags_,1)}set isBeingObserved(t){this.flags_=Gt(this.flags_,1,t)}get isPendingUnobservation(){return Lt(this.flags_,2)}set isPendingUnobservation(t){this.flags_=Gt(this.flags_,2,t)}get diffValue(){return Lt(this.flags_,4)?1:0}set diffValue(t){this.flags_=Gt(this.flags_,4,t===1?!0:!1)}onBO(){if(this.onBOL)this.onBOL.forEach((t)=>t())}onBUO(){if(this.onBUOL)this.onBUOL.forEach((t)=>t())}reportObserved(){return Uv(this)}reportChanged(){ne(),Vv(this),le()}toString(){return this.name_}}var Dc=el("Atom",ea);function dv(t,e=Fl,n=Fl){let l=new ea(t);if(e!==Fl)l.onBOL=new Set([e]);if(n!==Fl)l.onBUOL=new Set([n]);return l}var Tc=Object.is;function Pn(t,e,n){if(Jv(t))return t;if(Array.isArray(t))return bt.array(t,{name:n});if(ke(t))return bt.object(t,void 0,{name:n});if(vi(t))return bt.map(t,{name:n});if(xn(t))return bt.set(t,{name:n});if(typeof t==="function"&&!ta(t)&&!pi(t))if(sv(t))return hr(t);else return Cc(n,t);return t}function f1(t,e,n){if(t===void 0||t===null)return t;if(mi(t)||Wv(t)||aa(t)||Xe(t))return t;if(Array.isArray(t))return bt.array(t,{name:n,deep:!1});if(ke(t))return bt.object(t,void 0,{name:n,deep:!1});if(vi(t))return bt.map(t,{name:n,deep:!1});if(xn(t))return bt.set(t,{name:n,deep:!1})}function ur(t){return t}function sr(t,e){return{annotationType_:t,options_:e,make_:d1,extend_:h1}}function d1(t,e,n,l){var a;if((a=this.options_)!=null&&a.bound)return this.extend_(t,e,n,!1)===null?0:1;if(l===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if(ta(n.value))return 1;let i=pv(t,this,e,n,!1);return Qe(l,e,i),2}function h1(t,e,n,l){let a=pv(t,this,e,n);return t.defineProperty_(e,a,l)}function hv(t,e,n){let{kind:l,name:a,addInitializer:i}=n,o=t,r=(s)=>{var h,g,d,v;return tl((h=(g=o.options_)==null?void 0:g.name)!=null?h:a.toString(),s,(d=(v=o.options_)==null?void 0:v.autoAction)!=null?d:!1)};if(l=="field")return function(s){var h;let g=s;if(!ta(g))g=r(g);if((h=o.options_)!=null&&h.bound)g=g.bind(this),g.isMobxAction=!0;return g};if(l=="method"){var u;if(!ta(e))e=r(e);if((u=o.options_)!=null&&u.bound)i(function(){let s=this,h=s[a].bind(s);h.isMobxAction=!0,s[a]=h});return e}J(43,o.annotationType_,String(a),l)}function p1(t,{annotationType_:e},n,{value:l}){}function pv(t,e,n,l,a=x.safeDescriptors){var i,o,r,u,s,h,g;p1(t,e,n,l);let{value:d}=l;if((i=e.options_)!=null&&i.bound){var v;d=d.bind((v=t.proxy_)!=null?v:t.target_)}return{value:tl((o=(r=e.options_)==null?void 0:r.name)!=null?o:n.toString(),d,(u=(s=e.options_)==null?void 0:s.autoAction)!=null?u:!1,(h=e.options_)!=null&&h.bound?(g=t.proxy_)!=null?g:t.target_:void 0),configurable:a?t.isPlainObject_:!0,enumerable:!1,writable:a?!1:!0}}function mv(t,e){return{annotationType_:t,options_:e,make_:m1,extend_:v1}}function m1(t,e,n,l){var a;if(l===t.target_)return this.extend_(t,e,n,!1)===null?0:2;if((a=this.options_)!=null&&a.bound&&(!In(t.target_,e)||!pi(t.target_[e]))){if(this.extend_(t,e,n,!1)===null)return 0}if(pi(n.value))return 1;let i=gv(t,this,e,n,!1,!1);return Qe(l,e,i),2}function v1(t,e,n,l){var a;let i=gv(t,this,e,n,(a=this.options_)==null?void 0:a.bound);return t.defineProperty_(e,i,l)}function vv(t,e,n){var l;let{name:a,addInitializer:i}=n;if(!pi(e))e=hr(e);if((l=t.options_)!=null&&l.bound)i(function(){let o=this,r=o[a].bind(o);r.isMobXFlow=!0,o[a]=r});return e}function g1(t,{annotationType_:e},n,{value:l}){}function gv(t,e,n,l,a,i=x.safeDescriptors){g1(t,e,n,l);let{value:o}=l;if(!pi(o))o=hr(o);if(a){var r;o=o.bind((r=t.proxy_)!=null?r:t.target_),o.isMobXFlow=!0}return{value:o,configurable:i?t.isPlainObject_:!0,enumerable:!1,writable:i?!1:!0}}function yv(t,e){return{annotationType_:t,options_:e,make_:y1,extend_:b1}}function y1(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function b1(t,e,n,l){return _1(t,this,e,n),t.defineComputedProperty_(e,Se({},this.options_,{get:n.get,set:n.set}),l)}function bv(t,e,n){let l=t,{name:a,addInitializer:i}=n,o;function r(u,s){let h=Se({},l.options_,{get:e,context:u});return h.name||(h.name=`ObservableObject.${a.toString()}`),new Ze(h)}return i(function(){var u;let s=bi(this)[M],h=this,g=s.values_.get(a);if(g instanceof Ze&&g.derivation!==e)s.values_.delete(a);((u=s.lazyComputedKeys_)!=null?u:s.lazyComputedKeys_=new Map).set(a,()=>r(h,s))}),function(){let u=this[M],s=u.values_.get(a);if(s instanceof Ze&&s.derivation!==e){var h;let d=(h=o)==null?void 0:h.get(this);if(!d){var g;d=r(this,u),((g=o)!=null?g:o=new WeakMap).set(this,d)}return d.get()}return u.getObservablePropValue_(a)}}function _1(t,{annotationType_:e},n,{get:l}){}function zc(t,e){return{annotationType_:t,options_:e,make_:S1,extend_:E1}}function S1(t,e,n){return this.extend_(t,e,n,!1)===null?0:1}function E1(t,e,n,l){var a,i;return O1(t,this,e,n),t.defineObservableProperty_(e,n.value,(a=(i=this.options_)==null?void 0:i.enhancer_)!=null?a:Pn,l)}function _v(t,e,n){let l=t,{kind:a,name:i}=n;if(a!=="accessor")return;function o(r,u){var s;let h=bi(r)[M];return((s=h.lazyObservableKeys_)!=null?s:h.lazyObservableKeys_=new Map).set(i,()=>{var g,d;return new Dn(u,(g=(d=l.options_)==null?void 0:d.enhancer_)!=null?g:Pn,`ObservableObject.${i.toString()}`,!1)}),h}return{get(){var r;return((r=this[M])!=null?r:o(this,e.get.call(this))).getObservablePropValue_(i)},set(r){var u;return((u=this[M])!=null?u:o(this,r)).setObservablePropValue_(i,r)},init(r){return o(this,r),r}}}function O1(t,{annotationType_:e},n,l){}var N1="true",x1=Sv();function Sv(t){return{annotationType_:N1,options_:t,make_:A1,extend_:D1}}function A1(t,e,n,l){var a,i;if(n.get)return wc.make_(t,e,n,l);if(n.set){let h=ta(n.set)?n.set:tl(e.toString(),n.set);if(l===t.target_)return t.defineProperty_(e,{configurable:x.safeDescriptors?t.isPlainObject_:!0,set:h})===null?0:2;return Qe(l,e,{configurable:!0,set:h}),2}if(l!==t.target_&&typeof n.value==="function"){var o;if(sv(n.value)){var r;return((r=this.options_)!=null&&r.autoBind?cS:hr).make_(t,e,n,l)}return((o=this.options_)!=null&&o.autoBind?lS:Cc).make_(t,e,n,l)}let u=((a=this.options_)==null?void 0:a.deep)===!1?na:bt;if(typeof n.value==="function"&&(i=this.options_)!=null&&i.autoBind){var s;n.value=n.value.bind((s=t.proxy_)!=null?s:t.target_)}return u.make_(t,e,n,l)}function D1(t,e,n,l){var a,i;if(n.get)return wc.extend_(t,e,n,l);if(n.set)return t.defineProperty_(e,{configurable:x.safeDescriptors?t.isPlainObject_:!0,set:tl(e.toString(),n.set)},l);if(typeof n.value==="function"&&(a=this.options_)!=null&&a.autoBind){var o;n.value=n.value.bind((o=t.proxy_)!=null?o:t.target_)}return(((i=this.options_)==null?void 0:i.deep)===!1?na:bt).extend_(t,e,n,l)}function cr(t,e){return Se(function(l,a){if(a&&typeof a.kind==="string")return e(t,l,a);return},t)}var T1="observable",z1="observable.ref",w1="observable.shallow";var Ev={deep:!0,name:void 0,defaultDecorator:void 0};Object.freeze(Ev);function Io(t){return t||Ev}var Ov=zc(T1),R1=zc(z1,{enhancer_:ur}),C1=zc(w1,{enhancer_:f1});function Nv(t){return cr(t,_v)}function Po(t){return t.deep===!0?Pn:t.deep===!1?ur:U1(t.defaultDecorator)}function M1(t){var e;return t?(e=t.defaultDecorator)!=null?e:Sv(t):void 0}function U1(t){var e,n;return!t?Pn:(e=(n=t.options_)==null?void 0:n.enhancer_)!=null?e:Pn}function V1(t,e,n){if(e&&typeof e.kind==="string")return _v(Ov,t,e);if(Jv(t))return t;if(ke(t))return bt.object(t,e,n);if(Array.isArray(t))return bt.array(t,e);if(vi(t))return bt.map(t,e);if(xn(t))return bt.set(t,e);if(typeof t==="object"&&t!==null)return t;return bt.box(t,e)}var B1={box(t,e){let n=Io(e);return new Dn(t,Po(n),n.name,!0,n.equals)},array(t,e){let n=Io(e);return gS(t,Po(n),n.name)},map(t,e){let n=Io(e);return new Uc(t,Po(n),n.name)},set(t,e){let n=Io(e);return new Vc(t,Po(n),n.name)},object(t,e,n){return ia(()=>Xv(hS({},n),t,e))}},na=Nv(R1),gi=Nv(C1);var bt=Se(V1,Ov,B1),xv="computed";function q1(t){return cr(t,bv)}var Av=yv(xv);var wc=function(e,n){if(n&&typeof n.kind==="string")return bv(Av,e,n);if(ke(e))return q1(yv(xv,e));let l=ke(n)?n:{};return l.get=e,l.name||(l.name=e.name||""),new Ze(l)};Se(wc,Av);var $m,Wm,nr=0,j1=1,H1=($m=(Wm=Ac(()=>{},"name"))==null?void 0:Wm.configurable)!=null?$m:!1,Fm={value:"action",configurable:!0,writable:!1,enumerable:!1};function tl(t,e,n=!1,l){function a(){return Dv(t,n,e,l||this,arguments)}if(a.isMobxAction=!0,a.toString=()=>e.toString(),H1)Fm.value=t,Qe(a,"name",Fm);return a}function Dv(t,e,n,l,a){let i=L1(t,e,l,a);try{return n.apply(l,a)}catch(o){throw i.error_=o,o}finally{G1(i)}}function L1(t,e,n,l){let i=0,o=x.trackingDerivation,r=!e||!o;ne();let u=x.allowStateChanges;if(r)la();let s=x.allowStateReads,h={runAsAction_:r,prevDerivation_:o,prevAllowStateChanges_:u,prevAllowStateReads_:s,notifySpy_:!1,startTime_:i,actionId_:j1++,parentActionId_:nr};return nr=h.actionId_,h}function G1(t){if(nr!==t.actionId_)J(30);if(nr=t.parentActionId_,t.error_!==void 0)x.suppressReactionErrors=!0;if(le(),t.runAsAction_)Tn(t.prevDerivation_);x.suppressReactionErrors=!1}function Y1(t,e){let n=K1(t);try{return e()}finally{X1(n)}}function K1(t){let e=x.allowStateChanges;return x.allowStateChanges=t,e}function X1(t){x.allowStateChanges=t}class Dn extends ea{constructor(t,e,n="ObservableValue",l=!0,a=Tc){super(n);if(this.enhancer_=void 0,this.name_=void 0,this.equals_=void 0,this.hasUnreportedChange_=!1,this.interceptors_=void 0,this.changeListeners_=void 0,this.value_=void 0,this.dehancer=void 0,this.enhancer_=e,this.name_=n,this.equals_=a,this.value_=e(t,void 0,n),!1)var i}dehanceValue(t){if(this.dehancer!==void 0)return this.dehancer(t);return t}set(t){let e=this.value_;if(t=this.prepareNewValue_(t),t!==x.UNCHANGED)this.setNewValue_(t)}prepareNewValue_(t){if(_e(this),te(this)){let e=ee(this,{object:this,type:zn,newValue:t});if(!e)return x.UNCHANGED;t=e.newValue}return t=this.enhancer_(t,this.value_,this.name_),this.equals_(this.value_,t)?x.UNCHANGED:t}setNewValue_(t){let e=this.value_;if(this.value_=t,this.reportChanged(),re(this))ue(this,{type:zn,object:this,newValue:t,oldValue:e})}get(){return this.reportObserved(),this.dehanceValue(this.value_)}raw(){return this.value_}toJSON(){return this.get()}toString(){return`${this.name_}[${this.value_}]`}valueOf(){return fv(this.get())}[Symbol.toPrimitive](){return this.valueOf()}}class Ze{constructor(t){if(this.dependenciesState_=-1,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=0,this.unboundDepsCount_=0,this.value_=new hi(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,!t.get)J(31);if(this.derivation=t.get,this.name_=t.name||"ComputedValue",t.set)this.setter_=tl("ComputedValue-setter",t.set);this.equals_=t.equals||Tc,this.scope_=t.context,this.requiresReaction_=t.requiresReaction,this.keepAlive_=!!t.keepAlive}onBecomeStale_(){F1(this)}onBO(){if(this.onBOL)this.onBOL.forEach((t)=>t())}onBUO(){if(this.onBUOL)this.onBUOL.forEach((t)=>t())}get isComputing(){return Lt(this.flags_,1)}set isComputing(t){this.flags_=Gt(this.flags_,1,t)}get isRunningSetter(){return Lt(this.flags_,2)}set isRunningSetter(t){this.flags_=Gt(this.flags_,2,t)}get isBeingObserved(){return Lt(this.flags_,4)}set isBeingObserved(t){this.flags_=Gt(this.flags_,4,t)}get isPendingUnobservation(){return Lt(this.flags_,8)}set isPendingUnobservation(t){this.flags_=Gt(this.flags_,8,t)}get diffValue(){return Lt(this.flags_,16)?1:0}set diffValue(t){this.flags_=Gt(this.flags_,16,t===1?!0:!1)}get(){if(this.isComputing)J(32,this.name_,this.derivation);if(x.inBatch===0&&this.observers_.size===0&&!this.keepAlive_){if(Ec(this))this.warnAboutUntrackedRead_(),ne(),this.value_=this.computeValue_(!1),le()}else if(Uv(this),Ec(this)){let e=x.trackingContext;if(this.keepAlive_&&!e)x.trackingContext=this;if(this.trackAndCompute())W1(this);x.trackingContext=e}let t=this.value_;if(tr(t))throw t.cause;return t}set(t){if(this.setter_){if(this.isRunningSetter)J(33,this.name_);this.isRunningSetter=!0;try{this.setter_.call(this.scope_,t)}finally{this.isRunningSetter=!1}}else J(34,this.name_)}trackAndCompute(){let t=this.value_,e=this.dependenciesState_===-1,n=this.computeValue_(!0),l=e||tr(t)||tr(n)||!this.equals_(t,n);if(l)this.value_=n;return l}computeValue_(t){this.isComputing=!0;let e=!1,n;if(t)n=Tv(this,this.derivation,this.scope_);else if(x.disableErrorBoundaries===!0)n=this.derivation.call(this.scope_);else try{n=this.derivation.call(this.scope_)}catch(l){n=new hi(l)}return this.isComputing=!1,n}suspend_(){if(!this.keepAlive_)Oc(this),this.value_=void 0}warnAboutUntrackedRead_(){return}toString(){return`${this.name_}[${this.derivation.toString()}]`}valueOf(){return fv(this.get())}[Symbol.toPrimitive](){return this.valueOf()}}var fr=el("ComputedValue",Ze);class hi{constructor(t){this.cause=void 0,this.cause=t}}function tr(t){return t instanceof hi}function Ec(t){switch(t.dependenciesState_){case 0:return!1;case-1:case 2:return!0;case 1:{let n=la(),l=t.observing_,a=l.length;for(let i=0;i<a;i++){let o=l[i];if(fr(o)){if(x.disableErrorBoundaries)o.get();else try{o.get()}catch(r){return Tn(n),!0}if(t.dependenciesState_===2)return Tn(n),!0}}return wv(t),Tn(n),!1}}}function _e(t){return}function Q1(t){}function Tv(t,e,n){wv(t),t.newObserving_=Array(t.runId_===0?100:t.observing_.length),t.unboundDepsCount_=0,t.runId_=++x.runId;let a=x.trackingDerivation;x.trackingDerivation=t,x.inBatch++;let i;if(x.disableErrorBoundaries===!0)i=e.call(n);else try{i=e.call(n)}catch(o){i=new hi(o)}return x.inBatch--,x.trackingDerivation=a,k1(t),Z1(t),i}function Z1(t){return}function k1(t){let e=t.observing_,n=t.observing_=t.newObserving_,l=0,a=0,i=t.unboundDepsCount_;for(let o=0;o<i;o++){let r=n[o];if(r.diffValue===0){if(r.diffValue=1,a!==o)n[a]=r;a++}if(r.dependenciesState_>l)l=r.dependenciesState_}n.length=a,t.newObserving_=null,i=e.length;while(i--){let o=e[i];if(o.diffValue===0)Cv(o,t);o.diffValue=0}while(a--){let o=n[a];if(o.diffValue===1)o.diffValue=0,$1(o,t)}if(l!==0)t.dependenciesState_=l,t.onBecomeStale_()}function Oc(t){let e=t.observing_;t.observing_=[];let n=e.length;while(n--)Cv(e[n],t);t.dependenciesState_=-1}function zv(t){let e=la();try{return t()}finally{Tn(e)}}function la(){let t=x.trackingDerivation;return x.trackingDerivation=null,t}function Tn(t){x.trackingDerivation=t}function wv(t){if(t.dependenciesState_===0)return;t.dependenciesState_=0;let e=t.observing_,n=e.length;while(n--)e[n].lowestObserverState_=0}var Rv=7;class Nc{constructor(){this.version=Rv,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.safeDescriptors=!0}}var yc=!0,J1=!1,x=function(){let t=globalThis;if(t.__mobxInstanceCount>0&&!t.__mobxGlobals)yc=!1;if(t.__mobxGlobals&&t.__mobxGlobals.version!==Rv)yc=!1;if(!yc)return setTimeout(()=>{if(!J1)J(35)},1),new Nc;else if(t.__mobxGlobals){if(t.__mobxInstanceCount+=1,!t.__mobxGlobals.UNCHANGED)t.__mobxGlobals.UNCHANGED={};return t.__mobxGlobals}else return t.__mobxInstanceCount=1,t.__mobxGlobals=new Nc}();function Rc(){return x}function $1(t,e){if(t.observers_.add(e),t.lowestObserverState_>e.dependenciesState_)t.lowestObserverState_=e.dependenciesState_}function Cv(t,e){if(t.observers_.delete(e),t.observers_.size===0)Mv(t)}function Mv(t){if(t.isPendingUnobservation===!1)t.isPendingUnobservation=!0,x.pendingUnobservations.push(t)}function ne(){x.inBatch++}function le(){if(--x.inBatch===0){Bv();let t=x.pendingUnobservations;for(let e=0;e<t.length;e++){let n=t[e];if(n.isPendingUnobservation=!1,n.observers_.size===0){if(n.isBeingObserved)n.isBeingObserved=!1,n.onBUO();if(n instanceof Ze)n.suspend_()}}x.pendingUnobservations=[]}}function Uv(t){Q1(t);let e=x.trackingDerivation;if(e!==null){if(e.runId_!==t.lastAccessedBy_){if(t.lastAccessedBy_=e.runId_,e.newObserving_[e.unboundDepsCount_++]=t,!t.isBeingObserved&&x.trackingContext)t.isBeingObserved=!0,t.onBO()}return t.isBeingObserved}else if(t.observers_.size===0&&x.inBatch>0)Mv(t);return!1}function Vv(t){if(t.lowestObserverState_===2)return;t.lowestObserverState_=2,t.observers_.forEach((e)=>{if(e.dependenciesState_===0)e.onBecomeStale_();e.dependenciesState_=2})}function W1(t){if(t.lowestObserverState_===2)return;t.lowestObserverState_=2,t.observers_.forEach((e)=>{if(e.dependenciesState_===1)e.dependenciesState_=2;else if(e.dependenciesState_===0)t.lowestObserverState_=0})}function F1(t){if(t.lowestObserverState_!==0)return;t.lowestObserverState_=1,t.observers_.forEach((e)=>{if(e.dependenciesState_===0)e.dependenciesState_=1,e.onBecomeStale_()})}class yi{constructor(t="Reaction",e,n,l){this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=-1,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.name_=t,this.onInvalidate_=e,this.errorHandler_=n,this.requiresObservable_=l}get isDisposed(){return Lt(this.flags_,1)}set isDisposed(t){this.flags_=Gt(this.flags_,1,t)}get isScheduled(){return Lt(this.flags_,2)}set isScheduled(t){this.flags_=Gt(this.flags_,2,t)}get isTrackPending(){return Lt(this.flags_,4)}set isTrackPending(t){this.flags_=Gt(this.flags_,4,t)}get isRunning(){return Lt(this.flags_,8)}set isRunning(t){this.flags_=Gt(this.flags_,8,t)}get diffValue(){return Lt(this.flags_,16)?1:0}set diffValue(t){this.flags_=Gt(this.flags_,16,t===1?!0:!1)}onBecomeStale_(){this.schedule_()}schedule_(){if(!this.isScheduled)this.isScheduled=!0,x.pendingReactions.push(this),Bv()}runReaction_(){if(!this.isDisposed){ne(),this.isScheduled=!1;let t=x.trackingContext;if(x.trackingContext=this,Ec(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(e){this.reportExceptionInDerivation_(e)}}x.trackingContext=t,le()}}track(t){if(this.isDisposed)return;ne();let e=!1,n;this.isRunning=!0;let l=x.trackingContext;x.trackingContext=this;let a=Tv(this,t,void 0);if(x.trackingContext=l,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed)Oc(this);if(tr(a))this.reportExceptionInDerivation_(a.cause);le()}reportExceptionInDerivation_(t){if(this.errorHandler_){this.errorHandler_(t,this);return}if(x.disableErrorBoundaries)throw t;let e=`[mobx] uncaught error in '${this}'`;if(!x.suppressReactionErrors)console.error(e,t);x.globalReactionErrorHandlers.forEach((n)=>n(t,this))}dispose(){if(!this.isDisposed){if(this.isDisposed=!0,!this.isRunning)ne(),Oc(this),le()}}getDisposer_(t){let e=()=>{this.dispose(),t==null||t.removeEventListener==null||t.removeEventListener("abort",e)};if(t==null||t.addEventListener==null||t.addEventListener("abort",e),e[M]=this,"dispose"in Symbol&&typeof Symbol.dispose==="symbol")e[Symbol.dispose]=e;return e}toString(){return`Reaction[${this.name_}]`}}var I1=100,P1=(t)=>t();function Bv(){if(x.inBatch>0||x.isRunningReactions)return;P1(tS)}function tS(){x.isRunningReactions=!0;let t=x.pendingReactions,e=0;while(t.length>0){if(++e===I1)console.error(`[mobx] cycle in reaction: ${t[0]}`),t.splice(0);let n=t.splice(0);for(let l=0,a=n.length;l<a;l++)n[l].runReaction_()}x.isRunningReactions=!1}var lr=el("Reaction",yi);var qv="action";var jv="autoAction",eS="autoAction.bound",Hv="<unnamed action>",Lv=sr(qv);var Gv=sr(jv,{autoAction:!0}),nS=sr(eS,{autoAction:!0,bound:!0});function Yv(t){return cr(t,hv)}function Kv(t){return function(l,a){if(a&&typeof a.kind==="string")return hv(t?Gv:Lv,l,a);if(Pl(l))return tl(l.name||Hv,l,t);if(Pl(a))return tl(l,a,t);if(Sc(l))return Yv(sr(t?jv:qv,{name:l,autoAction:t}))}}var Il=Kv(!1);Se(Il,Lv);var Cc=Kv(!0);Se(Cc,Gv);var lS=Yv(nS);function R(t){return Dv(t.name||Hv,!1,t,this,void 0)}function ta(t){return Pl(t)&&t.isMobxAction===!0}var aS=(t)=>t();function iS(t){return t.scheduler?t.scheduler:t.delay?(e)=>setTimeout(e,t.delay):aS}function dr(t,e,n=uv){var l,a;let i=(l=n.name)!=null?l:"Reaction",o=Il(i,n.onError?oS(n.onError,e):e),r=!n.scheduler&&!n.delay,u=iS(n),s=!0,h=!1,g,d=n.equals||Tc,v=new yi(i,()=>{if(s||r)E();else if(!h)h=!0,u(E)},n.onError,n.requiresObservable);function E(){if(h=!1,v.isDisposed)return;let A=!1,z=g;if(v.track(()=>{let f=Y1(!1,()=>t(v));A=s||!d(g,f),g=f}),s&&n.fireImmediately)o(g,z,v);else if(!s&&A)o(g,z,v);s=!1}if(!(n!=null&&(a=n.signal)!=null&&a.aborted))v.schedule_();return v.getDisposer_(n==null?void 0:n.signal)}function oS(t,e){return function(){try{return e.apply(this,arguments)}catch(n){t.call(this,n)}}}function Xv(t,e,n,l){let a=c1(e);return ia(()=>{let i=bi(t,l)[M];er(a).forEach((o)=>{i.extend_(o,a[o],!n?!0:(o in n)?n[o]:!0)})}),t}function Qv(t,e){return Zv(ir(t,e))}function Zv(t){let e={name:t.name_};if(t.observing_&&t.observing_.length>0)e.dependencies=rS(t.observing_).map(Zv);return e}function rS(t){return Array.from(new Set(t))}class kv extends Error{constructor(){super("FLOW_CANCELLED");Object.setPrototypeOf(this,new.target.prototype),this.name="FlowCancellationError"}toString(){return`Error: ${this.message}`}}function uS(t){return cr(t,vv)}var Im=mv("flow"),sS=mv("flow.bound",{bound:!0}),hr=Se(function(e,n){if(n&&typeof n.kind==="string")return vv(Im,e,n);let l=e,a=l.name||"flow",i=function(){let r=this,u=arguments,s=0,h=Il(a,l).apply(r,u),g,d=void 0,v=new Promise(function(A,z){let f=0;g=z;function c(O){d=void 0;let U;try{U=Il(a,h.next).call(h,O)}catch(N){return z(N)}b(U)}function m(O){d=void 0;let U;try{U=Il(a,h.throw).call(h,O)}catch(N){return z(N)}b(U)}function b(O){if(Pl(O==null?void 0:O.then)){O.then(b,z);return}if(O.done)return A(O.value);return d=Promise.resolve(O.value),d.then(c,m)}c(void 0)}),E=a;return v.cancel=Il(E,function(){try{if(d)Pm(d);let A=h.return(void 0),z=Promise.resolve(A.value);z.then(Fl,Fl),Pm(z),g(new kv)}catch(A){g(A)}}),v};return i.isMobXFlow=!0,i},Im),cS=uS(sS);function Pm(t){if(Pl(t.cancel))t.cancel()}function pi(t){return(t==null?void 0:t.isMobXFlow)===!0}function fS(t,e){if(!t)return!1;if(e!==void 0){if(mi(t)){var n,l;let a=t[M];return a.values_.has(e)||!!((n=a.lazyComputedKeys_)!=null&&n.has(e))||!!((l=a.lazyObservableKeys_)!=null&&l.has(e))}return!1}return mi(t)||!!t[M]||Dc(t)||lr(t)||fr(t)}function Jv(t){return fS(t)}function Ke(t,e=void 0){ne();try{return t.apply(e)}finally{le()}}function Wl(t){return t[M]}var dS={has(t,e){return Wl(t).has_(e)},get(t,e){return Wl(t).get_(e)},set(t,e,n){var l;if(!Sc(e))return!1;return(l=Wl(t).set_(e,n,!0))!=null?l:!0},deleteProperty(t,e){var n;if(!Sc(e))return!1;return(n=Wl(t).delete_(e,!0))!=null?n:!0},defineProperty(t,e,n){var l;return(l=Wl(t).defineProperty_(e,n))!=null?l:!0},ownKeys(t){return Wl(t).ownKeys_()},preventExtensions(t){J(13)}};function hS(t,e){var n,l;return t=bi(t,e),(l=(n=t[M]).proxy_)!=null?l:n.proxy_=new Proxy(t,dS)}function te(t){return t.interceptors_!==void 0&&t.interceptors_.length>0}function ee(t,e){let n=la();try{let l=[...t.interceptors_||[]];for(let a=0,i=l.length;a<i;a++){if(e=l[a](e),e&&!e.type)J(14);if(!e)break}return e}finally{Tn(n)}}function re(t){return t.changeListeners_!==void 0&&t.changeListeners_.length>0}function ue(t,e){let n=la(),l=t.changeListeners_;if(!l)return;l=l.slice();for(let a=0,i=l.length;a<i;a++)l[a](e);Tn(n)}var bc=Symbol("mobx-keys");function Je(t,e,n){if(ke(t))return Xv(t,t,e,n);return ia(()=>{let l=bi(t,n)[M];if(!t[bc]){let a=Object.getPrototypeOf(t),i=new Set([...er(t),...er(a)]);i.delete("constructor"),i.delete(M),cv(a,bc,i)}t[bc].forEach((a)=>pS(l,a,!e?!0:(a in e)?e[a]:!0))}),t}function pS(t,e,n){if(n===!0)n=t.defaultAnnotation_;if(n===!1)return;if(Iv(t,n,e),!(e in t.target_))J(1,n.annotationType_,`${t.name_}.${e.toString()}`);let l=t.target_;while(l&&l!==or){let a=Ac(l,e);if(a){let i=n.make_(t,e,a,l);if(i===0)return;if(i===1)break}l=Object.getPrototypeOf(l)}Fv(t,n,e)}var tv="splice",zn="update",mS=1e4,vS={get(t,e){let n=t[M];if(e===M)return n;if(e==="length")return n.getArrayLength_();if(typeof e==="string"&&!isNaN(e))return n.get_(parseInt(e));if(In(xc,e))return xc[e];return t[e]},set(t,e,n){let l=t[M];if(e==="length")l.setArrayLength_(n);if(typeof e==="symbol"||isNaN(e))t[e]=n;else l.set_(parseInt(e),n);return!0},preventExtensions(){J(15)}};class Mc{constructor(t="ObservableArray",e,n){this.owned_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.atom_=new ea(t),this.enhancer_=(l,a)=>e(l,a,"ObservableArray[..]")}dehanceValue_(t){if(this.dehancer!==void 0)return this.dehancer(t);return t}dehanceValues_(t){if(this.dehancer!==void 0&&t.length>0)return t.map(this.dehancer);return t}getArrayLength_(){return this.atom_.reportObserved(),this.values_.length}setArrayLength_(t){if(typeof t!=="number"||isNaN(t)||t<0)J(40,t);let e=this.values_.length;if(t===e)return;else if(t>e){let n=Array.from({length:t-e});this.spliceWithArray_(e,0,n)}else this.spliceWithArray_(t,e-t)}updateArrayLength_(t,e){if(t!==this.lastKnownLength_)J(16);this.lastKnownLength_+=e}spliceWithArray_(t,e,n){_e(this.atom_);let l=this.values_.length;if(t===void 0)t=0;else if(t>l)t=l;else if(t<0)t=Math.max(0,l+t);if(arguments.length===1)e=l-t;else if(e===void 0||e===null)e=0;else e=Math.max(0,Math.min(e,l-t));if(n===void 0)n=_c;if(te(this)){let i=ee(this,{object:this.proxy_,type:tv,index:t,removedCount:e,added:n});if(!i)return _c;e=i.removedCount,n=i.added}n=n.length===0?n:n.map((i)=>this.enhancer_(i,void 0));let a=this.spliceItemsIntoValues_(t,e,n);if(e!==0||n.length!==0)this.notifyArraySplice_(t,n,a);return this.dehanceValues_(a)}spliceItemsIntoValues_(t,e,n){if(n.length<mS)return this.values_.splice(t,e,...n);else{let l=this.values_.slice(t,t+e),a=this.values_.slice(t+e);this.values_.length+=n.length-e;for(let i=0;i<n.length;i++)this.values_[t+i]=n[i];for(let i=0;i<a.length;i++)this.values_[t+n.length+i]=a[i];return l}}notifyArrayChildUpdate_(t,e,n){let a=re(this),i=a?{observableKind:"array",object:this.proxy_,type:zn,debugObjectName:this.atom_.name_,index:t,newValue:e,oldValue:n}:null;if(this.atom_.reportChanged(),a)ue(this,i)}notifyArraySplice_(t,e,n){let a=re(this),i=a?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:tv,index:t,removed:n,added:e,removedCount:n.length,addedCount:e.length}:null;if(this.atom_.reportChanged(),a)ue(this,i)}get_(t){return this.atom_.reportObserved(),this.dehanceValue_(this.values_[t])}set_(t,e){let n=this.values_;if(t<n.length){_e(this.atom_);let l=n[t];if(te(this)){let i=ee(this,{type:zn,object:this.proxy_,index:t,newValue:e});if(!i)return;e=i.newValue}if(e=this.enhancer_(e,l),e!==l)n[t]=e,this.notifyArrayChildUpdate_(t,e,l)}else{let l=Array.from({length:t+1-n.length});l[l.length-1]=e,this.spliceWithArray_(n.length,0,l)}}}function gS(t,e,n="ObservableArray",l=!1){return ia(()=>{let a=new Mc(n,e,l);r1(a.values_,M,a);let i=new Proxy(a.values_,vS);if(a.proxy_=i,t&&t.length)a.spliceWithArray_(0,0,t);return i})}var xc={clear(){return this.splice(0)},replace(t){let e=this[M];return e.spliceWithArray_(0,e.values_.length,t)},toJSON(){return this.slice()},splice(t,e,...n){let l=this[M];switch(arguments.length){case 0:return[];case 1:return l.spliceWithArray_(t);case 2:return l.spliceWithArray_(t,e)}return l.spliceWithArray_(t,e,n)},spliceWithArray(t,e,n){return this[M].spliceWithArray_(t,e,n)},push(...t){let e=this[M];return e.spliceWithArray_(e.values_.length,0,t),e.values_.length},pop(){return this.splice(Math.max(this[M].values_.length-1,0),1)[0]},shift(){return this.splice(0,1)[0]},unshift(...t){let e=this[M];return e.spliceWithArray_(0,0,t),e.values_.length},reverse(){if(x.trackingDerivation)J(37,"reverse");return this.replace(this.slice().reverse()),this},sort(){if(x.trackingDerivation)J(37,"sort");let t=this.slice();return t.sort.apply(t,arguments),this.replace(t),this},remove(t){let e=this[M],n=e.dehanceValues_(e.values_).indexOf(t);if(n>-1)return this.splice(n,1),!0;return!1}};$("at",Yt);$("concat",Yt);$("flat",Yt);$("includes",Yt);$("indexOf",Yt);$("join",Yt);$("lastIndexOf",Yt);$("slice",Yt);$("toString",Yt);$("toLocaleString",Yt);$("toSorted",Yt);$("toSpliced",Yt);$("with",Yt);$("every",se);$("filter",se);$("find",se);$("findIndex",se);$("findLast",se);$("findLastIndex",se);$("flatMap",se);$("forEach",se);$("map",se);$("some",se);$("toReversed",se);$("reduce",$v);$("reduceRight",$v);function $(t,e){if(typeof Array.prototype[t]==="function")xc[t]=e(t)}function Yt(t){return function(){let e=this[M];e.atom_.reportObserved();let n=e.dehanceValues_(e.values_);return n[t].apply(n,arguments)}}function se(t){return function(e,n){let l=this[M];return l.atom_.reportObserved(),l.dehanceValues_(l.values_)[t]((i,o)=>e.call(n,i,o,this))}}function $v(t){return function(){let e=this[M];e.atom_.reportObserved();let n=e.dehanceValues_(e.values_),l=arguments[0];return arguments[0]=(a,i,o)=>l(a,i,o,this),n[t].apply(n,arguments)}}var yS=el("ObservableArrayAdministration",Mc);function Wv(t){return rr(t)&&yS(t[M])}var bS={},An="add",ar="delete";class Uc{constructor(t,e=Pn,n="ObservableMap"){this.enhancer_=void 0,this.name_=void 0,this[M]=bS,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=e,this.name_=n,ia(()=>{if(this.keysAtom_=dv("ObservableMap.keys()"),this.data_=new Map,this.hasMap_=new Map,t)this.merge(t)})}has_(t){return this.data_.has(t)}has(t){if(!x.trackingDerivation)return this.has_(t);let e=this.hasMap_.get(t);if(!e){let n=e=new Dn(this.has_(t),ur,"ObservableMap.key?",!1);this.hasMap_.set(t,n),n.onBUOL=new Set([()=>this.hasMap_.delete(t)])}return e.get()}set(t,e){let n=this.has_(t);if(te(this)){let l=ee(this,{type:n?zn:An,object:this,newValue:e,name:t});if(!l)return this;e=l.newValue}if(n)this.updateValue_(t,e);else this.addValue_(t,e);return this}delete(t){if(_e(this.keysAtom_),te(this)){if(!ee(this,{type:ar,object:this,name:t}))return!1}if(this.has_(t)){let n=re(this),l=n?{observableKind:"map",debugObjectName:this.name_,type:ar,object:this,oldValue:this.data_.get(t).value_,name:t}:null;if(Ke(()=>{var a;this.keysAtom_.reportChanged(),(a=this.hasMap_.get(t))==null||a.setNewValue_(!1),this.data_.get(t).setNewValue_(void 0),this.data_.delete(t)}),n)ue(this,l);return!0}return!1}updateValue_(t,e){let n=this.data_.get(t);if(e=n.prepareNewValue_(e),e!==x.UNCHANGED){let a=re(this),i=a?{observableKind:"map",debugObjectName:this.name_,type:zn,object:this,oldValue:n.value_,name:t,newValue:e}:null;if(n.setNewValue_(e),a)ue(this,i)}}addValue_(t,e){_e(this.keysAtom_),Ke(()=>{var i;let o=new Dn(e,this.enhancer_,"ObservableMap.key",!1);this.data_.set(t,o),e=o.value_,(i=this.hasMap_.get(t))==null||i.setNewValue_(!0),this.keysAtom_.reportChanged()});let n=!1,l=re(this),a=l||n?{observableKind:"map",debugObjectName:this.name_,type:An,object:this,name:t,newValue:e}:null;if(l)ue(this,a)}get(t){if(this.has(t))return this.dehanceValue_(this.data_.get(t).get());return this.dehanceValue_(void 0)}getOrInsert(t,e){if(!this.has(t))this.set(t,e);return this.get(t)}getOrInsertComputed(t,e){if(!this.has(t))this.set(t,e(t));return this.get(t)}dehanceValue_(t){if(this.dehancer!==void 0)return this.dehancer(t);return t}keys(){return this.keysAtom_.reportObserved(),this.data_.keys()}values(){let t=this,e=this.keys();return ev({next(){let{done:n,value:l}=e.next();return{done:n,value:n?void 0:t.get(l)}}})}entries(){let t=this,e=this.keys();return ev({next(){let{done:n,value:l}=e.next();return{done:n,value:n?void 0:[l,t.get(l)]}}})}[Symbol.iterator](){return this.entries()}forEach(t,e){for(let[n,l]of this)t.call(e,l,n,this)}merge(t){if(aa(t))t=new Map(t);return Ke(()=>{if(ke(t))s1(t).forEach((e)=>this.set(e,t[e]));else if(Array.isArray(t))t.forEach(([e,n])=>this.set(e,n));else if(vi(t)){if(!u1(t))J(19,t);t.forEach((e,n)=>this.set(n,e))}else if(t!==null&&t!==void 0)J(20,t)}),this}clear(){Ke(()=>{zv(()=>{for(let t of this.keys())this.delete(t)})})}replace(t){return Ke(()=>{let e=_S(t),n=new Map,l=!1;for(let a of this.data_.keys())if(!e.has(a))if(this.delete(a))l=!0;else{let o=this.data_.get(a);n.set(a,o)}for(let[a,i]of e.entries()){let o=this.data_.has(a);if(this.set(a,i),this.data_.has(a)){let r=this.data_.get(a);if(n.set(a,r),!o)l=!0}}if(!l)if(this.data_.size!==n.size)this.keysAtom_.reportChanged();else{let a=this.data_.keys(),i=n.keys(),o=a.next(),r=i.next();while(!o.done){if(o.value!==r.value){this.keysAtom_.reportChanged();break}o=a.next(),r=i.next()}}this.data_=n}),this}get size(){return this.keysAtom_.reportObserved(),this.data_.size}toString(){return"[object ObservableMap]"}toJSON(){return Array.from(this)}get[Symbol.toStringTag](){return"Map"}}var aa=el("ObservableMap",Uc);function ev(t){return t[Symbol.toStringTag]="MapIterator",tg(t)}function _S(t){if(vi(t)||aa(t))return t;else if(Array.isArray(t))return new Map(t);else if(ke(t)){let e=new Map;for(let n in t)e.set(n,t[n]);return e}else return J(21,t)}var SS={};class Vc{constructor(t,e=Pn,n="ObservableSet"){this.name_=void 0,this[M]=SS,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,this.enhancer_=(l,a)=>e(l,a,n),ia(()=>{if(this.atom_=dv(this.name_),t)this.replace(t)})}dehanceValue_(t){if(this.dehancer!==void 0)return this.dehancer(t);return t}clear(){Ke(()=>{zv(()=>{for(let t of this.data_.values())this.delete(t)})})}forEach(t,e){for(let n of this)t.call(e,n,n,this)}get size(){return this.atom_.reportObserved(),this.data_.size}add(t){if(_e(this.atom_),te(this)){let e=ee(this,{type:An,object:this,newValue:t});if(!e)return this;t=e.newValue}if(!this.has(t)){Ke(()=>{this.data_.add(this.enhancer_(t,void 0)),this.atom_.reportChanged()});let e=!1,n=re(this),l=n||e?{observableKind:"set",debugObjectName:this.name_,type:An,object:this,newValue:t}:null;if(n)ue(this,l)}return this}delete(t){if(te(this)){if(!ee(this,{type:ar,object:this,oldValue:t}))return!1}if(this.has(t)){let n=re(this),l=n?{observableKind:"set",debugObjectName:this.name_,type:ar,object:this,oldValue:t}:null;if(Ke(()=>{this.atom_.reportChanged(),this.data_.delete(t)}),n)ue(this,l);return!0}return!1}has(t){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(t))}entries(){let t=this.values();return nv({next(){let{value:e,done:n}=t.next();return!n?{value:[e,e],done:n}:{value:void 0,done:n}}})}keys(){return this.values()}values(){this.atom_.reportObserved();let t=this,e=this.data_.values();return nv({next(){let{value:n,done:l}=e.next();return!l?{value:t.dehanceValue_(n),done:l}:{value:void 0,done:l}}})}intersection(t){if(xn(t)&&!Xe(t))return t.intersection(this);else return new Set(this).intersection(t)}union(t){if(xn(t)&&!Xe(t))return t.union(this);else return new Set(this).union(t)}difference(t){return new Set(this).difference(t)}symmetricDifference(t){if(xn(t)&&!Xe(t))return t.symmetricDifference(this);else return new Set(this).symmetricDifference(t)}isSubsetOf(t){return new Set(this).isSubsetOf(t)}isSupersetOf(t){return new Set(this).isSupersetOf(t)}isDisjointFrom(t){if(xn(t)&&!Xe(t))return t.isDisjointFrom(this);else return new Set(this).isDisjointFrom(t)}replace(t){if(Xe(t))t=new Set(t);return Ke(()=>{if(Array.isArray(t))this.clear(),t.forEach((e)=>this.add(e));else if(xn(t))this.clear(),t.forEach((e)=>this.add(e));else if(t!==null&&t!==void 0)J(41,t)}),this}toJSON(){return Array.from(this)}toString(){return"[object ObservableSet]"}[Symbol.iterator](){return this.values()}get[Symbol.toStringTag](){return"Set"}}var Xe=el("ObservableSet",Vc);function nv(t){return t[Symbol.toStringTag]="SetIterator",tg(t)}var lv=Object.create(null),av="remove";class Bc{constructor(t,e=new Map,n,l=x1){this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.lazyComputedKeys_=void 0,this.lazyObservableKeys_=void 0,this.target_=t,this.values_=e,this.name_=n,this.defaultAnnotation_=l,this.keysAtom_=new ea("ObservableObject.keys"),this.isPlainObject_=ke(this.target_)}getObservablePropValue_(t){var e,n;return((e=(n=this.values_.get(t))!=null?n:this.materializeLazyComputed_(t))!=null?e:this.materializeLazyObservable_(t)).get()}materializeLazyComputed_(t){var e;let n=(e=this.lazyComputedKeys_)==null?void 0:e.get(t);if(!n)return;if(this.lazyComputedKeys_.delete(t),this.lazyComputedKeys_.size===0)this.lazyComputedKeys_=void 0;let l=n();return this.values_.set(t,l),l}materializeLazyObservable_(t){var e;let n=(e=this.lazyObservableKeys_)==null?void 0:e.get(t);if(!n)return;if(this.lazyObservableKeys_.delete(t),this.lazyObservableKeys_.size===0)this.lazyObservableKeys_=void 0;let l=n();return this.values_.set(t,l),l}setObservablePropValue_(t,e){var n,l;let a=(n=(l=this.values_.get(t))!=null?l:this.materializeLazyComputed_(t))!=null?n:this.materializeLazyObservable_(t);if(a instanceof Ze)return a.set(e),!0;if(te(this)){let i=ee(this,{type:zn,object:this.proxy_||this.target_,name:t,newValue:e});if(!i)return null;e=i.newValue}if(e=a.prepareNewValue_(e),e!==x.UNCHANGED){let i=re(this),o=!1,r=i?{type:zn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:a.value_,name:t,newValue:e}:null;if(a.setNewValue_(e),i)ue(this,r)}return!0}get_(t){if(x.trackingDerivation&&!In(this.target_,t))this.has_(t);return this.target_[t]}set_(t,e,n=!1){if(In(this.target_,t))if(this.values_.has(t))return this.setObservablePropValue_(t,e);else if(n)return Reflect.set(this.target_,t,e);else return this.target_[t]=e,!0;else return this.extend_(t,{value:e,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)}has_(t){if(!x.trackingDerivation)return t in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);let e=this.pendingKeys_.get(t);if(!e)e=new Dn(t in this.target_,ur,"ObservableObject.key?",!1),this.pendingKeys_.set(t,e);return e.get()}extend_(t,e,n,l=!1){if(n===!0)n=this.defaultAnnotation_;if(n===!1)return this.defineProperty_(t,e,l);Iv(this,n,t);let a=n.extend_(this,t,e,l);if(a)Fv(this,n,t);return a}defineProperty_(t,e,n=!1){_e(this.keysAtom_);try{ne();let l=this.delete_(t);if(!l)return l;if(te(this)){let a=ee(this,{object:this.proxy_||this.target_,name:t,type:An,newValue:e.value});if(!a)return null;let{newValue:i}=a;if(e.value!==i)e=Se({},e,{value:i})}if(n){if(!Reflect.defineProperty(this.target_,t,e))return!1}else Qe(this.target_,t,e);this.notifyPropertyAddition_(t,e.value)}finally{le()}return!0}defineObservableProperty_(t,e,n,l=!1){_e(this.keysAtom_);try{ne();let a=this.delete_(t);if(!a)return a;if(te(this)){let u=ee(this,{object:this.proxy_||this.target_,name:t,type:An,newValue:e});if(!u)return null;e=u.newValue}let i=iv(t),o={configurable:x.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:i.get,set:i.set};if(l){if(!Reflect.defineProperty(this.target_,t,o))return!1}else Qe(this.target_,t,o);let r=new Dn(e,n,"ObservableObject.key",!1);this.values_.set(t,r),this.notifyPropertyAddition_(t,r.value_)}finally{le()}return!0}defineComputedProperty_(t,e,n=!1){_e(this.keysAtom_);try{ne();let l=this.delete_(t);if(!l)return l;if(te(this)){if(!ee(this,{object:this.proxy_||this.target_,name:t,type:An,newValue:void 0}))return null}e.name||(e.name="ObservableObject.key"),e.context=this.proxy_||this.target_;let a=iv(t),i={configurable:x.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:a.get,set:a.set};if(n){if(!Reflect.defineProperty(this.target_,t,i))return!1}else Qe(this.target_,t,i);this.values_.set(t,new Ze(e)),this.notifyPropertyAddition_(t,void 0)}finally{le()}return!0}delete_(t,e=!1){if(_e(this.keysAtom_),!In(this.target_,t))return!0;if(te(this)){if(!ee(this,{object:this.proxy_||this.target_,name:t,type:av}))return null}try{var n;ne();let a=re(this),i=!1,o=this.values_.get(t),r=void 0;if(!o&&(a||i)){var l;r=(l=Ac(this.target_,t))==null?void 0:l.value}if(e){if(!Reflect.deleteProperty(this.target_,t))return!1}else delete this.target_[t];if(o){if(this.values_.delete(t),o instanceof Dn)r=o.value_;Vv(o)}if(this.keysAtom_.reportChanged(),(n=this.pendingKeys_)==null||(n=n.get(t))==null||n.set(t in this.target_),a||i){let u={type:av,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:r,name:t};if(a)ue(this,u)}}finally{le()}return!0}notifyPropertyAddition_(t,e){var n;let l=re(this),a=!1;if(l){let i=l?{type:An,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:t,newValue:e}:null;if(l)ue(this,i)}(n=this.pendingKeys_)==null||(n=n.get(t))==null||n.set(!0),this.keysAtom_.reportChanged()}ownKeys_(){return this.keysAtom_.reportObserved(),er(this.target_)}keys_(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)}}function bi(t,e){var n;if(In(t,M))return t;let l=(n=e==null?void 0:e.name)!=null?n:"ObservableObject",a=new Bc(t,new Map,String(l),M1(e));return cv(t,M,a),t}var ES=el("ObservableObjectAdministration",Bc);function iv(t){return lv[t]||(lv[t]={get(){return this[M].getObservablePropValue_(t)},set(e){return this[M].setObservablePropValue_(t,e)}})}function mi(t){if(rr(t))return ES(t[M]);return!1}function Fv(t,e,n){}function Iv(t,e,n){}function ir(t,e){if(typeof t==="object"&&t!==null){if(Wv(t)){if(e!==void 0)J(23);return t[M].atom_}if(Xe(t))return t.atom_;if(aa(t)){if(e===void 0)return t.keysAtom_;let a=t.data_.get(e)||t.hasMap_.get(e);if(!a)J(25,e,ov(t));return a}if(mi(t)){var n,l;if(!e)return J(26);let a=t[M],i=(n=(l=a.values_.get(e))!=null?l:a.materializeLazyComputed_(e))!=null?n:a.materializeLazyObservable_(e);if(!i)J(27,e,ov(t));return i}if(Dc(t)||fr(t)||lr(t))return t}else if(Pl(t)){if(lr(t[M]))return t[M]}J(28)}function Pv(t,e){if(!t)J(29);if(e!==void 0)return Pv(ir(t,e));if(Dc(t)||fr(t)||lr(t))return t;if(aa(t)||Xe(t))return t;if(t[M])return t[M];J(24,t)}function ov(t,e){let n;if(e!==void 0)n=ir(t,e);else if(ta(t))return t.name;else if(mi(t)||aa(t)||Xe(t))n=Pv(t);else n=ir(t);return n.name_}function ia(t){let e=la(),n=!0;ne();try{return t()}finally{le(),Tn(e)}}var cE=or.toString;var rv,OS=((rv=globalThis.Iterator)==null?void 0:rv.prototype)||{};function tg(t){return t[Symbol.iterator]=NS,Se(Object.create(OS),t)}function NS(){return this}var _t=fe(Oe(),1),eg;if(!_t.useState||!_t.useSyncExternalStore)throw Error("mobx-react-lite requires React 18 or later");if(!((Rc==null||(eg=Rc())==null?void 0:eg.version)>=7))throw Error("mobx-react-lite requires mobx at least version 7 to be available");var xS=1e4,AS=1e4;class ug{constructor(t){this.finalize=void 0,this.registrations=new Map,this.sweepTimeout=void 0,this.sweep=(e=xS)=>{clearTimeout(this.sweepTimeout),this.sweepTimeout=void 0;let n=Date.now();if(this.registrations.forEach((l,a)=>{if(n-l.registeredAt>=e)this.finalize(l.value),this.registrations.delete(a)}),this.registrations.size>0)this.scheduleSweep()},this.finalizeAllImmediately=()=>{this.sweep(0)},this.finalize=t}register(t,e,n){this.registrations.set(n,{value:e,registeredAt:Date.now()}),this.scheduleSweep()}unregister(t){this.registrations.delete(t)}scheduleSweep(){if(this.sweepTimeout===void 0)this.sweepTimeout=setTimeout(this.sweep,AS)}}var DS=typeof FinalizationRegistry<"u"?FinalizationRegistry:ug,qc=new DS((t)=>{var e;(e=t.reaction)==null||e.dispose(),t.reaction=null}),TS=!1;function sg(){return TS}function ng(t){t.reaction=new yi(`observer${t.name}`,()=>{t.stateVersion=Symbol(),t.onStoreChange==null||t.onStoreChange()})}function cg(t,e="observed"){if(sg())return t();let n=_t.default.useRef(null);if(!n.current){let o={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:e,subscribe(r){if(qc.unregister(o),o.onStoreChange=r,!o.reaction)ng(o),o.stateVersion=Symbol();return()=>{var u;o.onStoreChange=null,(u=o.reaction)==null||u.dispose(),o.reaction=null}},getSnapshot(){return o.stateVersion}};n.current=o}let l=n.current;if(!l.reaction)ng(l),qc.register(n,l,l);_t.default.useDebugValue(l.reaction,Qv),_t.default.useSyncExternalStore(l.subscribe,l.getSnapshot,l.getSnapshot);let a,i;if(l.reaction.track(()=>{try{a=t()}catch(o){i=o}}),i)throw i;return a}var lg,ag,fg=typeof Symbol==="function"&&Symbol.for,zS=(lg=(ag=Object.getOwnPropertyDescriptor(()=>{},"name"))==null?void 0:ag.configurable)!=null?lg:!1,ig=fg?Symbol.for("react.forward_ref"):typeof _t.forwardRef==="function"&&_t.forwardRef((t)=>null).$$typeof,og=fg?Symbol.for("react.memo"):typeof _t.memo==="function"&&_t.memo((t)=>null).$$typeof;function H(t){if(og&&t.$$typeof===og)throw Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(sg())return t;let e=!1,n=t,l=t.displayName||t.name;if(ig&&t.$$typeof===ig){if(e=!0,n=t.render,typeof n!=="function")throw Error("[mobx-react-lite] `render` property of ForwardRef was not a function")}let a=(i,o)=>cg(()=>n(i,o),l);if(a.displayName=t.displayName,zS)Object.defineProperty(a,"name",{value:t.name,writable:!0,configurable:!0});if(e)a=_t.forwardRef(a);return a=_t.memo(a),RS(t,a),a}var wS={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function RS(t,e){Object.keys(t).forEach((n)=>{if(!wS[n])Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))})}function CS({children:t,render:e}){if(t&&e)console.error("MobX Observer: Do not use children and render in the same time in `Observer`");let n=t||e;if(typeof n!=="function")return null;return cg(n)}CS.displayName="Observer";function pr(t,e){return _t.useState(()=>bt(t(),e,{autoBind:!0}))[0]}var rg,hE=(rg=qc.finalizeAllImmediately)!=null?rg:()=>{};var Ag=fe(Oe(),1);async function ce(t,e){let n=await fetch(t,e),l=await n.json().catch(()=>null);if(!n.ok||l==null)throw Error(l?.error??`http ${n.status} on ${t}`);return l}function dg(){return ce("/drafts")}function hg(t){return ce(`/drafts/${encodeURIComponent(t.module)}/${encodeURIComponent(t.draft)}`)}function pg(t){return ce(`/generate/${encodeURIComponent(t.module)}/${encodeURIComponent(t.draft)}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t.payload)})}function _i(t,e={}){return ce(`/drafts/${encodeURIComponent(t.module)}/${encodeURIComponent(t.draft)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t.values),keepalive:e.keepalive===!0})}function mg(t){return ce(`/drafts/${encodeURIComponent(t.module)}/${encodeURIComponent(t.draft)}`,{method:"DELETE"})}function vg(t){return ce(`/run/${encodeURIComponent(t.module)}`)}function gg(t){return`/run/${encodeURIComponent(t.module)}/preview?t=${t.tick}`}function yg(t){return ce(`/lora-info/${encodeURIComponent(t.host)}/${encodeURIComponent(t.name)}`)}function bg(t){return`/lora-preview/${encodeURIComponent(t.host)}/${encodeURIComponent(t.name)}`}function _g(){return ce("/prompt-enhancers")}function Sg(t){return ce(`/prompt-enhancers/${encodeURIComponent(t.name)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({text:t.text})})}function Eg(t){return ce(`/prompt-enhancers/${encodeURIComponent(t.name)}`,{method:"DELETE"})}async function Og(t){let e=new Uint8Array(await t.file.arrayBuffer()),n="";for(let l=0;l<e.length;l+=32768)n+=String.fromCharCode(...e.subarray(l,l+32768));return ce("/upload",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:t.file.name,dataBase64:btoa(n)})})}async function Ng(t){let e=await fetch(t);if(!e.ok)throw Error(`fetch failed (http ${e.status})`);let n=await e.blob(),l=n.type==="image/png"?n:await MS(n);await navigator.clipboard.write([new ClipboardItem({"image/png":l})])}async function MS(t){let e=await createImageBitmap(t),n=document.createElement("canvas");n.width=e.width,n.height=e.height;let l=n.getContext("2d");if(l==null)throw Error("canvas 2d context unavailable");return l.drawImage(e,0,0),await new Promise((a,i)=>{n.toBlob((o)=>{if(o==null)i(Error("png encode failed"));else a(o)},"image/png")})}var US=Symbol.for("react.transitional.element"),VS=Symbol.for("react.fragment");function xg(t,e,n){var l=null;if(n!==void 0&&(l=""+n),e.key!==void 0&&(l=""+e.key),"key"in e){n={};for(var a in e)a!=="key"&&(n[a]=e[a])}else n=e;return e=n.ref,{$$typeof:US,type:t,key:l,ref:e!==void 0?e:null,props:n}}var oa=VS,p=xg,S=xg;var BS=typeof navigator<"u"&&navigator.clipboard!=null;function qS(){return pr(()=>({copyNote:null,lightbox:null,setCopyNote(t,e){this.copyNote={url:t,text:e}},openLightbox(t){this.lightbox=t},closeLightbox(){this.lightbox=null}}))}var jS=H(function(e){let n=e.local.lightbox;if(Ag.useEffect(()=>{if(n==null)return;let a=(i)=>{if(i.key==="Escape")e.local.closeLightbox()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[n,e.local]),n==null)return null;let l=()=>{Ng(n.url).then(()=>e.local.setCopyNote(n.url,"copied ✓")).catch((a)=>e.local.setCopyNote(n.url,`copy failed: ${a instanceof Error?a.message:String(a)}`))};return p("div",{className:"modal-overlay",onClick:()=>e.local.closeLightbox(),children:S("div",{className:"lightbox",onClick:(a)=>a.stopPropagation(),children:[p("img",{src:n.url,alt:n.title}),S("div",{className:"lightbox-bar",children:[p("span",{className:"hint",title:n.title,children:n.title}),BS?p("button",{type:"button",onClick:l,children:"copy"}):null,p("a",{href:n.url,target:"_blank",rel:"noreferrer",children:"open ↗"}),n.promptId!=null?p("button",{type:"button",title:"remove this result",onClick:()=>{if(n.promptId!=null)e.st.run.remove(n.promptId);e.local.closeLightbox()},children:"delete"}):null,e.local.copyNote?.url===n.url?p("span",{className:"hint",children:e.local.copyNote.text}):null,p("button",{type:"button",title:"close (esc)",onClick:()=>e.local.closeLightbox(),children:"✕"})]})]})})}),HS=H(function(e){let n=e.st.run.runningModule;if(!e.st.run.isRunning||n==null)return null;let l=e.st.run.progressPercent,a=gg({module:n,tick:e.st.run.previewTick});return S("div",{className:"run-card running",children:[S("div",{className:"meta",children:[S("span",{children:["generating ",n,"…"]}),p("span",{children:l!=null?`${Math.round(l)}%`:""})]}),p("div",{className:"progress-track",children:p("div",{className:"progress-fill",style:{width:`${l??0}%`}})}),e.st.run.hasPreview?p("div",{className:"imgs",children:p("button",{type:"button",className:"img-button",onClick:()=>e.local.openLightbox({url:a,title:"latent preview",promptId:null}),children:p("img",{src:a,alt:"latent preview"})})}):null]})}),Dg=H(function(e){let n=qS();if(e.st.run.results.length===0&&!e.st.run.isRunning)return null;return S("div",{className:"gallery",children:[p(HS,{st:e.st,local:n}),e.st.run.results.length>0?S("div",{className:"gallery-head",children:[S("span",{children:[e.st.run.results.length," result",e.st.run.results.length===1?"":"s"]}),p("button",{type:"button",className:"link",onClick:()=>e.st.run.clear(),children:"clear all"})]}):null,e.st.run.results.map((l)=>S("div",{className:"run-card",children:[S("div",{className:"meta",children:[S("span",{children:[l.at," · ",l.module,"/",l.draft," · ",(l.durationMs/1000).toFixed(1),"s",Object.entries(l.seeds).map(([a,i])=>` · ${a}: ${i}`)]}),p("button",{type:"button",className:"link",title:"remove this result",onClick:()=>e.st.run.remove(l.promptId),children:"✕"})]}),S("div",{className:"imgs",children:[l.images.map((a)=>a.url!=null?p("button",{type:"button",className:"img-button",title:a.filename,onClick:()=>{if(a.url!=null)n.openLightbox({url:a.url,title:a.filename,promptId:l.promptId})},children:p("img",{src:a.url,alt:a.filename})},a.filename):S("div",{className:"noimg",children:[a.filename," (not saved locally — no preview)"]},a.filename)),l.images.length===0?p("div",{className:"noimg",children:"no image outputs"}):null]})]},l.promptId)),p(jS,{st:e.st,local:n})]})});var Tg=H(function(e){return S("div",{className:"sidebar",children:[e.st.modules.map((n)=>S("div",{children:[S("div",{className:"side-module",children:[p("span",{className:"name",children:n.module}),p("span",{className:"host",children:n.host})]}),n.drafts.map((l)=>{let a=e.st.form?.moduleKey===n.module&&e.st.form?.draft===l;return p("button",{type:"button",className:a?"side-draft sel":"side-draft",onClick:()=>void e.st.select({module:n.module,draft:l}),children:l},l)})]},n.module)),Object.keys(e.st.loadErrors).length>0?S("div",{className:"side-errors",children:[p("div",{children:"failed to load:"}),Object.entries(e.st.loadErrors).map(([n,l])=>S("div",{children:[p("div",{className:"file",children:n}),p("div",{className:"msg",children:l})]},n))]}):null]})});var iy=fe(Oe(),1);var Gg=fe(Oe(),1);function ua(t){return t==="openrouter"?"https://openrouter.ai/api/v1":"http://localhost:3000"}function mr(t){return t.trim().replace(/\/+$/,"")}function LS(t){let e=mr(t.baseUrl)===""?ua(t.provider):mr(t.baseUrl);return t.provider==="openrouter"?`${e}/models`:`${e}/api/models`}function GS(t){let e=mr(t.baseUrl)===""?ua(t.provider):mr(t.baseUrl);return t.provider==="openrouter"?`${e}/chat/completions`:`${e}/api/chat/completions`}function ra(t){return typeof t==="object"&&t!==null&&!Array.isArray(t)?t:{}}function $e(t){return typeof t==="string"?t:""}function YS(t){let e=ra(t).data;if(!Array.isArray(e))return[];let n=[];for(let l of e){let a=ra(l),i=$e(a.id);if(i==="")continue;let o=a.supported_parameters,r=Array.isArray(o)?o.includes("reasoning"):null;n.push({id:i,name:$e(a.name)===""?i:$e(a.name),reasoning:r})}return n.sort((l,a)=>l.id.localeCompare(a.id)),n}async function zg(t,e){let n=await t.text().catch(()=>"");return Error(`llm ${e} failed: http ${t.status} ${n.slice(0,300)}`)}function wg(t,e){if(t instanceof Error&&t.name==="AbortError")return t;let n=t instanceof Error?t.message:String(t);return Error(`could not reach ${e} (${n}) — is it running, and does it allow this origin? open webui needs CORS_ALLOW_ORIGIN`)}async function Rg(t){let e=LS(t),n;try{n=await fetch(e,{headers:Cg(t)})}catch(l){throw wg(l,e)}if(!n.ok)throw await zg(n,"model list");return YS(await n.json())}function Cg(t){return t.key.trim()===""?{}:{Authorization:`Bearer ${t.key.trim()}`}}function KS(t){let e=t.provider==="openrouter"&&t.effort!=="off"?{reasoning:{effort:t.effort}}:{};return{model:t.model,stream:!0,messages:[{role:"system",content:t.system},{role:"user",content:t.user}],...e}}function XS(t){let e=t.split(`
10
- `),n=e.pop()??"",l=[];for(let a of e){let i=a.trim();if(i===""||i.startsWith(":"))continue;if(i.startsWith("data:"))l.push(i.slice(5).trim())}return{events:l,rest:n}}function QS(t){if(t===""||t==="[DONE]")return null;let e;try{e=JSON.parse(t)}catch{return null}let n=ra(e),l=ra(n.error);if($e(l.message)!=="")throw Error(`llm stream error: ${$e(l.message)}`);let a=n.choices;if(!Array.isArray(a))return null;let i=ra(ra(a[0]).delta),o=$e(i.content),r=$e(i.reasoning)===""?$e(i.reasoning_content):$e(i.reasoning);if(o===""&&r==="")return null;return{content:o,reasoning:r}}class Mg{inside=!1;pending="";feed(t){let e=this.pending+t;this.pending="";let n="",l="";for(;;){let i=this.inside?"</think>":"<think>",o=e.indexOf(i);if(o===-1)break;let r=e.slice(0,o);if(this.inside)l+=r;else n+=r;e=e.slice(o+i.length),this.inside=!this.inside}let a=ZS(e);if(a!==-1)this.pending=e.slice(a),e=e.slice(0,a);if(this.inside)l+=e;else n+=e;return{content:n,reasoning:l}}flush(){let t=this.pending;return this.pending="",this.inside?{content:"",reasoning:t}:{content:t,reasoning:""}}}function ZS(t){let e=t.lastIndexOf("<");if(e===-1)return-1;let n=t.slice(e);return"<think>".startsWith(n)||"</think>".startsWith(n)?e:-1}async function Ug(t){if(t.endpoint.provider==="openrouter"&&t.endpoint.key.trim()==="")throw Error("no openrouter api key — paste one in the enhancer settings");if(t.model.trim()==="")throw Error("no model selected");let e=GS(t.endpoint),n;try{n=await fetch(e,{method:"POST",headers:{...Cg(t.endpoint),"content-type":"application/json"},body:JSON.stringify(KS({...t,provider:t.endpoint.provider})),signal:t.signal})}catch(s){throw wg(s,e)}if(!n.ok)throw await zg(n,"refine");let l=n.body?.getReader();if(l==null)throw Error("llm refine failed: the response carried no stream");let a=new TextDecoder,i=new Mg,o={content:"",reasoning:""},r=(s)=>{if(s.content===""&&s.reasoning==="")return;o.content+=s.content,o.reasoning+=s.reasoning,t.onDelta(s)},u="";for(;;){let s=await l.read();if(s.done)break;u+=a.decode(s.value,{stream:!0});let h=XS(u);u=h.rest;for(let g of h.events){let d=QS(g);if(d==null)continue;let v=i.feed(d.content);r({content:v.content,reasoning:v.reasoning+d.reasoning})}}if(r(i.flush()),o.content.trim()==="")throw Error("the model returned no prompt text — try another model");return o}var qg="comfy-ts-serve-enhancer",kS={openrouter:"anthropic/claude-sonnet-5",openwebui:""},jg=["openrouter","openwebui"];function Hg(t){return t==="openrouter"||t==="openwebui"}function Lg(t){return t==="off"||t==="low"||t==="medium"||t==="high"}function vr(t){let e={};if(typeof t==="object"&&t!==null){for(let[n,l]of Object.entries(t))if(typeof l==="string")e[n]=l}return e}function Vg(t){let e=typeof t==="object"&&t!==null?t:{},n=vr(e.modelByProvider),l=vr(e.baseUrlByProvider);return{provider:Hg(e.provider)?e.provider:"openrouter",keyByProvider:vr(e.keyByProvider),baseUrlByProvider:{openrouter:ua("openrouter"),openwebui:ua("openwebui"),...l},modelByProvider:{...kS,...n},effort:Lg(e.effort)?e.effort:"medium",thinkingOnly:e.thinkingOnly!==!1,presetName:typeof e.presetName==="string"?e.presetName:"",presetByModule:vr(e.presetByModule)}}function Bg(t,e){if(!e.includes(t))return t;for(let n=2;n<1000;n++){let l=`${t} ${n}`;if(!e.includes(l))return l}return`${t} ${e.length+1}`}function JS(){try{return Vg(JSON.parse(localStorage.getItem(qg)??"{}"))}catch{return Vg({})}}class jc{provider;keyByProvider;baseUrlByProvider;modelByProvider;effort;thinkingOnly;presetName;presetByModule;presets=[];presetsState="idle";presetsError="";saveState="saved";saveError="";models=[];modelsState="idle";modelsError="";target=null;targetModule="";original="";result="";thinking="";phase="idle";error="";abort=null;disposer;lastSaved="";constructor(){let t=JS();this.provider=t.provider,this.keyByProvider=t.keyByProvider,this.baseUrlByProvider=t.baseUrlByProvider,this.modelByProvider=t.modelByProvider,this.effort=t.effort,this.thinkingOnly=t.thinkingOnly,this.presetName=t.presetName,this.presetByModule=t.presetByModule,Je(this,{abort:!1,disposer:!1,lastSaved:!1}),this.disposer=dr(()=>{let e=this.preset;return e==null?null:JSON.stringify(e)},(e)=>{if(e==null||e===this.lastSaved)return;this.savePresetNow(JSON.parse(e))},{delay:600})}dispose(){this.disposer()}get apiKey(){return this.keyByProvider[this.provider]??""}get baseUrl(){return this.baseUrlByProvider[this.provider]??ua(this.provider)}get model(){return this.modelByProvider[this.provider]??""}get endpoint(){return{provider:this.provider,baseUrl:this.baseUrl,key:this.apiKey}}get visibleModels(){return this.thinkingOnly?this.models.filter((t)=>t.reasoning!==!1):this.models}get preset(){return this.presets.find((t)=>t.name===this.presetName)??this.presets[0]??null}get isOpen(){return this.target!=null}settingsJSON(){return{provider:this.provider,keyByProvider:this.keyByProvider,baseUrlByProvider:this.baseUrlByProvider,modelByProvider:this.modelByProvider,effort:this.effort,thinkingOnly:this.thinkingOnly,presetName:this.presetName,presetByModule:this.presetByModule}}persist(){try{localStorage.setItem(qg,JSON.stringify(this.settingsJSON()))}catch{}}setProvider(t){if(!Hg(t))return;this.provider=t,this.models=[],this.modelsState="idle",this.modelsError="",this.persist()}setApiKey(t){this.keyByProvider[this.provider]=t.trim(),this.persist()}setBaseUrl(t){this.baseUrlByProvider[this.provider]=t.trim(),this.persist()}setModel(t){this.modelByProvider[this.provider]=t,this.persist()}setEffort(t){if(!Lg(t))return;this.effort=t,this.persist()}toggleThinkingOnly(){this.thinkingOnly=!this.thinkingOnly,this.persist()}async loadPresets(){R(()=>{this.presetsState="loading",this.presetsError=""});try{let t=await _g();R(()=>{if(this.presets=t.enhancers,this.presetsState="idle",!this.presets.some((e)=>e.name===this.presetName))this.presetName=this.presets[0]?.name??"";this.lastSaved=JSON.stringify(this.preset)})}catch(t){R(()=>{this.presetsState="error",this.presetsError=t instanceof Error?t.message:String(t)})}}async savePresetNow(t){R(()=>{this.saveState="saving",this.lastSaved=JSON.stringify(t)});try{let e=await Sg(t);R(()=>{this.presets=e.enhancers,this.saveState="saved",this.saveError=""})}catch(e){R(()=>{this.saveState="error",this.saveError=e instanceof Error?e.message:String(e)})}}selectPreset(t){if(!this.presets.some((e)=>e.name===t))return;if(this.presetName=t,this.lastSaved=JSON.stringify(this.preset),this.targetModule!=="")this.presetByModule[this.targetModule]=t;this.persist()}setPresetText(t){let e=this.preset;if(e==null)return;this.presets=this.presets.map((n)=>n.name===e.name?{...n,text:t}:n)}addPreset(t,e=""){if(t.trim()==="")return;let n=Bg(t.trim(),this.presets.map((l)=>l.name));this.presets=[...this.presets,{name:n,text:e}],this.presetName=n,this.persist(),this.savePresetNow({name:n,text:e})}duplicatePreset(){let t=this.preset;if(t!=null)this.addPreset(`${t.name} copy`,t.text)}async renamePreset(t){let e=this.preset,n=Bg(t.trim(),this.presets.filter((l)=>l.name!==e?.name).map((l)=>l.name));if(e==null||n===""||n===e.name)return;await this.savePresetNow({name:n,text:e.text}),R(()=>{this.presetName=n,this.persist()}),await this.removePresetFile(e.name)}async deletePreset(){let t=this.preset;if(t==null)return;await this.removePresetFile(t.name),R(()=>{for(let[e,n]of Object.entries(this.presetByModule))if(n===t.name)delete this.presetByModule[e];if(!this.presets.some((e)=>e.name===this.presetName))this.presetName=this.presets[0]?.name??"";this.persist()})}async removePresetFile(t){try{let e=await Eg({name:t});R(()=>{this.presets=e.enhancers})}catch(e){R(()=>{this.saveState="error",this.saveError=e instanceof Error?e.message:String(e)})}}openFor(t){this.target=t.v,this.targetModule=t.module,this.original=typeof t.v.value==="string"?t.v.value:"",this.result="",this.thinking="",this.error="",this.phase="idle";let e=this.presetByModule[t.module];if(e!=null)this.presetName=e;if(this.presets.length===0)this.loadPresets()}close(){this.cancel(),this.target=null,this.targetModule=""}setResult(t){this.result=t}setOriginal(t){this.original=t}async loadModels(){R(()=>{this.modelsState="loading",this.modelsError=""});try{let t=await Rg(this.endpoint);R(()=>{this.models=t,this.modelsState="idle"})}catch(t){R(()=>{this.modelsState="error",this.modelsError=t instanceof Error?t.message:String(t)})}}cancel(){if(this.abort?.abort(),this.abort=null,this.phase==="running")this.phase=this.result===""?"idle":"done"}run(){this.runNow()}async runNow(){let t=this.preset;if(t==null||this.phase==="running")return;let e=new AbortController;this.abort=e,R(()=>{this.phase="running",this.error="",this.result="",this.thinking=""});try{await Ug({endpoint:this.endpoint,model:this.model,system:t.text,user:this.original,effort:this.effort,signal:e.signal,onDelta:(n)=>R(()=>{this.result+=n.content,this.thinking+=n.reasoning})}),R(()=>{this.phase="done"})}catch(n){let l=e.signal.aborted;R(()=>{if(this.phase=l?this.result===""?"idle":"done":"error",!l)this.error=n instanceof Error?n.message:String(n)})}finally{if(this.abort===e)this.abort=null}}apply(){let t=this.result.trim();if(this.target==null||t==="")return;this.target.set(t),this.close()}}var $S=["off","low","medium","high"],WS={openrouter:"openrouter (cloud)",openwebui:"open webui (local)"},FS=H(function(e){let n=e.e.visibleModels,l=e.e.provider==="openwebui";return S("div",{children:[p("div",{className:"section-title",children:"provider · keys stay in this browser"}),S("div",{className:"enh-row",children:[p("select",{value:e.e.provider,onChange:(a)=>e.e.setProvider(a.target.value),children:jg.map((a)=>p("option",{value:a,children:WS[a]},a))}),l?p("input",{type:"text",placeholder:"http://localhost:3000",value:e.e.baseUrl,onChange:(a)=>e.e.setBaseUrl(a.target.value),style:{flex:1,minWidth:180}}):null,p("input",{type:"password",placeholder:l?"open webui api key (blank if none)":"sk-or-v1-… (localStorage only)",value:e.e.apiKey,onChange:(a)=>e.e.setApiKey(a.target.value),style:{flex:1,minWidth:160}}),p("button",{type:"button",onClick:()=>void e.e.loadModels(),disabled:e.e.modelsState==="loading",children:e.e.modelsState==="loading"?"loading…":"load models"})]}),S("div",{className:"enh-row",children:[n.length>0?S("select",{value:e.e.model,onChange:(a)=>e.e.setModel(a.target.value),style:{flex:1},children:[n.some((a)=>a.id===e.e.model)?null:S("option",{value:e.e.model,children:[e.e.model," (not in the list)"]}),n.map((a)=>p("option",{value:a.id,children:a.id},a.id))]}):p("input",{type:"text",placeholder:l?"model id, e.g. qwen3:8b":"model id, e.g. anthropic/claude-sonnet-5",value:e.e.model,onChange:(a)=>e.e.setModel(a.target.value),style:{flex:1}}),S("label",{className:"row-inline",title:"hide models that report no reasoning support",children:[p("input",{type:"checkbox",checked:e.e.thinkingOnly,onChange:()=>e.e.toggleThinkingOnly()}),p("span",{className:"hint",children:"thinking only"})]}),l?null:S("label",{className:"row-inline",title:"reasoning effort sent to the model",children:[p("span",{className:"hint",children:"effort"}),p("select",{value:e.e.effort,onChange:(a)=>e.e.setEffort(a.target.value),children:$S.map((a)=>p("option",{value:a,children:a},a))})]})]}),l?p("div",{className:"hint",children:"a local model's <think> block is routed to the thinking pane, never into your prompt"}):null,e.e.modelsError!==""?S("div",{className:"error",children:["\uD83D\uDD34 ",e.e.modelsError]}):null]})}),IS=H(function(e){let n=e.e.preset;if(n==null)return S("div",{children:[p("div",{className:"section-title",children:"master prompt"}),p("div",{className:"hint",children:e.e.presetsState==="loading"?"loading .comfy-ts/prompt-enhancers/…":"no master prompt yet"}),e.e.presetsError!==""?S("div",{className:"error",children:["\uD83D\uDD34 ",e.e.presetsError]}):null,p("button",{type:"button",onClick:()=>e.e.addPreset("refine-prompt"),children:"create one"})]});let l=()=>{let o=window.prompt("rename this master prompt (renames the file)",n.name);if(o!=null)e.e.renamePreset(o)},a=()=>{let o=window.prompt("name the new master prompt","refine-<model>-prompt");if(o!=null)e.e.addPreset(o)},i=()=>{if(window.confirm(`delete master prompt '${n.name}'? the .md file is removed.`))e.e.deletePreset()};return S("div",{children:[S("div",{className:"section-title",children:["master prompt · one per image model · .comfy-ts/prompt-enhancers/",n.name,".md"]}),S("div",{className:"enh-row",children:[p("select",{value:n.name,onChange:(o)=>e.e.selectPreset(o.target.value),style:{flex:1},children:e.e.presets.map((o)=>p("option",{value:o.name,children:o.name},o.name))}),p("button",{type:"button",onClick:a,children:"new"}),p("button",{type:"button",onClick:()=>e.e.duplicatePreset(),children:"duplicate"}),p("button",{type:"button",onClick:l,children:"rename"}),p("button",{type:"button",onClick:i,title:"delete this master prompt file",children:"✕"}),S("span",{className:"hint",children:[e.e.saveState==="saving"?"saving…":null,e.e.saveState==="saved"?"autosaved to disk":null,e.e.saveState==="error"?`\uD83D\uDD34 save failed: ${e.e.saveError}`:null]})]}),p("textarea",{rows:8,value:n.text,onChange:(o)=>e.e.setPresetText(o.target.value)})]})}),PS=H(function(e){let n=e.e;Gg.useEffect(()=>{let a=(i)=>{if(i.key==="Escape")n.close();if(i.key==="Enter"&&(i.metaKey||i.ctrlKey))i.preventDefault(),n.run()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[n]);let l=n.phase==="running";return p("div",{className:"modal-overlay",onClick:()=>n.close(),children:S("div",{className:"modal",onClick:(a)=>a.stopPropagation(),children:[S("div",{className:"modal-head",children:[p("b",{style:{flex:1},children:"✨ enhance prompt"}),p("button",{type:"button",onClick:()=>n.close(),children:"✕"})]}),S("div",{className:"modal-body",children:[p(FS,{e:n}),p(IS,{e:n}),p("div",{className:"section-title",children:"prompt"}),S("div",{className:"enh-cols",children:[S("div",{children:[p("div",{className:"hint",children:"yours (edit before refining, the var is untouched)"}),p("textarea",{rows:8,value:n.original,onChange:(a)=>n.setOriginal(a.target.value)})]}),S("div",{children:[p("div",{className:"hint",children:l?"rewriting…":"rewritten (editable before apply)"}),p("textarea",{rows:8,value:n.result,placeholder:"hit enhance",onChange:(a)=>n.setResult(a.target.value)})]})]}),n.thinking!==""?S("div",{children:[p("div",{className:"section-title",children:"thinking"}),p("div",{className:"enh-think",children:n.thinking})]}):null,n.error!==""?S("div",{className:"error",children:["\uD83D\uDD34 ",n.error]}):null]}),S("div",{className:"modal-foot",children:[l?p("button",{type:"button",onClick:()=>n.cancel(),children:"stop"}):p("button",{type:"button",className:"primary",onClick:()=>n.run(),title:"⌘⏎ / ctrl+⏎",children:"enhance"}),p("button",{type:"button",onClick:()=>n.apply(),disabled:n.result.trim()==="",children:"apply to prompt"}),p("span",{className:"hint",style:{flex:1},children:l?`${n.result.length} chars streamed`:"nothing is written until you apply"}),p("button",{type:"button",className:"link",onClick:()=>n.close(),children:"cancel"})]})]})})}),Yg=H(function(e){let n=e.st.enhancer;return S(oa,{children:[p("button",{type:"button",className:"link",title:"rewrite this prompt with an llm",onClick:()=>n.openFor({v:e.v,module:e.module}),children:"✨ enhance"}),n.target===e.v?p(PS,{e:n}):null]})});var Kg=H(function(e){let n=typeof e.v.value==="string"?e.v.value:"",l=Math.min(12,Math.max(4,n.split(`
11
- `).length+1));return S("div",{children:[p("textarea",{rows:l,value:n,onChange:(a)=>e.v.set(a.target.value)}),S("div",{className:"row-inline",children:[p("span",{className:"hint",children:'// line = comment · "- " line = negative prompt'}),p(Yg,{v:e.v,st:e.st,module:e.module})]})]})}),Xg=H(function(e){return p("input",{type:"text",value:typeof e.v.value==="string"?e.v.value:"",onChange:(n)=>e.v.set(n.target.value)})}),Qg=H(function(e){let n=e.v.desc.kind==="int",l=typeof e.v.value==="number"?e.v.value:0,a=e.v.desc.min,i=e.v.desc.max,o=(r)=>{let u=n?parseInt(r,10):parseFloat(r);if(Number.isFinite(u))e.v.set(u)};return S("div",{className:"row-inline",children:[p("input",{type:"number",value:l,step:n?1:"any",min:a,max:i,onChange:(r)=>o(r.target.value)}),a!=null&&i!=null?p("input",{type:"range",style:{flex:1,minWidth:120},value:l,min:a,max:i,step:n?1:(i-a)/200,onChange:(r)=>o(r.target.value)}):null,a!=null||i!=null?p("span",{className:"hint",children:`${a??"-∞"} … ${i??"∞"}`}):null]})}),Zg=H(function(e){return S("label",{className:"row-inline",style:{cursor:"pointer"},children:[p("input",{type:"checkbox",checked:e.v.value===!0,onChange:(n)=>e.v.set(n.target.checked)}),p("span",{className:"hint",children:e.v.value===!0?"on":"off"})]})}),kg=H(function(e){let n=e.v.desc.choices??[],l=typeof e.v.value==="string"?e.v.value:"";return S("select",{value:l,onChange:(a)=>e.v.set(a.target.value),children:[n.includes(l)?null:p("option",{value:l,disabled:!0,children:l===""?"(unset)":`${l} (not on this host)`}),n.map((a)=>p("option",{value:a,children:a},a))]})});var Jg=fe(Oe(),1);var $g=H(function(e){let n=Jg.useRef(null),l=typeof e.v.value==="string"?e.v.value:"",a=/^https?:\/\//.test(l)?l:e.v.uploadedUrl,i=e.v.desc.extensions??[],o=async(r)=>{if(r==null)return;try{let u=await Og({file:r});e.v.set(u.path),e.v.setUploadedUrl(u.url)}catch(u){alert(`upload failed: ${u instanceof Error?u.message:String(u)}`)}};return S("div",{children:[S("div",{className:"row-inline",children:[p("input",{type:"text",style:{flex:1},placeholder:"local path or http(s) url",value:l,onChange:(r)=>{e.v.set(r.target.value),e.v.setUploadedUrl(null)}}),p("button",{type:"button",onClick:()=>n.current?.click(),children:"upload…"}),l!==""?p("button",{type:"button",title:"clear the image",onClick:()=>{e.v.set(""),e.v.setUploadedUrl(null)},children:"✕"}):null,p("input",{ref:n,type:"file",accept:i.map((r)=>`.${r}`).join(","),style:{display:"none"},onChange:(r)=>{o(r.target.files?.[0]),r.target.value=""}})]}),a!=null&&a!==""?p("div",{className:"img-preview",children:p("img",{src:a,alt:l})}):null]})});var Kc=fe(Oe(),1);function Wg(t){let e={};for(let n of t)if(n.kind!=="seed")e[n.name]=n.value;return e}function Hc(t){if(typeof t==="number"&&Number.isFinite(t))return{mode:"=",value:t};if(t!=null&&typeof t==="object"){let e=t;return{mode:typeof e.mode==="string"?e.mode:"=",value:typeof e.value==="number"&&Number.isFinite(e.value)?e.value:0}}return{mode:"=",value:0}}function Lc(t){if(t!=null&&typeof t==="object"){let e=t;if(typeof e.width==="number"&&typeof e.height==="number")return{width:e.width,height:e.height}}return{width:1024,height:1024}}function tE(t,e){if(t==null||typeof t!=="object"||Array.isArray(t))return{};let n=new Set(e),l={};for(let[a,i]of Object.entries(t))if(n.has(a)&&Gc(i))l[a]=i;return l}function Fg(t,e){if(t.kind==="seed")return Hc(e??t.default);if(t.kind==="size")return Lc(e??t.default);if(t.kind==="loras")return tE(e??t.default,t.options??[]);return e??t.default}function Ig(){return Math.floor(Math.random()*4294967296)}function Gc(t){return t!=null&&t!==!1}function gr(t){if(typeof t==="number"&&Number.isFinite(t))return{model:t,clip:t};if(Array.isArray(t)&&typeof t[0]==="number"&&typeof t[1]==="number")return{model:t[0],clip:t[1]};return{model:1,clip:1}}function Pg(t,e,n,l){let a={...t};if(!n)delete a[e];else{let i=l??gr(t[e]);a[e]=[i.model,i.clip]}return a}function ty(t,e,n){return{...t,[e]:[n.model,n.clip]}}var Yc=60;function eE(t){if(t!=null&&typeof t==="object"&&!Array.isArray(t))return t;return{}}var ey=H(function(e){let n=pr(()=>({open:!1,filter:"",info:new Map,previewFailed:new Set,prevStrength:new Map,paused:new Set,setOpen(y){this.open=y},setFilter(y){this.filter=y},noteInfo(y,D){this.info.set(y,D)},notePreviewFailed(y){this.previewFailed.add(y)},notePrevStrength(y,D){this.prevStrength.set(y,D)},setPaused(y,D){if(D)this.paused.add(y);else this.paused.delete(y)}})),l=eE(e.v.value),a=e.v.desc.options??[],i=e.v.desc.optionLabels??{},o=(y)=>i[y]??y,r=(y)=>Gc(l[y]),u=(y)=>r(y)||n.paused.has(y),s=a.filter(u),h=e.st.showLoraImages,g=e.st.showLoraTitles,d=(y,D)=>{n.setPaused(y,!1);let ct={...l};if(D==null)delete ct[y];else ct[y]=D;e.v.set(ct)},v=(y,D)=>{if(!D)n.notePrevStrength(y,gr(l[y]));n.setPaused(y,!D),e.v.set(Pg(l,y,D,D?n.prevStrength.get(y):void 0))},E=(y,D)=>{if(!r(y)){n.notePrevStrength(y,D);return}e.v.set(ty(l,y,D))},A=(y)=>{let D=r(y)?gr(l[y]):n.prevStrength.get(y)??{model:1,clip:1};return S(oa,{children:[p("span",{className:"st-label",children:"m"}),p("input",{type:"number",step:0.05,value:D.model,onChange:(ct)=>{let wn=parseFloat(ct.target.value);if(Number.isFinite(wn))E(y,{model:wn,clip:D.clip})}}),p("span",{className:"st-label",children:"c"}),p("input",{type:"number",step:0.05,value:D.clip,onChange:(ct)=>{let wn=parseFloat(ct.target.value);if(Number.isFinite(wn))E(y,{model:D.model,clip:wn})}})]})},z=n.open,f=e.host,c=s.join(`
12
- `);Kc.useEffect(()=>{if(!z)return;for(let y of c.split(`
13
- `)){if(y===""||n.info.has(y))continue;n.noteInfo(y,"loading"),yg({host:f,name:y}).then((D)=>n.noteInfo(y,D)).catch(()=>n.noteInfo(y,"error"))}},[z,c,f,n]),Kc.useEffect(()=>{if(!z)return;let y=(D)=>{if(D.key==="Escape")n.setOpen(!1)};return window.addEventListener("keydown",y),()=>window.removeEventListener("keydown",y)},[z,n]);let m=n.filter.toLowerCase(),b=(y)=>y.toLowerCase().includes(m)||o(y).toLowerCase().includes(m),O=a.filter(b),U=O.filter((y)=>!u(y)).slice(0,Yc),N=(y)=>{if(!h)return null;return n.previewFailed.has(y)?p("div",{className:"lora-thumb none",children:"no preview"}):p("img",{className:"lora-thumb",loading:"lazy",src:bg({host:e.host,name:y}),alt:o(y),onError:()=>n.notePreviewFailed(y)},y)},w=S(oa,{children:[p("button",{type:"button",className:h?"mode sel":"mode",title:h?"hide lora images":"show lora images",onClick:()=>e.st.toggleLoraImages(),children:"\uD83D\uDDBC"}),p("button",{type:"button",className:g?"mode sel":"mode",title:g?"hide lora titles":"show lora titles",onClick:()=>e.st.toggleLoraTitles(),children:"\uD83C\uDFF7"})]});return S("div",{children:[S("div",{className:"row-inline",children:[!h&&!g?S("span",{className:"hint",children:[s.length," lora",s.length===1?"":"s"," in the palette"]}):s.map((y)=>S("span",{className:`${h?"lora-chip card":"lora-chip"}${r(y)?"":" off"}`,children:[S("button",{type:"button",className:"lora-toggle",title:r(y)?`${y}
14
- click to pause`:`${y}
15
- paused — click to resume`,onClick:()=>v(y,!r(y)),children:[N(y),g?p("span",{className:"chip-title",children:o(y)}):null,p("span",{className:"chip-state",children:r(y)?"● on":"⏸ paused"})]}),S("span",{className:"chip-controls",children:[A(y),p("button",{type:"button",title:"remove from the palette (the popup adds it back)",onClick:()=>d(y,null),children:"✕"})]})]},y)),p("button",{type:"button",onClick:()=>n.setOpen(!0),children:s.length===0?`add loras… (${a.length})`:"+ add…"}),w]}),n.open?p("div",{className:"modal-overlay",onClick:()=>n.setOpen(!1),children:S("div",{className:"modal",onClick:(y)=>y.stopPropagation(),children:[S("div",{className:"modal-head",children:[p("input",{type:"text",autoFocus:!0,placeholder:`filter ${a.length} loras`,value:n.filter,onChange:(y)=>n.setFilter(y.target.value)}),w,p("button",{type:"button",title:"close (esc)",onClick:()=>n.setOpen(!1),children:"✕"})]}),S("div",{className:"modal-body",children:[s.length>0?S("div",{className:"lora-active-section",children:[S("div",{className:"section-title",children:["your palette (",s.length,")"]}),s.filter(b).map((y)=>{let D=n.info.get(y);return S("div",{className:r(y)?"lora-active-row":"lora-active-row off",children:[N(y),S("div",{className:"lora-active-text",children:[p("div",{className:"lora-label",title:y,children:g?o(y):"···"}),typeof D==="object"&&D.triggerWords.length>0?p("div",{className:"hint",children:D.triggerWords.join(", ")}):p("div",{className:"hint",children:y})]}),p("input",{type:"checkbox",checked:r(y),title:r(y)?"pause (stays in the palette)":"resume",onChange:(ct)=>v(y,ct.target.checked)}),A(y),p("button",{type:"button",title:"remove from the list",onClick:()=>d(y,null),children:"✕"})]},y)})]}):null,p("div",{className:"section-title",children:"all loras — tap to add to the palette"}),p("div",{className:"lora-grid",children:U.map((y)=>S("button",{type:"button",className:"lora-card",title:y,onClick:()=>d(y,[1,1]),children:[N(y),p("div",{className:"lora-label",children:g?o(y):y.slice(0,2)+"···"})]},y))}),O.length-s.filter(b).length>Yc?S("div",{className:"loras-more",children:["… ",O.length-s.filter(b).length-Yc," more — refine the filter"]}):null,O.length===0?S("div",{className:"loras-more",children:["no lora matches '",n.filter,"'"]}):null]})]})}):null]})});var ny=[{mode:"=",label:"fixed",hint:"this exact seed, every run"},{mode:"+",label:"+1",hint:"increments after each run"},{mode:"-",label:"-1",hint:"decrements after each run"},{mode:"?",label:"random",hint:"a fresh random seed each run"}],ly=H(function(e){let n=Hc(e.v.value),l=(a)=>{if(Number.isFinite(a))e.v.set({mode:n.mode,value:Math.max(0,Math.floor(a))})};return S("div",{children:[S("div",{className:"row-inline",children:[ny.map((a)=>p("button",{type:"button",className:n.mode===a.mode?"mode sel":"mode",title:a.hint,onClick:()=>e.v.set({mode:a.mode,value:n.value}),children:a.label},a.mode)),p("input",{type:"number",min:0,value:n.value,onChange:(a)=>l(parseInt(a.target.value,10))}),p("button",{type:"button",title:"roll a random seed now",onClick:()=>l(Ig()),children:"\uD83C\uDFB2"})]}),p("div",{className:"hint",children:ny.find((a)=>a.mode===n.mode)?.hint??n.mode})]})});var ay=H(function(e){let n=Lc(e.v.value),l=e.v.desc.presets??[],a=l.find((o)=>o.width===n.width&&o.height===n.height),i=(o)=>{let r=o.width??n.width,u=o.height??n.height;if(Number.isFinite(r)&&Number.isFinite(u)&&r>0&&u>0)e.v.set({width:Math.floor(r),height:Math.floor(u)})};return S("div",{className:"row-inline",children:[S("select",{value:a?.label??"__custom__",onChange:(o)=>{let r=l.find((u)=>u.label===o.target.value);if(r!=null)e.v.set({width:r.width,height:r.height})},children:[a==null?p("option",{value:"__custom__",children:"custom"}):null,l.map((o)=>S("option",{value:o.label,children:[o.label," (",o.width,"×",o.height,")"]},o.label))]}),p("input",{type:"number",min:1,value:n.width,onChange:(o)=>i({width:Number(o.target.value)})}),"×",p("input",{type:"number",min:1,value:n.height,onChange:(o)=>i({height:Number(o.target.value)})}),p("button",{type:"button",title:"swap width and height",onClick:()=>e.v.set({width:n.height,height:n.width}),children:"⇄"})]})});var nE=H(function(e){switch(e.v.desc.kind){case"prompt":return p(Kg,{v:e.v,st:e.st,module:e.module});case"text":return p(Xg,{v:e.v});case"int":case"float":return p(Qg,{v:e.v});case"seed":return p(ly,{v:e.v});case"toggle":return p(Zg,{v:e.v});case"choice":return p(kg,{v:e.v});case"loras":return p(ey,{v:e.v,host:e.host,st:e.st});case"size":return p(ay,{v:e.v});case"image":return p($g,{v:e.v});default:return S("div",{className:"hint",children:["unsupported var kind '",e.v.desc.kind,"' — use the json api"]})}}),lE=H(function(e){return S("div",{className:"var-row",children:[S("div",{className:"var-label",children:[e.v.desc.label??e.v.name,e.v.dirty?p("button",{type:"button",className:"dirty-dot",title:"changed this session — click to restore the loaded value (autosaves)",onClick:()=>e.v.revert(),children:"●"}):null,p("span",{className:"kind",children:e.v.desc.kind})]}),p("div",{className:"var-control",children:p(nE,{v:e.v,host:e.host,st:e.st,module:e.module})})]})}),aE=H(function(e){let n=e.st.run.queue;if(n.length===0)return null;return S("div",{className:"queue",children:[S("div",{className:"queue-head",children:[S("span",{children:["queue · ",n.length," prompt",n.length===1?"":"s"]}),e.st.run.pendingCount>0?S("button",{type:"button",className:"link",onClick:()=>e.st.run.clearQueue(),children:["clear ",e.st.run.pendingCount," pending"]}):null]}),n.map((l,a)=>S("div",{className:"queue-row",children:[p("span",{className:"queue-ix",children:a+1}),S("span",{className:"queue-name",children:[l.module,"/",l.draft]}),l.sent?p("span",{className:"hint",children:"on the host — past cancelling"}):p("button",{type:"button",title:"drop this queued prompt",onClick:()=>e.st.run.removeQueued(l.id),children:"✕"})]},l.id))]})}),oy=H(function(e){let n=e.st.form;if(iy.useEffect(()=>{let a=(i)=>{if(e.st.enhancer.isOpen)return;if(i.key==="Enter"&&(i.metaKey||i.ctrlKey))i.preventDefault(),e.st.generate()};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[e.st]),n==null)return null;let l=()=>{let a=window.prompt("duplicate draft as…",`${n.draft} copy`);if(a!=null)e.st.duplicateDraft(a)};return S("div",{children:[S("div",{className:"form-head",children:[S("h2",{children:[p("b",{children:n.moduleKey})," / ",n.draft]}),S("span",{className:"hint",children:[n.saveState==="saving"?"saving…":null,n.saveState==="saved"?"autosaved":null,n.saveState==="error"?`\uD83D\uDD34 save failed: ${n.saveError}`:null]}),p("button",{type:"button",className:"link",title:"save these values as a new draft",onClick:l,children:"duplicate…"}),p("button",{type:"button",className:"link danger",title:"delete this draft's file (default resets to the workflow's own values)",onClick:()=>{if(window.confirm(`delete draft '${n.draft}' of ${n.moduleKey}? the file is removed.`))e.st.deleteDraft({module:n.moduleKey,draft:n.draft})},children:"delete"})]}),n.vars.map((a)=>p(lE,{v:a,host:n.host,st:e.st,module:n.moduleKey},`${n.draft}/${a.name}`)),S("div",{className:"runbar",children:[p("button",{type:"button",className:e.st.run.isRunning?"primary pulse":"primary",title:"⌘⏎ / ctrl+⏎ — click again to queue another",onClick:()=>e.st.generate(),children:e.st.run.isRunning?e.st.run.progressPercent!=null?`generating… ${Math.round(e.st.run.progressPercent)}%`:"generating…":"generate"}),p("span",{className:"status",children:n.dirtyCount===0?"draft values":`${n.dirtyCount} var${n.dirtyCount>1?"s":""} changed this session`}),n.dirtyCount>0?p("button",{type:"button",className:"link",onClick:()=>n.revertAll(),children:"revert all"}):null,e.st.run.error!=null?S("span",{className:"error",children:["\uD83D\uDD34 ",e.st.run.error]}):null]}),p(aE,{st:e.st})]})});var ry=H(function(e){if(e.st.phase==="loading")return p("div",{className:"center",children:"loading…"});if(e.st.phase==="error")return p("div",{className:"center",children:S("div",{className:"error",children:["\uD83D\uDD34 ",e.st.bootError]})});return S("div",{className:"app",children:[S("div",{className:"topbar",children:[p("button",{type:"button",className:"burger",title:"toggle the workflow menu",onClick:()=>e.st.toggleSidebar(),children:"☰"}),p("h1",{children:"comfy-ts serve"}),S("span",{className:"dim",children:[e.st.modules.length," workflow",e.st.modules.length===1?"":"s"," · drafts are the base, edits override per run"]})]}),S("div",{className:"cols",children:[e.st.sidebarOpen?p("div",{className:"backdrop",onClick:()=>e.st.toggleSidebar()}):null,e.st.sidebarOpen?p(Tg,{st:e.st}):null,S("div",{className:"main",children:[e.st.formError!=null?S("div",{className:"center error",children:["\uD83D\uDD34 ",e.st.formError]}):null,e.st.formLoading&&e.st.form==null?p("div",{className:"center",children:"loading draft…"}):null,e.st.modules.length===0?p("div",{className:"center",children:"no workflow modules loaded"}):null,S("div",{className:"work",children:[p("div",{className:"form-col",children:p(oy,{st:e.st})}),p("div",{className:"results-col",children:p(Dg,{st:e.st})})]})]})]})]})});class uy{name;desc;initial;value;dirty=!1;uploadedUrl=null;constructor(t,e,n){this.name=t;this.desc=e;this.initial=n;this.value=n,Je(this,{value:na,name:!1,desc:!1,initial:!1})}set(t){this.value=t,this.dirty=!0}setUploadedUrl(t){this.uploadedUrl=t}revert(){this.value=this.initial,this.dirty=!1,this.uploadedUrl=null}snapshot(){return{name:this.name,value:this.value}}}class Xc{moduleKey;draft;vars;host;saveState="saved";saveError=null;disposers=[];saveChain=Promise.resolve(!0);lastSaved;constructor(t,e,n,l){this.moduleKey=t;this.draft=e;this.host=n.host,this.vars=Object.entries(n.vars).map(([a,i])=>new uy(a,i,Fg(i,l[a]))),this.lastSaved=JSON.stringify(Object.fromEntries(this.vars.map((a)=>[a.name,l[a.name]]))),Je(this,{vars:!1,moduleKey:!1,draft:!1,host:!1,disposers:!1,saveChain:!1,lastSaved:!1}),this.disposers.push(dr(()=>JSON.stringify(this.valuesJSON()),()=>void this.save(),{delay:500}))}dispose(t={}){for(let e of this.disposers)e();if(this.disposers=[],t.flush===!1)return;if(JSON.stringify(this.valuesJSON())!==this.lastSaved)this.save()}flushKeepalive(){let t=JSON.stringify(this.valuesJSON());if(t===this.lastSaved)return;_i({module:this.moduleKey,draft:this.draft,values:JSON.parse(t)},{keepalive:!0}).then(()=>R(()=>{this.lastSaved=t,this.saveState="saved"}),(e)=>R(()=>{this.saveState="error",this.saveError=e instanceof Error?e.message:String(e)}))}valuesJSON(){return Object.fromEntries(this.vars.map((t)=>[t.name,t.value]))}queuePayload(){return Wg(this.vars.map((t)=>({name:t.name,kind:t.desc.kind,value:t.value})))}get dirtyCount(){return this.vars.filter((t)=>t.dirty).length}save(){let t=JSON.stringify(this.valuesJSON());if(t===this.lastSaved)return R(()=>{this.saveState="saved",this.saveError=null}),Promise.resolve(!0);return R(()=>{this.saveState="saving"}),this.saveChain=this.saveChain.then(async()=>{try{return await _i({module:this.moduleKey,draft:this.draft,values:JSON.parse(t)}),R(()=>{this.lastSaved=t,this.saveState="saved",this.saveError=null}),!0}catch(e){return R(()=>{this.saveState="error",this.saveError=e instanceof Error?e.message:String(e)}),!1}}),this.saveChain}revertAll(){for(let t of this.vars)t.revert()}}function iE(t){return new Promise((e)=>setTimeout(e,t))}class Qc{queue=[];error=null;results=[];progressPercent=null;hasPreview=!1;previewTick=0;draining=!1;nextId=0;pollGen=0;constructor(){Je(this,{queue:gi,results:gi})}get isRunning(){return this.queue.some((t)=>t.sent)}get runningModule(){return this.queue.find((t)=>t.sent)?.module??null}get pendingCount(){return this.queue.filter((t)=>!t.sent).length}enqueue(t){if(this.queue=[...this.queue,{id:`q${this.nextId++}`,...t,sent:!1}],this.error=null,!this.draining)this.drain()}removeQueued(t){this.queue=this.queue.filter((e)=>e.id!==t||e.sent)}clearQueue(){this.queue=this.queue.filter((t)=>t.sent)}remove(t){this.results=this.results.filter((e)=>e.promptId!==t)}clear(){this.results=[]}async drain(){if(this.draining)return;this.draining=!0;try{while(!0){let t=this.queue.find((n)=>!n.sent);if(t==null)return;R(()=>{this.queue=this.queue.map((n)=>n.id===t.id?{...n,sent:!0}:n),this.progressPercent=null,this.hasPreview=!1});let e=++this.pollGen;this.poll(t.module,e);try{let n=await pg(t);R(()=>{this.results=[{...n,at:new Date().toLocaleTimeString()},...this.results].slice(0,20)})}catch(n){R(()=>{this.error=n instanceof Error?n.message:String(n),this.queue=this.queue.filter((l)=>l.sent&&l.id!==t.id)})}finally{this.pollGen++,R(()=>{this.queue=this.queue.filter((n)=>n.id!==t.id),this.progressPercent=null,this.hasPreview=!1})}}}finally{this.draining=!1}}async poll(t,e){while(e===this.pollGen){if(await iE(700),e!==this.pollGen)return;try{let n=await vg({module:t});R(()=>{if(e!==this.pollGen)return;this.progressPercent=n.percent,this.hasPreview=n.hasPreview,this.previewTick=n.previewSeq??0})}catch{}}}}var sy="comfy-ts-serve-ui";function Zc(){try{return JSON.parse(localStorage.getItem(sy)??"{}")??{}}catch{return{}}}function kc(){return window.matchMedia("(max-width: 800px)").matches}class Jc{phase="loading";bootError="";modules=[];loadErrors={};form=null;formLoading=!1;formError=null;sidebarOpen;showLoraImages;showLoraTitles;run;enhancer;constructor(){this.run=new Qc,this.enhancer=new jc;let t=Zc();this.sidebarOpen=t.sidebar??!kc(),this.showLoraImages=t.loraImages??!0,this.showLoraTitles=t.loraTitles??!0,Je(this,{run:!1,enhancer:!1,form:na,modules:gi}),window.addEventListener("beforeunload",()=>this.form?.flushKeepalive()),document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden")this.form?.flushKeepalive()}),this.boot()}toggleSidebar(){this.sidebarOpen=!this.sidebarOpen,this.persist()}toggleLoraImages(){this.showLoraImages=!this.showLoraImages,this.persist()}toggleLoraTitles(){this.showLoraTitles=!this.showLoraTitles,this.persist()}persist(){try{let t=Zc();localStorage.setItem(sy,JSON.stringify({...t,...this.form!=null?{module:this.form.moduleKey,draft:this.form.draft}:{},sidebar:this.sidebarOpen,loraImages:this.showLoraImages,loraTitles:this.showLoraTitles}))}catch{}}moduleByKey(t){return this.modules.find((e)=>e.module===t)??null}async boot(){try{let t=await dg();R(()=>{this.modules=t.workflows,this.loadErrors=t.loadErrors??{},this.phase="ready"});let e=Zc(),n=(e.module!=null?this.moduleByKey(e.module):null)??this.modules[0];if(n==null)return;let l=e.draft!=null&&n.drafts.includes(e.draft)?e.draft:"default";await this.select({module:n.module,draft:l})}catch(t){R(()=>{this.phase="error",this.bootError=t instanceof Error?t.message:String(t)})}}selectToken=0;async select(t){let e=this.moduleByKey(t.module);if(e==null)return;if(this.form?.moduleKey===t.module&&this.form.draft===t.draft){R(()=>{if(kc())this.sidebarOpen=!1});return}let n=++this.selectToken;R(()=>{if(this.enhancer.close(),this.formLoading=!0,this.formError=null,kc())this.sidebarOpen=!1});let l=this.form;if(l!=null)l.dispose(),await l.save();try{let a=await hg(t);R(()=>{if(n!==this.selectToken)return;this.form=new Xc(t.module,t.draft,e,a.values??{}),this.persist()})}catch(a){R(()=>{if(n!==this.selectToken)return;this.formError=a instanceof Error?a.message:String(a)})}finally{R(()=>{if(n===this.selectToken)this.formLoading=!1})}}generate(){this.generateNow()}async generateNow(){let t=this.form;if(t==null)return;let e=t.queuePayload();if(!await t.save())return;this.run.enqueue({module:t.moduleKey,draft:t.draft,payload:e})}async deleteDraft(t){let e=this.form;if(e!=null&&e.moduleKey===t.module&&e.draft===t.draft)e.dispose({flush:!1}),R(()=>{this.form=null});try{let n=await mg(t);R(()=>{this.modules=this.modules.map((a)=>a.module===t.module?{...a,drafts:n.drafts}:a)});let l=n.drafts.includes("default")?"default":n.drafts[0]??"default";await this.select({module:t.module,draft:l})}catch(n){R(()=>{this.formError=n instanceof Error?n.message:String(n)})}}async duplicateDraft(t){let e=this.form,n=t.trim();if(e==null||n==="")return;if(this.moduleByKey(e.moduleKey)?.drafts.includes(n)===!0&&!window.confirm(`draft '${n}' already exists — overwrite it?`))return;try{let a=await _i({module:e.moduleKey,draft:n,values:e.valuesJSON()});R(()=>{this.modules=this.modules.map((i)=>i.module===e.moduleKey?{...i,drafts:a.drafts}:i)}),await this.select({module:e.moduleKey,draft:n})}catch(a){R(()=>{this.formError=a instanceof Error?a.message:String(a)})}}}var cy=`
3
+ `+is+e+kf}var ls=!1;function os(e,t){if(!e||ls)return"";ls=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var y=function(){throw Error()};if(Object.defineProperty(y.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==="object"&&Reflect.construct){try{Reflect.construct(y,[])}catch(g){var h=g}Reflect.construct(e,[],y)}else{try{y.call()}catch(g){h=g}e.call(y.prototype)}}else{try{throw Error()}catch(g){h=g}(y=e())&&typeof y.catch==="function"&&y.catch(function(){})}}catch(g){if(g&&h&&typeof g.stack==="string")return[g.stack,h.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var l=a.DetermineComponentFrameRoot(),o=l[0],r=l[1];if(o&&r){var u=o.split(`
4
+ `),c=r.split(`
5
+ `);for(i=a=0;a<u.length&&!u[a].includes("DetermineComponentFrameRoot");)a++;for(;i<c.length&&!c[i].includes("DetermineComponentFrameRoot");)i++;if(a===u.length||i===c.length)for(a=u.length-1,i=c.length-1;1<=a&&0<=i&&u[a]!==c[i];)i--;for(;1<=a&&0<=i;a--,i--)if(u[a]!==c[i]){if(a!==1||i!==1)do if(a--,i--,0>i||u[a]!==c[i]){var m=`
6
+ `+u[a].replace(" at new "," at ");return e.displayName&&m.includes("<anonymous>")&&(m=m.replace("<anonymous>",e.displayName)),m}while(1<=a&&0<=i);break}}}finally{ls=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Gn(n):""}function Uy(e,t){switch(e.tag){case 26:case 27:case 5:return Gn(e.type);case 16:return Gn("Lazy");case 13:return e.child!==t&&t!==null?Gn("Suspense Fallback"):Gn("Suspense");case 19:return Gn("SuspenseList");case 0:case 15:return os(e.type,!1);case 11:return os(e.type.render,!1);case 1:return os(e.type,!0);case 31:return Gn("Activity");default:return""}}function Uf(e){try{var t="",n=null;do t+=Uy(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}}var Ys=Object.prototype.hasOwnProperty,Uu=jn,rs=Xl,Vy=$l,Ly=Zl,je=dt,By=Ql,oh=Gl,rh=Kl,Ro=Hn,Hy=Yl,sh=ql,jy=void 0,qy=void 0,vl=null,qe=null;function hn(e){if(typeof jy==="function"&&qy(e),qe&&typeof qe.setStrictMode==="function")try{qe.setStrictMode(vl,e)}catch(t){}}var Ge=Math.clz32?Math.clz32:Ky,{log:Gy,LN2:Yy}=Math;function Ky(e){return e>>>=0,e===0?32:31-(Gy(e)/Yy|0)|0}var Pl=256,Il=262144,eo=4194304;function Yn(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 ar(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var i=0,l=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var r=a&134217727;return r!==0?(a=r&~l,a!==0?i=Yn(a):(o&=r,o!==0?i=Yn(o):n||(n=r&~e,n!==0&&(i=Yn(n))))):(r=a&~l,r!==0?i=Yn(r):o!==0?i=Yn(o):n||(n=a&~e,n!==0&&(i=Yn(n)))),i===0?0:t!==0&&t!==i&&(t&l)===0&&(l=i&-i,n=t&-t,l>=n||l===32&&(n&4194048)!==0)?t:i}function gl(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Xy(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+5000;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 uh(){var e=eo;return eo<<=1,(eo&62914560)===0&&(eo=4194304),e}function ss(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ir(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Qy(e,t,n,a,i,l){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var{entanglements:r,expirationTimes:u,hiddenUpdates:c}=e;for(n=o&~n;0<n;){var m=31-Ge(n),y=1<<m;r[m]=0,u[m]=-1;var h=c[m];if(h!==null)for(c[m]=null,m=0;m<h.length;m++){var g=h[m];g!==null&&(g.lane&=-536870913)}n&=~y}a!==0&&ch(e,a,0),l!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=l&~(o&~t))}function ch(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Ge(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function fh(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Ge(n),i=1<<a;i&t|e[a]&t&&(e[a]|=t),n&=~i}}function dh(e,t){var n=t&-t;return n=(n&42)!==0?1:hh(n),(n&(e.suspendedLanes|t))!==0?0:n}function hh(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 Vu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ph(){var e=X.p;if(e!==0)return e;return e=window.event,e===void 0?32:Cm(e.type)}function Vf(e,t){var n=X.p;try{return X.p=e,t()}finally{X.p=n}}var Dn=Math.random().toString(36).slice(2),_e="__reactFiber$"+Dn,Ce="__reactProps$"+Dn,yl="__reactContainer$"+Dn,Ks="__reactEvents$"+Dn,Zy="__reactListeners$"+Dn,$y="__reactHandles$"+Dn,Lf="__reactResources$"+Dn,bl="__reactMarker$"+Dn;function Lu(e){delete e[_e],delete e[Ce],delete e[Ks],delete e[Zy],delete e[$y]}function Oa(e){var t=e[_e];if(t)return t;for(var n=e.parentNode;n;){if(t=n[yl]||n[_e]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Yd(e);e!==null;){if(n=e[_e])return n;e=Yd(e)}return t}e=n,n=e.parentNode}return null}function ei(e){if(e=e[_e]||e[yl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Ui(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(_(33))}function Va(e){var t=e[Lf];return t||(t=e[Lf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function ge(e){e[bl]=!0}var mh=new Set,vh={};function la(e,t){Ka(e,t),Ka(e+"Capture",t)}function Ka(e,t){vh[e]=t;for(e=0;e<t.length;e++)mh.add(t[e])}var Jy=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]*$"),Bf={},Hf={};function Fy(e){if(Ys.call(Hf,e))return!0;if(Ys.call(Bf,e))return!1;if(Jy.test(e))return Hf[e]=!0;return Bf[e]=!0,!1}function fo(e,t,n){if(Fy(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function to(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Rt(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function Fe(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function gh(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Wy(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get==="function"&&typeof a.set==="function"){var{get:i,set:l}=a;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(o){n=""+o,l.call(this,o)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(o){n=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xs(e){if(!e._valueTracker){var t=gh(e)?"checked":"value";e._valueTracker=Wy(e,t,""+e[t])}}function yh(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=gh(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Mo(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch(t){return e.body}}var Py=/[\n"\\]/g;function Ie(e){return e.replace(Py,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Qs(e,t,n,a,i,l,o,r){if(e.name="",o!=null&&typeof o!=="function"&&typeof o!=="symbol"&&typeof o!=="boolean"?e.type=o:e.removeAttribute("type"),t!=null)if(o==="number"){if(t===0&&e.value===""||e.value!=t)e.value=""+Fe(t)}else e.value!==""+Fe(t)&&(e.value=""+Fe(t));else o!=="submit"&&o!=="reset"||e.removeAttribute("value");t!=null?Zs(e,o,Fe(t)):n!=null?Zs(e,o,Fe(n)):a!=null&&e.removeAttribute("value"),i==null&&l!=null&&(e.defaultChecked=!!l),i!=null&&(e.checked=i&&typeof i!=="function"&&typeof i!=="symbol"),r!=null&&typeof r!=="function"&&typeof r!=="symbol"&&typeof r!=="boolean"?e.name=""+Fe(r):e.removeAttribute("name")}function bh(e,t,n,a,i,l,o,r){if(l!=null&&typeof l!=="function"&&typeof l!=="symbol"&&typeof l!=="boolean"&&(e.type=l),t!=null||n!=null){if(!(l!=="submit"&&l!=="reset"||t!==void 0&&t!==null)){Xs(e);return}n=n!=null?""+Fe(n):"",t=t!=null?""+Fe(t):n,r||t===e.value||(e.value=t),e.defaultValue=t}a=a!=null?a:i,a=typeof a!=="function"&&typeof a!=="symbol"&&!!a,e.checked=r?e.checked:!!a,e.defaultChecked=!!a,o!=null&&typeof o!=="function"&&typeof o!=="symbol"&&typeof o!=="boolean"&&(e.name=o),Xs(e)}function Zs(e,t,n){t==="number"&&Mo(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function La(e,t,n,a){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&a&&(e[n].defaultSelected=!0)}else{n=""+Fe(n),t=null;for(i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,a&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Sh(e,t,n){if(t!=null&&(t=""+Fe(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Fe(n):""}function _h(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(_(92));if(ki(a)){if(1<a.length)throw Error(_(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Fe(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Xs(e)}function Xa(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Iy=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 jf(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n==="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!=="number"||n===0||Iy.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function xh(e,t,n){if(t!=null&&typeof t!=="object")throw Error(_(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var i in t)a=t[i],t.hasOwnProperty(i)&&n[i]!==a&&jf(e,i,a)}else for(var l in t)t.hasOwnProperty(l)&&jf(e,l,t[l])}function Bu(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 eb=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"]]),tb=/^[\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 ho(e){return tb.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Ht(){}var $s=null;function Hu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Aa=null,Ba=null;function qf(e){var t=ei(e);if(t&&(e=t.stateNode)){var n=e[Ce]||null;e:switch(e=t.stateNode,t.type){case"input":if(Qs(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;n=n.querySelectorAll('input[name="'+Ie(""+t)+'"][type="radio"]');for(t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var i=a[Ce]||null;if(!i)throw Error(_(90));Qs(a,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&yh(a)}break e;case"textarea":Sh(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&La(e,!!n.multiple,t,!1)}}}var us=!1;function Eh(e,t,n){if(us)return e(t,n);us=!0;try{var a=e(t);return a}finally{if(us=!1,Aa!==null||Ba!==null){if(vr(),Aa&&(t=Aa,e=Ba,Ba=Aa=null,qf(t),e))for(t=0;t<e.length;t++)qf(e[t])}}}function nl(e,t){var n=e.stateNode;if(n===null)return null;var a=n[Ce]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!=="function")throw Error(_(231,t,typeof n));return n}var Kt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Js=!1;if(Kt)try{Kn={},Object.defineProperty(Kn,"passive",{get:function(){Js=!0}}),window.addEventListener("test",Kn,Kn),window.removeEventListener("test",Kn,Kn)}catch(e){Js=!1}var Kn,pn=null,ju=null,po=null;function wh(){if(po)return po;var e,t=ju,n=t.length,a,i="value"in pn?pn.value:pn.textContent,l=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(a=1;a<=o&&t[n-a]===i[l-a];a++);return po=i.slice(e,1<a?1-a:void 0)}function mo(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 no(){return!0}function Gf(){return!1}function ke(e){function t(n,a,i,l,o){this._reactName=n,this._targetInst=i,this.type=a,this.nativeEvent=l,this.target=o,this.currentTarget=null;for(var r in e)e.hasOwnProperty(r)&&(n=e[r],this[r]=n?n(l):l[r]);return this.isDefaultPrevented=(l.defaultPrevented!=null?l.defaultPrevented:l.returnValue===!1)?no:Gf,this.isPropagationStopped=Gf,this}return ae(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!=="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=no)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!=="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=no)},persist:function(){},isPersistent:no}),t}var oa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lr=ke(oa),Sl=ae({},oa,{view:0,detail:0}),nb=ke(Sl),cs,fs,Ti,or=ae({},Sl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:qu,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){if("movementX"in e)return e.movementX;return e!==Ti&&(Ti&&e.type==="mousemove"?(cs=e.screenX-Ti.screenX,fs=e.screenY-Ti.screenY):fs=cs=0,Ti=e),cs},movementY:function(e){return"movementY"in e?e.movementY:fs}}),Yf=ke(or),ab=ae({},or,{dataTransfer:0}),ib=ke(ab),lb=ae({},Sl,{relatedTarget:0}),ds=ke(lb),ob=ae({},oa,{animationName:0,elapsedTime:0,pseudoElement:0}),rb=ke(ob),sb=ae({},oa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ub=ke(sb),cb=ae({},oa,{data:0}),Kf=ke(cb),fb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},db={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"},hb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function pb(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=hb[e])?!!t[e]:!1}function qu(){return pb}var mb=ae({},Sl,{key:function(e){if(e.key){var t=fb[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=mo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?db[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:qu,charCode:function(e){return e.type==="keypress"?mo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?mo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),vb=ke(mb),gb=ae({},or,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Xf=ke(gb),yb=ae({},Sl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:qu}),bb=ke(yb),Sb=ae({},oa,{propertyName:0,elapsedTime:0,pseudoElement:0}),_b=ke(Sb),xb=ae({},or,{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}),Eb=ke(xb),wb=ae({},oa,{newState:0,oldState:0}),Nb=ke(wb),Ob=[9,13,27,32],Gu=Kt&&"CompositionEvent"in window,Gi=null;Kt&&"documentMode"in document&&(Gi=document.documentMode);var Ab=Kt&&"TextEvent"in window&&!Gi,Nh=Kt&&(!Gu||Gi&&8<Gi&&11>=Gi),Qf=String.fromCharCode(32),Zf=!1;function Oh(e,t){switch(e){case"keyup":return Ob.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ah(e){return e=e.detail,typeof e==="object"&&"data"in e?e.data:null}var Ta=!1;function Tb(e,t){switch(e){case"compositionend":return Ah(t);case"keypress":if(t.which!==32)return null;return Zf=!0,Qf;case"textInput":return e=t.data,e===Qf&&Zf?null:e;default:return null}}function Db(e,t){if(Ta)return e==="compositionend"||!Gu&&Oh(e,t)?(e=wh(),po=ju=pn=null,Ta=!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 Nh&&t.locale!=="ko"?null:t.data;default:return null}}var zb={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 $f(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!zb[e.type]:t==="textarea"?!0:!1}function Th(e,t,n,a){Aa?Ba?Ba.push(a):Ba=[a]:Aa=a,t=Fo(t,"onChange"),0<t.length&&(n=new lr("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Yi=null,al=null;function Rb(e){Sm(e,0)}function rr(e){var t=Ui(e);if(yh(t))return e}function Jf(e,t){if(e==="change")return t}var Dh=!1;if(Kt){if(Kt){if(Li="oninput"in document,!Li)vo=document.createElement("div"),vo.setAttribute("oninput","return;"),Li=typeof vo.oninput==="function";Vi=Li}else Vi=!1;Dh=Vi&&(!document.documentMode||9<document.documentMode)}var Vi,Li,vo;function Ff(){Yi&&(Yi.detachEvent("onpropertychange",zh),al=Yi=null)}function zh(e){if(e.propertyName==="value"&&rr(al)){var t=[];Th(t,al,e,Hu(e)),Eh(Rb,t)}}function Mb(e,t,n){e==="focusin"?(Ff(),Yi=t,al=n,Yi.attachEvent("onpropertychange",zh)):e==="focusout"&&Ff()}function Cb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return rr(al)}function kb(e,t){if(e==="click")return rr(t)}function Ub(e,t){if(e==="input"||e==="change")return rr(t)}function Vb(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ye=typeof Object.is==="function"?Object.is:Vb;function il(e,t){if(Ye(e,t))return!0;if(typeof e!=="object"||e===null||typeof t!=="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var i=n[a];if(!Ys.call(t,i)||!Ye(e[i],t[i]))return!1}return!0}function Wf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Pf(e,t){var n=Wf(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Wf(n)}}function Rh(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rh(e,t.parentNode):("contains"in e)?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Mh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Mo(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==="string"}catch(a){n=!1}if(n)e=t.contentWindow;else break;t=Mo(e.document)}return t}function Yu(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 Lb=Kt&&"documentMode"in document&&11>=document.documentMode,Da=null,Fs=null,Ki=null,Ws=!1;function If(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ws||Da==null||Da!==Mo(a)||(a=Da,("selectionStart"in a)&&Yu(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Ki&&il(Ki,a)||(Ki=a,a=Fo(Fs,"onSelect"),0<a.length&&(t=new lr("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Da)))}function qn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var za={animationend:qn("Animation","AnimationEnd"),animationiteration:qn("Animation","AnimationIteration"),animationstart:qn("Animation","AnimationStart"),transitionrun:qn("Transition","TransitionRun"),transitionstart:qn("Transition","TransitionStart"),transitioncancel:qn("Transition","TransitionCancel"),transitionend:qn("Transition","TransitionEnd")},hs={},Ch={};Kt&&(Ch=document.createElement("div").style,("AnimationEvent"in window)||(delete za.animationend.animation,delete za.animationiteration.animation,delete za.animationstart.animation),("TransitionEvent"in window)||delete za.transitionend.transition);function ra(e){if(hs[e])return hs[e];if(!za[e])return e;var t=za[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Ch)return hs[e]=t[n];return e}var kh=ra("animationend"),Uh=ra("animationiteration"),Vh=ra("animationstart"),Bb=ra("transitionrun"),Hb=ra("transitionstart"),jb=ra("transitioncancel"),Lh=ra("transitionend"),Bh=new Map,Ps="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(" ");Ps.push("scrollEnd");function mt(e,t){Bh.set(e,t),la(t,[e])}var Co=typeof reportError==="function"?reportError:function(e){if(typeof window==="object"&&typeof window.ErrorEvent==="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e==="object"&&e!==null&&typeof e.message==="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==="object"&&typeof process.emit==="function"){process.emit("uncaughtException",e);return}console.error(e)},Je=[],Ra=0,Ku=0;function sr(){for(var e=Ra,t=Ku=Ra=0;t<e;){var n=Je[t];Je[t++]=null;var a=Je[t];Je[t++]=null;var i=Je[t];Je[t++]=null;var l=Je[t];if(Je[t++]=null,a!==null&&i!==null){var o=a.pending;o===null?i.next=i:(i.next=o.next,o.next=i),a.pending=i}l!==0&&Hh(n,i,l)}}function ur(e,t,n,a){Je[Ra++]=e,Je[Ra++]=t,Je[Ra++]=n,Je[Ra++]=a,Ku|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Xu(e,t,n,a){return ur(e,t,n,a),ko(e)}function sa(e,t){return ur(e,null,null,t),ko(e)}function Hh(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var i=!1,l=e.return;l!==null;)l.childLanes|=n,a=l.alternate,a!==null&&(a.childLanes|=n),l.tag===22&&(e=l.stateNode,e===null||e._visibility&1||(i=!0)),e=l,l=l.return;return e.tag===3?(l=e.stateNode,i&&t!==null&&(i=31-Ge(n),e=l.hiddenUpdates,a=e[i],a===null?e[i]=[t]:a.push(t),t.lane=n|536870912),l):null}function ko(e){if(50<Ii)throw Ii=0,bu=null,Error(_(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ma={};function qb(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Be(e,t,n,a){return new qb(e,t,n,a)}function Qu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function qt(e,t){var n=e.alternate;return n===null?(n=Be(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function jh(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function go(e,t,n,a,i,l){var o=0;if(a=e,typeof e==="function")Qu(e)&&(o=1);else if(typeof e==="string")o=Z0(e,n,wt.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Hs:return e=Be(31,n,t,i),e.elementType=Hs,e.lanes=l,e;case wa:return $n(n.children,i,l,t);case ih:o=8,i|=24;break;case Vs:return e=Be(12,n,t,i|2),e.elementType=Vs,e.lanes=l,e;case Ls:return e=Be(13,n,t,i),e.elementType=Ls,e.lanes=l,e;case Bs:return e=Be(19,n,t,i),e.elementType=Bs,e.lanes=l,e;default:if(typeof e==="object"&&e!==null)switch(e.$$typeof){case Bt:o=10;break e;case lh:o=9;break e;case Cu:o=11;break e;case ku:o=14;break e;case rn:o=16,a=null;break e}o=29,n=Error(_(130,e===null?"null":typeof e,"")),a=null}return t=Be(o,n,t,i),t.elementType=e,t.type=a,t.lanes=l,t}function $n(e,t,n,a){return e=Be(7,e,a,t),e.lanes=n,e}function ps(e,t,n){return e=Be(6,e,null,t),e.lanes=n,e}function qh(e){var t=Be(18,null,null,0);return t.stateNode=e,t}function ms(e,t,n){return t=Be(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var ed=new WeakMap;function et(e,t){if(typeof e==="object"&&e!==null){var n=ed.get(e);if(n!==void 0)return n;return t={value:e,source:t,stack:Uf(t)},ed.set(e,t),t}return{value:e,source:t,stack:Uf(t)}}var Ca=[],ka=0,Uo=null,ll=0,We=[],Pe=0,Nn=null,_t=1,xt="";function Vt(e,t){Ca[ka++]=ll,Ca[ka++]=Uo,Uo=e,ll=t}function Gh(e,t,n){We[Pe++]=_t,We[Pe++]=xt,We[Pe++]=Nn,Nn=e;var a=_t;e=xt;var i=32-Ge(a)-1;a&=~(1<<i),n+=1;var l=32-Ge(t)+i;if(30<l){var o=i-i%5;l=(a&(1<<o)-1).toString(32),a>>=o,i-=o,_t=1<<32-Ge(t)+i|n<<i|a,xt=l+e}else _t=1<<l|n<<i|a,xt=e}function Zu(e){e.return!==null&&(Vt(e,1),Gh(e,1,0))}function $u(e){for(;e===Uo;)Uo=Ca[--ka],Ca[ka]=null,ll=Ca[--ka],Ca[ka]=null;for(;e===Nn;)Nn=We[--Pe],We[Pe]=null,xt=We[--Pe],We[Pe]=null,_t=We[--Pe],We[Pe]=null}function Yh(e,t){We[Pe++]=_t,We[Pe++]=xt,We[Pe++]=Nn,_t=t.id,xt=t.overflow,Nn=e}var xe=null,ne=null,G=!1,bn=null,tt=!1,Is=Error(_(519));function On(e){var t=Error(_(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ol(et(t,e)),Is}function td(e){var{stateNode:t,type:n,memoizedProps:a}=e;switch(t[_e]=e,t[Ce]=a,n){case"dialog":H("cancel",t),H("close",t);break;case"iframe":case"object":case"embed":H("load",t);break;case"video":case"audio":for(n=0;n<cl.length;n++)H(cl[n],t);break;case"source":H("error",t);break;case"img":case"image":case"link":H("error",t),H("load",t);break;case"details":H("toggle",t);break;case"input":H("invalid",t),bh(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":H("invalid",t);break;case"textarea":H("invalid",t),_h(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!=="string"&&typeof n!=="number"&&typeof n!=="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||Em(t.textContent,n)?(a.popover!=null&&(H("beforetoggle",t),H("toggle",t)),a.onScroll!=null&&H("scroll",t),a.onScrollEnd!=null&&H("scrollend",t),a.onClick!=null&&(t.onclick=Ht),t=!0):t=!1,t||On(e,!0)}function nd(e){for(xe=e.return;xe;)switch(xe.tag){case 5:case 31:case 13:tt=!1;return;case 27:case 3:tt=!0;return;default:xe=xe.return}}function ba(e){if(e!==xe)return!1;if(!G)return nd(e),G=!0,!1;var t=e.tag,n;if(n=t!==3&&t!==27){if(n=t===5)n=e.type,n=!(n!=="form"&&n!=="button")||Ou(e.type,e.memoizedProps);n=!n}if(n&&ne&&On(e),nd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(_(317));ne=Gd(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(_(317));ne=Gd(e)}else t===27?(t=ne,zn(e.type)?(e=zu,zu=null,ne=e):ne=t):ne=xe?it(e.stateNode.nextSibling):null;return!0}function ea(){ne=xe=null,G=!1}function vs(){var e=bn;return e!==null&&(Re===null?Re=e:Re.push.apply(Re,e),bn=null),e}function ol(e){bn===null?bn=[e]:bn.push(e)}var eu=Nt(null),ua=null,jt=null;function un(e,t,n){P(eu,t._currentValue),t._currentValue=n}function Gt(e){e._currentValue=eu.current,ye(eu)}function tu(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function nu(e,t,n,a){var i=e.child;i!==null&&(i.return=e);for(;i!==null;){var l=i.dependencies;if(l!==null){var o=i.child;l=l.firstContext;e:for(;l!==null;){var r=l;l=i;for(var u=0;u<t.length;u++)if(r.context===t[u]){l.lanes|=n,r=l.alternate,r!==null&&(r.lanes|=n),tu(l.return,n,e),a||(o=null);break e}l=r.next}}else if(i.tag===18){if(o=i.return,o===null)throw Error(_(341));o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),tu(o,n,e),o=null}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}}function ti(e,t,n,a){e=null;for(var i=t,l=!1;i!==null;){if(!l){if((i.flags&524288)!==0)l=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var o=i.alternate;if(o===null)throw Error(_(387));if(o=o.memoizedProps,o!==null){var r=i.type;Ye(i.pendingProps.value,o.value)||(e!==null?e.push(r):e=[r])}}else if(i===To.current){if(o=i.alternate,o===null)throw Error(_(387));o.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(dl):e=[dl])}i=i.return}e!==null&&nu(t,e,n,a),t.flags|=262144}function Vo(e){for(e=e.firstContext;e!==null;){if(!Ye(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ta(e){ua=e,jt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ee(e){return Kh(ua,e)}function ao(e,t){return ua===null&&ta(e),Kh(e,t)}function Kh(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},jt===null){if(e===null)throw Error(_(308));jt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else jt=jt.next=t;return n}var Gb=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Yb=jn,Kb=Hn,fe={$$typeof:Bt,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ju(){return{controller:new Gb,data:new Map,refCount:0}}function _l(e){e.refCount--,e.refCount===0&&Yb(Kb,function(){e.controller.abort()})}var Xi=null,au=0,Qa=0,Ha=null;function Xb(e,t){if(Xi===null){var n=Xi=[];au=0,Qa=Sc(),Ha={status:"pending",value:void 0,then:function(a){n.push(a)}}}return au++,t.then(ad,ad),t}function ad(){if(--au===0&&Xi!==null){Ha!==null&&(Ha.status="fulfilled");var e=Xi;Xi=null,Qa=0,Ha=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Qb(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){a.status="rejected",a.reason=i;for(i=0;i<n.length;i++)(0,n[i])(void 0)}),a}var id=z.S;z.S=function(e,t){tm=je(),typeof t==="object"&&t!==null&&typeof t.then==="function"&&Xb(e,t),id!==null&&id(e,t)};var Jn=Nt(null);function Fu(){var e=Jn.current;return e!==null?e:W.pooledCache}function yo(e,t){t===null?P(Jn,Jn.current):P(Jn,t.pool)}function Xh(){var e=Fu();return e===null?null:{parent:fe._currentValue,pool:e}}var ni=Error(_(460)),Wu=Error(_(474)),cr=Error(_(542)),Lo={then:function(){}};function ld(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Qh(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Ht,Ht),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,rd(e),e;default:if(typeof t.status==="string")t.then(Ht,Ht);else{if(e=W,e!==null&&100<e.shellSuspendCounter)throw Error(_(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=a}},function(a){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,rd(e),e}throw Fn=t,ni}}function Xn(e){try{var t=e._init;return t(e._payload)}catch(n){if(n!==null&&typeof n==="object"&&typeof n.then==="function")throw Fn=n,ni;throw n}}var Fn=null;function od(){if(Fn===null)throw Error(_(459));var e=Fn;return Fn=null,e}function rd(e){if(e===ni||e===cr)throw Error(_(483))}var ja=null,rl=0;function io(e){var t=rl;return rl+=1,ja===null&&(ja=[]),Qh(ja,e,t)}function Di(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function lo(e,t){if(t.$$typeof===My)throw Error(_(525));throw e=Object.prototype.toString.call(t),Error(_(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Zh(e){function t(d,f){if(e){var v=d.deletions;v===null?(d.deletions=[f],d.flags|=16):v.push(f)}}function n(d,f){if(!e)return null;for(;f!==null;)t(d,f),f=f.sibling;return null}function a(d){for(var f=new Map;d!==null;)d.key!==null?f.set(d.key,d):f.set(d.index,d),d=d.sibling;return f}function i(d,f){return d=qt(d,f),d.index=0,d.sibling=null,d}function l(d,f,v){if(d.index=v,!e)return d.flags|=1048576,f;if(v=d.alternate,v!==null)return v=v.index,v<f?(d.flags|=67108866,f):v;return d.flags|=67108866,f}function o(d){return e&&d.alternate===null&&(d.flags|=67108866),d}function r(d,f,v,b){if(f===null||f.tag!==6)return f=ps(v,d.mode,b),f.return=d,f;return f=i(f,v),f.return=d,f}function u(d,f,v,b){var w=v.type;if(w===wa)return m(d,f,v.props.children,b,v.key);if(f!==null&&(f.elementType===w||typeof w==="object"&&w!==null&&w.$$typeof===rn&&Xn(w)===f.type))return f=i(f,v.props),Di(f,v),f.return=d,f;return f=go(v.type,v.key,v.props,null,d.mode,b),Di(f,v),f.return=d,f}function c(d,f,v,b){if(f===null||f.tag!==4||f.stateNode.containerInfo!==v.containerInfo||f.stateNode.implementation!==v.implementation)return f=ms(v,d.mode,b),f.return=d,f;return f=i(f,v.children||[]),f.return=d,f}function m(d,f,v,b,w){if(f===null||f.tag!==7)return f=$n(v,d.mode,b,w),f.return=d,f;return f=i(f,v),f.return=d,f}function y(d,f,v){if(typeof f==="string"&&f!==""||typeof f==="number"||typeof f==="bigint")return f=ps(""+f,d.mode,v),f.return=d,f;if(typeof f==="object"&&f!==null){switch(f.$$typeof){case Wl:return v=go(f.type,f.key,f.props,null,d.mode,v),Di(v,f),v.return=d,v;case Ci:return f=ms(f,d.mode,v),f.return=d,f;case rn:return f=Xn(f),y(d,f,v)}if(ki(f)||Ai(f))return f=$n(f,d.mode,v,null),f.return=d,f;if(typeof f.then==="function")return y(d,io(f),v);if(f.$$typeof===Bt)return y(d,ao(d,f),v);lo(d,f)}return null}function h(d,f,v,b){var w=f!==null?f.key:null;if(typeof v==="string"&&v!==""||typeof v==="number"||typeof v==="bigint")return w!==null?null:r(d,f,""+v,b);if(typeof v==="object"&&v!==null){switch(v.$$typeof){case Wl:return v.key===w?u(d,f,v,b):null;case Ci:return v.key===w?c(d,f,v,b):null;case rn:return v=Xn(v),h(d,f,v,b)}if(ki(v)||Ai(v))return w!==null?null:m(d,f,v,b,null);if(typeof v.then==="function")return h(d,f,io(v),b);if(v.$$typeof===Bt)return h(d,f,ao(d,v),b);lo(d,v)}return null}function g(d,f,v,b,w){if(typeof b==="string"&&b!==""||typeof b==="number"||typeof b==="bigint")return d=d.get(v)||null,r(f,d,""+b,w);if(typeof b==="object"&&b!==null){switch(b.$$typeof){case Wl:return d=d.get(b.key===null?v:b.key)||null,u(f,d,b,w);case Ci:return d=d.get(b.key===null?v:b.key)||null,c(f,d,b,w);case rn:return b=Xn(b),g(d,f,v,b,w)}if(ki(b)||Ai(b))return d=d.get(v)||null,m(f,d,b,w,null);if(typeof b.then==="function")return g(d,f,v,io(b),w);if(b.$$typeof===Bt)return g(d,f,v,ao(f,b),w);lo(f,b)}return null}function x(d,f,v,b){for(var w=null,k=null,O=f,R=f=0,U=null;O!==null&&R<v.length;R++){O.index>R?(U=O,O=null):U=O.sibling;var B=h(d,O,v[R],b);if(B===null){O===null&&(O=U);break}e&&O&&B.alternate===null&&t(d,O),f=l(B,f,R),k===null?w=B:k.sibling=B,k=B,O=U}if(R===v.length)return n(d,O),G&&Vt(d,R),w;if(O===null){for(;R<v.length;R++)O=y(d,v[R],b),O!==null&&(f=l(O,f,R),k===null?w=O:k.sibling=O,k=O);return G&&Vt(d,R),w}for(O=a(O);R<v.length;R++)U=g(O,d,R,v[R],b),U!==null&&(e&&U.alternate!==null&&O.delete(U.key===null?R:U.key),f=l(U,f,R),k===null?w=U:k.sibling=U,k=U);return e&&O.forEach(function(ft){return t(d,ft)}),G&&Vt(d,R),w}function A(d,f,v,b){if(v==null)throw Error(_(151));for(var w=null,k=null,O=f,R=f=0,U=null,B=v.next();O!==null&&!B.done;R++,B=v.next()){O.index>R?(U=O,O=null):U=O.sibling;var ft=h(d,O,B.value,b);if(ft===null){O===null&&(O=U);break}e&&O&&ft.alternate===null&&t(d,O),f=l(ft,f,R),k===null?w=ft:k.sibling=ft,k=ft,O=U}if(B.done)return n(d,O),G&&Vt(d,R),w;if(O===null){for(;!B.done;R++,B=v.next())B=y(d,B.value,b),B!==null&&(f=l(B,f,R),k===null?w=B:k.sibling=B,k=B);return G&&Vt(d,R),w}for(O=a(O);!B.done;R++,B=v.next())B=g(O,d,R,B.value,b),B!==null&&(e&&B.alternate!==null&&O.delete(B.key===null?R:B.key),f=l(B,f,R),k===null?w=B:k.sibling=B,k=B);return e&&O.forEach(function(qr){return t(d,qr)}),G&&Vt(d,R),w}function M(d,f,v,b){if(typeof v==="object"&&v!==null&&v.type===wa&&v.key===null&&(v=v.props.children),typeof v==="object"&&v!==null){switch(v.$$typeof){case Wl:e:{for(var w=v.key;f!==null;){if(f.key===w){if(w=v.type,w===wa){if(f.tag===7){n(d,f.sibling),b=i(f,v.props.children),b.return=d,d=b;break e}}else if(f.elementType===w||typeof w==="object"&&w!==null&&w.$$typeof===rn&&Xn(w)===f.type){n(d,f.sibling),b=i(f,v.props),Di(b,v),b.return=d,d=b;break e}n(d,f);break}else t(d,f);f=f.sibling}v.type===wa?(b=$n(v.props.children,d.mode,b,v.key),b.return=d,d=b):(b=go(v.type,v.key,v.props,null,d.mode,b),Di(b,v),b.return=d,d=b)}return o(d);case Ci:e:{for(w=v.key;f!==null;){if(f.key===w)if(f.tag===4&&f.stateNode.containerInfo===v.containerInfo&&f.stateNode.implementation===v.implementation){n(d,f.sibling),b=i(f,v.children||[]),b.return=d,d=b;break e}else{n(d,f);break}else t(d,f);f=f.sibling}b=ms(v,d.mode,b),b.return=d,d=b}return o(d);case rn:return v=Xn(v),M(d,f,v,b)}if(ki(v))return x(d,f,v,b);if(Ai(v)){if(w=Ai(v),typeof w!=="function")throw Error(_(150));return v=w.call(v),A(d,f,v,b)}if(typeof v.then==="function")return M(d,f,io(v),b);if(v.$$typeof===Bt)return M(d,f,ao(d,v),b);lo(d,v)}return typeof v==="string"&&v!==""||typeof v==="number"||typeof v==="bigint"?(v=""+v,f!==null&&f.tag===6?(n(d,f.sibling),b=i(f,v),b.return=d,d=b):(n(d,f),b=ps(v,d.mode,b),b.return=d,d=b),o(d)):n(d,f)}return function(d,f,v,b){try{rl=0;var w=M(d,f,v,b);return ja=null,w}catch(O){if(O===ni||O===cr)throw O;var k=Be(29,O,null,d.mode);return k.lanes=b,k.return=d,k}finally{}}}var na=Zh(!0),$h=Zh(!1),sn=!1;function Pu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function iu(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 Wn(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Pn(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(K&2)!==0){var i=a.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),a.pending=t,t=ko(e),Hh(e,null,n),t}return ur(e,a,t,n),ko(e)}function Qi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,fh(e,n)}}function gs(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var i=null,l=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};l===null?i=l=o:l=l.next=o,n=n.next}while(n!==null);l===null?i=l=t:l=l.next=t}else i=l=t;n={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:l,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var lu=!1;function Zi(){if(lu){var e=Ha;if(e!==null)throw e}}function $i(e,t,n,a){lu=!1;var i=e.updateQueue;sn=!1;var{firstBaseUpdate:l,lastBaseUpdate:o}=i,r=i.shared.pending;if(r!==null){i.shared.pending=null;var u=r,c=u.next;u.next=null,o===null?l=c:o.next=c,o=u;var m=e.alternate;m!==null&&(m=m.updateQueue,r=m.lastBaseUpdate,r!==o&&(r===null?m.firstBaseUpdate=c:r.next=c,m.lastBaseUpdate=u))}if(l!==null){var y=i.baseState;o=0,m=c=u=null,r=l;do{var h=r.lane&-536870913,g=h!==r.lane;if(g?(q&h)===h:(a&h)===h){h!==0&&h===Qa&&(lu=!0),m!==null&&(m=m.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});e:{var x=e,A=r;h=t;var M=n;switch(A.tag){case 1:if(x=A.payload,typeof x==="function"){y=x.call(M,y,h);break e}y=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=A.payload,h=typeof x==="function"?x.call(M,y,h):x,h===null||h===void 0)break e;y=ae({},y,h);break e;case 2:sn=!0}}h=r.callback,h!==null&&(e.flags|=64,g&&(e.flags|=8192),g=i.callbacks,g===null?i.callbacks=[h]:g.push(h))}else g={lane:h,tag:r.tag,payload:r.payload,callback:r.callback,next:null},m===null?(c=m=g,u=y):m=m.next=g,o|=h;if(r=r.next,r===null)if(r=i.shared.pending,r===null)break;else g=r,r=g.next,g.next=null,i.lastBaseUpdate=g,i.shared.pending=null}while(1);m===null&&(u=y),i.baseState=u,i.firstBaseUpdate=c,i.lastBaseUpdate=m,l===null&&(i.shared.lanes=0),Tn|=o,e.lanes=o,e.memoizedState=y}}function Jh(e,t){if(typeof e!=="function")throw Error(_(191,e));e.call(t)}function Fh(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Jh(n[e],t)}var Za=Nt(null),Bo=Nt(0);function sd(e,t){e=$t,P(Bo,e),P(Za,t),$t=e|t.baseLanes}function ou(){P(Bo,$t),P(Za,Za.current)}function Iu(){$t=Bo.current,ye(Za),ye(Bo)}var Ke=Nt(null),nt=null;function cn(e){var t=e.alternate;P(re,re.current&1),P(Ke,e),nt===null&&(t===null||Za.current!==null?nt=e:t.memoizedState!==null&&(nt=e))}function ru(e){P(re,re.current),P(Ke,e),nt===null&&(nt=e)}function Wh(e){e.tag===22?(P(re,re.current),P(Ke,e),nt===null&&(nt=e)):fn(e)}function fn(){P(re,re.current),P(Ke,Ke.current)}function Le(e){ye(Ke),nt===e&&(nt=null),ye(re)}var re=Nt(0);function Ho(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Tu(n)||Du(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Xt=0,C=null,F=null,ue=null,jo=!1,qa=!1,aa=!1,qo=0,sl=0,Ga=null,Zb=0;function le(){throw Error(_(321))}function ec(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Ye(e[n],t[n]))return!1;return!0}function tc(e,t,n,a,i,l){return Xt=l,C=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,z.H=e===null||e.memoizedState===null?Tp:dc,aa=!1,l=n(a,i),aa=!1,qa&&(l=Ih(t,n,a,i)),Ph(e),l}function Ph(e){z.H=ul;var t=F!==null&&F.next!==null;if(Xt=0,ue=F=C=null,jo=!1,sl=0,Ga=null,t)throw Error(_(300));e===null||de||(e=e.dependencies,e!==null&&Vo(e)&&(de=!0))}function Ih(e,t,n,a){C=e;var i=0;do{if(qa&&(Ga=null),sl=0,qa=!1,25<=i)throw Error(_(301));if(i+=1,ue=F=null,e.updateQueue!=null){var l=e.updateQueue;l.lastEffect=null,l.events=null,l.stores=null,l.memoCache!=null&&(l.memoCache.index=0)}z.H=Dp,l=t(n,a)}while(qa);return l}function $b(){var e=z.H,t=e.useState()[0];return t=typeof t.then==="function"?xl(t):t,e=e.useState()[0],(F!==null?F.memoizedState:null)!==e&&(C.flags|=1024),t}function nc(){var e=qo!==0;return qo=0,e}function ac(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ic(e){if(jo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}jo=!1}Xt=0,ue=F=C=null,qa=!1,sl=qo=0,Ga=null}function Ae(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ue===null?C.memoizedState=ue=e:ue=ue.next=e,ue}function se(){if(F===null){var e=C.alternate;e=e!==null?e.memoizedState:null}else e=F.next;var t=ue===null?C.memoizedState:ue.next;if(t!==null)ue=t,F=e;else{if(e===null){if(C.alternate===null)throw Error(_(467));throw Error(_(310))}F=e,e={memoizedState:F.memoizedState,baseState:F.baseState,baseQueue:F.baseQueue,queue:F.queue,next:null},ue===null?C.memoizedState=ue=e:ue=ue.next=e}return ue}function fr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xl(e){var t=sl;return sl+=1,Ga===null&&(Ga=[]),e=Qh(Ga,e,t),t=C,(ue===null?t.memoizedState:ue.next)===null&&(t=t.alternate,z.H=t===null||t.memoizedState===null?Tp:dc),e}function dr(e){if(e!==null&&typeof e==="object"){if(typeof e.then==="function")return xl(e);if(e.$$typeof===Bt)return Ee(e)}throw Error(_(438,String(e)))}function lc(e){var t=null,n=C.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=C.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=fr(),C.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=Cy;return t.index++,n}function Qt(e,t){return typeof t==="function"?t(e):t}function bo(e){var t=se();return oc(t,F,e)}function oc(e,t,n){var a=e.queue;if(a===null)throw Error(_(311));a.lastRenderedReducer=n;var i=e.baseQueue,l=a.pending;if(l!==null){if(i!==null){var o=i.next;i.next=l.next,l.next=o}t.baseQueue=i=l,a.pending=null}if(l=e.baseState,i===null)e.memoizedState=l;else{t=i.next;var r=o=null,u=null,c=t,m=!1;do{var y=c.lane&-536870913;if(y!==c.lane?(q&y)===y:(Xt&y)===y){var h=c.revertLane;if(h===0)u!==null&&(u=u.next={lane:0,revertLane:0,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),y===Qa&&(m=!0);else if((Xt&h)===h){c=c.next,h===Qa&&(m=!0);continue}else y={lane:0,revertLane:c.revertLane,gesture:null,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},u===null?(r=u=y,o=l):u=u.next=y,C.lanes|=h,Tn|=h;y=c.action,aa&&n(l,y),l=c.hasEagerState?c.eagerState:n(l,y)}else h={lane:y,revertLane:c.revertLane,gesture:c.gesture,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},u===null?(r=u=h,o=l):u=u.next=h,C.lanes|=y,Tn|=y;c=c.next}while(c!==null&&c!==t);if(u===null?o=l:u.next=r,!Ye(l,e.memoizedState)&&(de=!0,m&&(n=Ha,n!==null)))throw n;e.memoizedState=l,e.baseState=o,e.baseQueue=u,a.lastRenderedState=l}return i===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function ys(e){var t=se(),n=t.queue;if(n===null)throw Error(_(311));n.lastRenderedReducer=e;var{dispatch:a,pending:i}=n,l=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do l=e(l,o.action),o=o.next;while(o!==i);Ye(l,t.memoizedState)||(de=!0),t.memoizedState=l,t.baseQueue===null&&(t.baseState=l),n.lastRenderedState=l}return[l,a]}function ep(e,t,n){var a=C,i=se(),l=G;if(l){if(n===void 0)throw Error(_(407));n=n()}else n=t();var o=!Ye((F||i).memoizedState,n);if(o&&(i.memoizedState=n,de=!0),i=i.queue,rc(ap.bind(null,a,i,e),[e]),i.getSnapshot!==t||o||ue!==null&&ue.memoizedState.tag&1){if(a.flags|=2048,$a(9,{destroy:void 0},np.bind(null,a,i,n,t),null),W===null)throw Error(_(349));l||(Xt&127)!==0||tp(a,t,n)}return n}function tp(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=C.updateQueue,t===null?(t=fr(),C.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function np(e,t,n,a){t.value=n,t.getSnapshot=a,ip(t)&&lp(e)}function ap(e,t,n){return n(function(){ip(t)&&lp(e)})}function ip(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Ye(e,n)}catch(a){return!0}}function lp(e){var t=sa(e,2);t!==null&&Me(t,e,2)}function su(e){var t=Ae();if(typeof e==="function"){var n=e;if(e=n(),aa){hn(!0);try{n()}finally{hn(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qt,lastRenderedState:e},t}function op(e,t,n,a){return e.baseState=n,oc(e,F,typeof a==="function"?a:Qt)}function Jb(e,t,n,a,i){if(pr(e))throw Error(_(485));if(e=t.action,e!==null){var l={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(o){l.listeners.push(o)}};z.T!==null?n(!0):l.isTransition=!1,a(l),n=t.pending,n===null?(l.next=t.pending=l,rp(t,l)):(l.next=n.next,t.pending=n.next=l)}}function rp(e,t){var{action:n,payload:a}=t,i=e.state;if(t.isTransition){var l=z.T,o={};z.T=o;try{var r=n(i,a),u=z.S;u!==null&&u(o,r),ud(e,t,r)}catch(c){uu(e,t,c)}finally{l!==null&&o.types!==null&&(l.types=o.types),z.T=l}}else try{l=n(i,a),ud(e,t,l)}catch(c){uu(e,t,c)}}function ud(e,t,n){n!==null&&typeof n==="object"&&typeof n.then==="function"?n.then(function(a){cd(e,t,a)},function(a){return uu(e,t,a)}):cd(e,t,n)}function cd(e,t,n){t.status="fulfilled",t.value=n,sp(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,rp(e,n)))}function uu(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,sp(t),t=t.next;while(t!==a)}e.action=null}function sp(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function up(e,t){return t}function fd(e,t){if(G){var n=W.formState;if(n!==null){e:{var a=C;if(G){if(ne){t:{var i=ne;for(var l=tt;i.nodeType!==8;){if(!l){i=null;break t}if(i=it(i.nextSibling),i===null){i=null;break t}}l=i.data,i=l==="F!"||l==="F"?i:null}if(i){ne=it(i.nextSibling),a=i.data==="F!";break e}}On(a)}a=!1}a&&(t=n[0])}}return n=Ae(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:up,lastRenderedState:t},n.queue=a,n=Np.bind(null,C,a),a.dispatch=n,a=su(!1),l=fc.bind(null,C,!1,a.queue),a=Ae(),i={state:t,dispatch:null,action:e,pending:null},a.queue=i,n=Jb.bind(null,C,i,l,n),i.dispatch=n,a.memoizedState=e,[t,n,!1]}function dd(e){var t=se();return cp(t,F,e)}function cp(e,t,n){if(t=oc(e,t,up)[0],e=bo(Qt)[0],typeof t==="object"&&t!==null&&typeof t.then==="function")try{var a=xl(t)}catch(o){if(o===ni)throw cr;throw o}else a=t;t=se();var i=t.queue,l=i.dispatch;return n!==t.memoizedState&&(C.flags|=2048,$a(9,{destroy:void 0},Fb.bind(null,i,n),null)),[a,l,e]}function Fb(e,t){e.action=t}function hd(e){var t=se(),n=F;if(n!==null)return cp(t,n,e);se(),t=t.memoizedState,n=se();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function $a(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=C.updateQueue,t===null&&(t=fr(),C.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function fp(){return se().memoizedState}function So(e,t,n,a){var i=Ae();C.flags|=e,i.memoizedState=$a(1|t,{destroy:void 0},n,a===void 0?null:a)}function hr(e,t,n,a){var i=se();a=a===void 0?null:a;var l=i.memoizedState.inst;F!==null&&a!==null&&ec(a,F.memoizedState.deps)?i.memoizedState=$a(t,l,n,a):(C.flags|=e,i.memoizedState=$a(1|t,l,n,a))}function pd(e,t){So(8390656,8,e,t)}function rc(e,t){hr(2048,8,e,t)}function Wb(e){C.flags|=4;var t=C.updateQueue;if(t===null)t=fr(),C.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function dp(e){var t=se().memoizedState;return Wb({ref:t,nextImpl:e}),function(){if((K&2)!==0)throw Error(_(440));return t.impl.apply(void 0,arguments)}}function hp(e,t){return hr(4,2,e,t)}function pp(e,t){return hr(4,4,e,t)}function mp(e,t){if(typeof t==="function"){e=e();var n=t(e);return function(){typeof n==="function"?n():t(null)}}if(t!==null&&t!==void 0)return e=e(),t.current=e,function(){t.current=null}}function vp(e,t,n){n=n!==null&&n!==void 0?n.concat([e]):null,hr(4,4,mp.bind(null,t,e),n)}function sc(){}function gp(e,t){var n=se();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&ec(t,a[1]))return a[0];return n.memoizedState=[e,t],e}function yp(e,t){var n=se();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&ec(t,a[1]))return a[0];if(a=e(),aa){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[a,t],a}function uc(e,t,n){if(n===void 0||(Xt&1073741824)!==0&&(q&261930)===0)return e.memoizedState=t;return e.memoizedState=n,e=am(),C.lanes|=e,Tn|=e,n}function bp(e,t,n,a){if(Ye(n,t))return n;if(Za.current!==null)return e=uc(e,n,a),Ye(e,t)||(de=!0),e;if((Xt&42)===0||(Xt&1073741824)!==0&&(q&261930)===0)return de=!0,e.memoizedState=n;return e=am(),C.lanes|=e,Tn|=e,t}function Sp(e,t,n,a,i){var l=X.p;X.p=l!==0&&8>l?l:8;var o=z.T,r={};z.T=r,fc(e,!1,t,n);try{var u=i(),c=z.S;if(c!==null&&c(r,u),u!==null&&typeof u==="object"&&typeof u.then==="function"){var m=Qb(u,a);Ji(e,t,m,at(e))}else Ji(e,t,a,at(e))}catch(y){Ji(e,t,{then:function(){},status:"rejected",reason:y},at())}finally{X.p=l,o!==null&&r.types!==null&&(o.types=r.types),z.T=o}}function Pb(){}function cu(e,t,n,a){if(e.tag!==5)throw Error(_(476));var i=_p(e).queue;Sp(e,i,t,Zn,n===null?Pb:function(){return xp(e),n(a)})}function _p(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Zn,baseState:Zn,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qt,lastRenderedState:Zn},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qt,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function xp(e){var t=_p(e);t.next===null&&(t=e.alternate.memoizedState),Ji(e,t.next.queue,{},at())}function cc(){return Ee(dl)}function Ep(){return se().memoizedState}function wp(){return se().memoizedState}function Ib(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=at();e=Wn(n);var a=Pn(t,e,n);a!==null&&(Me(a,t,n),Qi(a,t,n)),t={cache:Ju()},e.payload=t;return}t=t.return}}function e0(e,t,n){var a=at();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},pr(e)?Op(t,n):(n=Xu(e,t,n,a),n!==null&&(Me(n,e,a),Ap(n,t,a)))}function Np(e,t,n){var a=at();Ji(e,t,n,a)}function Ji(e,t,n,a){var i={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(pr(e))Op(t,i);else{var l=e.alternate;if(e.lanes===0&&(l===null||l.lanes===0)&&(l=t.lastRenderedReducer,l!==null))try{var o=t.lastRenderedState,r=l(o,n);if(i.hasEagerState=!0,i.eagerState=r,Ye(r,o))return ur(e,t,i,0),W===null&&sr(),!1}catch(u){}finally{}if(n=Xu(e,t,i,a),n!==null)return Me(n,e,a),Ap(n,t,a),!0}return!1}function fc(e,t,n,a){if(a={lane:2,revertLane:Sc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},pr(e)){if(t)throw Error(_(479))}else t=Xu(e,n,a,2),t!==null&&Me(t,e,2)}function pr(e){var t=e.alternate;return e===C||t!==null&&t===C}function Op(e,t){qa=jo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ap(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,fh(e,n)}}var ul={readContext:Ee,use:dr,useCallback:le,useContext:le,useEffect:le,useImperativeHandle:le,useLayoutEffect:le,useInsertionEffect:le,useMemo:le,useReducer:le,useRef:le,useState:le,useDebugValue:le,useDeferredValue:le,useTransition:le,useSyncExternalStore:le,useId:le,useHostTransitionStatus:le,useFormState:le,useActionState:le,useOptimistic:le,useMemoCache:le,useCacheRefresh:le};ul.useEffectEvent=le;var Tp={readContext:Ee,use:dr,useCallback:function(e,t){return Ae().memoizedState=[e,t===void 0?null:t],e},useContext:Ee,useEffect:pd,useImperativeHandle:function(e,t,n){n=n!==null&&n!==void 0?n.concat([e]):null,So(4194308,4,mp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return So(4194308,4,e,t)},useInsertionEffect:function(e,t){So(4,2,e,t)},useMemo:function(e,t){var n=Ae();t=t===void 0?null:t;var a=e();if(aa){hn(!0);try{e()}finally{hn(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=Ae();if(n!==void 0){var i=n(t);if(aa){hn(!0);try{n(t)}finally{hn(!1)}}}else i=t;return a.memoizedState=a.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},a.queue=e,e=e.dispatch=e0.bind(null,C,e),[a.memoizedState,e]},useRef:function(e){var t=Ae();return e={current:e},t.memoizedState=e},useState:function(e){e=su(e);var t=e.queue,n=Np.bind(null,C,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:sc,useDeferredValue:function(e,t){var n=Ae();return uc(n,e,t)},useTransition:function(){var e=su(!1);return e=Sp.bind(null,C,e.queue,!0,!1),Ae().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=C,i=Ae();if(G){if(n===void 0)throw Error(_(407));n=n()}else{if(n=t(),W===null)throw Error(_(349));(q&127)!==0||tp(a,t,n)}i.memoizedState=n;var l={value:n,getSnapshot:t};return i.queue=l,pd(ap.bind(null,a,l,e),[e]),a.flags|=2048,$a(9,{destroy:void 0},np.bind(null,a,l,n,t),null),n},useId:function(){var e=Ae(),t=W.identifierPrefix;if(G){var n=xt,a=_t;n=(a&~(1<<32-Ge(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=qo++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Zb++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:cc,useFormState:fd,useActionState:fd,useOptimistic:function(e){var t=Ae();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=fc.bind(null,C,!0,n),n.dispatch=t,[e,t]},useMemoCache:lc,useCacheRefresh:function(){return Ae().memoizedState=Ib.bind(null,C)},useEffectEvent:function(e){var t=Ae(),n={impl:e};return t.memoizedState=n,function(){if((K&2)!==0)throw Error(_(440));return n.impl.apply(void 0,arguments)}}},dc={readContext:Ee,use:dr,useCallback:gp,useContext:Ee,useEffect:rc,useImperativeHandle:vp,useInsertionEffect:hp,useLayoutEffect:pp,useMemo:yp,useReducer:bo,useRef:fp,useState:function(){return bo(Qt)},useDebugValue:sc,useDeferredValue:function(e,t){var n=se();return bp(n,F.memoizedState,e,t)},useTransition:function(){var e=bo(Qt)[0],t=se().memoizedState;return[typeof e==="boolean"?e:xl(e),t]},useSyncExternalStore:ep,useId:Ep,useHostTransitionStatus:cc,useFormState:dd,useActionState:dd,useOptimistic:function(e,t){var n=se();return op(n,F,e,t)},useMemoCache:lc,useCacheRefresh:wp};dc.useEffectEvent=dp;var Dp={readContext:Ee,use:dr,useCallback:gp,useContext:Ee,useEffect:rc,useImperativeHandle:vp,useInsertionEffect:hp,useLayoutEffect:pp,useMemo:yp,useReducer:ys,useRef:fp,useState:function(){return ys(Qt)},useDebugValue:sc,useDeferredValue:function(e,t){var n=se();return F===null?uc(n,e,t):bp(n,F.memoizedState,e,t)},useTransition:function(){var e=ys(Qt)[0],t=se().memoizedState;return[typeof e==="boolean"?e:xl(e),t]},useSyncExternalStore:ep,useId:Ep,useHostTransitionStatus:cc,useFormState:hd,useActionState:hd,useOptimistic:function(e,t){var n=se();if(F!==null)return op(n,F,e,t);return n.baseState=e,[e,n.queue.dispatch]},useMemoCache:lc,useCacheRefresh:wp};Dp.useEffectEvent=dp;function bs(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n===null||n===void 0?t:ae({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var fu={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=at(),i=Wn(a);i.payload=t,n!==void 0&&n!==null&&(i.callback=n),t=Pn(e,i,a),t!==null&&(Me(t,e,a),Qi(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=at(),i=Wn(a);i.tag=1,i.payload=t,n!==void 0&&n!==null&&(i.callback=n),t=Pn(e,i,a),t!==null&&(Me(t,e,a),Qi(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=at(),a=Wn(n);a.tag=2,t!==void 0&&t!==null&&(a.callback=t),t=Pn(e,a,n),t!==null&&(Me(t,e,n),Qi(t,e,n))}};function md(e,t,n,a,i,l,o){return e=e.stateNode,typeof e.shouldComponentUpdate==="function"?e.shouldComponentUpdate(a,l,o):t.prototype&&t.prototype.isPureReactComponent?!il(n,a)||!il(i,l):!0}function vd(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps==="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps==="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&fu.enqueueReplaceState(t,t.state,null)}function ia(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=ae({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function t0(e){Co(e)}function n0(e){console.error(e)}function a0(e){Co(e)}function Go(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function gd(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function du(e,t,n){return n=Wn(n),n.tag=3,n.payload={element:null},n.callback=function(){Go(e,t)},n}function zp(e){return e=Wn(e),e.tag=3,e}function Rp(e,t,n,a){var i=n.type.getDerivedStateFromError;if(typeof i==="function"){var l=a.value;e.payload=function(){return i(l)},e.callback=function(){gd(t,n,a)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==="function"&&(e.callback=function(){gd(t,n,a),typeof i!=="function"&&(Sn===null?Sn=new Set([this]):Sn.add(this));var r=a.stack;this.componentDidCatch(a.value,{componentStack:r!==null?r:""})})}function i0(e,t,n,a,i){if(n.flags|=32768,a!==null&&typeof a==="object"&&typeof a.then==="function"){if(t=n.alternate,t!==null&&ti(t,n,i,!0),n=Ke.current,n!==null){switch(n.tag){case 31:case 13:return nt===null?Zo():n.alternate===null&&oe===0&&(oe=3),n.flags&=-257,n.flags|=65536,n.lanes=i,a===Lo?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),zs(e,a,i)),!1;case 22:return n.flags|=65536,a===Lo?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),zs(e,a,i)),!1}throw Error(_(435,n.tag))}return zs(e,a,i),Zo(),!1}if(G)return t=Ke.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,a!==Is&&(e=Error(_(422),{cause:a}),ol(et(e,n)))):(a!==Is&&(t=Error(_(423),{cause:a}),ol(et(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,a=et(a,n),i=du(e.stateNode,a,i),gs(e,i),oe!==4&&(oe=2)),!1;var l=Error(_(520),{cause:a});if(l=et(l,n),Pi===null?Pi=[l]:Pi.push(l),oe!==4&&(oe=2),t===null)return!0;a=et(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=du(n.stateNode,a,e),gs(n,e),!1;case 1:if(t=n.type,l=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError==="function"||l!==null&&typeof l.componentDidCatch==="function"&&(Sn===null||!Sn.has(l))))return n.flags|=65536,i&=-i,n.lanes|=i,i=zp(i),Rp(i,e,n,a),gs(n,i),!1}n=n.return}while(n!==null);return!1}var hc=Error(_(461)),de=!1;function Se(e,t,n,a){t.child=e===null?$h(t,null,n,a):na(t,e.child,n,a)}function yd(e,t,n,a,i){n=n.render;var l=t.ref;if("ref"in a){var o={};for(var r in a)r!=="ref"&&(o[r]=a[r])}else o=a;if(ta(t),a=tc(e,t,n,o,l,i),r=nc(),e!==null&&!de)return ac(e,t,i),Zt(e,t,i);return G&&r&&Zu(t),t.flags|=1,Se(e,t,a,i),t.child}function bd(e,t,n,a,i){if(e===null){var l=n.type;if(typeof l==="function"&&!Qu(l)&&l.defaultProps===void 0&&n.compare===null)return t.tag=15,t.type=l,Mp(e,t,l,a,i);return e=go(n.type,null,a,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e}if(l=e.child,!pc(e,i)){var o=l.memoizedProps;if(n=n.compare,n=n!==null?n:il,n(o,a)&&e.ref===t.ref)return Zt(e,t,i)}return t.flags|=1,e=qt(l,a),e.ref=t.ref,e.return=t,t.child=e}function Mp(e,t,n,a,i){if(e!==null){var l=e.memoizedProps;if(il(l,a)&&e.ref===t.ref)if(de=!1,t.pendingProps=a=l,pc(e,i))(e.flags&131072)!==0&&(de=!0);else return t.lanes=e.lanes,Zt(e,t,i)}return hu(e,t,n,a,i)}function Cp(e,t,n,a){var i=a.children,l=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(l=l!==null?l.baseLanes|n:n,e!==null){a=t.child=e.child;for(i=0;a!==null;)i=i|a.lanes|a.childLanes,a=a.sibling;a=i&~l}else a=0,t.child=null;return Sd(e,t,l,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&yo(t,l!==null?l.cachePool:null),l!==null?sd(t,l):ou(),Wh(t);else return a=t.lanes=536870912,Sd(e,t,l!==null?l.baseLanes|n:n,n,a)}else l!==null?(yo(t,l.cachePool),sd(t,l),fn(t),t.memoizedState=null):(e!==null&&yo(t,null),ou(),fn(t));return Se(e,t,i,n),t.child}function Bi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Sd(e,t,n,a,i){var l=Fu();return l=l===null?null:{parent:fe._currentValue,pool:l},t.memoizedState={baseLanes:n,cachePool:l},e!==null&&yo(t,null),ou(),Wh(t),e!==null&&ti(e,t,a,!0),t.childLanes=i,null}function _o(e,t){return t=Yo({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function _d(e,t,n){return na(t,e.child,null,n),e=_o(t,t.pendingProps),e.flags|=2,Le(t),t.memoizedState=null,e}function l0(e,t,n){var a=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(G){if(a.mode==="hidden")return e=_o(t,a),t.lanes=536870912,Bi(null,e);if(ru(t),(e=ne)?(e=Om(e,tt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Nn!==null?{id:_t,overflow:xt}:null,retryLane:536870912,hydrationErrors:null},n=qh(e),n.return=t,t.child=n,xe=t,ne=null)):e=null,e===null)throw On(t);return t.lanes=536870912,null}return _o(t,a)}var l=e.memoizedState;if(l!==null){var o=l.dehydrated;if(ru(t),i)if(t.flags&256)t.flags&=-257,t=_d(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(_(558));else if(de||ti(e,t,n,!1),i=(n&e.childLanes)!==0,de||i){if(a=W,a!==null&&(o=dh(a,n),o!==0&&o!==l.retryLane))throw l.retryLane=o,sa(e,o),Me(a,e,o),hc;Zo(),t=_d(e,t,n)}else e=l.treeContext,ne=it(o.nextSibling),xe=t,G=!0,bn=null,tt=!1,e!==null&&Yh(t,e),t=_o(t,a),t.flags|=4096;return t}return e=qt(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function xo(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=="function"&&typeof n!=="object")throw Error(_(284));if(e===null||e.ref!==n)t.flags|=4194816}}function hu(e,t,n,a,i){if(ta(t),n=tc(e,t,n,a,void 0,i),a=nc(),e!==null&&!de)return ac(e,t,i),Zt(e,t,i);return G&&a&&Zu(t),t.flags|=1,Se(e,t,n,i),t.child}function xd(e,t,n,a,i,l){if(ta(t),t.updateQueue=null,n=Ih(t,a,n,i),Ph(e),a=nc(),e!==null&&!de)return ac(e,t,l),Zt(e,t,l);return G&&a&&Zu(t),t.flags|=1,Se(e,t,n,l),t.child}function Ed(e,t,n,a,i){if(ta(t),t.stateNode===null){var l=Ma,o=n.contextType;typeof o==="object"&&o!==null&&(l=Ee(o)),l=new n(a,l),t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,l.updater=fu,t.stateNode=l,l._reactInternals=t,l=t.stateNode,l.props=a,l.state=t.memoizedState,l.refs={},Pu(t),o=n.contextType,l.context=typeof o==="object"&&o!==null?Ee(o):Ma,l.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==="function"&&(bs(t,n,o,a),l.state=t.memoizedState),typeof n.getDerivedStateFromProps==="function"||typeof l.getSnapshotBeforeUpdate==="function"||typeof l.UNSAFE_componentWillMount!=="function"&&typeof l.componentWillMount!=="function"||(o=l.state,typeof l.componentWillMount==="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount==="function"&&l.UNSAFE_componentWillMount(),o!==l.state&&fu.enqueueReplaceState(l,l.state,null),$i(t,a,l,i),Zi(),l.state=t.memoizedState),typeof l.componentDidMount==="function"&&(t.flags|=4194308),a=!0}else if(e===null){l=t.stateNode;var r=t.memoizedProps,u=ia(n,r);l.props=u;var c=l.context,m=n.contextType;o=Ma,typeof m==="object"&&m!==null&&(o=Ee(m));var y=n.getDerivedStateFromProps;m=typeof y==="function"||typeof l.getSnapshotBeforeUpdate==="function",r=t.pendingProps!==r,m||typeof l.UNSAFE_componentWillReceiveProps!=="function"&&typeof l.componentWillReceiveProps!=="function"||(r||c!==o)&&vd(t,l,a,o),sn=!1;var h=t.memoizedState;l.state=h,$i(t,a,l,i),Zi(),c=t.memoizedState,r||h!==c||sn?(typeof y==="function"&&(bs(t,n,y,a),c=t.memoizedState),(u=sn||md(t,n,u,a,h,c,o))?(m||typeof l.UNSAFE_componentWillMount!=="function"&&typeof l.componentWillMount!=="function"||(typeof l.componentWillMount==="function"&&l.componentWillMount(),typeof l.UNSAFE_componentWillMount==="function"&&l.UNSAFE_componentWillMount()),typeof l.componentDidMount==="function"&&(t.flags|=4194308)):(typeof l.componentDidMount==="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=c),l.props=a,l.state=c,l.context=o,a=u):(typeof l.componentDidMount==="function"&&(t.flags|=4194308),a=!1)}else{l=t.stateNode,iu(e,t),o=t.memoizedProps,m=ia(n,o),l.props=m,y=t.pendingProps,h=l.context,c=n.contextType,u=Ma,typeof c==="object"&&c!==null&&(u=Ee(c)),r=n.getDerivedStateFromProps,(c=typeof r==="function"||typeof l.getSnapshotBeforeUpdate==="function")||typeof l.UNSAFE_componentWillReceiveProps!=="function"&&typeof l.componentWillReceiveProps!=="function"||(o!==y||h!==u)&&vd(t,l,a,u),sn=!1,h=t.memoizedState,l.state=h,$i(t,a,l,i),Zi();var g=t.memoizedState;o!==y||h!==g||sn||e!==null&&e.dependencies!==null&&Vo(e.dependencies)?(typeof r==="function"&&(bs(t,n,r,a),g=t.memoizedState),(m=sn||md(t,n,m,a,h,g,u)||e!==null&&e.dependencies!==null&&Vo(e.dependencies))?(c||typeof l.UNSAFE_componentWillUpdate!=="function"&&typeof l.componentWillUpdate!=="function"||(typeof l.componentWillUpdate==="function"&&l.componentWillUpdate(a,g,u),typeof l.UNSAFE_componentWillUpdate==="function"&&l.UNSAFE_componentWillUpdate(a,g,u)),typeof l.componentDidUpdate==="function"&&(t.flags|=4),typeof l.getSnapshotBeforeUpdate==="function"&&(t.flags|=1024)):(typeof l.componentDidUpdate!=="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!=="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=g),l.props=a,l.state=g,l.context=u,a=m):(typeof l.componentDidUpdate!=="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof l.getSnapshotBeforeUpdate!=="function"||o===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),a=!1)}return l=a,xo(e,t),a=(t.flags&128)!==0,l||a?(l=t.stateNode,n=a&&typeof n.getDerivedStateFromError!=="function"?null:l.render(),t.flags|=1,e!==null&&a?(t.child=na(t,e.child,null,i),t.child=na(t,null,n,i)):Se(e,t,n,i),t.memoizedState=l.state,e=t.child):e=Zt(e,t,i),e}function wd(e,t,n,a){return ea(),t.flags|=256,Se(e,t,n,a),t.child}var Ss={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _s(e){return{baseLanes:e,cachePool:Xh()}}function xs(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=He),e}function kp(e,t,n){var a=t.pendingProps,i=!1,l=(t.flags&128)!==0,o;if((o=l)||(o=e!==null&&e.memoizedState===null?!1:(re.current&2)!==0),o&&(i=!0,t.flags&=-129),o=(t.flags&32)!==0,t.flags&=-33,e===null){if(G){if(i?cn(t):fn(t),(e=ne)?(e=Om(e,tt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Nn!==null?{id:_t,overflow:xt}:null,retryLane:536870912,hydrationErrors:null},n=qh(e),n.return=t,t.child=n,xe=t,ne=null)):e=null,e===null)throw On(t);return Du(e)?t.lanes=32:t.lanes=536870912,null}var r=a.children;if(a=a.fallback,i)return fn(t),i=t.mode,r=Yo({mode:"hidden",children:r},i),a=$n(a,i,n,null),r.return=t,a.return=t,r.sibling=a,t.child=r,a=t.child,a.memoizedState=_s(n),a.childLanes=xs(e,o,n),t.memoizedState=Ss,Bi(null,a);return cn(t),pu(t,r)}var u=e.memoizedState;if(u!==null&&(r=u.dehydrated,r!==null)){if(l)t.flags&256?(cn(t),t.flags&=-257,t=Es(e,t,n)):t.memoizedState!==null?(fn(t),t.child=e.child,t.flags|=128,t=null):(fn(t),r=a.fallback,i=t.mode,a=Yo({mode:"visible",children:a.children},i),r=$n(r,i,n,null),r.flags|=2,a.return=t,r.return=t,a.sibling=r,t.child=a,na(t,e.child,null,n),a=t.child,a.memoizedState=_s(n),a.childLanes=xs(e,o,n),t.memoizedState=Ss,t=Bi(null,a));else if(cn(t),Du(r)){if(o=r.nextSibling&&r.nextSibling.dataset,o)var c=o.dgst;o=c,a=Error(_(419)),a.stack="",a.digest=o,ol({value:a,source:null,stack:null}),t=Es(e,t,n)}else if(de||ti(e,t,n,!1),o=(n&e.childLanes)!==0,de||o){if(o=W,o!==null&&(a=dh(o,n),a!==0&&a!==u.retryLane))throw u.retryLane=a,sa(e,a),Me(o,e,a),hc;Tu(r)||Zo(),t=Es(e,t,n)}else Tu(r)?(t.flags|=192,t.child=e.child,t=null):(e=u.treeContext,ne=it(r.nextSibling),xe=t,G=!0,bn=null,tt=!1,e!==null&&Yh(t,e),t=pu(t,a.children),t.flags|=4096);return t}if(i)return fn(t),r=a.fallback,i=t.mode,u=e.child,c=u.sibling,a=qt(u,{mode:"hidden",children:a.children}),a.subtreeFlags=u.subtreeFlags&65011712,c!==null?r=qt(c,r):(r=$n(r,i,n,null),r.flags|=2),r.return=t,a.return=t,a.sibling=r,t.child=a,Bi(null,a),a=t.child,r=e.child.memoizedState,r===null?r=_s(n):(i=r.cachePool,i!==null?(u=fe._currentValue,i=i.parent!==u?{parent:u,pool:u}:i):i=Xh(),r={baseLanes:r.baseLanes|n,cachePool:i}),a.memoizedState=r,a.childLanes=xs(e,o,n),t.memoizedState=Ss,Bi(e.child,a);return cn(t),n=e.child,e=n.sibling,n=qt(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n}function pu(e,t){return t=Yo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Yo(e,t){return e=Be(22,e,null,t),e.lanes=0,e}function Es(e,t,n){return na(t,e.child,null,n),e=pu(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Nd(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),tu(e.return,t,n)}function ws(e,t,n,a,i,l){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:i,treeForkCount:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=a,o.tail=n,o.tailMode=i,o.treeForkCount=l)}function Up(e,t,n){var a=t.pendingProps,i=a.revealOrder,l=a.tail;a=a.children;var o=re.current,r=(o&2)!==0;if(r?(o=o&1|2,t.flags|=128):o&=1,P(re,o),Se(e,t,a,n),a=G?ll:0,!r&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Nd(e,n,t);else if(e.tag===19)Nd(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":n=t.child;for(i=null;n!==null;)e=n.alternate,e!==null&&Ho(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),ws(t,!1,i,n,l,a);break;case"backwards":case"unstable_legacy-backwards":n=null,i=t.child;for(t.child=null;i!==null;){if(e=i.alternate,e!==null&&Ho(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}ws(t,!0,n,null,l,a);break;case"together":ws(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Zt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Tn|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ti(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(_(153));if(t.child!==null){e=t.child,n=qt(e,e.pendingProps),t.child=n;for(n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=qt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function pc(e,t){if((e.lanes&t)!==0)return!0;return e=e.dependencies,e!==null&&Vo(e)?!0:!1}function o0(e,t,n){switch(t.tag){case 3:Do(t,t.stateNode.containerInfo),un(t,fe,e.memoizedState.cache),ea();break;case 27:case 5:Gs(t);break;case 4:Do(t,t.stateNode.containerInfo);break;case 10:un(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ru(t),null;break;case 13:var a=t.memoizedState;if(a!==null){if(a.dehydrated!==null)return cn(t),t.flags|=128,null;if((n&t.child.childLanes)!==0)return kp(e,t,n);return cn(t),e=Zt(e,t,n),e!==null?e.sibling:null}cn(t);break;case 19:var i=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(ti(e,t,n,!1),a=(n&t.childLanes)!==0),i){if(a)return Up(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),P(re,re.current),a)break;else return null;case 22:return t.lanes=0,Cp(e,t,n,t.pendingProps);case 24:un(t,fe,e.memoizedState.cache)}return Zt(e,t,n)}function Vp(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)de=!0;else{if(!pc(e,n)&&(t.flags&128)===0)return de=!1,o0(e,t,n);de=(e.flags&131072)!==0?!0:!1}else de=!1,G&&(t.flags&1048576)!==0&&Gh(t,ll,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Xn(t.elementType),t.type=e,typeof e==="function")Qu(e)?(a=ia(e,a),t.tag=1,t=Ed(null,t,e,a,n)):(t.tag=0,t=hu(null,t,e,a,n));else{if(e!==void 0&&e!==null){var i=e.$$typeof;if(i===Cu){t.tag=11,t=yd(null,t,e,a,n);break e}else if(i===ku){t.tag=14,t=bd(null,t,e,a,n);break e}}throw t=js(e)||e,Error(_(306,t,""))}}return t;case 0:return hu(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,i=ia(a,t.pendingProps),Ed(e,t,a,i,n);case 3:e:{if(Do(t,t.stateNode.containerInfo),e===null)throw Error(_(387));a=t.pendingProps;var l=t.memoizedState;i=l.element,iu(e,t),$i(t,a,null,n);var o=t.memoizedState;if(a=o.cache,un(t,fe,a),a!==l.cache&&nu(t,[fe],n,!0),Zi(),a=o.element,l.isDehydrated)if(l={element:a,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=l,t.memoizedState=l,t.flags&256){t=wd(e,t,a,n);break e}else if(a!==i){i=et(Error(_(424)),t),ol(i),t=wd(e,t,a,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}ne=it(e.firstChild),xe=t,G=!0,bn=null,tt=!0,n=$h(t,null,a,n);for(t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(ea(),a===i){t=Zt(e,t,n);break e}Se(e,t,a,n)}t=t.child}return t;case 26:return xo(e,t),e===null?(n=Xd(t.type,null,t.pendingProps,null))?t.memoizedState=n:G||(n=t.type,e=t.pendingProps,a=Wo(yn.current).createElement(n),a[_e]=t,a[Ce]=e,we(a,n,e),ge(a),t.stateNode=a):t.memoizedState=Xd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Gs(t),e===null&&G&&(a=t.stateNode=Am(t.type,t.pendingProps,yn.current),xe=t,tt=!0,i=ne,zn(t.type)?(zu=i,ne=it(a.firstChild)):ne=i),Se(e,t,t.pendingProps.children,n),xo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:if(e===null&&G){if(i=a=ne)a=k0(a,t.type,t.pendingProps,tt),a!==null?(t.stateNode=a,xe=t,ne=it(a.firstChild),tt=!1,i=!0):i=!1;i||On(t)}return Gs(t),i=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,a=l.children,Ou(i,l)?a=null:o!==null&&Ou(i,o)&&(t.flags|=32),t.memoizedState!==null&&(i=tc(e,t,$b,null,null,n),dl._currentValue=i),xo(e,t),Se(e,t,a,n),t.child;case 6:if(e===null&&G){if(e=n=ne)n=U0(n,t.pendingProps,tt),n!==null?(t.stateNode=n,xe=t,ne=null,e=!0):e=!1;e||On(t)}return null;case 13:return kp(e,t,n);case 4:return Do(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=na(t,null,a,n):Se(e,t,a,n),t.child;case 11:return yd(e,t,t.type,t.pendingProps,n);case 7:return Se(e,t,t.pendingProps,n),t.child;case 8:return Se(e,t,t.pendingProps.children,n),t.child;case 12:return Se(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,un(t,t.type,a.value),Se(e,t,a.children,n),t.child;case 9:return i=t.type._context,a=t.pendingProps.children,ta(t),i=Ee(i),a=a(i),t.flags|=1,Se(e,t,a,n),t.child;case 14:return bd(e,t,t.type,t.pendingProps,n);case 15:return Mp(e,t,t.type,t.pendingProps,n);case 19:return Up(e,t,n);case 31:return l0(e,t,n);case 22:return Cp(e,t,n,t.pendingProps);case 24:return ta(t),a=Ee(fe),e===null?(i=Fu(),i===null&&(i=W,l=Ju(),i.pooledCache=l,l.refCount++,l!==null&&(i.pooledCacheLanes|=n),i=l),t.memoizedState={parent:a,cache:i},Pu(t),un(t,fe,i)):((e.lanes&n)!==0&&(iu(e,t),$i(t,null,null,n),Zi()),i=e.memoizedState,l=t.memoizedState,i.parent!==a?(i={parent:a,cache:a},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),un(t,fe,a)):(a=l.cache,un(t,fe,a),a!==i.cache&&nu(t,[fe],n,!0))),Se(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(_(156,t.tag))}function Mt(e){e.flags|=4}function Ns(e,t,n,a,i){if(t=(e.mode&32)!==0)t=!1;if(t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(om())e.flags|=8192;else throw Fn=Lo,Wu}else e.flags&=-16777217}function Od(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!zm(t))if(om())e.flags|=8192;else throw Fn=Lo,Wu}function oo(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?uh():536870912,e.lanes|=t,Ja|=t)}function zi(e,t){if(!G)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function te(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,a|=i.subtreeFlags&65011712,a|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,a|=i.subtreeFlags,a|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function r0(e,t,n){var a=t.pendingProps;switch($u(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return te(t),null;case 1:return te(t),null;case 3:if(n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Gt(fe),Ya(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),e===null||e.child===null)ba(t)?Mt(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,vs());return te(t),null;case 26:var{type:i,memoizedState:l}=t;return e===null?(Mt(t),l!==null?(te(t),Od(t,l)):(te(t),Ns(t,i,null,a,n))):l?l!==e.memoizedState?(Mt(t),te(t),Od(t,l)):(te(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Mt(t),te(t),Ns(t,i,e,a,n)),null;case 27:if(zo(t),n=yn.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Mt(t);else{if(!a){if(t.stateNode===null)throw Error(_(166));return te(t),null}e=wt.current,ba(t)?td(t,e):(e=Am(i,a,n),t.stateNode=e,Mt(t))}return te(t),null;case 5:if(zo(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Mt(t);else{if(!a){if(t.stateNode===null)throw Error(_(166));return te(t),null}if(l=wt.current,ba(t))td(t,l);else{var o=Wo(yn.current);switch(l){case 1:l=o.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:l=o.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":l=o.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":l=o.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":l=o.createElement("div"),l.innerHTML="<script></script>",l=l.removeChild(l.firstChild);break;case"select":l=typeof a.is==="string"?o.createElement("select",{is:a.is}):o.createElement("select"),a.multiple?l.multiple=!0:a.size&&(l.size=a.size);break;default:l=typeof a.is==="string"?o.createElement(i,{is:a.is}):o.createElement(i)}}l[_e]=t,l[Ce]=a;e:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)l.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=l;e:switch(we(l,i,a),i){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Mt(t)}}return te(t),Ns(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Mt(t);else{if(typeof a!=="string"&&t.stateNode===null)throw Error(_(166));if(e=yn.current,ba(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,i=xe,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[_e]=t,e=e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Em(e.nodeValue,n)?!0:!1,e||On(t,!0)}else e=Wo(e).createTextNode(a),e[_e]=t,t.stateNode=e}return te(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=ba(t),n!==null){if(e===null){if(!a)throw Error(_(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(_(557));e[_e]=t}else ea(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;te(t),e=!1}else n=vs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e){if(t.flags&256)return Le(t),t;return Le(t),null}if((t.flags&128)!==0)throw Error(_(558))}return te(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=ba(t),a!==null&&a.dehydrated!==null){if(e===null){if(!i)throw Error(_(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(_(317));i[_e]=t}else ea(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;te(t),i=!1}else i=vs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i){if(t.flags&256)return Le(t),t;return Le(t),null}}if(Le(t),(t.flags&128)!==0)return t.lanes=n,t;return n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,i=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(i=a.alternate.memoizedState.cachePool.pool),l=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(l=a.memoizedState.cachePool.pool),l!==i&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),oo(t,t.updateQueue),te(t),null;case 4:return Ya(),e===null&&_m(t.stateNode.containerInfo),te(t),null;case 10:return Gt(t.type),te(t),null;case 19:if(ye(re),a=t.memoizedState,a===null)return te(t),null;if(i=(t.flags&128)!==0,l=a.rendering,l===null)if(i)zi(a,!1);else{if(oe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(l=Ho(e),l!==null){t.flags|=128,zi(a,!1),e=l.updateQueue,t.updateQueue=e,oo(t,e),t.subtreeFlags=0,e=n;for(n=t.child;n!==null;)jh(n,e),n=n.sibling;return P(re,re.current&1|2),G&&Vt(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&je()>Xo&&(t.flags|=128,i=!0,zi(a,!1),t.lanes=4194304)}else{if(!i)if(e=Ho(l),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,oo(t,e),zi(a,!0),a.tail===null&&a.tailMode==="hidden"&&!l.alternate&&!G)return te(t),null}else 2*je()-a.renderingStartTime>Xo&&n!==536870912&&(t.flags|=128,i=!0,zi(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(e=a.last,e!==null?e.sibling=l:t.child=l,a.last=l)}if(a.tail!==null)return e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=je(),e.sibling=null,n=re.current,P(re,i?n&1|2:n&1),G&&Vt(t,a.treeForkCount),e;return te(t),null;case 22:case 23:return Le(t),Iu(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(te(t),t.subtreeFlags&6&&(t.flags|=8192)):te(t),n=t.updateQueue,n!==null&&oo(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&ye(Jn),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Gt(fe),te(t),null;case 25:return null;case 30:return null}throw Error(_(156,t.tag))}function s0(e,t){switch($u(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Gt(fe),Ya(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return zo(t),null;case 31:if(t.memoizedState!==null){if(Le(t),t.alternate===null)throw Error(_(340));ea()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Le(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(_(340));ea()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ye(re),null;case 4:return Ya(),null;case 10:return Gt(t.type),null;case 22:case 23:return Le(t),Iu(),e!==null&&ye(Jn),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Gt(fe),null;case 25:return null;default:return null}}function Lp(e,t){switch($u(t),t.tag){case 3:Gt(fe),Ya();break;case 26:case 27:case 5:zo(t);break;case 4:Ya();break;case 31:t.memoizedState!==null&&Le(t);break;case 13:Le(t);break;case 19:ye(re);break;case 10:Gt(t.type);break;case 22:case 23:Le(t),Iu(),e!==null&&ye(Jn);break;case 24:Gt(fe)}}function El(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&e)===e){a=void 0;var l=n.create,o=n.inst;a=l(),o.destroy=a}n=n.next}while(n!==i)}}catch(r){Z(t,t.return,r)}}function An(e,t,n){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var l=i.next;a=l;do{if((a.tag&e)===e){var o=a.inst,r=o.destroy;if(r!==void 0){o.destroy=void 0,i=t;var u=n,c=r;try{c()}catch(m){Z(i,u,m)}}}a=a.next}while(a!==l)}}catch(m){Z(t,t.return,m)}}function Bp(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Fh(t,n)}catch(a){Z(e,e.return,a)}}}function Hp(e,t,n){n.props=ia(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Z(e,t,a)}}function Fi(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n==="function"?e.refCleanup=n(a):n.current=a}}catch(i){Z(e,t,i)}}function Et(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a==="function")try{a()}catch(i){Z(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==="function")try{n(null)}catch(i){Z(e,t,i)}else n.current=null}function jp(e){var{type:t,memoizedProps:n,stateNode:a}=e;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(i){Z(e,e.return,i)}}function Os(e,t,n){try{var a=e.stateNode;T0(a,e.type,n,t),a[Ce]=t}catch(i){Z(e,e.return,i)}}function qp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&zn(e.type)||e.tag===4}function As(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||qp(e.return))return null;e=e.return}e.sibling.return=e.return;for(e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&zn(e.type))continue e;if(e.flags&2)continue e;if(e.child===null||e.tag===4)continue e;else e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function mu(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!==null&&n!==void 0||t.onclick!==null||(t.onclick=Ht));else if(a!==4&&(a===27&&zn(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(mu(e,t,n),e=e.sibling;e!==null;)mu(e,t,n),e=e.sibling}function Ko(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&zn(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Ko(e,t,n),e=e.sibling;e!==null;)Ko(e,t,n),e=e.sibling}function Gp(e){var{stateNode:t,memoizedProps:n}=e;try{for(var a=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);we(t,a,n),t[_e]=e,t[Ce]=n}catch(l){Z(e,e.return,l)}}var Lt=!1,ce=!1,Ts=!1,Ad=typeof WeakSet==="function"?WeakSet:Set,ve=null;function u0(e,t){if(e=e.containerInfo,wu=tr,e=Mh(e),Yu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var i=a.anchorOffset,l=a.focusNode;a=a.focusOffset;try{n.nodeType,l.nodeType}catch(A){n=null;break e}var o=0,r=-1,u=-1,c=0,m=0,y=e,h=null;t:for(;;){for(var g;;){if(y!==n||i!==0&&y.nodeType!==3||(r=o+i),y!==l||a!==0&&y.nodeType!==3||(u=o+a),y.nodeType===3&&(o+=y.nodeValue.length),(g=y.firstChild)===null)break;h=y,y=g}for(;;){if(y===e)break t;if(h===n&&++c===i&&(r=o),h===l&&++m===a&&(u=o),(g=y.nextSibling)!==null)break;y=h,h=y.parentNode}y=g}n=r===-1||u===-1?null:{start:r,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;Nu={focusedElem:e,selectionRange:n},tr=!1;for(ve=t;ve!==null;)if(t=ve,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ve=e;else for(;ve!==null;){switch(t=ve,l=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&l!==null){e=void 0,n=t,i=l.memoizedProps,l=l.memoizedState,a=n.stateNode;try{var x=ia(n.type,i);e=a.getSnapshotBeforeUpdate(x,l),a.__reactInternalSnapshotBeforeUpdate=e}catch(A){Z(n,n.return,A)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Au(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Au(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(_(163))}if(e=t.sibling,e!==null){e.return=t.return,ve=e;break}ve=t.return}}function Yp(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:kt(e,n),a&4&&El(5,n);break;case 1:if(kt(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(o){Z(n,n.return,o)}else{var i=ia(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(o){Z(n,n.return,o)}}a&64&&Bp(n),a&512&&Fi(n,n.return);break;case 3:if(kt(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Fh(e,t)}catch(o){Z(n,n.return,o)}}break;case 27:t===null&&a&4&&Gp(n);case 26:case 5:kt(e,n),t===null&&a&4&&jp(n),a&512&&Fi(n,n.return);break;case 12:kt(e,n);break;case 31:kt(e,n),a&4&&Qp(e,n);break;case 13:kt(e,n),a&4&&Zp(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=y0.bind(null,n),V0(e,n))));break;case 22:if(a=n.memoizedState!==null||Lt,!a){t=t!==null&&t.memoizedState!==null||ce,i=Lt;var l=ce;Lt=a,(ce=t)&&!l?Ut(e,n,(n.subtreeFlags&8772)!==0):kt(e,n),Lt=i,ce=l}break;case 30:break;default:kt(e,n)}}function Kp(e){var t=e.alternate;t!==null&&(e.alternate=null,Kp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Lu(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 ie=null,ze=!1;function Ct(e,t,n){for(n=n.child;n!==null;)Xp(e,t,n),n=n.sibling}function Xp(e,t,n){if(qe&&typeof qe.onCommitFiberUnmount==="function")try{qe.onCommitFiberUnmount(vl,n)}catch(l){}switch(n.tag){case 26:ce||Et(n,t),Ct(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ce||Et(n,t);var a=ie,i=ze;zn(n.type)&&(ie=n.stateNode,ze=!1),Ct(e,t,n),el(n.stateNode),ie=a,ze=i;break;case 5:ce||Et(n,t);case 6:if(a=ie,i=ze,ie=null,Ct(e,t,n),ie=a,ze=i,ie!==null)if(ze)try{(ie.nodeType===9?ie.body:ie.nodeName==="HTML"?ie.ownerDocument.body:ie).removeChild(n.stateNode)}catch(l){Z(n,t,l)}else try{ie.removeChild(n.stateNode)}catch(l){Z(n,t,l)}break;case 18:ie!==null&&(ze?(e=ie,jd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Ia(e)):jd(ie,n.stateNode));break;case 4:a=ie,i=ze,ie=n.stateNode.containerInfo,ze=!0,Ct(e,t,n),ie=a,ze=i;break;case 0:case 11:case 14:case 15:An(2,n,t),ce||An(4,n,t),Ct(e,t,n);break;case 1:ce||(Et(n,t),a=n.stateNode,typeof a.componentWillUnmount==="function"&&Hp(n,t,a)),Ct(e,t,n);break;case 21:Ct(e,t,n);break;case 22:ce=(a=ce)||n.memoizedState!==null,Ct(e,t,n),ce=a;break;default:Ct(e,t,n)}}function Qp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ia(e)}catch(n){Z(t,t.return,n)}}}function Zp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ia(e)}catch(n){Z(t,t.return,n)}}function c0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Ad),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Ad),t;default:throw Error(_(435,e.tag))}}function ro(e,t){var n=c0(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var i=b0.bind(null,e,a);a.then(i,i)}})}function Te(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var i=n[a],l=e,o=t,r=o;e:for(;r!==null;){switch(r.tag){case 27:if(zn(r.type)){ie=r.stateNode,ze=!1;break e}break;case 5:ie=r.stateNode,ze=!1;break e;case 3:case 4:ie=r.stateNode.containerInfo,ze=!0;break e}r=r.return}if(ie===null)throw Error(_(160));Xp(l,o,i),ie=null,ze=!1,l=i.alternate,l!==null&&(l.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)$p(t,e),t=t.sibling}var pt=null;function $p(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Te(t,e),De(e),a&4&&(An(3,e,e.return),El(3,e),An(5,e,e.return));break;case 1:Te(t,e),De(e),a&512&&(ce||n===null||Et(n,n.return)),a&64&&Lt&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var i=pt;if(Te(t,e),De(e),a&512&&(ce||n===null||Et(n,n.return)),a&4){var l=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(a){case"title":if(l=i.getElementsByTagName("title")[0],!l||l[bl]||l[_e]||l.namespaceURI==="http://www.w3.org/2000/svg"||l.hasAttribute("itemprop"))l=i.createElement(a),i.head.insertBefore(l,i.querySelector("head > title"));we(l,a,n),l[_e]=e,ge(l),a=l;break e;case"link":var o=Zd("link","href",i).get(a+(n.href||""));if(o){for(var r=0;r<o.length;r++)if(l=o[r],l.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&l.getAttribute("rel")===(n.rel==null?null:n.rel)&&l.getAttribute("title")===(n.title==null?null:n.title)&&l.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(r,1);break t}}l=i.createElement(a),we(l,a,n),i.head.appendChild(l);break;case"meta":if(o=Zd("meta","content",i).get(a+(n.content||""))){for(r=0;r<o.length;r++)if(l=o[r],l.getAttribute("content")===(n.content==null?null:""+n.content)&&l.getAttribute("name")===(n.name==null?null:n.name)&&l.getAttribute("property")===(n.property==null?null:n.property)&&l.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&l.getAttribute("charset")===(n.charSet==null?null:n.charSet)){o.splice(r,1);break t}}l=i.createElement(a),we(l,a,n),i.head.appendChild(l);break;default:throw Error(_(468,a))}l[_e]=e,ge(l),a=l}e.stateNode=a}else $d(i,e.type,e.stateNode);else e.stateNode=Qd(i,a,e.memoizedProps);else l!==a?(l===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):l.count--,a===null?$d(i,e.type,e.stateNode):Qd(i,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Os(e,e.memoizedProps,n.memoizedProps)}break;case 27:Te(t,e),De(e),a&512&&(ce||n===null||Et(n,n.return)),n!==null&&a&4&&Os(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Te(t,e),De(e),a&512&&(ce||n===null||Et(n,n.return)),e.flags&32){i=e.stateNode;try{Xa(i,"")}catch(x){Z(e,e.return,x)}}a&4&&e.stateNode!=null&&(i=e.memoizedProps,Os(e,i,n!==null?n.memoizedProps:i)),a&1024&&(Ts=!0);break;case 6:if(Te(t,e),De(e),a&4){if(e.stateNode===null)throw Error(_(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(x){Z(e,e.return,x)}}break;case 3:if(No=null,i=pt,pt=Po(t.containerInfo),Te(t,e),pt=i,De(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Ia(t.containerInfo)}catch(x){Z(e,e.return,x)}Ts&&(Ts=!1,Jp(e));break;case 4:a=pt,pt=Po(e.stateNode.containerInfo),Te(t,e),De(e),pt=a;break;case 12:Te(t,e),De(e);break;case 31:Te(t,e),De(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ro(e,a)));break;case 13:Te(t,e),De(e),e.child.flags&8192&&e.memoizedState!==null!==(n!==null&&n.memoizedState!==null)&&(mr=je()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ro(e,a)));break;case 22:i=e.memoizedState!==null;var u=n!==null&&n.memoizedState!==null,c=Lt,m=ce;if(Lt=c||i,ce=m||u,Te(t,e),ce=m,Lt=c,De(e),a&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||u||Lt||ce||Qn(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){u=n=t;try{if(l=u.stateNode,i)o=l.style,typeof o.setProperty==="function"?o.setProperty("display","none","important"):o.display="none";else{r=u.stateNode;var y=u.memoizedProps.style,h=y!==void 0&&y!==null&&y.hasOwnProperty("display")?y.display:null;r.style.display=h==null||typeof h==="boolean"?"":(""+h).trim()}}catch(x){Z(u,u.return,x)}}}else if(t.tag===6){if(n===null){u=t;try{u.stateNode.nodeValue=i?"":u.memoizedProps}catch(x){Z(u,u.return,x)}}}else if(t.tag===18){if(n===null){u=t;try{var g=u.stateNode;i?qd(g,!0):qd(u.stateNode,!1)}catch(x){Z(u,u.return,x)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,ro(e,n))));break;case 19:Te(t,e),De(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,ro(e,a)));break;case 30:break;case 21:break;default:Te(t,e),De(e)}}function De(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(qp(a)){n=a;break}a=a.return}if(n==null)throw Error(_(160));switch(n.tag){case 27:var i=n.stateNode,l=As(e);Ko(e,l,i);break;case 5:var o=n.stateNode;n.flags&32&&(Xa(o,""),n.flags&=-33);var r=As(e);Ko(e,r,o);break;case 3:case 4:var u=n.stateNode.containerInfo,c=As(e);mu(e,c,u);break;default:throw Error(_(161))}}catch(m){Z(e,e.return,m)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Jp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Jp(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function kt(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Yp(e,t.alternate,t),t=t.sibling}function Qn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:An(4,t,t.return),Qn(t);break;case 1:Et(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==="function"&&Hp(t,t.return,n),Qn(t);break;case 27:el(t.stateNode);case 26:case 5:Et(t,t.return),Qn(t);break;case 22:t.memoizedState===null&&Qn(t);break;case 30:Qn(t);break;default:Qn(t)}e=e.sibling}}function Ut(e,t,n){n=n&&(t.subtreeFlags&8772)!==0;for(t=t.child;t!==null;){var a=t.alternate,i=e,l=t,o=l.flags;switch(l.tag){case 0:case 11:case 15:Ut(i,l,n),El(4,l);break;case 1:if(Ut(i,l,n),a=l,i=a.stateNode,typeof i.componentDidMount==="function")try{i.componentDidMount()}catch(c){Z(a,a.return,c)}if(a=l,i=a.updateQueue,i!==null){var r=a.stateNode;try{var u=i.shared.hiddenCallbacks;if(u!==null)for(i.shared.hiddenCallbacks=null,i=0;i<u.length;i++)Jh(u[i],r)}catch(c){Z(a,a.return,c)}}n&&o&64&&Bp(l),Fi(l,l.return);break;case 27:Gp(l);case 26:case 5:Ut(i,l,n),n&&a===null&&o&4&&jp(l),Fi(l,l.return);break;case 12:Ut(i,l,n);break;case 31:Ut(i,l,n),n&&o&4&&Qp(i,l);break;case 13:Ut(i,l,n),n&&o&4&&Zp(i,l);break;case 22:l.memoizedState===null&&Ut(i,l,n),Fi(l,l.return);break;case 30:break;default:Ut(i,l,n)}t=t.sibling}}function mc(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&_l(n))}function vc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_l(e))}function ht(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Fp(e,t,n,a),t=t.sibling}function Fp(e,t,n,a){var i=t.flags;switch(t.tag){case 0:case 11:case 15:ht(e,t,n,a),i&2048&&El(9,t);break;case 1:ht(e,t,n,a);break;case 3:ht(e,t,n,a),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&_l(e)));break;case 12:if(i&2048){ht(e,t,n,a),e=t.stateNode;try{var l=t.memoizedProps,o=l.id,r=l.onPostCommit;typeof r==="function"&&r(o,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(u){Z(t,t.return,u)}}else ht(e,t,n,a);break;case 31:ht(e,t,n,a);break;case 13:ht(e,t,n,a);break;case 23:break;case 22:l=t.stateNode,o=t.alternate,t.memoizedState!==null?l._visibility&2?ht(e,t,n,a):Wi(e,t):l._visibility&2?ht(e,t,n,a):(l._visibility|=2,_a(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),i&2048&&mc(o,t);break;case 24:ht(e,t,n,a),i&2048&&vc(t.alternate,t);break;default:ht(e,t,n,a)}}function _a(e,t,n,a,i){i=i&&((t.subtreeFlags&10256)!==0||!1);for(t=t.child;t!==null;){var l=e,o=t,r=n,u=a,c=o.flags;switch(o.tag){case 0:case 11:case 15:_a(l,o,r,u,i),El(8,o);break;case 23:break;case 22:var m=o.stateNode;o.memoizedState!==null?m._visibility&2?_a(l,o,r,u,i):Wi(l,o):(m._visibility|=2,_a(l,o,r,u,i)),i&&c&2048&&mc(o.alternate,o);break;case 24:_a(l,o,r,u,i),i&&c&2048&&vc(o.alternate,o);break;default:_a(l,o,r,u,i)}t=t.sibling}}function Wi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,i=a.flags;switch(a.tag){case 22:Wi(n,a),i&2048&&mc(a.alternate,a);break;case 24:Wi(n,a),i&2048&&vc(a.alternate,a);break;default:Wi(n,a)}t=t.sibling}}var Hi=8192;function Sa(e,t,n){if(e.subtreeFlags&Hi)for(e=e.child;e!==null;)Wp(e,t,n),e=e.sibling}function Wp(e,t,n){switch(e.tag){case 26:Sa(e,t,n),e.flags&Hi&&e.memoizedState!==null&&$0(n,pt,e.memoizedState,e.memoizedProps);break;case 5:Sa(e,t,n);break;case 3:case 4:var a=pt;pt=Po(e.stateNode.containerInfo),Sa(e,t,n),pt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Hi,Hi=16777216,Sa(e,t,n),Hi=a):Sa(e,t,n));break;default:Sa(e,t,n)}}function Pp(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 Ri(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];ve=a,em(a,e)}Pp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ip(e),e=e.sibling}function Ip(e){switch(e.tag){case 0:case 11:case 15:Ri(e),e.flags&2048&&An(9,e,e.return);break;case 3:Ri(e);break;case 12:Ri(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Eo(e)):Ri(e);break;default:Ri(e)}}function Eo(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];ve=a,em(a,e)}Pp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:An(8,t,t.return),Eo(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Eo(t));break;default:Eo(t)}e=e.sibling}}function em(e,t){for(;ve!==null;){var n=ve;switch(n.tag){case 0:case 11:case 15:An(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:_l(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,ve=a;else e:for(n=e;ve!==null;){a=ve;var i=a.sibling,l=a.return;if(Kp(a),a===n){ve=null;break e}if(i!==null){i.return=l,ve=i;break e}ve=l}}}var f0={getCacheForType:function(e){var t=Ee(fe),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ee(fe).controller.signal}},d0=typeof WeakMap==="function"?WeakMap:Map,K=0,W=null,j=null,q=0,Q=0,Ve=null,mn=!1,ai=!1,gc=!1,$t=0,oe=0,Tn=0,In=0,yc=0,He=0,Ja=0,Pi=null,Re=null,vu=!1,mr=0,tm=0,Xo=1/0,Qo=null,Sn=null,pe=0,_n=null,Fa=null,Yt=0,gu=0,yu=null,nm=null,Ii=0,bu=null;function at(){return(K&2)!==0&&q!==0?q&-q:z.T!==null?Sc():ph()}function am(){if(He===0)if((q&536870912)===0||G){var e=Il;Il<<=1,(Il&3932160)===0&&(Il=262144),He=e}else He=536870912;return e=Ke.current,e!==null&&(e.flags|=32),He}function Me(e,t,n){if(e===W&&(Q===2||Q===9)||e.cancelPendingCommit!==null)Wa(e,0),vn(e,q,He,!1);if(ir(e,n),(K&2)===0||e!==W)e===W&&((K&2)===0&&(In|=n),oe===4&&vn(e,q,He,!1)),Jt(e)}function im(e,t,n){if((K&6)!==0)throw Error(_(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||gl(e,t),i=a?m0(e,t):Ds(e,t,!0),l=a;do{if(i===0){ai&&!a&&vn(e,t,0,!1);break}else{if(n=e.current.alternate,l&&!h0(n)){i=Ds(e,t,!1),l=!1;continue}if(i===2){if(l=t,e.errorRecoveryDisabledLanes&l)var o=0;else o=e.pendingLanes&-536870913,o=o!==0?o:o&536870912?536870912:0;if(o!==0){t=o;e:{var r=e;i=Pi;var u=r.current.memoizedState.isDehydrated;if(u&&(Wa(r,o).flags|=256),o=Ds(r,o,!1),o!==2){if(gc&&!u){r.errorRecoveryDisabledLanes|=l,In|=l,i=4;break e}l=Re,Re=i,l!==null&&(Re===null?Re=l:Re.push.apply(Re,l))}i=o}if(l=!1,i!==2)continue}}if(i===1){Wa(e,0),vn(e,t,0,!0);break}e:{switch(a=e,l=i,l){case 0:case 1:throw Error(_(345));case 4:if((t&4194048)!==t)break;case 6:vn(a,t,He,!mn);break e;case 2:Re=null;break;case 3:case 5:break;default:throw Error(_(329))}if((t&62914560)===t&&(i=mr+300-je(),10<i)){if(vn(a,t,He,!mn),ar(a,0,!0)!==0)break e;Yt=t,a.timeoutHandle=Nm(Td.bind(null,a,n,Re,Qo,vu,t,He,In,Ja,mn,l,"Throttled",-0,0),i);break e}Td(a,n,Re,Qo,vu,t,He,In,Ja,mn,l,null,-0,0)}}break}while(1);Jt(e)}function Td(e,t,n,a,i,l,o,r,u,c,m,y,h,g){if(e.timeoutHandle=-1,y=t.subtreeFlags,y&8192||(y&16785408)===16785408){y={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Ht},Wp(t,l,y);var x=(l&62914560)===l?mr-je():(l&4194048)===l?tm-je():0;if(x=J0(y,x),x!==null){Yt=l,e.cancelPendingCommit=x(zd.bind(null,e,t,l,n,a,i,o,r,u,m,y,null,h,g)),vn(e,l,o,!c);return}}zd(e,t,l,n,a,i,o,r,u)}function h0(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var i=n[a],l=i.getSnapshot;i=i.value;try{if(!Ye(l(),i))return!1}catch(o){return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function vn(e,t,n,a){t&=~yc,t&=~In,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var i=t;0<i;){var l=31-Ge(i),o=1<<l;a[l]=-1,i&=~o}n!==0&&ch(e,n,t)}function vr(){return(K&6)===0?(wl(0,!1),!1):!0}function bc(){if(j!==null){if(Q===0)var e=j.return;else e=j,jt=ua=null,ic(e),ja=null,rl=0,e=j;for(;e!==null;)Lp(e.alternate,e),e=e.return;j=null}}function Wa(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,R0(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Yt=0,bc(),W=e,j=n=qt(e.current,null),q=t,Q=0,Ve=null,mn=!1,ai=gl(e,t),gc=!1,Ja=He=yc=In=Tn=oe=0,Re=Pi=null,vu=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var i=31-Ge(a),l=1<<i;t|=e[i],a&=~l}return $t=t,sr(),n}function lm(e,t){C=null,z.H=ul,t===ni||t===cr?(t=od(),Q=3):t===Wu?(t=od(),Q=4):Q=t===hc?8:t!==null&&typeof t==="object"&&typeof t.then==="function"?6:1,Ve=t,j===null&&(oe=1,Go(e,et(t,e.current)))}function om(){var e=Ke.current;return e===null?!0:(q&4194048)===q?nt===null?!0:!1:(q&62914560)===q||(q&536870912)!==0?e===nt:!1}function rm(){var e=z.H;return z.H=ul,e===null?ul:e}function sm(){var e=z.A;return z.A=f0,e}function Zo(){oe=4,mn||(q&4194048)!==q&&Ke.current!==null||(ai=!0),(Tn&134217727)===0&&(In&134217727)===0||W===null||vn(W,q,He,!1)}function Ds(e,t,n){var a=K;K|=2;var i=rm(),l=sm();if(W!==e||q!==t)Qo=null,Wa(e,t);t=!1;var o=oe;e:do try{if(Q!==0&&j!==null){var r=j,u=Ve;switch(Q){case 8:bc(),o=6;break e;case 3:case 2:case 9:case 6:Ke.current===null&&(t=!0);var c=Q;if(Q=0,Ve=null,Ua(e,r,u,c),n&&ai){o=0;break e}break;default:c=Q,Q=0,Ve=null,Ua(e,r,u,c)}}p0(),o=oe;break}catch(m){lm(e,m)}while(1);return t&&e.shellSuspendCounter++,jt=ua=null,K=a,z.H=i,z.A=l,j===null&&(W=null,q=0,sr()),o}function p0(){for(;j!==null;)um(j)}function m0(e,t){var n=K;K|=2;var a=rm(),i=sm();W!==e||q!==t?(Qo=null,Xo=je()+500,Wa(e,t)):ai=gl(e,t);e:do try{if(Q!==0&&j!==null){t=j;var l=Ve;t:switch(Q){case 1:Q=0,Ve=null,Ua(e,t,l,1);break;case 2:case 9:if(ld(l)){Q=0,Ve=null,Dd(t);break}t=function(){Q!==2&&Q!==9||W!==e||(Q=7),Jt(e)},l.then(t,t);break e;case 3:Q=7;break e;case 4:Q=5;break e;case 7:ld(l)?(Q=0,Ve=null,Dd(t)):(Q=0,Ve=null,Ua(e,t,l,7));break;case 5:var o=null;switch(j.tag){case 26:o=j.memoizedState;case 5:case 27:var r=j;if(o?zm(o):r.stateNode.complete){Q=0,Ve=null;var u=r.sibling;if(u!==null)j=u;else{var c=r.return;c!==null?(j=c,gr(c)):j=null}break t}}Q=0,Ve=null,Ua(e,t,l,5);break;case 6:Q=0,Ve=null,Ua(e,t,l,6);break;case 8:bc(),oe=6;break e;default:throw Error(_(462))}}v0();break}catch(m){lm(e,m)}while(1);if(jt=ua=null,z.H=a,z.A=i,K=n,j!==null)return 0;return W=null,q=0,sr(),oe}function v0(){for(;j!==null&&!Vy();)um(j)}function um(e){var t=Vp(e.alternate,e,$t);e.memoizedProps=e.pendingProps,t===null?gr(e):j=t}function Dd(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=xd(n,t,t.pendingProps,t.type,void 0,q);break;case 11:t=xd(n,t,t.pendingProps,t.type.render,t.ref,q);break;case 5:ic(t);default:Lp(n,t),t=j=jh(t,$t),t=Vp(n,t,$t)}e.memoizedProps=e.pendingProps,t===null?gr(e):j=t}function Ua(e,t,n,a){jt=ua=null,ic(t),ja=null,rl=0;var i=t.return;try{if(i0(e,i,t,n,q)){oe=1,Go(e,et(n,e.current)),j=null;return}}catch(l){if(i!==null)throw j=i,l;oe=1,Go(e,et(n,e.current)),j=null;return}if(t.flags&32768){if(G||a===1)e=!0;else if(ai||(q&536870912)!==0)e=!1;else if(mn=e=!0,a===2||a===9||a===3||a===6)a=Ke.current,a!==null&&a.tag===13&&(a.flags|=16384);cm(t,e)}else gr(t)}function gr(e){var t=e;do{if((t.flags&32768)!==0){cm(t,mn);return}e=t.return;var n=r0(t.alternate,t,$t);if(n!==null){j=n;return}if(t=t.sibling,t!==null){j=t;return}j=t=e}while(t!==null);oe===0&&(oe=5)}function cm(e,t){do{var n=s0(e.alternate,e);if(n!==null){n.flags&=32767,j=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){j=e;return}j=e=n}while(e!==null);oe=6,j=null}function zd(e,t,n,a,i,l,o,r,u){e.cancelPendingCommit=null;do yr();while(pe!==0);if((K&6)!==0)throw Error(_(327));if(t!==null){if(t===e.current)throw Error(_(177));if(l=t.lanes|t.childLanes,l|=Ku,Qy(e,n,l,o,r,u),e===W&&(j=W=null,q=0),Fa=t,_n=e,Yt=n,gu=l,yu=i,nm=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,S0(Ro,function(){return mm(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=z.T,z.T=null,i=X.p,X.p=2,o=K,K|=4;try{u0(e,t,n)}finally{K=o,X.p=i,z.T=a}}pe=1,fm(),dm(),hm()}}function fm(){if(pe===1){pe=0;var e=_n,t=Fa,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=z.T,z.T=null;var a=X.p;X.p=2;var i=K;K|=4;try{$p(t,e);var l=Nu,o=Mh(e.containerInfo),{focusedElem:r,selectionRange:u}=l;if(o!==r&&r&&r.ownerDocument&&Rh(r.ownerDocument.documentElement,r)){if(u!==null&&Yu(r)){var{start:c,end:m}=u;if(m===void 0&&(m=c),"selectionStart"in r)r.selectionStart=c,r.selectionEnd=Math.min(m,r.value.length);else{var y=r.ownerDocument||document,h=y&&y.defaultView||window;if(h.getSelection){var g=h.getSelection(),x=r.textContent.length,A=Math.min(u.start,x),M=u.end===void 0?A:Math.min(u.end,x);!g.extend&&A>M&&(o=M,M=A,A=o);var d=Pf(r,A),f=Pf(r,M);if(d&&f&&(g.rangeCount!==1||g.anchorNode!==d.node||g.anchorOffset!==d.offset||g.focusNode!==f.node||g.focusOffset!==f.offset)){var v=y.createRange();v.setStart(d.node,d.offset),g.removeAllRanges(),A>M?(g.addRange(v),g.extend(f.node,f.offset)):(v.setEnd(f.node,f.offset),g.addRange(v))}}}}y=[];for(g=r;g=g.parentNode;)g.nodeType===1&&y.push({element:g,left:g.scrollLeft,top:g.scrollTop});typeof r.focus==="function"&&r.focus();for(r=0;r<y.length;r++){var b=y[r];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}tr=!!wu,Nu=wu=null}finally{K=i,X.p=a,z.T=n}}e.current=t,pe=2}}function dm(){if(pe===2){pe=0;var e=_n,t=Fa,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=z.T,z.T=null;var a=X.p;X.p=2;var i=K;K|=4;try{Yp(e,t.alternate,t)}finally{K=i,X.p=a,z.T=n}}pe=3}}function hm(){if(pe===4||pe===3){pe=0,Ly();var e=_n,t=Fa,n=Yt,a=nm;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?pe=5:(pe=0,Fa=_n=null,pm(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Sn=null),Vu(n),t=t.stateNode,qe&&typeof qe.onCommitFiberRoot==="function")try{qe.onCommitFiberRoot(vl,t,void 0,(t.current.flags&128)===128)}catch(u){}if(a!==null){t=z.T,i=X.p,X.p=2,z.T=null;try{for(var l=e.onRecoverableError,o=0;o<a.length;o++){var r=a[o];l(r.value,{componentStack:r.stack})}}finally{z.T=t,X.p=i}}(Yt&3)!==0&&yr(),Jt(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===bu?Ii++:(Ii=0,bu=e):Ii=0,wl(0,!1)}}function pm(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,_l(t)))}function yr(){return fm(),dm(),hm(),mm()}function mm(){if(pe!==5)return!1;var e=_n,t=gu;gu=0;var n=Vu(Yt),a=z.T,i=X.p;try{X.p=32>n?32:n,z.T=null,n=yu,yu=null;var l=_n,o=Yt;if(pe=0,Fa=_n=null,Yt=0,(K&6)!==0)throw Error(_(331));var r=K;if(K|=4,Ip(l.current),Fp(l,l.current,o,n),K=r,wl(0,!1),qe&&typeof qe.onPostCommitFiberRoot==="function")try{qe.onPostCommitFiberRoot(vl,l)}catch(u){}return!0}finally{X.p=i,z.T=a,pm(e,t)}}function Rd(e,t,n){t=et(n,t),t=du(e.stateNode,t,2),e=Pn(e,t,2),e!==null&&(ir(e,2),Jt(e))}function Z(e,t,n){if(e.tag===3)Rd(e,e,n);else for(;t!==null;){if(t.tag===3){Rd(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError==="function"||typeof a.componentDidCatch==="function"&&(Sn===null||!Sn.has(a))){e=et(n,e),n=zp(2),a=Pn(t,n,2),a!==null&&(Rp(n,a,t,e),ir(a,2),Jt(a));break}}t=t.return}}function zs(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new d0;var i=new Set;a.set(t,i)}else i=a.get(t),i===void 0&&(i=new Set,a.set(t,i));i.has(n)||(gc=!0,i.add(n),e=g0.bind(null,e,t,n),t.then(e,e))}function g0(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,W===e&&(q&n)===n&&(oe===4||oe===3&&(q&62914560)===q&&300>je()-mr?(K&2)===0&&Wa(e,0):yc|=n,Ja===q&&(Ja=0)),Jt(e)}function vm(e,t){t===0&&(t=uh()),e=sa(e,t),e!==null&&(ir(e,t),Jt(e))}function y0(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vm(e,n)}function b0(e,t){var n=0;switch(e.tag){case 31:case 13:var{stateNode:a,memoizedState:i}=e;i!==null&&(n=i.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(_(314))}a!==null&&a.delete(t),vm(e,n)}function S0(e,t){return Uu(e,t)}var $o=null,xa=null,Su=!1,Jo=!1,Rs=!1,gn=0;function Jt(e){e!==xa&&e.next===null&&(xa===null?$o=xa=e:xa=xa.next=e),Jo=!0,Su||(Su=!0,x0())}function wl(e,t){if(!Rs&&Jo){Rs=!0;do{var n=!1;for(var a=$o;a!==null;){if(!t)if(e!==0){var i=a.pendingLanes;if(i===0)var l=0;else{var o=a.suspendedLanes,r=a.pingedLanes;l=(1<<31-Ge(42|e)+1)-1,l&=i&~(o&~r),l=l&201326741?l&201326741|1:l?l|2:0}l!==0&&(n=!0,Md(a,l))}else l=q,l=ar(a,a===W?l:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(l&3)===0||gl(a,l)||(n=!0,Md(a,l));a=a.next}}while(n);Rs=!1}}function _0(){gm()}function gm(){Jo=Su=!1;var e=0;gn!==0&&z0()&&(e=gn);for(var t=je(),n=null,a=$o;a!==null;){var i=a.next,l=ym(a,t);if(l===0)a.next=null,n===null?$o=i:n.next=i,i===null&&(xa=n);else if(n=a,e!==0||(l&3)!==0)Jo=!0;a=i}pe!==0&&pe!==5||wl(e,!1),gn!==0&&(gn=0)}function ym(e,t){for(var{suspendedLanes:n,pingedLanes:a,expirationTimes:i}=e,l=e.pendingLanes&-62914561;0<l;){var o=31-Ge(l),r=1<<o,u=i[o];if(u===-1){if((r&n)===0||(r&a)!==0)i[o]=Xy(r,t)}else u<=t&&(e.expiredLanes|=r);l&=~r}if(t=W,n=q,n=ar(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Q===2||Q===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&rs(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||gl(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&rs(a),Vu(n)){case 2:case 8:n=rh;break;case 32:n=Ro;break;case 268435456:n=sh;break;default:n=Ro}return a=bm.bind(null,e),n=Uu(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&rs(a),e.callbackPriority=2,e.callbackNode=null,2}function bm(e,t){if(pe!==0&&pe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(yr()&&e.callbackNode!==n)return null;var a=q;if(a=ar(e,e===W?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0)return null;return im(e,a,t),ym(e,je()),e.callbackNode!=null&&e.callbackNode===n?bm.bind(null,e):null}function Md(e,t){if(yr())return null;im(e,t,!0)}function x0(){M0(function(){(K&6)!==0?Uu(oh,_0):gm()})}function Sc(){if(gn===0){var e=Qa;e===0&&(e=Pl,Pl<<=1,(Pl&261888)===0&&(Pl=256)),gn=e}return gn}function Cd(e){return e==null||typeof e==="symbol"||typeof e==="boolean"?null:typeof e==="function"?e:ho(""+e)}function kd(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function E0(e,t,n,a,i){if(t==="submit"&&n&&n.stateNode===i){var l=Cd((i[Ce]||null).action),o=a.submitter;o&&(t=(t=o[Ce]||null)?Cd(t.formAction):o.getAttribute("formAction"),t!==null&&(l=t,o=null));var r=new lr("action","action",null,a,i);e.push({event:r,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(gn!==0){var u=o?kd(i,o):new FormData(i);cu(n,{pending:!0,data:u,method:i.method,action:l},null,u)}}else typeof l==="function"&&(r.preventDefault(),u=o?kd(i,o):new FormData(i),cu(n,{pending:!0,data:u,method:i.method,action:l},l,u))},currentTarget:i}]})}}for(ji=0;ji<Ps.length;ji++)qi=Ps[ji],_u=qi.toLowerCase(),xu=qi[0].toUpperCase()+qi.slice(1),mt(_u,"on"+xu);var qi,_u,xu,ji;mt(kh,"onAnimationEnd");mt(Uh,"onAnimationIteration");mt(Vh,"onAnimationStart");mt("dblclick","onDoubleClick");mt("focusin","onFocus");mt("focusout","onBlur");mt(Bb,"onTransitionRun");mt(Hb,"onTransitionStart");mt(jb,"onTransitionCancel");mt(Lh,"onTransitionEnd");Ka("onMouseEnter",["mouseout","mouseover"]);Ka("onMouseLeave",["mouseout","mouseover"]);Ka("onPointerEnter",["pointerout","pointerover"]);Ka("onPointerLeave",["pointerout","pointerover"]);la("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));la("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));la("onBeforeInput",["compositionend","keypress","textInput","paste"]);la("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));la("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));la("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var cl="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(" "),w0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(cl));function Sm(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],i=a.event;a=a.listeners;e:{var l=void 0;if(t)for(var o=a.length-1;0<=o;o--){var r=a[o],u=r.instance,c=r.currentTarget;if(r=r.listener,u!==l&&i.isPropagationStopped())break e;l=r,i.currentTarget=c;try{l(i)}catch(m){Co(m)}i.currentTarget=null,l=u}else for(o=0;o<a.length;o++){if(r=a[o],u=r.instance,c=r.currentTarget,r=r.listener,u!==l&&i.isPropagationStopped())break e;l=r,i.currentTarget=c;try{l(i)}catch(m){Co(m)}i.currentTarget=null,l=u}}}}function H(e,t){var n=t[Ks];n===void 0&&(n=t[Ks]=new Set);var a=e+"__bubble";n.has(a)||(xm(t,e,2,!1),n.add(a))}function Ms(e,t,n){var a=0;t&&(a|=4),xm(n,e,a,t)}var so="_reactListening"+Math.random().toString(36).slice(2);function _m(e){if(!e[so]){e[so]=!0,mh.forEach(function(n){n!=="selectionchange"&&(w0.has(n)||Ms(n,!1,e),Ms(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[so]||(t[so]=!0,Ms("selectionchange",!1,t))}}function xm(e,t,n,a){switch(Cm(t)){case 2:var i=e1;break;case 8:i=t1;break;default:i=wc}n=i.bind(null,t,n,e),i=void 0,!Js||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),a?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Cs(e,t,n,a,i){var l=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var o=a.tag;if(o===3||o===4){var r=a.stateNode.containerInfo;if(r===i)break;if(o===4)for(o=a.return;o!==null;){var u=o.tag;if((u===3||u===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;r!==null;){if(o=Oa(r),o===null)return;if(u=o.tag,u===5||u===6||u===26||u===27){a=l=o;continue e}r=r.parentNode}}a=a.return}Eh(function(){var c=l,m=Hu(n),y=[];e:{var h=Bh.get(e);if(h!==void 0){var g=lr,x=e;switch(e){case"keypress":if(mo(n)===0)break e;case"keydown":case"keyup":g=vb;break;case"focusin":x="focus",g=ds;break;case"focusout":x="blur",g=ds;break;case"beforeblur":case"afterblur":g=ds;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":g=Yf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":g=ib;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":g=bb;break;case kh:case Uh:case Vh:g=rb;break;case Lh:g=_b;break;case"scroll":case"scrollend":g=nb;break;case"wheel":g=Eb;break;case"copy":case"cut":case"paste":g=ub;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":g=Xf;break;case"toggle":case"beforetoggle":g=Nb}var A=(t&4)!==0,M=!A&&(e==="scroll"||e==="scrollend"),d=A?h!==null?h+"Capture":null:h;A=[];for(var f=c,v;f!==null;){var b=f;if(v=b.stateNode,b=b.tag,b!==5&&b!==26&&b!==27||v===null||d===null||(b=nl(f,d),b!=null&&A.push(fl(f,b,v))),M)break;f=f.return}0<A.length&&(h=new g(h,x,null,n,m),y.push({event:h,listeners:A}))}}if((t&7)===0){e:{if(h=e==="mouseover"||e==="pointerover",g=e==="mouseout"||e==="pointerout",h&&n!==$s&&(x=n.relatedTarget||n.fromElement)&&(Oa(x)||x[yl]))break e;if(g||h){if(h=m.window===m?m:(h=m.ownerDocument)?h.defaultView||h.parentWindow:window,g){if(x=n.relatedTarget||n.toElement,g=c,x=x?Oa(x):null,x!==null&&(M=ml(x),A=x.tag,x!==M||A!==5&&A!==27&&A!==6))x=null}else g=null,x=c;if(g!==x){if(A=Yf,b="onMouseLeave",d="onMouseEnter",f="mouse",e==="pointerout"||e==="pointerover")A=Xf,b="onPointerLeave",d="onPointerEnter",f="pointer";if(M=g==null?h:Ui(g),v=x==null?h:Ui(x),h=new A(b,f+"leave",g,n,m),h.target=M,h.relatedTarget=v,b=null,Oa(m)===c&&(A=new A(d,f+"enter",x,n,m),A.target=v,A.relatedTarget=M,b=A),M=b,g&&x)t:{A=N0,d=g,f=x,v=0;for(b=d;b;b=A(b))v++;b=0;for(var w=f;w;w=A(w))b++;for(;0<v-b;)d=A(d),v--;for(;0<b-v;)f=A(f),b--;for(;v--;){if(d===f||f!==null&&d===f.alternate){A=d;break t}d=A(d),f=A(f)}A=null}else A=null;g!==null&&Ud(y,h,g,A,!1),x!==null&&M!==null&&Ud(y,M,x,A,!0)}}}e:{if(h=c?Ui(c):window,g=h.nodeName&&h.nodeName.toLowerCase(),g==="select"||g==="input"&&h.type==="file")var k=Jf;else if($f(h))if(Dh)k=Ub;else{k=Cb;var O=Mb}else g=h.nodeName,!g||g.toLowerCase()!=="input"||h.type!=="checkbox"&&h.type!=="radio"?c&&Bu(c.elementType)&&(k=Jf):k=kb;if(k&&(k=k(e,c))){Th(y,k,n,m);break e}O&&O(e,h,c),e==="focusout"&&c&&h.type==="number"&&c.memoizedProps.value!=null&&Zs(h,"number",h.value)}switch(O=c?Ui(c):window,e){case"focusin":if($f(O)||O.contentEditable==="true")Da=O,Fs=c,Ki=null;break;case"focusout":Ki=Fs=Da=null;break;case"mousedown":Ws=!0;break;case"contextmenu":case"mouseup":case"dragend":Ws=!1,If(y,n,m);break;case"selectionchange":if(Lb)break;case"keydown":case"keyup":If(y,n,m)}var R;if(Gu)e:{switch(e){case"compositionstart":var U="onCompositionStart";break e;case"compositionend":U="onCompositionEnd";break e;case"compositionupdate":U="onCompositionUpdate";break e}U=void 0}else Ta?Oh(e,n)&&(U="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(U="onCompositionStart");if(U&&(Nh&&n.locale!=="ko"&&(Ta||U!=="onCompositionStart"?U==="onCompositionEnd"&&Ta&&(R=wh()):(pn=m,ju=("value"in pn)?pn.value:pn.textContent,Ta=!0)),O=Fo(c,U),0<O.length&&(U=new Kf(U,e,null,n,m),y.push({event:U,listeners:O}),R?U.data=R:(R=Ah(n),R!==null&&(U.data=R)))),R=Ab?Tb(e,n):Db(e,n))U=Fo(c,"onBeforeInput"),0<U.length&&(O=new Kf("onBeforeInput","beforeinput",null,n,m),y.push({event:O,listeners:U}),O.data=R);E0(y,e,c,n,m)}Sm(y,t)})}function fl(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Fo(e,t){for(var n=t+"Capture",a=[];e!==null;){var i=e,l=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||l===null||(i=nl(e,n),i!=null&&a.unshift(fl(e,i,l)),i=nl(e,t),i!=null&&a.push(fl(e,i,l))),e.tag===3)return a;e=e.return}return[]}function N0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e?e:null}function Ud(e,t,n,a,i){for(var l=t._reactName,o=[];n!==null&&n!==a;){var r=n,u=r.alternate,c=r.stateNode;if(r=r.tag,u!==null&&u===a)break;r!==5&&r!==26&&r!==27||c===null||(u=c,i?(c=nl(n,l),c!=null&&o.unshift(fl(n,c,u))):i||(c=nl(n,l),c!=null&&o.push(fl(n,c,u)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var O0=/\r\n?/g,A0=/\u0000|\uFFFD/g;function Vd(e){return(typeof e==="string"?e:""+e).replace(O0,`
9
+ `).replace(A0,"")}function Em(e,t){return t=Vd(t),Vd(e)===t?!0:!1}function J(e,t,n,a,i,l){switch(n){case"children":typeof a==="string"?t==="body"||t==="textarea"&&a===""||Xa(e,a):(typeof a==="number"||typeof a==="bigint")&&t!=="body"&&Xa(e,""+a);break;case"className":to(e,"class",a);break;case"tabIndex":to(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":to(e,n,a);break;case"style":xh(e,a,l);break;case"data":if(t!=="object"){to(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a==="function"||typeof a==="symbol"||typeof a==="boolean"){e.removeAttribute(n);break}a=ho(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a==="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof l==="function"&&(n==="formAction"?(t!=="input"&&J(e,t,"name",i.name,i,null),J(e,t,"formEncType",i.formEncType,i,null),J(e,t,"formMethod",i.formMethod,i,null),J(e,t,"formTarget",i.formTarget,i,null)):(J(e,t,"encType",i.encType,i,null),J(e,t,"method",i.method,i,null),J(e,t,"target",i.target,i,null)));if(a==null||typeof a==="symbol"||typeof a==="boolean"){e.removeAttribute(n);break}a=ho(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=Ht);break;case"onScroll":a!=null&&H("scroll",e);break;case"onScrollEnd":a!=null&&H("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!=="object"||!("__html"in a))throw Error(_(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(_(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!=="function"&&typeof a!=="symbol";break;case"muted":e.muted=a&&typeof a!=="function"&&typeof a!=="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a==="function"||typeof a==="boolean"||typeof a==="symbol"){e.removeAttribute("xlink:href");break}n=ho(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!=="function"&&typeof a!=="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!=="function"&&typeof a!=="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!=="function"&&typeof a!=="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!=="function"&&typeof a!=="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a==="function"||typeof a==="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":H("beforetoggle",e),H("toggle",e),fo(e,"popover",a);break;case"xlinkActuate":Rt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Rt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Rt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Rt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Rt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Rt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Rt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Rt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Rt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":fo(e,"is",a);break;case"innerText":case"textContent":break;default:if(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")n=eb.get(n)||n,fo(e,n,a)}}function Eu(e,t,n,a,i,l){switch(n){case"style":xh(e,a,l);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!=="object"||!("__html"in a))throw Error(_(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(_(60));e.innerHTML=n}}break;case"children":typeof a==="string"?Xa(e,a):(typeof a==="number"||typeof a==="bigint")&&Xa(e,""+a);break;case"onScroll":a!=null&&H("scroll",e);break;case"onScrollEnd":a!=null&&H("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Ht);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!vh.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),l=e[Ce]||null,l=l!=null?l[n]:null,typeof l==="function"&&e.removeEventListener(t,l,i),typeof a==="function")){typeof l!=="function"&&l!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,i);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):fo(e,n,a)}}}function we(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":H("error",e),H("load",e);var a=!1,i=!1,l;for(l in n)if(n.hasOwnProperty(l)){var o=n[l];if(o!=null)switch(l){case"src":a=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(_(137,t));default:J(e,t,l,o,n,null)}}i&&J(e,t,"srcSet",n.srcSet,n,null),a&&J(e,t,"src",n.src,n,null);return;case"input":H("invalid",e);var r=l=o=i=null,u=null,c=null;for(a in n)if(n.hasOwnProperty(a)){var m=n[a];if(m!=null)switch(a){case"name":i=m;break;case"type":o=m;break;case"checked":u=m;break;case"defaultChecked":c=m;break;case"value":l=m;break;case"defaultValue":r=m;break;case"children":case"dangerouslySetInnerHTML":if(m!=null)throw Error(_(137,t));break;default:J(e,t,a,m,n,null)}}bh(e,l,r,u,c,o,i,!1);return;case"select":H("invalid",e),a=o=l=null;for(i in n)if(n.hasOwnProperty(i)&&(r=n[i],r!=null))switch(i){case"value":l=r;break;case"defaultValue":o=r;break;case"multiple":a=r;default:J(e,t,i,r,n,null)}t=l,n=o,e.multiple=!!a,t!=null?La(e,!!a,t,!1):n!=null&&La(e,!!a,n,!0);return;case"textarea":H("invalid",e),l=i=a=null;for(o in n)if(n.hasOwnProperty(o)&&(r=n[o],r!=null))switch(o){case"value":a=r;break;case"defaultValue":i=r;break;case"children":l=r;break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(_(91));break;default:J(e,t,o,r,n,null)}_h(e,a,i,l);return;case"option":for(u in n)if(n.hasOwnProperty(u)&&(a=n[u],a!=null))switch(u){case"selected":e.selected=a&&typeof a!=="function"&&typeof a!=="symbol";break;default:J(e,t,u,a,n,null)}return;case"dialog":H("beforetoggle",e),H("toggle",e),H("cancel",e),H("close",e);break;case"iframe":case"object":H("load",e);break;case"video":case"audio":for(a=0;a<cl.length;a++)H(cl[a],e);break;case"image":H("error",e),H("load",e);break;case"details":H("toggle",e);break;case"embed":case"source":case"link":H("error",e),H("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(c in n)if(n.hasOwnProperty(c)&&(a=n[c],a!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(_(137,t));default:J(e,t,c,a,n,null)}return;default:if(Bu(t)){for(m in n)n.hasOwnProperty(m)&&(a=n[m],a!==void 0&&Eu(e,t,m,a,n,void 0));return}}for(r in n)n.hasOwnProperty(r)&&(a=n[r],a!=null&&J(e,t,r,a,n,null))}function T0(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,l=null,o=null,r=null,u=null,c=null,m=null;for(g in n){var y=n[g];if(n.hasOwnProperty(g)&&y!=null)switch(g){case"checked":break;case"value":break;case"defaultValue":u=y;default:a.hasOwnProperty(g)||J(e,t,g,null,a,y)}}for(var h in a){var g=a[h];if(y=n[h],a.hasOwnProperty(h)&&(g!=null||y!=null))switch(h){case"type":l=g;break;case"name":i=g;break;case"checked":c=g;break;case"defaultChecked":m=g;break;case"value":o=g;break;case"defaultValue":r=g;break;case"children":case"dangerouslySetInnerHTML":if(g!=null)throw Error(_(137,t));break;default:g!==y&&J(e,t,h,g,a,y)}}Qs(e,o,r,u,c,m,l,i);return;case"select":g=o=r=h=null;for(l in n)if(u=n[l],n.hasOwnProperty(l)&&u!=null)switch(l){case"value":break;case"multiple":g=u;default:a.hasOwnProperty(l)||J(e,t,l,null,a,u)}for(i in a)if(l=a[i],u=n[i],a.hasOwnProperty(i)&&(l!=null||u!=null))switch(i){case"value":h=l;break;case"defaultValue":r=l;break;case"multiple":o=l;default:l!==u&&J(e,t,i,l,a,u)}t=r,n=o,a=g,h!=null?La(e,!!n,h,!1):!!a!==!!n&&(t!=null?La(e,!!n,t,!0):La(e,!!n,n?[]:"",!1));return;case"textarea":g=h=null;for(r in n)if(i=n[r],n.hasOwnProperty(r)&&i!=null&&!a.hasOwnProperty(r))switch(r){case"value":break;case"children":break;default:J(e,t,r,null,a,i)}for(o in a)if(i=a[o],l=n[o],a.hasOwnProperty(o)&&(i!=null||l!=null))switch(o){case"value":h=i;break;case"defaultValue":g=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(_(91));break;default:i!==l&&J(e,t,o,i,a,l)}Sh(e,h,g);return;case"option":for(var x in n)if(h=n[x],n.hasOwnProperty(x)&&h!=null&&!a.hasOwnProperty(x))switch(x){case"selected":e.selected=!1;break;default:J(e,t,x,null,a,h)}for(u in a)if(h=a[u],g=n[u],a.hasOwnProperty(u)&&h!==g&&(h!=null||g!=null))switch(u){case"selected":e.selected=h&&typeof h!=="function"&&typeof h!=="symbol";break;default:J(e,t,u,h,a,g)}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 A in n)h=n[A],n.hasOwnProperty(A)&&h!=null&&!a.hasOwnProperty(A)&&J(e,t,A,null,a,h);for(c in a)if(h=a[c],g=n[c],a.hasOwnProperty(c)&&h!==g&&(h!=null||g!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(_(137,t));break;default:J(e,t,c,h,a,g)}return;default:if(Bu(t)){for(var M in n)h=n[M],n.hasOwnProperty(M)&&h!==void 0&&!a.hasOwnProperty(M)&&Eu(e,t,M,void 0,a,h);for(m in a)h=a[m],g=n[m],!a.hasOwnProperty(m)||h===g||h===void 0&&g===void 0||Eu(e,t,m,h,a,g);return}}for(var d in n)h=n[d],n.hasOwnProperty(d)&&h!=null&&!a.hasOwnProperty(d)&&J(e,t,d,null,a,h);for(y in a)h=a[y],g=n[y],!a.hasOwnProperty(y)||h===g||h==null&&g==null||J(e,t,y,h,a,g)}function Ld(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function D0(){if(typeof performance.getEntriesByType==="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var i=n[a],{transferSize:l,initiatorType:o,duration:r}=i;if(l&&r&&Ld(o)){o=0,r=i.responseEnd;for(a+=1;a<n.length;a++){var u=n[a],c=u.startTime;if(c>r)break;var m=u.transferSize,y=u.initiatorType;m&&Ld(y)&&(u=u.responseEnd,o+=m*(u<r?1:(r-c)/(u-c)))}if(--a,t+=8*(l+o)/(i.duration/1000),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==="number")?e:5}var wu=null,Nu=null;function Wo(e){return e.nodeType===9?e:e.ownerDocument}function Bd(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 wm(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 Ou(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 ks=null;function z0(){var e=window.event;if(e&&e.type==="popstate"){if(e===ks)return!1;return ks=e,!0}return ks=null,!1}var Nm=typeof setTimeout==="function"?setTimeout:void 0,R0=typeof clearTimeout==="function"?clearTimeout:void 0,Hd=typeof Promise==="function"?Promise:void 0,M0=typeof queueMicrotask==="function"?queueMicrotask:typeof Hd<"u"?function(e){return Hd.resolve(null).then(e).catch(C0)}:Nm;function C0(e){setTimeout(function(){throw e})}function zn(e){return e==="head"}function jd(e,t){var n=t,a=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(i),Ia(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")el(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,el(n);for(var l=n.firstChild;l;){var o=l.nextSibling,r=l.nodeName;l[bl]||r==="SCRIPT"||r==="STYLE"||r==="LINK"&&l.rel.toLowerCase()==="stylesheet"||n.removeChild(l),l=o}}else n==="body"&&el(e.ownerDocument.body);n=i}while(n);Ia(t)}function qd(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$")if(e===0)break;else e--;else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Au(e){var t=e.firstChild;t&&t.nodeType===10&&(t=t.nextSibling);for(;t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Au(n),Lu(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function k0(e,t,n,a){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(!a)if(t==="input"&&e.type==="hidden"){var l=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===l)return e}else return e;else if(!e[bl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(l=e.getAttribute("rel"),l==="stylesheet"&&e.hasAttribute("data-precedence"))break;else if(l!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(l=e.getAttribute("src"),(l!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&l&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}if(e=it(e.nextSibling),e===null)break}return null}function U0(e,t,n){if(t==="")return null;for(;e.nodeType!==3;){if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n)return null;if(e=it(e.nextSibling),e===null)return null}return e}function Om(e,t){for(;e.nodeType!==8;){if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t)return null;if(e=it(e.nextSibling),e===null)return null}return e}function Tu(e){return e.data==="$?"||e.data==="$~"}function Du(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function V0(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function it(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 zu=null;function Gd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return it(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Yd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Am(e,t,n){switch(t=Wo(n),e){case"html":if(e=t.documentElement,!e)throw Error(_(452));return e;case"head":if(e=t.head,!e)throw Error(_(453));return e;case"body":if(e=t.body,!e)throw Error(_(454));return e;default:throw Error(_(451))}}function el(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Lu(e)}var lt=new Map,Kd=new Set;function Po(e){return typeof e.getRootNode==="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Ft=X.d;X.d={f:L0,r:B0,D:H0,C:j0,L:q0,m:G0,X:K0,S:Y0,M:X0};function L0(){var e=Ft.f(),t=vr();return e||t}function B0(e){var t=ei(e);t!==null&&t.tag===5&&t.type==="form"?xp(t):Ft.r(e)}var ii=typeof document>"u"?null:document;function Tm(e,t,n){var a=ii;if(a&&typeof t==="string"&&t){var i=Ie(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n==="string"&&(i+='[crossorigin="'+n+'"]'),Kd.has(i)||(Kd.add(i),e={rel:e,crossOrigin:n,href:t},a.querySelector(i)===null&&(t=a.createElement("link"),we(t,"link",e),ge(t),a.head.appendChild(t)))}}function H0(e){Ft.D(e),Tm("dns-prefetch",e,null)}function j0(e,t){Ft.C(e,t),Tm("preconnect",e,t)}function q0(e,t,n){Ft.L(e,t,n);var a=ii;if(a&&e&&t){var i='link[rel="preload"][as="'+Ie(t)+'"]';t==="image"?n&&n.imageSrcSet?(i+='[imagesrcset="'+Ie(n.imageSrcSet)+'"]',typeof n.imageSizes==="string"&&(i+='[imagesizes="'+Ie(n.imageSizes)+'"]')):i+='[href="'+Ie(e)+'"]':i+='[href="'+Ie(e)+'"]';var l=i;switch(t){case"style":l=Pa(e);break;case"script":l=li(e)}lt.has(l)||(e=ae({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),lt.set(l,e),a.querySelector(i)!==null||t==="style"&&a.querySelector(Nl(l))||t==="script"&&a.querySelector(Ol(l))||(t=a.createElement("link"),we(t,"link",e),ge(t),a.head.appendChild(t)))}}function G0(e,t){Ft.m(e,t);var n=ii;if(n&&e){var a=t&&typeof t.as==="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Ie(a)+'"][href="'+Ie(e)+'"]',l=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":l=li(e)}if(!lt.has(l)&&(e=ae({rel:"modulepreload",href:e},t),lt.set(l,e),n.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Ol(l)))return}a=n.createElement("link"),we(a,"link",e),ge(a),n.head.appendChild(a)}}}function Y0(e,t,n){Ft.S(e,t,n);var a=ii;if(a&&e){var i=Va(a).hoistableStyles,l=Pa(e);t=t||"default";var o=i.get(l);if(!o){var r={loading:0,preload:null};if(o=a.querySelector(Nl(l)))r.loading=5;else{e=ae({rel:"stylesheet",href:e,"data-precedence":t},n),(n=lt.get(l))&&_c(e,n);var u=o=a.createElement("link");ge(u),we(u,"link",e),u._p=new Promise(function(c,m){u.onload=c,u.onerror=m}),u.addEventListener("load",function(){r.loading|=1}),u.addEventListener("error",function(){r.loading|=2}),r.loading|=4,wo(o,t,a)}o={type:"stylesheet",instance:o,count:1,state:r},i.set(l,o)}}}function K0(e,t){Ft.X(e,t);var n=ii;if(n&&e){var a=Va(n).hoistableScripts,i=li(e),l=a.get(i);l||(l=n.querySelector(Ol(i)),l||(e=ae({src:e,async:!0},t),(t=lt.get(i))&&xc(e,t),l=n.createElement("script"),ge(l),we(l,"link",e),n.head.appendChild(l)),l={type:"script",instance:l,count:1,state:null},a.set(i,l))}}function X0(e,t){Ft.M(e,t);var n=ii;if(n&&e){var a=Va(n).hoistableScripts,i=li(e),l=a.get(i);l||(l=n.querySelector(Ol(i)),l||(e=ae({src:e,async:!0,type:"module"},t),(t=lt.get(i))&&xc(e,t),l=n.createElement("script"),ge(l),we(l,"link",e),n.head.appendChild(l)),l={type:"script",instance:l,count:1,state:null},a.set(i,l))}}function Xd(e,t,n,a){var i=(i=yn.current)?Po(i):null;if(!i)throw Error(_(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence==="string"&&typeof n.href==="string"?(t=Pa(n.href),n=Va(i).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href==="string"&&typeof n.precedence==="string"){e=Pa(n.href);var l=Va(i).hoistableStyles,o=l.get(e);if(o||(i=i.ownerDocument||i,o={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},l.set(e,o),(l=i.querySelector(Nl(e)))&&!l._p&&(o.instance=l,o.state.loading=5),lt.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},lt.set(e,n),l||Q0(i,e,n,o.state))),t&&a===null)throw Error(_(528,""));return o}if(t&&a!==null)throw Error(_(529,""));return null;case"script":return t=n.async,n=n.src,typeof n==="string"&&t&&typeof t!=="function"&&typeof t!=="symbol"?(t=li(n),n=Va(i).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(_(444,e))}}function Pa(e){return'href="'+Ie(e)+'"'}function Nl(e){return'link[rel="stylesheet"]['+e+"]"}function Dm(e){return ae({},e,{"data-precedence":e.precedence,precedence:null})}function Q0(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),we(t,"link",n),ge(t),e.head.appendChild(t))}function li(e){return'[src="'+Ie(e)+'"]'}function Ol(e){return"script[async]"+e}function Qd(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Ie(n.href)+'"]');if(a)return t.instance=a,ge(a),a;var i=ae({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),ge(a),we(a,"style",i),wo(a,n.precedence,e),t.instance=a;case"stylesheet":i=Pa(n.href);var l=e.querySelector(Nl(i));if(l)return t.state.loading|=4,t.instance=l,ge(l),l;a=Dm(n),(i=lt.get(i))&&_c(a,i),l=(e.ownerDocument||e).createElement("link"),ge(l);var o=l;return o._p=new Promise(function(r,u){o.onload=r,o.onerror=u}),we(l,"link",a),t.state.loading|=4,wo(l,n.precedence,e),t.instance=l;case"script":if(l=li(n.src),i=e.querySelector(Ol(l)))return t.instance=i,ge(i),i;if(a=n,i=lt.get(l))a=ae({},n),xc(a,i);return e=e.ownerDocument||e,i=e.createElement("script"),ge(i),we(i,"link",a),e.head.appendChild(i),t.instance=i;case"void":return null;default:throw Error(_(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,wo(a,n.precedence,e));return t.instance}function wo(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,l=i,o=0;o<a.length;o++){var r=a[o];if(r.dataset.precedence===t)l=r;else if(l!==i)break}l?l.parentNode.insertBefore(e,l.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function _c(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function xc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var No=null;function Zd(e,t,n){if(No===null){var a=new Map,i=No=new Map;i.set(n,a)}else i=No,a=i.get(n),a||(a=new Map,i.set(n,a));if(a.has(e))return a;a.set(e,null),n=n.getElementsByTagName(e);for(i=0;i<n.length;i++){var l=n[i];if(!(l[bl]||l[_e]||e==="link"&&l.getAttribute("rel")==="stylesheet")&&l.namespaceURI!=="http://www.w3.org/2000/svg"){var o=l.getAttribute(t)||"";o=e+o;var r=a.get(o);r?r.push(l):a.set(o,[l])}}return a}function $d(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Z0(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!=="string"||typeof t.href!=="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!=="string"||typeof t.href!=="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence==="string"&&e==null;default:return!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 zm(e){return e.type==="stylesheet"&&(e.state.loading&3)===0?!1:!0}function $0(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!=="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=Pa(a.href),l=t.querySelector(Nl(i));if(l){t=l._p,t!==null&&typeof t==="object"&&typeof t.then==="function"&&(e.count++,e=Io.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=l,ge(l);return}l=t.ownerDocument||t,a=Dm(a),(i=lt.get(i))&&_c(a,i),l=l.createElement("link"),ge(l);var o=l;o._p=new Promise(function(r,u){o.onload=r,o.onerror=u}),we(l,"link",a),n.instance=l}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Io.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Us=0;function J0(e,t){return e.stylesheets&&e.count===0&&Oo(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&Oo(e,e.stylesheets),e.unsuspend){var l=e.unsuspend;e.unsuspend=null,l()}},60000+t);0<e.imgBytes&&Us===0&&(Us=62500*D0());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Oo(e,e.stylesheets),e.unsuspend)){var l=e.unsuspend;e.unsuspend=null,l()}},(e.imgBytes>Us?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(i)}}:null}function Io(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Oo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var er=null;function Oo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,er=new Map,t.forEach(F0,e),er=null,Io.call(e))}function F0(e,t){if(!(t.state.loading&4)){var n=er.get(e);if(n)var a=n.get(null);else{n=new Map,er.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),l=0;l<i.length;l++){var o=i[l];if(o.nodeName==="LINK"||o.getAttribute("media")!=="not all")n.set(o.dataset.precedence,o),a=o}a&&n.set(null,a)}i=t.instance,o=i.getAttribute("data-precedence"),l=n.get(o)||a,l===a&&n.set(null,i),n.set(o,i),this.count++,a=Io.bind(this),i.addEventListener("load",a),i.addEventListener("error",a),l?l.parentNode.insertBefore(i,l.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var dl={$$typeof:Bt,Provider:null,Consumer:null,_currentValue:Zn,_currentValue2:Zn,_threadCount:0};function W0(e,t,n,a,i,l,o,r,u){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=ss(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ss(0),this.hiddenUpdates=ss(null),this.identifierPrefix=a,this.onUncaughtError=i,this.onCaughtError=l,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=u,this.incompleteTransitions=new Map}function P0(e,t,n,a,i,l,o,r,u,c,m,y){return e=new W0(e,t,n,o,u,c,m,y,r),t=1,l===!0&&(t|=24),l=Be(3,null,null,t),e.current=l,l.stateNode=e,t=Ju(),t.refCount++,e.pooledCache=t,t.refCount++,l.memoizedState={element:a,isDehydrated:n,cache:t},Pu(l),e}function I0(e){if(!e)return Ma;return e=Ma,e}function Rm(e,t,n,a,i,l){i=I0(i),a.context===null?a.context=i:a.pendingContext=i,a=Wn(t),a.payload={element:n},l=l===void 0?null:l,l!==null&&(a.callback=l),n=Pn(e,a,t),n!==null&&(Me(n,e,t),Qi(n,e,t))}function Jd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Ec(e,t){Jd(e,t),(e=e.alternate)&&Jd(e,t)}function Mm(e){if(e.tag===13||e.tag===31){var t=sa(e,67108864);t!==null&&Me(t,e,67108864),Ec(e,67108864)}}function Fd(e){if(e.tag===13||e.tag===31){var t=at();t=hh(t);var n=sa(e,t);n!==null&&Me(n,e,t),Ec(e,t)}}var tr=!0;function e1(e,t,n,a){var i=z.T;z.T=null;var l=X.p;try{X.p=2,wc(e,t,n,a)}finally{X.p=l,z.T=i}}function t1(e,t,n,a){var i=z.T;z.T=null;var l=X.p;try{X.p=8,wc(e,t,n,a)}finally{X.p=l,z.T=i}}function wc(e,t,n,a){if(tr){var i=Ru(a);if(i===null)Cs(e,t,a,nr,n),Wd(e,a);else if(a1(i,e,t,n,a))a.stopPropagation();else if(Wd(e,a),t&4&&-1<n1.indexOf(e)){for(;i!==null;){var l=ei(i);if(l!==null)switch(l.tag){case 3:if(l=l.stateNode,l.current.memoizedState.isDehydrated){var o=Yn(l.pendingLanes);if(o!==0){var r=l;r.pendingLanes|=2;for(r.entangledLanes|=2;o;){var u=1<<31-Ge(o);r.entanglements[1]|=u,o&=~u}Jt(l),(K&6)===0&&(Xo=je()+500,wl(0,!1))}}break;case 31:case 13:r=sa(l,2),r!==null&&Me(r,l,2),vr(),Ec(l,2)}if(l=Ru(a),l===null&&Cs(e,t,a,nr,n),l===i)break;i=l}i!==null&&a.stopPropagation()}else Cs(e,t,a,null,n)}}function Ru(e){return e=Hu(e),Nc(e)}var nr=null;function Nc(e){if(nr=null,e=Oa(e),e!==null){var t=ml(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=th(t),e!==null)return e;e=null}else if(n===31){if(e=nh(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return nr=e,null}function Cm(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(By()){case oh:return 2;case rh:return 8;case Ro:case Hy:return 32;case sh:return 268435456;default:return 32}default:return 32}}var Mu=!1,xn=null,En=null,wn=null,hl=new Map,pl=new Map,dn=[],n1="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 Wd(e,t){switch(e){case"focusin":case"focusout":xn=null;break;case"dragenter":case"dragleave":En=null;break;case"mouseover":case"mouseout":wn=null;break;case"pointerover":case"pointerout":hl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":pl.delete(t.pointerId)}}function Mi(e,t,n,a,i,l){if(e===null||e.nativeEvent!==l)return e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:l,targetContainers:[i]},t!==null&&(t=ei(t),t!==null&&Mm(t)),e;return e.eventSystemFlags|=a,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e}function a1(e,t,n,a,i){switch(t){case"focusin":return xn=Mi(xn,e,t,n,a,i),!0;case"dragenter":return En=Mi(En,e,t,n,a,i),!0;case"mouseover":return wn=Mi(wn,e,t,n,a,i),!0;case"pointerover":var l=i.pointerId;return hl.set(l,Mi(hl.get(l)||null,e,t,n,a,i)),!0;case"gotpointercapture":return l=i.pointerId,pl.set(l,Mi(pl.get(l)||null,e,t,n,a,i)),!0}return!1}function km(e){var t=Oa(e.target);if(t!==null){var n=ml(t);if(n!==null){if(t=n.tag,t===13){if(t=th(n),t!==null){e.blockedOn=t,Vf(e.priority,function(){Fd(n)});return}}else if(t===31){if(t=nh(n),t!==null){e.blockedOn=t,Vf(e.priority,function(){Fd(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ao(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ru(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);$s=a,n.target.dispatchEvent(a),$s=null}else return t=ei(n),t!==null&&Mm(t),e.blockedOn=n,!1;t.shift()}return!0}function Pd(e,t,n){Ao(e)&&n.delete(t)}function i1(){Mu=!1,xn!==null&&Ao(xn)&&(xn=null),En!==null&&Ao(En)&&(En=null),wn!==null&&Ao(wn)&&(wn=null),hl.forEach(Pd),pl.forEach(Pd)}function uo(e,t){e.blockedOn===t&&(e.blockedOn=null,Mu||(Mu=!0,jn(Hn,i1)))}var co=null;function Id(e){co!==e&&(co=e,jn(Hn,function(){co===e&&(co=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],i=e[t+2];if(typeof a!=="function")if(Nc(a||n)===null)continue;else break;var l=ei(n);l!==null&&(e.splice(t,3),t-=3,cu(l,{pending:!0,data:i,method:n.method,action:a},a,i))}}))}function Ia(e){function t(u){return uo(u,e)}xn!==null&&uo(xn,e),En!==null&&uo(En,e),wn!==null&&uo(wn,e),hl.forEach(t),pl.forEach(t);for(var n=0;n<dn.length;n++){var a=dn[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<dn.length&&(n=dn[0],n.blockedOn===null);)km(n),n.blockedOn===null&&dn.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var i=n[a],l=n[a+1],o=i[Ce]||null;if(typeof l==="function")o||Id(n);else if(o){var r=null;if(l&&l.hasAttribute("formAction")){if(i=l,o=l[Ce]||null)r=o.formAction;else if(Nc(i)!==null)continue}else r=o.action;typeof r==="function"?n[a+1]=r:(n.splice(a,3),a-=3),Id(n)}}}function l1(){function e(l){l.canIntercept&&l.info==="react-transition"&&l.intercept({handler:function(){return new Promise(function(o){return i=o})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var l=navigation.currentEntry;l&&l.url!=null&&navigation.navigate(l.url,{state:l.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation==="object"){var a=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function Oc(e){this._internalRoot=e}Ac.prototype.render=Oc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(_(409));var n=t.current,a=at();Rm(n,a,e,t,null,null)};Ac.prototype.unmount=Oc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Rm(e.current,2,null,e,null,null),vr(),t[yl]=null}};function Ac(e){this._internalRoot=e}Ac.prototype.unstable_scheduleHydration=function(e){if(e){var t=ph();e={blockedOn:null,target:e,priority:t};for(var n=0;n<dn.length&&t!==0&&t<dn[n].priority;n++);dn.splice(n,0,e),n===0&&km(e)}};var eh=ns;if(eh!=="19.2.8")throw Error(_(527,eh,"19.2.8"));X.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0){if(typeof e.render==="function")throw Error(_(188));throw e=Object.keys(e).join(","),Error(_(268,e))}return e=Ry(t),e=e!==null?ah(e):null,e=e===null?null:e.stateNode,e};var o1={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:z,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){if(Ea=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Ea.isDisabled&&Ea.supportsFiber)try{vl=Ea.inject(o1),qe=Ea}catch(e){}}var Ea;var Tc=function(e,t){if(!zy(e))throw Error(_(299));var n=!1,a="",i=t0,l=n0,o=a0;return t!==null&&t!==void 0&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(l=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=P0(e,1,!1,null,null,n,a,null,i,l,o,l1),e[yl]=t.current,_m(e),new Oc(t)};Um();function I(e,...t){throw Error(`[MobX] minified error nr: ${e}${t.length?" "+t.map(String).join(","):""}. See mobx.js.org/errors`)}var{assign:At,getOwnPropertyDescriptor:Lc,defineProperty:It,prototype:Ar}=Object,Rc=[];Object.freeze(Rc);var Jm={};Object.freeze(Jm);var u1=Object.toString();var ri=()=>{};function ui(e){return typeof e==="function"}function Mc(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function Tr(e){return e!==null&&typeof e==="object"}function tn(e){if(!Tr(e))return!1;let t=Object.getPrototypeOf(e);if(t==null)return!0;let n=ca(t,"constructor")&&t.constructor;return typeof n==="function"&&n.toString()===u1}function Fm(e){let t=e==null?void 0:e.constructor;if(!t)return!1;if(t.name==="GeneratorFunction"||t.displayName==="GeneratorFunction")return!0;return!1}function Wm(e,t,n){It(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function c1(e,t,n){It(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function ha(e,t){let n="isMobX"+e;return t.prototype[n]=!0,function(a){return Tr(a)&&a[n]===!0}}function zl(e){return e!=null&&Object.prototype.toString.call(e)==="[object Map]"}function f1(e){let t=Object.getPrototypeOf(e),n=Object.getPrototypeOf(t);return Object.getPrototypeOf(n)===null}function Rn(e){return e!=null&&Object.prototype.toString.call(e)==="[object Set]"}function d1(e){let t=Object.keys(e),n=Object.getOwnPropertySymbols(e);if(!n.length)return t;return[...t,...n.filter((a)=>Ar.propertyIsEnumerable.call(e,a))]}var xr=Reflect.ownKeys;function Pm(e){return e===null?null:typeof e==="object"?""+e:e}function ca(e,t){return Ar.hasOwnProperty.call(e,t)}var h1=Object.getOwnPropertyDescriptors;function Xe(e,t){return!!(e&t)}function Qe(e,t,n){if(n)e|=t;else e&=~t;return e}var V=Symbol("mobx administration");class fi{constructor(e="Atom"){this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=-1,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}get isBeingObserved(){return Xe(this.flags_,1)}set isBeingObserved(e){this.flags_=Qe(this.flags_,1,e)}get isPendingUnobservation(){return Xe(this.flags_,2)}set isPendingUnobservation(e){this.flags_=Qe(this.flags_,2,e)}get diffValue(){return Xe(this.flags_,4)?1:0}set diffValue(e){this.flags_=Qe(this.flags_,4,e===1?!0:!1)}onBO(){if(this.onBOL)this.onBOL.forEach((e)=>e())}onBUO(){if(this.onBUOL)this.onBUOL.forEach((e)=>e())}reportObserved(){return _v(this)}reportChanged(){st(),xv(this),ut()}toString(){return this.name_}}var Bc=ha("Atom",fi);function Im(e,t=ri,n=ri){let a=new fi(e);if(t!==ri)a.onBOL=new Set([t]);if(n!==ri)a.onBUOL=new Set([n]);return a}var Hc=Object.is;function fa(e,t,n){if(Uv(e))return e;if(Array.isArray(e))return Ne.array(e,{name:n});if(tn(e))return Ne.object(e,void 0,{name:n});if(zl(e))return Ne.map(e,{name:n});if(Rn(e))return Ne.set(e,{name:n});if(typeof e==="function"&&!ci(e)&&!Tl(e))if(Fm(e))return kr(e);else return Yc(n,e);return e}function p1(e,t,n){if(e===void 0||e===null)return e;if(Dl(e)||Lv(e)||pi(e)||Pt(e))return e;if(Array.isArray(e))return Ne.array(e,{name:n,deep:!1});if(tn(e))return Ne.object(e,void 0,{name:n,deep:!1});if(zl(e))return Ne.map(e,{name:n,deep:!1});if(Rn(e))return Ne.set(e,{name:n,deep:!1})}function Dr(e){return e}function zr(e,t){return{annotationType_:e,options_:t,make_:m1,extend_:v1}}function m1(e,t,n,a){var i;if((i=this.options_)!=null&&i.bound)return this.extend_(e,t,n,!1)===null?0:1;if(a===e.target_)return this.extend_(e,t,n,!1)===null?0:2;if(ci(n.value))return 1;let l=tv(e,this,t,n,!1);return It(a,t,l),2}function v1(e,t,n,a){let i=tv(e,this,t,n);return e.defineProperty_(t,i,a)}function ev(e,t,n){let{kind:a,name:i,addInitializer:l}=n,o=e,r=(c)=>{var m,y,h,g;return da((m=(y=o.options_)==null?void 0:y.name)!=null?m:i.toString(),c,(h=(g=o.options_)==null?void 0:g.autoAction)!=null?h:!1)};if(a=="field")return function(c){var m;let y=c;if(!ci(y))y=r(y);if((m=o.options_)!=null&&m.bound)y=y.bind(this),y.isMobxAction=!0;return y};if(a=="method"){var u;if(!ci(t))t=r(t);if((u=o.options_)!=null&&u.bound)l(function(){let c=this,m=c[i].bind(c);m.isMobxAction=!0,c[i]=m});return t}I(43,o.annotationType_,String(i),a)}function g1(e,{annotationType_:t},n,{value:a}){}function tv(e,t,n,a,i=N.safeDescriptors){var l,o,r,u,c,m,y;g1(e,t,n,a);let{value:h}=a;if((l=t.options_)!=null&&l.bound){var g;h=h.bind((g=e.proxy_)!=null?g:e.target_)}return{value:da((o=(r=t.options_)==null?void 0:r.name)!=null?o:n.toString(),h,(u=(c=t.options_)==null?void 0:c.autoAction)!=null?u:!1,(m=t.options_)!=null&&m.bound?(y=e.proxy_)!=null?y:e.target_:void 0),configurable:i?e.isPlainObject_:!0,enumerable:!1,writable:i?!1:!0}}function nv(e,t){return{annotationType_:e,options_:t,make_:y1,extend_:b1}}function y1(e,t,n,a){var i;if(a===e.target_)return this.extend_(e,t,n,!1)===null?0:2;if((i=this.options_)!=null&&i.bound&&(!ca(e.target_,t)||!Tl(e.target_[t]))){if(this.extend_(e,t,n,!1)===null)return 0}if(Tl(n.value))return 1;let l=iv(e,this,t,n,!1,!1);return It(a,t,l),2}function b1(e,t,n,a){var i;let l=iv(e,this,t,n,(i=this.options_)==null?void 0:i.bound);return e.defineProperty_(t,l,a)}function av(e,t,n){var a;let{name:i,addInitializer:l}=n;if(!Tl(t))t=kr(t);if((a=e.options_)!=null&&a.bound)l(function(){let o=this,r=o[i].bind(o);r.isMobXFlow=!0,o[i]=r});return t}function S1(e,{annotationType_:t},n,{value:a}){}function iv(e,t,n,a,i,l=N.safeDescriptors){S1(e,t,n,a);let{value:o}=a;if(!Tl(o))o=kr(o);if(i){var r;o=o.bind((r=e.proxy_)!=null?r:e.target_),o.isMobXFlow=!0}return{value:o,configurable:l?e.isPlainObject_:!0,enumerable:!1,writable:l?!1:!0}}function lv(e,t){return{annotationType_:e,options_:t,make_:_1,extend_:x1}}function _1(e,t,n){return this.extend_(e,t,n,!1)===null?0:1}function x1(e,t,n,a){return E1(e,this,t,n),e.defineComputedProperty_(t,At({},this.options_,{get:n.get,set:n.set}),a)}function ov(e,t,n){let a=e,{name:i,addInitializer:l}=n,o;function r(u,c){let m=At({},a.options_,{get:t,context:u});return m.name||(m.name=`ObservableObject.${i.toString()}`),new en(m)}return l(function(){var u;let c=Cl(this)[V],m=this,y=c.values_.get(i);if(y instanceof en&&y.derivation!==t)c.values_.delete(i);((u=c.lazyComputedKeys_)!=null?u:c.lazyComputedKeys_=new Map).set(i,()=>r(m,c))}),function(){let u=this[V],c=u.values_.get(i);if(c instanceof en&&c.derivation!==t){var m;let h=(m=o)==null?void 0:m.get(this);if(!h){var y;h=r(this,u),((y=o)!=null?y:o=new WeakMap).set(this,h)}return h.get()}return u.getObservablePropValue_(i)}}function E1(e,{annotationType_:t},n,{get:a}){}function jc(e,t){return{annotationType_:e,options_:t,make_:w1,extend_:N1}}function w1(e,t,n){return this.extend_(e,t,n,!1)===null?0:1}function N1(e,t,n,a){var i,l;return O1(e,this,t,n),e.defineObservableProperty_(t,n.value,(i=(l=this.options_)==null?void 0:l.enhancer_)!=null?i:fa,a)}function rv(e,t,n){let a=e,{kind:i,name:l}=n;if(i!=="accessor")return;function o(r,u){var c;let m=Cl(r)[V];return((c=m.lazyObservableKeys_)!=null?c:m.lazyObservableKeys_=new Map).set(l,()=>{var y,h;return new Cn(u,(y=(h=a.options_)==null?void 0:h.enhancer_)!=null?y:fa,`ObservableObject.${l.toString()}`,!1)}),m}return{get(){var r;return((r=this[V])!=null?r:o(this,t.get.call(this))).getObservablePropValue_(l)},set(r){var u;return((u=this[V])!=null?u:o(this,r)).setObservablePropValue_(l,r)},init(r){return o(this,r),r}}}function O1(e,{annotationType_:t},n,a){}var A1="true",T1=sv();function sv(e){return{annotationType_:A1,options_:e,make_:D1,extend_:z1}}function D1(e,t,n,a){var i,l;if(n.get)return qc.make_(e,t,n,a);if(n.set){let m=ci(n.set)?n.set:da(t.toString(),n.set);if(a===e.target_)return e.defineProperty_(t,{configurable:N.safeDescriptors?e.isPlainObject_:!0,set:m})===null?0:2;return It(a,t,{configurable:!0,set:m}),2}if(a!==e.target_&&typeof n.value==="function"){var o;if(Fm(n.value)){var r;return((r=this.options_)!=null&&r.autoBind?hS:kr).make_(e,t,n,a)}return((o=this.options_)!=null&&o.autoBind?oS:Yc).make_(e,t,n,a)}let u=((i=this.options_)==null?void 0:i.deep)===!1?di:Ne;if(typeof n.value==="function"&&(l=this.options_)!=null&&l.autoBind){var c;n.value=n.value.bind((c=e.proxy_)!=null?c:e.target_)}return u.make_(e,t,n,a)}function z1(e,t,n,a){var i,l;if(n.get)return qc.extend_(e,t,n,a);if(n.set)return e.defineProperty_(t,{configurable:N.safeDescriptors?e.isPlainObject_:!0,set:da(t.toString(),n.set)},a);if(typeof n.value==="function"&&(i=this.options_)!=null&&i.autoBind){var o;n.value=n.value.bind((o=e.proxy_)!=null?o:e.target_)}return(((l=this.options_)==null?void 0:l.deep)===!1?di:Ne).extend_(e,t,n,a)}function Rr(e,t){return At(function(a,i){if(i&&typeof i.kind==="string")return t(e,a,i);return},e)}var R1="observable",M1="observable.ref",C1="observable.shallow";var uv={deep:!0,name:void 0,defaultDecorator:void 0};Object.freeze(uv);function br(e){return e||uv}var cv=jc(R1),k1=jc(M1,{enhancer_:Dr}),U1=jc(C1,{enhancer_:p1});function fv(e){return Rr(e,rv)}function Sr(e){return e.deep===!0?fa:e.deep===!1?Dr:L1(e.defaultDecorator)}function V1(e){var t;return e?(t=e.defaultDecorator)!=null?t:sv(e):void 0}function L1(e){var t,n;return!e?fa:(t=(n=e.options_)==null?void 0:n.enhancer_)!=null?t:fa}function B1(e,t,n){if(t&&typeof t.kind==="string")return rv(cv,e,t);if(Uv(e))return e;if(tn(e))return Ne.object(e,t,n);if(Array.isArray(e))return Ne.array(e,t);if(zl(e))return Ne.map(e,t);if(Rn(e))return Ne.set(e,t);if(typeof e==="object"&&e!==null)return e;return Ne.box(e,t)}var H1={box(e,t){let n=br(t);return new Cn(e,Sr(n),n.name,!0,n.equals)},array(e,t){let n=br(t);return SS(e,Sr(n),n.name)},map(e,t){let n=br(t);return new Xc(e,Sr(n),n.name)},set(e,t){let n=br(t);return new Qc(e,Sr(n),n.name)},object(e,t,n){return mi(()=>Rv(vS({},n),e,t))}},di=fv(k1),Rl=fv(U1);var Ne=At(B1,cv,H1),dv="computed";function j1(e){return Rr(e,ov)}var hv=lv(dv);var qc=function(t,n){if(n&&typeof n.kind==="string")return ov(hv,t,n);if(tn(t))return j1(lv(dv,t));let a=tn(n)?n:{};return a.get=t,a.name||(a.name=t.name||""),new en(a)};At(qc,hv);var Vm,Lm,Er=0,q1=1,G1=(Vm=(Lm=Lc(()=>{},"name"))==null?void 0:Lm.configurable)!=null?Vm:!1,Bm={value:"action",configurable:!0,writable:!1,enumerable:!1};function da(e,t,n=!1,a){function i(){return pv(e,n,t,a||this,arguments)}if(i.isMobxAction=!0,i.toString=()=>t.toString(),G1)Bm.value=e,It(i,"name",Bm);return i}function pv(e,t,n,a,i){let l=Y1(e,t,a,i);try{return n.apply(a,i)}catch(o){throw l.error_=o,o}finally{K1(l)}}function Y1(e,t,n,a){let l=0,o=N.trackingDerivation,r=!t||!o;st();let u=N.allowStateChanges;if(r)hi();let c=N.allowStateReads,m={runAsAction_:r,prevDerivation_:o,prevAllowStateChanges_:u,prevAllowStateReads_:c,notifySpy_:!1,startTime_:l,actionId_:q1++,parentActionId_:Er};return Er=m.actionId_,m}function K1(e){if(Er!==e.actionId_)I(30);if(Er=e.parentActionId_,e.error_!==void 0)N.suppressReactionErrors=!0;if(ut(),e.runAsAction_)kn(e.prevDerivation_);N.suppressReactionErrors=!1}function X1(e,t){let n=Q1(e);try{return t()}finally{Z1(n)}}function Q1(e){let t=N.allowStateChanges;return N.allowStateChanges=e,t}function Z1(e){N.allowStateChanges=e}class Cn extends fi{constructor(e,t,n="ObservableValue",a=!0,i=Hc){super(n);if(this.enhancer_=void 0,this.name_=void 0,this.equals_=void 0,this.hasUnreportedChange_=!1,this.interceptors_=void 0,this.changeListeners_=void 0,this.value_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,this.equals_=i,this.value_=t(e,void 0,n),!1)var l}dehanceValue(e){if(this.dehancer!==void 0)return this.dehancer(e);return e}set(e){let t=this.value_;if(e=this.prepareNewValue_(e),e!==N.UNCHANGED)this.setNewValue_(e)}prepareNewValue_(e){if(Ot(this),ot(this)){let t=rt(this,{object:this,type:Un,newValue:e});if(!t)return N.UNCHANGED;e=t.newValue}return e=this.enhancer_(e,this.value_,this.name_),this.equals_(this.value_,e)?N.UNCHANGED:e}setNewValue_(e){let t=this.value_;if(this.value_=e,this.reportChanged(),vt(this))gt(this,{type:Un,object:this,newValue:e,oldValue:t})}get(){return this.reportObserved(),this.dehanceValue(this.value_)}raw(){return this.value_}toJSON(){return this.get()}toString(){return`${this.name_}[${this.value_}]`}valueOf(){return Pm(this.get())}[Symbol.toPrimitive](){return this.valueOf()}}class en{constructor(e){if(this.dependenciesState_=-1,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=0,this.unboundDepsCount_=0,this.value_=new Al(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,!e.get)I(31);if(this.derivation=e.get,this.name_=e.name||"ComputedValue",e.set)this.setter_=da("ComputedValue-setter",e.set);this.equals_=e.equals||Hc,this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}onBecomeStale_(){eS(this)}onBO(){if(this.onBOL)this.onBOL.forEach((e)=>e())}onBUO(){if(this.onBUOL)this.onBUOL.forEach((e)=>e())}get isComputing(){return Xe(this.flags_,1)}set isComputing(e){this.flags_=Qe(this.flags_,1,e)}get isRunningSetter(){return Xe(this.flags_,2)}set isRunningSetter(e){this.flags_=Qe(this.flags_,2,e)}get isBeingObserved(){return Xe(this.flags_,4)}set isBeingObserved(e){this.flags_=Qe(this.flags_,4,e)}get isPendingUnobservation(){return Xe(this.flags_,8)}set isPendingUnobservation(e){this.flags_=Qe(this.flags_,8,e)}get diffValue(){return Xe(this.flags_,16)?1:0}set diffValue(e){this.flags_=Qe(this.flags_,16,e===1?!0:!1)}get(){if(this.isComputing)I(32,this.name_,this.derivation);if(N.inBatch===0&&this.observers_.size===0&&!this.keepAlive_){if(Cc(this))this.warnAboutUntrackedRead_(),st(),this.value_=this.computeValue_(!1),ut()}else if(_v(this),Cc(this)){let t=N.trackingContext;if(this.keepAlive_&&!t)N.trackingContext=this;if(this.trackAndCompute())I1(this);N.trackingContext=t}let e=this.value_;if(_r(e))throw e.cause;return e}set(e){if(this.setter_){if(this.isRunningSetter)I(33,this.name_);this.isRunningSetter=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter=!1}}else I(34,this.name_)}trackAndCompute(){let e=this.value_,t=this.dependenciesState_===-1,n=this.computeValue_(!0),a=t||_r(e)||_r(n)||!this.equals_(e,n);if(a)this.value_=n;return a}computeValue_(e){this.isComputing=!0;let t=!1,n;if(e)n=mv(this,this.derivation,this.scope_);else if(N.disableErrorBoundaries===!0)n=this.derivation.call(this.scope_);else try{n=this.derivation.call(this.scope_)}catch(a){n=new Al(a)}return this.isComputing=!1,n}suspend_(){if(!this.keepAlive_)kc(this),this.value_=void 0}warnAboutUntrackedRead_(){return}toString(){return`${this.name_}[${this.derivation.toString()}]`}valueOf(){return Pm(this.get())}[Symbol.toPrimitive](){return this.valueOf()}}var Mr=ha("ComputedValue",en);class Al{constructor(e){this.cause=void 0,this.cause=e}}function _r(e){return e instanceof Al}function Cc(e){switch(e.dependenciesState_){case 0:return!1;case-1:case 2:return!0;case 1:{let n=hi(),a=e.observing_,i=a.length;for(let l=0;l<i;l++){let o=a[l];if(Mr(o)){if(N.disableErrorBoundaries)o.get();else try{o.get()}catch(r){return kn(n),!0}if(e.dependenciesState_===2)return kn(n),!0}}return gv(e),kn(n),!1}}}function Ot(e){return}function $1(e){}function mv(e,t,n){gv(e),e.newObserving_=Array(e.runId_===0?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++N.runId;let i=N.trackingDerivation;N.trackingDerivation=e,N.inBatch++;let l;if(N.disableErrorBoundaries===!0)l=t.call(n);else try{l=t.call(n)}catch(o){l=new Al(o)}return N.inBatch--,N.trackingDerivation=i,F1(e),J1(e),l}function J1(e){return}function F1(e){let t=e.observing_,n=e.observing_=e.newObserving_,a=0,i=0,l=e.unboundDepsCount_;for(let o=0;o<l;o++){let r=n[o];if(r.diffValue===0){if(r.diffValue=1,i!==o)n[i]=r;i++}if(r.dependenciesState_>a)a=r.dependenciesState_}n.length=i,e.newObserving_=null,l=t.length;while(l--){let o=t[l];if(o.diffValue===0)bv(o,e);o.diffValue=0}while(i--){let o=n[i];if(o.diffValue===1)o.diffValue=0,P1(o,e)}if(a!==0)e.dependenciesState_=a,e.onBecomeStale_()}function kc(e){let t=e.observing_;e.observing_=[];let n=t.length;while(n--)bv(t[n],e);e.dependenciesState_=-1}function vv(e){let t=hi();try{return e()}finally{kn(t)}}function hi(){let e=N.trackingDerivation;return N.trackingDerivation=null,e}function kn(e){N.trackingDerivation=e}function gv(e){if(e.dependenciesState_===0)return;e.dependenciesState_=0;let t=e.observing_,n=t.length;while(n--)t[n].lowestObserverState_=0}var yv=7;class Uc{constructor(){this.version=yv,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.safeDescriptors=!0}}var Dc=!0,W1=!1,N=function(){let e=globalThis;if(e.__mobxInstanceCount>0&&!e.__mobxGlobals)Dc=!1;if(e.__mobxGlobals&&e.__mobxGlobals.version!==yv)Dc=!1;if(!Dc)return setTimeout(()=>{if(!W1)I(35)},1),new Uc;else if(e.__mobxGlobals){if(e.__mobxInstanceCount+=1,!e.__mobxGlobals.UNCHANGED)e.__mobxGlobals.UNCHANGED={};return e.__mobxGlobals}else return e.__mobxInstanceCount=1,e.__mobxGlobals=new Uc}();function Gc(){return N}function P1(e,t){if(e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_)e.lowestObserverState_=t.dependenciesState_}function bv(e,t){if(e.observers_.delete(t),e.observers_.size===0)Sv(e)}function Sv(e){if(e.isPendingUnobservation===!1)e.isPendingUnobservation=!0,N.pendingUnobservations.push(e)}function st(){N.inBatch++}function ut(){if(--N.inBatch===0){Ev();let e=N.pendingUnobservations;for(let t=0;t<e.length;t++){let n=e[t];if(n.isPendingUnobservation=!1,n.observers_.size===0){if(n.isBeingObserved)n.isBeingObserved=!1,n.onBUO();if(n instanceof en)n.suspend_()}}N.pendingUnobservations=[]}}function _v(e){$1(e);let t=N.trackingDerivation;if(t!==null){if(t.runId_!==e.lastAccessedBy_){if(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&N.trackingContext)e.isBeingObserved=!0,e.onBO()}return e.isBeingObserved}else if(e.observers_.size===0&&N.inBatch>0)Sv(e);return!1}function xv(e){if(e.lowestObserverState_===2)return;e.lowestObserverState_=2,e.observers_.forEach((t)=>{if(t.dependenciesState_===0)t.onBecomeStale_();t.dependenciesState_=2})}function I1(e){if(e.lowestObserverState_===2)return;e.lowestObserverState_=2,e.observers_.forEach((t)=>{if(t.dependenciesState_===1)t.dependenciesState_=2;else if(t.dependenciesState_===0)e.lowestObserverState_=0})}function eS(e){if(e.lowestObserverState_!==0)return;e.lowestObserverState_=1,e.observers_.forEach((t)=>{if(t.dependenciesState_===0)t.dependenciesState_=1,t.onBecomeStale_()})}class Ml{constructor(e="Reaction",t,n,a){this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=-1,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=a}get isDisposed(){return Xe(this.flags_,1)}set isDisposed(e){this.flags_=Qe(this.flags_,1,e)}get isScheduled(){return Xe(this.flags_,2)}set isScheduled(e){this.flags_=Qe(this.flags_,2,e)}get isTrackPending(){return Xe(this.flags_,4)}set isTrackPending(e){this.flags_=Qe(this.flags_,4,e)}get isRunning(){return Xe(this.flags_,8)}set isRunning(e){this.flags_=Qe(this.flags_,8,e)}get diffValue(){return Xe(this.flags_,16)?1:0}set diffValue(e){this.flags_=Qe(this.flags_,16,e===1?!0:!1)}onBecomeStale_(){this.schedule_()}schedule_(){if(!this.isScheduled)this.isScheduled=!0,N.pendingReactions.push(this),Ev()}runReaction_(){if(!this.isDisposed){st(),this.isScheduled=!1;let e=N.trackingContext;if(N.trackingContext=this,Cc(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(t){this.reportExceptionInDerivation_(t)}}N.trackingContext=e,ut()}}track(e){if(this.isDisposed)return;st();let t=!1,n;this.isRunning=!0;let a=N.trackingContext;N.trackingContext=this;let i=mv(this,e,void 0);if(N.trackingContext=a,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed)kc(this);if(_r(i))this.reportExceptionInDerivation_(i.cause);ut()}reportExceptionInDerivation_(e){if(this.errorHandler_){this.errorHandler_(e,this);return}if(N.disableErrorBoundaries)throw e;let t=`[mobx] uncaught error in '${this}'`;if(!N.suppressReactionErrors)console.error(t,e);N.globalReactionErrorHandlers.forEach((n)=>n(e,this))}dispose(){if(!this.isDisposed){if(this.isDisposed=!0,!this.isRunning)st(),kc(this),ut()}}getDisposer_(e){let t=()=>{this.dispose(),e==null||e.removeEventListener==null||e.removeEventListener("abort",t)};if(e==null||e.addEventListener==null||e.addEventListener("abort",t),t[V]=this,"dispose"in Symbol&&typeof Symbol.dispose==="symbol")t[Symbol.dispose]=t;return t}toString(){return`Reaction[${this.name_}]`}}var tS=100,nS=(e)=>e();function Ev(){if(N.inBatch>0||N.isRunningReactions)return;nS(aS)}function aS(){N.isRunningReactions=!0;let e=N.pendingReactions,t=0;while(e.length>0){if(++t===tS)console.error(`[mobx] cycle in reaction: ${e[0]}`),e.splice(0);let n=e.splice(0);for(let a=0,i=n.length;a<i;a++)n[a].runReaction_()}N.isRunningReactions=!1}var wr=ha("Reaction",Ml);var wv="action";var Nv="autoAction",iS="autoAction.bound",Ov="<unnamed action>",Av=zr(wv);var Tv=zr(Nv,{autoAction:!0}),lS=zr(iS,{autoAction:!0,bound:!0});function Dv(e){return Rr(e,ev)}function zv(e){return function(a,i){if(i&&typeof i.kind==="string")return ev(e?Tv:Av,a,i);if(ui(a))return da(a.name||Ov,a,e);if(ui(i))return da(a,i,e);if(Mc(a))return Dv(zr(e?Nv:wv,{name:a,autoAction:e}))}}var si=zv(!1);At(si,Av);var Yc=zv(!0);At(Yc,Tv);var oS=Dv(lS);function E(e){return pv(e.name||Ov,!1,e,this,void 0)}function ci(e){return ui(e)&&e.isMobxAction===!0}var rS=(e)=>e();function sS(e){return e.scheduler?e.scheduler:e.delay?(t)=>setTimeout(t,e.delay):rS}function Cr(e,t,n=Jm){var a,i;let l=(a=n.name)!=null?a:"Reaction",o=si(l,n.onError?uS(n.onError,t):t),r=!n.scheduler&&!n.delay,u=sS(n),c=!0,m=!1,y,h=n.equals||Hc,g=new Ml(l,()=>{if(c||r)x();else if(!m)m=!0,u(x)},n.onError,n.requiresObservable);function x(){if(m=!1,g.isDisposed)return;let A=!1,M=y;if(g.track(()=>{let d=X1(!1,()=>e(g));A=c||!h(y,d),y=d}),c&&n.fireImmediately)o(y,M,g);else if(!c&&A)o(y,M,g);c=!1}if(!(n!=null&&(i=n.signal)!=null&&i.aborted))g.schedule_();return g.getDisposer_(n==null?void 0:n.signal)}function uS(e,t){return function(){try{return t.apply(this,arguments)}catch(n){e.call(this,n)}}}function Rv(e,t,n,a){let i=h1(t);return mi(()=>{let l=Cl(e,a)[V];xr(i).forEach((o)=>{l.extend_(o,i[o],!n?!0:(o in n)?n[o]:!0)})}),e}function Mv(e,t){return Cv(Or(e,t))}function Cv(e){let t={name:e.name_};if(e.observing_&&e.observing_.length>0)t.dependencies=cS(e.observing_).map(Cv);return t}function cS(e){return Array.from(new Set(e))}class kv extends Error{constructor(){super("FLOW_CANCELLED");Object.setPrototypeOf(this,new.target.prototype),this.name="FlowCancellationError"}toString(){return`Error: ${this.message}`}}function fS(e){return Rr(e,av)}var Hm=nv("flow"),dS=nv("flow.bound",{bound:!0}),kr=At(function(t,n){if(n&&typeof n.kind==="string")return av(Hm,t,n);let a=t,i=a.name||"flow",l=function(){let r=this,u=arguments,c=0,m=si(i,a).apply(r,u),y,h=void 0,g=new Promise(function(A,M){let d=0;y=M;function f(w){h=void 0;let k;try{k=si(i,m.next).call(m,w)}catch(O){return M(O)}b(k)}function v(w){h=void 0;let k;try{k=si(i,m.throw).call(m,w)}catch(O){return M(O)}b(k)}function b(w){if(ui(w==null?void 0:w.then)){w.then(b,M);return}if(w.done)return A(w.value);return h=Promise.resolve(w.value),h.then(f,v)}f(void 0)}),x=i;return g.cancel=si(x,function(){try{if(h)jm(h);let A=m.return(void 0),M=Promise.resolve(A.value);M.then(ri,ri),jm(M),y(new kv)}catch(A){y(A)}}),g};return l.isMobXFlow=!0,l},Hm),hS=fS(dS);function jm(e){if(ui(e.cancel))e.cancel()}function Tl(e){return(e==null?void 0:e.isMobXFlow)===!0}function pS(e,t){if(!e)return!1;if(t!==void 0){if(Dl(e)){var n,a;let i=e[V];return i.values_.has(t)||!!((n=i.lazyComputedKeys_)!=null&&n.has(t))||!!((a=i.lazyObservableKeys_)!=null&&a.has(t))}return!1}return Dl(e)||!!e[V]||Bc(e)||wr(e)||Mr(e)}function Uv(e){return pS(e)}function Wt(e,t=void 0){st();try{return e.apply(t)}finally{ut()}}function oi(e){return e[V]}var mS={has(e,t){return oi(e).has_(t)},get(e,t){return oi(e).get_(t)},set(e,t,n){var a;if(!Mc(t))return!1;return(a=oi(e).set_(t,n,!0))!=null?a:!0},deleteProperty(e,t){var n;if(!Mc(t))return!1;return(n=oi(e).delete_(t,!0))!=null?n:!0},defineProperty(e,t,n){var a;return(a=oi(e).defineProperty_(t,n))!=null?a:!0},ownKeys(e){return oi(e).ownKeys_()},preventExtensions(e){I(13)}};function vS(e,t){var n,a;return e=Cl(e,t),(a=(n=e[V]).proxy_)!=null?a:n.proxy_=new Proxy(e,mS)}function ot(e){return e.interceptors_!==void 0&&e.interceptors_.length>0}function rt(e,t){let n=hi();try{let a=[...e.interceptors_||[]];for(let i=0,l=a.length;i<l;i++){if(t=a[i](t),t&&!t.type)I(14);if(!t)break}return t}finally{kn(n)}}function vt(e){return e.changeListeners_!==void 0&&e.changeListeners_.length>0}function gt(e,t){let n=hi(),a=e.changeListeners_;if(!a)return;a=a.slice();for(let i=0,l=a.length;i<l;i++)a[i](t);kn(n)}var zc=Symbol("mobx-keys");function nn(e,t,n){if(tn(e))return Rv(e,e,t,n);return mi(()=>{let a=Cl(e,n)[V];if(!e[zc]){let i=Object.getPrototypeOf(e),l=new Set([...xr(e),...xr(i)]);l.delete("constructor"),l.delete(V),Wm(i,zc,l)}e[zc].forEach((i)=>gS(a,i,!t?!0:(i in t)?t[i]:!0))}),e}function gS(e,t,n){if(n===!0)n=e.defaultAnnotation_;if(n===!1)return;if(Hv(e,n,t),!(t in e.target_))I(1,n.annotationType_,`${e.name_}.${t.toString()}`);let a=e.target_;while(a&&a!==Ar){let i=Lc(a,t);if(i){let l=n.make_(e,t,i,a);if(l===0)return;if(l===1)break}a=Object.getPrototypeOf(a)}Bv(e,n,t)}var qm="splice",Un="update",yS=1e4,bS={get(e,t){let n=e[V];if(t===V)return n;if(t==="length")return n.getArrayLength_();if(typeof t==="string"&&!isNaN(t))return n.get_(parseInt(t));if(ca(Vc,t))return Vc[t];return e[t]},set(e,t,n){let a=e[V];if(t==="length")a.setArrayLength_(n);if(typeof t==="symbol"||isNaN(t))e[t]=n;else a.set_(parseInt(t),n);return!0},preventExtensions(){I(15)}};class Kc{constructor(e="ObservableArray",t,n){this.owned_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.atom_=new fi(e),this.enhancer_=(a,i)=>t(a,i,"ObservableArray[..]")}dehanceValue_(e){if(this.dehancer!==void 0)return this.dehancer(e);return e}dehanceValues_(e){if(this.dehancer!==void 0&&e.length>0)return e.map(this.dehancer);return e}getArrayLength_(){return this.atom_.reportObserved(),this.values_.length}setArrayLength_(e){if(typeof e!=="number"||isNaN(e)||e<0)I(40,e);let t=this.values_.length;if(e===t)return;else if(e>t){let n=Array.from({length:e-t});this.spliceWithArray_(t,0,n)}else this.spliceWithArray_(e,t-e)}updateArrayLength_(e,t){if(e!==this.lastKnownLength_)I(16);this.lastKnownLength_+=t}spliceWithArray_(e,t,n){Ot(this.atom_);let a=this.values_.length;if(e===void 0)e=0;else if(e>a)e=a;else if(e<0)e=Math.max(0,a+e);if(arguments.length===1)t=a-e;else if(t===void 0||t===null)t=0;else t=Math.max(0,Math.min(t,a-e));if(n===void 0)n=Rc;if(ot(this)){let l=rt(this,{object:this.proxy_,type:qm,index:e,removedCount:t,added:n});if(!l)return Rc;t=l.removedCount,n=l.added}n=n.length===0?n:n.map((l)=>this.enhancer_(l,void 0));let i=this.spliceItemsIntoValues_(e,t,n);if(t!==0||n.length!==0)this.notifyArraySplice_(e,n,i);return this.dehanceValues_(i)}spliceItemsIntoValues_(e,t,n){if(n.length<yS)return this.values_.splice(e,t,...n);else{let a=this.values_.slice(e,e+t),i=this.values_.slice(e+t);this.values_.length+=n.length-t;for(let l=0;l<n.length;l++)this.values_[e+l]=n[l];for(let l=0;l<i.length;l++)this.values_[e+n.length+l]=i[l];return a}}notifyArrayChildUpdate_(e,t,n){let i=vt(this),l=i?{observableKind:"array",object:this.proxy_,type:Un,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;if(this.atom_.reportChanged(),i)gt(this,l)}notifyArraySplice_(e,t,n){let i=vt(this),l=i?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:qm,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;if(this.atom_.reportChanged(),i)gt(this,l)}get_(e){return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e])}set_(e,t){let n=this.values_;if(e<n.length){Ot(this.atom_);let a=n[e];if(ot(this)){let l=rt(this,{type:Un,object:this.proxy_,index:e,newValue:t});if(!l)return;t=l.newValue}if(t=this.enhancer_(t,a),t!==a)n[e]=t,this.notifyArrayChildUpdate_(e,t,a)}else{let a=Array.from({length:e+1-n.length});a[a.length-1]=t,this.spliceWithArray_(n.length,0,a)}}}function SS(e,t,n="ObservableArray",a=!1){return mi(()=>{let i=new Kc(n,t,a);c1(i.values_,V,i);let l=new Proxy(i.values_,bS);if(i.proxy_=l,e&&e.length)i.spliceWithArray_(0,0,e);return l})}var Vc={clear(){return this.splice(0)},replace(e){let t=this[V];return t.spliceWithArray_(0,t.values_.length,e)},toJSON(){return this.slice()},splice(e,t,...n){let a=this[V];switch(arguments.length){case 0:return[];case 1:return a.spliceWithArray_(e);case 2:return a.spliceWithArray_(e,t)}return a.spliceWithArray_(e,t,n)},spliceWithArray(e,t,n){return this[V].spliceWithArray_(e,t,n)},push(...e){let t=this[V];return t.spliceWithArray_(t.values_.length,0,e),t.values_.length},pop(){return this.splice(Math.max(this[V].values_.length-1,0),1)[0]},shift(){return this.splice(0,1)[0]},unshift(...e){let t=this[V];return t.spliceWithArray_(0,0,e),t.values_.length},reverse(){if(N.trackingDerivation)I(37,"reverse");return this.replace(this.slice().reverse()),this},sort(){if(N.trackingDerivation)I(37,"sort");let e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove(e){let t=this[V],n=t.dehanceValues_(t.values_).indexOf(e);if(n>-1)return this.splice(n,1),!0;return!1}};ee("at",Ze);ee("concat",Ze);ee("flat",Ze);ee("includes",Ze);ee("indexOf",Ze);ee("join",Ze);ee("lastIndexOf",Ze);ee("slice",Ze);ee("toString",Ze);ee("toLocaleString",Ze);ee("toSorted",Ze);ee("toSpliced",Ze);ee("with",Ze);ee("every",yt);ee("filter",yt);ee("find",yt);ee("findIndex",yt);ee("findLast",yt);ee("findLastIndex",yt);ee("flatMap",yt);ee("forEach",yt);ee("map",yt);ee("some",yt);ee("toReversed",yt);ee("reduce",Vv);ee("reduceRight",Vv);function ee(e,t){if(typeof Array.prototype[e]==="function")Vc[e]=t(e)}function Ze(e){return function(){let t=this[V];t.atom_.reportObserved();let n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function yt(e){return function(t,n){let a=this[V];return a.atom_.reportObserved(),a.dehanceValues_(a.values_)[e]((l,o)=>t.call(n,l,o,this))}}function Vv(e){return function(){let t=this[V];t.atom_.reportObserved();let n=t.dehanceValues_(t.values_),a=arguments[0];return arguments[0]=(i,l,o)=>a(i,l,o,this),n[e].apply(n,arguments)}}var _S=ha("ObservableArrayAdministration",Kc);function Lv(e){return Tr(e)&&_S(e[V])}var xS={},Mn="add",Nr="delete";class Xc{constructor(e,t=fa,n="ObservableMap"){this.enhancer_=void 0,this.name_=void 0,this[V]=xS,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=n,mi(()=>{if(this.keysAtom_=Im("ObservableMap.keys()"),this.data_=new Map,this.hasMap_=new Map,e)this.merge(e)})}has_(e){return this.data_.has(e)}has(e){if(!N.trackingDerivation)return this.has_(e);let t=this.hasMap_.get(e);if(!t){let n=t=new Cn(this.has_(e),Dr,"ObservableMap.key?",!1);this.hasMap_.set(e,n),n.onBUOL=new Set([()=>this.hasMap_.delete(e)])}return t.get()}set(e,t){let n=this.has_(e);if(ot(this)){let a=rt(this,{type:n?Un:Mn,object:this,newValue:t,name:e});if(!a)return this;t=a.newValue}if(n)this.updateValue_(e,t);else this.addValue_(e,t);return this}delete(e){if(Ot(this.keysAtom_),ot(this)){if(!rt(this,{type:Nr,object:this,name:e}))return!1}if(this.has_(e)){let n=vt(this),a=n?{observableKind:"map",debugObjectName:this.name_,type:Nr,object:this,oldValue:this.data_.get(e).value_,name:e}:null;if(Wt(()=>{var i;this.keysAtom_.reportChanged(),(i=this.hasMap_.get(e))==null||i.setNewValue_(!1),this.data_.get(e).setNewValue_(void 0),this.data_.delete(e)}),n)gt(this,a);return!0}return!1}updateValue_(e,t){let n=this.data_.get(e);if(t=n.prepareNewValue_(t),t!==N.UNCHANGED){let i=vt(this),l=i?{observableKind:"map",debugObjectName:this.name_,type:Un,object:this,oldValue:n.value_,name:e,newValue:t}:null;if(n.setNewValue_(t),i)gt(this,l)}}addValue_(e,t){Ot(this.keysAtom_),Wt(()=>{var l;let o=new Cn(t,this.enhancer_,"ObservableMap.key",!1);this.data_.set(e,o),t=o.value_,(l=this.hasMap_.get(e))==null||l.setNewValue_(!0),this.keysAtom_.reportChanged()});let n=!1,a=vt(this),i=a||n?{observableKind:"map",debugObjectName:this.name_,type:Mn,object:this,name:e,newValue:t}:null;if(a)gt(this,i)}get(e){if(this.has(e))return this.dehanceValue_(this.data_.get(e).get());return this.dehanceValue_(void 0)}getOrInsert(e,t){if(!this.has(e))this.set(e,t);return this.get(e)}getOrInsertComputed(e,t){if(!this.has(e))this.set(e,t(e));return this.get(e)}dehanceValue_(e){if(this.dehancer!==void 0)return this.dehancer(e);return e}keys(){return this.keysAtom_.reportObserved(),this.data_.keys()}values(){let e=this,t=this.keys();return Gm({next(){let{done:n,value:a}=t.next();return{done:n,value:n?void 0:e.get(a)}}})}entries(){let e=this,t=this.keys();return Gm({next(){let{done:n,value:a}=t.next();return{done:n,value:n?void 0:[a,e.get(a)]}}})}[Symbol.iterator](){return this.entries()}forEach(e,t){for(let[n,a]of this)e.call(t,a,n,this)}merge(e){if(pi(e))e=new Map(e);return Wt(()=>{if(tn(e))d1(e).forEach((t)=>this.set(t,e[t]));else if(Array.isArray(e))e.forEach(([t,n])=>this.set(t,n));else if(zl(e)){if(!f1(e))I(19,e);e.forEach((t,n)=>this.set(n,t))}else if(e!==null&&e!==void 0)I(20,e)}),this}clear(){Wt(()=>{vv(()=>{for(let e of this.keys())this.delete(e)})})}replace(e){return Wt(()=>{let t=ES(e),n=new Map,a=!1;for(let i of this.data_.keys())if(!t.has(i))if(this.delete(i))a=!0;else{let o=this.data_.get(i);n.set(i,o)}for(let[i,l]of t.entries()){let o=this.data_.has(i);if(this.set(i,l),this.data_.has(i)){let r=this.data_.get(i);if(n.set(i,r),!o)a=!0}}if(!a)if(this.data_.size!==n.size)this.keysAtom_.reportChanged();else{let i=this.data_.keys(),l=n.keys(),o=i.next(),r=l.next();while(!o.done){if(o.value!==r.value){this.keysAtom_.reportChanged();break}o=i.next(),r=l.next()}}this.data_=n}),this}get size(){return this.keysAtom_.reportObserved(),this.data_.size}toString(){return"[object ObservableMap]"}toJSON(){return Array.from(this)}get[Symbol.toStringTag](){return"Map"}}var pi=ha("ObservableMap",Xc);function Gm(e){return e[Symbol.toStringTag]="MapIterator",qv(e)}function ES(e){if(zl(e)||pi(e))return e;else if(Array.isArray(e))return new Map(e);else if(tn(e)){let t=new Map;for(let n in e)t.set(n,e[n]);return t}else return I(21,e)}var wS={};class Qc{constructor(e,t=fa,n="ObservableSet"){this.name_=void 0,this[V]=wS,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=n,this.enhancer_=(a,i)=>t(a,i,n),mi(()=>{if(this.atom_=Im(this.name_),e)this.replace(e)})}dehanceValue_(e){if(this.dehancer!==void 0)return this.dehancer(e);return e}clear(){Wt(()=>{vv(()=>{for(let e of this.data_.values())this.delete(e)})})}forEach(e,t){for(let n of this)e.call(t,n,n,this)}get size(){return this.atom_.reportObserved(),this.data_.size}add(e){if(Ot(this.atom_),ot(this)){let t=rt(this,{type:Mn,object:this,newValue:e});if(!t)return this;e=t.newValue}if(!this.has(e)){Wt(()=>{this.data_.add(this.enhancer_(e,void 0)),this.atom_.reportChanged()});let t=!1,n=vt(this),a=n||t?{observableKind:"set",debugObjectName:this.name_,type:Mn,object:this,newValue:e}:null;if(n)gt(this,a)}return this}delete(e){if(ot(this)){if(!rt(this,{type:Nr,object:this,oldValue:e}))return!1}if(this.has(e)){let n=vt(this),a=n?{observableKind:"set",debugObjectName:this.name_,type:Nr,object:this,oldValue:e}:null;if(Wt(()=>{this.atom_.reportChanged(),this.data_.delete(e)}),n)gt(this,a);return!0}return!1}has(e){return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))}entries(){let e=this.values();return Ym({next(){let{value:t,done:n}=e.next();return!n?{value:[t,t],done:n}:{value:void 0,done:n}}})}keys(){return this.values()}values(){this.atom_.reportObserved();let e=this,t=this.data_.values();return Ym({next(){let{value:n,done:a}=t.next();return!a?{value:e.dehanceValue_(n),done:a}:{value:void 0,done:a}}})}intersection(e){if(Rn(e)&&!Pt(e))return e.intersection(this);else return new Set(this).intersection(e)}union(e){if(Rn(e)&&!Pt(e))return e.union(this);else return new Set(this).union(e)}difference(e){return new Set(this).difference(e)}symmetricDifference(e){if(Rn(e)&&!Pt(e))return e.symmetricDifference(this);else return new Set(this).symmetricDifference(e)}isSubsetOf(e){return new Set(this).isSubsetOf(e)}isSupersetOf(e){return new Set(this).isSupersetOf(e)}isDisjointFrom(e){if(Rn(e)&&!Pt(e))return e.isDisjointFrom(this);else return new Set(this).isDisjointFrom(e)}replace(e){if(Pt(e))e=new Set(e);return Wt(()=>{if(Array.isArray(e))this.clear(),e.forEach((t)=>this.add(t));else if(Rn(e))this.clear(),e.forEach((t)=>this.add(t));else if(e!==null&&e!==void 0)I(41,e)}),this}toJSON(){return Array.from(this)}toString(){return"[object ObservableSet]"}[Symbol.iterator](){return this.values()}get[Symbol.toStringTag](){return"Set"}}var Pt=ha("ObservableSet",Qc);function Ym(e){return e[Symbol.toStringTag]="SetIterator",qv(e)}var Km=Object.create(null),Xm="remove";class Zc{constructor(e,t=new Map,n,a=T1){this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.lazyComputedKeys_=void 0,this.lazyObservableKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=a,this.keysAtom_=new fi("ObservableObject.keys"),this.isPlainObject_=tn(this.target_)}getObservablePropValue_(e){var t,n;return((t=(n=this.values_.get(e))!=null?n:this.materializeLazyComputed_(e))!=null?t:this.materializeLazyObservable_(e)).get()}materializeLazyComputed_(e){var t;let n=(t=this.lazyComputedKeys_)==null?void 0:t.get(e);if(!n)return;if(this.lazyComputedKeys_.delete(e),this.lazyComputedKeys_.size===0)this.lazyComputedKeys_=void 0;let a=n();return this.values_.set(e,a),a}materializeLazyObservable_(e){var t;let n=(t=this.lazyObservableKeys_)==null?void 0:t.get(e);if(!n)return;if(this.lazyObservableKeys_.delete(e),this.lazyObservableKeys_.size===0)this.lazyObservableKeys_=void 0;let a=n();return this.values_.set(e,a),a}setObservablePropValue_(e,t){var n,a;let i=(n=(a=this.values_.get(e))!=null?a:this.materializeLazyComputed_(e))!=null?n:this.materializeLazyObservable_(e);if(i instanceof en)return i.set(t),!0;if(ot(this)){let l=rt(this,{type:Un,object:this.proxy_||this.target_,name:e,newValue:t});if(!l)return null;t=l.newValue}if(t=i.prepareNewValue_(t),t!==N.UNCHANGED){let l=vt(this),o=!1,r=l?{type:Un,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:i.value_,name:e,newValue:t}:null;if(i.setNewValue_(t),l)gt(this,r)}return!0}get_(e){if(N.trackingDerivation&&!ca(this.target_,e))this.has_(e);return this.target_[e]}set_(e,t,n=!1){if(ca(this.target_,e))if(this.values_.has(e))return this.setObservablePropValue_(e,t);else if(n)return Reflect.set(this.target_,e,t);else return this.target_[e]=t,!0;else return this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)}has_(e){if(!N.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);let t=this.pendingKeys_.get(e);if(!t)t=new Cn(e in this.target_,Dr,"ObservableObject.key?",!1),this.pendingKeys_.set(e,t);return t.get()}extend_(e,t,n,a=!1){if(n===!0)n=this.defaultAnnotation_;if(n===!1)return this.defineProperty_(e,t,a);Hv(this,n,e);let i=n.extend_(this,e,t,a);if(i)Bv(this,n,e);return i}defineProperty_(e,t,n=!1){Ot(this.keysAtom_);try{st();let a=this.delete_(e);if(!a)return a;if(ot(this)){let i=rt(this,{object:this.proxy_||this.target_,name:e,type:Mn,newValue:t.value});if(!i)return null;let{newValue:l}=i;if(t.value!==l)t=At({},t,{value:l})}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else It(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{ut()}return!0}defineObservableProperty_(e,t,n,a=!1){Ot(this.keysAtom_);try{st();let i=this.delete_(e);if(!i)return i;if(ot(this)){let u=rt(this,{object:this.proxy_||this.target_,name:e,type:Mn,newValue:t});if(!u)return null;t=u.newValue}let l=Qm(e),o={configurable:N.safeDescriptors?this.isPlainObject_:!0,enumerable:!0,get:l.get,set:l.set};if(a){if(!Reflect.defineProperty(this.target_,e,o))return!1}else It(this.target_,e,o);let r=new Cn(t,n,"ObservableObject.key",!1);this.values_.set(e,r),this.notifyPropertyAddition_(e,r.value_)}finally{ut()}return!0}defineComputedProperty_(e,t,n=!1){Ot(this.keysAtom_);try{st();let a=this.delete_(e);if(!a)return a;if(ot(this)){if(!rt(this,{object:this.proxy_||this.target_,name:e,type:Mn,newValue:void 0}))return null}t.name||(t.name="ObservableObject.key"),t.context=this.proxy_||this.target_;let i=Qm(e),l={configurable:N.safeDescriptors?this.isPlainObject_:!0,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.target_,e,l))return!1}else It(this.target_,e,l);this.values_.set(e,new en(t)),this.notifyPropertyAddition_(e,void 0)}finally{ut()}return!0}delete_(e,t=!1){if(Ot(this.keysAtom_),!ca(this.target_,e))return!0;if(ot(this)){if(!rt(this,{object:this.proxy_||this.target_,name:e,type:Xm}))return null}try{var n;st();let i=vt(this),l=!1,o=this.values_.get(e),r=void 0;if(!o&&(i||l)){var a;r=(a=Lc(this.target_,e))==null?void 0:a.value}if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(o){if(this.values_.delete(e),o instanceof Cn)r=o.value_;xv(o)}if(this.keysAtom_.reportChanged(),(n=this.pendingKeys_)==null||(n=n.get(e))==null||n.set(e in this.target_),i||l){let u={type:Xm,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:r,name:e};if(i)gt(this,u)}}finally{ut()}return!0}notifyPropertyAddition_(e,t){var n;let a=vt(this),i=!1;if(a){let l=a?{type:Mn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;if(a)gt(this,l)}(n=this.pendingKeys_)==null||(n=n.get(e))==null||n.set(!0),this.keysAtom_.reportChanged()}ownKeys_(){return this.keysAtom_.reportObserved(),xr(this.target_)}keys_(){return this.keysAtom_.reportObserved(),Object.keys(this.target_)}}function Cl(e,t){var n;if(ca(e,V))return e;let a=(n=t==null?void 0:t.name)!=null?n:"ObservableObject",i=new Zc(e,new Map,String(a),V1(t));return Wm(e,V,i),e}var NS=ha("ObservableObjectAdministration",Zc);function Qm(e){return Km[e]||(Km[e]={get(){return this[V].getObservablePropValue_(e)},set(t){return this[V].setObservablePropValue_(e,t)}})}function Dl(e){if(Tr(e))return NS(e[V]);return!1}function Bv(e,t,n){}function Hv(e,t,n){}function Or(e,t){if(typeof e==="object"&&e!==null){if(Lv(e)){if(t!==void 0)I(23);return e[V].atom_}if(Pt(e))return e.atom_;if(pi(e)){if(t===void 0)return e.keysAtom_;let i=e.data_.get(t)||e.hasMap_.get(t);if(!i)I(25,t,Zm(e));return i}if(Dl(e)){var n,a;if(!t)return I(26);let i=e[V],l=(n=(a=i.values_.get(t))!=null?a:i.materializeLazyComputed_(t))!=null?n:i.materializeLazyObservable_(t);if(!l)I(27,t,Zm(e));return l}if(Bc(e)||Mr(e)||wr(e))return e}else if(ui(e)){if(wr(e[V]))return e[V]}I(28)}function jv(e,t){if(!e)I(29);if(t!==void 0)return jv(Or(e,t));if(Bc(e)||Mr(e)||wr(e))return e;if(pi(e)||Pt(e))return e;if(e[V])return e[V];I(24,e)}function Zm(e,t){let n;if(t!==void 0)n=Or(e,t);else if(ci(e))return e.name;else if(Dl(e)||pi(e)||Pt(e))n=jv(e);else n=Or(e);return n.name_}function mi(e){let t=hi(),n=!0;st();try{return e()}finally{ut(),kn(t)}}var R_=Ar.toString;var $m,OS=(($m=globalThis.Iterator)==null?void 0:$m.prototype)||{};function qv(e){return e[Symbol.iterator]=AS,At(Object.create(OS),e)}function AS(){return this}var Gv;if(!ya||!Fl)throw Error("mobx-react-lite requires React 18 or later");if(!((Gc==null||(Gv=Gc())==null?void 0:Gv.version)>=7))throw Error("mobx-react-lite requires mobx at least version 7 to be available");var TS=1e4,DS=1e4;class Jv{constructor(e){this.finalize=void 0,this.registrations=new Map,this.sweepTimeout=void 0,this.sweep=(t=TS)=>{clearTimeout(this.sweepTimeout),this.sweepTimeout=void 0;let n=Date.now();if(this.registrations.forEach((a,i)=>{if(n-a.registeredAt>=t)this.finalize(a.value),this.registrations.delete(i)}),this.registrations.size>0)this.scheduleSweep()},this.finalizeAllImmediately=()=>{this.sweep(0)},this.finalize=e}register(e,t,n){this.registrations.set(n,{value:t,registeredAt:Date.now()}),this.scheduleSweep()}unregister(e){this.registrations.delete(e)}scheduleSweep(){if(this.sweepTimeout===void 0)this.sweepTimeout=setTimeout(this.sweep,DS)}}var zS=typeof FinalizationRegistry<"u"?FinalizationRegistry:Jv,$c=new zS((e)=>{var t;(t=e.reaction)==null||t.dispose(),e.reaction=null}),RS=!1;function Fv(){return RS}function Yv(e){e.reaction=new Ml(`observer${e.name}`,()=>{e.stateVersion=Symbol(),e.onStoreChange==null||e.onStoreChange()})}function Wv(e,t="observed"){if(Fv())return e();let n=zt(null);if(!n.current){let o={reaction:null,onStoreChange:null,stateVersion:Symbol(),name:t,subscribe(r){if($c.unregister(o),o.onStoreChange=r,!o.reaction)Yv(o),o.stateVersion=Symbol();return()=>{var u;o.onStoreChange=null,(u=o.reaction)==null||u.dispose(),o.reaction=null}},getSnapshot(){return o.stateVersion}};n.current=o}let a=n.current;if(!a.reaction)Yv(a),$c.register(n,a,a);zf(a.reaction,Mv),Fl(a.subscribe,a.getSnapshot,a.getSnapshot);let i,l;if(a.reaction.track(()=>{try{i=e()}catch(o){l=o}}),l)throw l;return i}var Kv,Xv,Pv=typeof Symbol==="function"&&Symbol.for,MS=(Kv=(Xv=Object.getOwnPropertyDescriptor(()=>{},"name"))==null?void 0:Xv.configurable)!=null?Kv:!1,Qv=Pv?Symbol.for("react.forward_ref"):typeof Ni==="function"&&Ni((e)=>null).$$typeof,Zv=Pv?Symbol.for("react.memo"):typeof Oi==="function"&&Oi((e)=>null).$$typeof;function L(e){if(Zv&&e.$$typeof===Zv)throw Error("[mobx-react-lite] You are trying to use `observer` on a function component wrapped in either another `observer` or `React.memo`. The observer already applies 'React.memo' for you.");if(Fv())return e;let t=!1,n=e,a=e.displayName||e.name;if(Qv&&e.$$typeof===Qv){if(t=!0,n=e.render,typeof n!=="function")throw Error("[mobx-react-lite] `render` property of ForwardRef was not a function")}let i=(l,o)=>Wv(()=>n(l,o),a);if(i.displayName=e.displayName,MS)Object.defineProperty(i,"name",{value:e.name,writable:!0,configurable:!0});if(t)i=Ni(i);return i=Oi(i),kS(e,i),i}var CS={$$typeof:!0,render:!0,compare:!0,type:!0,displayName:!0};function kS(e,t){Object.keys(e).forEach((n)=>{if(!CS[n])Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))})}function US({children:e,render:t}){if(e&&t)console.error("MobX Observer: Do not use children and render in the same time in `Observer`");let n=e||t;if(typeof n!=="function")return null;return Wv(n)}US.displayName="Observer";function Vn(e,t){return ya(()=>Ne(e(),t,{autoBind:!0}))[0]}var $v,U_=($v=$c.finalizeAllImmediately)!=null?$v:()=>{};var VS=Symbol.for("react.transitional.element"),LS=Symbol.for("react.fragment");function Iv(e,t,n){var a=null;if(n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),"key"in t){n={};for(var i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:VS,type:e,key:a,ref:t!==void 0?t:null,props:n}}var he=LS,s=Iv,p=Iv;var BS={close:s("path",{d:"M6 6l12 12M18 6L6 18"}),trash:s("path",{d:"M4 7h16M10 7V5h4v2M6 7l1 12h10l1-12M10 11v5M14 11v5"}),copy:s("path",{d:"M9 9h10v10H9zM5 15V5h10"}),external:s("path",{d:"M14 5h5v5M19 5l-8 8M18 14v5H5V6h5"}),dice:p(he,{children:[s("rect",{x:"4",y:"4",width:"16",height:"16",rx:"3"}),s("circle",{cx:"9",cy:"9",r:"1.3",fill:"currentColor",stroke:"none"}),s("circle",{cx:"15",cy:"15",r:"1.3",fill:"currentColor",stroke:"none"}),s("circle",{cx:"12",cy:"12",r:"1.3",fill:"currentColor",stroke:"none"})]}),image:p(he,{children:[s("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),s("circle",{cx:"8.5",cy:"10",r:"1.5"}),s("path",{d:"M4 17l5-5 4 4 3-2 4 4"})]}),tag:p(he,{children:[s("path",{d:"M4 11V4h7l9 9-7 7-9-9z"}),s("circle",{cx:"8",cy:"8",r:"1.3",fill:"currentColor",stroke:"none"})]}),sparkle:s("path",{d:"M12 3l1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9zM18 15l.8 2.2L21 18l-2.2.8L18 21l-.8-2.2L15 18l2.2-.8z"}),play:s("path",{d:"M7 4l13 8-13 8z",fill:"currentColor",stroke:"none"}),pause:s("path",{d:"M8 5v14M16 5v14"}),save:s("path",{d:"M5 4h11l3 3v13H5zM8 4v6h7V4M8 20v-6h8v6"}),ghost:s("path",{d:"M5 20V10a7 7 0 0114 0v10l-2.3-2-2.4 2-2.3-2-2.4 2zM9.5 10h.01M14.5 10h.01"}),"panel-off":p(he,{children:[s("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),s("path",{d:"M4 5l16 14"})]}),"panel-bottom":p(he,{children:[s("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),s("path",{d:"M3 14h18"}),s("rect",{x:"4.5",y:"15.5",width:"15",height:"3",fill:"currentColor",stroke:"none",opacity:"0.85"})]}),"panel-side":p(he,{children:[s("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),s("path",{d:"M14 4v16"}),s("rect",{x:"15.5",y:"5.5",width:"4",height:"13",fill:"currentColor",stroke:"none",opacity:"0.85"})]}),"panel-left":p(he,{children:[s("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),s("path",{d:"M10 4v16"}),s("rect",{x:"4.5",y:"5.5",width:"4",height:"13",fill:"currentColor",stroke:"none",opacity:"0.85"})]}),"panel-corner":p(he,{children:[s("rect",{x:"3",y:"4",width:"18",height:"16",rx:"2"}),s("rect",{x:"12.5",y:"12.5",width:"7",height:"6",fill:"currentColor",stroke:"none",opacity:"0.85"})]}),swap:s("path",{d:"M4 8h13l-3-3M20 16H7l3 3"}),plus:s("path",{d:"M12 5v14M5 12h14"}),"copy-plus":s("path",{d:"M9 9h10v10H9zM5 15V5h10M14 12v4M12 14h4"}),pen:s("path",{d:"M4 20h4L20 8l-4-4L4 16zM14 6l4 4"}),broom:s("path",{d:"M19 4l-7 7M9.5 8.5l6 6-5 5-6-6zM4.5 13.5L2 21l7.5-2.5"}),expand:s("path",{d:"M4 9V4h5M20 15v5h-5M15 4h5v5M9 20H4v-5"}),shrink:s("path",{d:"M9 4v5H4M15 20v-5h5M20 9h-5V4M4 15h5v5"}),power:s("path",{d:"M12 3v9M7.5 6.5a7 7 0 109 0"}),warn:s("path",{d:"M12 4l9 16H3zM12 10v4M12 17h.01"}),link:s("path",{d:"M10 14a4 4 0 015.7 0l2.6-2.6a4 4 0 10-5.7-5.7L11 7.3M14 10a4 4 0 01-5.7 0l-2.6 2.6a4 4 0 105.7 5.7L13 16.7"}),unlink:s("path",{d:"M9 15l-1.6 1.6a4 4 0 01-5.7-5.7L3.3 9.3M15 9l1.6-1.6a4 4 0 015.7 5.7L20.7 14.7M4 4l16 16"}),grip:p(he,{children:[s("circle",{cx:"9",cy:"6",r:"1.4",fill:"currentColor",stroke:"none"}),s("circle",{cx:"15",cy:"6",r:"1.4",fill:"currentColor",stroke:"none"}),s("circle",{cx:"9",cy:"12",r:"1.4",fill:"currentColor",stroke:"none"}),s("circle",{cx:"15",cy:"12",r:"1.4",fill:"currentColor",stroke:"none"}),s("circle",{cx:"9",cy:"18",r:"1.4",fill:"currentColor",stroke:"none"}),s("circle",{cx:"15",cy:"18",r:"1.4",fill:"currentColor",stroke:"none"})]}),refresh:s("path",{d:"M20 11a8 8 0 10-2 6M20 6v5h-5"}),terminal:s("path",{d:"M4 5h16v14H4zM7 9l3 3-3 3M13 15h4"}),folder:s("path",{d:"M3 7h6l2 2h10v10H3z"}),dot:s("circle",{cx:"12",cy:"12",r:"5",fill:"currentColor",stroke:"none"})};function D(e){return p("svg",{className:"icon",viewBox:"0 0 24 24",width:`${e.size??1.15}em`,height:`${e.size??1.15}em`,fill:"none",stroke:"currentColor",strokeWidth:1.8,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":e.title==null,role:e.title==null?void 0:"img",children:[e.title==null?null:s("title",{children:e.title}),BS[e.name]]})}async function me(e,t){let n=await fetch(e,t),a=await n.json().catch(()=>null);if(!n.ok||a==null)throw Error(a?.error??`http ${n.status} on ${e}`);return a}function Jc(){return me("/drafts")}function eg(e){return me(`/drafts/${encodeURIComponent(e.module)}/${encodeURIComponent(e.draft)}`)}function tg(e){return me(`/generate/${encodeURIComponent(e.module)}/${encodeURIComponent(e.draft)}`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(e.payload)})}function kl(e,t={}){return me(`/drafts/${encodeURIComponent(e.module)}/${encodeURIComponent(e.draft)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e.values),keepalive:t.keepalive===!0})}function Fc(e){return me(`/drafts/${encodeURIComponent(e.module)}/${encodeURIComponent(e.draft)}`,{method:"DELETE"})}function ng(e){return me(`/run/${encodeURIComponent(e.module)}`)}function Ur(e){return`/run/${encodeURIComponent(e.module)}/preview?t=${e.tick}`}function Wc(e){return me(`/lora-info/${encodeURIComponent(e.host)}/${encodeURIComponent(e.name)}`)}function ag(e){return me(`/lora-about/${encodeURIComponent(e.host)}/${encodeURIComponent(e.name)}`)}function Pc(e){return`/lora-preview/${encodeURIComponent(e.host)}/${encodeURIComponent(e.name)}`}function ig(){return me("/settings")}function lg(e){return me("/settings",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(e)})}function og(){return me("/hosts")}function rg(e){return me(`/hosts/${encodeURIComponent(e.host)}/ping`)}function sg(e){return me(`/hosts/${encodeURIComponent(e.host)}/${e.action}`,{method:"POST"})}function ug(e){return me(`/hosts/${encodeURIComponent(e.host)}/logs`)}function cg(e){return me(`/hosts/${encodeURIComponent(e.module)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({host:e.host})})}function fg(){return me("/prompt-enhancers")}function dg(e){return me(`/prompt-enhancers/${encodeURIComponent(e.name)}`,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify({text:e.text})})}function hg(e){return me(`/prompt-enhancers/${encodeURIComponent(e.name)}`,{method:"DELETE"})}async function pg(e){let t=new Uint8Array(await e.file.arrayBuffer()),n="";for(let a=0;a<t.length;a+=32768)n+=String.fromCharCode(...t.subarray(a,a+32768));return me("/upload",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({name:e.file.name,dataBase64:btoa(n)})})}function mg(e){if(e.target.kind==="image")return{url:e.target.url,title:e.target.title,promptId:e.target.promptId};let t=e.target.module,n=e.results.filter((l)=>l.module===t),a=n.length>e.target.after?n[0]:void 0,i=a?.images.find((l)=>l.url!=null);if(!e.isRunning&&i?.url!=null)return{url:i.url,title:i.filename,promptId:a?.promptId??null};return{url:Ur({module:t,tick:e.previewTick}),title:"latent preview",promptId:null}}async function vg(e){let t=await fetch(e);if(!t.ok)throw Error(`fetch failed (http ${t.status})`);let n=await t.blob(),a=n.type==="image/png"?n:await HS(n);await navigator.clipboard.write([new ClipboardItem({"image/png":a})])}async function HS(e){let t=await createImageBitmap(e),n=document.createElement("canvas");n.width=t.width,n.height=t.height;let a=n.getContext("2d");if(a==null)throw Error("canvas 2d context unavailable");return a.drawImage(t,0,0),await new Promise((i,l)=>{n.toBlob((o)=>{if(o==null)l(Error("png encode failed"));else i(o)},"image/png")})}var gg=typeof navigator<"u"&&navigator.clipboard!=null;function jS(){return Vn(()=>({copyNote:null,lightbox:null,zoom:1,panX:0,panY:0,setCopyNote(e,t){this.copyNote={url:e,text:t}},openLightbox(e){this.lightbox=e,this.resetZoom()},closeLightbox(){this.lightbox=null,this.resetZoom()},zoomBy(e,t){let n=Math.min(8,Math.max(1,this.zoom*e));if(n===this.zoom)return;let a=n/this.zoom;if(this.panX=t.x-(t.x-this.panX)*a,this.panY=t.y-(t.y-this.panY)*a,this.zoom=n,n===1)this.panX=0,this.panY=0},panBy(e,t){if(this.zoom===1)return;this.panX+=e,this.panY+=t},resetZoom(){this.zoom=1,this.panX=0,this.panY=0}}))}var qS=L(function(t){let n=t.local.lightbox,a=n==null?null:mg({target:n,isRunning:t.st.run.isRunning,previewTick:t.st.run.previewTick,results:t.st.run.results});be(()=>{if(n==null)return;let o=(r)=>{if(r.key==="Escape")t.local.closeLightbox()};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[n,t.local]);let i=zt(null);if(be(()=>{let o=i.current;if(o==null)return;let r=(u)=>{u.preventDefault();let c=o.getBoundingClientRect();t.local.zoomBy(u.deltaY<0?1.2:0.8333333333333334,{x:u.clientX-c.left-c.width/2,y:u.clientY-c.top-c.height/2})};return o.addEventListener("wheel",r,{passive:!1}),()=>o.removeEventListener("wheel",r)},[n,t.local]),a==null)return null;let l=()=>{vg(a.url).then(()=>t.local.setCopyNote(a.url,"copied ✓")).catch((o)=>t.local.setCopyNote(a.url,`copy failed: ${o instanceof Error?o.message:String(o)}`))};return s("div",{className:"modal-overlay",onClick:()=>t.local.closeLightbox(),children:p("div",{className:"lightbox",onClick:(o)=>o.stopPropagation(),children:[s("div",{ref:i,className:t.local.zoom>1?"zoom-view grabbing":"zoom-view",onDoubleClick:()=>t.local.resetZoom(),onPointerDown:(o)=>{if(t.local.zoom===1)return;o.currentTarget.setPointerCapture(o.pointerId)},onPointerMove:(o)=>{if(o.buttons!==1)return;t.local.panBy(o.movementX,o.movementY)},children:s("img",{src:a.url,alt:a.title,draggable:!1,style:{transform:`translate(${t.local.panX}px, ${t.local.panY}px) scale(${t.local.zoom})`}})}),p("div",{className:"lightbox-bar",children:[s("span",{className:"hint","data-tip":a.title,children:a.title}),t.local.zoom>1?p("button",{type:"button","data-tip":"back to fit (or double click the image)",onClick:()=>t.local.resetZoom(),children:[t.local.zoom.toFixed(1),"× · fit"]}):s("span",{className:"hint",children:"scroll to zoom"}),gg?s("button",{type:"button",onClick:l,children:"copy"}):null,s("a",{href:a.url,target:"_blank",rel:"noreferrer",children:"open ↗"}),a.promptId!=null?t.st.hostActions.map((o)=>{let r=t.st.run.results.find((c)=>c.promptId===a.promptId),u=r?.images.findIndex((c)=>c.url===a.url)??-1;if(r==null||u<0)return null;return s("button",{type:"button",className:"host-action","data-tip":o.title,onClick:()=>t.st.postResultAction(o.id,r,{url:a.url,filename:a.title},u),children:o.label},o.id)}):null,a.promptId!=null?s("button",{type:"button","data-tip":"remove this result",onClick:()=>{if(a.promptId!=null)t.st.run.remove(a.promptId);t.local.closeLightbox()},children:"delete"}):null,t.local.copyNote?.url===a.url?s("span",{className:"hint",children:t.local.copyNote.text}):null,s("button",{type:"button","data-tip":"close (esc)",onClick:()=>t.local.closeLightbox(),children:s(D,{name:"close"})})]})]})})});function yg(e){let t=e.indexOf("</think>");if(t===-1)return e.trimStart().startsWith("<think>")?{thinking:e.replace(/^\s*<think>/,"").trim(),answer:""}:{thinking:null,answer:e.trim()};let n=e.slice(0,t).replace(/^\s*<think>/,"").trim();return{thinking:n===""?null:n,answer:e.slice(t+8).trim()}}var GS=L(function(t){let n=Vn(()=>({showThinking:!1,copied:!1,toggle(){this.showThinking=!this.showThinking},markCopied(){this.copied=!0}})),{thinking:a,answer:i}=yg(t.entry.text);return p("div",{className:"run-text",children:[p("div",{className:"run-text-head",children:[s("span",{className:"hint",children:t.entry.nodeKey??"text"}),a!=null?s("button",{type:"button",className:"link","data-tip":"the model's reasoning, before its answer",onClick:()=>n.toggle(),children:n.showThinking?"hide thinking":"thinking"}):null,gg?p("button",{type:"button",className:"link","data-tip":"copy this text",onClick:()=>{navigator.clipboard.writeText(i===""?t.entry.text:i),n.markCopied()},children:[s(D,{name:"copy"})," ",n.copied?"copied":""]}):null]}),a!=null&&n.showThinking?s("pre",{className:"run-thinking",children:a}):null,i===""?s("div",{className:"noimg",children:"the model reasoned past its token budget and never answered — raise max tokens"}):s("pre",{className:"run-text-body",children:i})]})}),YS=L(function(t){let{thinking:n,answer:a}=yg(t.text),i=zt(null);be(()=>{let o=i.current;if(o!=null)o.scrollTop=o.scrollHeight});let l=a!==""?a:n??"";return p("div",{className:"run-live",children:[a===""&&n!=null?s("span",{className:"hint",children:"thinking…"}):null,s("pre",{ref:i,className:a===""?"run-live-body dim":"run-live-body",children:l})]})}),KS=L(function(t){let n=t.st.run.runningModule;if(!t.st.run.isRunning||n==null)return null;let a=t.st.run.progressPercent,i=Ur({module:n,tick:t.st.run.previewTick}),l=t.st.run.progressNode,o=t.st.run.progressCount,r=t.st.run.progressText;return p("div",{className:"run-card running",children:[p("div",{className:"meta",children:[p("span",{children:["generating ",n,"…"]}),s("span",{children:a!=null?`${Math.round(a)}%`:""})]}),l!=null?p("div",{className:"run-node",children:[l,o!=null?` ${o.value}/${o.max}`:""]}):null,r!=null&&r!==""?s(YS,{text:r}):null,s("div",{className:"progress-track",children:s("div",{className:"progress-fill",style:{width:`${a??0}%`}})}),t.st.run.hasPreview&&t.st.showLatent?s("div",{className:"imgs",children:s("button",{type:"button",className:"img-button",onClick:()=>t.local.openLightbox({kind:"latent",module:n,after:t.st.run.results.filter((u)=>u.module===n).length}),children:s("img",{src:i,alt:"latent preview"})})}):null]})}),bg=L(function(t){let n=jS();if(t.st.run.results.length===0&&!t.st.run.isRunning)return null;let a=t.compact===!0?t.st.run.results.slice(0,1):t.st.run.results;return p("div",{className:"gallery",children:[s(KS,{st:t.st,local:n}),a.map((i)=>p("div",{className:"run-card",children:[p("div",{className:"meta",children:[p("span",{children:[i.at," · ",i.module,"/",i.draft," · ",(i.durationMs/1000).toFixed(1),"s",Object.entries(i.seeds).map(([l,o])=>` · ${l}: ${o}`)]}),s("button",{type:"button",className:"link","data-tip":"remove this result",onClick:()=>t.st.run.remove(i.promptId),children:s(D,{name:"trash"})})]}),p("div",{className:"imgs",children:[i.images.map((l,o)=>l.url!=null?p("div",{className:"img-cell",children:[s("button",{type:"button",className:"img-button","data-tip":l.filename,onClick:()=>{if(l.url!=null)n.openLightbox({kind:"image",url:l.url,title:l.filename,promptId:i.promptId})},children:s("img",{src:l.url,alt:l.filename})}),t.st.hostActions.length>0?p("div",{className:"host-actions",children:[t.st.hostActions.map((r)=>s("button",{type:"button",className:"host-action","data-tip":r.title,onClick:()=>{if(l.url!=null)t.st.postResultAction(r.id,i,{url:l.url,filename:l.filename},o)},children:r.label},r.id)),s("button",{type:"button",className:"host-action danger","data-tip":"remove this result",onClick:()=>t.st.run.remove(i.promptId),children:"✕"})]}):null]},l.filename):p("div",{className:"noimg",children:[l.filename," (not saved locally — no preview)"]},l.filename)),i.images.length===0&&(i.texts??[]).length===0?s("div",{className:"noimg",children:"no outputs"}):null]}),(i.texts??[]).map((l,o)=>s(GS,{entry:l},`${i.promptId}-${o}`))]},i.promptId)),s(qS,{st:t.st,local:n})]})});function XS(e){return e.split(/[/\\]/).filter((t)=>t!=="")}function QS(e){return XS(e).slice(0,-1)}function ZS(e){let t=e[0];if(t==null)return[];let n=[];for(let a=0;a<t.length;a++){let i=t[a];if(i==null||!e.every((l)=>l[a]===i))break;n.push(i)}return n}function Sg(e){if(e.length===0)return[];let t=e.map((l)=>QS(l.file)),n=ZS(t),a=Math.max(0,n.length-1),i=new Map;for(let[l,o]of e.entries()){let r=(t[l]??[]).slice(a).join("/"),u=i.get(r);if(u==null)i.set(r,[o]);else u.push(o)}return[...i.entries()].map(([l,o])=>({folder:l,modules:[...o].sort((r,u)=>r.module.localeCompare(u.module))})).sort((l,o)=>l.folder.localeCompare(o.folder))}var _g=L(function(t){let n=Sg(t.st.modules);return p("div",{className:"sidebar",children:[p("div",{className:"side-head",children:[s("span",{children:"workflows"}),s("button",{type:"button","data-tip":"close — reopen it by clicking the workflow name",onClick:()=>t.st.toggleSidebar(),children:s(D,{name:"close"})})]}),n.map((a)=>p("div",{className:"side-group",children:[a.folder===""?null:p("div",{className:"side-folder",children:[a.folder,"/"]}),s("div",{className:"side-branch",children:a.modules.map((i)=>p("div",{children:[p("div",{className:"side-module",children:[s("span",{className:"name",children:i.module}),s("span",{className:"host",children:i.host})]}),i.drafts.map((l)=>{let o=t.st.form?.moduleKey===i.module&&t.st.form?.draft===l;return s("button",{type:"button",className:o?"side-draft sel":"side-draft",onClick:()=>void t.st.select({module:i.module,draft:l}),children:l},l)})]},i.module))})]},a.folder)),Object.keys(t.st.loadErrors).length>0?p("div",{className:"side-errors",children:[s("div",{children:"failed to load:"}),Object.entries(t.st.loadErrors).map(([a,i])=>p("div",{children:[s("div",{className:"file",children:a}),s("div",{className:"msg",children:i})]},a))]}):null]})});function xg(e,t){let n=t.trim();return e.find((a)=>a.text.trim()===n)?.label??null}function $S(e){let t=e.split(`
10
+ `).find((n)=>n.trim()!=="")??"";return t.length<=90?t:`${t.slice(0,89)}…`}var Vr=L(function(t){let n=t.v.desc.textPresets??[],[a,i]=ya(!1);if(n.length===0)return null;let l=typeof t.v.value==="string"?t.v.value:"",o=xg(n,l);return p("div",{className:"preset-box",onKeyDown:(r)=>r.key==="Escape"?i(!1):void 0,children:[p("button",{type:"button",className:"preset-btn","aria-expanded":a,"data-tip":"named starting texts — picking one replaces the field",onClick:()=>i(!a),children:[s(D,{name:"tag"})," presets ▾"]}),a?p(he,{children:[s("div",{className:"preset-backdrop",onClick:()=>i(!1)}),s("div",{className:"preset-menu",children:n.map((r)=>p("button",{type:"button",className:r.label===o?"preset-item on":"preset-item",onClick:()=>{t.v.set(r.text),i(!1)},children:[p("span",{className:"preset-name",children:[r.label===o?"• ":"  ",r.label]}),s("span",{className:"preset-peek",children:$S(r.text)})]},r.label))})]}):null]})});function Ul(e){let t={};if(typeof e==="object"&&e!==null&&!Array.isArray(e)){for(let[n,a]of Object.entries(e))if(typeof a==="string")t[n]=a}return t}function gi(e){return e==="openrouter"?"https://openrouter.ai/api/v1":"http://localhost:3000"}function Lr(e){return e.trim().replace(/\/+$/,"")}function JS(e){let t=Lr(e.baseUrl)===""?gi(e.provider):Lr(e.baseUrl);return e.provider==="openrouter"?`${t}/models`:`${t}/api/models`}function FS(e){let t=Lr(e.baseUrl)===""?gi(e.provider):Lr(e.baseUrl);return e.provider==="openrouter"?`${t}/chat/completions`:`${t}/api/chat/completions`}function vi(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)?e:{}}function an(e){return typeof e==="string"?e:""}function WS(e){let t=vi(e).data;if(!Array.isArray(t))return[];let n=[];for(let a of t){let i=vi(a),l=an(i.id);if(l==="")continue;let o=i.supported_parameters,r=Array.isArray(o)?o.includes("reasoning"):null;n.push({id:l,name:an(i.name)===""?l:an(i.name),reasoning:r})}return n.sort((a,i)=>a.id.localeCompare(i.id)),n}async function Eg(e,t){let n=await e.text().catch(()=>"");return Error(`llm ${t} failed: http ${e.status} ${n.slice(0,300)}`)}function wg(e,t){if(e instanceof Error&&e.name==="AbortError")return e;let n=e instanceof Error?e.message:String(e);return Error(`could not reach ${t} (${n}) — is it running, and does it allow this origin? open webui needs CORS_ALLOW_ORIGIN`)}async function Ng(e){let t=JS(e),n;try{n=await fetch(t,{headers:Og(e)})}catch(a){throw wg(a,t)}if(!n.ok)throw await Eg(n,"model list");return WS(await n.json())}function Og(e){return e.key.trim()===""?{}:{Authorization:`Bearer ${e.key.trim()}`}}function PS(e){let t=e.provider==="openrouter"&&e.effort!=="off"?{reasoning:{effort:e.effort}}:{};return{model:e.model,stream:!0,messages:[{role:"system",content:e.system},{role:"user",content:e.user}],...t}}function IS(e){let t=e.split(`
11
+ `),n=t.pop()??"",a=[];for(let i of t){let l=i.trim();if(l===""||l.startsWith(":"))continue;if(l.startsWith("data:"))a.push(l.slice(5).trim())}return{events:a,rest:n}}function e_(e){if(e===""||e==="[DONE]")return null;let t;try{t=JSON.parse(e)}catch{return null}let n=vi(t),a=vi(n.error);if(an(a.message)!=="")throw Error(`llm stream error: ${an(a.message)}`);let i=n.choices;if(!Array.isArray(i))return null;let l=vi(vi(i[0]).delta),o=an(l.content),r=an(l.reasoning)===""?an(l.reasoning_content):an(l.reasoning);if(o===""&&r==="")return null;return{content:o,reasoning:r}}class Ag{inside=!1;pending="";feed(e){let t=this.pending+e;this.pending="";let n="",a="";for(;;){let l=this.inside?"</think>":"<think>",o=t.indexOf(l);if(o===-1)break;let r=t.slice(0,o);if(this.inside)a+=r;else n+=r;t=t.slice(o+l.length),this.inside=!this.inside}let i=t_(t);if(i!==-1)this.pending=t.slice(i),t=t.slice(0,i);if(this.inside)a+=t;else n+=t;return{content:n,reasoning:a}}flush(){let e=this.pending;return this.pending="",this.inside?{content:"",reasoning:e}:{content:e,reasoning:""}}}function t_(e){let t=e.lastIndexOf("<");if(t===-1)return-1;let n=e.slice(t);return"<think>".startsWith(n)||"</think>".startsWith(n)?t:-1}async function Tg(e){if(e.endpoint.provider==="openrouter"&&e.endpoint.key.trim()==="")throw Error("no openrouter api key — paste one in the enhancer settings");if(e.model.trim()==="")throw Error("no model selected");let t=FS(e.endpoint),n;try{n=await fetch(t,{method:"POST",headers:{...Og(e.endpoint),"content-type":"application/json"},body:JSON.stringify(PS({...e,provider:e.endpoint.provider})),signal:e.signal})}catch(c){throw wg(c,t)}if(!n.ok)throw await Eg(n,"refine");let a=n.body?.getReader();if(a==null)throw Error("llm refine failed: the response carried no stream");let i=new TextDecoder,l=new Ag,o={content:"",reasoning:""},r=(c)=>{if(c.content===""&&c.reasoning==="")return;o.content+=c.content,o.reasoning+=c.reasoning,e.onDelta(c)},u="";for(;;){let c=await a.read();if(c.done)break;u+=i.decode(c.value,{stream:!0});let m=IS(u);u=m.rest;for(let y of m.events){let h=e_(y);if(h==null)continue;let g=l.feed(h.content);r({content:g.content,reasoning:g.reasoning+h.reasoning})}}if(r(l.flush()),o.content.trim()==="")throw Error("the model returned no prompt text — try another model");return o}var Rg="comfy-ts-serve-enhancer",n_={openrouter:"anthropic/claude-sonnet-5",openwebui:""},Mg=["openrouter","openwebui"];function Cg(e){return e==="openrouter"||e==="openwebui"}function kg(e){return e==="off"||e==="low"||e==="medium"||e==="high"}function Dg(e){let t=typeof e==="object"&&e!==null?e:{},n=Ul(t.modelByProvider),a=Ul(t.baseUrlByProvider);return{provider:Cg(t.provider)?t.provider:"openrouter",keyByProvider:Ul(t.keyByProvider),baseUrlByProvider:{openrouter:gi("openrouter"),openwebui:gi("openwebui"),...a},modelByProvider:{...n_,...n},effort:kg(t.effort)?t.effort:"medium",thinkingOnly:t.thinkingOnly!==!1,presetName:typeof t.presetName==="string"?t.presetName:"",presetByModule:Ul(t.presetByModule)}}function zg(e,t){if(!t.includes(e))return e;for(let n=2;n<1000;n++){let a=`${e} ${n}`;if(!t.includes(a))return a}return`${e} ${t.length+1}`}function a_(){try{return Dg(JSON.parse(localStorage.getItem(Rg)??"{}"))}catch{return Dg({})}}class Ic{provider;keyByProvider;baseUrlByProvider;modelByProvider;effort;thinkingOnly;presetName;presetByModule;presets=[];presetsState="idle";presetsError="";saveState="saved";saveError="";models=[];modelsState="idle";modelsError="";target=null;targetModule="";original="";result="";thinking="";phase="idle";error="";abort=null;disposer;lastSaved="";constructor(){let e=a_();this.provider=e.provider,this.keyByProvider=e.keyByProvider,this.baseUrlByProvider=e.baseUrlByProvider,this.modelByProvider=e.modelByProvider,this.effort=e.effort,this.thinkingOnly=e.thinkingOnly,this.presetName=e.presetName,this.presetByModule=e.presetByModule,nn(this,{abort:!1,disposer:!1,lastSaved:!1}),this.disposer=Cr(()=>{let t=this.preset;return t==null?null:JSON.stringify(t)},(t)=>{if(t==null||t===this.lastSaved)return;this.savePresetNow(JSON.parse(t))},{delay:600})}dispose(){this.disposer()}get apiKey(){return this.keyByProvider[this.provider]??""}get baseUrl(){return this.baseUrlByProvider[this.provider]??gi(this.provider)}get model(){return this.modelByProvider[this.provider]??""}get endpoint(){return{provider:this.provider,baseUrl:this.baseUrl,key:this.apiKey}}get visibleModels(){return this.thinkingOnly?this.models.filter((e)=>e.reasoning!==!1):this.models}get preset(){return this.presets.find((e)=>e.name===this.presetName)??this.presets[0]??null}get isOpen(){return this.target!=null}settingsJSON(){return{provider:this.provider,keyByProvider:this.keyByProvider,baseUrlByProvider:this.baseUrlByProvider,modelByProvider:this.modelByProvider,effort:this.effort,thinkingOnly:this.thinkingOnly,presetName:this.presetName,presetByModule:this.presetByModule}}persist(){try{localStorage.setItem(Rg,JSON.stringify(this.settingsJSON()))}catch{}}setProvider(e){if(!Cg(e))return;this.provider=e,this.models=[],this.modelsState="idle",this.modelsError="",this.persist()}setApiKey(e){this.keyByProvider[this.provider]=e.trim(),this.persist()}setBaseUrl(e){this.baseUrlByProvider[this.provider]=e.trim(),this.persist()}setModel(e){this.modelByProvider[this.provider]=e,this.persist()}setEffort(e){if(!kg(e))return;this.effort=e,this.persist()}toggleThinkingOnly(){this.thinkingOnly=!this.thinkingOnly,this.persist()}async loadPresets(){E(()=>{this.presetsState="loading",this.presetsError=""});try{let e=await fg();E(()=>{if(this.presets=e.enhancers,this.presetsState="idle",!this.presets.some((t)=>t.name===this.presetName))this.presetName=this.presets[0]?.name??"";this.lastSaved=JSON.stringify(this.preset)})}catch(e){E(()=>{this.presetsState="error",this.presetsError=e instanceof Error?e.message:String(e)})}}async savePresetNow(e){E(()=>{this.saveState="saving",this.lastSaved=JSON.stringify(e)});try{let t=await dg(e);E(()=>{this.presets=t.enhancers,this.saveState="saved",this.saveError=""})}catch(t){E(()=>{this.saveState="error",this.saveError=t instanceof Error?t.message:String(t)})}}selectPreset(e){if(!this.presets.some((t)=>t.name===e))return;if(this.presetName=e,this.lastSaved=JSON.stringify(this.preset),this.targetModule!=="")this.presetByModule[this.targetModule]=e;this.persist()}setPresetText(e){let t=this.preset;if(t==null)return;this.presets=this.presets.map((n)=>n.name===t.name?{...n,text:e}:n)}addPreset(e,t=""){if(e.trim()==="")return;let n=zg(e.trim(),this.presets.map((a)=>a.name));this.presets=[...this.presets,{name:n,text:t}],this.presetName=n,this.persist(),this.savePresetNow({name:n,text:t})}duplicatePreset(){let e=this.preset;if(e!=null)this.addPreset(`${e.name} copy`,e.text)}async renamePreset(e){let t=this.preset,n=zg(e.trim(),this.presets.filter((a)=>a.name!==t?.name).map((a)=>a.name));if(t==null||n===""||n===t.name)return;await this.savePresetNow({name:n,text:t.text}),E(()=>{this.presetName=n,this.persist()}),await this.removePresetFile(t.name)}async deletePreset(){let e=this.preset;if(e==null)return;await this.removePresetFile(e.name),E(()=>{for(let[t,n]of Object.entries(this.presetByModule))if(n===e.name)delete this.presetByModule[t];if(!this.presets.some((t)=>t.name===this.presetName))this.presetName=this.presets[0]?.name??"";this.persist()})}async removePresetFile(e){try{let t=await hg({name:e});E(()=>{this.presets=t.enhancers})}catch(t){E(()=>{this.saveState="error",this.saveError=t instanceof Error?t.message:String(t)})}}openFor(e){this.target=e.v,this.targetModule=e.module,this.original=typeof e.v.value==="string"?e.v.value:"",this.result="",this.thinking="",this.error="",this.phase="idle";let t=this.presetByModule[e.module];if(t!=null)this.presetName=t;if(this.presets.length===0)this.loadPresets()}close(){this.cancel(),this.target=null,this.targetModule=""}setResult(e){this.result=e}setOriginal(e){this.original=e}async loadModels(){E(()=>{this.modelsState="loading",this.modelsError=""});try{let e=await Ng(this.endpoint);E(()=>{this.models=e,this.modelsState="idle"})}catch(e){E(()=>{this.modelsState="error",this.modelsError=e instanceof Error?e.message:String(e)})}}cancel(){if(this.abort?.abort(),this.abort=null,this.phase==="running")this.phase=this.result===""?"idle":"done"}run(){this.runNow()}async runNow(){let e=this.preset;if(e==null||this.phase==="running")return;let t=new AbortController;this.abort=t,E(()=>{this.phase="running",this.error="",this.result="",this.thinking=""});try{await Tg({endpoint:this.endpoint,model:this.model,system:e.text,user:this.original,effort:this.effort,signal:t.signal,onDelta:(n)=>E(()=>{this.result+=n.content,this.thinking+=n.reasoning})}),E(()=>{this.phase="done"})}catch(n){let a=t.signal.aborted;E(()=>{if(this.phase=a?this.result===""?"idle":"done":"error",!a)this.error=n instanceof Error?n.message:String(n)})}finally{if(this.abort===t)this.abort=null}}apply(){let e=this.result.trim();if(this.target==null||e==="")return;this.target.set(e),this.close()}}var i_=["off","low","medium","high"],l_={openrouter:"openrouter (cloud)",openwebui:"open webui (local)"},o_=L(function(t){let n=t.e.visibleModels,a=t.e.provider==="openwebui";return p("div",{children:[s("div",{className:"section-title",children:"provider · keys stay in this browser"}),p("div",{className:"enh-row",children:[s("select",{value:t.e.provider,onChange:(i)=>t.e.setProvider(i.target.value),children:Mg.map((i)=>s("option",{value:i,children:l_[i]},i))}),a?s("input",{type:"text",placeholder:"http://localhost:3000",value:t.e.baseUrl,onChange:(i)=>t.e.setBaseUrl(i.target.value),style:{flex:1,minWidth:180}}):null,s("input",{type:"password",placeholder:a?"open webui api key (blank if none)":"sk-or-v1-… (localStorage only)",value:t.e.apiKey,onChange:(i)=>t.e.setApiKey(i.target.value),style:{flex:1,minWidth:160}}),s("button",{type:"button",onClick:()=>void t.e.loadModels(),disabled:t.e.modelsState==="loading",children:t.e.modelsState==="loading"?"loading…":"load models"})]}),p("div",{className:"enh-row",children:[n.length>0?p("select",{value:t.e.model,onChange:(i)=>t.e.setModel(i.target.value),style:{flex:1},children:[n.some((i)=>i.id===t.e.model)?null:p("option",{value:t.e.model,children:[t.e.model," (not in the list)"]}),n.map((i)=>s("option",{value:i.id,children:i.id},i.id))]}):s("input",{type:"text",placeholder:a?"model id, e.g. qwen3:8b":"model id, e.g. anthropic/claude-sonnet-5",value:t.e.model,onChange:(i)=>t.e.setModel(i.target.value),style:{flex:1}}),p("label",{className:"row-inline","data-tip":"hide models that report no reasoning support",children:[s("input",{type:"checkbox",checked:t.e.thinkingOnly,onChange:()=>t.e.toggleThinkingOnly()}),s("span",{className:"hint",children:"thinking only"})]}),a?null:p("label",{className:"row-inline","data-tip":"reasoning effort sent to the model",children:[s("span",{className:"hint",children:"effort"}),s("select",{value:t.e.effort,onChange:(i)=>t.e.setEffort(i.target.value),children:i_.map((i)=>s("option",{value:i,children:i},i))})]})]}),a?s("div",{className:"hint",children:"a local model's <think> block is routed to the thinking pane, never into your prompt"}):null,t.e.modelsError!==""?p("div",{className:"error",children:["\uD83D\uDD34 ",t.e.modelsError]}):null]})}),r_=L(function(t){let n=t.e.preset;if(n==null)return p("div",{children:[s("div",{className:"section-title",children:"master prompt"}),s("div",{className:"hint",children:t.e.presetsState==="loading"?"loading .comfy-ts/prompt-enhancers/…":"no master prompt yet"}),t.e.presetsError!==""?p("div",{className:"error",children:["\uD83D\uDD34 ",t.e.presetsError]}):null,s("button",{type:"button",onClick:()=>t.e.addPreset("refine-prompt"),children:"create one"})]});let a=()=>{let o=window.prompt("rename this master prompt (renames the file)",n.name);if(o!=null)t.e.renamePreset(o)},i=()=>{let o=window.prompt("name the new master prompt","refine-<model>-prompt");if(o!=null)t.e.addPreset(o)},l=()=>{if(window.confirm(`delete master prompt '${n.name}'? the .md file is removed.`))t.e.deletePreset()};return p("div",{children:[p("div",{className:"section-title",children:["master prompt · one per image model · .comfy-ts/prompt-enhancers/",n.name,".md"]}),p("div",{className:"enh-row",children:[s("select",{value:n.name,onChange:(o)=>t.e.selectPreset(o.target.value),style:{flex:1},children:t.e.presets.map((o)=>s("option",{value:o.name,children:o.name},o.name))}),s("button",{type:"button",onClick:i,children:"new"}),s("button",{type:"button",onClick:()=>t.e.duplicatePreset(),children:"duplicate"}),s("button",{type:"button",onClick:a,children:"rename"}),s("button",{type:"button",onClick:l,"data-tip":"delete this master prompt file",children:s(D,{name:"close"})}),p("span",{className:"hint",children:[t.e.saveState==="saving"?"saving…":null,t.e.saveState==="saved"?"autosaved to disk":null,t.e.saveState==="error"?`\uD83D\uDD34 save failed: ${t.e.saveError}`:null]})]}),s("textarea",{rows:8,value:n.text,onChange:(o)=>t.e.setPresetText(o.target.value)})]})}),s_=L(function(t){let n=t.e;be(()=>{let i=(l)=>{if(l.key==="Escape")n.close();if(l.key==="Enter"&&(l.metaKey||l.ctrlKey))l.preventDefault(),n.run()};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[n]);let a=n.phase==="running";return s("div",{className:"modal-overlay",onClick:()=>n.close(),children:p("div",{className:"modal",onClick:(i)=>i.stopPropagation(),children:[p("div",{className:"modal-head",children:[p("b",{style:{flex:1},children:[s(D,{name:"sparkle"})," enhance prompt"]}),s("button",{type:"button",onClick:()=>n.close(),children:s(D,{name:"close"})})]}),p("div",{className:"modal-body",children:[s(o_,{e:n}),s(r_,{e:n}),s("div",{className:"section-title",children:"prompt"}),p("div",{className:"enh-cols",children:[p("div",{children:[s("div",{className:"hint",children:"yours (edit before refining, the var is untouched)"}),s("textarea",{rows:8,value:n.original,onChange:(i)=>n.setOriginal(i.target.value)})]}),p("div",{children:[s("div",{className:"hint",children:a?"rewriting…":"rewritten (editable before apply)"}),s("textarea",{rows:8,value:n.result,placeholder:"hit enhance",onChange:(i)=>n.setResult(i.target.value)})]})]}),n.thinking!==""?p("div",{children:[s("div",{className:"section-title",children:"thinking"}),s("div",{className:"enh-think",children:n.thinking})]}):null,n.error!==""?p("div",{className:"error",children:["\uD83D\uDD34 ",n.error]}):null]}),p("div",{className:"modal-foot",children:[a?s("button",{type:"button",onClick:()=>n.cancel(),children:"stop"}):s("button",{type:"button",className:"primary",onClick:()=>n.run(),"data-tip":"⌘⏎ / ctrl+⏎",children:"enhance"}),s("button",{type:"button",onClick:()=>n.apply(),disabled:n.result.trim()==="",children:"apply to prompt"}),s("span",{className:"hint",style:{flex:1},children:a?`${n.result.length} chars streamed`:"nothing is written until you apply"}),s("button",{type:"button",className:"link",onClick:()=>n.close(),children:"cancel"})]})]})})}),Ug=L(function(t){let n=t.st.enhancer;return p(he,{children:[p("button",{type:"button",className:"link","data-tip":"rewrite this prompt with an llm",onClick:()=>n.openFor({v:t.v,module:t.module}),children:[s(D,{name:"sparkle"})," enhance"]}),n.target===t.v?s(s_,{e:n}):null]})});var Vg=L(function(t){let n=typeof t.v.value==="string"?t.v.value:"",a=Math.min(12,Math.max(4,n.split(`
12
+ `).length+1)),i=t.st.form?.loraKeywordsFor(t.v)??[];return p("div",{children:[i.length>0?s("div",{className:"kw-prefix","data-tip":"added in front of your prompt at run time, one per active lora",children:i.map((l)=>s("span",{className:"kw-chip",children:l},l))}):null,s("textarea",{rows:a,value:n,onChange:(l)=>t.v.set(l.target.value)}),p("div",{className:"row-inline",children:[s("span",{className:"hint",children:'// line = comment · "- " line = negative prompt'}),s(Vr,{v:t.v}),s(Ug,{v:t.v,st:t.st,module:t.module})]})]})}),Lg=L(function(t){let n=typeof t.v.value==="string"?t.v.value:"",a=t.v.desc.textPresets??[];if(t.v.desc.multiline===!0){let i=Math.min(12,Math.max(3,n.split(`
13
+ `).length+1));return p("div",{children:[s("textarea",{rows:i,value:n,onChange:(l)=>t.v.set(l.target.value)}),a.length>0?s("div",{className:"row-inline",children:s(Vr,{v:t.v})}):null]})}if(a.length===0)return s("input",{type:"text",value:n,onChange:(i)=>t.v.set(i.target.value)});return p("div",{className:"row-inline",children:[s("input",{type:"text",style:{flex:1},value:n,onChange:(i)=>t.v.set(i.target.value)}),s(Vr,{v:t.v})]})}),Bg=L(function(t){let n=t.v.desc.kind==="int",a=typeof t.v.value==="number"?t.v.value:0,i=t.v.desc.min,l=t.v.desc.max,o=(r)=>{let u=n?parseInt(r,10):parseFloat(r);if(Number.isFinite(u))t.v.set(u)};return p("div",{className:"row-inline",children:[s("input",{type:"number",value:a,step:n?1:"any",min:i,max:l,onChange:(r)=>o(r.target.value)}),i!=null&&l!=null?s("input",{type:"range",style:{flex:1,minWidth:120},value:a,min:i,max:l,step:n?1:(l-i)/200,onChange:(r)=>o(r.target.value)}):null,i!=null||l!=null?s("span",{className:"hint",children:`${i??"-∞"} … ${l??"∞"}`}):null]})}),Hg=L(function(t){return p("label",{className:"row-inline",style:{cursor:"pointer"},children:[s("input",{type:"checkbox",checked:t.v.value===!0,onChange:(n)=>t.v.set(n.target.checked)}),s("span",{className:"hint",children:t.v.value===!0?"on":"off"})]})}),jg=L(function(t){let n=t.v.desc.choices??[],a=typeof t.v.value==="string"?t.v.value:"";return p("select",{value:a,onChange:(i)=>t.v.set(i.target.value),children:[n.includes(a)?null:s("option",{value:a,disabled:!0,children:a===""?"(unset)":`${a} (not on this host)`}),n.map((i)=>s("option",{value:i,children:i},i))]})});var qg=L(function(t){let n=zt(null),a=typeof t.v.value==="string"?t.v.value:"",i=/^https?:\/\//.test(a)?a:t.v.uploadedUrl,l=t.v.desc.extensions??[],o=async(r)=>{if(r==null)return;try{let u=await pg({file:r});t.v.set(u.path),t.v.setUploadedUrl(u.url)}catch(u){alert(`upload failed: ${u instanceof Error?u.message:String(u)}`)}};return p("div",{children:[p("div",{className:"row-inline",children:[s("input",{type:"text",style:{flex:1},placeholder:"local path or http(s) url",value:a,onChange:(r)=>{t.v.set(r.target.value),t.v.setUploadedUrl(null)}}),s("button",{type:"button",onClick:()=>n.current?.click(),children:"upload…"}),a!==""?s("button",{type:"button","data-tip":"clear the image",onClick:()=>{t.v.set(""),t.v.setUploadedUrl(null)},children:s(D,{name:"close"})}):null,s("input",{ref:n,type:"file",accept:l.map((r)=>`.${r}`).join(","),style:{display:"none"},onChange:(r)=>{o(r.target.files?.[0]),r.target.value=""}})]}),i!=null&&i!==""?s("div",{className:"img-preview",children:s("img",{src:i,alt:a})}):null]})});function Ue(e,t){console.error(`\uD83D\uDD34 [comfy-ts serve] ${e}: ${t instanceof Error?t.message:String(t)}`)}function Gg(e){let t={};for(let n of e)if(n.kind!=="seed")t[n.name]=n.value;return t}function pa(e){if(typeof e==="number"&&Number.isFinite(e))return{mode:"=",value:e};if(e!=null&&typeof e==="object"){let t=e;return{mode:typeof t.mode==="string"?t.mode:"=",value:typeof t.value==="number"&&Number.isFinite(t.value)?t.value:0}}return{mode:"=",value:0}}function ef(e){if(e!=null&&typeof e==="object"){let t=e;if(typeof t.width==="number"&&typeof t.height==="number")return{width:t.width,height:t.height}}return{width:1024,height:1024}}function tf(e,t){if(e==null||typeof e!=="object"||Array.isArray(e))return{};let n=new Set(t),a={};for(let[i,l]of Object.entries(e))if(n.has(i)&&Br(l))a[i]=l;return a}function Yg(e,t){if(e.kind==="seed")return pa(t??e.default);if(e.kind==="size")return ef(t??e.default);if(e.kind==="loras")return tf(t??e.default,e.options??[]);return t??e.default}function Kg(){return Math.floor(Math.random()*4294967296)}function Br(e){return e!=null&&e!==!1}function Hr(e){if(typeof e==="number"&&Number.isFinite(e))return{model:e,clip:e};if(Array.isArray(e)&&typeof e[0]==="number"&&typeof e[1]==="number")return{model:e[0],clip:e[1]};return{model:1,clip:1}}function Xg(e,t,n,a){let i={...e};if(!n)i[t]=!1;else{let l=a??Hr(e[t]);i[t]=[l.model,l.clip]}return i}function Qg(e){let t=new Set(e.options),n=Object.keys(e.record).filter((i)=>t.has(i)&&(Br(e.record[i])||e.paused.has(i))),a=[...e.paused].filter((i)=>t.has(i)&&!n.includes(i));return[...n,...a].reverse()}function Zg(e){let t=[...e.displayed],[n]=t.splice(e.from,1);if(n==null)return e.record;t.splice(e.to,0,n);let a={};for(let i of[...t].reverse())if(i in e.record)a[i]=e.record[i];for(let[i,l]of Object.entries(e.record))if(!(i in a))a[i]=l;return a}function $g(e,t,n){return{...e,[t]:[n.model,n.clip]}}var nf="application/x-comfy-lora";function u_(e){if(e!=null&&typeof e==="object"&&!Array.isArray(e))return e;return{}}var Jg=L(function(t){let n=Vn(()=>({open:!1,filter:"",info:new Map,previewFailed:new Set,prevStrength:new Map,paused:new Set,setOpen(S){this.open=S},setFilter(S){this.filter=S},noteInfo(S,T){this.info.set(S,T)},notePreviewFailed(S){this.previewFailed.add(S)},notePrevStrength(S,T){this.prevStrength.set(S,T)},setPaused(S,T){if(T)this.paused.add(S);else this.paused.delete(S)},details:null,setDetails(S){this.details=S},split:new Map,isSplit(S,T){return this.split.get(S)??T},setSplit(S,T){this.split.set(S,T)}})),a=u_(t.v.value),i=t.v.desc.options??[],l=t.v.desc.optionLabels??{},o=(S)=>l[S]??S,r=(S)=>Br(a[S]),u=(S)=>r(S)||n.paused.has(S),c=Qg({record:a,options:i,paused:n.paused}),m=new Set(t.v.desc.managerOnlyOptions??[]),y="on disk and known to the lora manager, but ComfyUI has not scanned it: it refuses the prompt. only restarting ComfyUI makes it re-read the folder",h=(S)=>m.has(S)?s("span",{className:"lora-warn","data-tip":"on disk and known to the lora manager, but ComfyUI has not scanned it: it refuses the prompt. only restarting ComfyUI makes it re-read the folder",children:s(D,{name:"warn",size:0.9})}):null,g=c.filter((S)=>m.has(S)),x=t.st.showLoraImages,A=t.st.showLoraTitles,M=(S,T)=>{n.setPaused(S,!1);let Y={...a};if(T==null)delete Y[S];else Y[S]=T;t.v.set(Y)},d=(S,T)=>{if(!T)n.notePrevStrength(S,Hr(a[S]));n.setPaused(S,!T),t.v.set(Xg(a,S,T,T?n.prevStrength.get(S):void 0))},f=(S,T)=>{if(!r(S)){n.notePrevStrength(S,T);return}t.v.set($g(a,S,T))},v=(S)=>{let T=r(S)?Hr(a[S]):n.prevStrength.get(S)??{model:1,clip:1},Y=n.isSplit(S,T.model!==T.clip),bt=(yi,bi)=>{if(!Number.isFinite(bi))return;let ma=Math.round(bi*100)/100;if(yi==="both")return f(S,{model:ma,clip:ma});f(S,yi==="model"?{model:ma,clip:T.clip}:{model:T.model,clip:ma})},Ln=(yi,bi,ma,Sy)=>p("div",{className:"st-line",children:[s("button",{type:"button",className:"st-label","data-tip":Sy,onClick:()=>n.setSplit(S,!Y),children:ma}),s("input",{type:"range",min:-1,max:2,step:0.05,value:bi,onChange:(Kr)=>bt(yi,parseFloat(Kr.target.value))}),s("input",{type:"number",step:0.05,value:bi,onChange:(Kr)=>bt(yi,parseFloat(Kr.target.value))})]});if(!Y)return Ln("both",T.model,"m+c","model and clip together — click to set them apart");return p(he,{children:[Ln("model",T.model,"m","model strength — click to tie them back together"),Ln("clip",T.clip,"c","clip strength — click to tie them back together")]})},b=n.open,w=t.host,k=c.join(`
14
+ `);be(()=>{if(!b)return;for(let S of k.split(`
15
+ `)){if(S===""||n.info.has(S))continue;n.noteInfo(S,"loading"),Wc({host:w,name:S}).then((T)=>n.noteInfo(S,T)).catch(()=>n.noteInfo(S,"error"))}},[b,k,w,n]),be(()=>{if(!b)return;let S=(T)=>{if(T.key==="Escape")n.setOpen(!1)};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[b,n]);let O=n.filter.toLowerCase(),R=(S)=>S.toLowerCase().includes(O)||o(S).toLowerCase().includes(O),U=i.filter(R),B=t.st.loraCap,ft=U.filter((S)=>!u(S)).slice(0,B),qr=(S)=>{let T=S.split(/[\\/]+/);return T.length<=1?"":T.slice(0,-1).join("/")},yy=(()=>{let S=new Map;for(let T of ft){let Y=qr(T),bt=S.get(Y);if(bt==null)S.set(Y,[T]);else bt.push(T)}return[...S.entries()].map(([T,Y])=>({folder:T,names:Y})).sort((T,Y)=>T.folder.localeCompare(Y.folder))})(),Gr=zt(null);be(()=>{if(!b)return;let S=Gr.current;if(S==null)return;S.focus(),S.select()},[b]);let by=()=>{let S=ft[0];if(S==null)return;M(S,[1,1]),Gr.current?.select()},Yr=(S)=>{if(!x)return null;return n.previewFailed.has(S)?s("div",{className:"lora-thumb none",children:"no preview"}):s("img",{className:t.st.loraFill?"lora-thumb fill":"lora-thumb",loading:"lazy",src:Pc({host:t.host,name:S}),alt:o(S),onError:()=>n.notePreviewFailed(S)},S)},pf=p(he,{children:[s("button",{type:"button",className:x?"mode sel":"mode","data-tip":x?"hide lora images":"show lora images",onClick:()=>t.st.toggleLoraImages(),children:s(D,{name:"image"})}),s("button",{type:"button",className:A?"mode sel":"mode","data-tip":A?"hide lora titles":"show lora titles",onClick:()=>t.st.toggleLoraTitles(),children:s(D,{name:"tag"})}),x?s("button",{type:"button",className:t.st.loraFill?"mode sel":"mode","data-tip":t.st.loraFill?"fit the whole preview inside the card":"fill the card with the preview",onClick:()=>t.st.toggleLoraFill(),children:s(D,{name:t.st.loraFill?"shrink":"expand"})}):null]});return p("div",{children:[p("div",{className:"lora-actions",children:[p("button",{type:"button",className:"field-height",onClick:()=>n.setOpen(!0),children:[s(D,{name:"plus"})," ",c.length===0?`add loras (${i.length})`:"add"]}),s("span",{className:"btn-group field-height",children:pf}),p("button",{type:"button",className:"field-height",disabled:t.st.loraSyncing,"data-tip":"re-download the lora metadata from the lora manager on this host (names, trigger words, previews)",onClick:()=>void t.st.refreshLoras(),children:[s(D,{name:"refresh"})," ",t.st.loraSyncing?"syncing…":"sync"]}),g.length>0?p("button",{type:"button",className:"field-height warn-action",disabled:t.st.hostWatch==="down","data-tip":`${g.length} lora(s) here are on disk but ComfyUI has not scanned them, so it refuses the prompt. Only a RESTART makes it re-read its models folder: refetching the schema just re-reads the same list. then hit refresh here and the var widens in place`,onClick:()=>void t.st.hostAction("restart"),children:[s(D,{name:"power"})," restart ComfyUI"]}):null,t.hostUrl==null?null:p("a",{className:"button-link field-height",href:`${t.hostUrl}/loras`,target:"_blank",rel:"noreferrer","data-tip":"open the lora manager of this host in a new tab",children:[s(D,{name:"external"})," manager"]}),c.length>0?p("span",{className:"hint",children:[c.length," in the palette · ",c.filter(r).length," on"]}):null,t.v.desc.optionsFilter==null?null:p("span",{className:"hint","data-tip":"this workflow declared v.loras(<regex>) — only matching loras are offered",children:["filter ",t.v.desc.optionsFilter]})]}),s("div",{className:"row-inline",children:!x&&!A?p("span",{className:"hint",children:[c.length," lora",c.length===1?"":"s"," in the palette"]}):c.map((S,T)=>p("span",{className:`${x?"lora-chip card":"lora-chip"}${r(S)?"":" off"}`,draggable:!0,onMouseDown:(Y)=>{let bt=Y.target;Y.currentTarget.draggable=bt.closest("input, label, button, select, a")==null},onMouseUp:(Y)=>{Y.currentTarget.draggable=!0},onDragStart:(Y)=>{Y.dataTransfer.effectAllowed="move",Y.dataTransfer.setData(nf,String(T))},onDragOver:(Y)=>{if(Y.dataTransfer.types.includes(nf))Y.preventDefault()},onDrop:(Y)=>{let bt=Y.dataTransfer.getData(nf);if(bt==="")return;Y.preventDefault();let Ln=Number(bt);if(Number.isInteger(Ln)&&Ln!==T)t.v.set(Zg({record:a,displayed:c,from:Ln,to:T}))},children:[p("span",{className:"chip-media",children:[s("button",{type:"button",className:"lora-toggle","data-tip":`${S}
16
+ click for its details`,onClick:()=>n.setDetails(S),children:Yr(S)}),s("button",{type:"button",className:"chip-remove","data-tip":"remove from the palette (the popup adds it back)",onClick:()=>M(S,null),children:s(D,{name:"close",size:1.05})})]}),p("span",{className:"chip-head",children:[p("label",{className:"switch","data-tip":r(S)?"pause this lora":"resume this lora",children:[s("input",{type:"checkbox",checked:r(S),onChange:(Y)=>d(S,Y.target.checked)}),s("span",{className:"track"})]}),A?s("button",{type:"button",className:"chip-title as-text","data-tip":`${S}
17
+ click for its details`,onClick:()=>n.setDetails(S),children:o(S)}):null,h(S)]}),s("span",{className:"chip-controls",children:v(S)})]},S))}),n.details==null?null:s(c_,{name:n.details,host:t.host,hostUrl:t.hostUrl,label:o(n.details),showImage:x,keyword:(t.v.desc.optionKeywords??{})[n.details]??null,managerOnly:m.has(n.details),onClose:()=>n.setDetails(null)}),n.open?s("div",{className:"modal-overlay",onClick:()=>n.setOpen(!1),children:p("div",{className:"modal",onClick:(S)=>S.stopPropagation(),children:[p("div",{className:"modal-head",children:[s("input",{ref:Gr,type:"text",placeholder:`search ${i.length} loras${t.v.desc.optionsFilter==null?"":` matching ${t.v.desc.optionsFilter}`} — enter adds the first`,value:n.filter,onChange:(S)=>n.setFilter(S.target.value),onKeyDown:(S)=>{if(S.key!=="Enter")return;S.preventDefault(),by()}}),pf,s("button",{type:"button","data-tip":"close (esc)",onClick:()=>n.setOpen(!1),children:s(D,{name:"close"})})]}),p("div",{className:"modal-body",children:[c.length>0?p("div",{children:[p("div",{className:"section-title",children:["your palette (",c.length,")"]}),c.filter(R).map((S)=>{let T=n.info.get(S);return p("div",{className:r(S)?"lora-active-row":"lora-active-row off",children:[Yr(S),p("div",{className:"lora-active-text",children:[s("div",{className:"lora-label","data-tip":S,children:A?o(S):"···"}),typeof T==="object"&&T.triggerWords.length>0?s("div",{className:"hint",children:T.triggerWords.join(", ")}):s("div",{className:"hint",children:S})]}),s("input",{type:"checkbox",checked:r(S),"data-tip":r(S)?"pause (stays in the palette)":"resume",onChange:(Y)=>d(S,Y.target.checked)}),v(S),s("button",{type:"button",className:"chip-remove","data-tip":"remove from the list",onClick:()=>M(S,null),children:s(D,{name:"close",size:0.9})})]},S)})]}):null,s("div",{className:"section-title",children:"all loras — tap to add to the palette"}),yy.map((S)=>p("div",{children:[p("div",{className:"section-title",children:[S.folder===""?"loose (no folder)":`${S.folder}/`," · ",S.names.length]}),s("div",{className:"lora-grid",children:S.names.map((T)=>p("button",{type:"button",className:"lora-card","data-tip":T,onClick:()=>M(T,[1,1]),children:[Yr(T),p("div",{className:"lora-label",children:[A?o(T):T.slice(0,2)+"···",h(T)]})]},T))})]},S.folder)),U.length-c.filter(R).length>B?p("div",{className:"loras-more",children:["… ",U.length-c.filter(R).length-B," more — refine the filter, or draw",s("input",{type:"number",min:1,max:2000,value:B,"data-tip":"how many cards this popup draws — each one is an image request, so the right number depends on your collection and your box. Kept in this browser",onChange:(S)=>{let T=parseInt(S.target.value,10);if(Number.isFinite(T))t.st.setLoraCap(T)}}),"at once"]}):null,U.length===0?p("div",{className:"loras-more",children:["no lora matches '",n.filter,"'"]}):null]})]})}):null]})}),c_=L(function(t){let n=Vn(()=>({info:"loading",about:null,aboutError:null,set(r){this.info=r},setAbout(r){this.about=r,this.aboutError=null},setAboutError(r){this.about=null,this.aboutError=r}})),{name:a,host:i}=t;be(()=>{let r=!0;return n.set("loading"),n.setAbout(null),Wc({host:i,name:a}).then((u)=>{if(r)n.set(u)}).catch((u)=>{if(r)n.set("error");Ue(`lora info for ${a}`,u)}),ag({host:i,name:a}).then((u)=>{if(r)n.setAbout(u)}).catch((u)=>{if(r)n.setAboutError(u instanceof Error?u.message:String(u));Ue(`lora details for ${a}`,u)}),()=>{r=!1}},[i,a,n]),be(()=>{let r=(u)=>{if(u.key==="Escape")t.onClose()};return window.addEventListener("keydown",r),()=>window.removeEventListener("keydown",r)},[t]);let l=n.info,o=(r,u)=>u==null||u===""?null:p("div",{className:"detail-row",children:[s("span",{className:"detail-key",children:r}),s("span",{className:"detail-val",children:u})]});return s("div",{className:"modal-overlay",onClick:()=>t.onClose(),children:p("div",{className:"modal",onClick:(r)=>r.stopPropagation(),children:[p("div",{className:"modal-head",children:[s("b",{style:{flex:1},children:t.label}),s("button",{type:"button","data-tip":"close (esc)",onClick:()=>t.onClose(),children:s(D,{name:"close"})})]}),p("div",{className:"modal-body",children:[l==="loading"?s("div",{className:"hint",children:"reading the mirror…"}):null,l==="error"?s("div",{className:"error",children:"\uD83D\uDD34 could not read this lora's metadata"}):null,typeof l==="object"?p("div",{className:"lora-details",children:[t.showImage?s("img",{className:"detail-thumb",src:Pc({host:i,name:a}),alt:t.label}):null,p("div",{className:"detail-list",children:[l.known===!1?s("div",{className:"hint",children:"not in the lora manager mirror — run sync, or this file is unknown to it"}):null,t.managerOnly?s("div",{className:"hint",children:"⚠ only the lora manager lists it, not comfy"}):null,o("file",a),o("base model",l.baseModel),o("folder",l.folder),o("trigger words",l.triggerWords.join(", ")),o("prompt keyword",t.keyword),o("tags",(l.tags??[]).join(", ")),o("notes",l.notes),o("size",l.fileSize==null?null:`${(l.fileSize/1e9).toFixed(2)} GB`),o("path",l.filePath),n.about?.description==null?null:s("div",{className:"detail-desc",children:n.about.description}),o("civitai",l.civitaiUrl==null?null:p("a",{href:l.civitaiUrl,target:"_blank",rel:"noreferrer",children:[l.civitaiVersion??"model page"," ↗"]})),n.about!=null&&n.about.examples.length>0?p("div",{children:[p("div",{className:"section-title",children:["examples (",n.about.examples.length,")"]}),s("div",{className:"detail-examples",children:n.about.examples.slice(0,8).map((r)=>s("img",{src:r,alt:"",loading:"lazy"},r))})]}):null,n.about?.examplesReason==null?null:p("div",{className:"hint",children:["no example images: ",n.about.examplesReason]}),n.aboutError==null?null:p("div",{className:"error",children:["\uD83D\uDD34 the lora manager did not answer: ",n.aboutError]}),t.hostUrl==null?null:p("a",{className:"button-link",href:`${t.hostUrl}/loras`,target:"_blank",rel:"noreferrer",children:[s(D,{name:"external"})," open in the lora manager"]})]})]}):null]})]})})});var af=[{mode:"=",hint:"fixed: this exact seed, every run"},{mode:"+",hint:"increments after each run"},{mode:"?",hint:"a fresh random seed each run"}];function f_(e){if(af.some((t)=>t.mode===e))return af;return[...af,{mode:e,hint:e==="-"?"decrements after each run":`mode '${e}'`}]}var Fg=L(function(t){let n=pa(t.v.value),a=(i)=>{if(Number.isFinite(i))t.v.set({mode:n.mode,value:Math.max(0,Math.floor(i))})};return s("div",{children:p("div",{className:"row-inline",children:[s("span",{className:"btn-group field-height",children:f_(n.mode).map((i)=>s("button",{type:"button",className:n.mode===i.mode?"sel":"","data-tip":i.hint,onClick:()=>t.v.set({mode:i.mode,value:n.value}),children:i.mode},i.mode))}),s("input",{type:"number",min:0,value:n.value,onChange:(i)=>a(parseInt(i.target.value,10))}),s("button",{type:"button",className:"field-height","data-tip":"roll a random seed now",onClick:()=>a(Kg()),children:s(D,{name:"dice"})})]})})});var Wg=L(function(t){let n=ef(t.v.value),a=t.v.desc.presets??[],i=a.find((o)=>o.width===n.width&&o.height===n.height),l=(o)=>{let r=o.width??n.width,u=o.height??n.height;if(Number.isFinite(r)&&Number.isFinite(u)&&r>0&&u>0)t.v.set({width:Math.floor(r),height:Math.floor(u)})};return p("div",{className:"row-inline",children:[p("select",{value:i?.label??"__custom__",onChange:(o)=>{let r=a.find((u)=>u.label===o.target.value);if(r!=null)t.v.set({width:r.width,height:r.height})},children:[i==null?s("option",{value:"__custom__",children:"custom"}):null,a.map((o)=>p("option",{value:o.label,children:[o.label," (",o.width,"×",o.height,")"]},o.label))]}),s("input",{type:"number",min:1,value:n.width,onChange:(o)=>l({width:Number(o.target.value)})}),"×",s("input",{type:"number",min:1,value:n.height,onChange:(o)=>l({height:Number(o.target.value)})}),s("button",{type:"button","data-tip":"swap width and height",onClick:()=>t.v.set({width:n.height,height:n.width}),children:s(D,{name:"swap"})})]})});class Pg{name;desc;initial;value;dirty=!1;uploadedUrl=null;constructor(e,t,n){this.name=e;this.desc=t;this.initial=n;this.value=n,nn(this,{value:di,name:!1,desc:!1})}set(e){this.value=e,this.dirty=!0}setFromRun(e){this.value=e,this.initial=e,this.dirty=!1}setUploadedUrl(e){this.uploadedUrl=e}revert(){this.value=this.initial,this.dirty=!1,this.uploadedUrl=null}snapshot(){return{name:this.name,value:this.value}}}class lf{moduleKey;draft;vars;host;saveState="saved";saveError=null;disposers=[];saveChain=Promise.resolve(!0);lastSaved;lastQueued;queueSeq=0;onSettled=null;constructor(e,t,n,a){this.moduleKey=e;this.draft=t;this.host=n.host,this.vars=Object.entries(n.vars).map(([i,l])=>new Pg(i,l,Yg(l,a[i]))),this.lastSaved=JSON.stringify(Object.fromEntries(this.vars.map((i)=>[i.name,a[i.name]]))),this.lastQueued=this.lastSaved,nn(this,{vars:!1,moduleKey:!1,draft:!1,host:!1,disposers:!1,saveChain:!1,lastSaved:!1,lastQueued:!1,queueSeq:!1,onSettled:!1}),this.disposers.push(Cr(()=>JSON.stringify(this.valuesJSON()),()=>{this.save(),this.onSettled?.()},{delay:500}))}dispose(e={}){for(let t of this.disposers)t();if(this.disposers=[],e.flush===!1)return;if(JSON.stringify(this.valuesJSON())!==this.lastQueued)this.save()}flushKeepalive(){let e=JSON.stringify(this.valuesJSON());if(e===this.lastQueued)return;this.lastQueued=e,kl({module:this.moduleKey,draft:this.draft,values:JSON.parse(e)},{keepalive:!0}).then(()=>E(()=>{this.lastSaved=e,this.lastQueued=e,this.saveState="saved"}),(t)=>E(()=>{if(this.lastQueued===e)this.lastQueued=this.lastSaved;this.saveState="error",this.saveError=t instanceof Error?t.message:String(t)}))}valuesJSON(){return Object.fromEntries(this.vars.map((e)=>[e.name,e.value]))}queuePayload(){return Gg(this.vars.map((e)=>({name:e.name,kind:e.desc.kind,value:e.value})))}loraKeywordsFor(e){let t=e.desc.keywordsFrom;if(t==null)return[];let n=this.vars.find((o)=>o.name===t);if(n==null)return[];let a=n.desc.optionKeywords??{},i=n.value!=null&&typeof n.value==="object"?n.value:{},l=[];for(let o of n.desc.options??[]){let r=i[o];if(r==null||r===!1)continue;let u=a[o];if(u!=null&&u!==""&&!l.includes(u))l.push(u)}return l}get dirtyCount(){return this.vars.filter((e)=>e.dirty).length}save(){let e=JSON.stringify(this.valuesJSON());if(e===this.lastQueued)return this.lastSaved===e?Promise.resolve(!0):this.saveChain;this.lastQueued=e;let t=++this.queueSeq;return E(()=>{this.saveState="saving"}),this.saveChain=this.saveChain.then(async()=>{try{return await kl({module:this.moduleKey,draft:this.draft,values:JSON.parse(e)}),E(()=>{this.lastSaved=e,this.saveState="saved",this.saveError=null}),!0}catch(n){return E(()=>{if(this.queueSeq===t)this.lastQueued=this.lastSaved;this.saveChain=Promise.resolve(!0),this.saveState="error",this.saveError=n instanceof Error?n.message:String(n)}),!1}}),this.saveChain}revertAll(){for(let e of this.vars)e.revert()}}function Ig(e){try{let t=new URLSearchParams(e.startsWith("?")?e.slice(1):e),n=t.get("workflow"),a=t.get("draft");return{module:n===""?null:n,draft:a===""?null:a}}catch{return{module:null,draft:null}}}function ey(e){let t=new URLSearchParams(e.search.startsWith("?")?e.search.slice(1):e.search);t.set("workflow",e.module),t.set("draft",e.draft);let n=t.toString();return n===""?"":`?${n}`}function ty(e){let t=(l)=>l==null?null:e.modules.find((o)=>o.module===l)??null,n=t(e.url.module)??t(e.stored.module)??e.modules[0];if(n==null)return null;let a=e.url.module!=null&&e.url.module===n.module?e.url.draft:e.stored.draft,i=a!=null&&n.drafts.includes(a)?a:"default";return{module:n.module,draft:i}}function d_(e){return new Promise((t)=>setTimeout(t,e))}class of{queue=[];error=null;results=[];progressPercent=null;progressNode=null;progressCount=null;progressText=null;hasPreview=!1;previewTick=0;draining=!1;nextId=0;pollGen=0;onSeeds=null;constructor(){nn(this,{queue:Rl,results:Rl})}get isRunning(){return this.queue.some((e)=>e.sent)}get runningModule(){return this.queue.find((e)=>e.sent)?.module??null}get pendingCount(){return this.queue.filter((e)=>!e.sent).length}enqueue(e){if(this.queue=[...this.queue,{id:`q${this.nextId++}`,...e,sent:!1}],this.error=null,!this.draining)this.drain()}removeQueued(e){this.queue=this.queue.filter((t)=>t.id!==e||t.sent)}clearQueue(){this.queue=this.queue.filter((e)=>e.sent)}remove(e){this.results=this.results.filter((t)=>t.promptId!==e)}clear(){this.results=[]}async drain(){if(this.draining)return;this.draining=!0;try{while(!0){let e=this.queue.find((n)=>!n.sent);if(e==null)return;E(()=>{this.queue=this.queue.map((n)=>n.id===e.id?{...n,sent:!0}:n),this.progressPercent=null,this.progressNode=null,this.progressCount=null,this.progressText=null,this.hasPreview=!1});let t=++this.pollGen;this.poll(e.module,t);try{let n=await tg(e);E(()=>{this.results=[{...n,at:new Date().toLocaleTimeString()},...this.results].slice(0,20)}),this.onSeeds?.({module:e.module,draft:e.draft,seeds:n.seeds})}catch(n){E(()=>{this.error=n instanceof Error?n.message:String(n),this.queue=this.queue.filter((a)=>a.sent&&a.id!==e.id)})}finally{this.pollGen++,E(()=>{this.queue=this.queue.filter((n)=>n.id!==e.id),this.progressPercent=null,this.progressNode=null,this.progressCount=null,this.progressText=null,this.hasPreview=!1})}}}finally{this.draining=!1}}async poll(e,t){while(t===this.pollGen){if(await d_(700),t!==this.pollGen)return;try{let n=await ng({module:e});E(()=>{if(t!==this.pollGen)return;this.progressPercent=n.percent,this.progressNode=n.node??null,this.progressCount=n.nodeProgress??null,this.progressText=n.progressText??null,this.hasPreview=n.hasPreview,this.previewTick=n.previewSeq??0})}catch{}}}}function rf(e){return e!=null&&typeof e==="object"}function jr(e){return rf(e)&&!Array.isArray(e)}function ny(e){if(!rf(e))return null;switch(e.comfyTs){case"set-prompt":return typeof e.text==="string"?{comfyTs:"set-prompt",text:e.text}:null;case"host-actions":{if(!Array.isArray(e.actions))return null;let t=[];for(let n of e.actions){if(!rf(n)||typeof n.id!=="string"||n.id===""||typeof n.label!=="string")continue;if(n.label===""||t.some((a)=>a.id===n.id))continue;t.push({id:n.id,label:n.label,...typeof n.title==="string"?{title:n.title}:{}})}return{comfyTs:"host-actions",actions:t}}case"set-selection":return typeof e.module==="string"&&e.module!==""&&typeof e.draft==="string"?{comfyTs:"set-selection",module:e.module,draft:e.draft}:null;case"set-values":return jr(e.values)?{comfyTs:"set-values",values:e.values}:null;case"get-state":return{comfyTs:"get-state"};default:return null}}function ay(e){let t=e.modules.find((n)=>n.module===e.want.module);if(t==null)return null;return{module:t.module,draft:t.drafts.includes(e.want.draft)?e.want.draft:"default"}}var ct={ok:!1},h_=["=","+","-","?"];function Tt(e){return typeof e==="number"&&Number.isFinite(e)}function p_(e){if(typeof e==="boolean"||Tt(e))return!0;return Array.isArray(e)&&e.length===2&&Tt(e[0])&&Tt(e[1])}function sf(e,t,n){switch(e.kind){case"prompt":case"text":case"image":return typeof t==="string"?{ok:!0,value:t}:ct;case"int":return Tt(t)?{ok:!0,value:Math.trunc(t)}:ct;case"float":return Tt(t)?{ok:!0,value:t}:ct;case"toggle":return typeof t==="boolean"?{ok:!0,value:t}:ct;case"choice":return typeof t==="string"&&(e.choices??[]).includes(t)?{ok:!0,value:t}:ct;case"seed":{let a=pa(n);if(Tt(t))return{ok:!0,value:{mode:a.mode,value:Math.max(0,Math.floor(t))}};if(!jr(t))return ct;if(t.mode!==void 0&&!(typeof t.mode==="string"&&h_.includes(t.mode)))return ct;if(t.value!==void 0&&!Tt(t.value))return ct;return{ok:!0,value:{mode:typeof t.mode==="string"?t.mode:a.mode,value:Tt(t.value)?Math.max(0,Math.floor(t.value)):a.value}}}case"size":{let a=null,i=null;if(typeof t==="string"){let l=/^\s*(\d+)\s*x\s*(\d+)\s*$/i.exec(t);if(l!=null)a=Number(l[1]),i=Number(l[2])}else if(jr(t))a=t.width,i=t.height;if(!Tt(a)||!Tt(i)||a<1||i<1)return ct;return{ok:!0,value:{width:Math.floor(a),height:Math.floor(i)}}}case"loras":{if(!jr(t))return ct;for(let a of Object.values(t))if(!p_(a))return ct;return{ok:!0,value:tf(t,e.options??[])}}default:return ct}}function iy(e){return e.find((t)=>t.desc.kind==="prompt")??e.find((t)=>(t.desc.kind==="text"||t.desc.kind==="prompt")&&/prompt/i.test(t.name)&&!/neg/i.test(t.name))??null}function ly(e,t){if(t==null)return e.comfyTs==="ready"||e.comfyTs==="selection"||e.comfyTs==="error"&&e.code==="boot"?"*":null;return t==="null"?"*":t}function uf(e){try{let t=JSON.stringify(e,(n,a)=>typeof a==="bigint"?`${a}n`:a);if(typeof e==="bigint")return`${e}n`;return t??String(e)}catch{try{return String(e)}catch{return"[unprintable]"}}}function oy(e){try{let n=new URLSearchParams(e.startsWith("?")?e.slice(1):e).get("prompt");return n==null||n===""?null:n}catch{return null}}function cf(){try{return typeof window<"u"&&window.parent!==window}catch{return!1}}var uy="comfy-ts-serve-ui",m_="side",cy=[{id:"off",icon:"panel-off",title:"no preview: the form only"},{id:"bottom",icon:"panel-bottom",title:"results below the form"},{id:"left",icon:"panel-left",title:"results left of the form"},{id:"side",icon:"panel-side",title:"results right of the form"},{id:"pinned",icon:"panel-corner",title:"newest image in the bottom right corner, form scrolls under it"}];function v_(e){return e==="off"||e==="bottom"||e==="left"||e==="side"||e==="pinned"}var fy=200,g_=60;function ry(e){let t=typeof e==="number"&&Number.isFinite(e)?Math.floor(e):fy;return Math.min(2000,Math.max(1,t))}function y_(e){if(e==null||typeof e!=="object"||Array.isArray(e))return{};let t={};for(let[n,a]of Object.entries(e))if(Array.isArray(a))t[n]=a.filter((i)=>typeof i==="string");return t}function ff(){try{let e=JSON.parse(localStorage.getItem(uy)??"{}")??{};return{...e,varOrder:y_(e.varOrder)}}catch{return{}}}function sy(){return window.matchMedia("(max-width: 800px)").matches}class df{phase="loading";bootError="";modules=[];loadErrors={};form=null;formLoading=!1;formError=null;sidebarOpen;showLoraImages;showLoraTitles;loraFill;loraCap;run;enhancer;settings={saveToDisk:!0,hostOverride:{},savePrefix:{},effectivePrefix:{}};savingError=null;prefixEdits={};prefixTimers=new Map;get saveToDisk(){return this.settings.saveToDisk}layout;varOrder={};orderedVars(e,t){let n=this.varOrder[e];if(n==null)return[...t];let a=new Set(t),i=n.filter((l)=>a.has(l));return[...i,...t.filter((l)=>!i.includes(l))]}moveVar(e){let t=this.orderedVars(e.module,e.names),[n]=t.splice(e.from,1);if(n==null)return;t.splice(e.to,0,n),this.varOrder={...this.varOrder,[e.module]:t},this.persist()}hosts={hosts:[],defaults:{},overrides:{}};hostError=null;hostActions=[];hostOrigin=null;lastPostedState=null;switches=new Set;hostChain=Promise.resolve();constructor(){this.run=new of,this.run.onSeeds=(t)=>this.applyRunSeeds(t),this.enhancer=new Ic;let e=ff();if(this.layout=v_(e.layout)?e.layout:m_,this.sidebarOpen=e.sidebar??!1,this.showLoraImages=e.loraImages??!0,this.showLoraTitles=e.loraTitles??!0,this.loraFill=e.loraFill??!0,this.loraCap=ry(e.loraCapMigrated!==!0&&e.loraCap===g_?fy:e.loraCap),this.showLatent=e.latent??!0,this.varOrder=e.varOrder??{},this.showLogs=e.logs??!1,nn(this,{run:!1,enhancer:!1,form:di,modules:Rl,hostOrigin:!1,hostChain:!1,lastPostedState:!1,switches:!1}),cf())window.addEventListener("message",(t)=>this.onHostMessage(t));window.addEventListener("beforeunload",()=>this.form?.flushKeepalive()),document.addEventListener("visibilitychange",()=>{if(document.visibilityState==="hidden")this.form?.save()}),this.hostChain=this.boot().catch((t)=>Ue("panel boot failed",t))}toggleSidebar(){this.sidebarOpen=!this.sidebarOpen,this.persist()}toggleLoraImages(){this.showLoraImages=!this.showLoraImages,this.persist()}toggleLoraTitles(){this.showLoraTitles=!this.showLoraTitles,this.persist()}toggleLoraFill(){this.loraFill=!this.loraFill,this.persist()}setLoraCap(e){this.loraCap=ry(e),this.persist()}applyRunSeeds(e){let t=this.form;if(t==null||t.moduleKey!==e.module||t.draft!==e.draft)return;E(()=>{for(let n of t.vars){if(n.desc.kind!=="seed")continue;let a=e.seeds[n.name];if(typeof a!=="number"||!Number.isFinite(a))continue;let i=pa(n.value);if(i.value===a)continue;n.setFromRun({mode:i.mode,value:a})}}),this.mirrorState()}syncUrl(){let e=this.form;if(e==null)return;try{let t=ey({search:window.location.search,module:e.moduleKey,draft:e.draft});window.history.replaceState(null,"",`${window.location.pathname}${t}${window.location.hash}`)}catch(t){Ue("could not put the selection in the url",t)}}persist(){try{let e=ff();localStorage.setItem(uy,JSON.stringify({...e,...this.form!=null?{module:this.form.moduleKey,draft:this.form.draft}:{},sidebar:this.sidebarOpen,loraImages:this.showLoraImages,loraTitles:this.showLoraTitles,loraFill:this.loraFill,loraCap:this.loraCap,loraCapMigrated:!0,layout:this.layout,latent:this.showLatent,logs:this.showLogs,varOrder:this.varOrder}))}catch(e){Ue("ui state could not be stored (it will not survive a reload)",e)}}moduleByKey(e){return this.modules.find((t)=>t.module===e)??null}async boot(){try{let e=await Jc();E(()=>{this.modules=e.workflows,this.loadErrors=e.loadErrors??{},this.phase="ready"}),this.loadSettings(),this.loadHosts();let t=ff(),n=ty({url:Ig(window.location.search),stored:{module:t.module??null,draft:t.draft??null},modules:this.modules});if(n==null){this.postHost({comfyTs:"error",code:"boot",message:"no workflows are served"});return}if(await this.select(n),this.form==null){this.postHost({comfyTs:"error",code:"boot",message:`the opening draft could not be read: ${this.formError??"unknown error"}`});return}let a=oy(window.location.search);if(a!=null)this.setPromptText(a);this.postHost({comfyTs:"ready"})}catch(e){let t=e instanceof Error?e.message:String(e);E(()=>{this.phase="error",this.bootError=t}),this.postHost({comfyTs:"error",code:"boot",message:t})}}selectToken=0;select(e,t={}){return this.trackSwitch(this.selectNow(e,t.mirror??!0))}trackSwitch(e){this.switches.add(e);let t=()=>void this.switches.delete(e);return e.then(t,t),e}async switchSettled(){while(this.switches.size>0)await Promise.allSettled(this.switches)}async selectNow(e,t){let n=this.moduleByKey(e.module);if(n==null)return;if(this.form?.moduleKey===e.module&&this.form.draft===e.draft){E(()=>{if(sy())this.sidebarOpen=!1});return}let a=++this.selectToken;E(()=>{if(this.enhancer.close(),this.formLoading=!0,this.formError=null,sy())this.sidebarOpen=!1});let i=this.form;if(i!=null){if(i.dispose(),E(()=>{this.form=null}),!await i.save())E(()=>{this.formError=`the previous draft could not be saved: ${i.saveError??"unknown error"}`})}try{let l=await eg(e);if(a!==this.selectToken)return;let o=new lf(e.module,e.draft,n,l.values??{});if(o.onSettled=()=>this.mirrorState(),E(()=>{this.form=o,this.persist(),this.syncUrl()}),this.postHost({comfyTs:"selection",module:o.moduleKey,draft:o.draft}),t)this.mirrorState()}catch(l){E(()=>{if(a!==this.selectToken)return;this.form=null,this.formError=l instanceof Error?l.message:String(l)})}finally{E(()=>{if(a===this.selectToken)this.formLoading=!1})}}promptVar(){return iy(this.form?.vars??[])}setPromptText(e){let t=this.promptVar();if(t==null)return;let n=sf(t.desc,e,t.value);if(!n.ok){Ue("host set-prompt",`'${t.name}' (${t.desc.kind}) rejected the text`);return}E(()=>t.set(n.value))}postHost(e){if(!cf())return;let t=ly(e,this.hostOrigin);if(t==null)return;try{window.parent.postMessage(e,t)}catch(n){Ue("could not post to the host page",n)}}setValues(e){let t=this.form;if(t==null)return Object.keys(e);let n=[];return E(()=>{for(let[a,i]of Object.entries(e)){let l=t.vars.find((r)=>r.name===a);if(l==null){n.push(a),Ue("host set-values",`no var named '${a}' on ${t.moduleKey}`);continue}let o=sf(l.desc,i,l.value);if(o.ok)l.set(o.value);else n.push(a),Ue("host set-values",`'${a}' (${l.desc.kind}) rejected ${uf(i)}`)}}),n}stateOf(e){let t=e.valuesJSON();return{key:uf([e.moduleKey,e.draft,t]),values:t}}replyState(e,t,n){let{key:a,values:i}=this.stateOf(e);this.lastPostedState=a,this.postHost({comfyTs:"state",module:e.moduleKey,draft:e.draft,values:i,request:t,...n!=null?{rejected:n}:{}})}mirrorState(){let e=this.form;if(e==null||this.hostOrigin==null)return;let{key:t,values:n}=this.stateOf(e);if(t===this.lastPostedState)return;this.lastPostedState=t,this.postHost({comfyTs:"state",module:e.moduleKey,draft:e.draft,values:n})}replyError(e,t,n){this.postHost({comfyTs:"error",code:t,message:n,request:e})}onHostMessage(e){if(e.source!==window.parent)return;let t=ny(e.data);if(t==null)return;if(this.hostOrigin==null)this.hostOrigin=e.origin;else if(e.origin!==this.hostOrigin)return;this.hostChain=this.hostChain.then(()=>this.applyHostMessage(t)).catch((n)=>Ue(`host message '${t.comfyTs}' failed`,n))}async applyHostMessage(e){try{await this.applyHostMessageNow(e)}catch(t){if(e.comfyTs==="set-selection"||e.comfyTs==="set-values"||e.comfyTs==="get-state")this.replyError(e.comfyTs,"no-form",t instanceof Error?t.message:String(t));throw t}}async applyHostMessageNow(e){switch(e.comfyTs){case"host-actions":E(()=>{this.hostActions=e.actions});return;case"set-prompt":await this.switchSettled(),this.setPromptText(e.text);return;case"set-selection":{await this.switchSettled();let t=ay({want:e,modules:this.modules});if(t==null){this.replyError("set-selection","unknown-module",`no workflow named '${e.module}' is served`);return}let n=this.form;if(n==null||n.moduleKey!==t.module||n.draft!==t.draft)await this.select(t,{mirror:!1}),await this.switchSettled();let a=this.form;if(a==null){let i=this.formError??"the draft could not be read";this.replyError("set-selection","select-failed",i)}else if(a.moduleKey!==t.module||a.draft!==t.draft)this.replyError("set-selection","superseded",`the panel switched to ${a.moduleKey}/${a.draft} while ${t.module}/${t.draft} was loading`);else this.replyState(a,"set-selection");return}case"set-values":{await this.switchSettled();let t=this.form;if(t==null){this.replyError("set-values","no-form",this.noFormMessage());return}this.replyState(t,"set-values",this.setValues(e.values));return}case"get-state":{await this.switchSettled();let t=this.form;if(t==null)this.replyError("get-state","no-form",this.noFormMessage());else this.replyState(t,"get-state");return}}}noFormMessage(){return this.formError!=null?`no draft is open: ${this.formError}`:"no draft is open"}postResultAction(e,t,n,a){let i=this.promptVar();this.postHost({comfyTs:"result-action",id:e,promptId:t.promptId,ix:a,url:n.url,filename:n.filename,module:t.module,draft:t.draft,seeds:t.seeds,prompt:i!=null&&typeof i.value==="string"?i.value:null})}get generateInResults(){return this.layout==="side"||this.layout==="left"||this.layout==="pinned"}setLayout(e){this.layout=e,this.persist()}hostFor(e){return this.hosts.overrides[e]??this.hosts.defaults[e]??""}hostUrlFor(e){let t=this.hostFor(e);return this.hosts.hosts.find((n)=>n.id===t)?.httpUrl??null}isHostOverridden(e){return this.hosts.overrides[e]!=null}async loadHosts(){try{let e=await og();E(()=>{this.hosts=e})}catch(e){Ue("could not read the host list",e)}}showLogs=!1;logLines=[];logsError=null;hostNote=null;showLatent=!0;logsTimer=null;toggleLatent(){this.showLatent=!this.showLatent,this.persist()}toggleLogs(){if(this.showLogs=!this.showLogs,this.persist(),this.logsTimer!=null)clearInterval(this.logsTimer);if(this.logsTimer=null,!this.showLogs)return;this.pullLogs(),this.logsTimer=setInterval(()=>void this.pullLogs(),3000)}async pullLogs(){let e=this.form==null?null:this.hostFor(this.form.moduleKey);if(e==null||e==="")return;try{let t=await ug({host:e});E(()=>{this.logLines=t.lines,this.logsError=null})}catch(t){E(()=>{this.logsError=t instanceof Error?t.message:String(t)})}}loraSyncing=!1;async refreshLoras(){if(this.loraSyncing)return;E(()=>{this.loraSyncing=!0}),await this.hostAction("refresh-loras"),await this.trackSwitch(this.reloadIndexAndForm())}async reloadIndexAndForm(){try{let e=await Jc(),t=this.form;if(E(()=>{this.modules=e.workflows}),t!=null)t.dispose(),await t.save(),E(()=>{this.form=null}),await this.select({module:t.moduleKey,draft:t.draft})}catch(e){E(()=>{this.hostError=e instanceof Error?e.message:String(e)})}finally{E(()=>{this.loraSyncing=!1})}}hostWatch="idle";async watchHostComeBack(){let e=this.form==null?null:this.hostFor(this.form.moduleKey);if(e==null||e==="")return;E(()=>{this.hostWatch="down"});let t=Date.now()+120000;for(;;){if(await new Promise((a)=>setTimeout(a,2500)),Date.now()>t){E(()=>{this.hostWatch="idle",this.hostError=`${e} has not answered for 2 minutes — check the console`});return}if(!await rg({host:e}).then((a)=>a.up).catch(()=>!1))continue;E(()=>{this.hostWatch="back",this.hostNote=`${e} is back up`}),setTimeout(()=>E(()=>this.hostWatch="idle"),4000);return}}async hostAction(e){let t=this.form==null?null:this.hostFor(this.form.moduleKey);if(t==null||t==="")return;E(()=>{this.hostError=null,this.hostNote=null});try{let n=await sg({host:t,action:e});if(E(()=>{this.hostNote=n.note}),e==="restart")this.watchHostComeBack()}catch(n){E(()=>{this.hostError=n instanceof Error?n.message:String(n)})}}async setModuleHost(e){E(()=>{this.hostError=null});try{let t=await cg(e);E(()=>{this.hosts={...this.hosts,overrides:t.overrides}})}catch(t){E(()=>{this.hostError=t instanceof Error?t.message:String(t)})}}async loadSettings(){try{let e=await ig();E(()=>{this.settings=e})}catch(e){Ue("could not read the serve settings",e)}}savePrefixDraft(e){return this.prefixEdits[e]??this.settings.savePrefix[e]??""}setSavePrefix(e,t){this.prefixEdits[e]=t,this.savingError=null;let n=this.prefixTimers.get(e);if(n!=null)clearTimeout(n);this.prefixTimers.set(e,setTimeout(()=>{this.pushSettings({savePrefix:{[e]:t}})},500))}async pushSettings(e){try{let t=await lg(e);return E(()=>{this.settings=t,this.savingError=null}),!0}catch(t){return E(()=>{this.savingError=t instanceof Error?t.message:String(t)}),!1}}async toggleSaveToDisk(){let e=!this.saveToDisk,t=this.settings;if(E(()=>{this.settings={...this.settings,saveToDisk:e},this.savingError=null}),!await this.pushSettings({saveToDisk:e}))E(()=>{this.settings=t})}generate(){this.generateNow()}async generateNow(){let e=this.form;if(e==null)return;let t=e.queuePayload();if(!await e.save())return;this.run.enqueue({module:e.moduleKey,draft:e.draft,payload:t})}async renameDraft(e){let t=this.form,n=e.trim();if(t==null||n===""||n===t.draft)return;let a=t.draft;if(await this.duplicateDraft(n),this.form?.draft!==n)return;await Fc({module:t.moduleKey,draft:a}).then((i)=>E(()=>{this.modules=this.modules.map((l)=>l.module===t.moduleKey?{...l,drafts:i.drafts}:l)}),(i)=>E(()=>{this.formError=`renamed to '${n}', but the old draft '${a}' could not be removed: ${i instanceof Error?i.message:String(i)}`}))}deleteDraft(e){return this.trackSwitch(this.deleteDraftNow(e))}async deleteDraftNow(e){let t=this.form;if(t!=null&&t.moduleKey===e.module&&t.draft===e.draft)t.dispose({flush:!1}),E(()=>{this.form=null});try{let n=await Fc(e);E(()=>{this.modules=this.modules.map((i)=>i.module===e.module?{...i,drafts:n.drafts}:i)});let a=n.drafts.includes("default")?"default":n.drafts[0]??"default";await this.select({module:e.module,draft:a})}catch(n){E(()=>{this.formError=n instanceof Error?n.message:String(n)})}}async duplicateDraft(e){let t=this.form,n=e.trim();if(t==null||n==="")return;if(this.moduleByKey(t.moduleKey)?.drafts.includes(n)===!0&&!window.confirm(`draft '${n}' already exists — overwrite it?`))return;try{let i=await kl({module:t.moduleKey,draft:n,values:t.valuesJSON()});E(()=>{this.modules=this.modules.map((l)=>l.module===t.moduleKey?{...l,drafts:i.drafts}:l)}),await this.select({module:t.moduleKey,draft:n})}catch(i){E(()=>{this.formError=i instanceof Error?i.message:String(i)})}}}var b_=L(function(t){switch(t.v.desc.kind){case"prompt":return s(Vg,{v:t.v,st:t.st,module:t.module});case"text":return s(Lg,{v:t.v});case"int":case"float":return s(Bg,{v:t.v});case"seed":return s(Fg,{v:t.v});case"toggle":return s(Hg,{v:t.v});case"choice":return s(jg,{v:t.v});case"loras":return s(Jg,{v:t.v,host:t.st.hostFor(t.module),st:t.st,hostUrl:t.st.hostUrlFor(t.module)});case"size":return s(Wg,{v:t.v});case"image":return s(qg,{v:t.v});default:return p("div",{className:"hint",children:["unsupported var kind '",t.v.desc.kind,"' — use the json api"]})}}),S_=L(function(t){return p("div",{className:t.v.desc.kind==="loras"||t.v.desc.kind==="prompt"?"var-row wide":"var-row",onDragOver:(n)=>{if(n.dataTransfer.types.includes("application/x-comfy-var"))n.preventDefault()},onDrop:(n)=>{let a=n.dataTransfer.getData("application/x-comfy-var");if(a==="")return;n.preventDefault();let i=Number(a);if(Number.isInteger(i)&&i!==t.index)t.st.moveVar({module:t.module,names:t.names,from:i,to:t.index})},children:[p("div",{className:"var-label",draggable:!0,onDragStart:(n)=>{n.dataTransfer.effectAllowed="move",n.dataTransfer.setData("application/x-comfy-var",String(t.index))},children:[s("span",{"data-tip":`${t.v.desc.kind}
18
+ drag the label to reorder`,children:t.v.desc.label??t.v.name}),t.v.dirty?s("button",{type:"button",className:"dirty-dot","data-tip":"changed this session — click to restore the loaded value (autosaves)",onClick:()=>t.v.revert(),children:"●"}):null]}),s("div",{className:"var-control",children:s(b_,{v:t.v,host:t.host,st:t.st,module:t.module})})]})}),__=L(function(t){let n=Vn(()=>({mode:null,name:"",start(l,o){this.mode=l,this.name=l==="duplicate"?`${o} copy`:o},set(l){this.name=l},stop(){this.mode=null}})),a=t.st.moduleByKey(t.form.moduleKey)?.drafts??[t.form.draft],i=()=>{let l=n.name.trim(),o=n.mode;if(n.stop(),l===""||o==null)return;if(o==="duplicate")t.st.duplicateDraft(l);else t.st.renameDraft(l)};return p("div",{className:"head-box",children:[p("span",{className:"head-label",children:["draft",p("span",{className:t.form.saveState==="error"?"save-state error":"save-state",children:[t.form.saveState==="saving"?"· saving":null,t.form.saveState==="saved"?"· saved":null,t.form.saveState==="error"?"· NOT SAVED":null]})]}),n.mode!=null?s("input",{type:"text",autoFocus:!0,className:"head-input",value:n.name,placeholder:n.mode==="rename"?"new name, then enter":"new draft name, then enter",onFocus:(l)=>l.currentTarget.select(),onChange:(l)=>n.set(l.target.value),onKeyDown:(l)=>{if(l.key==="Enter")i();if(l.key==="Escape")n.stop()},onBlur:()=>n.stop()}):s("select",{className:"head-select draft",value:t.form.draft,"data-tip":"switch draft",onChange:(l)=>void t.st.select({module:t.form.moduleKey,draft:l.target.value}),children:a.map((l)=>s("option",{value:l,children:l},l))}),p("span",{className:"head-line",children:[p("span",{className:"btn-group head-group",children:[s("button",{type:"button","data-tip":"rename this draft (the file is renamed)",onClick:()=>n.mode!=null?i():n.start("rename",t.form.draft),children:s(D,{name:"pen"})}),s("button",{type:"button","data-tip":"save these values as a new draft",onClick:()=>n.mode!=null?i():n.start("duplicate",t.form.draft),children:s(D,{name:"copy-plus"})}),s("button",{type:"button",className:"danger","data-tip":"delete this draft's file (default resets to the workflow's own values)",onClick:()=>{if(window.confirm(`delete draft '${t.form.draft}' of ${t.form.moduleKey}? the file is removed.`))t.st.deleteDraft({module:t.form.moduleKey,draft:t.form.draft})},children:s(D,{name:"trash"})})]}),t.form.dirtyCount>0?s("button",{type:"button",className:"dirty head-right","data-tip":`${t.form.dirtyCount} var${t.form.dirtyCount>1?"s":""} changed this session — revert to the values this draft loaded with`,onClick:()=>t.form.revertAll(),children:s(D,{name:"broom"})}):null]})]})}),hf=L(function(t){let n=t.st.run;return p("span",{className:"run-line",children:[p("button",{type:"button",className:n.isRunning?"primary pulse":"primary","data-tip":"⌘⏎ / ctrl+⏎ — click again to queue another",onClick:()=>t.st.generate(),children:[s(D,{name:"play",size:0.85})," ",n.isRunning?n.progressPercent!=null?`generating… ${Math.round(n.progressPercent)}%`:"generating…":"generate",n.isRunning?null:s("span",{className:"kbd-hint",children:"⌘⏎"})]}),n.queue.length>0?p("span",{className:"run-chip","data-tip":"prompts waiting behind this one",children:["queue: ",n.queue.length,n.pendingCount>0?s("button",{type:"button",className:"link","data-tip":`drop the ${n.pendingCount} not yet sent to the host`,onClick:()=>n.clearQueue(),children:"clear"}):null]}):null,n.results.length>0?p("span",{className:"run-chip","data-tip":"runs kept in this page",children:[n.results.length," result",n.results.length===1?"":"s",s("button",{type:"button",className:"link","data-tip":"forget every run shown here",onClick:()=>n.clear(),children:"clear"})]}):null]})}),x_=L(function(t){let n=t.st.saveToDisk;return p("div",{className:"var-row",children:[s("div",{className:"var-label",children:s("span",{"data-tip":"save — where this workflow's images go",children:"output"})}),p("div",{className:"var-control",children:[p("div",{className:"row-inline",children:[p("label",{className:"row-inline",style:{cursor:"pointer"},children:[s("input",{type:"checkbox",checked:n,onChange:()=>void t.st.toggleSaveToDisk()}),p("span",{className:"hint",children:[s(D,{name:n?"save":"ghost",size:1})," ",n?"write to disk":"memory only"]})]}),n?p(he,{children:[s("span",{className:"hint",children:".comfy-ts/outputs/"}),s("input",{type:"text",style:{flex:1,minWidth:120},placeholder:t.module,value:t.st.savePrefixDraft(t.module),"data-tip":"subfolder the images land in — folder names only, a/b allowed",onChange:(a)=>t.st.setSavePrefix(t.module,a.target.value)}),s("span",{className:"hint",children:"/…png"})]}):s("span",{className:"hint",children:"kept in memory and shown here, lost when the server restarts"})]}),t.st.savingError!=null?p("div",{className:"error",children:["\uD83D\uDD34 ",t.st.savingError]}):null]})]})}),dy=L(function(t){let n=t.st.form;if(be(()=>{let l=(o)=>{if(t.st.enhancer.isOpen)return;if(o.key==="Enter"&&(o.metaKey||o.ctrlKey))o.preventDefault(),t.st.generate()};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[t.st]),n==null)return null;let a=t.st.orderedVars(n.moduleKey,n.vars.map((l)=>l.name)),i=a.map((l)=>n.vars.find((o)=>o.name===l)).filter((l)=>l!=null);return p("div",{children:[s("div",{className:"head-shell",children:p("div",{className:"head-boxes",children:[p("div",{className:"head-box",children:[s("span",{className:"head-label",children:"workflow"}),s("div",{className:"head-line",children:s("button",{type:"button",className:"head-value app as-link","data-tip":t.st.sidebarOpen?"close the workflow menu":"browse every workflow",onClick:()=>t.st.toggleSidebar(),children:n.moduleKey})}),p("div",{className:"head-line",children:[s("span",{className:"btn-group",children:s("button",{type:"button","data-tip":t.st.sidebarOpen?"close the workflow menu":"browse every workflow",onClick:()=>t.st.toggleSidebar(),children:s(D,{name:"folder"})})}),p("span",{className:"hint",children:[n.vars.length," vars"]})]})]}),s(__,{st:t.st,form:n}),p("div",{className:"head-box",children:[s("span",{className:"head-label",children:"host"}),s("div",{className:"head-line",children:t.st.hosts.hosts.length>1?s("select",{className:"head-select",value:t.st.hostFor(n.moduleKey),"data-tip":"run this workflow on another host",onChange:(l)=>void t.st.setModuleHost({module:n.moduleKey,host:l.target.value}),children:t.st.hosts.hosts.map((l)=>s("option",{value:l.id,children:l.id===(t.st.hosts.defaults[n.moduleKey]??"")?`${l.id} (its own)`:l.id},l.id))}):s("span",{className:"head-value host",children:t.st.hostFor(n.moduleKey)||n.host})}),p("div",{className:"head-line",children:[p("span",{className:"btn-group",children:[s("button",{type:"button","data-tip":"interrupt the prompt running now",onClick:()=>void t.st.hostAction("interrupt"),children:s(D,{name:"pause"})}),s("button",{type:"button","data-tip":"drop everything still pending in the host queue",onClick:()=>void t.st.hostAction("clear-queue"),children:s(D,{name:"trash"})}),s("button",{type:"button","data-tip":"refetch object_info from the host and rewrite sdk.d.ts (the var lists widen in place)",onClick:()=>void t.st.hostAction("refresh-schema"),children:s(D,{name:"refresh"})}),s("button",{type:"button",className:"danger","data-tip":"restart ComfyUI on that host (manager reboot) — it reconnects when back",onClick:()=>{if(window.confirm(`restart ComfyUI on '${t.st.hostFor(n.moduleKey)}'?`))t.st.hostAction("restart")},children:s(D,{name:"power"})})]}),t.st.isHostOverridden(n.moduleKey)?p("button",{type:"button",className:"link","data-tip":`runs on an override — back to ${t.st.hosts.defaults[n.moduleKey]??"its own host"}`,onClick:()=>void t.st.setModuleHost({module:n.moduleKey,host:null}),children:[s(D,{name:"swap"})," reset"]}):null]})]}),p("div",{className:"head-box",children:[s("span",{className:"head-label",children:"preview"}),s("div",{className:"head-line",children:s("span",{className:"btn-group",children:cy.map((l)=>s("button",{type:"button",className:t.st.layout===l.id?"sel":"","data-tip":l.title,onClick:()=>t.st.setLayout(l.id),children:s(D,{name:l.icon})},l.id))})}),s("div",{className:"head-line",children:p("span",{className:"btn-group",children:[s("button",{type:"button",className:t.st.showLatent?"sel":"","data-tip":t.st.showLatent?"hide the latent preview during a run":"show the latent preview",onClick:()=>t.st.toggleLatent(),children:s(D,{name:"image"})}),s("button",{type:"button",className:t.st.showLogs?"sel":"","data-tip":t.st.showLogs?"hide the ComfyUI console":"show the ComfyUI console",onClick:()=>t.st.toggleLogs(),children:s(D,{name:"terminal"})})]})})]})]})}),t.st.hostError!=null?p("div",{className:"error",children:["\uD83D\uDD34 ",t.st.hostError]}):null,t.st.hostWatch==="down"?s("div",{className:"host-note pulse",children:"restarting… waiting for the host to answer again"}):null,t.st.hostNote!=null&&t.st.hostWatch!=="down"?s("div",{className:"host-note",children:t.st.hostNote}):null,n.saveState==="error"?p("div",{className:"error",children:["\uD83D\uDD34 draft save failed: ",n.saveError]}):null,p("div",{className:"vars",children:[i.map((l,o)=>s(S_,{v:l,host:n.host,st:t.st,module:n.moduleKey,index:o,names:a},`${n.moduleKey}/${n.draft}/${l.name}`)),s(x_,{st:t.st,module:n.moduleKey})]}),t.st.generateInResults&&t.st.run.error==null?null:p("div",{className:"runbar",children:[t.st.generateInResults?null:s(hf,{st:t.st}),t.st.run.error!=null?p("span",{className:"error",children:["\uD83D\uDD34 ",t.st.run.error]}):null]})]})});function E_(){be(()=>{let e=(t)=>{if(t.key!=="a"&&t.key!=="A")return;if(!t.metaKey&&!t.ctrlKey)return;if(t.altKey)return;let n=document.activeElement;if(!(n instanceof HTMLInputElement?n.type==="text"||n.type==="search"||n.type==="password"||n.type==="url":n instanceof HTMLTextAreaElement))return;t.preventDefault(),n.select()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[])}var hy=L(function(t){if(E_(),t.st.phase==="loading")return s("div",{className:"center",children:"loading…"});if(t.st.phase==="error")return s("div",{className:"center",children:p("div",{className:"error",children:["\uD83D\uDD34 ",t.st.bootError]})});return s("div",{className:"app",children:p("div",{className:"cols",children:[t.st.sidebarOpen?s("div",{className:"backdrop",onClick:()=>t.st.toggleSidebar()}):null,t.st.sidebarOpen?s(_g,{st:t.st}):null,p("div",{className:"main",children:[t.st.formError!=null?p("div",{className:"center error",children:["\uD83D\uDD34 ",t.st.formError]}):null,t.st.formLoading&&t.st.form==null?s("div",{className:"center",children:"loading draft…"}):null,t.st.modules.length===0?s("div",{className:"center",children:"no workflow modules loaded"}):null,p("div",{className:`work layout-${t.st.layout}`,children:[p("div",{className:"form-col",children:[s(dy,{st:t.st}),t.st.showLogs?p("div",{className:"logs",children:[p("div",{className:"logs-head",children:[p("span",{children:["console · ",t.st.hostFor(t.st.form?.moduleKey??"")||"host"]}),s("button",{type:"button",className:"link",onClick:()=>t.st.toggleLogs(),children:"hide"})]}),t.st.logsError!=null?p("div",{className:"error",children:["\uD83D\uDD34 ",t.st.logsError]}):null,s("pre",{children:t.st.logLines.join(`
19
+ `)})]}):null]}),t.st.layout==="off"?null:p("div",{className:"results-col",children:[t.st.generateInResults?p("div",{className:"results-run",children:[s(hf,{st:t.st}),t.st.run.error!=null?p("span",{className:"error",children:["\uD83D\uDD34 ",t.st.run.error]}):null]}):null,s(bg,{st:t.st,compact:t.st.layout==="pinned"})]})]})]})]})})});var py=`
16
20
  :root {
17
21
  --bg: #101217;
18
22
  --panel: #171a21;
@@ -35,20 +39,21 @@ body {
35
39
  }
36
40
  #root { height: 100%; }
37
41
  .app { display: flex; flex-direction: column; height: 100%; }
38
- .topbar {
39
- display: flex; align-items: baseline; gap: 12px;
40
- padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--panel);
41
- }
42
- .topbar h1 { font-size: 15px; margin: 0; font-weight: 600; }
43
- .topbar .dim { color: var(--dim); font-size: 12px; }
44
- .burger { font-size: 16px; padding: 3px 10px; align-self: center; }
45
42
  .cols { display: flex; flex: 1; min-height: 0; position: relative; }
46
43
  .backdrop { display: none; }
47
44
 
48
45
  .sidebar {
49
46
  width: 240px; flex-shrink: 0; overflow-y: auto;
50
- border-right: 1px solid var(--border); background: var(--panel); padding: 8px 0;
47
+ border-right: 1px solid var(--border); background: var(--panel); padding: 6px 0;
48
+ }
49
+ /* the way OUT, from inside: the drawer opens from the workflow head box, which nothing
50
+ advertises, so a visible close is what teaches where it lives */
51
+ .side-head {
52
+ display: flex; align-items: center; justify-content: space-between; gap: 8px;
53
+ padding: 2px 8px 8px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border);
54
+ color: var(--dim); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
51
55
  }
56
+ .side-head button { padding: 2px 6px; }
52
57
  .side-module { padding: 6px 12px 2px; }
53
58
  .side-module .name { font-weight: 600; }
54
59
  .side-module .host { color: var(--dim); font-size: 11px; margin-left: 6px; }
@@ -62,25 +67,88 @@ body {
62
67
  .side-errors .file { color: var(--dim); word-break: break-all; }
63
68
  .side-errors .msg { color: var(--red); }
64
69
 
65
- .main { flex: 1; overflow-y: auto; padding: 16px 20px 60px; }
70
+ /* the ONE scrolling element. --main-pad-y is its own top+bottom padding, published so the
71
+ sticky results column can subtract exactly that: a column sized to the full VIEWPORT inside
72
+ a padded scrollport is always taller than the room it has, which is a scrollbar on a page
73
+ that fits. The bottom padding is small on purpose — everything that floats here (the run
74
+ bar, the pinned preview) is position:sticky, so it occupies flow space and needs no
75
+ clearance; the old 48px was left from a fixed bar and was pure phantom scroll height */
76
+ .main { --main-pad-y: 26px; flex: 1; min-height: 0; overflow-y: auto; padding: 12px 14px 14px; }
66
77
  .main h2 { font-size: 14px; margin: 0; color: var(--dim); font-weight: 500; }
67
78
  .main h2 b { color: var(--text); }
68
- .form-head { display: flex; gap: 12px; align-items: baseline; margin-bottom: 12px; flex-wrap: wrap; }
69
79
 
80
+ /* the TUI header on the web: one labelled box per thing you are editing, actions below */
81
+ /* the boxes measure the FORM COLUMN, not the window: a results panel on the side halves the
82
+ space they have while the viewport is unchanged, so a media query would answer the wrong
83
+ question. Three variants, and EVEN ones: flex-wrap could leave 3 boxes on one line and 1
84
+ alone on the next, which reads as a bug rather than as a layout */
85
+ .head-shell { container-type: inline-size; }
86
+ .head-boxes { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 4px 0 0; align-items: stretch; }
87
+ @container (min-width: 380px) {
88
+ .head-boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
89
+ }
90
+ @container (min-width: 780px) {
91
+ .head-boxes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
92
+ }
93
+ /* no container-query support: fall back to the old wrapping row rather than a stack of four */
94
+ @supports not (container-type: inline-size) {
95
+ .head-boxes { display: flex; flex-wrap: wrap; }
96
+ .head-boxes > .head-box { flex: 1 1 auto; min-width: 150px; }
97
+ }
98
+ .head-box {
99
+ position: relative; border: 1px solid var(--border); border-radius: 8px;
100
+ padding: 5px 9px; background: var(--panel); min-width: 0;
101
+ }
102
+ .head-label {
103
+ position: absolute; top: -7px; left: 9px; padding: 0 5px; background: var(--bg);
104
+ color: var(--dim); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
105
+ }
106
+ .head-value { font-weight: 600; overflow-wrap: anywhere; }
107
+ .head-value.app { color: var(--amber); }
108
+ .head-value.draft { color: var(--accent); }
109
+ .head-value.host { color: var(--green); }
110
+ .head-select { padding: 2px 6px; font-size: 13px; font-weight: 600; color: var(--green); max-width: 220px; }
111
+ .head-select.draft { color: var(--accent); }
112
+ /* a head value that acts: reads like the text beside it, behaves like a button */
113
+ .head-value.as-link {
114
+ border: 0; background: none; padding: 0; font: inherit; font-weight: 600; cursor: pointer;
115
+ color: var(--amber); display: inline-flex; align-items: center; gap: 5px;
116
+ }
117
+ .head-value.as-link:hover { color: var(--accent); text-decoration: underline; }
118
+ button.danger { color: var(--dim); }
119
+ button.danger:hover { color: var(--red); border-color: var(--red); }
120
+
121
+ /* the sidebar is a tree: folder → workflows → drafts, the branch line makes the nesting readable */
122
+ .side-group { margin-bottom: 7px; }
123
+ .side-folder { padding: 4px 12px 2px; color: var(--dim); font-size: 11px; overflow-wrap: anywhere; }
124
+ .side-branch { margin-left: 10px; border-left: 1px solid var(--border); }
125
+
126
+ /* the label column is fit-content CAPPED, not a fixed slab: with short labels the controls
127
+ start right after them. Rows are subgrids of .vars so the column still lines up across
128
+ rows — a per-row grid would give every row its own width. The 150px track is the
129
+ pre-subgrid fallback, kept first so an old engine still gets aligned columns */
130
+ /* the form needs air under the head boxes: the first var sat flush against them */
131
+ .vars { display: grid; grid-template-columns: fit-content(150px) 1fr; margin-top: 14px; }
70
132
  .var-row {
71
- display: grid; grid-template-columns: 170px 1fr; gap: 10px; align-items: start;
72
- padding: 8px 0; border-bottom: 1px solid var(--border);
133
+ display: grid; grid-template-columns: 150px 1fr; grid-column: 1 / -1;
134
+ grid-template-columns: subgrid; gap: 8px; align-items: start;
135
+ padding: 3px 0; border-bottom: 1px solid var(--border);
73
136
  }
74
- .var-label { padding-top: 5px; overflow-wrap: break-word; }
75
- .var-label .kind { color: var(--dim); font-size: 11px; display: block; }
137
+ /* the label IS the drag handle for its row: no separate grip to reveal or aim at */
138
+ .var-label { padding-top: 3px; overflow-wrap: break-word; cursor: grab; }
139
+ .var-label:active { cursor: grabbing; }
140
+ .lora-chip[draggable='true'] { cursor: grab; }
141
+ /* the card drags from anywhere, so its own controls must keep their cursor */
142
+ .lora-chip input, .lora-chip label, .lora-chip button { cursor: pointer; }
143
+ .lora-chip input[type='number'] { cursor: text; }
76
144
  .var-label .dirty-dot { color: var(--amber); margin-left: 4px; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
77
145
  .var-label .dirty-dot:hover { color: var(--red); }
78
146
  .var-control { min-width: 0; }
79
- .hint { color: var(--dim); font-size: 11px; margin-top: 3px; }
147
+ .hint { color: var(--dim); font-size: 11px; margin-top: 2px; }
80
148
 
81
149
  input[type='text'], input[type='number'], textarea, select {
82
150
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
83
- border-radius: 6px; padding: 6px 8px; font: inherit; max-width: 100%;
151
+ border-radius: 6px; padding: 3px 7px; font: inherit; max-width: 100%;
84
152
  }
85
153
  input[type='text'] { width: 100%; }
86
154
  input[type='number'] { width: 110px; }
@@ -90,43 +158,116 @@ input[type='range'] { width: 100%; accent-color: var(--accent); }
90
158
  input[type='checkbox'] { accent-color: var(--accent); width: 16px; height: 16px; }
91
159
  .row-inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
92
160
 
161
+ /* presets menu (text + prompt vars). The backdrop sits UNDER the menu and over everything
162
+ else, so any outside click closes it without a document listener */
163
+ .preset-box { position: relative; }
164
+ .preset-btn { white-space: nowrap; }
165
+ .preset-backdrop { position: fixed; inset: 0; z-index: 40; }
166
+ .preset-menu {
167
+ position: absolute; top: calc(100% + 4px); left: 0; z-index: 41;
168
+ display: flex; flex-direction: column; min-width: 260px; max-width: min(520px, 90vw);
169
+ max-height: 320px; overflow-y: auto;
170
+ background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; padding: 4px;
171
+ box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
172
+ }
173
+ .preset-item {
174
+ display: flex; flex-direction: column; gap: 1px; align-items: flex-start;
175
+ background: none; border: 0; border-radius: 6px; padding: 4px 7px; text-align: left; width: 100%;
176
+ }
177
+ .preset-item:hover { background: var(--accent-dim); border-color: transparent; }
178
+ .preset-item.on .preset-name { color: var(--accent); }
179
+ .preset-name { white-space: pre; }
180
+ .preset-peek {
181
+ color: var(--dim); font-size: 11px; max-width: 100%;
182
+ overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
183
+ }
184
+
93
185
  button {
94
186
  background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
95
- border-radius: 6px; padding: 5px 10px; font: inherit; cursor: pointer;
187
+ border-radius: 6px; padding: 3px 8px; font: inherit; cursor: pointer;
96
188
  }
97
189
  button:hover { border-color: var(--accent); }
98
190
  button:disabled { opacity: 0.5; cursor: default; }
99
- button.primary { background: var(--accent); border-color: var(--accent); color: #0d1117; font-weight: 600; padding: 8px 22px; }
191
+ /* the run button is the loudest thing on the page, it does not need to be the biggest */
192
+ button.primary {
193
+ background: var(--accent); border-color: var(--accent); color: #0d1117; font-weight: 600;
194
+ padding: 5px 14px; display: inline-flex; align-items: center; gap: 6px;
195
+ }
196
+ .kbd-hint {
197
+ font-size: 10px; opacity: 0.65; border: 1px solid currentColor; border-radius: 4px;
198
+ padding: 0 4px; line-height: 1.4;
199
+ }
100
200
  button.link { border: 0; background: none; color: var(--accent); padding: 0; }
101
201
  button.link.danger { color: var(--dim); }
102
202
  button.link.danger:hover { color: var(--red); }
103
- button.mode { padding: 4px 8px; font-size: 12px; }
203
+ button.mode { padding: 2px 7px; font-size: 12px; }
104
204
  button.mode.sel { background: var(--accent-dim); border-color: var(--accent); color: #fff; }
105
205
 
206
+ /* the run line: button, queue count, result count — one row, each part appearing only when
207
+ it has something to say */
208
+ .run-line { display: inline-flex; gap: 10px; align-items: center; flex-wrap: wrap; }
209
+ .run-chip {
210
+ display: inline-flex; gap: 6px; align-items: center; color: var(--dim); font-size: 12px;
211
+ border: 1px solid var(--border); border-radius: 999px; padding: 2px 10px;
212
+ }
213
+ .run-chip .link { font-size: 12px; }
106
214
  .runbar {
107
215
  position: sticky; bottom: 0; display: flex; gap: 14px; align-items: center;
108
216
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px;
109
- padding: 10px 14px; margin-top: 14px;
217
+ padding: 8px 12px; margin-top: 10px;
110
218
  }
111
- .runbar .status { color: var(--dim); font-size: 12px; }
219
+ /* the changed-vars broom: FAR RIGHT of the draft box line and outside the button group, so
220
+ appearing and disappearing with the dirty count never shifts the buttons beside it */
221
+ .head-box .head-right { margin-left: auto; padding: 2px 5px; }
222
+ .head-box button.dirty { color: var(--amber); }
223
+ .head-box button.dirty:hover { color: var(--red); border-color: var(--red); }
112
224
  .runbar .error { color: var(--red); font-size: 12px; white-space: pre-wrap; }
113
225
  .pulse { animation: pulse 1.2s ease-in-out infinite; }
114
226
  @keyframes pulse { 50% { opacity: 0.45; } }
115
227
 
116
- .gallery { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
117
- .gallery-head { display: flex; gap: 12px; align-items: baseline; color: var(--dim); font-size: 12px; }
118
- .run-card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
228
+ .gallery { margin-top: 12px; display: flex; flex-direction: column; gap: 10px; }
229
+ .run-card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
119
230
  .run-card .meta { color: var(--dim); font-size: 12px; margin-bottom: 8px; display: flex; justify-content: space-between; gap: 8px; }
120
231
  .run-card .imgs { display: flex; flex-wrap: wrap; gap: 10px; }
232
+ .img-cell { display: flex; flex-direction: column; gap: 4px; }
233
+ /* the embedding page's buttons on a result (host protocol) — loud on purpose: they ARE the
234
+ reason the panel is inside that page */
235
+ .host-actions { display: flex; gap: 6px; flex-wrap: wrap; }
236
+ .host-action { border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 6px; padding: 4px 12px; font-size: 13px; font-weight: 600; cursor: pointer; }
237
+ .host-action:hover { filter: brightness(1.12); }
238
+ .host-action.danger { background: none; color: var(--dim); border-color: var(--dim); font-weight: 400; }
239
+ .host-action.danger:hover { color: var(--red); border-color: var(--red); }
240
+ .lightbox-bar .host-action { padding: 4px 10px; }
121
241
  .run-card img { max-width: min(320px, 100%); max-height: 320px; border-radius: 6px; display: block; }
122
242
  .run-card .noimg { color: var(--dim); font-style: italic; }
123
243
  .run-card.running { border-color: var(--accent-dim); }
244
+ /* what the host is on, in the node's own unit — the live signal of a text run, which has
245
+ neither a latent frame nor an image to show */
246
+ .run-node { color: var(--accent); font-size: 12px; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
247
+
248
+ /* a STRING output: the answer is prose, so it wraps and selects like prose. Monospace because
249
+ an expanded prompt is copied into another field verbatim */
250
+ .run-text { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 6px; }
251
+ .run-text-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
252
+ .run-text-body, .run-thinking {
253
+ margin: 0; white-space: pre-wrap; overflow-wrap: anywhere;
254
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.5;
255
+ background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 7px 9px;
256
+ max-height: 40vh; overflow-y: auto;
257
+ }
258
+ .run-thinking { color: var(--dim); font-size: 12px; margin-bottom: 6px; }
259
+
260
+ /* the stream: pinned to its newest line, capped so a long answer never pushes the page around */
261
+ .run-live { margin-top: 6px; }
262
+ .run-live-body {
263
+ margin: 0; white-space: pre-wrap; overflow-wrap: anywhere;
264
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; line-height: 1.5;
265
+ background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 6px 8px;
266
+ max-height: 30vh; overflow-y: auto;
267
+ }
268
+ .run-live-body.dim { color: var(--dim); }
124
269
  .progress-track { height: 6px; background: var(--panel-2); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
125
270
  .progress-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.4s ease; }
126
- .img-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
127
- .img-actions { display: flex; gap: 10px; align-items: baseline; font-size: 12px; }
128
- .img-actions a { color: var(--accent); text-decoration: none; }
129
- .img-actions button { padding: 2px 8px; font-size: 12px; }
130
271
 
131
272
  .lora-chip {
132
273
  display: inline-flex; gap: 6px; align-items: center; max-width: 100%;
@@ -136,10 +277,14 @@ button.mode.sel { background: var(--accent-dim); border-color: var(--accent); co
136
277
  .lora-chip button:hover { color: var(--red); }
137
278
  /* image mode: the row chip becomes the same preview card as the popup */
138
279
  .lora-chip.card {
280
+ position: relative;
139
281
  flex-direction: column; align-items: stretch; border-radius: 8px; padding: 6px;
140
- background: var(--panel-2); border: 1px solid var(--border); width: 132px;
282
+ background: var(--panel-2); border: 1px solid var(--border); width: 168px;
283
+ /* anything that still outgrows the card is clipped IN PLACE, never painted over its
284
+ neighbour. CLIP on x only: hidden on both axes would trap the tooltips too */
285
+ overflow-x: clip; overflow-y: visible;
141
286
  }
142
- .lora-chip.card .lora-thumb { height: 110px; }
287
+ .lora-chip.card .lora-thumb { height: 130px; }
143
288
  .lora-chip.card .chip-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
144
289
  .chip-title { min-width: 0; }
145
290
  /* the whole card is the pause/resume target — the palette gesture */
@@ -149,26 +294,66 @@ button.mode.sel { background: var(--accent-dim); border-color: var(--accent); co
149
294
  }
150
295
  .lora-chip:not(.card) .lora-toggle { flex-direction: row; align-items: center; gap: 6px; }
151
296
  .lora-toggle:hover .chip-title { color: var(--accent); }
152
- .chip-state { font-size: 10px; color: var(--green); letter-spacing: 0.04em; }
153
- .lora-chip.off .chip-state { color: var(--amber); }
154
- .chip-controls { display: flex; gap: 4px; align-items: center; }
155
- .chip-controls input[type='number'] { width: 52px; padding: 1px 4px; font-size: 11px; }
156
- .chip-controls button { border: 0; background: none; color: inherit; padding: 0 2px; font-size: 11px; }
157
- .chip-controls button:hover { color: var(--red); }
297
+ .chip-controls { display: flex; flex-direction: column; gap: 3px; }
298
+ /* a line: label button, slider, number. The label toggles m+c ↔ m / c */
299
+ .st-line { display: flex; gap: 5px; align-items: center; }
300
+ .st-line .st-label {
301
+ border: 0; background: none; padding: 0; cursor: pointer; font-size: 10px; letter-spacing: 0.03em;
302
+ color: var(--dim); width: 24px; text-align: left; flex-shrink: 0;
303
+ }
304
+ .st-line .st-label:hover { color: var(--accent); }
305
+ /* wide enough for a signed two-decimal value plus the spinner: -0.55 was clipping */
306
+ .st-line input[type='number'] { width: 58px; flex-shrink: 0; padding: 1px 5px; font-size: 11px; }
307
+
308
+ /* the sliders, drawn rather than left to the browser's default chrome */
309
+ .st-line input[type='range'] {
310
+ flex: 1; min-width: 40px; height: 14px; margin: 0; padding: 0;
311
+ appearance: none; background: none; cursor: pointer;
312
+ }
313
+ .st-line input[type='range']::-webkit-slider-runnable-track {
314
+ height: 3px; border-radius: 2px; background: var(--border);
315
+ }
316
+ .st-line input[type='range']::-webkit-slider-thumb {
317
+ appearance: none; width: 11px; height: 11px; border-radius: 50%; margin-top: -4px;
318
+ background: var(--accent); border: 0;
319
+ }
320
+ .st-line input[type='range']::-moz-range-track { height: 3px; border-radius: 2px; background: var(--border); }
321
+ .st-line input[type='range']::-moz-range-thumb {
322
+ width: 11px; height: 11px; border: 0; border-radius: 50%; background: var(--accent);
323
+ }
324
+ .lora-chip.off .st-line input[type='range']::-webkit-slider-thumb { background: var(--dim); }
325
+ .lora-chip.off .st-line input[type='range']::-moz-range-thumb { background: var(--dim); }
326
+
327
+ /* the head line: switch, then the name */
328
+ .chip-head { display: flex; gap: 6px; align-items: center; min-width: 0; }
329
+ .chip-title.as-text {
330
+ border: 0; background: none; padding: 0; color: inherit; font: inherit; cursor: pointer;
331
+ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; min-width: 0;
332
+ }
333
+ .chip-title.as-text:hover { color: var(--accent); }
334
+
335
+ /* the picture's own box: the ✕ is positioned against THIS, so it never depends on which
336
+ ancestor happens to be positioned, and the image keeps the whole height */
337
+ .chip-media { position: relative; display: block; isolation: isolate; }
338
+ .chip-media .lora-toggle { display: block; width: 100%; }
339
+ /* ✕ is ALWAYS a corner overlay, on the card and in the popup row: it costs zero layout
340
+ width, and it is never hover-gated — a phone has no hover, so a hidden ✕ is no ✕.
341
+ The selector carries TWO classes on purpose: the .lora-chip button rule above is 0-1-1 and would
342
+ otherwise win, stripping the padding and the backdrop off this one.
343
+ width:auto because a stretch parent would otherwise pull it across the whole card */
344
+ .chip-media .chip-remove, .lora-active-row .chip-remove {
345
+ position: absolute; top: 4px; right: 4px; z-index: 1; width: auto; height: auto;
346
+ display: inline-flex; align-items: center; justify-content: center;
347
+ border: 0; border-radius: 6px; padding: 4px; line-height: 0; color: #fff; cursor: pointer;
348
+ background: rgba(16, 18, 23, 0.72); opacity: 0.85; transition: opacity 0.12s, color 0.12s;
349
+ }
350
+ .chip-media .chip-remove:hover, .lora-active-row .chip-remove:hover { opacity: 1; color: var(--red); }
351
+
158
352
  /* PAUSED: still in the palette, visibly not contributing to the graph */
159
353
  .lora-chip.off, .lora-active-row.off { opacity: 0.55; }
160
354
  .lora-chip.off { border-style: dashed; }
161
355
  .lora-chip.off .lora-thumb, .lora-active-row.off .lora-thumb { filter: grayscale(1); }
162
356
 
163
- .queue { margin-top: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
164
- .queue-head {
165
- display: flex; gap: 12px; align-items: baseline; justify-content: space-between;
166
- padding: 6px 10px; border-bottom: 1px solid var(--border); color: var(--dim); font-size: 12px;
167
- }
168
- .queue-row { display: flex; gap: 10px; align-items: center; padding: 4px 10px; font-size: 12px; }
169
- .queue-ix { color: var(--dim); width: 16px; }
170
- .queue-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
171
- .queue-row button { padding: 1px 8px; font-size: 11px; }
172
357
 
173
358
  .modal-overlay {
174
359
  position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.55);
@@ -183,7 +368,7 @@ button.mode.sel { background: var(--accent-dim); border-color: var(--accent); co
183
368
  .modal-body { overflow-y: auto; padding: 10px; }
184
369
  .section-title { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; margin: 8px 0 6px; }
185
370
 
186
- .lora-active-row { display: flex; gap: 10px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--border); }
371
+ .lora-active-row { position: relative; display: flex; gap: 10px; align-items: center; padding: 4px 22px 4px 0; border-bottom: 1px solid var(--border); }
187
372
  .lora-active-text { flex: 1; min-width: 0; }
188
373
  .lora-active-row input[type='number'] { width: 64px; padding: 2px 6px; font-size: 12px; }
189
374
  .lora-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
@@ -194,7 +379,11 @@ button.mode.sel { background: var(--accent-dim); border-color: var(--accent); co
194
379
  background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; min-width: 0;
195
380
  }
196
381
  .lora-card:hover { border-color: var(--accent); }
197
- .lora-thumb { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; display: block; }
382
+ /* CONTAIN, never cover: a cropped preview hides exactly what the lora looks like */
383
+ /* contain by default (nothing of the art is hidden); FILL crops to the card, which reads far
384
+ better for style loras — the toggle lives in the loras row and persists */
385
+ .lora-thumb { width: 100%; height: 110px; object-fit: contain; border-radius: 6px; display: block; background: var(--bg); }
386
+ .lora-thumb.fill { object-fit: cover; }
198
387
  .lora-active-row .lora-thumb { width: 48px; height: 48px; flex-shrink: 0; }
199
388
  div.lora-thumb.none {
200
389
  display: flex; align-items: center; justify-content: center;
@@ -207,11 +396,18 @@ div.lora-thumb.none {
207
396
  display: flex; flex-direction: column; gap: 8px; max-width: min(1100px, 100%); max-height: 100%;
208
397
  }
209
398
  .lightbox img { max-width: 100%; max-height: calc(90vh - 60px); object-fit: contain; border-radius: 8px; }
399
+ /* wheel zoom: the viewport CLIPS, the image inside is transformed. transform-origin stays
400
+ centred so the pan offsets computed from the cursor are the only thing moving it */
401
+ .zoom-view { overflow: hidden; border-radius: 8px; display: flex; justify-content: center; touch-action: none; }
402
+ .zoom-view img { transform-origin: center center; will-change: transform; }
403
+ .zoom-view.grabbing { cursor: grab; }
404
+ .zoom-view.grabbing:active { cursor: grabbing; }
210
405
  .lightbox-bar {
211
406
  display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap;
212
407
  background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px;
213
408
  }
214
409
  .lightbox-bar a { color: var(--accent); text-decoration: none; }
410
+ .loras-more input[type='number'] { width: 72px; margin: 0 5px; }
215
411
  .loras-more { color: var(--dim); font-size: 12px; padding: 4px 10px; }
216
412
 
217
413
  /* prompt enhancer modal */
@@ -234,13 +430,182 @@ div.lora-thumb.none {
234
430
  .center { display: flex; height: 100%; align-items: center; justify-content: center; color: var(--dim); }
235
431
  .center .error { color: var(--red); max-width: 640px; white-space: pre-wrap; }
236
432
 
237
- /* results right of the form on wide screens ("bottom or right": right ≥1100px, bottom below) */
238
- @media (min-width: 1100px) {
239
- .work { display: flex; gap: 18px; align-items: flex-start; }
240
- .form-col { flex: 1; min-width: 0; }
241
- .results-col { width: 380px; flex-shrink: 0; }
242
- .results-col .gallery { margin-top: 0; }
433
+ /* the placements. Each one is a BUTTON and nothing else: there is no width rule that quietly
434
+ moves the panel somewhere no button is showing */
435
+ .work.layout-side { display: flex; gap: 18px; align-items: flex-start; }
436
+ .work.layout-side .form-col { flex: 1; min-width: 0; }
437
+ .work.layout-side .results-col { width: min(380px, 45vw); flex-shrink: 0; }
438
+ .work.layout-side .results-col .gallery { margin-top: 0; }
439
+ /* results LEFT of the form: same column, the other side. flex order rather than
440
+ row-reverse, so the dom order (form first) stays the reading and tab order */
441
+ .work.layout-left { display: flex; gap: 18px; align-items: flex-start; }
442
+ .work.layout-left .form-col { flex: 1; min-width: 0; order: 2; }
443
+ .work.layout-left .results-col { width: min(380px, 45vw); flex-shrink: 0; order: 1; }
444
+ .work.layout-left .results-col .gallery { margin-top: 0; }
445
+ .work.layout-left .results-col {
446
+ position: sticky; top: 0; align-self: flex-start;
447
+ max-height: calc(100dvh - var(--main-pad-y, 26px)); min-height: 0; overflow-y: auto; overscroll-behavior: contain;
448
+ }
449
+
450
+ /* a 380px column beside a form does not fit a phone: BOTH side placements stack there. This
451
+ is the chosen mode adapting, not a different mode — the button stays lit and still says
452
+ where the panel goes the moment there is room for it */
453
+ @media (max-width: 760px) {
454
+ .work.layout-side, .work.layout-left { display: block; }
455
+ .work.layout-side .results-col, .work.layout-left .results-col {
456
+ position: static; width: auto; max-height: none; overflow-y: visible; margin-top: 12px;
457
+ }
458
+ }
459
+
460
+ /* A COLUMN OF RESULTS IS NEVER TALLER THAN THE PAGE. Left to itself it grows with the run
461
+ history and drags the document down, so reading a var meant scrolling past a stack of
462
+ images. It sticks to the top of .main (the scroll container) and scrolls INSIDE itself,
463
+ so the form column stays where it is however many runs pile up */
464
+ .work.layout-side .results-col {
465
+ position: sticky; top: 0; align-self: flex-start;
466
+ max-height: calc(100dvh - var(--main-pad-y, 26px)); min-height: 0; overflow-y: auto; overscroll-behavior: contain;
467
+ }
468
+ /* PINNED: the newest result floats over the bottom, the form scrolls under it — the phone
469
+ answer to "I always have to scroll between them". Sticky, so it never covers the runbar.
470
+ It HUGS its content: fit-content width + auto height, so an empty run or a tall portrait
471
+ never leaves a band of dead space around the image */
472
+ .work.layout-pinned .results-col {
473
+ /* bottom RIGHT corner: it hugs the image, so anchoring it to a corner keeps the form's
474
+ left edge readable instead of splitting the page down the middle */
475
+ position: sticky; bottom: 0; z-index: 15; margin-top: 10px;
476
+ width: fit-content; max-width: 100%; margin-left: auto; margin-right: 0;
477
+ max-height: 46vh; overflow-y: auto;
478
+ background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
479
+ box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.45); padding: 6px;
480
+ }
481
+ .work.layout-pinned .results-col .gallery { margin-top: 0; gap: 6px; }
482
+ /* the pinned card is the IMAGE plus its controls, nothing else: no meta line, no padding walls */
483
+ .work.layout-pinned .run-card { padding: 0; border: 0; background: none; }
484
+ .work.layout-pinned .run-card .meta { margin-bottom: 2px; font-size: 11px; }
485
+ .work.layout-pinned .run-card img { max-height: 34vh; width: auto; }
486
+ .results-run { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
487
+ .work.layout-pinned .results-run { margin-bottom: 6px; justify-content: flex-end; }
488
+ /* segmented control: ONE group, no gaps, only the outer corners rounded */
489
+ .btn-group { display: inline-flex; }
490
+ .btn-group button {
491
+ padding: 2px 6px; font-size: 13px; line-height: 1.3; border-radius: 0; margin: 0;
492
+ border-right-width: 0; background: var(--panel-2);
493
+ }
494
+ .btn-group button:first-child { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }
495
+ .btn-group button:last-child { border-right-width: 1px; border-top-right-radius: 6px; border-bottom-right-radius: 6px; }
496
+ .btn-group button.sel { background: var(--accent-dim); border-color: var(--accent); color: #fff; }
497
+ /* the selected segment owns the divider on both sides, else its highlight looks clipped */
498
+ .btn-group button.sel + button { border-left-color: var(--accent); }
499
+ .btn-group button:hover { background: var(--panel); }
500
+ /* a group living inside a header box sits beside the value, not under it */
501
+ .head-group { margin-left: 8px; vertical-align: middle; }
502
+ .head-group button { padding: 2px 5px; }
503
+ /* rows that mix buttons and inputs: one height for both, so nothing steps over the line.
504
+ 32px is what an input with 6px padding and a 1px border measures at this font size */
505
+ /* everything on a var row is the SAME height as the input beside it, or the row steps.
506
+ 28px is what the slimmed input measures (14px text, 3px padding, 1px border) */
507
+ .field-height, .field-height button { height: 28px; }
508
+ .field-height button { display: inline-flex; align-items: center; justify-content: center; }
509
+ /* a one-character mode button still needs a target: = + ? are narrow glyphs */
510
+ .btn-group.field-height button { min-width: 28px; }
511
+ .head-input { padding: 2px 6px; font-size: 13px; font-weight: 600; color: var(--accent); max-width: 180px; }
512
+ .head-label .save-state { color: var(--dim); font-weight: 400; margin-left: 4px; }
513
+ .head-label .save-state.error { color: var(--red); }
514
+ /* every head box is two lines: what you are on, then what you can do to it */
515
+ .head-box { display: flex; flex-direction: column; gap: 5px; }
516
+ .head-line { display: flex; gap: 8px; align-items: center; min-height: 24px; }
517
+ .head-line .head-group { margin-left: 0; }
518
+
519
+ /* the lora controls sit above the palette, left aligned */
520
+ .lora-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
521
+ .lora-actions button { font-size: 12px; }
522
+ /* a lora the manager knows and comfy does not: flagged, never hidden */
523
+ .host-note {
524
+ margin: 8px 0; padding: 6px 10px; font-size: 12px; color: var(--text);
525
+ background: var(--panel); border: 1px solid var(--accent-dim); border-radius: 6px;
526
+ }
527
+ /* the keywords the active loras prepend to the prompt: shown, not guessed */
528
+ .kw-prefix { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
529
+ .kw-chip {
530
+ font-size: 11px; padding: 2px 8px; border-radius: 10px;
531
+ background: var(--accent-dim); color: #fff;
532
+ }
533
+ /* a real switch, not a word: the state is readable at a glance and hittable on a phone */
534
+ .switch { position: relative; display: inline-flex; width: 28px; height: 16px; flex-shrink: 0; cursor: pointer; }
535
+ .switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
536
+ .switch .track {
537
+ position: absolute; inset: 0; border-radius: 999px; background: var(--panel-2);
538
+ border: 1px solid var(--border); transition: background 0.15s, border-color 0.15s;
539
+ }
540
+ .switch .track::after {
541
+ content: ''; position: absolute; top: 1px; left: 1px; width: 12px; height: 12px; border-radius: 50%;
542
+ background: var(--dim); transition: transform 0.15s, background 0.15s;
543
+ }
544
+ .switch input:checked + .track { background: var(--accent-dim); border-color: var(--accent); }
545
+ .switch input:checked + .track::after { transform: translateX(12px); background: var(--accent); }
546
+ .switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
547
+
548
+ /* the lora details sheet */
549
+ .lora-details { display: flex; gap: 14px; flex-wrap: wrap; }
550
+ .detail-thumb { width: 220px; max-width: 100%; border-radius: 8px; }
551
+ .detail-list { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 6px; }
552
+ .detail-row { display: grid; grid-template-columns: 110px 1fr; gap: 10px; font-size: 12px; }
553
+ .detail-key { color: var(--dim); }
554
+ .detail-val { overflow-wrap: anywhere; }
555
+ .detail-val a { color: var(--accent); text-decoration: none; }
556
+ /* civitai's own words about the model. PLAIN TEXT: the extension answers html, and third
557
+ party html is never injected into this page — the seam strips it to text */
558
+ .detail-desc {
559
+ white-space: pre-wrap; font-size: 12px; line-height: 1.5; color: var(--text);
560
+ background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
561
+ padding: 8px 10px; max-height: 220px; overflow-y: auto;
243
562
  }
563
+ .detail-examples { display: flex; gap: 8px; flex-wrap: wrap; }
564
+ .detail-examples img { width: 96px; height: 96px; object-fit: cover; border-radius: 6px; }
565
+
566
+ button.warn-action { color: var(--amber); border-color: var(--amber); }
567
+ button.warn-action:hover { background: var(--panel); }
568
+ .lora-warn { color: var(--amber); display: inline-flex; margin-left: 4px; vertical-align: -0.1em; }
569
+ /* an anchor that must read as a button (it opens the host's own page, so it IS a link) */
570
+ .button-link {
571
+ display: inline-flex; align-items: center; gap: 5px; text-decoration: none; font-size: 12px;
572
+ background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
573
+ border-radius: 6px; padding: 0 10px;
574
+ }
575
+ .button-link:hover { border-color: var(--accent); color: var(--accent); }
576
+
577
+ /* the ComfyUI console, only while asked for */
578
+ .logs { margin-top: 14px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); }
579
+ .logs-head {
580
+ display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
581
+ padding: 6px 10px; border-bottom: 1px solid var(--border); color: var(--dim); font-size: 12px;
582
+ }
583
+ .logs pre {
584
+ margin: 0; padding: 8px 10px; max-height: 240px; overflow: auto; white-space: pre-wrap;
585
+ font-size: 11px; line-height: 1.35; color: var(--dim);
586
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
587
+ }
588
+
589
+ /* INSTANT tooltips: the native title attribute waits about a second and cannot be styled, so
590
+ every affordance carries data-tip instead. No js, no library, and no delay, which is the point */
591
+ [data-tip] { position: relative; }
592
+ [data-tip]:hover::after, [data-tip]:focus-visible::after {
593
+ content: attr(data-tip);
594
+ /* anchored to the button's bottom LEFT, never centred: a centred tip on the leftmost
595
+ button hangs off the screen, and one below never covers the row you are reading */
596
+ position: absolute; top: calc(100% + 5px); left: 0;
597
+ z-index: 60; pointer-events: none; white-space: normal; max-width: 220px; width: max-content;
598
+ opacity: 0.8;
599
+ background: var(--panel-2); color: var(--text); border: 1px solid var(--border);
600
+ border-radius: 6px; padding: 4px 8px; font-size: 11px; font-weight: 400; line-height: 1.3;
601
+ box-shadow: 0 6px 18px rgba(0, 0, 0, 0.5);
602
+ }
603
+ /* the pointer never crosses a tooltip, so hover cannot flicker between the two */
604
+ @media (hover: none) { [data-tip]:hover::after { display: none; } }
605
+
606
+ /* icons inherit the text they sit in, so a button never jumps when one is swapped in */
607
+ .icon { display: inline-block; vertical-align: -0.16em; flex-shrink: 0; }
608
+ button .icon + * { margin-left: 4px; }
244
609
 
245
610
  /* the sidebar becomes a fixed drawer over a backdrop */
246
611
  @media (max-width: 800px) {
@@ -254,10 +619,14 @@ div.lora-thumb.none {
254
619
 
255
620
  /* phone: label over control, 16px inputs (below that iOS zooms the page on focus) */
256
621
  @media (max-width: 640px) {
257
- .main { padding: 12px 12px 60px; }
258
- .var-row { grid-template-columns: 1fr; gap: 4px; }
259
- .var-label { padding-top: 0; }
260
- .var-label .kind { display: inline; margin-left: 6px; }
622
+ .main { --main-pad-y: 22px; padding: 10px 10px 12px; }
623
+ /* labels stay BESIDE their control on a phone too: stacking them doubled the height of
624
+ every row and read as a wall. The column just gets narrower. A row that needs the whole
625
+ width (loras) opts out with .wide */
626
+ .vars { grid-template-columns: fit-content(96px) 1fr; }
627
+ .var-row { gap: 6px; }
628
+ .var-row.wide { grid-template-columns: 1fr; gap: 3px; }
629
+ .var-label { padding-top: 3px; font-size: 12px; }
261
630
  input[type='text'], input[type='number'], textarea, select { font-size: 16px; }
262
631
  input[type='number'] { width: 96px; }
263
632
  /* repeated at row specificity: the base 12px rule outranks the bare selector above,
@@ -270,4 +639,4 @@ div.lora-thumb.none {
270
639
  /* side by side prompts do not fit a phone: stack yours over the rewrite */
271
640
  .enh-cols { grid-template-columns: 1fr; }
272
641
  }
273
- `;var dy=document.createElement("style");dy.textContent=cy;document.head.appendChild(dy);var hy=new Jc;globalThis.webst=hy;var py=document.getElementById("root");if(py==null)throw Error("[serve web] #root element missing from the shell html");fy.createRoot(py).render(p(ry,{st:hy}));
642
+ `;var my=document.createElement("style");my.textContent=py;document.head.appendChild(my);var vy=new df;globalThis.webst=vy;var gy=document.getElementById("root");if(gy==null)throw Error("[serve web] #root element missing from the shell html");Tc(gy).render(s(hy,{st:vy}));