tempest.games 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/app/assets/{index-b27dZE1I.js → index-D7TvFs3R.js} +1 -1
- package/app/index.html +1 -1
- package/bin/backend.bun.js +2 -2
- package/bin/backend.worker.tribunal.bun.js +38 -0
- package/bin/frontend.bun.js +1 -1
- package/bin/setup-db.bun.js +3196 -9
- package/drizzle/0000_fine_hardball.sql +33 -0
- package/drizzle/0001_public_greymalkin.sql +101 -0
- package/drizzle/0002_loud_stature.sql +33 -0
- package/drizzle/0003_lyrical_malice.sql +2 -0
- package/drizzle/0004_funny_tana_nile.sql +1 -0
- package/drizzle/0005_reflective_warstar.sql +1 -0
- package/drizzle/0006_mushy_young_avengers.sql +2 -0
- package/drizzle/0007_charming_strong_guy.sql +8 -0
- package/drizzle/meta/0000_snapshot.json +168 -0
- package/drizzle/meta/0001_snapshot.json +471 -0
- package/drizzle/meta/0002_snapshot.json +471 -0
- package/drizzle/meta/0003_snapshot.json +471 -0
- package/drizzle/meta/0004_snapshot.json +465 -0
- package/drizzle/meta/0005_snapshot.json +465 -0
- package/drizzle/meta/0006_snapshot.json +465 -0
- package/drizzle/meta/0007_snapshot.json +465 -0
- package/drizzle/meta/_journal.json +62 -0
- package/package.json +12 -9
- package/__scripts__/destroy-db.bun.ts +0 -29
- package/__scripts__/setup-db.bun.ts +0 -57
- package/__scripts__/setup.vitest.ts +0 -5
|
@@ -43,4 +43,4 @@ ${a.trace}`:"No previous disposal trace was found.");return}switch(n.type){case"
|
|
|
43
43
|
`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Fo=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Hr(e):""}function my(e){switch(e.tag){case 5:return Hr(e.type);case 16:return Hr("Lazy");case 13:return Hr("Suspense");case 19:return Hr("SuspenseList");case 0:case 2:case 15:return e=Vo(e.type,!1),e;case 11:return e=Vo(e.type.render,!1),e;case 1:return e=Vo(e.type,!0),e;default:return""}}function Na(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case er:return"Fragment";case Xn:return"Portal";case Ta:return"Profiler";case Gl:return"StrictMode";case Ra:return"Suspense";case Oa:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Gf:return(e.displayName||"Context")+".Consumer";case Yf:return(e._context.displayName||"Context")+".Provider";case Xl:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case eu:return t=e.displayName||null,t!==null?t:Na(e.type)||"Memo";case Qt:t=e._payload,e=e._init;try{return Na(e(t))}catch{}}return null}function yy(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Na(t);case 8:return t===Gl?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function hn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ed(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gy(e){var t=ed(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ti(e){e._valueTracker||(e._valueTracker=gy(e))}function td(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=ed(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Li(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}}function ba(e,t){var n=t.checked;return ce({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function oc(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=hn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function nd(e,t){t=t.checked,t!=null&&Yl(e,"checked",t,!1)}function Aa(e,t){nd(e,t);var n=hn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ia(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ia(e,t.type,hn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function ac(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ia(e,t,n){(t!=="number"||Li(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Jr=Array.isArray;function dr(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+hn(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function Ma(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(x(91));return ce({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function lc(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(x(92));if(Jr(n)){if(1<n.length)throw Error(x(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:hn(n)}}function rd(e,t){var n=hn(t.value),r=hn(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function uc(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function sd(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function Pa(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?sd(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ni,id=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ni=ni||document.createElement("div"),ni.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ni.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ds(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var es={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},vy=["Webkit","ms","Moz","O"];Object.keys(es).forEach(function(e){vy.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),es[t]=es[e]})});function od(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||es.hasOwnProperty(e)&&es[e]?(""+t).trim():t+"px"}function ad(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=od(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var _y=ce({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ja(e,t){if(t){if(_y[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(x(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(x(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(x(61))}if(t.style!=null&&typeof t.style!="object")throw Error(x(62))}}function $a(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 La=null;function tu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var za=null,hr=null,pr=null;function cc(e){if(e=Ws(e)){if(typeof za!="function")throw Error(x(280));var t=e.stateNode;t&&(t=xo(t),za(e.stateNode,e.type,t))}}function ld(e){hr?pr?pr.push(e):pr=[e]:hr=e}function ud(){if(hr){var e=hr,t=pr;if(pr=hr=null,cc(e),t)for(e=0;e<t.length;e++)cc(t[e])}}function cd(e,t){return e(t)}function fd(){}var Ko=!1;function dd(e,t,n){if(Ko)return e(t,n);Ko=!0;try{return cd(e,t,n)}finally{Ko=!1,(hr!==null||pr!==null)&&(fd(),ud())}}function hs(e,t){var n=e.stateNode;if(n===null)return null;var r=xo(n);if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(x(231,t,typeof n));return n}var Da=!1;if(Bt)try{var Dr={};Object.defineProperty(Dr,"passive",{get:function(){Da=!0}}),window.addEventListener("test",Dr,Dr),window.removeEventListener("test",Dr,Dr)}catch{Da=!1}function wy(e,t,n,r,s,i,o,a,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var ts=!1,zi=null,Di=!1,Ua=null,ky={onError:function(e){ts=!0,zi=e}};function Sy(e,t,n,r,s,i,o,a,l){ts=!1,zi=null,wy.apply(ky,arguments)}function xy(e,t,n,r,s,i,o,a,l){if(Sy.apply(this,arguments),ts){if(ts){var u=zi;ts=!1,zi=null}else throw Error(x(198));Di||(Di=!0,Ua=u)}}function Hn(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function hd(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 fc(e){if(Hn(e)!==e)throw Error(x(188))}function Ey(e){var t=e.alternate;if(!t){if(t=Hn(e),t===null)throw Error(x(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return fc(s),e;if(i===r)return fc(s),t;i=i.sibling}throw Error(x(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(x(189))}}if(n.alternate!==r)throw Error(x(190))}if(n.tag!==3)throw Error(x(188));return n.stateNode.current===n?e:t}function pd(e){return e=Ey(e),e!==null?md(e):null}function md(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=md(e);if(t!==null)return t;e=e.sibling}return null}var yd=Ge.unstable_scheduleCallback,dc=Ge.unstable_cancelCallback,Cy=Ge.unstable_shouldYield,Ty=Ge.unstable_requestPaint,he=Ge.unstable_now,Ry=Ge.unstable_getCurrentPriorityLevel,nu=Ge.unstable_ImmediatePriority,gd=Ge.unstable_UserBlockingPriority,Ui=Ge.unstable_NormalPriority,Oy=Ge.unstable_LowPriority,vd=Ge.unstable_IdlePriority,_o=null,Rt=null;function Ny(e){if(Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(_o,e,void 0,(e.current.flags&128)===128)}catch{}}var yt=Math.clz32?Math.clz32:Iy,by=Math.log,Ay=Math.LN2;function Iy(e){return e>>>=0,e===0?32:31-(by(e)/Ay|0)|0}var ri=64,si=4194304;function Qr(e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Bi(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=Qr(a):(i&=o,i!==0&&(r=Qr(i)))}else o=n&~s,o!==0?r=Qr(o):i!==0&&(r=Qr(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-yt(t),s=1<<n,r|=e[n],t&=~s;return r}function My(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64: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:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Py(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-yt(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=My(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function Ba(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function _d(){var e=ri;return ri<<=1,!(ri&4194240)&&(ri=64),e}function Zo(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ks(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-yt(t),e[t]=n}function jy(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-yt(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function ru(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-yt(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var Y=0;function wd(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var kd,su,Sd,xd,Ed,Fa=!1,ii=[],nn=null,rn=null,sn=null,ps=new Map,ms=new Map,Yt=[],$y="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 submit".split(" ");function hc(e,t){switch(e){case"focusin":case"focusout":nn=null;break;case"dragenter":case"dragleave":rn=null;break;case"mouseover":case"mouseout":sn=null;break;case"pointerover":case"pointerout":ps.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ms.delete(t.pointerId)}}function Ur(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=Ws(t),t!==null&&su(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function Ly(e,t,n,r,s){switch(t){case"focusin":return nn=Ur(nn,e,t,n,r,s),!0;case"dragenter":return rn=Ur(rn,e,t,n,r,s),!0;case"mouseover":return sn=Ur(sn,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return ps.set(i,Ur(ps.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,ms.set(i,Ur(ms.get(i)||null,e,t,n,r,s)),!0}return!1}function Cd(e){var t=On(e.target);if(t!==null){var n=Hn(t);if(n!==null){if(t=n.tag,t===13){if(t=hd(n),t!==null){e.blockedOn=t,Ed(e.priority,function(){Sd(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function wi(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Va(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);La=r,n.target.dispatchEvent(r),La=null}else return t=Ws(n),t!==null&&su(t),e.blockedOn=n,!1;t.shift()}return!0}function pc(e,t,n){wi(e)&&n.delete(t)}function zy(){Fa=!1,nn!==null&&wi(nn)&&(nn=null),rn!==null&&wi(rn)&&(rn=null),sn!==null&&wi(sn)&&(sn=null),ps.forEach(pc),ms.forEach(pc)}function Br(e,t){e.blockedOn===t&&(e.blockedOn=null,Fa||(Fa=!0,Ge.unstable_scheduleCallback(Ge.unstable_NormalPriority,zy)))}function ys(e){function t(s){return Br(s,e)}if(0<ii.length){Br(ii[0],e);for(var n=1;n<ii.length;n++){var r=ii[n];r.blockedOn===e&&(r.blockedOn=null)}}for(nn!==null&&Br(nn,e),rn!==null&&Br(rn,e),sn!==null&&Br(sn,e),ps.forEach(t),ms.forEach(t),n=0;n<Yt.length;n++)r=Yt[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Yt.length&&(n=Yt[0],n.blockedOn===null);)Cd(n),n.blockedOn===null&&Yt.shift()}var mr=Ht.ReactCurrentBatchConfig,Fi=!0;function Dy(e,t,n,r){var s=Y,i=mr.transition;mr.transition=null;try{Y=1,iu(e,t,n,r)}finally{Y=s,mr.transition=i}}function Uy(e,t,n,r){var s=Y,i=mr.transition;mr.transition=null;try{Y=4,iu(e,t,n,r)}finally{Y=s,mr.transition=i}}function iu(e,t,n,r){if(Fi){var s=Va(e,t,n,r);if(s===null)ta(e,t,r,Vi,n),hc(e,r);else if(Ly(s,e,t,n,r))r.stopPropagation();else if(hc(e,r),t&4&&-1<$y.indexOf(e)){for(;s!==null;){var i=Ws(s);if(i!==null&&kd(i),i=Va(e,t,n,r),i===null&&ta(e,t,r,Vi,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else ta(e,t,r,null,n)}}var Vi=null;function Va(e,t,n,r){if(Vi=null,e=tu(r),e=On(e),e!==null)if(t=Hn(e),t===null)e=null;else if(n=t.tag,n===13){if(e=hd(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Vi=e,null}function Td(e){switch(e){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ry()){case nu:return 1;case gd:return 4;case Ui:case Oy:return 16;case vd:return 536870912;default:return 16}default:return 16}}var en=null,ou=null,ki=null;function Rd(){if(ki)return ki;var e,t=ou,n=t.length,r,s="value"in en?en.value:en.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return ki=s.slice(e,1<r?1-r:void 0)}function Si(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 oi(){return!0}function mc(){return!1}function tt(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?oi:mc,this.isPropagationStopped=mc,this}return ce(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=oi)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=oi)},persist:function(){},isPersistent:oi}),t}var jr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},au=tt(jr),Zs=ce({},jr,{view:0,detail:0}),By=tt(Zs),Wo,Ho,Fr,wo=ce({},Zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lu,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!==Fr&&(Fr&&e.type==="mousemove"?(Wo=e.screenX-Fr.screenX,Ho=e.screenY-Fr.screenY):Ho=Wo=0,Fr=e),Wo)},movementY:function(e){return"movementY"in e?e.movementY:Ho}}),yc=tt(wo),Fy=ce({},wo,{dataTransfer:0}),Vy=tt(Fy),Ky=ce({},Zs,{relatedTarget:0}),Jo=tt(Ky),Zy=ce({},jr,{animationName:0,elapsedTime:0,pseudoElement:0}),Wy=tt(Zy),Hy=ce({},jr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Jy=tt(Hy),Qy=ce({},jr,{data:0}),gc=tt(Qy),qy={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Yy={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"},Gy={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Xy(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Gy[e])?!!t[e]:!1}function lu(){return Xy}var eg=ce({},Zs,{key:function(e){if(e.key){var t=qy[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Si(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Yy[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lu,charCode:function(e){return e.type==="keypress"?Si(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Si(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),tg=tt(eg),ng=ce({},wo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),vc=tt(ng),rg=ce({},Zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lu}),sg=tt(rg),ig=ce({},jr,{propertyName:0,elapsedTime:0,pseudoElement:0}),og=tt(ig),ag=ce({},wo,{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}),lg=tt(ag),ug=[9,13,27,32],uu=Bt&&"CompositionEvent"in window,ns=null;Bt&&"documentMode"in document&&(ns=document.documentMode);var cg=Bt&&"TextEvent"in window&&!ns,Od=Bt&&(!uu||ns&&8<ns&&11>=ns),_c=" ",wc=!1;function Nd(e,t){switch(e){case"keyup":return ug.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function bd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var tr=!1;function fg(e,t){switch(e){case"compositionend":return bd(t);case"keypress":return t.which!==32?null:(wc=!0,_c);case"textInput":return e=t.data,e===_c&&wc?null:e;default:return null}}function dg(e,t){if(tr)return e==="compositionend"||!uu&&Nd(e,t)?(e=Rd(),ki=ou=en=null,tr=!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 Od&&t.locale!=="ko"?null:t.data;default:return null}}var hg={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 kc(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hg[e.type]:t==="textarea"}function Ad(e,t,n,r){ld(r),t=Ki(t,"onChange"),0<t.length&&(n=new au("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var rs=null,gs=null;function pg(e){Fd(e,0)}function ko(e){var t=sr(e);if(td(t))return e}function mg(e,t){if(e==="change")return t}var Id=!1;if(Bt){var Qo;if(Bt){var qo="oninput"in document;if(!qo){var Sc=document.createElement("div");Sc.setAttribute("oninput","return;"),qo=typeof Sc.oninput=="function"}Qo=qo}else Qo=!1;Id=Qo&&(!document.documentMode||9<document.documentMode)}function xc(){rs&&(rs.detachEvent("onpropertychange",Md),gs=rs=null)}function Md(e){if(e.propertyName==="value"&&ko(gs)){var t=[];Ad(t,gs,e,tu(e)),dd(pg,t)}}function yg(e,t,n){e==="focusin"?(xc(),rs=t,gs=n,rs.attachEvent("onpropertychange",Md)):e==="focusout"&&xc()}function gg(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ko(gs)}function vg(e,t){if(e==="click")return ko(t)}function _g(e,t){if(e==="input"||e==="change")return ko(t)}function wg(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var _t=typeof Object.is=="function"?Object.is:wg;function vs(e,t){if(_t(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!Ca.call(t,s)||!_t(e[s],t[s]))return!1}return!0}function Ec(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cc(e,t){var n=Ec(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ec(n)}}function Pd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Pd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function jd(){for(var e=window,t=Li();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Li(e.document)}return t}function cu(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")}function kg(e){var t=jd(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Pd(n.ownerDocument.documentElement,n)){if(r!==null&&cu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=Cc(n,i);var o=Cc(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Sg=Bt&&"documentMode"in document&&11>=document.documentMode,nr=null,Ka=null,ss=null,Za=!1;function Tc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Za||nr==null||nr!==Li(r)||(r=nr,"selectionStart"in r&&cu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ss&&vs(ss,r)||(ss=r,r=Ki(Ka,"onSelect"),0<r.length&&(t=new au("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=nr)))}function ai(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var rr={animationend:ai("Animation","AnimationEnd"),animationiteration:ai("Animation","AnimationIteration"),animationstart:ai("Animation","AnimationStart"),transitionend:ai("Transition","TransitionEnd")},Yo={},$d={};Bt&&($d=document.createElement("div").style,"AnimationEvent"in window||(delete rr.animationend.animation,delete rr.animationiteration.animation,delete rr.animationstart.animation),"TransitionEvent"in window||delete rr.transitionend.transition);function So(e){if(Yo[e])return Yo[e];if(!rr[e])return e;var t=rr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in $d)return Yo[e]=t[n];return e}var Ld=So("animationend"),zd=So("animationiteration"),Dd=So("animationstart"),Ud=So("transitionend"),Bd=new Map,Rc="abort auxClick 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(" ");function wn(e,t){Bd.set(e,t),Wn(t,[e])}for(var Go=0;Go<Rc.length;Go++){var Xo=Rc[Go],xg=Xo.toLowerCase(),Eg=Xo[0].toUpperCase()+Xo.slice(1);wn(xg,"on"+Eg)}wn(Ld,"onAnimationEnd");wn(zd,"onAnimationIteration");wn(Dd,"onAnimationStart");wn("dblclick","onDoubleClick");wn("focusin","onFocus");wn("focusout","onBlur");wn(Ud,"onTransitionEnd");Sr("onMouseEnter",["mouseout","mouseover"]);Sr("onMouseLeave",["mouseout","mouseover"]);Sr("onPointerEnter",["pointerout","pointerover"]);Sr("onPointerLeave",["pointerout","pointerover"]);Wn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Wn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Wn("onBeforeInput",["compositionend","keypress","textInput","paste"]);Wn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Wn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Wn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var qr="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(" "),Cg=new Set("cancel close invalid load scroll toggle".split(" ").concat(qr));function Oc(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,xy(r,t,void 0,e),e.currentTarget=null}function Fd(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,u=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;Oc(s,a,u),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,u=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;Oc(s,a,u),i=l}}}if(Di)throw e=Ua,Di=!1,Ua=null,e}function ee(e,t){var n=t[qa];n===void 0&&(n=t[qa]=new Set);var r=e+"__bubble";n.has(r)||(Vd(t,e,2,!1),n.add(r))}function ea(e,t,n){var r=0;t&&(r|=4),Vd(n,e,r,t)}var li="_reactListening"+Math.random().toString(36).slice(2);function _s(e){if(!e[li]){e[li]=!0,qf.forEach(function(n){n!=="selectionchange"&&(Cg.has(n)||ea(n,!1,e),ea(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[li]||(t[li]=!0,ea("selectionchange",!1,t))}}function Vd(e,t,n,r){switch(Td(t)){case 1:var s=Dy;break;case 4:s=Uy;break;default:s=iu}n=s.bind(null,t,n,e),s=void 0,!Da||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function ta(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=On(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}dd(function(){var u=i,c=tu(n),d=[];e:{var h=Bd.get(e);if(h!==void 0){var y=au,w=e;switch(e){case"keypress":if(Si(n)===0)break e;case"keydown":case"keyup":y=tg;break;case"focusin":w="focus",y=Jo;break;case"focusout":w="blur",y=Jo;break;case"beforeblur":case"afterblur":y=Jo;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":y=yc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":y=Vy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":y=sg;break;case Ld:case zd:case Dd:y=Wy;break;case Ud:y=og;break;case"scroll":y=By;break;case"wheel":y=lg;break;case"copy":case"cut":case"paste":y=Jy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":y=vc}var v=(t&4)!==0,N=!v&&e==="scroll",p=v?h!==null?h+"Capture":null:h;v=[];for(var f=u,m;f!==null;){m=f;var k=m.stateNode;if(m.tag===5&&k!==null&&(m=k,p!==null&&(k=hs(f,p),k!=null&&v.push(ws(f,k,m)))),N)break;f=f.return}0<v.length&&(h=new y(h,w,null,n,c),d.push({event:h,listeners:v}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",y=e==="mouseout"||e==="pointerout",h&&n!==La&&(w=n.relatedTarget||n.fromElement)&&(On(w)||w[Ft]))break e;if((y||h)&&(h=c.window===c?c:(h=c.ownerDocument)?h.defaultView||h.parentWindow:window,y?(w=n.relatedTarget||n.toElement,y=u,w=w?On(w):null,w!==null&&(N=Hn(w),w!==N||w.tag!==5&&w.tag!==6)&&(w=null)):(y=null,w=u),y!==w)){if(v=yc,k="onMouseLeave",p="onMouseEnter",f="mouse",(e==="pointerout"||e==="pointerover")&&(v=vc,k="onPointerLeave",p="onPointerEnter",f="pointer"),N=y==null?h:sr(y),m=w==null?h:sr(w),h=new v(k,f+"leave",y,n,c),h.target=N,h.relatedTarget=m,k=null,On(c)===u&&(v=new v(p,f+"enter",w,n,c),v.target=m,v.relatedTarget=N,k=v),N=k,y&&w)t:{for(v=y,p=w,f=0,m=v;m;m=Qn(m))f++;for(m=0,k=p;k;k=Qn(k))m++;for(;0<f-m;)v=Qn(v),f--;for(;0<m-f;)p=Qn(p),m--;for(;f--;){if(v===p||p!==null&&v===p.alternate)break t;v=Qn(v),p=Qn(p)}v=null}else v=null;y!==null&&Nc(d,h,y,v,!1),w!==null&&N!==null&&Nc(d,N,w,v,!0)}}e:{if(h=u?sr(u):window,y=h.nodeName&&h.nodeName.toLowerCase(),y==="select"||y==="input"&&h.type==="file")var T=mg;else if(kc(h))if(Id)T=_g;else{T=gg;var g=yg}else(y=h.nodeName)&&y.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(T=vg);if(T&&(T=T(e,u))){Ad(d,T,n,c);break e}g&&g(e,h,u),e==="focusout"&&(g=h._wrapperState)&&g.controlled&&h.type==="number"&&Ia(h,"number",h.value)}switch(g=u?sr(u):window,e){case"focusin":(kc(g)||g.contentEditable==="true")&&(nr=g,Ka=u,ss=null);break;case"focusout":ss=Ka=nr=null;break;case"mousedown":Za=!0;break;case"contextmenu":case"mouseup":case"dragend":Za=!1,Tc(d,n,c);break;case"selectionchange":if(Sg)break;case"keydown":case"keyup":Tc(d,n,c)}var _;if(uu)e:{switch(e){case"compositionstart":var S="onCompositionStart";break e;case"compositionend":S="onCompositionEnd";break e;case"compositionupdate":S="onCompositionUpdate";break e}S=void 0}else tr?Nd(e,n)&&(S="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(S="onCompositionStart");S&&(Od&&n.locale!=="ko"&&(tr||S!=="onCompositionStart"?S==="onCompositionEnd"&&tr&&(_=Rd()):(en=c,ou="value"in en?en.value:en.textContent,tr=!0)),g=Ki(u,S),0<g.length&&(S=new gc(S,e,null,n,c),d.push({event:S,listeners:g}),_?S.data=_:(_=bd(n),_!==null&&(S.data=_)))),(_=cg?fg(e,n):dg(e,n))&&(u=Ki(u,"onBeforeInput"),0<u.length&&(c=new gc("onBeforeInput","beforeinput",null,n,c),d.push({event:c,listeners:u}),c.data=_))}Fd(d,t)})}function ws(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ki(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=hs(e,n),i!=null&&r.unshift(ws(e,i,s)),i=hs(e,t),i!=null&&r.push(ws(e,i,s))),e=e.return}return r}function Qn(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Nc(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,u=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&u!==null&&(a=u,s?(l=hs(n,i),l!=null&&o.unshift(ws(n,l,a))):s||(l=hs(n,i),l!=null&&o.push(ws(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Tg=/\r\n?/g,Rg=/\u0000|\uFFFD/g;function bc(e){return(typeof e=="string"?e:""+e).replace(Tg,`
|
|
44
44
|
`).replace(Rg,"")}function ui(e,t,n){if(t=bc(t),bc(e)!==t&&n)throw Error(x(425))}function Zi(){}var Wa=null,Ha=null;function Ja(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Qa=typeof setTimeout=="function"?setTimeout:void 0,Og=typeof clearTimeout=="function"?clearTimeout:void 0,Ac=typeof Promise=="function"?Promise:void 0,Ng=typeof queueMicrotask=="function"?queueMicrotask:typeof Ac<"u"?function(e){return Ac.resolve(null).then(e).catch(bg)}:Qa;function bg(e){setTimeout(function(){throw e})}function na(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),ys(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);ys(t)}function on(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==="$?")break;if(t==="/$")return null}}return e}function Ic(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var $r=Math.random().toString(36).slice(2),Ct="__reactFiber$"+$r,ks="__reactProps$"+$r,Ft="__reactContainer$"+$r,qa="__reactEvents$"+$r,Ag="__reactListeners$"+$r,Ig="__reactHandles$"+$r;function On(e){var t=e[Ct];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ft]||n[Ct]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Ic(e);e!==null;){if(n=e[Ct])return n;e=Ic(e)}return t}e=n,n=e.parentNode}return null}function Ws(e){return e=e[Ct]||e[Ft],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function sr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(x(33))}function xo(e){return e[ks]||null}var Ya=[],ir=-1;function kn(e){return{current:e}}function ne(e){0>ir||(e.current=Ya[ir],Ya[ir]=null,ir--)}function X(e,t){ir++,Ya[ir]=e.current,e.current=t}var pn={},be=kn(pn),Ke=kn(!1),zn=pn;function xr(e,t){var n=e.type.contextTypes;if(!n)return pn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function Ze(e){return e=e.childContextTypes,e!=null}function Wi(){ne(Ke),ne(be)}function Mc(e,t,n){if(be.current!==pn)throw Error(x(168));X(be,t),X(Ke,n)}function Kd(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(x(108,yy(e)||"Unknown",s));return ce({},n,r)}function Hi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pn,zn=be.current,X(be,e),X(Ke,Ke.current),!0}function Pc(e,t,n){var r=e.stateNode;if(!r)throw Error(x(169));n?(e=Kd(e,t,zn),r.__reactInternalMemoizedMergedChildContext=e,ne(Ke),ne(be),X(be,e)):ne(Ke),X(Ke,n)}var $t=null,Eo=!1,ra=!1;function Zd(e){$t===null?$t=[e]:$t.push(e)}function Mg(e){Eo=!0,Zd(e)}function Sn(){if(!ra&&$t!==null){ra=!0;var e=0,t=Y;try{var n=$t;for(Y=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}$t=null,Eo=!1}catch(s){throw $t!==null&&($t=$t.slice(e+1)),yd(nu,Sn),s}finally{Y=t,ra=!1}}return null}var or=[],ar=0,Ji=null,Qi=0,nt=[],rt=0,Dn=null,zt=1,Dt="";function Cn(e,t){or[ar++]=Qi,or[ar++]=Ji,Ji=e,Qi=t}function Wd(e,t,n){nt[rt++]=zt,nt[rt++]=Dt,nt[rt++]=Dn,Dn=e;var r=zt;e=Dt;var s=32-yt(r)-1;r&=~(1<<s),n+=1;var i=32-yt(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,zt=1<<32-yt(t)+s|n<<s|r,Dt=i+e}else zt=1<<i|n<<s|r,Dt=e}function fu(e){e.return!==null&&(Cn(e,1),Wd(e,1,0))}function du(e){for(;e===Ji;)Ji=or[--ar],or[ar]=null,Qi=or[--ar],or[ar]=null;for(;e===Dn;)Dn=nt[--rt],nt[rt]=null,Dt=nt[--rt],nt[rt]=null,zt=nt[--rt],nt[rt]=null}var qe=null,Qe=null,se=!1,pt=null;function Hd(e,t){var n=it(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function jc(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,qe=e,Qe=on(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,qe=e,Qe=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Dn!==null?{id:zt,overflow:Dt}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=it(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,qe=e,Qe=null,!0):!1;default:return!1}}function Ga(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Xa(e){if(se){var t=Qe;if(t){var n=t;if(!jc(e,t)){if(Ga(e))throw Error(x(418));t=on(n.nextSibling);var r=qe;t&&jc(e,t)?Hd(r,n):(e.flags=e.flags&-4097|2,se=!1,qe=e)}}else{if(Ga(e))throw Error(x(418));e.flags=e.flags&-4097|2,se=!1,qe=e}}}function $c(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;qe=e}function ci(e){if(e!==qe)return!1;if(!se)return $c(e),se=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Ja(e.type,e.memoizedProps)),t&&(t=Qe)){if(Ga(e))throw Jd(),Error(x(418));for(;t;)Hd(e,t),t=on(t.nextSibling)}if($c(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(x(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Qe=on(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Qe=null}}else Qe=qe?on(e.stateNode.nextSibling):null;return!0}function Jd(){for(var e=Qe;e;)e=on(e.nextSibling)}function Er(){Qe=qe=null,se=!1}function hu(e){pt===null?pt=[e]:pt.push(e)}var Pg=Ht.ReactCurrentBatchConfig;function Vr(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(x(309));var r=n.stateNode}if(!r)throw Error(x(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(x(284));if(!n._owner)throw Error(x(290,e))}return e}function fi(e,t){throw e=Object.prototype.toString.call(t),Error(x(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Lc(e){var t=e._init;return t(e._payload)}function Qd(e){function t(p,f){if(e){var m=p.deletions;m===null?(p.deletions=[f],p.flags|=16):m.push(f)}}function n(p,f){if(!e)return null;for(;f!==null;)t(p,f),f=f.sibling;return null}function r(p,f){for(p=new Map;f!==null;)f.key!==null?p.set(f.key,f):p.set(f.index,f),f=f.sibling;return p}function s(p,f){return p=cn(p,f),p.index=0,p.sibling=null,p}function i(p,f,m){return p.index=m,e?(m=p.alternate,m!==null?(m=m.index,m<f?(p.flags|=2,f):m):(p.flags|=2,f)):(p.flags|=1048576,f)}function o(p){return e&&p.alternate===null&&(p.flags|=2),p}function a(p,f,m,k){return f===null||f.tag!==6?(f=ca(m,p.mode,k),f.return=p,f):(f=s(f,m),f.return=p,f)}function l(p,f,m,k){var T=m.type;return T===er?c(p,f,m.props.children,k,m.key):f!==null&&(f.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Qt&&Lc(T)===f.type)?(k=s(f,m.props),k.ref=Vr(p,f,m),k.return=p,k):(k=Ni(m.type,m.key,m.props,null,p.mode,k),k.ref=Vr(p,f,m),k.return=p,k)}function u(p,f,m,k){return f===null||f.tag!==4||f.stateNode.containerInfo!==m.containerInfo||f.stateNode.implementation!==m.implementation?(f=fa(m,p.mode,k),f.return=p,f):(f=s(f,m.children||[]),f.return=p,f)}function c(p,f,m,k,T){return f===null||f.tag!==7?(f=In(m,p.mode,k,T),f.return=p,f):(f=s(f,m),f.return=p,f)}function d(p,f,m){if(typeof f=="string"&&f!==""||typeof f=="number")return f=ca(""+f,p.mode,m),f.return=p,f;if(typeof f=="object"&&f!==null){switch(f.$$typeof){case ei:return m=Ni(f.type,f.key,f.props,null,p.mode,m),m.ref=Vr(p,null,f),m.return=p,m;case Xn:return f=fa(f,p.mode,m),f.return=p,f;case Qt:var k=f._init;return d(p,k(f._payload),m)}if(Jr(f)||zr(f))return f=In(f,p.mode,m,null),f.return=p,f;fi(p,f)}return null}function h(p,f,m,k){var T=f!==null?f.key:null;if(typeof m=="string"&&m!==""||typeof m=="number")return T!==null?null:a(p,f,""+m,k);if(typeof m=="object"&&m!==null){switch(m.$$typeof){case ei:return m.key===T?l(p,f,m,k):null;case Xn:return m.key===T?u(p,f,m,k):null;case Qt:return T=m._init,h(p,f,T(m._payload),k)}if(Jr(m)||zr(m))return T!==null?null:c(p,f,m,k,null);fi(p,m)}return null}function y(p,f,m,k,T){if(typeof k=="string"&&k!==""||typeof k=="number")return p=p.get(m)||null,a(f,p,""+k,T);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case ei:return p=p.get(k.key===null?m:k.key)||null,l(f,p,k,T);case Xn:return p=p.get(k.key===null?m:k.key)||null,u(f,p,k,T);case Qt:var g=k._init;return y(p,f,m,g(k._payload),T)}if(Jr(k)||zr(k))return p=p.get(m)||null,c(f,p,k,T,null);fi(f,k)}return null}function w(p,f,m,k){for(var T=null,g=null,_=f,S=f=0,P=null;_!==null&&S<m.length;S++){_.index>S?(P=_,_=null):P=_.sibling;var R=h(p,_,m[S],k);if(R===null){_===null&&(_=P);break}e&&_&&R.alternate===null&&t(p,_),f=i(R,f,S),g===null?T=R:g.sibling=R,g=R,_=P}if(S===m.length)return n(p,_),se&&Cn(p,S),T;if(_===null){for(;S<m.length;S++)_=d(p,m[S],k),_!==null&&(f=i(_,f,S),g===null?T=_:g.sibling=_,g=_);return se&&Cn(p,S),T}for(_=r(p,_);S<m.length;S++)P=y(_,p,S,m[S],k),P!==null&&(e&&P.alternate!==null&&_.delete(P.key===null?S:P.key),f=i(P,f,S),g===null?T=P:g.sibling=P,g=P);return e&&_.forEach(function($){return t(p,$)}),se&&Cn(p,S),T}function v(p,f,m,k){var T=zr(m);if(typeof T!="function")throw Error(x(150));if(m=T.call(m),m==null)throw Error(x(151));for(var g=T=null,_=f,S=f=0,P=null,R=m.next();_!==null&&!R.done;S++,R=m.next()){_.index>S?(P=_,_=null):P=_.sibling;var $=h(p,_,R.value,k);if($===null){_===null&&(_=P);break}e&&_&&$.alternate===null&&t(p,_),f=i($,f,S),g===null?T=$:g.sibling=$,g=$,_=P}if(R.done)return n(p,_),se&&Cn(p,S),T;if(_===null){for(;!R.done;S++,R=m.next())R=d(p,R.value,k),R!==null&&(f=i(R,f,S),g===null?T=R:g.sibling=R,g=R);return se&&Cn(p,S),T}for(_=r(p,_);!R.done;S++,R=m.next())R=y(_,p,S,R.value,k),R!==null&&(e&&R.alternate!==null&&_.delete(R.key===null?S:R.key),f=i(R,f,S),g===null?T=R:g.sibling=R,g=R);return e&&_.forEach(function(F){return t(p,F)}),se&&Cn(p,S),T}function N(p,f,m,k){if(typeof m=="object"&&m!==null&&m.type===er&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case ei:e:{for(var T=m.key,g=f;g!==null;){if(g.key===T){if(T=m.type,T===er){if(g.tag===7){n(p,g.sibling),f=s(g,m.props.children),f.return=p,p=f;break e}}else if(g.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Qt&&Lc(T)===g.type){n(p,g.sibling),f=s(g,m.props),f.ref=Vr(p,g,m),f.return=p,p=f;break e}n(p,g);break}else t(p,g);g=g.sibling}m.type===er?(f=In(m.props.children,p.mode,k,m.key),f.return=p,p=f):(k=Ni(m.type,m.key,m.props,null,p.mode,k),k.ref=Vr(p,f,m),k.return=p,p=k)}return o(p);case Xn:e:{for(g=m.key;f!==null;){if(f.key===g)if(f.tag===4&&f.stateNode.containerInfo===m.containerInfo&&f.stateNode.implementation===m.implementation){n(p,f.sibling),f=s(f,m.children||[]),f.return=p,p=f;break e}else{n(p,f);break}else t(p,f);f=f.sibling}f=fa(m,p.mode,k),f.return=p,p=f}return o(p);case Qt:return g=m._init,N(p,f,g(m._payload),k)}if(Jr(m))return w(p,f,m,k);if(zr(m))return v(p,f,m,k);fi(p,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,f!==null&&f.tag===6?(n(p,f.sibling),f=s(f,m),f.return=p,p=f):(n(p,f),f=ca(m,p.mode,k),f.return=p,p=f),o(p)):n(p,f)}return N}var Cr=Qd(!0),qd=Qd(!1),qi=kn(null),Yi=null,lr=null,pu=null;function mu(){pu=lr=Yi=null}function yu(e){var t=qi.current;ne(qi),e._currentValue=t}function el(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function yr(e,t){Yi=e,pu=lr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ve=!0),e.firstContext=null)}function at(e){var t=e._currentValue;if(pu!==e)if(e={context:e,memoizedValue:t,next:null},lr===null){if(Yi===null)throw Error(x(308));lr=e,Yi.dependencies={lanes:0,firstContext:e}}else lr=lr.next=e;return t}var Nn=null;function gu(e){Nn===null?Nn=[e]:Nn.push(e)}function Yd(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,gu(t)):(n.next=s.next,s.next=n),t.interleaved=n,Vt(e,r)}function Vt(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var qt=!1;function vu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Gd(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ut(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function an(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,J&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,Vt(e,n)}return s=r.interleaved,s===null?(t.next=t,gu(r)):(t.next=s.next,s.next=t),r.interleaved=t,Vt(e,n)}function xi(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ru(e,n)}}function zc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Gi(e,t,n,r){var s=e.updateQueue;qt=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,u=l.next;l.next=null,o===null?i=u:o.next=u,o=l;var c=e.alternate;c!==null&&(c=c.updateQueue,a=c.lastBaseUpdate,a!==o&&(a===null?c.firstBaseUpdate=u:a.next=u,c.lastBaseUpdate=l))}if(i!==null){var d=s.baseState;o=0,c=u=l=null,a=i;do{var h=a.lane,y=a.eventTime;if((r&h)===h){c!==null&&(c=c.next={eventTime:y,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,v=a;switch(h=t,y=n,v.tag){case 1:if(w=v.payload,typeof w=="function"){d=w.call(y,d,h);break e}d=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=v.payload,h=typeof w=="function"?w.call(y,d,h):w,h==null)break e;d=ce({},d,h);break e;case 2:qt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else y={eventTime:y,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},c===null?(u=c=y,l=d):c=c.next=y,o|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(!0);if(c===null&&(l=d),s.baseState=l,s.firstBaseUpdate=u,s.lastBaseUpdate=c,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Bn|=o,e.lanes=o,e.memoizedState=d}}function Dc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(x(191,s));s.call(r)}}}var Hs={},Ot=kn(Hs),Ss=kn(Hs),xs=kn(Hs);function bn(e){if(e===Hs)throw Error(x(174));return e}function _u(e,t){switch(X(xs,t),X(Ss,e),X(Ot,Hs),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Pa(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Pa(t,e)}ne(Ot),X(Ot,t)}function Tr(){ne(Ot),ne(Ss),ne(xs)}function Xd(e){bn(xs.current);var t=bn(Ot.current),n=Pa(t,e.type);t!==n&&(X(Ss,e),X(Ot,n))}function wu(e){Ss.current===e&&(ne(Ot),ne(Ss))}var le=kn(0);function Xi(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)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 sa=[];function ku(){for(var e=0;e<sa.length;e++)sa[e]._workInProgressVersionPrimary=null;sa.length=0}var Ei=Ht.ReactCurrentDispatcher,ia=Ht.ReactCurrentBatchConfig,Un=0,ue=null,ye=null,ke=null,eo=!1,is=!1,Es=0,jg=0;function Re(){throw Error(x(321))}function Su(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!_t(e[n],t[n]))return!1;return!0}function xu(e,t,n,r,s,i){if(Un=i,ue=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Ei.current=e===null||e.memoizedState===null?Dg:Ug,e=n(r,s),is){i=0;do{if(is=!1,Es=0,25<=i)throw Error(x(301));i+=1,ke=ye=null,t.updateQueue=null,Ei.current=Bg,e=n(r,s)}while(is)}if(Ei.current=to,t=ye!==null&&ye.next!==null,Un=0,ke=ye=ue=null,eo=!1,t)throw Error(x(300));return e}function Eu(){var e=Es!==0;return Es=0,e}function Et(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ke===null?ue.memoizedState=ke=e:ke=ke.next=e,ke}function lt(){if(ye===null){var e=ue.alternate;e=e!==null?e.memoizedState:null}else e=ye.next;var t=ke===null?ue.memoizedState:ke.next;if(t!==null)ke=t,ye=e;else{if(e===null)throw Error(x(310));ye=e,e={memoizedState:ye.memoizedState,baseState:ye.baseState,baseQueue:ye.baseQueue,queue:ye.queue,next:null},ke===null?ue.memoizedState=ke=e:ke=ke.next=e}return ke}function Cs(e,t){return typeof t=="function"?t(e):t}function oa(e){var t=lt(),n=t.queue;if(n===null)throw Error(x(311));n.lastRenderedReducer=e;var r=ye,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,u=i;do{var c=u.lane;if((Un&c)===c)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(a=l=d,o=r):l=l.next=d,ue.lanes|=c,Bn|=c}u=u.next}while(u!==null&&u!==i);l===null?o=r:l.next=a,_t(r,t.memoizedState)||(Ve=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,ue.lanes|=i,Bn|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function aa(e){var t=lt(),n=t.queue;if(n===null)throw Error(x(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);_t(i,t.memoizedState)||(Ve=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function eh(){}function th(e,t){var n=ue,r=lt(),s=t(),i=!_t(r.memoizedState,s);if(i&&(r.memoizedState=s,Ve=!0),r=r.queue,Cu(sh.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||ke!==null&&ke.memoizedState.tag&1){if(n.flags|=2048,Ts(9,rh.bind(null,n,r,s,t),void 0,null),Se===null)throw Error(x(349));Un&30||nh(n,t,s)}return s}function nh(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ue.updateQueue,t===null?(t={lastEffect:null,stores:null},ue.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function rh(e,t,n,r){t.value=n,t.getSnapshot=r,ih(t)&&oh(e)}function sh(e,t,n){return n(function(){ih(t)&&oh(e)})}function ih(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!_t(e,n)}catch{return!0}}function oh(e){var t=Vt(e,1);t!==null&>(t,e,1,-1)}function Uc(e){var t=Et();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Cs,lastRenderedState:e},t.queue=e,e=e.dispatch=zg.bind(null,ue,e),[t.memoizedState,e]}function Ts(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=ue.updateQueue,t===null?(t={lastEffect:null,stores:null},ue.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function ah(){return lt().memoizedState}function Ci(e,t,n,r){var s=Et();ue.flags|=e,s.memoizedState=Ts(1|t,n,void 0,r===void 0?null:r)}function Co(e,t,n,r){var s=lt();r=r===void 0?null:r;var i=void 0;if(ye!==null){var o=ye.memoizedState;if(i=o.destroy,r!==null&&Su(r,o.deps)){s.memoizedState=Ts(t,n,i,r);return}}ue.flags|=e,s.memoizedState=Ts(1|t,n,i,r)}function Bc(e,t){return Ci(8390656,8,e,t)}function Cu(e,t){return Co(2048,8,e,t)}function lh(e,t){return Co(4,2,e,t)}function uh(e,t){return Co(4,4,e,t)}function ch(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function fh(e,t,n){return n=n!=null?n.concat([e]):null,Co(4,4,ch.bind(null,t,e),n)}function Tu(){}function dh(e,t){var n=lt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Su(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function hh(e,t){var n=lt();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Su(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ph(e,t,n){return Un&21?(_t(n,t)||(n=_d(),ue.lanes|=n,Bn|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ve=!0),e.memoizedState=n)}function $g(e,t){var n=Y;Y=n!==0&&4>n?n:4,e(!0);var r=ia.transition;ia.transition={};try{e(!1),t()}finally{Y=n,ia.transition=r}}function mh(){return lt().memoizedState}function Lg(e,t,n){var r=un(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},yh(e))gh(t,n);else if(n=Yd(e,t,n,r),n!==null){var s=je();gt(n,e,r,s),vh(n,t,r)}}function zg(e,t,n){var r=un(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(yh(e))gh(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,_t(a,o)){var l=t.interleaved;l===null?(s.next=s,gu(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Yd(e,t,s,r),n!==null&&(s=je(),gt(n,e,r,s),vh(n,t,r))}}function yh(e){var t=e.alternate;return e===ue||t!==null&&t===ue}function gh(e,t){is=eo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function vh(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ru(e,n)}}var to={readContext:at,useCallback:Re,useContext:Re,useEffect:Re,useImperativeHandle:Re,useInsertionEffect:Re,useLayoutEffect:Re,useMemo:Re,useReducer:Re,useRef:Re,useState:Re,useDebugValue:Re,useDeferredValue:Re,useTransition:Re,useMutableSource:Re,useSyncExternalStore:Re,useId:Re,unstable_isNewReconciler:!1},Dg={readContext:at,useCallback:function(e,t){return Et().memoizedState=[e,t===void 0?null:t],e},useContext:at,useEffect:Bc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Ci(4194308,4,ch.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Ci(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ci(4,2,e,t)},useMemo:function(e,t){var n=Et();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Et();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Lg.bind(null,ue,e),[r.memoizedState,e]},useRef:function(e){var t=Et();return e={current:e},t.memoizedState=e},useState:Uc,useDebugValue:Tu,useDeferredValue:function(e){return Et().memoizedState=e},useTransition:function(){var e=Uc(!1),t=e[0];return e=$g.bind(null,e[1]),Et().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ue,s=Et();if(se){if(n===void 0)throw Error(x(407));n=n()}else{if(n=t(),Se===null)throw Error(x(349));Un&30||nh(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Bc(sh.bind(null,r,i,e),[e]),r.flags|=2048,Ts(9,rh.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Et(),t=Se.identifierPrefix;if(se){var n=Dt,r=zt;n=(r&~(1<<32-yt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Es++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=jg++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},Ug={readContext:at,useCallback:dh,useContext:at,useEffect:Cu,useImperativeHandle:fh,useInsertionEffect:lh,useLayoutEffect:uh,useMemo:hh,useReducer:oa,useRef:ah,useState:function(){return oa(Cs)},useDebugValue:Tu,useDeferredValue:function(e){var t=lt();return ph(t,ye.memoizedState,e)},useTransition:function(){var e=oa(Cs)[0],t=lt().memoizedState;return[e,t]},useMutableSource:eh,useSyncExternalStore:th,useId:mh,unstable_isNewReconciler:!1},Bg={readContext:at,useCallback:dh,useContext:at,useEffect:Cu,useImperativeHandle:fh,useInsertionEffect:lh,useLayoutEffect:uh,useMemo:hh,useReducer:aa,useRef:ah,useState:function(){return aa(Cs)},useDebugValue:Tu,useDeferredValue:function(e){var t=lt();return ye===null?t.memoizedState=e:ph(t,ye.memoizedState,e)},useTransition:function(){var e=aa(Cs)[0],t=lt().memoizedState;return[e,t]},useMutableSource:eh,useSyncExternalStore:th,useId:mh,unstable_isNewReconciler:!1};function ft(e,t){if(e&&e.defaultProps){t=ce({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}function tl(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:ce({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var To={isMounted:function(e){return(e=e._reactInternals)?Hn(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=je(),s=un(e),i=Ut(r,s);i.payload=t,n!=null&&(i.callback=n),t=an(e,i,s),t!==null&&(gt(t,e,s,r),xi(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=je(),s=un(e),i=Ut(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=an(e,i,s),t!==null&&(gt(t,e,s,r),xi(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=je(),r=un(e),s=Ut(n,r);s.tag=2,t!=null&&(s.callback=t),t=an(e,s,r),t!==null&&(gt(t,e,r,n),xi(t,e,r))}};function Fc(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!vs(n,r)||!vs(s,i):!0}function _h(e,t,n){var r=!1,s=pn,i=t.contextType;return typeof i=="object"&&i!==null?i=at(i):(s=Ze(t)?zn:be.current,r=t.contextTypes,i=(r=r!=null)?xr(e,s):pn),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=To,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function Vc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&To.enqueueReplaceState(t,t.state,null)}function nl(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs={},vu(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=at(i):(i=Ze(t)?zn:be.current,s.context=xr(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(tl(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&To.enqueueReplaceState(s,s.state,null),Gi(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Rr(e,t){try{var n="",r=t;do n+=my(r),r=r.return;while(r);var s=n}catch(i){s=`
|
|
45
45
|
Error generating stack: `+i.message+`
|
|
46
|
-
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function la(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function rl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Fg=typeof WeakMap=="function"?WeakMap:Map;function wh(e,t,n){n=Ut(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ro||(ro=!0,hl=r),rl(e,t)},n}function kh(e,t,n){n=Ut(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){rl(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){rl(e,t),typeof r!="function"&&(ln===null?ln=new Set([this]):ln.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Kc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Fg;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=nv.bind(null,e,t,n),t.then(e,e))}function Zc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Wc(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ut(-1,1),t.tag=2,an(n,t,1))),n.lanes|=1),e)}var Vg=Ht.ReactCurrentOwner,Ve=!1;function Ie(e,t,n,r){t.child=e===null?qd(t,null,n,r):Cr(t,e.child,n,r)}function Hc(e,t,n,r,s){n=n.render;var i=t.ref;return yr(t,s),r=xu(e,t,n,r,i,s),n=Eu(),e!==null&&!Ve?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Kt(e,t,s)):(se&&n&&fu(t),t.flags|=1,Ie(e,t,r,s),t.child)}function Jc(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Pu(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Sh(e,t,i,r,s)):(e=Ni(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:vs,n(o,r)&&e.ref===t.ref)return Kt(e,t,s)}return t.flags|=1,e=cn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Sh(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(vs(i,r)&&e.ref===t.ref)if(Ve=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Ve=!0);else return t.lanes=e.lanes,Kt(e,t,s)}return sl(e,t,n,r,s)}function xh(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},X(cr,Je),Je|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,X(cr,Je),Je|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,X(cr,Je),Je|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,X(cr,Je),Je|=r;return Ie(e,t,s,n),t.child}function Eh(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function sl(e,t,n,r,s){var i=Ze(n)?zn:be.current;return i=xr(t,i),yr(t,s),n=xu(e,t,n,r,i,s),r=Eu(),e!==null&&!Ve?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Kt(e,t,s)):(se&&r&&fu(t),t.flags|=1,Ie(e,t,n,s),t.child)}function Qc(e,t,n,r,s){if(Ze(n)){var i=!0;Hi(t)}else i=!1;if(yr(t,s),t.stateNode===null)Ti(e,t),_h(t,n,r),nl(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=at(u):(u=Ze(n)?zn:be.current,u=xr(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Vc(t,o,r,u),qt=!1;var h=t.memoizedState;o.state=h,Gi(t,r,o,s),l=t.memoizedState,a!==r||h!==l||Ke.current||qt?(typeof c=="function"&&(tl(t,n,c,r),l=t.memoizedState),(a=qt||Fc(t,n,a,r,h,l,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Gd(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:ft(t.type,a),o.props=u,d=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=at(l):(l=Ze(n)?zn:be.current,l=xr(t,l));var y=n.getDerivedStateFromProps;(c=typeof y=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||h!==l)&&Vc(t,o,r,l),qt=!1,h=t.memoizedState,o.state=h,Gi(t,r,o,s);var w=t.memoizedState;a!==d||h!==w||Ke.current||qt?(typeof y=="function"&&(tl(t,n,y,r),w=t.memoizedState),(u=qt||Fc(t,n,u,r,h,w,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,w,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,w,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),o.props=r,o.state=w,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return il(e,t,n,r,i,s)}function il(e,t,n,r,s,i){Eh(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&Pc(t,n,!1),Kt(e,t,i);r=t.stateNode,Vg.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Cr(t,e.child,null,i),t.child=Cr(t,null,a,i)):Ie(e,t,a,i),t.memoizedState=r.state,s&&Pc(t,n,!0),t.child}function Ch(e){var t=e.stateNode;t.pendingContext?Mc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Mc(e,t.context,!1),_u(e,t.containerInfo)}function qc(e,t,n,r,s){return Er(),hu(s),t.flags|=256,Ie(e,t,n,r),t.child}var ol={dehydrated:null,treeContext:null,retryLane:0};function al(e){return{baseLanes:e,cachePool:null,transitions:null}}function Th(e,t,n){var r=t.pendingProps,s=le.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),X(le,s&1),e===null)return Xa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=No(o,r,0,null),e=In(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=al(n),t.memoizedState=ol,e):Ru(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Kg(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=cn(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=cn(a,i):(i=In(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?al(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=ol,r}return i=e.child,e=i.sibling,r=cn(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Ru(e,t){return t=No({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function di(e,t,n,r){return r!==null&&hu(r),Cr(t,e.child,null,n),e=Ru(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Kg(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=la(Error(x(422))),di(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=No({mode:"visible",children:r.children},s,0,null),i=In(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Cr(t,e.child,null,o),t.child.memoizedState=al(o),t.memoizedState=ol,i);if(!(t.mode&1))return di(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(x(419)),r=la(i,r,void 0),di(e,t,o,r)}if(a=(o&e.childLanes)!==0,Ve||a){if(r=Se,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Vt(e,s),gt(r,e,s,-1))}return Mu(),r=la(Error(x(421))),di(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=rv.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Qe=on(s.nextSibling),qe=t,se=!0,pt=null,e!==null&&(nt[rt++]=zt,nt[rt++]=Dt,nt[rt++]=Dn,zt=e.id,Dt=e.overflow,Dn=t),t=Ru(t,r.children),t.flags|=4096,t)}function Yc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),el(e.return,t,n)}function ua(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function Rh(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(Ie(e,t,r.children,n),r=le.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Yc(e,n,t);else if(e.tag===19)Yc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(X(le,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Xi(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),ua(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Xi(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}ua(t,!0,n,null,i);break;case"together":ua(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ti(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Kt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Bn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(x(153));if(t.child!==null){for(e=t.child,n=cn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=cn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Zg(e,t,n){switch(t.tag){case 3:Ch(t),Er();break;case 5:Xd(t);break;case 1:Ze(t.type)&&Hi(t);break;case 4:_u(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;X(qi,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(X(le,le.current&1),t.flags|=128,null):n&t.child.childLanes?Th(e,t,n):(X(le,le.current&1),e=Kt(e,t,n),e!==null?e.sibling:null);X(le,le.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Rh(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),X(le,le.current),r)break;return null;case 22:case 23:return t.lanes=0,xh(e,t,n)}return Kt(e,t,n)}var Oh,ll,Nh,bh;Oh=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ll=function(){};Nh=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,bn(Ot.current);var i=null;switch(n){case"input":s=ba(e,s),r=ba(e,r),i=[];break;case"select":s=ce({},s,{value:void 0}),r=ce({},r,{value:void 0}),i=[];break;case"textarea":s=Ma(e,s),r=Ma(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Zi)}ja(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(fs.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(fs.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ee("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};bh=function(e,t,n,r){n!==r&&(t.flags|=4)};function Kr(e,t){if(!se)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Oe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Wg(e,t,n){var r=t.pendingProps;switch(du(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Oe(t),null;case 1:return Ze(t.type)&&Wi(),Oe(t),null;case 3:return r=t.stateNode,Tr(),ne(Ke),ne(be),ku(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ci(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pt!==null&&(yl(pt),pt=null))),ll(e,t),Oe(t),null;case 5:wu(t);var s=bn(xs.current);if(n=t.type,e!==null&&t.stateNode!=null)Nh(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(x(166));return Oe(t),null}if(e=bn(Ot.current),ci(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Ct]=t,r[ks]=i,e=(t.mode&1)!==0,n){case"dialog":ee("cancel",r),ee("close",r);break;case"iframe":case"object":case"embed":ee("load",r);break;case"video":case"audio":for(s=0;s<qr.length;s++)ee(qr[s],r);break;case"source":ee("error",r);break;case"img":case"image":case"link":ee("error",r),ee("load",r);break;case"details":ee("toggle",r);break;case"input":oc(r,i),ee("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ee("invalid",r);break;case"textarea":lc(r,i),ee("invalid",r)}ja(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&ui(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&ui(r.textContent,a,e),s=["children",""+a]):fs.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ee("scroll",r)}switch(n){case"input":ti(r),ac(r,i,!0);break;case"textarea":ti(r),uc(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Zi)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=sd(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Ct]=t,e[ks]=r,Oh(e,t,!1,!1),t.stateNode=e;e:{switch(o=$a(n,r),n){case"dialog":ee("cancel",e),ee("close",e),s=r;break;case"iframe":case"object":case"embed":ee("load",e),s=r;break;case"video":case"audio":for(s=0;s<qr.length;s++)ee(qr[s],e);s=r;break;case"source":ee("error",e),s=r;break;case"img":case"image":case"link":ee("error",e),ee("load",e),s=r;break;case"details":ee("toggle",e),s=r;break;case"input":oc(e,r),s=ba(e,r),ee("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=ce({},r,{value:void 0}),ee("invalid",e);break;case"textarea":lc(e,r),s=Ma(e,r),ee("invalid",e);break;default:s=r}ja(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?ad(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&id(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ds(e,l):typeof l=="number"&&ds(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(fs.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ee("scroll",e):l!=null&&Yl(e,i,l,o))}switch(n){case"input":ti(e),ac(e,r,!1);break;case"textarea":ti(e),uc(e);break;case"option":r.value!=null&&e.setAttribute("value",""+hn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?dr(e,!!r.multiple,i,!1):r.defaultValue!=null&&dr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Zi)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Oe(t),null;case 6:if(e&&t.stateNode!=null)bh(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(x(166));if(n=bn(xs.current),bn(Ot.current),ci(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ct]=t,(i=r.nodeValue!==n)&&(e=qe,e!==null))switch(e.tag){case 3:ui(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ui(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ct]=t,t.stateNode=r}return Oe(t),null;case 13:if(ne(le),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(se&&Qe!==null&&t.mode&1&&!(t.flags&128))Jd(),Er(),t.flags|=98560,i=!1;else if(i=ci(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(x(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(x(317));i[Ct]=t}else Er(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Oe(t),i=!1}else pt!==null&&(yl(pt),pt=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||le.current&1?ge===0&&(ge=3):Mu())),t.updateQueue!==null&&(t.flags|=4),Oe(t),null);case 4:return Tr(),ll(e,t),e===null&&_s(t.stateNode.containerInfo),Oe(t),null;case 10:return yu(t.type._context),Oe(t),null;case 17:return Ze(t.type)&&Wi(),Oe(t),null;case 19:if(ne(le),i=t.memoizedState,i===null)return Oe(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Kr(i,!1);else{if(ge!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Xi(e),o!==null){for(t.flags|=128,Kr(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return X(le,le.current&1|2),t.child}e=e.sibling}i.tail!==null&&he()>Or&&(t.flags|=128,r=!0,Kr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Xi(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Kr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!se)return Oe(t),null}else 2*he()-i.renderingStartTime>Or&&n!==1073741824&&(t.flags|=128,r=!0,Kr(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=he(),t.sibling=null,n=le.current,X(le,r?n&1|2:n&1),t):(Oe(t),null);case 22:case 23:return Iu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Je&1073741824&&(Oe(t),t.subtreeFlags&6&&(t.flags|=8192)):Oe(t),null;case 24:return null;case 25:return null}throw Error(x(156,t.tag))}function Hg(e,t){switch(du(t),t.tag){case 1:return Ze(t.type)&&Wi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Tr(),ne(Ke),ne(be),ku(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return wu(t),null;case 13:if(ne(le),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(x(340));Er()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(le),null;case 4:return Tr(),null;case 10:return yu(t.type._context),null;case 22:case 23:return Iu(),null;case 24:return null;default:return null}}var hi=!1,Ne=!1,Jg=typeof WeakSet=="function"?WeakSet:Set,M=null;function ur(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){fe(e,t,r)}else n.current=null}function ul(e,t,n){try{n()}catch(r){fe(e,t,r)}}var Gc=!1;function Qg(e,t){if(Wa=Fi,e=jd(),cu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,d=e,h=null;t:for(;;){for(var y;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==i||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(y=d.firstChild)!==null;)h=d,d=y;for(;;){if(d===e)break t;if(h===n&&++u===s&&(a=o),h===i&&++c===r&&(l=o),(y=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=y}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ha={focusedElem:e,selectionRange:n},Fi=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var v=w.memoizedProps,N=w.memoizedState,p=t.stateNode,f=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:ft(t.type,v),N);p.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(x(163))}}catch(k){fe(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return w=Gc,Gc=!1,w}function os(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&ul(t,n,i)}s=s.next}while(s!==r)}}function Ro(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function cl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ah(e){var t=e.alternate;t!==null&&(e.alternate=null,Ah(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ct],delete t[ks],delete t[qa],delete t[Ag],delete t[Ig])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ih(e){return e.tag===5||e.tag===3||e.tag===4}function Xc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ih(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.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 fl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Zi));else if(r!==4&&(e=e.child,e!==null))for(fl(e,t,n),e=e.sibling;e!==null;)fl(e,t,n),e=e.sibling}function dl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(dl(e,t,n),e=e.sibling;e!==null;)dl(e,t,n),e=e.sibling}var Ee=null,dt=!1;function Jt(e,t,n){for(n=n.child;n!==null;)Mh(e,t,n),n=n.sibling}function Mh(e,t,n){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(_o,n)}catch{}switch(n.tag){case 5:Ne||ur(n,t);case 6:var r=Ee,s=dt;Ee=null,Jt(e,t,n),Ee=r,dt=s,Ee!==null&&(dt?(e=Ee,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ee.removeChild(n.stateNode));break;case 18:Ee!==null&&(dt?(e=Ee,n=n.stateNode,e.nodeType===8?na(e.parentNode,n):e.nodeType===1&&na(e,n),ys(e)):na(Ee,n.stateNode));break;case 4:r=Ee,s=dt,Ee=n.stateNode.containerInfo,dt=!0,Jt(e,t,n),Ee=r,dt=s;break;case 0:case 11:case 14:case 15:if(!Ne&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&ul(n,t,o),s=s.next}while(s!==r)}Jt(e,t,n);break;case 1:if(!Ne&&(ur(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){fe(n,t,a)}Jt(e,t,n);break;case 21:Jt(e,t,n);break;case 22:n.mode&1?(Ne=(r=Ne)||n.memoizedState!==null,Jt(e,t,n),Ne=r):Jt(e,t,n);break;default:Jt(e,t,n)}}function ef(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Jg),t.forEach(function(r){var s=sv.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function ct(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ee=a.stateNode,dt=!1;break e;case 3:Ee=a.stateNode.containerInfo,dt=!0;break e;case 4:Ee=a.stateNode.containerInfo,dt=!0;break e}a=a.return}if(Ee===null)throw Error(x(160));Mh(i,o,s),Ee=null,dt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){fe(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ph(t,e),t=t.sibling}function Ph(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ct(t,e),xt(e),r&4){try{os(3,e,e.return),Ro(3,e)}catch(v){fe(e,e.return,v)}try{os(5,e,e.return)}catch(v){fe(e,e.return,v)}}break;case 1:ct(t,e),xt(e),r&512&&n!==null&&ur(n,n.return);break;case 5:if(ct(t,e),xt(e),r&512&&n!==null&&ur(n,n.return),e.flags&32){var s=e.stateNode;try{ds(s,"")}catch(v){fe(e,e.return,v)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&nd(s,i),$a(a,o);var u=$a(a,i);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?ad(s,d):c==="dangerouslySetInnerHTML"?id(s,d):c==="children"?ds(s,d):Yl(s,c,d,u)}switch(a){case"input":Aa(s,i);break;case"textarea":rd(s,i);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var y=i.value;y!=null?dr(s,!!i.multiple,y,!1):h!==!!i.multiple&&(i.defaultValue!=null?dr(s,!!i.multiple,i.defaultValue,!0):dr(s,!!i.multiple,i.multiple?[]:"",!1))}s[ks]=i}catch(v){fe(e,e.return,v)}}break;case 6:if(ct(t,e),xt(e),r&4){if(e.stateNode===null)throw Error(x(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(v){fe(e,e.return,v)}}break;case 3:if(ct(t,e),xt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ys(t.containerInfo)}catch(v){fe(e,e.return,v)}break;case 4:ct(t,e),xt(e);break;case 13:ct(t,e),xt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(bu=he())),r&4&&ef(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Ne=(u=Ne)||c,ct(t,e),Ne=u):ct(t,e),xt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(M=e,c=e.child;c!==null;){for(d=M=c;M!==null;){switch(h=M,y=h.child,h.tag){case 0:case 11:case 14:case 15:os(4,h,h.return);break;case 1:ur(h,h.return);var w=h.stateNode;if(typeof w.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(v){fe(r,n,v)}}break;case 5:ur(h,h.return);break;case 22:if(h.memoizedState!==null){nf(d);continue}}y!==null?(y.return=h,M=y):nf(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{s=d.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=od("display",o))}catch(v){fe(e,e.return,v)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(v){fe(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:ct(t,e),xt(e),r&4&&ef(e);break;case 21:break;default:ct(t,e),xt(e)}}function xt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ih(n)){var r=n;break e}n=n.return}throw Error(x(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(ds(s,""),r.flags&=-33);var i=Xc(e);dl(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Xc(e);fl(e,a,o);break;default:throw Error(x(161))}}catch(l){fe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qg(e,t,n){M=e,jh(e)}function jh(e,t,n){for(var r=(e.mode&1)!==0;M!==null;){var s=M,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||hi;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Ne;a=hi;var u=Ne;if(hi=o,(Ne=l)&&!u)for(M=s;M!==null;)o=M,l=o.child,o.tag===22&&o.memoizedState!==null?rf(s):l!==null?(l.return=o,M=l):rf(s);for(;i!==null;)M=i,jh(i),i=i.sibling;M=s,hi=a,Ne=u}tf(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,M=i):tf(e)}}function tf(e){for(;M!==null;){var t=M;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ne||Ro(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ne)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:ft(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Dc(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Dc(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&ys(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(x(163))}Ne||t.flags&512&&cl(t)}catch(h){fe(t,t.return,h)}}if(t===e){M=null;break}if(n=t.sibling,n!==null){n.return=t.return,M=n;break}M=t.return}}function nf(e){for(;M!==null;){var t=M;if(t===e){M=null;break}var n=t.sibling;if(n!==null){n.return=t.return,M=n;break}M=t.return}}function rf(e){for(;M!==null;){var t=M;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ro(4,t)}catch(l){fe(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){fe(t,s,l)}}var i=t.return;try{cl(t)}catch(l){fe(t,i,l)}break;case 5:var o=t.return;try{cl(t)}catch(l){fe(t,o,l)}}}catch(l){fe(t,t.return,l)}if(t===e){M=null;break}var a=t.sibling;if(a!==null){a.return=t.return,M=a;break}M=t.return}}var Yg=Math.ceil,no=Ht.ReactCurrentDispatcher,Ou=Ht.ReactCurrentOwner,ot=Ht.ReactCurrentBatchConfig,J=0,Se=null,pe=null,Ce=0,Je=0,cr=kn(0),ge=0,Rs=null,Bn=0,Oo=0,Nu=0,as=null,Fe=null,bu=0,Or=1/0,jt=null,ro=!1,hl=null,ln=null,pi=!1,tn=null,so=0,ls=0,pl=null,Ri=-1,Oi=0;function je(){return J&6?he():Ri!==-1?Ri:Ri=he()}function un(e){return e.mode&1?J&2&&Ce!==0?Ce&-Ce:Pg.transition!==null?(Oi===0&&(Oi=_d()),Oi):(e=Y,e!==0||(e=window.event,e=e===void 0?16:Td(e.type)),e):1}function gt(e,t,n,r){if(50<ls)throw ls=0,pl=null,Error(x(185));Ks(e,n,r),(!(J&2)||e!==Se)&&(e===Se&&(!(J&2)&&(Oo|=n),ge===4&&Gt(e,Ce)),We(e,r),n===1&&J===0&&!(t.mode&1)&&(Or=he()+500,Eo&&Sn()))}function We(e,t){var n=e.callbackNode;Py(e,t);var r=Bi(e,e===Se?Ce:0);if(r===0)n!==null&&dc(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&dc(n),t===1)e.tag===0?Mg(sf.bind(null,e)):Zd(sf.bind(null,e)),Ng(function(){!(J&6)&&Sn()}),n=null;else{switch(wd(r)){case 1:n=nu;break;case 4:n=gd;break;case 16:n=Ui;break;case 536870912:n=vd;break;default:n=Ui}n=Vh(n,$h.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function $h(e,t){if(Ri=-1,Oi=0,J&6)throw Error(x(327));var n=e.callbackNode;if(gr()&&e.callbackNode!==n)return null;var r=Bi(e,e===Se?Ce:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=io(e,r);else{t=r;var s=J;J|=2;var i=zh();(Se!==e||Ce!==t)&&(jt=null,Or=he()+500,An(e,t));do try{ev();break}catch(a){Lh(e,a)}while(!0);mu(),no.current=i,J=s,pe!==null?t=0:(Se=null,Ce=0,t=ge)}if(t!==0){if(t===2&&(s=Ba(e),s!==0&&(r=s,t=ml(e,s))),t===1)throw n=Rs,An(e,0),Gt(e,r),We(e,he()),n;if(t===6)Gt(e,r);else{if(s=e.current.alternate,!(r&30)&&!Gg(s)&&(t=io(e,r),t===2&&(i=Ba(e),i!==0&&(r=i,t=ml(e,i))),t===1))throw n=Rs,An(e,0),Gt(e,r),We(e,he()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(x(345));case 2:Tn(e,Fe,jt);break;case 3:if(Gt(e,r),(r&130023424)===r&&(t=bu+500-he(),10<t)){if(Bi(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){je(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Qa(Tn.bind(null,e,Fe,jt),t);break}Tn(e,Fe,jt);break;case 4:if(Gt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-yt(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=he()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Yg(r/1960))-r,10<r){e.timeoutHandle=Qa(Tn.bind(null,e,Fe,jt),r);break}Tn(e,Fe,jt);break;case 5:Tn(e,Fe,jt);break;default:throw Error(x(329))}}}return We(e,he()),e.callbackNode===n?$h.bind(null,e):null}function ml(e,t){var n=as;return e.current.memoizedState.isDehydrated&&(An(e,t).flags|=256),e=io(e,t),e!==2&&(t=Fe,Fe=n,t!==null&&yl(t)),e}function yl(e){Fe===null?Fe=e:Fe.push.apply(Fe,e)}function Gg(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!_t(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Gt(e,t){for(t&=~Nu,t&=~Oo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-yt(t),r=1<<n;e[n]=-1,t&=~r}}function sf(e){if(J&6)throw Error(x(327));gr();var t=Bi(e,0);if(!(t&1))return We(e,he()),null;var n=io(e,t);if(e.tag!==0&&n===2){var r=Ba(e);r!==0&&(t=r,n=ml(e,r))}if(n===1)throw n=Rs,An(e,0),Gt(e,t),We(e,he()),n;if(n===6)throw Error(x(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tn(e,Fe,jt),We(e,he()),null}function Au(e,t){var n=J;J|=1;try{return e(t)}finally{J=n,J===0&&(Or=he()+500,Eo&&Sn())}}function Fn(e){tn!==null&&tn.tag===0&&!(J&6)&&gr();var t=J;J|=1;var n=ot.transition,r=Y;try{if(ot.transition=null,Y=1,e)return e()}finally{Y=r,ot.transition=n,J=t,!(J&6)&&Sn()}}function Iu(){Je=cr.current,ne(cr)}function An(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Og(n)),pe!==null)for(n=pe.return;n!==null;){var r=n;switch(du(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Wi();break;case 3:Tr(),ne(Ke),ne(be),ku();break;case 5:wu(r);break;case 4:Tr();break;case 13:ne(le);break;case 19:ne(le);break;case 10:yu(r.type._context);break;case 22:case 23:Iu()}n=n.return}if(Se=e,pe=e=cn(e.current,null),Ce=Je=t,ge=0,Rs=null,Nu=Oo=Bn=0,Fe=as=null,Nn!==null){for(t=0;t<Nn.length;t++)if(n=Nn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}Nn=null}return e}function Lh(e,t){do{var n=pe;try{if(mu(),Ei.current=to,eo){for(var r=ue.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}eo=!1}if(Un=0,ke=ye=ue=null,is=!1,Es=0,Ou.current=null,n===null||n.return===null){ge=1,Rs=t,pe=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=Ce,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var y=Zc(o);if(y!==null){y.flags&=-257,Wc(y,o,a,i,t),y.mode&1&&Kc(i,u,t),t=y,l=u;var w=t.updateQueue;if(w===null){var v=new Set;v.add(l),t.updateQueue=v}else w.add(l);break e}else{if(!(t&1)){Kc(i,u,t),Mu();break e}l=Error(x(426))}}else if(se&&a.mode&1){var N=Zc(o);if(N!==null){!(N.flags&65536)&&(N.flags|=256),Wc(N,o,a,i,t),hu(Rr(l,a));break e}}i=l=Rr(l,a),ge!==4&&(ge=2),as===null?as=[i]:as.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var p=wh(i,l,t);zc(i,p);break e;case 1:a=l;var f=i.type,m=i.stateNode;if(!(i.flags&128)&&(typeof f.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(ln===null||!ln.has(m)))){i.flags|=65536,t&=-t,i.lanes|=t;var k=kh(i,a,t);zc(i,k);break e}}i=i.return}while(i!==null)}Uh(n)}catch(T){t=T,pe===n&&n!==null&&(pe=n=n.return);continue}break}while(!0)}function zh(){var e=no.current;return no.current=to,e===null?to:e}function Mu(){(ge===0||ge===3||ge===2)&&(ge=4),Se===null||!(Bn&268435455)&&!(Oo&268435455)||Gt(Se,Ce)}function io(e,t){var n=J;J|=2;var r=zh();(Se!==e||Ce!==t)&&(jt=null,An(e,t));do try{Xg();break}catch(s){Lh(e,s)}while(!0);if(mu(),J=n,no.current=r,pe!==null)throw Error(x(261));return Se=null,Ce=0,ge}function Xg(){for(;pe!==null;)Dh(pe)}function ev(){for(;pe!==null&&!Cy();)Dh(pe)}function Dh(e){var t=Fh(e.alternate,e,Je);e.memoizedProps=e.pendingProps,t===null?Uh(e):pe=t,Ou.current=null}function Uh(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Hg(n,t),n!==null){n.flags&=32767,pe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ge=6,pe=null;return}}else if(n=Wg(n,t,Je),n!==null){pe=n;return}if(t=t.sibling,t!==null){pe=t;return}pe=t=e}while(t!==null);ge===0&&(ge=5)}function Tn(e,t,n){var r=Y,s=ot.transition;try{ot.transition=null,Y=1,tv(e,t,n,r)}finally{ot.transition=s,Y=r}return null}function tv(e,t,n,r){do gr();while(tn!==null);if(J&6)throw Error(x(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(x(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(jy(e,i),e===Se&&(pe=Se=null,Ce=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||pi||(pi=!0,Vh(Ui,function(){return gr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=ot.transition,ot.transition=null;var o=Y;Y=1;var a=J;J|=4,Ou.current=null,Qg(e,n),Ph(n,e),kg(Ha),Fi=!!Wa,Ha=Wa=null,e.current=n,qg(n),Ty(),J=a,Y=o,ot.transition=i}else e.current=n;if(pi&&(pi=!1,tn=e,so=s),i=e.pendingLanes,i===0&&(ln=null),Ny(n.stateNode),We(e,he()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(ro)throw ro=!1,e=hl,hl=null,e;return so&1&&e.tag!==0&&gr(),i=e.pendingLanes,i&1?e===pl?ls++:(ls=0,pl=e):ls=0,Sn(),null}function gr(){if(tn!==null){var e=wd(so),t=ot.transition,n=Y;try{if(ot.transition=null,Y=16>e?16:e,tn===null)var r=!1;else{if(e=tn,tn=null,so=0,J&6)throw Error(x(331));var s=J;for(J|=4,M=e.current;M!==null;){var i=M,o=i.child;if(M.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(M=u;M!==null;){var c=M;switch(c.tag){case 0:case 11:case 15:os(8,c,i)}var d=c.child;if(d!==null)d.return=c,M=d;else for(;M!==null;){c=M;var h=c.sibling,y=c.return;if(Ah(c),c===u){M=null;break}if(h!==null){h.return=y,M=h;break}M=y}}}var w=i.alternate;if(w!==null){var v=w.child;if(v!==null){w.child=null;do{var N=v.sibling;v.sibling=null,v=N}while(v!==null)}}M=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,M=o;else e:for(;M!==null;){if(i=M,i.flags&2048)switch(i.tag){case 0:case 11:case 15:os(9,i,i.return)}var p=i.sibling;if(p!==null){p.return=i.return,M=p;break e}M=i.return}}var f=e.current;for(M=f;M!==null;){o=M;var m=o.child;if(o.subtreeFlags&2064&&m!==null)m.return=o,M=m;else e:for(o=f;M!==null;){if(a=M,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ro(9,a)}}catch(T){fe(a,a.return,T)}if(a===o){M=null;break e}var k=a.sibling;if(k!==null){k.return=a.return,M=k;break e}M=a.return}}if(J=s,Sn(),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(_o,e)}catch{}r=!0}return r}finally{Y=n,ot.transition=t}}return!1}function of(e,t,n){t=Rr(n,t),t=wh(e,t,1),e=an(e,t,1),t=je(),e!==null&&(Ks(e,1,t),We(e,t))}function fe(e,t,n){if(e.tag===3)of(e,e,n);else for(;t!==null;){if(t.tag===3){of(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ln===null||!ln.has(r))){e=Rr(n,e),e=kh(t,e,1),t=an(t,e,1),e=je(),t!==null&&(Ks(t,1,e),We(t,e));break}}t=t.return}}function nv(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=je(),e.pingedLanes|=e.suspendedLanes&n,Se===e&&(Ce&n)===n&&(ge===4||ge===3&&(Ce&130023424)===Ce&&500>he()-bu?An(e,0):Nu|=n),We(e,t)}function Bh(e,t){t===0&&(e.mode&1?(t=si,si<<=1,!(si&130023424)&&(si=4194304)):t=1);var n=je();e=Vt(e,t),e!==null&&(Ks(e,t,n),We(e,n))}function rv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bh(e,n)}function sv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(x(314))}r!==null&&r.delete(t),Bh(e,n)}var Fh;Fh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ke.current)Ve=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ve=!1,Zg(e,t,n);Ve=!!(e.flags&131072)}else Ve=!1,se&&t.flags&1048576&&Wd(t,Qi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ti(e,t),e=t.pendingProps;var s=xr(t,be.current);yr(t,n),s=xu(null,t,r,e,s,n);var i=Eu();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ze(r)?(i=!0,Hi(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,vu(t),s.updater=To,t.stateNode=s,s._reactInternals=t,nl(t,r,e,n),t=il(null,t,r,!0,i,n)):(t.tag=0,se&&i&&fu(t),Ie(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ti(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=ov(r),e=ft(r,e),s){case 0:t=sl(null,t,r,e,n);break e;case 1:t=Qc(null,t,r,e,n);break e;case 11:t=Hc(null,t,r,e,n);break e;case 14:t=Jc(null,t,r,ft(r.type,e),n);break e}throw Error(x(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ft(r,s),sl(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ft(r,s),Qc(e,t,r,s,n);case 3:e:{if(Ch(t),e===null)throw Error(x(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Gd(e,t),Gi(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Rr(Error(x(423)),t),t=qc(e,t,r,n,s);break e}else if(r!==s){s=Rr(Error(x(424)),t),t=qc(e,t,r,n,s);break e}else for(Qe=on(t.stateNode.containerInfo.firstChild),qe=t,se=!0,pt=null,n=qd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Er(),r===s){t=Kt(e,t,n);break e}Ie(e,t,r,n)}t=t.child}return t;case 5:return Xd(t),e===null&&Xa(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Ja(r,s)?o=null:i!==null&&Ja(r,i)&&(t.flags|=32),Eh(e,t),Ie(e,t,o,n),t.child;case 6:return e===null&&Xa(t),null;case 13:return Th(e,t,n);case 4:return _u(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Cr(t,null,r,n):Ie(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ft(r,s),Hc(e,t,r,s,n);case 7:return Ie(e,t,t.pendingProps,n),t.child;case 8:return Ie(e,t,t.pendingProps.children,n),t.child;case 12:return Ie(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,X(qi,r._currentValue),r._currentValue=o,i!==null)if(_t(i.value,o)){if(i.children===s.children&&!Ke.current){t=Kt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Ut(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),el(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(x(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),el(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Ie(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,yr(t,n),s=at(s),r=r(s),t.flags|=1,Ie(e,t,r,n),t.child;case 14:return r=t.type,s=ft(r,t.pendingProps),s=ft(r.type,s),Jc(e,t,r,s,n);case 15:return Sh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ft(r,s),Ti(e,t),t.tag=1,Ze(r)?(e=!0,Hi(t)):e=!1,yr(t,n),_h(t,r,s),nl(t,r,s,n),il(null,t,r,!0,e,n);case 19:return Rh(e,t,n);case 22:return xh(e,t,n)}throw Error(x(156,t.tag))};function Vh(e,t){return yd(e,t)}function iv(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function it(e,t,n,r){return new iv(e,t,n,r)}function Pu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ov(e){if(typeof e=="function")return Pu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Xl)return 11;if(e===eu)return 14}return 2}function cn(e,t){var n=e.alternate;return n===null?(n=it(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ni(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")Pu(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case er:return In(n.children,s,i,t);case Gl:o=8,s|=8;break;case Ta:return e=it(12,n,t,s|2),e.elementType=Ta,e.lanes=i,e;case Ra:return e=it(13,n,t,s),e.elementType=Ra,e.lanes=i,e;case Oa:return e=it(19,n,t,s),e.elementType=Oa,e.lanes=i,e;case Xf:return No(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Yf:o=10;break e;case Gf:o=9;break e;case Xl:o=11;break e;case eu:o=14;break e;case Qt:o=16,r=null;break e}throw Error(x(130,e==null?e:typeof e,""))}return t=it(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function In(e,t,n,r){return e=it(7,e,r,t),e.lanes=n,e}function No(e,t,n,r){return e=it(22,e,r,t),e.elementType=Xf,e.lanes=n,e.stateNode={isHidden:!1},e}function ca(e,t,n){return e=it(6,e,null,t),e.lanes=n,e}function fa(e,t,n){return t=it(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function av(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zo(0),this.expirationTimes=Zo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zo(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function ju(e,t,n,r,s,i,o,a,l){return e=new av(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=it(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},vu(i),e}function lv(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Kh(e){if(!e)return pn;e=e._reactInternals;e:{if(Hn(e)!==e||e.tag!==1)throw Error(x(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ze(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(x(171))}if(e.tag===1){var n=e.type;if(Ze(n))return Kd(e,n,t)}return t}function Zh(e,t,n,r,s,i,o,a,l){return e=ju(n,r,!0,e,s,i,o,a,l),e.context=Kh(null),n=e.current,r=je(),s=un(n),i=Ut(r,s),i.callback=t??null,an(n,i,s),e.current.lanes=s,Ks(e,s,r),We(e,r),e}function bo(e,t,n,r){var s=t.current,i=je(),o=un(s);return n=Kh(n),t.context===null?t.context=n:t.pendingContext=n,t=Ut(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=an(s,t,o),e!==null&&(gt(e,s,o,i),xi(e,s,o)),o}function oo(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function af(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function $u(e,t){af(e,t),(e=e.alternate)&&af(e,t)}function uv(){return null}var Wh=typeof reportError=="function"?reportError:function(e){console.error(e)};function Lu(e){this._internalRoot=e}Ao.prototype.render=Lu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(x(409));bo(e,t,null,null)};Ao.prototype.unmount=Lu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fn(function(){bo(null,e,null,null)}),t[Ft]=null}};function Ao(e){this._internalRoot=e}Ao.prototype.unstable_scheduleHydration=function(e){if(e){var t=xd();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Yt.length&&t!==0&&t<Yt[n].priority;n++);Yt.splice(n,0,e),n===0&&Cd(e)}};function zu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Io(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function lf(){}function cv(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=oo(o);i.call(u)}}var o=Zh(t,r,e,0,null,!1,!1,"",lf);return e._reactRootContainer=o,e[Ft]=o.current,_s(e.nodeType===8?e.parentNode:e),Fn(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=oo(l);a.call(u)}}var l=ju(e,0,!1,null,null,!1,!1,"",lf);return e._reactRootContainer=l,e[Ft]=l.current,_s(e.nodeType===8?e.parentNode:e),Fn(function(){bo(t,l,n,r)}),l}function Mo(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=oo(o);a.call(l)}}bo(t,o,e,s)}else o=cv(n,t,e,s,r);return oo(o)}kd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Qr(t.pendingLanes);n!==0&&(ru(t,n|1),We(t,he()),!(J&6)&&(Or=he()+500,Sn()))}break;case 13:Fn(function(){var r=Vt(e,1);if(r!==null){var s=je();gt(r,e,1,s)}}),$u(e,1)}};su=function(e){if(e.tag===13){var t=Vt(e,134217728);if(t!==null){var n=je();gt(t,e,134217728,n)}$u(e,134217728)}};Sd=function(e){if(e.tag===13){var t=un(e),n=Vt(e,t);if(n!==null){var r=je();gt(n,e,t,r)}$u(e,t)}};xd=function(){return Y};Ed=function(e,t){var n=Y;try{return Y=e,t()}finally{Y=n}};za=function(e,t,n){switch(t){case"input":if(Aa(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=xo(r);if(!s)throw Error(x(90));td(r),Aa(r,s)}}}break;case"textarea":rd(e,n);break;case"select":t=n.value,t!=null&&dr(e,!!n.multiple,t,!1)}};cd=Au;fd=Fn;var fv={usingClientEntryPoint:!1,Events:[Ws,sr,xo,ld,ud,Au]},Zr={findFiberByHostInstance:On,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},dv={bundleType:Zr.bundleType,version:Zr.version,rendererPackageName:Zr.rendererPackageName,rendererConfig:Zr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ht.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=pd(e),e===null?null:e.stateNode},findFiberByHostInstance:Zr.findFiberByHostInstance||uv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mi.isDisabled&&mi.supportsFiber)try{_o=mi.inject(dv),Rt=mi}catch{}}et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fv;et.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!zu(t))throw Error(x(200));return lv(e,t,null,n)};et.createRoot=function(e,t){if(!zu(e))throw Error(x(299));var n=!1,r="",s=Wh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ju(e,1,!1,null,null,n,!1,r,s),e[Ft]=t.current,_s(e.nodeType===8?e.parentNode:e),new Lu(t)};et.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(x(188)):(e=Object.keys(e).join(","),Error(x(268,e)));return e=pd(t),e=e===null?null:e.stateNode,e};et.flushSync=function(e){return Fn(e)};et.hydrate=function(e,t,n){if(!Io(t))throw Error(x(200));return Mo(null,e,t,!0,n)};et.hydrateRoot=function(e,t,n){if(!zu(e))throw Error(x(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=Wh;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Zh(t,null,e,1,n??null,s,!1,i,o),e[Ft]=t.current,_s(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Ao(t)};et.render=function(e,t,n){if(!Io(t))throw Error(x(200));return Mo(null,e,t,!1,n)};et.unmountComponentAtNode=function(e){if(!Io(e))throw Error(x(40));return e._reactRootContainer?(Fn(function(){Mo(null,null,e,!1,function(){e._reactRootContainer=null,e[Ft]=null})}),!0):!1};et.unstable_batchedUpdates=Au;et.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Io(n))throw Error(x(200));if(e==null||e._reactInternals===void 0)throw Error(x(38));return Mo(e,t,n,!1,r)};et.version="18.3.1-next-f1338f8080-20240426";function Hh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Hh)}catch(e){console.error(e)}}Hh(),Hf.exports=et;var hv=Hf.exports,Jh,uf=hv;Jh=uf.createRoot,uf.hydrateRoot;var H;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(const o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(H||(H={}));var gl;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(gl||(gl={}));const A=H.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xt=e=>{switch(typeof e){case"undefined":return A.undefined;case"string":return A.string;case"number":return isNaN(e)?A.nan:A.number;case"boolean":return A.boolean;case"function":return A.function;case"bigint":return A.bigint;case"symbol":return A.symbol;case"object":return Array.isArray(e)?A.array:e===null?A.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?A.promise:typeof Map<"u"&&e instanceof Map?A.map:typeof Set<"u"&&e instanceof Set?A.set:typeof Date<"u"&&e instanceof Date?A.date:A.object;default:return A.unknown}},E=H.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),pv=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Ye extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,l=0;for(;l<o.path.length;){const u=o.path[l];l===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(o))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return s(this),r}static assert(t){if(!(t instanceof Ye))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,H.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ye.create=e=>new Ye(e);const Nr=(e,t)=>{let n;switch(e.code){case E.invalid_type:e.received===A.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case E.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,H.jsonStringifyReplacer)}`;break;case E.unrecognized_keys:n=`Unrecognized key(s) in object: ${H.joinValues(e.keys,", ")}`;break;case E.invalid_union:n="Invalid input";break;case E.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${H.joinValues(e.options)}`;break;case E.invalid_enum_value:n=`Invalid enum value. Expected ${H.joinValues(e.options)}, received '${e.received}'`;break;case E.invalid_arguments:n="Invalid function arguments";break;case E.invalid_return_type:n="Invalid function return type";break;case E.invalid_date:n="Invalid date";break;case E.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:H.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case E.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case E.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case E.custom:n="Invalid input";break;case E.invalid_intersection_types:n="Intersection results could not be merged";break;case E.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case E.not_finite:n="Number must be finite";break;default:n=t.defaultError,H.assertNever(e)}return{message:n}};let Qh=Nr;function mv(e){Qh=e}function ao(){return Qh}const lo=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}},yv=[];function b(e,t){const n=ao(),r=lo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Nr?void 0:Nr].filter(s=>!!s)});e.common.issues.push(r)}class Ae{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return D;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return Ae.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return D;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:t.value,value:r}}}const D=Object.freeze({status:"aborted"}),fr=e=>({status:"dirty",value:e}),Le=e=>({status:"valid",value:e}),vl=e=>e.status==="aborted",_l=e=>e.status==="dirty",Os=e=>e.status==="valid",Ns=e=>typeof Promise<"u"&&e instanceof Promise;function uo(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function qh(e,t,n,r,s){if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var j;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(j||(j={}));var Yr,Gr;class At{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const cf=(e,t)=>{if(Os(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ye(e.common.issues);return this._error=n,this._error}}};function V(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,a)=>{var l,u;const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:(l=c??r)!==null&&l!==void 0?l:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(u=c??n)!==null&&u!==void 0?u:a.defaultError}},description:s}}class K{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Xt(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Xt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ae,ctx:{common:t.parent.common,data:t.data,parsedType:Xt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ns(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xt(t)},i=this._parseSync({data:t,path:s.path,parent:s});return cf(s,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xt(t)},s=this._parse({data:t,path:r.path,parent:r}),i=await(Ns(s)?s:Promise.resolve(s));return cf(r,i)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const o=t(s),a=()=>i.addIssue({code:E.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new wt({schema:this,typeName:z.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Nt.create(this,this._def)}nullable(){return vn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return vt.create(this,this._def)}promise(){return Ar.create(this,this._def)}or(t){return Ms.create([this,t],this._def)}and(t){return Ps.create(this,t,this._def)}transform(t){return new wt({...V(this._def),schema:this,typeName:z.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ds({...V(this._def),innerType:this,defaultValue:n,typeName:z.ZodDefault})}brand(){return new Du({typeName:z.ZodBranded,type:this,...V(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Us({...V(this._def),innerType:this,catchValue:n,typeName:z.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Js.create(this,t)}readonly(){return Bs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const gv=/^c[^\s-]{8,}$/i,vv=/^[0-9a-z]+$/,_v=/^[0-9A-HJKMNP-TV-Z]{26}$/,wv=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,kv=/^[a-z0-9_-]{21}$/i,Sv=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,xv=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ev="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let da;const Cv=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Tv=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Rv=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Yh="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ov=new RegExp(`^${Yh}$`);function Gh(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Nv(e){return new RegExp(`^${Gh(e)}$`)}function Xh(e){let t=`${Yh}T${Gh(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function bv(e,t){return!!((t==="v4"||!t)&&Cv.test(e)||(t==="v6"||!t)&&Tv.test(e))}class mt extends K{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==A.string){const i=this._getOrReturnCtx(t);return b(i,{code:E.invalid_type,expected:A.string,received:i.parsedType}),D}const r=new Ae;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),b(s,{code:E.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),b(s,{code:E.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(t,s),o?b(s,{code:E.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&b(s,{code:E.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")xv.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"email",code:E.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")da||(da=new RegExp(Ev,"u")),da.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"emoji",code:E.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")wv.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"uuid",code:E.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")kv.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"nanoid",code:E.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")gv.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"cuid",code:E.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")vv.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"cuid2",code:E.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")_v.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"ulid",code:E.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),b(s,{validation:"url",code:E.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"regex",code:E.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),b(s,{code:E.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(s=this._getOrReturnCtx(t,s),b(s,{code:E.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),b(s,{code:E.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Xh(i).test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{code:E.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Ov.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{code:E.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Nv(i).test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{code:E.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Sv.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"duration",code:E.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?bv(t.data,i.version)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"ip",code:E.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Rv.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"base64",code:E.invalid_string,message:i.message}),r.dirty()):H.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:E.invalid_string,...j.errToObj(r)})}_addCheck(t){return new mt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...j.errToObj(t)})}url(t){return this._addCheck({kind:"url",...j.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...j.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...j.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...j.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...j.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...j.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...j.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...j.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...j.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...j.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...j.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...j.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...j.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...j.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...j.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...j.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...j.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...j.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...j.errToObj(n)})}nonempty(t){return this.min(1,j.errToObj(t))}trim(){return new mt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new mt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new mt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}mt.create=e=>{var t;return new mt({checks:[],typeName:z.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...V(e)})};function Av(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,i=parseInt(e.toFixed(s).replace(".","")),o=parseInt(t.toFixed(s).replace(".",""));return i%o/Math.pow(10,s)}class mn extends K{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==A.number){const i=this._getOrReturnCtx(t);return b(i,{code:E.invalid_type,expected:A.number,received:i.parsedType}),D}let r;const s=new Ae;for(const i of this._def.checks)i.kind==="int"?H.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),b(r,{code:E.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),b(r,{code:E.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),b(r,{code:E.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?Av(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),b(r,{code:E.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),b(r,{code:E.not_finite,message:i.message}),s.dirty()):H.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,j.toString(n))}gt(t,n){return this.setLimit("min",t,!1,j.toString(n))}lte(t,n){return this.setLimit("max",t,!0,j.toString(n))}lt(t,n){return this.setLimit("max",t,!1,j.toString(n))}setLimit(t,n,r,s){return new mn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:j.toString(s)}]})}_addCheck(t){return new mn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:j.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:j.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:j.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:j.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:j.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:j.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:j.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:j.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:j.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&H.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}mn.create=e=>new mn({checks:[],typeName:z.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...V(e)});class yn extends K{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==A.bigint){const i=this._getOrReturnCtx(t);return b(i,{code:E.invalid_type,expected:A.bigint,received:i.parsedType}),D}let r;const s=new Ae;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),b(r,{code:E.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),b(r,{code:E.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),b(r,{code:E.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):H.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,j.toString(n))}gt(t,n){return this.setLimit("min",t,!1,j.toString(n))}lte(t,n){return this.setLimit("max",t,!0,j.toString(n))}lt(t,n){return this.setLimit("max",t,!1,j.toString(n))}setLimit(t,n,r,s){return new yn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:j.toString(s)}]})}_addCheck(t){return new yn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:j.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:j.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:j.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:j.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:j.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}yn.create=e=>{var t;return new yn({checks:[],typeName:z.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...V(e)})};class bs extends K{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==A.boolean){const r=this._getOrReturnCtx(t);return b(r,{code:E.invalid_type,expected:A.boolean,received:r.parsedType}),D}return Le(t.data)}}bs.create=e=>new bs({typeName:z.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...V(e)});class Vn extends K{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==A.date){const i=this._getOrReturnCtx(t);return b(i,{code:E.invalid_type,expected:A.date,received:i.parsedType}),D}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return b(i,{code:E.invalid_date}),D}const r=new Ae;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),b(s,{code:E.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),b(s,{code:E.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):H.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Vn({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:j.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:j.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Vn.create=e=>new Vn({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:z.ZodDate,...V(e)});class co extends K{_parse(t){if(this._getType(t)!==A.symbol){const r=this._getOrReturnCtx(t);return b(r,{code:E.invalid_type,expected:A.symbol,received:r.parsedType}),D}return Le(t.data)}}co.create=e=>new co({typeName:z.ZodSymbol,...V(e)});class As extends K{_parse(t){if(this._getType(t)!==A.undefined){const r=this._getOrReturnCtx(t);return b(r,{code:E.invalid_type,expected:A.undefined,received:r.parsedType}),D}return Le(t.data)}}As.create=e=>new As({typeName:z.ZodUndefined,...V(e)});class Is extends K{_parse(t){if(this._getType(t)!==A.null){const r=this._getOrReturnCtx(t);return b(r,{code:E.invalid_type,expected:A.null,received:r.parsedType}),D}return Le(t.data)}}Is.create=e=>new Is({typeName:z.ZodNull,...V(e)});class br extends K{constructor(){super(...arguments),this._any=!0}_parse(t){return Le(t.data)}}br.create=e=>new br({typeName:z.ZodAny,...V(e)});class Mn extends K{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Le(t.data)}}Mn.create=e=>new Mn({typeName:z.ZodUnknown,...V(e)});class Zt extends K{_parse(t){const n=this._getOrReturnCtx(t);return b(n,{code:E.invalid_type,expected:A.never,received:n.parsedType}),D}}Zt.create=e=>new Zt({typeName:z.ZodNever,...V(e)});class fo extends K{_parse(t){if(this._getType(t)!==A.undefined){const r=this._getOrReturnCtx(t);return b(r,{code:E.invalid_type,expected:A.void,received:r.parsedType}),D}return Le(t.data)}}fo.create=e=>new fo({typeName:z.ZodVoid,...V(e)});class vt extends K{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==A.array)return b(n,{code:E.invalid_type,expected:A.array,received:n.parsedType}),D;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(o||a)&&(b(n,{code:o?E.too_big:E.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(b(n,{code:E.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(b(n,{code:E.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>s.type._parseAsync(new At(n,o,n.path,a)))).then(o=>Ae.mergeArray(r,o));const i=[...n.data].map((o,a)=>s.type._parseSync(new At(n,o,n.path,a)));return Ae.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new vt({...this._def,minLength:{value:t,message:j.toString(n)}})}max(t,n){return new vt({...this._def,maxLength:{value:t,message:j.toString(n)}})}length(t,n){return new vt({...this._def,exactLength:{value:t,message:j.toString(n)}})}nonempty(t){return this.min(1,t)}}vt.create=(e,t)=>new vt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:z.ZodArray,...V(t)});function qn(e){if(e instanceof ae){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Nt.create(qn(r))}return new ae({...e._def,shape:()=>t})}else return e instanceof vt?new vt({...e._def,type:qn(e.element)}):e instanceof Nt?Nt.create(qn(e.unwrap())):e instanceof vn?vn.create(qn(e.unwrap())):e instanceof It?It.create(e.items.map(t=>qn(t))):e}class ae extends K{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=H.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==A.object){const u=this._getOrReturnCtx(t);return b(u,{code:E.invalid_type,expected:A.object,received:u.parsedType}),D}const{status:r,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Zt&&this._def.unknownKeys==="strip"))for(const u in s.data)o.includes(u)||a.push(u);const l=[];for(const u of o){const c=i[u],d=s.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new At(s,d,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Zt){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:s.data[c]}});else if(u==="strict")a.length>0&&(b(s,{code:E.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of a){const d=s.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new At(s,d,s.path,c)),alwaysSet:c in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,h=await c.value;u.push({key:d,value:h,alwaysSet:c.alwaysSet})}return u}).then(u=>Ae.mergeObjectSync(r,u)):Ae.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return j.errToObj,new ae({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,i,o,a;const l=(o=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=j.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ae({...this._def,unknownKeys:"strip"})}passthrough(){return new ae({...this._def,unknownKeys:"passthrough"})}extend(t){return new ae({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ae({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:z.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ae({...this._def,catchall:t})}pick(t){const n={};return H.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ae({...this._def,shape:()=>n})}omit(t){const n={};return H.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ae({...this._def,shape:()=>n})}deepPartial(){return qn(this)}partial(t){const n={};return H.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new ae({...this._def,shape:()=>n})}required(t){const n={};return H.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Nt;)i=i._def.innerType;n[r]=i}}),new ae({...this._def,shape:()=>n})}keyof(){return ep(H.objectKeys(this.shape))}}ae.create=(e,t)=>new ae({shape:()=>e,unknownKeys:"strip",catchall:Zt.create(),typeName:z.ZodObject,...V(t)});ae.strictCreate=(e,t)=>new ae({shape:()=>e,unknownKeys:"strict",catchall:Zt.create(),typeName:z.ZodObject,...V(t)});ae.lazycreate=(e,t)=>new ae({shape:e,unknownKeys:"strip",catchall:Zt.create(),typeName:z.ZodObject,...V(t)});class Ms extends K{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new Ye(a.ctx.common.issues));return b(n,{code:E.invalid_union,unionErrors:o}),D}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!i&&(i={result:c,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(l=>new Ye(l));return b(n,{code:E.invalid_union,unionErrors:a}),D}}get options(){return this._def.options}}Ms.create=(e,t)=>new Ms({options:e,typeName:z.ZodUnion,...V(t)});const Pt=e=>e instanceof $s?Pt(e.schema):e instanceof wt?Pt(e.innerType()):e instanceof Ls?[e.value]:e instanceof gn?e.options:e instanceof zs?H.objectValues(e.enum):e instanceof Ds?Pt(e._def.innerType):e instanceof As?[void 0]:e instanceof Is?[null]:e instanceof Nt?[void 0,...Pt(e.unwrap())]:e instanceof vn?[null,...Pt(e.unwrap())]:e instanceof Du||e instanceof Bs?Pt(e.unwrap()):e instanceof Us?Pt(e._def.innerType):[];class Po extends K{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==A.object)return b(n,{code:E.invalid_type,expected:A.object,received:n.parsedType}),D;const r=this.discriminator,s=n.data[r],i=this.optionsMap.get(s);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(b(n,{code:E.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),D)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const i of n){const o=Pt(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of o){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new Po({typeName:z.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...V(r)})}}function wl(e,t){const n=Xt(e),r=Xt(t);if(e===t)return{valid:!0,data:e};if(n===A.object&&r===A.object){const s=H.objectKeys(t),i=H.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(const a of i){const l=wl(e[a],t[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(n===A.array&&r===A.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i<e.length;i++){const o=e[i],a=t[i],l=wl(o,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===A.date&&r===A.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ps extends K{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(i,o)=>{if(vl(i)||vl(o))return D;const a=wl(i.value,o.value);return a.valid?((_l(i)||_l(o))&&n.dirty(),{status:n.value,value:a.data}):(b(r,{code:E.invalid_intersection_types}),D)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ps.create=(e,t,n)=>new Ps({left:e,right:t,typeName:z.ZodIntersection,...V(n)});class It extends K{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==A.array)return b(r,{code:E.invalid_type,expected:A.array,received:r.parsedType}),D;if(r.data.length<this._def.items.length)return b(r,{code:E.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),D;!this._def.rest&&r.data.length>this._def.items.length&&(b(r,{code:E.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new At(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>Ae.mergeArray(n,o)):Ae.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new It({...this._def,rest:t})}}It.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new It({items:e,typeName:z.ZodTuple,rest:null,...V(t)})};class js extends K{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==A.object)return b(r,{code:E.invalid_type,expected:A.object,received:r.parsedType}),D;const s=[],i=this._def.keyType,o=this._def.valueType;for(const a in r.data)s.push({key:i._parse(new At(r,a,r.path,a)),value:o._parse(new At(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Ae.mergeObjectAsync(n,s):Ae.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof K?new js({keyType:t,valueType:n,typeName:z.ZodRecord,...V(r)}):new js({keyType:mt.create(),valueType:t,typeName:z.ZodRecord,...V(n)})}}class ho extends K{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==A.map)return b(r,{code:E.invalid_type,expected:A.map,received:r.parsedType}),D;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([a,l],u)=>({key:s._parse(new At(r,a,r.path,[u,"key"])),value:i._parse(new At(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return D;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of o){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return D;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}}}}ho.create=(e,t,n)=>new ho({valueType:t,keyType:e,typeName:z.ZodMap,...V(n)});class Kn extends K{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==A.set)return b(r,{code:E.invalid_type,expected:A.set,received:r.parsedType}),D;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(b(r,{code:E.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(b(r,{code:E.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(l){const u=new Set;for(const c of l){if(c.status==="aborted")return D;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>i._parse(new At(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(t,n){return new Kn({...this._def,minSize:{value:t,message:j.toString(n)}})}max(t,n){return new Kn({...this._def,maxSize:{value:t,message:j.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Kn.create=(e,t)=>new Kn({valueType:e,minSize:null,maxSize:null,typeName:z.ZodSet,...V(t)});class vr extends K{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==A.function)return b(n,{code:E.invalid_type,expected:A.function,received:n.parsedType}),D;function r(a,l){return lo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ao(),Nr].filter(u=>!!u),issueData:{code:E.invalid_arguments,argumentsError:l}})}function s(a,l){return lo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ao(),Nr].filter(u=>!!u),issueData:{code:E.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Ar){const a=this;return Le(async function(...l){const u=new Ye([]),c=await a._def.args.parseAsync(l,i).catch(y=>{throw u.addIssue(r(l,y)),u}),d=await Reflect.apply(o,this,c);return await a._def.returns._def.type.parseAsync(d,i).catch(y=>{throw u.addIssue(s(d,y)),u})})}else{const a=this;return Le(function(...l){const u=a._def.args.safeParse(l,i);if(!u.success)throw new Ye([r(l,u.error)]);const c=Reflect.apply(o,this,u.data),d=a._def.returns.safeParse(c,i);if(!d.success)throw new Ye([s(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new vr({...this._def,args:It.create(t).rest(Mn.create())})}returns(t){return new vr({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new vr({args:t||It.create([]).rest(Mn.create()),returns:n||Mn.create(),typeName:z.ZodFunction,...V(r)})}}class $s extends K{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}$s.create=(e,t)=>new $s({getter:e,typeName:z.ZodLazy,...V(t)});class Ls extends K{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return b(n,{received:n.data,code:E.invalid_literal,expected:this._def.value}),D}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ls.create=(e,t)=>new Ls({value:e,typeName:z.ZodLiteral,...V(t)});function ep(e,t){return new gn({values:e,typeName:z.ZodEnum,...V(t)})}class gn extends K{constructor(){super(...arguments),Yr.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return b(n,{expected:H.joinValues(r),received:n.parsedType,code:E.invalid_type}),D}if(uo(this,Yr)||qh(this,Yr,new Set(this._def.values)),!uo(this,Yr).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return b(n,{received:n.data,code:E.invalid_enum_value,options:r}),D}return Le(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return gn.create(t,{...this._def,...n})}exclude(t,n=this._def){return gn.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Yr=new WeakMap;gn.create=ep;class zs extends K{constructor(){super(...arguments),Gr.set(this,void 0)}_parse(t){const n=H.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==A.string&&r.parsedType!==A.number){const s=H.objectValues(n);return b(r,{expected:H.joinValues(s),received:r.parsedType,code:E.invalid_type}),D}if(uo(this,Gr)||qh(this,Gr,new Set(H.getValidEnumValues(this._def.values))),!uo(this,Gr).has(t.data)){const s=H.objectValues(n);return b(r,{received:r.data,code:E.invalid_enum_value,options:s}),D}return Le(t.data)}get enum(){return this._def.values}}Gr=new WeakMap;zs.create=(e,t)=>new zs({values:e,typeName:z.ZodNativeEnum,...V(t)});class Ar extends K{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==A.promise&&n.common.async===!1)return b(n,{code:E.invalid_type,expected:A.promise,received:n.parsedType}),D;const r=n.parsedType===A.promise?n.data:Promise.resolve(n.data);return Le(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ar.create=(e,t)=>new Ar({type:e,typeName:z.ZodPromise,...V(t)});class wt extends K{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===z.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{b(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return D;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?D:l.status==="dirty"||n.value==="dirty"?fr(l.value):l});{if(n.value==="aborted")return D;const a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?D:a.status==="dirty"||n.value==="dirty"?fr(a.value):a}}if(s.type==="refinement"){const o=a=>{const l=s.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?D:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?D:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Os(o))return o;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Os(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:n.value,value:a})):o);H.assertNever(s)}}wt.create=(e,t,n)=>new wt({schema:e,typeName:z.ZodEffects,effect:t,...V(n)});wt.createWithPreprocess=(e,t,n)=>new wt({schema:t,effect:{type:"preprocess",transform:e},typeName:z.ZodEffects,...V(n)});class Nt extends K{_parse(t){return this._getType(t)===A.undefined?Le(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Nt.create=(e,t)=>new Nt({innerType:e,typeName:z.ZodOptional,...V(t)});class vn extends K{_parse(t){return this._getType(t)===A.null?Le(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}vn.create=(e,t)=>new vn({innerType:e,typeName:z.ZodNullable,...V(t)});class Ds extends K{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===A.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ds.create=(e,t)=>new Ds({innerType:e,typeName:z.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...V(t)});class Us extends K{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ns(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ye(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ye(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Us.create=(e,t)=>new Us({innerType:e,typeName:z.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...V(t)});class po extends K{_parse(t){if(this._getType(t)!==A.nan){const r=this._getOrReturnCtx(t);return b(r,{code:E.invalid_type,expected:A.nan,received:r.parsedType}),D}return{status:"valid",value:t.data}}}po.create=e=>new po({typeName:z.ZodNaN,...V(e)});const Iv=Symbol("zod_brand");class Du extends K{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Js extends K{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?D:i.status==="dirty"?(n.dirty(),fr(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?D:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new Js({in:t,out:n,typeName:z.ZodPipeline})}}class Bs extends K{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Os(s)&&(s.value=Object.freeze(s.value)),s);return Ns(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Bs.create=(e,t)=>new Bs({innerType:e,typeName:z.ZodReadonly,...V(t)});function tp(e,t={},n){return e?br.create().superRefine((r,s)=>{var i,o;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(o=(i=a.fatal)!==null&&i!==void 0?i:n)!==null&&o!==void 0?o:!0,u=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...u,fatal:l})}}):br.create()}const Mv={object:ae.lazycreate};var z;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(z||(z={}));const Pv=(e,t={message:`Input not instance of ${e.name}`})=>tp(n=>n instanceof e,t),np=mt.create,rp=mn.create,jv=po.create,$v=yn.create,sp=bs.create,Lv=Vn.create,zv=co.create,Dv=As.create,Uv=Is.create,Bv=br.create,Fv=Mn.create,Vv=Zt.create,Kv=fo.create,Zv=vt.create,bi=ae.create,Wv=ae.strictCreate,Hv=Ms.create,Jv=Po.create,Qv=Ps.create,qv=It.create,Yv=js.create,Gv=ho.create,Xv=Kn.create,e0=vr.create,t0=$s.create,n0=Ls.create,r0=gn.create,s0=zs.create,i0=Ar.create,ff=wt.create,o0=Nt.create,a0=vn.create,l0=wt.createWithPreprocess,u0=Js.create,c0=()=>np().optional(),f0=()=>rp().optional(),d0=()=>sp().optional(),h0={string:e=>mt.create({...e,coerce:!0}),number:e=>mn.create({...e,coerce:!0}),boolean:e=>bs.create({...e,coerce:!0}),bigint:e=>yn.create({...e,coerce:!0}),date:e=>Vn.create({...e,coerce:!0})},p0=D;var te=Object.freeze({__proto__:null,defaultErrorMap:Nr,setErrorMap:mv,getErrorMap:ao,makeIssue:lo,EMPTY_PATH:yv,addIssueToContext:b,ParseStatus:Ae,INVALID:D,DIRTY:fr,OK:Le,isAborted:vl,isDirty:_l,isValid:Os,isAsync:Ns,get util(){return H},get objectUtil(){return gl},ZodParsedType:A,getParsedType:Xt,ZodType:K,datetimeRegex:Xh,ZodString:mt,ZodNumber:mn,ZodBigInt:yn,ZodBoolean:bs,ZodDate:Vn,ZodSymbol:co,ZodUndefined:As,ZodNull:Is,ZodAny:br,ZodUnknown:Mn,ZodNever:Zt,ZodVoid:fo,ZodArray:vt,ZodObject:ae,ZodUnion:Ms,ZodDiscriminatedUnion:Po,ZodIntersection:Ps,ZodTuple:It,ZodRecord:js,ZodMap:ho,ZodSet:Kn,ZodFunction:vr,ZodLazy:$s,ZodLiteral:Ls,ZodEnum:gn,ZodNativeEnum:zs,ZodPromise:Ar,ZodEffects:wt,ZodTransformer:wt,ZodOptional:Nt,ZodNullable:vn,ZodDefault:Ds,ZodCatch:Us,ZodNaN:po,BRAND:Iv,ZodBranded:Du,ZodPipeline:Js,ZodReadonly:Bs,custom:tp,Schema:K,ZodSchema:K,late:Mv,get ZodFirstPartyTypeKind(){return z},coerce:h0,any:Bv,array:Zv,bigint:$v,boolean:sp,date:Lv,discriminatedUnion:Jv,effect:ff,enum:r0,function:e0,instanceof:Pv,intersection:Qv,lazy:t0,literal:n0,map:Gv,nan:jv,nativeEnum:s0,never:Vv,null:Uv,nullable:a0,number:rp,object:bi,oboolean:d0,onumber:f0,optional:o0,ostring:c0,pipeline:u0,preprocess:l0,promise:i0,record:Yv,set:Xv,strictObject:Wv,string:np,symbol:zv,transformer:ff,tuple:qv,undefined:Dv,union:Hv,unknown:Fv,void:Kv,NEVER:p0,ZodIssueCode:E,quotelessJson:pv,ZodError:Ye});const ip={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"Switch Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},ha=Xp(ip).map(([e])=>te.literal(Number(e))),m0=te.union([ha[0],ha[1],...ha]);te.tuple([m0,te.string()]);function y0(){return O.jsxs("svg",{id:"uuid-3d2d6be6-f179-42a3-9511-1e9ddeb8575f",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 500 101",children:[O.jsx("title",{children:"Tempest Games Logo"}),O.jsx("path",{d:"M155.76.93v59.89h-17.11V7.78h-13.69V.93h30.8Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M202.91,7.86h-13.18v17.03h13.18v6.84h-13.18v22.24h13.18v6.84h-30.29V.93h30.29v6.93Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M289.49.93v59.89h-17.11V7.78h-.43c-8.21,0-11.21,5.82-11.21,17.03v36.02h-16.25V24.8c0-11.21-2.99-17.03-11.21-17.03h-.43v53.04h-17.11V.93h18.74c9.92,0,15.31,4.96,18.14,11.21,2.82-6.25,8.21-11.21,18.14-11.21h18.73Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M352.82,29.68c0,11.72-6.42,19.16-24.55,19.16h-4.53v11.98h-17.11V1.1l46.2-.17v28.75ZM323.73,7.78v34.22h2.48c7.36,0,9.5-4.11,9.5-12.15V7.78h-11.98Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M396.8,7.86h-13.17v17.03h13.17v6.84h-13.17v22.24h13.17v6.84h-30.28V.93h30.28v6.93Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M425.9,12.57v14.03h27.89v16.94c0,12.75-1.71,18.13-16.43,18.13h-14.54c-9.58,0-14.03-2.74-14.03-11.97v-5.99h15.4v5.13c0,4.53.77,5.99,4.62,5.99h1.71c5.05,0,6.16-1.46,6.16-6.84v-14.54h-27.89v-16.68c0-13.52,3.85-16.68,18.82-16.68h12.83c8.81,0,13.17,1.54,13.17,10.78v7.19h-15.4v-6.5c0-3.42-1.03-4.62-4.45-4.62h-1.45c-4.28,0-6.42,1.46-6.42,5.65Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M500,7.78h-13.69v53.04h-17.11V.93h30.8v6.84Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M155.96,93.78v-3.57h-5.58v-7.14h13.39v17.85h-24.76v-28.56h24.76v7.14h-16.96v14.28h9.15Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M224.26,100.92h-8.25v-10.71h-8.25v3.57h4.68v7.14h-12.94v-17.85h16.51v-3.57h-16.51v-7.14h24.76v28.56Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M259.99,72.36h30.57v28.56h-7.81v-21.42h-3.57v21.42h-7.81v-21.42h-3.57v21.42h-7.81v-28.56Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M343.24,83.08v-3.57h-9.14v14.28h16.96v7.14h-24.76v-28.56h24.76v17.85h-13.38v-7.14h5.57Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M394.59,79.5v3.57h16.96v17.85h-24.76v-7.14h16.96v-3.57h-16.96v-17.85h24.76v7.14h-16.96Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M0,63.42v-20.84h20.83L0,63.42ZM100,.92v32.29h-35.42v8.33h-8.33V14.46h-22.92l1.04,7.29h9.38v19.79h-8.33v-8.33H0V.92h100ZM0,100.92v-26.04l6.25-1.04,25-26.04,1.04,1.05-10.42,18.75-4.16,7.29h13.54l3.13-3.12,8.33-22.92h1.04v41.66h3.12l9.38-8.33v-33.33h1.04l8.33,22.92,3.12,3.12h13.54l-4.17-7.29-10.42-19.8,1.04-1.04,25,27.09,6.25,1.04v26.04H0ZM100,42.59v20.84l-20.83-20.84h20.83Z",style:{fill:"#fff200",strokeWidth:0}})]})}const g0={class:"_class_1g72u_1"};function v0(e){return["required",e]}function _0(e){return["optional",e]}function w0(e,t){let n=e;for(const r of t){if(n===null||typeof r!="string")return!1;if(r in n[1])n=n[1][r];else return!1}if(n===null)return!0;switch(n[0]){case"required":return!1;case"optional":return!0}}const Mt=Object.create(null);Mt.open="0";Mt.close="1";Mt.ping="2";Mt.pong="3";Mt.message="4";Mt.upgrade="5";Mt.noop="6";const Ai=Object.create(null);Object.keys(Mt).forEach(e=>{Ai[Mt[e]]=e});const kl={type:"error",data:"parser error"},op=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ap=typeof ArrayBuffer=="function",lp=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Uu=({type:e,data:t},n,r)=>op&&t instanceof Blob?n?r(t):df(t,r):ap&&(t instanceof ArrayBuffer||lp(t))?n?r(t):df(new Blob([t]),r):r(Mt[e]+(t||"")),df=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function hf(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let pa;function k0(e,t){if(op&&e.data instanceof Blob)return e.data.arrayBuffer().then(hf).then(t);if(ap&&(e.data instanceof ArrayBuffer||lp(e.data)))return t(hf(e.data));Uu(e,!1,n=>{pa||(pa=new TextEncoder),t(pa.encode(n))})}const pf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<pf.length;e++)Xr[pf.charCodeAt(e)]=e;const S0=e=>{let t=e.length*.75,n=e.length,r,s=0,i,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),c=new Uint8Array(u);for(r=0;r<n;r+=4)i=Xr[e.charCodeAt(r)],o=Xr[e.charCodeAt(r+1)],a=Xr[e.charCodeAt(r+2)],l=Xr[e.charCodeAt(r+3)],c[s++]=i<<2|o>>4,c[s++]=(o&15)<<4|a>>2,c[s++]=(a&3)<<6|l&63;return u},x0=typeof ArrayBuffer=="function",Bu=(e,t)=>{if(typeof e!="string")return{type:"message",data:up(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:E0(e.substring(1),t)}:Ai[n]?e.length>1?{type:Ai[n],data:e.substring(1)}:{type:Ai[n]}:kl},E0=(e,t)=>{if(x0){const n=S0(e);return up(n,t)}else return{base64:!0,data:e}},up=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},cp="",C0=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((i,o)=>{Uu(i,!1,a=>{r[o]=a,++s===n&&t(r.join(cp))})})},T0=(e,t)=>{const n=e.split(cp),r=[];for(let s=0;s<n.length;s++){const i=Bu(n[s],t);if(r.push(i),i.type==="error")break}return r};function R0(){return new TransformStream({transform(e,t){k0(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const i=new DataView(s.buffer);i.setUint8(0,126),i.setUint16(1,r)}else{s=new Uint8Array(9);const i=new DataView(s.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let ma;function yi(e){return e.reduce((t,n)=>t+n.length,0)}function gi(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function O0(e,t){ma||(ma=new TextDecoder);const n=[];let r=0,s=-1,i=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(yi(n)<1)break;const l=gi(n,1);i=(l[0]&128)===128,s=l[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(yi(n)<2)break;const l=gi(n,2);s=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(yi(n)<8)break;const l=gi(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),c=u.getUint32(0);if(c>Math.pow(2,21)-1){a.enqueue(kl);break}s=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(yi(n)<s)break;const l=gi(n,s);a.enqueue(Bu(i?l:ma.decode(l),t)),r=0}if(s===0||s>e){a.enqueue(kl);break}}}})}const fp=4;function me(e){if(e)return N0(e)}function N0(e){for(var t in me.prototype)e[t]=me.prototype[t];return e}me.prototype.on=me.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};me.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};me.prototype.off=me.prototype.removeListener=me.prototype.removeAllListeners=me.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this};me.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this};me.prototype.emitReserved=me.prototype.emit;me.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};me.prototype.hasListeners=function(e){return!!this.listeners(e).length};const jo=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),st=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),b0="arraybuffer";function dp(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const A0=st.setTimeout,I0=st.clearTimeout;function $o(e,t){t.useNativeTimers?(e.setTimeoutFn=A0.bind(st),e.clearTimeoutFn=I0.bind(st)):(e.setTimeoutFn=st.setTimeout.bind(st),e.clearTimeoutFn=st.clearTimeout.bind(st))}const M0=1.33;function P0(e){return typeof e=="string"?j0(e):Math.ceil((e.byteLength||e.size)*M0)}function j0(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function hp(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function $0(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function L0(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}class z0 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Fu extends me{constructor(t){super(),this.writable=!1,$o(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new z0(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Bu(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=$0(t);return n.length?"?"+n:""}}class D0 extends Fu{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};T0(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,C0(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=hp()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let pp=!1;try{pp=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const U0=pp;function B0(){}class F0 extends D0{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,i)=>{this.onError("xhr post error",s,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class bt extends me{constructor(t,n,r){super(),this.createRequest=t,$o(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=dp(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=bt.requestsCount++,bt.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=B0,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete bt.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}bt.requestsCount=0;bt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",mf);else if(typeof addEventListener=="function"){const e="onpagehide"in st?"pagehide":"unload";addEventListener(e,mf,!1)}}function mf(){for(let e in bt.requests)bt.requests.hasOwnProperty(e)&&bt.requests[e].abort()}const V0=function(){const e=mp({xdomain:!1});return e&&e.responseType!==null}();class K0 extends F0{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=V0&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new bt(mp,this.uri(),t)}}function mp(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||U0))return new XMLHttpRequest}catch{}if(!t)try{return new st[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const yp=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Z0 extends Fu{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=yp?{}:dp(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;Uu(r,this.supportsBinary,i=>{try{this.doWrite(r,i)}catch{}s&&jo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=hp()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const ya=st.WebSocket||st.MozWebSocket;class W0 extends Z0{createSocket(t,n,r){return yp?new ya(t,n,r):n?new ya(t,n):new ya(t)}doWrite(t,n){this.ws.send(n)}}class H0 extends Fu{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=O0(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=R0();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const i=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),i())}).catch(a=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&jo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const J0={websocket:W0,webtransport:H0,polling:K0},Q0=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,q0=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Sl(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=Q0.exec(e||""),i={},o=14;for(;o--;)i[q0[o]]=s[o]||"";return n!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Y0(i,i.path),i.queryKey=G0(i,i.query),i}function Y0(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function G0(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,i){s&&(n[s]=i)}),n}const xl=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ii=[];xl&&addEventListener("offline",()=>{Ii.forEach(e=>e())},!1);class fn extends me{constructor(t,n){if(super(),this.binaryType=b0,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=Sl(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Sl(n.host).host);$o(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=L0(this.opts.query)),xl&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ii.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=fp,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&fn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",fn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=P0(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,jo(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:t,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(fn.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),xl&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Ii.indexOf(this._offlineEventListener);r!==-1&&Ii.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}fn.protocol=fp;class X0 extends fn{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;fn.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;fn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=n.name,this.emitReserved("upgradeError",h)}}))};function i(){r||(r=!0,c(),n.close(),n=null)}const o=d=>{const h=new Error("probe error: "+d);h.transport=n.name,i(),this.emitReserved("upgradeError",h)};function a(){o("transport closed")}function l(){o("socket closed")}function u(d){n&&d.name!==n.name&&i()}const c=()=>{n.removeListener("open",s),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",s),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let e1=class extends X0{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(s=>J0[s]).filter(s=>!!s)),super(t,r)}};function t1(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=Sl(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}const n1=typeof ArrayBuffer=="function",r1=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,gp=Object.prototype.toString,s1=typeof Blob=="function"||typeof Blob<"u"&&gp.call(Blob)==="[object BlobConstructor]",i1=typeof File=="function"||typeof File<"u"&&gp.call(File)==="[object FileConstructor]";function Vu(e){return n1&&(e instanceof ArrayBuffer||r1(e))||s1&&e instanceof Blob||i1&&e instanceof File}function Mi(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Mi(e[n]))return!0;return!1}if(Vu(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Mi(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Mi(e[n]))return!0;return!1}function o1(e){const t=[],n=e.data,r=e;return r.data=El(n,t),r.attachments=t.length,{packet:r,buffers:t}}function El(e,t){if(!e)return e;if(Vu(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=El(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=El(e[r],t));return n}return e}function a1(e,t){return e.data=Cl(e.data,t),delete e.attachments,e}function Cl(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Cl(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Cl(e[n],t));return e}const l1=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],u1=5;var W;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(W||(W={}));class c1{constructor(t){this.replacer=t}encode(t){return(t.type===W.EVENT||t.type===W.ACK)&&Mi(t)?this.encodeAsBinary({type:t.type===W.EVENT?W.BINARY_EVENT:W.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===W.BINARY_EVENT||t.type===W.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=o1(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}function yf(e){return Object.prototype.toString.call(e)==="[object Object]"}class Ku extends me{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===W.BINARY_EVENT;r||n.type===W.BINARY_ACK?(n.type=r?W.EVENT:W.ACK,this.reconstructor=new f1(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Vu(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(W[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===W.BINARY_EVENT||r.type===W.BINARY_ACK){const i=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(i,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const i=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(i,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const i=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(i,n+1))}if(t.charAt(++n)){const i=this.tryParse(t.substr(n));if(Ku.isPayloadValid(r.type,i))r.data=i;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case W.CONNECT:return yf(n);case W.DISCONNECT:return n===void 0;case W.CONNECT_ERROR:return typeof n=="string"||yf(n);case W.EVENT:case W.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&l1.indexOf(n[0])===-1);case W.ACK:case W.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class f1{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=a1(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const d1=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ku,Encoder:c1,get PacketType(){return W},protocol:u1},Symbol.toStringTag,{value:"Module"}));function ht(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const h1=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class vp extends me{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ht(t,"open",this.onopen.bind(this)),ht(t,"packet",this.onpacket.bind(this)),ht(t,"error",this.onerror.bind(this)),ht(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,s,i;if(h1.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:W.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const c=this.ids++,d=n.pop();this._registerAckCallback(c,d),o.id=c}const a=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,l=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},s),o=(...a)=>{this.io.clearTimeoutFn(i),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,s)=>{const i=(o,a)=>o?s(o):r(a);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...i)=>r!==this._queue[0]?void 0:(s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:W.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case W.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case W.EVENT:case W.BINARY_EVENT:this.onevent(t);break;case W.ACK:case W.BINARY_ACK:this.onack(t);break;case W.DISCONNECT:this.ondisconnect();break;case W.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:W.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:W.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Lr(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Lr.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Lr.prototype.reset=function(){this.attempts=0};Lr.prototype.setMin=function(e){this.ms=e};Lr.prototype.setMax=function(e){this.max=e};Lr.prototype.setJitter=function(e){this.jitter=e};class Tl extends me{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,$o(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Lr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||d1;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new e1(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=ht(n,"open",function(){r.onopen(),t&&t()}),i=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=ht(n,"error",i);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{s(),i(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(s),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ht(t,"ping",this.onping.bind(this)),ht(t,"data",this.ondata.bind(this)),ht(t,"error",this.onerror.bind(this)),ht(t,"close",this.onclose.bind(this)),ht(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){jo(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new vp(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Wr={};function Pi(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=t1(e,t.path||"/socket.io"),r=n.source,s=n.id,i=n.path,o=Wr[s]&&i in Wr[s].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new Tl(r,t):(Wr[s]||(Wr[s]=new Tl(r,t)),l=Wr[s]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Pi,{Manager:Tl,Socket:vp,io:Pi,connect:Pi});const p1=["123","321","abc","admin","adobe","alexander","amanda","andrea","andrew","angel","apple","asdf","ashley","baby","banana","baseball","batman","bear","biteme","blazer","blonde","boston","buster","butterfly","cameron","charlie","cheese","chelsea","chicken","chocolate","chris","compaq","computer","cookie","corvette","cowboys","dakota","dallas","daniel","david","diamond","dolphin","donald","dragon","eagle","flower","football","frank","freedom","friend","gateway","george","ginger","god","golf","hannah","hardcore","harley","heather","hello","hottie","hunter","internet","jasmine","jennifer","jessica","jesus","johnny","jordan","joshua","justin","justme","killer","knight","lakers","letmein","liverpool","login","london","love","lucky","mackenzie","maggie","master","matrix","matthew","maverick","melissa","mercedes","michael","michelle","mickey","miller","money","monkey","morgan","mother","muffin","mustang","natasha","nathan","nicole","ninja","orange","pass","password","patrick","peanut","pepper","phoenix","photoshop","pokemon","princess","purple","qazwsx","qwerty","rainbow","ranger","root","samantha","samsung","scooter","secret","shadow","simpson","smile","soccer","sparkle","starwars","summer","sunflower","sunshine","superman","taylor","temp","test","thomas","tigers","tigger","tinkerbell","trust","turtle","victoria","welcome","whatever","william","winter","yellow","zaq12wsx","zxcvbn"],m1=3,y1=15,g1=/^[a-zA-Z0-9_-]+$/,Zu=te.string().min(m1).max(y1).regex(g1),gf=20,vf={0:"o",1:"l",3:"e",4:"a",5:"s",7:"t","@":"a",$:"s","!":"i"};function v1(e){let t="";for(const n of e)n in vf?t+=vf[n]:t+=n;return t}function _1(e){const t=e.toLocaleLowerCase(),n=v1(t);for(const r of p1)if(n.includes(r)||t.includes(r))return!0;return!1}function w1(e){const t=new Set(e).size;return e.length*Math.log2(t)}function k1(e){let t=0;return _1(e)&&(t-=100),t+=w1(e)*.5,Math.max(t,0)}const Wu=te.string().refine(e=>k1(e)>=gf,{message:`Password does not meet the minimum complexity of ${gf}.`}).brand("password");te.object({username:Zu,password:Wu}).strict();const _p=te.string().email().brand("email");te.object({username:Zu,password:Wu,email:_p}).strict();var S1={};function x1(e){const t=e.runtimeEnvStrict??e.runtimeEnv??S1;for(const[T,g]of Object.entries(t))g===""&&delete t[T];if(!!e.skipValidation)return t;const r=typeof e.client=="object"?e.client:{},s=typeof e.server=="object"?e.server:{},i=typeof e.shared=="object"?e.shared:{},o=bi(r),a=bi(s),l=bi(i),u=e.isServer??(typeof window>"u"||"Deno"in window),c=o.merge(l),d=a.merge(l).merge(o),h=u?d.safeParse(t):c.safeParse(t),y=e.onValidationError??(T=>{throw console.error("❌ Invalid environment variables:",T.flatten().fieldErrors),new Error("Invalid environment variables")}),w=e.onInvalidAccess??(T=>{throw new Error("❌ Attempted to access a server-side environment variable on the client")});if(h.success===!1)return y(h.error);const v=T=>e.clientPrefix?!T.startsWith(e.clientPrefix)&&!(T in l.shape):!0,N=T=>u||!v(T),p=T=>T==="__esModule"||T==="$$typeof",f=(e.extends??[]).reduce((T,g)=>Object.assign(T,g),{}),m=Object.assign(h.data,f);return new Proxy(m,{get(T,g){if(typeof g=="string"&&!p(g))return N(g)?Reflect.get(T,g):w(g)}})}const E1={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1},Hu=x1({isServer:typeof window>"u",server:{POSTGRES_USER:te.string(),POSTGRES_PASSWORD:te.string(),POSTGRES_DATABASE:te.string(),POSTGRES_HOST:te.string(),POSTGRES_PORT:te.string().transform(e=>Number.parseInt(e,10)),BACKEND_PORT:te.string().transform(e=>Number.parseInt(e,10)),RUN_WORKERS_FROM_SOURCE:te.union([te.literal("true"),te.literal("false")]).optional().transform(e=>e==="true"),FRONTEND_PORT:te.string().transform(e=>Number.parseInt(e,10)),FRONTEND_ORIGINS:te.string().transform(e=>JSON.parse(e)).pipe(te.array(te.string())),OPENAI_API_KEY:te.string().optional()},clientPrefix:"VITE_",client:{VITE_BACKEND_ORIGIN:te.string()},runtimeEnv:E1,emptyStringAsUndefined:!0}),wp=Pi(Hu.VITE_BACKEND_ORIGIN,{auth:e=>{const t=va(Ir);t&&e(t)},autoConnect:!1}).on("connect",()=>{console.log("connected")}).on("connect_error",()=>{console.log("connect_error"),Ll(Ir,null)}),Ir=Xe({key:"auth",default:null,effects:[({onSet:e})=>{e(({newValue:t})=>{t?(localStorage.setItem("username",t.username),localStorage.setItem("sessionKey",t.sessionKey),console.log("connecting..."),wp.connect()):(console.log("clearing session..."),localStorage.removeItem("sessionKey"))})},({setSelf:e})=>{const t=localStorage.getItem("username"),n=localStorage.getItem("sessionKey");t&&n&&e({username:t,sessionKey:n})}]}),Fs=Xe({key:"username",default:window.localStorage.getItem("username")??""}),kp=Zn({key:"usernameIssues",get:({get:e})=>{const t=e(Fs),n=Zu.safeParse(t);return n.success?null:n.error.issues}}),Mr=Xe({key:"password0",default:""}),Sp=Zn({key:"password0Issues",get:({get:e})=>{const t=e(Mr),n=Wu.safeParse(t);return n.success?null:n.error.issues}}),Rl=Xe({key:"password1",default:""}),xp=Zn({key:"password1Issues",get:({get:e})=>{const t=e(Mr),n=e(Rl),r=te.string().refine(s=>s===t,{message:"Passwords do not match."}).safeParse(n);return r.success?null:r.error.issues}}),Ol=Xe({key:"email",default:""}),Ep=Zn({key:"emailIssues",get:({get:e})=>{const t=e(Ol),n=_p.safeParse(t);return n.success?null:n.error.issues}}),C1=Zn({key:"signupReady",get:({get:e})=>{const t=e(kp),n=e(Sp),r=e(xp),s=e(Ep);return!(t??n??r??s)}}),T1=v0({login:null,sign_up:null,game:_0({$gameId:null}),admin:null});function R1(e){return w0(T1,e)}const O1=[["login"],["sign_up"]];function N1(e){return O1.some(t=>t.join("/")===e.join("/"))}function Cp(e){history.pushState(null,"",e),Ll(Tp,e)}const Tp=Xe({key:"pathName",default:window.location.pathname,effects:[({onSet:e,setSelf:t})=>{const n=s=>{history.replaceState(null,"",s),t(s)},r=s=>{switch(s){case"/":{const i=va(Ir);let o="/login";i&&(o="/game"),n(o);break}case"/login":case"/sign_up":va(Ir)&&n("/game")}};r(window.location.pathname),e(({newValue:s})=>{r(s)})},({setSelf:e})=>{document.addEventListener("click",t=>{if(t.target instanceof HTMLAnchorElement){const n=t.target.getAttribute("href");n!=null&&n.startsWith("/")&&(t.preventDefault(),history.pushState(null,"",n),e(n))}}),window.addEventListener("popstate",()=>{e(window.location.pathname)})}]}),b1=Zn({key:"route",get:({get:e})=>{const n=e(Tp).split("/").slice(1);return R1(n)?N1(n)||e(Ir)?n:401:404}});function A1(){return O.jsx("article",{children:O.jsx("h1",{children:"admin"})})}class I1 extends Map{set(t,n){return this.has(t)?(console.warn("Tried to set a key that already exists in an InvariantMap",{key:t,value:n}),this):super.set(t,n)}clear(){throw new Error("Cannot clear an InvariantMap")}}const us=class us{constructor(t){C(this,"type","continuity");C(this,"globals",[]);C(this,"actions",[]);C(this,"perspectives",[]);this.key=t}static create(t,n){const r=new us(t),{type:s,globals:i,actions:o,perspectives:a}=n(r),l={type:s,key:t,globals:i,actions:o,perspectives:a};return us.existing.set(t,l),l}add(...t){switch(t[0].type){case"atom":case"mutable_atom":this.globals.push(...t);break;case"transaction":this.actions.push(...t);break;case"atom_family":{const[r,s]=t;this.perspectives.push({type:"realtime_perspective",resourceAtoms:r,viewAtoms:s})}break}return this}};C(us,"existing",new I1);let Nl=us;function M1(e){const{key:t,config:n}=e,r=Nl.create(t,n),{actions:s}=r;for(const i of s)$f(t,i.key,_e.STORE);return ka(t,-1,_e.STORE),r}Xe({key:"usersInRoomIndex",mutable:!0,default:()=>new Tt,toJson:e=>e.toJSON(),fromJson:e=>Tt.fromJSON(e)});Xe({key:"roomIndex",default:()=>new Tt,mutable:!0,toJson:e=>e.toJSON(),fromJson:e=>Tt.fromJSON(e)});const P1={enteredAtEpoch:0},j1=km({key:"usersInRooms",between:["room","user"],cardinality:"1:n"},P1);am({key:"usersInMyRoomView",get:e=>({find:t})=>{const n=Cm(j1);return[t(n,e)]}});const Ju=Xe({key:"count",default:0}),Rp=lm({key:"incrementTX",do:({set:e})=>{e(Ju,t=>t+1)}}),$1=M1({key:"countContinuity",config:e=>e.add(Ju).add(Rp)});function L1({route:[e]}){return O.jsx("nav",{children:e?O.jsx(z1,{gameId:e}):O.jsx("article",{children:"no game"})})}function z1({gameId:e}){console.log(e);const t=He(Ju),n=um(Rp);return ly($1),O.jsxs("article",{children:[O.jsxs("button",{type:"button",onClick:()=>{n()},children:["count is ",t]}),O.jsx("p",{children:"Let's see how high we can count!"})]})}async function D1(e,t="SHA-256"){const r=new TextEncoder().encode(e),s=await crypto.subtle.digest(t,r);return Array.from(new Uint8Array(s)).map(o=>o.toString(16).padStart(2,"0")).join("")}async function Op(e){const t=await D1(e);return`${t.substring(0,8)}-${t.substring(8,12)}-${t.substring(12,16)}-${t.substring(16,20)}-${t.substring(20,32)}`}function Np(e){return O.jsx("a",{...e})}function U1(){const e=Rn(Fs),t=Rn(Mr),n=He(Fs),r=He(Mr),[s,i]=ve.useState(null);return O.jsxs("form",{onSubmit:async o=>{o.preventDefault();const a=await Op("login"),l=await fetch(`${Hu.VITE_BACKEND_ORIGIN}/login-${a}`,{method:"POST",body:JSON.stringify({username:n,password:r})});if(console.log(l),l.status===200){e(""),t(""),Cp("/game");const u=await l.text(),[,c]=u.split(" ");Ll(Ir,{username:n,sessionKey:c})}if(l.status>=400){const u=await l.text();i(u)}},children:[O.jsxs("main",{children:[s?O.jsx("aside",{children:s}):null,O.jsxs("label",{htmlFor:"username",children:[O.jsx("span",{children:"Username"}),O.jsx("input",{id:"username",type:"text",value:n,onChange:o=>{e(o.target.value)},autoComplete:"username"})]}),O.jsxs("label",{htmlFor:"password",children:[O.jsx("span",{children:"Password"}),O.jsx("input",{id:"password",type:"password",value:r,onChange:o=>{t(o.target.value)},autoComplete:"current-password"})]}),O.jsx("button",{type:"submit",disabled:!n||!r,children:"->"})]}),O.jsx("footer",{children:O.jsxs(Np,{href:"/sign_up",children:["New here? ",O.jsx("u",{children:"Sign up"})," for an account."]})})]})}function B1(){const e=Rn(Fs),t=Rn(Mr),n=Rn(Rl),r=Rn(Ol),s=He(Fs),i=He(Mr),o=He(Rl),a=He(Ol),l=He(kp),u=He(Sp),c=He(xp),d=He(Ep),h=He(C1),[y,w]=ve.useState(null);return O.jsxs("form",{onSubmit:async v=>{v.preventDefault();const N=i,p=await Op("sign-up"),f=await fetch(`${Hu.VITE_BACKEND_ORIGIN}/sign-up-${p}`,{method:"POST",body:JSON.stringify({username:s,password:N,email:a})});if(f.status===200&&(n(""),r(""),Cp("/login")),f.status>=400){const m=await f.text();w(m)}},children:[O.jsxs("main",{children:[y?O.jsx("aside",{children:y}):null,O.jsxs("label",{htmlFor:"username",children:[O.jsx("span",{children:"Username"}),O.jsx("input",{id:"username",type:"text",value:s,onChange:v=>{e(v.target.value)},autoComplete:"username",style:{"--energy-color":s?l?"red":"green":void 0}}),s&&l?O.jsx("aside",{children:l.map(v=>O.jsx("span",{children:v.message},v.path.join(".")))}):null]}),O.jsxs("label",{htmlFor:"password",children:[O.jsx("span",{children:"Password"}),O.jsx("input",{id:"password0",type:"password",value:i,onChange:v=>{t(v.target.value)},autoComplete:"new-password",style:{"--energy-color":i?u?"red":"green":void 0}}),i&&u?O.jsx("aside",{children:u.map(v=>O.jsx("span",{children:v.message},v.path.join(".")))}):null]}),O.jsxs("label",{htmlFor:"password",children:[O.jsx("span",{children:"Confirm Password"}),O.jsx("input",{id:"password1",type:"password",value:o,onChange:v=>{n(v.target.value)},autoComplete:"new-password",style:{"--energy-color":o?c?"red":"green":void 0}}),o&&c?O.jsx("aside",{children:c.map(v=>O.jsx("span",{children:v.message},v.path.join(".")))}):null]}),O.jsxs("label",{htmlFor:"email",children:[O.jsx("span",{children:"Email"}),O.jsx("input",{id:"email",type:"email",value:a,onChange:v=>{r(v.target.value)},autoComplete:"email",style:{"--energy-color":a?d?"red":"green":void 0}}),a&&d?O.jsx("aside",{children:d.map(v=>O.jsx("span",{children:v.message},v.path.join(".")))}):null]}),O.jsx("button",{type:"submit",disabled:!h,children:"->"})]}),O.jsx("footer",{children:O.jsxs(Np,{href:"/login",children:["Already have an account? ",O.jsx("u",{children:"Log in"})," instead."]})})]})}function F1(){const e=He(b1);return O.jsxs("main",{className:g0.class,children:[O.jsx("header",{children:O.jsx(y0,{})}),O.jsx("main",{children:typeof e=="number"?O.jsxs("article",{children:[O.jsx("h1",{children:e}),O.jsx("h2",{children:ip[e]})]}):(()=>{const[t,...n]=e;switch(t){case"admin":return O.jsx(A1,{});case"login":return O.jsx(U1,{});case"sign_up":return O.jsx(B1,{});case"game":return O.jsx(L1,{route:n})}})()})]})}Jh(document.getElementById("root")).render(O.jsx(ve.StrictMode,{children:O.jsx(ny,{socket:wp,children:O.jsx(F1,{})})}));
|
|
46
|
+
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function la(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function rl(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var Fg=typeof WeakMap=="function"?WeakMap:Map;function wh(e,t,n){n=Ut(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ro||(ro=!0,hl=r),rl(e,t)},n}function kh(e,t,n){n=Ut(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){rl(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){rl(e,t),typeof r!="function"&&(ln===null?ln=new Set([this]):ln.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function Kc(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Fg;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=nv.bind(null,e,t,n),t.then(e,e))}function Zc(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function Wc(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Ut(-1,1),t.tag=2,an(n,t,1))),n.lanes|=1),e)}var Vg=Ht.ReactCurrentOwner,Ve=!1;function Ie(e,t,n,r){t.child=e===null?qd(t,null,n,r):Cr(t,e.child,n,r)}function Hc(e,t,n,r,s){n=n.render;var i=t.ref;return yr(t,s),r=xu(e,t,n,r,i,s),n=Eu(),e!==null&&!Ve?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Kt(e,t,s)):(se&&n&&fu(t),t.flags|=1,Ie(e,t,r,s),t.child)}function Jc(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!Pu(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,Sh(e,t,i,r,s)):(e=Ni(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:vs,n(o,r)&&e.ref===t.ref)return Kt(e,t,s)}return t.flags|=1,e=cn(i,r),e.ref=t.ref,e.return=t,t.child=e}function Sh(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(vs(i,r)&&e.ref===t.ref)if(Ve=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Ve=!0);else return t.lanes=e.lanes,Kt(e,t,s)}return sl(e,t,n,r,s)}function xh(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},X(cr,Je),Je|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,X(cr,Je),Je|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,X(cr,Je),Je|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,X(cr,Je),Je|=r;return Ie(e,t,s,n),t.child}function Eh(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function sl(e,t,n,r,s){var i=Ze(n)?zn:be.current;return i=xr(t,i),yr(t,s),n=xu(e,t,n,r,i,s),r=Eu(),e!==null&&!Ve?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,Kt(e,t,s)):(se&&r&&fu(t),t.flags|=1,Ie(e,t,n,s),t.child)}function Qc(e,t,n,r,s){if(Ze(n)){var i=!0;Hi(t)}else i=!1;if(yr(t,s),t.stateNode===null)Ti(e,t),_h(t,n,r),nl(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,u=n.contextType;typeof u=="object"&&u!==null?u=at(u):(u=Ze(n)?zn:be.current,u=xr(t,u));var c=n.getDerivedStateFromProps,d=typeof c=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==u)&&Vc(t,o,r,u),qt=!1;var h=t.memoizedState;o.state=h,Gi(t,r,o,s),l=t.memoizedState,a!==r||h!==l||Ke.current||qt?(typeof c=="function"&&(tl(t,n,c,r),l=t.memoizedState),(a=qt||Fc(t,n,a,r,h,l,u))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=u,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Gd(e,t),a=t.memoizedProps,u=t.type===t.elementType?a:ft(t.type,a),o.props=u,d=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=at(l):(l=Ze(n)?zn:be.current,l=xr(t,l));var y=n.getDerivedStateFromProps;(c=typeof y=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||h!==l)&&Vc(t,o,r,l),qt=!1,h=t.memoizedState,o.state=h,Gi(t,r,o,s);var w=t.memoizedState;a!==d||h!==w||Ke.current||qt?(typeof y=="function"&&(tl(t,n,y,r),w=t.memoizedState),(u=qt||Fc(t,n,u,r,h,w,l)||!1)?(c||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,w,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,w,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=w),o.props=r,o.state=w,o.context=l,r=u):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return il(e,t,n,r,i,s)}function il(e,t,n,r,s,i){Eh(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&Pc(t,n,!1),Kt(e,t,i);r=t.stateNode,Vg.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Cr(t,e.child,null,i),t.child=Cr(t,null,a,i)):Ie(e,t,a,i),t.memoizedState=r.state,s&&Pc(t,n,!0),t.child}function Ch(e){var t=e.stateNode;t.pendingContext?Mc(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Mc(e,t.context,!1),_u(e,t.containerInfo)}function qc(e,t,n,r,s){return Er(),hu(s),t.flags|=256,Ie(e,t,n,r),t.child}var ol={dehydrated:null,treeContext:null,retryLane:0};function al(e){return{baseLanes:e,cachePool:null,transitions:null}}function Th(e,t,n){var r=t.pendingProps,s=le.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),X(le,s&1),e===null)return Xa(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=No(o,r,0,null),e=In(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=al(n),t.memoizedState=ol,e):Ru(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return Kg(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=cn(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=cn(a,i):(i=In(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?al(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=ol,r}return i=e.child,e=i.sibling,r=cn(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function Ru(e,t){return t=No({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function di(e,t,n,r){return r!==null&&hu(r),Cr(t,e.child,null,n),e=Ru(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Kg(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=la(Error(x(422))),di(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=No({mode:"visible",children:r.children},s,0,null),i=In(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Cr(t,e.child,null,o),t.child.memoizedState=al(o),t.memoizedState=ol,i);if(!(t.mode&1))return di(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(x(419)),r=la(i,r,void 0),di(e,t,o,r)}if(a=(o&e.childLanes)!==0,Ve||a){if(r=Se,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,Vt(e,s),gt(r,e,s,-1))}return Mu(),r=la(Error(x(421))),di(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=rv.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Qe=on(s.nextSibling),qe=t,se=!0,pt=null,e!==null&&(nt[rt++]=zt,nt[rt++]=Dt,nt[rt++]=Dn,zt=e.id,Dt=e.overflow,Dn=t),t=Ru(t,r.children),t.flags|=4096,t)}function Yc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),el(e.return,t,n)}function ua(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function Rh(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(Ie(e,t,r.children,n),r=le.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Yc(e,n,t);else if(e.tag===19)Yc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(X(le,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&Xi(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),ua(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&Xi(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}ua(t,!0,n,null,i);break;case"together":ua(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ti(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Kt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Bn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(x(153));if(t.child!==null){for(e=t.child,n=cn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=cn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Zg(e,t,n){switch(t.tag){case 3:Ch(t),Er();break;case 5:Xd(t);break;case 1:Ze(t.type)&&Hi(t);break;case 4:_u(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;X(qi,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(X(le,le.current&1),t.flags|=128,null):n&t.child.childLanes?Th(e,t,n):(X(le,le.current&1),e=Kt(e,t,n),e!==null?e.sibling:null);X(le,le.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return Rh(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),X(le,le.current),r)break;return null;case 22:case 23:return t.lanes=0,xh(e,t,n)}return Kt(e,t,n)}var Oh,ll,Nh,bh;Oh=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};ll=function(){};Nh=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,bn(Ot.current);var i=null;switch(n){case"input":s=ba(e,s),r=ba(e,r),i=[];break;case"select":s=ce({},s,{value:void 0}),r=ce({},r,{value:void 0}),i=[];break;case"textarea":s=Ma(e,s),r=Ma(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=Zi)}ja(n,r);var o;n=null;for(u in s)if(!r.hasOwnProperty(u)&&s.hasOwnProperty(u)&&s[u]!=null)if(u==="style"){var a=s[u];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(fs.hasOwnProperty(u)?i||(i=[]):(i=i||[]).push(u,null));for(u in r){var l=r[u];if(a=s!=null?s[u]:void 0,r.hasOwnProperty(u)&&l!==a&&(l!=null||a!=null))if(u==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(u,n)),n=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(fs.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&ee("scroll",e),i||a===l||(i=[])):(i=i||[]).push(u,l))}n&&(i=i||[]).push("style",n);var u=i;(t.updateQueue=u)&&(t.flags|=4)}};bh=function(e,t,n,r){n!==r&&(t.flags|=4)};function Kr(e,t){if(!se)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Oe(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Wg(e,t,n){var r=t.pendingProps;switch(du(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Oe(t),null;case 1:return Ze(t.type)&&Wi(),Oe(t),null;case 3:return r=t.stateNode,Tr(),ne(Ke),ne(be),ku(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ci(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pt!==null&&(yl(pt),pt=null))),ll(e,t),Oe(t),null;case 5:wu(t);var s=bn(xs.current);if(n=t.type,e!==null&&t.stateNode!=null)Nh(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(x(166));return Oe(t),null}if(e=bn(Ot.current),ci(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Ct]=t,r[ks]=i,e=(t.mode&1)!==0,n){case"dialog":ee("cancel",r),ee("close",r);break;case"iframe":case"object":case"embed":ee("load",r);break;case"video":case"audio":for(s=0;s<qr.length;s++)ee(qr[s],r);break;case"source":ee("error",r);break;case"img":case"image":case"link":ee("error",r),ee("load",r);break;case"details":ee("toggle",r);break;case"input":oc(r,i),ee("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},ee("invalid",r);break;case"textarea":lc(r,i),ee("invalid",r)}ja(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&ui(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&ui(r.textContent,a,e),s=["children",""+a]):fs.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&ee("scroll",r)}switch(n){case"input":ti(r),ac(r,i,!0);break;case"textarea":ti(r),uc(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=Zi)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=sd(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Ct]=t,e[ks]=r,Oh(e,t,!1,!1),t.stateNode=e;e:{switch(o=$a(n,r),n){case"dialog":ee("cancel",e),ee("close",e),s=r;break;case"iframe":case"object":case"embed":ee("load",e),s=r;break;case"video":case"audio":for(s=0;s<qr.length;s++)ee(qr[s],e);s=r;break;case"source":ee("error",e),s=r;break;case"img":case"image":case"link":ee("error",e),ee("load",e),s=r;break;case"details":ee("toggle",e),s=r;break;case"input":oc(e,r),s=ba(e,r),ee("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=ce({},r,{value:void 0}),ee("invalid",e);break;case"textarea":lc(e,r),s=Ma(e,r),ee("invalid",e);break;default:s=r}ja(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?ad(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&id(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ds(e,l):typeof l=="number"&&ds(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(fs.hasOwnProperty(i)?l!=null&&i==="onScroll"&&ee("scroll",e):l!=null&&Yl(e,i,l,o))}switch(n){case"input":ti(e),ac(e,r,!1);break;case"textarea":ti(e),uc(e);break;case"option":r.value!=null&&e.setAttribute("value",""+hn(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?dr(e,!!r.multiple,i,!1):r.defaultValue!=null&&dr(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=Zi)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return Oe(t),null;case 6:if(e&&t.stateNode!=null)bh(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(x(166));if(n=bn(xs.current),bn(Ot.current),ci(t)){if(r=t.stateNode,n=t.memoizedProps,r[Ct]=t,(i=r.nodeValue!==n)&&(e=qe,e!==null))switch(e.tag){case 3:ui(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ui(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Ct]=t,t.stateNode=r}return Oe(t),null;case 13:if(ne(le),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(se&&Qe!==null&&t.mode&1&&!(t.flags&128))Jd(),Er(),t.flags|=98560,i=!1;else if(i=ci(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(x(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(x(317));i[Ct]=t}else Er(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Oe(t),i=!1}else pt!==null&&(yl(pt),pt=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||le.current&1?ge===0&&(ge=3):Mu())),t.updateQueue!==null&&(t.flags|=4),Oe(t),null);case 4:return Tr(),ll(e,t),e===null&&_s(t.stateNode.containerInfo),Oe(t),null;case 10:return yu(t.type._context),Oe(t),null;case 17:return Ze(t.type)&&Wi(),Oe(t),null;case 19:if(ne(le),i=t.memoizedState,i===null)return Oe(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Kr(i,!1);else{if(ge!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Xi(e),o!==null){for(t.flags|=128,Kr(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return X(le,le.current&1|2),t.child}e=e.sibling}i.tail!==null&&he()>Or&&(t.flags|=128,r=!0,Kr(i,!1),t.lanes=4194304)}else{if(!r)if(e=Xi(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Kr(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!se)return Oe(t),null}else 2*he()-i.renderingStartTime>Or&&n!==1073741824&&(t.flags|=128,r=!0,Kr(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=he(),t.sibling=null,n=le.current,X(le,r?n&1|2:n&1),t):(Oe(t),null);case 22:case 23:return Iu(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Je&1073741824&&(Oe(t),t.subtreeFlags&6&&(t.flags|=8192)):Oe(t),null;case 24:return null;case 25:return null}throw Error(x(156,t.tag))}function Hg(e,t){switch(du(t),t.tag){case 1:return Ze(t.type)&&Wi(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Tr(),ne(Ke),ne(be),ku(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return wu(t),null;case 13:if(ne(le),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(x(340));Er()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(le),null;case 4:return Tr(),null;case 10:return yu(t.type._context),null;case 22:case 23:return Iu(),null;case 24:return null;default:return null}}var hi=!1,Ne=!1,Jg=typeof WeakSet=="function"?WeakSet:Set,M=null;function ur(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){fe(e,t,r)}else n.current=null}function ul(e,t,n){try{n()}catch(r){fe(e,t,r)}}var Gc=!1;function Qg(e,t){if(Wa=Fi,e=jd(),cu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,u=0,c=0,d=e,h=null;t:for(;;){for(var y;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==i||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(y=d.firstChild)!==null;)h=d,d=y;for(;;){if(d===e)break t;if(h===n&&++u===s&&(a=o),h===i&&++c===r&&(l=o),(y=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=y}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ha={focusedElem:e,selectionRange:n},Fi=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var v=w.memoizedProps,N=w.memoizedState,p=t.stateNode,f=p.getSnapshotBeforeUpdate(t.elementType===t.type?v:ft(t.type,v),N);p.__reactInternalSnapshotBeforeUpdate=f}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(x(163))}}catch(k){fe(t,t.return,k)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return w=Gc,Gc=!1,w}function os(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&ul(t,n,i)}s=s.next}while(s!==r)}}function Ro(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function cl(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ah(e){var t=e.alternate;t!==null&&(e.alternate=null,Ah(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ct],delete t[ks],delete t[qa],delete t[Ag],delete t[Ig])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Ih(e){return e.tag===5||e.tag===3||e.tag===4}function Xc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ih(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.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 fl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Zi));else if(r!==4&&(e=e.child,e!==null))for(fl(e,t,n),e=e.sibling;e!==null;)fl(e,t,n),e=e.sibling}function dl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(dl(e,t,n),e=e.sibling;e!==null;)dl(e,t,n),e=e.sibling}var Ee=null,dt=!1;function Jt(e,t,n){for(n=n.child;n!==null;)Mh(e,t,n),n=n.sibling}function Mh(e,t,n){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(_o,n)}catch{}switch(n.tag){case 5:Ne||ur(n,t);case 6:var r=Ee,s=dt;Ee=null,Jt(e,t,n),Ee=r,dt=s,Ee!==null&&(dt?(e=Ee,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Ee.removeChild(n.stateNode));break;case 18:Ee!==null&&(dt?(e=Ee,n=n.stateNode,e.nodeType===8?na(e.parentNode,n):e.nodeType===1&&na(e,n),ys(e)):na(Ee,n.stateNode));break;case 4:r=Ee,s=dt,Ee=n.stateNode.containerInfo,dt=!0,Jt(e,t,n),Ee=r,dt=s;break;case 0:case 11:case 14:case 15:if(!Ne&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&ul(n,t,o),s=s.next}while(s!==r)}Jt(e,t,n);break;case 1:if(!Ne&&(ur(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){fe(n,t,a)}Jt(e,t,n);break;case 21:Jt(e,t,n);break;case 22:n.mode&1?(Ne=(r=Ne)||n.memoizedState!==null,Jt(e,t,n),Ne=r):Jt(e,t,n);break;default:Jt(e,t,n)}}function ef(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Jg),t.forEach(function(r){var s=sv.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function ct(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:Ee=a.stateNode,dt=!1;break e;case 3:Ee=a.stateNode.containerInfo,dt=!0;break e;case 4:Ee=a.stateNode.containerInfo,dt=!0;break e}a=a.return}if(Ee===null)throw Error(x(160));Mh(i,o,s),Ee=null,dt=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(u){fe(s,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)Ph(t,e),t=t.sibling}function Ph(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ct(t,e),xt(e),r&4){try{os(3,e,e.return),Ro(3,e)}catch(v){fe(e,e.return,v)}try{os(5,e,e.return)}catch(v){fe(e,e.return,v)}}break;case 1:ct(t,e),xt(e),r&512&&n!==null&&ur(n,n.return);break;case 5:if(ct(t,e),xt(e),r&512&&n!==null&&ur(n,n.return),e.flags&32){var s=e.stateNode;try{ds(s,"")}catch(v){fe(e,e.return,v)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&nd(s,i),$a(a,o);var u=$a(a,i);for(o=0;o<l.length;o+=2){var c=l[o],d=l[o+1];c==="style"?ad(s,d):c==="dangerouslySetInnerHTML"?id(s,d):c==="children"?ds(s,d):Yl(s,c,d,u)}switch(a){case"input":Aa(s,i);break;case"textarea":rd(s,i);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var y=i.value;y!=null?dr(s,!!i.multiple,y,!1):h!==!!i.multiple&&(i.defaultValue!=null?dr(s,!!i.multiple,i.defaultValue,!0):dr(s,!!i.multiple,i.multiple?[]:"",!1))}s[ks]=i}catch(v){fe(e,e.return,v)}}break;case 6:if(ct(t,e),xt(e),r&4){if(e.stateNode===null)throw Error(x(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(v){fe(e,e.return,v)}}break;case 3:if(ct(t,e),xt(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{ys(t.containerInfo)}catch(v){fe(e,e.return,v)}break;case 4:ct(t,e),xt(e);break;case 13:ct(t,e),xt(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(bu=he())),r&4&&ef(e);break;case 22:if(c=n!==null&&n.memoizedState!==null,e.mode&1?(Ne=(u=Ne)||c,ct(t,e),Ne=u):ct(t,e),xt(e),r&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!c&&e.mode&1)for(M=e,c=e.child;c!==null;){for(d=M=c;M!==null;){switch(h=M,y=h.child,h.tag){case 0:case 11:case 14:case 15:os(4,h,h.return);break;case 1:ur(h,h.return);var w=h.stateNode;if(typeof w.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,w.props=t.memoizedProps,w.state=t.memoizedState,w.componentWillUnmount()}catch(v){fe(r,n,v)}}break;case 5:ur(h,h.return);break;case 22:if(h.memoizedState!==null){nf(d);continue}}y!==null?(y.return=h,M=y):nf(d)}c=c.sibling}e:for(c=null,d=e;;){if(d.tag===5){if(c===null){c=d;try{s=d.stateNode,u?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=d.stateNode,l=d.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=od("display",o))}catch(v){fe(e,e.return,v)}}}else if(d.tag===6){if(c===null)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(v){fe(e,e.return,v)}}else if((d.tag!==22&&d.tag!==23||d.memoizedState===null||d===e)&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;d.sibling===null;){if(d.return===null||d.return===e)break e;c===d&&(c=null),d=d.return}c===d&&(c=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:ct(t,e),xt(e),r&4&&ef(e);break;case 21:break;default:ct(t,e),xt(e)}}function xt(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(Ih(n)){var r=n;break e}n=n.return}throw Error(x(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(ds(s,""),r.flags&=-33);var i=Xc(e);dl(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=Xc(e);fl(e,a,o);break;default:throw Error(x(161))}}catch(l){fe(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function qg(e,t,n){M=e,jh(e)}function jh(e,t,n){for(var r=(e.mode&1)!==0;M!==null;){var s=M,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||hi;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||Ne;a=hi;var u=Ne;if(hi=o,(Ne=l)&&!u)for(M=s;M!==null;)o=M,l=o.child,o.tag===22&&o.memoizedState!==null?rf(s):l!==null?(l.return=o,M=l):rf(s);for(;i!==null;)M=i,jh(i),i=i.sibling;M=s,hi=a,Ne=u}tf(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,M=i):tf(e)}}function tf(e){for(;M!==null;){var t=M;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:Ne||Ro(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!Ne)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:ft(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&Dc(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Dc(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var d=c.dehydrated;d!==null&&ys(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(x(163))}Ne||t.flags&512&&cl(t)}catch(h){fe(t,t.return,h)}}if(t===e){M=null;break}if(n=t.sibling,n!==null){n.return=t.return,M=n;break}M=t.return}}function nf(e){for(;M!==null;){var t=M;if(t===e){M=null;break}var n=t.sibling;if(n!==null){n.return=t.return,M=n;break}M=t.return}}function rf(e){for(;M!==null;){var t=M;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Ro(4,t)}catch(l){fe(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){fe(t,s,l)}}var i=t.return;try{cl(t)}catch(l){fe(t,i,l)}break;case 5:var o=t.return;try{cl(t)}catch(l){fe(t,o,l)}}}catch(l){fe(t,t.return,l)}if(t===e){M=null;break}var a=t.sibling;if(a!==null){a.return=t.return,M=a;break}M=t.return}}var Yg=Math.ceil,no=Ht.ReactCurrentDispatcher,Ou=Ht.ReactCurrentOwner,ot=Ht.ReactCurrentBatchConfig,J=0,Se=null,pe=null,Ce=0,Je=0,cr=kn(0),ge=0,Rs=null,Bn=0,Oo=0,Nu=0,as=null,Fe=null,bu=0,Or=1/0,jt=null,ro=!1,hl=null,ln=null,pi=!1,tn=null,so=0,ls=0,pl=null,Ri=-1,Oi=0;function je(){return J&6?he():Ri!==-1?Ri:Ri=he()}function un(e){return e.mode&1?J&2&&Ce!==0?Ce&-Ce:Pg.transition!==null?(Oi===0&&(Oi=_d()),Oi):(e=Y,e!==0||(e=window.event,e=e===void 0?16:Td(e.type)),e):1}function gt(e,t,n,r){if(50<ls)throw ls=0,pl=null,Error(x(185));Ks(e,n,r),(!(J&2)||e!==Se)&&(e===Se&&(!(J&2)&&(Oo|=n),ge===4&&Gt(e,Ce)),We(e,r),n===1&&J===0&&!(t.mode&1)&&(Or=he()+500,Eo&&Sn()))}function We(e,t){var n=e.callbackNode;Py(e,t);var r=Bi(e,e===Se?Ce:0);if(r===0)n!==null&&dc(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&dc(n),t===1)e.tag===0?Mg(sf.bind(null,e)):Zd(sf.bind(null,e)),Ng(function(){!(J&6)&&Sn()}),n=null;else{switch(wd(r)){case 1:n=nu;break;case 4:n=gd;break;case 16:n=Ui;break;case 536870912:n=vd;break;default:n=Ui}n=Vh(n,$h.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function $h(e,t){if(Ri=-1,Oi=0,J&6)throw Error(x(327));var n=e.callbackNode;if(gr()&&e.callbackNode!==n)return null;var r=Bi(e,e===Se?Ce:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=io(e,r);else{t=r;var s=J;J|=2;var i=zh();(Se!==e||Ce!==t)&&(jt=null,Or=he()+500,An(e,t));do try{ev();break}catch(a){Lh(e,a)}while(!0);mu(),no.current=i,J=s,pe!==null?t=0:(Se=null,Ce=0,t=ge)}if(t!==0){if(t===2&&(s=Ba(e),s!==0&&(r=s,t=ml(e,s))),t===1)throw n=Rs,An(e,0),Gt(e,r),We(e,he()),n;if(t===6)Gt(e,r);else{if(s=e.current.alternate,!(r&30)&&!Gg(s)&&(t=io(e,r),t===2&&(i=Ba(e),i!==0&&(r=i,t=ml(e,i))),t===1))throw n=Rs,An(e,0),Gt(e,r),We(e,he()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(x(345));case 2:Tn(e,Fe,jt);break;case 3:if(Gt(e,r),(r&130023424)===r&&(t=bu+500-he(),10<t)){if(Bi(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){je(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=Qa(Tn.bind(null,e,Fe,jt),t);break}Tn(e,Fe,jt);break;case 4:if(Gt(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-yt(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=he()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Yg(r/1960))-r,10<r){e.timeoutHandle=Qa(Tn.bind(null,e,Fe,jt),r);break}Tn(e,Fe,jt);break;case 5:Tn(e,Fe,jt);break;default:throw Error(x(329))}}}return We(e,he()),e.callbackNode===n?$h.bind(null,e):null}function ml(e,t){var n=as;return e.current.memoizedState.isDehydrated&&(An(e,t).flags|=256),e=io(e,t),e!==2&&(t=Fe,Fe=n,t!==null&&yl(t)),e}function yl(e){Fe===null?Fe=e:Fe.push.apply(Fe,e)}function Gg(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!_t(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Gt(e,t){for(t&=~Nu,t&=~Oo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-yt(t),r=1<<n;e[n]=-1,t&=~r}}function sf(e){if(J&6)throw Error(x(327));gr();var t=Bi(e,0);if(!(t&1))return We(e,he()),null;var n=io(e,t);if(e.tag!==0&&n===2){var r=Ba(e);r!==0&&(t=r,n=ml(e,r))}if(n===1)throw n=Rs,An(e,0),Gt(e,t),We(e,he()),n;if(n===6)throw Error(x(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Tn(e,Fe,jt),We(e,he()),null}function Au(e,t){var n=J;J|=1;try{return e(t)}finally{J=n,J===0&&(Or=he()+500,Eo&&Sn())}}function Fn(e){tn!==null&&tn.tag===0&&!(J&6)&&gr();var t=J;J|=1;var n=ot.transition,r=Y;try{if(ot.transition=null,Y=1,e)return e()}finally{Y=r,ot.transition=n,J=t,!(J&6)&&Sn()}}function Iu(){Je=cr.current,ne(cr)}function An(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,Og(n)),pe!==null)for(n=pe.return;n!==null;){var r=n;switch(du(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&Wi();break;case 3:Tr(),ne(Ke),ne(be),ku();break;case 5:wu(r);break;case 4:Tr();break;case 13:ne(le);break;case 19:ne(le);break;case 10:yu(r.type._context);break;case 22:case 23:Iu()}n=n.return}if(Se=e,pe=e=cn(e.current,null),Ce=Je=t,ge=0,Rs=null,Nu=Oo=Bn=0,Fe=as=null,Nn!==null){for(t=0;t<Nn.length;t++)if(n=Nn[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}Nn=null}return e}function Lh(e,t){do{var n=pe;try{if(mu(),Ei.current=to,eo){for(var r=ue.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}eo=!1}if(Un=0,ke=ye=ue=null,is=!1,Es=0,Ou.current=null,n===null||n.return===null){ge=1,Rs=t,pe=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=Ce,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,c=a,d=c.tag;if(!(c.mode&1)&&(d===0||d===11||d===15)){var h=c.alternate;h?(c.updateQueue=h.updateQueue,c.memoizedState=h.memoizedState,c.lanes=h.lanes):(c.updateQueue=null,c.memoizedState=null)}var y=Zc(o);if(y!==null){y.flags&=-257,Wc(y,o,a,i,t),y.mode&1&&Kc(i,u,t),t=y,l=u;var w=t.updateQueue;if(w===null){var v=new Set;v.add(l),t.updateQueue=v}else w.add(l);break e}else{if(!(t&1)){Kc(i,u,t),Mu();break e}l=Error(x(426))}}else if(se&&a.mode&1){var N=Zc(o);if(N!==null){!(N.flags&65536)&&(N.flags|=256),Wc(N,o,a,i,t),hu(Rr(l,a));break e}}i=l=Rr(l,a),ge!==4&&(ge=2),as===null?as=[i]:as.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var p=wh(i,l,t);zc(i,p);break e;case 1:a=l;var f=i.type,m=i.stateNode;if(!(i.flags&128)&&(typeof f.getDerivedStateFromError=="function"||m!==null&&typeof m.componentDidCatch=="function"&&(ln===null||!ln.has(m)))){i.flags|=65536,t&=-t,i.lanes|=t;var k=kh(i,a,t);zc(i,k);break e}}i=i.return}while(i!==null)}Uh(n)}catch(T){t=T,pe===n&&n!==null&&(pe=n=n.return);continue}break}while(!0)}function zh(){var e=no.current;return no.current=to,e===null?to:e}function Mu(){(ge===0||ge===3||ge===2)&&(ge=4),Se===null||!(Bn&268435455)&&!(Oo&268435455)||Gt(Se,Ce)}function io(e,t){var n=J;J|=2;var r=zh();(Se!==e||Ce!==t)&&(jt=null,An(e,t));do try{Xg();break}catch(s){Lh(e,s)}while(!0);if(mu(),J=n,no.current=r,pe!==null)throw Error(x(261));return Se=null,Ce=0,ge}function Xg(){for(;pe!==null;)Dh(pe)}function ev(){for(;pe!==null&&!Cy();)Dh(pe)}function Dh(e){var t=Fh(e.alternate,e,Je);e.memoizedProps=e.pendingProps,t===null?Uh(e):pe=t,Ou.current=null}function Uh(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=Hg(n,t),n!==null){n.flags&=32767,pe=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{ge=6,pe=null;return}}else if(n=Wg(n,t,Je),n!==null){pe=n;return}if(t=t.sibling,t!==null){pe=t;return}pe=t=e}while(t!==null);ge===0&&(ge=5)}function Tn(e,t,n){var r=Y,s=ot.transition;try{ot.transition=null,Y=1,tv(e,t,n,r)}finally{ot.transition=s,Y=r}return null}function tv(e,t,n,r){do gr();while(tn!==null);if(J&6)throw Error(x(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(x(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(jy(e,i),e===Se&&(pe=Se=null,Ce=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||pi||(pi=!0,Vh(Ui,function(){return gr(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=ot.transition,ot.transition=null;var o=Y;Y=1;var a=J;J|=4,Ou.current=null,Qg(e,n),Ph(n,e),kg(Ha),Fi=!!Wa,Ha=Wa=null,e.current=n,qg(n),Ty(),J=a,Y=o,ot.transition=i}else e.current=n;if(pi&&(pi=!1,tn=e,so=s),i=e.pendingLanes,i===0&&(ln=null),Ny(n.stateNode),We(e,he()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(ro)throw ro=!1,e=hl,hl=null,e;return so&1&&e.tag!==0&&gr(),i=e.pendingLanes,i&1?e===pl?ls++:(ls=0,pl=e):ls=0,Sn(),null}function gr(){if(tn!==null){var e=wd(so),t=ot.transition,n=Y;try{if(ot.transition=null,Y=16>e?16:e,tn===null)var r=!1;else{if(e=tn,tn=null,so=0,J&6)throw Error(x(331));var s=J;for(J|=4,M=e.current;M!==null;){var i=M,o=i.child;if(M.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var u=a[l];for(M=u;M!==null;){var c=M;switch(c.tag){case 0:case 11:case 15:os(8,c,i)}var d=c.child;if(d!==null)d.return=c,M=d;else for(;M!==null;){c=M;var h=c.sibling,y=c.return;if(Ah(c),c===u){M=null;break}if(h!==null){h.return=y,M=h;break}M=y}}}var w=i.alternate;if(w!==null){var v=w.child;if(v!==null){w.child=null;do{var N=v.sibling;v.sibling=null,v=N}while(v!==null)}}M=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,M=o;else e:for(;M!==null;){if(i=M,i.flags&2048)switch(i.tag){case 0:case 11:case 15:os(9,i,i.return)}var p=i.sibling;if(p!==null){p.return=i.return,M=p;break e}M=i.return}}var f=e.current;for(M=f;M!==null;){o=M;var m=o.child;if(o.subtreeFlags&2064&&m!==null)m.return=o,M=m;else e:for(o=f;M!==null;){if(a=M,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Ro(9,a)}}catch(T){fe(a,a.return,T)}if(a===o){M=null;break e}var k=a.sibling;if(k!==null){k.return=a.return,M=k;break e}M=a.return}}if(J=s,Sn(),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(_o,e)}catch{}r=!0}return r}finally{Y=n,ot.transition=t}}return!1}function of(e,t,n){t=Rr(n,t),t=wh(e,t,1),e=an(e,t,1),t=je(),e!==null&&(Ks(e,1,t),We(e,t))}function fe(e,t,n){if(e.tag===3)of(e,e,n);else for(;t!==null;){if(t.tag===3){of(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ln===null||!ln.has(r))){e=Rr(n,e),e=kh(t,e,1),t=an(t,e,1),e=je(),t!==null&&(Ks(t,1,e),We(t,e));break}}t=t.return}}function nv(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=je(),e.pingedLanes|=e.suspendedLanes&n,Se===e&&(Ce&n)===n&&(ge===4||ge===3&&(Ce&130023424)===Ce&&500>he()-bu?An(e,0):Nu|=n),We(e,t)}function Bh(e,t){t===0&&(e.mode&1?(t=si,si<<=1,!(si&130023424)&&(si=4194304)):t=1);var n=je();e=Vt(e,t),e!==null&&(Ks(e,t,n),We(e,n))}function rv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Bh(e,n)}function sv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(x(314))}r!==null&&r.delete(t),Bh(e,n)}var Fh;Fh=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ke.current)Ve=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ve=!1,Zg(e,t,n);Ve=!!(e.flags&131072)}else Ve=!1,se&&t.flags&1048576&&Wd(t,Qi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Ti(e,t),e=t.pendingProps;var s=xr(t,be.current);yr(t,n),s=xu(null,t,r,e,s,n);var i=Eu();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ze(r)?(i=!0,Hi(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,vu(t),s.updater=To,t.stateNode=s,s._reactInternals=t,nl(t,r,e,n),t=il(null,t,r,!0,i,n)):(t.tag=0,se&&i&&fu(t),Ie(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Ti(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=ov(r),e=ft(r,e),s){case 0:t=sl(null,t,r,e,n);break e;case 1:t=Qc(null,t,r,e,n);break e;case 11:t=Hc(null,t,r,e,n);break e;case 14:t=Jc(null,t,r,ft(r.type,e),n);break e}throw Error(x(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ft(r,s),sl(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ft(r,s),Qc(e,t,r,s,n);case 3:e:{if(Ch(t),e===null)throw Error(x(387));r=t.pendingProps,i=t.memoizedState,s=i.element,Gd(e,t),Gi(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Rr(Error(x(423)),t),t=qc(e,t,r,n,s);break e}else if(r!==s){s=Rr(Error(x(424)),t),t=qc(e,t,r,n,s);break e}else for(Qe=on(t.stateNode.containerInfo.firstChild),qe=t,se=!0,pt=null,n=qd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Er(),r===s){t=Kt(e,t,n);break e}Ie(e,t,r,n)}t=t.child}return t;case 5:return Xd(t),e===null&&Xa(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Ja(r,s)?o=null:i!==null&&Ja(r,i)&&(t.flags|=32),Eh(e,t),Ie(e,t,o,n),t.child;case 6:return e===null&&Xa(t),null;case 13:return Th(e,t,n);case 4:return _u(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Cr(t,null,r,n):Ie(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ft(r,s),Hc(e,t,r,s,n);case 7:return Ie(e,t,t.pendingProps,n),t.child;case 8:return Ie(e,t,t.pendingProps.children,n),t.child;case 12:return Ie(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,X(qi,r._currentValue),r._currentValue=o,i!==null)if(_t(i.value,o)){if(i.children===s.children&&!Ke.current){t=Kt(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=Ut(-1,n&-n),l.tag=2;var u=i.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),el(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(x(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),el(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}Ie(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,yr(t,n),s=at(s),r=r(s),t.flags|=1,Ie(e,t,r,n),t.child;case 14:return r=t.type,s=ft(r,t.pendingProps),s=ft(r.type,s),Jc(e,t,r,s,n);case 15:return Sh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:ft(r,s),Ti(e,t),t.tag=1,Ze(r)?(e=!0,Hi(t)):e=!1,yr(t,n),_h(t,r,s),nl(t,r,s,n),il(null,t,r,!0,e,n);case 19:return Rh(e,t,n);case 22:return xh(e,t,n)}throw Error(x(156,t.tag))};function Vh(e,t){return yd(e,t)}function iv(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function it(e,t,n,r){return new iv(e,t,n,r)}function Pu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ov(e){if(typeof e=="function")return Pu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Xl)return 11;if(e===eu)return 14}return 2}function cn(e,t){var n=e.alternate;return n===null?(n=it(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ni(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")Pu(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case er:return In(n.children,s,i,t);case Gl:o=8,s|=8;break;case Ta:return e=it(12,n,t,s|2),e.elementType=Ta,e.lanes=i,e;case Ra:return e=it(13,n,t,s),e.elementType=Ra,e.lanes=i,e;case Oa:return e=it(19,n,t,s),e.elementType=Oa,e.lanes=i,e;case Xf:return No(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Yf:o=10;break e;case Gf:o=9;break e;case Xl:o=11;break e;case eu:o=14;break e;case Qt:o=16,r=null;break e}throw Error(x(130,e==null?e:typeof e,""))}return t=it(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function In(e,t,n,r){return e=it(7,e,r,t),e.lanes=n,e}function No(e,t,n,r){return e=it(22,e,r,t),e.elementType=Xf,e.lanes=n,e.stateNode={isHidden:!1},e}function ca(e,t,n){return e=it(6,e,null,t),e.lanes=n,e}function fa(e,t,n){return t=it(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function av(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Zo(0),this.expirationTimes=Zo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Zo(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function ju(e,t,n,r,s,i,o,a,l){return e=new av(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=it(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},vu(i),e}function lv(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xn,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function Kh(e){if(!e)return pn;e=e._reactInternals;e:{if(Hn(e)!==e||e.tag!==1)throw Error(x(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ze(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(x(171))}if(e.tag===1){var n=e.type;if(Ze(n))return Kd(e,n,t)}return t}function Zh(e,t,n,r,s,i,o,a,l){return e=ju(n,r,!0,e,s,i,o,a,l),e.context=Kh(null),n=e.current,r=je(),s=un(n),i=Ut(r,s),i.callback=t??null,an(n,i,s),e.current.lanes=s,Ks(e,s,r),We(e,r),e}function bo(e,t,n,r){var s=t.current,i=je(),o=un(s);return n=Kh(n),t.context===null?t.context=n:t.pendingContext=n,t=Ut(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=an(s,t,o),e!==null&&(gt(e,s,o,i),xi(e,s,o)),o}function oo(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function af(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function $u(e,t){af(e,t),(e=e.alternate)&&af(e,t)}function uv(){return null}var Wh=typeof reportError=="function"?reportError:function(e){console.error(e)};function Lu(e){this._internalRoot=e}Ao.prototype.render=Lu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(x(409));bo(e,t,null,null)};Ao.prototype.unmount=Lu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fn(function(){bo(null,e,null,null)}),t[Ft]=null}};function Ao(e){this._internalRoot=e}Ao.prototype.unstable_scheduleHydration=function(e){if(e){var t=xd();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Yt.length&&t!==0&&t<Yt[n].priority;n++);Yt.splice(n,0,e),n===0&&Cd(e)}};function zu(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Io(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function lf(){}function cv(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var u=oo(o);i.call(u)}}var o=Zh(t,r,e,0,null,!1,!1,"",lf);return e._reactRootContainer=o,e[Ft]=o.current,_s(e.nodeType===8?e.parentNode:e),Fn(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var u=oo(l);a.call(u)}}var l=ju(e,0,!1,null,null,!1,!1,"",lf);return e._reactRootContainer=l,e[Ft]=l.current,_s(e.nodeType===8?e.parentNode:e),Fn(function(){bo(t,l,n,r)}),l}function Mo(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=oo(o);a.call(l)}}bo(t,o,e,s)}else o=cv(n,t,e,s,r);return oo(o)}kd=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Qr(t.pendingLanes);n!==0&&(ru(t,n|1),We(t,he()),!(J&6)&&(Or=he()+500,Sn()))}break;case 13:Fn(function(){var r=Vt(e,1);if(r!==null){var s=je();gt(r,e,1,s)}}),$u(e,1)}};su=function(e){if(e.tag===13){var t=Vt(e,134217728);if(t!==null){var n=je();gt(t,e,134217728,n)}$u(e,134217728)}};Sd=function(e){if(e.tag===13){var t=un(e),n=Vt(e,t);if(n!==null){var r=je();gt(n,e,t,r)}$u(e,t)}};xd=function(){return Y};Ed=function(e,t){var n=Y;try{return Y=e,t()}finally{Y=n}};za=function(e,t,n){switch(t){case"input":if(Aa(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=xo(r);if(!s)throw Error(x(90));td(r),Aa(r,s)}}}break;case"textarea":rd(e,n);break;case"select":t=n.value,t!=null&&dr(e,!!n.multiple,t,!1)}};cd=Au;fd=Fn;var fv={usingClientEntryPoint:!1,Events:[Ws,sr,xo,ld,ud,Au]},Zr={findFiberByHostInstance:On,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},dv={bundleType:Zr.bundleType,version:Zr.version,rendererPackageName:Zr.rendererPackageName,rendererConfig:Zr.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Ht.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=pd(e),e===null?null:e.stateNode},findFiberByHostInstance:Zr.findFiberByHostInstance||uv,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mi=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mi.isDisabled&&mi.supportsFiber)try{_o=mi.inject(dv),Rt=mi}catch{}}et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=fv;et.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!zu(t))throw Error(x(200));return lv(e,t,null,n)};et.createRoot=function(e,t){if(!zu(e))throw Error(x(299));var n=!1,r="",s=Wh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=ju(e,1,!1,null,null,n,!1,r,s),e[Ft]=t.current,_s(e.nodeType===8?e.parentNode:e),new Lu(t)};et.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(x(188)):(e=Object.keys(e).join(","),Error(x(268,e)));return e=pd(t),e=e===null?null:e.stateNode,e};et.flushSync=function(e){return Fn(e)};et.hydrate=function(e,t,n){if(!Io(t))throw Error(x(200));return Mo(null,e,t,!0,n)};et.hydrateRoot=function(e,t,n){if(!zu(e))throw Error(x(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=Wh;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=Zh(t,null,e,1,n??null,s,!1,i,o),e[Ft]=t.current,_s(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new Ao(t)};et.render=function(e,t,n){if(!Io(t))throw Error(x(200));return Mo(null,e,t,!1,n)};et.unmountComponentAtNode=function(e){if(!Io(e))throw Error(x(40));return e._reactRootContainer?(Fn(function(){Mo(null,null,e,!1,function(){e._reactRootContainer=null,e[Ft]=null})}),!0):!1};et.unstable_batchedUpdates=Au;et.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Io(n))throw Error(x(200));if(e==null||e._reactInternals===void 0)throw Error(x(38));return Mo(e,t,n,!1,r)};et.version="18.3.1-next-f1338f8080-20240426";function Hh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Hh)}catch(e){console.error(e)}}Hh(),Hf.exports=et;var hv=Hf.exports,Jh,uf=hv;Jh=uf.createRoot,uf.hydrateRoot;var H;(function(e){e.assertEqual=s=>s;function t(s){}e.assertIs=t;function n(s){throw new Error}e.assertNever=n,e.arrayToEnum=s=>{const i={};for(const o of s)i[o]=o;return i},e.getValidEnumValues=s=>{const i=e.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(const a of i)o[a]=s[a];return e.objectValues(o)},e.objectValues=s=>e.objectKeys(s).map(function(i){return s[i]}),e.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{const i=[];for(const o in s)Object.prototype.hasOwnProperty.call(s,o)&&i.push(o);return i},e.find=(s,i)=>{for(const o of s)if(i(o))return o},e.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function r(s,i=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(i)}e.joinValues=r,e.jsonStringifyReplacer=(s,i)=>typeof i=="bigint"?i.toString():i})(H||(H={}));var gl;(function(e){e.mergeShapes=(t,n)=>({...t,...n})})(gl||(gl={}));const A=H.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Xt=e=>{switch(typeof e){case"undefined":return A.undefined;case"string":return A.string;case"number":return isNaN(e)?A.nan:A.number;case"boolean":return A.boolean;case"function":return A.function;case"bigint":return A.bigint;case"symbol":return A.symbol;case"object":return Array.isArray(e)?A.array:e===null?A.null:e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?A.promise:typeof Map<"u"&&e instanceof Map?A.map:typeof Set<"u"&&e instanceof Set?A.set:typeof Date<"u"&&e instanceof Date?A.date:A.object;default:return A.unknown}},E=H.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),pv=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class Ye extends Error{constructor(t){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name="ZodError",this.issues=t}get errors(){return this.issues}format(t){const n=t||function(i){return i.message},r={_errors:[]},s=i=>{for(const o of i.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)r._errors.push(n(o));else{let a=r,l=0;for(;l<o.path.length;){const u=o.path[l];l===o.path.length-1?(a[u]=a[u]||{_errors:[]},a[u]._errors.push(n(o))):a[u]=a[u]||{_errors:[]},a=a[u],l++}}};return s(this),r}static assert(t){if(!(t instanceof Ye))throw new Error(`Not a ZodError: ${t}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,H.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(t=n=>n.message){const n={},r=[];for(const s of this.issues)s.path.length>0?(n[s.path[0]]=n[s.path[0]]||[],n[s.path[0]].push(t(s))):r.push(t(s));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Ye.create=e=>new Ye(e);const Nr=(e,t)=>{let n;switch(e.code){case E.invalid_type:e.received===A.undefined?n="Required":n=`Expected ${e.expected}, received ${e.received}`;break;case E.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,H.jsonStringifyReplacer)}`;break;case E.unrecognized_keys:n=`Unrecognized key(s) in object: ${H.joinValues(e.keys,", ")}`;break;case E.invalid_union:n="Invalid input";break;case E.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${H.joinValues(e.options)}`;break;case E.invalid_enum_value:n=`Invalid enum value. Expected ${H.joinValues(e.options)}, received '${e.received}'`;break;case E.invalid_arguments:n="Invalid function arguments";break;case E.invalid_return_type:n="Invalid function return type";break;case E.invalid_date:n="Invalid date";break;case E.invalid_string:typeof e.validation=="object"?"includes"in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position=="number"&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:H.assertNever(e.validation):e.validation!=="regex"?n=`Invalid ${e.validation}`:n="Invalid";break;case E.too_small:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:n="Invalid input";break;case E.too_big:e.type==="array"?n=`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:e.type==="string"?n=`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:e.type==="number"?n=`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="bigint"?n=`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:e.type==="date"?n=`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:n="Invalid input";break;case E.custom:n="Invalid input";break;case E.invalid_intersection_types:n="Intersection results could not be merged";break;case E.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case E.not_finite:n="Number must be finite";break;default:n=t.defaultError,H.assertNever(e)}return{message:n}};let Qh=Nr;function mv(e){Qh=e}function ao(){return Qh}const lo=e=>{const{data:t,path:n,errorMaps:r,issueData:s}=e,i=[...n,...s.path||[]],o={...s,path:i};if(s.message!==void 0)return{...s,path:i,message:s.message};let a="";const l=r.filter(u=>!!u).slice().reverse();for(const u of l)a=u(o,{data:t,defaultError:a}).message;return{...s,path:i,message:a}},yv=[];function b(e,t){const n=ao(),r=lo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Nr?void 0:Nr].filter(s=>!!s)});e.common.issues.push(r)}class Ae{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(t,n){const r=[];for(const s of n){if(s.status==="aborted")return D;s.status==="dirty"&&t.dirty(),r.push(s.value)}return{status:t.value,value:r}}static async mergeObjectAsync(t,n){const r=[];for(const s of n){const i=await s.key,o=await s.value;r.push({key:i,value:o})}return Ae.mergeObjectSync(t,r)}static mergeObjectSync(t,n){const r={};for(const s of n){const{key:i,value:o}=s;if(i.status==="aborted"||o.status==="aborted")return D;i.status==="dirty"&&t.dirty(),o.status==="dirty"&&t.dirty(),i.value!=="__proto__"&&(typeof o.value<"u"||s.alwaysSet)&&(r[i.value]=o.value)}return{status:t.value,value:r}}}const D=Object.freeze({status:"aborted"}),fr=e=>({status:"dirty",value:e}),Le=e=>({status:"valid",value:e}),vl=e=>e.status==="aborted",_l=e=>e.status==="dirty",Os=e=>e.status==="valid",Ns=e=>typeof Promise<"u"&&e instanceof Promise;function uo(e,t,n,r){if(typeof t=="function"?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t.get(e)}function qh(e,t,n,r,s){if(typeof t=="function"?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return t.set(e,n),n}var j;(function(e){e.errToObj=t=>typeof t=="string"?{message:t}:t||{},e.toString=t=>typeof t=="string"?t:t==null?void 0:t.message})(j||(j={}));var Yr,Gr;class At{constructor(t,n,r,s){this._cachedPath=[],this.parent=t,this.data=n,this._path=r,this._key=s}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const cf=(e,t)=>{if(Os(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const n=new Ye(e.common.issues);return this._error=n,this._error}}};function V(e){if(!e)return{};const{errorMap:t,invalid_type_error:n,required_error:r,description:s}=e;if(t&&(n||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:s}:{errorMap:(o,a)=>{var l,u;const{message:c}=e;return o.code==="invalid_enum_value"?{message:c??a.defaultError}:typeof a.data>"u"?{message:(l=c??r)!==null&&l!==void 0?l:a.defaultError}:o.code!=="invalid_type"?{message:a.defaultError}:{message:(u=c??n)!==null&&u!==void 0?u:a.defaultError}},description:s}}class K{constructor(t){this.spa=this.safeParseAsync,this._def=t,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this)}get description(){return this._def.description}_getType(t){return Xt(t.data)}_getOrReturnCtx(t,n){return n||{common:t.parent.common,data:t.data,parsedType:Xt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}_processInputParams(t){return{status:new Ae,ctx:{common:t.parent.common,data:t.data,parsedType:Xt(t.data),schemaErrorMap:this._def.errorMap,path:t.path,parent:t.parent}}}_parseSync(t){const n=this._parse(t);if(Ns(n))throw new Error("Synchronous parse encountered promise.");return n}_parseAsync(t){const n=this._parse(t);return Promise.resolve(n)}parse(t,n){const r=this.safeParse(t,n);if(r.success)return r.data;throw r.error}safeParse(t,n){var r;const s={common:{issues:[],async:(r=n==null?void 0:n.async)!==null&&r!==void 0?r:!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xt(t)},i=this._parseSync({data:t,path:s.path,parent:s});return cf(s,i)}async parseAsync(t,n){const r=await this.safeParseAsync(t,n);if(r.success)return r.data;throw r.error}async safeParseAsync(t,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:t,parsedType:Xt(t)},s=this._parse({data:t,path:r.path,parent:r}),i=await(Ns(s)?s:Promise.resolve(s));return cf(r,i)}refine(t,n){const r=s=>typeof n=="string"||typeof n>"u"?{message:n}:typeof n=="function"?n(s):n;return this._refinement((s,i)=>{const o=t(s),a=()=>i.addIssue({code:E.custom,...r(s)});return typeof Promise<"u"&&o instanceof Promise?o.then(l=>l?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(t,n){return this._refinement((r,s)=>t(r)?!0:(s.addIssue(typeof n=="function"?n(r,s):n),!1))}_refinement(t){return new wt({schema:this,typeName:z.ZodEffects,effect:{type:"refinement",refinement:t}})}superRefine(t){return this._refinement(t)}optional(){return Nt.create(this,this._def)}nullable(){return vn.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return vt.create(this,this._def)}promise(){return Ar.create(this,this._def)}or(t){return Ms.create([this,t],this._def)}and(t){return Ps.create(this,t,this._def)}transform(t){return new wt({...V(this._def),schema:this,typeName:z.ZodEffects,effect:{type:"transform",transform:t}})}default(t){const n=typeof t=="function"?t:()=>t;return new Ds({...V(this._def),innerType:this,defaultValue:n,typeName:z.ZodDefault})}brand(){return new Du({typeName:z.ZodBranded,type:this,...V(this._def)})}catch(t){const n=typeof t=="function"?t:()=>t;return new Us({...V(this._def),innerType:this,catchValue:n,typeName:z.ZodCatch})}describe(t){const n=this.constructor;return new n({...this._def,description:t})}pipe(t){return Js.create(this,t)}readonly(){return Bs.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const gv=/^c[^\s-]{8,}$/i,vv=/^[0-9a-z]+$/,_v=/^[0-9A-HJKMNP-TV-Z]{26}$/,wv=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,kv=/^[a-z0-9_-]{21}$/i,Sv=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,xv=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ev="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let da;const Cv=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Tv=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,Rv=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Yh="((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))",Ov=new RegExp(`^${Yh}$`);function Gh(e){let t="([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";return e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision==null&&(t=`${t}(\\.\\d+)?`),t}function Nv(e){return new RegExp(`^${Gh(e)}$`)}function Xh(e){let t=`${Yh}T${Gh(e)}`;const n=[];return n.push(e.local?"Z?":"Z"),e.offset&&n.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${n.join("|")})`,new RegExp(`^${t}$`)}function bv(e,t){return!!((t==="v4"||!t)&&Cv.test(e)||(t==="v6"||!t)&&Tv.test(e))}class mt extends K{_parse(t){if(this._def.coerce&&(t.data=String(t.data)),this._getType(t)!==A.string){const i=this._getOrReturnCtx(t);return b(i,{code:E.invalid_type,expected:A.string,received:i.parsedType}),D}const r=new Ae;let s;for(const i of this._def.checks)if(i.kind==="min")t.data.length<i.value&&(s=this._getOrReturnCtx(t,s),b(s,{code:E.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="max")t.data.length>i.value&&(s=this._getOrReturnCtx(t,s),b(s,{code:E.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!1,message:i.message}),r.dirty());else if(i.kind==="length"){const o=t.data.length>i.value,a=t.data.length<i.value;(o||a)&&(s=this._getOrReturnCtx(t,s),o?b(s,{code:E.too_big,maximum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}):a&&b(s,{code:E.too_small,minimum:i.value,type:"string",inclusive:!0,exact:!0,message:i.message}),r.dirty())}else if(i.kind==="email")xv.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"email",code:E.invalid_string,message:i.message}),r.dirty());else if(i.kind==="emoji")da||(da=new RegExp(Ev,"u")),da.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"emoji",code:E.invalid_string,message:i.message}),r.dirty());else if(i.kind==="uuid")wv.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"uuid",code:E.invalid_string,message:i.message}),r.dirty());else if(i.kind==="nanoid")kv.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"nanoid",code:E.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid")gv.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"cuid",code:E.invalid_string,message:i.message}),r.dirty());else if(i.kind==="cuid2")vv.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"cuid2",code:E.invalid_string,message:i.message}),r.dirty());else if(i.kind==="ulid")_v.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"ulid",code:E.invalid_string,message:i.message}),r.dirty());else if(i.kind==="url")try{new URL(t.data)}catch{s=this._getOrReturnCtx(t,s),b(s,{validation:"url",code:E.invalid_string,message:i.message}),r.dirty()}else i.kind==="regex"?(i.regex.lastIndex=0,i.regex.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"regex",code:E.invalid_string,message:i.message}),r.dirty())):i.kind==="trim"?t.data=t.data.trim():i.kind==="includes"?t.data.includes(i.value,i.position)||(s=this._getOrReturnCtx(t,s),b(s,{code:E.invalid_string,validation:{includes:i.value,position:i.position},message:i.message}),r.dirty()):i.kind==="toLowerCase"?t.data=t.data.toLowerCase():i.kind==="toUpperCase"?t.data=t.data.toUpperCase():i.kind==="startsWith"?t.data.startsWith(i.value)||(s=this._getOrReturnCtx(t,s),b(s,{code:E.invalid_string,validation:{startsWith:i.value},message:i.message}),r.dirty()):i.kind==="endsWith"?t.data.endsWith(i.value)||(s=this._getOrReturnCtx(t,s),b(s,{code:E.invalid_string,validation:{endsWith:i.value},message:i.message}),r.dirty()):i.kind==="datetime"?Xh(i).test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{code:E.invalid_string,validation:"datetime",message:i.message}),r.dirty()):i.kind==="date"?Ov.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{code:E.invalid_string,validation:"date",message:i.message}),r.dirty()):i.kind==="time"?Nv(i).test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{code:E.invalid_string,validation:"time",message:i.message}),r.dirty()):i.kind==="duration"?Sv.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"duration",code:E.invalid_string,message:i.message}),r.dirty()):i.kind==="ip"?bv(t.data,i.version)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"ip",code:E.invalid_string,message:i.message}),r.dirty()):i.kind==="base64"?Rv.test(t.data)||(s=this._getOrReturnCtx(t,s),b(s,{validation:"base64",code:E.invalid_string,message:i.message}),r.dirty()):H.assertNever(i);return{status:r.value,value:t.data}}_regex(t,n,r){return this.refinement(s=>t.test(s),{validation:n,code:E.invalid_string,...j.errToObj(r)})}_addCheck(t){return new mt({...this._def,checks:[...this._def.checks,t]})}email(t){return this._addCheck({kind:"email",...j.errToObj(t)})}url(t){return this._addCheck({kind:"url",...j.errToObj(t)})}emoji(t){return this._addCheck({kind:"emoji",...j.errToObj(t)})}uuid(t){return this._addCheck({kind:"uuid",...j.errToObj(t)})}nanoid(t){return this._addCheck({kind:"nanoid",...j.errToObj(t)})}cuid(t){return this._addCheck({kind:"cuid",...j.errToObj(t)})}cuid2(t){return this._addCheck({kind:"cuid2",...j.errToObj(t)})}ulid(t){return this._addCheck({kind:"ulid",...j.errToObj(t)})}base64(t){return this._addCheck({kind:"base64",...j.errToObj(t)})}ip(t){return this._addCheck({kind:"ip",...j.errToObj(t)})}datetime(t){var n,r;return typeof t=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:t}):this._addCheck({kind:"datetime",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,offset:(n=t==null?void 0:t.offset)!==null&&n!==void 0?n:!1,local:(r=t==null?void 0:t.local)!==null&&r!==void 0?r:!1,...j.errToObj(t==null?void 0:t.message)})}date(t){return this._addCheck({kind:"date",message:t})}time(t){return typeof t=="string"?this._addCheck({kind:"time",precision:null,message:t}):this._addCheck({kind:"time",precision:typeof(t==null?void 0:t.precision)>"u"?null:t==null?void 0:t.precision,...j.errToObj(t==null?void 0:t.message)})}duration(t){return this._addCheck({kind:"duration",...j.errToObj(t)})}regex(t,n){return this._addCheck({kind:"regex",regex:t,...j.errToObj(n)})}includes(t,n){return this._addCheck({kind:"includes",value:t,position:n==null?void 0:n.position,...j.errToObj(n==null?void 0:n.message)})}startsWith(t,n){return this._addCheck({kind:"startsWith",value:t,...j.errToObj(n)})}endsWith(t,n){return this._addCheck({kind:"endsWith",value:t,...j.errToObj(n)})}min(t,n){return this._addCheck({kind:"min",value:t,...j.errToObj(n)})}max(t,n){return this._addCheck({kind:"max",value:t,...j.errToObj(n)})}length(t,n){return this._addCheck({kind:"length",value:t,...j.errToObj(n)})}nonempty(t){return this.min(1,j.errToObj(t))}trim(){return new mt({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new mt({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new mt({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(t=>t.kind==="datetime")}get isDate(){return!!this._def.checks.find(t=>t.kind==="date")}get isTime(){return!!this._def.checks.find(t=>t.kind==="time")}get isDuration(){return!!this._def.checks.find(t=>t.kind==="duration")}get isEmail(){return!!this._def.checks.find(t=>t.kind==="email")}get isURL(){return!!this._def.checks.find(t=>t.kind==="url")}get isEmoji(){return!!this._def.checks.find(t=>t.kind==="emoji")}get isUUID(){return!!this._def.checks.find(t=>t.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(t=>t.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(t=>t.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(t=>t.kind==="cuid2")}get isULID(){return!!this._def.checks.find(t=>t.kind==="ulid")}get isIP(){return!!this._def.checks.find(t=>t.kind==="ip")}get isBase64(){return!!this._def.checks.find(t=>t.kind==="base64")}get minLength(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxLength(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}mt.create=e=>{var t;return new mt({checks:[],typeName:z.ZodString,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...V(e)})};function Av(e,t){const n=(e.toString().split(".")[1]||"").length,r=(t.toString().split(".")[1]||"").length,s=n>r?n:r,i=parseInt(e.toFixed(s).replace(".","")),o=parseInt(t.toFixed(s).replace(".",""));return i%o/Math.pow(10,s)}class mn extends K{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(t){if(this._def.coerce&&(t.data=Number(t.data)),this._getType(t)!==A.number){const i=this._getOrReturnCtx(t);return b(i,{code:E.invalid_type,expected:A.number,received:i.parsedType}),D}let r;const s=new Ae;for(const i of this._def.checks)i.kind==="int"?H.isInteger(t.data)||(r=this._getOrReturnCtx(t,r),b(r,{code:E.invalid_type,expected:"integer",received:"float",message:i.message}),s.dirty()):i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),b(r,{code:E.too_small,minimum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),b(r,{code:E.too_big,maximum:i.value,type:"number",inclusive:i.inclusive,exact:!1,message:i.message}),s.dirty()):i.kind==="multipleOf"?Av(t.data,i.value)!==0&&(r=this._getOrReturnCtx(t,r),b(r,{code:E.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):i.kind==="finite"?Number.isFinite(t.data)||(r=this._getOrReturnCtx(t,r),b(r,{code:E.not_finite,message:i.message}),s.dirty()):H.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,j.toString(n))}gt(t,n){return this.setLimit("min",t,!1,j.toString(n))}lte(t,n){return this.setLimit("max",t,!0,j.toString(n))}lt(t,n){return this.setLimit("max",t,!1,j.toString(n))}setLimit(t,n,r,s){return new mn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:j.toString(s)}]})}_addCheck(t){return new mn({...this._def,checks:[...this._def.checks,t]})}int(t){return this._addCheck({kind:"int",message:j.toString(t)})}positive(t){return this._addCheck({kind:"min",value:0,inclusive:!1,message:j.toString(t)})}negative(t){return this._addCheck({kind:"max",value:0,inclusive:!1,message:j.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:0,inclusive:!0,message:j.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:0,inclusive:!0,message:j.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:j.toString(n)})}finite(t){return this._addCheck({kind:"finite",message:j.toString(t)})}safe(t){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:j.toString(t)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:j.toString(t)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}get isInt(){return!!this._def.checks.find(t=>t.kind==="int"||t.kind==="multipleOf"&&H.isInteger(t.value))}get isFinite(){let t=null,n=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(n===null||r.value>n)&&(n=r.value):r.kind==="max"&&(t===null||r.value<t)&&(t=r.value)}return Number.isFinite(n)&&Number.isFinite(t)}}mn.create=e=>new mn({checks:[],typeName:z.ZodNumber,coerce:(e==null?void 0:e.coerce)||!1,...V(e)});class yn extends K{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(t){if(this._def.coerce&&(t.data=BigInt(t.data)),this._getType(t)!==A.bigint){const i=this._getOrReturnCtx(t);return b(i,{code:E.invalid_type,expected:A.bigint,received:i.parsedType}),D}let r;const s=new Ae;for(const i of this._def.checks)i.kind==="min"?(i.inclusive?t.data<i.value:t.data<=i.value)&&(r=this._getOrReturnCtx(t,r),b(r,{code:E.too_small,type:"bigint",minimum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="max"?(i.inclusive?t.data>i.value:t.data>=i.value)&&(r=this._getOrReturnCtx(t,r),b(r,{code:E.too_big,type:"bigint",maximum:i.value,inclusive:i.inclusive,message:i.message}),s.dirty()):i.kind==="multipleOf"?t.data%i.value!==BigInt(0)&&(r=this._getOrReturnCtx(t,r),b(r,{code:E.not_multiple_of,multipleOf:i.value,message:i.message}),s.dirty()):H.assertNever(i);return{status:s.value,value:t.data}}gte(t,n){return this.setLimit("min",t,!0,j.toString(n))}gt(t,n){return this.setLimit("min",t,!1,j.toString(n))}lte(t,n){return this.setLimit("max",t,!0,j.toString(n))}lt(t,n){return this.setLimit("max",t,!1,j.toString(n))}setLimit(t,n,r,s){return new yn({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:j.toString(s)}]})}_addCheck(t){return new yn({...this._def,checks:[...this._def.checks,t]})}positive(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:j.toString(t)})}negative(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:j.toString(t)})}nonpositive(t){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:j.toString(t)})}nonnegative(t){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:j.toString(t)})}multipleOf(t,n){return this._addCheck({kind:"multipleOf",value:t,message:j.toString(n)})}get minValue(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t}get maxValue(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t}}yn.create=e=>{var t;return new yn({checks:[],typeName:z.ZodBigInt,coerce:(t=e==null?void 0:e.coerce)!==null&&t!==void 0?t:!1,...V(e)})};class bs extends K{_parse(t){if(this._def.coerce&&(t.data=!!t.data),this._getType(t)!==A.boolean){const r=this._getOrReturnCtx(t);return b(r,{code:E.invalid_type,expected:A.boolean,received:r.parsedType}),D}return Le(t.data)}}bs.create=e=>new bs({typeName:z.ZodBoolean,coerce:(e==null?void 0:e.coerce)||!1,...V(e)});class Vn extends K{_parse(t){if(this._def.coerce&&(t.data=new Date(t.data)),this._getType(t)!==A.date){const i=this._getOrReturnCtx(t);return b(i,{code:E.invalid_type,expected:A.date,received:i.parsedType}),D}if(isNaN(t.data.getTime())){const i=this._getOrReturnCtx(t);return b(i,{code:E.invalid_date}),D}const r=new Ae;let s;for(const i of this._def.checks)i.kind==="min"?t.data.getTime()<i.value&&(s=this._getOrReturnCtx(t,s),b(s,{code:E.too_small,message:i.message,inclusive:!0,exact:!1,minimum:i.value,type:"date"}),r.dirty()):i.kind==="max"?t.data.getTime()>i.value&&(s=this._getOrReturnCtx(t,s),b(s,{code:E.too_big,message:i.message,inclusive:!0,exact:!1,maximum:i.value,type:"date"}),r.dirty()):H.assertNever(i);return{status:r.value,value:new Date(t.data.getTime())}}_addCheck(t){return new Vn({...this._def,checks:[...this._def.checks,t]})}min(t,n){return this._addCheck({kind:"min",value:t.getTime(),message:j.toString(n)})}max(t,n){return this._addCheck({kind:"max",value:t.getTime(),message:j.toString(n)})}get minDate(){let t=null;for(const n of this._def.checks)n.kind==="min"&&(t===null||n.value>t)&&(t=n.value);return t!=null?new Date(t):null}get maxDate(){let t=null;for(const n of this._def.checks)n.kind==="max"&&(t===null||n.value<t)&&(t=n.value);return t!=null?new Date(t):null}}Vn.create=e=>new Vn({checks:[],coerce:(e==null?void 0:e.coerce)||!1,typeName:z.ZodDate,...V(e)});class co extends K{_parse(t){if(this._getType(t)!==A.symbol){const r=this._getOrReturnCtx(t);return b(r,{code:E.invalid_type,expected:A.symbol,received:r.parsedType}),D}return Le(t.data)}}co.create=e=>new co({typeName:z.ZodSymbol,...V(e)});class As extends K{_parse(t){if(this._getType(t)!==A.undefined){const r=this._getOrReturnCtx(t);return b(r,{code:E.invalid_type,expected:A.undefined,received:r.parsedType}),D}return Le(t.data)}}As.create=e=>new As({typeName:z.ZodUndefined,...V(e)});class Is extends K{_parse(t){if(this._getType(t)!==A.null){const r=this._getOrReturnCtx(t);return b(r,{code:E.invalid_type,expected:A.null,received:r.parsedType}),D}return Le(t.data)}}Is.create=e=>new Is({typeName:z.ZodNull,...V(e)});class br extends K{constructor(){super(...arguments),this._any=!0}_parse(t){return Le(t.data)}}br.create=e=>new br({typeName:z.ZodAny,...V(e)});class Mn extends K{constructor(){super(...arguments),this._unknown=!0}_parse(t){return Le(t.data)}}Mn.create=e=>new Mn({typeName:z.ZodUnknown,...V(e)});class Zt extends K{_parse(t){const n=this._getOrReturnCtx(t);return b(n,{code:E.invalid_type,expected:A.never,received:n.parsedType}),D}}Zt.create=e=>new Zt({typeName:z.ZodNever,...V(e)});class fo extends K{_parse(t){if(this._getType(t)!==A.undefined){const r=this._getOrReturnCtx(t);return b(r,{code:E.invalid_type,expected:A.void,received:r.parsedType}),D}return Le(t.data)}}fo.create=e=>new fo({typeName:z.ZodVoid,...V(e)});class vt extends K{_parse(t){const{ctx:n,status:r}=this._processInputParams(t),s=this._def;if(n.parsedType!==A.array)return b(n,{code:E.invalid_type,expected:A.array,received:n.parsedType}),D;if(s.exactLength!==null){const o=n.data.length>s.exactLength.value,a=n.data.length<s.exactLength.value;(o||a)&&(b(n,{code:o?E.too_big:E.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),r.dirty())}if(s.minLength!==null&&n.data.length<s.minLength.value&&(b(n,{code:E.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),r.dirty()),s.maxLength!==null&&n.data.length>s.maxLength.value&&(b(n,{code:E.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((o,a)=>s.type._parseAsync(new At(n,o,n.path,a)))).then(o=>Ae.mergeArray(r,o));const i=[...n.data].map((o,a)=>s.type._parseSync(new At(n,o,n.path,a)));return Ae.mergeArray(r,i)}get element(){return this._def.type}min(t,n){return new vt({...this._def,minLength:{value:t,message:j.toString(n)}})}max(t,n){return new vt({...this._def,maxLength:{value:t,message:j.toString(n)}})}length(t,n){return new vt({...this._def,exactLength:{value:t,message:j.toString(n)}})}nonempty(t){return this.min(1,t)}}vt.create=(e,t)=>new vt({type:e,minLength:null,maxLength:null,exactLength:null,typeName:z.ZodArray,...V(t)});function qn(e){if(e instanceof ae){const t={};for(const n in e.shape){const r=e.shape[n];t[n]=Nt.create(qn(r))}return new ae({...e._def,shape:()=>t})}else return e instanceof vt?new vt({...e._def,type:qn(e.element)}):e instanceof Nt?Nt.create(qn(e.unwrap())):e instanceof vn?vn.create(qn(e.unwrap())):e instanceof It?It.create(e.items.map(t=>qn(t))):e}class ae extends K{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const t=this._def.shape(),n=H.objectKeys(t);return this._cached={shape:t,keys:n}}_parse(t){if(this._getType(t)!==A.object){const u=this._getOrReturnCtx(t);return b(u,{code:E.invalid_type,expected:A.object,received:u.parsedType}),D}const{status:r,ctx:s}=this._processInputParams(t),{shape:i,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof Zt&&this._def.unknownKeys==="strip"))for(const u in s.data)o.includes(u)||a.push(u);const l=[];for(const u of o){const c=i[u],d=s.data[u];l.push({key:{status:"valid",value:u},value:c._parse(new At(s,d,s.path,u)),alwaysSet:u in s.data})}if(this._def.catchall instanceof Zt){const u=this._def.unknownKeys;if(u==="passthrough")for(const c of a)l.push({key:{status:"valid",value:c},value:{status:"valid",value:s.data[c]}});else if(u==="strict")a.length>0&&(b(s,{code:E.unrecognized_keys,keys:a}),r.dirty());else if(u!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const u=this._def.catchall;for(const c of a){const d=s.data[c];l.push({key:{status:"valid",value:c},value:u._parse(new At(s,d,s.path,c)),alwaysSet:c in s.data})}}return s.common.async?Promise.resolve().then(async()=>{const u=[];for(const c of l){const d=await c.key,h=await c.value;u.push({key:d,value:h,alwaysSet:c.alwaysSet})}return u}).then(u=>Ae.mergeObjectSync(r,u)):Ae.mergeObjectSync(r,l)}get shape(){return this._def.shape()}strict(t){return j.errToObj,new ae({...this._def,unknownKeys:"strict",...t!==void 0?{errorMap:(n,r)=>{var s,i,o,a;const l=(o=(i=(s=this._def).errorMap)===null||i===void 0?void 0:i.call(s,n,r).message)!==null&&o!==void 0?o:r.defaultError;return n.code==="unrecognized_keys"?{message:(a=j.errToObj(t).message)!==null&&a!==void 0?a:l}:{message:l}}}:{}})}strip(){return new ae({...this._def,unknownKeys:"strip"})}passthrough(){return new ae({...this._def,unknownKeys:"passthrough"})}extend(t){return new ae({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new ae({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:z.ZodObject})}setKey(t,n){return this.augment({[t]:n})}catchall(t){return new ae({...this._def,catchall:t})}pick(t){const n={};return H.objectKeys(t).forEach(r=>{t[r]&&this.shape[r]&&(n[r]=this.shape[r])}),new ae({...this._def,shape:()=>n})}omit(t){const n={};return H.objectKeys(this.shape).forEach(r=>{t[r]||(n[r]=this.shape[r])}),new ae({...this._def,shape:()=>n})}deepPartial(){return qn(this)}partial(t){const n={};return H.objectKeys(this.shape).forEach(r=>{const s=this.shape[r];t&&!t[r]?n[r]=s:n[r]=s.optional()}),new ae({...this._def,shape:()=>n})}required(t){const n={};return H.objectKeys(this.shape).forEach(r=>{if(t&&!t[r])n[r]=this.shape[r];else{let i=this.shape[r];for(;i instanceof Nt;)i=i._def.innerType;n[r]=i}}),new ae({...this._def,shape:()=>n})}keyof(){return ep(H.objectKeys(this.shape))}}ae.create=(e,t)=>new ae({shape:()=>e,unknownKeys:"strip",catchall:Zt.create(),typeName:z.ZodObject,...V(t)});ae.strictCreate=(e,t)=>new ae({shape:()=>e,unknownKeys:"strict",catchall:Zt.create(),typeName:z.ZodObject,...V(t)});ae.lazycreate=(e,t)=>new ae({shape:e,unknownKeys:"strip",catchall:Zt.create(),typeName:z.ZodObject,...V(t)});class Ms extends K{_parse(t){const{ctx:n}=this._processInputParams(t),r=this._def.options;function s(i){for(const a of i)if(a.result.status==="valid")return a.result;for(const a of i)if(a.result.status==="dirty")return n.common.issues.push(...a.ctx.common.issues),a.result;const o=i.map(a=>new Ye(a.ctx.common.issues));return b(n,{code:E.invalid_union,unionErrors:o}),D}if(n.common.async)return Promise.all(r.map(async i=>{const o={...n,common:{...n.common,issues:[]},parent:null};return{result:await i._parseAsync({data:n.data,path:n.path,parent:o}),ctx:o}})).then(s);{let i;const o=[];for(const l of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=l._parseSync({data:n.data,path:n.path,parent:u});if(c.status==="valid")return c;c.status==="dirty"&&!i&&(i={result:c,ctx:u}),u.common.issues.length&&o.push(u.common.issues)}if(i)return n.common.issues.push(...i.ctx.common.issues),i.result;const a=o.map(l=>new Ye(l));return b(n,{code:E.invalid_union,unionErrors:a}),D}}get options(){return this._def.options}}Ms.create=(e,t)=>new Ms({options:e,typeName:z.ZodUnion,...V(t)});const Pt=e=>e instanceof $s?Pt(e.schema):e instanceof wt?Pt(e.innerType()):e instanceof Ls?[e.value]:e instanceof gn?e.options:e instanceof zs?H.objectValues(e.enum):e instanceof Ds?Pt(e._def.innerType):e instanceof As?[void 0]:e instanceof Is?[null]:e instanceof Nt?[void 0,...Pt(e.unwrap())]:e instanceof vn?[null,...Pt(e.unwrap())]:e instanceof Du||e instanceof Bs?Pt(e.unwrap()):e instanceof Us?Pt(e._def.innerType):[];class Po extends K{_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==A.object)return b(n,{code:E.invalid_type,expected:A.object,received:n.parsedType}),D;const r=this.discriminator,s=n.data[r],i=this.optionsMap.get(s);return i?n.common.async?i._parseAsync({data:n.data,path:n.path,parent:n}):i._parseSync({data:n.data,path:n.path,parent:n}):(b(n,{code:E.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[r]}),D)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){const s=new Map;for(const i of n){const o=Pt(i.shape[t]);if(!o.length)throw new Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(const a of o){if(s.has(a))throw new Error(`Discriminator property ${String(t)} has duplicate value ${String(a)}`);s.set(a,i)}}return new Po({typeName:z.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:s,...V(r)})}}function wl(e,t){const n=Xt(e),r=Xt(t);if(e===t)return{valid:!0,data:e};if(n===A.object&&r===A.object){const s=H.objectKeys(t),i=H.objectKeys(e).filter(a=>s.indexOf(a)!==-1),o={...e,...t};for(const a of i){const l=wl(e[a],t[a]);if(!l.valid)return{valid:!1};o[a]=l.data}return{valid:!0,data:o}}else if(n===A.array&&r===A.array){if(e.length!==t.length)return{valid:!1};const s=[];for(let i=0;i<e.length;i++){const o=e[i],a=t[i],l=wl(o,a);if(!l.valid)return{valid:!1};s.push(l.data)}return{valid:!0,data:s}}else return n===A.date&&r===A.date&&+e==+t?{valid:!0,data:e}:{valid:!1}}class Ps extends K{_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=(i,o)=>{if(vl(i)||vl(o))return D;const a=wl(i.value,o.value);return a.valid?((_l(i)||_l(o))&&n.dirty(),{status:n.value,value:a.data}):(b(r,{code:E.invalid_intersection_types}),D)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([i,o])=>s(i,o)):s(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}Ps.create=(e,t,n)=>new Ps({left:e,right:t,typeName:z.ZodIntersection,...V(n)});class It extends K{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==A.array)return b(r,{code:E.invalid_type,expected:A.array,received:r.parsedType}),D;if(r.data.length<this._def.items.length)return b(r,{code:E.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),D;!this._def.rest&&r.data.length>this._def.items.length&&(b(r,{code:E.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),n.dirty());const i=[...r.data].map((o,a)=>{const l=this._def.items[a]||this._def.rest;return l?l._parse(new At(r,o,r.path,a)):null}).filter(o=>!!o);return r.common.async?Promise.all(i).then(o=>Ae.mergeArray(n,o)):Ae.mergeArray(n,i)}get items(){return this._def.items}rest(t){return new It({...this._def,rest:t})}}It.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new It({items:e,typeName:z.ZodTuple,rest:null,...V(t)})};class js extends K{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==A.object)return b(r,{code:E.invalid_type,expected:A.object,received:r.parsedType}),D;const s=[],i=this._def.keyType,o=this._def.valueType;for(const a in r.data)s.push({key:i._parse(new At(r,a,r.path,a)),value:o._parse(new At(r,r.data[a],r.path,a)),alwaysSet:a in r.data});return r.common.async?Ae.mergeObjectAsync(n,s):Ae.mergeObjectSync(n,s)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof K?new js({keyType:t,valueType:n,typeName:z.ZodRecord,...V(r)}):new js({keyType:mt.create(),valueType:t,typeName:z.ZodRecord,...V(n)})}}class ho extends K{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==A.map)return b(r,{code:E.invalid_type,expected:A.map,received:r.parsedType}),D;const s=this._def.keyType,i=this._def.valueType,o=[...r.data.entries()].map(([a,l],u)=>({key:s._parse(new At(r,a,r.path,[u,"key"])),value:i._parse(new At(r,l,r.path,[u,"value"]))}));if(r.common.async){const a=new Map;return Promise.resolve().then(async()=>{for(const l of o){const u=await l.key,c=await l.value;if(u.status==="aborted"||c.status==="aborted")return D;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}})}else{const a=new Map;for(const l of o){const u=l.key,c=l.value;if(u.status==="aborted"||c.status==="aborted")return D;(u.status==="dirty"||c.status==="dirty")&&n.dirty(),a.set(u.value,c.value)}return{status:n.value,value:a}}}}ho.create=(e,t,n)=>new ho({valueType:t,keyType:e,typeName:z.ZodMap,...V(n)});class Kn extends K{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.parsedType!==A.set)return b(r,{code:E.invalid_type,expected:A.set,received:r.parsedType}),D;const s=this._def;s.minSize!==null&&r.data.size<s.minSize.value&&(b(r,{code:E.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),n.dirty()),s.maxSize!==null&&r.data.size>s.maxSize.value&&(b(r,{code:E.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),n.dirty());const i=this._def.valueType;function o(l){const u=new Set;for(const c of l){if(c.status==="aborted")return D;c.status==="dirty"&&n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const a=[...r.data.values()].map((l,u)=>i._parse(new At(r,l,r.path,u)));return r.common.async?Promise.all(a).then(l=>o(l)):o(a)}min(t,n){return new Kn({...this._def,minSize:{value:t,message:j.toString(n)}})}max(t,n){return new Kn({...this._def,maxSize:{value:t,message:j.toString(n)}})}size(t,n){return this.min(t,n).max(t,n)}nonempty(t){return this.min(1,t)}}Kn.create=(e,t)=>new Kn({valueType:e,minSize:null,maxSize:null,typeName:z.ZodSet,...V(t)});class vr extends K{constructor(){super(...arguments),this.validate=this.implement}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==A.function)return b(n,{code:E.invalid_type,expected:A.function,received:n.parsedType}),D;function r(a,l){return lo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ao(),Nr].filter(u=>!!u),issueData:{code:E.invalid_arguments,argumentsError:l}})}function s(a,l){return lo({data:a,path:n.path,errorMaps:[n.common.contextualErrorMap,n.schemaErrorMap,ao(),Nr].filter(u=>!!u),issueData:{code:E.invalid_return_type,returnTypeError:l}})}const i={errorMap:n.common.contextualErrorMap},o=n.data;if(this._def.returns instanceof Ar){const a=this;return Le(async function(...l){const u=new Ye([]),c=await a._def.args.parseAsync(l,i).catch(y=>{throw u.addIssue(r(l,y)),u}),d=await Reflect.apply(o,this,c);return await a._def.returns._def.type.parseAsync(d,i).catch(y=>{throw u.addIssue(s(d,y)),u})})}else{const a=this;return Le(function(...l){const u=a._def.args.safeParse(l,i);if(!u.success)throw new Ye([r(l,u.error)]);const c=Reflect.apply(o,this,u.data),d=a._def.returns.safeParse(c,i);if(!d.success)throw new Ye([s(c,d.error)]);return d.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new vr({...this._def,args:It.create(t).rest(Mn.create())})}returns(t){return new vr({...this._def,returns:t})}implement(t){return this.parse(t)}strictImplement(t){return this.parse(t)}static create(t,n,r){return new vr({args:t||It.create([]).rest(Mn.create()),returns:n||Mn.create(),typeName:z.ZodFunction,...V(r)})}}class $s extends K{get schema(){return this._def.getter()}_parse(t){const{ctx:n}=this._processInputParams(t);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}$s.create=(e,t)=>new $s({getter:e,typeName:z.ZodLazy,...V(t)});class Ls extends K{_parse(t){if(t.data!==this._def.value){const n=this._getOrReturnCtx(t);return b(n,{received:n.data,code:E.invalid_literal,expected:this._def.value}),D}return{status:"valid",value:t.data}}get value(){return this._def.value}}Ls.create=(e,t)=>new Ls({value:e,typeName:z.ZodLiteral,...V(t)});function ep(e,t){return new gn({values:e,typeName:z.ZodEnum,...V(t)})}class gn extends K{constructor(){super(...arguments),Yr.set(this,void 0)}_parse(t){if(typeof t.data!="string"){const n=this._getOrReturnCtx(t),r=this._def.values;return b(n,{expected:H.joinValues(r),received:n.parsedType,code:E.invalid_type}),D}if(uo(this,Yr)||qh(this,Yr,new Set(this._def.values)),!uo(this,Yr).has(t.data)){const n=this._getOrReturnCtx(t),r=this._def.values;return b(n,{received:n.data,code:E.invalid_enum_value,options:r}),D}return Le(t.data)}get options(){return this._def.values}get enum(){const t={};for(const n of this._def.values)t[n]=n;return t}get Values(){const t={};for(const n of this._def.values)t[n]=n;return t}get Enum(){const t={};for(const n of this._def.values)t[n]=n;return t}extract(t,n=this._def){return gn.create(t,{...this._def,...n})}exclude(t,n=this._def){return gn.create(this.options.filter(r=>!t.includes(r)),{...this._def,...n})}}Yr=new WeakMap;gn.create=ep;class zs extends K{constructor(){super(...arguments),Gr.set(this,void 0)}_parse(t){const n=H.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(t);if(r.parsedType!==A.string&&r.parsedType!==A.number){const s=H.objectValues(n);return b(r,{expected:H.joinValues(s),received:r.parsedType,code:E.invalid_type}),D}if(uo(this,Gr)||qh(this,Gr,new Set(H.getValidEnumValues(this._def.values))),!uo(this,Gr).has(t.data)){const s=H.objectValues(n);return b(r,{received:r.data,code:E.invalid_enum_value,options:s}),D}return Le(t.data)}get enum(){return this._def.values}}Gr=new WeakMap;zs.create=(e,t)=>new zs({values:e,typeName:z.ZodNativeEnum,...V(t)});class Ar extends K{unwrap(){return this._def.type}_parse(t){const{ctx:n}=this._processInputParams(t);if(n.parsedType!==A.promise&&n.common.async===!1)return b(n,{code:E.invalid_type,expected:A.promise,received:n.parsedType}),D;const r=n.parsedType===A.promise?n.data:Promise.resolve(n.data);return Le(r.then(s=>this._def.type.parseAsync(s,{path:n.path,errorMap:n.common.contextualErrorMap})))}}Ar.create=(e,t)=>new Ar({type:e,typeName:z.ZodPromise,...V(t)});class wt extends K{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===z.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(t){const{status:n,ctx:r}=this._processInputParams(t),s=this._def.effect||null,i={addIssue:o=>{b(r,o),o.fatal?n.abort():n.dirty()},get path(){return r.path}};if(i.addIssue=i.addIssue.bind(i),s.type==="preprocess"){const o=s.transform(r.data,i);if(r.common.async)return Promise.resolve(o).then(async a=>{if(n.value==="aborted")return D;const l=await this._def.schema._parseAsync({data:a,path:r.path,parent:r});return l.status==="aborted"?D:l.status==="dirty"||n.value==="dirty"?fr(l.value):l});{if(n.value==="aborted")return D;const a=this._def.schema._parseSync({data:o,path:r.path,parent:r});return a.status==="aborted"?D:a.status==="dirty"||n.value==="dirty"?fr(a.value):a}}if(s.type==="refinement"){const o=a=>{const l=s.refinement(a,i);if(r.common.async)return Promise.resolve(l);if(l instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(r.common.async===!1){const a=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?D:(a.status==="dirty"&&n.dirty(),o(a.value),{status:n.value,value:a.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(a=>a.status==="aborted"?D:(a.status==="dirty"&&n.dirty(),o(a.value).then(()=>({status:n.value,value:a.value}))))}if(s.type==="transform")if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!Os(o))return o;const a=s.transform(o.value,i);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:n.value,value:a}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=>Os(o)?Promise.resolve(s.transform(o.value,i)).then(a=>({status:n.value,value:a})):o);H.assertNever(s)}}wt.create=(e,t,n)=>new wt({schema:e,typeName:z.ZodEffects,effect:t,...V(n)});wt.createWithPreprocess=(e,t,n)=>new wt({schema:t,effect:{type:"preprocess",transform:e},typeName:z.ZodEffects,...V(n)});class Nt extends K{_parse(t){return this._getType(t)===A.undefined?Le(void 0):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}Nt.create=(e,t)=>new Nt({innerType:e,typeName:z.ZodOptional,...V(t)});class vn extends K{_parse(t){return this._getType(t)===A.null?Le(null):this._def.innerType._parse(t)}unwrap(){return this._def.innerType}}vn.create=(e,t)=>new vn({innerType:e,typeName:z.ZodNullable,...V(t)});class Ds extends K{_parse(t){const{ctx:n}=this._processInputParams(t);let r=n.data;return n.parsedType===A.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Ds.create=(e,t)=>new Ds({innerType:e,typeName:z.ZodDefault,defaultValue:typeof t.default=="function"?t.default:()=>t.default,...V(t)});class Us extends K{_parse(t){const{ctx:n}=this._processInputParams(t),r={...n,common:{...n.common,issues:[]}},s=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Ns(s)?s.then(i=>({status:"valid",value:i.status==="valid"?i.value:this._def.catchValue({get error(){return new Ye(r.common.issues)},input:r.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Ye(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}Us.create=(e,t)=>new Us({innerType:e,typeName:z.ZodCatch,catchValue:typeof t.catch=="function"?t.catch:()=>t.catch,...V(t)});class po extends K{_parse(t){if(this._getType(t)!==A.nan){const r=this._getOrReturnCtx(t);return b(r,{code:E.invalid_type,expected:A.nan,received:r.parsedType}),D}return{status:"valid",value:t.data}}}po.create=e=>new po({typeName:z.ZodNaN,...V(e)});const Iv=Symbol("zod_brand");class Du extends K{_parse(t){const{ctx:n}=this._processInputParams(t),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class Js extends K{_parse(t){const{status:n,ctx:r}=this._processInputParams(t);if(r.common.async)return(async()=>{const i=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return i.status==="aborted"?D:i.status==="dirty"?(n.dirty(),fr(i.value)):this._def.out._parseAsync({data:i.value,path:r.path,parent:r})})();{const s=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return s.status==="aborted"?D:s.status==="dirty"?(n.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:r.path,parent:r})}}static create(t,n){return new Js({in:t,out:n,typeName:z.ZodPipeline})}}class Bs extends K{_parse(t){const n=this._def.innerType._parse(t),r=s=>(Os(s)&&(s.value=Object.freeze(s.value)),s);return Ns(n)?n.then(s=>r(s)):r(n)}unwrap(){return this._def.innerType}}Bs.create=(e,t)=>new Bs({innerType:e,typeName:z.ZodReadonly,...V(t)});function tp(e,t={},n){return e?br.create().superRefine((r,s)=>{var i,o;if(!e(r)){const a=typeof t=="function"?t(r):typeof t=="string"?{message:t}:t,l=(o=(i=a.fatal)!==null&&i!==void 0?i:n)!==null&&o!==void 0?o:!0,u=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...u,fatal:l})}}):br.create()}const Mv={object:ae.lazycreate};var z;(function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"})(z||(z={}));const Pv=(e,t={message:`Input not instance of ${e.name}`})=>tp(n=>n instanceof e,t),np=mt.create,rp=mn.create,jv=po.create,$v=yn.create,sp=bs.create,Lv=Vn.create,zv=co.create,Dv=As.create,Uv=Is.create,Bv=br.create,Fv=Mn.create,Vv=Zt.create,Kv=fo.create,Zv=vt.create,bi=ae.create,Wv=ae.strictCreate,Hv=Ms.create,Jv=Po.create,Qv=Ps.create,qv=It.create,Yv=js.create,Gv=ho.create,Xv=Kn.create,e0=vr.create,t0=$s.create,n0=Ls.create,r0=gn.create,s0=zs.create,i0=Ar.create,ff=wt.create,o0=Nt.create,a0=vn.create,l0=wt.createWithPreprocess,u0=Js.create,c0=()=>np().optional(),f0=()=>rp().optional(),d0=()=>sp().optional(),h0={string:e=>mt.create({...e,coerce:!0}),number:e=>mn.create({...e,coerce:!0}),boolean:e=>bs.create({...e,coerce:!0}),bigint:e=>yn.create({...e,coerce:!0}),date:e=>Vn.create({...e,coerce:!0})},p0=D;var te=Object.freeze({__proto__:null,defaultErrorMap:Nr,setErrorMap:mv,getErrorMap:ao,makeIssue:lo,EMPTY_PATH:yv,addIssueToContext:b,ParseStatus:Ae,INVALID:D,DIRTY:fr,OK:Le,isAborted:vl,isDirty:_l,isValid:Os,isAsync:Ns,get util(){return H},get objectUtil(){return gl},ZodParsedType:A,getParsedType:Xt,ZodType:K,datetimeRegex:Xh,ZodString:mt,ZodNumber:mn,ZodBigInt:yn,ZodBoolean:bs,ZodDate:Vn,ZodSymbol:co,ZodUndefined:As,ZodNull:Is,ZodAny:br,ZodUnknown:Mn,ZodNever:Zt,ZodVoid:fo,ZodArray:vt,ZodObject:ae,ZodUnion:Ms,ZodDiscriminatedUnion:Po,ZodIntersection:Ps,ZodTuple:It,ZodRecord:js,ZodMap:ho,ZodSet:Kn,ZodFunction:vr,ZodLazy:$s,ZodLiteral:Ls,ZodEnum:gn,ZodNativeEnum:zs,ZodPromise:Ar,ZodEffects:wt,ZodTransformer:wt,ZodOptional:Nt,ZodNullable:vn,ZodDefault:Ds,ZodCatch:Us,ZodNaN:po,BRAND:Iv,ZodBranded:Du,ZodPipeline:Js,ZodReadonly:Bs,custom:tp,Schema:K,ZodSchema:K,late:Mv,get ZodFirstPartyTypeKind(){return z},coerce:h0,any:Bv,array:Zv,bigint:$v,boolean:sp,date:Lv,discriminatedUnion:Jv,effect:ff,enum:r0,function:e0,instanceof:Pv,intersection:Qv,lazy:t0,literal:n0,map:Gv,nan:jv,nativeEnum:s0,never:Vv,null:Uv,nullable:a0,number:rp,object:bi,oboolean:d0,onumber:f0,optional:o0,ostring:c0,pipeline:u0,preprocess:l0,promise:i0,record:Yv,set:Xv,strictObject:Wv,string:np,symbol:zv,transformer:ff,tuple:qv,undefined:Dv,union:Hv,unknown:Fv,void:Kv,NEVER:p0,ZodIssueCode:E,quotelessJson:pv,ZodError:Ye});const ip={100:"Continue",101:"Switching Protocols",102:"Processing",103:"Early Hints",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",306:"Switch Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Too Early",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",510:"Not Extended",511:"Network Authentication Required"},ha=Xp(ip).map(([e])=>te.literal(Number(e))),m0=te.union([ha[0],ha[1],...ha]);te.tuple([m0,te.string()]);function y0(){return O.jsxs("svg",{id:"uuid-3d2d6be6-f179-42a3-9511-1e9ddeb8575f",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 500 101",children:[O.jsx("title",{children:"Tempest Games Logo"}),O.jsx("path",{d:"M155.76.93v59.89h-17.11V7.78h-13.69V.93h30.8Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M202.91,7.86h-13.18v17.03h13.18v6.84h-13.18v22.24h13.18v6.84h-30.29V.93h30.29v6.93Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M289.49.93v59.89h-17.11V7.78h-.43c-8.21,0-11.21,5.82-11.21,17.03v36.02h-16.25V24.8c0-11.21-2.99-17.03-11.21-17.03h-.43v53.04h-17.11V.93h18.74c9.92,0,15.31,4.96,18.14,11.21,2.82-6.25,8.21-11.21,18.14-11.21h18.73Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M352.82,29.68c0,11.72-6.42,19.16-24.55,19.16h-4.53v11.98h-17.11V1.1l46.2-.17v28.75ZM323.73,7.78v34.22h2.48c7.36,0,9.5-4.11,9.5-12.15V7.78h-11.98Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M396.8,7.86h-13.17v17.03h13.17v6.84h-13.17v22.24h13.17v6.84h-30.28V.93h30.28v6.93Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M425.9,12.57v14.03h27.89v16.94c0,12.75-1.71,18.13-16.43,18.13h-14.54c-9.58,0-14.03-2.74-14.03-11.97v-5.99h15.4v5.13c0,4.53.77,5.99,4.62,5.99h1.71c5.05,0,6.16-1.46,6.16-6.84v-14.54h-27.89v-16.68c0-13.52,3.85-16.68,18.82-16.68h12.83c8.81,0,13.17,1.54,13.17,10.78v7.19h-15.4v-6.5c0-3.42-1.03-4.62-4.45-4.62h-1.45c-4.28,0-6.42,1.46-6.42,5.65Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M500,7.78h-13.69v53.04h-17.11V.93h30.8v6.84Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M155.96,93.78v-3.57h-5.58v-7.14h13.39v17.85h-24.76v-28.56h24.76v7.14h-16.96v14.28h9.15Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M224.26,100.92h-8.25v-10.71h-8.25v3.57h4.68v7.14h-12.94v-17.85h16.51v-3.57h-16.51v-7.14h24.76v28.56Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M259.99,72.36h30.57v28.56h-7.81v-21.42h-3.57v21.42h-7.81v-21.42h-3.57v21.42h-7.81v-28.56Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M343.24,83.08v-3.57h-9.14v14.28h16.96v7.14h-24.76v-28.56h24.76v17.85h-13.38v-7.14h5.57Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M394.59,79.5v3.57h16.96v17.85h-24.76v-7.14h16.96v-3.57h-16.96v-17.85h24.76v7.14h-16.96Z",style:{fill:"#fff200",strokeWidth:0}}),O.jsx("path",{d:"M0,63.42v-20.84h20.83L0,63.42ZM100,.92v32.29h-35.42v8.33h-8.33V14.46h-22.92l1.04,7.29h9.38v19.79h-8.33v-8.33H0V.92h100ZM0,100.92v-26.04l6.25-1.04,25-26.04,1.04,1.05-10.42,18.75-4.16,7.29h13.54l3.13-3.12,8.33-22.92h1.04v41.66h3.12l9.38-8.33v-33.33h1.04l8.33,22.92,3.12,3.12h13.54l-4.17-7.29-10.42-19.8,1.04-1.04,25,27.09,6.25,1.04v26.04H0ZM100,42.59v20.84l-20.83-20.84h20.83Z",style:{fill:"#fff200",strokeWidth:0}})]})}const g0={class:"_class_1g72u_1"};function v0(e){return["required",e]}function _0(e){return["optional",e]}function w0(e,t){let n=e;for(const r of t){if(n===null||typeof r!="string")return!1;if(r in n[1])n=n[1][r];else return!1}if(n===null)return!0;switch(n[0]){case"required":return!1;case"optional":return!0}}const Mt=Object.create(null);Mt.open="0";Mt.close="1";Mt.ping="2";Mt.pong="3";Mt.message="4";Mt.upgrade="5";Mt.noop="6";const Ai=Object.create(null);Object.keys(Mt).forEach(e=>{Ai[Mt[e]]=e});const kl={type:"error",data:"parser error"},op=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",ap=typeof ArrayBuffer=="function",lp=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Uu=({type:e,data:t},n,r)=>op&&t instanceof Blob?n?r(t):df(t,r):ap&&(t instanceof ArrayBuffer||lp(t))?n?r(t):df(new Blob([t]),r):r(Mt[e]+(t||"")),df=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function hf(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let pa;function k0(e,t){if(op&&e.data instanceof Blob)return e.data.arrayBuffer().then(hf).then(t);if(ap&&(e.data instanceof ArrayBuffer||lp(e.data)))return t(hf(e.data));Uu(e,!1,n=>{pa||(pa=new TextEncoder),t(pa.encode(n))})}const pf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Xr=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let e=0;e<pf.length;e++)Xr[pf.charCodeAt(e)]=e;const S0=e=>{let t=e.length*.75,n=e.length,r,s=0,i,o,a,l;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const u=new ArrayBuffer(t),c=new Uint8Array(u);for(r=0;r<n;r+=4)i=Xr[e.charCodeAt(r)],o=Xr[e.charCodeAt(r+1)],a=Xr[e.charCodeAt(r+2)],l=Xr[e.charCodeAt(r+3)],c[s++]=i<<2|o>>4,c[s++]=(o&15)<<4|a>>2,c[s++]=(a&3)<<6|l&63;return u},x0=typeof ArrayBuffer=="function",Bu=(e,t)=>{if(typeof e!="string")return{type:"message",data:up(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:E0(e.substring(1),t)}:Ai[n]?e.length>1?{type:Ai[n],data:e.substring(1)}:{type:Ai[n]}:kl},E0=(e,t)=>{if(x0){const n=S0(e);return up(n,t)}else return{base64:!0,data:e}},up=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},cp="",C0=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((i,o)=>{Uu(i,!1,a=>{r[o]=a,++s===n&&t(r.join(cp))})})},T0=(e,t)=>{const n=e.split(cp),r=[];for(let s=0;s<n.length;s++){const i=Bu(n[s],t);if(r.push(i),i.type==="error")break}return r};function R0(){return new TransformStream({transform(e,t){k0(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const i=new DataView(s.buffer);i.setUint8(0,126),i.setUint16(1,r)}else{s=new Uint8Array(9);const i=new DataView(s.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let ma;function yi(e){return e.reduce((t,n)=>t+n.length,0)}function gi(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function O0(e,t){ma||(ma=new TextDecoder);const n=[];let r=0,s=-1,i=!1;return new TransformStream({transform(o,a){for(n.push(o);;){if(r===0){if(yi(n)<1)break;const l=gi(n,1);i=(l[0]&128)===128,s=l[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(yi(n)<2)break;const l=gi(n,2);s=new DataView(l.buffer,l.byteOffset,l.length).getUint16(0),r=3}else if(r===2){if(yi(n)<8)break;const l=gi(n,8),u=new DataView(l.buffer,l.byteOffset,l.length),c=u.getUint32(0);if(c>Math.pow(2,21)-1){a.enqueue(kl);break}s=c*Math.pow(2,32)+u.getUint32(4),r=3}else{if(yi(n)<s)break;const l=gi(n,s);a.enqueue(Bu(i?l:ma.decode(l),t)),r=0}if(s===0||s>e){a.enqueue(kl);break}}}})}const fp=4;function me(e){if(e)return N0(e)}function N0(e){for(var t in me.prototype)e[t]=me.prototype[t];return e}me.prototype.on=me.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};me.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};me.prototype.off=me.prototype.removeListener=me.prototype.removeAllListeners=me.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,1);break}return n.length===0&&delete this._callbacks["$"+e],this};me.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,s=n.length;r<s;++r)n[r].apply(this,t)}return this};me.prototype.emitReserved=me.prototype.emit;me.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};me.prototype.hasListeners=function(e){return!!this.listeners(e).length};const jo=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),st=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),b0="arraybuffer";function dp(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const A0=st.setTimeout,I0=st.clearTimeout;function $o(e,t){t.useNativeTimers?(e.setTimeoutFn=A0.bind(st),e.clearTimeoutFn=I0.bind(st)):(e.setTimeoutFn=st.setTimeout.bind(st),e.clearTimeoutFn=st.clearTimeout.bind(st))}const M0=1.33;function P0(e){return typeof e=="string"?j0(e):Math.ceil((e.byteLength||e.size)*M0)}function j0(e){let t=0,n=0;for(let r=0,s=e.length;r<s;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function hp(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function $0(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function L0(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let i=n[r].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}class z0 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Fu extends me{constructor(t){super(),this.writable=!1,$o(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new z0(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Bu(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=$0(t);return n.length?"?"+n:""}}class D0 extends Fu{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};T0(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,C0(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=hp()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let pp=!1;try{pp=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const U0=pp;function B0(){}class F0 extends D0{constructor(t){if(super(t),typeof location<"u"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location<"u"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(s,i)=>{this.onError("xhr post error",s,i)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class bt extends me{constructor(t,n,r){super(),this.createRequest=t,$o(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=dp(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{r.setRequestHeader("Accept","*/*")}catch{}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=bt.requestsCount++,bt.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=B0,t)try{this._xhr.abort()}catch{}typeof document<"u"&&delete bt.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}bt.requestsCount=0;bt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",mf);else if(typeof addEventListener=="function"){const e="onpagehide"in st?"pagehide":"unload";addEventListener(e,mf,!1)}}function mf(){for(let e in bt.requests)bt.requests.hasOwnProperty(e)&&bt.requests[e].abort()}const V0=function(){const e=mp({xdomain:!1});return e&&e.responseType!==null}();class K0 extends F0{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=V0&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new bt(mp,this.uri(),t)}}function mp(e){const t=e.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!t||U0))return new XMLHttpRequest}catch{}if(!t)try{return new st[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const yp=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Z0 extends Fu{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=yp?{}:dp(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;Uu(r,this.supportsBinary,i=>{try{this.doWrite(r,i)}catch{}s&&jo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=hp()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const ya=st.WebSocket||st.MozWebSocket;class W0 extends Z0{createSocket(t,n,r){return yp?new ya(t,n,r):n?new ya(t,n):new ya(t)}doWrite(t,n){this.ws.send(n)}}class H0 extends Fu{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=O0(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=R0();s.readable.pipeTo(t.writable),this._writer=s.writable.getWriter();const i=()=>{r.read().then(({done:a,value:l})=>{a||(this.onPacket(l),i())}).catch(a=>{})};i();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this._writer.write(o).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],s=n===t.length-1;this._writer.write(r).then(()=>{s&&jo(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const J0={websocket:W0,webtransport:H0,polling:K0},Q0=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,q0=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Sl(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let s=Q0.exec(e||""),i={},o=14;for(;o--;)i[q0[o]]=s[o]||"";return n!=-1&&r!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=Y0(i,i.path),i.queryKey=G0(i,i.query),i}function Y0(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function G0(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,i){s&&(n[s]=i)}),n}const xl=typeof addEventListener=="function"&&typeof removeEventListener=="function",Ii=[];xl&&addEventListener("offline",()=>{Ii.forEach(e=>e())},!1);class fn extends me{constructor(t,n){if(super(),this.binaryType=b0,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=Sl(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Sl(n.host).host);$o(this,n),this.secure=n.secure!=null?n.secure:typeof location<"u"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=n.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=L0(this.opts.query)),xl&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Ii.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=fp,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&fn.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",fn.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const s=this.writeBuffer[r].data;if(s&&(n+=P0(s)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,jo(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const i={type:t,data:n,options:r};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),s&&this.once("flush",s),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(fn.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),xl&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Ii.indexOf(this._offlineEventListener);r!==-1&&Ii.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}fn.protocol=fp;class X0 extends fn{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;fn.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",d=>{if(!r)if(d.type==="pong"&&d.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;fn.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const h=new Error("probe error");h.transport=n.name,this.emitReserved("upgradeError",h)}}))};function i(){r||(r=!0,c(),n.close(),n=null)}const o=d=>{const h=new Error("probe error: "+d);h.transport=n.name,i(),this.emitReserved("upgradeError",h)};function a(){o("transport closed")}function l(){o("socket closed")}function u(d){n&&d.name!==n.name&&i()}const c=()=>{n.removeListener("open",s),n.removeListener("error",o),n.removeListener("close",a),this.off("close",l),this.off("upgrading",u)};n.once("open",s),n.once("error",o),n.once("close",a),this.once("close",l),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let e1=class extends X0{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(s=>J0[s]).filter(s=>!!s)),super(t,r)}};function t1(e,t="",n){let r=e;n=n||typeof location<"u"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n<"u"?e=n.protocol+"//"+e:e="https://"+e),r=Sl(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const i=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+i+":"+r.port+t,r.href=r.protocol+"://"+i+(n&&n.port===r.port?"":":"+r.port),r}const n1=typeof ArrayBuffer=="function",r1=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,gp=Object.prototype.toString,s1=typeof Blob=="function"||typeof Blob<"u"&&gp.call(Blob)==="[object BlobConstructor]",i1=typeof File=="function"||typeof File<"u"&&gp.call(File)==="[object FileConstructor]";function Vu(e){return n1&&(e instanceof ArrayBuffer||r1(e))||s1&&e instanceof Blob||i1&&e instanceof File}function Mi(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Mi(e[n]))return!0;return!1}if(Vu(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Mi(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Mi(e[n]))return!0;return!1}function o1(e){const t=[],n=e.data,r=e;return r.data=El(n,t),r.attachments=t.length,{packet:r,buffers:t}}function El(e,t){if(!e)return e;if(Vu(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=El(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=El(e[r],t));return n}return e}function a1(e,t){return e.data=Cl(e.data,t),delete e.attachments,e}function Cl(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Cl(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Cl(e[n],t));return e}const l1=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],u1=5;var W;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(W||(W={}));class c1{constructor(t){this.replacer=t}encode(t){return(t.type===W.EVENT||t.type===W.ACK)&&Mi(t)?this.encodeAsBinary({type:t.type===W.EVENT?W.BINARY_EVENT:W.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===W.BINARY_EVENT||t.type===W.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=o1(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}function yf(e){return Object.prototype.toString.call(e)==="[object Object]"}class Ku extends me{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===W.BINARY_EVENT;r||n.type===W.BINARY_ACK?(n.type=r?W.EVENT:W.ACK,this.reconstructor=new f1(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Vu(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(W[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===W.BINARY_EVENT||r.type===W.BINARY_ACK){const i=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const o=t.substring(i,n);if(o!=Number(o)||t.charAt(n)!=="-")throw new Error("Illegal attachments");r.attachments=Number(o)}if(t.charAt(n+1)==="/"){const i=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(i,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){const i=n+1;for(;++n;){const o=t.charAt(n);if(o==null||Number(o)!=o){--n;break}if(n===t.length)break}r.id=Number(t.substring(i,n+1))}if(t.charAt(++n)){const i=this.tryParse(t.substr(n));if(Ku.isPayloadValid(r.type,i))r.data=i;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch{return!1}}static isPayloadValid(t,n){switch(t){case W.CONNECT:return yf(n);case W.DISCONNECT:return n===void 0;case W.CONNECT_ERROR:return typeof n=="string"||yf(n);case W.EVENT:case W.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&l1.indexOf(n[0])===-1);case W.ACK:case W.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class f1{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=a1(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const d1=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ku,Encoder:c1,get PacketType(){return W},protocol:u1},Symbol.toStringTag,{value:"Module"}));function ht(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const h1=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class vp extends me{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[ht(t,"open",this.onopen.bind(this)),ht(t,"packet",this.onpacket.bind(this)),ht(t,"error",this.onerror.bind(this)),ht(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,s,i;if(h1.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const o={type:W.EVENT,data:n};if(o.options={},o.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const c=this.ids++,d=n.pop();this._registerAckCallback(c,d),o.id=c}const a=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.writable,l=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!a||(l?(this.notifyOutgoingListeners(o),this.packet(o)):this.sendBuffer.push(o)),this.flags={},this}_registerAckCallback(t,n){var r;const s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===void 0){this.acks[t]=n;return}const i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let a=0;a<this.sendBuffer.length;a++)this.sendBuffer[a].id===t&&this.sendBuffer.splice(a,1);n.call(this,new Error("operation has timed out"))},s),o=(...a)=>{this.io.clearTimeoutFn(i),n.apply(this,a)};o.withError=!0,this.acks[t]=o}emitWithAck(t,...n){return new Promise((r,s)=>{const i=(o,a)=>o?s(o):r(a);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((s,...i)=>r!==this._queue[0]?void 0:(s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(this._queue.shift(),n&&n(null,...i)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:W.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case W.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case W.EVENT:case W.BINARY_EVENT:this.onevent(t);break;case W.ACK:case W.BINARY_ACK:this.onack(t);break;case W.DISCONNECT:this.ondisconnect();break;case W.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...s){r||(r=!0,n.packet({type:W.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:W.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Lr(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Lr.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=Math.floor(t*10)&1?e+n:e-n}return Math.min(e,this.max)|0};Lr.prototype.reset=function(){this.attempts=0};Lr.prototype.setMin=function(e){this.ms=e};Lr.prototype.setMax=function(e){this.max=e};Lr.prototype.setJitter=function(e){this.jitter=e};class Tl extends me{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,$o(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Lr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||d1;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new e1(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=ht(n,"open",function(){r.onopen(),t&&t()}),i=a=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",a),t?t(a):this.maybeReconnectOnOpen()},o=ht(n,"error",i);if(this._timeout!==!1){const a=this._timeout,l=this.setTimeoutFn(()=>{s(),i(new Error("timeout")),n.close()},a);this.opts.autoUnref&&l.unref(),this.subs.push(()=>{this.clearTimeoutFn(l)})}return this.subs.push(s),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ht(t,"ping",this.onping.bind(this)),ht(t,"data",this.ondata.bind(this)),ht(t,"error",this.onerror.bind(this)),ht(t,"close",this.onclose.bind(this)),ht(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){jo(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new vp(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Wr={};function Pi(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=t1(e,t.path||"/socket.io"),r=n.source,s=n.id,i=n.path,o=Wr[s]&&i in Wr[s].nsps,a=t.forceNew||t["force new connection"]||t.multiplex===!1||o;let l;return a?l=new Tl(r,t):(Wr[s]||(Wr[s]=new Tl(r,t)),l=Wr[s]),n.query&&!t.query&&(t.query=n.queryKey),l.socket(n.path,t)}Object.assign(Pi,{Manager:Tl,Socket:vp,io:Pi,connect:Pi});const p1=["123","321","abc","admin","adobe","alexander","amanda","andrea","andrew","angel","apple","asdf","ashley","baby","banana","baseball","batman","bear","biteme","blazer","blonde","boston","buster","butterfly","cameron","charlie","cheese","chelsea","chicken","chocolate","chris","compaq","computer","cookie","corvette","cowboys","dakota","dallas","daniel","david","diamond","dolphin","donald","dragon","eagle","flower","football","frank","freedom","friend","gateway","george","ginger","god","golf","hannah","hardcore","harley","heather","hello","hottie","hunter","internet","jasmine","jennifer","jessica","jesus","johnny","jordan","joshua","justin","justme","killer","knight","lakers","letmein","liverpool","login","london","love","lucky","mackenzie","maggie","master","matrix","matthew","maverick","melissa","mercedes","michael","michelle","mickey","miller","money","monkey","morgan","mother","muffin","mustang","natasha","nathan","nicole","ninja","orange","pass","password","patrick","peanut","pepper","phoenix","photoshop","pokemon","princess","purple","qazwsx","qwerty","rainbow","ranger","root","samantha","samsung","scooter","secret","shadow","simpson","smile","soccer","sparkle","starwars","summer","sunflower","sunshine","superman","taylor","temp","test","thomas","tigers","tigger","tinkerbell","trust","turtle","victoria","welcome","whatever","william","winter","yellow","zaq12wsx","zxcvbn"],m1=3,y1=15,g1=/^[a-zA-Z0-9_-]+$/,Zu=te.string().min(m1).max(y1).regex(g1),gf=20,vf={0:"o",1:"l",3:"e",4:"a",5:"s",7:"t","@":"a",$:"s","!":"i"};function v1(e){let t="";for(const n of e)n in vf?t+=vf[n]:t+=n;return t}function _1(e){const t=e.toLocaleLowerCase(),n=v1(t);for(const r of p1)if(n.includes(r)||t.includes(r))return!0;return!1}function w1(e){const t=new Set(e).size;return e.length*Math.log2(t)}function k1(e){let t=0;return _1(e)&&(t-=100),t+=w1(e)*.5,Math.max(t,0)}const Wu=te.string().refine(e=>k1(e)>=gf,{message:`Password does not meet the minimum complexity of ${gf}.`}).brand("password");te.object({username:Zu,password:Wu}).strict();const _p=te.string().email().brand("email");te.object({username:Zu,password:Wu,email:_p}).strict();var S1={};function x1(e){const t=e.runtimeEnvStrict??e.runtimeEnv??S1;for(const[T,g]of Object.entries(t))g===""&&delete t[T];if(!!e.skipValidation)return t;const r=typeof e.client=="object"?e.client:{},s=typeof e.server=="object"?e.server:{},i=typeof e.shared=="object"?e.shared:{},o=bi(r),a=bi(s),l=bi(i),u=e.isServer??(typeof window>"u"||"Deno"in window),c=o.merge(l),d=a.merge(l).merge(o),h=u?d.safeParse(t):c.safeParse(t),y=e.onValidationError??(T=>{throw console.error("❌ Invalid environment variables:",T.flatten().fieldErrors),new Error("Invalid environment variables")}),w=e.onInvalidAccess??(T=>{throw new Error("❌ Attempted to access a server-side environment variable on the client")});if(h.success===!1)return y(h.error);const v=T=>e.clientPrefix?!T.startsWith(e.clientPrefix)&&!(T in l.shape):!0,N=T=>u||!v(T),p=T=>T==="__esModule"||T==="$$typeof",f=(e.extends??[]).reduce((T,g)=>Object.assign(T,g),{}),m=Object.assign(h.data,f);return new Proxy(m,{get(T,g){if(typeof g=="string"&&!p(g))return N(g)?Reflect.get(T,g):w(g)}})}const E1={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BACKEND_ORIGIN:"https://realtime.tempest.games rimraf ./bin"},Hu=x1({isServer:!("__vite_start_time"in globalThis),server:{POSTGRES_USER:te.string(),POSTGRES_PASSWORD:te.string(),POSTGRES_DATABASE:te.string(),POSTGRES_HOST:te.string(),POSTGRES_PORT:te.string().transform(e=>Number.parseInt(e,10)),BACKEND_PORT:te.string().transform(e=>Number.parseInt(e,10)),RUN_WORKERS_FROM_SOURCE:te.union([te.literal("true"),te.literal("false")]).optional().transform(e=>e==="true"),FRONTEND_PORT:te.string().transform(e=>Number.parseInt(e,10)),FRONTEND_ORIGINS:te.string().transform(e=>JSON.parse(e)).pipe(te.array(te.string())),OPENAI_API_KEY:te.string().optional()},clientPrefix:"VITE_",client:{VITE_BACKEND_ORIGIN:te.string()},runtimeEnv:E1,emptyStringAsUndefined:!0}),wp=Pi(Hu.VITE_BACKEND_ORIGIN,{auth:e=>{const t=va(Ir);t&&e(t)},autoConnect:!1}).on("connect",()=>{console.log("connected")}).on("connect_error",()=>{console.log("connect_error"),Ll(Ir,null)}),Ir=Xe({key:"auth",default:null,effects:[({onSet:e})=>{e(({newValue:t})=>{t?(localStorage.setItem("username",t.username),localStorage.setItem("sessionKey",t.sessionKey),console.log("connecting..."),wp.connect()):(console.log("clearing session..."),localStorage.removeItem("sessionKey"))})},({setSelf:e})=>{const t=localStorage.getItem("username"),n=localStorage.getItem("sessionKey");t&&n&&e({username:t,sessionKey:n})}]}),Fs=Xe({key:"username",default:window.localStorage.getItem("username")??""}),kp=Zn({key:"usernameIssues",get:({get:e})=>{const t=e(Fs),n=Zu.safeParse(t);return n.success?null:n.error.issues}}),Mr=Xe({key:"password0",default:""}),Sp=Zn({key:"password0Issues",get:({get:e})=>{const t=e(Mr),n=Wu.safeParse(t);return n.success?null:n.error.issues}}),Rl=Xe({key:"password1",default:""}),xp=Zn({key:"password1Issues",get:({get:e})=>{const t=e(Mr),n=e(Rl),r=te.string().refine(s=>s===t,{message:"Passwords do not match."}).safeParse(n);return r.success?null:r.error.issues}}),Ol=Xe({key:"email",default:""}),Ep=Zn({key:"emailIssues",get:({get:e})=>{const t=e(Ol),n=_p.safeParse(t);return n.success?null:n.error.issues}}),C1=Zn({key:"signupReady",get:({get:e})=>{const t=e(kp),n=e(Sp),r=e(xp),s=e(Ep);return!(t??n??r??s)}}),T1=v0({login:null,sign_up:null,game:_0({$gameId:null}),admin:null});function R1(e){return w0(T1,e)}const O1=[["login"],["sign_up"]];function N1(e){return O1.some(t=>t.join("/")===e.join("/"))}function Cp(e){history.pushState(null,"",e),Ll(Tp,e)}const Tp=Xe({key:"pathName",default:window.location.pathname,effects:[({onSet:e,setSelf:t})=>{const n=s=>{history.replaceState(null,"",s),t(s)},r=s=>{switch(s){case"/":{const i=va(Ir);let o="/login";i&&(o="/game"),n(o);break}case"/login":case"/sign_up":va(Ir)&&n("/game")}};r(window.location.pathname),e(({newValue:s})=>{r(s)})},({setSelf:e})=>{document.addEventListener("click",t=>{if(t.target instanceof HTMLAnchorElement){const n=t.target.getAttribute("href");n!=null&&n.startsWith("/")&&(t.preventDefault(),history.pushState(null,"",n),e(n))}}),window.addEventListener("popstate",()=>{e(window.location.pathname)})}]}),b1=Zn({key:"route",get:({get:e})=>{const n=e(Tp).split("/").slice(1);return R1(n)?N1(n)||e(Ir)?n:401:404}});function A1(){return O.jsx("article",{children:O.jsx("h1",{children:"admin"})})}class I1 extends Map{set(t,n){return this.has(t)?(console.warn("Tried to set a key that already exists in an InvariantMap",{key:t,value:n}),this):super.set(t,n)}clear(){throw new Error("Cannot clear an InvariantMap")}}const us=class us{constructor(t){C(this,"type","continuity");C(this,"globals",[]);C(this,"actions",[]);C(this,"perspectives",[]);this.key=t}static create(t,n){const r=new us(t),{type:s,globals:i,actions:o,perspectives:a}=n(r),l={type:s,key:t,globals:i,actions:o,perspectives:a};return us.existing.set(t,l),l}add(...t){switch(t[0].type){case"atom":case"mutable_atom":this.globals.push(...t);break;case"transaction":this.actions.push(...t);break;case"atom_family":{const[r,s]=t;this.perspectives.push({type:"realtime_perspective",resourceAtoms:r,viewAtoms:s})}break}return this}};C(us,"existing",new I1);let Nl=us;function M1(e){const{key:t,config:n}=e,r=Nl.create(t,n),{actions:s}=r;for(const i of s)$f(t,i.key,_e.STORE);return ka(t,-1,_e.STORE),r}Xe({key:"usersInRoomIndex",mutable:!0,default:()=>new Tt,toJson:e=>e.toJSON(),fromJson:e=>Tt.fromJSON(e)});Xe({key:"roomIndex",default:()=>new Tt,mutable:!0,toJson:e=>e.toJSON(),fromJson:e=>Tt.fromJSON(e)});const P1={enteredAtEpoch:0},j1=km({key:"usersInRooms",between:["room","user"],cardinality:"1:n"},P1);am({key:"usersInMyRoomView",get:e=>({find:t})=>{const n=Cm(j1);return[t(n,e)]}});const Ju=Xe({key:"count",default:0}),Rp=lm({key:"incrementTX",do:({set:e})=>{e(Ju,t=>t+1)}}),$1=M1({key:"countContinuity",config:e=>e.add(Ju).add(Rp)});function L1({route:[e]}){return O.jsx("nav",{children:e?O.jsx(z1,{gameId:e}):O.jsx("article",{children:"no game"})})}function z1({gameId:e}){console.log(e);const t=He(Ju),n=um(Rp);return ly($1),O.jsxs("article",{children:[O.jsxs("button",{type:"button",onClick:()=>{n()},children:["count is ",t]}),O.jsx("p",{children:"Let's see how high we can count!"})]})}async function D1(e,t="SHA-256"){const r=new TextEncoder().encode(e),s=await crypto.subtle.digest(t,r);return Array.from(new Uint8Array(s)).map(o=>o.toString(16).padStart(2,"0")).join("")}async function Op(e){const t=await D1(e);return`${t.substring(0,8)}-${t.substring(8,12)}-${t.substring(12,16)}-${t.substring(16,20)}-${t.substring(20,32)}`}function Np(e){return O.jsx("a",{...e})}function U1(){const e=Rn(Fs),t=Rn(Mr),n=He(Fs),r=He(Mr),[s,i]=ve.useState(null);return O.jsxs("form",{onSubmit:async o=>{o.preventDefault();const a=await Op("login"),l=await fetch(`${Hu.VITE_BACKEND_ORIGIN}/login-${a}`,{method:"POST",body:JSON.stringify({username:n,password:r})});if(console.log(l),l.status===200){e(""),t(""),Cp("/game");const u=await l.text(),[,c]=u.split(" ");Ll(Ir,{username:n,sessionKey:c})}if(l.status>=400){const u=await l.text();i(u)}},children:[O.jsxs("main",{children:[s?O.jsx("aside",{children:s}):null,O.jsxs("label",{htmlFor:"username",children:[O.jsx("span",{children:"Username"}),O.jsx("input",{id:"username",type:"text",value:n,onChange:o=>{e(o.target.value)},autoComplete:"username"})]}),O.jsxs("label",{htmlFor:"password",children:[O.jsx("span",{children:"Password"}),O.jsx("input",{id:"password",type:"password",value:r,onChange:o=>{t(o.target.value)},autoComplete:"current-password"})]}),O.jsx("button",{type:"submit",disabled:!n||!r,children:"->"})]}),O.jsx("footer",{children:O.jsxs(Np,{href:"/sign_up",children:["New here? ",O.jsx("u",{children:"Sign up"})," for an account."]})})]})}function B1(){const e=Rn(Fs),t=Rn(Mr),n=Rn(Rl),r=Rn(Ol),s=He(Fs),i=He(Mr),o=He(Rl),a=He(Ol),l=He(kp),u=He(Sp),c=He(xp),d=He(Ep),h=He(C1),[y,w]=ve.useState(null);return O.jsxs("form",{onSubmit:async v=>{v.preventDefault();const N=i,p=await Op("sign-up"),f=await fetch(`${Hu.VITE_BACKEND_ORIGIN}/sign-up-${p}`,{method:"POST",body:JSON.stringify({username:s,password:N,email:a})});if(f.status===200&&(n(""),r(""),Cp("/login")),f.status>=400){const m=await f.text();w(m)}},children:[O.jsxs("main",{children:[y?O.jsx("aside",{children:y}):null,O.jsxs("label",{htmlFor:"username",children:[O.jsx("span",{children:"Username"}),O.jsx("input",{id:"username",type:"text",value:s,onChange:v=>{e(v.target.value)},autoComplete:"username",style:{"--energy-color":s?l?"red":"green":void 0}}),s&&l?O.jsx("aside",{children:l.map(v=>O.jsx("span",{children:v.message},v.path.join(".")))}):null]}),O.jsxs("label",{htmlFor:"password",children:[O.jsx("span",{children:"Password"}),O.jsx("input",{id:"password0",type:"password",value:i,onChange:v=>{t(v.target.value)},autoComplete:"new-password",style:{"--energy-color":i?u?"red":"green":void 0}}),i&&u?O.jsx("aside",{children:u.map(v=>O.jsx("span",{children:v.message},v.path.join(".")))}):null]}),O.jsxs("label",{htmlFor:"password",children:[O.jsx("span",{children:"Confirm Password"}),O.jsx("input",{id:"password1",type:"password",value:o,onChange:v=>{n(v.target.value)},autoComplete:"new-password",style:{"--energy-color":o?c?"red":"green":void 0}}),o&&c?O.jsx("aside",{children:c.map(v=>O.jsx("span",{children:v.message},v.path.join(".")))}):null]}),O.jsxs("label",{htmlFor:"email",children:[O.jsx("span",{children:"Email"}),O.jsx("input",{id:"email",type:"email",value:a,onChange:v=>{r(v.target.value)},autoComplete:"email",style:{"--energy-color":a?d?"red":"green":void 0}}),a&&d?O.jsx("aside",{children:d.map(v=>O.jsx("span",{children:v.message},v.path.join(".")))}):null]}),O.jsx("button",{type:"submit",disabled:!h,children:"->"})]}),O.jsx("footer",{children:O.jsxs(Np,{href:"/login",children:["Already have an account? ",O.jsx("u",{children:"Log in"})," instead."]})})]})}function F1(){const e=He(b1);return O.jsxs("main",{className:g0.class,children:[O.jsx("header",{children:O.jsx(y0,{})}),O.jsx("main",{children:typeof e=="number"?O.jsxs("article",{children:[O.jsx("h1",{children:e}),O.jsx("h2",{children:ip[e]})]}):(()=>{const[t,...n]=e;switch(t){case"admin":return O.jsx(A1,{});case"login":return O.jsx(U1,{});case"sign_up":return O.jsx(B1,{});case"game":return O.jsx(L1,{route:n})}})()})]})}Jh(document.getElementById("root")).render(O.jsx(ve.StrictMode,{children:O.jsx(ny,{socket:wp,children:O.jsx(F1,{})})}));
|