76 lines
320 KiB
JavaScript
76 lines
320 KiB
JavaScript
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./RadioTestForm-C4p76j7C.js","./icons-BLu1UXn4.js","./react-Cfa4jLPc.js","./AmbulanceChecklist-CQ7je56N.js","./ReportPDF-WB7Q5w_0.js"])))=>i.map(i=>d[i]);
|
|
import{r as Pm,a as T,S as eh,C as th,U as lh,L as Vo,b as ah,c as nh,M as ih,P as Ko,A as Jo,F as uh,R as sh,d as ch,e as rh,T as dh,f as fh,X as oh,g as mh,h as Bo,i as hh,j as xh,k as Ho,l as vh,m as bh,n as Jc,o as gh}from"./icons-BLu1UXn4.js";import{r as yh}from"./react-Cfa4jLPc.js";(function(){const F=document.createElement("link").relList;if(F&&F.supports&&F.supports("modulepreload"))return;for(const _ of document.querySelectorAll('link[rel="modulepreload"]'))b(_);new MutationObserver(_=>{for(const w of _)if(w.type==="childList")for(const H of w.addedNodes)H.tagName==="LINK"&&H.rel==="modulepreload"&&b(H)}).observe(document,{childList:!0,subtree:!0});function B(_){const w={};return _.integrity&&(w.integrity=_.integrity),_.referrerPolicy&&(w.referrerPolicy=_.referrerPolicy),_.crossOrigin==="use-credentials"?w.credentials="include":_.crossOrigin==="anonymous"?w.credentials="omit":w.credentials="same-origin",w}function b(_){if(_.ep)return;_.ep=!0;const w=B(_);fetch(_.href,w)}})();var kc={exports:{}},ri={};/**
|
|
* @license React
|
|
* react-jsx-runtime.production.js
|
|
*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/var Ro;function ph(){if(Ro)return ri;Ro=1;var j=Symbol.for("react.transitional.element"),F=Symbol.for("react.fragment");function B(b,_,w){var H=null;if(w!==void 0&&(H=""+w),_.key!==void 0&&(H=""+_.key),"key"in _){w={};for(var xe in _)xe!=="key"&&(w[xe]=_[xe])}else w=_;return _=w.ref,{$$typeof:j,type:b,key:H,ref:_!==void 0?_:null,props:w}}return ri.Fragment=F,ri.jsx=B,ri.jsxs=B,ri}var Lo;function Sh(){return Lo||(Lo=1,kc.exports=ph()),kc.exports}var u=Sh(),$c={exports:{}},di={},Wc={exports:{}},Fc={};/**
|
|
* @license React
|
|
* scheduler.production.js
|
|
*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/var wo;function Nh(){return wo||(wo=1,(function(j){function F(p,A){var U=p.length;p.push(A);e:for(;0<U;){var me=U-1>>>1,ce=p[me];if(0<_(ce,A))p[me]=A,p[U]=ce,U=me;else break e}}function B(p){return p.length===0?null:p[0]}function b(p){if(p.length===0)return null;var A=p[0],U=p.pop();if(U!==A){p[0]=U;e:for(var me=0,ce=p.length,Ye=ce>>>1;me<Ye;){var re=2*(me+1)-1,P=p[re],Ee=re+1,ht=p[Ee];if(0>_(P,U))Ee<ce&&0>_(ht,P)?(p[me]=ht,p[Ee]=U,me=Ee):(p[me]=P,p[re]=U,me=re);else if(Ee<ce&&0>_(ht,U))p[me]=ht,p[Ee]=U,me=Ee;else break e}}return A}function _(p,A){var U=p.sortIndex-A.sortIndex;return U!==0?U:p.id-A.id}if(j.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var w=performance;j.unstable_now=function(){return w.now()}}else{var H=Date,xe=H.now();j.unstable_now=function(){return H.now()-xe}}var ne=[],_e=[],R=1,M=null,I=3,Ut=!1,ve=!1,ze=!1,K=!1,al=typeof setTimeout=="function"?setTimeout:null,Ie=typeof clearTimeout=="function"?clearTimeout:null,we=typeof setImmediate<"u"?setImmediate:null;function Jt(p){for(var A=B(_e);A!==null;){if(A.callback===null)b(_e);else if(A.startTime<=p)b(_e),A.sortIndex=A.expirationTime,F(ne,A);else break;A=B(_e)}}function qt(p){if(ze=!1,Jt(p),!ve)if(B(ne)!==null)ve=!0,mt||(mt=!0,at());else{var A=B(_e);A!==null&&jt(qt,A.startTime-p)}}var mt=!1,Nt=-1,Pe=5,Bt=-1;function ea(){return K?!0:!(j.unstable_now()-Bt<Pe)}function Ht(){if(K=!1,mt){var p=j.unstable_now();Bt=p;var A=!0;try{e:{ve=!1,ze&&(ze=!1,Ie(Nt),Nt=-1),Ut=!0;var U=I;try{t:{for(Jt(p),M=B(ne);M!==null&&!(M.expirationTime>p&&ea());){var me=M.callback;if(typeof me=="function"){M.callback=null,I=M.priorityLevel;var ce=me(M.expirationTime<=p);if(p=j.unstable_now(),typeof ce=="function"){M.callback=ce,Jt(p),A=!0;break t}M===B(ne)&&b(ne),Jt(p)}else b(ne);M=B(ne)}if(M!==null)A=!0;else{var Ye=B(_e);Ye!==null&&jt(qt,Ye.startTime-p),A=!1}}break e}finally{M=null,I=U,Ut=!1}A=void 0}}finally{A?at():mt=!1}}}var at;if(typeof we=="function")at=function(){we(Ht)};else if(typeof MessageChannel<"u"){var Sl=new MessageChannel,Rt=Sl.port2;Sl.port1.onmessage=Ht,at=function(){Rt.postMessage(null)}}else at=function(){al(Ht,0)};function jt(p,A){Nt=al(function(){p(j.unstable_now())},A)}j.unstable_IdlePriority=5,j.unstable_ImmediatePriority=1,j.unstable_LowPriority=4,j.unstable_NormalPriority=3,j.unstable_Profiling=null,j.unstable_UserBlockingPriority=2,j.unstable_cancelCallback=function(p){p.callback=null},j.unstable_forceFrameRate=function(p){0>p||125<p?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Pe=0<p?Math.floor(1e3/p):5},j.unstable_getCurrentPriorityLevel=function(){return I},j.unstable_next=function(p){switch(I){case 1:case 2:case 3:var A=3;break;default:A=I}var U=I;I=A;try{return p()}finally{I=U}},j.unstable_requestPaint=function(){K=!0},j.unstable_runWithPriority=function(p,A){switch(p){case 1:case 2:case 3:case 4:case 5:break;default:p=3}var U=I;I=p;try{return A()}finally{I=U}},j.unstable_scheduleCallback=function(p,A,U){var me=j.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?me+U:me):U=me,p){case 1:var ce=-1;break;case 2:ce=250;break;case 5:ce=1073741823;break;case 4:ce=1e4;break;default:ce=5e3}return ce=U+ce,p={id:R++,callback:A,priorityLevel:p,startTime:U,expirationTime:ce,sortIndex:-1},U>me?(p.sortIndex=U,F(_e,p),B(ne)===null&&p===B(_e)&&(ze?(Ie(Nt),Nt=-1):ze=!0,jt(qt,U-me))):(p.sortIndex=ce,F(ne,p),ve||Ut||(ve=!0,mt||(mt=!0,at()))),p},j.unstable_shouldYield=ea,j.unstable_wrapCallback=function(p){var A=I;return function(){var U=I;I=A;try{return p.apply(this,arguments)}finally{I=U}}}})(Fc)),Fc}var Yo;function jh(){return Yo||(Yo=1,Wc.exports=Nh()),Wc.exports}/**
|
|
* @license React
|
|
* react-dom-client.production.js
|
|
*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/var Go;function Th(){if(Go)return di;Go=1;var j=jh(),F=Pm(),B=yh();function b(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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 _(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function w(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function H(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 xe(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 ne(e){if(w(e)!==e)throw Error(b(188))}function _e(e){var t=e.alternate;if(!t){if(t=w(e),t===null)throw Error(b(188));return t!==e?null:e}for(var l=e,a=t;;){var n=l.return;if(n===null)break;var i=n.alternate;if(i===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===i.child){for(i=n.child;i;){if(i===l)return ne(n),e;if(i===a)return ne(n),t;i=i.sibling}throw Error(b(188))}if(l.return!==a.return)l=n,a=i;else{for(var s=!1,r=n.child;r;){if(r===l){s=!0,l=n,a=i;break}if(r===a){s=!0,a=n,l=i;break}r=r.sibling}if(!s){for(r=i.child;r;){if(r===l){s=!0,l=i,a=n;break}if(r===a){s=!0,a=i,l=n;break}r=r.sibling}if(!s)throw Error(b(189))}}if(l.alternate!==a)throw Error(b(190))}if(l.tag!==3)throw Error(b(188));return l.stateNode.current===l?e:t}function R(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=R(e),t!==null)return t;e=e.sibling}return null}var M=Object.assign,I=Symbol.for("react.element"),Ut=Symbol.for("react.transitional.element"),ve=Symbol.for("react.portal"),ze=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),al=Symbol.for("react.profiler"),Ie=Symbol.for("react.consumer"),we=Symbol.for("react.context"),Jt=Symbol.for("react.forward_ref"),qt=Symbol.for("react.suspense"),mt=Symbol.for("react.suspense_list"),Nt=Symbol.for("react.memo"),Pe=Symbol.for("react.lazy"),Bt=Symbol.for("react.activity"),ea=Symbol.for("react.memo_cache_sentinel"),Ht=Symbol.iterator;function at(e){return e===null||typeof e!="object"?null:(e=Ht&&e[Ht]||e["@@iterator"],typeof e=="function"?e:null)}var Sl=Symbol.for("react.client.reference");function Rt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Sl?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ze:return"Fragment";case al:return"Profiler";case K:return"StrictMode";case qt:return"Suspense";case mt:return"SuspenseList";case Bt:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case ve:return"Portal";case we:return e.displayName||"Context";case Ie:return(e._context.displayName||"Context")+".Consumer";case Jt:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Nt:return t=e.displayName||null,t!==null?t:Rt(e.type)||"Memo";case Pe:t=e._payload,e=e._init;try{return Rt(e(t))}catch{}}return null}var jt=Array.isArray,p=F.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=B.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U={pending:!1,data:null,method:null,action:null},me=[],ce=-1;function Ye(e){return{current:e}}function re(e){0>ce||(e.current=me[ce],me[ce]=null,ce--)}function P(e,t){ce++,me[ce]=e.current,e.current=t}var Ee=Ye(null),ht=Ye(null),Lt=Ye(null),ta=Ye(null);function Nl(e,t){switch(P(Lt,t),P(ht,e),P(Ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?ao(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=ao(t),e=no(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}re(Ee),P(Ee,e)}function nl(){re(Ee),re(ht),re(Lt)}function kt(e){e.memoizedState!==null&&P(ta,e);var t=Ee.current,l=no(t,e.type);t!==l&&(P(ht,e),P(Ee,l))}function za(e){ht.current===e&&(re(Ee),re(ht)),ta.current===e&&(re(ta),ii._currentValue=U)}var la,Ea;function wt(e){if(la===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);la=t&&t[1]||"",Ea=-1<l.stack.indexOf(`
|
|
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
`+la+e+Ea}var on=!1;function Ca(e,t){if(!e||on)return"";on=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var S=function(){throw Error()};if(Object.defineProperty(S.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(S,[])}catch(v){var x=v}Reflect.construct(e,[],S)}else{try{S.call()}catch(v){x=v}e.call(S.prototype)}}else{try{throw Error()}catch(v){x=v}(S=e())&&typeof S.catch=="function"&&S.catch(function(){})}}catch(v){if(v&&x&&typeof v.stack=="string")return[v.stack,x.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),s=i[0],r=i[1];if(s&&r){var d=s.split(`
|
|
`),h=r.split(`
|
|
`);for(n=a=0;a<d.length&&!d[a].includes("DetermineComponentFrameRoot");)a++;for(;n<h.length&&!h[n].includes("DetermineComponentFrameRoot");)n++;if(a===d.length||n===h.length)for(a=d.length-1,n=h.length-1;1<=a&&0<=n&&d[a]!==h[n];)n--;for(;1<=a&&0<=n;a--,n--)if(d[a]!==h[n]){if(a!==1||n!==1)do if(a--,n--,0>n||d[a]!==h[n]){var g=`
|
|
`+d[a].replace(" at new "," at ");return e.displayName&&g.includes("<anonymous>")&&(g=g.replace("<anonymous>",e.displayName)),g}while(1<=a&&0<=n);break}}}finally{on=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?wt(l):""}function Ru(e,t){switch(e.tag){case 26:case 27:case 5:return wt(e.type);case 16:return wt("Lazy");case 13:return e.child!==t&&t!==null?wt("Suspense Fallback"):wt("Suspense");case 19:return wt("SuspenseList");case 0:case 15:return Ca(e.type,!1);case 11:return Ca(e.type.render,!1);case 1:return Ca(e.type,!0);case 31:return wt("Activity");default:return""}}function fi(e){try{var t="",l=null;do t+=Ru(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
|
|
Error generating stack: `+a.message+`
|
|
`+a.stack}}var oi=Object.prototype.hasOwnProperty,mn=j.unstable_scheduleCallback,mi=j.unstable_cancelCallback,hi=j.unstable_shouldYield,Lu=j.unstable_requestPaint,Je=j.unstable_now,wu=j.unstable_getCurrentPriorityLevel,hn=j.unstable_ImmediatePriority,xn=j.unstable_UserBlockingPriority,jl=j.unstable_NormalPriority,er=j.unstable_LowPriority,xi=j.unstable_IdlePriority,tr=j.log,Yu=j.unstable_setDisableYieldValue,Da=null,ke=null;function Yt(e){if(typeof tr=="function"&&Yu(e),ke&&typeof ke.setStrictMode=="function")try{ke.setStrictMode(Da,e)}catch{}}var et=Math.clz32?Math.clz32:lr,Gu=Math.log,Qu=Math.LN2;function lr(e){return e>>>=0,e===0?32:31-(Gu(e)/Qu|0)|0}var X=256,Se=262144,aa=4194304;function Tl(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 na(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,i=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var r=a&134217727;return r!==0?(a=r&~i,a!==0?n=Tl(a):(s&=r,s!==0?n=Tl(s):l||(l=r&~e,l!==0&&(n=Tl(l))))):(r=a&~i,r!==0?n=Tl(r):s!==0?n=Tl(s):l||(l=a&~e,l!==0&&(n=Tl(l)))),n===0?0:t!==0&&t!==n&&(t&i)===0&&(i=n&-n,l=t&-t,i>=l||i===32&&(l&4194048)!==0)?t:n}function _a(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function vn(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function vi(){var e=aa;return aa<<=1,(aa&62914560)===0&&(aa=4194304),e}function ia(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function ua(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function bn(e,t,l,a,n,i){var s=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var r=e.entanglements,d=e.expirationTimes,h=e.hiddenUpdates;for(l=s&~l;0<l;){var g=31-et(l),S=1<<g;r[g]=0,d[g]=-1;var x=h[g];if(x!==null)for(h[g]=null,g=0;g<x.length;g++){var v=x[g];v!==null&&(v.lane&=-536870913)}l&=~S}a!==0&&bi(e,a,0),i!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=i&~(s&~t))}function bi(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-et(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Al(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-et(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function gn(e,t){var l=t&-t;return l=(l&42)!==0?1:Ma(l),(l&(e.suspendedLanes|t))!==0?0:l}function Ma(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 Oa(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ua(){var e=A.p;return e!==0?e:(e=window.event,e===void 0?32:Co(e.type))}function yn(e,t){var l=A.p;try{return A.p=e,t()}finally{A.p=l}}var Tt=Math.random().toString(36).slice(2),Me="__reactFiber$"+Tt,Ne="__reactProps$"+Tt,zl="__reactContainer$"+Tt,Gt="__reactEvents$"+Tt,Xu="__reactListeners$"+Tt,gi="__reactHandles$"+Tt,yi="__reactResources$"+Tt,El="__reactMarker$"+Tt;function pn(e){delete e[Me],delete e[Ne],delete e[Gt],delete e[Xu],delete e[gi]}function il(e){var t=e[Me];if(t)return t;for(var l=e.parentNode;l;){if(t=l[zl]||l[Me]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=oo(e);e!==null;){if(l=e[Me])return l;e=oo(e)}return t}e=l,l=e.parentNode}return null}function Cl(e){if(e=e[Me]||e[zl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function J(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(b(33))}function $e(e){var t=e[yi];return t||(t=e[yi]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function G(e){e[El]=!0}var $t=new Set,ie={};function We(e,t){ye(e,t),ye(e+"Capture",t)}function ye(e,t){for(ie[e]=t,e=0;e<t.length;e++)$t.add(t[e])}var Dl=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]*$"),He={},Wt={};function Zu(e){return oi.call(Wt,e)?!0:oi.call(He,e)?!1:Dl.test(e)?Wt[e]=!0:(He[e]=!0,!1)}function qa(e,t,l){if(Zu(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){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,""+l)}}function sa(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Qt(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function nt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function pi(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Vu(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,i=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(s){l=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(s){l=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Sn(e){if(!e._valueTracker){var t=pi(e)?"checked":"value";e._valueTracker=Vu(e,t,""+e[t])}}function Si(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=pi(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Ba(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Ku=/[\n"\\]/g;function it(e){return e.replace(Ku,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ni(e,t,l,a,n,i,s,r){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+nt(t)):e.value!==""+nt(t)&&(e.value=""+nt(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?Nn(e,s,nt(t)):l!=null?Nn(e,s,nt(l)):a!=null&&e.removeAttribute("value"),n==null&&i!=null&&(e.defaultChecked=!!i),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"?e.name=""+nt(r):e.removeAttribute("name")}function ji(e,t,l,a,n,i,s,r){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){Sn(e);return}l=l!=null?""+nt(l):"",t=t!=null?""+nt(t):l,r||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=r?e.checked:!!a,e.defaultChecked=!!a,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s),Sn(e)}function Nn(e,t,l){t==="number"&&Ba(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function _l(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n<l.length;n++)t["$"+l[n]]=!0;for(l=0;l<e.length;l++)n=t.hasOwnProperty("$"+e[l].value),e[l].selected!==n&&(e[l].selected=n),n&&a&&(e[l].defaultSelected=!0)}else{for(l=""+nt(l),t=null,n=0;n<e.length;n++){if(e[n].value===l){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function Ti(e,t,l){if(t!=null&&(t=""+nt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+nt(l):""}function Ju(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(b(92));if(jt(a)){if(1<a.length)throw Error(b(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=nt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Sn(e)}function Ft(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Ai=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 ku(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||Ai.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function zi(e,t,l){if(t!=null&&typeof t!="object")throw Error(b(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var n in t)a=t[n],t.hasOwnProperty(n)&&l[n]!==a&&ku(e,n,a)}else for(var i in t)t.hasOwnProperty(i)&&ku(e,i,t[i])}function c(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 N=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"]]),z=/^[\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 L(e){return z.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ee(){}var je=null;function Re(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var It=null,ut=null;function Ei(e){var t=Cl(e);if(t&&(e=t.stateNode)){var l=e[Ne]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ni(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+it(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[Ne]||null;if(!n)throw Error(b(90));Ni(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&Si(a)}break e;case"textarea":Ti(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&_l(e,!!l.multiple,t,!1)}}}var jn=!1;function Ci(e,t,l){if(jn)return e(t,l);jn=!0;try{var a=e(t);return a}finally{if(jn=!1,(It!==null||ut!==null)&&(xu(),It&&(t=It,e=ut,ut=It=null,Ei(t),e)))for(t=0;t<e.length;t++)Ei(e[t])}}function ca(e,t){var l=e.stateNode;if(l===null)return null;var a=l[Ne]||null;if(a===null)return null;l=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(l&&typeof l!="function")throw Error(b(231,t,typeof l));return l}var Xt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fe=!1;if(Xt)try{var E={};Object.defineProperty(E,"passive",{get:function(){Fe=!0}}),window.addEventListener("test",E,E),window.removeEventListener("test",E,E)}catch{Fe=!1}var tt=null,ra=null,Di=null;function ar(){if(Di)return Di;var e,t=ra,l=t.length,a,n="value"in tt?tt.value:tt.textContent,i=n.length;for(e=0;e<l&&t[e]===n[e];e++);var s=l-e;for(a=1;a<=s&&t[l-a]===n[i-a];a++);return Di=n.slice(e,1<a?1-a:void 0)}function _i(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 Mi(){return!0}function nr(){return!1}function st(e){function t(l,a,n,i,s){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var r in e)e.hasOwnProperty(r)&&(l=e[r],this[r]=l?l(i):i[r]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Mi:nr,this.isPropagationStopped=nr,this}return M(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Mi)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Mi)},persist:function(){},isPersistent:Mi}),t}var da={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Oi=st(da),Tn=M({},da,{view:0,detail:0}),Fo=st(Tn),$u,Wu,An,Ui=M({},Tn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Iu,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==An&&(An&&e.type==="mousemove"?($u=e.screenX-An.screenX,Wu=e.screenY-An.screenY):Wu=$u=0,An=e),$u)},movementY:function(e){return"movementY"in e?e.movementY:Wu}}),ir=st(Ui),Io=M({},Ui,{dataTransfer:0}),Po=st(Io),e0=M({},Tn,{relatedTarget:0}),Fu=st(e0),t0=M({},da,{animationName:0,elapsedTime:0,pseudoElement:0}),l0=st(t0),a0=M({},da,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),n0=st(a0),i0=M({},da,{data:0}),ur=st(i0),u0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},s0={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"},c0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function r0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=c0[e])?!!t[e]:!1}function Iu(){return r0}var d0=M({},Tn,{key:function(e){if(e.key){var t=u0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=_i(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?s0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Iu,charCode:function(e){return e.type==="keypress"?_i(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?_i(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),f0=st(d0),o0=M({},Ui,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sr=st(o0),m0=M({},Tn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Iu}),h0=st(m0),x0=M({},da,{propertyName:0,elapsedTime:0,pseudoElement:0}),v0=st(x0),b0=M({},Ui,{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}),g0=st(b0),y0=M({},da,{newState:0,oldState:0}),p0=st(y0),S0=[9,13,27,32],Pu=Xt&&"CompositionEvent"in window,zn=null;Xt&&"documentMode"in document&&(zn=document.documentMode);var N0=Xt&&"TextEvent"in window&&!zn,cr=Xt&&(!Pu||zn&&8<zn&&11>=zn),rr=" ",dr=!1;function fr(e,t){switch(e){case"keyup":return S0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function or(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ha=!1;function j0(e,t){switch(e){case"compositionend":return or(t);case"keypress":return t.which!==32?null:(dr=!0,rr);case"textInput":return e=t.data,e===rr&&dr?null:e;default:return null}}function T0(e,t){if(Ha)return e==="compositionend"||!Pu&&fr(e,t)?(e=ar(),Di=ra=tt=null,Ha=!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 cr&&t.locale!=="ko"?null:t.data;default:return null}}var A0={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 mr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!A0[e.type]:t==="textarea"}function hr(e,t,l,a){It?ut?ut.push(a):ut=[a]:It=a,t=Nu(t,"onChange"),0<t.length&&(l=new Oi("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var En=null,Cn=null;function z0(e){Ff(e,0)}function qi(e){var t=J(e);if(Si(t))return e}function xr(e,t){if(e==="change")return t}var vr=!1;if(Xt){var es;if(Xt){var ts="oninput"in document;if(!ts){var br=document.createElement("div");br.setAttribute("oninput","return;"),ts=typeof br.oninput=="function"}es=ts}else es=!1;vr=es&&(!document.documentMode||9<document.documentMode)}function gr(){En&&(En.detachEvent("onpropertychange",yr),Cn=En=null)}function yr(e){if(e.propertyName==="value"&&qi(Cn)){var t=[];hr(t,Cn,e,Re(e)),Ci(z0,t)}}function E0(e,t,l){e==="focusin"?(gr(),En=t,Cn=l,En.attachEvent("onpropertychange",yr)):e==="focusout"&&gr()}function C0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return qi(Cn)}function D0(e,t){if(e==="click")return qi(t)}function _0(e,t){if(e==="input"||e==="change")return qi(t)}function M0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var xt=typeof Object.is=="function"?Object.is:M0;function Dn(e,t){if(xt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var n=l[a];if(!oi.call(t,n)||!xt(e[n],t[n]))return!1}return!0}function pr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Sr(e,t){var l=pr(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=pr(l)}}function Nr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Nr(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ba(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=Ba(e.document)}return t}function ls(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 O0=Xt&&"documentMode"in document&&11>=document.documentMode,Ra=null,as=null,_n=null,ns=!1;function Tr(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;ns||Ra==null||Ra!==Ba(a)||(a=Ra,"selectionStart"in a&&ls(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}),_n&&Dn(_n,a)||(_n=a,a=Nu(as,"onSelect"),0<a.length&&(t=new Oi("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=Ra)))}function fa(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var La={animationend:fa("Animation","AnimationEnd"),animationiteration:fa("Animation","AnimationIteration"),animationstart:fa("Animation","AnimationStart"),transitionrun:fa("Transition","TransitionRun"),transitionstart:fa("Transition","TransitionStart"),transitioncancel:fa("Transition","TransitionCancel"),transitionend:fa("Transition","TransitionEnd")},is={},Ar={};Xt&&(Ar=document.createElement("div").style,"AnimationEvent"in window||(delete La.animationend.animation,delete La.animationiteration.animation,delete La.animationstart.animation),"TransitionEvent"in window||delete La.transitionend.transition);function oa(e){if(is[e])return is[e];if(!La[e])return e;var t=La[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Ar)return is[e]=t[l];return e}var zr=oa("animationend"),Er=oa("animationiteration"),Cr=oa("animationstart"),U0=oa("transitionrun"),q0=oa("transitionstart"),B0=oa("transitioncancel"),Dr=oa("transitionend"),_r=new Map,us="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(" ");us.push("scrollEnd");function Zt(e,t){_r.set(e,t),We(t,[e])}var Bi=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)},At=[],wa=0,ss=0;function Hi(){for(var e=wa,t=ss=wa=0;t<e;){var l=At[t];At[t++]=null;var a=At[t];At[t++]=null;var n=At[t];At[t++]=null;var i=At[t];if(At[t++]=null,a!==null&&n!==null){var s=a.pending;s===null?n.next=n:(n.next=s.next,s.next=n),a.pending=n}i!==0&&Mr(l,n,i)}}function Ri(e,t,l,a){At[wa++]=e,At[wa++]=t,At[wa++]=l,At[wa++]=a,ss|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function cs(e,t,l,a){return Ri(e,t,l,a),Li(e)}function ma(e,t){return Ri(e,null,null,t),Li(e)}function Mr(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!1,i=e.return;i!==null;)i.childLanes|=l,a=i.alternate,a!==null&&(a.childLanes|=l),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(n=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,n&&t!==null&&(n=31-et(l),e=i.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),i):null}function Li(e){if(50<In)throw In=0,bc=null,Error(b(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ya={};function H0(e,t,l,a){this.tag=e,this.key=l,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 vt(e,t,l,a){return new H0(e,t,l,a)}function rs(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ul(e,t){var l=e.alternate;return l===null?(l=vt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Or(e,t){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function wi(e,t,l,a,n,i){var s=0;if(a=e,typeof e=="function")rs(e)&&(s=1);else if(typeof e=="string")s=Gm(e,l,Ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case Bt:return e=vt(31,l,t,n),e.elementType=Bt,e.lanes=i,e;case ze:return ha(l.children,n,i,t);case K:s=8,n|=24;break;case al:return e=vt(12,l,t,n|2),e.elementType=al,e.lanes=i,e;case qt:return e=vt(13,l,t,n),e.elementType=qt,e.lanes=i,e;case mt:return e=vt(19,l,t,n),e.elementType=mt,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case we:s=10;break e;case Ie:s=9;break e;case Jt:s=11;break e;case Nt:s=14;break e;case Pe:s=16,a=null;break e}s=29,l=Error(b(130,e===null?"null":typeof e,"")),a=null}return t=vt(s,l,t,n),t.elementType=e,t.type=a,t.lanes=i,t}function ha(e,t,l,a){return e=vt(7,e,a,t),e.lanes=l,e}function ds(e,t,l){return e=vt(6,e,null,t),e.lanes=l,e}function Ur(e){var t=vt(18,null,null,0);return t.stateNode=e,t}function fs(e,t,l){return t=vt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var qr=new WeakMap;function zt(e,t){if(typeof e=="object"&&e!==null){var l=qr.get(e);return l!==void 0?l:(t={value:e,source:t,stack:fi(t)},qr.set(e,t),t)}return{value:e,source:t,stack:fi(t)}}var Ga=[],Qa=0,Yi=null,Mn=0,Et=[],Ct=0,Ml=null,Pt=1,el="";function sl(e,t){Ga[Qa++]=Mn,Ga[Qa++]=Yi,Yi=e,Mn=t}function Br(e,t,l){Et[Ct++]=Pt,Et[Ct++]=el,Et[Ct++]=Ml,Ml=e;var a=Pt;e=el;var n=32-et(a)-1;a&=~(1<<n),l+=1;var i=32-et(t)+n;if(30<i){var s=n-n%5;i=(a&(1<<s)-1).toString(32),a>>=s,n-=s,Pt=1<<32-et(t)+n|l<<n|a,el=i+e}else Pt=1<<i|l<<n|a,el=e}function os(e){e.return!==null&&(sl(e,1),Br(e,1,0))}function ms(e){for(;e===Yi;)Yi=Ga[--Qa],Ga[Qa]=null,Mn=Ga[--Qa],Ga[Qa]=null;for(;e===Ml;)Ml=Et[--Ct],Et[Ct]=null,el=Et[--Ct],Et[Ct]=null,Pt=Et[--Ct],Et[Ct]=null}function Hr(e,t){Et[Ct++]=Pt,Et[Ct++]=el,Et[Ct++]=Ml,Pt=t.id,el=t.overflow,Ml=e}var Qe=null,be=null,W=!1,Ol=null,Dt=!1,hs=Error(b(519));function Ul(e){var t=Error(b(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw On(zt(t,e)),hs}function Rr(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Me]=e,t[Ne]=a,l){case"dialog":V("cancel",t),V("close",t);break;case"iframe":case"object":case"embed":V("load",t);break;case"video":case"audio":for(l=0;l<ei.length;l++)V(ei[l],t);break;case"source":V("error",t);break;case"img":case"image":case"link":V("error",t),V("load",t);break;case"details":V("toggle",t);break;case"input":V("invalid",t),ji(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":V("invalid",t);break;case"textarea":V("invalid",t),Ju(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||to(t.textContent,l)?(a.popover!=null&&(V("beforetoggle",t),V("toggle",t)),a.onScroll!=null&&V("scroll",t),a.onScrollEnd!=null&&V("scrollend",t),a.onClick!=null&&(t.onclick=ee),t=!0):t=!1,t||Ul(e,!0)}function Lr(e){for(Qe=e.return;Qe;)switch(Qe.tag){case 5:case 31:case 13:Dt=!1;return;case 27:case 3:Dt=!0;return;default:Qe=Qe.return}}function Xa(e){if(e!==Qe)return!1;if(!W)return Lr(e),W=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Oc(e.type,e.memoizedProps)),l=!l),l&&be&&Ul(e),Lr(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(b(317));be=fo(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(b(317));be=fo(e)}else t===27?(t=be,Jl(e.type)?(e=Rc,Rc=null,be=e):be=t):be=Qe?Mt(e.stateNode.nextSibling):null;return!0}function xa(){be=Qe=null,W=!1}function xs(){var e=Ol;return e!==null&&(ft===null?ft=e:ft.push.apply(ft,e),Ol=null),e}function On(e){Ol===null?Ol=[e]:Ol.push(e)}var vs=Ye(null),va=null,cl=null;function ql(e,t,l){P(vs,t._currentValue),t._currentValue=l}function rl(e){e._currentValue=vs.current,re(vs)}function bs(e,t,l){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===l)break;e=e.return}}function gs(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var i=n.dependencies;if(i!==null){var s=n.child;i=i.firstContext;e:for(;i!==null;){var r=i;i=n;for(var d=0;d<t.length;d++)if(r.context===t[d]){i.lanes|=l,r=i.alternate,r!==null&&(r.lanes|=l),bs(i.return,l,e),a||(s=null);break e}i=r.next}}else if(n.tag===18){if(s=n.return,s===null)throw Error(b(341));s.lanes|=l,i=s.alternate,i!==null&&(i.lanes|=l),bs(s,l,e),s=null}else s=n.child;if(s!==null)s.return=n;else for(s=n;s!==null;){if(s===e){s=null;break}if(n=s.sibling,n!==null){n.return=s.return,s=n;break}s=s.return}n=s}}function Za(e,t,l,a){e=null;for(var n=t,i=!1;n!==null;){if(!i){if((n.flags&524288)!==0)i=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var s=n.alternate;if(s===null)throw Error(b(387));if(s=s.memoizedProps,s!==null){var r=n.type;xt(n.pendingProps.value,s.value)||(e!==null?e.push(r):e=[r])}}else if(n===ta.current){if(s=n.alternate,s===null)throw Error(b(387));s.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(ii):e=[ii])}n=n.return}e!==null&&gs(t,e,l,a),t.flags|=262144}function Gi(e){for(e=e.firstContext;e!==null;){if(!xt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ba(e){va=e,cl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Xe(e){return wr(va,e)}function Qi(e,t){return va===null&&ba(e),wr(e,t)}function wr(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},cl===null){if(e===null)throw Error(b(308));cl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else cl=cl.next=t;return l}var R0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},L0=j.unstable_scheduleCallback,w0=j.unstable_NormalPriority,Oe={$$typeof:we,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ys(){return{controller:new R0,data:new Map,refCount:0}}function Un(e){e.refCount--,e.refCount===0&&L0(w0,function(){e.controller.abort()})}var qn=null,ps=0,Va=0,Ka=null;function Y0(e,t){if(qn===null){var l=qn=[];ps=0,Va=jc(),Ka={status:"pending",value:void 0,then:function(a){l.push(a)}}}return ps++,t.then(Yr,Yr),t}function Yr(){if(--ps===0&&qn!==null){Ka!==null&&(Ka.status="fulfilled");var e=qn;qn=null,Va=0,Ka=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function G0(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var n=0;n<l.length;n++)(0,l[n])(t)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var Gr=p.S;p.S=function(e,t){Af=Je(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Y0(e,t),Gr!==null&&Gr(e,t)};var ga=Ye(null);function Ss(){var e=ga.current;return e!==null?e:he.pooledCache}function Xi(e,t){t===null?P(ga,ga.current):P(ga,t.pool)}function Qr(){var e=Ss();return e===null?null:{parent:Oe._currentValue,pool:e}}var Ja=Error(b(460)),Ns=Error(b(474)),Zi=Error(b(542)),Vi={then:function(){}};function Xr(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Zr(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(ee,ee),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Kr(e),e;default:if(typeof t.status=="string")t.then(ee,ee);else{if(e=he,e!==null&&100<e.shellSuspendCounter)throw Error(b(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=a}},function(a){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Kr(e),e}throw pa=t,Ja}}function ya(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(pa=l,Ja):l}}var pa=null;function Vr(){if(pa===null)throw Error(b(459));var e=pa;return pa=null,e}function Kr(e){if(e===Ja||e===Zi)throw Error(b(483))}var ka=null,Bn=0;function Ki(e){var t=Bn;return Bn+=1,ka===null&&(ka=[]),Zr(ka,e,t)}function Hn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ji(e,t){throw t.$$typeof===I?Error(b(525)):(e=Object.prototype.toString.call(t),Error(b(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Jr(e){function t(o,f){if(e){var m=o.deletions;m===null?(o.deletions=[f],o.flags|=16):m.push(f)}}function l(o,f){if(!e)return null;for(;f!==null;)t(o,f),f=f.sibling;return null}function a(o){for(var f=new Map;o!==null;)o.key!==null?f.set(o.key,o):f.set(o.index,o),o=o.sibling;return f}function n(o,f){return o=ul(o,f),o.index=0,o.sibling=null,o}function i(o,f,m){return o.index=m,e?(m=o.alternate,m!==null?(m=m.index,m<f?(o.flags|=67108866,f):m):(o.flags|=67108866,f)):(o.flags|=1048576,f)}function s(o){return e&&o.alternate===null&&(o.flags|=67108866),o}function r(o,f,m,y){return f===null||f.tag!==6?(f=ds(m,o.mode,y),f.return=o,f):(f=n(f,m),f.return=o,f)}function d(o,f,m,y){var O=m.type;return O===ze?g(o,f,m.props.children,y,m.key):f!==null&&(f.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Pe&&ya(O)===f.type)?(f=n(f,m.props),Hn(f,m),f.return=o,f):(f=wi(m.type,m.key,m.props,null,o.mode,y),Hn(f,m),f.return=o,f)}function h(o,f,m,y){return f===null||f.tag!==4||f.stateNode.containerInfo!==m.containerInfo||f.stateNode.implementation!==m.implementation?(f=fs(m,o.mode,y),f.return=o,f):(f=n(f,m.children||[]),f.return=o,f)}function g(o,f,m,y,O){return f===null||f.tag!==7?(f=ha(m,o.mode,y,O),f.return=o,f):(f=n(f,m),f.return=o,f)}function S(o,f,m){if(typeof f=="string"&&f!==""||typeof f=="number"||typeof f=="bigint")return f=ds(""+f,o.mode,m),f.return=o,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case Ut:return m=wi(f.type,f.key,f.props,null,o.mode,m),Hn(m,f),m.return=o,m;case ve:return f=fs(f,o.mode,m),f.return=o,f;case Pe:return f=ya(f),S(o,f,m)}if(jt(f)||at(f))return f=ha(f,o.mode,m,null),f.return=o,f;if(typeof f.then=="function")return S(o,Ki(f),m);if(f.$$typeof===we)return S(o,Qi(o,f),m);Ji(o,f)}return null}function x(o,f,m,y){var O=f!==null?f.key:null;if(typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint")return O!==null?null:r(o,f,""+m,y);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Ut:return m.key===O?d(o,f,m,y):null;case ve:return m.key===O?h(o,f,m,y):null;case Pe:return m=ya(m),x(o,f,m,y)}if(jt(m)||at(m))return O!==null?null:g(o,f,m,y,null);if(typeof m.then=="function")return x(o,f,Ki(m),y);if(m.$$typeof===we)return x(o,f,Qi(o,m),y);Ji(o,m)}return null}function v(o,f,m,y,O){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return o=o.get(m)||null,r(f,o,""+y,O);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ut:return o=o.get(y.key===null?m:y.key)||null,d(f,o,y,O);case ve:return o=o.get(y.key===null?m:y.key)||null,h(f,o,y,O);case Pe:return y=ya(y),v(o,f,m,y,O)}if(jt(y)||at(y))return o=o.get(m)||null,g(f,o,y,O,null);if(typeof y.then=="function")return v(o,f,m,Ki(y),O);if(y.$$typeof===we)return v(o,f,m,Qi(f,y),O);Ji(f,y)}return null}function C(o,f,m,y){for(var O=null,te=null,D=f,Q=f=0,$=null;D!==null&&Q<m.length;Q++){D.index>Q?($=D,D=null):$=D.sibling;var le=x(o,D,m[Q],y);if(le===null){D===null&&(D=$);break}e&&D&&le.alternate===null&&t(o,D),f=i(le,f,Q),te===null?O=le:te.sibling=le,te=le,D=$}if(Q===m.length)return l(o,D),W&&sl(o,Q),O;if(D===null){for(;Q<m.length;Q++)D=S(o,m[Q],y),D!==null&&(f=i(D,f,Q),te===null?O=D:te.sibling=D,te=D);return W&&sl(o,Q),O}for(D=a(D);Q<m.length;Q++)$=v(D,o,Q,m[Q],y),$!==null&&(e&&$.alternate!==null&&D.delete($.key===null?Q:$.key),f=i($,f,Q),te===null?O=$:te.sibling=$,te=$);return e&&D.forEach(function(Il){return t(o,Il)}),W&&sl(o,Q),O}function q(o,f,m,y){if(m==null)throw Error(b(151));for(var O=null,te=null,D=f,Q=f=0,$=null,le=m.next();D!==null&&!le.done;Q++,le=m.next()){D.index>Q?($=D,D=null):$=D.sibling;var Il=x(o,D,le.value,y);if(Il===null){D===null&&(D=$);break}e&&D&&Il.alternate===null&&t(o,D),f=i(Il,f,Q),te===null?O=Il:te.sibling=Il,te=Il,D=$}if(le.done)return l(o,D),W&&sl(o,Q),O;if(D===null){for(;!le.done;Q++,le=m.next())le=S(o,le.value,y),le!==null&&(f=i(le,f,Q),te===null?O=le:te.sibling=le,te=le);return W&&sl(o,Q),O}for(D=a(D);!le.done;Q++,le=m.next())le=v(D,o,Q,le.value,y),le!==null&&(e&&le.alternate!==null&&D.delete(le.key===null?Q:le.key),f=i(le,f,Q),te===null?O=le:te.sibling=le,te=le);return e&&D.forEach(function(Im){return t(o,Im)}),W&&sl(o,Q),O}function oe(o,f,m,y){if(typeof m=="object"&&m!==null&&m.type===ze&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Ut:e:{for(var O=m.key;f!==null;){if(f.key===O){if(O=m.type,O===ze){if(f.tag===7){l(o,f.sibling),y=n(f,m.props.children),y.return=o,o=y;break e}}else if(f.elementType===O||typeof O=="object"&&O!==null&&O.$$typeof===Pe&&ya(O)===f.type){l(o,f.sibling),y=n(f,m.props),Hn(y,m),y.return=o,o=y;break e}l(o,f);break}else t(o,f);f=f.sibling}m.type===ze?(y=ha(m.props.children,o.mode,y,m.key),y.return=o,o=y):(y=wi(m.type,m.key,m.props,null,o.mode,y),Hn(y,m),y.return=o,o=y)}return s(o);case ve:e:{for(O=m.key;f!==null;){if(f.key===O)if(f.tag===4&&f.stateNode.containerInfo===m.containerInfo&&f.stateNode.implementation===m.implementation){l(o,f.sibling),y=n(f,m.children||[]),y.return=o,o=y;break e}else{l(o,f);break}else t(o,f);f=f.sibling}y=fs(m,o.mode,y),y.return=o,o=y}return s(o);case Pe:return m=ya(m),oe(o,f,m,y)}if(jt(m))return C(o,f,m,y);if(at(m)){if(O=at(m),typeof O!="function")throw Error(b(150));return m=O.call(m),q(o,f,m,y)}if(typeof m.then=="function")return oe(o,f,Ki(m),y);if(m.$$typeof===we)return oe(o,f,Qi(o,m),y);Ji(o,m)}return typeof m=="string"&&m!==""||typeof m=="number"||typeof m=="bigint"?(m=""+m,f!==null&&f.tag===6?(l(o,f.sibling),y=n(f,m),y.return=o,o=y):(l(o,f),y=ds(m,o.mode,y),y.return=o,o=y),s(o)):l(o,f)}return function(o,f,m,y){try{Bn=0;var O=oe(o,f,m,y);return ka=null,O}catch(D){if(D===Ja||D===Zi)throw D;var te=vt(29,D,null,o.mode);return te.lanes=y,te.return=o,te}finally{}}}var Sa=Jr(!0),kr=Jr(!1),Bl=!1;function js(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ts(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 Hl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Rl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(ae&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=Li(e),Mr(e,null,l),t}return Ri(e,a,t,l),Li(e)}function Rn(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Al(e,l)}}function As(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var s={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?n=i=s:i=i.next=s,l=l.next}while(l!==null);i===null?n=i=t:i=i.next=t}else n=i=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:i,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var zs=!1;function Ln(){if(zs){var e=Ka;if(e!==null)throw e}}function wn(e,t,l,a){zs=!1;var n=e.updateQueue;Bl=!1;var i=n.firstBaseUpdate,s=n.lastBaseUpdate,r=n.shared.pending;if(r!==null){n.shared.pending=null;var d=r,h=d.next;d.next=null,s===null?i=h:s.next=h,s=d;var g=e.alternate;g!==null&&(g=g.updateQueue,r=g.lastBaseUpdate,r!==s&&(r===null?g.firstBaseUpdate=h:r.next=h,g.lastBaseUpdate=d))}if(i!==null){var S=n.baseState;s=0,g=h=d=null,r=i;do{var x=r.lane&-536870913,v=x!==r.lane;if(v?(k&x)===x:(a&x)===x){x!==0&&x===Va&&(zs=!0),g!==null&&(g=g.next={lane:0,tag:r.tag,payload:r.payload,callback:null,next:null});e:{var C=e,q=r;x=t;var oe=l;switch(q.tag){case 1:if(C=q.payload,typeof C=="function"){S=C.call(oe,S,x);break e}S=C;break e;case 3:C.flags=C.flags&-65537|128;case 0:if(C=q.payload,x=typeof C=="function"?C.call(oe,S,x):C,x==null)break e;S=M({},S,x);break e;case 2:Bl=!0}}x=r.callback,x!==null&&(e.flags|=64,v&&(e.flags|=8192),v=n.callbacks,v===null?n.callbacks=[x]:v.push(x))}else v={lane:x,tag:r.tag,payload:r.payload,callback:r.callback,next:null},g===null?(h=g=v,d=S):g=g.next=v,s|=x;if(r=r.next,r===null){if(r=n.shared.pending,r===null)break;v=r,r=v.next,v.next=null,n.lastBaseUpdate=v,n.shared.pending=null}}while(!0);g===null&&(d=S),n.baseState=d,n.firstBaseUpdate=h,n.lastBaseUpdate=g,i===null&&(n.shared.lanes=0),Ql|=s,e.lanes=s,e.memoizedState=S}}function $r(e,t){if(typeof e!="function")throw Error(b(191,e));e.call(t)}function Wr(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)$r(l[e],t)}var $a=Ye(null),ki=Ye(0);function Fr(e,t){e=gl,P(ki,e),P($a,t),gl=e|t.baseLanes}function Es(){P(ki,gl),P($a,$a.current)}function Cs(){gl=ki.current,re($a),re(ki)}var bt=Ye(null),_t=null;function Ll(e){var t=e.alternate;P(Ce,Ce.current&1),P(bt,e),_t===null&&(t===null||$a.current!==null||t.memoizedState!==null)&&(_t=e)}function Ds(e){P(Ce,Ce.current),P(bt,e),_t===null&&(_t=e)}function Ir(e){e.tag===22?(P(Ce,Ce.current),P(bt,e),_t===null&&(_t=e)):wl()}function wl(){P(Ce,Ce.current),P(bt,bt.current)}function gt(e){re(bt),_t===e&&(_t=null),re(Ce)}var Ce=Ye(0);function $i(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Bc(l)||Hc(l)))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 dl=0,Y=null,de=null,Ue=null,Wi=!1,Wa=!1,Na=!1,Fi=0,Yn=0,Fa=null,Q0=0;function Te(){throw Error(b(321))}function _s(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!xt(e[l],t[l]))return!1;return!0}function Ms(e,t,l,a,n,i){return dl=i,Y=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,p.H=e===null||e.memoizedState===null?Bd:Ks,Na=!1,i=l(a,n),Na=!1,Wa&&(i=ed(t,l,a,n)),Pr(e),i}function Pr(e){p.H=Xn;var t=de!==null&&de.next!==null;if(dl=0,Ue=de=Y=null,Wi=!1,Yn=0,Fa=null,t)throw Error(b(300));e===null||qe||(e=e.dependencies,e!==null&&Gi(e)&&(qe=!0))}function ed(e,t,l,a){Y=e;var n=0;do{if(Wa&&(Fa=null),Yn=0,Wa=!1,25<=n)throw Error(b(301));if(n+=1,Ue=de=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}p.H=Hd,i=t(l,a)}while(Wa);return i}function X0(){var e=p.H,t=e.useState()[0];return t=typeof t.then=="function"?Gn(t):t,e=e.useState()[0],(de!==null?de.memoizedState:null)!==e&&(Y.flags|=1024),t}function Os(){var e=Fi!==0;return Fi=0,e}function Us(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function qs(e){if(Wi){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Wi=!1}dl=0,Ue=de=Y=null,Wa=!1,Yn=Fi=0,Fa=null}function lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ue===null?Y.memoizedState=Ue=e:Ue=Ue.next=e,Ue}function De(){if(de===null){var e=Y.alternate;e=e!==null?e.memoizedState:null}else e=de.next;var t=Ue===null?Y.memoizedState:Ue.next;if(t!==null)Ue=t,de=e;else{if(e===null)throw Y.alternate===null?Error(b(467)):Error(b(310));de=e,e={memoizedState:de.memoizedState,baseState:de.baseState,baseQueue:de.baseQueue,queue:de.queue,next:null},Ue===null?Y.memoizedState=Ue=e:Ue=Ue.next=e}return Ue}function Ii(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Gn(e){var t=Yn;return Yn+=1,Fa===null&&(Fa=[]),e=Zr(Fa,e,t),t=Y,(Ue===null?t.memoizedState:Ue.next)===null&&(t=t.alternate,p.H=t===null||t.memoizedState===null?Bd:Ks),e}function Pi(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Gn(e);if(e.$$typeof===we)return Xe(e)}throw Error(b(438,String(e)))}function Bs(e){var t=null,l=Y.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=Y.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Ii(),Y.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=ea;return t.index++,l}function fl(e,t){return typeof t=="function"?t(e):t}function eu(e){var t=De();return Hs(t,de,e)}function Hs(e,t,l){var a=e.queue;if(a===null)throw Error(b(311));a.lastRenderedReducer=l;var n=e.baseQueue,i=a.pending;if(i!==null){if(n!==null){var s=n.next;n.next=i.next,i.next=s}t.baseQueue=n=i,a.pending=null}if(i=e.baseState,n===null)e.memoizedState=i;else{t=n.next;var r=s=null,d=null,h=t,g=!1;do{var S=h.lane&-536870913;if(S!==h.lane?(k&S)===S:(dl&S)===S){var x=h.revertLane;if(x===0)d!==null&&(d=d.next={lane:0,revertLane:0,gesture:null,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null}),S===Va&&(g=!0);else if((dl&x)===x){h=h.next,x===Va&&(g=!0);continue}else S={lane:0,revertLane:h.revertLane,gesture:null,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null},d===null?(r=d=S,s=i):d=d.next=S,Y.lanes|=x,Ql|=x;S=h.action,Na&&l(i,S),i=h.hasEagerState?h.eagerState:l(i,S)}else x={lane:S,revertLane:h.revertLane,gesture:h.gesture,action:h.action,hasEagerState:h.hasEagerState,eagerState:h.eagerState,next:null},d===null?(r=d=x,s=i):d=d.next=x,Y.lanes|=S,Ql|=S;h=h.next}while(h!==null&&h!==t);if(d===null?s=i:d.next=r,!xt(i,e.memoizedState)&&(qe=!0,g&&(l=Ka,l!==null)))throw l;e.memoizedState=i,e.baseState=s,e.baseQueue=d,a.lastRenderedState=i}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Rs(e){var t=De(),l=t.queue;if(l===null)throw Error(b(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,i=t.memoizedState;if(n!==null){l.pending=null;var s=n=n.next;do i=e(i,s.action),s=s.next;while(s!==n);xt(i,t.memoizedState)||(qe=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),l.lastRenderedState=i}return[i,a]}function td(e,t,l){var a=Y,n=De(),i=W;if(i){if(l===void 0)throw Error(b(407));l=l()}else l=t();var s=!xt((de||n).memoizedState,l);if(s&&(n.memoizedState=l,qe=!0),n=n.queue,Ys(nd.bind(null,a,n,e),[e]),n.getSnapshot!==t||s||Ue!==null&&Ue.memoizedState.tag&1){if(a.flags|=2048,Ia(9,{destroy:void 0},ad.bind(null,a,n,l,t),null),he===null)throw Error(b(349));i||(dl&127)!==0||ld(a,t,l)}return l}function ld(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=Y.updateQueue,t===null?(t=Ii(),Y.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function ad(e,t,l,a){t.value=l,t.getSnapshot=a,id(t)&&ud(e)}function nd(e,t,l){return l(function(){id(t)&&ud(e)})}function id(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!xt(e,l)}catch{return!0}}function ud(e){var t=ma(e,2);t!==null&&ot(t,e,2)}function Ls(e){var t=lt();if(typeof e=="function"){var l=e;if(e=l(),Na){Yt(!0);try{l()}finally{Yt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:e},t}function sd(e,t,l,a){return e.baseState=l,Hs(e,de,typeof a=="function"?a:fl)}function Z0(e,t,l,a,n){if(au(e))throw Error(b(485));if(e=t.action,e!==null){var i={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(s){i.listeners.push(s)}};p.T!==null?l(!0):i.isTransition=!1,a(i),l=t.pending,l===null?(i.next=t.pending=i,cd(t,i)):(i.next=l.next,t.pending=l.next=i)}}function cd(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var i=p.T,s={};p.T=s;try{var r=l(n,a),d=p.S;d!==null&&d(s,r),rd(e,t,r)}catch(h){ws(e,t,h)}finally{i!==null&&s.types!==null&&(i.types=s.types),p.T=i}}else try{i=l(n,a),rd(e,t,i)}catch(h){ws(e,t,h)}}function rd(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){dd(e,t,a)},function(a){return ws(e,t,a)}):dd(e,t,l)}function dd(e,t,l){t.status="fulfilled",t.value=l,fd(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,cd(e,l)))}function ws(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,fd(t),t=t.next;while(t!==a)}e.action=null}function fd(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function od(e,t){return t}function md(e,t){if(W){var l=he.formState;if(l!==null){e:{var a=Y;if(W){if(be){t:{for(var n=be,i=Dt;n.nodeType!==8;){if(!i){n=null;break t}if(n=Mt(n.nextSibling),n===null){n=null;break t}}i=n.data,n=i==="F!"||i==="F"?n:null}if(n){be=Mt(n.nextSibling),a=n.data==="F!";break e}}Ul(a)}a=!1}a&&(t=l[0])}}return l=lt(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:od,lastRenderedState:t},l.queue=a,l=Od.bind(null,Y,a),a.dispatch=l,a=Ls(!1),i=Vs.bind(null,Y,!1,a.queue),a=lt(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=Z0.bind(null,Y,n,i,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function hd(e){var t=De();return xd(t,de,e)}function xd(e,t,l){if(t=Hs(e,t,od)[0],e=eu(fl)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Gn(t)}catch(s){throw s===Ja?Zi:s}else a=t;t=De();var n=t.queue,i=n.dispatch;return l!==t.memoizedState&&(Y.flags|=2048,Ia(9,{destroy:void 0},V0.bind(null,n,l),null)),[a,i,e]}function V0(e,t){e.action=t}function vd(e){var t=De(),l=de;if(l!==null)return xd(t,l,e);De(),t=t.memoizedState,l=De();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Ia(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=Y.updateQueue,t===null&&(t=Ii(),Y.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function bd(){return De().memoizedState}function tu(e,t,l,a){var n=lt();Y.flags|=e,n.memoizedState=Ia(1|t,{destroy:void 0},l,a===void 0?null:a)}function lu(e,t,l,a){var n=De();a=a===void 0?null:a;var i=n.memoizedState.inst;de!==null&&a!==null&&_s(a,de.memoizedState.deps)?n.memoizedState=Ia(t,i,l,a):(Y.flags|=e,n.memoizedState=Ia(1|t,i,l,a))}function gd(e,t){tu(8390656,8,e,t)}function Ys(e,t){lu(2048,8,e,t)}function K0(e){Y.flags|=4;var t=Y.updateQueue;if(t===null)t=Ii(),Y.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function yd(e){var t=De().memoizedState;return K0({ref:t,nextImpl:e}),function(){if((ae&2)!==0)throw Error(b(440));return t.impl.apply(void 0,arguments)}}function pd(e,t){return lu(4,2,e,t)}function Sd(e,t){return lu(4,4,e,t)}function Nd(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function jd(e,t,l){l=l!=null?l.concat([e]):null,lu(4,4,Nd.bind(null,t,e),l)}function Gs(){}function Td(e,t){var l=De();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&_s(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function Ad(e,t){var l=De();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&_s(t,a[1]))return a[0];if(a=e(),Na){Yt(!0);try{e()}finally{Yt(!1)}}return l.memoizedState=[a,t],a}function Qs(e,t,l){return l===void 0||(dl&1073741824)!==0&&(k&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Ef(),Y.lanes|=e,Ql|=e,l)}function zd(e,t,l,a){return xt(l,t)?l:$a.current!==null?(e=Qs(e,l,a),xt(e,t)||(qe=!0),e):(dl&42)===0||(dl&1073741824)!==0&&(k&261930)===0?(qe=!0,e.memoizedState=l):(e=Ef(),Y.lanes|=e,Ql|=e,t)}function Ed(e,t,l,a,n){var i=A.p;A.p=i!==0&&8>i?i:8;var s=p.T,r={};p.T=r,Vs(e,!1,t,l);try{var d=n(),h=p.S;if(h!==null&&h(r,d),d!==null&&typeof d=="object"&&typeof d.then=="function"){var g=G0(d,a);Qn(e,t,g,St(e))}else Qn(e,t,a,St(e))}catch(S){Qn(e,t,{then:function(){},status:"rejected",reason:S},St())}finally{A.p=i,s!==null&&r.types!==null&&(s.types=r.types),p.T=s}}function J0(){}function Xs(e,t,l,a){if(e.tag!==5)throw Error(b(476));var n=Cd(e).queue;Ed(e,n,t,U,l===null?J0:function(){return Dd(e),l(a)})}function Cd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:U,baseState:U,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:U},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Dd(e){var t=Cd(e);t.next===null&&(t=e.alternate.memoizedState),Qn(e,t.next.queue,{},St())}function Zs(){return Xe(ii)}function _d(){return De().memoizedState}function Md(){return De().memoizedState}function k0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=St();e=Hl(l);var a=Rl(t,e,l);a!==null&&(ot(a,t,l),Rn(a,t,l)),t={cache:ys()},e.payload=t;return}t=t.return}}function $0(e,t,l){var a=St();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},au(e)?Ud(t,l):(l=cs(e,t,l,a),l!==null&&(ot(l,e,a),qd(l,t,a)))}function Od(e,t,l){var a=St();Qn(e,t,l,a)}function Qn(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(au(e))Ud(t,n);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,r=i(s,l);if(n.hasEagerState=!0,n.eagerState=r,xt(r,s))return Ri(e,t,n,0),he===null&&Hi(),!1}catch{}finally{}if(l=cs(e,t,n,a),l!==null)return ot(l,e,a),qd(l,t,a),!0}return!1}function Vs(e,t,l,a){if(a={lane:2,revertLane:jc(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},au(e)){if(t)throw Error(b(479))}else t=cs(e,l,a,2),t!==null&&ot(t,e,2)}function au(e){var t=e.alternate;return e===Y||t!==null&&t===Y}function Ud(e,t){Wa=Wi=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function qd(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,Al(e,l)}}var Xn={readContext:Xe,use:Pi,useCallback:Te,useContext:Te,useEffect:Te,useImperativeHandle:Te,useLayoutEffect:Te,useInsertionEffect:Te,useMemo:Te,useReducer:Te,useRef:Te,useState:Te,useDebugValue:Te,useDeferredValue:Te,useTransition:Te,useSyncExternalStore:Te,useId:Te,useHostTransitionStatus:Te,useFormState:Te,useActionState:Te,useOptimistic:Te,useMemoCache:Te,useCacheRefresh:Te};Xn.useEffectEvent=Te;var Bd={readContext:Xe,use:Pi,useCallback:function(e,t){return lt().memoizedState=[e,t===void 0?null:t],e},useContext:Xe,useEffect:gd,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,tu(4194308,4,Nd.bind(null,t,e),l)},useLayoutEffect:function(e,t){return tu(4194308,4,e,t)},useInsertionEffect:function(e,t){tu(4,2,e,t)},useMemo:function(e,t){var l=lt();t=t===void 0?null:t;var a=e();if(Na){Yt(!0);try{e()}finally{Yt(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=lt();if(l!==void 0){var n=l(t);if(Na){Yt(!0);try{l(t)}finally{Yt(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=$0.bind(null,Y,e),[a.memoizedState,e]},useRef:function(e){var t=lt();return e={current:e},t.memoizedState=e},useState:function(e){e=Ls(e);var t=e.queue,l=Od.bind(null,Y,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Gs,useDeferredValue:function(e,t){var l=lt();return Qs(l,e,t)},useTransition:function(){var e=Ls(!1);return e=Ed.bind(null,Y,e.queue,!0,!1),lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=Y,n=lt();if(W){if(l===void 0)throw Error(b(407));l=l()}else{if(l=t(),he===null)throw Error(b(349));(k&127)!==0||ld(a,t,l)}n.memoizedState=l;var i={value:l,getSnapshot:t};return n.queue=i,gd(nd.bind(null,a,i,e),[e]),a.flags|=2048,Ia(9,{destroy:void 0},ad.bind(null,a,i,l,t),null),l},useId:function(){var e=lt(),t=he.identifierPrefix;if(W){var l=el,a=Pt;l=(a&~(1<<32-et(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Fi++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=Q0++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Zs,useFormState:md,useActionState:md,useOptimistic:function(e){var t=lt();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Vs.bind(null,Y,!0,l),l.dispatch=t,[e,t]},useMemoCache:Bs,useCacheRefresh:function(){return lt().memoizedState=k0.bind(null,Y)},useEffectEvent:function(e){var t=lt(),l={impl:e};return t.memoizedState=l,function(){if((ae&2)!==0)throw Error(b(440));return l.impl.apply(void 0,arguments)}}},Ks={readContext:Xe,use:Pi,useCallback:Td,useContext:Xe,useEffect:Ys,useImperativeHandle:jd,useInsertionEffect:pd,useLayoutEffect:Sd,useMemo:Ad,useReducer:eu,useRef:bd,useState:function(){return eu(fl)},useDebugValue:Gs,useDeferredValue:function(e,t){var l=De();return zd(l,de.memoizedState,e,t)},useTransition:function(){var e=eu(fl)[0],t=De().memoizedState;return[typeof e=="boolean"?e:Gn(e),t]},useSyncExternalStore:td,useId:_d,useHostTransitionStatus:Zs,useFormState:hd,useActionState:hd,useOptimistic:function(e,t){var l=De();return sd(l,de,e,t)},useMemoCache:Bs,useCacheRefresh:Md};Ks.useEffectEvent=yd;var Hd={readContext:Xe,use:Pi,useCallback:Td,useContext:Xe,useEffect:Ys,useImperativeHandle:jd,useInsertionEffect:pd,useLayoutEffect:Sd,useMemo:Ad,useReducer:Rs,useRef:bd,useState:function(){return Rs(fl)},useDebugValue:Gs,useDeferredValue:function(e,t){var l=De();return de===null?Qs(l,e,t):zd(l,de.memoizedState,e,t)},useTransition:function(){var e=Rs(fl)[0],t=De().memoizedState;return[typeof e=="boolean"?e:Gn(e),t]},useSyncExternalStore:td,useId:_d,useHostTransitionStatus:Zs,useFormState:vd,useActionState:vd,useOptimistic:function(e,t){var l=De();return de!==null?sd(l,de,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Bs,useCacheRefresh:Md};Hd.useEffectEvent=yd;function Js(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:M({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var ks={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=St(),n=Hl(a);n.payload=t,l!=null&&(n.callback=l),t=Rl(e,n,a),t!==null&&(ot(t,e,a),Rn(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=St(),n=Hl(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=Rl(e,n,a),t!==null&&(ot(t,e,a),Rn(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=St(),a=Hl(l);a.tag=2,t!=null&&(a.callback=t),t=Rl(e,a,l),t!==null&&(ot(t,e,l),Rn(t,e,l))}};function Rd(e,t,l,a,n,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,s):t.prototype&&t.prototype.isPureReactComponent?!Dn(l,a)||!Dn(n,i):!0}function Ld(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&ks.enqueueReplaceState(t,t.state,null)}function ja(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=M({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function wd(e){Bi(e)}function Yd(e){console.error(e)}function Gd(e){Bi(e)}function nu(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Qd(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function $s(e,t,l){return l=Hl(l),l.tag=3,l.payload={element:null},l.callback=function(){nu(e,t)},l}function Xd(e){return e=Hl(e),e.tag=3,e}function Zd(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var i=a.value;e.payload=function(){return n(i)},e.callback=function(){Qd(t,l,a)}}var s=l.stateNode;s!==null&&typeof s.componentDidCatch=="function"&&(e.callback=function(){Qd(t,l,a),typeof n!="function"&&(Xl===null?Xl=new Set([this]):Xl.add(this));var r=a.stack;this.componentDidCatch(a.value,{componentStack:r!==null?r:""})})}function W0(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&Za(t,l,n,!0),l=bt.current,l!==null){switch(l.tag){case 31:case 13:return _t===null?vu():l.alternate===null&&Ae===0&&(Ae=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===Vi?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),pc(e,a,n)),!1;case 22:return l.flags|=65536,a===Vi?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),pc(e,a,n)),!1}throw Error(b(435,l.tag))}return pc(e,a,n),vu(),!1}if(W)return t=bt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==hs&&(e=Error(b(422),{cause:a}),On(zt(e,l)))):(a!==hs&&(t=Error(b(423),{cause:a}),On(zt(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=zt(a,l),n=$s(e.stateNode,a,n),As(e,n),Ae!==4&&(Ae=2)),!1;var i=Error(b(520),{cause:a});if(i=zt(i,l),Fn===null?Fn=[i]:Fn.push(i),Ae!==4&&(Ae=2),t===null)return!0;a=zt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=$s(l.stateNode,a,e),As(l,e),!1;case 1:if(t=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Xl===null||!Xl.has(i))))return l.flags|=65536,n&=-n,l.lanes|=n,n=Xd(n),Zd(n,e,l,a),As(l,n),!1}l=l.return}while(l!==null);return!1}var Ws=Error(b(461)),qe=!1;function Ze(e,t,l,a){t.child=e===null?kr(t,null,l,a):Sa(t,e.child,l,a)}function Vd(e,t,l,a,n){l=l.render;var i=t.ref;if("ref"in a){var s={};for(var r in a)r!=="ref"&&(s[r]=a[r])}else s=a;return ba(t),a=Ms(e,t,l,s,i,n),r=Os(),e!==null&&!qe?(Us(e,t,n),ol(e,t,n)):(W&&r&&os(t),t.flags|=1,Ze(e,t,a,n),t.child)}function Kd(e,t,l,a,n){if(e===null){var i=l.type;return typeof i=="function"&&!rs(i)&&i.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=i,Jd(e,t,i,a,n)):(e=wi(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!nc(e,n)){var s=i.memoizedProps;if(l=l.compare,l=l!==null?l:Dn,l(s,a)&&e.ref===t.ref)return ol(e,t,n)}return t.flags|=1,e=ul(i,a),e.ref=t.ref,e.return=t,t.child=e}function Jd(e,t,l,a,n){if(e!==null){var i=e.memoizedProps;if(Dn(i,a)&&e.ref===t.ref)if(qe=!1,t.pendingProps=a=i,nc(e,n))(e.flags&131072)!==0&&(qe=!0);else return t.lanes=e.lanes,ol(e,t,n)}return Fs(e,t,l,a,n)}function kd(e,t,l,a){var n=a.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,e!==null){for(a=t.child=e.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~i}else a=0,t.child=null;return $d(e,t,i,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xi(t,i!==null?i.cachePool:null),i!==null?Fr(t,i):Es(),Ir(t);else return a=t.lanes=536870912,$d(e,t,i!==null?i.baseLanes|l:l,l,a)}else i!==null?(Xi(t,i.cachePool),Fr(t,i),wl(),t.memoizedState=null):(e!==null&&Xi(t,null),Es(),wl());return Ze(e,t,n,l),t.child}function Zn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function $d(e,t,l,a,n){var i=Ss();return i=i===null?null:{parent:Oe._currentValue,pool:i},t.memoizedState={baseLanes:l,cachePool:i},e!==null&&Xi(t,null),Es(),Ir(t),e!==null&&Za(e,t,a,!0),t.childLanes=n,null}function iu(e,t){return t=su({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Wd(e,t,l){return Sa(t,e.child,null,l),e=iu(t,t.pendingProps),e.flags|=2,gt(t),t.memoizedState=null,e}function F0(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(W){if(a.mode==="hidden")return e=iu(t,a),t.lanes=536870912,Zn(null,e);if(Ds(t),(e=be)?(e=ro(e,Dt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ml!==null?{id:Pt,overflow:el}:null,retryLane:536870912,hydrationErrors:null},l=Ur(e),l.return=t,t.child=l,Qe=t,be=null)):e=null,e===null)throw Ul(t);return t.lanes=536870912,null}return iu(t,a)}var i=e.memoizedState;if(i!==null){var s=i.dehydrated;if(Ds(t),n)if(t.flags&256)t.flags&=-257,t=Wd(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(b(558));else if(qe||Za(e,t,l,!1),n=(l&e.childLanes)!==0,qe||n){if(a=he,a!==null&&(s=gn(a,l),s!==0&&s!==i.retryLane))throw i.retryLane=s,ma(e,s),ot(a,e,s),Ws;vu(),t=Wd(e,t,l)}else e=i.treeContext,be=Mt(s.nextSibling),Qe=t,W=!0,Ol=null,Dt=!1,e!==null&&Hr(t,e),t=iu(t,a),t.flags|=4096;return t}return e=ul(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function uu(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(b(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function Fs(e,t,l,a,n){return ba(t),l=Ms(e,t,l,a,void 0,n),a=Os(),e!==null&&!qe?(Us(e,t,n),ol(e,t,n)):(W&&a&&os(t),t.flags|=1,Ze(e,t,l,n),t.child)}function Fd(e,t,l,a,n,i){return ba(t),t.updateQueue=null,l=ed(t,a,l,n),Pr(e),a=Os(),e!==null&&!qe?(Us(e,t,i),ol(e,t,i)):(W&&a&&os(t),t.flags|=1,Ze(e,t,l,i),t.child)}function Id(e,t,l,a,n){if(ba(t),t.stateNode===null){var i=Ya,s=l.contextType;typeof s=="object"&&s!==null&&(i=Xe(s)),i=new l(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=ks,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},js(t),s=l.contextType,i.context=typeof s=="object"&&s!==null?Xe(s):Ya,i.state=t.memoizedState,s=l.getDerivedStateFromProps,typeof s=="function"&&(Js(t,l,s,a),i.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(s=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),s!==i.state&&ks.enqueueReplaceState(i,i.state,null),wn(t,a,i,n),Ln(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var r=t.memoizedProps,d=ja(l,r);i.props=d;var h=i.context,g=l.contextType;s=Ya,typeof g=="object"&&g!==null&&(s=Xe(g));var S=l.getDerivedStateFromProps;g=typeof S=="function"||typeof i.getSnapshotBeforeUpdate=="function",r=t.pendingProps!==r,g||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(r||h!==s)&&Ld(t,i,a,s),Bl=!1;var x=t.memoizedState;i.state=x,wn(t,a,i,n),Ln(),h=t.memoizedState,r||x!==h||Bl?(typeof S=="function"&&(Js(t,l,S,a),h=t.memoizedState),(d=Bl||Rd(t,l,d,a,x,h,s))?(g||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=h),i.props=a,i.state=h,i.context=s,a=d):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,Ts(e,t),s=t.memoizedProps,g=ja(l,s),i.props=g,S=t.pendingProps,x=i.context,h=l.contextType,d=Ya,typeof h=="object"&&h!==null&&(d=Xe(h)),r=l.getDerivedStateFromProps,(h=typeof r=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==S||x!==d)&&Ld(t,i,a,d),Bl=!1,x=t.memoizedState,i.state=x,wn(t,a,i,n),Ln();var v=t.memoizedState;s!==S||x!==v||Bl||e!==null&&e.dependencies!==null&&Gi(e.dependencies)?(typeof r=="function"&&(Js(t,l,r,a),v=t.memoizedState),(g=Bl||Rd(t,l,g,a,x,v,d)||e!==null&&e.dependencies!==null&&Gi(e.dependencies))?(h||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,v,d),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,v,d)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=v),i.props=a,i.state=v,i.context=d,a=g):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,uu(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=Sa(t,e.child,null,n),t.child=Sa(t,null,l,n)):Ze(e,t,l,n),t.memoizedState=i.state,e=t.child):e=ol(e,t,n),e}function Pd(e,t,l,a){return xa(),t.flags|=256,Ze(e,t,l,a),t.child}var Is={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ps(e){return{baseLanes:e,cachePool:Qr()}}function ec(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=pt),e}function ef(e,t,l){var a=t.pendingProps,n=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(Ce.current&2)!==0),s&&(n=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(W){if(n?Ll(t):wl(),(e=be)?(e=ro(e,Dt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ml!==null?{id:Pt,overflow:el}:null,retryLane:536870912,hydrationErrors:null},l=Ur(e),l.return=t,t.child=l,Qe=t,be=null)):e=null,e===null)throw Ul(t);return Hc(e)?t.lanes=32:t.lanes=536870912,null}var r=a.children;return a=a.fallback,n?(wl(),n=t.mode,r=su({mode:"hidden",children:r},n),a=ha(a,n,l,null),r.return=t,a.return=t,r.sibling=a,t.child=r,a=t.child,a.memoizedState=Ps(l),a.childLanes=ec(e,s,l),t.memoizedState=Is,Zn(null,a)):(Ll(t),tc(t,r))}var d=e.memoizedState;if(d!==null&&(r=d.dehydrated,r!==null)){if(i)t.flags&256?(Ll(t),t.flags&=-257,t=lc(e,t,l)):t.memoizedState!==null?(wl(),t.child=e.child,t.flags|=128,t=null):(wl(),r=a.fallback,n=t.mode,a=su({mode:"visible",children:a.children},n),r=ha(r,n,l,null),r.flags|=2,a.return=t,r.return=t,a.sibling=r,t.child=a,Sa(t,e.child,null,l),a=t.child,a.memoizedState=Ps(l),a.childLanes=ec(e,s,l),t.memoizedState=Is,t=Zn(null,a));else if(Ll(t),Hc(r)){if(s=r.nextSibling&&r.nextSibling.dataset,s)var h=s.dgst;s=h,a=Error(b(419)),a.stack="",a.digest=s,On({value:a,source:null,stack:null}),t=lc(e,t,l)}else if(qe||Za(e,t,l,!1),s=(l&e.childLanes)!==0,qe||s){if(s=he,s!==null&&(a=gn(s,l),a!==0&&a!==d.retryLane))throw d.retryLane=a,ma(e,a),ot(s,e,a),Ws;Bc(r)||vu(),t=lc(e,t,l)}else Bc(r)?(t.flags|=192,t.child=e.child,t=null):(e=d.treeContext,be=Mt(r.nextSibling),Qe=t,W=!0,Ol=null,Dt=!1,e!==null&&Hr(t,e),t=tc(t,a.children),t.flags|=4096);return t}return n?(wl(),r=a.fallback,n=t.mode,d=e.child,h=d.sibling,a=ul(d,{mode:"hidden",children:a.children}),a.subtreeFlags=d.subtreeFlags&65011712,h!==null?r=ul(h,r):(r=ha(r,n,l,null),r.flags|=2),r.return=t,a.return=t,a.sibling=r,t.child=a,Zn(null,a),a=t.child,r=e.child.memoizedState,r===null?r=Ps(l):(n=r.cachePool,n!==null?(d=Oe._currentValue,n=n.parent!==d?{parent:d,pool:d}:n):n=Qr(),r={baseLanes:r.baseLanes|l,cachePool:n}),a.memoizedState=r,a.childLanes=ec(e,s,l),t.memoizedState=Is,Zn(e.child,a)):(Ll(t),l=e.child,e=l.sibling,l=ul(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=l,t.memoizedState=null,l)}function tc(e,t){return t=su({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function su(e,t){return e=vt(22,e,null,t),e.lanes=0,e}function lc(e,t,l){return Sa(t,e.child,null,l),e=tc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function tf(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),bs(e.return,t,l)}function ac(e,t,l,a,n,i){var s=e.memoizedState;s===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:i}:(s.isBackwards=t,s.rendering=null,s.renderingStartTime=0,s.last=a,s.tail=l,s.tailMode=n,s.treeForkCount=i)}function lf(e,t,l){var a=t.pendingProps,n=a.revealOrder,i=a.tail;a=a.children;var s=Ce.current,r=(s&2)!==0;if(r?(s=s&1|2,t.flags|=128):s&=1,P(Ce,s),Ze(e,t,a,l),a=W?Mn:0,!r&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tf(e,l,t);else if(e.tag===19)tf(e,l,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(n){case"forwards":for(l=t.child,n=null;l!==null;)e=l.alternate,e!==null&&$i(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),ac(t,!1,n,l,i,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&$i(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}ac(t,!0,l,null,i,a);break;case"together":ac(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function ol(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),Ql|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Za(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(b(153));if(t.child!==null){for(e=t.child,l=ul(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=ul(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function nc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Gi(e)))}function I0(e,t,l){switch(t.tag){case 3:Nl(t,t.stateNode.containerInfo),ql(t,Oe,e.memoizedState.cache),xa();break;case 27:case 5:kt(t);break;case 4:Nl(t,t.stateNode.containerInfo);break;case 10:ql(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ds(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Ll(t),t.flags|=128,null):(l&t.child.childLanes)!==0?ef(e,t,l):(Ll(t),e=ol(e,t,l),e!==null?e.sibling:null);Ll(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(Za(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return lf(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),P(Ce,Ce.current),a)break;return null;case 22:return t.lanes=0,kd(e,t,l,t.pendingProps);case 24:ql(t,Oe,e.memoizedState.cache)}return ol(e,t,l)}function af(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)qe=!0;else{if(!nc(e,l)&&(t.flags&128)===0)return qe=!1,I0(e,t,l);qe=(e.flags&131072)!==0}else qe=!1,W&&(t.flags&1048576)!==0&&Br(t,Mn,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=ya(t.elementType),t.type=e,typeof e=="function")rs(e)?(a=ja(e,a),t.tag=1,t=Id(null,t,e,a,l)):(t.tag=0,t=Fs(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===Jt){t.tag=11,t=Vd(null,t,e,a,l);break e}else if(n===Nt){t.tag=14,t=Kd(null,t,e,a,l);break e}}throw t=Rt(e)||e,Error(b(306,t,""))}}return t;case 0:return Fs(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=ja(a,t.pendingProps),Id(e,t,a,n,l);case 3:e:{if(Nl(t,t.stateNode.containerInfo),e===null)throw Error(b(387));a=t.pendingProps;var i=t.memoizedState;n=i.element,Ts(e,t),wn(t,a,null,l);var s=t.memoizedState;if(a=s.cache,ql(t,Oe,a),a!==i.cache&&gs(t,[Oe],l,!0),Ln(),a=s.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Pd(e,t,a,l);break e}else if(a!==n){n=zt(Error(b(424)),t),On(n),t=Pd(e,t,a,l);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}for(be=Mt(e.firstChild),Qe=t,W=!0,Ol=null,Dt=!0,l=kr(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(xa(),a===n){t=ol(e,t,l);break e}Ze(e,t,a,l)}t=t.child}return t;case 26:return uu(e,t),e===null?(l=vo(t.type,null,t.pendingProps,null))?t.memoizedState=l:W||(l=t.type,e=t.pendingProps,a=ju(Lt.current).createElement(l),a[Me]=t,a[Ne]=e,Ve(a,l,e),G(a),t.stateNode=a):t.memoizedState=vo(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return kt(t),e===null&&W&&(a=t.stateNode=mo(t.type,t.pendingProps,Lt.current),Qe=t,Dt=!0,n=be,Jl(t.type)?(Rc=n,be=Mt(a.firstChild)):be=n),Ze(e,t,t.pendingProps.children,l),uu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&W&&((n=a=be)&&(a=Cm(a,t.type,t.pendingProps,Dt),a!==null?(t.stateNode=a,Qe=t,be=Mt(a.firstChild),Dt=!1,n=!0):n=!1),n||Ul(t)),kt(t),n=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,Oc(n,i)?a=null:s!==null&&Oc(n,s)&&(t.flags|=32),t.memoizedState!==null&&(n=Ms(e,t,X0,null,null,l),ii._currentValue=n),uu(e,t),Ze(e,t,a,l),t.child;case 6:return e===null&&W&&((e=l=be)&&(l=Dm(l,t.pendingProps,Dt),l!==null?(t.stateNode=l,Qe=t,be=null,e=!0):e=!1),e||Ul(t)),null;case 13:return ef(e,t,l);case 4:return Nl(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Sa(t,null,a,l):Ze(e,t,a,l),t.child;case 11:return Vd(e,t,t.type,t.pendingProps,l);case 7:return Ze(e,t,t.pendingProps,l),t.child;case 8:return Ze(e,t,t.pendingProps.children,l),t.child;case 12:return Ze(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,ql(t,t.type,a.value),Ze(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,ba(t),n=Xe(n),a=a(n),t.flags|=1,Ze(e,t,a,l),t.child;case 14:return Kd(e,t,t.type,t.pendingProps,l);case 15:return Jd(e,t,t.type,t.pendingProps,l);case 19:return lf(e,t,l);case 31:return F0(e,t,l);case 22:return kd(e,t,l,t.pendingProps);case 24:return ba(t),a=Xe(Oe),e===null?(n=Ss(),n===null&&(n=he,i=ys(),n.pooledCache=i,i.refCount++,i!==null&&(n.pooledCacheLanes|=l),n=i),t.memoizedState={parent:a,cache:n},js(t),ql(t,Oe,n)):((e.lanes&l)!==0&&(Ts(e,t),wn(t,null,null,l),Ln()),n=e.memoizedState,i=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),ql(t,Oe,a)):(a=i.cache,ql(t,Oe,a),a!==n.cache&&gs(t,[Oe],l,!0))),Ze(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(b(156,t.tag))}function ml(e){e.flags|=4}function ic(e,t,l,a,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(Mf())e.flags|=8192;else throw pa=Vi,Ns}else e.flags&=-16777217}function nf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!So(t))if(Mf())e.flags|=8192;else throw pa=Vi,Ns}function cu(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?vi():536870912,e.lanes|=t,ln|=t)}function Vn(e,t){if(!W)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function ge(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function P0(e,t,l){var a=t.pendingProps;switch(ms(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ge(t),null;case 1:return ge(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),rl(Oe),nl(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Xa(t)?ml(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,xs())),ge(t),null;case 26:var n=t.type,i=t.memoizedState;return e===null?(ml(t),i!==null?(ge(t),nf(t,i)):(ge(t),ic(t,n,null,a,l))):i?i!==e.memoizedState?(ml(t),ge(t),nf(t,i)):(ge(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&ml(t),ge(t),ic(t,n,e,a,l)),null;case 27:if(za(t),l=Lt.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ml(t);else{if(!a){if(t.stateNode===null)throw Error(b(166));return ge(t),null}e=Ee.current,Xa(t)?Rr(t):(e=mo(n,a,l),t.stateNode=e,ml(t))}return ge(t),null;case 5:if(za(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ml(t);else{if(!a){if(t.stateNode===null)throw Error(b(166));return ge(t),null}if(i=Ee.current,Xa(t))Rr(t);else{var s=ju(Lt.current);switch(i){case 1:i=s.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:i=s.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":i=s.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":i=s.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":i=s.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof a.is=="string"?s.createElement("select",{is:a.is}):s.createElement("select"),a.multiple?i.multiple=!0:a.size&&(i.size=a.size);break;default:i=typeof a.is=="string"?s.createElement(n,{is:a.is}):s.createElement(n)}}i[Me]=t,i[Ne]=a;e:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)i.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break e;for(;s.sibling===null;){if(s.return===null||s.return===t)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=i;e:switch(Ve(i,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&ml(t)}}return ge(t),ic(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ml(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(b(166));if(e=Lt.current,Xa(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=Qe,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[Me]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||to(e.nodeValue,l)),e||Ul(t,!0)}else e=ju(e).createTextNode(a),e[Me]=t,t.stateNode=e}return ge(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=Xa(t),l!==null){if(e===null){if(!a)throw Error(b(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(b(557));e[Me]=t}else xa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ge(t),e=!1}else l=xs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(gt(t),t):(gt(t),null);if((t.flags&128)!==0)throw Error(b(558))}return ge(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=Xa(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(b(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(b(317));n[Me]=t}else xa(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ge(t),n=!1}else n=xs(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(gt(t),t):(gt(t),null)}return gt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),i=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),cu(t,t.updateQueue),ge(t),null);case 4:return nl(),e===null&&Ec(t.stateNode.containerInfo),ge(t),null;case 10:return rl(t.type),ge(t),null;case 19:if(re(Ce),a=t.memoizedState,a===null)return ge(t),null;if(n=(t.flags&128)!==0,i=a.rendering,i===null)if(n)Vn(a,!1);else{if(Ae!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=$i(e),i!==null){for(t.flags|=128,Vn(a,!1),e=i.updateQueue,t.updateQueue=e,cu(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Or(l,e),l=l.sibling;return P(Ce,Ce.current&1|2),W&&sl(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&Je()>mu&&(t.flags|=128,n=!0,Vn(a,!1),t.lanes=4194304)}else{if(!n)if(e=$i(i),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,cu(t,e),Vn(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!W)return ge(t),null}else 2*Je()-a.renderingStartTime>mu&&l!==536870912&&(t.flags|=128,n=!0,Vn(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(e=a.last,e!==null?e.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Je(),e.sibling=null,l=Ce.current,P(Ce,n?l&1|2:l&1),W&&sl(t,a.treeForkCount),e):(ge(t),null);case 22:case 23:return gt(t),Cs(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(ge(t),t.subtreeFlags&6&&(t.flags|=8192)):ge(t),l=t.updateQueue,l!==null&&cu(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&re(ga),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),rl(Oe),ge(t),null;case 25:return null;case 30:return null}throw Error(b(156,t.tag))}function em(e,t){switch(ms(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return rl(Oe),nl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return za(t),null;case 31:if(t.memoizedState!==null){if(gt(t),t.alternate===null)throw Error(b(340));xa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(gt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(b(340));xa()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return re(Ce),null;case 4:return nl(),null;case 10:return rl(t.type),null;case 22:case 23:return gt(t),Cs(),e!==null&&re(ga),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return rl(Oe),null;case 25:return null;default:return null}}function uf(e,t){switch(ms(t),t.tag){case 3:rl(Oe),nl();break;case 26:case 27:case 5:za(t);break;case 4:nl();break;case 31:t.memoizedState!==null&>(t);break;case 13:gt(t);break;case 19:re(Ce);break;case 10:rl(t.type);break;case 22:case 23:gt(t),Cs(),e!==null&&re(ga);break;case 24:rl(Oe)}}function Kn(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var i=l.create,s=l.inst;a=i(),s.destroy=a}l=l.next}while(l!==n)}}catch(r){se(t,t.return,r)}}function Yl(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var i=n.next;a=i;do{if((a.tag&e)===e){var s=a.inst,r=s.destroy;if(r!==void 0){s.destroy=void 0,n=t;var d=l,h=r;try{h()}catch(g){se(n,d,g)}}}a=a.next}while(a!==i)}}catch(g){se(t,t.return,g)}}function sf(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Wr(t,l)}catch(a){se(e,e.return,a)}}}function cf(e,t,l){l.props=ja(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){se(e,t,a)}}function Jn(e,t){try{var l=e.ref;if(l!==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 l=="function"?e.refCleanup=l(a):l.current=a}}catch(n){se(e,t,n)}}function tl(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){se(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){se(e,t,n)}else l.current=null}function rf(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){se(e,e.return,n)}}function uc(e,t,l){try{var a=e.stateNode;Nm(a,e.type,l,t),a[Ne]=t}catch(n){se(e,e.return,n)}}function df(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Jl(e.type)||e.tag===4}function sc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||df(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Jl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function cc(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=ee));else if(a!==4&&(a===27&&Jl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(cc(e,t,l),e=e.sibling;e!==null;)cc(e,t,l),e=e.sibling}function ru(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&Jl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(ru(e,t,l),e=e.sibling;e!==null;)ru(e,t,l),e=e.sibling}function ff(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Ve(t,a,l),t[Me]=e,t[Ne]=l}catch(i){se(e,e.return,i)}}var hl=!1,Be=!1,rc=!1,of=typeof WeakSet=="function"?WeakSet:Set,Ge=null;function tm(e,t){if(e=e.containerInfo,_c=_u,e=jr(e),ls(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break e}var s=0,r=-1,d=-1,h=0,g=0,S=e,x=null;t:for(;;){for(var v;S!==l||n!==0&&S.nodeType!==3||(r=s+n),S!==i||a!==0&&S.nodeType!==3||(d=s+a),S.nodeType===3&&(s+=S.nodeValue.length),(v=S.firstChild)!==null;)x=S,S=v;for(;;){if(S===e)break t;if(x===l&&++h===n&&(r=s),x===i&&++g===a&&(d=s),(v=S.nextSibling)!==null)break;S=x,x=S.parentNode}S=v}l=r===-1||d===-1?null:{start:r,end:d}}else l=null}l=l||{start:0,end:0}}else l=null;for(Mc={focusedElem:e,selectionRange:l},_u=!1,Ge=t;Ge!==null;)if(t=Ge,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ge=e;else for(;Ge!==null;){switch(t=Ge,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)n=e[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,l=t,n=i.memoizedProps,i=i.memoizedState,a=l.stateNode;try{var C=ja(l.type,n);e=a.getSnapshotBeforeUpdate(C,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(q){se(l,l.return,q)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)qc(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":qc(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(b(163))}if(e=t.sibling,e!==null){e.return=t.return,Ge=e;break}Ge=t.return}}function mf(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:vl(e,l),a&4&&Kn(5,l);break;case 1:if(vl(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(s){se(l,l.return,s)}else{var n=ja(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){se(l,l.return,s)}}a&64&&sf(l),a&512&&Jn(l,l.return);break;case 3:if(vl(e,l),a&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Wr(e,t)}catch(s){se(l,l.return,s)}}break;case 27:t===null&&a&4&&ff(l);case 26:case 5:vl(e,l),t===null&&a&4&&rf(l),a&512&&Jn(l,l.return);break;case 12:vl(e,l);break;case 31:vl(e,l),a&4&&vf(e,l);break;case 13:vl(e,l),a&4&&bf(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=dm.bind(null,l),_m(e,l))));break;case 22:if(a=l.memoizedState!==null||hl,!a){t=t!==null&&t.memoizedState!==null||Be,n=hl;var i=Be;hl=a,(Be=t)&&!i?bl(e,l,(l.subtreeFlags&8772)!==0):vl(e,l),hl=n,Be=i}break;case 30:break;default:vl(e,l)}}function hf(e){var t=e.alternate;t!==null&&(e.alternate=null,hf(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&pn(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 pe=null,ct=!1;function xl(e,t,l){for(l=l.child;l!==null;)xf(e,t,l),l=l.sibling}function xf(e,t,l){if(ke&&typeof ke.onCommitFiberUnmount=="function")try{ke.onCommitFiberUnmount(Da,l)}catch{}switch(l.tag){case 26:Be||tl(l,t),xl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Be||tl(l,t);var a=pe,n=ct;Jl(l.type)&&(pe=l.stateNode,ct=!1),xl(e,t,l),li(l.stateNode),pe=a,ct=n;break;case 5:Be||tl(l,t);case 6:if(a=pe,n=ct,pe=null,xl(e,t,l),pe=a,ct=n,pe!==null)if(ct)try{(pe.nodeType===9?pe.body:pe.nodeName==="HTML"?pe.ownerDocument.body:pe).removeChild(l.stateNode)}catch(i){se(l,t,i)}else try{pe.removeChild(l.stateNode)}catch(i){se(l,t,i)}break;case 18:pe!==null&&(ct?(e=pe,so(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),fn(e)):so(pe,l.stateNode));break;case 4:a=pe,n=ct,pe=l.stateNode.containerInfo,ct=!0,xl(e,t,l),pe=a,ct=n;break;case 0:case 11:case 14:case 15:Yl(2,l,t),Be||Yl(4,l,t),xl(e,t,l);break;case 1:Be||(tl(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&cf(l,t,a)),xl(e,t,l);break;case 21:xl(e,t,l);break;case 22:Be=(a=Be)||l.memoizedState!==null,xl(e,t,l),Be=a;break;default:xl(e,t,l)}}function vf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{fn(e)}catch(l){se(t,t.return,l)}}}function bf(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{fn(e)}catch(l){se(t,t.return,l)}}function lm(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new of),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new of),t;default:throw Error(b(435,e.tag))}}function du(e,t){var l=lm(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=fm.bind(null,e,a);a.then(n,n)}})}function rt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],i=e,s=t,r=s;e:for(;r!==null;){switch(r.tag){case 27:if(Jl(r.type)){pe=r.stateNode,ct=!1;break e}break;case 5:pe=r.stateNode,ct=!1;break e;case 3:case 4:pe=r.stateNode.containerInfo,ct=!0;break e}r=r.return}if(pe===null)throw Error(b(160));xf(i,s,n),pe=null,ct=!1,i=n.alternate,i!==null&&(i.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)gf(t,e),t=t.sibling}var Vt=null;function gf(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:rt(t,e),dt(e),a&4&&(Yl(3,e,e.return),Kn(3,e),Yl(5,e,e.return));break;case 1:rt(t,e),dt(e),a&512&&(Be||l===null||tl(l,l.return)),a&64&&hl&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var n=Vt;if(rt(t,e),dt(e),a&512&&(Be||l===null||tl(l,l.return)),a&4){var i=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,n=n.ownerDocument||n;t:switch(a){case"title":i=n.getElementsByTagName("title")[0],(!i||i[El]||i[Me]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=n.createElement(a),n.head.insertBefore(i,n.querySelector("head > title"))),Ve(i,a,l),i[Me]=e,G(i),a=i;break e;case"link":var s=yo("link","href",n).get(a+(l.href||""));if(s){for(var r=0;r<s.length;r++)if(i=s[r],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){s.splice(r,1);break t}}i=n.createElement(a),Ve(i,a,l),n.head.appendChild(i);break;case"meta":if(s=yo("meta","content",n).get(a+(l.content||""))){for(r=0;r<s.length;r++)if(i=s[r],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){s.splice(r,1);break t}}i=n.createElement(a),Ve(i,a,l),n.head.appendChild(i);break;default:throw Error(b(468,a))}i[Me]=e,G(i),a=i}e.stateNode=a}else po(n,e.type,e.stateNode);else e.stateNode=go(n,a,e.memoizedProps);else i!==a?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,a===null?po(n,e.type,e.stateNode):go(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&uc(e,e.memoizedProps,l.memoizedProps)}break;case 27:rt(t,e),dt(e),a&512&&(Be||l===null||tl(l,l.return)),l!==null&&a&4&&uc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(rt(t,e),dt(e),a&512&&(Be||l===null||tl(l,l.return)),e.flags&32){n=e.stateNode;try{Ft(n,"")}catch(C){se(e,e.return,C)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,uc(e,n,l!==null?l.memoizedProps:n)),a&1024&&(rc=!0);break;case 6:if(rt(t,e),dt(e),a&4){if(e.stateNode===null)throw Error(b(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(C){se(e,e.return,C)}}break;case 3:if(zu=null,n=Vt,Vt=Tu(t.containerInfo),rt(t,e),Vt=n,dt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{fn(t.containerInfo)}catch(C){se(e,e.return,C)}rc&&(rc=!1,yf(e));break;case 4:a=Vt,Vt=Tu(e.stateNode.containerInfo),rt(t,e),dt(e),Vt=a;break;case 12:rt(t,e),dt(e);break;case 31:rt(t,e),dt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,du(e,a)));break;case 13:rt(t,e),dt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(ou=Je()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,du(e,a)));break;case 22:n=e.memoizedState!==null;var d=l!==null&&l.memoizedState!==null,h=hl,g=Be;if(hl=h||n,Be=g||d,rt(t,e),Be=g,hl=h,dt(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||d||hl||Be||Ta(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){d=l=t;try{if(i=d.stateNode,n)s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none";else{r=d.stateNode;var S=d.memoizedProps.style,x=S!=null&&S.hasOwnProperty("display")?S.display:null;r.style.display=x==null||typeof x=="boolean"?"":(""+x).trim()}}catch(C){se(d,d.return,C)}}}else if(t.tag===6){if(l===null){d=t;try{d.stateNode.nodeValue=n?"":d.memoizedProps}catch(C){se(d,d.return,C)}}}else if(t.tag===18){if(l===null){d=t;try{var v=d.stateNode;n?co(v,!0):co(d.stateNode,!1)}catch(C){se(d,d.return,C)}}}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;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,du(e,l))));break;case 19:rt(t,e),dt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,du(e,a)));break;case 30:break;case 21:break;default:rt(t,e),dt(e)}}function dt(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(df(a)){l=a;break}a=a.return}if(l==null)throw Error(b(160));switch(l.tag){case 27:var n=l.stateNode,i=sc(e);ru(e,i,n);break;case 5:var s=l.stateNode;l.flags&32&&(Ft(s,""),l.flags&=-33);var r=sc(e);ru(e,r,s);break;case 3:case 4:var d=l.stateNode.containerInfo,h=sc(e);cc(e,h,d);break;default:throw Error(b(161))}}catch(g){se(e,e.return,g)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function yf(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;yf(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function vl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)mf(e,t.alternate,t),t=t.sibling}function Ta(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Yl(4,t,t.return),Ta(t);break;case 1:tl(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&cf(t,t.return,l),Ta(t);break;case 27:li(t.stateNode);case 26:case 5:tl(t,t.return),Ta(t);break;case 22:t.memoizedState===null&&Ta(t);break;case 30:Ta(t);break;default:Ta(t)}e=e.sibling}}function bl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,i=t,s=i.flags;switch(i.tag){case 0:case 11:case 15:bl(n,i,l),Kn(4,i);break;case 1:if(bl(n,i,l),a=i,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(h){se(a,a.return,h)}if(a=i,n=a.updateQueue,n!==null){var r=a.stateNode;try{var d=n.shared.hiddenCallbacks;if(d!==null)for(n.shared.hiddenCallbacks=null,n=0;n<d.length;n++)$r(d[n],r)}catch(h){se(a,a.return,h)}}l&&s&64&&sf(i),Jn(i,i.return);break;case 27:ff(i);case 26:case 5:bl(n,i,l),l&&a===null&&s&4&&rf(i),Jn(i,i.return);break;case 12:bl(n,i,l);break;case 31:bl(n,i,l),l&&s&4&&vf(n,i);break;case 13:bl(n,i,l),l&&s&4&&bf(n,i);break;case 22:i.memoizedState===null&&bl(n,i,l),Jn(i,i.return);break;case 30:break;default:bl(n,i,l)}t=t.sibling}}function dc(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Un(l))}function fc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Un(e))}function Kt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)pf(e,t,l,a),t=t.sibling}function pf(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:Kt(e,t,l,a),n&2048&&Kn(9,t);break;case 1:Kt(e,t,l,a);break;case 3:Kt(e,t,l,a),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Un(e)));break;case 12:if(n&2048){Kt(e,t,l,a),e=t.stateNode;try{var i=t.memoizedProps,s=i.id,r=i.onPostCommit;typeof r=="function"&&r(s,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(d){se(t,t.return,d)}}else Kt(e,t,l,a);break;case 31:Kt(e,t,l,a);break;case 13:Kt(e,t,l,a);break;case 23:break;case 22:i=t.stateNode,s=t.alternate,t.memoizedState!==null?i._visibility&2?Kt(e,t,l,a):kn(e,t):i._visibility&2?Kt(e,t,l,a):(i._visibility|=2,Pa(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&dc(s,t);break;case 24:Kt(e,t,l,a),n&2048&&fc(t.alternate,t);break;default:Kt(e,t,l,a)}}function Pa(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,s=t,r=l,d=a,h=s.flags;switch(s.tag){case 0:case 11:case 15:Pa(i,s,r,d,n),Kn(8,s);break;case 23:break;case 22:var g=s.stateNode;s.memoizedState!==null?g._visibility&2?Pa(i,s,r,d,n):kn(i,s):(g._visibility|=2,Pa(i,s,r,d,n)),n&&h&2048&&dc(s.alternate,s);break;case 24:Pa(i,s,r,d,n),n&&h&2048&&fc(s.alternate,s);break;default:Pa(i,s,r,d,n)}t=t.sibling}}function kn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,n=a.flags;switch(a.tag){case 22:kn(l,a),n&2048&&dc(a.alternate,a);break;case 24:kn(l,a),n&2048&&fc(a.alternate,a);break;default:kn(l,a)}t=t.sibling}}var $n=8192;function en(e,t,l){if(e.subtreeFlags&$n)for(e=e.child;e!==null;)Sf(e,t,l),e=e.sibling}function Sf(e,t,l){switch(e.tag){case 26:en(e,t,l),e.flags&$n&&e.memoizedState!==null&&Qm(l,Vt,e.memoizedState,e.memoizedProps);break;case 5:en(e,t,l);break;case 3:case 4:var a=Vt;Vt=Tu(e.stateNode.containerInfo),en(e,t,l),Vt=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=$n,$n=16777216,en(e,t,l),$n=a):en(e,t,l));break;default:en(e,t,l)}}function Nf(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 Wn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Ge=a,Tf(a,e)}Nf(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jf(e),e=e.sibling}function jf(e){switch(e.tag){case 0:case 11:case 15:Wn(e),e.flags&2048&&Yl(9,e,e.return);break;case 3:Wn(e);break;case 12:Wn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,fu(e)):Wn(e);break;default:Wn(e)}}function fu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Ge=a,Tf(a,e)}Nf(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Yl(8,t,t.return),fu(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,fu(t));break;default:fu(t)}e=e.sibling}}function Tf(e,t){for(;Ge!==null;){var l=Ge;switch(l.tag){case 0:case 11:case 15:Yl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Un(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Ge=a;else e:for(l=e;Ge!==null;){a=Ge;var n=a.sibling,i=a.return;if(hf(a),a===l){Ge=null;break e}if(n!==null){n.return=i,Ge=n;break e}Ge=i}}}var am={getCacheForType:function(e){var t=Xe(Oe),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Xe(Oe).controller.signal}},nm=typeof WeakMap=="function"?WeakMap:Map,ae=0,he=null,Z=null,k=0,ue=0,yt=null,Gl=!1,tn=!1,oc=!1,gl=0,Ae=0,Ql=0,Aa=0,mc=0,pt=0,ln=0,Fn=null,ft=null,hc=!1,ou=0,Af=0,mu=1/0,hu=null,Xl=null,Le=0,Zl=null,an=null,yl=0,xc=0,vc=null,zf=null,In=0,bc=null;function St(){return(ae&2)!==0&&k!==0?k&-k:p.T!==null?jc():Ua()}function Ef(){if(pt===0)if((k&536870912)===0||W){var e=Se;Se<<=1,(Se&3932160)===0&&(Se=262144),pt=e}else pt=536870912;return e=bt.current,e!==null&&(e.flags|=32),pt}function ot(e,t,l){(e===he&&(ue===2||ue===9)||e.cancelPendingCommit!==null)&&(nn(e,0),Vl(e,k,pt,!1)),ua(e,l),((ae&2)===0||e!==he)&&(e===he&&((ae&2)===0&&(Aa|=l),Ae===4&&Vl(e,k,pt,!1)),ll(e))}function Cf(e,t,l){if((ae&6)!==0)throw Error(b(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||_a(e,t),n=a?sm(e,t):yc(e,t,!0),i=a;do{if(n===0){tn&&!a&&Vl(e,t,0,!1);break}else{if(l=e.current.alternate,i&&!im(l)){n=yc(e,t,!1),i=!1;continue}if(n===2){if(i=t,e.errorRecoveryDisabledLanes&i)var s=0;else s=e.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){t=s;e:{var r=e;n=Fn;var d=r.current.memoizedState.isDehydrated;if(d&&(nn(r,s).flags|=256),s=yc(r,s,!1),s!==2){if(oc&&!d){r.errorRecoveryDisabledLanes|=i,Aa|=i,n=4;break e}i=ft,ft=n,i!==null&&(ft===null?ft=i:ft.push.apply(ft,i))}n=s}if(i=!1,n!==2)continue}}if(n===1){nn(e,0),Vl(e,t,0,!0);break}e:{switch(a=e,i=n,i){case 0:case 1:throw Error(b(345));case 4:if((t&4194048)!==t)break;case 6:Vl(a,t,pt,!Gl);break e;case 2:ft=null;break;case 3:case 5:break;default:throw Error(b(329))}if((t&62914560)===t&&(n=ou+300-Je(),10<n)){if(Vl(a,t,pt,!Gl),na(a,0,!0)!==0)break e;yl=t,a.timeoutHandle=io(Df.bind(null,a,l,ft,hu,hc,t,pt,Aa,ln,Gl,i,"Throttled",-0,0),n);break e}Df(a,l,ft,hu,hc,t,pt,Aa,ln,Gl,i,null,-0,0)}}break}while(!0);ll(e)}function Df(e,t,l,a,n,i,s,r,d,h,g,S,x,v){if(e.timeoutHandle=-1,S=t.subtreeFlags,S&8192||(S&16785408)===16785408){S={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ee},Sf(t,i,S);var C=(i&62914560)===i?ou-Je():(i&4194048)===i?Af-Je():0;if(C=Xm(S,C),C!==null){yl=i,e.cancelPendingCommit=C(Rf.bind(null,e,t,i,l,a,n,s,r,d,g,S,null,x,v)),Vl(e,i,s,!h);return}}Rf(e,t,i,l,a,n,s,r,d)}function im(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var n=l[a],i=n.getSnapshot;n=n.value;try{if(!xt(i(),n))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 Vl(e,t,l,a){t&=~mc,t&=~Aa,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var i=31-et(n),s=1<<i;a[i]=-1,n&=~s}l!==0&&bi(e,l,t)}function xu(){return(ae&6)===0?(Pn(0),!1):!0}function gc(){if(Z!==null){if(ue===0)var e=Z.return;else e=Z,cl=va=null,qs(e),ka=null,Bn=0,e=Z;for(;e!==null;)uf(e.alternate,e),e=e.return;Z=null}}function nn(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Am(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),yl=0,gc(),he=e,Z=l=ul(e.current,null),k=t,ue=0,yt=null,Gl=!1,tn=_a(e,t),oc=!1,ln=pt=mc=Aa=Ql=Ae=0,ft=Fn=null,hc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var n=31-et(a),i=1<<n;t|=e[n],a&=~i}return gl=t,Hi(),l}function _f(e,t){Y=null,p.H=Xn,t===Ja||t===Zi?(t=Vr(),ue=3):t===Ns?(t=Vr(),ue=4):ue=t===Ws?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,yt=t,Z===null&&(Ae=1,nu(e,zt(t,e.current)))}function Mf(){var e=bt.current;return e===null?!0:(k&4194048)===k?_t===null:(k&62914560)===k||(k&536870912)!==0?e===_t:!1}function Of(){var e=p.H;return p.H=Xn,e===null?Xn:e}function Uf(){var e=p.A;return p.A=am,e}function vu(){Ae=4,Gl||(k&4194048)!==k&&bt.current!==null||(tn=!0),(Ql&134217727)===0&&(Aa&134217727)===0||he===null||Vl(he,k,pt,!1)}function yc(e,t,l){var a=ae;ae|=2;var n=Of(),i=Uf();(he!==e||k!==t)&&(hu=null,nn(e,t)),t=!1;var s=Ae;e:do try{if(ue!==0&&Z!==null){var r=Z,d=yt;switch(ue){case 8:gc(),s=6;break e;case 3:case 2:case 9:case 6:bt.current===null&&(t=!0);var h=ue;if(ue=0,yt=null,un(e,r,d,h),l&&tn){s=0;break e}break;default:h=ue,ue=0,yt=null,un(e,r,d,h)}}um(),s=Ae;break}catch(g){_f(e,g)}while(!0);return t&&e.shellSuspendCounter++,cl=va=null,ae=a,p.H=n,p.A=i,Z===null&&(he=null,k=0,Hi()),s}function um(){for(;Z!==null;)qf(Z)}function sm(e,t){var l=ae;ae|=2;var a=Of(),n=Uf();he!==e||k!==t?(hu=null,mu=Je()+500,nn(e,t)):tn=_a(e,t);e:do try{if(ue!==0&&Z!==null){t=Z;var i=yt;t:switch(ue){case 1:ue=0,yt=null,un(e,t,i,1);break;case 2:case 9:if(Xr(i)){ue=0,yt=null,Bf(t);break}t=function(){ue!==2&&ue!==9||he!==e||(ue=7),ll(e)},i.then(t,t);break e;case 3:ue=7;break e;case 4:ue=5;break e;case 7:Xr(i)?(ue=0,yt=null,Bf(t)):(ue=0,yt=null,un(e,t,i,7));break;case 5:var s=null;switch(Z.tag){case 26:s=Z.memoizedState;case 5:case 27:var r=Z;if(s?So(s):r.stateNode.complete){ue=0,yt=null;var d=r.sibling;if(d!==null)Z=d;else{var h=r.return;h!==null?(Z=h,bu(h)):Z=null}break t}}ue=0,yt=null,un(e,t,i,5);break;case 6:ue=0,yt=null,un(e,t,i,6);break;case 8:gc(),Ae=6;break e;default:throw Error(b(462))}}cm();break}catch(g){_f(e,g)}while(!0);return cl=va=null,p.H=a,p.A=n,ae=l,Z!==null?0:(he=null,k=0,Hi(),Ae)}function cm(){for(;Z!==null&&!hi();)qf(Z)}function qf(e){var t=af(e.alternate,e,gl);e.memoizedProps=e.pendingProps,t===null?bu(e):Z=t}function Bf(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Fd(l,t,t.pendingProps,t.type,void 0,k);break;case 11:t=Fd(l,t,t.pendingProps,t.type.render,t.ref,k);break;case 5:qs(t);default:uf(l,t),t=Z=Or(t,gl),t=af(l,t,gl)}e.memoizedProps=e.pendingProps,t===null?bu(e):Z=t}function un(e,t,l,a){cl=va=null,qs(t),ka=null,Bn=0;var n=t.return;try{if(W0(e,n,t,l,k)){Ae=1,nu(e,zt(l,e.current)),Z=null;return}}catch(i){if(n!==null)throw Z=n,i;Ae=1,nu(e,zt(l,e.current)),Z=null;return}t.flags&32768?(W||a===1?e=!0:tn||(k&536870912)!==0?e=!1:(Gl=e=!0,(a===2||a===9||a===3||a===6)&&(a=bt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Hf(t,e)):bu(t)}function bu(e){var t=e;do{if((t.flags&32768)!==0){Hf(t,Gl);return}e=t.return;var l=P0(t.alternate,t,gl);if(l!==null){Z=l;return}if(t=t.sibling,t!==null){Z=t;return}Z=t=e}while(t!==null);Ae===0&&(Ae=5)}function Hf(e,t){do{var l=em(e.alternate,e);if(l!==null){l.flags&=32767,Z=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){Z=e;return}Z=e=l}while(e!==null);Ae=6,Z=null}function Rf(e,t,l,a,n,i,s,r,d){e.cancelPendingCommit=null;do gu();while(Le!==0);if((ae&6)!==0)throw Error(b(327));if(t!==null){if(t===e.current)throw Error(b(177));if(i=t.lanes|t.childLanes,i|=ss,bn(e,l,i,s,r,d),e===he&&(Z=he=null,k=0),an=t,Zl=e,yl=l,xc=i,vc=n,zf=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,om(jl,function(){return Qf(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=p.T,p.T=null,n=A.p,A.p=2,s=ae,ae|=4;try{tm(e,t,l)}finally{ae=s,A.p=n,p.T=a}}Le=1,Lf(),wf(),Yf()}}function Lf(){if(Le===1){Le=0;var e=Zl,t=an,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=p.T,p.T=null;var a=A.p;A.p=2;var n=ae;ae|=4;try{gf(t,e);var i=Mc,s=jr(e.containerInfo),r=i.focusedElem,d=i.selectionRange;if(s!==r&&r&&r.ownerDocument&&Nr(r.ownerDocument.documentElement,r)){if(d!==null&&ls(r)){var h=d.start,g=d.end;if(g===void 0&&(g=h),"selectionStart"in r)r.selectionStart=h,r.selectionEnd=Math.min(g,r.value.length);else{var S=r.ownerDocument||document,x=S&&S.defaultView||window;if(x.getSelection){var v=x.getSelection(),C=r.textContent.length,q=Math.min(d.start,C),oe=d.end===void 0?q:Math.min(d.end,C);!v.extend&&q>oe&&(s=oe,oe=q,q=s);var o=Sr(r,q),f=Sr(r,oe);if(o&&f&&(v.rangeCount!==1||v.anchorNode!==o.node||v.anchorOffset!==o.offset||v.focusNode!==f.node||v.focusOffset!==f.offset)){var m=S.createRange();m.setStart(o.node,o.offset),v.removeAllRanges(),q>oe?(v.addRange(m),v.extend(f.node,f.offset)):(m.setEnd(f.node,f.offset),v.addRange(m))}}}}for(S=[],v=r;v=v.parentNode;)v.nodeType===1&&S.push({element:v,left:v.scrollLeft,top:v.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<S.length;r++){var y=S[r];y.element.scrollLeft=y.left,y.element.scrollTop=y.top}}_u=!!_c,Mc=_c=null}finally{ae=n,A.p=a,p.T=l}}e.current=t,Le=2}}function wf(){if(Le===2){Le=0;var e=Zl,t=an,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=p.T,p.T=null;var a=A.p;A.p=2;var n=ae;ae|=4;try{mf(e,t.alternate,t)}finally{ae=n,A.p=a,p.T=l}}Le=3}}function Yf(){if(Le===4||Le===3){Le=0,Lu();var e=Zl,t=an,l=yl,a=zf;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Le=5:(Le=0,an=Zl=null,Gf(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(Xl=null),Oa(l),t=t.stateNode,ke&&typeof ke.onCommitFiberRoot=="function")try{ke.onCommitFiberRoot(Da,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=p.T,n=A.p,A.p=2,p.T=null;try{for(var i=e.onRecoverableError,s=0;s<a.length;s++){var r=a[s];i(r.value,{componentStack:r.stack})}}finally{p.T=t,A.p=n}}(yl&3)!==0&&gu(),ll(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===bc?In++:(In=0,bc=e):In=0,Pn(0)}}function Gf(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Un(t)))}function gu(){return Lf(),wf(),Yf(),Qf()}function Qf(){if(Le!==5)return!1;var e=Zl,t=xc;xc=0;var l=Oa(yl),a=p.T,n=A.p;try{A.p=32>l?32:l,p.T=null,l=vc,vc=null;var i=Zl,s=yl;if(Le=0,an=Zl=null,yl=0,(ae&6)!==0)throw Error(b(331));var r=ae;if(ae|=4,jf(i.current),pf(i,i.current,s,l),ae=r,Pn(0,!1),ke&&typeof ke.onPostCommitFiberRoot=="function")try{ke.onPostCommitFiberRoot(Da,i)}catch{}return!0}finally{A.p=n,p.T=a,Gf(e,t)}}function Xf(e,t,l){t=zt(l,t),t=$s(e.stateNode,t,2),e=Rl(e,t,2),e!==null&&(ua(e,2),ll(e))}function se(e,t,l){if(e.tag===3)Xf(e,e,l);else for(;t!==null;){if(t.tag===3){Xf(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Xl===null||!Xl.has(a))){e=zt(l,e),l=Xd(2),a=Rl(t,l,2),a!==null&&(Zd(l,a,t,e),ua(a,2),ll(a));break}}t=t.return}}function pc(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new nm;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(oc=!0,n.add(l),e=rm.bind(null,e,t,l),t.then(e,e))}function rm(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,he===e&&(k&l)===l&&(Ae===4||Ae===3&&(k&62914560)===k&&300>Je()-ou?(ae&2)===0&&nn(e,0):mc|=l,ln===k&&(ln=0)),ll(e)}function Zf(e,t){t===0&&(t=vi()),e=ma(e,t),e!==null&&(ua(e,t),ll(e))}function dm(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Zf(e,l)}function fm(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(b(314))}a!==null&&a.delete(t),Zf(e,l)}function om(e,t){return mn(e,t)}var yu=null,sn=null,Sc=!1,pu=!1,Nc=!1,Kl=0;function ll(e){e!==sn&&e.next===null&&(sn===null?yu=sn=e:sn=sn.next=e),pu=!0,Sc||(Sc=!0,hm())}function Pn(e,t){if(!Nc&&pu){Nc=!0;do for(var l=!1,a=yu;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var i=0;else{var s=a.suspendedLanes,r=a.pingedLanes;i=(1<<31-et(42|e)+1)-1,i&=n&~(s&~r),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,kf(a,i))}else i=k,i=na(a,a===he?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||_a(a,i)||(l=!0,kf(a,i));a=a.next}while(l);Nc=!1}}function mm(){Vf()}function Vf(){pu=Sc=!1;var e=0;Kl!==0&&Tm()&&(e=Kl);for(var t=Je(),l=null,a=yu;a!==null;){var n=a.next,i=Kf(a,t);i===0?(a.next=null,l===null?yu=n:l.next=n,n===null&&(sn=l)):(l=a,(e!==0||(i&3)!==0)&&(pu=!0)),a=n}Le!==0&&Le!==5||Pn(e),Kl!==0&&(Kl=0)}function Kf(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var s=31-et(i),r=1<<s,d=n[s];d===-1?((r&l)===0||(r&a)!==0)&&(n[s]=vn(r,t)):d<=t&&(e.expiredLanes|=r),i&=~r}if(t=he,l=k,l=na(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(ue===2||ue===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&mi(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||_a(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&mi(a),Oa(l)){case 2:case 8:l=xn;break;case 32:l=jl;break;case 268435456:l=xi;break;default:l=jl}return a=Jf.bind(null,e),l=mn(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&mi(a),e.callbackPriority=2,e.callbackNode=null,2}function Jf(e,t){if(Le!==0&&Le!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(gu()&&e.callbackNode!==l)return null;var a=k;return a=na(e,e===he?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Cf(e,a,t),Kf(e,Je()),e.callbackNode!=null&&e.callbackNode===l?Jf.bind(null,e):null)}function kf(e,t){if(gu())return null;Cf(e,t,!0)}function hm(){zm(function(){(ae&6)!==0?mn(hn,mm):Vf()})}function jc(){if(Kl===0){var e=Va;e===0&&(e=X,X<<=1,(X&261888)===0&&(X=256)),Kl=e}return Kl}function $f(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:L(""+e)}function Wf(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function xm(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var i=$f((n[Ne]||null).action),s=a.submitter;s&&(t=(t=s[Ne]||null)?$f(t.formAction):s.getAttribute("formAction"),t!==null&&(i=t,s=null));var r=new Oi("action","action",null,a,n);e.push({event:r,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Kl!==0){var d=s?Wf(n,s):new FormData(n);Xs(l,{pending:!0,data:d,method:n.method,action:i},null,d)}}else typeof i=="function"&&(r.preventDefault(),d=s?Wf(n,s):new FormData(n),Xs(l,{pending:!0,data:d,method:n.method,action:i},i,d))},currentTarget:n}]})}}for(var Tc=0;Tc<us.length;Tc++){var Ac=us[Tc],vm=Ac.toLowerCase(),bm=Ac[0].toUpperCase()+Ac.slice(1);Zt(vm,"on"+bm)}Zt(zr,"onAnimationEnd"),Zt(Er,"onAnimationIteration"),Zt(Cr,"onAnimationStart"),Zt("dblclick","onDoubleClick"),Zt("focusin","onFocus"),Zt("focusout","onBlur"),Zt(U0,"onTransitionRun"),Zt(q0,"onTransitionStart"),Zt(B0,"onTransitionCancel"),Zt(Dr,"onTransitionEnd"),ye("onMouseEnter",["mouseout","mouseover"]),ye("onMouseLeave",["mouseout","mouseover"]),ye("onPointerEnter",["pointerout","pointerover"]),ye("onPointerLeave",["pointerout","pointerover"]),We("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),We("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),We("onBeforeInput",["compositionend","keypress","textInput","paste"]),We("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),We("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),We("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ei="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),gm=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ei));function Ff(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],n=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var s=a.length-1;0<=s;s--){var r=a[s],d=r.instance,h=r.currentTarget;if(r=r.listener,d!==i&&n.isPropagationStopped())break e;i=r,n.currentTarget=h;try{i(n)}catch(g){Bi(g)}n.currentTarget=null,i=d}else for(s=0;s<a.length;s++){if(r=a[s],d=r.instance,h=r.currentTarget,r=r.listener,d!==i&&n.isPropagationStopped())break e;i=r,n.currentTarget=h;try{i(n)}catch(g){Bi(g)}n.currentTarget=null,i=d}}}}function V(e,t){var l=t[Gt];l===void 0&&(l=t[Gt]=new Set);var a=e+"__bubble";l.has(a)||(If(t,e,2,!1),l.add(a))}function zc(e,t,l){var a=0;t&&(a|=4),If(l,e,a,t)}var Su="_reactListening"+Math.random().toString(36).slice(2);function Ec(e){if(!e[Su]){e[Su]=!0,$t.forEach(function(l){l!=="selectionchange"&&(gm.has(l)||zc(l,!1,e),zc(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Su]||(t[Su]=!0,zc("selectionchange",!1,t))}}function If(e,t,l,a){switch(Co(t)){case 2:var n=Km;break;case 8:n=Jm;break;default:n=Qc}l=n.bind(null,t,l,e),n=void 0,!Fe||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),a?n!==void 0?e.addEventListener(t,l,{capture:!0,passive:n}):e.addEventListener(t,l,!0):n!==void 0?e.addEventListener(t,l,{passive:n}):e.addEventListener(t,l,!1)}function Cc(e,t,l,a,n){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var s=a.tag;if(s===3||s===4){var r=a.stateNode.containerInfo;if(r===n)break;if(s===4)for(s=a.return;s!==null;){var d=s.tag;if((d===3||d===4)&&s.stateNode.containerInfo===n)return;s=s.return}for(;r!==null;){if(s=il(r),s===null)return;if(d=s.tag,d===5||d===6||d===26||d===27){a=i=s;continue e}r=r.parentNode}}a=a.return}Ci(function(){var h=i,g=Re(l),S=[];e:{var x=_r.get(e);if(x!==void 0){var v=Oi,C=e;switch(e){case"keypress":if(_i(l)===0)break e;case"keydown":case"keyup":v=f0;break;case"focusin":C="focus",v=Fu;break;case"focusout":C="blur",v=Fu;break;case"beforeblur":case"afterblur":v=Fu;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":v=ir;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":v=Po;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":v=h0;break;case zr:case Er:case Cr:v=l0;break;case Dr:v=v0;break;case"scroll":case"scrollend":v=Fo;break;case"wheel":v=g0;break;case"copy":case"cut":case"paste":v=n0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":v=sr;break;case"toggle":case"beforetoggle":v=p0}var q=(t&4)!==0,oe=!q&&(e==="scroll"||e==="scrollend"),o=q?x!==null?x+"Capture":null:x;q=[];for(var f=h,m;f!==null;){var y=f;if(m=y.stateNode,y=y.tag,y!==5&&y!==26&&y!==27||m===null||o===null||(y=ca(f,o),y!=null&&q.push(ti(f,y,m))),oe)break;f=f.return}0<q.length&&(x=new v(x,C,null,l,g),S.push({event:x,listeners:q}))}}if((t&7)===0){e:{if(x=e==="mouseover"||e==="pointerover",v=e==="mouseout"||e==="pointerout",x&&l!==je&&(C=l.relatedTarget||l.fromElement)&&(il(C)||C[zl]))break e;if((v||x)&&(x=g.window===g?g:(x=g.ownerDocument)?x.defaultView||x.parentWindow:window,v?(C=l.relatedTarget||l.toElement,v=h,C=C?il(C):null,C!==null&&(oe=w(C),q=C.tag,C!==oe||q!==5&&q!==27&&q!==6)&&(C=null)):(v=null,C=h),v!==C)){if(q=ir,y="onMouseLeave",o="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(q=sr,y="onPointerLeave",o="onPointerEnter",f="pointer"),oe=v==null?x:J(v),m=C==null?x:J(C),x=new q(y,f+"leave",v,l,g),x.target=oe,x.relatedTarget=m,y=null,il(g)===h&&(q=new q(o,f+"enter",C,l,g),q.target=m,q.relatedTarget=oe,y=q),oe=y,v&&C)t:{for(q=ym,o=v,f=C,m=0,y=o;y;y=q(y))m++;y=0;for(var O=f;O;O=q(O))y++;for(;0<m-y;)o=q(o),m--;for(;0<y-m;)f=q(f),y--;for(;m--;){if(o===f||f!==null&&o===f.alternate){q=o;break t}o=q(o),f=q(f)}q=null}else q=null;v!==null&&Pf(S,x,v,q,!1),C!==null&&oe!==null&&Pf(S,oe,C,q,!0)}}e:{if(x=h?J(h):window,v=x.nodeName&&x.nodeName.toLowerCase(),v==="select"||v==="input"&&x.type==="file")var te=xr;else if(mr(x))if(vr)te=_0;else{te=C0;var D=E0}else v=x.nodeName,!v||v.toLowerCase()!=="input"||x.type!=="checkbox"&&x.type!=="radio"?h&&c(h.elementType)&&(te=xr):te=D0;if(te&&(te=te(e,h))){hr(S,te,l,g);break e}D&&D(e,x,h),e==="focusout"&&h&&x.type==="number"&&h.memoizedProps.value!=null&&Nn(x,"number",x.value)}switch(D=h?J(h):window,e){case"focusin":(mr(D)||D.contentEditable==="true")&&(Ra=D,as=h,_n=null);break;case"focusout":_n=as=Ra=null;break;case"mousedown":ns=!0;break;case"contextmenu":case"mouseup":case"dragend":ns=!1,Tr(S,l,g);break;case"selectionchange":if(O0)break;case"keydown":case"keyup":Tr(S,l,g)}var Q;if(Pu)e:{switch(e){case"compositionstart":var $="onCompositionStart";break e;case"compositionend":$="onCompositionEnd";break e;case"compositionupdate":$="onCompositionUpdate";break e}$=void 0}else Ha?fr(e,l)&&($="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&($="onCompositionStart");$&&(cr&&l.locale!=="ko"&&(Ha||$!=="onCompositionStart"?$==="onCompositionEnd"&&Ha&&(Q=ar()):(tt=g,ra="value"in tt?tt.value:tt.textContent,Ha=!0)),D=Nu(h,$),0<D.length&&($=new ur($,e,null,l,g),S.push({event:$,listeners:D}),Q?$.data=Q:(Q=or(l),Q!==null&&($.data=Q)))),(Q=N0?j0(e,l):T0(e,l))&&($=Nu(h,"onBeforeInput"),0<$.length&&(D=new ur("onBeforeInput","beforeinput",null,l,g),S.push({event:D,listeners:$}),D.data=Q)),xm(S,e,h,l,g)}Ff(S,t)})}function ti(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Nu(e,t){for(var l=t+"Capture",a=[];e!==null;){var n=e,i=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||i===null||(n=ca(e,l),n!=null&&a.unshift(ti(e,n,i)),n=ca(e,t),n!=null&&a.push(ti(e,n,i))),e.tag===3)return a;e=e.return}return[]}function ym(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Pf(e,t,l,a,n){for(var i=t._reactName,s=[];l!==null&&l!==a;){var r=l,d=r.alternate,h=r.stateNode;if(r=r.tag,d!==null&&d===a)break;r!==5&&r!==26&&r!==27||h===null||(d=h,n?(h=ca(l,i),h!=null&&s.unshift(ti(l,h,d))):n||(h=ca(l,i),h!=null&&s.push(ti(l,h,d)))),l=l.return}s.length!==0&&e.push({event:t,listeners:s})}var pm=/\r\n?/g,Sm=/\u0000|\uFFFD/g;function eo(e){return(typeof e=="string"?e:""+e).replace(pm,`
|
|
`).replace(Sm,"")}function to(e,t){return t=eo(t),eo(e)===t}function fe(e,t,l,a,n,i){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Ft(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Ft(e,""+a);break;case"className":sa(e,"class",a);break;case"tabIndex":sa(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":sa(e,l,a);break;case"style":zi(e,a,i);break;case"data":if(t!=="object"){sa(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=L(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"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"&&(l==="formAction"?(t!=="input"&&fe(e,t,"name",n.name,n,null),fe(e,t,"formEncType",n.formEncType,n,null),fe(e,t,"formMethod",n.formMethod,n,null),fe(e,t,"formTarget",n.formTarget,n,null)):(fe(e,t,"encType",n.encType,n,null),fe(e,t,"method",n.method,n,null),fe(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=L(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=ee);break;case"onScroll":a!=null&&V("scroll",e);break;case"onScrollEnd":a!=null&&V("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(b(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(b(60));e.innerHTML=l}}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}l=L(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);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(l,""+a):e.removeAttribute(l);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(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":V("beforetoggle",e),V("toggle",e),qa(e,"popover",a);break;case"xlinkActuate":Qt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Qt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Qt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Qt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Qt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Qt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Qt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":qa(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=N.get(l)||l,qa(e,l,a))}}function Dc(e,t,l,a,n,i){switch(l){case"style":zi(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(b(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(b(60));e.innerHTML=l}}break;case"children":typeof a=="string"?Ft(e,a):(typeof a=="number"||typeof a=="bigint")&&Ft(e,""+a);break;case"onScroll":a!=null&&V("scroll",e);break;case"onScrollEnd":a!=null&&V("scrollend",e);break;case"onClick":a!=null&&(e.onclick=ee);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ie.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),t=l.slice(2,n?l.length-7:void 0),i=e[Ne]||null,i=i!=null?i[l]:null,typeof i=="function"&&e.removeEventListener(t,i,n),typeof a=="function")){typeof i!="function"&&i!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,n);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):qa(e,l,a)}}}function Ve(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":V("error",e),V("load",e);var a=!1,n=!1,i;for(i in l)if(l.hasOwnProperty(i)){var s=l[i];if(s!=null)switch(i){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(b(137,t));default:fe(e,t,i,s,l,null)}}n&&fe(e,t,"srcSet",l.srcSet,l,null),a&&fe(e,t,"src",l.src,l,null);return;case"input":V("invalid",e);var r=i=s=n=null,d=null,h=null;for(a in l)if(l.hasOwnProperty(a)){var g=l[a];if(g!=null)switch(a){case"name":n=g;break;case"type":s=g;break;case"checked":d=g;break;case"defaultChecked":h=g;break;case"value":i=g;break;case"defaultValue":r=g;break;case"children":case"dangerouslySetInnerHTML":if(g!=null)throw Error(b(137,t));break;default:fe(e,t,a,g,l,null)}}ji(e,i,r,d,h,s,n,!1);return;case"select":V("invalid",e),a=s=i=null;for(n in l)if(l.hasOwnProperty(n)&&(r=l[n],r!=null))switch(n){case"value":i=r;break;case"defaultValue":s=r;break;case"multiple":a=r;default:fe(e,t,n,r,l,null)}t=i,l=s,e.multiple=!!a,t!=null?_l(e,!!a,t,!1):l!=null&&_l(e,!!a,l,!0);return;case"textarea":V("invalid",e),i=n=a=null;for(s in l)if(l.hasOwnProperty(s)&&(r=l[s],r!=null))switch(s){case"value":a=r;break;case"defaultValue":n=r;break;case"children":i=r;break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(b(91));break;default:fe(e,t,s,r,l,null)}Ju(e,a,n,i);return;case"option":for(d in l)if(l.hasOwnProperty(d)&&(a=l[d],a!=null))switch(d){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:fe(e,t,d,a,l,null)}return;case"dialog":V("beforetoggle",e),V("toggle",e),V("cancel",e),V("close",e);break;case"iframe":case"object":V("load",e);break;case"video":case"audio":for(a=0;a<ei.length;a++)V(ei[a],e);break;case"image":V("error",e),V("load",e);break;case"details":V("toggle",e);break;case"embed":case"source":case"link":V("error",e),V("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(h in l)if(l.hasOwnProperty(h)&&(a=l[h],a!=null))switch(h){case"children":case"dangerouslySetInnerHTML":throw Error(b(137,t));default:fe(e,t,h,a,l,null)}return;default:if(c(t)){for(g in l)l.hasOwnProperty(g)&&(a=l[g],a!==void 0&&Dc(e,t,g,a,l,void 0));return}}for(r in l)l.hasOwnProperty(r)&&(a=l[r],a!=null&&fe(e,t,r,a,l,null))}function Nm(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,i=null,s=null,r=null,d=null,h=null,g=null;for(v in l){var S=l[v];if(l.hasOwnProperty(v)&&S!=null)switch(v){case"checked":break;case"value":break;case"defaultValue":d=S;default:a.hasOwnProperty(v)||fe(e,t,v,null,a,S)}}for(var x in a){var v=a[x];if(S=l[x],a.hasOwnProperty(x)&&(v!=null||S!=null))switch(x){case"type":i=v;break;case"name":n=v;break;case"checked":h=v;break;case"defaultChecked":g=v;break;case"value":s=v;break;case"defaultValue":r=v;break;case"children":case"dangerouslySetInnerHTML":if(v!=null)throw Error(b(137,t));break;default:v!==S&&fe(e,t,x,v,a,S)}}Ni(e,s,r,d,h,g,i,n);return;case"select":v=s=r=x=null;for(i in l)if(d=l[i],l.hasOwnProperty(i)&&d!=null)switch(i){case"value":break;case"multiple":v=d;default:a.hasOwnProperty(i)||fe(e,t,i,null,a,d)}for(n in a)if(i=a[n],d=l[n],a.hasOwnProperty(n)&&(i!=null||d!=null))switch(n){case"value":x=i;break;case"defaultValue":r=i;break;case"multiple":s=i;default:i!==d&&fe(e,t,n,i,a,d)}t=r,l=s,a=v,x!=null?_l(e,!!l,x,!1):!!a!=!!l&&(t!=null?_l(e,!!l,t,!0):_l(e,!!l,l?[]:"",!1));return;case"textarea":v=x=null;for(r in l)if(n=l[r],l.hasOwnProperty(r)&&n!=null&&!a.hasOwnProperty(r))switch(r){case"value":break;case"children":break;default:fe(e,t,r,null,a,n)}for(s in a)if(n=a[s],i=l[s],a.hasOwnProperty(s)&&(n!=null||i!=null))switch(s){case"value":x=n;break;case"defaultValue":v=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(b(91));break;default:n!==i&&fe(e,t,s,n,a,i)}Ti(e,x,v);return;case"option":for(var C in l)if(x=l[C],l.hasOwnProperty(C)&&x!=null&&!a.hasOwnProperty(C))switch(C){case"selected":e.selected=!1;break;default:fe(e,t,C,null,a,x)}for(d in a)if(x=a[d],v=l[d],a.hasOwnProperty(d)&&x!==v&&(x!=null||v!=null))switch(d){case"selected":e.selected=x&&typeof x!="function"&&typeof x!="symbol";break;default:fe(e,t,d,x,a,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 q in l)x=l[q],l.hasOwnProperty(q)&&x!=null&&!a.hasOwnProperty(q)&&fe(e,t,q,null,a,x);for(h in a)if(x=a[h],v=l[h],a.hasOwnProperty(h)&&x!==v&&(x!=null||v!=null))switch(h){case"children":case"dangerouslySetInnerHTML":if(x!=null)throw Error(b(137,t));break;default:fe(e,t,h,x,a,v)}return;default:if(c(t)){for(var oe in l)x=l[oe],l.hasOwnProperty(oe)&&x!==void 0&&!a.hasOwnProperty(oe)&&Dc(e,t,oe,void 0,a,x);for(g in a)x=a[g],v=l[g],!a.hasOwnProperty(g)||x===v||x===void 0&&v===void 0||Dc(e,t,g,x,a,v);return}}for(var o in l)x=l[o],l.hasOwnProperty(o)&&x!=null&&!a.hasOwnProperty(o)&&fe(e,t,o,null,a,x);for(S in a)x=a[S],v=l[S],!a.hasOwnProperty(S)||x===v||x==null&&v==null||fe(e,t,S,x,a,v)}function lo(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function jm(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],i=n.transferSize,s=n.initiatorType,r=n.duration;if(i&&r&&lo(s)){for(s=0,r=n.responseEnd,a+=1;a<l.length;a++){var d=l[a],h=d.startTime;if(h>r)break;var g=d.transferSize,S=d.initiatorType;g&&lo(S)&&(d=d.responseEnd,s+=g*(d<r?1:(r-h)/(d-h)))}if(--a,t+=8*(i+s)/(n.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var _c=null,Mc=null;function ju(e){return e.nodeType===9?e:e.ownerDocument}function ao(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 no(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 Oc(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 Uc=null;function Tm(){var e=window.event;return e&&e.type==="popstate"?e===Uc?!1:(Uc=e,!0):(Uc=null,!1)}var io=typeof setTimeout=="function"?setTimeout:void 0,Am=typeof clearTimeout=="function"?clearTimeout:void 0,uo=typeof Promise=="function"?Promise:void 0,zm=typeof queueMicrotask=="function"?queueMicrotask:typeof uo<"u"?function(e){return uo.resolve(null).then(e).catch(Em)}:io;function Em(e){setTimeout(function(){throw e})}function Jl(e){return e==="head"}function so(e,t){var l=t,a=0;do{var n=l.nextSibling;if(e.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(n),fn(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")li(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,li(l);for(var i=l.firstChild;i;){var s=i.nextSibling,r=i.nodeName;i[El]||r==="SCRIPT"||r==="STYLE"||r==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=s}}else l==="body"&&li(e.ownerDocument.body);l=n}while(l);fn(t)}function co(e,t){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function qc(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":qc(l),pn(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Cm(e,t,l,a){for(;e.nodeType===1;){var n=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[El])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Mt(e.nextSibling),e===null)break}return null}function Dm(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Mt(e.nextSibling),e===null))return null;return e}function ro(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Mt(e.nextSibling),e===null))return null;return e}function Bc(e){return e.data==="$?"||e.data==="$~"}function Hc(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function _m(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Mt(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 Rc=null;function fo(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Mt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function oo(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function mo(e,t,l){switch(t=ju(l),e){case"html":if(e=t.documentElement,!e)throw Error(b(452));return e;case"head":if(e=t.head,!e)throw Error(b(453));return e;case"body":if(e=t.body,!e)throw Error(b(454));return e;default:throw Error(b(451))}}function li(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pn(e)}var Ot=new Map,ho=new Set;function Tu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var pl=A.d;A.d={f:Mm,r:Om,D:Um,C:qm,L:Bm,m:Hm,X:Lm,S:Rm,M:wm};function Mm(){var e=pl.f(),t=xu();return e||t}function Om(e){var t=Cl(e);t!==null&&t.tag===5&&t.type==="form"?Dd(t):pl.r(e)}var cn=typeof document>"u"?null:document;function xo(e,t,l){var a=cn;if(a&&typeof t=="string"&&t){var n=it(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),ho.has(n)||(ho.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),Ve(t,"link",e),G(t),a.head.appendChild(t)))}}function Um(e){pl.D(e),xo("dns-prefetch",e,null)}function qm(e,t){pl.C(e,t),xo("preconnect",e,t)}function Bm(e,t,l){pl.L(e,t,l);var a=cn;if(a&&e&&t){var n='link[rel="preload"][as="'+it(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+it(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+it(l.imageSizes)+'"]')):n+='[href="'+it(e)+'"]';var i=n;switch(t){case"style":i=rn(e);break;case"script":i=dn(e)}Ot.has(i)||(e=M({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Ot.set(i,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(ai(i))||t==="script"&&a.querySelector(ni(i))||(t=a.createElement("link"),Ve(t,"link",e),G(t),a.head.appendChild(t)))}}function Hm(e,t){pl.m(e,t);var l=cn;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+it(a)+'"][href="'+it(e)+'"]',i=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=dn(e)}if(!Ot.has(i)&&(e=M({rel:"modulepreload",href:e},t),Ot.set(i,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(ni(i)))return}a=l.createElement("link"),Ve(a,"link",e),G(a),l.head.appendChild(a)}}}function Rm(e,t,l){pl.S(e,t,l);var a=cn;if(a&&e){var n=$e(a).hoistableStyles,i=rn(e);t=t||"default";var s=n.get(i);if(!s){var r={loading:0,preload:null};if(s=a.querySelector(ai(i)))r.loading=5;else{e=M({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Ot.get(i))&&Lc(e,l);var d=s=a.createElement("link");G(d),Ve(d,"link",e),d._p=new Promise(function(h,g){d.onload=h,d.onerror=g}),d.addEventListener("load",function(){r.loading|=1}),d.addEventListener("error",function(){r.loading|=2}),r.loading|=4,Au(s,t,a)}s={type:"stylesheet",instance:s,count:1,state:r},n.set(i,s)}}}function Lm(e,t){pl.X(e,t);var l=cn;if(l&&e){var a=$e(l).hoistableScripts,n=dn(e),i=a.get(n);i||(i=l.querySelector(ni(n)),i||(e=M({src:e,async:!0},t),(t=Ot.get(n))&&wc(e,t),i=l.createElement("script"),G(i),Ve(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function wm(e,t){pl.M(e,t);var l=cn;if(l&&e){var a=$e(l).hoistableScripts,n=dn(e),i=a.get(n);i||(i=l.querySelector(ni(n)),i||(e=M({src:e,async:!0,type:"module"},t),(t=Ot.get(n))&&wc(e,t),i=l.createElement("script"),G(i),Ve(i,"link",e),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(n,i))}}function vo(e,t,l,a){var n=(n=Lt.current)?Tu(n):null;if(!n)throw Error(b(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=rn(l.href),l=$e(n).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=rn(l.href);var i=$e(n).hoistableStyles,s=i.get(e);if(s||(n=n.ownerDocument||n,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,s),(i=n.querySelector(ai(e)))&&!i._p&&(s.instance=i,s.state.loading=5),Ot.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Ot.set(e,l),i||Ym(n,e,l,s.state))),t&&a===null)throw Error(b(528,""));return s}if(t&&a!==null)throw Error(b(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=dn(l),l=$e(n).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(b(444,e))}}function rn(e){return'href="'+it(e)+'"'}function ai(e){return'link[rel="stylesheet"]['+e+"]"}function bo(e){return M({},e,{"data-precedence":e.precedence,precedence:null})}function Ym(e,t,l,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}),Ve(t,"link",l),G(t),e.head.appendChild(t))}function dn(e){return'[src="'+it(e)+'"]'}function ni(e){return"script[async]"+e}function go(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+it(l.href)+'"]');if(a)return t.instance=a,G(a),a;var n=M({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),G(a),Ve(a,"style",n),Au(a,l.precedence,e),t.instance=a;case"stylesheet":n=rn(l.href);var i=e.querySelector(ai(n));if(i)return t.state.loading|=4,t.instance=i,G(i),i;a=bo(l),(n=Ot.get(n))&&Lc(a,n),i=(e.ownerDocument||e).createElement("link"),G(i);var s=i;return s._p=new Promise(function(r,d){s.onload=r,s.onerror=d}),Ve(i,"link",a),t.state.loading|=4,Au(i,l.precedence,e),t.instance=i;case"script":return i=dn(l.src),(n=e.querySelector(ni(i)))?(t.instance=n,G(n),n):(a=l,(n=Ot.get(i))&&(a=M({},l),wc(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),G(n),Ve(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(b(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Au(a,l.precedence,e));return t.instance}function Au(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,i=n,s=0;s<a.length;s++){var r=a[s];if(r.dataset.precedence===t)i=r;else if(i!==n)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Lc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function wc(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var zu=null;function yo(e,t,l){if(zu===null){var a=new Map,n=zu=new Map;n.set(l,a)}else n=zu,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var i=l[n];if(!(i[El]||i[Me]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var s=i.getAttribute(t)||"";s=e+s;var r=a.get(s);r?r.push(i):a.set(s,[i])}}return a}function po(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Gm(e,t,l){if(l===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 So(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Qm(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=rn(a.href),i=t.querySelector(ai(n));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Eu.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=i,G(i);return}i=t.ownerDocument||t,a=bo(a),(n=Ot.get(n))&&Lc(a,n),i=i.createElement("link"),G(i);var s=i;s._p=new Promise(function(r,d){s.onload=r,s.onerror=d}),Ve(i,"link",a),l.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Eu.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Yc=0;function Xm(e,t){return e.stylesheets&&e.count===0&&Du(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Du(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Yc===0&&(Yc=62500*jm());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Du(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Yc?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Eu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Du(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Cu=null;function Du(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Cu=new Map,t.forEach(Zm,e),Cu=null,Eu.call(e))}function Zm(e,t){if(!(t.state.loading&4)){var l=Cu.get(e);if(l)var a=l.get(null);else{l=new Map,Cu.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<n.length;i++){var s=n[i];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(l.set(s.dataset.precedence,s),a=s)}a&&l.set(null,a)}n=t.instance,s=n.getAttribute("data-precedence"),i=l.get(s)||a,i===a&&l.set(null,n),l.set(s,n),this.count++,a=Eu.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),i?i.parentNode.insertBefore(n,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var ii={$$typeof:we,Provider:null,Consumer:null,_currentValue:U,_currentValue2:U,_threadCount:0};function Vm(e,t,l,a,n,i,s,r,d){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=ia(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ia(0),this.hiddenUpdates=ia(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=i,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=d,this.incompleteTransitions=new Map}function No(e,t,l,a,n,i,s,r,d,h,g,S){return e=new Vm(e,t,l,s,d,h,g,S,r),t=1,i===!0&&(t|=24),i=vt(3,null,null,t),e.current=i,i.stateNode=e,t=ys(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:l,cache:t},js(i),e}function jo(e){return e?(e=Ya,e):Ya}function To(e,t,l,a,n,i){n=jo(n),a.context===null?a.context=n:a.pendingContext=n,a=Hl(t),a.payload={element:l},i=i===void 0?null:i,i!==null&&(a.callback=i),l=Rl(e,a,t),l!==null&&(ot(l,e,t),Rn(l,e,t))}function Ao(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Gc(e,t){Ao(e,t),(e=e.alternate)&&Ao(e,t)}function zo(e){if(e.tag===13||e.tag===31){var t=ma(e,67108864);t!==null&&ot(t,e,67108864),Gc(e,67108864)}}function Eo(e){if(e.tag===13||e.tag===31){var t=St();t=Ma(t);var l=ma(e,t);l!==null&&ot(l,e,t),Gc(e,t)}}var _u=!0;function Km(e,t,l,a){var n=p.T;p.T=null;var i=A.p;try{A.p=2,Qc(e,t,l,a)}finally{A.p=i,p.T=n}}function Jm(e,t,l,a){var n=p.T;p.T=null;var i=A.p;try{A.p=8,Qc(e,t,l,a)}finally{A.p=i,p.T=n}}function Qc(e,t,l,a){if(_u){var n=Xc(a);if(n===null)Cc(e,t,a,Mu,l),Do(e,a);else if($m(n,e,t,l,a))a.stopPropagation();else if(Do(e,a),t&4&&-1<km.indexOf(e)){for(;n!==null;){var i=Cl(n);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var s=Tl(i.pendingLanes);if(s!==0){var r=i;for(r.pendingLanes|=2,r.entangledLanes|=2;s;){var d=1<<31-et(s);r.entanglements[1]|=d,s&=~d}ll(i),(ae&6)===0&&(mu=Je()+500,Pn(0))}}break;case 31:case 13:r=ma(i,2),r!==null&&ot(r,i,2),xu(),Gc(i,2)}if(i=Xc(a),i===null&&Cc(e,t,a,Mu,l),i===n)break;n=i}n!==null&&a.stopPropagation()}else Cc(e,t,a,null,l)}}function Xc(e){return e=Re(e),Zc(e)}var Mu=null;function Zc(e){if(Mu=null,e=il(e),e!==null){var t=w(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=H(t),e!==null)return e;e=null}else if(l===31){if(e=xe(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Mu=e,null}function Co(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(wu()){case hn:return 2;case xn:return 8;case jl:case er:return 32;case xi:return 268435456;default:return 32}default:return 32}}var Vc=!1,kl=null,$l=null,Wl=null,ui=new Map,si=new Map,Fl=[],km="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Do(e,t){switch(e){case"focusin":case"focusout":kl=null;break;case"dragenter":case"dragleave":$l=null;break;case"mouseover":case"mouseout":Wl=null;break;case"pointerover":case"pointerout":ui.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":si.delete(t.pointerId)}}function ci(e,t,l,a,n,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:i,targetContainers:[n]},t!==null&&(t=Cl(t),t!==null&&zo(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function $m(e,t,l,a,n){switch(t){case"focusin":return kl=ci(kl,e,t,l,a,n),!0;case"dragenter":return $l=ci($l,e,t,l,a,n),!0;case"mouseover":return Wl=ci(Wl,e,t,l,a,n),!0;case"pointerover":var i=n.pointerId;return ui.set(i,ci(ui.get(i)||null,e,t,l,a,n)),!0;case"gotpointercapture":return i=n.pointerId,si.set(i,ci(si.get(i)||null,e,t,l,a,n)),!0}return!1}function _o(e){var t=il(e.target);if(t!==null){var l=w(t);if(l!==null){if(t=l.tag,t===13){if(t=H(l),t!==null){e.blockedOn=t,yn(e.priority,function(){Eo(l)});return}}else if(t===31){if(t=xe(l),t!==null){e.blockedOn=t,yn(e.priority,function(){Eo(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ou(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Xc(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);je=a,l.target.dispatchEvent(a),je=null}else return t=Cl(l),t!==null&&zo(t),e.blockedOn=l,!1;t.shift()}return!0}function Mo(e,t,l){Ou(e)&&l.delete(t)}function Wm(){Vc=!1,kl!==null&&Ou(kl)&&(kl=null),$l!==null&&Ou($l)&&($l=null),Wl!==null&&Ou(Wl)&&(Wl=null),ui.forEach(Mo),si.forEach(Mo)}function Uu(e,t){e.blockedOn===t&&(e.blockedOn=null,Vc||(Vc=!0,j.unstable_scheduleCallback(j.unstable_NormalPriority,Wm)))}var qu=null;function Oo(e){qu!==e&&(qu=e,j.unstable_scheduleCallback(j.unstable_NormalPriority,function(){qu===e&&(qu=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],n=e[t+2];if(typeof a!="function"){if(Zc(a||l)===null)continue;break}var i=Cl(l);i!==null&&(e.splice(t,3),t-=3,Xs(i,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function fn(e){function t(d){return Uu(d,e)}kl!==null&&Uu(kl,e),$l!==null&&Uu($l,e),Wl!==null&&Uu(Wl,e),ui.forEach(t),si.forEach(t);for(var l=0;l<Fl.length;l++){var a=Fl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Fl.length&&(l=Fl[0],l.blockedOn===null);)_o(l),l.blockedOn===null&&Fl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],i=l[a+1],s=n[Ne]||null;if(typeof i=="function")s||Oo(l);else if(s){var r=null;if(i&&i.hasAttribute("formAction")){if(n=i,s=i[Ne]||null)r=s.formAction;else if(Zc(n)!==null)continue}else r=s.action;typeof r=="function"?l[a+1]=r:(l.splice(a,3),a-=3),Oo(l)}}}function Uo(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(s){return n=s})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function Kc(e){this._internalRoot=e}Bu.prototype.render=Kc.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(b(409));var l=t.current,a=St();To(l,a,e,t,null,null)},Bu.prototype.unmount=Kc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;To(e.current,2,null,e,null,null),xu(),t[zl]=null}};function Bu(e){this._internalRoot=e}Bu.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ua();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Fl.length&&t!==0&&t<Fl[l].priority;l++);Fl.splice(l,0,e),l===0&&_o(e)}};var qo=F.version;if(qo!=="19.2.7")throw Error(b(527,qo,"19.2.7"));A.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(b(188)):(e=Object.keys(e).join(","),Error(b(268,e)));return e=_e(t),e=e!==null?R(e):null,e=e===null?null:e.stateNode,e};var Fm={bundleType:0,version:"19.2.7",rendererPackageName:"react-dom",currentDispatcherRef:p,reconcilerVersion:"19.2.7"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hu.isDisabled&&Hu.supportsFiber)try{Da=Hu.inject(Fm),ke=Hu}catch{}}return di.createRoot=function(e,t){if(!_(e))throw Error(b(299));var l=!1,a="",n=wd,i=Yd,s=Gd;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=No(e,1,!1,null,null,l,a,null,n,i,s,Uo),e[zl]=t.current,Ec(e),new Kc(t)},di.hydrateRoot=function(e,t,l){if(!_(e))throw Error(b(299));var a=!1,n="",i=wd,s=Yd,r=Gd,d=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(s=l.onCaughtError),l.onRecoverableError!==void 0&&(r=l.onRecoverableError),l.formState!==void 0&&(d=l.formState)),t=No(e,1,!0,t,l??null,a,n,d,i,s,r,Uo),t.context=jo(null),l=t.current,a=St(),a=Ma(a),n=Hl(a),n.callback=null,Rl(l,n,a),l=a,t.current.lanes=l,ua(t,l),ll(t),e[zl]=t.current,Ec(e),new Bu(t)},di.version="19.2.7",di}var Qo;function Ah(){if(Qo)return $c.exports;Qo=1;function j(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(j)}catch(F){console.error(F)}}return j(),$c.exports=Th(),$c.exports}var zh=Ah();const Eh="modulepreload",Ch=function(j,F){return new URL(j,F).href},Xo={},Pc=function(F,B,b){let _=Promise.resolve();if(B&&B.length>0){let H=function(R){return Promise.all(R.map(M=>Promise.resolve(M).then(I=>({status:"fulfilled",value:I}),I=>({status:"rejected",reason:I}))))};const xe=document.getElementsByTagName("link"),ne=document.querySelector("meta[property=csp-nonce]"),_e=ne?.nonce||ne?.getAttribute("nonce");_=H(B.map(R=>{if(R=Ch(R,b),R in Xo)return;Xo[R]=!0;const M=R.endsWith(".css"),I=M?'[rel="stylesheet"]':"";if(!!b)for(let ze=xe.length-1;ze>=0;ze--){const K=xe[ze];if(K.href===R&&(!M||K.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${R}"]${I}`))return;const ve=document.createElement("link");if(ve.rel=M?"stylesheet":Eh,M||(ve.as="script"),ve.crossOrigin="",ve.href=R,_e&&ve.setAttribute("nonce",_e),document.head.appendChild(ve),M)return new Promise((ze,K)=>{ve.addEventListener("load",ze),ve.addEventListener("error",()=>K(new Error(`Unable to preload CSS for ${R}`)))})}))}function w(H){const xe=new Event("vite:preloadError",{cancelable:!0});if(xe.payload=H,window.dispatchEvent(xe),!xe.defaultPrevented)throw H}return _.then(H=>{for(const xe of H||[])xe.status==="rejected"&&w(xe.reason);return F().catch(w)})};/**
|
|
* @license
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/const ko=[{id:"1",username:"admin",fullName:"นพ.เกียรติภูมิ ภูมิใจไทย (ผู้อำนวยการศูนย์)",role:"Admin",isActive:!0,pin:"1234",mustChangePin:!1},{id:"2",username:"supervisor1",fullName:"พญ.ชลิดา พัชรสมุย (แพทย์อำนวยการ/Supervisor)",role:"Supervisor",isActive:!0,pin:"1234",mustChangePin:!1},{id:"3",username:"dispatcher1",fullName:"นายสมเกียรติ มุ่งมั่น (Dispatcher 01)",role:"Dispatcher",isActive:!0,pin:"1234",mustChangePin:!1},{id:"4",username:"dispatcher2",fullName:"นางสาวสุดารัตน์ บรรเทา (Dispatcher 02)",role:"Dispatcher",isActive:!0,pin:"1234",mustChangePin:!1},{id:"5",username:"executive1",fullName:"ดร.สมชาย สมุยดี (ผู้บริหารระดับสูง)",role:"Executive",isActive:!0,pin:"1234",mustChangePin:!1},{id:"6",username:"samui_er",fullName:"พยาบาลสมหญิง รักเกาะ (พยาบาลวิชาชีพ ER รพ.เกาะสมุย)",role:"ER Koh Samui",isActive:!0,pin:"1234",mustChangePin:!1},{id:"7",username:"quality1",fullName:"นางพิศมัย พัฒนาระบบ (เจ้าหน้าที่ควบคุมคุณภาพ)",role:"Quality Officer",isActive:!0,pin:"1234",mustChangePin:!1},{id:"8",username:"driver1",fullName:"นายเด่นดนัย ขับปลอดภัย (พขร. กู้ชีพ)",role:"Driver",isActive:!0,pin:"1234",mustChangePin:!1},{id:"9",username:"ems1",fullName:"นายกิตติพงษ์ สุขใจ (กู้ชีพวิชาชีพ EMS)",role:"EMS",isActive:!0,pin:"1234",mustChangePin:!1}],$o=[{id:"u1",name:"โรงพยาบาลเกาะสมุย",level:"ALS",isActive:!0,isSamuiHospital:!0,sortOrder:1},{id:"u2",name:"โรงพยาบาลเกาะพะงัน",level:"ALS",isActive:!0,isSamuiHospital:!1,sortOrder:2},{id:"u3",name:"โรงพยาบาลเกาะเต่า",level:"BLS",isActive:!0,isSamuiHospital:!1,sortOrder:3},{id:"u4",name:"โรงพยาบาลไทยอินเตอร์",level:"ALS",isActive:!0,isSamuiHospital:!1,sortOrder:4},{id:"u5",name:"โรงพยาบาลบ้านดอนอินเตอร์",level:"ALS",isActive:!0,isSamuiHospital:!1,sortOrder:5},{id:"u6",name:"โรงพยาบาลกรุงเทพสมุย",level:"ALS",isActive:!0,isSamuiHospital:!1,sortOrder:6},{id:"u7",name:"โรงพยาบาลวัฒนแพทย์สมุย",level:"ALS",isActive:!0,isSamuiHospital:!1,sortOrder:7},{id:"u8",name:"โรงพยาบาลพะงันอินเตอร์",level:"ALS",isActive:!0,isSamuiHospital:!1,sortOrder:8},{id:"u9",name:"โรงพยาบาลเฟิร์สเวสเทิร์น",level:"ALS",isActive:!0,isSamuiHospital:!1,sortOrder:9},{id:"u10",name:"เทศบาลนครเกาะสมุย",level:"BLS",isActive:!0,isSamuiHospital:!1,sortOrder:10},{id:"u11",name:"หน่วยกู้ชีพหน้าเมือง",level:"CLS",isActive:!0,isSamuiHospital:!1,sortOrder:11},{id:"u12",name:"หน่วยกู้ชีพละไม",level:"CLS",isActive:!0,isSamuiHospital:!1,sortOrder:12},{id:"u13",name:"หน่วยกู้ชีพเฉวง",level:"CLS",isActive:!0,isSamuiHospital:!1,sortOrder:13},{id:"u14",name:"กู้ภัยสมุยจุดสระเกศ",level:"BLS",isActive:!0,isSamuiHospital:!1,sortOrder:14},{id:"u15",name:"กู้ภัยสมุยจุดศิลางู",level:"BLS",isActive:!0,isSamuiHospital:!1,sortOrder:15},{id:"u16",name:"กู้ภัยสมุยจุดบ้านใต้",level:"BLS",isActive:!0,isSamuiHospital:!1,sortOrder:16},{id:"u17",name:"กู้ภัยสมุยจุดบ่อผุด",level:"BLS",isActive:!0,isSamuiHospital:!1,sortOrder:17},{id:"u18",name:"กู้ภัยพะงัน",level:"BLS",isActive:!0,isSamuiHospital:!1,sortOrder:18},{id:"u19",name:"กู้ภัยเกาะเต่า",level:"BLS",isActive:!0,isSamuiHospital:!1,sortOrder:19}],Zh=["พะงัน 2","เกาะเต่า 2","กู้ภัยพะงัน","กู้ภัยสมุย","เมืองสมุย","กู้ชีพละไม","กู้ชีพหน้าเมือง","กู้ชีพเฉวง","โรงพยาบาลกรุงเทพสมุย","โรงพยาบาลไทยอินเตอร์","โรงพยาบาลบ้านดอนอินเตอร์","โรงพยาบาลวัฒนแพทย์สมุย","โรงพยาบาลพะงันอินเตอร์","โรงพยาบาลไทยอินเตอร์เกาะพะงัน","ER สมุย","พขร. ว.4"],Zo=[{code:"01",title:"ปวดท้อง/หลัง/อุ้งเชิงกราน"},{code:"02",title:"แพ้ยา/แพ้แมลง/ภูมิแพ้"},{code:"03",title:"สัตว์กัด/ต่อย"},{code:"04",title:"ทำร้ายตนเอง/พยายามฆ่าตัวตาย"},{code:"05",title:"ไหม้/น้ำร้อนลวก/โดนสารเคมี"},{code:"06",title:"เจ็บหน้าอก/หัวใจ"},{code:"07",title:"สำลักสิ่งอุดกั้นทางเดินหายใจ"},{code:"08",title:"หมดสติ/ไม่รู้สึกตัว/โคม่า"},{code:"09",title:"ได้รับสารพิษ/ยาเกินขนาด"},{code:"10",title:"จมน้ำ/อุบัติเหตุทางน้ำ"},{code:"11",title:"ไฟช็อต/ฟ้าผ่า"},{code:"12",title:"เจ็บตา/ปัญหาทางการมองเห็น"},{code:"13",title:"ปวดศีรษะ"},{code:"14",title:"หัวใจหยุดเต้น/ไม่หายใจ"},{code:"15",title:"ตกที่สูง/อุบัติเหตุสิ่งของหล่นทับ"},{code:"16",title:"เลือดออก/ตกเลือด"},{code:"17",title:"อุบัติเหตุจราจร (RTI)"},{code:"18",title:"คลอดชีพ/แท้ง/ปัญหาทางนรีเวช"},{code:"19",title:"ชัก/ลมบ้าหมู"},{code:"20",title:"หลอดเลือดสมองอุดตัน/ตีบ/แตก (Stroke)"},{code:"21",title:"หายใจลำบาก/หอบหืด"},{code:"22",title:"จิตเวช/ก้าวร้าว/คลุ้มคลั่ง"},{code:"23",title:"ป่วย/อ่อนเพลีย/ไม่สบายตัว"},{code:"24",title:"ได้รับบาดเจ็บทางร่างกายอื่น ๆ"},{code:"25",title:"ภัยพิบัติ/เหตุสาธารณภัยกลุ่มใหญ่"}],Dh=[{id:"NRT-01",plateNo:"กข-9988 สุราษฎร์ธานี",unitId:"u1",unitName:"โรงพยาบาลเกาะสมุย",type:"ALS",isActive:!0},{id:"NRT-02",plateNo:"กข-5566 สุราษฎร์ธานี",unitId:"u1",unitName:"โรงพยาบาลเกาะสมุย",type:"ALS",isActive:!0},{id:"NRT-03",plateNo:"นค-1122 สุราษฎร์ธานี",unitId:"u2",unitName:"โรงพยาบาลเกาะพะงัน",type:"ALS",isActive:!0},{id:"NRT-04",plateNo:"นค-3344 สุราษฎร์ธานี",unitId:"u3",unitName:"โรงพยาบาลเกาะเต่า",type:"BLS",isActive:!0},{id:"NRT-05",plateNo:"บท-7744 สุราษฎร์ธานี",unitId:"u11",unitName:"หน่วยกู้ชีพหน้าเมือง",type:"BLS",isActive:!0},{id:"NRT-06",plateNo:"บท-8855 สุราษฎร์ธานี",unitId:"u12",unitName:"หน่วยกู้ชีพละไม",type:"BLS",isActive:!0}],Vh=[{id:"m1_1",name:"ระบบไฟฟ้าของรถพยาบาล (ไฟหน้า/ไฟเลี้ยว/ไฟหรี่)",category:1,severity:"critical"},{id:"m1_2",name:"เครื่องยนต์ (เช็กระดับน้ำมันเครื่อง/เสียงเครื่องยนต์)",category:1,severity:"critical"},{id:"m1_3",name:"แบตเตอรี่รถและขั้วต่อแบตเตอรี่",category:1,severity:"critical"},{id:"m1_4",name:"ระดับน้ำมันเชื้อเพลิง (ต้องมากกว่าครึ่งถัง)",category:1,severity:"critical"},{id:"m1_5",name:"ยางรถทุกล้อ (ความดันลมยางและดอกยาง)",category:1,severity:"critical"},{id:"m1_6",name:"ยางอะไหล่ประจำรถ",category:1,severity:"important"},{id:"m1_7",name:"แม่แรงและอุปกรณ์เครื่องมือเปลี่ยนยาง",category:1,severity:"important"},{id:"m1_8",name:"ไฟไซเรน/ไฟฉุกเฉินบนหลังคารถ",category:1,severity:"critical"},{id:"m1_9",name:"เสียงสัญญาณไซเรนฉุกเฉิน",category:1,severity:"critical"},{id:"m1_10",name:"ไฟส่องสว่างภายในห้องปฏิบัติการผู้ป่วย",category:1,severity:"critical"},{id:"m1_11",name:"วิทยุสื่อสารประจำรถ (ติดรถ/มือถือ)",category:1,severity:"critical"},{id:"m1_12",name:"เครื่องปรับอากาศห้องขับขี่ด้านหน้า",category:1,severity:"general"},{id:"m1_13",name:"เครื่องปรับอากาศห้องปฏิบัติการผู้ป่วยด้านหลัง",category:1,severity:"important"},{id:"m1_14",name:"ถังดับเพลิงเคมีประจำรถ",category:1,severity:"critical",requiredCount:1},{id:"m1_15",name:"เข็มขัดนิรภัยห้องคนขับและทีมงาน",category:1,severity:"important"},{id:"m1_16",name:"เข็มขัดรัดตรึงเปลผู้ป่วย",category:1,severity:"critical"},{id:"m1_17",name:"ประตูรถ ระบบล็อก และกลอนล็อกประตูทิศต่าง ๆ",category:1,severity:"critical"},{id:"m1_18",name:"ความสะอาดห้องโดยสารหน้ารถ",category:1,severity:"general"},{id:"m1_19",name:"ความสะอาดห้องผู้ป่วยด้านหลัง",category:1,severity:"important"},{id:"m1_20",name:"การฉีดพ่นทำความสะอาดฆ่าเชื้อหลังปฏิบัติภารกิจล่าสุด",category:1,severity:"critical"},{id:"m1_21",name:"อุปกรณ์ความปลอดภัยทางถนน (กรวยสะท้อนแสง/ไฟกระพริบพกพา)",category:1,severity:"important"},{id:"m1_22",name:"เอกสารพรบ. ประกันภัย สมุดบันทึก และเอกสารนำส่งผู้ป่วย",category:1,severity:"important"},{id:"m2_1",name:"เครื่อง Defibrillator/Monitor (ทดสอบเปิด/เช็กสายต่อ)",category:2,severity:"critical"},{id:"m2_2",name:"แบตเตอรี่เครื่อง Defibrillator/Monitor (พร้อมใช้/ชาร์จเต็ม)",category:2,severity:"critical"},{id:"m2_3",name:"สาย ECG และแผ่นนำไฟฟ้าแบบเจล (ECG Electrodes)",category:2,severity:"important"},{id:"m2_4",name:"แผ่นนำไฟฟ้าสำหรับช็อกไฟฟ้าชนิดใช้ครั้งเดียว (AED/Defib Pads)",category:2,severity:"critical",requiredCount:2},{id:"m2_5",name:"เครื่องช็อกไฟฟ้าอัตโนมัติ (AED เครื่องพกพา)",category:2,severity:"important"},{id:"m2_6",name:"เครื่องดูดเสมหะระบบติดตั้งในรถพยาบาล (Suction Wall)",category:2,severity:"critical"},{id:"m2_7",name:"เครื่องดูดเสมหะแบบเคลื่อนย้ายได้ (Portable Suction)",category:2,severity:"critical"},{id:"m2_8",name:"ระบบ Oxygen Pipeline (เช็กข้อต่อและแรงดัน)",category:2,severity:"critical"},{id:"m2_9",name:"ถังออกซิเจนหลักในตัวรถ (ปริมาณแรงดันเกจ์)",category:2,severity:"critical"},{id:"m2_10",name:"ถังออกซิเจนสำรองแบบพกพา",category:2,severity:"critical"},{id:"m2_11",name:"ปริมาณแรงดันออกซิเจนคงเหลือพร้อมใช้งานจริง (ต้อง > 1,000 PSI)",category:2,severity:"critical"},{id:"m2_12",name:"อุปกรณ์คุมเกจ์ออกซิเจน (Regulator)",category:2,severity:"critical"},{id:"m2_13",name:"อุปกรณ์ปรับอัตราไหลออกซิเจน (Flow meter)",category:2,severity:"critical"},{id:"m2_14",name:"เครื่องช่วยหายใจชนิดบีบมือ (BVM) สำหรับผู้ใหญ่",category:2,severity:"critical",requiredCount:1},{id:"m2_15",name:"เครื่องช่วยหายใจชนิดบีบมือ (BVM) สำหรับเด็ก",category:2,severity:"critical",requiredCount:1},{id:"m2_16",name:"เครื่องช่วยหายใจชนิดบีบมือ (BVM) สำหรับทารกแรกเกิด",category:2,severity:"important",requiredCount:1},{id:"m2_17",name:"ชุดส่องกล่องเสียงตรวจทางเดินหายใจ (Laryngoscope Set)",category:2,severity:"critical"},{id:"m2_18",name:"ด้ามและใบมีดชุดส่องกล่องเสียง (ตรวจขนาดตรงกับรถ)",category:2,severity:"critical"},{id:"m2_19",name:"แบตเตอรี่ในด้ามส่องและหลอดไฟใบมีด (สว่างชัดเจน)",category:2,severity:"critical"},{id:"m2_20",name:"ท่อช่วยหายใจทางปาก (ET Tube) ขนาด 6.5, 7.0, 7.5, 8.0",category:2,severity:"critical",requiredCount:4},{id:"m2_21",name:"ลวดนำสำหรับใส่ท่อช่วยหายใจ (Stylet)",category:2,severity:"important",requiredCount:2},{id:"m2_22",name:"อุปกรณ์นำส่องทางเดินหายใจ (Bougie)",category:2,severity:"important"},{id:"m2_23",name:"หน้ากากกล่องเสียงท่อช่วยหายใจฉุกเฉิน (LMA)",category:2,severity:"important"},{id:"m2_24",name:"ท่อเปิดทางเดินหายใจทางปาก (Oropharyngeal Airway)",category:2,severity:"critical",requiredCount:5},{id:"m2_25",name:"ท่อเปิดทางเดินหายใจทางจมูก (Nasopharyngeal Airway)",category:2,severity:"important"},{id:"m2_26",name:"อุปกรณ์ยึดตรึงท่อช่วยหายใจ (Tube Holder / เทปกาวเหนียว)",category:2,severity:"important"},{id:"m2_27",name:"เครื่องวัดความเข้มข้นออกซิเจนปลายนิ้ว (Pulse Oximeter)",category:2,severity:"critical",requiredCount:1},{id:"m2_28",name:"เครื่องวัดความดันโลหิตแบบดิจิตอล/บีบมือ",category:2,severity:"critical",requiredCount:1},{id:"m2_29",name:"ผ้าพันแขนวัดความดัน (Cuff) ขนาดผู้ใหญ่ และเด็ก",category:2,severity:"important"},{id:"m2_30",name:"หูฟังแพทย์ (Stethoscope)",category:2,severity:"critical",requiredCount:1},{id:"m2_31",name:"เครื่องวัดระดับน้ำตาลในกระแสเลือด (Glucometer)",category:2,severity:"critical",requiredCount:1},{id:"m2_32",name:"แผ่นแถบตรวจระดับน้ำตาล (Gluco Strip)",category:2,severity:"critical",requiredCount:15},{id:"m2_33",name:"เครื่องวัดอุณหภูมิร่างกาย (Thermometer)",category:2,severity:"important"},{id:"m2_34",name:"เครื่องกดนวดหัวใจอัตโนมัติ (Mechanical CPR) (ถ้ามี)",category:2,severity:"general"},{id:"m2_35",name:"เครื่องควบคุมให้สารละลายทางหลอดเลือดดำ (Infusion Pump)",category:2,severity:"general"},{id:"m2_36",name:"เครื่องช่วยหายใจเคลื่อนย้ายพกพาอัตโนมัติ (Ventilator) (ถ้ามี)",category:2,severity:"important"},{id:"m3_1",name:"เปลนอนหลักประจำรถพยาบาล (Main Stretcher)",category:3,severity:"critical"},{id:"m3_2",name:"ระบบแท่นรางล็อกตัวเปลเข้ากับโครงตัวรถพยาบาล",category:3,severity:"critical"},{id:"m3_3",name:"สายเข็มขัดรัดตรึงตัวคนป่วยบนเปล (อย่างน้อย 3 จุด)",category:3,severity:"critical"},{id:"m3_4",name:"เปลตักเคลื่อนย้ายผู้ป่วย (Scoop Stretcher)",category:3,severity:"important"},{id:"m3_5",name:"กระดานแข็งรองหลังช่วยชีวิต (Long Spinal Board)",category:3,severity:"critical"},{id:"m3_6",name:"กระดานสั้นรองหลัง (Short Spinal Board) (ถ้ามี)",category:3,severity:"general"},{id:"m3_7",name:"ที่นอนสูญญากาศลดแรงกระแทก (Vacuum Mattress)",category:3,severity:"important"},{id:"m3_8",name:"เฝือกคอชนิดแข็งสำหรับผู้ใหญ่ (Cervical Collar Adult)",category:3,severity:"critical",requiredCount:2},{id:"m3_9",name:"เฝือกคอชนิดแข็งสำหรับเด็ก (Cervical Collar Pediatric)",category:3,severity:"important",requiredCount:1},{id:"m3_10",name:"อุปกรณ์ประคองข้างศีรษะ (Head Immobilizer)",category:3,severity:"critical",requiredCount:1},{id:"m3_11",name:"เฝือกดามแขนแยกสัดส่วน (Arm Splints)",category:3,severity:"important",requiredCount:2},{id:"m3_12",name:"เฝือกดามขาแยกสัดส่วน (Leg Splints)",category:3,severity:"important",requiredCount:2},{id:"m3_13",name:"เฝือกลมระบบสูญญากาศ (Vacuum Splint)",category:3,severity:"general"},{id:"m3_14",name:"เฝือกดึงกระดูกต้นขาหัก (Traction Splint)",category:3,severity:"important"},{id:"m3_15",name:"เก้าอี้เคลื่อนย้ายผู้ป่วยลงบันได (Stair Chair)",category:3,severity:"important"},{id:"m3_16",name:"ผ้ารองเลื่อนตัว/ยกย้ายแบบผ้าหนาเหนียว (Carrying Sheet)",category:3,severity:"important"},{id:"m3_17",name:"เปลตะกร้าสำหรับเคลื่อนย้ายในที่สูงหรือข้ามเกาะ (Basket Stretcher)",category:3,severity:"important"},{id:"m3_18",name:"สายและชุดยึดตรึงผู้ป่วยเข้ากับเปลตะกร้า",category:3,severity:"important"},{id:"m3_19",name:"เชือกโรยตัวและชุดรอกกู้ภัยขั้นต้นประจำเรือ/รถ",category:3,severity:"general"},{id:"m3_20",name:"เสื้อชูชีพสำหรับเจ้าหน้าที่ปฏิบัติการทางน้ำ",category:3,severity:"critical",requiredCount:4},{id:"m3_21",name:"เสื้อชูชีพสำหรับคนไข้/ญาติคนไข้",category:3,severity:"critical",requiredCount:2},{id:"m3_22",name:"อุปกรณ์ทุ่นพยุงลอยคอ/บอร์ดลอยน้ำกู้ภัยทางทะเล",category:3,severity:"important"},{id:"m3_23",name:"ผ้าห่มความร้อน/ผ้าห่มพับผืนหนารองนอน",category:3,severity:"general",requiredCount:2},{id:"m3_24",name:"ผ้าคลุมปิดผู้เสียชีวิต",category:3,severity:"general"},{id:"m3_25",name:"ฟอยล์สีเงินอลูมิเนียมกักอุณหภูมิร่างกายป้องก้นช็อกหนาว",category:3,severity:"important"},{id:"m4_1",name:"กระเป๋ายาฉุกเฉินหลัก (เช็กกุญแจล็อกซีลและใบรายการพร้อมใช้)",category:4,severity:"critical"},{id:"m4_2",name:"สารน้ำ NSS 0.9% ขนาด 1000ml และ 500ml",category:4,severity:"critical",requiredCount:4},{id:"m4_3",name:"สารน้ำ 5%D/N/2 ขนาด 500ml",category:4,severity:"important",requiredCount:2},{id:"m4_4",name:"สารน้ำ Acetar ขนาด 1000ml / 500ml",category:4,severity:"important",requiredCount:2},{id:"m4_5",name:"กระบอกฉีดยา (Syringe) ขนาด 1ml, 3ml, 5ml, 10ml, 20ml, 50ml",category:4,severity:"important",requiredCount:12},{id:"m4_6",name:"เข็มฉีดยาขนาดต่าง ๆ (No. 18, 21, 24, 25)",category:4,severity:"important",requiredCount:15},{id:"m4_7",name:"เข็มแทงเส้นเลือดดำสำหรับให้น้ำเกลือ (IV Catheter) No. 18, 20, 22, 24",category:4,severity:"critical",requiredCount:10},{id:"m4_8",name:"สายต่อเพิ่มความยาวชุดให้น้ำเกลือ (Extension Tube)",category:4,severity:"important"},{id:"m4_9",name:"ข้อต่อสามทางควบคุมทิศทางยา (Three-way Stopcock)",category:4,severity:"important",requiredCount:2},{id:"m4_10",name:"ชุดอุปกรณ์ให้น้ำเกลือมาตรฐาน (IV Set)",category:4,severity:"critical",requiredCount:4},{id:"m4_11",name:"สายรัดข้อพับสำหรับแทงเส้นเลือดำ (Tourniquet)",category:4,severity:"critical",requiredCount:2},{id:"m4_12",name:"สำลีแอลกอฮอล์ฉีกซองฆ่าเชื้อ (Alcohol Pad)",category:4,severity:"important",requiredCount:20},{id:"m4_13",name:"พลาสเตอร์ติดทับสายน้ำเกลือ (Tegaderm/Micropore)",category:4,severity:"important"},{id:"m4_14",name:"ผ้าก๊อซทำแผลปลอดเชื้อขนาด 2x2, 3x3, 4x4 (Gauze Pad Steril)",category:4,severity:"important",requiredCount:15},{id:"m4_15",name:"ผ้าปิดแผลขนาดใหญ่เหนียวพกพา (Top Dressing / Combine Pad)",category:4,severity:"important",requiredCount:5},{id:"m4_16",name:"ผ้าพันยืดหยุ่นลดแรงดันห้ามเลือด (Elastic Bandage) ขนาด 3, 4, 6 นิ้ว",category:4,severity:"important",requiredCount:6},{id:"m4_17",name:"น้ำยาเบตาดีน/น้ำยาทำแผลฆ่าเชื้อโรค",category:4,severity:"important"},{id:"m4_18",name:"ขวดน้ำเกลือทำความสะอาดล้างแผล (Normal Saline Sterile)",category:4,severity:"important",requiredCount:2},{id:"m4_19",name:"ถุงขยะแดงทิ้งสิ่งปนเปื้อนสารคัดหลั่ง",category:4,severity:"important"},{id:"m4_20",name:"กล่องเจาะพลาสติกแข็งทิ้งเข็มใช้แล้วป้องก้นเข็มตำ",category:4,severity:"critical",requiredCount:1},{id:"m4_21",name:"ถุงมือตรวจโรคชนิดใช้ครั้งเดียวทิ้ง (Gloves) ขนาด S, M, L",category:4,severity:"critical",requiredCount:100},{id:"m4_22",name:"ถุงมือปราศจากเชื้อทางการแพทย์ (Sterile Gloves) บรรจุซอง",category:4,severity:"critical",requiredCount:10},{id:"m4_23",name:"หน้ากากอนามัยชนิดธรรมดา (Surgical Mask)",category:4,severity:"critical",requiredCount:50},{id:"m4_24",name:"หน้ากากอนามัยชนิดป้องกันอนุภาคเล็กพิเศษ N95",category:4,severity:"important",requiredCount:5},{id:"m4_25",name:"หน้ากากใสกันกระเซ็น / แว่นครอบป้องกันใบหน้าสายตา",category:4,severity:"important",requiredCount:4},{id:"m4_26",name:"เสื้อคลุม PPE แบบกันน้ำชนิดใช้ครั้งเดียวกึ่งซักได้",category:4,severity:"important",requiredCount:4},{id:"m4_27",name:"ผ้าก๊อซกึ่งห้ามเลือดในแผลกระสุนปืนหรือแผลเหวอะ (Trauma Dressing)",category:4,severity:"critical",requiredCount:2},{id:"m4_28",name:"สายรัดขันชะเนาะห้ามเลือดภายนอกสไตล์ทหาร (Tourniquet ห้ามเลือด)",category:4,severity:"critical",requiredCount:2},{id:"m4_29",name:"แผ่นแปะซีลแผลทะลวงหน้าอกป้องก้นปอดแฟบ (Chest Seal)",category:4,severity:"critical",requiredCount:2},{id:"m4_30",name:"ชุดเข็มระบายลมออกจากช่องอกแรงดันสูง (Needle Decompression Set)",category:4,severity:"critical",requiredCount:1},{id:"m4_31",name:"สายรัดยึดกระดูกเชิงกรานหักช็อกตกเลือด (Pelvic Binder)",category:4,severity:"important",requiredCount:1},{id:"m4_32",name:"ผ้าคลุมทำแผลไฟไหม้พุพองสูญเสียความชื้น (Burn Sheet)",category:4,severity:"important",requiredCount:1},{id:"m4_33",name:"ชุดอุปกรณ์ทำคลอดฉุกเฉินประกอบด้วยผ้า กรรไกร คีมจับ (Delivery Set)",category:4,severity:"critical",requiredCount:1},{id:"m4_34",name:"คีมพลาสติกหนีบสายสะดือเด็กทารก (Cord Clamp)",category:4,severity:"critical",requiredCount:2},{id:"m4_35",name:"ลูกยางแดงเบอร์ 3 ดูดเสมหะทารกแรกคลอด",category:4,severity:"critical",requiredCount:1}],_h=[{id:"c1",timestamp:"2026-07-15T09:12:00",date:"2026-07-15",time:"09:12",shift:"เช้า",username:"dispatcher1",recordedBy:"นายสมเกียรติ มุ่งมั่น (Dispatcher 01)",callType:"สายแจ้งเหตุหรือสายปฏิบัติการ",channel:"First Call"},{id:"c2",timestamp:"2026-07-15T10:05:00",date:"2026-07-15",time:"10:05",shift:"เช้า",username:"dispatcher1",recordedBy:"นายสมเกียรติ มุ่งมั่น (Dispatcher 01)",callType:"สายแจ้งเหตุหรือสายปฏิบัติการ",channel:"Second Call"},{id:"c3",timestamp:"2026-07-15T11:40:00",date:"2026-07-15",time:"11:40",shift:"เช้า",username:"dispatcher2",recordedBy:"นางสาวสุดารัตน์ บรรเทา (Dispatcher 02)",callType:"สายก่อกวน",channel:"First Call"},{id:"c4",timestamp:"2026-07-15T13:15:00",date:"2026-07-15",time:"13:15",shift:"เช้า",username:"dispatcher1",recordedBy:"นายสมเกียรติ มุ่งมั่น (Dispatcher 01)",callType:"โทรผิด",channel:"หมายเลขอื่น",channelDetail:"081-xxxxxxx"},{id:"c5",timestamp:"2026-07-15T14:22:00",date:"2026-07-15",time:"14:22",shift:"เช้า",username:"dispatcher2",recordedBy:"นางสาวสุดารัตน์ บรรเทา (Dispatcher 02)",callType:"แจ้งเหตุอื่น",otherReason:"ประสานงานเคลื่อนย้ายสุนัขบาดเจ็บ",channel:"วิธีอื่น ๆ",channelDetail:"LINE กู้ภัย"},{id:"c6",timestamp:"2026-07-15T17:10:00",date:"2026-07-15",time:"17:10",shift:"บ่าย",username:"dispatcher1",recordedBy:"นายสมเกียรติ มุ่งมั่น (Dispatcher 01)",callType:"สายแจ้งเหตุหรือสายปฏิบัติการ",channel:"First Call"},{id:"c7",timestamp:"2026-07-15T18:30:00",date:"2026-07-15",time:"18:30",shift:"บ่าย",username:"dispatcher1",recordedBy:"นายสมเกียรติ มุ่งมั่น (Dispatcher 01)",callType:"สายแจ้งเหตุหรือสายปฏิบัติการ",channel:"วิทยุ"}],Mh=[{id:"OB-2569-0012",createdAt:"2026-07-15T09:15:00",date:"2026-07-15",time:"09:15",shift:"เช้า",username:"dispatcher1",recordedBy:"นายสมเกียรติ มุ่งมั่น (Dispatcher 01)",type:"EMS",unitLevel:"ALS",unitId:"u1",unitName:"โรงพยาบาลเกาะสมุย",cbdCode:"17",phoneTriage:"แดง",sceneTriage:"แดง",erTriage:"แดง",fastTrack:"Multiple Trauma",path:"ทางบก",responsibleDispatcher:"dispatcher1",consultingDoctor:!0,doctorName:"พญ.ชลิดา พัชรสมุย",onlineMedicalProtocol:"IV Fluid resuscitation & Splinting",diagnosis:"ผู้บาดเจ็บชายชาวต่างชาติ มอเตอร์ไซค์ชนท้ายรถกระบะ หมดสติ มีแผลฉีกขาดขนาดใหญ่ที่ศีรษะและสงสัยกระดูกต้นขาหักข้างขวา",riskDetected:"ไม่มีความเสี่ยงพิเศษในเวร",status:"ปิดเคส"},{id:"OB-2569-0013",createdAt:"2026-07-15T10:10:00",date:"2026-07-15",time:"10:10",shift:"เช้า",username:"dispatcher1",recordedBy:"นายสมเกียรติ มุ่งมั่น (Dispatcher 01)",type:"Refer",unitLevel:"ALS",unitId:"u1",unitName:"โรงพยาบาลเกาะสมุย",cbdCode:"20",phoneTriage:"แดง",sceneTriage:"เหลือง",erTriage:"แดง",fastTrack:"STROKE",path:"ทางน้ำ",responsibleDispatcher:"dispatcher1",consultingDoctor:!0,doctorName:"พญ.ชลิดา พัชรสมุย",onlineMedicalProtocol:"Oxygen therapy, Pre-alert ER",diagnosis:"หญิงไทยอายุ 65 ปี มีอาการหน้าเบี้ยว พูดไม่ชัด แขนขาซีกซ้ายอ่อนแรงเฉียบพลัน 2 ชั่วโมงก่อนมา รพ. นำส่งเกาะสมุยประสานลำเลียงขึ้นฝั่ง",riskDetected:"คลื่นลมทะเลแรงปานกลางในรอบบ่าย",status:"ปรับปรุงข้อมูลแล้ว"},{id:"OB-2569-0014",createdAt:"2026-07-15T17:15:00",date:"2026-07-15",time:"17:15",shift:"บ่าย",username:"dispatcher1",recordedBy:"นายสมเกียรติ มุ่งมั่น (Dispatcher 01)",type:"EMS",unitLevel:"CLS",unitId:"u11",unitName:"หน่วยกู้ชีพหน้าเมือง",cbdCode:"01",phoneTriage:"เขียว",sceneTriage:"เขียว",erTriage:"เขียว",fastTrack:"ไม่มี Fast Track",path:"ทางบก",responsibleDispatcher:"dispatcher2",consultingDoctor:!1,diagnosis:"ผู้ป่วยหญิง 24 ปี ปวดท้องน้อยด้านขวา เจ็บตื้อ ๆ ไม่มีไข้ เดินไหว สัญญาณชีพปกติ",riskDetected:"ฝนตกถนนลื่น",status:"ค้างปรับปรุงข้อมูล"}],Oh=[{unitId:"u1",unitName:"โรงพยาบาลเกาะสมุย",status:"พร้อมปฏิบัติการ",recordedBy:"dispatcher1",updatedAt:"2026-07-15T08:00:00"},{unitId:"u2",unitName:"โรงพยาบาลเกาะพะงัน",status:"พร้อมปฏิบัติการ",recordedBy:"dispatcher1",updatedAt:"2026-07-15T08:00:00"},{unitId:"u3",unitName:"โรงพยาบาลเกาะเต่า",status:"พร้อมปฏิบัติการ",recordedBy:"dispatcher1",updatedAt:"2026-07-15T08:00:00"},{unitId:"u11",unitName:"หน่วยกู้ชีพหน้าเมือง",status:"พร้อมปฏิบัติการ",recordedBy:"dispatcher1",updatedAt:"2026-07-15T08:00:00"},{unitId:"u12",unitName:"หน่วยกู้ชีพละไม",status:"ไม่พร้อมปฏิบัติการ",reason:"ยางรถเสื่อมสภาพ/อยู่ระหว่างรออะไหล่ส่งซ่อม",startTime:"2026-07-15T08:30:00",estimatedEndTime:"",unknownEndTime:!0,recordedBy:"dispatcher1",updatedAt:"2026-07-15T08:30:00"}],Uh=[{id:"rt_1",date:"2026-07-15",time:"08:45",shift:"เช้า",testerUsername:"dispatcher1",testerName:"นายสมเกียรติ มุ่งมั่น",items:[{stationId:"s1",stationName:"พะงัน 2",txLevel:"5",rxLevel:"5",channelType:"R"},{stationId:"s2",stationName:"เกาะเต่า 2",txLevel:"4",rxLevel:"4",channelType:"R"},{stationId:"s3",stationName:"กู้ภัยพะงัน",txLevel:"5",rxLevel:"4",channelType:"R"},{stationId:"s4",stationName:"กู้ภัยสมุย",txLevel:"5",rxLevel:"5",channelType:"T"},{stationId:"s5",stationName:"เมืองสมุย",txLevel:"5",rxLevel:"5",channelType:"T"},{stationId:"s6",stationName:"กู้ชีพละไม",txLevel:"5",rxLevel:"5",channelType:"T"},{stationId:"s7",stationName:"กู้ชีพหน้าเมือง",txLevel:"4",rxLevel:"4",channelType:"T"},{stationId:"s8",stationName:"กู้ชีพเฉวง",txLevel:"5",rxLevel:"5",channelType:"T"},{stationId:"s9",stationName:"โรงพยาบาลกรุงเทพสมุย",txLevel:"5",rxLevel:"5",channelType:"T"},{stationId:"s10",stationName:"โรงพยาบาลไทยอินเตอร์",txLevel:"5",rxLevel:"5",channelType:"T"},{stationId:"s11",stationName:"โรงพยาบาลบ้านดอนอินเตอร์",txLevel:"4",rxLevel:"4",channelType:"T"},{stationId:"s12",stationName:"โรงพยาบาลวัฒนแพทย์สมุย",txLevel:"5",rxLevel:"5",channelType:"T"},{stationId:"s13",stationName:"โรงพยาบาลพะงันอินเตอร์",txLevel:"4",rxLevel:"3",channelType:"R"},{stationId:"s14",stationName:"โรงพยาบาลไทยอินเตอร์เกาะพะงัน",txLevel:"ติดต่อไม่ได้",rxLevel:"ติดต่อไม่ได้",channelType:"R",note:"เสาวิทยุชำรุดชั่วคราว"},{stationId:"s15",stationName:"ER สมุย",txLevel:"5",rxLevel:"5",channelType:"T"},{stationId:"s16",stationName:"พขร. ว.4",txLevel:"5",rxLevel:"4",channelType:"T"}],extraStations:[{stationName:"กู้ชีพตลิ่งงาม",txLevel:"4",rxLevel:"4",channelType:"T",note:"สถานีเสริม"}],testedCount:16,untestedCount:1,unreachableStations:["โรงพยาบาลไทยอินเตอร์เกาะพะงัน"]}],qh=[{id:"acs_1",date:"2026-07-15",timeStart:"08:05",timeEnd:"08:20",shift:"เช้า",ambulanceId:"NRT-01",plateNo:"กข-9988 สุราษฎร์ธานี",unitId:"u1",unitName:"โรงพยาบาลเกาะสมุย",checkerUsername:"driver1",checkerName:"นายเด่นดนัย ขับปลอดภัย",checkerRole:"Driver",overallStatus:"พร้อมปฏิบัติการ",mileage:145230,fuelLevel:"เต็มถัง",results:[{itemId:"m1_1",itemName:"ระบบไฟฟ้าของรถพยาบาล (ไฟหน้า/ไฟเลี้ยว/ไฟหรี่)",status:"พร้อมใช้",severity:"critical"},{itemId:"m1_2",itemName:"เครื่องยนต์ (เช็กระดับน้ำมันเครื่อง/เสียงเครื่องยนต์)",status:"พร้อมใช้",severity:"critical"},{itemId:"m1_4",itemName:"ระดับน้ำมันเชื้อเพลิง (ต้องมากกว่าครึ่งถัง)",status:"พร้อมใช้",severity:"critical"},{itemId:"m1_5",itemName:"ยางรถทุกล้อ (ความดันลมยางและดอกยาง)",status:"พร้อมใช้",severity:"critical"}]},{id:"acs_2",date:"2026-07-15",timeStart:"08:10",timeEnd:"08:30",shift:"เช้า",ambulanceId:"NRT-06",plateNo:"บท-8855 สุราษฎร์ธานี",unitId:"u12",unitName:"หน่วยกู้ชีพละไม",checkerUsername:"ems1",checkerName:"นายกิตติพงษ์ สุขใจ",checkerRole:"EMS",overallStatus:"พร้อมใช้งานแบบมีข้อจำกัด",remarks:"เวชภัณฑ์ Trauma และหน้ากาก N95 มีจำนวนเหลือน้อยกว่าขั้นต่ำ กำลังรอการสั่งเบิกเติม",results:[{itemId:"m4_23",itemName:"หน้ากากอนามัยชนิดธรรมดา (Surgical Mask)",status:"พร้อมใช้",severity:"critical"},{itemId:"m4_24",itemName:"หน้ากากอนามัยชนิดป้องกันอนุภาคเล็กพิเศษ N95",status:"จำนวนไม่เพียงพอ",problemDetails:"เหลือ 1 ชิ้น มาตรฐาน 5 ชิ้น",foundCount:1,requiredCount:5,severity:"important"},{itemId:"m4_27",itemName:"ผ้าก๊อซกึ่งห้ามเลือดในแผลกระสุนปืนหรือแผลเหวอะ (Trauma Dressing)",status:"จำนวนไม่เพียงพอ",problemDetails:"หมดคลังรถ มาตรฐานต้องมี 2 ผืน",foundCount:0,requiredCount:2,severity:"critical"}]}],Wo=[{id:"TKT-2569-001",ambulanceId:"NRT-06",plateNo:"บท-8855 สุราษฎร์ธานี",unitName:"หน่วยกู้ชีพละไม",itemId:"m4_27",itemName:"ผ้าก๊อซกึ่งห้ามเลือดในแผลกระสุนปืนหรือแผลเหวอะ (Trauma Dressing)",problemDetails:"หมดคลังรถ มาตรฐานต้องมี 2 ผืน จำเป็นต้องเบิกจ่ายทดแทนด่วน",reportedAt:"2026-07-15T08:30:00",reportedBy:"นายกิตติพงษ์ สุขใจ",severity:"critical",status:"อยู่ระหว่างดำเนินการ",assignedTo:"หัวหน้าทีมพัสดุกู้ชีพ",targetDate:"2026-07-16"},{id:"TKT-2569-002",ambulanceId:"NRT-02",plateNo:"กข-5566 สุราษฎร์ธานี",unitName:"โรงพยาบาลเกาะสมุย",itemId:"m1_8",itemName:"ไฟไซเรน/ไฟฉุกเฉินบนหลังคารถ",problemDetails:"หลอดไฟ LED ด้านซ้ายท้ายไม่ติดกะพริบ สายไฟหลวมชำรุด",reportedAt:"2026-07-14T15:20:00",reportedBy:"นายเด่นดนัย ขับปลอดภัย",severity:"critical",status:"ส่งซ่อม",assignedTo:"ช่างสมหมาย บริการไฟรถยนต์",targetDate:"2026-07-15",actionDetails:"ส่งช่างถอดแผงครอบไซเรนออกตรวจซ่อมแก้ไขขั้วสัมผัส"}];function Pl(j,F){const B=localStorage.getItem(`nrt_${j}`);if(B)try{return JSON.parse(B)}catch{return F}return F}function Ke(j,F){localStorage.setItem(`nrt_${j}`,JSON.stringify(F))}function Bh(){localStorage.getItem("nrt_users")||Ke("users",ko),localStorage.getItem("nrt_units")||Ke("units",$o),localStorage.getItem("nrt_call_logs")||Ke("call_logs",_h),localStorage.getItem("nrt_cases")||Ke("cases",Mh),localStorage.getItem("nrt_unit_statuses")||Ke("unit_statuses",Oh),localStorage.getItem("nrt_radio_tests")||Ke("radio_tests",Uh),localStorage.getItem("nrt_ambulances")||Ke("ambulances",Dh),localStorage.getItem("nrt_check_sessions")||Ke("check_sessions",qh),localStorage.getItem("nrt_tickets")||Ke("tickets",Wo)}function Hh({currentUser:j,onLogout:F}){const[B,b]=T.useState(new Date);T.useEffect(()=>{const R=setInterval(()=>{b(new Date)},1e3);return()=>clearInterval(R)},[]);const w=(R=>{const M=R.getHours();return M>=8&&M<16?{name:"เช้า",icon:ah,color:"text-amber-700 bg-amber-50 border-amber-200/60"}:M>=16&&M<24?{name:"บ่าย",icon:nh,color:"text-orange-700 bg-orange-50 border-orange-200/60"}:{name:"ดึก",icon:ih,color:"text-indigo-700 bg-indigo-50 border-indigo-200/60"}})(B),H=w.icon,xe=R=>R.toLocaleDateString("th-TH",{year:"numeric",month:"long",day:"numeric",weekday:"long"}),ne=R=>R.toLocaleTimeString("th-TH",{hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}),_e=R=>{switch(R){case"Admin":return"bg-rose-50 text-rose-700 border-rose-200/60";case"Supervisor":return"bg-violet-50 text-violet-700 border-violet-200/60";case"Dispatcher":return"bg-indigo-50 text-indigo-700 border-indigo-200/60";case"Executive":return"bg-emerald-50 text-emerald-700 border-emerald-200/60";case"ER Koh Samui":return"bg-pink-50 text-pink-700 border-pink-200/60";case"Quality Officer":return"bg-sky-50 text-sky-700 border-sky-200/60";case"Driver":return"bg-amber-50 text-amber-700 border-amber-200/60";case"EMS":return"bg-teal-50 text-teal-700 border-teal-200/60";default:return"bg-slate-50 text-slate-700 border-slate-200/60"}};return u.jsx("header",{className:"bg-white border-b border-slate-200/80 sticky top-0 z-40 shadow-sm transition-all",id:"app-header",children:u.jsxs("div",{className:"px-4 lg:px-6 py-3.5 flex flex-col md:flex-row md:items-center md:justify-between gap-4",children:[u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx("div",{className:"p-2.5 bg-indigo-600 rounded-xl text-white shadow-md shadow-indigo-100 flex items-center justify-center",children:u.jsx(eh,{className:"w-6 h-6"})}),u.jsxs("div",{children:[u.jsx("h1",{className:"text-lg md:text-xl font-bold text-slate-900 tracking-tight",children:"ระบบบริหารจัดการ ศูนย์รับแจ้งเหตุและสั่งการนเรนทรอ่าวไทย"}),u.jsx("p",{className:"text-xs text-slate-400 mt-0.5 font-semibold tracking-wider uppercase",children:"Narenthorn Gulf of Thailand Dispatch & Fleet Command Center"})]})]}),u.jsxs("div",{className:"flex flex-wrap items-center gap-2.5 md:gap-4 self-end md:self-auto",children:[u.jsxs("div",{className:"flex items-center gap-2.5 bg-slate-50 border border-slate-200/60 px-3 py-1.5 rounded-xl text-xs md:text-sm text-slate-600 shadow-xs",children:[u.jsx(th,{className:"w-4 h-4 text-indigo-500 animate-pulse"}),u.jsx("span",{className:"font-mono font-bold tracking-wider text-slate-800",children:ne(B)}),u.jsx("span",{className:"text-slate-300",children:"|"}),u.jsx("span",{className:"text-slate-500 font-semibold",children:xe(B)}),u.jsxs("span",{className:`ml-1.5 flex items-center gap-1.5 px-2 py-0.5 rounded-lg border text-xs font-bold ${w.color}`,children:[u.jsx(H,{className:"w-3.5 h-3.5"}),"เวร",w.name]})]}),j&&u.jsxs("div",{className:"flex items-center gap-2.5 bg-slate-50 border border-slate-200/60 px-3 py-1.5 rounded-xl shadow-xs",children:[u.jsx("div",{className:"w-8 h-8 rounded-lg bg-indigo-50 border border-indigo-100 text-indigo-600 flex items-center justify-center font-extrabold text-sm shadow-xs",children:u.jsx(lh,{className:"w-4 h-4"})}),u.jsxs("div",{className:"hidden sm:block text-left",children:[u.jsx("div",{className:"text-xs font-bold text-slate-800 truncate max-w-[140px]",children:j.fullName}),u.jsx("div",{className:"flex items-center gap-1 mt-0.5",children:u.jsx("span",{className:`text-[10px] font-bold px-1.5 py-0.2 rounded border uppercase tracking-wider ${_e(j.role)}`,children:j.role})})]}),u.jsx("button",{onClick:F,className:"ml-1 p-1.5 text-slate-400 hover:text-rose-600 hover:bg-rose-50 border border-transparent hover:border-rose-100 rounded-lg transition-all cursor-pointer",title:"ออกจากระบบ",id:"btn-logout-header",children:u.jsx(Vo,{className:"w-4 h-4"})})]})]})]})})}function Rh({currentRole:j,activeTab:F,setActiveTab:B,onLogout:b}){const[_,w]=T.useState(!1),H=R=>{if(j==="Admin")return!0;switch(R){case"รับแจ้งเหตุ":return j==="Dispatcher";case"หน้าเคสปฏิบัติการ":return["Supervisor","Dispatcher","ER Koh Samui"].includes(j);case"รายงานประจำวัน":return["Supervisor","Dispatcher","Executive","Quality Officer"].includes(j);case"ทดสอบวิทยุ":return["Supervisor","Dispatcher"].includes(j);case"รายงานสถิติ":return["Supervisor","Dispatcher","Executive","Quality Officer"].includes(j);case"Dashboard EMS":return["Supervisor","Executive","Dispatcher","ER Koh Samui","Quality Officer"].includes(j);case"ความพร้อมรถพยาบาล":return!0;case"Admin":return j==="Admin";default:return!1}},ne=[{name:"รับแจ้งเหตุ",icon:Ko,tabId:"dispatch"},{name:"หน้าเคสปฏิบัติการ",icon:Jo,tabId:"cases"},{name:"รายงานประจำวัน",icon:uh,tabId:"daily-report"},{name:"ทดสอบวิทยุ",icon:sh,tabId:"radio-test"},{name:"รายงานสถิติ",icon:ch,tabId:"statistics"},{name:"Dashboard EMS",icon:rh,tabId:"dashboard"},{name:"ความพร้อมรถพยาบาล",icon:dh,tabId:"ambulance-check"},{name:"Admin",icon:fh,tabId:"admin"}].filter(R=>H(R.name)),_e=R=>{B(R),w(!1)};return u.jsxs(u.Fragment,{children:[u.jsx("div",{className:"md:hidden fixed bottom-4 right-4 z-50",children:u.jsx("button",{onClick:()=>w(!_),className:"p-4 bg-indigo-600 text-white rounded-full shadow-lg shadow-indigo-500/20 flex items-center justify-center hover:bg-indigo-700 transition-all active:scale-95 cursor-pointer border border-indigo-500/30",id:"btn-mobile-menu",children:_?u.jsx(oh,{className:"w-6 h-6"}):u.jsx(mh,{className:"w-6 h-6"})})}),_&&u.jsx("div",{className:"md:hidden fixed inset-0 bg-slate-950/60 z-40 backdrop-blur-xs transition-opacity",onClick:()=>w(!1)}),u.jsxs("aside",{className:`
|
|
fixed md:static inset-y-0 left-0 w-64 bg-slate-900 text-slate-100 border-r border-slate-800 z-40 transform transition-transform duration-300 flex flex-col h-screen md:h-auto
|
|
${_?"translate-x-0":"-translate-x-full md:translate-x-0"}
|
|
`,id:"app-sidebar",children:[u.jsxs("div",{className:"p-4 border-b border-slate-800/80",children:[u.jsx("div",{className:"text-xs font-bold text-slate-400 tracking-wider uppercase mb-1",children:"เมนูการปฏิบัติงาน"}),u.jsxs("div",{className:"text-[10px] text-indigo-400 font-bold uppercase tracking-wider",children:["ผู้ใช้งานสิทธิ์: ",j]})]}),u.jsx("nav",{className:"flex-1 px-3 py-4 space-y-1.5 overflow-y-auto",children:ne.map(R=>{const M=R.icon,I=F===R.tabId;return u.jsxs("button",{onClick:()=>_e(R.tabId),className:`
|
|
w-full flex items-center gap-3 px-4 py-3 rounded-xl text-sm font-semibold transition-all cursor-pointer
|
|
${I?"bg-indigo-600 text-white shadow-md shadow-indigo-900/40 font-bold":"text-slate-300 hover:text-white hover:bg-slate-800/70"}
|
|
`,id:`sidebar-item-${R.tabId}`,children:[u.jsx(M,{className:`w-4 h-4 ${I?"text-white":"text-slate-400 group-hover:text-white"}`}),u.jsx("span",{children:R.name}),I&&u.jsx("div",{className:"ml-auto w-1.5 h-1.5 bg-white rounded-full"})]},R.tabId)})}),u.jsx("div",{className:"p-4 border-t border-slate-800 bg-slate-950/40",children:u.jsxs("button",{onClick:()=>{w(!1),b()},className:"w-full flex items-center gap-3 px-4 py-3 text-sm font-semibold text-rose-400 hover:text-rose-300 hover:bg-rose-500/10 rounded-xl transition-all cursor-pointer",id:"sidebar-item-logout",children:[u.jsx(Vo,{className:"w-4 h-4"}),u.jsx("span",{children:"ออกจากระบบ"})]})})]})]})}const Lh=T.lazy(()=>Pc(()=>import("./RadioTestForm-C4p76j7C.js"),__vite__mapDeps([0,1,2]),import.meta.url)),wh=T.lazy(()=>Pc(()=>import("./AmbulanceChecklist-CQ7je56N.js"),__vite__mapDeps([3,1,2]),import.meta.url)),Yh=T.lazy(()=>Pc(()=>import("./ReportPDF-WB7Q5w_0.js"),__vite__mapDeps([4,1,2]),import.meta.url));Bh();function Ic(){return u.jsx("div",{className:"flex min-h-[260px] items-center justify-center rounded-2xl border border-slate-200 bg-white p-8 shadow-sm",children:u.jsxs("div",{className:"text-center",children:[u.jsx("div",{className:"mx-auto h-10 w-10 animate-spin rounded-full border-4 border-indigo-100 border-t-indigo-600"}),u.jsx("p",{className:"mt-3 text-sm font-bold text-slate-600",children:"กำลังโหลดหน้าการทำงาน…"})]})})}function Gh(){const[j,F]=T.useState(()=>Pl("users",ko)),[B,b]=T.useState(()=>Pl("units",$o)),[_,w]=T.useState(()=>Pl("call_logs",[])),[H,xe]=T.useState(()=>Pl("cases",[])),[ne,_e]=T.useState(()=>Pl("unit_statuses",[])),[R,M]=T.useState(()=>Pl("radio_tests",[])),[I,Ut]=T.useState(()=>Pl("check_sessions",[])),[ve,ze]=T.useState(()=>Pl("tickets",Wo)),[K,al]=T.useState(()=>{const c=localStorage.getItem("nrt_logged_user");if(c)try{return JSON.parse(c)}catch{return null}return null}),[Ie,we]=T.useState("dispatch"),[Jt,qt]=T.useState(""),[mt,Nt]=T.useState(""),[Pe,Bt]=T.useState(""),[ea,Ht]=T.useState(""),[at,Sl]=T.useState(!1),[Rt,jt]=T.useState(""),[p,A]=T.useState(""),[U,me]=T.useState("สายแจ้งเหตุหรือสายปฏิบัติการ"),[ce,Ye]=T.useState(""),[re,P]=T.useState("First Call"),[Ee,ht]=T.useState(""),[Lt,ta]=T.useState(""),[Nl,nl]=T.useState("EMS"),[kt,za]=T.useState("ALS"),[la,Ea]=T.useState(""),[wt,on]=T.useState("17"),[Ca,Ru]=T.useState("แดง"),[fi,oi]=T.useState("แดง"),[mn,mi]=T.useState("แดง"),[hi,Lu]=T.useState("ไม่มี Fast Track"),[Je,wu]=T.useState("ทางบก"),[hn,xn]=T.useState(""),[jl,er]=T.useState(!1),[xi,tr]=T.useState(""),[Yu,Da]=T.useState(""),[ke,Yt]=T.useState(""),[et,Gu]=T.useState(""),[Qu,lr]=T.useState("ค้างปรับปรุงข้อมูล"),[X,Se]=T.useState(null),[aa,Tl]=T.useState(""),[na,_a]=T.useState(""),[vn,vi]=T.useState(""),[ia,ua]=T.useState(""),[bn,bi]=T.useState(""),[Al,gn]=T.useState(""),[Ma,Oa]=T.useState(""),[Ua,yn]=T.useState(""),[Tt,Me]=T.useState(!1),[Ne,zl]=T.useState(()=>new Date().toISOString().split("T")[0]),[Gt,Xu]=T.useState(()=>{const c=new Date().getHours();return c>=8&&c<16?"เช้า":c>=16&&c<24?"บ่าย":"ดึก"}),[gi,yi]=T.useState(""),[El,pn]=T.useState(""),[il,Cl]=T.useState(""),[J,$e]=T.useState(null),[G,$t]=T.useState({username:"",fullName:"",role:"Dispatcher",pin:"1234",isActive:!0,mustChangePin:!1}),[ie,We]=T.useState(null),[ye,Dl]=T.useState({name:"",level:"ALS",isActive:!0,isSamuiHospital:!1,sortOrder:99});T.useEffect(()=>{j.length>0&&Ke("users",j)},[j]),T.useEffect(()=>{B.length>0&&Ke("units",B)},[B]),T.useEffect(()=>{Ke("call_logs",_)},[_]),T.useEffect(()=>{Ke("cases",H)},[H]),T.useEffect(()=>{Ke("unit_statuses",ne)},[ne]),T.useEffect(()=>{Ke("radio_tests",R)},[R]),T.useEffect(()=>{Ke("check_sessions",I)},[I]),T.useEffect(()=>{Ke("tickets",ve)},[ve]),T.useEffect(()=>{K&&xn(K.username);const c=B.filter(N=>N.level===kt&&N.isActive);c.length>0&&!la&&Ea(c[0].id)},[K,kt,B]);const He=c=>{qt(c),setTimeout(()=>qt(""),4e3)},Wt=c=>{Nt(c),setTimeout(()=>Nt(""),4e3)},Zu=c=>{c.preventDefault();const N=j.find(z=>z.username.toLowerCase()===Pe.trim().toLowerCase()&&z.pin===ea);if(N){if(!N.isActive){Wt("บัญชีผู้ใช้นี้ถูกระงับการเข้าใช้งานชั่วคราว กรุณาติดต่อ Admin");return}if(N.mustChangePin){Sl(!0);return}al(N),localStorage.setItem("nrt_logged_user",JSON.stringify(N)),N.role==="Driver"||N.role==="EMS"?we("ambulance-check"):N.role==="ER Koh Samui"?we("cases"):N.role==="Executive"?we("dashboard"):we("dispatch"),Bt(""),Ht(""),He(`ยินดีต้อนรับคุณ ${N.fullName} เข้าสู่ระบบปฏิบัติการ`)}else Wt("ชื่อบัญชีผู้ใช้งานหรือรหัส PIN 4 หลักไม่ถูกต้อง กรุณาตรวจสอบอีกครั้ง")},qa=c=>{if(c.preventDefault(),Rt.length!==4||isNaN(Number(Rt))){Wt("รหัส PIN ใหม่ต้องเป็นตัวเลข 4 หลักเท่านั้น");return}if(Rt!==p){Wt("การยืนยันรหัส PIN ใหม่ไม่ตรงกัน");return}const N=j.map(z=>z.username.toLowerCase()===Pe.trim().toLowerCase()?{...z,pin:Rt,mustChangePin:!1}:z);F(N),Sl(!1),jt(""),A(""),He("เปลี่ยนรหัสผ่าน PIN สำเร็จ! กรุณาลงชื่อเข้าใช้งานด้วย PIN ใหม่")},sa=()=>{al(null),localStorage.removeItem("nrt_logged_user"),Bt(""),Ht(""),He("ออกจากระบบสำเร็จเรียบร้อยแล้ว")},Qt=()=>{if(!K)return;const c=new Date().toISOString().split("T")[0],N=new Date().toTimeString().split(" ")[0].substring(0,5),z=new Date().getHours(),L=z>=8&&z<16?"เช้า":z>=16&&z<24?"บ่าย":"ดึก",ee={id:`call_${Date.now()}`,timestamp:new Date().toISOString(),date:c,time:N,shift:L,username:K.username,recordedBy:K.fullName,callType:U,otherReason:U==="แจ้งเหตุอื่น"?ce:void 0,channel:re,channelDetail:["หมายเลขอื่น","วิธีอื่น ๆ"].includes(re)?Ee:void 0};if(w(je=>[ee,...je]),U==="สายแจ้งเหตุหรือสายปฏิบัติการ"){const je=Lt.trim()||`OB-2569-${Math.floor(1e3+Math.random()*9e3)}`,Re=B.find(ut=>ut.id===la)||B[0],It={id:je,createdAt:new Date().toISOString(),date:c,time:N,shift:L,username:K.username,recordedBy:K.fullName,type:Nl,unitLevel:kt,unitId:Re.id,unitName:Re.name,cbdCode:wt,phoneTriage:Ca,sceneTriage:fi,erTriage:mn,fastTrack:hi,path:Je,responsibleDispatcher:hn||K.username,consultingDoctor:jl,doctorName:jl?xi:void 0,onlineMedicalProtocol:jl?Yu:void 0,diagnosis:ke||`รับแจ้งเหตุกลุ่มอาการ ${Zo.find(ut=>ut.code===wt)?.title||"ทั่วไป"}`,riskDetected:et||"ไม่มีระดับความเสี่ยงพิเศษนอกกวน",status:Qu};xe(ut=>[It,...ut]),He(`บันทึกข้อมูลและสร้างเคสปฏิบัติการ ${je} สำเร็จ!`)}else He(`บันทึกข้อมูลสายเรียกเข้าประเภท "${U}" เรียบร้อยแล้ว`);Ye(""),ht(""),ta(""),Yt(""),Gu("")},nt=c=>{confirm("คุณแน่ใจหรือไม่ที่จะลบรายการสายเรียกเข้านี้ออกจากระบบ?")&&(w(N=>N.filter(z=>z.id!==c)),He("ลบรายการสายเรียกเข้าสำเร็จ"))},pi=c=>{const N=H.map(z=>z.id===c.id?{...c,editedAt:new Date().toISOString()}:z);xe(N),Se(null),He(`แก้ไขปรับปรุงข้อมูลเคสปฏิบัติการ ${c.id} เรียบร้อยแล้ว`)},Vu=c=>{if(c.preventDefault(),!Al)return;const N=B.find(L=>L.id===Al);if(!N)return;const z={unitId:Al,unitName:N.name,status:"ไม่พร้อมปฏิบัติการ",reason:Ma,startTime:new Date().toISOString(),estimatedEndTime:Ua?new Date(Date.now()+Number(Ua)*60*60*1e3).toISOString():void 0,unknownEndTime:Tt,recordedBy:K?.fullName||"System",updatedAt:new Date().toISOString()};_e(L=>{const ee=L.filter(je=>je.unitId!==Al);return[z,...ee]}),gn(""),Oa(""),yn(""),Me(!1),He(`อัปเดตสถานะหน่วยงาน "${N.name}" เป็นไม่พร้อมออกปฏิบัติการ`)},Sn=c=>{const N=B.find(L=>L.id===c);if(!N)return;const z={unitId:c,unitName:N.name,status:"พร้อมปฏิบัติการ",recordedBy:K?.fullName||"System",updatedAt:new Date().toISOString()};_e(L=>{const ee=L.filter(je=>je.unitId!==c);return[z,...ee]}),He(`หน่วยงาน "${N.name}" กลับคืนสถานะ "พร้อมออกปฏิบัติการ" เรียบร้อยแล้ว`)},Si=c=>{M(N=>[c,...N])},Ba=c=>{Ut(z=>[c,...z]);const N=c.results.filter(z=>!["พร้อมใช้","ไม่มีประจำรถ","ไม่เกี่ยวข้องกับรถคันนี้"].includes(z.status));if(N.length>0){const z=N.map((L,ee)=>({id:`TKT-2569-${Math.floor(1e3+Math.random()*9e3)}-${ee}`,ambulanceId:c.ambulanceId,plateNo:c.plateNo,unitName:c.unitName,itemId:L.itemId,itemName:L.itemName,problemDetails:L.problemDetails||`${L.itemName} มีระดับความคลาดเคลื่อนชำรุด หรือจำนวนไม่ครบตามมาตรฐาน`,reportedAt:new Date().toISOString(),reportedBy:c.checkerName,severity:L.severity||"general",status:"รอรับเรื่อง",targetDate:new Date(Date.now()+2592e5).toISOString().split("T")[0]}));ze(L=>[...z,...L])}},Ku=(c,N,z)=>{const L=ve.map(ee=>ee.id===c?{...ee,status:N,actionDetails:z||ee.actionDetails,resolvedAt:["แก้ไขแล้ว","ตรวจสอบผลแล้ว","ปิดรายการ"].includes(N)?new Date().toISOString():void 0,resolvedBy:["แก้ไขแล้ว","ตรวจสอบผลแล้ว","ปิดรายการ"].includes(N)?K?.fullName:void 0}:ee);ze(L),He(`อัปเดตสเตตัสใบสั่งซ่อมบำรุง ${c} เป็น "${N}"`)},it=(c,N)=>!!j.find(L=>L.username===c&&L.pin===N&&L.role==="Dispatcher"),ji=(()=>{const c=H.filter(E=>E.date===Ne&&E.shift===Gt),N=_.filter(E=>E.date===Ne&&E.shift===Gt),z=R.find(E=>E.date===Ne&&E.shift===Gt)||R[0],L=ne.filter(E=>E.status==="ไม่พร้อมปฏิบัติการ").length;B.length-L;const ee=N.length,je=N.filter(E=>E.callType==="สายแจ้งเหตุหรือสายปฏิบัติการ").length,Re=N.filter(E=>E.callType==="สายก่อกวน").length,It=N.filter(E=>E.callType==="โทรผิด").length,ut=N.filter(E=>E.callType==="แจ้งเหตุอื่น").length,Ei=c.filter(E=>E.type==="EMS").length,jn=c.filter(E=>E.type==="Refer").length,Ci=c.filter(E=>E.unitLevel==="ALS").length,ca=c.filter(E=>E.unitLevel==="BLS").length,Xt=c.filter(E=>E.unitLevel==="CLS").length,Fe=(E,tt)=>c.filter(ra=>E==="phone"?ra.phoneTriage===tt:E==="scene"?ra.sceneTriage===tt:ra.erTriage===tt).length;return{id:`rep_${Ne}_${Gt}`,date:Ne,shift:Gt,reporterUsername:K?.username||"unknown",reporterName:K?.fullName||"เจ้าหน้าที่บันทึกข้อมูล",generatedAt:new Date().toLocaleDateString("th-TH",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"}),callsSummary:{total:ee,emsOrRefer:je,spam:Re,wrongNumber:It,others:ut},casesSummary:{total:c.length,ems:Ei,refer:jn,als:Ci,bls:ca,cls:Xt},triageSummary:{phone:{red:Fe("phone","แดง"),yellow:Fe("phone","เหลือง"),green:Fe("phone","เขียว"),white:Fe("phone","ขาว")},scene:{red:Fe("scene","แดง"),yellow:Fe("scene","เหลือง"),green:Fe("scene","เขียว"),white:Fe("scene","ขาว")},er:{red:Fe("er","แดง"),yellow:Fe("er","เหลือง"),green:Fe("er","เขียว"),white:Fe("er","ขาว")}},fastTrackSummary:{stroke:c.filter(E=>E.fastTrack==="STROKE").length,stemi:c.filter(E=>E.fastTrack==="STEMI").length,sepsis:c.filter(E=>E.fastTrack==="Sepsis").length,trauma:c.filter(E=>E.fastTrack==="Multiple Trauma").length,psychiatric:c.filter(E=>E.fastTrack==="Psychiatric/Psychy").length,none:c.filter(E=>E.fastTrack==="ไม่มี Fast Track").length},pathSummary:{land:c.filter(E=>E.path==="ทางบก").length,water:c.filter(E=>E.path==="ทางน้ำ").length,air:c.filter(E=>E.path==="ทางอากาศ").length},radioSummary:z?{testedCount:z.testedCount,untestedCount:z.untestedCount,unreachable:z.unreachableStations,testerName:z.testerName}:void 0,unitStatusSummary:{unreadyUnits:ne.filter(E=>E.status==="ไม่พร้อมปฏิบัติการ").map(E=>({unitName:E.unitName,reason:E.reason||"ระงับความพร้อมชั่วคราว",duration:E.startTime||"ไม่ระบุ"})),readyUnits:B.filter(E=>!ne.some(tt=>tt.unitId===E.id&&tt.status==="ไม่พร้อมปฏิบัติการ")).map(E=>E.name)},risks:El,eventsSummary:gi,importantFollowUps:il,handover:{senderUsername:K?.username||"unknown",senderName:K?.fullName||"",receiverUsername:"",receiverName:"",notes:"",pendingCasesCount:c.filter(E=>E.status==="ค้างปรับปรุงข้อมูล").length,unreadyUnitsCount:L,isConfirmed:!1}}})(),Nn=c=>{if(c.preventDefault(),J){const N=j.map(z=>z.id===J.id?J:z);F(N),$e(null),He(`แก้ไขปรับปรุงข้อมูลผู้ใช้ "${J.fullName}" สำเร็จ`)}else{if(!G.username||!G.fullName||!G.pin){Wt("กรุณากรอกข้อมูลผู้ใช้ให้ครบถ้วนก่อนบันทึก");return}const N={id:`u_${Date.now()}`,username:G.username.toLowerCase().trim(),fullName:G.fullName,role:G.role||"Dispatcher",pin:G.pin,isActive:G.isActive!==void 0?G.isActive:!0,mustChangePin:G.mustChangePin||!1};F(z=>[...z,N]),$t({username:"",fullName:"",role:"Dispatcher",pin:"1234",isActive:!0,mustChangePin:!1}),He(`เพิ่มบัญชีผู้ใช้งานใหม่ "${N.fullName}" เข้าระบบสำเร็จ`)}},_l=c=>{if(c==="1"||c===K?.id){Wt("ไม่สามารถปิดการใช้งานหรือลบบัญชีหลักของตนเองได้");return}if(confirm("คุณต้องการเปลี่ยนสถานะบัญชีนี้เป็นระงับการใช้งานหรือไม่?")){const N=j.map(z=>z.id===c?{...z,isActive:!1}:z);F(N),He("เปลี่ยนสถานะผู้ใช้งานเป็นระงับการใช้งานสำเร็จ")}},Ti=c=>{if(c.preventDefault(),ie){const N=B.map(z=>z.id===ie.id?ie:z);b(N),We(null),He(`แก้ไขข้อมูลหน่วยงานกู้ชีพ "${ie.name}" สำเร็จ`)}else{if(!ye.name){Wt("กรุณากรอกชื่อหน่วยงานปฏิบัติการ");return}const N={id:`un_${Date.now()}`,name:ye.name,level:ye.level||"BLS",isActive:ye.isActive!==void 0?ye.isActive:!0,isSamuiHospital:ye.isSamuiHospital||!1,sortOrder:Number(ye.sortOrder)||99};b(z=>[...z,N]),Dl({name:"",level:"BLS",isActive:!0,isSamuiHospital:!1,sortOrder:99}),He(`เพิ่มหน่วยงานกู้ชีพใหม่ "${N.name}" สำเร็จ`)}},Ft=(()=>{let c=[...H];if(K?.role==="ER Koh Samui"&&(c=c.filter(N=>N.unitId==="u1")),aa&&(c=c.filter(N=>N.date===aa)),na&&(c=c.filter(N=>N.shift===na)),vn&&(c=c.filter(N=>N.unitId===vn)),ia&&(c=c.filter(N=>N.status===ia)),bn){const N=bn.toLowerCase().trim();c=c.filter(z=>z.id.toLowerCase().includes(N)||z.cbdCode.includes(N)||z.diagnosis.toLowerCase().includes(N)||z.unitName.toLowerCase().includes(N))}return c})(),Ai=(c,N)=>{const z=Math.max(...N.map(L=>L.count),1);return u.jsxs("div",{className:"bg-white p-5 rounded-2xl shadow-sm border border-slate-100 space-y-4",children:[u.jsx("h4",{className:"font-bold text-slate-800 text-sm border-b border-slate-50 pb-2",children:c}),u.jsx("div",{className:"space-y-3",children:N.map(L=>{const ee=L.count/z*100;return u.jsxs("div",{className:"space-y-1",children:[u.jsxs("div",{className:"flex justify-between text-xs font-bold text-slate-600",children:[u.jsx("span",{children:L.name}),u.jsxs("span",{children:[L.count," รายการ"]})]}),u.jsx("div",{className:"w-full h-2.5 bg-slate-100 rounded-full overflow-hidden",children:u.jsx("div",{className:"h-full rounded-full transition-all duration-1000",style:{width:`${ee}%`,backgroundColor:L.color}})})]},L.name)})})]})},zi=j.filter(c=>["Admin","Supervisor","Dispatcher"].includes(c.role)).map(c=>{const N=_.filter(Re=>Re.username===c.username).length,z=H.filter(Re=>Re.username===c.username).length,L=H.filter(Re=>Re.responsibleDispatcher===c.username).length,ee=H.filter(Re=>Re.responsibleDispatcher===c.username&&Re.status==="ปิดเคส").length,je=R.filter(Re=>Re.testerUsername===c.username).length;return{...c,createdCalls:N,createdCases:z,assignedCases:L,resolvedCases:ee,radioTestsDone:je}});return u.jsxs("div",{className:"min-h-screen bg-slate-50 flex flex-col text-slate-800 antialiased font-sans",id:"root-app",children:[u.jsx(Hh,{currentUser:K,onLogout:sa}),K?u.jsxs("div",{className:"flex-1 flex flex-col md:flex-row h-[calc(100vh-74px)] overflow-hidden",children:[u.jsx(Rh,{currentRole:K.role,activeTab:Ie,setActiveTab:we,onLogout:sa}),u.jsxs("main",{className:"flex-1 overflow-y-auto p-4 md:p-6",id:"app-workspace",children:[Ie==="dispatch"&&u.jsx("div",{className:"space-y-6 animate-fadeIn",children:u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[u.jsxs("div",{className:"bg-white rounded-2xl p-5 md:p-6 shadow-sm border border-slate-100 space-y-6",children:[u.jsxs("div",{className:"border-b border-slate-100 pb-3",children:[u.jsxs("h3",{className:"text-base font-black text-slate-800 flex items-center gap-2",children:[u.jsx(Ko,{className:"w-5 h-5 text-indigo-600"})," บันทึกการรับสายโทรศัพท์ (รับแจ้งเหตุแรกรับ)"]}),u.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"คีย์ข้อมูลผู้เจ็บป่วยฉุกเฉินอย่างรวดเร็ว โดยไม่จำเป็นต้องกรอกครบทุกช่องก็สามารถบันทึกได้"})]}),u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"ประเภทสายเรียกเข้า"}),u.jsxs("select",{value:U,onChange:c=>me(c.target.value),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 outline-none focus:ring-1 focus:ring-indigo-500 bg-white",children:[u.jsx("option",{value:"สายแจ้งเหตุหรือสายปฏิบัติการ",children:"📞 สายแจ้งเหตุ / สายปฏิบัติการ"}),u.jsx("option",{value:"สายก่อกวน",children:"🚫 สายก่อกวน"}),u.jsx("option",{value:"โทรผิด",children:"❌ โทรผิด"}),u.jsx("option",{value:"แจ้งเหตุอื่น",children:"📝 แจ้งเหตุอื่น ๆ"})]})]}),U==="แจ้งเหตุอื่น"&&u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"โปรดระบุรายละเอียดสายเรียกเข้า"}),u.jsx("input",{type:"text",required:!0,placeholder:"เช่น แจ้งประสานงานสุนัขติดเกาะ",value:ce,onChange:c=>Ye(c.target.value),className:"w-full py-2 px-3 border border-slate-200 focus:border-indigo-500 rounded-lg text-xs font-semibold outline-none"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"ช่องทางการแจ้งเหตุ"}),u.jsxs("select",{value:re,onChange:c=>P(c.target.value),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 outline-none focus:ring-1 focus:ring-indigo-500 bg-white",children:[u.jsx("option",{value:"First Call",children:"First Call"}),u.jsx("option",{value:"Second Call",children:"Second Call"}),u.jsx("option",{value:"หมายเลขอื่น",children:"หมายเลขอื่น ๆ"}),u.jsx("option",{value:"วิทยุ",children:"วิทยุสื่อสาร ว.6"}),u.jsx("option",{value:"วิธีอื่น ๆ",children:"วิธีอื่น ๆ"})]})]}),["หมายเลขอื่น","วิธีอื่น ๆ"].includes(re)&&u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"รายละเอียดช่องทางเสริม"}),u.jsx("input",{type:"text",placeholder:"ระบุเบอร์โทร / LINE / วิทยุช่องใด",value:Ee,onChange:c=>ht(c.target.value),className:"w-full py-2 px-3 border border-slate-200 focus:border-indigo-500 rounded-lg text-xs font-semibold outline-none"})]})]}),U==="สายแจ้งเหตุหรือสายปฏิบัติการ"&&u.jsxs("div",{className:"pt-4 border-t border-slate-100 space-y-4 animate-slideDown",children:[u.jsxs("div",{className:"flex items-center gap-2 mb-2 text-indigo-800",children:[u.jsx(Jo,{className:"w-4 h-4 text-indigo-600"}),u.jsx("h4",{className:"text-xs font-bold uppercase tracking-wider",children:"รายละเอียดปฏิบัติการกู้ชีพ (EMS / Refer)"})]}),u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"เลขปฏิบัติการ (สพฉ.)"}),u.jsx("input",{type:"text",placeholder:"เช่น OB-2569-1234 (ปล่อยว่างหากยังไม่มี)",value:Lt,onChange:c=>ta(c.target.value),className:"w-full py-2 px-3 border border-slate-200 focus:border-indigo-500 rounded-lg text-xs font-bold text-slate-700 outline-none font-mono"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"ประเภทปฏิบัติการ"}),u.jsxs("div",{className:"flex rounded-lg overflow-hidden border border-slate-200 p-0.5 bg-slate-100 text-xs",children:[u.jsx("button",{type:"button",onClick:()=>nl("EMS"),className:`flex-1 py-1.5 font-bold rounded-md transition-all cursor-pointer ${Nl==="EMS"?"bg-indigo-600 text-white shadow-sm":"text-slate-600 hover:text-slate-800"}`,children:"EMS (รับแจ้งเหตุ ณ จุดเกิดเหตุ)"}),u.jsx("button",{type:"button",onClick:()=>nl("Refer"),className:`flex-1 py-1.5 font-bold rounded-md transition-all cursor-pointer ${Nl==="Refer"?"bg-indigo-600 text-white shadow-sm":"text-slate-600 hover:text-slate-800"}`,children:"Refer (ประสานลำเลียงส่งต่อ)"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"ระดับหน่วยกู้ชีพ"}),u.jsx("div",{className:"flex rounded-lg overflow-hidden border border-slate-200 p-0.5 bg-slate-100 text-xs",children:["ALS","BLS","CLS"].map(c=>u.jsx("button",{type:"button",onClick:()=>{za(c);const N=B.filter(z=>z.level===c&&z.isActive);N.length>0&&Ea(N[0].id)},className:`flex-1 py-1.5 font-bold rounded-md transition-all cursor-pointer ${kt===c?"bg-indigo-600 text-white shadow-sm":"text-slate-600 hover:text-slate-800"}`,children:c},c))})]}),u.jsxs("div",{children:[u.jsxs("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:["หน่วยปฏิบัติการรับมอบ (เฉพาะระดับ ",kt,")"]}),u.jsx("select",{value:la,onChange:c=>Ea(c.target.value),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 outline-none focus:ring-1 focus:ring-indigo-500 bg-white",children:B.filter(c=>c.level===kt&&c.isActive).map(c=>u.jsx("option",{value:c.id,children:c.name},c.id))})]}),u.jsxs("div",{className:"sm:col-span-2",children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"จำแนกกลุ่มอาการ (25 กลุ่มอาการ สพฉ.)"}),u.jsx("select",{value:wt,onChange:c=>on(c.target.value),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 outline-none focus:ring-1 focus:ring-indigo-500 bg-white",children:Zo.map(c=>u.jsxs("option",{value:c.code,children:["CBD-",c.code,": ",c.title]},c.code))})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"Phone Triage (ระดับวิกฤตสายแรกรับ)"}),u.jsxs("select",{value:Ca,onChange:c=>Ru(c.target.value),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 outline-none focus:ring-1 focus:ring-indigo-500 bg-white",children:[u.jsx("option",{value:"แดง",children:"🔴 สีแดง - วิกฤตคุกคามชีพ"}),u.jsx("option",{value:"เหลือง",children:"🟡 สีเหลือง - เร่งด่วนกึ่งวิกฤต"}),u.jsx("option",{value:"เขียว",children:"🟢 สีเขียว - ไม่เร่งด่วนทั่วไป"}),u.jsx("option",{value:"ขาว",children:"⚪ สีขาว - นัดหมายรับบริการ"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"รหัสเฉพาะผู้ป่วยวิกฤต (Fast Track)"}),u.jsxs("select",{value:hi,onChange:c=>Lu(c.target.value),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 outline-none focus:ring-1 focus:ring-indigo-500 bg-white",children:[u.jsx("option",{value:"ไม่มี Fast Track",children:"ไม่มี Fast Track"}),u.jsx("option",{value:"STROKE",children:"🧠 STROKE (สมองขาดเลือด)"}),u.jsx("option",{value:"STEMI",children:"❤️ STEMI (หัวใจขาดเลือด)"}),u.jsx("option",{value:"Sepsis",children:"🦠 Sepsis (ติดเชื้อในกระแสโลหิต)"}),u.jsx("option",{value:"Multiple Trauma",children:"🚗 Multiple Trauma (อุบัติเหตุพหุบาดเจ็บ)"}),u.jsx("option",{value:"Psychiatric/Psychy",children:"🤪 Psychiatric (จิตเวชคลุ้มคลั่ง)"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"เส้นทางลำเลียงผู้ป่วย"}),u.jsxs("select",{value:Je,onChange:c=>wu(c.target.value),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 outline-none focus:ring-1 focus:ring-indigo-500 bg-white",children:[u.jsx("option",{value:"ทางบก",children:"ทางบก (รถพยาบาลฉุกเฉิน)"}),u.jsx("option",{value:"ทางน้ำ",children:"ทางน้ำ (เรือสปีดโบ๊ท/เรือกู้ชีพ)"}),u.jsx("option",{value:"ทางอากาศ",children:"ทางอากาศ (เฮลิคอปเตอร์กู้ชีพ)"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"ผู้รับผิดชอบกรอกข้อมูล (Complete ข้อมูล)"}),u.jsxs("select",{value:hn,onChange:c=>xn(c.target.value),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 outline-none focus:ring-1 focus:ring-indigo-500 bg-white",children:[u.jsx("option",{value:"",children:"-- เลือก Dispatcher --"}),j.filter(c=>c.role==="Dispatcher"||c.role==="Admin").map(c=>u.jsx("option",{value:c.username,children:c.fullName},c.id))]})]}),u.jsxs("div",{className:"sm:col-span-2",children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"อาการแรกรับ / ผลวินิจฉัย (Diagnosis)"}),u.jsx("textarea",{rows:2,placeholder:"กรอกเหตุการณ์เบื้องต้น เช่น ผู้ป่วยเพศชายอายุ 45 ปี ประสบอุบัติเหตุล้มหัวฟาดพื้น รู้สึกตัวดีปวดต้นคอ...",value:ke,onChange:c=>Yt(c.target.value),className:"w-full px-3 py-2 border border-slate-200 rounded-xl text-xs font-medium outline-none focus:ring-1 focus:ring-indigo-500"})]})]})]}),u.jsx("div",{className:"flex gap-2",children:u.jsxs("button",{onClick:Qt,className:"w-full py-3 bg-indigo-600 hover:bg-indigo-700 text-white font-black text-sm rounded-xl transition-all active:scale-95 shadow-md shadow-indigo-200 flex items-center justify-center gap-2 cursor-pointer border border-indigo-500/20",id:"btn-save-call",children:[u.jsx(xh,{className:"w-4.5 h-4.5"})," บันทึกและสรุปข้อมูลแรกรับ"]})})]}),u.jsxs("div",{className:"bg-white rounded-2xl p-5 md:p-6 shadow-sm border border-slate-100 flex flex-col justify-between gap-4",children:[u.jsxs("div",{className:"border-b border-slate-100 pb-3 flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-base font-black text-slate-800",children:"สายเรียกเข้าและรายงานล่าสุดในรอบเวร"}),u.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"แสดงรายการประวัติสายเรียกเข้าทั้งหมดที่คุณคีย์ล่าสุด"})]}),u.jsxs("span",{className:"bg-indigo-100 text-indigo-800 text-[10px] font-black px-2 py-1 rounded-full border border-indigo-200 uppercase",children:[_.length," สายเรียกเข้า"]})]}),u.jsx("div",{className:"space-y-3 max-h-[460px] overflow-y-auto pr-2 divide-y divide-slate-50",children:_.length===0?u.jsx("div",{className:"text-center py-10 text-slate-400 text-xs font-medium",children:"📭 ยังไม่มีประวัติสายเรียกเข้าที่ได้รับการบันทึกในรอบเวรนี้"}):_.map((c,N)=>u.jsxs("div",{className:"pt-3 first:pt-0 flex items-start justify-between gap-3 text-xs",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsxs("div",{className:"flex items-center gap-1.5 font-bold",children:[u.jsx("span",{className:`w-2 h-2 rounded-full
|
|
${c.callType==="สายแจ้งเหตุหรือสายปฏิบัติการ"?"bg-red-500":""}
|
|
${c.callType==="สายก่อกวน"?"bg-amber-500":""}
|
|
${c.callType==="โทรผิด"?"bg-slate-400":""}
|
|
${c.callType==="แจ้งเหตุอื่น"?"bg-indigo-500":""}
|
|
`}),u.jsx("span",{className:"text-slate-800",children:c.callType}),u.jsxs("span",{className:"text-slate-400 text-[10px] font-mono font-semibold",children:["(",c.time," น.)"]})]}),u.jsxs("p",{className:"text-[10px] text-slate-500 leading-normal font-semibold",children:["ช่องทาง: ",c.channel," ",c.channelDetail&&`[${c.channelDetail}]`,c.otherReason&&`| เหตุพิเศษ: ${c.otherReason}`]}),u.jsxs("div",{className:"text-[9px] text-slate-400 font-bold",children:["บันทึกโดย: ",c.recordedBy]})]}),u.jsx("button",{onClick:()=>nt(c.id),className:"text-slate-300 hover:text-red-500 p-1 rounded-lg hover:bg-red-50 transition-colors cursor-pointer",title:"ลบข้อมูลสายโทรศัพท์",id:`btn-delete-call-${c.id}`,children:u.jsx(Ho,{className:"w-4 h-4"})})]},c.id))}),u.jsx("div",{className:"bg-slate-50 p-3 rounded-xl border border-slate-100/60 text-[11px] font-bold text-slate-500 leading-normal",children:'💡 เคล็ดลับปฏิบัติการ: ข้อมูลเคสจะถูกนำเข้าสู่ระบบบัญชี "หน้าเคสปฏิบัติการ" โดยอัตโนมัติ เพื่อให้ผู้รับผิดชอบ (Complete) และทีม ER ดำเนินการคัดแยกสี และปิดเคสอย่างละเอียด'})]})]})}),Ie==="cases"&&u.jsxs("div",{className:"space-y-6 animate-fadeIn",children:[u.jsxs("div",{className:"bg-white rounded-2xl p-4 md:p-5 shadow-sm border border-slate-100 flex flex-wrap gap-3 items-center justify-between",children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-2.5",children:[u.jsxs("div",{className:"relative",children:[u.jsx(vh,{className:"w-4 h-4 text-slate-400 absolute left-3 top-1/2 -translate-y-1/2"}),u.jsx("input",{type:"text",placeholder:"ค้นหาเลขสพฉ. / CBD / อาการ...",value:bn,onChange:c=>bi(c.target.value),className:"pl-9 pr-3.5 py-1.5 border border-slate-200 focus:border-indigo-500 rounded-xl text-xs outline-none bg-slate-50/50 hover:bg-white focus:bg-white w-48 font-semibold transition-all"})]}),u.jsxs("select",{value:vn,onChange:c=>vi(c.target.value),className:"py-1.5 px-3 border border-slate-200 rounded-xl text-xs font-bold text-slate-700 bg-white focus:ring-1 focus:ring-indigo-500 outline-none",children:[u.jsx("option",{value:"",children:"-- หน่วยปฏิบัติการกู้ชีพทั้งหมด --"}),B.map(c=>u.jsxs("option",{value:c.id,children:[c.name," (",c.level,")"]},c.id))]}),u.jsxs("select",{value:ia,onChange:c=>ua(c.target.value),className:"py-1.5 px-3 border border-slate-200 rounded-xl text-xs font-bold text-slate-700 bg-white focus:ring-1 focus:ring-indigo-500 outline-none",children:[u.jsx("option",{value:"",children:"-- สถานะเคสทั้งหมด --"}),u.jsx("option",{value:"ค้างปรับปรุงข้อมูล",children:"❌ ค้างปรับปรุงข้อมูล"}),u.jsx("option",{value:"ปรับปรุงข้อมูลแล้ว",children:"🟡 ปรับปรุงข้อมูลแล้ว"}),u.jsx("option",{value:"ปิดเคส",children:"🟢 ปิดเคส"})]})]}),u.jsxs("div",{className:"text-xs font-bold bg-indigo-50 text-indigo-700 px-3.5 py-1.5 rounded-xl border border-indigo-100 self-end md:self-auto flex items-center gap-1.5",children:[u.jsx(bh,{className:"w-3.5 h-3.5"})," พบทั้งหมด ",Ft.length," รายการสอดคล้อง"]})]}),u.jsxs("div",{className:"bg-white rounded-2xl shadow-sm border border-slate-100 overflow-hidden",children:[u.jsx("div",{className:"p-4 md:p-5 border-b border-slate-100 bg-slate-50/50 flex flex-col sm:flex-row sm:items-center justify-between gap-3",children:u.jsxs("div",{children:[u.jsx("h3",{className:"text-base font-black text-slate-800",children:"รายการรับเคสปฏิบัติการ ศูนย์นเรนทรอ่าวไทย"}),u.jsx("p",{className:"text-xs text-slate-500 mt-0.5",children:"รวมเคสฉุกเฉินกู้ชีพทุกลำดับ และผู้ประเมินสถานะการพยาบาลรับ-ส่งต่อ"})]})}),u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"w-full text-left border-collapse text-xs md:text-sm",children:[u.jsx("thead",{children:u.jsxs("tr",{className:"bg-slate-100/50 text-slate-600 font-bold border-b border-slate-100",children:[u.jsx("th",{className:"py-3 px-4",children:"เลขปฏิบัติการ (สพฉ)"}),u.jsx("th",{className:"py-3 px-3",children:"ประเภทเคส"}),u.jsx("th",{className:"py-3 px-3",children:"หน่วยงานกู้ชีพรับเหมา"}),u.jsx("th",{className:"py-3 px-3 text-center",children:"Triage (Phone/Scene/ER)"}),u.jsx("th",{className:"py-3 px-3",children:"ผู้รับผิดชอบกู้ชีพ"}),u.jsx("th",{className:"py-3 px-3 text-center",children:"สถานะเคส"}),u.jsx("th",{className:"py-3 px-4 text-center",children:"การดำเนินการ"})]})}),u.jsx("tbody",{className:"divide-y divide-slate-100 text-slate-700 font-medium",children:Ft.length===0?u.jsx("tr",{children:u.jsx("td",{colSpan:7,className:"py-10 text-center text-slate-400 font-bold",children:"📭 ไม่พบเคสปฏิบัติการที่ตรงตามตัวกรองที่ระบุในเวรนี้"})}):Ft.map(c=>u.jsxs("tr",{className:"hover:bg-slate-50/50 transition-colors",children:[u.jsxs("td",{className:"py-3.5 px-4",children:[u.jsx("div",{className:"font-extrabold text-slate-900 font-mono text-xs",children:c.id}),u.jsxs("div",{className:"text-[10px] text-slate-400 mt-0.5 font-bold",children:["วันที่: ",c.date," | ",c.time," น. (เวร",c.shift,")"]})]}),u.jsx("td",{className:"py-3.5 px-3",children:u.jsxs("div",{className:"flex flex-col gap-1 items-start",children:[u.jsx("span",{className:`px-2 py-0.5 rounded text-[10px] font-black tracking-wide border
|
|
${c.type==="EMS"?"bg-blue-50 text-blue-700 border-blue-200":"bg-indigo-50 text-indigo-700 border-indigo-200"}
|
|
`,children:c.type}),u.jsxs("span",{className:"text-[10px] text-slate-500 font-bold",children:["CBD-",c.cbdCode]})]})}),u.jsxs("td",{className:"py-3.5 px-3",children:[u.jsx("div",{className:"font-bold text-slate-800",children:c.unitName}),u.jsxs("div",{className:"text-[10px] text-slate-400 font-bold mt-0.5",children:["ระดับความพร้อม: ",c.unitLevel," | ลำเลียง: ",c.path]})]}),u.jsx("td",{className:"py-3.5 px-3 text-center",children:u.jsxs("div",{className:"inline-flex gap-1 items-center",children:[u.jsx("span",{className:`w-5 h-5 rounded-md flex items-center justify-center font-bold text-[10px] text-white border
|
|
${c.phoneTriage==="แดง"?"bg-red-600 border-red-700":""}
|
|
${c.phoneTriage==="เหลือง"?"bg-amber-500 border-amber-600":""}
|
|
${c.phoneTriage==="เขียว"?"bg-emerald-600 border-emerald-700":""}
|
|
${c.phoneTriage==="ขาว"?"bg-slate-400 border-slate-500":""}
|
|
`,title:"Phone Triage",children:"P"}),u.jsx("span",{className:"text-slate-300 text-[10px]",children:"/"}),u.jsx("span",{className:`w-5 h-5 rounded-md flex items-center justify-center font-bold text-[10px] text-white border
|
|
${c.sceneTriage==="แดง"?"bg-red-600 border-red-700":""}
|
|
${c.sceneTriage==="เหลือง"?"bg-amber-500 border-amber-600":""}
|
|
${c.sceneTriage==="เขียว"?"bg-emerald-600 border-emerald-700":""}
|
|
${c.sceneTriage==="ขาว"?"bg-slate-400 border-slate-500":""}
|
|
`,title:"Scene Triage",children:"S"}),u.jsx("span",{className:"text-slate-300 text-[10px]",children:"/"}),u.jsx("span",{className:`w-5 h-5 rounded-md flex items-center justify-center font-bold text-[10px] text-white border
|
|
${c.erTriage==="แดง"?"bg-red-600 border-red-700":""}
|
|
${c.erTriage==="เหลือง"?"bg-amber-500 border-amber-600":""}
|
|
${c.erTriage==="เขียว"?"bg-emerald-600 border-emerald-700":""}
|
|
${c.erTriage==="ขาว"?"bg-slate-400 border-slate-500":""}
|
|
`,title:"ER Triage",children:"E"})]})}),u.jsxs("td",{className:"py-3.5 px-3",children:[u.jsx("div",{className:"font-semibold text-slate-800",children:j.find(N=>N.username===c.responsibleDispatcher)?.fullName.split(" ")[0]||c.responsibleDispatcher}),u.jsxs("div",{className:"text-[10px] text-slate-400 font-bold mt-0.5",children:["เวรรอบ: ",c.shift]})]}),u.jsx("td",{className:"py-3.5 px-3 text-center",children:u.jsx("span",{className:`inline-flex items-center gap-1 px-2.5 py-1 rounded-full text-[10px] font-extrabold border
|
|
${c.status==="ค้างปรับปรุงข้อมูล"?"bg-rose-50 text-rose-700 border-rose-200":""}
|
|
${c.status==="ปรับปรุงข้อมูลแล้ว"?"bg-amber-50 text-amber-700 border-amber-200 animate-pulse":""}
|
|
${c.status==="ปิดเคส"?"bg-emerald-50 text-emerald-700 border-emerald-200":""}
|
|
`,children:c.status})}),u.jsx("td",{className:"py-3.5 px-4 text-center",children:u.jsxs("button",{onClick:()=>Se(c),className:"inline-flex items-center gap-1 bg-slate-50 hover:bg-indigo-50 text-slate-600 hover:text-indigo-700 text-xs font-bold px-2.5 py-1.5 rounded-lg border border-slate-200 hover:border-indigo-200 transition-colors cursor-pointer shadow-sm",id:`btn-edit-case-${c.id}`,children:[u.jsx(Jc,{className:"w-3.5 h-3.5"})," แก้ไขข้อมูล"]})})]},c.id))})]})})]}),X&&u.jsx("div",{className:"fixed inset-0 bg-slate-900/60 z-50 flex items-center justify-center p-4",children:u.jsxs("div",{className:"bg-white rounded-3xl max-w-2xl w-full p-6 space-y-6 shadow-2xl border border-slate-100 max-h-[90vh] overflow-y-auto",children:[u.jsxs("div",{className:"border-b border-slate-100 pb-3 flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsxs("h3",{className:"text-base font-black text-slate-800",children:["ปรับปรุงข้อมูลเคสฉุกเฉินและ Triage ",X.id]}),u.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:"อัปเดตสัญชีพ การประเมินหน้างาน และเปลี่ยนสถานะเพื่อส่งต่อรายงานสถิติอย่างถูกต้อง"})]}),u.jsx("button",{onClick:()=>Se(null),className:"p-1.5 hover:bg-slate-50 rounded-lg text-slate-400 hover:text-slate-600 font-bold",children:"✕"})]}),u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"เลขปฏิบัติการ (สพฉ)"}),u.jsx("input",{type:"text",value:X.id,onChange:c=>Se({...X,id:c.target.value}),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 font-mono outline-none"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"ประเภทปฏิบัติการ"}),u.jsxs("select",{value:X.type,onChange:c=>Se({...X,type:c.target.value}),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 bg-white",children:[u.jsx("option",{value:"EMS",children:"EMS (รับแจ้งเหตุแรก)"}),u.jsx("option",{value:"Refer",children:"Refer (ประสานพยาบาลต่อ)"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"ระดับหน่วยกู้ชีพ"}),u.jsxs("select",{value:X.unitLevel,onChange:c=>Se({...X,unitLevel:c.target.value}),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 bg-white",children:[u.jsx("option",{value:"ALS",children:"ALS (วิชาชีพแพทย์)"}),u.jsx("option",{value:"BLS",children:"BLS (หน่วยพยาบาลกู้ชีพ)"}),u.jsx("option",{value:"CLS",children:"CLS (ทีมงานมูลนิธิพื้นฐาน)"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"หน่วยปฏิบัติการรับเหมา"}),u.jsx("select",{value:X.unitId,onChange:c=>{const N=B.find(z=>z.id===c.target.value);N&&Se({...X,unitId:N.id,unitName:N.name})},className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 bg-white",children:B.filter(c=>c.level===X.unitLevel&&c.isActive).map(c=>u.jsx("option",{value:c.id,children:c.name},c.id))})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"ประเมินทางสาย (Phone Triage)"}),u.jsxs("select",{value:X.phoneTriage,onChange:c=>Se({...X,phoneTriage:c.target.value}),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 bg-white",children:[u.jsx("option",{value:"แดง",children:"🔴 สีแดง - วิกฤตคุกคามชีพ"}),u.jsx("option",{value:"เหลือง",children:"🟡 สีเหลือง - เร่งด่วนกึ่งวิกฤต"}),u.jsx("option",{value:"เขียว",children:"🟢 สีเขียว - ไม่เร่งด่วนทั่วไป"}),u.jsx("option",{value:"ขาว",children:"⚪ สีขาว - ผู้ป่วยนัดหมาย"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"ประเมินหน้าจุดเกิดเหตุ (Scene Triage)"}),u.jsxs("select",{value:X.sceneTriage,onChange:c=>Se({...X,sceneTriage:c.target.value}),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 bg-white",children:[u.jsx("option",{value:"แดง",children:"🔴 สีแดง - วิกฤตคุกคามชีพ"}),u.jsx("option",{value:"เหลือง",children:"🟡 สีเหลือง - เร่งด่วนกึ่งวิกฤต"}),u.jsx("option",{value:"เขียว",children:"🟢 สีเขียว - ไม่เร่งด่วนทั่วไป"}),u.jsx("option",{value:"ขาว",children:"⚪ สีขาว - ผู้ป่วยนัดหมาย"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"ประเมินหน้าห้องฉุกเฉิน (ER Triage)"}),u.jsxs("select",{value:X.erTriage,onChange:c=>Se({...X,erTriage:c.target.value}),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 bg-white",children:[u.jsx("option",{value:"แดง",children:"🔴 สีแดง - วิกฤตคุกคามชีพ"}),u.jsx("option",{value:"เหลือง",children:"🟡 สีเหลือง - เร่งด่วนกึ่งวิกฤต"}),u.jsx("option",{value:"เขียว",children:"🟢 สีเขียว - ไม่เร่งด่วนทั่วไป"}),u.jsx("option",{value:"ขาว",children:"⚪ สีขาว - ผู้ป่วยนัดหมาย"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"รหัสเฉพาะ (Fast Track)"}),u.jsxs("select",{value:X.fastTrack,onChange:c=>Se({...X,fastTrack:c.target.value}),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 bg-white",children:[u.jsx("option",{value:"ไม่มี Fast Track",children:"ไม่มี Fast Track"}),u.jsx("option",{value:"STROKE",children:"🧠 STROKE (สมองขาดเลือด)"}),u.jsx("option",{value:"STEMI",children:"❤️ STEMI (หัวใจขาดเลือด)"}),u.jsx("option",{value:"Sepsis",children:"🦠 Sepsis (ติดเชื้อในกระแสโลหิต)"}),u.jsx("option",{value:"Multiple Trauma",children:"🚗 Multiple Trauma (อุบัติเหตุพหุบาดเจ็บ)"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"แพทย์อำนวยการรับปรึกษา (พอป.)"}),u.jsxs("div",{className:"flex items-center gap-2 py-2",children:[u.jsx("input",{type:"checkbox",checked:X.consultingDoctor,onChange:c=>Se({...X,consultingDoctor:c.target.checked}),className:"w-4 h-4 text-indigo-600 border-slate-200 rounded"}),u.jsx("span",{className:"text-xs font-bold text-slate-600",children:"มีการปรึกษาแพทย์อำนวยการ"})]})]}),X.consultingDoctor&&u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"ชื่อแพทย์อำนวยการ พอป."}),u.jsx("input",{type:"text",value:X.doctorName||"",onChange:c=>Se({...X,doctorName:c.target.value}),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 outline-none",placeholder:"เช่น พญ.ชลิดา พัชรสมุย"})]}),X.consultingDoctor&&u.jsxs("div",{className:"sm:col-span-2",children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"Online Medical Protocol (ข้อสั่งการแพทย์ออนไลน์)"}),u.jsx("input",{type:"text",value:X.onlineMedicalProtocol||"",onChange:c=>Se({...X,onlineMedicalProtocol:c.target.value}),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-semibold text-slate-700 outline-none",placeholder:"เช่น การให้สารละลายและดามกระดูกฉุกเฉิน"})]}),u.jsxs("div",{className:"sm:col-span-2",children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"ผลการวินิจฉัยพยาบาล (Diagnosis / อาการฉุกเฉิน)"}),u.jsx("textarea",{rows:3,value:X.diagnosis,onChange:c=>Se({...X,diagnosis:c.target.value}),className:"w-full px-3 py-2 border border-slate-200 rounded-xl text-xs font-medium outline-none"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"สถานะเคส"}),u.jsxs("select",{value:X.status,onChange:c=>Se({...X,status:c.target.value}),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-extrabold text-slate-700 bg-white",children:[u.jsx("option",{value:"ค้างปรับปรุงข้อมูล",children:"❌ ค้างปรับปรุงข้อมูล"}),u.jsx("option",{value:"ปรับปรุงข้อมูลแล้ว",children:"🟡 ปรับปรุงข้อมูลแล้ว"}),u.jsx("option",{value:"ปิดเคส",children:"🟢 ปิดเคส"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"ผู้รับผิดชอบการ Complete ข้อมูล"}),u.jsx("select",{value:X.responsibleDispatcher,onChange:c=>Se({...X,responsibleDispatcher:c.target.value}),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 bg-white",children:j.filter(c=>c.role==="Dispatcher"||c.role==="Admin").map(c=>u.jsx("option",{value:c.username,children:c.fullName},c.id))})]})]}),u.jsxs("div",{className:"flex gap-2 pt-4 border-t border-slate-100 justify-end",children:[u.jsx("button",{type:"button",onClick:()=>Se(null),className:"py-2 px-4 bg-slate-100 hover:bg-slate-200 text-slate-600 text-xs font-bold rounded-xl transition-all cursor-pointer",children:"ยกเลิกการแก้ไข"}),u.jsx("button",{type:"button",onClick:()=>pi(X),className:"py-2 px-5 bg-indigo-600 hover:bg-indigo-700 text-white text-xs font-bold rounded-xl shadow-md shadow-indigo-200 transition-all cursor-pointer border border-indigo-500/10",children:"บันทึกข้อมูลปรับปรุง"})]})]})}),u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[u.jsxs("form",{onSubmit:Vu,className:"bg-white rounded-2xl p-5 md:p-6 shadow-sm border border-slate-100 space-y-4",children:[u.jsxs("div",{className:"border-b border-slate-100 pb-2",children:[u.jsxs("h3",{className:"text-base font-black text-slate-800 flex items-center gap-2",children:[u.jsx(Bo,{className:"w-4.5 h-4.5 text-rose-600"})," บันทึกรายงานระดับสถานะความพร้อมของหน่วยงานกู้ชีพ"]}),u.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"คีย์ระบุข้อมูลหากหน่วยกู้ภัยในข่ายนเรนทรไม่พร้อมปฏิบัติการ เช่น รถส่งซ่อมชั่วคราว"})]}),u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"เลือกหน่วยปฏิบัติการที่มีปัญหา"}),u.jsxs("select",{value:Al,onChange:c=>gn(c.target.value),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 bg-white outline-none focus:ring-1 focus:ring-indigo-500",children:[u.jsx("option",{value:"",children:"-- เลือกหน่วยงานกู้ชีพ --"}),B.map(c=>u.jsxs("option",{value:c.id,children:[c.name," (",c.level,")"]},c.id))]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"คาดการณ์ระยะเวลาไม่พร้อมใช้ (ชั่วโมง)"}),u.jsx("input",{type:"number",placeholder:"เช่น 4, 12, 24",disabled:Tt,value:Ua,onChange:c=>yn(c.target.value),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-semibold text-slate-700 outline-none disabled:bg-slate-50"})]}),u.jsxs("div",{className:"sm:col-span-2 flex items-center gap-2",children:[u.jsx("input",{type:"checkbox",checked:Tt,onChange:c=>Me(c.target.checked),className:"w-4 h-4 text-indigo-600 border-slate-200 rounded"}),u.jsx("span",{className:"text-xs font-bold text-slate-600",children:"ยังไม่ทราบเวลาสิ้นสุดกู้คืนความพร้อมแน่นอน"})]}),u.jsxs("div",{className:"sm:col-span-2",children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"ระบุเหตุผลขัดข้องความพร้อม"}),u.jsx("input",{type:"text",required:!0,placeholder:"เช่น ยางรถเสื่อมชำรุดชั่วคราว, วิทยุโมบายล์พังควันขึ้น",value:Ma,onChange:c=>Oa(c.target.value),className:"w-full py-2 px-3 border border-slate-200 focus:border-rose-400 rounded-lg text-xs font-semibold outline-none"})]})]}),u.jsx("button",{type:"submit",className:"w-full py-2.5 bg-rose-600 hover:bg-rose-700 text-white font-bold text-xs rounded-xl shadow-md shadow-rose-200 transition-all cursor-pointer",children:'ส่งแจ้งเตือน "ไม่พร้อมออกปฏิบัติการ" ขึ้น Dashboard EMS'})]}),u.jsxs("div",{className:"bg-white rounded-2xl p-5 md:p-6 shadow-sm border border-slate-100 flex flex-col justify-between gap-4",children:[u.jsxs("div",{className:"border-b border-slate-100 pb-2 flex items-center justify-between",children:[u.jsxs("div",{children:[u.jsx("h3",{className:"text-base font-black text-slate-800",children:"ขบวนกู้ภัยที่ยังไม่พร้อมปฏิบัติการ ณ ปัจจุบัน"}),u.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"อัปเดตแบบ Realtime ไปยัง Dashboard ผู้บริหารและพยาบาลนำส่ง"})]}),u.jsxs("span",{className:"bg-rose-100 text-rose-800 text-[10px] font-black px-2.5 py-1 rounded-full border border-rose-200",children:[ne.filter(c=>c.status==="ไม่พร้อมปฏิบัติการ").length," หน่วยขัดข้อง"]})]}),u.jsx("div",{className:"space-y-3 max-h-[220px] overflow-y-auto pr-2 divide-y divide-slate-50",children:ne.filter(c=>c.status==="ไม่พร้อมปฏิบัติการ").length===0?u.jsx("div",{className:"text-center py-10 text-slate-400 text-xs font-bold",children:"💚 ยอดเยี่ยม! หน่วยงานกู้ชีพทุกข่าย 19 สถานีพร้อมออกปฏิบัติการ 100%"}):ne.filter(c=>c.status==="ไม่พร้อมปฏิบัติการ").map(c=>u.jsxs("div",{className:"pt-2.5 first:pt-0 flex items-start justify-between gap-3 text-xs",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("div",{className:"font-extrabold text-slate-900",children:c.unitName}),u.jsxs("p",{className:"text-[10px] text-rose-600 leading-normal font-black",children:["เหตุผลชำรุด: ",c.reason]}),u.jsxs("div",{className:"text-[9px] text-slate-400 font-bold",children:["บันทึกเมื่อ: ",c.updatedAt.replace("T"," ").substring(0,16)," น. | โดย: ",c.recordedBy]})]}),u.jsx("button",{onClick:()=>Sn(c.unitId),className:"bg-emerald-50 hover:bg-emerald-100 text-emerald-700 font-extrabold text-[10px] px-2.5 py-1 rounded-lg border border-emerald-200 transition-colors cursor-pointer",children:"กลับคืนพร้อมปฏิบัติ"})]},c.unitId))}),u.jsx("div",{className:"bg-slate-50 p-2.5 rounded-xl border border-slate-100/60 text-[10px] font-bold text-slate-500",children:'⚠️ แจ้งหัวหน้าเวร: หากปัญหาซ่อมบำรุงในรถพยาบาลได้รับการแก้ไขแล้ว กรุณากดปุ่ม "กลับคืนพร้อมปฏิบัติ" เพื่อล้างสถานะ Dashboard'})]})]})]}),Ie==="daily-report"&&u.jsxs("div",{className:"space-y-6 animate-fadeIn",children:[u.jsxs("div",{className:"bg-white rounded-2xl p-4 md:p-5 shadow-sm border border-slate-100 flex flex-wrap gap-4 items-center",children:[u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-xs font-bold text-slate-500",children:"วันที่คัดรายงาน:"}),u.jsx("input",{type:"date",value:Ne,onChange:c=>zl(c.target.value),className:"py-1.5 px-3 border border-slate-200 rounded-xl text-xs font-bold text-slate-700 outline-none"})]}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx("span",{className:"text-xs font-bold text-slate-500",children:"เลือกเวรรอบ:"}),u.jsxs("select",{value:Gt,onChange:c=>Xu(c.target.value),className:"py-1.5 px-3 border border-slate-200 rounded-xl text-xs font-bold text-slate-700 bg-white outline-none",children:[u.jsx("option",{value:"เช้า",children:"☀️ เวรเช้า (08:00 - 16:00 น.)"}),u.jsx("option",{value:"บ่าย",children:"⛅ เวรบ่าย (16:00 - 00:00 น.)"}),u.jsx("option",{value:"ดึก",children:"🌙 เวรดึก (00:00 - 08:00 น.)"})]})]})]}),u.jsxs("div",{className:"bg-white rounded-2xl p-5 md:p-6 shadow-sm border border-slate-100 space-y-4",children:[u.jsxs("div",{className:"border-b border-slate-100 pb-2",children:[u.jsx("h3",{className:"text-base font-black text-slate-800",children:"ระบุบทบันทึกสรุปและเรื่องค้างส่งมอบ"}),u.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"ป้อนข้อมูลข้อขัดข้องหรือความเสี่ยงที่พบในรอบเวร เพื่อนำไปลงบันทึกในเอกสารรายงานประจำวันอัตโนมัติ"})]}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"สรุปเหตุการณ์สำคัญประจำเวร (Narrative)"}),u.jsx("textarea",{rows:3,placeholder:"เช่น การประสานรับเคสอุบัติเหตุหมู่ สัญญาณสายแทงเข้าปกติ ไม่มีข้อติดขัดเรื่องรถ ALS...",value:gi,onChange:c=>yi(c.target.value),className:"w-full px-3 py-2 border border-slate-200 rounded-xl text-xs font-medium outline-none focus:ring-1 focus:ring-indigo-500"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"ความเสี่ยงหรือปัญหาที่สืบค้นพบ"}),u.jsx("textarea",{rows:3,placeholder:"เช่น พบปัญหาคลื่นสัญญาณวิทยุจุดบ่อผุดรับส่งเบาบาง, ฝนตกจุดเกาะพะงันคลื่นแรงสปีดโบ๊ทยกยาก...",value:El,onChange:c=>pn(c.target.value),className:"w-full px-3 py-2 border border-slate-200 rounded-xl text-xs font-medium outline-none focus:ring-1 focus:ring-indigo-500"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"เคสสำคัญที่ต้องสืบสวนและติดตามต่อ"}),u.jsx("textarea",{rows:3,placeholder:"เช่น เคสประสานเฮลิคอปเตอร์กู้ชีพเกาะเต่า OB-2569-0012 รอสรุปผลประเมินอาการส่งต่อ ER สุราษฎร์ธานี...",value:il,onChange:c=>Cl(c.target.value),className:"w-full px-3 py-2 border border-slate-200 rounded-xl text-xs font-medium outline-none focus:ring-1 focus:ring-indigo-500"})]})]})]}),u.jsx(T.Suspense,{fallback:u.jsx(Ic,{}),children:u.jsx(Yh,{report:ji,onConfirmHandover:(c,N)=>{const z=it(c,N);if(z){const L=j.find(ee=>ee.username===c);if(L){const ee=H.map(je=>je.date===Ne&&je.shift===Gt&&je.status==="ปรับปรุงข้อมูลแล้ว"?{...je,status:"ปิดเคส"}:je);xe(ee),He(`รับ-ส่งมอบเวรเสร็จสิ้นให้กับ ${L.fullName}`)}}return z},dispatchers:j,successMsg:Jt,setSuccessMsg:qt,cases:H,calls:_})})]}),Ie==="radio-test"&&u.jsx("div",{className:"space-y-6 animate-fadeIn",children:u.jsx(T.Suspense,{fallback:u.jsx(Ic,{}),children:u.jsx(Lh,{currentUser:K,onSaveRadioTest:Si,radioTests:R})})}),Ie==="statistics"&&u.jsxs("div",{className:"space-y-6 animate-fadeIn",children:[u.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4",children:[u.jsxs("div",{className:"bg-white p-4 rounded-2xl shadow-sm border border-slate-100",children:[u.jsx("div",{className:"text-xs text-slate-400 font-bold",children:"ยอดเคสสะสมในระบบ"}),u.jsxs("div",{className:"text-2xl font-black text-slate-800 mt-1",children:[H.length," เคส"]})]}),u.jsxs("div",{className:"bg-white p-4 rounded-2xl shadow-sm border border-slate-100",children:[u.jsx("div",{className:"text-xs text-slate-400 font-bold",children:"ยอดสายเรียกเข้าแรกรับ"}),u.jsxs("div",{className:"text-2xl font-black text-slate-800 mt-1",children:[_.length," สาย"]})]}),u.jsxs("div",{className:"bg-white p-4 rounded-2xl shadow-sm border border-slate-100",children:[u.jsx("div",{className:"text-xs text-slate-400 font-bold",children:"ประเมินเคสปิดสำเร็จ"}),u.jsxs("div",{className:"text-2xl font-black text-emerald-600 mt-1",children:[H.filter(c=>c.status==="ปิดเคส").length," รายการ"]})]}),u.jsxs("div",{className:"bg-white p-4 rounded-2xl shadow-sm border border-slate-100",children:[u.jsx("div",{className:"text-xs text-slate-400 font-bold font-sans",children:"เคสตกค้าง/ยังไม่ปิด"}),u.jsxs("div",{className:"text-2xl font-black text-rose-600 mt-1",children:[H.filter(c=>c.status==="ค้างปรับปรุงข้อมูล").length," รายการ"]})]})]}),u.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:[Ai("สัดส่วนช่องทางการแจ้งเหตุ (Call Channels)",[{name:"First Call (เบอร์ 1669 หลัก)",count:_.filter(c=>c.channel==="First Call").length||4,color:"#2563eb"},{name:"Second Call (สายซ้อนประสาน)",count:_.filter(c=>c.channel==="Second Call").length||2,color:"#3b82f6"},{name:"วิทยุสื่อสาร ว.6",count:_.filter(c=>c.channel==="วิทยุ").length||3,color:"#6366f1"},{name:"หมายเลขอื่น / ช่องทางอื่น ๆ",count:_.filter(c=>["หมายเลขอื่น","วิธีอื่น ๆ"].includes(c.channel)).length||1,color:"#a855f7"}]),Ai("ระดับการประเมิน Phone Triage ฉุกเฉินคุกคามชีพ",[{name:"🔴 สีแดง - วิกฤตสูงสุด",count:H.filter(c=>c.phoneTriage==="แดง").length||3,color:"#dc2626"},{name:"🟡 สีเหลือง - เร่งด่วน",count:H.filter(c=>c.phoneTriage==="เหลือง").length||2,color:"#f59e0b"},{name:"🟢 สีเขียว - เจ็บป่วยทั่วไป",count:H.filter(c=>c.phoneTriage==="เขียว").length||1,color:"#10b981"},{name:"⚪ สีขาว - ตรวจสุขภาพนัดส่งต่อ",count:H.filter(c=>c.phoneTriage==="ขาว").length||0,color:"#94a3b8"}])]}),u.jsxs("div",{className:"bg-white rounded-2xl shadow-sm border border-slate-100 overflow-hidden",children:[u.jsx("div",{className:"p-4 md:p-5 border-b border-slate-100 bg-slate-50 flex items-center justify-between",children:u.jsxs("div",{children:[u.jsxs("h3",{className:"text-base font-bold text-slate-800 flex items-center gap-1.5",children:[u.jsx(gh,{className:"w-4.5 h-4.5 text-indigo-600"})," ดัชนีผลผลิตผู้ปฏิบัติการรับรับแจ้งเหตุและสั่งการ (Productivity ของเจ้าหน้าที่)"]}),u.jsx("p",{className:"text-xs text-slate-500 mt-1",children:"คำนวณสถิติสรุปงานแยกรายเจ้าหน้าที่โดยอัตโนมัติอ้างอิงตาม username บันทึกข้อมูลจริงในข่าย"})]})}),u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"w-full text-left border-collapse text-xs md:text-sm",children:[u.jsx("thead",{children:u.jsxs("tr",{className:"bg-slate-100/50 text-slate-600 font-bold border-b border-slate-100",children:[u.jsx("th",{className:"py-3 px-4",children:"ชื่อเจ้าหน้าที่กู้ชีพกู้ภัย"}),u.jsx("th",{className:"py-3 px-3 text-center",children:"สิทธิ์ในระบบ"}),u.jsx("th",{className:"py-3 px-3 text-center",children:"รับสายโทรศัพท์ (สาย)"}),u.jsx("th",{className:"py-3 px-3 text-center",children:"สร้างเคสใหม่ (เคส)"}),u.jsx("th",{className:"py-3 px-3 text-center",children:"รับมอบ Complete (เคส)"}),u.jsx("th",{className:"py-3 px-3 text-center",children:"เคสที่ปิดแล้ว (เคส)"})]})}),u.jsx("tbody",{className:"divide-y divide-slate-100 text-slate-700 font-medium",children:zi.map(c=>u.jsxs("tr",{className:"hover:bg-slate-50/50 transition-colors",children:[u.jsx("td",{className:"py-3.5 px-4 font-bold text-slate-800",children:c.fullName}),u.jsx("td",{className:"py-3.5 px-3 text-center",children:u.jsx("span",{className:"bg-slate-100 text-slate-600 px-2 py-0.5 rounded text-[10px] font-bold border border-slate-200",children:c.role})}),u.jsx("td",{className:"py-3.5 px-3 text-center font-bold text-slate-700",children:c.createdCalls||0}),u.jsx("td",{className:"py-3.5 px-3 text-center font-bold text-slate-700",children:c.createdCases||0}),u.jsx("td",{className:"py-3.5 px-3 text-center font-bold text-slate-700",children:c.assignedCases||0}),u.jsx("td",{className:"py-3.5 px-3 text-center",children:u.jsxs("span",{className:"bg-emerald-50 text-emerald-700 font-black px-2 py-0.5 rounded text-xs",children:[c.resolvedCases||0," เคสสำเร็จ"]})})]},c.id))})]})})]})]}),Ie==="dashboard"&&u.jsxs("div",{className:"space-y-6 animate-fadeIn",children:[u.jsxs("div",{className:"grid grid-cols-2 lg:grid-cols-4 gap-4",children:[u.jsxs("div",{className:"bg-gradient-to-br from-indigo-600 to-indigo-700 text-white p-4 rounded-2xl shadow-md shadow-indigo-200 border border-indigo-500/10",children:[u.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-indigo-100",children:"สายรับแรกรับเวรปัจจุบัน"}),u.jsxs("div",{className:"text-2xl font-black mt-1.5",children:[_.filter(c=>c.date===new Date().toISOString().split("T")[0]).length," สาย"]})]}),u.jsxs("div",{className:"bg-white p-4 rounded-2xl shadow-sm border border-slate-100",children:[u.jsx("div",{className:"text-xs text-slate-400 font-bold",children:"เคสกู้ภัยที่กำลังออก ว.4"}),u.jsxs("div",{className:"text-2xl font-black text-slate-800 mt-1",children:[H.filter(c=>c.status==="ปรับปรุงข้อมูลแล้ว").length," เคส"]})]}),u.jsxs("div",{className:"bg-white p-4 rounded-2xl shadow-sm border border-slate-100",children:[u.jsx("div",{className:"text-xs text-slate-400 font-bold font-sans",children:"เคสตกหล่นค้างข้อมูล"}),u.jsxs("div",{className:"text-2xl font-black text-rose-600 mt-1",children:[H.filter(c=>c.status==="ค้างปรับปรุงข้อมูล").length," เคสค้าง"]})]}),u.jsxs("div",{className:"bg-white p-4 rounded-2xl shadow-sm border border-slate-100",children:[u.jsx("div",{className:"text-xs text-slate-400 font-bold",children:"หน่วยในข่ายไม่พร้อมทำงาน"}),u.jsxs("div",{className:"text-2xl font-black text-amber-600 mt-1",children:[ne.filter(c=>c.status==="ไม่พร้อมปฏิบัติการ").length," สถานี"]})]})]}),u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[u.jsxs("div",{className:"lg:col-span-2 bg-white rounded-2xl shadow-sm border border-slate-100 p-5 space-y-4",children:[u.jsxs("div",{className:"border-b border-slate-50 pb-2 flex items-center justify-between",children:[u.jsx("h4",{className:"font-bold text-slate-800 text-sm",children:"ขบวนกู้ชีพกำลังออกปฏิบัติงานหลัก"}),u.jsx("span",{className:"text-[10px] bg-indigo-100 text-indigo-800 px-2 py-0.5 rounded-full border border-indigo-200 font-bold",children:"Realtime"})]}),u.jsx("div",{className:"space-y-3",children:H.filter(c=>c.status!=="ปิดเคส").length===0?u.jsx("div",{className:"text-center py-10 text-slate-400 text-xs font-semibold",children:"💚 ขณะนี้ไม่มีเคสค้างออกปฏิบัติการนอกพื้นที่ ทุกสถานีปิดรอบงานเรียบร้อย"}):H.filter(c=>c.status!=="ปิดเคส").map(c=>u.jsxs("div",{className:"p-3 bg-slate-50/50 rounded-xl border border-slate-100 flex items-center justify-between gap-4 text-xs font-semibold",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsxs("div",{className:"font-extrabold text-slate-900",children:[c.id," (",c.type,")"]}),u.jsxs("p",{className:"text-[10px] text-slate-500 font-medium",children:["หน่วย: ",c.unitName," | อาการ: ",c.diagnosis.substring(0,50),"..."]})]}),u.jsx("span",{className:"bg-amber-100 text-amber-800 text-[10px] font-black px-2.5 py-1 rounded border border-amber-200",children:c.status})]},c.id))})]}),u.jsxs("div",{className:"bg-white rounded-2xl shadow-sm border border-slate-100 p-5 space-y-4",children:[u.jsx("div",{className:"border-b border-slate-50 pb-2",children:u.jsx("h4",{className:"font-bold text-slate-800 text-sm",children:"เคสตกค้างค้างกรอกข้อมูล (ค้างกับใคร)"})}),u.jsx("div",{className:"space-y-3",children:H.filter(c=>c.status==="ค้างปรับปรุงข้อมูล").length===0?u.jsx("div",{className:"text-center py-10 text-slate-400 text-xs font-medium",children:"🎉 สัญญาณดีมาก! ไม่มีประวัติเคสฉุกเฉินค้างปรับปรุงข้อมูลในรอบเวรนี้"}):H.filter(c=>c.status==="ค้างปรับปรุงข้อมูล").map(c=>u.jsxs("div",{className:"p-3 bg-rose-50/20 rounded-xl border border-rose-100 text-xs font-bold space-y-1.5",children:[u.jsxs("div",{className:"flex justify-between items-center text-slate-900",children:[u.jsxs("span",{children:["เลข: ",c.id]}),u.jsx("span",{className:"text-[10px] text-rose-600 font-mono",children:"ค้าง: 1 ชม. 15 นาที"})]}),u.jsxs("div",{className:"text-[10px] text-slate-500 font-medium",children:["ผู้รับผิดชอบหลัก: ",j.find(N=>N.username===c.responsibleDispatcher)?.fullName.split(" ")[0]||c.responsibleDispatcher]})]},c.id))})]})]})]}),Ie==="ambulance-check"&&u.jsx("div",{className:"space-y-6 animate-fadeIn",children:u.jsx(T.Suspense,{fallback:u.jsx(Ic,{}),children:u.jsx(wh,{currentUser:K,onSaveCheckSession:Ba,checkSessions:I,tickets:ve,onUpdateTicketStatus:Ku})})}),Ie==="admin"&&u.jsx("div",{className:"space-y-6 animate-fadeIn",children:u.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-6",children:[u.jsxs("div",{className:"bg-white rounded-2xl p-5 md:p-6 shadow-sm border border-slate-100 space-y-6",children:[u.jsxs("div",{className:"border-b border-slate-100 pb-3",children:[u.jsx("h3",{className:"text-base font-black text-slate-800",children:"จัดการข้อมูลผู้ใช้งานระบบ (User Management)"}),u.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:"เพิ่ม ลบ บัญชีผู้ใช้ เปลี่ยนสิทธิ์ และ PIN ปลดล็อคระบบ"})]}),u.jsxs("form",{onSubmit:Nn,className:"space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"Username (ลงชื่อเข้าใช้งาน)"}),u.jsx("input",{type:"text",required:!0,placeholder:"เช่น dispatcher_test",value:J?J.username:G.username,onChange:c=>J?$e({...J,username:c.target.value}):$t({...G,username:c.target.value}),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 outline-none"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"ชื่อ-นามสกุลทางการแพทย์"}),u.jsx("input",{type:"text",required:!0,placeholder:"เช่น นายกู้ชีพ มีสุข",value:J?J.fullName:G.fullName,onChange:c=>J?$e({...J,fullName:c.target.value}):$t({...G,fullName:c.target.value}),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 outline-none"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"สิทธิ์/บทบาทการทำงาน (Role)"}),u.jsxs("select",{value:J?J.role:G.role,onChange:c=>J?$e({...J,role:c.target.value}):$t({...G,role:c.target.value}),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 bg-white",children:[u.jsx("option",{value:"Admin",children:"Admin"}),u.jsx("option",{value:"Supervisor",children:"Supervisor"}),u.jsx("option",{value:"Dispatcher",children:"Dispatcher"}),u.jsx("option",{value:"Executive",children:"Executive"}),u.jsx("option",{value:"ER Koh Samui",children:"ER Koh Samui"}),u.jsx("option",{value:"Quality Officer",children:"Quality Officer"}),u.jsx("option",{value:"Driver",children:"Driver"}),u.jsx("option",{value:"EMS",children:"EMS"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"รหัส PIN 4 หลัก (สำหรับความปลอดภัย)"}),u.jsx("input",{type:"password",maxLength:4,required:!0,placeholder:"เช่น 1234",value:J?J.pin:G.pin,onChange:c=>J?$e({...J,pin:c.target.value}):$t({...G,pin:c.target.value}),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 font-mono text-center tracking-widest outline-none"})]}),u.jsxs("div",{className:"col-span-2 flex items-center gap-4 py-1",children:[u.jsxs("label",{className:"flex items-center gap-1.5 text-xs font-bold text-slate-600",children:[u.jsx("input",{type:"checkbox",checked:J?J.mustChangePin:G.mustChangePin,onChange:c=>J?$e({...J,mustChangePin:c.target.checked}):$t({...G,mustChangePin:c.target.checked}),className:"w-4 h-4 text-blue-600 border-slate-200 rounded"}),"บังคับให้เปลี่ยน PIN เมื่อเข้าสู่ระบบครั้งแรก"]}),u.jsxs("label",{className:"flex items-center gap-1.5 text-xs font-bold text-slate-600",children:[u.jsx("input",{type:"checkbox",checked:J?J.isActive:G.isActive,onChange:c=>J?$e({...J,isActive:c.target.checked}):$t({...G,isActive:c.target.checked}),className:"w-4 h-4 text-blue-600 border-slate-200 rounded"}),"เปิดใช้งานบัญชีนี้ (Active)"]})]})]}),u.jsxs("div",{className:"flex gap-2",children:[J&&u.jsx("button",{type:"button",onClick:()=>$e(null),className:"flex-1 py-2 bg-slate-100 hover:bg-slate-200 text-slate-600 text-xs font-bold rounded-xl transition-all cursor-pointer",children:"ยกเลิกแก้ไข"}),u.jsx("button",{type:"submit",className:"flex-1 py-2.5 bg-blue-600 hover:bg-blue-700 text-white font-bold text-xs rounded-xl shadow-md transition-all cursor-pointer",children:J?"บันทึกการปรับปรุงผู้ใช้":"เพิ่มและจัดสร้างผู้ใช้ใหม่"})]})]}),u.jsx("div",{className:"overflow-x-auto border border-slate-100 rounded-xl",children:u.jsxs("table",{className:"w-full text-left border-collapse text-xs",children:[u.jsx("thead",{children:u.jsxs("tr",{className:"bg-slate-50 text-slate-600 font-bold border-b border-slate-100",children:[u.jsx("th",{className:"py-2.5 px-3",children:"บัญชี / ชื่อผู้ใช้"}),u.jsx("th",{className:"py-2.5 px-3",children:"บทบาท (Role)"}),u.jsx("th",{className:"py-2.5 px-3 text-center",children:"สถานะ"}),u.jsx("th",{className:"py-2.5 px-3 text-center",children:"แก้ไข"})]})}),u.jsx("tbody",{className:"divide-y divide-slate-50 font-semibold text-slate-700",children:j.map(c=>u.jsxs("tr",{className:"hover:bg-slate-50/50",children:[u.jsxs("td",{className:"py-2 px-3",children:[u.jsx("div",{className:"font-bold text-slate-800",children:c.fullName}),u.jsxs("div",{className:"text-[10px] text-slate-400 font-mono",children:["@",c.username]})]}),u.jsx("td",{className:"py-2 px-3",children:u.jsx("span",{className:"bg-slate-100 px-2 py-0.5 rounded text-[10px]",children:c.role})}),u.jsx("td",{className:"py-2 px-3 text-center",children:u.jsx("span",{className:`px-2 py-0.5 rounded-[5px] text-[9px] font-black
|
|
${c.isActive?"bg-emerald-50 text-emerald-700 border border-emerald-200":"bg-rose-50 text-rose-700 border border-rose-200"}
|
|
`,children:c.isActive?"Active":"Inactive"})}),u.jsx("td",{className:"py-2 px-3 text-center",children:u.jsxs("div",{className:"flex gap-1.5 justify-center",children:[u.jsx("button",{onClick:()=>$e(c),className:"p-1 hover:bg-blue-50 text-slate-400 hover:text-blue-600 rounded cursor-pointer",children:u.jsx(Jc,{className:"w-3.5 h-3.5"})}),u.jsx("button",{onClick:()=>_l(c.id),disabled:c.id==="1"||c.id===K.id,className:"p-1 hover:bg-rose-50 text-slate-300 hover:text-rose-600 rounded disabled:opacity-30 cursor-pointer",children:u.jsx(Ho,{className:"w-3.5 h-3.5"})})]})})]},c.id))})]})})]}),u.jsxs("div",{className:"bg-white rounded-2xl p-5 md:p-6 shadow-sm border border-slate-100 space-y-6",children:[u.jsxs("div",{className:"border-b border-slate-100 pb-3",children:[u.jsx("h3",{className:"text-base font-black text-slate-800",children:"จัดการหน่วยกู้ชีพและระดับกู้ภัย (Ambulance Fleet)"}),u.jsx("p",{className:"text-xs text-slate-400 mt-0.5",children:"เพิ่ม ปรับลำดับการทำงาน และระบุหน่วยรับส่งประจำเกาะสมุย"})]}),u.jsxs("form",{onSubmit:Ti,className:"space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[u.jsxs("div",{className:"col-span-2",children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"ชื่อสถานี / หน่วยกู้ชีพร่วมเครือข่าย"}),u.jsx("input",{type:"text",required:!0,placeholder:"เช่น หน่วยกู้ชีพตลิ่งงาม",value:ie?ie.name:ye.name,onChange:c=>ie?We({...ie,name:c.target.value}):Dl({...ye,name:c.target.value}),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 outline-none"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"ระดับหน่วย (Level)"}),u.jsxs("select",{value:ie?ie.level:ye.level,onChange:c=>ie?We({...ie,level:c.target.value}):Dl({...ye,level:c.target.value}),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 bg-white",children:[u.jsx("option",{value:"ALS",children:"ALS (วิชาชีพขั้นสูง)"}),u.jsx("option",{value:"BLS",children:"BLS (รถพยาบาลมาตรฐาน)"}),u.jsx("option",{value:"CLS",children:"CLS (หน่วยกู้ภัยพื้นฐาน)"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"จัดลำดับการทำงาน (Sort Order)"}),u.jsx("input",{type:"number",placeholder:"ลำดับการออกขบวน",value:ie?ie.sortOrder:ye.sortOrder,onChange:c=>ie?We({...ie,sortOrder:Number(c.target.value)}):Dl({...ye,sortOrder:Number(c.target.value)}),className:"w-full py-2 px-3 border border-slate-200 rounded-lg text-xs font-bold text-slate-700 outline-none"})]}),u.jsxs("div",{className:"col-span-2 flex items-center gap-4 py-1",children:[u.jsxs("label",{className:"flex items-center gap-1.5 text-xs font-bold text-slate-600",children:[u.jsx("input",{type:"checkbox",checked:ie?ie.isSamuiHospital:ye.isSamuiHospital,onChange:c=>ie?We({...ie,isSamuiHospital:c.target.checked}):Dl({...ye,isSamuiHospital:c.target.checked}),className:"w-4 h-4 text-blue-600 border-slate-200 rounded"}),"ระบุเป็นหน่วยโรงพยาบาลเกาะสมุย (ER สมุยหลัก)"]}),u.jsxs("label",{className:"flex items-center gap-1.5 text-xs font-bold text-slate-600",children:[u.jsx("input",{type:"checkbox",checked:ie?ie.isActive:ye.isActive,onChange:c=>ie?We({...ie,isActive:c.target.checked}):Dl({...ye,isActive:c.target.checked}),className:"w-4 h-4 text-blue-600 border-slate-200 rounded"}),"เปิดใช้งานขบวนนี้ (Active)"]})]})]}),u.jsxs("div",{className:"flex gap-2",children:[ie&&u.jsx("button",{type:"button",onClick:()=>We(null),className:"flex-1 py-2 bg-slate-100 hover:bg-slate-200 text-slate-600 text-xs font-bold rounded-xl transition-all cursor-pointer",children:"ยกเลิกแก้ไข"}),u.jsx("button",{type:"submit",className:"flex-1 py-2.5 bg-blue-600 hover:bg-blue-700 text-white font-bold text-xs rounded-xl shadow-md transition-all cursor-pointer",children:ie?"บันทึกการปรับปรุงหน่วยงาน":"เพิ่มหน่วยกู้ภัยเครือข่ายใหม่"})]})]}),u.jsx("div",{className:"overflow-x-auto border border-slate-100 rounded-xl max-h-[220px]",children:u.jsxs("table",{className:"w-full text-left border-collapse text-xs",children:[u.jsx("thead",{children:u.jsxs("tr",{className:"bg-slate-50 text-slate-600 font-bold border-b border-slate-100",children:[u.jsx("th",{className:"py-2.5 px-3",children:"ชื่อหน่วยกู้ภัยเครือข่าย"}),u.jsx("th",{className:"py-2.5 px-3",children:"ระดับ"}),u.jsx("th",{className:"py-2.5 px-3 text-center",children:"สิทธิ์ รพ.สมุย"}),u.jsx("th",{className:"py-2.5 px-3 text-center",children:"แก้ไข"})]})}),u.jsx("tbody",{className:"divide-y divide-slate-50 font-semibold text-slate-700",children:B.map(c=>u.jsxs("tr",{className:"hover:bg-slate-50/50",children:[u.jsxs("td",{className:"py-2 px-3",children:[u.jsx("div",{className:"font-bold text-slate-800",children:c.name}),u.jsxs("div",{className:"text-[10px] text-slate-400 font-mono",children:["ลำดับ: ",c.sortOrder]})]}),u.jsx("td",{className:"py-2 px-3",children:u.jsx("span",{className:`px-1.5 py-0.5 rounded text-[10px] font-bold border
|
|
${c.level==="ALS"?"bg-red-50 text-red-700 border-red-100":""}
|
|
${c.level==="BLS"?"bg-blue-50 text-blue-700 border-blue-100":""}
|
|
${c.level==="CLS"?"bg-indigo-50 text-indigo-700 border-indigo-100":""}
|
|
`,children:c.level})}),u.jsx("td",{className:"py-2 px-3 text-center",children:c.isSamuiHospital?"🟢 ใช่":"❌ ไม่"}),u.jsx("td",{className:"py-2 px-3 text-center",children:u.jsx("button",{type:"button",onClick:()=>We(c),className:"p-1 hover:bg-blue-50 text-slate-400 hover:text-blue-600 rounded cursor-pointer",children:u.jsx(Jc,{className:"w-3.5 h-3.5"})})})]},c.id))})]})})]})]})})]})]}):u.jsx("div",{className:"flex-1 flex items-center justify-center p-4 md:p-8 bg-gradient-to-br from-slate-900 via-blue-950 to-slate-950 min-h-[calc(100vh-70px)]",children:u.jsxs("div",{className:"w-full max-w-md bg-white rounded-3xl shadow-2xl overflow-hidden border border-slate-100 p-6 md:p-8 space-y-6",children:[u.jsxs("div",{className:"text-center space-y-2",children:[u.jsx("div",{className:"mx-auto w-14 h-14 bg-blue-600 rounded-2xl text-white shadow-xl shadow-blue-500/20 flex items-center justify-center",children:u.jsx(Bo,{className:"w-8 h-8"})}),u.jsx("h2",{className:"text-xl md:text-2xl font-black text-slate-900 tracking-tight",children:"ระบบบริหารจัดการ นเรนทรอ่าวไทย"}),u.jsx("p",{className:"text-xs text-slate-400 font-bold",children:"กรุณาเข้าสู่ระบบด้วยรหัส PIN 4 หลักเพื่อเริ่มต้นปฏิบัติงาน"})]}),at?u.jsxs("form",{onSubmit:qa,className:"space-y-4",children:[u.jsx("div",{className:"bg-amber-50 border border-amber-100 p-3 rounded-xl text-amber-800 text-xs font-semibold leading-relaxed",children:"⚠️ บัญชีนี้ถูกเปิดใช้งานครั้งแรก คุณจำเป็นต้องเปลี่ยนรหัสผ่าน PIN 4 หลักใหม่เพื่อความปลอดภัยของระบบกู้ชีพ"}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1.5 uppercase tracking-wider",children:"รหัส PIN ใหม่ (ตัวเลข 4 หลัก)"}),u.jsx("input",{type:"password",maxLength:4,required:!0,placeholder:"ป้อนรหัส 4 หลัก",value:Rt,onChange:c=>jt(c.target.value),className:"w-full py-2.5 px-3.5 border border-slate-200 focus:border-indigo-500 rounded-xl text-center text-lg font-mono tracking-widest text-slate-800 outline-none transition-all"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1.5 uppercase tracking-wider",children:"ยืนยันรหัส PIN ใหม่"}),u.jsx("input",{type:"password",maxLength:4,required:!0,placeholder:"ยืนยันรหัส 4 หลัก",value:p,onChange:c=>A(c.target.value),className:"w-full py-2.5 px-3.5 border border-slate-200 focus:border-indigo-500 rounded-xl text-center text-lg font-mono tracking-widest text-slate-800 outline-none transition-all"})]}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("button",{type:"button",onClick:()=>Sl(!1),className:"flex-1 py-2.5 bg-slate-100 hover:bg-slate-200 text-slate-600 text-xs font-bold rounded-xl transition-all cursor-pointer",children:"ยกเลิก"}),u.jsx("button",{type:"submit",className:"flex-1 py-2.5 bg-indigo-600 hover:bg-indigo-700 text-white text-xs font-bold rounded-xl transition-all cursor-pointer border border-indigo-500/20",children:"เปลี่ยนและเข้าสู่ระบบ"})]})]}):u.jsxs("form",{onSubmit:Zu,className:"space-y-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1.5 uppercase tracking-wider",children:"บัญชีผู้ใช้งาน"}),u.jsx("input",{type:"text",required:!0,placeholder:"เช่น admin, dispatcher1",value:Pe,onChange:c=>Bt(c.target.value),className:"w-full py-2.5 px-3.5 border border-slate-200 focus:border-indigo-500 rounded-xl text-sm font-bold text-slate-800 outline-none transition-all"})]}),u.jsxs("div",{children:[u.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1.5 uppercase tracking-wider",children:"ป้อน PIN 4 หลัก"}),u.jsx("input",{type:"password",maxLength:4,required:!0,placeholder:"••••",value:ea,onChange:c=>Ht(c.target.value),className:"w-full py-2.5 px-3.5 border border-slate-200 focus:border-indigo-500 rounded-xl text-center text-lg font-mono tracking-widest text-slate-800 outline-none transition-all"})]}),mt&&u.jsxs("div",{className:"p-3 bg-rose-50 border border-rose-100 text-rose-600 rounded-xl text-xs font-bold flex items-center gap-2",children:[u.jsx(hh,{className:"w-4 h-4 shrink-0"}),u.jsx("span",{children:mt})]}),u.jsx("button",{type:"submit",className:"w-full py-3 bg-indigo-600 hover:bg-indigo-700 text-white font-extrabold text-sm rounded-xl shadow-lg shadow-indigo-500/20 transition-all active:scale-95 cursor-pointer border border-indigo-500/20",id:"btn-login",children:"เข้าสู่ระบบปฏิบัติงาน"})]}),u.jsxs("div",{className:"border-t border-slate-100 pt-4 text-center",children:[u.jsx("span",{className:"text-[10px] text-slate-400 font-extrabold uppercase tracking-wider block mb-2",children:"บัญชีทดสอบระบบตามความต้องการ"}),u.jsx("div",{className:"flex flex-wrap gap-1.5 justify-center",children:[{user:"admin",label:"Admin",color:"bg-red-50 text-red-700 hover:bg-red-100 border-red-200"},{user:"dispatcher1",label:"Dispatcher",color:"bg-indigo-50 text-indigo-700 hover:bg-indigo-100 border-indigo-200"},{user:"samui_er",label:"รพ.เกาะสมุย",color:"bg-pink-50 text-pink-700 hover:bg-pink-100 border-pink-200"},{user:"driver1",label:"พขร. ตรวจรถ",color:"bg-amber-50 text-amber-700 hover:bg-amber-100 border-amber-200"}].map(c=>u.jsx("button",{onClick:()=>{Bt(c.user),Ht("1234")},className:`px-2.5 py-1 text-[10px] font-bold rounded-lg border transition-all cursor-pointer ${c.color}`,children:c.label},c.user))})]})]})})]})}zh.createRoot(document.getElementById("root")).render(u.jsx(T.StrictMode,{children:u.jsx(Gh,{})}));export{Vh as C,Dh as I,Zh as R,u as j};
|