hjworktree-cli 2.4.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,7 +37,7 @@
37
37
  `+c[D].replace(" at new "," at ");return e.displayName&&z.includes("<anonymous>")&&(z=z.replace("<anonymous>",e.displayName)),z}while(1<=D&&0<=N);break}}}finally{Z=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?P(e):""}function ce(e){switch(e.tag){case 5:return P(e.type);case 16:return P("Lazy");case 13:return P("Suspense");case 19:return P("SuspenseList");case 0:case 2:case 15:return e=re(e.type,!1),e;case 11:return e=re(e.type.render,!1),e;case 1:return e=re(e.type,!0),e;default:return""}}function he(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 R:return"Fragment";case k:return"Portal";case A:return"Profiler";case S:return"StrictMode";case I:return"Suspense";case Q:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case j:return(e.displayName||"Context")+".Consumer";case H:return(e._context.displayName||"Context")+".Provider";case $:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case te:return t=e.displayName||null,t!==null?t:he(e.type)||"Memo";case ne:t=e._payload,e=e._init;try{return he(e(t))}catch{}}return null}function W(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 he(t);case 8:return t===S?"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 B(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ee(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function J(e){var t=ee(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),i=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var c=r.get,_=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(D){i=""+D,_.call(this,D)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(D){i=""+D},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function de(e){e._valueTracker||(e._valueTracker=J(e))}function ue(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),i="";return e&&(i=ee(e)?e.checked?"true":"false":e.value),e=i,e!==r?(t.setValue(e),!0):!1}function Ee(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 Le(e,t){var r=t.checked;return O({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Te(e,t){var r=t.defaultValue==null?"":t.defaultValue,i=t.checked!=null?t.checked:t.defaultChecked;r=B(t.value!=null?t.value:r),e._wrapperState={initialChecked:i,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ge(e,t){t=t.checked,t!=null&&n(e,"checked",t,!1)}function ye(e,t){Ge(e,t);var r=B(t.value),i=t.type;if(r!=null)i==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(i==="submit"||i==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Er(e,t.type,r):t.hasOwnProperty("defaultValue")&&Er(e,t.type,B(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Jt(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var i=t.type;if(!(i!=="submit"&&i!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function Er(e,t,r){(t!=="number"||Ee(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var Wt=Array.isArray;function Mt(e,t,r,i){if(e=e.options,t){t={};for(var c=0;c<r.length;c++)t["$"+r[c]]=!0;for(r=0;r<e.length;r++)c=t.hasOwnProperty("$"+e[r].value),e[r].selected!==c&&(e[r].selected=c),c&&i&&(e[r].defaultSelected=!0)}else{for(r=""+B(r),t=null,c=0;c<e.length;c++){if(e[c].value===r){e[c].selected=!0,i&&(e[c].defaultSelected=!0);return}t!==null||e[c].disabled||(t=e[c])}t!==null&&(t.selected=!0)}}function Zt(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(h(91));return O({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function rt(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(h(92));if(Wt(r)){if(1<r.length)throw Error(h(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:B(r)}}function er(e,t){var r=B(t.value),i=B(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),i!=null&&(e.defaultValue=""+i)}function dt(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function tr(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 kr(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?tr(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var ft,br=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,i,c){MSApp.execUnsafeLocalFunction(function(){return e(t,r,i,c)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(ft=ft||document.createElement("div"),ft.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ft.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function nt(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var xt={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},Ae=["Webkit","ms","Moz","O"];Object.keys(xt).forEach(function(e){Ae.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),xt[t]=xt[e]})});function Yi(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||xt.hasOwnProperty(e)&&xt[e]?(""+t).trim():t+"px"}function Dl(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var i=r.indexOf("--")===0,c=Yi(r,t[r],i);r==="float"&&(r="cssFloat"),i?e.setProperty(r,c):e[r]=c}}var Gh=O({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 vn(e,t){if(t){if(Gh[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(h(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(h(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(h(61))}if(t.style!=null&&typeof t.style!="object")throw Error(h(62))}}function mn(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 gn=null;function Sn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yn=null,Fr=null,jr=null;function Tl(e){if(e=Ai(e)){if(typeof yn!="function")throw Error(h(280));var t=e.stateNode;t&&(t=Ss(t),yn(e.stateNode,e.type,t))}}function Al(e){Fr?jr?jr.push(e):jr=[e]:Fr=e}function Bl(){if(Fr){var e=Fr,t=jr;if(jr=Fr=null,Tl(e),t)for(e=0;e<t.length;e++)Tl(t[e])}}function Ol(e,t){return e(t)}function Pl(){}var wn=!1;function Ml(e,t,r){if(wn)return e(t,r);wn=!0;try{return Ol(e,t,r)}finally{wn=!1,(Fr!==null||jr!==null)&&(Pl(),Bl())}}function hi(e,t){var r=e.stateNode;if(r===null)return null;var i=Ss(r);if(i===null)return null;r=i[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":(i=!i.disabled)||(e=e.type,i=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!i;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(h(231,t,typeof r));return r}var Cn=!1;if(l)try{var ui={};Object.defineProperty(ui,"passive",{get:function(){Cn=!0}}),window.addEventListener("test",ui,ui),window.removeEventListener("test",ui,ui)}catch{Cn=!1}function Yh(e,t,r,i,c,_,D,N,z){var Y=Array.prototype.slice.call(arguments,3);try{t.apply(r,Y)}catch(se){this.onError(se)}}var di=!1,Qi=null,Ji=!1,En=null,Qh={onError:function(e){di=!0,Qi=e}};function Jh(e,t,r,i,c,_,D,N,z){di=!1,Qi=null,Yh.apply(Qh,arguments)}function Zh(e,t,r,i,c,_,D,N,z){if(Jh.apply(this,arguments),di){if(di){var Y=Qi;di=!1,Qi=null}else throw Error(h(198));Ji||(Ji=!0,En=Y)}}function xr(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Il(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 Nl(e){if(xr(e)!==e)throw Error(h(188))}function eu(e){var t=e.alternate;if(!t){if(t=xr(e),t===null)throw Error(h(188));return t!==e?null:e}for(var r=e,i=t;;){var c=r.return;if(c===null)break;var _=c.alternate;if(_===null){if(i=c.return,i!==null){r=i;continue}break}if(c.child===_.child){for(_=c.child;_;){if(_===r)return Nl(c),e;if(_===i)return Nl(c),t;_=_.sibling}throw Error(h(188))}if(r.return!==i.return)r=c,i=_;else{for(var D=!1,N=c.child;N;){if(N===r){D=!0,r=c,i=_;break}if(N===i){D=!0,i=c,r=_;break}N=N.sibling}if(!D){for(N=_.child;N;){if(N===r){D=!0,r=_,i=c;break}if(N===i){D=!0,i=_,r=c;break}N=N.sibling}if(!D)throw Error(h(189))}}if(r.alternate!==i)throw Error(h(190))}if(r.tag!==3)throw Error(h(188));return r.stateNode.current===r?e:t}function Hl(e){return e=eu(e),e!==null?Fl(e):null}function Fl(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=Fl(e);if(t!==null)return t;e=e.sibling}return null}var jl=d.unstable_scheduleCallback,zl=d.unstable_cancelCallback,tu=d.unstable_shouldYield,ru=d.unstable_requestPaint,He=d.unstable_now,iu=d.unstable_getCurrentPriorityLevel,kn=d.unstable_ImmediatePriority,Ul=d.unstable_UserBlockingPriority,Zi=d.unstable_NormalPriority,su=d.unstable_LowPriority,Wl=d.unstable_IdlePriority,es=null,It=null;function nu(e){if(It&&typeof It.onCommitFiberRoot=="function")try{It.onCommitFiberRoot(es,e,void 0,(e.current.flags&128)===128)}catch{}}var Rt=Math.clz32?Math.clz32:au,ou=Math.log,lu=Math.LN2;function au(e){return e>>>=0,e===0?32:31-(ou(e)/lu|0)|0}var ts=64,rs=4194304;function fi(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 is(e,t){var r=e.pendingLanes;if(r===0)return 0;var i=0,c=e.suspendedLanes,_=e.pingedLanes,D=r&268435455;if(D!==0){var N=D&~c;N!==0?i=fi(N):(_&=D,_!==0&&(i=fi(_)))}else D=r&~c,D!==0?i=fi(D):_!==0&&(i=fi(_));if(i===0)return 0;if(t!==0&&t!==i&&(t&c)===0&&(c=i&-i,_=t&-t,c>=_||c===16&&(_&4194240)!==0))return t;if((i&4)!==0&&(i|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=i;0<t;)r=31-Rt(t),c=1<<r,i|=e[r],t&=~c;return i}function cu(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 hu(e,t){for(var r=e.suspendedLanes,i=e.pingedLanes,c=e.expirationTimes,_=e.pendingLanes;0<_;){var D=31-Rt(_),N=1<<D,z=c[D];z===-1?((N&r)===0||(N&i)!==0)&&(c[D]=cu(N,t)):z<=t&&(e.expiredLanes|=N),_&=~N}}function bn(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function $l(){var e=ts;return ts<<=1,(ts&4194240)===0&&(ts=64),e}function xn(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function _i(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Rt(t),e[t]=r}function uu(e,t){var r=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 i=e.eventTimes;for(e=e.expirationTimes;0<r;){var c=31-Rt(r),_=1<<c;t[c]=0,i[c]=-1,e[c]=-1,r&=~_}}function Rn(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var i=31-Rt(r),c=1<<i;c&t|e[i]&t&&(e[i]|=t),r&=~c}}var Re=0;function Vl(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var Kl,Ln,ql,Xl,Gl,Dn=!1,ss=[],rr=null,ir=null,sr=null,pi=new Map,vi=new Map,nr=[],du="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 Yl(e,t){switch(e){case"focusin":case"focusout":rr=null;break;case"dragenter":case"dragleave":ir=null;break;case"mouseover":case"mouseout":sr=null;break;case"pointerover":case"pointerout":pi.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":vi.delete(t.pointerId)}}function mi(e,t,r,i,c,_){return e===null||e.nativeEvent!==_?(e={blockedOn:t,domEventName:r,eventSystemFlags:i,nativeEvent:_,targetContainers:[c]},t!==null&&(t=Ai(t),t!==null&&Ln(t)),e):(e.eventSystemFlags|=i,t=e.targetContainers,c!==null&&t.indexOf(c)===-1&&t.push(c),e)}function fu(e,t,r,i,c){switch(t){case"focusin":return rr=mi(rr,e,t,r,i,c),!0;case"dragenter":return ir=mi(ir,e,t,r,i,c),!0;case"mouseover":return sr=mi(sr,e,t,r,i,c),!0;case"pointerover":var _=c.pointerId;return pi.set(_,mi(pi.get(_)||null,e,t,r,i,c)),!0;case"gotpointercapture":return _=c.pointerId,vi.set(_,mi(vi.get(_)||null,e,t,r,i,c)),!0}return!1}function Ql(e){var t=Rr(e.target);if(t!==null){var r=xr(t);if(r!==null){if(t=r.tag,t===13){if(t=Il(r),t!==null){e.blockedOn=t,Gl(e.priority,function(){ql(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ns(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=An(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var i=new r.constructor(r.type,r);gn=i,r.target.dispatchEvent(i),gn=null}else return t=Ai(r),t!==null&&Ln(t),e.blockedOn=r,!1;t.shift()}return!0}function Jl(e,t,r){ns(e)&&r.delete(t)}function _u(){Dn=!1,rr!==null&&ns(rr)&&(rr=null),ir!==null&&ns(ir)&&(ir=null),sr!==null&&ns(sr)&&(sr=null),pi.forEach(Jl),vi.forEach(Jl)}function gi(e,t){e.blockedOn===t&&(e.blockedOn=null,Dn||(Dn=!0,d.unstable_scheduleCallback(d.unstable_NormalPriority,_u)))}function Si(e){function t(c){return gi(c,e)}if(0<ss.length){gi(ss[0],e);for(var r=1;r<ss.length;r++){var i=ss[r];i.blockedOn===e&&(i.blockedOn=null)}}for(rr!==null&&gi(rr,e),ir!==null&&gi(ir,e),sr!==null&&gi(sr,e),pi.forEach(t),vi.forEach(t),r=0;r<nr.length;r++)i=nr[r],i.blockedOn===e&&(i.blockedOn=null);for(;0<nr.length&&(r=nr[0],r.blockedOn===null);)Ql(r),r.blockedOn===null&&nr.shift()}var zr=p.ReactCurrentBatchConfig,os=!0;function pu(e,t,r,i){var c=Re,_=zr.transition;zr.transition=null;try{Re=1,Tn(e,t,r,i)}finally{Re=c,zr.transition=_}}function vu(e,t,r,i){var c=Re,_=zr.transition;zr.transition=null;try{Re=4,Tn(e,t,r,i)}finally{Re=c,zr.transition=_}}function Tn(e,t,r,i){if(os){var c=An(e,t,r,i);if(c===null)Xn(e,t,i,ls,r),Yl(e,i);else if(fu(c,e,t,r,i))i.stopPropagation();else if(Yl(e,i),t&4&&-1<du.indexOf(e)){for(;c!==null;){var _=Ai(c);if(_!==null&&Kl(_),_=An(e,t,r,i),_===null&&Xn(e,t,i,ls,r),_===c)break;c=_}c!==null&&i.stopPropagation()}else Xn(e,t,i,null,r)}}var ls=null;function An(e,t,r,i){if(ls=null,e=Sn(i),e=Rr(e),e!==null)if(t=xr(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Il(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return ls=e,null}function Zl(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(iu()){case kn:return 1;case Ul:return 4;case Zi:case su:return 16;case Wl:return 536870912;default:return 16}default:return 16}}var or=null,Bn=null,as=null;function ea(){if(as)return as;var e,t=Bn,r=t.length,i,c="value"in or?or.value:or.textContent,_=c.length;for(e=0;e<r&&t[e]===c[e];e++);var D=r-e;for(i=1;i<=D&&t[r-i]===c[_-i];i++);return as=c.slice(e,1<i?1-i:void 0)}function cs(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 hs(){return!0}function ta(){return!1}function _t(e){function t(r,i,c,_,D){this._reactName=r,this._targetInst=c,this.type=i,this.nativeEvent=_,this.target=D,this.currentTarget=null;for(var N in e)e.hasOwnProperty(N)&&(r=e[N],this[N]=r?r(_):_[N]);return this.isDefaultPrevented=(_.defaultPrevented!=null?_.defaultPrevented:_.returnValue===!1)?hs:ta,this.isPropagationStopped=ta,this}return O(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=hs)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=hs)},persist:function(){},isPersistent:hs}),t}var Ur={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},On=_t(Ur),yi=O({},Ur,{view:0,detail:0}),mu=_t(yi),Pn,Mn,wi,us=O({},yi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Nn,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!==wi&&(wi&&e.type==="mousemove"?(Pn=e.screenX-wi.screenX,Mn=e.screenY-wi.screenY):Mn=Pn=0,wi=e),Pn)},movementY:function(e){return"movementY"in e?e.movementY:Mn}}),ra=_t(us),gu=O({},us,{dataTransfer:0}),Su=_t(gu),yu=O({},yi,{relatedTarget:0}),In=_t(yu),wu=O({},Ur,{animationName:0,elapsedTime:0,pseudoElement:0}),Cu=_t(wu),Eu=O({},Ur,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),ku=_t(Eu),bu=O({},Ur,{data:0}),ia=_t(bu),xu={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Ru={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"},Lu={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Du(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Lu[e])?!!t[e]:!1}function Nn(){return Du}var Tu=O({},yi,{key:function(e){if(e.key){var t=xu[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=cs(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Ru[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Nn,charCode:function(e){return e.type==="keypress"?cs(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?cs(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Au=_t(Tu),Bu=O({},us,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),sa=_t(Bu),Ou=O({},yi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Nn}),Pu=_t(Ou),Mu=O({},Ur,{propertyName:0,elapsedTime:0,pseudoElement:0}),Iu=_t(Mu),Nu=O({},us,{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}),Hu=_t(Nu),Fu=[9,13,27,32],Hn=l&&"CompositionEvent"in window,Ci=null;l&&"documentMode"in document&&(Ci=document.documentMode);var ju=l&&"TextEvent"in window&&!Ci,na=l&&(!Hn||Ci&&8<Ci&&11>=Ci),oa=" ",la=!1;function aa(e,t){switch(e){case"keyup":return Fu.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ca(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Wr=!1;function zu(e,t){switch(e){case"compositionend":return ca(t);case"keypress":return t.which!==32?null:(la=!0,oa);case"textInput":return e=t.data,e===oa&&la?null:e;default:return null}}function Uu(e,t){if(Wr)return e==="compositionend"||!Hn&&aa(e,t)?(e=ea(),as=Bn=or=null,Wr=!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 na&&t.locale!=="ko"?null:t.data;default:return null}}var Wu={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 ha(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Wu[e.type]:t==="textarea"}function ua(e,t,r,i){Al(i),t=vs(t,"onChange"),0<t.length&&(r=new On("onChange","change",null,r,i),e.push({event:r,listeners:t}))}var Ei=null,ki=null;function $u(e){Da(e,0)}function ds(e){var t=Xr(e);if(ue(t))return e}function Vu(e,t){if(e==="change")return t}var da=!1;if(l){var Fn;if(l){var jn="oninput"in document;if(!jn){var fa=document.createElement("div");fa.setAttribute("oninput","return;"),jn=typeof fa.oninput=="function"}Fn=jn}else Fn=!1;da=Fn&&(!document.documentMode||9<document.documentMode)}function _a(){Ei&&(Ei.detachEvent("onpropertychange",pa),ki=Ei=null)}function pa(e){if(e.propertyName==="value"&&ds(ki)){var t=[];ua(t,ki,e,Sn(e)),Ml($u,t)}}function Ku(e,t,r){e==="focusin"?(_a(),Ei=t,ki=r,Ei.attachEvent("onpropertychange",pa)):e==="focusout"&&_a()}function qu(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ds(ki)}function Xu(e,t){if(e==="click")return ds(t)}function Gu(e,t){if(e==="input"||e==="change")return ds(t)}function Yu(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Lt=typeof Object.is=="function"?Object.is:Yu;function bi(e,t){if(Lt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(i=0;i<r.length;i++){var c=r[i];if(!u.call(t,c)||!Lt(e[c],t[c]))return!1}return!0}function va(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ma(e,t){var r=va(e);e=0;for(var i;r;){if(r.nodeType===3){if(i=e+r.textContent.length,e<=t&&i>=t)return{node:r,offset:t-e};e=i}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=va(r)}}function ga(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?ga(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sa(){for(var e=window,t=Ee();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=Ee(e.document)}return t}function zn(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 Qu(e){var t=Sa(),r=e.focusedElem,i=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&ga(r.ownerDocument.documentElement,r)){if(i!==null&&zn(r)){if(t=i.start,e=i.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var c=r.textContent.length,_=Math.min(i.start,c);i=i.end===void 0?_:Math.min(i.end,c),!e.extend&&_>i&&(c=i,i=_,_=c),c=ma(r,_);var D=ma(r,i);c&&D&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==D.node||e.focusOffset!==D.offset)&&(t=t.createRange(),t.setStart(c.node,c.offset),e.removeAllRanges(),_>i?(e.addRange(t),e.extend(D.node,D.offset)):(t.setEnd(D.node,D.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var Ju=l&&"documentMode"in document&&11>=document.documentMode,$r=null,Un=null,xi=null,Wn=!1;function ya(e,t,r){var i=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;Wn||$r==null||$r!==Ee(i)||(i=$r,"selectionStart"in i&&zn(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),xi&&bi(xi,i)||(xi=i,i=vs(Un,"onSelect"),0<i.length&&(t=new On("onSelect","select",null,t,r),e.push({event:t,listeners:i}),t.target=$r)))}function fs(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Vr={animationend:fs("Animation","AnimationEnd"),animationiteration:fs("Animation","AnimationIteration"),animationstart:fs("Animation","AnimationStart"),transitionend:fs("Transition","TransitionEnd")},$n={},wa={};l&&(wa=document.createElement("div").style,"AnimationEvent"in window||(delete Vr.animationend.animation,delete Vr.animationiteration.animation,delete Vr.animationstart.animation),"TransitionEvent"in window||delete Vr.transitionend.transition);function _s(e){if($n[e])return $n[e];if(!Vr[e])return e;var t=Vr[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in wa)return $n[e]=t[r];return e}var Ca=_s("animationend"),Ea=_s("animationiteration"),ka=_s("animationstart"),ba=_s("transitionend"),xa=new Map,Ra="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 lr(e,t){xa.set(e,t),U(t,[e])}for(var Vn=0;Vn<Ra.length;Vn++){var Kn=Ra[Vn],Zu=Kn.toLowerCase(),ed=Kn[0].toUpperCase()+Kn.slice(1);lr(Zu,"on"+ed)}lr(Ca,"onAnimationEnd"),lr(Ea,"onAnimationIteration"),lr(ka,"onAnimationStart"),lr("dblclick","onDoubleClick"),lr("focusin","onFocus"),lr("focusout","onBlur"),lr(ba,"onTransitionEnd"),F("onMouseEnter",["mouseout","mouseover"]),F("onMouseLeave",["mouseout","mouseover"]),F("onPointerEnter",["pointerout","pointerover"]),F("onPointerLeave",["pointerout","pointerover"]),U("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),U("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),U("onBeforeInput",["compositionend","keypress","textInput","paste"]),U("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),U("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),U("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ri="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(" "),td=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ri));function La(e,t,r){var i=e.type||"unknown-event";e.currentTarget=r,Zh(i,t,void 0,e),e.currentTarget=null}function Da(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var i=e[r],c=i.event;i=i.listeners;e:{var _=void 0;if(t)for(var D=i.length-1;0<=D;D--){var N=i[D],z=N.instance,Y=N.currentTarget;if(N=N.listener,z!==_&&c.isPropagationStopped())break e;La(c,N,Y),_=z}else for(D=0;D<i.length;D++){if(N=i[D],z=N.instance,Y=N.currentTarget,N=N.listener,z!==_&&c.isPropagationStopped())break e;La(c,N,Y),_=z}}}if(Ji)throw e=En,Ji=!1,En=null,e}function Be(e,t){var r=t[eo];r===void 0&&(r=t[eo]=new Set);var i=e+"__bubble";r.has(i)||(Ta(t,e,2,!1),r.add(i))}function qn(e,t,r){var i=0;t&&(i|=4),Ta(r,e,i,t)}var ps="_reactListening"+Math.random().toString(36).slice(2);function Li(e){if(!e[ps]){e[ps]=!0,E.forEach(function(r){r!=="selectionchange"&&(td.has(r)||qn(r,!1,e),qn(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ps]||(t[ps]=!0,qn("selectionchange",!1,t))}}function Ta(e,t,r,i){switch(Zl(t)){case 1:var c=pu;break;case 4:c=vu;break;default:c=Tn}r=c.bind(null,t,r,e),c=void 0,!Cn||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(c=!0),i?c!==void 0?e.addEventListener(t,r,{capture:!0,passive:c}):e.addEventListener(t,r,!0):c!==void 0?e.addEventListener(t,r,{passive:c}):e.addEventListener(t,r,!1)}function Xn(e,t,r,i,c){var _=i;if((t&1)===0&&(t&2)===0&&i!==null)e:for(;;){if(i===null)return;var D=i.tag;if(D===3||D===4){var N=i.stateNode.containerInfo;if(N===c||N.nodeType===8&&N.parentNode===c)break;if(D===4)for(D=i.return;D!==null;){var z=D.tag;if((z===3||z===4)&&(z=D.stateNode.containerInfo,z===c||z.nodeType===8&&z.parentNode===c))return;D=D.return}for(;N!==null;){if(D=Rr(N),D===null)return;if(z=D.tag,z===5||z===6){i=_=D;continue e}N=N.parentNode}}i=i.return}Ml(function(){var Y=_,se=Sn(r),oe=[];e:{var ie=xa.get(e);if(ie!==void 0){var fe=On,pe=e;switch(e){case"keypress":if(cs(r)===0)break e;case"keydown":case"keyup":fe=Au;break;case"focusin":pe="focus",fe=In;break;case"focusout":pe="blur",fe=In;break;case"beforeblur":case"afterblur":fe=In;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":fe=ra;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":fe=Su;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":fe=Pu;break;case Ca:case Ea:case ka:fe=Cu;break;case ba:fe=Iu;break;case"scroll":fe=mu;break;case"wheel":fe=Hu;break;case"copy":case"cut":case"paste":fe=ku;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":fe=sa}var ve=(t&4)!==0,Fe=!ve&&e==="scroll",K=ve?ie!==null?ie+"Capture":null:ie;ve=[];for(var V=Y,q;V!==null;){q=V;var ae=q.stateNode;if(q.tag===5&&ae!==null&&(q=ae,K!==null&&(ae=hi(V,K),ae!=null&&ve.push(Di(V,ae,q)))),Fe)break;V=V.return}0<ve.length&&(ie=new fe(ie,pe,null,r,se),oe.push({event:ie,listeners:ve}))}}if((t&7)===0){e:{if(ie=e==="mouseover"||e==="pointerover",fe=e==="mouseout"||e==="pointerout",ie&&r!==gn&&(pe=r.relatedTarget||r.fromElement)&&(Rr(pe)||pe[$t]))break e;if((fe||ie)&&(ie=se.window===se?se:(ie=se.ownerDocument)?ie.defaultView||ie.parentWindow:window,fe?(pe=r.relatedTarget||r.toElement,fe=Y,pe=pe?Rr(pe):null,pe!==null&&(Fe=xr(pe),pe!==Fe||pe.tag!==5&&pe.tag!==6)&&(pe=null)):(fe=null,pe=Y),fe!==pe)){if(ve=ra,ae="onMouseLeave",K="onMouseEnter",V="mouse",(e==="pointerout"||e==="pointerover")&&(ve=sa,ae="onPointerLeave",K="onPointerEnter",V="pointer"),Fe=fe==null?ie:Xr(fe),q=pe==null?ie:Xr(pe),ie=new ve(ae,V+"leave",fe,r,se),ie.target=Fe,ie.relatedTarget=q,ae=null,Rr(se)===Y&&(ve=new ve(K,V+"enter",pe,r,se),ve.target=q,ve.relatedTarget=Fe,ae=ve),Fe=ae,fe&&pe)t:{for(ve=fe,K=pe,V=0,q=ve;q;q=Kr(q))V++;for(q=0,ae=K;ae;ae=Kr(ae))q++;for(;0<V-q;)ve=Kr(ve),V--;for(;0<q-V;)K=Kr(K),q--;for(;V--;){if(ve===K||K!==null&&ve===K.alternate)break t;ve=Kr(ve),K=Kr(K)}ve=null}else ve=null;fe!==null&&Aa(oe,ie,fe,ve,!1),pe!==null&&Fe!==null&&Aa(oe,Fe,pe,ve,!0)}}e:{if(ie=Y?Xr(Y):window,fe=ie.nodeName&&ie.nodeName.toLowerCase(),fe==="select"||fe==="input"&&ie.type==="file")var me=Vu;else if(ha(ie))if(da)me=Gu;else{me=qu;var ge=Ku}else(fe=ie.nodeName)&&fe.toLowerCase()==="input"&&(ie.type==="checkbox"||ie.type==="radio")&&(me=Xu);if(me&&(me=me(e,Y))){ua(oe,me,r,se);break e}ge&&ge(e,ie,Y),e==="focusout"&&(ge=ie._wrapperState)&&ge.controlled&&ie.type==="number"&&Er(ie,"number",ie.value)}switch(ge=Y?Xr(Y):window,e){case"focusin":(ha(ge)||ge.contentEditable==="true")&&($r=ge,Un=Y,xi=null);break;case"focusout":xi=Un=$r=null;break;case"mousedown":Wn=!0;break;case"contextmenu":case"mouseup":case"dragend":Wn=!1,ya(oe,r,se);break;case"selectionchange":if(Ju)break;case"keydown":case"keyup":ya(oe,r,se)}var Se;if(Hn)e:{switch(e){case"compositionstart":var we="onCompositionStart";break e;case"compositionend":we="onCompositionEnd";break e;case"compositionupdate":we="onCompositionUpdate";break e}we=void 0}else Wr?aa(e,r)&&(we="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(we="onCompositionStart");we&&(na&&r.locale!=="ko"&&(Wr||we!=="onCompositionStart"?we==="onCompositionEnd"&&Wr&&(Se=ea()):(or=se,Bn="value"in or?or.value:or.textContent,Wr=!0)),ge=vs(Y,we),0<ge.length&&(we=new ia(we,e,null,r,se),oe.push({event:we,listeners:ge}),Se?we.data=Se:(Se=ca(r),Se!==null&&(we.data=Se)))),(Se=ju?zu(e,r):Uu(e,r))&&(Y=vs(Y,"onBeforeInput"),0<Y.length&&(se=new ia("onBeforeInput","beforeinput",null,r,se),oe.push({event:se,listeners:Y}),se.data=Se))}Da(oe,t)})}function Di(e,t,r){return{instance:e,listener:t,currentTarget:r}}function vs(e,t){for(var r=t+"Capture",i=[];e!==null;){var c=e,_=c.stateNode;c.tag===5&&_!==null&&(c=_,_=hi(e,r),_!=null&&i.unshift(Di(e,_,c)),_=hi(e,t),_!=null&&i.push(Di(e,_,c))),e=e.return}return i}function Kr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function Aa(e,t,r,i,c){for(var _=t._reactName,D=[];r!==null&&r!==i;){var N=r,z=N.alternate,Y=N.stateNode;if(z!==null&&z===i)break;N.tag===5&&Y!==null&&(N=Y,c?(z=hi(r,_),z!=null&&D.unshift(Di(r,z,N))):c||(z=hi(r,_),z!=null&&D.push(Di(r,z,N)))),r=r.return}D.length!==0&&e.push({event:t,listeners:D})}var rd=/\r\n?/g,id=/\u0000|\uFFFD/g;function Ba(e){return(typeof e=="string"?e:""+e).replace(rd,`
38
38
  `).replace(id,"")}function ms(e,t,r){if(t=Ba(t),Ba(e)!==t&&r)throw Error(h(425))}function gs(){}var Gn=null,Yn=null;function Qn(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 Jn=typeof setTimeout=="function"?setTimeout:void 0,sd=typeof clearTimeout=="function"?clearTimeout:void 0,Oa=typeof Promise=="function"?Promise:void 0,nd=typeof queueMicrotask=="function"?queueMicrotask:typeof Oa<"u"?function(e){return Oa.resolve(null).then(e).catch(od)}:Jn;function od(e){setTimeout(function(){throw e})}function Zn(e,t){var r=t,i=0;do{var c=r.nextSibling;if(e.removeChild(r),c&&c.nodeType===8)if(r=c.data,r==="/$"){if(i===0){e.removeChild(c),Si(t);return}i--}else r!=="$"&&r!=="$?"&&r!=="$!"||i++;r=c}while(r);Si(t)}function ar(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 Pa(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var qr=Math.random().toString(36).slice(2),Nt="__reactFiber$"+qr,Ti="__reactProps$"+qr,$t="__reactContainer$"+qr,eo="__reactEvents$"+qr,ld="__reactListeners$"+qr,ad="__reactHandles$"+qr;function Rr(e){var t=e[Nt];if(t)return t;for(var r=e.parentNode;r;){if(t=r[$t]||r[Nt]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=Pa(e);e!==null;){if(r=e[Nt])return r;e=Pa(e)}return t}e=r,r=e.parentNode}return null}function Ai(e){return e=e[Nt]||e[$t],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Xr(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(h(33))}function Ss(e){return e[Ti]||null}var to=[],Gr=-1;function cr(e){return{current:e}}function Oe(e){0>Gr||(e.current=to[Gr],to[Gr]=null,Gr--)}function De(e,t){Gr++,to[Gr]=e.current,e.current=t}var hr={},Je=cr(hr),ot=cr(!1),Lr=hr;function Yr(e,t){var r=e.type.contextTypes;if(!r)return hr;var i=e.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===t)return i.__reactInternalMemoizedMaskedChildContext;var c={},_;for(_ in r)c[_]=t[_];return i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=c),c}function lt(e){return e=e.childContextTypes,e!=null}function ys(){Oe(ot),Oe(Je)}function Ma(e,t,r){if(Je.current!==hr)throw Error(h(168));De(Je,t),De(ot,r)}function Ia(e,t,r){var i=e.stateNode;if(t=t.childContextTypes,typeof i.getChildContext!="function")return r;i=i.getChildContext();for(var c in i)if(!(c in t))throw Error(h(108,W(e)||"Unknown",c));return O({},r,i)}function ws(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||hr,Lr=Je.current,De(Je,e),De(ot,ot.current),!0}function Na(e,t,r){var i=e.stateNode;if(!i)throw Error(h(169));r?(e=Ia(e,t,Lr),i.__reactInternalMemoizedMergedChildContext=e,Oe(ot),Oe(Je),De(Je,e)):Oe(ot),De(ot,r)}var Vt=null,Cs=!1,ro=!1;function Ha(e){Vt===null?Vt=[e]:Vt.push(e)}function cd(e){Cs=!0,Ha(e)}function ur(){if(!ro&&Vt!==null){ro=!0;var e=0,t=Re;try{var r=Vt;for(Re=1;e<r.length;e++){var i=r[e];do i=i(!0);while(i!==null)}Vt=null,Cs=!1}catch(c){throw Vt!==null&&(Vt=Vt.slice(e+1)),jl(kn,ur),c}finally{Re=t,ro=!1}}return null}var Qr=[],Jr=0,Es=null,ks=0,gt=[],St=0,Dr=null,Kt=1,qt="";function Tr(e,t){Qr[Jr++]=ks,Qr[Jr++]=Es,Es=e,ks=t}function Fa(e,t,r){gt[St++]=Kt,gt[St++]=qt,gt[St++]=Dr,Dr=e;var i=Kt;e=qt;var c=32-Rt(i)-1;i&=~(1<<c),r+=1;var _=32-Rt(t)+c;if(30<_){var D=c-c%5;_=(i&(1<<D)-1).toString(32),i>>=D,c-=D,Kt=1<<32-Rt(t)+c|r<<c|i,qt=_+e}else Kt=1<<_|r<<c|i,qt=e}function io(e){e.return!==null&&(Tr(e,1),Fa(e,1,0))}function so(e){for(;e===Es;)Es=Qr[--Jr],Qr[Jr]=null,ks=Qr[--Jr],Qr[Jr]=null;for(;e===Dr;)Dr=gt[--St],gt[St]=null,qt=gt[--St],gt[St]=null,Kt=gt[--St],gt[St]=null}var pt=null,vt=null,Pe=!1,Dt=null;function ja(e,t){var r=Et(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function za(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,pt=e,vt=ar(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,pt=e,vt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=Dr!==null?{id:Kt,overflow:qt}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=Et(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,pt=e,vt=null,!0):!1;default:return!1}}function no(e){return(e.mode&1)!==0&&(e.flags&128)===0}function oo(e){if(Pe){var t=vt;if(t){var r=t;if(!za(e,t)){if(no(e))throw Error(h(418));t=ar(r.nextSibling);var i=pt;t&&za(e,t)?ja(i,r):(e.flags=e.flags&-4097|2,Pe=!1,pt=e)}}else{if(no(e))throw Error(h(418));e.flags=e.flags&-4097|2,Pe=!1,pt=e}}}function Ua(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;pt=e}function bs(e){if(e!==pt)return!1;if(!Pe)return Ua(e),Pe=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Qn(e.type,e.memoizedProps)),t&&(t=vt)){if(no(e))throw Wa(),Error(h(418));for(;t;)ja(e,t),t=ar(t.nextSibling)}if(Ua(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(h(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){vt=ar(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}vt=null}}else vt=pt?ar(e.stateNode.nextSibling):null;return!0}function Wa(){for(var e=vt;e;)e=ar(e.nextSibling)}function Zr(){vt=pt=null,Pe=!1}function lo(e){Dt===null?Dt=[e]:Dt.push(e)}var hd=p.ReactCurrentBatchConfig;function Bi(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(h(309));var i=r.stateNode}if(!i)throw Error(h(147,e));var c=i,_=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===_?t.ref:(t=function(D){var N=c.refs;D===null?delete N[_]:N[_]=D},t._stringRef=_,t)}if(typeof e!="string")throw Error(h(284));if(!r._owner)throw Error(h(290,e))}return e}function xs(e,t){throw e=Object.prototype.toString.call(t),Error(h(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function $a(e){var t=e._init;return t(e._payload)}function Va(e){function t(K,V){if(e){var q=K.deletions;q===null?(K.deletions=[V],K.flags|=16):q.push(V)}}function r(K,V){if(!e)return null;for(;V!==null;)t(K,V),V=V.sibling;return null}function i(K,V){for(K=new Map;V!==null;)V.key!==null?K.set(V.key,V):K.set(V.index,V),V=V.sibling;return K}function c(K,V){return K=Sr(K,V),K.index=0,K.sibling=null,K}function _(K,V,q){return K.index=q,e?(q=K.alternate,q!==null?(q=q.index,q<V?(K.flags|=2,V):q):(K.flags|=2,V)):(K.flags|=1048576,V)}function D(K){return e&&K.alternate===null&&(K.flags|=2),K}function N(K,V,q,ae){return V===null||V.tag!==6?(V=Zo(q,K.mode,ae),V.return=K,V):(V=c(V,q),V.return=K,V)}function z(K,V,q,ae){var me=q.type;return me===R?se(K,V,q.props.children,ae,q.key):V!==null&&(V.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===ne&&$a(me)===V.type)?(ae=c(V,q.props),ae.ref=Bi(K,V,q),ae.return=K,ae):(ae=Ys(q.type,q.key,q.props,null,K.mode,ae),ae.ref=Bi(K,V,q),ae.return=K,ae)}function Y(K,V,q,ae){return V===null||V.tag!==4||V.stateNode.containerInfo!==q.containerInfo||V.stateNode.implementation!==q.implementation?(V=el(q,K.mode,ae),V.return=K,V):(V=c(V,q.children||[]),V.return=K,V)}function se(K,V,q,ae,me){return V===null||V.tag!==7?(V=Hr(q,K.mode,ae,me),V.return=K,V):(V=c(V,q),V.return=K,V)}function oe(K,V,q){if(typeof V=="string"&&V!==""||typeof V=="number")return V=Zo(""+V,K.mode,q),V.return=K,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case b:return q=Ys(V.type,V.key,V.props,null,K.mode,q),q.ref=Bi(K,null,V),q.return=K,q;case k:return V=el(V,K.mode,q),V.return=K,V;case ne:var ae=V._init;return oe(K,ae(V._payload),q)}if(Wt(V)||L(V))return V=Hr(V,K.mode,q,null),V.return=K,V;xs(K,V)}return null}function ie(K,V,q,ae){var me=V!==null?V.key:null;if(typeof q=="string"&&q!==""||typeof q=="number")return me!==null?null:N(K,V,""+q,ae);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case b:return q.key===me?z(K,V,q,ae):null;case k:return q.key===me?Y(K,V,q,ae):null;case ne:return me=q._init,ie(K,V,me(q._payload),ae)}if(Wt(q)||L(q))return me!==null?null:se(K,V,q,ae,null);xs(K,q)}return null}function fe(K,V,q,ae,me){if(typeof ae=="string"&&ae!==""||typeof ae=="number")return K=K.get(q)||null,N(V,K,""+ae,me);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case b:return K=K.get(ae.key===null?q:ae.key)||null,z(V,K,ae,me);case k:return K=K.get(ae.key===null?q:ae.key)||null,Y(V,K,ae,me);case ne:var ge=ae._init;return fe(K,V,q,ge(ae._payload),me)}if(Wt(ae)||L(ae))return K=K.get(q)||null,se(V,K,ae,me,null);xs(V,ae)}return null}function pe(K,V,q,ae){for(var me=null,ge=null,Se=V,we=V=0,Xe=null;Se!==null&&we<q.length;we++){Se.index>we?(Xe=Se,Se=null):Xe=Se.sibling;var xe=ie(K,Se,q[we],ae);if(xe===null){Se===null&&(Se=Xe);break}e&&Se&&xe.alternate===null&&t(K,Se),V=_(xe,V,we),ge===null?me=xe:ge.sibling=xe,ge=xe,Se=Xe}if(we===q.length)return r(K,Se),Pe&&Tr(K,we),me;if(Se===null){for(;we<q.length;we++)Se=oe(K,q[we],ae),Se!==null&&(V=_(Se,V,we),ge===null?me=Se:ge.sibling=Se,ge=Se);return Pe&&Tr(K,we),me}for(Se=i(K,Se);we<q.length;we++)Xe=fe(Se,K,we,q[we],ae),Xe!==null&&(e&&Xe.alternate!==null&&Se.delete(Xe.key===null?we:Xe.key),V=_(Xe,V,we),ge===null?me=Xe:ge.sibling=Xe,ge=Xe);return e&&Se.forEach(function(yr){return t(K,yr)}),Pe&&Tr(K,we),me}function ve(K,V,q,ae){var me=L(q);if(typeof me!="function")throw Error(h(150));if(q=me.call(q),q==null)throw Error(h(151));for(var ge=me=null,Se=V,we=V=0,Xe=null,xe=q.next();Se!==null&&!xe.done;we++,xe=q.next()){Se.index>we?(Xe=Se,Se=null):Xe=Se.sibling;var yr=ie(K,Se,xe.value,ae);if(yr===null){Se===null&&(Se=Xe);break}e&&Se&&yr.alternate===null&&t(K,Se),V=_(yr,V,we),ge===null?me=yr:ge.sibling=yr,ge=yr,Se=Xe}if(xe.done)return r(K,Se),Pe&&Tr(K,we),me;if(Se===null){for(;!xe.done;we++,xe=q.next())xe=oe(K,xe.value,ae),xe!==null&&(V=_(xe,V,we),ge===null?me=xe:ge.sibling=xe,ge=xe);return Pe&&Tr(K,we),me}for(Se=i(K,Se);!xe.done;we++,xe=q.next())xe=fe(Se,K,we,xe.value,ae),xe!==null&&(e&&xe.alternate!==null&&Se.delete(xe.key===null?we:xe.key),V=_(xe,V,we),ge===null?me=xe:ge.sibling=xe,ge=xe);return e&&Se.forEach(function(Wd){return t(K,Wd)}),Pe&&Tr(K,we),me}function Fe(K,V,q,ae){if(typeof q=="object"&&q!==null&&q.type===R&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case b:e:{for(var me=q.key,ge=V;ge!==null;){if(ge.key===me){if(me=q.type,me===R){if(ge.tag===7){r(K,ge.sibling),V=c(ge,q.props.children),V.return=K,K=V;break e}}else if(ge.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===ne&&$a(me)===ge.type){r(K,ge.sibling),V=c(ge,q.props),V.ref=Bi(K,ge,q),V.return=K,K=V;break e}r(K,ge);break}else t(K,ge);ge=ge.sibling}q.type===R?(V=Hr(q.props.children,K.mode,ae,q.key),V.return=K,K=V):(ae=Ys(q.type,q.key,q.props,null,K.mode,ae),ae.ref=Bi(K,V,q),ae.return=K,K=ae)}return D(K);case k:e:{for(ge=q.key;V!==null;){if(V.key===ge)if(V.tag===4&&V.stateNode.containerInfo===q.containerInfo&&V.stateNode.implementation===q.implementation){r(K,V.sibling),V=c(V,q.children||[]),V.return=K,K=V;break e}else{r(K,V);break}else t(K,V);V=V.sibling}V=el(q,K.mode,ae),V.return=K,K=V}return D(K);case ne:return ge=q._init,Fe(K,V,ge(q._payload),ae)}if(Wt(q))return pe(K,V,q,ae);if(L(q))return ve(K,V,q,ae);xs(K,q)}return typeof q=="string"&&q!==""||typeof q=="number"?(q=""+q,V!==null&&V.tag===6?(r(K,V.sibling),V=c(V,q),V.return=K,K=V):(r(K,V),V=Zo(q,K.mode,ae),V.return=K,K=V),D(K)):r(K,V)}return Fe}var ei=Va(!0),Ka=Va(!1),Rs=cr(null),Ls=null,ti=null,ao=null;function co(){ao=ti=Ls=null}function ho(e){var t=Rs.current;Oe(Rs),e._currentValue=t}function uo(e,t,r){for(;e!==null;){var i=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,i!==null&&(i.childLanes|=t)):i!==null&&(i.childLanes&t)!==t&&(i.childLanes|=t),e===r)break;e=e.return}}function ri(e,t){Ls=e,ao=ti=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(at=!0),e.firstContext=null)}function yt(e){var t=e._currentValue;if(ao!==e)if(e={context:e,memoizedValue:t,next:null},ti===null){if(Ls===null)throw Error(h(308));ti=e,Ls.dependencies={lanes:0,firstContext:e}}else ti=ti.next=e;return t}var Ar=null;function fo(e){Ar===null?Ar=[e]:Ar.push(e)}function qa(e,t,r,i){var c=t.interleaved;return c===null?(r.next=r,fo(t)):(r.next=c.next,c.next=r),t.interleaved=r,Xt(e,i)}function Xt(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var dr=!1;function _o(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Xa(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 Gt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fr(e,t,r){var i=e.updateQueue;if(i===null)return null;if(i=i.shared,(be&2)!==0){var c=i.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),i.pending=t,Xt(e,r)}return c=i.interleaved,c===null?(t.next=t,fo(i)):(t.next=c.next,c.next=t),i.interleaved=t,Xt(e,r)}function Ds(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Rn(e,r)}}function Ga(e,t){var r=e.updateQueue,i=e.alternate;if(i!==null&&(i=i.updateQueue,r===i)){var c=null,_=null;if(r=r.firstBaseUpdate,r!==null){do{var D={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};_===null?c=_=D:_=_.next=D,r=r.next}while(r!==null);_===null?c=_=t:_=_.next=t}else c=_=t;r={baseState:i.baseState,firstBaseUpdate:c,lastBaseUpdate:_,shared:i.shared,effects:i.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function Ts(e,t,r,i){var c=e.updateQueue;dr=!1;var _=c.firstBaseUpdate,D=c.lastBaseUpdate,N=c.shared.pending;if(N!==null){c.shared.pending=null;var z=N,Y=z.next;z.next=null,D===null?_=Y:D.next=Y,D=z;var se=e.alternate;se!==null&&(se=se.updateQueue,N=se.lastBaseUpdate,N!==D&&(N===null?se.firstBaseUpdate=Y:N.next=Y,se.lastBaseUpdate=z))}if(_!==null){var oe=c.baseState;D=0,se=Y=z=null,N=_;do{var ie=N.lane,fe=N.eventTime;if((i&ie)===ie){se!==null&&(se=se.next={eventTime:fe,lane:0,tag:N.tag,payload:N.payload,callback:N.callback,next:null});e:{var pe=e,ve=N;switch(ie=t,fe=r,ve.tag){case 1:if(pe=ve.payload,typeof pe=="function"){oe=pe.call(fe,oe,ie);break e}oe=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=ve.payload,ie=typeof pe=="function"?pe.call(fe,oe,ie):pe,ie==null)break e;oe=O({},oe,ie);break e;case 2:dr=!0}}N.callback!==null&&N.lane!==0&&(e.flags|=64,ie=c.effects,ie===null?c.effects=[N]:ie.push(N))}else fe={eventTime:fe,lane:ie,tag:N.tag,payload:N.payload,callback:N.callback,next:null},se===null?(Y=se=fe,z=oe):se=se.next=fe,D|=ie;if(N=N.next,N===null){if(N=c.shared.pending,N===null)break;ie=N,N=ie.next,ie.next=null,c.lastBaseUpdate=ie,c.shared.pending=null}}while(!0);if(se===null&&(z=oe),c.baseState=z,c.firstBaseUpdate=Y,c.lastBaseUpdate=se,t=c.shared.interleaved,t!==null){c=t;do D|=c.lane,c=c.next;while(c!==t)}else _===null&&(c.shared.lanes=0);Pr|=D,e.lanes=D,e.memoizedState=oe}}function Ya(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var i=e[t],c=i.callback;if(c!==null){if(i.callback=null,i=r,typeof c!="function")throw Error(h(191,c));c.call(i)}}}var Oi={},Ht=cr(Oi),Pi=cr(Oi),Mi=cr(Oi);function Br(e){if(e===Oi)throw Error(h(174));return e}function po(e,t){switch(De(Mi,t),De(Pi,e),De(Ht,Oi),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:kr(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=kr(t,e)}Oe(Ht),De(Ht,t)}function ii(){Oe(Ht),Oe(Pi),Oe(Mi)}function Qa(e){Br(Mi.current);var t=Br(Ht.current),r=kr(t,e.type);t!==r&&(De(Pi,e),De(Ht,r))}function vo(e){Pi.current===e&&(Oe(Ht),Oe(Pi))}var Me=cr(0);function As(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var mo=[];function go(){for(var e=0;e<mo.length;e++)mo[e]._workInProgressVersionPrimary=null;mo.length=0}var Bs=p.ReactCurrentDispatcher,So=p.ReactCurrentBatchConfig,Or=0,Ie=null,Ue=null,Ke=null,Os=!1,Ii=!1,Ni=0,ud=0;function Ze(){throw Error(h(321))}function yo(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!Lt(e[r],t[r]))return!1;return!0}function wo(e,t,r,i,c,_){if(Or=_,Ie=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Bs.current=e===null||e.memoizedState===null?pd:vd,e=r(i,c),Ii){_=0;do{if(Ii=!1,Ni=0,25<=_)throw Error(h(301));_+=1,Ke=Ue=null,t.updateQueue=null,Bs.current=md,e=r(i,c)}while(Ii)}if(Bs.current=Is,t=Ue!==null&&Ue.next!==null,Or=0,Ke=Ue=Ie=null,Os=!1,t)throw Error(h(300));return e}function Co(){var e=Ni!==0;return Ni=0,e}function Ft(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ke===null?Ie.memoizedState=Ke=e:Ke=Ke.next=e,Ke}function wt(){if(Ue===null){var e=Ie.alternate;e=e!==null?e.memoizedState:null}else e=Ue.next;var t=Ke===null?Ie.memoizedState:Ke.next;if(t!==null)Ke=t,Ue=e;else{if(e===null)throw Error(h(310));Ue=e,e={memoizedState:Ue.memoizedState,baseState:Ue.baseState,baseQueue:Ue.baseQueue,queue:Ue.queue,next:null},Ke===null?Ie.memoizedState=Ke=e:Ke=Ke.next=e}return Ke}function Hi(e,t){return typeof t=="function"?t(e):t}function Eo(e){var t=wt(),r=t.queue;if(r===null)throw Error(h(311));r.lastRenderedReducer=e;var i=Ue,c=i.baseQueue,_=r.pending;if(_!==null){if(c!==null){var D=c.next;c.next=_.next,_.next=D}i.baseQueue=c=_,r.pending=null}if(c!==null){_=c.next,i=i.baseState;var N=D=null,z=null,Y=_;do{var se=Y.lane;if((Or&se)===se)z!==null&&(z=z.next={lane:0,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),i=Y.hasEagerState?Y.eagerState:e(i,Y.action);else{var oe={lane:se,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null};z===null?(N=z=oe,D=i):z=z.next=oe,Ie.lanes|=se,Pr|=se}Y=Y.next}while(Y!==null&&Y!==_);z===null?D=i:z.next=N,Lt(i,t.memoizedState)||(at=!0),t.memoizedState=i,t.baseState=D,t.baseQueue=z,r.lastRenderedState=i}if(e=r.interleaved,e!==null){c=e;do _=c.lane,Ie.lanes|=_,Pr|=_,c=c.next;while(c!==e)}else c===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function ko(e){var t=wt(),r=t.queue;if(r===null)throw Error(h(311));r.lastRenderedReducer=e;var i=r.dispatch,c=r.pending,_=t.memoizedState;if(c!==null){r.pending=null;var D=c=c.next;do _=e(_,D.action),D=D.next;while(D!==c);Lt(_,t.memoizedState)||(at=!0),t.memoizedState=_,t.baseQueue===null&&(t.baseState=_),r.lastRenderedState=_}return[_,i]}function Ja(){}function Za(e,t){var r=Ie,i=wt(),c=t(),_=!Lt(i.memoizedState,c);if(_&&(i.memoizedState=c,at=!0),i=i.queue,bo(rc.bind(null,r,i,e),[e]),i.getSnapshot!==t||_||Ke!==null&&Ke.memoizedState.tag&1){if(r.flags|=2048,Fi(9,tc.bind(null,r,i,c,t),void 0,null),qe===null)throw Error(h(349));(Or&30)!==0||ec(r,t,c)}return c}function ec(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Ie.updateQueue,t===null?(t={lastEffect:null,stores:null},Ie.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function tc(e,t,r,i){t.value=r,t.getSnapshot=i,ic(t)&&sc(e)}function rc(e,t,r){return r(function(){ic(t)&&sc(e)})}function ic(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!Lt(e,r)}catch{return!0}}function sc(e){var t=Xt(e,1);t!==null&&Ot(t,e,1,-1)}function nc(e){var t=Ft();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Hi,lastRenderedState:e},t.queue=e,e=e.dispatch=_d.bind(null,Ie,e),[t.memoizedState,e]}function Fi(e,t,r,i){return e={tag:e,create:t,destroy:r,deps:i,next:null},t=Ie.updateQueue,t===null?(t={lastEffect:null,stores:null},Ie.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(i=r.next,r.next=e,e.next=i,t.lastEffect=e)),e}function oc(){return wt().memoizedState}function Ps(e,t,r,i){var c=Ft();Ie.flags|=e,c.memoizedState=Fi(1|t,r,void 0,i===void 0?null:i)}function Ms(e,t,r,i){var c=wt();i=i===void 0?null:i;var _=void 0;if(Ue!==null){var D=Ue.memoizedState;if(_=D.destroy,i!==null&&yo(i,D.deps)){c.memoizedState=Fi(t,r,_,i);return}}Ie.flags|=e,c.memoizedState=Fi(1|t,r,_,i)}function lc(e,t){return Ps(8390656,8,e,t)}function bo(e,t){return Ms(2048,8,e,t)}function ac(e,t){return Ms(4,2,e,t)}function cc(e,t){return Ms(4,4,e,t)}function hc(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 uc(e,t,r){return r=r!=null?r.concat([e]):null,Ms(4,4,hc.bind(null,t,e),r)}function xo(){}function dc(e,t){var r=wt();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&yo(t,i[1])?i[0]:(r.memoizedState=[e,t],e)}function fc(e,t){var r=wt();t=t===void 0?null:t;var i=r.memoizedState;return i!==null&&t!==null&&yo(t,i[1])?i[0]:(e=e(),r.memoizedState=[e,t],e)}function _c(e,t,r){return(Or&21)===0?(e.baseState&&(e.baseState=!1,at=!0),e.memoizedState=r):(Lt(r,t)||(r=$l(),Ie.lanes|=r,Pr|=r,e.baseState=!0),t)}function dd(e,t){var r=Re;Re=r!==0&&4>r?r:4,e(!0);var i=So.transition;So.transition={};try{e(!1),t()}finally{Re=r,So.transition=i}}function pc(){return wt().memoizedState}function fd(e,t,r){var i=mr(e);if(r={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null},vc(e))mc(t,r);else if(r=qa(e,t,r,i),r!==null){var c=st();Ot(r,e,i,c),gc(r,t,i)}}function _d(e,t,r){var i=mr(e),c={lane:i,action:r,hasEagerState:!1,eagerState:null,next:null};if(vc(e))mc(t,c);else{var _=e.alternate;if(e.lanes===0&&(_===null||_.lanes===0)&&(_=t.lastRenderedReducer,_!==null))try{var D=t.lastRenderedState,N=_(D,r);if(c.hasEagerState=!0,c.eagerState=N,Lt(N,D)){var z=t.interleaved;z===null?(c.next=c,fo(t)):(c.next=z.next,z.next=c),t.interleaved=c;return}}catch{}finally{}r=qa(e,t,c,i),r!==null&&(c=st(),Ot(r,e,i,c),gc(r,t,i))}}function vc(e){var t=e.alternate;return e===Ie||t!==null&&t===Ie}function mc(e,t){Ii=Os=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function gc(e,t,r){if((r&4194240)!==0){var i=t.lanes;i&=e.pendingLanes,r|=i,t.lanes=r,Rn(e,r)}}var Is={readContext:yt,useCallback:Ze,useContext:Ze,useEffect:Ze,useImperativeHandle:Ze,useInsertionEffect:Ze,useLayoutEffect:Ze,useMemo:Ze,useReducer:Ze,useRef:Ze,useState:Ze,useDebugValue:Ze,useDeferredValue:Ze,useTransition:Ze,useMutableSource:Ze,useSyncExternalStore:Ze,useId:Ze,unstable_isNewReconciler:!1},pd={readContext:yt,useCallback:function(e,t){return Ft().memoizedState=[e,t===void 0?null:t],e},useContext:yt,useEffect:lc,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Ps(4194308,4,hc.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Ps(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ps(4,2,e,t)},useMemo:function(e,t){var r=Ft();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var i=Ft();return t=r!==void 0?r(t):t,i.memoizedState=i.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},i.queue=e,e=e.dispatch=fd.bind(null,Ie,e),[i.memoizedState,e]},useRef:function(e){var t=Ft();return e={current:e},t.memoizedState=e},useState:nc,useDebugValue:xo,useDeferredValue:function(e){return Ft().memoizedState=e},useTransition:function(){var e=nc(!1),t=e[0];return e=dd.bind(null,e[1]),Ft().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var i=Ie,c=Ft();if(Pe){if(r===void 0)throw Error(h(407));r=r()}else{if(r=t(),qe===null)throw Error(h(349));(Or&30)!==0||ec(i,t,r)}c.memoizedState=r;var _={value:r,getSnapshot:t};return c.queue=_,lc(rc.bind(null,i,_,e),[e]),i.flags|=2048,Fi(9,tc.bind(null,i,_,r,t),void 0,null),r},useId:function(){var e=Ft(),t=qe.identifierPrefix;if(Pe){var r=qt,i=Kt;r=(i&~(1<<32-Rt(i)-1)).toString(32)+r,t=":"+t+"R"+r,r=Ni++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=ud++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},vd={readContext:yt,useCallback:dc,useContext:yt,useEffect:bo,useImperativeHandle:uc,useInsertionEffect:ac,useLayoutEffect:cc,useMemo:fc,useReducer:Eo,useRef:oc,useState:function(){return Eo(Hi)},useDebugValue:xo,useDeferredValue:function(e){var t=wt();return _c(t,Ue.memoizedState,e)},useTransition:function(){var e=Eo(Hi)[0],t=wt().memoizedState;return[e,t]},useMutableSource:Ja,useSyncExternalStore:Za,useId:pc,unstable_isNewReconciler:!1},md={readContext:yt,useCallback:dc,useContext:yt,useEffect:bo,useImperativeHandle:uc,useInsertionEffect:ac,useLayoutEffect:cc,useMemo:fc,useReducer:ko,useRef:oc,useState:function(){return ko(Hi)},useDebugValue:xo,useDeferredValue:function(e){var t=wt();return Ue===null?t.memoizedState=e:_c(t,Ue.memoizedState,e)},useTransition:function(){var e=ko(Hi)[0],t=wt().memoizedState;return[e,t]},useMutableSource:Ja,useSyncExternalStore:Za,useId:pc,unstable_isNewReconciler:!1};function Tt(e,t){if(e&&e.defaultProps){t=O({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function Ro(e,t,r,i){t=e.memoizedState,r=r(i,t),r=r==null?t:O({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var Ns={isMounted:function(e){return(e=e._reactInternals)?xr(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var i=st(),c=mr(e),_=Gt(i,c);_.payload=t,r!=null&&(_.callback=r),t=fr(e,_,c),t!==null&&(Ot(t,e,c,i),Ds(t,e,c))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var i=st(),c=mr(e),_=Gt(i,c);_.tag=1,_.payload=t,r!=null&&(_.callback=r),t=fr(e,_,c),t!==null&&(Ot(t,e,c,i),Ds(t,e,c))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=st(),i=mr(e),c=Gt(r,i);c.tag=2,t!=null&&(c.callback=t),t=fr(e,c,i),t!==null&&(Ot(t,e,i,r),Ds(t,e,i))}};function Sc(e,t,r,i,c,_,D){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(i,_,D):t.prototype&&t.prototype.isPureReactComponent?!bi(r,i)||!bi(c,_):!0}function yc(e,t,r){var i=!1,c=hr,_=t.contextType;return typeof _=="object"&&_!==null?_=yt(_):(c=lt(t)?Lr:Je.current,i=t.contextTypes,_=(i=i!=null)?Yr(e,c):hr),t=new t(r,_),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=Ns,e.stateNode=t,t._reactInternals=e,i&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=c,e.__reactInternalMemoizedMaskedChildContext=_),t}function wc(e,t,r,i){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,i),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,i),t.state!==e&&Ns.enqueueReplaceState(t,t.state,null)}function Lo(e,t,r,i){var c=e.stateNode;c.props=r,c.state=e.memoizedState,c.refs={},_o(e);var _=t.contextType;typeof _=="object"&&_!==null?c.context=yt(_):(_=lt(t)?Lr:Je.current,c.context=Yr(e,_)),c.state=e.memoizedState,_=t.getDerivedStateFromProps,typeof _=="function"&&(Ro(e,t,_,r),c.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof c.getSnapshotBeforeUpdate=="function"||typeof c.UNSAFE_componentWillMount!="function"&&typeof c.componentWillMount!="function"||(t=c.state,typeof c.componentWillMount=="function"&&c.componentWillMount(),typeof c.UNSAFE_componentWillMount=="function"&&c.UNSAFE_componentWillMount(),t!==c.state&&Ns.enqueueReplaceState(c,c.state,null),Ts(e,r,c,i),c.state=e.memoizedState),typeof c.componentDidMount=="function"&&(e.flags|=4194308)}function si(e,t){try{var r="",i=t;do r+=ce(i),i=i.return;while(i);var c=r}catch(_){c=`
39
39
  Error generating stack: `+_.message+`
40
- `+_.stack}return{value:e,source:t,stack:c,digest:null}}function Do(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function To(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var gd=typeof WeakMap=="function"?WeakMap:Map;function Cc(e,t,r){r=Gt(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){$s||($s=!0,Vo=i),To(e,t)},r}function Ec(e,t,r){r=Gt(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var c=t.value;r.payload=function(){return i(c)},r.callback=function(){To(e,t)}}var _=e.stateNode;return _!==null&&typeof _.componentDidCatch=="function"&&(r.callback=function(){To(e,t),typeof i!="function"&&(pr===null?pr=new Set([this]):pr.add(this));var D=t.stack;this.componentDidCatch(t.value,{componentStack:D!==null?D:""})}),r}function kc(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new gd;var c=new Set;i.set(t,c)}else c=i.get(t),c===void 0&&(c=new Set,i.set(t,c));c.has(r)||(c.add(r),e=Bd.bind(null,e,t,r),t.then(e,e))}function bc(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 xc(e,t,r,i,c){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Gt(-1,1),t.tag=2,fr(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var Sd=p.ReactCurrentOwner,at=!1;function it(e,t,r,i){t.child=e===null?Ka(t,null,r,i):ei(t,e.child,r,i)}function Rc(e,t,r,i,c){r=r.render;var _=t.ref;return ri(t,c),i=wo(e,t,r,i,_,c),r=Co(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Yt(e,t,c)):(Pe&&r&&io(t),t.flags|=1,it(e,t,i,c),t.child)}function Lc(e,t,r,i,c){if(e===null){var _=r.type;return typeof _=="function"&&!Jo(_)&&_.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=_,Dc(e,t,_,i,c)):(e=Ys(r.type,null,i,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(_=e.child,(e.lanes&c)===0){var D=_.memoizedProps;if(r=r.compare,r=r!==null?r:bi,r(D,i)&&e.ref===t.ref)return Yt(e,t,c)}return t.flags|=1,e=Sr(_,i),e.ref=t.ref,e.return=t,t.child=e}function Dc(e,t,r,i,c){if(e!==null){var _=e.memoizedProps;if(bi(_,i)&&e.ref===t.ref)if(at=!1,t.pendingProps=i=_,(e.lanes&c)!==0)(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,Yt(e,t,c)}return Ao(e,t,r,i,c)}function Tc(e,t,r){var i=t.pendingProps,c=i.children,_=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(oi,mt),mt|=r;else{if((r&1073741824)===0)return e=_!==null?_.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De(oi,mt),mt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=_!==null?_.baseLanes:r,De(oi,mt),mt|=i}else _!==null?(i=_.baseLanes|r,t.memoizedState=null):i=r,De(oi,mt),mt|=i;return it(e,t,c,r),t.child}function Ac(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Ao(e,t,r,i,c){var _=lt(r)?Lr:Je.current;return _=Yr(t,_),ri(t,c),r=wo(e,t,r,i,_,c),i=Co(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Yt(e,t,c)):(Pe&&i&&io(t),t.flags|=1,it(e,t,r,c),t.child)}function Bc(e,t,r,i,c){if(lt(r)){var _=!0;ws(t)}else _=!1;if(ri(t,c),t.stateNode===null)Fs(e,t),yc(t,r,i),Lo(t,r,i,c),i=!0;else if(e===null){var D=t.stateNode,N=t.memoizedProps;D.props=N;var z=D.context,Y=r.contextType;typeof Y=="object"&&Y!==null?Y=yt(Y):(Y=lt(r)?Lr:Je.current,Y=Yr(t,Y));var se=r.getDerivedStateFromProps,oe=typeof se=="function"||typeof D.getSnapshotBeforeUpdate=="function";oe||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(N!==i||z!==Y)&&wc(t,D,i,Y),dr=!1;var ie=t.memoizedState;D.state=ie,Ts(t,i,D,c),z=t.memoizedState,N!==i||ie!==z||ot.current||dr?(typeof se=="function"&&(Ro(t,r,se,i),z=t.memoizedState),(N=dr||Sc(t,r,N,i,ie,z,Y))?(oe||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount()),typeof D.componentDidMount=="function"&&(t.flags|=4194308)):(typeof D.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=z),D.props=i,D.state=z,D.context=Y,i=N):(typeof D.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{D=t.stateNode,Xa(e,t),N=t.memoizedProps,Y=t.type===t.elementType?N:Tt(t.type,N),D.props=Y,oe=t.pendingProps,ie=D.context,z=r.contextType,typeof z=="object"&&z!==null?z=yt(z):(z=lt(r)?Lr:Je.current,z=Yr(t,z));var fe=r.getDerivedStateFromProps;(se=typeof fe=="function"||typeof D.getSnapshotBeforeUpdate=="function")||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(N!==oe||ie!==z)&&wc(t,D,i,z),dr=!1,ie=t.memoizedState,D.state=ie,Ts(t,i,D,c);var pe=t.memoizedState;N!==oe||ie!==pe||ot.current||dr?(typeof fe=="function"&&(Ro(t,r,fe,i),pe=t.memoizedState),(Y=dr||Sc(t,r,Y,i,ie,pe,z)||!1)?(se||typeof D.UNSAFE_componentWillUpdate!="function"&&typeof D.componentWillUpdate!="function"||(typeof D.componentWillUpdate=="function"&&D.componentWillUpdate(i,pe,z),typeof D.UNSAFE_componentWillUpdate=="function"&&D.UNSAFE_componentWillUpdate(i,pe,z)),typeof D.componentDidUpdate=="function"&&(t.flags|=4),typeof D.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof D.componentDidUpdate!="function"||N===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=pe),D.props=i,D.state=pe,D.context=z,i=Y):(typeof D.componentDidUpdate!="function"||N===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),i=!1)}return Bo(e,t,r,i,_,c)}function Bo(e,t,r,i,c,_){Ac(e,t);var D=(t.flags&128)!==0;if(!i&&!D)return c&&Na(t,r,!1),Yt(e,t,_);i=t.stateNode,Sd.current=t;var N=D&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&D?(t.child=ei(t,e.child,null,_),t.child=ei(t,null,N,_)):it(e,t,N,_),t.memoizedState=i.state,c&&Na(t,r,!0),t.child}function Oc(e){var t=e.stateNode;t.pendingContext?Ma(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ma(e,t.context,!1),po(e,t.containerInfo)}function Pc(e,t,r,i,c){return Zr(),lo(c),t.flags|=256,it(e,t,r,i),t.child}var Oo={dehydrated:null,treeContext:null,retryLane:0};function Po(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mc(e,t,r){var i=t.pendingProps,c=Me.current,_=!1,D=(t.flags&128)!==0,N;if((N=D)||(N=e!==null&&e.memoizedState===null?!1:(c&2)!==0),N?(_=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(c|=1),De(Me,c&1),e===null)return oo(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(D=i.children,e=i.fallback,_?(i=t.mode,_=t.child,D={mode:"hidden",children:D},(i&1)===0&&_!==null?(_.childLanes=0,_.pendingProps=D):_=Qs(D,i,0,null),e=Hr(e,i,r,null),_.return=t,e.return=t,_.sibling=e,t.child=_,t.child.memoizedState=Po(r),t.memoizedState=Oo,e):Mo(t,D));if(c=e.memoizedState,c!==null&&(N=c.dehydrated,N!==null))return yd(e,t,D,i,N,c,r);if(_){_=i.fallback,D=t.mode,c=e.child,N=c.sibling;var z={mode:"hidden",children:i.children};return(D&1)===0&&t.child!==c?(i=t.child,i.childLanes=0,i.pendingProps=z,t.deletions=null):(i=Sr(c,z),i.subtreeFlags=c.subtreeFlags&14680064),N!==null?_=Sr(N,_):(_=Hr(_,D,r,null),_.flags|=2),_.return=t,i.return=t,i.sibling=_,t.child=i,i=_,_=t.child,D=e.child.memoizedState,D=D===null?Po(r):{baseLanes:D.baseLanes|r,cachePool:null,transitions:D.transitions},_.memoizedState=D,_.childLanes=e.childLanes&~r,t.memoizedState=Oo,i}return _=e.child,e=_.sibling,i=Sr(_,{mode:"visible",children:i.children}),(t.mode&1)===0&&(i.lanes=r),i.return=t,i.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function Mo(e,t){return t=Qs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Hs(e,t,r,i){return i!==null&&lo(i),ei(t,e.child,null,r),e=Mo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function yd(e,t,r,i,c,_,D){if(r)return t.flags&256?(t.flags&=-257,i=Do(Error(h(422))),Hs(e,t,D,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(_=i.fallback,c=t.mode,i=Qs({mode:"visible",children:i.children},c,0,null),_=Hr(_,c,D,null),_.flags|=2,i.return=t,_.return=t,i.sibling=_,t.child=i,(t.mode&1)!==0&&ei(t,e.child,null,D),t.child.memoizedState=Po(D),t.memoizedState=Oo,_);if((t.mode&1)===0)return Hs(e,t,D,null);if(c.data==="$!"){if(i=c.nextSibling&&c.nextSibling.dataset,i)var N=i.dgst;return i=N,_=Error(h(419)),i=Do(_,i,void 0),Hs(e,t,D,i)}if(N=(D&e.childLanes)!==0,at||N){if(i=qe,i!==null){switch(D&-D){case 4:c=2;break;case 16:c=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:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(i.suspendedLanes|D))!==0?0:c,c!==0&&c!==_.retryLane&&(_.retryLane=c,Xt(e,c),Ot(i,e,c,-1))}return Qo(),i=Do(Error(h(421))),Hs(e,t,D,i)}return c.data==="$?"?(t.flags|=128,t.child=e.child,t=Od.bind(null,e),c._reactRetry=t,null):(e=_.treeContext,vt=ar(c.nextSibling),pt=t,Pe=!0,Dt=null,e!==null&&(gt[St++]=Kt,gt[St++]=qt,gt[St++]=Dr,Kt=e.id,qt=e.overflow,Dr=t),t=Mo(t,i.children),t.flags|=4096,t)}function Ic(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),uo(e.return,t,r)}function Io(e,t,r,i,c){var _=e.memoizedState;_===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:c}:(_.isBackwards=t,_.rendering=null,_.renderingStartTime=0,_.last=i,_.tail=r,_.tailMode=c)}function Nc(e,t,r){var i=t.pendingProps,c=i.revealOrder,_=i.tail;if(it(e,t,i.children,r),i=Me.current,(i&2)!==0)i=i&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ic(e,r,t);else if(e.tag===19)Ic(e,r,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}i&=1}if(De(Me,i),(t.mode&1)===0)t.memoizedState=null;else switch(c){case"forwards":for(r=t.child,c=null;r!==null;)e=r.alternate,e!==null&&As(e)===null&&(c=r),r=r.sibling;r=c,r===null?(c=t.child,t.child=null):(c=r.sibling,r.sibling=null),Io(t,!1,c,r,_);break;case"backwards":for(r=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&As(e)===null){t.child=c;break}e=c.sibling,c.sibling=r,r=c,c=e}Io(t,!0,r,null,_);break;case"together":Io(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fs(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Yt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Pr|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(h(153));if(t.child!==null){for(e=t.child,r=Sr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Sr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function wd(e,t,r){switch(t.tag){case 3:Oc(t),Zr();break;case 5:Qa(t);break;case 1:lt(t.type)&&ws(t);break;case 4:po(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,c=t.memoizedProps.value;De(Rs,i._currentValue),i._currentValue=c;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(De(Me,Me.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?Mc(e,t,r):(De(Me,Me.current&1),e=Yt(e,t,r),e!==null?e.sibling:null);De(Me,Me.current&1);break;case 19:if(i=(r&t.childLanes)!==0,(e.flags&128)!==0){if(i)return Nc(e,t,r);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),De(Me,Me.current),i)break;return null;case 22:case 23:return t.lanes=0,Tc(e,t,r)}return Yt(e,t,r)}var Hc,No,Fc,jc;Hc=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},No=function(){},Fc=function(e,t,r,i){var c=e.memoizedProps;if(c!==i){e=t.stateNode,Br(Ht.current);var _=null;switch(r){case"input":c=Le(e,c),i=Le(e,i),_=[];break;case"select":c=O({},c,{value:void 0}),i=O({},i,{value:void 0}),_=[];break;case"textarea":c=Zt(e,c),i=Zt(e,i),_=[];break;default:typeof c.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=gs)}vn(r,i);var D;r=null;for(Y in c)if(!i.hasOwnProperty(Y)&&c.hasOwnProperty(Y)&&c[Y]!=null)if(Y==="style"){var N=c[Y];for(D in N)N.hasOwnProperty(D)&&(r||(r={}),r[D]="")}else Y!=="dangerouslySetInnerHTML"&&Y!=="children"&&Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&Y!=="autoFocus"&&(M.hasOwnProperty(Y)?_||(_=[]):(_=_||[]).push(Y,null));for(Y in i){var z=i[Y];if(N=c!=null?c[Y]:void 0,i.hasOwnProperty(Y)&&z!==N&&(z!=null||N!=null))if(Y==="style")if(N){for(D in N)!N.hasOwnProperty(D)||z&&z.hasOwnProperty(D)||(r||(r={}),r[D]="");for(D in z)z.hasOwnProperty(D)&&N[D]!==z[D]&&(r||(r={}),r[D]=z[D])}else r||(_||(_=[]),_.push(Y,r)),r=z;else Y==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,N=N?N.__html:void 0,z!=null&&N!==z&&(_=_||[]).push(Y,z)):Y==="children"?typeof z!="string"&&typeof z!="number"||(_=_||[]).push(Y,""+z):Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&(M.hasOwnProperty(Y)?(z!=null&&Y==="onScroll"&&Be("scroll",e),_||N===z||(_=[])):(_=_||[]).push(Y,z))}r&&(_=_||[]).push("style",r);var Y=_;(t.updateQueue=Y)&&(t.flags|=4)}},jc=function(e,t,r,i){r!==i&&(t.flags|=4)};function ji(e,t){if(!Pe)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function et(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var c=e.child;c!==null;)r|=c.lanes|c.childLanes,i|=c.subtreeFlags&14680064,i|=c.flags&14680064,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)r|=c.lanes|c.childLanes,i|=c.subtreeFlags,i|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function Cd(e,t,r){var i=t.pendingProps;switch(so(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(t),null;case 1:return lt(t.type)&&ys(),et(t),null;case 3:return i=t.stateNode,ii(),Oe(ot),Oe(Je),go(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(bs(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Dt!==null&&(Xo(Dt),Dt=null))),No(e,t),et(t),null;case 5:vo(t);var c=Br(Mi.current);if(r=t.type,e!==null&&t.stateNode!=null)Fc(e,t,r,i,c),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(h(166));return et(t),null}if(e=Br(Ht.current),bs(t)){i=t.stateNode,r=t.type;var _=t.memoizedProps;switch(i[Nt]=t,i[Ti]=_,e=(t.mode&1)!==0,r){case"dialog":Be("cancel",i),Be("close",i);break;case"iframe":case"object":case"embed":Be("load",i);break;case"video":case"audio":for(c=0;c<Ri.length;c++)Be(Ri[c],i);break;case"source":Be("error",i);break;case"img":case"image":case"link":Be("error",i),Be("load",i);break;case"details":Be("toggle",i);break;case"input":Te(i,_),Be("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!_.multiple},Be("invalid",i);break;case"textarea":rt(i,_),Be("invalid",i)}vn(r,_),c=null;for(var D in _)if(_.hasOwnProperty(D)){var N=_[D];D==="children"?typeof N=="string"?i.textContent!==N&&(_.suppressHydrationWarning!==!0&&ms(i.textContent,N,e),c=["children",N]):typeof N=="number"&&i.textContent!==""+N&&(_.suppressHydrationWarning!==!0&&ms(i.textContent,N,e),c=["children",""+N]):M.hasOwnProperty(D)&&N!=null&&D==="onScroll"&&Be("scroll",i)}switch(r){case"input":de(i),Jt(i,_,!0);break;case"textarea":de(i),dt(i);break;case"select":case"option":break;default:typeof _.onClick=="function"&&(i.onclick=gs)}i=c,t.updateQueue=i,i!==null&&(t.flags|=4)}else{D=c.nodeType===9?c:c.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=tr(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=D.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=D.createElement(r,{is:i.is}):(e=D.createElement(r),r==="select"&&(D=e,i.multiple?D.multiple=!0:i.size&&(D.size=i.size))):e=D.createElementNS(e,r),e[Nt]=t,e[Ti]=i,Hc(e,t,!1,!1),t.stateNode=e;e:{switch(D=mn(r,i),r){case"dialog":Be("cancel",e),Be("close",e),c=i;break;case"iframe":case"object":case"embed":Be("load",e),c=i;break;case"video":case"audio":for(c=0;c<Ri.length;c++)Be(Ri[c],e);c=i;break;case"source":Be("error",e),c=i;break;case"img":case"image":case"link":Be("error",e),Be("load",e),c=i;break;case"details":Be("toggle",e),c=i;break;case"input":Te(e,i),c=Le(e,i),Be("invalid",e);break;case"option":c=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},c=O({},i,{value:void 0}),Be("invalid",e);break;case"textarea":rt(e,i),c=Zt(e,i),Be("invalid",e);break;default:c=i}vn(r,c),N=c;for(_ in N)if(N.hasOwnProperty(_)){var z=N[_];_==="style"?Dl(e,z):_==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&br(e,z)):_==="children"?typeof z=="string"?(r!=="textarea"||z!=="")&&nt(e,z):typeof z=="number"&&nt(e,""+z):_!=="suppressContentEditableWarning"&&_!=="suppressHydrationWarning"&&_!=="autoFocus"&&(M.hasOwnProperty(_)?z!=null&&_==="onScroll"&&Be("scroll",e):z!=null&&n(e,_,z,D))}switch(r){case"input":de(e),Jt(e,i,!1);break;case"textarea":de(e),dt(e);break;case"option":i.value!=null&&e.setAttribute("value",""+B(i.value));break;case"select":e.multiple=!!i.multiple,_=i.value,_!=null?Mt(e,!!i.multiple,_,!1):i.defaultValue!=null&&Mt(e,!!i.multiple,i.defaultValue,!0);break;default:typeof c.onClick=="function"&&(e.onclick=gs)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return et(t),null;case 6:if(e&&t.stateNode!=null)jc(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(h(166));if(r=Br(Mi.current),Br(Ht.current),bs(t)){if(i=t.stateNode,r=t.memoizedProps,i[Nt]=t,(_=i.nodeValue!==r)&&(e=pt,e!==null))switch(e.tag){case 3:ms(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ms(i.nodeValue,r,(e.mode&1)!==0)}_&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[Nt]=t,t.stateNode=i}return et(t),null;case 13:if(Oe(Me),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Pe&&vt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Wa(),Zr(),t.flags|=98560,_=!1;else if(_=bs(t),i!==null&&i.dehydrated!==null){if(e===null){if(!_)throw Error(h(318));if(_=t.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(h(317));_[Nt]=t}else Zr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;et(t),_=!1}else Dt!==null&&(Xo(Dt),Dt=null),_=!0;if(!_)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Me.current&1)!==0?We===0&&(We=3):Qo())),t.updateQueue!==null&&(t.flags|=4),et(t),null);case 4:return ii(),No(e,t),e===null&&Li(t.stateNode.containerInfo),et(t),null;case 10:return ho(t.type._context),et(t),null;case 17:return lt(t.type)&&ys(),et(t),null;case 19:if(Oe(Me),_=t.memoizedState,_===null)return et(t),null;if(i=(t.flags&128)!==0,D=_.rendering,D===null)if(i)ji(_,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(D=As(e),D!==null){for(t.flags|=128,ji(_,!1),i=D.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)_=r,e=i,_.flags&=14680066,D=_.alternate,D===null?(_.childLanes=0,_.lanes=e,_.child=null,_.subtreeFlags=0,_.memoizedProps=null,_.memoizedState=null,_.updateQueue=null,_.dependencies=null,_.stateNode=null):(_.childLanes=D.childLanes,_.lanes=D.lanes,_.child=D.child,_.subtreeFlags=0,_.deletions=null,_.memoizedProps=D.memoizedProps,_.memoizedState=D.memoizedState,_.updateQueue=D.updateQueue,_.type=D.type,e=D.dependencies,_.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return De(Me,Me.current&1|2),t.child}e=e.sibling}_.tail!==null&&He()>li&&(t.flags|=128,i=!0,ji(_,!1),t.lanes=4194304)}else{if(!i)if(e=As(D),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ji(_,!0),_.tail===null&&_.tailMode==="hidden"&&!D.alternate&&!Pe)return et(t),null}else 2*He()-_.renderingStartTime>li&&r!==1073741824&&(t.flags|=128,i=!0,ji(_,!1),t.lanes=4194304);_.isBackwards?(D.sibling=t.child,t.child=D):(r=_.last,r!==null?r.sibling=D:t.child=D,_.last=D)}return _.tail!==null?(t=_.tail,_.rendering=t,_.tail=t.sibling,_.renderingStartTime=He(),t.sibling=null,r=Me.current,De(Me,i?r&1|2:r&1),t):(et(t),null);case 22:case 23:return Yo(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(mt&1073741824)!==0&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),null;case 24:return null;case 25:return null}throw Error(h(156,t.tag))}function Ed(e,t){switch(so(t),t.tag){case 1:return lt(t.type)&&ys(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ii(),Oe(ot),Oe(Je),go(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return vo(t),null;case 13:if(Oe(Me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(h(340));Zr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Oe(Me),null;case 4:return ii(),null;case 10:return ho(t.type._context),null;case 22:case 23:return Yo(),null;case 24:return null;default:return null}}var js=!1,tt=!1,kd=typeof WeakSet=="function"?WeakSet:Set,_e=null;function ni(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){Ne(e,t,i)}else r.current=null}function Ho(e,t,r){try{r()}catch(i){Ne(e,t,i)}}var zc=!1;function bd(e,t){if(Gn=os,e=Sa(),zn(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var c=i.anchorOffset,_=i.focusNode;i=i.focusOffset;try{r.nodeType,_.nodeType}catch{r=null;break e}var D=0,N=-1,z=-1,Y=0,se=0,oe=e,ie=null;t:for(;;){for(var fe;oe!==r||c!==0&&oe.nodeType!==3||(N=D+c),oe!==_||i!==0&&oe.nodeType!==3||(z=D+i),oe.nodeType===3&&(D+=oe.nodeValue.length),(fe=oe.firstChild)!==null;)ie=oe,oe=fe;for(;;){if(oe===e)break t;if(ie===r&&++Y===c&&(N=D),ie===_&&++se===i&&(z=D),(fe=oe.nextSibling)!==null)break;oe=ie,ie=oe.parentNode}oe=fe}r=N===-1||z===-1?null:{start:N,end:z}}else r=null}r=r||{start:0,end:0}}else r=null;for(Yn={focusedElem:e,selectionRange:r},os=!1,_e=t;_e!==null;)if(t=_e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_e=e;else for(;_e!==null;){t=_e;try{var pe=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(pe!==null){var ve=pe.memoizedProps,Fe=pe.memoizedState,K=t.stateNode,V=K.getSnapshotBeforeUpdate(t.elementType===t.type?ve:Tt(t.type,ve),Fe);K.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var q=t.stateNode.containerInfo;q.nodeType===1?q.textContent="":q.nodeType===9&&q.documentElement&&q.removeChild(q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(h(163))}}catch(ae){Ne(t,t.return,ae)}if(e=t.sibling,e!==null){e.return=t.return,_e=e;break}_e=t.return}return pe=zc,zc=!1,pe}function zi(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var c=i=i.next;do{if((c.tag&e)===e){var _=c.destroy;c.destroy=void 0,_!==void 0&&Ho(t,r,_)}c=c.next}while(c!==i)}}function zs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function Fo(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Uc(e){var t=e.alternate;t!==null&&(e.alternate=null,Uc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Nt],delete t[Ti],delete t[eo],delete t[ld],delete t[ad])),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 Wc(e){return e.tag===5||e.tag===3||e.tag===4}function $c(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wc(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 jo(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=gs));else if(i!==4&&(e=e.child,e!==null))for(jo(e,t,r),e=e.sibling;e!==null;)jo(e,t,r),e=e.sibling}function zo(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(zo(e,t,r),e=e.sibling;e!==null;)zo(e,t,r),e=e.sibling}var Ye=null,At=!1;function _r(e,t,r){for(r=r.child;r!==null;)Vc(e,t,r),r=r.sibling}function Vc(e,t,r){if(It&&typeof It.onCommitFiberUnmount=="function")try{It.onCommitFiberUnmount(es,r)}catch{}switch(r.tag){case 5:tt||ni(r,t);case 6:var i=Ye,c=At;Ye=null,_r(e,t,r),Ye=i,At=c,Ye!==null&&(At?(e=Ye,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ye.removeChild(r.stateNode));break;case 18:Ye!==null&&(At?(e=Ye,r=r.stateNode,e.nodeType===8?Zn(e.parentNode,r):e.nodeType===1&&Zn(e,r),Si(e)):Zn(Ye,r.stateNode));break;case 4:i=Ye,c=At,Ye=r.stateNode.containerInfo,At=!0,_r(e,t,r),Ye=i,At=c;break;case 0:case 11:case 14:case 15:if(!tt&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){c=i=i.next;do{var _=c,D=_.destroy;_=_.tag,D!==void 0&&((_&2)!==0||(_&4)!==0)&&Ho(r,t,D),c=c.next}while(c!==i)}_r(e,t,r);break;case 1:if(!tt&&(ni(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(N){Ne(r,t,N)}_r(e,t,r);break;case 21:_r(e,t,r);break;case 22:r.mode&1?(tt=(i=tt)||r.memoizedState!==null,_r(e,t,r),tt=i):_r(e,t,r);break;default:_r(e,t,r)}}function Kc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new kd),t.forEach(function(i){var c=Pd.bind(null,e,i);r.has(i)||(r.add(i),i.then(c,c))})}}function Bt(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var c=r[i];try{var _=e,D=t,N=D;e:for(;N!==null;){switch(N.tag){case 5:Ye=N.stateNode,At=!1;break e;case 3:Ye=N.stateNode.containerInfo,At=!0;break e;case 4:Ye=N.stateNode.containerInfo,At=!0;break e}N=N.return}if(Ye===null)throw Error(h(160));Vc(_,D,c),Ye=null,At=!1;var z=c.alternate;z!==null&&(z.return=null),c.return=null}catch(Y){Ne(c,t,Y)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)qc(t,e),t=t.sibling}function qc(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Bt(t,e),jt(e),i&4){try{zi(3,e,e.return),zs(3,e)}catch(ve){Ne(e,e.return,ve)}try{zi(5,e,e.return)}catch(ve){Ne(e,e.return,ve)}}break;case 1:Bt(t,e),jt(e),i&512&&r!==null&&ni(r,r.return);break;case 5:if(Bt(t,e),jt(e),i&512&&r!==null&&ni(r,r.return),e.flags&32){var c=e.stateNode;try{nt(c,"")}catch(ve){Ne(e,e.return,ve)}}if(i&4&&(c=e.stateNode,c!=null)){var _=e.memoizedProps,D=r!==null?r.memoizedProps:_,N=e.type,z=e.updateQueue;if(e.updateQueue=null,z!==null)try{N==="input"&&_.type==="radio"&&_.name!=null&&Ge(c,_),mn(N,D);var Y=mn(N,_);for(D=0;D<z.length;D+=2){var se=z[D],oe=z[D+1];se==="style"?Dl(c,oe):se==="dangerouslySetInnerHTML"?br(c,oe):se==="children"?nt(c,oe):n(c,se,oe,Y)}switch(N){case"input":ye(c,_);break;case"textarea":er(c,_);break;case"select":var ie=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!_.multiple;var fe=_.value;fe!=null?Mt(c,!!_.multiple,fe,!1):ie!==!!_.multiple&&(_.defaultValue!=null?Mt(c,!!_.multiple,_.defaultValue,!0):Mt(c,!!_.multiple,_.multiple?[]:"",!1))}c[Ti]=_}catch(ve){Ne(e,e.return,ve)}}break;case 6:if(Bt(t,e),jt(e),i&4){if(e.stateNode===null)throw Error(h(162));c=e.stateNode,_=e.memoizedProps;try{c.nodeValue=_}catch(ve){Ne(e,e.return,ve)}}break;case 3:if(Bt(t,e),jt(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Si(t.containerInfo)}catch(ve){Ne(e,e.return,ve)}break;case 4:Bt(t,e),jt(e);break;case 13:Bt(t,e),jt(e),c=e.child,c.flags&8192&&(_=c.memoizedState!==null,c.stateNode.isHidden=_,!_||c.alternate!==null&&c.alternate.memoizedState!==null||($o=He())),i&4&&Kc(e);break;case 22:if(se=r!==null&&r.memoizedState!==null,e.mode&1?(tt=(Y=tt)||se,Bt(t,e),tt=Y):Bt(t,e),jt(e),i&8192){if(Y=e.memoizedState!==null,(e.stateNode.isHidden=Y)&&!se&&(e.mode&1)!==0)for(_e=e,se=e.child;se!==null;){for(oe=_e=se;_e!==null;){switch(ie=_e,fe=ie.child,ie.tag){case 0:case 11:case 14:case 15:zi(4,ie,ie.return);break;case 1:ni(ie,ie.return);var pe=ie.stateNode;if(typeof pe.componentWillUnmount=="function"){i=ie,r=ie.return;try{t=i,pe.props=t.memoizedProps,pe.state=t.memoizedState,pe.componentWillUnmount()}catch(ve){Ne(i,r,ve)}}break;case 5:ni(ie,ie.return);break;case 22:if(ie.memoizedState!==null){Yc(oe);continue}}fe!==null?(fe.return=ie,_e=fe):Yc(oe)}se=se.sibling}e:for(se=null,oe=e;;){if(oe.tag===5){if(se===null){se=oe;try{c=oe.stateNode,Y?(_=c.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none"):(N=oe.stateNode,z=oe.memoizedProps.style,D=z!=null&&z.hasOwnProperty("display")?z.display:null,N.style.display=Yi("display",D))}catch(ve){Ne(e,e.return,ve)}}}else if(oe.tag===6){if(se===null)try{oe.stateNode.nodeValue=Y?"":oe.memoizedProps}catch(ve){Ne(e,e.return,ve)}}else if((oe.tag!==22&&oe.tag!==23||oe.memoizedState===null||oe===e)&&oe.child!==null){oe.child.return=oe,oe=oe.child;continue}if(oe===e)break e;for(;oe.sibling===null;){if(oe.return===null||oe.return===e)break e;se===oe&&(se=null),oe=oe.return}se===oe&&(se=null),oe.sibling.return=oe.return,oe=oe.sibling}}break;case 19:Bt(t,e),jt(e),i&4&&Kc(e);break;case 21:break;default:Bt(t,e),jt(e)}}function jt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Wc(r)){var i=r;break e}r=r.return}throw Error(h(160))}switch(i.tag){case 5:var c=i.stateNode;i.flags&32&&(nt(c,""),i.flags&=-33);var _=$c(e);zo(e,_,c);break;case 3:case 4:var D=i.stateNode.containerInfo,N=$c(e);jo(e,N,D);break;default:throw Error(h(161))}}catch(z){Ne(e,e.return,z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xd(e,t,r){_e=e,Xc(e)}function Xc(e,t,r){for(var i=(e.mode&1)!==0;_e!==null;){var c=_e,_=c.child;if(c.tag===22&&i){var D=c.memoizedState!==null||js;if(!D){var N=c.alternate,z=N!==null&&N.memoizedState!==null||tt;N=js;var Y=tt;if(js=D,(tt=z)&&!Y)for(_e=c;_e!==null;)D=_e,z=D.child,D.tag===22&&D.memoizedState!==null?Qc(c):z!==null?(z.return=D,_e=z):Qc(c);for(;_!==null;)_e=_,Xc(_),_=_.sibling;_e=c,js=N,tt=Y}Gc(e)}else(c.subtreeFlags&8772)!==0&&_!==null?(_.return=c,_e=_):Gc(e)}}function Gc(e){for(;_e!==null;){var t=_e;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:tt||zs(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!tt)if(r===null)i.componentDidMount();else{var c=t.elementType===t.type?r.memoizedProps:Tt(t.type,r.memoizedProps);i.componentDidUpdate(c,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var _=t.updateQueue;_!==null&&Ya(t,_,i);break;case 3:var D=t.updateQueue;if(D!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Ya(t,D,r)}break;case 5:var N=t.stateNode;if(r===null&&t.flags&4){r=N;var z=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&r.focus();break;case"img":z.src&&(r.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var Y=t.alternate;if(Y!==null){var se=Y.memoizedState;if(se!==null){var oe=se.dehydrated;oe!==null&&Si(oe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(h(163))}tt||t.flags&512&&Fo(t)}catch(ie){Ne(t,t.return,ie)}}if(t===e){_e=null;break}if(r=t.sibling,r!==null){r.return=t.return,_e=r;break}_e=t.return}}function Yc(e){for(;_e!==null;){var t=_e;if(t===e){_e=null;break}var r=t.sibling;if(r!==null){r.return=t.return,_e=r;break}_e=t.return}}function Qc(e){for(;_e!==null;){var t=_e;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{zs(4,t)}catch(z){Ne(t,r,z)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var c=t.return;try{i.componentDidMount()}catch(z){Ne(t,c,z)}}var _=t.return;try{Fo(t)}catch(z){Ne(t,_,z)}break;case 5:var D=t.return;try{Fo(t)}catch(z){Ne(t,D,z)}}}catch(z){Ne(t,t.return,z)}if(t===e){_e=null;break}var N=t.sibling;if(N!==null){N.return=t.return,_e=N;break}_e=t.return}}var Rd=Math.ceil,Us=p.ReactCurrentDispatcher,Uo=p.ReactCurrentOwner,Ct=p.ReactCurrentBatchConfig,be=0,qe=null,je=null,Qe=0,mt=0,oi=cr(0),We=0,Ui=null,Pr=0,Ws=0,Wo=0,Wi=null,ct=null,$o=0,li=1/0,Qt=null,$s=!1,Vo=null,pr=null,Vs=!1,vr=null,Ks=0,$i=0,Ko=null,qs=-1,Xs=0;function st(){return(be&6)!==0?He():qs!==-1?qs:qs=He()}function mr(e){return(e.mode&1)===0?1:(be&2)!==0&&Qe!==0?Qe&-Qe:hd.transition!==null?(Xs===0&&(Xs=$l()),Xs):(e=Re,e!==0||(e=window.event,e=e===void 0?16:Zl(e.type)),e)}function Ot(e,t,r,i){if(50<$i)throw $i=0,Ko=null,Error(h(185));_i(e,r,i),((be&2)===0||e!==qe)&&(e===qe&&((be&2)===0&&(Ws|=r),We===4&&gr(e,Qe)),ht(e,i),r===1&&be===0&&(t.mode&1)===0&&(li=He()+500,Cs&&ur()))}function ht(e,t){var r=e.callbackNode;hu(e,t);var i=is(e,e===qe?Qe:0);if(i===0)r!==null&&zl(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&zl(r),t===1)e.tag===0?cd(Zc.bind(null,e)):Ha(Zc.bind(null,e)),nd(function(){(be&6)===0&&ur()}),r=null;else{switch(Vl(i)){case 1:r=kn;break;case 4:r=Ul;break;case 16:r=Zi;break;case 536870912:r=Wl;break;default:r=Zi}r=lh(r,Jc.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Jc(e,t){if(qs=-1,Xs=0,(be&6)!==0)throw Error(h(327));var r=e.callbackNode;if(ai()&&e.callbackNode!==r)return null;var i=is(e,e===qe?Qe:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||t)t=Gs(e,i);else{t=i;var c=be;be|=2;var _=th();(qe!==e||Qe!==t)&&(Qt=null,li=He()+500,Ir(e,t));do try{Td();break}catch(N){eh(e,N)}while(!0);co(),Us.current=_,be=c,je!==null?t=0:(qe=null,Qe=0,t=We)}if(t!==0){if(t===2&&(c=bn(e),c!==0&&(i=c,t=qo(e,c))),t===1)throw r=Ui,Ir(e,0),gr(e,i),ht(e,He()),r;if(t===6)gr(e,i);else{if(c=e.current.alternate,(i&30)===0&&!Ld(c)&&(t=Gs(e,i),t===2&&(_=bn(e),_!==0&&(i=_,t=qo(e,_))),t===1))throw r=Ui,Ir(e,0),gr(e,i),ht(e,He()),r;switch(e.finishedWork=c,e.finishedLanes=i,t){case 0:case 1:throw Error(h(345));case 2:Nr(e,ct,Qt);break;case 3:if(gr(e,i),(i&130023424)===i&&(t=$o+500-He(),10<t)){if(is(e,0)!==0)break;if(c=e.suspendedLanes,(c&i)!==i){st(),e.pingedLanes|=e.suspendedLanes&c;break}e.timeoutHandle=Jn(Nr.bind(null,e,ct,Qt),t);break}Nr(e,ct,Qt);break;case 4:if(gr(e,i),(i&4194240)===i)break;for(t=e.eventTimes,c=-1;0<i;){var D=31-Rt(i);_=1<<D,D=t[D],D>c&&(c=D),i&=~_}if(i=c,i=He()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Rd(i/1960))-i,10<i){e.timeoutHandle=Jn(Nr.bind(null,e,ct,Qt),i);break}Nr(e,ct,Qt);break;case 5:Nr(e,ct,Qt);break;default:throw Error(h(329))}}}return ht(e,He()),e.callbackNode===r?Jc.bind(null,e):null}function qo(e,t){var r=Wi;return e.current.memoizedState.isDehydrated&&(Ir(e,t).flags|=256),e=Gs(e,t),e!==2&&(t=ct,ct=r,t!==null&&Xo(t)),e}function Xo(e){ct===null?ct=e:ct.push.apply(ct,e)}function Ld(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var i=0;i<r.length;i++){var c=r[i],_=c.getSnapshot;c=c.value;try{if(!Lt(_(),c))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 gr(e,t){for(t&=~Wo,t&=~Ws,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Rt(t),i=1<<r;e[r]=-1,t&=~i}}function Zc(e){if((be&6)!==0)throw Error(h(327));ai();var t=is(e,0);if((t&1)===0)return ht(e,He()),null;var r=Gs(e,t);if(e.tag!==0&&r===2){var i=bn(e);i!==0&&(t=i,r=qo(e,i))}if(r===1)throw r=Ui,Ir(e,0),gr(e,t),ht(e,He()),r;if(r===6)throw Error(h(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Nr(e,ct,Qt),ht(e,He()),null}function Go(e,t){var r=be;be|=1;try{return e(t)}finally{be=r,be===0&&(li=He()+500,Cs&&ur())}}function Mr(e){vr!==null&&vr.tag===0&&(be&6)===0&&ai();var t=be;be|=1;var r=Ct.transition,i=Re;try{if(Ct.transition=null,Re=1,e)return e()}finally{Re=i,Ct.transition=r,be=t,(be&6)===0&&ur()}}function Yo(){mt=oi.current,Oe(oi)}function Ir(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,sd(r)),je!==null)for(r=je.return;r!==null;){var i=r;switch(so(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&ys();break;case 3:ii(),Oe(ot),Oe(Je),go();break;case 5:vo(i);break;case 4:ii();break;case 13:Oe(Me);break;case 19:Oe(Me);break;case 10:ho(i.type._context);break;case 22:case 23:Yo()}r=r.return}if(qe=e,je=e=Sr(e.current,null),Qe=mt=t,We=0,Ui=null,Wo=Ws=Pr=0,ct=Wi=null,Ar!==null){for(t=0;t<Ar.length;t++)if(r=Ar[t],i=r.interleaved,i!==null){r.interleaved=null;var c=i.next,_=r.pending;if(_!==null){var D=_.next;_.next=c,i.next=D}r.pending=i}Ar=null}return e}function eh(e,t){do{var r=je;try{if(co(),Bs.current=Is,Os){for(var i=Ie.memoizedState;i!==null;){var c=i.queue;c!==null&&(c.pending=null),i=i.next}Os=!1}if(Or=0,Ke=Ue=Ie=null,Ii=!1,Ni=0,Uo.current=null,r===null||r.return===null){We=1,Ui=t,je=null;break}e:{var _=e,D=r.return,N=r,z=t;if(t=Qe,N.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var Y=z,se=N,oe=se.tag;if((se.mode&1)===0&&(oe===0||oe===11||oe===15)){var ie=se.alternate;ie?(se.updateQueue=ie.updateQueue,se.memoizedState=ie.memoizedState,se.lanes=ie.lanes):(se.updateQueue=null,se.memoizedState=null)}var fe=bc(D);if(fe!==null){fe.flags&=-257,xc(fe,D,N,_,t),fe.mode&1&&kc(_,Y,t),t=fe,z=Y;var pe=t.updateQueue;if(pe===null){var ve=new Set;ve.add(z),t.updateQueue=ve}else pe.add(z);break e}else{if((t&1)===0){kc(_,Y,t),Qo();break e}z=Error(h(426))}}else if(Pe&&N.mode&1){var Fe=bc(D);if(Fe!==null){(Fe.flags&65536)===0&&(Fe.flags|=256),xc(Fe,D,N,_,t),lo(si(z,N));break e}}_=z=si(z,N),We!==4&&(We=2),Wi===null?Wi=[_]:Wi.push(_),_=D;do{switch(_.tag){case 3:_.flags|=65536,t&=-t,_.lanes|=t;var K=Cc(_,z,t);Ga(_,K);break e;case 1:N=z;var V=_.type,q=_.stateNode;if((_.flags&128)===0&&(typeof V.getDerivedStateFromError=="function"||q!==null&&typeof q.componentDidCatch=="function"&&(pr===null||!pr.has(q)))){_.flags|=65536,t&=-t,_.lanes|=t;var ae=Ec(_,N,t);Ga(_,ae);break e}}_=_.return}while(_!==null)}ih(r)}catch(me){t=me,je===r&&r!==null&&(je=r=r.return);continue}break}while(!0)}function th(){var e=Us.current;return Us.current=Is,e===null?Is:e}function Qo(){(We===0||We===3||We===2)&&(We=4),qe===null||(Pr&268435455)===0&&(Ws&268435455)===0||gr(qe,Qe)}function Gs(e,t){var r=be;be|=2;var i=th();(qe!==e||Qe!==t)&&(Qt=null,Ir(e,t));do try{Dd();break}catch(c){eh(e,c)}while(!0);if(co(),be=r,Us.current=i,je!==null)throw Error(h(261));return qe=null,Qe=0,We}function Dd(){for(;je!==null;)rh(je)}function Td(){for(;je!==null&&!tu();)rh(je)}function rh(e){var t=oh(e.alternate,e,mt);e.memoizedProps=e.pendingProps,t===null?ih(e):je=t,Uo.current=null}function ih(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=Cd(r,t,mt),r!==null){je=r;return}}else{if(r=Ed(r,t),r!==null){r.flags&=32767,je=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{We=6,je=null;return}}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);We===0&&(We=5)}function Nr(e,t,r){var i=Re,c=Ct.transition;try{Ct.transition=null,Re=1,Ad(e,t,r,i)}finally{Ct.transition=c,Re=i}return null}function Ad(e,t,r,i){do ai();while(vr!==null);if((be&6)!==0)throw Error(h(327));r=e.finishedWork;var c=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(h(177));e.callbackNode=null,e.callbackPriority=0;var _=r.lanes|r.childLanes;if(uu(e,_),e===qe&&(je=qe=null,Qe=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Vs||(Vs=!0,lh(Zi,function(){return ai(),null})),_=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||_){_=Ct.transition,Ct.transition=null;var D=Re;Re=1;var N=be;be|=4,Uo.current=null,bd(e,r),qc(r,e),Qu(Yn),os=!!Gn,Yn=Gn=null,e.current=r,xd(r),ru(),be=N,Re=D,Ct.transition=_}else e.current=r;if(Vs&&(Vs=!1,vr=e,Ks=c),_=e.pendingLanes,_===0&&(pr=null),nu(r.stateNode),ht(e,He()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)c=t[r],i(c.value,{componentStack:c.stack,digest:c.digest});if($s)throw $s=!1,e=Vo,Vo=null,e;return(Ks&1)!==0&&e.tag!==0&&ai(),_=e.pendingLanes,(_&1)!==0?e===Ko?$i++:($i=0,Ko=e):$i=0,ur(),null}function ai(){if(vr!==null){var e=Vl(Ks),t=Ct.transition,r=Re;try{if(Ct.transition=null,Re=16>e?16:e,vr===null)var i=!1;else{if(e=vr,vr=null,Ks=0,(be&6)!==0)throw Error(h(331));var c=be;for(be|=4,_e=e.current;_e!==null;){var _=_e,D=_.child;if((_e.flags&16)!==0){var N=_.deletions;if(N!==null){for(var z=0;z<N.length;z++){var Y=N[z];for(_e=Y;_e!==null;){var se=_e;switch(se.tag){case 0:case 11:case 15:zi(8,se,_)}var oe=se.child;if(oe!==null)oe.return=se,_e=oe;else for(;_e!==null;){se=_e;var ie=se.sibling,fe=se.return;if(Uc(se),se===Y){_e=null;break}if(ie!==null){ie.return=fe,_e=ie;break}_e=fe}}}var pe=_.alternate;if(pe!==null){var ve=pe.child;if(ve!==null){pe.child=null;do{var Fe=ve.sibling;ve.sibling=null,ve=Fe}while(ve!==null)}}_e=_}}if((_.subtreeFlags&2064)!==0&&D!==null)D.return=_,_e=D;else e:for(;_e!==null;){if(_=_e,(_.flags&2048)!==0)switch(_.tag){case 0:case 11:case 15:zi(9,_,_.return)}var K=_.sibling;if(K!==null){K.return=_.return,_e=K;break e}_e=_.return}}var V=e.current;for(_e=V;_e!==null;){D=_e;var q=D.child;if((D.subtreeFlags&2064)!==0&&q!==null)q.return=D,_e=q;else e:for(D=V;_e!==null;){if(N=_e,(N.flags&2048)!==0)try{switch(N.tag){case 0:case 11:case 15:zs(9,N)}}catch(me){Ne(N,N.return,me)}if(N===D){_e=null;break e}var ae=N.sibling;if(ae!==null){ae.return=N.return,_e=ae;break e}_e=N.return}}if(be=c,ur(),It&&typeof It.onPostCommitFiberRoot=="function")try{It.onPostCommitFiberRoot(es,e)}catch{}i=!0}return i}finally{Re=r,Ct.transition=t}}return!1}function sh(e,t,r){t=si(r,t),t=Cc(e,t,1),e=fr(e,t,1),t=st(),e!==null&&(_i(e,1,t),ht(e,t))}function Ne(e,t,r){if(e.tag===3)sh(e,e,r);else for(;t!==null;){if(t.tag===3){sh(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(pr===null||!pr.has(i))){e=si(r,e),e=Ec(t,e,1),t=fr(t,e,1),e=st(),t!==null&&(_i(t,1,e),ht(t,e));break}}t=t.return}}function Bd(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=st(),e.pingedLanes|=e.suspendedLanes&r,qe===e&&(Qe&r)===r&&(We===4||We===3&&(Qe&130023424)===Qe&&500>He()-$o?Ir(e,0):Wo|=r),ht(e,t)}function nh(e,t){t===0&&((e.mode&1)===0?t=1:(t=rs,rs<<=1,(rs&130023424)===0&&(rs=4194304)));var r=st();e=Xt(e,t),e!==null&&(_i(e,t,r),ht(e,r))}function Od(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),nh(e,r)}function Pd(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(r=c.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(h(314))}i!==null&&i.delete(t),nh(e,r)}var oh;oh=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ot.current)at=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return at=!1,wd(e,t,r);at=(e.flags&131072)!==0}else at=!1,Pe&&(t.flags&1048576)!==0&&Fa(t,ks,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Fs(e,t),e=t.pendingProps;var c=Yr(t,Je.current);ri(t,r),c=wo(null,t,i,e,c,r);var _=Co();return t.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,lt(i)?(_=!0,ws(t)):_=!1,t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,_o(t),c.updater=Ns,t.stateNode=c,c._reactInternals=t,Lo(t,i,e,r),t=Bo(null,t,i,!0,_,r)):(t.tag=0,Pe&&_&&io(t),it(null,t,c,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Fs(e,t),e=t.pendingProps,c=i._init,i=c(i._payload),t.type=i,c=t.tag=Id(i),e=Tt(i,e),c){case 0:t=Ao(null,t,i,e,r);break e;case 1:t=Bc(null,t,i,e,r);break e;case 11:t=Rc(null,t,i,e,r);break e;case 14:t=Lc(null,t,i,Tt(i.type,e),r);break e}throw Error(h(306,i,""))}return t;case 0:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:Tt(i,c),Ao(e,t,i,c,r);case 1:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:Tt(i,c),Bc(e,t,i,c,r);case 3:e:{if(Oc(t),e===null)throw Error(h(387));i=t.pendingProps,_=t.memoizedState,c=_.element,Xa(e,t),Ts(t,i,null,r);var D=t.memoizedState;if(i=D.element,_.isDehydrated)if(_={element:i,isDehydrated:!1,cache:D.cache,pendingSuspenseBoundaries:D.pendingSuspenseBoundaries,transitions:D.transitions},t.updateQueue.baseState=_,t.memoizedState=_,t.flags&256){c=si(Error(h(423)),t),t=Pc(e,t,i,r,c);break e}else if(i!==c){c=si(Error(h(424)),t),t=Pc(e,t,i,r,c);break e}else for(vt=ar(t.stateNode.containerInfo.firstChild),pt=t,Pe=!0,Dt=null,r=Ka(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Zr(),i===c){t=Yt(e,t,r);break e}it(e,t,i,r)}t=t.child}return t;case 5:return Qa(t),e===null&&oo(t),i=t.type,c=t.pendingProps,_=e!==null?e.memoizedProps:null,D=c.children,Qn(i,c)?D=null:_!==null&&Qn(i,_)&&(t.flags|=32),Ac(e,t),it(e,t,D,r),t.child;case 6:return e===null&&oo(t),null;case 13:return Mc(e,t,r);case 4:return po(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=ei(t,null,i,r):it(e,t,i,r),t.child;case 11:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:Tt(i,c),Rc(e,t,i,c,r);case 7:return it(e,t,t.pendingProps,r),t.child;case 8:return it(e,t,t.pendingProps.children,r),t.child;case 12:return it(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,c=t.pendingProps,_=t.memoizedProps,D=c.value,De(Rs,i._currentValue),i._currentValue=D,_!==null)if(Lt(_.value,D)){if(_.children===c.children&&!ot.current){t=Yt(e,t,r);break e}}else for(_=t.child,_!==null&&(_.return=t);_!==null;){var N=_.dependencies;if(N!==null){D=_.child;for(var z=N.firstContext;z!==null;){if(z.context===i){if(_.tag===1){z=Gt(-1,r&-r),z.tag=2;var Y=_.updateQueue;if(Y!==null){Y=Y.shared;var se=Y.pending;se===null?z.next=z:(z.next=se.next,se.next=z),Y.pending=z}}_.lanes|=r,z=_.alternate,z!==null&&(z.lanes|=r),uo(_.return,r,t),N.lanes|=r;break}z=z.next}}else if(_.tag===10)D=_.type===t.type?null:_.child;else if(_.tag===18){if(D=_.return,D===null)throw Error(h(341));D.lanes|=r,N=D.alternate,N!==null&&(N.lanes|=r),uo(D,r,t),D=_.sibling}else D=_.child;if(D!==null)D.return=_;else for(D=_;D!==null;){if(D===t){D=null;break}if(_=D.sibling,_!==null){_.return=D.return,D=_;break}D=D.return}_=D}it(e,t,c.children,r),t=t.child}return t;case 9:return c=t.type,i=t.pendingProps.children,ri(t,r),c=yt(c),i=i(c),t.flags|=1,it(e,t,i,r),t.child;case 14:return i=t.type,c=Tt(i,t.pendingProps),c=Tt(i.type,c),Lc(e,t,i,c,r);case 15:return Dc(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:Tt(i,c),Fs(e,t),t.tag=1,lt(i)?(e=!0,ws(t)):e=!1,ri(t,r),yc(t,i,c),Lo(t,i,c,r),Bo(null,t,i,!0,e,r);case 19:return Nc(e,t,r);case 22:return Tc(e,t,r)}throw Error(h(156,t.tag))};function lh(e,t){return jl(e,t)}function Md(e,t,r,i){this.tag=e,this.key=r,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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Et(e,t,r,i){return new Md(e,t,r,i)}function Jo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Id(e){if(typeof e=="function")return Jo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===$)return 11;if(e===te)return 14}return 2}function Sr(e,t){var r=e.alternate;return r===null?(r=Et(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ys(e,t,r,i,c,_){var D=2;if(i=e,typeof e=="function")Jo(e)&&(D=1);else if(typeof e=="string")D=5;else e:switch(e){case R:return Hr(r.children,c,_,t);case S:D=8,c|=8;break;case A:return e=Et(12,r,t,c|2),e.elementType=A,e.lanes=_,e;case I:return e=Et(13,r,t,c),e.elementType=I,e.lanes=_,e;case Q:return e=Et(19,r,t,c),e.elementType=Q,e.lanes=_,e;case le:return Qs(r,c,_,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case H:D=10;break e;case j:D=9;break e;case $:D=11;break e;case te:D=14;break e;case ne:D=16,i=null;break e}throw Error(h(130,e==null?e:typeof e,""))}return t=Et(D,r,t,c),t.elementType=e,t.type=i,t.lanes=_,t}function Hr(e,t,r,i){return e=Et(7,e,i,t),e.lanes=r,e}function Qs(e,t,r,i){return e=Et(22,e,i,t),e.elementType=le,e.lanes=r,e.stateNode={isHidden:!1},e}function Zo(e,t,r){return e=Et(6,e,null,t),e.lanes=r,e}function el(e,t,r){return t=Et(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Nd(e,t,r,i,c){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=xn(0),this.expirationTimes=xn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xn(0),this.identifierPrefix=i,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function tl(e,t,r,i,c,_,D,N,z){return e=new Nd(e,t,r,N,z),t===1?(t=1,_===!0&&(t|=8)):t=0,_=Et(3,null,null,t),e.current=_,_.stateNode=e,_.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},_o(_),e}function Hd(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:k,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function ah(e){if(!e)return hr;e=e._reactInternals;e:{if(xr(e)!==e||e.tag!==1)throw Error(h(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(lt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(h(171))}if(e.tag===1){var r=e.type;if(lt(r))return Ia(e,r,t)}return t}function ch(e,t,r,i,c,_,D,N,z){return e=tl(r,i,!0,e,c,_,D,N,z),e.context=ah(null),r=e.current,i=st(),c=mr(r),_=Gt(i,c),_.callback=t??null,fr(r,_,c),e.current.lanes=c,_i(e,c,i),ht(e,i),e}function Js(e,t,r,i){var c=t.current,_=st(),D=mr(c);return r=ah(r),t.context===null?t.context=r:t.pendingContext=r,t=Gt(_,D),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=fr(c,t,D),e!==null&&(Ot(e,c,D,_),Ds(e,c,D)),D}function Zs(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 hh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function rl(e,t){hh(e,t),(e=e.alternate)&&hh(e,t)}function Fd(){return null}var uh=typeof reportError=="function"?reportError:function(e){console.error(e)};function il(e){this._internalRoot=e}en.prototype.render=il.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(h(409));Js(e,t,null,null)},en.prototype.unmount=il.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Mr(function(){Js(null,e,null,null)}),t[$t]=null}};function en(e){this._internalRoot=e}en.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xl();e={blockedOn:null,target:e,priority:t};for(var r=0;r<nr.length&&t!==0&&t<nr[r].priority;r++);nr.splice(r,0,e),r===0&&Ql(e)}};function sl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function tn(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function dh(){}function jd(e,t,r,i,c){if(c){if(typeof i=="function"){var _=i;i=function(){var Y=Zs(D);_.call(Y)}}var D=ch(t,i,e,0,null,!1,!1,"",dh);return e._reactRootContainer=D,e[$t]=D.current,Li(e.nodeType===8?e.parentNode:e),Mr(),D}for(;c=e.lastChild;)e.removeChild(c);if(typeof i=="function"){var N=i;i=function(){var Y=Zs(z);N.call(Y)}}var z=tl(e,0,!1,null,null,!1,!1,"",dh);return e._reactRootContainer=z,e[$t]=z.current,Li(e.nodeType===8?e.parentNode:e),Mr(function(){Js(t,z,r,i)}),z}function rn(e,t,r,i,c){var _=r._reactRootContainer;if(_){var D=_;if(typeof c=="function"){var N=c;c=function(){var z=Zs(D);N.call(z)}}Js(t,D,e,c)}else D=jd(r,t,e,c,i);return Zs(D)}Kl=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=fi(t.pendingLanes);r!==0&&(Rn(t,r|1),ht(t,He()),(be&6)===0&&(li=He()+500,ur()))}break;case 13:Mr(function(){var i=Xt(e,1);if(i!==null){var c=st();Ot(i,e,1,c)}}),rl(e,1)}},Ln=function(e){if(e.tag===13){var t=Xt(e,134217728);if(t!==null){var r=st();Ot(t,e,134217728,r)}rl(e,134217728)}},ql=function(e){if(e.tag===13){var t=mr(e),r=Xt(e,t);if(r!==null){var i=st();Ot(r,e,t,i)}rl(e,t)}},Xl=function(){return Re},Gl=function(e,t){var r=Re;try{return Re=e,t()}finally{Re=r}},yn=function(e,t,r){switch(t){case"input":if(ye(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var c=Ss(i);if(!c)throw Error(h(90));ue(i),ye(i,c)}}}break;case"textarea":er(e,r);break;case"select":t=r.value,t!=null&&Mt(e,!!r.multiple,t,!1)}},Ol=Go,Pl=Mr;var zd={usingClientEntryPoint:!1,Events:[Ai,Xr,Ss,Al,Bl,Go]},Vi={findFiberByHostInstance:Rr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ud={bundleType:Vi.bundleType,version:Vi.version,rendererPackageName:Vi.rendererPackageName,rendererConfig:Vi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:p.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Hl(e),e===null?null:e.stateNode},findFiberByHostInstance:Vi.findFiberByHostInstance||Fd,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 sn=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sn.isDisabled&&sn.supportsFiber)try{es=sn.inject(Ud),It=sn}catch{}}return ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zd,ut.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!sl(t))throw Error(h(200));return Hd(e,t,null,r)},ut.createRoot=function(e,t){if(!sl(e))throw Error(h(299));var r=!1,i="",c=uh;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=tl(e,1,!1,null,null,r,!1,i,c),e[$t]=t.current,Li(e.nodeType===8?e.parentNode:e),new il(t)},ut.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(h(188)):(e=Object.keys(e).join(","),Error(h(268,e)));return e=Hl(t),e=e===null?null:e.stateNode,e},ut.flushSync=function(e){return Mr(e)},ut.hydrate=function(e,t,r){if(!tn(t))throw Error(h(200));return rn(null,e,t,!0,r)},ut.hydrateRoot=function(e,t,r){if(!sl(e))throw Error(h(405));var i=r!=null&&r.hydratedSources||null,c=!1,_="",D=uh;if(r!=null&&(r.unstable_strictMode===!0&&(c=!0),r.identifierPrefix!==void 0&&(_=r.identifierPrefix),r.onRecoverableError!==void 0&&(D=r.onRecoverableError)),t=ch(t,null,e,1,r??null,c,!1,_,D),e[$t]=t.current,Li(e),i)for(e=0;e<i.length;e++)r=i[e],c=r._getVersion,c=c(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,c]:t.mutableSourceEagerHydrationData.push(r,c);return new en(t)},ut.render=function(e,t,r){if(!tn(t))throw Error(h(200));return rn(null,e,t,!1,r)},ut.unmountComponentAtNode=function(e){if(!tn(e))throw Error(h(40));return e._reactRootContainer?(Mr(function(){rn(null,null,e,!1,function(){e._reactRootContainer=null,e[$t]=null})}),!0):!1},ut.unstable_batchedUpdates=Go,ut.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!tn(r))throw Error(h(200));if(e==null||e._reactInternals===void 0)throw Error(h(38));return rn(e,t,r,!1,i)},ut.version="18.3.1-next-f1338f8080-20240426",ut}var yh;function Yd(){if(yh)return ll.exports;yh=1;function y(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(y)}catch(d){console.error(d)}}return y(),ll.exports=Gd(),ll.exports}var wh;function Qd(){if(wh)return nn;wh=1;var y=Yd();return nn.createRoot=y.createRoot,nn.hydrateRoot=y.hydrateRoot,nn}var Jd=Qd();const Zd=Bh(Jd),Ch=y=>{let d;const h=new Set,E=(v,w)=>{const f=typeof v=="function"?v(d):v;if(!Object.is(f,d)){const g=d;d=w??(typeof f!="object"||f===null)?f:Object.assign({},d,f),h.forEach(C=>C(d,g))}},M=()=>d,l={setState:E,getState:M,getInitialState:()=>u,subscribe:v=>(h.add(v),()=>h.delete(v))},u=d=y(E,M,l);return l},ef=(y=>y?Ch(y):Ch),tf=y=>y;function rf(y,d=tf){const h=Xi.useSyncExternalStore(y.subscribe,Xi.useCallback(()=>d(y.getState()),[y,d]),Xi.useCallback(()=>d(y.getInitialState()),[y,d]));return Xi.useDebugValue(h),h}const Eh=y=>{const d=ef(y),h=E=>rf(d,E);return Object.assign(h,d),h},sf=(y=>y?Eh(y):Eh),wr=["branch","worktree","running"],pl=10,an=1,nf=3,of="hjWorktree CLI",lf="2.4.0",kh={step:"branch",completedSteps:[],projectInfo:null,branches:[],selectedBranch:null,worktreeCount:nf,terminals:[],activeTerminalIndex:0,activeSessionId:null,selectedSessionIds:[],isSetupCollapsed:!1,collapsedBranches:[],modalType:null,modalData:null,isLoading:!1,loadingMessage:"",error:null},Ve=sf((y,d)=>({...kh,setStep:h=>y({step:h}),goToStep:h=>{const{canNavigateTo:E,step:M,isStepComplete:U,completedSteps:F}=d();if(!E(h))return;const l=[...F];U(M)&&!l.includes(M)&&l.push(M),y({step:h,completedSteps:l})},goToNext:()=>{const{step:h,isStepComplete:E,completedSteps:M}=d(),U=wr.indexOf(h);if(U<wr.length-1&&E(h)){const F=[...M];F.includes(h)||F.push(h),y({step:wr[U+1],completedSteps:F})}},goToPrev:()=>{const{step:h}=d(),E=wr.indexOf(h);E>0&&y({step:wr[E-1]})},canNavigateTo:h=>{const{step:E,completedSteps:M,isStepComplete:U}=d(),F=wr.indexOf(E),l=wr.indexOf(h);if(l===F||l<F)return!0;for(let u=0;u<l;u++){const v=wr[u];if(!M.includes(v)&&!U(v))return!1}return!0},isStepComplete:h=>{const{selectedBranch:E,worktreeCount:M,terminals:U}=d();switch(h){case"branch":return E!==null;case"worktree":return M>=an;case"running":return U.length>0;default:return!1}},getStepStatus:h=>{const{step:E,completedSteps:M,isStepComplete:U}=d();return h===E?"current":M.includes(h)||U(h)?"completed":"pending"},setProjectInfo:h=>y({projectInfo:h}),fetchProjectInfo:async()=>{try{const h=await fetch("/api/info");if(!h.ok)throw new Error("Failed to fetch project info");const E=await h.json();y({projectInfo:E})}catch(h){y({error:h instanceof Error?h.message:"Unknown error"})}},setBranches:h=>y({branches:h}),setSelectedBranch:h=>y({selectedBranch:h}),fetchBranches:async()=>{try{const h=await fetch("/api/branches");if(!h.ok)throw new Error("Failed to fetch branches");const E=await h.json();if(y({branches:E}),!d().selectedBranch&&E.length>0){const U=E.find(F=>F.isCurrent);y({selectedBranch:(U==null?void 0:U.name)||E[0].name})}}catch(h){y({error:h instanceof Error?h.message:"Unknown error"})}},setWorktreeCount:h=>y({worktreeCount:Math.max(an,Math.min(pl,h))}),incrementWorktreeCount:()=>{const{worktreeCount:h}=d();h<pl&&y({worktreeCount:h+1})},decrementWorktreeCount:()=>{const{worktreeCount:h}=d();h>an&&y({worktreeCount:h-1})},addTerminal:h=>y(E=>E.terminals.some(M=>M.sessionId===h.sessionId)?E:{terminals:[...E.terminals,h]}),updateTerminalStatus:(h,E)=>y(M=>({terminals:M.terminals.map(U=>U.sessionId===h?{...U,status:E}:U)})),removeTerminal:h=>y(E=>{const M=E.terminals.filter(F=>F.sessionId!==h),U=Math.min(E.activeTerminalIndex,Math.max(0,M.length-1));return{terminals:M,activeTerminalIndex:U,step:M.length===0?"branch":E.step,completedSteps:M.length===0?[]:E.completedSteps}}),setActiveTerminal:h=>y({activeTerminalIndex:h}),clearAllTerminals:()=>y({terminals:[],activeTerminalIndex:0,activeSessionId:null,selectedSessionIds:[]}),setActiveSession:h=>{const{terminals:E}=d(),M=E.findIndex(U=>U.sessionId===h);y({activeSessionId:h,activeTerminalIndex:M>=0?M:0})},toggleSessionSelection:h=>y(E=>{const M=[...E.selectedSessionIds],U=M.indexOf(h);return U>=0?M.splice(U,1):M.push(h),{selectedSessionIds:M}}),selectAllSessions:()=>y(h=>({selectedSessionIds:h.terminals.map(E=>E.sessionId)})),clearSessionSelection:()=>y({selectedSessionIds:[]}),removeSelectedSessions:async()=>{const{selectedSessionIds:h,terminals:E}=d();if(h.length===0)return;const M=E.filter(U=>h.includes(U.sessionId)).map(U=>U.worktreeName);try{(await fetch("/api/worktrees/batch",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({names:M})})).ok&&y(F=>{const l=F.terminals.filter(u=>!h.includes(u.sessionId));return{terminals:l,selectedSessionIds:[],activeTerminalIndex:Math.min(F.activeTerminalIndex,Math.max(0,l.length-1)),activeSessionId:l.length>0?l[0].sessionId:null}})}catch(U){console.error("Failed to remove sessions:",U)}},getSessionGroups:()=>{const{terminals:h,collapsedBranches:E}=d(),M=new Map;for(const F of h){const l=F.branchName.replace(/-project-\d+$/,"");M.has(l)||M.set(l,[]),M.get(l).push(F)}const U=[];for(const[F,l]of M)U.push({branchName:F,sessions:l.map(u=>({...u,id:u.sessionId,createdAt:Date.now()})),isCollapsed:E.includes(F)});return U.sort((F,l)=>F.branchName.localeCompare(l.branchName))},toggleSetupCollapse:()=>y(h=>({isSetupCollapsed:!h.isSetupCollapsed})),toggleBranchCollapse:h=>y(E=>{const M=[...E.collapsedBranches],U=M.indexOf(h);return U>=0?M.splice(U,1):M.push(h),{collapsedBranches:M}}),openModal:(h,E)=>y({modalType:h,modalData:E||null}),closeModal:()=>y({modalType:null,modalData:null}),createSingleWorktree:async h=>{const{setLoading:E,setError:M,addTerminal:U,setActiveSession:F}=d();E(!0,"Creating worktree..."),M(null);try{const l=await fetch("/api/worktrees/single",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({branch:h})});if(!l.ok){const w=await l.json();throw new Error(w.error||"Failed to create worktree")}const{worktree:u}=await l.json(),v=u.name;U({sessionId:v,worktreePath:u.path,worktreeName:u.name,branchName:u.branch,status:"initializing"}),F(v),y({step:"running",isSetupCollapsed:!0,modalType:null,modalData:null})}catch(l){M(l instanceof Error?l.message:"Unknown error")}finally{E(!1)}},restoreExistingWorktrees:async()=>{const{terminals:h}=d();if(!(h.length>0))try{const E=await fetch("/api/worktrees");if(!E.ok)return;const U=(await E.json()).filter(l=>!l.isMainWorktree&&l.name.includes("-project-"));if(U.length===0)return;const{addTerminal:F}=d();for(const l of U)F({sessionId:l.name,worktreePath:l.path,worktreeName:l.name,branchName:l.branch,status:"running"});y({step:"running",completedSteps:["branch","worktree"],isSetupCollapsed:!0,activeSessionId:U[0].name}),console.log(`Restored ${U.length} worktree sessions`)}catch(E){console.error("Failed to restore worktrees:",E)}},execute:async()=>{const{selectedBranch:h,worktreeCount:E,setLoading:M,setError:U,addTerminal:F}=d();if(!h){U("Please select a branch");return}M(!0,"Creating worktrees..."),U(null);try{const l=await fetch("/api/worktrees",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({branch:h,count:E})});if(!l.ok){const w=await l.json();throw new Error(w.error||"Failed to create worktrees")}const{worktrees:u}=await l.json();for(const w of u){const f=w.name;F({sessionId:f,worktreePath:w.path,worktreeName:w.name,branchName:w.branch,status:"initializing"})}const{terminals:v}=d();y({step:"running",completedSteps:["branch","worktree"],isSetupCollapsed:!0,activeSessionId:v.length>0?v[0].sessionId:null})}catch(l){U(l instanceof Error?l.message:"Unknown error")}finally{M(!1)}},setLoading:(h,E="")=>y({isLoading:h,loadingMessage:E}),setError:h=>y({error:h}),reset:()=>y(kh)})),Ut=Object.create(null);Ut.open="0";Ut.close="1";Ut.ping="2";Ut.pong="3";Ut.message="4";Ut.upgrade="5";Ut.noop="6";const cn=Object.create(null);Object.keys(Ut).forEach(y=>{cn[Ut[y]]=y});const vl={type:"error",data:"parser error"},Oh=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ph=typeof ArrayBuffer=="function",Mh=y=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(y):y&&y.buffer instanceof ArrayBuffer,El=({type:y,data:d},h,E)=>Oh&&d instanceof Blob?h?E(d):bh(d,E):Ph&&(d instanceof ArrayBuffer||Mh(d))?h?E(d):bh(new Blob([d]),E):E(Ut[y]+(d||"")),bh=(y,d)=>{const h=new FileReader;return h.onload=function(){const E=h.result.split(",")[1];d("b"+(E||""))},h.readAsDataURL(y)};function xh(y){return y instanceof Uint8Array?y:y instanceof ArrayBuffer?new Uint8Array(y):new Uint8Array(y.buffer,y.byteOffset,y.byteLength)}let hl;function af(y,d){if(Oh&&y.data instanceof Blob)return y.data.arrayBuffer().then(xh).then(d);if(Ph&&(y.data instanceof ArrayBuffer||Mh(y.data)))return d(xh(y.data));El(y,!1,h=>{hl||(hl=new TextEncoder),d(hl.encode(h))})}const Rh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Gi=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let y=0;y<Rh.length;y++)Gi[Rh.charCodeAt(y)]=y;const cf=y=>{let d=y.length*.75,h=y.length,E,M=0,U,F,l,u;y[y.length-1]==="="&&(d--,y[y.length-2]==="="&&d--);const v=new ArrayBuffer(d),w=new Uint8Array(v);for(E=0;E<h;E+=4)U=Gi[y.charCodeAt(E)],F=Gi[y.charCodeAt(E+1)],l=Gi[y.charCodeAt(E+2)],u=Gi[y.charCodeAt(E+3)],w[M++]=U<<2|F>>4,w[M++]=(F&15)<<4|l>>2,w[M++]=(l&3)<<6|u&63;return v},hf=typeof ArrayBuffer=="function",kl=(y,d)=>{if(typeof y!="string")return{type:"message",data:Ih(y,d)};const h=y.charAt(0);return h==="b"?{type:"message",data:uf(y.substring(1),d)}:cn[h]?y.length>1?{type:cn[h],data:y.substring(1)}:{type:cn[h]}:vl},uf=(y,d)=>{if(hf){const h=cf(y);return Ih(h,d)}else return{base64:!0,data:y}},Ih=(y,d)=>{switch(d){case"blob":return y instanceof Blob?y:new Blob([y]);case"arraybuffer":default:return y instanceof ArrayBuffer?y:y.buffer}},Nh="",df=(y,d)=>{const h=y.length,E=new Array(h);let M=0;y.forEach((U,F)=>{El(U,!1,l=>{E[F]=l,++M===h&&d(E.join(Nh))})})},ff=(y,d)=>{const h=y.split(Nh),E=[];for(let M=0;M<h.length;M++){const U=kl(h[M],d);if(E.push(U),U.type==="error")break}return E};function _f(){return new TransformStream({transform(y,d){af(y,h=>{const E=h.length;let M;if(E<126)M=new Uint8Array(1),new DataView(M.buffer).setUint8(0,E);else if(E<65536){M=new Uint8Array(3);const U=new DataView(M.buffer);U.setUint8(0,126),U.setUint16(1,E)}else{M=new Uint8Array(9);const U=new DataView(M.buffer);U.setUint8(0,127),U.setBigUint64(1,BigInt(E))}y.data&&typeof y.data!="string"&&(M[0]|=128),d.enqueue(M),d.enqueue(h)})}})}let ul;function on(y){return y.reduce((d,h)=>d+h.length,0)}function ln(y,d){if(y[0].length===d)return y.shift();const h=new Uint8Array(d);let E=0;for(let M=0;M<d;M++)h[M]=y[0][E++],E===y[0].length&&(y.shift(),E=0);return y.length&&E<y[0].length&&(y[0]=y[0].slice(E)),h}function pf(y,d){ul||(ul=new TextDecoder);const h=[];let E=0,M=-1,U=!1;return new TransformStream({transform(F,l){for(h.push(F);;){if(E===0){if(on(h)<1)break;const u=ln(h,1);U=(u[0]&128)===128,M=u[0]&127,M<126?E=3:M===126?E=1:E=2}else if(E===1){if(on(h)<2)break;const u=ln(h,2);M=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),E=3}else if(E===2){if(on(h)<8)break;const u=ln(h,8),v=new DataView(u.buffer,u.byteOffset,u.length),w=v.getUint32(0);if(w>Math.pow(2,21)-1){l.enqueue(vl);break}M=w*Math.pow(2,32)+v.getUint32(4),E=3}else{if(on(h)<M)break;const u=ln(h,M);l.enqueue(kl(U?u:ul.decode(u),d)),E=0}if(M===0||M>y){l.enqueue(vl);break}}}})}const Hh=4;function ze(y){if(y)return vf(y)}function vf(y){for(var d in ze.prototype)y[d]=ze.prototype[d];return y}ze.prototype.on=ze.prototype.addEventListener=function(y,d){return this._callbacks=this._callbacks||{},(this._callbacks["$"+y]=this._callbacks["$"+y]||[]).push(d),this};ze.prototype.once=function(y,d){function h(){this.off(y,h),d.apply(this,arguments)}return h.fn=d,this.on(y,h),this};ze.prototype.off=ze.prototype.removeListener=ze.prototype.removeAllListeners=ze.prototype.removeEventListener=function(y,d){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var h=this._callbacks["$"+y];if(!h)return this;if(arguments.length==1)return delete this._callbacks["$"+y],this;for(var E,M=0;M<h.length;M++)if(E=h[M],E===d||E.fn===d){h.splice(M,1);break}return h.length===0&&delete this._callbacks["$"+y],this};ze.prototype.emit=function(y){this._callbacks=this._callbacks||{};for(var d=new Array(arguments.length-1),h=this._callbacks["$"+y],E=1;E<arguments.length;E++)d[E-1]=arguments[E];if(h){h=h.slice(0);for(var E=0,M=h.length;E<M;++E)h[E].apply(this,d)}return this};ze.prototype.emitReserved=ze.prototype.emit;ze.prototype.listeners=function(y){return this._callbacks=this._callbacks||{},this._callbacks["$"+y]||[]};ze.prototype.hasListeners=function(y){return!!this.listeners(y).length};const _n=typeof Promise=="function"&&typeof Promise.resolve=="function"?d=>Promise.resolve().then(d):(d,h)=>h(d,0),bt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),mf="arraybuffer";function Fh(y,...d){return d.reduce((h,E)=>(y.hasOwnProperty(E)&&(h[E]=y[E]),h),{})}const gf=bt.setTimeout,Sf=bt.clearTimeout;function pn(y,d){d.useNativeTimers?(y.setTimeoutFn=gf.bind(bt),y.clearTimeoutFn=Sf.bind(bt)):(y.setTimeoutFn=bt.setTimeout.bind(bt),y.clearTimeoutFn=bt.clearTimeout.bind(bt))}const yf=1.33;function wf(y){return typeof y=="string"?Cf(y):Math.ceil((y.byteLength||y.size)*yf)}function Cf(y){let d=0,h=0;for(let E=0,M=y.length;E<M;E++)d=y.charCodeAt(E),d<128?h+=1:d<2048?h+=2:d<55296||d>=57344?h+=3:(E++,h+=4);return h}function jh(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Ef(y){let d="";for(let h in y)y.hasOwnProperty(h)&&(d.length&&(d+="&"),d+=encodeURIComponent(h)+"="+encodeURIComponent(y[h]));return d}function kf(y){let d={},h=y.split("&");for(let E=0,M=h.length;E<M;E++){let U=h[E].split("=");d[decodeURIComponent(U[0])]=decodeURIComponent(U[1])}return d}class bf extends Error{constructor(d,h,E){super(d),this.description=h,this.context=E,this.type="TransportError"}}class bl extends ze{constructor(d){super(),this.writable=!1,pn(this,d),this.opts=d,this.query=d.query,this.socket=d.socket,this.supportsBinary=!d.forceBase64}onError(d,h,E){return super.emitReserved("error",new bf(d,h,E)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(d){this.readyState==="open"&&this.write(d)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(d){const h=kl(d,this.socket.binaryType);this.onPacket(h)}onPacket(d){super.emitReserved("packet",d)}onClose(d){this.readyState="closed",super.emitReserved("close",d)}pause(d){}createUri(d,h={}){return d+"://"+this._hostname()+this._port()+this.opts.path+this._query(h)}_hostname(){const d=this.opts.hostname;return d.indexOf(":")===-1?d:"["+d+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(d){const h=Ef(d);return h.length?"?"+h:""}}class xf extends bl{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(d){this.readyState="pausing";const h=()=>{this.readyState="paused",d()};if(this._polling||!this.writable){let E=0;this._polling&&(E++,this.once("pollComplete",function(){--E||h()})),this.writable||(E++,this.once("drain",function(){--E||h()}))}else h()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(d){const h=E=>{if(this.readyState==="opening"&&E.type==="open"&&this.onOpen(),E.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(E)};ff(d,this.socket.binaryType).forEach(h),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const d=()=>{this.write([{type:"close"}])};this.readyState==="open"?d():this.once("open",d)}write(d){this.writable=!1,df(d,h=>{this.doWrite(h,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const d=this.opts.secure?"https":"http",h=this.query||{};return this.opts.timestampRequests!==!1&&(h[this.opts.timestampParam]=jh()),!this.supportsBinary&&!h.sid&&(h.b64=1),this.createUri(d,h)}}let zh=!1;try{zh=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Rf=zh;function Lf(){}class Df extends xf{constructor(d){if(super(d),typeof location<"u"){const h=location.protocol==="https:";let E=location.port;E||(E=h?"443":"80"),this.xd=typeof location<"u"&&d.hostname!==location.hostname||E!==d.port}}doWrite(d,h){const E=this.request({method:"POST",data:d});E.on("success",h),E.on("error",(M,U)=>{this.onError("xhr post error",M,U)})}doPoll(){const d=this.request();d.on("data",this.onData.bind(this)),d.on("error",(h,E)=>{this.onError("xhr poll error",h,E)}),this.pollXhr=d}}class zt extends ze{constructor(d,h,E){super(),this.createRequest=d,pn(this,E),this._opts=E,this._method=E.method||"GET",this._uri=h,this._data=E.data!==void 0?E.data:null,this._create()}_create(){var d;const h=Fh(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");h.xdomain=!!this._opts.xd;const E=this._xhr=this.createRequest(h);try{E.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){E.setDisableHeaderCheck&&E.setDisableHeaderCheck(!0);for(let M in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(M)&&E.setRequestHeader(M,this._opts.extraHeaders[M])}}catch{}if(this._method==="POST")try{E.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{E.setRequestHeader("Accept","*/*")}catch{}(d=this._opts.cookieJar)===null||d===void 0||d.addCookies(E),"withCredentials"in E&&(E.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(E.timeout=this._opts.requestTimeout),E.onreadystatechange=()=>{var M;E.readyState===3&&((M=this._opts.cookieJar)===null||M===void 0||M.parseCookies(E.getResponseHeader("set-cookie"))),E.readyState===4&&(E.status===200||E.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof E.status=="number"?E.status:0)},0))},E.send(this._data)}catch(M){this.setTimeoutFn(()=>{this._onError(M)},0);return}typeof document<"u"&&(this._index=zt.requestsCount++,zt.requests[this._index]=this)}_onError(d){this.emitReserved("error",d,this._xhr),this._cleanup(!0)}_cleanup(d){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Lf,d)try{this._xhr.abort()}catch{}typeof document<"u"&&delete zt.requests[this._index],this._xhr=null}}_onLoad(){const d=this._xhr.responseText;d!==null&&(this.emitReserved("data",d),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}zt.requestsCount=0;zt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Lh);else if(typeof addEventListener=="function"){const y="onpagehide"in bt?"pagehide":"unload";addEventListener(y,Lh,!1)}}function Lh(){for(let y in zt.requests)zt.requests.hasOwnProperty(y)&&zt.requests[y].abort()}const Tf=(function(){const y=Uh({xdomain:!1});return y&&y.responseType!==null})();class Af extends Df{constructor(d){super(d);const h=d&&d.forceBase64;this.supportsBinary=Tf&&!h}request(d={}){return Object.assign(d,{xd:this.xd},this.opts),new zt(Uh,this.uri(),d)}}function Uh(y){const d=y.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!d||Rf))return new XMLHttpRequest}catch{}if(!d)try{return new bt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Wh=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Bf extends bl{get name(){return"websocket"}doOpen(){const d=this.uri(),h=this.opts.protocols,E=Wh?{}:Fh(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(E.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(d,h,E)}catch(M){return this.emitReserved("error",M)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=d=>this.onClose({description:"websocket connection closed",context:d}),this.ws.onmessage=d=>this.onData(d.data),this.ws.onerror=d=>this.onError("websocket error",d)}write(d){this.writable=!1;for(let h=0;h<d.length;h++){const E=d[h],M=h===d.length-1;El(E,this.supportsBinary,U=>{try{this.doWrite(E,U)}catch{}M&&_n(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const d=this.opts.secure?"wss":"ws",h=this.query||{};return this.opts.timestampRequests&&(h[this.opts.timestampParam]=jh()),this.supportsBinary||(h.b64=1),this.createUri(d,h)}}const dl=bt.WebSocket||bt.MozWebSocket;class Of extends Bf{createSocket(d,h,E){return Wh?new dl(d,h,E):h?new dl(d,h):new dl(d)}doWrite(d,h){this.ws.send(h)}}class Pf extends bl{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(d){return this.emitReserved("error",d)}this._transport.closed.then(()=>{this.onClose()}).catch(d=>{this.onError("webtransport error",d)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(d=>{const h=pf(Number.MAX_SAFE_INTEGER,this.socket.binaryType),E=d.readable.pipeThrough(h).getReader(),M=_f();M.readable.pipeTo(d.writable),this._writer=M.writable.getWriter();const U=()=>{E.read().then(({done:l,value:u})=>{l||(this.onPacket(u),U())}).catch(l=>{})};U();const F={type:"open"};this.query.sid&&(F.data=`{"sid":"${this.query.sid}"}`),this._writer.write(F).then(()=>this.onOpen())})})}write(d){this.writable=!1;for(let h=0;h<d.length;h++){const E=d[h],M=h===d.length-1;this._writer.write(E).then(()=>{M&&_n(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var d;(d=this._transport)===null||d===void 0||d.close()}}const Mf={websocket:Of,webtransport:Pf,polling:Af},If=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Nf=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ml(y){if(y.length>8e3)throw"URI too long";const d=y,h=y.indexOf("["),E=y.indexOf("]");h!=-1&&E!=-1&&(y=y.substring(0,h)+y.substring(h,E).replace(/:/g,";")+y.substring(E,y.length));let M=If.exec(y||""),U={},F=14;for(;F--;)U[Nf[F]]=M[F]||"";return h!=-1&&E!=-1&&(U.source=d,U.host=U.host.substring(1,U.host.length-1).replace(/;/g,":"),U.authority=U.authority.replace("[","").replace("]","").replace(/;/g,":"),U.ipv6uri=!0),U.pathNames=Hf(U,U.path),U.queryKey=Ff(U,U.query),U}function Hf(y,d){const h=/\/{2,9}/g,E=d.replace(h,"/").split("/");return(d.slice(0,1)=="/"||d.length===0)&&E.splice(0,1),d.slice(-1)=="/"&&E.splice(E.length-1,1),E}function Ff(y,d){const h={};return d.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(E,M,U){M&&(h[M]=U)}),h}const gl=typeof addEventListener=="function"&&typeof removeEventListener=="function",hn=[];gl&&addEventListener("offline",()=>{hn.forEach(y=>y())},!1);class Cr extends ze{constructor(d,h){if(super(),this.binaryType=mf,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,d&&typeof d=="object"&&(h=d,d=null),d){const E=ml(d);h.hostname=E.host,h.secure=E.protocol==="https"||E.protocol==="wss",h.port=E.port,E.query&&(h.query=E.query)}else h.host&&(h.hostname=ml(h.host).host);pn(this,h),this.secure=h.secure!=null?h.secure:typeof location<"u"&&location.protocol==="https:",h.hostname&&!h.port&&(h.port=this.secure?"443":"80"),this.hostname=h.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=h.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},h.transports.forEach(E=>{const M=E.prototype.name;this.transports.push(M),this._transportsByName[M]=E}),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},h),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=kf(this.opts.query)),gl&&(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"})},hn.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(d){const h=Object.assign({},this.opts.query);h.EIO=Hh,h.transport=d,this.id&&(h.sid=this.id);const E=Object.assign({},this.opts,{query:h,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[d]);return new this._transportsByName[d](E)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const d=this.opts.rememberUpgrade&&Cr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const h=this.createTransport(d);h.open(),this.setTransport(h)}setTransport(d){this.transport&&this.transport.removeAllListeners(),this.transport=d,d.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",h=>this._onClose("transport close",h))}onOpen(){this.readyState="open",Cr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(d){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",d),this.emitReserved("heartbeat"),d.type){case"open":this.onHandshake(JSON.parse(d.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const h=new Error("server error");h.code=d.data,this._onError(h);break;case"message":this.emitReserved("data",d.data),this.emitReserved("message",d.data);break}}onHandshake(d){this.emitReserved("handshake",d),this.id=d.sid,this.transport.query.sid=d.sid,this._pingInterval=d.pingInterval,this._pingTimeout=d.pingTimeout,this._maxPayload=d.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const d=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+d,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},d),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 d=this._getWritablePackets();this.transport.send(d),this._prevBufferLen=d.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let h=1;for(let E=0;E<this.writeBuffer.length;E++){const M=this.writeBuffer[E].data;if(M&&(h+=wf(M)),E>0&&h>this._maxPayload)return this.writeBuffer.slice(0,E);h+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const d=Date.now()>this._pingTimeoutTime;return d&&(this._pingTimeoutTime=0,_n(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),d}write(d,h,E){return this._sendPacket("message",d,h,E),this}send(d,h,E){return this._sendPacket("message",d,h,E),this}_sendPacket(d,h,E,M){if(typeof h=="function"&&(M=h,h=void 0),typeof E=="function"&&(M=E,E=null),this.readyState==="closing"||this.readyState==="closed")return;E=E||{},E.compress=E.compress!==!1;const U={type:d,data:h,options:E};this.emitReserved("packetCreate",U),this.writeBuffer.push(U),M&&this.once("flush",M),this.flush()}close(){const d=()=>{this._onClose("forced close"),this.transport.close()},h=()=>{this.off("upgrade",h),this.off("upgradeError",h),d()},E=()=>{this.once("upgrade",h),this.once("upgradeError",h)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?E():d()}):this.upgrading?E():d()),this}_onError(d){if(Cr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",d),this._onClose("transport error",d)}_onClose(d,h){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(),gl&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const E=hn.indexOf(this._offlineEventListener);E!==-1&&hn.splice(E,1)}this.readyState="closed",this.id=null,this.emitReserved("close",d,h),this.writeBuffer=[],this._prevBufferLen=0}}}Cr.protocol=Hh;class jf extends Cr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let d=0;d<this._upgrades.length;d++)this._probe(this._upgrades[d])}_probe(d){let h=this.createTransport(d),E=!1;Cr.priorWebsocketSuccess=!1;const M=()=>{E||(h.send([{type:"ping",data:"probe"}]),h.once("packet",f=>{if(!E)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",h),!h)return;Cr.priorWebsocketSuccess=h.name==="websocket",this.transport.pause(()=>{E||this.readyState!=="closed"&&(w(),this.setTransport(h),h.send([{type:"upgrade"}]),this.emitReserved("upgrade",h),h=null,this.upgrading=!1,this.flush())})}else{const g=new Error("probe error");g.transport=h.name,this.emitReserved("upgradeError",g)}}))};function U(){E||(E=!0,w(),h.close(),h=null)}const F=f=>{const g=new Error("probe error: "+f);g.transport=h.name,U(),this.emitReserved("upgradeError",g)};function l(){F("transport closed")}function u(){F("socket closed")}function v(f){h&&f.name!==h.name&&U()}const w=()=>{h.removeListener("open",M),h.removeListener("error",F),h.removeListener("close",l),this.off("close",u),this.off("upgrading",v)};h.once("open",M),h.once("error",F),h.once("close",l),this.once("close",u),this.once("upgrading",v),this._upgrades.indexOf("webtransport")!==-1&&d!=="webtransport"?this.setTimeoutFn(()=>{E||h.open()},200):h.open()}onHandshake(d){this._upgrades=this._filterUpgrades(d.upgrades),super.onHandshake(d)}_filterUpgrades(d){const h=[];for(let E=0;E<d.length;E++)~this.transports.indexOf(d[E])&&h.push(d[E]);return h}}let zf=class extends jf{constructor(d,h={}){const E=typeof d=="object"?d:h;(!E.transports||E.transports&&typeof E.transports[0]=="string")&&(E.transports=(E.transports||["polling","websocket","webtransport"]).map(M=>Mf[M]).filter(M=>!!M)),super(d,E)}};function Uf(y,d="",h){let E=y;h=h||typeof location<"u"&&location,y==null&&(y=h.protocol+"//"+h.host),typeof y=="string"&&(y.charAt(0)==="/"&&(y.charAt(1)==="/"?y=h.protocol+y:y=h.host+y),/^(https?|wss?):\/\//.test(y)||(typeof h<"u"?y=h.protocol+"//"+y:y="https://"+y),E=ml(y)),E.port||(/^(http|ws)$/.test(E.protocol)?E.port="80":/^(http|ws)s$/.test(E.protocol)&&(E.port="443")),E.path=E.path||"/";const U=E.host.indexOf(":")!==-1?"["+E.host+"]":E.host;return E.id=E.protocol+"://"+U+":"+E.port+d,E.href=E.protocol+"://"+U+(h&&h.port===E.port?"":":"+E.port),E}const Wf=typeof ArrayBuffer=="function",$f=y=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(y):y.buffer instanceof ArrayBuffer,$h=Object.prototype.toString,Vf=typeof Blob=="function"||typeof Blob<"u"&&$h.call(Blob)==="[object BlobConstructor]",Kf=typeof File=="function"||typeof File<"u"&&$h.call(File)==="[object FileConstructor]";function xl(y){return Wf&&(y instanceof ArrayBuffer||$f(y))||Vf&&y instanceof Blob||Kf&&y instanceof File}function un(y,d){if(!y||typeof y!="object")return!1;if(Array.isArray(y)){for(let h=0,E=y.length;h<E;h++)if(un(y[h]))return!0;return!1}if(xl(y))return!0;if(y.toJSON&&typeof y.toJSON=="function"&&arguments.length===1)return un(y.toJSON(),!0);for(const h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&un(y[h]))return!0;return!1}function qf(y){const d=[],h=y.data,E=y;return E.data=Sl(h,d),E.attachments=d.length,{packet:E,buffers:d}}function Sl(y,d){if(!y)return y;if(xl(y)){const h={_placeholder:!0,num:d.length};return d.push(y),h}else if(Array.isArray(y)){const h=new Array(y.length);for(let E=0;E<y.length;E++)h[E]=Sl(y[E],d);return h}else if(typeof y=="object"&&!(y instanceof Date)){const h={};for(const E in y)Object.prototype.hasOwnProperty.call(y,E)&&(h[E]=Sl(y[E],d));return h}return y}function Xf(y,d){return y.data=yl(y.data,d),delete y.attachments,y}function yl(y,d){if(!y)return y;if(y&&y._placeholder===!0){if(typeof y.num=="number"&&y.num>=0&&y.num<d.length)return d[y.num];throw new Error("illegal attachments")}else if(Array.isArray(y))for(let h=0;h<y.length;h++)y[h]=yl(y[h],d);else if(typeof y=="object")for(const h in y)Object.prototype.hasOwnProperty.call(y,h)&&(y[h]=yl(y[h],d));return y}const Vh=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Gf=5;var Ce;(function(y){y[y.CONNECT=0]="CONNECT",y[y.DISCONNECT=1]="DISCONNECT",y[y.EVENT=2]="EVENT",y[y.ACK=3]="ACK",y[y.CONNECT_ERROR=4]="CONNECT_ERROR",y[y.BINARY_EVENT=5]="BINARY_EVENT",y[y.BINARY_ACK=6]="BINARY_ACK"})(Ce||(Ce={}));class Yf{constructor(d){this.replacer=d}encode(d){return(d.type===Ce.EVENT||d.type===Ce.ACK)&&un(d)?this.encodeAsBinary({type:d.type===Ce.EVENT?Ce.BINARY_EVENT:Ce.BINARY_ACK,nsp:d.nsp,data:d.data,id:d.id}):[this.encodeAsString(d)]}encodeAsString(d){let h=""+d.type;return(d.type===Ce.BINARY_EVENT||d.type===Ce.BINARY_ACK)&&(h+=d.attachments+"-"),d.nsp&&d.nsp!=="/"&&(h+=d.nsp+","),d.id!=null&&(h+=d.id),d.data!=null&&(h+=JSON.stringify(d.data,this.replacer)),h}encodeAsBinary(d){const h=qf(d),E=this.encodeAsString(h.packet),M=h.buffers;return M.unshift(E),M}}class Rl extends ze{constructor(d){super(),this.reviver=d}add(d){let h;if(typeof d=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");h=this.decodeString(d);const E=h.type===Ce.BINARY_EVENT;E||h.type===Ce.BINARY_ACK?(h.type=E?Ce.EVENT:Ce.ACK,this.reconstructor=new Qf(h),h.attachments===0&&super.emitReserved("decoded",h)):super.emitReserved("decoded",h)}else if(xl(d)||d.base64)if(this.reconstructor)h=this.reconstructor.takeBinaryData(d),h&&(this.reconstructor=null,super.emitReserved("decoded",h));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+d)}decodeString(d){let h=0;const E={type:Number(d.charAt(0))};if(Ce[E.type]===void 0)throw new Error("unknown packet type "+E.type);if(E.type===Ce.BINARY_EVENT||E.type===Ce.BINARY_ACK){const U=h+1;for(;d.charAt(++h)!=="-"&&h!=d.length;);const F=d.substring(U,h);if(F!=Number(F)||d.charAt(h)!=="-")throw new Error("Illegal attachments");E.attachments=Number(F)}if(d.charAt(h+1)==="/"){const U=h+1;for(;++h&&!(d.charAt(h)===","||h===d.length););E.nsp=d.substring(U,h)}else E.nsp="/";const M=d.charAt(h+1);if(M!==""&&Number(M)==M){const U=h+1;for(;++h;){const F=d.charAt(h);if(F==null||Number(F)!=F){--h;break}if(h===d.length)break}E.id=Number(d.substring(U,h+1))}if(d.charAt(++h)){const U=this.tryParse(d.substr(h));if(Rl.isPayloadValid(E.type,U))E.data=U;else throw new Error("invalid payload")}return E}tryParse(d){try{return JSON.parse(d,this.reviver)}catch{return!1}}static isPayloadValid(d,h){switch(d){case Ce.CONNECT:return fn(h);case Ce.DISCONNECT:return h===void 0;case Ce.CONNECT_ERROR:return typeof h=="string"||fn(h);case Ce.EVENT:case Ce.BINARY_EVENT:return Array.isArray(h)&&(typeof h[0]=="number"||typeof h[0]=="string"&&Vh.indexOf(h[0])===-1);case Ce.ACK:case Ce.BINARY_ACK:return Array.isArray(h)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Qf{constructor(d){this.packet=d,this.buffers=[],this.reconPack=d}takeBinaryData(d){if(this.buffers.push(d),this.buffers.length===this.reconPack.attachments){const h=Xf(this.reconPack,this.buffers);return this.finishedReconstruction(),h}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Jf(y){return typeof y=="string"}const Zf=Number.isInteger||function(y){return typeof y=="number"&&isFinite(y)&&Math.floor(y)===y};function e_(y){return y===void 0||Zf(y)}function fn(y){return Object.prototype.toString.call(y)==="[object Object]"}function t_(y,d){switch(y){case Ce.CONNECT:return d===void 0||fn(d);case Ce.DISCONNECT:return d===void 0;case Ce.EVENT:return Array.isArray(d)&&(typeof d[0]=="number"||typeof d[0]=="string"&&Vh.indexOf(d[0])===-1);case Ce.ACK:return Array.isArray(d);case Ce.CONNECT_ERROR:return typeof d=="string"||fn(d);default:return!1}}function r_(y){return Jf(y.nsp)&&e_(y.id)&&t_(y.type,y.data)}const i_=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Rl,Encoder:Yf,get PacketType(){return Ce},isPacketValid:r_,protocol:Gf},Symbol.toStringTag,{value:"Module"}));function Pt(y,d,h){return y.on(d,h),function(){y.off(d,h)}}const s_=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Kh extends ze{constructor(d,h,E){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=d,this.nsp=h,E&&E.auth&&(this.auth=E.auth),this._opts=Object.assign({},E),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const d=this.io;this.subs=[Pt(d,"open",this.onopen.bind(this)),Pt(d,"packet",this.onpacket.bind(this)),Pt(d,"error",this.onerror.bind(this)),Pt(d,"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(...d){return d.unshift("message"),this.emit.apply(this,d),this}emit(d,...h){var E,M,U;if(s_.hasOwnProperty(d))throw new Error('"'+d.toString()+'" is a reserved event name');if(h.unshift(d),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(h),this;const F={type:Ce.EVENT,data:h};if(F.options={},F.options.compress=this.flags.compress!==!1,typeof h[h.length-1]=="function"){const w=this.ids++,f=h.pop();this._registerAckCallback(w,f),F.id=w}const l=(M=(E=this.io.engine)===null||E===void 0?void 0:E.transport)===null||M===void 0?void 0:M.writable,u=this.connected&&!(!((U=this.io.engine)===null||U===void 0)&&U._hasPingExpired());return this.flags.volatile&&!l||(u?(this.notifyOutgoingListeners(F),this.packet(F)):this.sendBuffer.push(F)),this.flags={},this}_registerAckCallback(d,h){var E;const M=(E=this.flags.timeout)!==null&&E!==void 0?E:this._opts.ackTimeout;if(M===void 0){this.acks[d]=h;return}const U=this.io.setTimeoutFn(()=>{delete this.acks[d];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===d&&this.sendBuffer.splice(l,1);h.call(this,new Error("operation has timed out"))},M),F=(...l)=>{this.io.clearTimeoutFn(U),h.apply(this,l)};F.withError=!0,this.acks[d]=F}emitWithAck(d,...h){return new Promise((E,M)=>{const U=(F,l)=>F?M(F):E(l);U.withError=!0,h.push(U),this.emit(d,...h)})}_addToQueue(d){let h;typeof d[d.length-1]=="function"&&(h=d.pop());const E={id:this._queueSeq++,tryCount:0,pending:!1,args:d,flags:Object.assign({fromQueue:!0},this.flags)};d.push((M,...U)=>(this._queue[0],M!==null?E.tryCount>this._opts.retries&&(this._queue.shift(),h&&h(M)):(this._queue.shift(),h&&h(null,...U)),E.pending=!1,this._drainQueue())),this._queue.push(E),this._drainQueue()}_drainQueue(d=!1){if(!this.connected||this._queue.length===0)return;const h=this._queue[0];h.pending&&!d||(h.pending=!0,h.tryCount++,this.flags=h.flags,this.emit.apply(this,h.args))}packet(d){d.nsp=this.nsp,this.io._packet(d)}onopen(){typeof this.auth=="function"?this.auth(d=>{this._sendConnectPacket(d)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(d){this.packet({type:Ce.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},d):d})}onerror(d){this.connected||this.emitReserved("connect_error",d)}onclose(d,h){this.connected=!1,delete this.id,this.emitReserved("disconnect",d,h),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(d=>{if(!this.sendBuffer.some(E=>String(E.id)===d)){const E=this.acks[d];delete this.acks[d],E.withError&&E.call(this,new Error("socket has been disconnected"))}})}onpacket(d){if(d.nsp===this.nsp)switch(d.type){case Ce.CONNECT:d.data&&d.data.sid?this.onconnect(d.data.sid,d.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 Ce.EVENT:case Ce.BINARY_EVENT:this.onevent(d);break;case Ce.ACK:case Ce.BINARY_ACK:this.onack(d);break;case Ce.DISCONNECT:this.ondisconnect();break;case Ce.CONNECT_ERROR:this.destroy();const E=new Error(d.data.message);E.data=d.data.data,this.emitReserved("connect_error",E);break}}onevent(d){const h=d.data||[];d.id!=null&&h.push(this.ack(d.id)),this.connected?this.emitEvent(h):this.receiveBuffer.push(Object.freeze(h))}emitEvent(d){if(this._anyListeners&&this._anyListeners.length){const h=this._anyListeners.slice();for(const E of h)E.apply(this,d)}super.emit.apply(this,d),this._pid&&d.length&&typeof d[d.length-1]=="string"&&(this._lastOffset=d[d.length-1])}ack(d){const h=this;let E=!1;return function(...M){E||(E=!0,h.packet({type:Ce.ACK,id:d,data:M}))}}onack(d){const h=this.acks[d.id];typeof h=="function"&&(delete this.acks[d.id],h.withError&&d.data.unshift(null),h.apply(this,d.data))}onconnect(d,h){this.id=d,this.recovered=h&&this._pid===h,this._pid=h,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(d=>this.emitEvent(d)),this.receiveBuffer=[],this.sendBuffer.forEach(d=>{this.notifyOutgoingListeners(d),this.packet(d)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(d=>d()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ce.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(d){return this.flags.compress=d,this}get volatile(){return this.flags.volatile=!0,this}timeout(d){return this.flags.timeout=d,this}onAny(d){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(d),this}prependAny(d){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(d),this}offAny(d){if(!this._anyListeners)return this;if(d){const h=this._anyListeners;for(let E=0;E<h.length;E++)if(d===h[E])return h.splice(E,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(d){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(d),this}prependAnyOutgoing(d){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(d),this}offAnyOutgoing(d){if(!this._anyOutgoingListeners)return this;if(d){const h=this._anyOutgoingListeners;for(let E=0;E<h.length;E++)if(d===h[E])return h.splice(E,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(d){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const h=this._anyOutgoingListeners.slice();for(const E of h)E.apply(this,d.data)}}}function ci(y){y=y||{},this.ms=y.min||100,this.max=y.max||1e4,this.factor=y.factor||2,this.jitter=y.jitter>0&&y.jitter<=1?y.jitter:0,this.attempts=0}ci.prototype.duration=function(){var y=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var d=Math.random(),h=Math.floor(d*this.jitter*y);y=(Math.floor(d*10)&1)==0?y-h:y+h}return Math.min(y,this.max)|0};ci.prototype.reset=function(){this.attempts=0};ci.prototype.setMin=function(y){this.ms=y};ci.prototype.setMax=function(y){this.max=y};ci.prototype.setJitter=function(y){this.jitter=y};class wl extends ze{constructor(d,h){var E;super(),this.nsps={},this.subs=[],d&&typeof d=="object"&&(h=d,d=void 0),h=h||{},h.path=h.path||"/socket.io",this.opts=h,pn(this,h),this.reconnection(h.reconnection!==!1),this.reconnectionAttempts(h.reconnectionAttempts||1/0),this.reconnectionDelay(h.reconnectionDelay||1e3),this.reconnectionDelayMax(h.reconnectionDelayMax||5e3),this.randomizationFactor((E=h.randomizationFactor)!==null&&E!==void 0?E:.5),this.backoff=new ci({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(h.timeout==null?2e4:h.timeout),this._readyState="closed",this.uri=d;const M=h.parser||i_;this.encoder=new M.Encoder,this.decoder=new M.Decoder,this._autoConnect=h.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(d){return arguments.length?(this._reconnection=!!d,d||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(d){return d===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=d,this)}reconnectionDelay(d){var h;return d===void 0?this._reconnectionDelay:(this._reconnectionDelay=d,(h=this.backoff)===null||h===void 0||h.setMin(d),this)}randomizationFactor(d){var h;return d===void 0?this._randomizationFactor:(this._randomizationFactor=d,(h=this.backoff)===null||h===void 0||h.setJitter(d),this)}reconnectionDelayMax(d){var h;return d===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=d,(h=this.backoff)===null||h===void 0||h.setMax(d),this)}timeout(d){return arguments.length?(this._timeout=d,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(d){if(~this._readyState.indexOf("open"))return this;this.engine=new zf(this.uri,this.opts);const h=this.engine,E=this;this._readyState="opening",this.skipReconnect=!1;const M=Pt(h,"open",function(){E.onopen(),d&&d()}),U=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),d?d(l):this.maybeReconnectOnOpen()},F=Pt(h,"error",U);if(this._timeout!==!1){const l=this._timeout,u=this.setTimeoutFn(()=>{M(),U(new Error("timeout")),h.close()},l);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(M),this.subs.push(F),this}connect(d){return this.open(d)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const d=this.engine;this.subs.push(Pt(d,"ping",this.onping.bind(this)),Pt(d,"data",this.ondata.bind(this)),Pt(d,"error",this.onerror.bind(this)),Pt(d,"close",this.onclose.bind(this)),Pt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(d){try{this.decoder.add(d)}catch(h){this.onclose("parse error",h)}}ondecoded(d){_n(()=>{this.emitReserved("packet",d)},this.setTimeoutFn)}onerror(d){this.emitReserved("error",d)}socket(d,h){let E=this.nsps[d];return E?this._autoConnect&&!E.active&&E.connect():(E=new Kh(this,d,h),this.nsps[d]=E),E}_destroy(d){const h=Object.keys(this.nsps);for(const E of h)if(this.nsps[E].active)return;this._close()}_packet(d){const h=this.encoder.encode(d);for(let E=0;E<h.length;E++)this.engine.write(h[E],d.options)}cleanup(){this.subs.forEach(d=>d()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(d,h){var E;this.cleanup(),(E=this.engine)===null||E===void 0||E.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",d,h),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const d=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const h=this.backoff.duration();this._reconnecting=!0;const E=this.setTimeoutFn(()=>{d.skipReconnect||(this.emitReserved("reconnect_attempt",d.backoff.attempts),!d.skipReconnect&&d.open(M=>{M?(d._reconnecting=!1,d.reconnect(),this.emitReserved("reconnect_error",M)):d.onreconnect()}))},h);this.opts.autoUnref&&E.unref(),this.subs.push(()=>{this.clearTimeoutFn(E)})}}onreconnect(){const d=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",d)}}const qi={};function dn(y,d){typeof y=="object"&&(d=y,y=void 0),d=d||{};const h=Uf(y,d.path||"/socket.io"),E=h.source,M=h.id,U=h.path,F=qi[M]&&U in qi[M].nsps,l=d.forceNew||d["force new connection"]||d.multiplex===!1||F;let u;return l?u=new wl(E,d):(qi[M]||(qi[M]=new wl(E,d)),u=qi[M]),h.query&&!d.query&&(d.query=h.queryKey),u.socket(h.path,d)}Object.assign(dn,{Manager:wl,Socket:Kh,io:dn,connect:dn});let kt=null;function Ll(){const[y,d]=$e.useState(!1),h=$e.useRef(null);$e.useEffect(()=>{kt||(kt=dn(window.location.origin,{reconnection:!0,reconnectionAttempts:5,reconnectionDelay:1e3})),h.current=kt;const F=()=>{console.log("Socket connected"),d(!0)},l=()=>{console.log("Socket disconnected"),d(!1)};return kt.on("connect",F),kt.on("disconnect",l),kt.connected&&d(!0),()=>{kt==null||kt.off("connect",F),kt==null||kt.off("disconnect",l)}},[]);const E=$e.useCallback((F,l)=>{var u;(u=h.current)==null||u.emit(F,l)},[]),M=$e.useCallback((F,l)=>{var u;(u=h.current)==null||u.on(F,l)},[]),U=$e.useCallback((F,l)=>{var u,v;l?(u=h.current)==null||u.off(F,l):(v=h.current)==null||v.off(F)},[]);return{socket:h.current,connected:y,emit:E,on:M,off:U}}function n_(){const y=Ve(d=>d.projectInfo);return X.jsxs("header",{className:"header",children:[X.jsx("h1",{children:of}),X.jsxs("div",{className:"project-info",children:[y&&X.jsxs(X.Fragment,{children:[X.jsxs("span",{className:"branch",children:[X.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:X.jsx("path",{d:"M11.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5zm-2.25.75a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25zM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5zM3.5 3.25a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0z"})}),y.currentBranch||"Unknown"]}),X.jsx("span",{children:y.cwd})]}),X.jsxs("span",{children:["v",lf]})]})]})}const o_=[{id:"branch",number:1,label:"Branch"},{id:"worktree",number:2,label:"Count"}];function l_({number:y,label:d,status:h,onClick:E,disabled:M}){return X.jsxs("button",{className:`lnb-step ${h}`,onClick:E,disabled:M,type:"button",children:[X.jsx("span",{className:"step-number",children:h==="completed"?"✓":y}),X.jsx("span",{className:"step-label",children:d})]})}function a_(){const{step:y,goToStep:d,canNavigateTo:h,getStepStatus:E,isSetupCollapsed:M,toggleSetupCollapse:U,terminals:F}=Ve(),l=F.length>0;return X.jsxs("div",{className:"lnb-section setup-section",children:[X.jsxs("div",{className:"lnb-section-header",onClick:U,role:"button",tabIndex:0,children:[X.jsx("span",{className:"section-title",children:"SETUP"}),X.jsx("span",{className:"collapse-icon",children:M?"+":"−"})]}),!M&&X.jsxs("div",{className:"lnb-steps",children:[o_.map(u=>X.jsx(l_,{step:u.id,number:u.number,label:u.label,status:E(u.id),onClick:()=>d(u.id),disabled:!h(u.id)},u.id)),l&&X.jsxs("button",{className:`lnb-step ${y==="running"?"current":"completed"}`,onClick:()=>d("running"),type:"button",children:[X.jsx("span",{className:"step-number",children:"3"}),X.jsx("span",{className:"step-label",children:"Running"})]})]})]})}function c_({status:y}){const d={initializing:"#f59e0b",running:"#22c55e",stopped:"#6b7280",error:"#ef4444"};return X.jsx("span",{className:"status-indicator",style:{backgroundColor:d[y]},title:y})}function h_({sessionId:y,worktreeName:d,status:h,isActive:E,isSelected:M,onSelect:U,onToggleSelect:F,onClose:l}){return X.jsxs("div",{className:`session-item ${E?"active":""} ${M?"selected":""}`,onClick:U,role:"button",tabIndex:0,children:[X.jsx("input",{type:"checkbox",className:"session-checkbox",checked:M,onClick:F,onChange:()=>{}}),X.jsx(c_,{status:h}),X.jsx("span",{className:"session-name",title:d,children:d}),X.jsx("button",{className:"session-close",onClick:l,title:"Close session",type:"button",children:"×"})]})}function u_({branchName:y,sessionCount:d,isCollapsed:h,onToggleCollapse:E,children:M}){return X.jsxs("div",{className:"session-group",children:[X.jsxs("div",{className:"session-group-header",onClick:E,role:"button",tabIndex:0,children:[X.jsx("span",{className:"group-collapse-icon",children:h?"▶":"▼"}),X.jsx("span",{className:"group-name",children:y}),X.jsxs("span",{className:"group-count",children:["(",d,")"]})]}),!h&&X.jsx("div",{className:"session-group-items",children:M})]})}function d_(){const{terminals:y,activeSessionId:d,selectedSessionIds:h,getSessionGroups:E,setActiveSession:M,toggleSessionSelection:U,toggleBranchCollapse:F,removeTerminal:l,openModal:u}=Ve(),v=E(),w=async(f,g,C)=>{f.stopPropagation();try{(await fetch(`/api/worktrees/${encodeURIComponent(C)}`,{method:"DELETE"})).ok&&l(g)}catch(x){console.error("Failed to close session:",x)}};return y.length===0?null:X.jsxs("div",{className:"lnb-section sessions-section",children:[X.jsxs("div",{className:"lnb-section-header",children:[X.jsx("span",{className:"section-title",children:"SESSIONS"}),X.jsx("span",{className:"session-count",children:y.length})]}),X.jsx("div",{className:"session-list",children:v.map(f=>X.jsx(u_,{branchName:f.branchName,sessionCount:f.sessions.length,isCollapsed:f.isCollapsed,onToggleCollapse:()=>F(f.branchName),children:f.sessions.map(g=>X.jsx(h_,{sessionId:g.sessionId,worktreeName:g.worktreeName,status:g.status,isActive:g.sessionId===d,isSelected:h.includes(g.sessionId),onSelect:()=>M(g.sessionId),onToggleSelect:C=>{C.stopPropagation(),U(g.sessionId)},onClose:C=>w(C,g.sessionId,g.worktreeName)},g.sessionId))},f.branchName))}),X.jsx("button",{className:"add-session-btn",onClick:()=>u("addWorktree"),type:"button",children:"+ Add Session"})]})}function f_(){const{selectedSessionIds:y,clearSessionSelection:d,openModal:h}=Ve();return y.length===0?null:X.jsxs("div",{className:"bulk-actions-bar",children:[X.jsxs("span",{className:"selected-count",children:[y.length," selected"]}),X.jsx("button",{className:"bulk-delete-btn",onClick:()=>h("confirmDelete",{sessionIds:y}),type:"button",children:"Delete"}),X.jsx("button",{className:"bulk-cancel-btn",onClick:d,type:"button",children:"Cancel"})]})}function __(){return X.jsxs("nav",{className:"left-nav-bar",children:[X.jsx(a_,{}),X.jsx(d_,{}),X.jsx(f_,{})]})}function p_({children:y}){return X.jsxs("div",{className:"main-layout",children:[X.jsx(__,{}),X.jsx("div",{className:"main-content-area with-lnb",children:y})]})}function qh({children:y,title:d,description:h,showNavButtons:E=!0,nextLabel:M="Next",onNext:U,nextDisabled:F=!1}){const{step:l,goToNext:u,goToPrev:v,isStepComplete:w}=Ve(),f=l==="branch",g=w(l),C=()=>{U?U():u()};return X.jsxs("div",{className:"step-container",children:[X.jsxs("div",{className:"step-header",children:[X.jsx("h2",{children:d}),h&&X.jsx("p",{children:h})]}),X.jsx("div",{className:"step-content",children:y}),E&&X.jsxs("div",{className:"step-navigation",children:[X.jsx("button",{className:"nav-button prev",onClick:v,disabled:f,type:"button",children:"Previous"}),X.jsx("button",{className:"nav-button next",onClick:C,disabled:F||!g,type:"button",children:M})]})]})}function v_(){const{branches:y,selectedBranch:d,setSelectedBranch:h}=Ve();return X.jsxs("div",{className:"setup-section",children:[X.jsx("label",{htmlFor:"branch-select",children:"Select Branch"}),X.jsxs("select",{id:"branch-select",value:d||"",onChange:E=>h(E.target.value||null),children:[X.jsx("option",{value:"",children:"-- Select a branch --"}),y.map(E=>X.jsxs("option",{value:E.name,children:[E.name,E.isCurrent?" (current)":"",E.isRemote?" (remote)":""]},E.name))]})]})}function Dh(){const y=Ve(d=>d.selectedBranch);return X.jsx(qh,{title:"Select Branch",description:"Choose the Git branch to create worktrees from",nextDisabled:!y,children:X.jsx(v_,{})})}function m_(){const{worktreeCount:y,incrementWorktreeCount:d,decrementWorktreeCount:h}=Ve();return X.jsxs("div",{className:"setup-section",children:[X.jsx("label",{children:"Number of Worktrees"}),X.jsxs("div",{className:"counter",children:[X.jsx("button",{onClick:h,disabled:y<=an,children:"-"}),X.jsx("span",{children:y}),X.jsx("button",{onClick:d,disabled:y>=pl,children:"+"})]})]})}function g_(){const{execute:y,isLoading:d,selectedBranch:h,worktreeCount:E}=Ve();return X.jsxs(qh,{title:"Configure Worktrees",description:"Set the number of parallel worktrees to create",nextLabel:d?"Creating...":"Execute",onNext:y,nextDisabled:!h||d||E<1,children:[X.jsx(m_,{}),X.jsxs("div",{className:"execution-summary",children:[X.jsx("h4",{children:"Summary"}),X.jsxs("div",{className:"summary-item",children:[X.jsx("span",{className:"summary-label",children:"Branch:"}),X.jsx("span",{className:"summary-value",children:h})]}),X.jsxs("div",{className:"summary-item",children:[X.jsx("span",{className:"summary-label",children:"Worktrees:"}),X.jsx("span",{className:"summary-value",children:E})]})]})]})}var fl={exports:{}},Th;function S_(){return Th||(Th=1,(function(y,d){(function(h,E){y.exports=E()})(globalThis,(()=>(()=>{var h={4567:function(F,l,u){var v=this&&this.__decorate||function(s,n,p,b){var k,R=arguments.length,S=R<3?n:b===null?b=Object.getOwnPropertyDescriptor(n,p):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(s,n,p,b);else for(var A=s.length-1;A>=0;A--)(k=s[A])&&(S=(R<3?k(S):R>3?k(n,p,S):k(n,p))||S);return R>3&&S&&Object.defineProperty(n,p,S),S},w=this&&this.__param||function(s,n){return function(p,b){n(p,b,s)}};Object.defineProperty(l,"__esModule",{value:!0}),l.AccessibilityManager=void 0;const f=u(9042),g=u(9924),C=u(844),x=u(4725),m=u(2585),o=u(3656);let a=l.AccessibilityManager=class extends C.Disposable{constructor(s,n,p,b){super(),this._terminal=s,this._coreBrowserService=p,this._renderService=b,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let k=0;k<this._terminal.rows;k++)this._rowElements[k]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[k]);if(this._topBoundaryFocusListener=k=>this._handleBoundaryFocus(k,0),this._bottomBoundaryFocusListener=k=>this._handleBoundaryFocus(k,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new g.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((k=>this._handleResize(k.rows)))),this.register(this._terminal.onRender((k=>this._refreshRows(k.start,k.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((k=>this._handleChar(k)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
40
+ `+_.stack}return{value:e,source:t,stack:c,digest:null}}function Do(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function To(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var gd=typeof WeakMap=="function"?WeakMap:Map;function Cc(e,t,r){r=Gt(-1,r),r.tag=3,r.payload={element:null};var i=t.value;return r.callback=function(){$s||($s=!0,Vo=i),To(e,t)},r}function Ec(e,t,r){r=Gt(-1,r),r.tag=3;var i=e.type.getDerivedStateFromError;if(typeof i=="function"){var c=t.value;r.payload=function(){return i(c)},r.callback=function(){To(e,t)}}var _=e.stateNode;return _!==null&&typeof _.componentDidCatch=="function"&&(r.callback=function(){To(e,t),typeof i!="function"&&(pr===null?pr=new Set([this]):pr.add(this));var D=t.stack;this.componentDidCatch(t.value,{componentStack:D!==null?D:""})}),r}function kc(e,t,r){var i=e.pingCache;if(i===null){i=e.pingCache=new gd;var c=new Set;i.set(t,c)}else c=i.get(t),c===void 0&&(c=new Set,i.set(t,c));c.has(r)||(c.add(r),e=Bd.bind(null,e,t,r),t.then(e,e))}function bc(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 xc(e,t,r,i,c){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=Gt(-1,1),t.tag=2,fr(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=c,e)}var Sd=p.ReactCurrentOwner,at=!1;function it(e,t,r,i){t.child=e===null?Ka(t,null,r,i):ei(t,e.child,r,i)}function Rc(e,t,r,i,c){r=r.render;var _=t.ref;return ri(t,c),i=wo(e,t,r,i,_,c),r=Co(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Yt(e,t,c)):(Pe&&r&&io(t),t.flags|=1,it(e,t,i,c),t.child)}function Lc(e,t,r,i,c){if(e===null){var _=r.type;return typeof _=="function"&&!Jo(_)&&_.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=_,Dc(e,t,_,i,c)):(e=Ys(r.type,null,i,t,t.mode,c),e.ref=t.ref,e.return=t,t.child=e)}if(_=e.child,(e.lanes&c)===0){var D=_.memoizedProps;if(r=r.compare,r=r!==null?r:bi,r(D,i)&&e.ref===t.ref)return Yt(e,t,c)}return t.flags|=1,e=Sr(_,i),e.ref=t.ref,e.return=t,t.child=e}function Dc(e,t,r,i,c){if(e!==null){var _=e.memoizedProps;if(bi(_,i)&&e.ref===t.ref)if(at=!1,t.pendingProps=i=_,(e.lanes&c)!==0)(e.flags&131072)!==0&&(at=!0);else return t.lanes=e.lanes,Yt(e,t,c)}return Ao(e,t,r,i,c)}function Tc(e,t,r){var i=t.pendingProps,c=i.children,_=e!==null?e.memoizedState:null;if(i.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},De(oi,mt),mt|=r;else{if((r&1073741824)===0)return e=_!==null?_.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,De(oi,mt),mt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=_!==null?_.baseLanes:r,De(oi,mt),mt|=i}else _!==null?(i=_.baseLanes|r,t.memoizedState=null):i=r,De(oi,mt),mt|=i;return it(e,t,c,r),t.child}function Ac(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function Ao(e,t,r,i,c){var _=lt(r)?Lr:Je.current;return _=Yr(t,_),ri(t,c),r=wo(e,t,r,i,_,c),i=Co(),e!==null&&!at?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~c,Yt(e,t,c)):(Pe&&i&&io(t),t.flags|=1,it(e,t,r,c),t.child)}function Bc(e,t,r,i,c){if(lt(r)){var _=!0;ws(t)}else _=!1;if(ri(t,c),t.stateNode===null)Fs(e,t),yc(t,r,i),Lo(t,r,i,c),i=!0;else if(e===null){var D=t.stateNode,N=t.memoizedProps;D.props=N;var z=D.context,Y=r.contextType;typeof Y=="object"&&Y!==null?Y=yt(Y):(Y=lt(r)?Lr:Je.current,Y=Yr(t,Y));var se=r.getDerivedStateFromProps,oe=typeof se=="function"||typeof D.getSnapshotBeforeUpdate=="function";oe||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(N!==i||z!==Y)&&wc(t,D,i,Y),dr=!1;var ie=t.memoizedState;D.state=ie,Ts(t,i,D,c),z=t.memoizedState,N!==i||ie!==z||ot.current||dr?(typeof se=="function"&&(Ro(t,r,se,i),z=t.memoizedState),(N=dr||Sc(t,r,N,i,ie,z,Y))?(oe||typeof D.UNSAFE_componentWillMount!="function"&&typeof D.componentWillMount!="function"||(typeof D.componentWillMount=="function"&&D.componentWillMount(),typeof D.UNSAFE_componentWillMount=="function"&&D.UNSAFE_componentWillMount()),typeof D.componentDidMount=="function"&&(t.flags|=4194308)):(typeof D.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=i,t.memoizedState=z),D.props=i,D.state=z,D.context=Y,i=N):(typeof D.componentDidMount=="function"&&(t.flags|=4194308),i=!1)}else{D=t.stateNode,Xa(e,t),N=t.memoizedProps,Y=t.type===t.elementType?N:Tt(t.type,N),D.props=Y,oe=t.pendingProps,ie=D.context,z=r.contextType,typeof z=="object"&&z!==null?z=yt(z):(z=lt(r)?Lr:Je.current,z=Yr(t,z));var fe=r.getDerivedStateFromProps;(se=typeof fe=="function"||typeof D.getSnapshotBeforeUpdate=="function")||typeof D.UNSAFE_componentWillReceiveProps!="function"&&typeof D.componentWillReceiveProps!="function"||(N!==oe||ie!==z)&&wc(t,D,i,z),dr=!1,ie=t.memoizedState,D.state=ie,Ts(t,i,D,c);var pe=t.memoizedState;N!==oe||ie!==pe||ot.current||dr?(typeof fe=="function"&&(Ro(t,r,fe,i),pe=t.memoizedState),(Y=dr||Sc(t,r,Y,i,ie,pe,z)||!1)?(se||typeof D.UNSAFE_componentWillUpdate!="function"&&typeof D.componentWillUpdate!="function"||(typeof D.componentWillUpdate=="function"&&D.componentWillUpdate(i,pe,z),typeof D.UNSAFE_componentWillUpdate=="function"&&D.UNSAFE_componentWillUpdate(i,pe,z)),typeof D.componentDidUpdate=="function"&&(t.flags|=4),typeof D.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof D.componentDidUpdate!="function"||N===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),t.memoizedProps=i,t.memoizedState=pe),D.props=i,D.state=pe,D.context=z,i=Y):(typeof D.componentDidUpdate!="function"||N===e.memoizedProps&&ie===e.memoizedState||(t.flags|=4),typeof D.getSnapshotBeforeUpdate!="function"||N===e.memoizedProps&&ie===e.memoizedState||(t.flags|=1024),i=!1)}return Bo(e,t,r,i,_,c)}function Bo(e,t,r,i,c,_){Ac(e,t);var D=(t.flags&128)!==0;if(!i&&!D)return c&&Na(t,r,!1),Yt(e,t,_);i=t.stateNode,Sd.current=t;var N=D&&typeof r.getDerivedStateFromError!="function"?null:i.render();return t.flags|=1,e!==null&&D?(t.child=ei(t,e.child,null,_),t.child=ei(t,null,N,_)):it(e,t,N,_),t.memoizedState=i.state,c&&Na(t,r,!0),t.child}function Oc(e){var t=e.stateNode;t.pendingContext?Ma(e,t.pendingContext,t.pendingContext!==t.context):t.context&&Ma(e,t.context,!1),po(e,t.containerInfo)}function Pc(e,t,r,i,c){return Zr(),lo(c),t.flags|=256,it(e,t,r,i),t.child}var Oo={dehydrated:null,treeContext:null,retryLane:0};function Po(e){return{baseLanes:e,cachePool:null,transitions:null}}function Mc(e,t,r){var i=t.pendingProps,c=Me.current,_=!1,D=(t.flags&128)!==0,N;if((N=D)||(N=e!==null&&e.memoizedState===null?!1:(c&2)!==0),N?(_=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(c|=1),De(Me,c&1),e===null)return oo(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(D=i.children,e=i.fallback,_?(i=t.mode,_=t.child,D={mode:"hidden",children:D},(i&1)===0&&_!==null?(_.childLanes=0,_.pendingProps=D):_=Qs(D,i,0,null),e=Hr(e,i,r,null),_.return=t,e.return=t,_.sibling=e,t.child=_,t.child.memoizedState=Po(r),t.memoizedState=Oo,e):Mo(t,D));if(c=e.memoizedState,c!==null&&(N=c.dehydrated,N!==null))return yd(e,t,D,i,N,c,r);if(_){_=i.fallback,D=t.mode,c=e.child,N=c.sibling;var z={mode:"hidden",children:i.children};return(D&1)===0&&t.child!==c?(i=t.child,i.childLanes=0,i.pendingProps=z,t.deletions=null):(i=Sr(c,z),i.subtreeFlags=c.subtreeFlags&14680064),N!==null?_=Sr(N,_):(_=Hr(_,D,r,null),_.flags|=2),_.return=t,i.return=t,i.sibling=_,t.child=i,i=_,_=t.child,D=e.child.memoizedState,D=D===null?Po(r):{baseLanes:D.baseLanes|r,cachePool:null,transitions:D.transitions},_.memoizedState=D,_.childLanes=e.childLanes&~r,t.memoizedState=Oo,i}return _=e.child,e=_.sibling,i=Sr(_,{mode:"visible",children:i.children}),(t.mode&1)===0&&(i.lanes=r),i.return=t,i.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=i,t.memoizedState=null,i}function Mo(e,t){return t=Qs({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Hs(e,t,r,i){return i!==null&&lo(i),ei(t,e.child,null,r),e=Mo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function yd(e,t,r,i,c,_,D){if(r)return t.flags&256?(t.flags&=-257,i=Do(Error(h(422))),Hs(e,t,D,i)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(_=i.fallback,c=t.mode,i=Qs({mode:"visible",children:i.children},c,0,null),_=Hr(_,c,D,null),_.flags|=2,i.return=t,_.return=t,i.sibling=_,t.child=i,(t.mode&1)!==0&&ei(t,e.child,null,D),t.child.memoizedState=Po(D),t.memoizedState=Oo,_);if((t.mode&1)===0)return Hs(e,t,D,null);if(c.data==="$!"){if(i=c.nextSibling&&c.nextSibling.dataset,i)var N=i.dgst;return i=N,_=Error(h(419)),i=Do(_,i,void 0),Hs(e,t,D,i)}if(N=(D&e.childLanes)!==0,at||N){if(i=qe,i!==null){switch(D&-D){case 4:c=2;break;case 16:c=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:c=32;break;case 536870912:c=268435456;break;default:c=0}c=(c&(i.suspendedLanes|D))!==0?0:c,c!==0&&c!==_.retryLane&&(_.retryLane=c,Xt(e,c),Ot(i,e,c,-1))}return Qo(),i=Do(Error(h(421))),Hs(e,t,D,i)}return c.data==="$?"?(t.flags|=128,t.child=e.child,t=Od.bind(null,e),c._reactRetry=t,null):(e=_.treeContext,vt=ar(c.nextSibling),pt=t,Pe=!0,Dt=null,e!==null&&(gt[St++]=Kt,gt[St++]=qt,gt[St++]=Dr,Kt=e.id,qt=e.overflow,Dr=t),t=Mo(t,i.children),t.flags|=4096,t)}function Ic(e,t,r){e.lanes|=t;var i=e.alternate;i!==null&&(i.lanes|=t),uo(e.return,t,r)}function Io(e,t,r,i,c){var _=e.memoizedState;_===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:i,tail:r,tailMode:c}:(_.isBackwards=t,_.rendering=null,_.renderingStartTime=0,_.last=i,_.tail=r,_.tailMode=c)}function Nc(e,t,r){var i=t.pendingProps,c=i.revealOrder,_=i.tail;if(it(e,t,i.children,r),i=Me.current,(i&2)!==0)i=i&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ic(e,r,t);else if(e.tag===19)Ic(e,r,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}i&=1}if(De(Me,i),(t.mode&1)===0)t.memoizedState=null;else switch(c){case"forwards":for(r=t.child,c=null;r!==null;)e=r.alternate,e!==null&&As(e)===null&&(c=r),r=r.sibling;r=c,r===null?(c=t.child,t.child=null):(c=r.sibling,r.sibling=null),Io(t,!1,c,r,_);break;case"backwards":for(r=null,c=t.child,t.child=null;c!==null;){if(e=c.alternate,e!==null&&As(e)===null){t.child=c;break}e=c.sibling,c.sibling=r,r=c,c=e}Io(t,!0,r,null,_);break;case"together":Io(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fs(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Yt(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Pr|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(h(153));if(t.child!==null){for(e=t.child,r=Sr(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=Sr(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function wd(e,t,r){switch(t.tag){case 3:Oc(t),Zr();break;case 5:Qa(t);break;case 1:lt(t.type)&&ws(t);break;case 4:po(t,t.stateNode.containerInfo);break;case 10:var i=t.type._context,c=t.memoizedProps.value;De(Rs,i._currentValue),i._currentValue=c;break;case 13:if(i=t.memoizedState,i!==null)return i.dehydrated!==null?(De(Me,Me.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?Mc(e,t,r):(De(Me,Me.current&1),e=Yt(e,t,r),e!==null?e.sibling:null);De(Me,Me.current&1);break;case 19:if(i=(r&t.childLanes)!==0,(e.flags&128)!==0){if(i)return Nc(e,t,r);t.flags|=128}if(c=t.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),De(Me,Me.current),i)break;return null;case 22:case 23:return t.lanes=0,Tc(e,t,r)}return Yt(e,t,r)}var Hc,No,Fc,jc;Hc=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}},No=function(){},Fc=function(e,t,r,i){var c=e.memoizedProps;if(c!==i){e=t.stateNode,Br(Ht.current);var _=null;switch(r){case"input":c=Le(e,c),i=Le(e,i),_=[];break;case"select":c=O({},c,{value:void 0}),i=O({},i,{value:void 0}),_=[];break;case"textarea":c=Zt(e,c),i=Zt(e,i),_=[];break;default:typeof c.onClick!="function"&&typeof i.onClick=="function"&&(e.onclick=gs)}vn(r,i);var D;r=null;for(Y in c)if(!i.hasOwnProperty(Y)&&c.hasOwnProperty(Y)&&c[Y]!=null)if(Y==="style"){var N=c[Y];for(D in N)N.hasOwnProperty(D)&&(r||(r={}),r[D]="")}else Y!=="dangerouslySetInnerHTML"&&Y!=="children"&&Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&Y!=="autoFocus"&&(M.hasOwnProperty(Y)?_||(_=[]):(_=_||[]).push(Y,null));for(Y in i){var z=i[Y];if(N=c!=null?c[Y]:void 0,i.hasOwnProperty(Y)&&z!==N&&(z!=null||N!=null))if(Y==="style")if(N){for(D in N)!N.hasOwnProperty(D)||z&&z.hasOwnProperty(D)||(r||(r={}),r[D]="");for(D in z)z.hasOwnProperty(D)&&N[D]!==z[D]&&(r||(r={}),r[D]=z[D])}else r||(_||(_=[]),_.push(Y,r)),r=z;else Y==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,N=N?N.__html:void 0,z!=null&&N!==z&&(_=_||[]).push(Y,z)):Y==="children"?typeof z!="string"&&typeof z!="number"||(_=_||[]).push(Y,""+z):Y!=="suppressContentEditableWarning"&&Y!=="suppressHydrationWarning"&&(M.hasOwnProperty(Y)?(z!=null&&Y==="onScroll"&&Be("scroll",e),_||N===z||(_=[])):(_=_||[]).push(Y,z))}r&&(_=_||[]).push("style",r);var Y=_;(t.updateQueue=Y)&&(t.flags|=4)}},jc=function(e,t,r,i){r!==i&&(t.flags|=4)};function ji(e,t){if(!Pe)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var i=null;r!==null;)r.alternate!==null&&(i=r),r=r.sibling;i===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:i.sibling=null}}function et(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,i=0;if(t)for(var c=e.child;c!==null;)r|=c.lanes|c.childLanes,i|=c.subtreeFlags&14680064,i|=c.flags&14680064,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)r|=c.lanes|c.childLanes,i|=c.subtreeFlags,i|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=i,e.childLanes=r,t}function Cd(e,t,r){var i=t.pendingProps;switch(so(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(t),null;case 1:return lt(t.type)&&ys(),et(t),null;case 3:return i=t.stateNode,ii(),Oe(ot),Oe(Je),go(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(bs(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Dt!==null&&(Xo(Dt),Dt=null))),No(e,t),et(t),null;case 5:vo(t);var c=Br(Mi.current);if(r=t.type,e!==null&&t.stateNode!=null)Fc(e,t,r,i,c),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!i){if(t.stateNode===null)throw Error(h(166));return et(t),null}if(e=Br(Ht.current),bs(t)){i=t.stateNode,r=t.type;var _=t.memoizedProps;switch(i[Nt]=t,i[Ti]=_,e=(t.mode&1)!==0,r){case"dialog":Be("cancel",i),Be("close",i);break;case"iframe":case"object":case"embed":Be("load",i);break;case"video":case"audio":for(c=0;c<Ri.length;c++)Be(Ri[c],i);break;case"source":Be("error",i);break;case"img":case"image":case"link":Be("error",i),Be("load",i);break;case"details":Be("toggle",i);break;case"input":Te(i,_),Be("invalid",i);break;case"select":i._wrapperState={wasMultiple:!!_.multiple},Be("invalid",i);break;case"textarea":rt(i,_),Be("invalid",i)}vn(r,_),c=null;for(var D in _)if(_.hasOwnProperty(D)){var N=_[D];D==="children"?typeof N=="string"?i.textContent!==N&&(_.suppressHydrationWarning!==!0&&ms(i.textContent,N,e),c=["children",N]):typeof N=="number"&&i.textContent!==""+N&&(_.suppressHydrationWarning!==!0&&ms(i.textContent,N,e),c=["children",""+N]):M.hasOwnProperty(D)&&N!=null&&D==="onScroll"&&Be("scroll",i)}switch(r){case"input":de(i),Jt(i,_,!0);break;case"textarea":de(i),dt(i);break;case"select":case"option":break;default:typeof _.onClick=="function"&&(i.onclick=gs)}i=c,t.updateQueue=i,i!==null&&(t.flags|=4)}else{D=c.nodeType===9?c:c.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=tr(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=D.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof i.is=="string"?e=D.createElement(r,{is:i.is}):(e=D.createElement(r),r==="select"&&(D=e,i.multiple?D.multiple=!0:i.size&&(D.size=i.size))):e=D.createElementNS(e,r),e[Nt]=t,e[Ti]=i,Hc(e,t,!1,!1),t.stateNode=e;e:{switch(D=mn(r,i),r){case"dialog":Be("cancel",e),Be("close",e),c=i;break;case"iframe":case"object":case"embed":Be("load",e),c=i;break;case"video":case"audio":for(c=0;c<Ri.length;c++)Be(Ri[c],e);c=i;break;case"source":Be("error",e),c=i;break;case"img":case"image":case"link":Be("error",e),Be("load",e),c=i;break;case"details":Be("toggle",e),c=i;break;case"input":Te(e,i),c=Le(e,i),Be("invalid",e);break;case"option":c=i;break;case"select":e._wrapperState={wasMultiple:!!i.multiple},c=O({},i,{value:void 0}),Be("invalid",e);break;case"textarea":rt(e,i),c=Zt(e,i),Be("invalid",e);break;default:c=i}vn(r,c),N=c;for(_ in N)if(N.hasOwnProperty(_)){var z=N[_];_==="style"?Dl(e,z):_==="dangerouslySetInnerHTML"?(z=z?z.__html:void 0,z!=null&&br(e,z)):_==="children"?typeof z=="string"?(r!=="textarea"||z!=="")&&nt(e,z):typeof z=="number"&&nt(e,""+z):_!=="suppressContentEditableWarning"&&_!=="suppressHydrationWarning"&&_!=="autoFocus"&&(M.hasOwnProperty(_)?z!=null&&_==="onScroll"&&Be("scroll",e):z!=null&&n(e,_,z,D))}switch(r){case"input":de(e),Jt(e,i,!1);break;case"textarea":de(e),dt(e);break;case"option":i.value!=null&&e.setAttribute("value",""+B(i.value));break;case"select":e.multiple=!!i.multiple,_=i.value,_!=null?Mt(e,!!i.multiple,_,!1):i.defaultValue!=null&&Mt(e,!!i.multiple,i.defaultValue,!0);break;default:typeof c.onClick=="function"&&(e.onclick=gs)}switch(r){case"button":case"input":case"select":case"textarea":i=!!i.autoFocus;break e;case"img":i=!0;break e;default:i=!1}}i&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return et(t),null;case 6:if(e&&t.stateNode!=null)jc(e,t,e.memoizedProps,i);else{if(typeof i!="string"&&t.stateNode===null)throw Error(h(166));if(r=Br(Mi.current),Br(Ht.current),bs(t)){if(i=t.stateNode,r=t.memoizedProps,i[Nt]=t,(_=i.nodeValue!==r)&&(e=pt,e!==null))switch(e.tag){case 3:ms(i.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&ms(i.nodeValue,r,(e.mode&1)!==0)}_&&(t.flags|=4)}else i=(r.nodeType===9?r:r.ownerDocument).createTextNode(i),i[Nt]=t,t.stateNode=i}return et(t),null;case 13:if(Oe(Me),i=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Pe&&vt!==null&&(t.mode&1)!==0&&(t.flags&128)===0)Wa(),Zr(),t.flags|=98560,_=!1;else if(_=bs(t),i!==null&&i.dehydrated!==null){if(e===null){if(!_)throw Error(h(318));if(_=t.memoizedState,_=_!==null?_.dehydrated:null,!_)throw Error(h(317));_[Nt]=t}else Zr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;et(t),_=!1}else Dt!==null&&(Xo(Dt),Dt=null),_=!0;if(!_)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(i=i!==null,i!==(e!==null&&e.memoizedState!==null)&&i&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Me.current&1)!==0?We===0&&(We=3):Qo())),t.updateQueue!==null&&(t.flags|=4),et(t),null);case 4:return ii(),No(e,t),e===null&&Li(t.stateNode.containerInfo),et(t),null;case 10:return ho(t.type._context),et(t),null;case 17:return lt(t.type)&&ys(),et(t),null;case 19:if(Oe(Me),_=t.memoizedState,_===null)return et(t),null;if(i=(t.flags&128)!==0,D=_.rendering,D===null)if(i)ji(_,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(D=As(e),D!==null){for(t.flags|=128,ji(_,!1),i=D.updateQueue,i!==null&&(t.updateQueue=i,t.flags|=4),t.subtreeFlags=0,i=r,r=t.child;r!==null;)_=r,e=i,_.flags&=14680066,D=_.alternate,D===null?(_.childLanes=0,_.lanes=e,_.child=null,_.subtreeFlags=0,_.memoizedProps=null,_.memoizedState=null,_.updateQueue=null,_.dependencies=null,_.stateNode=null):(_.childLanes=D.childLanes,_.lanes=D.lanes,_.child=D.child,_.subtreeFlags=0,_.deletions=null,_.memoizedProps=D.memoizedProps,_.memoizedState=D.memoizedState,_.updateQueue=D.updateQueue,_.type=D.type,e=D.dependencies,_.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return De(Me,Me.current&1|2),t.child}e=e.sibling}_.tail!==null&&He()>li&&(t.flags|=128,i=!0,ji(_,!1),t.lanes=4194304)}else{if(!i)if(e=As(D),e!==null){if(t.flags|=128,i=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),ji(_,!0),_.tail===null&&_.tailMode==="hidden"&&!D.alternate&&!Pe)return et(t),null}else 2*He()-_.renderingStartTime>li&&r!==1073741824&&(t.flags|=128,i=!0,ji(_,!1),t.lanes=4194304);_.isBackwards?(D.sibling=t.child,t.child=D):(r=_.last,r!==null?r.sibling=D:t.child=D,_.last=D)}return _.tail!==null?(t=_.tail,_.rendering=t,_.tail=t.sibling,_.renderingStartTime=He(),t.sibling=null,r=Me.current,De(Me,i?r&1|2:r&1),t):(et(t),null);case 22:case 23:return Yo(),i=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==i&&(t.flags|=8192),i&&(t.mode&1)!==0?(mt&1073741824)!==0&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),null;case 24:return null;case 25:return null}throw Error(h(156,t.tag))}function Ed(e,t){switch(so(t),t.tag){case 1:return lt(t.type)&&ys(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ii(),Oe(ot),Oe(Je),go(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return vo(t),null;case 13:if(Oe(Me),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(h(340));Zr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Oe(Me),null;case 4:return ii(),null;case 10:return ho(t.type._context),null;case 22:case 23:return Yo(),null;case 24:return null;default:return null}}var js=!1,tt=!1,kd=typeof WeakSet=="function"?WeakSet:Set,_e=null;function ni(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(i){Ne(e,t,i)}else r.current=null}function Ho(e,t,r){try{r()}catch(i){Ne(e,t,i)}}var zc=!1;function bd(e,t){if(Gn=os,e=Sa(),zn(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var c=i.anchorOffset,_=i.focusNode;i=i.focusOffset;try{r.nodeType,_.nodeType}catch{r=null;break e}var D=0,N=-1,z=-1,Y=0,se=0,oe=e,ie=null;t:for(;;){for(var fe;oe!==r||c!==0&&oe.nodeType!==3||(N=D+c),oe!==_||i!==0&&oe.nodeType!==3||(z=D+i),oe.nodeType===3&&(D+=oe.nodeValue.length),(fe=oe.firstChild)!==null;)ie=oe,oe=fe;for(;;){if(oe===e)break t;if(ie===r&&++Y===c&&(N=D),ie===_&&++se===i&&(z=D),(fe=oe.nextSibling)!==null)break;oe=ie,ie=oe.parentNode}oe=fe}r=N===-1||z===-1?null:{start:N,end:z}}else r=null}r=r||{start:0,end:0}}else r=null;for(Yn={focusedElem:e,selectionRange:r},os=!1,_e=t;_e!==null;)if(t=_e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_e=e;else for(;_e!==null;){t=_e;try{var pe=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(pe!==null){var ve=pe.memoizedProps,Fe=pe.memoizedState,K=t.stateNode,V=K.getSnapshotBeforeUpdate(t.elementType===t.type?ve:Tt(t.type,ve),Fe);K.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var q=t.stateNode.containerInfo;q.nodeType===1?q.textContent="":q.nodeType===9&&q.documentElement&&q.removeChild(q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(h(163))}}catch(ae){Ne(t,t.return,ae)}if(e=t.sibling,e!==null){e.return=t.return,_e=e;break}_e=t.return}return pe=zc,zc=!1,pe}function zi(e,t,r){var i=t.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var c=i=i.next;do{if((c.tag&e)===e){var _=c.destroy;c.destroy=void 0,_!==void 0&&Ho(t,r,_)}c=c.next}while(c!==i)}}function zs(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var i=r.create;r.destroy=i()}r=r.next}while(r!==t)}}function Fo(e){var t=e.ref;if(t!==null){var r=e.stateNode;switch(e.tag){case 5:e=r;break;default:e=r}typeof t=="function"?t(e):t.current=e}}function Uc(e){var t=e.alternate;t!==null&&(e.alternate=null,Uc(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Nt],delete t[Ti],delete t[eo],delete t[ld],delete t[ad])),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 Wc(e){return e.tag===5||e.tag===3||e.tag===4}function $c(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wc(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 jo(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=gs));else if(i!==4&&(e=e.child,e!==null))for(jo(e,t,r),e=e.sibling;e!==null;)jo(e,t,r),e=e.sibling}function zo(e,t,r){var i=e.tag;if(i===5||i===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(i!==4&&(e=e.child,e!==null))for(zo(e,t,r),e=e.sibling;e!==null;)zo(e,t,r),e=e.sibling}var Ye=null,At=!1;function _r(e,t,r){for(r=r.child;r!==null;)Vc(e,t,r),r=r.sibling}function Vc(e,t,r){if(It&&typeof It.onCommitFiberUnmount=="function")try{It.onCommitFiberUnmount(es,r)}catch{}switch(r.tag){case 5:tt||ni(r,t);case 6:var i=Ye,c=At;Ye=null,_r(e,t,r),Ye=i,At=c,Ye!==null&&(At?(e=Ye,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):Ye.removeChild(r.stateNode));break;case 18:Ye!==null&&(At?(e=Ye,r=r.stateNode,e.nodeType===8?Zn(e.parentNode,r):e.nodeType===1&&Zn(e,r),Si(e)):Zn(Ye,r.stateNode));break;case 4:i=Ye,c=At,Ye=r.stateNode.containerInfo,At=!0,_r(e,t,r),Ye=i,At=c;break;case 0:case 11:case 14:case 15:if(!tt&&(i=r.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){c=i=i.next;do{var _=c,D=_.destroy;_=_.tag,D!==void 0&&((_&2)!==0||(_&4)!==0)&&Ho(r,t,D),c=c.next}while(c!==i)}_r(e,t,r);break;case 1:if(!tt&&(ni(r,t),i=r.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=r.memoizedProps,i.state=r.memoizedState,i.componentWillUnmount()}catch(N){Ne(r,t,N)}_r(e,t,r);break;case 21:_r(e,t,r);break;case 22:r.mode&1?(tt=(i=tt)||r.memoizedState!==null,_r(e,t,r),tt=i):_r(e,t,r);break;default:_r(e,t,r)}}function Kc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new kd),t.forEach(function(i){var c=Pd.bind(null,e,i);r.has(i)||(r.add(i),i.then(c,c))})}}function Bt(e,t){var r=t.deletions;if(r!==null)for(var i=0;i<r.length;i++){var c=r[i];try{var _=e,D=t,N=D;e:for(;N!==null;){switch(N.tag){case 5:Ye=N.stateNode,At=!1;break e;case 3:Ye=N.stateNode.containerInfo,At=!0;break e;case 4:Ye=N.stateNode.containerInfo,At=!0;break e}N=N.return}if(Ye===null)throw Error(h(160));Vc(_,D,c),Ye=null,At=!1;var z=c.alternate;z!==null&&(z.return=null),c.return=null}catch(Y){Ne(c,t,Y)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)qc(t,e),t=t.sibling}function qc(e,t){var r=e.alternate,i=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Bt(t,e),jt(e),i&4){try{zi(3,e,e.return),zs(3,e)}catch(ve){Ne(e,e.return,ve)}try{zi(5,e,e.return)}catch(ve){Ne(e,e.return,ve)}}break;case 1:Bt(t,e),jt(e),i&512&&r!==null&&ni(r,r.return);break;case 5:if(Bt(t,e),jt(e),i&512&&r!==null&&ni(r,r.return),e.flags&32){var c=e.stateNode;try{nt(c,"")}catch(ve){Ne(e,e.return,ve)}}if(i&4&&(c=e.stateNode,c!=null)){var _=e.memoizedProps,D=r!==null?r.memoizedProps:_,N=e.type,z=e.updateQueue;if(e.updateQueue=null,z!==null)try{N==="input"&&_.type==="radio"&&_.name!=null&&Ge(c,_),mn(N,D);var Y=mn(N,_);for(D=0;D<z.length;D+=2){var se=z[D],oe=z[D+1];se==="style"?Dl(c,oe):se==="dangerouslySetInnerHTML"?br(c,oe):se==="children"?nt(c,oe):n(c,se,oe,Y)}switch(N){case"input":ye(c,_);break;case"textarea":er(c,_);break;case"select":var ie=c._wrapperState.wasMultiple;c._wrapperState.wasMultiple=!!_.multiple;var fe=_.value;fe!=null?Mt(c,!!_.multiple,fe,!1):ie!==!!_.multiple&&(_.defaultValue!=null?Mt(c,!!_.multiple,_.defaultValue,!0):Mt(c,!!_.multiple,_.multiple?[]:"",!1))}c[Ti]=_}catch(ve){Ne(e,e.return,ve)}}break;case 6:if(Bt(t,e),jt(e),i&4){if(e.stateNode===null)throw Error(h(162));c=e.stateNode,_=e.memoizedProps;try{c.nodeValue=_}catch(ve){Ne(e,e.return,ve)}}break;case 3:if(Bt(t,e),jt(e),i&4&&r!==null&&r.memoizedState.isDehydrated)try{Si(t.containerInfo)}catch(ve){Ne(e,e.return,ve)}break;case 4:Bt(t,e),jt(e);break;case 13:Bt(t,e),jt(e),c=e.child,c.flags&8192&&(_=c.memoizedState!==null,c.stateNode.isHidden=_,!_||c.alternate!==null&&c.alternate.memoizedState!==null||($o=He())),i&4&&Kc(e);break;case 22:if(se=r!==null&&r.memoizedState!==null,e.mode&1?(tt=(Y=tt)||se,Bt(t,e),tt=Y):Bt(t,e),jt(e),i&8192){if(Y=e.memoizedState!==null,(e.stateNode.isHidden=Y)&&!se&&(e.mode&1)!==0)for(_e=e,se=e.child;se!==null;){for(oe=_e=se;_e!==null;){switch(ie=_e,fe=ie.child,ie.tag){case 0:case 11:case 14:case 15:zi(4,ie,ie.return);break;case 1:ni(ie,ie.return);var pe=ie.stateNode;if(typeof pe.componentWillUnmount=="function"){i=ie,r=ie.return;try{t=i,pe.props=t.memoizedProps,pe.state=t.memoizedState,pe.componentWillUnmount()}catch(ve){Ne(i,r,ve)}}break;case 5:ni(ie,ie.return);break;case 22:if(ie.memoizedState!==null){Yc(oe);continue}}fe!==null?(fe.return=ie,_e=fe):Yc(oe)}se=se.sibling}e:for(se=null,oe=e;;){if(oe.tag===5){if(se===null){se=oe;try{c=oe.stateNode,Y?(_=c.style,typeof _.setProperty=="function"?_.setProperty("display","none","important"):_.display="none"):(N=oe.stateNode,z=oe.memoizedProps.style,D=z!=null&&z.hasOwnProperty("display")?z.display:null,N.style.display=Yi("display",D))}catch(ve){Ne(e,e.return,ve)}}}else if(oe.tag===6){if(se===null)try{oe.stateNode.nodeValue=Y?"":oe.memoizedProps}catch(ve){Ne(e,e.return,ve)}}else if((oe.tag!==22&&oe.tag!==23||oe.memoizedState===null||oe===e)&&oe.child!==null){oe.child.return=oe,oe=oe.child;continue}if(oe===e)break e;for(;oe.sibling===null;){if(oe.return===null||oe.return===e)break e;se===oe&&(se=null),oe=oe.return}se===oe&&(se=null),oe.sibling.return=oe.return,oe=oe.sibling}}break;case 19:Bt(t,e),jt(e),i&4&&Kc(e);break;case 21:break;default:Bt(t,e),jt(e)}}function jt(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(Wc(r)){var i=r;break e}r=r.return}throw Error(h(160))}switch(i.tag){case 5:var c=i.stateNode;i.flags&32&&(nt(c,""),i.flags&=-33);var _=$c(e);zo(e,_,c);break;case 3:case 4:var D=i.stateNode.containerInfo,N=$c(e);jo(e,N,D);break;default:throw Error(h(161))}}catch(z){Ne(e,e.return,z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function xd(e,t,r){_e=e,Xc(e)}function Xc(e,t,r){for(var i=(e.mode&1)!==0;_e!==null;){var c=_e,_=c.child;if(c.tag===22&&i){var D=c.memoizedState!==null||js;if(!D){var N=c.alternate,z=N!==null&&N.memoizedState!==null||tt;N=js;var Y=tt;if(js=D,(tt=z)&&!Y)for(_e=c;_e!==null;)D=_e,z=D.child,D.tag===22&&D.memoizedState!==null?Qc(c):z!==null?(z.return=D,_e=z):Qc(c);for(;_!==null;)_e=_,Xc(_),_=_.sibling;_e=c,js=N,tt=Y}Gc(e)}else(c.subtreeFlags&8772)!==0&&_!==null?(_.return=c,_e=_):Gc(e)}}function Gc(e){for(;_e!==null;){var t=_e;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:tt||zs(5,t);break;case 1:var i=t.stateNode;if(t.flags&4&&!tt)if(r===null)i.componentDidMount();else{var c=t.elementType===t.type?r.memoizedProps:Tt(t.type,r.memoizedProps);i.componentDidUpdate(c,r.memoizedState,i.__reactInternalSnapshotBeforeUpdate)}var _=t.updateQueue;_!==null&&Ya(t,_,i);break;case 3:var D=t.updateQueue;if(D!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}Ya(t,D,r)}break;case 5:var N=t.stateNode;if(r===null&&t.flags&4){r=N;var z=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":z.autoFocus&&r.focus();break;case"img":z.src&&(r.src=z.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var Y=t.alternate;if(Y!==null){var se=Y.memoizedState;if(se!==null){var oe=se.dehydrated;oe!==null&&Si(oe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(h(163))}tt||t.flags&512&&Fo(t)}catch(ie){Ne(t,t.return,ie)}}if(t===e){_e=null;break}if(r=t.sibling,r!==null){r.return=t.return,_e=r;break}_e=t.return}}function Yc(e){for(;_e!==null;){var t=_e;if(t===e){_e=null;break}var r=t.sibling;if(r!==null){r.return=t.return,_e=r;break}_e=t.return}}function Qc(e){for(;_e!==null;){var t=_e;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{zs(4,t)}catch(z){Ne(t,r,z)}break;case 1:var i=t.stateNode;if(typeof i.componentDidMount=="function"){var c=t.return;try{i.componentDidMount()}catch(z){Ne(t,c,z)}}var _=t.return;try{Fo(t)}catch(z){Ne(t,_,z)}break;case 5:var D=t.return;try{Fo(t)}catch(z){Ne(t,D,z)}}}catch(z){Ne(t,t.return,z)}if(t===e){_e=null;break}var N=t.sibling;if(N!==null){N.return=t.return,_e=N;break}_e=t.return}}var Rd=Math.ceil,Us=p.ReactCurrentDispatcher,Uo=p.ReactCurrentOwner,Ct=p.ReactCurrentBatchConfig,be=0,qe=null,je=null,Qe=0,mt=0,oi=cr(0),We=0,Ui=null,Pr=0,Ws=0,Wo=0,Wi=null,ct=null,$o=0,li=1/0,Qt=null,$s=!1,Vo=null,pr=null,Vs=!1,vr=null,Ks=0,$i=0,Ko=null,qs=-1,Xs=0;function st(){return(be&6)!==0?He():qs!==-1?qs:qs=He()}function mr(e){return(e.mode&1)===0?1:(be&2)!==0&&Qe!==0?Qe&-Qe:hd.transition!==null?(Xs===0&&(Xs=$l()),Xs):(e=Re,e!==0||(e=window.event,e=e===void 0?16:Zl(e.type)),e)}function Ot(e,t,r,i){if(50<$i)throw $i=0,Ko=null,Error(h(185));_i(e,r,i),((be&2)===0||e!==qe)&&(e===qe&&((be&2)===0&&(Ws|=r),We===4&&gr(e,Qe)),ht(e,i),r===1&&be===0&&(t.mode&1)===0&&(li=He()+500,Cs&&ur()))}function ht(e,t){var r=e.callbackNode;hu(e,t);var i=is(e,e===qe?Qe:0);if(i===0)r!==null&&zl(r),e.callbackNode=null,e.callbackPriority=0;else if(t=i&-i,e.callbackPriority!==t){if(r!=null&&zl(r),t===1)e.tag===0?cd(Zc.bind(null,e)):Ha(Zc.bind(null,e)),nd(function(){(be&6)===0&&ur()}),r=null;else{switch(Vl(i)){case 1:r=kn;break;case 4:r=Ul;break;case 16:r=Zi;break;case 536870912:r=Wl;break;default:r=Zi}r=lh(r,Jc.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function Jc(e,t){if(qs=-1,Xs=0,(be&6)!==0)throw Error(h(327));var r=e.callbackNode;if(ai()&&e.callbackNode!==r)return null;var i=is(e,e===qe?Qe:0);if(i===0)return null;if((i&30)!==0||(i&e.expiredLanes)!==0||t)t=Gs(e,i);else{t=i;var c=be;be|=2;var _=th();(qe!==e||Qe!==t)&&(Qt=null,li=He()+500,Ir(e,t));do try{Td();break}catch(N){eh(e,N)}while(!0);co(),Us.current=_,be=c,je!==null?t=0:(qe=null,Qe=0,t=We)}if(t!==0){if(t===2&&(c=bn(e),c!==0&&(i=c,t=qo(e,c))),t===1)throw r=Ui,Ir(e,0),gr(e,i),ht(e,He()),r;if(t===6)gr(e,i);else{if(c=e.current.alternate,(i&30)===0&&!Ld(c)&&(t=Gs(e,i),t===2&&(_=bn(e),_!==0&&(i=_,t=qo(e,_))),t===1))throw r=Ui,Ir(e,0),gr(e,i),ht(e,He()),r;switch(e.finishedWork=c,e.finishedLanes=i,t){case 0:case 1:throw Error(h(345));case 2:Nr(e,ct,Qt);break;case 3:if(gr(e,i),(i&130023424)===i&&(t=$o+500-He(),10<t)){if(is(e,0)!==0)break;if(c=e.suspendedLanes,(c&i)!==i){st(),e.pingedLanes|=e.suspendedLanes&c;break}e.timeoutHandle=Jn(Nr.bind(null,e,ct,Qt),t);break}Nr(e,ct,Qt);break;case 4:if(gr(e,i),(i&4194240)===i)break;for(t=e.eventTimes,c=-1;0<i;){var D=31-Rt(i);_=1<<D,D=t[D],D>c&&(c=D),i&=~_}if(i=c,i=He()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*Rd(i/1960))-i,10<i){e.timeoutHandle=Jn(Nr.bind(null,e,ct,Qt),i);break}Nr(e,ct,Qt);break;case 5:Nr(e,ct,Qt);break;default:throw Error(h(329))}}}return ht(e,He()),e.callbackNode===r?Jc.bind(null,e):null}function qo(e,t){var r=Wi;return e.current.memoizedState.isDehydrated&&(Ir(e,t).flags|=256),e=Gs(e,t),e!==2&&(t=ct,ct=r,t!==null&&Xo(t)),e}function Xo(e){ct===null?ct=e:ct.push.apply(ct,e)}function Ld(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var i=0;i<r.length;i++){var c=r[i],_=c.getSnapshot;c=c.value;try{if(!Lt(_(),c))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;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 gr(e,t){for(t&=~Wo,t&=~Ws,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-Rt(t),i=1<<r;e[r]=-1,t&=~i}}function Zc(e){if((be&6)!==0)throw Error(h(327));ai();var t=is(e,0);if((t&1)===0)return ht(e,He()),null;var r=Gs(e,t);if(e.tag!==0&&r===2){var i=bn(e);i!==0&&(t=i,r=qo(e,i))}if(r===1)throw r=Ui,Ir(e,0),gr(e,t),ht(e,He()),r;if(r===6)throw Error(h(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Nr(e,ct,Qt),ht(e,He()),null}function Go(e,t){var r=be;be|=1;try{return e(t)}finally{be=r,be===0&&(li=He()+500,Cs&&ur())}}function Mr(e){vr!==null&&vr.tag===0&&(be&6)===0&&ai();var t=be;be|=1;var r=Ct.transition,i=Re;try{if(Ct.transition=null,Re=1,e)return e()}finally{Re=i,Ct.transition=r,be=t,(be&6)===0&&ur()}}function Yo(){mt=oi.current,Oe(oi)}function Ir(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,sd(r)),je!==null)for(r=je.return;r!==null;){var i=r;switch(so(i),i.tag){case 1:i=i.type.childContextTypes,i!=null&&ys();break;case 3:ii(),Oe(ot),Oe(Je),go();break;case 5:vo(i);break;case 4:ii();break;case 13:Oe(Me);break;case 19:Oe(Me);break;case 10:ho(i.type._context);break;case 22:case 23:Yo()}r=r.return}if(qe=e,je=e=Sr(e.current,null),Qe=mt=t,We=0,Ui=null,Wo=Ws=Pr=0,ct=Wi=null,Ar!==null){for(t=0;t<Ar.length;t++)if(r=Ar[t],i=r.interleaved,i!==null){r.interleaved=null;var c=i.next,_=r.pending;if(_!==null){var D=_.next;_.next=c,i.next=D}r.pending=i}Ar=null}return e}function eh(e,t){do{var r=je;try{if(co(),Bs.current=Is,Os){for(var i=Ie.memoizedState;i!==null;){var c=i.queue;c!==null&&(c.pending=null),i=i.next}Os=!1}if(Or=0,Ke=Ue=Ie=null,Ii=!1,Ni=0,Uo.current=null,r===null||r.return===null){We=1,Ui=t,je=null;break}e:{var _=e,D=r.return,N=r,z=t;if(t=Qe,N.flags|=32768,z!==null&&typeof z=="object"&&typeof z.then=="function"){var Y=z,se=N,oe=se.tag;if((se.mode&1)===0&&(oe===0||oe===11||oe===15)){var ie=se.alternate;ie?(se.updateQueue=ie.updateQueue,se.memoizedState=ie.memoizedState,se.lanes=ie.lanes):(se.updateQueue=null,se.memoizedState=null)}var fe=bc(D);if(fe!==null){fe.flags&=-257,xc(fe,D,N,_,t),fe.mode&1&&kc(_,Y,t),t=fe,z=Y;var pe=t.updateQueue;if(pe===null){var ve=new Set;ve.add(z),t.updateQueue=ve}else pe.add(z);break e}else{if((t&1)===0){kc(_,Y,t),Qo();break e}z=Error(h(426))}}else if(Pe&&N.mode&1){var Fe=bc(D);if(Fe!==null){(Fe.flags&65536)===0&&(Fe.flags|=256),xc(Fe,D,N,_,t),lo(si(z,N));break e}}_=z=si(z,N),We!==4&&(We=2),Wi===null?Wi=[_]:Wi.push(_),_=D;do{switch(_.tag){case 3:_.flags|=65536,t&=-t,_.lanes|=t;var K=Cc(_,z,t);Ga(_,K);break e;case 1:N=z;var V=_.type,q=_.stateNode;if((_.flags&128)===0&&(typeof V.getDerivedStateFromError=="function"||q!==null&&typeof q.componentDidCatch=="function"&&(pr===null||!pr.has(q)))){_.flags|=65536,t&=-t,_.lanes|=t;var ae=Ec(_,N,t);Ga(_,ae);break e}}_=_.return}while(_!==null)}ih(r)}catch(me){t=me,je===r&&r!==null&&(je=r=r.return);continue}break}while(!0)}function th(){var e=Us.current;return Us.current=Is,e===null?Is:e}function Qo(){(We===0||We===3||We===2)&&(We=4),qe===null||(Pr&268435455)===0&&(Ws&268435455)===0||gr(qe,Qe)}function Gs(e,t){var r=be;be|=2;var i=th();(qe!==e||Qe!==t)&&(Qt=null,Ir(e,t));do try{Dd();break}catch(c){eh(e,c)}while(!0);if(co(),be=r,Us.current=i,je!==null)throw Error(h(261));return qe=null,Qe=0,We}function Dd(){for(;je!==null;)rh(je)}function Td(){for(;je!==null&&!tu();)rh(je)}function rh(e){var t=oh(e.alternate,e,mt);e.memoizedProps=e.pendingProps,t===null?ih(e):je=t,Uo.current=null}function ih(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=Cd(r,t,mt),r!==null){je=r;return}}else{if(r=Ed(r,t),r!==null){r.flags&=32767,je=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{We=6,je=null;return}}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);We===0&&(We=5)}function Nr(e,t,r){var i=Re,c=Ct.transition;try{Ct.transition=null,Re=1,Ad(e,t,r,i)}finally{Ct.transition=c,Re=i}return null}function Ad(e,t,r,i){do ai();while(vr!==null);if((be&6)!==0)throw Error(h(327));r=e.finishedWork;var c=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(h(177));e.callbackNode=null,e.callbackPriority=0;var _=r.lanes|r.childLanes;if(uu(e,_),e===qe&&(je=qe=null,Qe=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Vs||(Vs=!0,lh(Zi,function(){return ai(),null})),_=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||_){_=Ct.transition,Ct.transition=null;var D=Re;Re=1;var N=be;be|=4,Uo.current=null,bd(e,r),qc(r,e),Qu(Yn),os=!!Gn,Yn=Gn=null,e.current=r,xd(r),ru(),be=N,Re=D,Ct.transition=_}else e.current=r;if(Vs&&(Vs=!1,vr=e,Ks=c),_=e.pendingLanes,_===0&&(pr=null),nu(r.stateNode),ht(e,He()),t!==null)for(i=e.onRecoverableError,r=0;r<t.length;r++)c=t[r],i(c.value,{componentStack:c.stack,digest:c.digest});if($s)throw $s=!1,e=Vo,Vo=null,e;return(Ks&1)!==0&&e.tag!==0&&ai(),_=e.pendingLanes,(_&1)!==0?e===Ko?$i++:($i=0,Ko=e):$i=0,ur(),null}function ai(){if(vr!==null){var e=Vl(Ks),t=Ct.transition,r=Re;try{if(Ct.transition=null,Re=16>e?16:e,vr===null)var i=!1;else{if(e=vr,vr=null,Ks=0,(be&6)!==0)throw Error(h(331));var c=be;for(be|=4,_e=e.current;_e!==null;){var _=_e,D=_.child;if((_e.flags&16)!==0){var N=_.deletions;if(N!==null){for(var z=0;z<N.length;z++){var Y=N[z];for(_e=Y;_e!==null;){var se=_e;switch(se.tag){case 0:case 11:case 15:zi(8,se,_)}var oe=se.child;if(oe!==null)oe.return=se,_e=oe;else for(;_e!==null;){se=_e;var ie=se.sibling,fe=se.return;if(Uc(se),se===Y){_e=null;break}if(ie!==null){ie.return=fe,_e=ie;break}_e=fe}}}var pe=_.alternate;if(pe!==null){var ve=pe.child;if(ve!==null){pe.child=null;do{var Fe=ve.sibling;ve.sibling=null,ve=Fe}while(ve!==null)}}_e=_}}if((_.subtreeFlags&2064)!==0&&D!==null)D.return=_,_e=D;else e:for(;_e!==null;){if(_=_e,(_.flags&2048)!==0)switch(_.tag){case 0:case 11:case 15:zi(9,_,_.return)}var K=_.sibling;if(K!==null){K.return=_.return,_e=K;break e}_e=_.return}}var V=e.current;for(_e=V;_e!==null;){D=_e;var q=D.child;if((D.subtreeFlags&2064)!==0&&q!==null)q.return=D,_e=q;else e:for(D=V;_e!==null;){if(N=_e,(N.flags&2048)!==0)try{switch(N.tag){case 0:case 11:case 15:zs(9,N)}}catch(me){Ne(N,N.return,me)}if(N===D){_e=null;break e}var ae=N.sibling;if(ae!==null){ae.return=N.return,_e=ae;break e}_e=N.return}}if(be=c,ur(),It&&typeof It.onPostCommitFiberRoot=="function")try{It.onPostCommitFiberRoot(es,e)}catch{}i=!0}return i}finally{Re=r,Ct.transition=t}}return!1}function sh(e,t,r){t=si(r,t),t=Cc(e,t,1),e=fr(e,t,1),t=st(),e!==null&&(_i(e,1,t),ht(e,t))}function Ne(e,t,r){if(e.tag===3)sh(e,e,r);else for(;t!==null;){if(t.tag===3){sh(t,e,r);break}else if(t.tag===1){var i=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof i.componentDidCatch=="function"&&(pr===null||!pr.has(i))){e=si(r,e),e=Ec(t,e,1),t=fr(t,e,1),e=st(),t!==null&&(_i(t,1,e),ht(t,e));break}}t=t.return}}function Bd(e,t,r){var i=e.pingCache;i!==null&&i.delete(t),t=st(),e.pingedLanes|=e.suspendedLanes&r,qe===e&&(Qe&r)===r&&(We===4||We===3&&(Qe&130023424)===Qe&&500>He()-$o?Ir(e,0):Wo|=r),ht(e,t)}function nh(e,t){t===0&&((e.mode&1)===0?t=1:(t=rs,rs<<=1,(rs&130023424)===0&&(rs=4194304)));var r=st();e=Xt(e,t),e!==null&&(_i(e,t,r),ht(e,r))}function Od(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),nh(e,r)}function Pd(e,t){var r=0;switch(e.tag){case 13:var i=e.stateNode,c=e.memoizedState;c!==null&&(r=c.retryLane);break;case 19:i=e.stateNode;break;default:throw Error(h(314))}i!==null&&i.delete(t),nh(e,r)}var oh;oh=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||ot.current)at=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return at=!1,wd(e,t,r);at=(e.flags&131072)!==0}else at=!1,Pe&&(t.flags&1048576)!==0&&Fa(t,ks,t.index);switch(t.lanes=0,t.tag){case 2:var i=t.type;Fs(e,t),e=t.pendingProps;var c=Yr(t,Je.current);ri(t,r),c=wo(null,t,i,e,c,r);var _=Co();return t.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,lt(i)?(_=!0,ws(t)):_=!1,t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,_o(t),c.updater=Ns,t.stateNode=c,c._reactInternals=t,Lo(t,i,e,r),t=Bo(null,t,i,!0,_,r)):(t.tag=0,Pe&&_&&io(t),it(null,t,c,r),t=t.child),t;case 16:i=t.elementType;e:{switch(Fs(e,t),e=t.pendingProps,c=i._init,i=c(i._payload),t.type=i,c=t.tag=Id(i),e=Tt(i,e),c){case 0:t=Ao(null,t,i,e,r);break e;case 1:t=Bc(null,t,i,e,r);break e;case 11:t=Rc(null,t,i,e,r);break e;case 14:t=Lc(null,t,i,Tt(i.type,e),r);break e}throw Error(h(306,i,""))}return t;case 0:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:Tt(i,c),Ao(e,t,i,c,r);case 1:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:Tt(i,c),Bc(e,t,i,c,r);case 3:e:{if(Oc(t),e===null)throw Error(h(387));i=t.pendingProps,_=t.memoizedState,c=_.element,Xa(e,t),Ts(t,i,null,r);var D=t.memoizedState;if(i=D.element,_.isDehydrated)if(_={element:i,isDehydrated:!1,cache:D.cache,pendingSuspenseBoundaries:D.pendingSuspenseBoundaries,transitions:D.transitions},t.updateQueue.baseState=_,t.memoizedState=_,t.flags&256){c=si(Error(h(423)),t),t=Pc(e,t,i,r,c);break e}else if(i!==c){c=si(Error(h(424)),t),t=Pc(e,t,i,r,c);break e}else for(vt=ar(t.stateNode.containerInfo.firstChild),pt=t,Pe=!0,Dt=null,r=Ka(t,null,i,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(Zr(),i===c){t=Yt(e,t,r);break e}it(e,t,i,r)}t=t.child}return t;case 5:return Qa(t),e===null&&oo(t),i=t.type,c=t.pendingProps,_=e!==null?e.memoizedProps:null,D=c.children,Qn(i,c)?D=null:_!==null&&Qn(i,_)&&(t.flags|=32),Ac(e,t),it(e,t,D,r),t.child;case 6:return e===null&&oo(t),null;case 13:return Mc(e,t,r);case 4:return po(t,t.stateNode.containerInfo),i=t.pendingProps,e===null?t.child=ei(t,null,i,r):it(e,t,i,r),t.child;case 11:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:Tt(i,c),Rc(e,t,i,c,r);case 7:return it(e,t,t.pendingProps,r),t.child;case 8:return it(e,t,t.pendingProps.children,r),t.child;case 12:return it(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(i=t.type._context,c=t.pendingProps,_=t.memoizedProps,D=c.value,De(Rs,i._currentValue),i._currentValue=D,_!==null)if(Lt(_.value,D)){if(_.children===c.children&&!ot.current){t=Yt(e,t,r);break e}}else for(_=t.child,_!==null&&(_.return=t);_!==null;){var N=_.dependencies;if(N!==null){D=_.child;for(var z=N.firstContext;z!==null;){if(z.context===i){if(_.tag===1){z=Gt(-1,r&-r),z.tag=2;var Y=_.updateQueue;if(Y!==null){Y=Y.shared;var se=Y.pending;se===null?z.next=z:(z.next=se.next,se.next=z),Y.pending=z}}_.lanes|=r,z=_.alternate,z!==null&&(z.lanes|=r),uo(_.return,r,t),N.lanes|=r;break}z=z.next}}else if(_.tag===10)D=_.type===t.type?null:_.child;else if(_.tag===18){if(D=_.return,D===null)throw Error(h(341));D.lanes|=r,N=D.alternate,N!==null&&(N.lanes|=r),uo(D,r,t),D=_.sibling}else D=_.child;if(D!==null)D.return=_;else for(D=_;D!==null;){if(D===t){D=null;break}if(_=D.sibling,_!==null){_.return=D.return,D=_;break}D=D.return}_=D}it(e,t,c.children,r),t=t.child}return t;case 9:return c=t.type,i=t.pendingProps.children,ri(t,r),c=yt(c),i=i(c),t.flags|=1,it(e,t,i,r),t.child;case 14:return i=t.type,c=Tt(i,t.pendingProps),c=Tt(i.type,c),Lc(e,t,i,c,r);case 15:return Dc(e,t,t.type,t.pendingProps,r);case 17:return i=t.type,c=t.pendingProps,c=t.elementType===i?c:Tt(i,c),Fs(e,t),t.tag=1,lt(i)?(e=!0,ws(t)):e=!1,ri(t,r),yc(t,i,c),Lo(t,i,c,r),Bo(null,t,i,!0,e,r);case 19:return Nc(e,t,r);case 22:return Tc(e,t,r)}throw Error(h(156,t.tag))};function lh(e,t){return jl(e,t)}function Md(e,t,r,i){this.tag=e,this.key=r,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=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Et(e,t,r,i){return new Md(e,t,r,i)}function Jo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Id(e){if(typeof e=="function")return Jo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===$)return 11;if(e===te)return 14}return 2}function Sr(e,t){var r=e.alternate;return r===null?(r=Et(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Ys(e,t,r,i,c,_){var D=2;if(i=e,typeof e=="function")Jo(e)&&(D=1);else if(typeof e=="string")D=5;else e:switch(e){case R:return Hr(r.children,c,_,t);case S:D=8,c|=8;break;case A:return e=Et(12,r,t,c|2),e.elementType=A,e.lanes=_,e;case I:return e=Et(13,r,t,c),e.elementType=I,e.lanes=_,e;case Q:return e=Et(19,r,t,c),e.elementType=Q,e.lanes=_,e;case le:return Qs(r,c,_,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case H:D=10;break e;case j:D=9;break e;case $:D=11;break e;case te:D=14;break e;case ne:D=16,i=null;break e}throw Error(h(130,e==null?e:typeof e,""))}return t=Et(D,r,t,c),t.elementType=e,t.type=i,t.lanes=_,t}function Hr(e,t,r,i){return e=Et(7,e,i,t),e.lanes=r,e}function Qs(e,t,r,i){return e=Et(22,e,i,t),e.elementType=le,e.lanes=r,e.stateNode={isHidden:!1},e}function Zo(e,t,r){return e=Et(6,e,null,t),e.lanes=r,e}function el(e,t,r){return t=Et(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Nd(e,t,r,i,c){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=xn(0),this.expirationTimes=xn(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=xn(0),this.identifierPrefix=i,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function tl(e,t,r,i,c,_,D,N,z){return e=new Nd(e,t,r,N,z),t===1?(t=1,_===!0&&(t|=8)):t=0,_=Et(3,null,null,t),e.current=_,_.stateNode=e,_.memoizedState={element:i,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},_o(_),e}function Hd(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:k,key:i==null?null:""+i,children:e,containerInfo:t,implementation:r}}function ah(e){if(!e)return hr;e=e._reactInternals;e:{if(xr(e)!==e||e.tag!==1)throw Error(h(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(lt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(h(171))}if(e.tag===1){var r=e.type;if(lt(r))return Ia(e,r,t)}return t}function ch(e,t,r,i,c,_,D,N,z){return e=tl(r,i,!0,e,c,_,D,N,z),e.context=ah(null),r=e.current,i=st(),c=mr(r),_=Gt(i,c),_.callback=t??null,fr(r,_,c),e.current.lanes=c,_i(e,c,i),ht(e,i),e}function Js(e,t,r,i){var c=t.current,_=st(),D=mr(c);return r=ah(r),t.context===null?t.context=r:t.pendingContext=r,t=Gt(_,D),t.payload={element:e},i=i===void 0?null:i,i!==null&&(t.callback=i),e=fr(c,t,D),e!==null&&(Ot(e,c,D,_),Ds(e,c,D)),D}function Zs(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 hh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function rl(e,t){hh(e,t),(e=e.alternate)&&hh(e,t)}function Fd(){return null}var uh=typeof reportError=="function"?reportError:function(e){console.error(e)};function il(e){this._internalRoot=e}en.prototype.render=il.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(h(409));Js(e,t,null,null)},en.prototype.unmount=il.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Mr(function(){Js(null,e,null,null)}),t[$t]=null}};function en(e){this._internalRoot=e}en.prototype.unstable_scheduleHydration=function(e){if(e){var t=Xl();e={blockedOn:null,target:e,priority:t};for(var r=0;r<nr.length&&t!==0&&t<nr[r].priority;r++);nr.splice(r,0,e),r===0&&Ql(e)}};function sl(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function tn(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function dh(){}function jd(e,t,r,i,c){if(c){if(typeof i=="function"){var _=i;i=function(){var Y=Zs(D);_.call(Y)}}var D=ch(t,i,e,0,null,!1,!1,"",dh);return e._reactRootContainer=D,e[$t]=D.current,Li(e.nodeType===8?e.parentNode:e),Mr(),D}for(;c=e.lastChild;)e.removeChild(c);if(typeof i=="function"){var N=i;i=function(){var Y=Zs(z);N.call(Y)}}var z=tl(e,0,!1,null,null,!1,!1,"",dh);return e._reactRootContainer=z,e[$t]=z.current,Li(e.nodeType===8?e.parentNode:e),Mr(function(){Js(t,z,r,i)}),z}function rn(e,t,r,i,c){var _=r._reactRootContainer;if(_){var D=_;if(typeof c=="function"){var N=c;c=function(){var z=Zs(D);N.call(z)}}Js(t,D,e,c)}else D=jd(r,t,e,c,i);return Zs(D)}Kl=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=fi(t.pendingLanes);r!==0&&(Rn(t,r|1),ht(t,He()),(be&6)===0&&(li=He()+500,ur()))}break;case 13:Mr(function(){var i=Xt(e,1);if(i!==null){var c=st();Ot(i,e,1,c)}}),rl(e,1)}},Ln=function(e){if(e.tag===13){var t=Xt(e,134217728);if(t!==null){var r=st();Ot(t,e,134217728,r)}rl(e,134217728)}},ql=function(e){if(e.tag===13){var t=mr(e),r=Xt(e,t);if(r!==null){var i=st();Ot(r,e,t,i)}rl(e,t)}},Xl=function(){return Re},Gl=function(e,t){var r=Re;try{return Re=e,t()}finally{Re=r}},yn=function(e,t,r){switch(t){case"input":if(ye(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var i=r[t];if(i!==e&&i.form===e.form){var c=Ss(i);if(!c)throw Error(h(90));ue(i),ye(i,c)}}}break;case"textarea":er(e,r);break;case"select":t=r.value,t!=null&&Mt(e,!!r.multiple,t,!1)}},Ol=Go,Pl=Mr;var zd={usingClientEntryPoint:!1,Events:[Ai,Xr,Ss,Al,Bl,Go]},Vi={findFiberByHostInstance:Rr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ud={bundleType:Vi.bundleType,version:Vi.version,rendererPackageName:Vi.rendererPackageName,rendererConfig:Vi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:p.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=Hl(e),e===null?null:e.stateNode},findFiberByHostInstance:Vi.findFiberByHostInstance||Fd,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 sn=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!sn.isDisabled&&sn.supportsFiber)try{es=sn.inject(Ud),It=sn}catch{}}return ut.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=zd,ut.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!sl(t))throw Error(h(200));return Hd(e,t,null,r)},ut.createRoot=function(e,t){if(!sl(e))throw Error(h(299));var r=!1,i="",c=uh;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(i=t.identifierPrefix),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=tl(e,1,!1,null,null,r,!1,i,c),e[$t]=t.current,Li(e.nodeType===8?e.parentNode:e),new il(t)},ut.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(h(188)):(e=Object.keys(e).join(","),Error(h(268,e)));return e=Hl(t),e=e===null?null:e.stateNode,e},ut.flushSync=function(e){return Mr(e)},ut.hydrate=function(e,t,r){if(!tn(t))throw Error(h(200));return rn(null,e,t,!0,r)},ut.hydrateRoot=function(e,t,r){if(!sl(e))throw Error(h(405));var i=r!=null&&r.hydratedSources||null,c=!1,_="",D=uh;if(r!=null&&(r.unstable_strictMode===!0&&(c=!0),r.identifierPrefix!==void 0&&(_=r.identifierPrefix),r.onRecoverableError!==void 0&&(D=r.onRecoverableError)),t=ch(t,null,e,1,r??null,c,!1,_,D),e[$t]=t.current,Li(e),i)for(e=0;e<i.length;e++)r=i[e],c=r._getVersion,c=c(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,c]:t.mutableSourceEagerHydrationData.push(r,c);return new en(t)},ut.render=function(e,t,r){if(!tn(t))throw Error(h(200));return rn(null,e,t,!1,r)},ut.unmountComponentAtNode=function(e){if(!tn(e))throw Error(h(40));return e._reactRootContainer?(Mr(function(){rn(null,null,e,!1,function(){e._reactRootContainer=null,e[$t]=null})}),!0):!1},ut.unstable_batchedUpdates=Go,ut.unstable_renderSubtreeIntoContainer=function(e,t,r,i){if(!tn(r))throw Error(h(200));if(e==null||e._reactInternals===void 0)throw Error(h(38));return rn(e,t,r,!1,i)},ut.version="18.3.1-next-f1338f8080-20240426",ut}var yh;function Yd(){if(yh)return ll.exports;yh=1;function y(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(y)}catch(d){console.error(d)}}return y(),ll.exports=Gd(),ll.exports}var wh;function Qd(){if(wh)return nn;wh=1;var y=Yd();return nn.createRoot=y.createRoot,nn.hydrateRoot=y.hydrateRoot,nn}var Jd=Qd();const Zd=Bh(Jd),Ch=y=>{let d;const h=new Set,E=(v,w)=>{const f=typeof v=="function"?v(d):v;if(!Object.is(f,d)){const g=d;d=w??(typeof f!="object"||f===null)?f:Object.assign({},d,f),h.forEach(C=>C(d,g))}},M=()=>d,l={setState:E,getState:M,getInitialState:()=>u,subscribe:v=>(h.add(v),()=>h.delete(v))},u=d=y(E,M,l);return l},ef=(y=>y?Ch(y):Ch),tf=y=>y;function rf(y,d=tf){const h=Xi.useSyncExternalStore(y.subscribe,Xi.useCallback(()=>d(y.getState()),[y,d]),Xi.useCallback(()=>d(y.getInitialState()),[y,d]));return Xi.useDebugValue(h),h}const Eh=y=>{const d=ef(y),h=E=>rf(d,E);return Object.assign(h,d),h},sf=(y=>y?Eh(y):Eh),wr=["branch","worktree","running"],pl=10,an=1,nf=3,of="hjWorktree CLI",lf="2.5.0",kh={step:"branch",completedSteps:[],projectInfo:null,branches:[],selectedBranch:null,worktreeCount:nf,terminals:[],activeTerminalIndex:0,activeSessionId:null,selectedSessionIds:[],isSetupCollapsed:!1,collapsedBranches:[],modalType:null,modalData:null,isLoading:!1,loadingMessage:"",error:null},Ve=sf((y,d)=>({...kh,setStep:h=>y({step:h}),goToStep:h=>{const{canNavigateTo:E,step:M,isStepComplete:U,completedSteps:F}=d();if(!E(h))return;const l=[...F];U(M)&&!l.includes(M)&&l.push(M),y({step:h,completedSteps:l})},goToNext:()=>{const{step:h,isStepComplete:E,completedSteps:M}=d(),U=wr.indexOf(h);if(U<wr.length-1&&E(h)){const F=[...M];F.includes(h)||F.push(h),y({step:wr[U+1],completedSteps:F})}},goToPrev:()=>{const{step:h}=d(),E=wr.indexOf(h);E>0&&y({step:wr[E-1]})},canNavigateTo:h=>{const{step:E,completedSteps:M,isStepComplete:U}=d(),F=wr.indexOf(E),l=wr.indexOf(h);if(l===F||l<F)return!0;for(let u=0;u<l;u++){const v=wr[u];if(!M.includes(v)&&!U(v))return!1}return!0},isStepComplete:h=>{const{selectedBranch:E,worktreeCount:M,terminals:U}=d();switch(h){case"branch":return E!==null;case"worktree":return M>=an;case"running":return U.length>0;default:return!1}},getStepStatus:h=>{const{step:E,completedSteps:M,isStepComplete:U}=d();return h===E?"current":M.includes(h)||U(h)?"completed":"pending"},setProjectInfo:h=>y({projectInfo:h}),fetchProjectInfo:async()=>{try{const h=await fetch("/api/info");if(!h.ok)throw new Error("Failed to fetch project info");const E=await h.json();y({projectInfo:E})}catch(h){y({error:h instanceof Error?h.message:"Unknown error"})}},setBranches:h=>y({branches:h}),setSelectedBranch:h=>y({selectedBranch:h}),fetchBranches:async()=>{try{const h=await fetch("/api/branches");if(!h.ok)throw new Error("Failed to fetch branches");const E=await h.json();if(y({branches:E}),!d().selectedBranch&&E.length>0){const U=E.find(F=>F.isCurrent);y({selectedBranch:(U==null?void 0:U.name)||E[0].name})}}catch(h){y({error:h instanceof Error?h.message:"Unknown error"})}},setWorktreeCount:h=>y({worktreeCount:Math.max(an,Math.min(pl,h))}),incrementWorktreeCount:()=>{const{worktreeCount:h}=d();h<pl&&y({worktreeCount:h+1})},decrementWorktreeCount:()=>{const{worktreeCount:h}=d();h>an&&y({worktreeCount:h-1})},addTerminal:h=>y(E=>E.terminals.some(M=>M.sessionId===h.sessionId)?E:{terminals:[...E.terminals,h]}),updateTerminalStatus:(h,E)=>y(M=>({terminals:M.terminals.map(U=>U.sessionId===h?{...U,status:E}:U)})),removeTerminal:h=>y(E=>{const M=E.terminals.filter(F=>F.sessionId!==h),U=Math.min(E.activeTerminalIndex,Math.max(0,M.length-1));return{terminals:M,activeTerminalIndex:U,step:M.length===0?"branch":E.step,completedSteps:M.length===0?[]:E.completedSteps}}),setActiveTerminal:h=>y({activeTerminalIndex:h}),clearAllTerminals:()=>y({terminals:[],activeTerminalIndex:0,activeSessionId:null,selectedSessionIds:[]}),setActiveSession:h=>{const{terminals:E}=d(),M=E.findIndex(U=>U.sessionId===h);y({activeSessionId:h,activeTerminalIndex:M>=0?M:0})},toggleSessionSelection:h=>y(E=>{const M=[...E.selectedSessionIds],U=M.indexOf(h);return U>=0?M.splice(U,1):M.push(h),{selectedSessionIds:M}}),selectAllSessions:()=>y(h=>({selectedSessionIds:h.terminals.map(E=>E.sessionId)})),clearSessionSelection:()=>y({selectedSessionIds:[]}),removeSelectedSessions:async()=>{const{selectedSessionIds:h,terminals:E}=d();if(h.length===0)return;const M=E.filter(U=>h.includes(U.sessionId)).map(U=>U.worktreeName);try{(await fetch("/api/worktrees/batch",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({names:M})})).ok&&y(F=>{const l=F.terminals.filter(u=>!h.includes(u.sessionId));return{terminals:l,selectedSessionIds:[],activeTerminalIndex:Math.min(F.activeTerminalIndex,Math.max(0,l.length-1)),activeSessionId:l.length>0?l[0].sessionId:null}})}catch(U){console.error("Failed to remove sessions:",U)}},getSessionGroups:()=>{const{terminals:h,collapsedBranches:E}=d(),M=new Map;for(const F of h){const l=F.branchName.replace(/-project-\d+$/,"");M.has(l)||M.set(l,[]),M.get(l).push(F)}const U=[];for(const[F,l]of M)U.push({branchName:F,sessions:l.map(u=>({...u,id:u.sessionId,createdAt:Date.now()})),isCollapsed:E.includes(F)});return U.sort((F,l)=>F.branchName.localeCompare(l.branchName))},toggleSetupCollapse:()=>y(h=>({isSetupCollapsed:!h.isSetupCollapsed})),toggleBranchCollapse:h=>y(E=>{const M=[...E.collapsedBranches],U=M.indexOf(h);return U>=0?M.splice(U,1):M.push(h),{collapsedBranches:M}}),openModal:(h,E)=>y({modalType:h,modalData:E||null}),closeModal:()=>y({modalType:null,modalData:null}),createSingleWorktree:async h=>{const{setLoading:E,setError:M,addTerminal:U,setActiveSession:F}=d();E(!0,"Creating worktree..."),M(null);try{const l=await fetch("/api/worktrees/single",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({branch:h})});if(!l.ok){const w=await l.json();throw new Error(w.error||"Failed to create worktree")}const{worktree:u}=await l.json(),v=u.name;U({sessionId:v,worktreePath:u.path,worktreeName:u.name,branchName:u.branch,status:"initializing"}),F(v),y({step:"running",isSetupCollapsed:!0,modalType:null,modalData:null})}catch(l){M(l instanceof Error?l.message:"Unknown error")}finally{E(!1)}},restoreExistingWorktrees:async()=>{const{terminals:h}=d();if(!(h.length>0))try{const E=await fetch("/api/worktrees");if(!E.ok)return;const U=(await E.json()).filter(l=>!l.isMainWorktree&&l.name.includes("-project-"));if(U.length===0)return;const{addTerminal:F}=d();for(const l of U)F({sessionId:l.name,worktreePath:l.path,worktreeName:l.name,branchName:l.branch,status:"running"});y({step:"running",completedSteps:["branch","worktree"],isSetupCollapsed:!0,activeSessionId:U[0].name}),console.log(`Restored ${U.length} worktree sessions`)}catch(E){console.error("Failed to restore worktrees:",E)}},execute:async()=>{const{selectedBranch:h,worktreeCount:E,setLoading:M,setError:U,addTerminal:F}=d();if(!h){U("Please select a branch");return}M(!0,"Creating worktrees..."),U(null);try{const l=await fetch("/api/worktrees",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({branch:h,count:E})});if(!l.ok){const w=await l.json();throw new Error(w.error||"Failed to create worktrees")}const{worktrees:u}=await l.json();for(const w of u){const f=w.name;F({sessionId:f,worktreePath:w.path,worktreeName:w.name,branchName:w.branch,status:"initializing"})}const{terminals:v}=d();y({step:"running",completedSteps:["branch","worktree"],isSetupCollapsed:!0,activeSessionId:v.length>0?v[0].sessionId:null})}catch(l){U(l instanceof Error?l.message:"Unknown error")}finally{M(!1)}},setLoading:(h,E="")=>y({isLoading:h,loadingMessage:E}),setError:h=>y({error:h}),reset:()=>y(kh)})),Ut=Object.create(null);Ut.open="0";Ut.close="1";Ut.ping="2";Ut.pong="3";Ut.message="4";Ut.upgrade="5";Ut.noop="6";const cn=Object.create(null);Object.keys(Ut).forEach(y=>{cn[Ut[y]]=y});const vl={type:"error",data:"parser error"},Oh=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Ph=typeof ArrayBuffer=="function",Mh=y=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(y):y&&y.buffer instanceof ArrayBuffer,El=({type:y,data:d},h,E)=>Oh&&d instanceof Blob?h?E(d):bh(d,E):Ph&&(d instanceof ArrayBuffer||Mh(d))?h?E(d):bh(new Blob([d]),E):E(Ut[y]+(d||"")),bh=(y,d)=>{const h=new FileReader;return h.onload=function(){const E=h.result.split(",")[1];d("b"+(E||""))},h.readAsDataURL(y)};function xh(y){return y instanceof Uint8Array?y:y instanceof ArrayBuffer?new Uint8Array(y):new Uint8Array(y.buffer,y.byteOffset,y.byteLength)}let hl;function af(y,d){if(Oh&&y.data instanceof Blob)return y.data.arrayBuffer().then(xh).then(d);if(Ph&&(y.data instanceof ArrayBuffer||Mh(y.data)))return d(xh(y.data));El(y,!1,h=>{hl||(hl=new TextEncoder),d(hl.encode(h))})}const Rh="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Gi=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let y=0;y<Rh.length;y++)Gi[Rh.charCodeAt(y)]=y;const cf=y=>{let d=y.length*.75,h=y.length,E,M=0,U,F,l,u;y[y.length-1]==="="&&(d--,y[y.length-2]==="="&&d--);const v=new ArrayBuffer(d),w=new Uint8Array(v);for(E=0;E<h;E+=4)U=Gi[y.charCodeAt(E)],F=Gi[y.charCodeAt(E+1)],l=Gi[y.charCodeAt(E+2)],u=Gi[y.charCodeAt(E+3)],w[M++]=U<<2|F>>4,w[M++]=(F&15)<<4|l>>2,w[M++]=(l&3)<<6|u&63;return v},hf=typeof ArrayBuffer=="function",kl=(y,d)=>{if(typeof y!="string")return{type:"message",data:Ih(y,d)};const h=y.charAt(0);return h==="b"?{type:"message",data:uf(y.substring(1),d)}:cn[h]?y.length>1?{type:cn[h],data:y.substring(1)}:{type:cn[h]}:vl},uf=(y,d)=>{if(hf){const h=cf(y);return Ih(h,d)}else return{base64:!0,data:y}},Ih=(y,d)=>{switch(d){case"blob":return y instanceof Blob?y:new Blob([y]);case"arraybuffer":default:return y instanceof ArrayBuffer?y:y.buffer}},Nh="",df=(y,d)=>{const h=y.length,E=new Array(h);let M=0;y.forEach((U,F)=>{El(U,!1,l=>{E[F]=l,++M===h&&d(E.join(Nh))})})},ff=(y,d)=>{const h=y.split(Nh),E=[];for(let M=0;M<h.length;M++){const U=kl(h[M],d);if(E.push(U),U.type==="error")break}return E};function _f(){return new TransformStream({transform(y,d){af(y,h=>{const E=h.length;let M;if(E<126)M=new Uint8Array(1),new DataView(M.buffer).setUint8(0,E);else if(E<65536){M=new Uint8Array(3);const U=new DataView(M.buffer);U.setUint8(0,126),U.setUint16(1,E)}else{M=new Uint8Array(9);const U=new DataView(M.buffer);U.setUint8(0,127),U.setBigUint64(1,BigInt(E))}y.data&&typeof y.data!="string"&&(M[0]|=128),d.enqueue(M),d.enqueue(h)})}})}let ul;function on(y){return y.reduce((d,h)=>d+h.length,0)}function ln(y,d){if(y[0].length===d)return y.shift();const h=new Uint8Array(d);let E=0;for(let M=0;M<d;M++)h[M]=y[0][E++],E===y[0].length&&(y.shift(),E=0);return y.length&&E<y[0].length&&(y[0]=y[0].slice(E)),h}function pf(y,d){ul||(ul=new TextDecoder);const h=[];let E=0,M=-1,U=!1;return new TransformStream({transform(F,l){for(h.push(F);;){if(E===0){if(on(h)<1)break;const u=ln(h,1);U=(u[0]&128)===128,M=u[0]&127,M<126?E=3:M===126?E=1:E=2}else if(E===1){if(on(h)<2)break;const u=ln(h,2);M=new DataView(u.buffer,u.byteOffset,u.length).getUint16(0),E=3}else if(E===2){if(on(h)<8)break;const u=ln(h,8),v=new DataView(u.buffer,u.byteOffset,u.length),w=v.getUint32(0);if(w>Math.pow(2,21)-1){l.enqueue(vl);break}M=w*Math.pow(2,32)+v.getUint32(4),E=3}else{if(on(h)<M)break;const u=ln(h,M);l.enqueue(kl(U?u:ul.decode(u),d)),E=0}if(M===0||M>y){l.enqueue(vl);break}}}})}const Hh=4;function ze(y){if(y)return vf(y)}function vf(y){for(var d in ze.prototype)y[d]=ze.prototype[d];return y}ze.prototype.on=ze.prototype.addEventListener=function(y,d){return this._callbacks=this._callbacks||{},(this._callbacks["$"+y]=this._callbacks["$"+y]||[]).push(d),this};ze.prototype.once=function(y,d){function h(){this.off(y,h),d.apply(this,arguments)}return h.fn=d,this.on(y,h),this};ze.prototype.off=ze.prototype.removeListener=ze.prototype.removeAllListeners=ze.prototype.removeEventListener=function(y,d){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var h=this._callbacks["$"+y];if(!h)return this;if(arguments.length==1)return delete this._callbacks["$"+y],this;for(var E,M=0;M<h.length;M++)if(E=h[M],E===d||E.fn===d){h.splice(M,1);break}return h.length===0&&delete this._callbacks["$"+y],this};ze.prototype.emit=function(y){this._callbacks=this._callbacks||{};for(var d=new Array(arguments.length-1),h=this._callbacks["$"+y],E=1;E<arguments.length;E++)d[E-1]=arguments[E];if(h){h=h.slice(0);for(var E=0,M=h.length;E<M;++E)h[E].apply(this,d)}return this};ze.prototype.emitReserved=ze.prototype.emit;ze.prototype.listeners=function(y){return this._callbacks=this._callbacks||{},this._callbacks["$"+y]||[]};ze.prototype.hasListeners=function(y){return!!this.listeners(y).length};const _n=typeof Promise=="function"&&typeof Promise.resolve=="function"?d=>Promise.resolve().then(d):(d,h)=>h(d,0),bt=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),mf="arraybuffer";function Fh(y,...d){return d.reduce((h,E)=>(y.hasOwnProperty(E)&&(h[E]=y[E]),h),{})}const gf=bt.setTimeout,Sf=bt.clearTimeout;function pn(y,d){d.useNativeTimers?(y.setTimeoutFn=gf.bind(bt),y.clearTimeoutFn=Sf.bind(bt)):(y.setTimeoutFn=bt.setTimeout.bind(bt),y.clearTimeoutFn=bt.clearTimeout.bind(bt))}const yf=1.33;function wf(y){return typeof y=="string"?Cf(y):Math.ceil((y.byteLength||y.size)*yf)}function Cf(y){let d=0,h=0;for(let E=0,M=y.length;E<M;E++)d=y.charCodeAt(E),d<128?h+=1:d<2048?h+=2:d<55296||d>=57344?h+=3:(E++,h+=4);return h}function jh(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Ef(y){let d="";for(let h in y)y.hasOwnProperty(h)&&(d.length&&(d+="&"),d+=encodeURIComponent(h)+"="+encodeURIComponent(y[h]));return d}function kf(y){let d={},h=y.split("&");for(let E=0,M=h.length;E<M;E++){let U=h[E].split("=");d[decodeURIComponent(U[0])]=decodeURIComponent(U[1])}return d}class bf extends Error{constructor(d,h,E){super(d),this.description=h,this.context=E,this.type="TransportError"}}class bl extends ze{constructor(d){super(),this.writable=!1,pn(this,d),this.opts=d,this.query=d.query,this.socket=d.socket,this.supportsBinary=!d.forceBase64}onError(d,h,E){return super.emitReserved("error",new bf(d,h,E)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(d){this.readyState==="open"&&this.write(d)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(d){const h=kl(d,this.socket.binaryType);this.onPacket(h)}onPacket(d){super.emitReserved("packet",d)}onClose(d){this.readyState="closed",super.emitReserved("close",d)}pause(d){}createUri(d,h={}){return d+"://"+this._hostname()+this._port()+this.opts.path+this._query(h)}_hostname(){const d=this.opts.hostname;return d.indexOf(":")===-1?d:"["+d+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(d){const h=Ef(d);return h.length?"?"+h:""}}class xf extends bl{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(d){this.readyState="pausing";const h=()=>{this.readyState="paused",d()};if(this._polling||!this.writable){let E=0;this._polling&&(E++,this.once("pollComplete",function(){--E||h()})),this.writable||(E++,this.once("drain",function(){--E||h()}))}else h()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(d){const h=E=>{if(this.readyState==="opening"&&E.type==="open"&&this.onOpen(),E.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(E)};ff(d,this.socket.binaryType).forEach(h),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const d=()=>{this.write([{type:"close"}])};this.readyState==="open"?d():this.once("open",d)}write(d){this.writable=!1,df(d,h=>{this.doWrite(h,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const d=this.opts.secure?"https":"http",h=this.query||{};return this.opts.timestampRequests!==!1&&(h[this.opts.timestampParam]=jh()),!this.supportsBinary&&!h.sid&&(h.b64=1),this.createUri(d,h)}}let zh=!1;try{zh=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const Rf=zh;function Lf(){}class Df extends xf{constructor(d){if(super(d),typeof location<"u"){const h=location.protocol==="https:";let E=location.port;E||(E=h?"443":"80"),this.xd=typeof location<"u"&&d.hostname!==location.hostname||E!==d.port}}doWrite(d,h){const E=this.request({method:"POST",data:d});E.on("success",h),E.on("error",(M,U)=>{this.onError("xhr post error",M,U)})}doPoll(){const d=this.request();d.on("data",this.onData.bind(this)),d.on("error",(h,E)=>{this.onError("xhr poll error",h,E)}),this.pollXhr=d}}class zt extends ze{constructor(d,h,E){super(),this.createRequest=d,pn(this,E),this._opts=E,this._method=E.method||"GET",this._uri=h,this._data=E.data!==void 0?E.data:null,this._create()}_create(){var d;const h=Fh(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");h.xdomain=!!this._opts.xd;const E=this._xhr=this.createRequest(h);try{E.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){E.setDisableHeaderCheck&&E.setDisableHeaderCheck(!0);for(let M in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(M)&&E.setRequestHeader(M,this._opts.extraHeaders[M])}}catch{}if(this._method==="POST")try{E.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{E.setRequestHeader("Accept","*/*")}catch{}(d=this._opts.cookieJar)===null||d===void 0||d.addCookies(E),"withCredentials"in E&&(E.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(E.timeout=this._opts.requestTimeout),E.onreadystatechange=()=>{var M;E.readyState===3&&((M=this._opts.cookieJar)===null||M===void 0||M.parseCookies(E.getResponseHeader("set-cookie"))),E.readyState===4&&(E.status===200||E.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof E.status=="number"?E.status:0)},0))},E.send(this._data)}catch(M){this.setTimeoutFn(()=>{this._onError(M)},0);return}typeof document<"u"&&(this._index=zt.requestsCount++,zt.requests[this._index]=this)}_onError(d){this.emitReserved("error",d,this._xhr),this._cleanup(!0)}_cleanup(d){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=Lf,d)try{this._xhr.abort()}catch{}typeof document<"u"&&delete zt.requests[this._index],this._xhr=null}}_onLoad(){const d=this._xhr.responseText;d!==null&&(this.emitReserved("data",d),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}zt.requestsCount=0;zt.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",Lh);else if(typeof addEventListener=="function"){const y="onpagehide"in bt?"pagehide":"unload";addEventListener(y,Lh,!1)}}function Lh(){for(let y in zt.requests)zt.requests.hasOwnProperty(y)&&zt.requests[y].abort()}const Tf=(function(){const y=Uh({xdomain:!1});return y&&y.responseType!==null})();class Af extends Df{constructor(d){super(d);const h=d&&d.forceBase64;this.supportsBinary=Tf&&!h}request(d={}){return Object.assign(d,{xd:this.xd},this.opts),new zt(Uh,this.uri(),d)}}function Uh(y){const d=y.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!d||Rf))return new XMLHttpRequest}catch{}if(!d)try{return new bt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const Wh=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class Bf extends bl{get name(){return"websocket"}doOpen(){const d=this.uri(),h=this.opts.protocols,E=Wh?{}:Fh(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(E.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(d,h,E)}catch(M){return this.emitReserved("error",M)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=d=>this.onClose({description:"websocket connection closed",context:d}),this.ws.onmessage=d=>this.onData(d.data),this.ws.onerror=d=>this.onError("websocket error",d)}write(d){this.writable=!1;for(let h=0;h<d.length;h++){const E=d[h],M=h===d.length-1;El(E,this.supportsBinary,U=>{try{this.doWrite(E,U)}catch{}M&&_n(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const d=this.opts.secure?"wss":"ws",h=this.query||{};return this.opts.timestampRequests&&(h[this.opts.timestampParam]=jh()),this.supportsBinary||(h.b64=1),this.createUri(d,h)}}const dl=bt.WebSocket||bt.MozWebSocket;class Of extends Bf{createSocket(d,h,E){return Wh?new dl(d,h,E):h?new dl(d,h):new dl(d)}doWrite(d,h){this.ws.send(h)}}class Pf extends bl{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(d){return this.emitReserved("error",d)}this._transport.closed.then(()=>{this.onClose()}).catch(d=>{this.onError("webtransport error",d)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(d=>{const h=pf(Number.MAX_SAFE_INTEGER,this.socket.binaryType),E=d.readable.pipeThrough(h).getReader(),M=_f();M.readable.pipeTo(d.writable),this._writer=M.writable.getWriter();const U=()=>{E.read().then(({done:l,value:u})=>{l||(this.onPacket(u),U())}).catch(l=>{})};U();const F={type:"open"};this.query.sid&&(F.data=`{"sid":"${this.query.sid}"}`),this._writer.write(F).then(()=>this.onOpen())})})}write(d){this.writable=!1;for(let h=0;h<d.length;h++){const E=d[h],M=h===d.length-1;this._writer.write(E).then(()=>{M&&_n(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var d;(d=this._transport)===null||d===void 0||d.close()}}const Mf={websocket:Of,webtransport:Pf,polling:Af},If=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Nf=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function ml(y){if(y.length>8e3)throw"URI too long";const d=y,h=y.indexOf("["),E=y.indexOf("]");h!=-1&&E!=-1&&(y=y.substring(0,h)+y.substring(h,E).replace(/:/g,";")+y.substring(E,y.length));let M=If.exec(y||""),U={},F=14;for(;F--;)U[Nf[F]]=M[F]||"";return h!=-1&&E!=-1&&(U.source=d,U.host=U.host.substring(1,U.host.length-1).replace(/;/g,":"),U.authority=U.authority.replace("[","").replace("]","").replace(/;/g,":"),U.ipv6uri=!0),U.pathNames=Hf(U,U.path),U.queryKey=Ff(U,U.query),U}function Hf(y,d){const h=/\/{2,9}/g,E=d.replace(h,"/").split("/");return(d.slice(0,1)=="/"||d.length===0)&&E.splice(0,1),d.slice(-1)=="/"&&E.splice(E.length-1,1),E}function Ff(y,d){const h={};return d.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(E,M,U){M&&(h[M]=U)}),h}const gl=typeof addEventListener=="function"&&typeof removeEventListener=="function",hn=[];gl&&addEventListener("offline",()=>{hn.forEach(y=>y())},!1);class Cr extends ze{constructor(d,h){if(super(),this.binaryType=mf,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,d&&typeof d=="object"&&(h=d,d=null),d){const E=ml(d);h.hostname=E.host,h.secure=E.protocol==="https"||E.protocol==="wss",h.port=E.port,E.query&&(h.query=E.query)}else h.host&&(h.hostname=ml(h.host).host);pn(this,h),this.secure=h.secure!=null?h.secure:typeof location<"u"&&location.protocol==="https:",h.hostname&&!h.port&&(h.port=this.secure?"443":"80"),this.hostname=h.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=h.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},h.transports.forEach(E=>{const M=E.prototype.name;this.transports.push(M),this._transportsByName[M]=E}),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},h),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=kf(this.opts.query)),gl&&(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"})},hn.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(d){const h=Object.assign({},this.opts.query);h.EIO=Hh,h.transport=d,this.id&&(h.sid=this.id);const E=Object.assign({},this.opts,{query:h,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[d]);return new this._transportsByName[d](E)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const d=this.opts.rememberUpgrade&&Cr.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const h=this.createTransport(d);h.open(),this.setTransport(h)}setTransport(d){this.transport&&this.transport.removeAllListeners(),this.transport=d,d.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",h=>this._onClose("transport close",h))}onOpen(){this.readyState="open",Cr.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(d){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",d),this.emitReserved("heartbeat"),d.type){case"open":this.onHandshake(JSON.parse(d.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const h=new Error("server error");h.code=d.data,this._onError(h);break;case"message":this.emitReserved("data",d.data),this.emitReserved("message",d.data);break}}onHandshake(d){this.emitReserved("handshake",d),this.id=d.sid,this.transport.query.sid=d.sid,this._pingInterval=d.pingInterval,this._pingTimeout=d.pingTimeout,this._maxPayload=d.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const d=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+d,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},d),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 d=this._getWritablePackets();this.transport.send(d),this._prevBufferLen=d.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let h=1;for(let E=0;E<this.writeBuffer.length;E++){const M=this.writeBuffer[E].data;if(M&&(h+=wf(M)),E>0&&h>this._maxPayload)return this.writeBuffer.slice(0,E);h+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const d=Date.now()>this._pingTimeoutTime;return d&&(this._pingTimeoutTime=0,_n(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),d}write(d,h,E){return this._sendPacket("message",d,h,E),this}send(d,h,E){return this._sendPacket("message",d,h,E),this}_sendPacket(d,h,E,M){if(typeof h=="function"&&(M=h,h=void 0),typeof E=="function"&&(M=E,E=null),this.readyState==="closing"||this.readyState==="closed")return;E=E||{},E.compress=E.compress!==!1;const U={type:d,data:h,options:E};this.emitReserved("packetCreate",U),this.writeBuffer.push(U),M&&this.once("flush",M),this.flush()}close(){const d=()=>{this._onClose("forced close"),this.transport.close()},h=()=>{this.off("upgrade",h),this.off("upgradeError",h),d()},E=()=>{this.once("upgrade",h),this.once("upgradeError",h)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?E():d()}):this.upgrading?E():d()),this}_onError(d){if(Cr.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",d),this._onClose("transport error",d)}_onClose(d,h){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(),gl&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const E=hn.indexOf(this._offlineEventListener);E!==-1&&hn.splice(E,1)}this.readyState="closed",this.id=null,this.emitReserved("close",d,h),this.writeBuffer=[],this._prevBufferLen=0}}}Cr.protocol=Hh;class jf extends Cr{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let d=0;d<this._upgrades.length;d++)this._probe(this._upgrades[d])}_probe(d){let h=this.createTransport(d),E=!1;Cr.priorWebsocketSuccess=!1;const M=()=>{E||(h.send([{type:"ping",data:"probe"}]),h.once("packet",f=>{if(!E)if(f.type==="pong"&&f.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",h),!h)return;Cr.priorWebsocketSuccess=h.name==="websocket",this.transport.pause(()=>{E||this.readyState!=="closed"&&(w(),this.setTransport(h),h.send([{type:"upgrade"}]),this.emitReserved("upgrade",h),h=null,this.upgrading=!1,this.flush())})}else{const g=new Error("probe error");g.transport=h.name,this.emitReserved("upgradeError",g)}}))};function U(){E||(E=!0,w(),h.close(),h=null)}const F=f=>{const g=new Error("probe error: "+f);g.transport=h.name,U(),this.emitReserved("upgradeError",g)};function l(){F("transport closed")}function u(){F("socket closed")}function v(f){h&&f.name!==h.name&&U()}const w=()=>{h.removeListener("open",M),h.removeListener("error",F),h.removeListener("close",l),this.off("close",u),this.off("upgrading",v)};h.once("open",M),h.once("error",F),h.once("close",l),this.once("close",u),this.once("upgrading",v),this._upgrades.indexOf("webtransport")!==-1&&d!=="webtransport"?this.setTimeoutFn(()=>{E||h.open()},200):h.open()}onHandshake(d){this._upgrades=this._filterUpgrades(d.upgrades),super.onHandshake(d)}_filterUpgrades(d){const h=[];for(let E=0;E<d.length;E++)~this.transports.indexOf(d[E])&&h.push(d[E]);return h}}let zf=class extends jf{constructor(d,h={}){const E=typeof d=="object"?d:h;(!E.transports||E.transports&&typeof E.transports[0]=="string")&&(E.transports=(E.transports||["polling","websocket","webtransport"]).map(M=>Mf[M]).filter(M=>!!M)),super(d,E)}};function Uf(y,d="",h){let E=y;h=h||typeof location<"u"&&location,y==null&&(y=h.protocol+"//"+h.host),typeof y=="string"&&(y.charAt(0)==="/"&&(y.charAt(1)==="/"?y=h.protocol+y:y=h.host+y),/^(https?|wss?):\/\//.test(y)||(typeof h<"u"?y=h.protocol+"//"+y:y="https://"+y),E=ml(y)),E.port||(/^(http|ws)$/.test(E.protocol)?E.port="80":/^(http|ws)s$/.test(E.protocol)&&(E.port="443")),E.path=E.path||"/";const U=E.host.indexOf(":")!==-1?"["+E.host+"]":E.host;return E.id=E.protocol+"://"+U+":"+E.port+d,E.href=E.protocol+"://"+U+(h&&h.port===E.port?"":":"+E.port),E}const Wf=typeof ArrayBuffer=="function",$f=y=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(y):y.buffer instanceof ArrayBuffer,$h=Object.prototype.toString,Vf=typeof Blob=="function"||typeof Blob<"u"&&$h.call(Blob)==="[object BlobConstructor]",Kf=typeof File=="function"||typeof File<"u"&&$h.call(File)==="[object FileConstructor]";function xl(y){return Wf&&(y instanceof ArrayBuffer||$f(y))||Vf&&y instanceof Blob||Kf&&y instanceof File}function un(y,d){if(!y||typeof y!="object")return!1;if(Array.isArray(y)){for(let h=0,E=y.length;h<E;h++)if(un(y[h]))return!0;return!1}if(xl(y))return!0;if(y.toJSON&&typeof y.toJSON=="function"&&arguments.length===1)return un(y.toJSON(),!0);for(const h in y)if(Object.prototype.hasOwnProperty.call(y,h)&&un(y[h]))return!0;return!1}function qf(y){const d=[],h=y.data,E=y;return E.data=Sl(h,d),E.attachments=d.length,{packet:E,buffers:d}}function Sl(y,d){if(!y)return y;if(xl(y)){const h={_placeholder:!0,num:d.length};return d.push(y),h}else if(Array.isArray(y)){const h=new Array(y.length);for(let E=0;E<y.length;E++)h[E]=Sl(y[E],d);return h}else if(typeof y=="object"&&!(y instanceof Date)){const h={};for(const E in y)Object.prototype.hasOwnProperty.call(y,E)&&(h[E]=Sl(y[E],d));return h}return y}function Xf(y,d){return y.data=yl(y.data,d),delete y.attachments,y}function yl(y,d){if(!y)return y;if(y&&y._placeholder===!0){if(typeof y.num=="number"&&y.num>=0&&y.num<d.length)return d[y.num];throw new Error("illegal attachments")}else if(Array.isArray(y))for(let h=0;h<y.length;h++)y[h]=yl(y[h],d);else if(typeof y=="object")for(const h in y)Object.prototype.hasOwnProperty.call(y,h)&&(y[h]=yl(y[h],d));return y}const Vh=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],Gf=5;var Ce;(function(y){y[y.CONNECT=0]="CONNECT",y[y.DISCONNECT=1]="DISCONNECT",y[y.EVENT=2]="EVENT",y[y.ACK=3]="ACK",y[y.CONNECT_ERROR=4]="CONNECT_ERROR",y[y.BINARY_EVENT=5]="BINARY_EVENT",y[y.BINARY_ACK=6]="BINARY_ACK"})(Ce||(Ce={}));class Yf{constructor(d){this.replacer=d}encode(d){return(d.type===Ce.EVENT||d.type===Ce.ACK)&&un(d)?this.encodeAsBinary({type:d.type===Ce.EVENT?Ce.BINARY_EVENT:Ce.BINARY_ACK,nsp:d.nsp,data:d.data,id:d.id}):[this.encodeAsString(d)]}encodeAsString(d){let h=""+d.type;return(d.type===Ce.BINARY_EVENT||d.type===Ce.BINARY_ACK)&&(h+=d.attachments+"-"),d.nsp&&d.nsp!=="/"&&(h+=d.nsp+","),d.id!=null&&(h+=d.id),d.data!=null&&(h+=JSON.stringify(d.data,this.replacer)),h}encodeAsBinary(d){const h=qf(d),E=this.encodeAsString(h.packet),M=h.buffers;return M.unshift(E),M}}class Rl extends ze{constructor(d){super(),this.reviver=d}add(d){let h;if(typeof d=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");h=this.decodeString(d);const E=h.type===Ce.BINARY_EVENT;E||h.type===Ce.BINARY_ACK?(h.type=E?Ce.EVENT:Ce.ACK,this.reconstructor=new Qf(h),h.attachments===0&&super.emitReserved("decoded",h)):super.emitReserved("decoded",h)}else if(xl(d)||d.base64)if(this.reconstructor)h=this.reconstructor.takeBinaryData(d),h&&(this.reconstructor=null,super.emitReserved("decoded",h));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+d)}decodeString(d){let h=0;const E={type:Number(d.charAt(0))};if(Ce[E.type]===void 0)throw new Error("unknown packet type "+E.type);if(E.type===Ce.BINARY_EVENT||E.type===Ce.BINARY_ACK){const U=h+1;for(;d.charAt(++h)!=="-"&&h!=d.length;);const F=d.substring(U,h);if(F!=Number(F)||d.charAt(h)!=="-")throw new Error("Illegal attachments");E.attachments=Number(F)}if(d.charAt(h+1)==="/"){const U=h+1;for(;++h&&!(d.charAt(h)===","||h===d.length););E.nsp=d.substring(U,h)}else E.nsp="/";const M=d.charAt(h+1);if(M!==""&&Number(M)==M){const U=h+1;for(;++h;){const F=d.charAt(h);if(F==null||Number(F)!=F){--h;break}if(h===d.length)break}E.id=Number(d.substring(U,h+1))}if(d.charAt(++h)){const U=this.tryParse(d.substr(h));if(Rl.isPayloadValid(E.type,U))E.data=U;else throw new Error("invalid payload")}return E}tryParse(d){try{return JSON.parse(d,this.reviver)}catch{return!1}}static isPayloadValid(d,h){switch(d){case Ce.CONNECT:return fn(h);case Ce.DISCONNECT:return h===void 0;case Ce.CONNECT_ERROR:return typeof h=="string"||fn(h);case Ce.EVENT:case Ce.BINARY_EVENT:return Array.isArray(h)&&(typeof h[0]=="number"||typeof h[0]=="string"&&Vh.indexOf(h[0])===-1);case Ce.ACK:case Ce.BINARY_ACK:return Array.isArray(h)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Qf{constructor(d){this.packet=d,this.buffers=[],this.reconPack=d}takeBinaryData(d){if(this.buffers.push(d),this.buffers.length===this.reconPack.attachments){const h=Xf(this.reconPack,this.buffers);return this.finishedReconstruction(),h}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Jf(y){return typeof y=="string"}const Zf=Number.isInteger||function(y){return typeof y=="number"&&isFinite(y)&&Math.floor(y)===y};function e_(y){return y===void 0||Zf(y)}function fn(y){return Object.prototype.toString.call(y)==="[object Object]"}function t_(y,d){switch(y){case Ce.CONNECT:return d===void 0||fn(d);case Ce.DISCONNECT:return d===void 0;case Ce.EVENT:return Array.isArray(d)&&(typeof d[0]=="number"||typeof d[0]=="string"&&Vh.indexOf(d[0])===-1);case Ce.ACK:return Array.isArray(d);case Ce.CONNECT_ERROR:return typeof d=="string"||fn(d);default:return!1}}function r_(y){return Jf(y.nsp)&&e_(y.id)&&t_(y.type,y.data)}const i_=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Rl,Encoder:Yf,get PacketType(){return Ce},isPacketValid:r_,protocol:Gf},Symbol.toStringTag,{value:"Module"}));function Pt(y,d,h){return y.on(d,h),function(){y.off(d,h)}}const s_=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Kh extends ze{constructor(d,h,E){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=d,this.nsp=h,E&&E.auth&&(this.auth=E.auth),this._opts=Object.assign({},E),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const d=this.io;this.subs=[Pt(d,"open",this.onopen.bind(this)),Pt(d,"packet",this.onpacket.bind(this)),Pt(d,"error",this.onerror.bind(this)),Pt(d,"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(...d){return d.unshift("message"),this.emit.apply(this,d),this}emit(d,...h){var E,M,U;if(s_.hasOwnProperty(d))throw new Error('"'+d.toString()+'" is a reserved event name');if(h.unshift(d),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(h),this;const F={type:Ce.EVENT,data:h};if(F.options={},F.options.compress=this.flags.compress!==!1,typeof h[h.length-1]=="function"){const w=this.ids++,f=h.pop();this._registerAckCallback(w,f),F.id=w}const l=(M=(E=this.io.engine)===null||E===void 0?void 0:E.transport)===null||M===void 0?void 0:M.writable,u=this.connected&&!(!((U=this.io.engine)===null||U===void 0)&&U._hasPingExpired());return this.flags.volatile&&!l||(u?(this.notifyOutgoingListeners(F),this.packet(F)):this.sendBuffer.push(F)),this.flags={},this}_registerAckCallback(d,h){var E;const M=(E=this.flags.timeout)!==null&&E!==void 0?E:this._opts.ackTimeout;if(M===void 0){this.acks[d]=h;return}const U=this.io.setTimeoutFn(()=>{delete this.acks[d];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===d&&this.sendBuffer.splice(l,1);h.call(this,new Error("operation has timed out"))},M),F=(...l)=>{this.io.clearTimeoutFn(U),h.apply(this,l)};F.withError=!0,this.acks[d]=F}emitWithAck(d,...h){return new Promise((E,M)=>{const U=(F,l)=>F?M(F):E(l);U.withError=!0,h.push(U),this.emit(d,...h)})}_addToQueue(d){let h;typeof d[d.length-1]=="function"&&(h=d.pop());const E={id:this._queueSeq++,tryCount:0,pending:!1,args:d,flags:Object.assign({fromQueue:!0},this.flags)};d.push((M,...U)=>(this._queue[0],M!==null?E.tryCount>this._opts.retries&&(this._queue.shift(),h&&h(M)):(this._queue.shift(),h&&h(null,...U)),E.pending=!1,this._drainQueue())),this._queue.push(E),this._drainQueue()}_drainQueue(d=!1){if(!this.connected||this._queue.length===0)return;const h=this._queue[0];h.pending&&!d||(h.pending=!0,h.tryCount++,this.flags=h.flags,this.emit.apply(this,h.args))}packet(d){d.nsp=this.nsp,this.io._packet(d)}onopen(){typeof this.auth=="function"?this.auth(d=>{this._sendConnectPacket(d)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(d){this.packet({type:Ce.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},d):d})}onerror(d){this.connected||this.emitReserved("connect_error",d)}onclose(d,h){this.connected=!1,delete this.id,this.emitReserved("disconnect",d,h),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(d=>{if(!this.sendBuffer.some(E=>String(E.id)===d)){const E=this.acks[d];delete this.acks[d],E.withError&&E.call(this,new Error("socket has been disconnected"))}})}onpacket(d){if(d.nsp===this.nsp)switch(d.type){case Ce.CONNECT:d.data&&d.data.sid?this.onconnect(d.data.sid,d.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 Ce.EVENT:case Ce.BINARY_EVENT:this.onevent(d);break;case Ce.ACK:case Ce.BINARY_ACK:this.onack(d);break;case Ce.DISCONNECT:this.ondisconnect();break;case Ce.CONNECT_ERROR:this.destroy();const E=new Error(d.data.message);E.data=d.data.data,this.emitReserved("connect_error",E);break}}onevent(d){const h=d.data||[];d.id!=null&&h.push(this.ack(d.id)),this.connected?this.emitEvent(h):this.receiveBuffer.push(Object.freeze(h))}emitEvent(d){if(this._anyListeners&&this._anyListeners.length){const h=this._anyListeners.slice();for(const E of h)E.apply(this,d)}super.emit.apply(this,d),this._pid&&d.length&&typeof d[d.length-1]=="string"&&(this._lastOffset=d[d.length-1])}ack(d){const h=this;let E=!1;return function(...M){E||(E=!0,h.packet({type:Ce.ACK,id:d,data:M}))}}onack(d){const h=this.acks[d.id];typeof h=="function"&&(delete this.acks[d.id],h.withError&&d.data.unshift(null),h.apply(this,d.data))}onconnect(d,h){this.id=d,this.recovered=h&&this._pid===h,this._pid=h,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(d=>this.emitEvent(d)),this.receiveBuffer=[],this.sendBuffer.forEach(d=>{this.notifyOutgoingListeners(d),this.packet(d)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(d=>d()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ce.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(d){return this.flags.compress=d,this}get volatile(){return this.flags.volatile=!0,this}timeout(d){return this.flags.timeout=d,this}onAny(d){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(d),this}prependAny(d){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(d),this}offAny(d){if(!this._anyListeners)return this;if(d){const h=this._anyListeners;for(let E=0;E<h.length;E++)if(d===h[E])return h.splice(E,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(d){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(d),this}prependAnyOutgoing(d){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(d),this}offAnyOutgoing(d){if(!this._anyOutgoingListeners)return this;if(d){const h=this._anyOutgoingListeners;for(let E=0;E<h.length;E++)if(d===h[E])return h.splice(E,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(d){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const h=this._anyOutgoingListeners.slice();for(const E of h)E.apply(this,d.data)}}}function ci(y){y=y||{},this.ms=y.min||100,this.max=y.max||1e4,this.factor=y.factor||2,this.jitter=y.jitter>0&&y.jitter<=1?y.jitter:0,this.attempts=0}ci.prototype.duration=function(){var y=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var d=Math.random(),h=Math.floor(d*this.jitter*y);y=(Math.floor(d*10)&1)==0?y-h:y+h}return Math.min(y,this.max)|0};ci.prototype.reset=function(){this.attempts=0};ci.prototype.setMin=function(y){this.ms=y};ci.prototype.setMax=function(y){this.max=y};ci.prototype.setJitter=function(y){this.jitter=y};class wl extends ze{constructor(d,h){var E;super(),this.nsps={},this.subs=[],d&&typeof d=="object"&&(h=d,d=void 0),h=h||{},h.path=h.path||"/socket.io",this.opts=h,pn(this,h),this.reconnection(h.reconnection!==!1),this.reconnectionAttempts(h.reconnectionAttempts||1/0),this.reconnectionDelay(h.reconnectionDelay||1e3),this.reconnectionDelayMax(h.reconnectionDelayMax||5e3),this.randomizationFactor((E=h.randomizationFactor)!==null&&E!==void 0?E:.5),this.backoff=new ci({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(h.timeout==null?2e4:h.timeout),this._readyState="closed",this.uri=d;const M=h.parser||i_;this.encoder=new M.Encoder,this.decoder=new M.Decoder,this._autoConnect=h.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(d){return arguments.length?(this._reconnection=!!d,d||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(d){return d===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=d,this)}reconnectionDelay(d){var h;return d===void 0?this._reconnectionDelay:(this._reconnectionDelay=d,(h=this.backoff)===null||h===void 0||h.setMin(d),this)}randomizationFactor(d){var h;return d===void 0?this._randomizationFactor:(this._randomizationFactor=d,(h=this.backoff)===null||h===void 0||h.setJitter(d),this)}reconnectionDelayMax(d){var h;return d===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=d,(h=this.backoff)===null||h===void 0||h.setMax(d),this)}timeout(d){return arguments.length?(this._timeout=d,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(d){if(~this._readyState.indexOf("open"))return this;this.engine=new zf(this.uri,this.opts);const h=this.engine,E=this;this._readyState="opening",this.skipReconnect=!1;const M=Pt(h,"open",function(){E.onopen(),d&&d()}),U=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),d?d(l):this.maybeReconnectOnOpen()},F=Pt(h,"error",U);if(this._timeout!==!1){const l=this._timeout,u=this.setTimeoutFn(()=>{M(),U(new Error("timeout")),h.close()},l);this.opts.autoUnref&&u.unref(),this.subs.push(()=>{this.clearTimeoutFn(u)})}return this.subs.push(M),this.subs.push(F),this}connect(d){return this.open(d)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const d=this.engine;this.subs.push(Pt(d,"ping",this.onping.bind(this)),Pt(d,"data",this.ondata.bind(this)),Pt(d,"error",this.onerror.bind(this)),Pt(d,"close",this.onclose.bind(this)),Pt(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(d){try{this.decoder.add(d)}catch(h){this.onclose("parse error",h)}}ondecoded(d){_n(()=>{this.emitReserved("packet",d)},this.setTimeoutFn)}onerror(d){this.emitReserved("error",d)}socket(d,h){let E=this.nsps[d];return E?this._autoConnect&&!E.active&&E.connect():(E=new Kh(this,d,h),this.nsps[d]=E),E}_destroy(d){const h=Object.keys(this.nsps);for(const E of h)if(this.nsps[E].active)return;this._close()}_packet(d){const h=this.encoder.encode(d);for(let E=0;E<h.length;E++)this.engine.write(h[E],d.options)}cleanup(){this.subs.forEach(d=>d()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(d,h){var E;this.cleanup(),(E=this.engine)===null||E===void 0||E.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",d,h),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const d=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const h=this.backoff.duration();this._reconnecting=!0;const E=this.setTimeoutFn(()=>{d.skipReconnect||(this.emitReserved("reconnect_attempt",d.backoff.attempts),!d.skipReconnect&&d.open(M=>{M?(d._reconnecting=!1,d.reconnect(),this.emitReserved("reconnect_error",M)):d.onreconnect()}))},h);this.opts.autoUnref&&E.unref(),this.subs.push(()=>{this.clearTimeoutFn(E)})}}onreconnect(){const d=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",d)}}const qi={};function dn(y,d){typeof y=="object"&&(d=y,y=void 0),d=d||{};const h=Uf(y,d.path||"/socket.io"),E=h.source,M=h.id,U=h.path,F=qi[M]&&U in qi[M].nsps,l=d.forceNew||d["force new connection"]||d.multiplex===!1||F;let u;return l?u=new wl(E,d):(qi[M]||(qi[M]=new wl(E,d)),u=qi[M]),h.query&&!d.query&&(d.query=h.queryKey),u.socket(h.path,d)}Object.assign(dn,{Manager:wl,Socket:Kh,io:dn,connect:dn});let kt=null;function Ll(){const[y,d]=$e.useState(!1),h=$e.useRef(null);$e.useEffect(()=>{kt||(kt=dn(window.location.origin,{reconnection:!0,reconnectionAttempts:5,reconnectionDelay:1e3})),h.current=kt;const F=()=>{console.log("Socket connected"),d(!0)},l=()=>{console.log("Socket disconnected"),d(!1)};return kt.on("connect",F),kt.on("disconnect",l),kt.connected&&d(!0),()=>{kt==null||kt.off("connect",F),kt==null||kt.off("disconnect",l)}},[]);const E=$e.useCallback((F,l)=>{var u;(u=h.current)==null||u.emit(F,l)},[]),M=$e.useCallback((F,l)=>{var u;(u=h.current)==null||u.on(F,l)},[]),U=$e.useCallback((F,l)=>{var u,v;l?(u=h.current)==null||u.off(F,l):(v=h.current)==null||v.off(F)},[]);return{socket:h.current,connected:y,emit:E,on:M,off:U}}function n_(){const y=Ve(d=>d.projectInfo);return X.jsxs("header",{className:"header",children:[X.jsx("h1",{children:of}),X.jsxs("div",{className:"project-info",children:[y&&X.jsxs(X.Fragment,{children:[X.jsxs("span",{className:"branch",children:[X.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:X.jsx("path",{d:"M11.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5zm-2.25.75a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25zM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5zM3.5 3.25a.75.75 0 1 1 1.5 0 .75.75 0 0 1-1.5 0z"})}),y.currentBranch||"Unknown"]}),X.jsx("span",{children:y.cwd})]}),X.jsxs("span",{children:["v",lf]})]})]})}const o_=[{id:"branch",number:1,label:"Branch"},{id:"worktree",number:2,label:"Count"}];function l_({number:y,label:d,status:h,onClick:E,disabled:M}){return X.jsxs("button",{className:`lnb-step ${h}`,onClick:E,disabled:M,type:"button",children:[X.jsx("span",{className:"step-number",children:h==="completed"?"✓":y}),X.jsx("span",{className:"step-label",children:d})]})}function a_(){const{step:y,goToStep:d,canNavigateTo:h,getStepStatus:E,isSetupCollapsed:M,toggleSetupCollapse:U,terminals:F}=Ve(),l=F.length>0;return X.jsxs("div",{className:"lnb-section setup-section",children:[X.jsxs("div",{className:"lnb-section-header",onClick:U,role:"button",tabIndex:0,children:[X.jsx("span",{className:"section-title",children:"SETUP"}),X.jsx("span",{className:"collapse-icon",children:M?"+":"−"})]}),!M&&X.jsxs("div",{className:"lnb-steps",children:[o_.map(u=>X.jsx(l_,{step:u.id,number:u.number,label:u.label,status:E(u.id),onClick:()=>d(u.id),disabled:!h(u.id)},u.id)),l&&X.jsxs("button",{className:`lnb-step ${y==="running"?"current":"completed"}`,onClick:()=>d("running"),type:"button",children:[X.jsx("span",{className:"step-number",children:"3"}),X.jsx("span",{className:"step-label",children:"Running"})]})]})]})}function c_({status:y}){const d={initializing:"#f59e0b",running:"#22c55e",stopped:"#6b7280",error:"#ef4444"};return X.jsx("span",{className:"status-indicator",style:{backgroundColor:d[y]},title:y})}function h_({sessionId:y,worktreeName:d,status:h,isActive:E,isSelected:M,onSelect:U,onToggleSelect:F,onClose:l}){return X.jsxs("div",{className:`session-item ${E?"active":""} ${M?"selected":""}`,onClick:U,role:"button",tabIndex:0,children:[X.jsx("input",{type:"checkbox",className:"session-checkbox",checked:M,onClick:F,onChange:()=>{}}),X.jsx(c_,{status:h}),X.jsx("span",{className:"session-name",title:d,children:d}),X.jsx("button",{className:"session-close",onClick:l,title:"Close session",type:"button",children:"×"})]})}function u_({branchName:y,sessionCount:d,isCollapsed:h,onToggleCollapse:E,children:M}){return X.jsxs("div",{className:"session-group",children:[X.jsxs("div",{className:"session-group-header",onClick:E,role:"button",tabIndex:0,children:[X.jsx("span",{className:"group-collapse-icon",children:h?"▶":"▼"}),X.jsx("span",{className:"group-name",children:y}),X.jsxs("span",{className:"group-count",children:["(",d,")"]})]}),!h&&X.jsx("div",{className:"session-group-items",children:M})]})}function d_(){const{terminals:y,activeSessionId:d,selectedSessionIds:h,getSessionGroups:E,setActiveSession:M,toggleSessionSelection:U,toggleBranchCollapse:F,removeTerminal:l,openModal:u}=Ve(),v=E(),w=async(f,g,C)=>{f.stopPropagation();try{(await fetch(`/api/worktrees/${encodeURIComponent(C)}`,{method:"DELETE"})).ok&&l(g)}catch(x){console.error("Failed to close session:",x)}};return y.length===0?null:X.jsxs("div",{className:"lnb-section sessions-section",children:[X.jsxs("div",{className:"lnb-section-header",children:[X.jsx("span",{className:"section-title",children:"SESSIONS"}),X.jsx("span",{className:"session-count",children:y.length})]}),X.jsx("div",{className:"session-list",children:v.map(f=>X.jsx(u_,{branchName:f.branchName,sessionCount:f.sessions.length,isCollapsed:f.isCollapsed,onToggleCollapse:()=>F(f.branchName),children:f.sessions.map(g=>X.jsx(h_,{sessionId:g.sessionId,worktreeName:g.worktreeName,status:g.status,isActive:g.sessionId===d,isSelected:h.includes(g.sessionId),onSelect:()=>M(g.sessionId),onToggleSelect:C=>{C.stopPropagation(),U(g.sessionId)},onClose:C=>w(C,g.sessionId,g.worktreeName)},g.sessionId))},f.branchName))}),X.jsx("button",{className:"add-session-btn",onClick:()=>u("addWorktree"),type:"button",children:"+ Add Session"})]})}function f_(){const{selectedSessionIds:y,clearSessionSelection:d,openModal:h}=Ve();return y.length===0?null:X.jsxs("div",{className:"bulk-actions-bar",children:[X.jsxs("span",{className:"selected-count",children:[y.length," selected"]}),X.jsx("button",{className:"bulk-delete-btn",onClick:()=>h("confirmDelete",{sessionIds:y}),type:"button",children:"Delete"}),X.jsx("button",{className:"bulk-cancel-btn",onClick:d,type:"button",children:"Cancel"})]})}function __(){return X.jsxs("nav",{className:"left-nav-bar",children:[X.jsx(a_,{}),X.jsx(d_,{}),X.jsx(f_,{})]})}function p_({children:y}){return X.jsxs("div",{className:"main-layout",children:[X.jsx(__,{}),X.jsx("div",{className:"main-content-area with-lnb",children:y})]})}function qh({children:y,title:d,description:h,showNavButtons:E=!0,nextLabel:M="Next",onNext:U,nextDisabled:F=!1}){const{step:l,goToNext:u,goToPrev:v,isStepComplete:w}=Ve(),f=l==="branch",g=w(l),C=()=>{U?U():u()};return X.jsxs("div",{className:"step-container",children:[X.jsxs("div",{className:"step-header",children:[X.jsx("h2",{children:d}),h&&X.jsx("p",{children:h})]}),X.jsx("div",{className:"step-content",children:y}),E&&X.jsxs("div",{className:"step-navigation",children:[X.jsx("button",{className:"nav-button prev",onClick:v,disabled:f,type:"button",children:"Previous"}),X.jsx("button",{className:"nav-button next",onClick:C,disabled:F||!g,type:"button",children:M})]})]})}function v_(){const{branches:y,selectedBranch:d,setSelectedBranch:h}=Ve();return X.jsxs("div",{className:"setup-section",children:[X.jsx("label",{htmlFor:"branch-select",children:"Select Branch"}),X.jsxs("select",{id:"branch-select",value:d||"",onChange:E=>h(E.target.value||null),children:[X.jsx("option",{value:"",children:"-- Select a branch --"}),y.map(E=>X.jsxs("option",{value:E.name,children:[E.name,E.isCurrent?" (current)":"",E.isRemote?" (remote)":""]},E.name))]})]})}function Dh(){const y=Ve(d=>d.selectedBranch);return X.jsx(qh,{title:"Select Branch",description:"Choose the Git branch to create worktrees from",nextDisabled:!y,children:X.jsx(v_,{})})}function m_(){const{worktreeCount:y,incrementWorktreeCount:d,decrementWorktreeCount:h}=Ve();return X.jsxs("div",{className:"setup-section",children:[X.jsx("label",{children:"Number of Worktrees"}),X.jsxs("div",{className:"counter",children:[X.jsx("button",{onClick:h,disabled:y<=an,children:"-"}),X.jsx("span",{children:y}),X.jsx("button",{onClick:d,disabled:y>=pl,children:"+"})]})]})}function g_(){const{execute:y,isLoading:d,selectedBranch:h,worktreeCount:E}=Ve();return X.jsxs(qh,{title:"Configure Worktrees",description:"Set the number of parallel worktrees to create",nextLabel:d?"Creating...":"Execute",onNext:y,nextDisabled:!h||d||E<1,children:[X.jsx(m_,{}),X.jsxs("div",{className:"execution-summary",children:[X.jsx("h4",{children:"Summary"}),X.jsxs("div",{className:"summary-item",children:[X.jsx("span",{className:"summary-label",children:"Branch:"}),X.jsx("span",{className:"summary-value",children:h})]}),X.jsxs("div",{className:"summary-item",children:[X.jsx("span",{className:"summary-label",children:"Worktrees:"}),X.jsx("span",{className:"summary-value",children:E})]})]})]})}var fl={exports:{}},Th;function S_(){return Th||(Th=1,(function(y,d){(function(h,E){y.exports=E()})(globalThis,(()=>(()=>{var h={4567:function(F,l,u){var v=this&&this.__decorate||function(s,n,p,b){var k,R=arguments.length,S=R<3?n:b===null?b=Object.getOwnPropertyDescriptor(n,p):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")S=Reflect.decorate(s,n,p,b);else for(var A=s.length-1;A>=0;A--)(k=s[A])&&(S=(R<3?k(S):R>3?k(n,p,S):k(n,p))||S);return R>3&&S&&Object.defineProperty(n,p,S),S},w=this&&this.__param||function(s,n){return function(p,b){n(p,b,s)}};Object.defineProperty(l,"__esModule",{value:!0}),l.AccessibilityManager=void 0;const f=u(9042),g=u(9924),C=u(844),x=u(4725),m=u(2585),o=u(3656);let a=l.AccessibilityManager=class extends C.Disposable{constructor(s,n,p,b){super(),this._terminal=s,this._coreBrowserService=p,this._renderService=b,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let k=0;k<this._terminal.rows;k++)this._rowElements[k]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[k]);if(this._topBoundaryFocusListener=k=>this._handleBoundaryFocus(k,0),this._bottomBoundaryFocusListener=k=>this._handleBoundaryFocus(k,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new g.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((k=>this._handleResize(k.rows)))),this.register(this._terminal.onRender((k=>this._refreshRows(k.start,k.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((k=>this._handleChar(k)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
41
41
  `)))),this.register(this._terminal.onA11yTab((k=>this._handleTab(k)))),this.register(this._terminal.onKey((k=>this._handleKey(k.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,o.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,C.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(s){for(let n=0;n<s;n++)this._handleChar(" ")}_handleChar(s){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==s&&(this._charsToAnnounce+=s):this._charsToAnnounce+=s,s===`
42
42
  `&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(s){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(s)||this._charsToConsume.push(s)}_refreshRows(s,n){this._liveRegionDebouncer.refresh(s,n,this._terminal.rows)}_renderRows(s,n){const p=this._terminal.buffer,b=p.lines.length.toString();for(let k=s;k<=n;k++){const R=p.lines.get(p.ydisp+k),S=[],A=(R==null?void 0:R.translateToString(!0,void 0,void 0,S))||"",H=(p.ydisp+k+1).toString(),j=this._rowElements[k];j&&(A.length===0?(j.innerText=" ",this._rowColumns.set(j,[0,1])):(j.textContent=A,this._rowColumns.set(j,S)),j.setAttribute("aria-posinset",H),j.setAttribute("aria-setsize",b))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(s,n){const p=s.target,b=this._rowElements[n===0?1:this._rowElements.length-2];if(p.getAttribute("aria-posinset")===(n===0?"1":`${this._terminal.buffer.lines.length}`)||s.relatedTarget!==b)return;let k,R;if(n===0?(k=p,R=this._rowElements.pop(),this._rowContainer.removeChild(R)):(k=this._rowElements.shift(),R=p,this._rowContainer.removeChild(k)),k.removeEventListener("focus",this._topBoundaryFocusListener),R.removeEventListener("focus",this._bottomBoundaryFocusListener),n===0){const S=this._createAccessibilityTreeNode();this._rowElements.unshift(S),this._rowContainer.insertAdjacentElement("afterbegin",S)}else{const S=this._createAccessibilityTreeNode();this._rowElements.push(S),this._rowContainer.appendChild(S)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(n===0?-1:1),this._rowElements[n===0?1:this._rowElements.length-2].focus(),s.preventDefault(),s.stopImmediatePropagation()}_handleSelectionChange(){var A;if(this._rowElements.length===0)return;const s=document.getSelection();if(!s)return;if(s.isCollapsed)return void(this._rowContainer.contains(s.anchorNode)&&this._terminal.clearSelection());if(!s.anchorNode||!s.focusNode)return void console.error("anchorNode and/or focusNode are null");let n={node:s.anchorNode,offset:s.anchorOffset},p={node:s.focusNode,offset:s.focusOffset};if((n.node.compareDocumentPosition(p.node)&Node.DOCUMENT_POSITION_PRECEDING||n.node===p.node&&n.offset>p.offset)&&([n,p]=[p,n]),n.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(n={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(n.node))return;const b=this._rowElements.slice(-1)[0];if(p.node.compareDocumentPosition(b)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(p={node:b,offset:((A=b.textContent)==null?void 0:A.length)??0}),!this._rowContainer.contains(p.node))return;const k=({node:H,offset:j})=>{const $=H instanceof Text?H.parentNode:H;let I=parseInt($==null?void 0:$.getAttribute("aria-posinset"),10)-1;if(isNaN(I))return console.warn("row is invalid. Race condition?"),null;const Q=this._rowColumns.get($);if(!Q)return console.warn("columns is null. Race condition?"),null;let te=j<Q.length?Q[j]:Q.slice(-1)[0]+1;return te>=this._terminal.cols&&(++I,te=0),{row:I,column:te}},R=k(n),S=k(p);if(R&&S){if(R.row>S.row||R.row===S.row&&R.column>=S.column)throw new Error("invalid range");this._terminal.select(R.column,R.row,(S.row-R.row)*this._terminal.cols-R.column+S.column)}}_handleResize(s){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let n=this._rowContainer.children.length;n<this._terminal.rows;n++)this._rowElements[n]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[n]);for(;this._rowElements.length>s;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const s=this._coreBrowserService.mainDocument.createElement("div");return s.setAttribute("role","listitem"),s.tabIndex=-1,this._refreshRowDimensions(s),s}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let s=0;s<this._terminal.rows;s++)this._refreshRowDimensions(this._rowElements[s])}}_refreshRowDimensions(s){s.style.height=`${this._renderService.dimensions.css.cell.height}px`}};l.AccessibilityManager=a=v([w(1,m.IInstantiationService),w(2,x.ICoreBrowserService),w(3,x.IRenderService)],a)},3614:(F,l)=>{function u(g){return g.replace(/\r?\n/g,"\r")}function v(g,C){return C?"\x1B[200~"+g+"\x1B[201~":g}function w(g,C,x,m){g=v(g=u(g),x.decPrivateModes.bracketedPasteMode&&m.rawOptions.ignoreBracketedPasteMode!==!0),x.triggerDataEvent(g,!0),C.value=""}function f(g,C,x){const m=x.getBoundingClientRect(),o=g.clientX-m.left-10,a=g.clientY-m.top-10;C.style.width="20px",C.style.height="20px",C.style.left=`${o}px`,C.style.top=`${a}px`,C.style.zIndex="1000",C.focus()}Object.defineProperty(l,"__esModule",{value:!0}),l.rightClickHandler=l.moveTextAreaUnderMouseCursor=l.paste=l.handlePasteEvent=l.copyHandler=l.bracketTextForPaste=l.prepareTextForTerminal=void 0,l.prepareTextForTerminal=u,l.bracketTextForPaste=v,l.copyHandler=function(g,C){g.clipboardData&&g.clipboardData.setData("text/plain",C.selectionText),g.preventDefault()},l.handlePasteEvent=function(g,C,x,m){g.stopPropagation(),g.clipboardData&&w(g.clipboardData.getData("text/plain"),C,x,m)},l.paste=w,l.moveTextAreaUnderMouseCursor=f,l.rightClickHandler=function(g,C,x,m,o){f(g,C,x),o&&m.rightClickSelect(g),C.value=m.selectionText,C.select()}},7239:(F,l,u)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.ColorContrastCache=void 0;const v=u(1505);l.ColorContrastCache=class{constructor(){this._color=new v.TwoKeyMap,this._css=new v.TwoKeyMap}setCss(w,f,g){this._css.set(w,f,g)}getCss(w,f){return this._css.get(w,f)}setColor(w,f,g){this._color.set(w,f,g)}getColor(w,f){return this._color.get(w,f)}clear(){this._color.clear(),this._css.clear()}}},3656:(F,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.addDisposableDomListener=void 0,l.addDisposableDomListener=function(u,v,w,f){u.addEventListener(v,w,f);let g=!1;return{dispose:()=>{g||(g=!0,u.removeEventListener(v,w,f))}}}},3551:function(F,l,u){var v=this&&this.__decorate||function(a,s,n,p){var b,k=arguments.length,R=k<3?s:p===null?p=Object.getOwnPropertyDescriptor(s,n):p;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(a,s,n,p);else for(var S=a.length-1;S>=0;S--)(b=a[S])&&(R=(k<3?b(R):k>3?b(s,n,R):b(s,n))||R);return k>3&&R&&Object.defineProperty(s,n,R),R},w=this&&this.__param||function(a,s){return function(n,p){s(n,p,a)}};Object.defineProperty(l,"__esModule",{value:!0}),l.Linkifier=void 0;const f=u(3656),g=u(8460),C=u(844),x=u(2585),m=u(4725);let o=l.Linkifier=class extends C.Disposable{get currentLink(){return this._currentLink}constructor(a,s,n,p,b){super(),this._element=a,this._mouseService=s,this._renderService=n,this._bufferService=p,this._linkProviderService=b,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new g.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new g.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,C.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,C.toDisposable)((()=>{var k;this._lastMouseEvent=void 0,(k=this._activeProviderReplies)==null||k.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,f.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,f.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,f.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(a){this._lastMouseEvent=a;const s=this._positionFromMouseEvent(a,this._element,this._mouseService);if(!s)return;this._isMouseOut=!1;const n=a.composedPath();for(let p=0;p<n.length;p++){const b=n[p];if(b.classList.contains("xterm"))break;if(b.classList.contains("xterm-hover"))return}this._lastBufferCell&&s.x===this._lastBufferCell.x&&s.y===this._lastBufferCell.y||(this._handleHover(s),this._lastBufferCell=s)}_handleHover(a){if(this._activeLine!==a.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(a,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,a)||(this._clearCurrentLink(),this._askForLink(a,!0))}_askForLink(a,s){var p,b;this._activeProviderReplies&&s||((p=this._activeProviderReplies)==null||p.forEach((k=>{k==null||k.forEach((R=>{R.link.dispose&&R.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=a.y);let n=!1;for(const[k,R]of this._linkProviderService.linkProviders.entries())s?(b=this._activeProviderReplies)!=null&&b.get(k)&&(n=this._checkLinkProviderResult(k,a,n)):R.provideLinks(a.y,(S=>{var H,j;if(this._isMouseOut)return;const A=S==null?void 0:S.map(($=>({link:$})));(H=this._activeProviderReplies)==null||H.set(k,A),n=this._checkLinkProviderResult(k,a,n),((j=this._activeProviderReplies)==null?void 0:j.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(a.y,this._activeProviderReplies)}))}_removeIntersectingLinks(a,s){const n=new Set;for(let p=0;p<s.size;p++){const b=s.get(p);if(b)for(let k=0;k<b.length;k++){const R=b[k],S=R.link.range.start.y<a?0:R.link.range.start.x,A=R.link.range.end.y>a?this._bufferService.cols:R.link.range.end.x;for(let H=S;H<=A;H++){if(n.has(H)){b.splice(k--,1);break}n.add(H)}}}}_checkLinkProviderResult(a,s,n){var k;if(!this._activeProviderReplies)return n;const p=this._activeProviderReplies.get(a);let b=!1;for(let R=0;R<a;R++)this._activeProviderReplies.has(R)&&!this._activeProviderReplies.get(R)||(b=!0);if(!b&&p){const R=p.find((S=>this._linkAtPosition(S.link,s)));R&&(n=!0,this._handleNewLink(R))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!n)for(let R=0;R<this._activeProviderReplies.size;R++){const S=(k=this._activeProviderReplies.get(R))==null?void 0:k.find((A=>this._linkAtPosition(A.link,s)));if(S){n=!0,this._handleNewLink(S);break}}return n}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(a){if(!this._currentLink)return;const s=this._positionFromMouseEvent(a,this._element,this._mouseService);s&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,s)&&this._currentLink.link.activate(a,this._currentLink.link.text)}_clearCurrentLink(a,s){this._currentLink&&this._lastMouseEvent&&(!a||!s||this._currentLink.link.range.start.y>=a&&this._currentLink.link.range.end.y<=s)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,C.disposeArray)(this._linkCacheDisposables))}_handleNewLink(a){if(!this._lastMouseEvent)return;const s=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);s&&this._linkAtPosition(a.link,s)&&(this._currentLink=a,this._currentLink.state={decorations:{underline:a.link.decorations===void 0||a.link.decorations.underline,pointerCursor:a.link.decorations===void 0||a.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,a.link,this._lastMouseEvent),a.link.decorations={},Object.defineProperties(a.link.decorations,{pointerCursor:{get:()=>{var n,p;return(p=(n=this._currentLink)==null?void 0:n.state)==null?void 0:p.decorations.pointerCursor},set:n=>{var p;(p=this._currentLink)!=null&&p.state&&this._currentLink.state.decorations.pointerCursor!==n&&(this._currentLink.state.decorations.pointerCursor=n,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",n))}},underline:{get:()=>{var n,p;return(p=(n=this._currentLink)==null?void 0:n.state)==null?void 0:p.decorations.underline},set:n=>{var p,b,k;(p=this._currentLink)!=null&&p.state&&((k=(b=this._currentLink)==null?void 0:b.state)==null?void 0:k.decorations.underline)!==n&&(this._currentLink.state.decorations.underline=n,this._currentLink.state.isHovered&&this._fireUnderlineEvent(a.link,n))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((n=>{if(!this._currentLink)return;const p=n.start===0?0:n.start+1+this._bufferService.buffer.ydisp,b=this._bufferService.buffer.ydisp+1+n.end;if(this._currentLink.link.range.start.y>=p&&this._currentLink.link.range.end.y<=b&&(this._clearCurrentLink(p,b),this._lastMouseEvent)){const k=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);k&&this._askForLink(k,!1)}}))))}_linkHover(a,s,n){var p;(p=this._currentLink)!=null&&p.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!0),this._currentLink.state.decorations.pointerCursor&&a.classList.add("xterm-cursor-pointer")),s.hover&&s.hover(n,s.text)}_fireUnderlineEvent(a,s){const n=a.range,p=this._bufferService.buffer.ydisp,b=this._createLinkUnderlineEvent(n.start.x-1,n.start.y-p-1,n.end.x,n.end.y-p-1,void 0);(s?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(b)}_linkLeave(a,s,n){var p;(p=this._currentLink)!=null&&p.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(s,!1),this._currentLink.state.decorations.pointerCursor&&a.classList.remove("xterm-cursor-pointer")),s.leave&&s.leave(n,s.text)}_linkAtPosition(a,s){const n=a.range.start.y*this._bufferService.cols+a.range.start.x,p=a.range.end.y*this._bufferService.cols+a.range.end.x,b=s.y*this._bufferService.cols+s.x;return n<=b&&b<=p}_positionFromMouseEvent(a,s,n){const p=n.getCoords(a,s,this._bufferService.cols,this._bufferService.rows);if(p)return{x:p[0],y:p[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(a,s,n,p,b){return{x1:a,y1:s,x2:n,y2:p,cols:this._bufferService.cols,fg:b}}};l.Linkifier=o=v([w(1,m.IMouseService),w(2,m.IRenderService),w(3,x.IBufferService),w(4,m.ILinkProviderService)],o)},9042:(F,l)=>{Object.defineProperty(l,"__esModule",{value:!0}),l.tooMuchOutput=l.promptLabel=void 0,l.promptLabel="Terminal input",l.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(F,l,u){var v=this&&this.__decorate||function(m,o,a,s){var n,p=arguments.length,b=p<3?o:s===null?s=Object.getOwnPropertyDescriptor(o,a):s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(m,o,a,s);else for(var k=m.length-1;k>=0;k--)(n=m[k])&&(b=(p<3?n(b):p>3?n(o,a,b):n(o,a))||b);return p>3&&b&&Object.defineProperty(o,a,b),b},w=this&&this.__param||function(m,o){return function(a,s){o(a,s,m)}};Object.defineProperty(l,"__esModule",{value:!0}),l.OscLinkProvider=void 0;const f=u(511),g=u(2585);let C=l.OscLinkProvider=class{constructor(m,o,a){this._bufferService=m,this._optionsService=o,this._oscLinkService=a}provideLinks(m,o){var A;const a=this._bufferService.buffer.lines.get(m-1);if(!a)return void o(void 0);const s=[],n=this._optionsService.rawOptions.linkHandler,p=new f.CellData,b=a.getTrimmedLength();let k=-1,R=-1,S=!1;for(let H=0;H<b;H++)if(R!==-1||a.hasContent(H)){if(a.loadCell(H,p),p.hasExtendedAttrs()&&p.extended.urlId){if(R===-1){R=H,k=p.extended.urlId;continue}S=p.extended.urlId!==k}else R!==-1&&(S=!0);if(S||R!==-1&&H===b-1){const j=(A=this._oscLinkService.getLinkData(k))==null?void 0:A.uri;if(j){const $={start:{x:R+1,y:m},end:{x:H+(S||H!==b-1?0:1),y:m}};let I=!1;if(!(n!=null&&n.allowNonHttpProtocols))try{const Q=new URL(j);["http:","https:"].includes(Q.protocol)||(I=!0)}catch{I=!0}I||s.push({text:j,range:$,activate:(Q,te)=>n?n.activate(Q,te,$):x(0,te),hover:(Q,te)=>{var ne;return(ne=n==null?void 0:n.hover)==null?void 0:ne.call(n,Q,te,$)},leave:(Q,te)=>{var ne;return(ne=n==null?void 0:n.leave)==null?void 0:ne.call(n,Q,te,$)}})}S=!1,p.hasExtendedAttrs()&&p.extended.urlId?(R=H,k=p.extended.urlId):(R=-1,k=-1)}}o(s)}};function x(m,o){if(confirm(`Do you want to navigate to ${o}?
43
43
 
@@ -50,4 +50,4 @@ WARNING: This link could potentially be dangerous`)){const a=window.open();if(a)
50
50
  `))},a=n=>{const{sessionId:p,error:b}=n;p===y&&(f(y,"error"),g.write(`\r
51
51
  [Error: ${b}]\r
52
52
  `))};u("terminal:output",x),u("terminal:created",m),u("terminal:exit",o),u("terminal:error",a);const s=g.onData(n=>{l("terminal:input",{sessionId:y,data:n})});return l("terminal:create",{sessionId:y,worktreePath:d}),C&&l("terminal:resize",{sessionId:y,cols:g.cols,rows:g.rows}),()=>{v("terminal:output",x),v("terminal:created",m),v("terminal:exit",o),v("terminal:error",a),s.dispose()}},[y,d,w,l,u,v,f]),$e.useEffect(()=>{if(!E.current||!U.current)return;const g=U.current,C=M.current,x=()=>{h&&C&&g&&(g.fit(),l("terminal:resize",{sessionId:y,cols:C.cols,rows:C.rows}))},m=new ResizeObserver(()=>{x()});return m.observe(E.current),h&&setTimeout(x,0),()=>{m.disconnect()}},[y,h,l]),$e.useEffect(()=>{h&&M.current&&M.current.focus()},[h]),X.jsx("div",{ref:E,className:"terminal",style:{height:"100%",width:"100%"}})}function k_(){const{terminals:y,activeSessionId:d,setActiveSession:h}=Ve(),E=$e.useCallback(U=>{h(U)},[h]),M=U=>{const F=U.sessionId===d;return X.jsxs("div",{className:`terminal-pane ${F?"active":""}`,onClick:()=>E(U.sessionId),children:[X.jsxs("div",{className:"pane-header",children:[X.jsx("span",{className:`pane-status ${U.status}`}),X.jsx("span",{className:"pane-title",children:U.worktreeName})]}),X.jsx("div",{className:"pane-terminal",children:X.jsx(E_,{sessionId:U.sessionId,worktreePath:U.worktreePath,isActive:F})})]},U.sessionId)};return y.length===0?X.jsx("div",{className:"terminal-grid-container",children:X.jsxs("div",{className:"empty-grid-message",children:[X.jsx("p",{children:"No active sessions"}),X.jsx("p",{children:'Use the Setup wizard or click "+ Add Session" in the sidebar'})]})}):X.jsx("div",{className:"terminal-grid-container scrollable",children:X.jsx("div",{className:"terminal-grid cols-2",children:y.map(U=>M(U))})})}function b_(){const{terminals:y,openModal:d}=Ve(),h=()=>{const E=y.map(M=>M.sessionId);d("confirmDelete",{sessionIds:E})};return y.length===0?X.jsx("div",{className:"terminal-panel empty",children:X.jsxs("div",{className:"empty-message",children:[X.jsx("p",{children:"No active sessions"}),X.jsx("p",{children:'Use the Setup wizard or click "+ Add Session" in the sidebar'})]})}):X.jsxs("div",{className:"terminal-panel",children:[X.jsx("div",{className:"terminal-header",children:X.jsx("div",{className:"terminal-actions",children:X.jsx("button",{className:"danger",onClick:h,children:"Close All"})})}),X.jsx(k_,{})]})}function x_(){const{branches:y,closeModal:d,createSingleWorktree:h,isLoading:E}=Ve(),[M,U]=$e.useState(""),F=async()=>{M&&await h(M)};return X.jsx("div",{className:"modal-overlay",onClick:d,children:X.jsxs("div",{className:"modal-content",onClick:l=>l.stopPropagation(),children:[X.jsxs("div",{className:"modal-header",children:[X.jsx("h2",{children:"Add New Session"}),X.jsx("button",{className:"modal-close",onClick:d,type:"button",children:"×"})]}),X.jsx("div",{className:"modal-body",children:X.jsxs("div",{className:"form-group",children:[X.jsx("label",{htmlFor:"branch-select",children:"Branch"}),X.jsxs("select",{id:"branch-select",value:M,onChange:l=>U(l.target.value),disabled:E,children:[X.jsx("option",{value:"",children:"Select a branch..."}),y.map(l=>X.jsxs("option",{value:l.name,children:[l.name,l.isCurrent?" (current)":"",l.isRemote?" (remote)":""]},l.name))]})]})}),X.jsxs("div",{className:"modal-footer",children:[X.jsx("button",{type:"button",className:"btn-secondary",onClick:d,disabled:E,children:"Cancel"}),X.jsx("button",{type:"button",className:"btn-primary",onClick:F,disabled:!M||E,children:E?"Creating...":"Create Session"})]})]})})}function R_(){const{modalData:y,terminals:d,closeModal:h,removeTerminal:E,clearAllTerminals:M,clearSessionSelection:U}=Ve(),{emit:F}=Ll(),[l,u]=$e.useState(!1),v=(y==null?void 0:y.sessionIds)||[],w=d.filter(C=>v.includes(C.sessionId)),f=v.length===d.length,g=async()=>{u(!0);try{for(const C of v)F("terminal:kill",{sessionId:C});if(f)await fetch("/api/worktrees",{method:"DELETE"}),M();else{const C=w.map(x=>x.worktreeName);await fetch("/api/worktrees/batch",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({names:C})});for(const x of v)E(x)}U(),h()}catch(C){console.error("Failed to delete sessions:",C)}finally{u(!1)}};return X.jsx("div",{className:"modal-overlay",onClick:h,children:X.jsxs("div",{className:"modal-content modal-confirm",onClick:C=>C.stopPropagation(),children:[X.jsxs("div",{className:"modal-header",children:[X.jsx("h2",{children:"Confirm Delete"}),X.jsx("button",{className:"modal-close",onClick:h,type:"button",children:"×"})]}),X.jsxs("div",{className:"modal-body",children:[X.jsx("p",{className:"confirm-message",children:f?"Are you sure you want to delete ALL sessions?":`Are you sure you want to delete ${v.length} session${v.length>1?"s":""}?`}),w.length>0&&X.jsx("ul",{className:"delete-list",children:w.map(C=>X.jsxs("li",{children:[X.jsx("span",{className:`status ${C.status}`}),C.worktreeName]},C.sessionId))}),X.jsx("p",{className:"warning-text",children:"This action will terminate running agents and delete the worktrees. This cannot be undone."})]}),X.jsxs("div",{className:"modal-footer",children:[X.jsx("button",{type:"button",className:"btn-secondary",onClick:h,disabled:l,children:"Cancel"}),X.jsx("button",{type:"button",className:"btn-danger",onClick:g,disabled:l,children:l?"Deleting...":"Delete"})]})]})})}function L_(){const y=Ve(d=>d.modalType);if(!y)return null;switch(y){case"addWorktree":return X.jsx(x_,{});case"confirmDelete":return X.jsx(R_,{});default:return null}}function D_(){const{step:y,isLoading:d,loadingMessage:h,error:E}=Ve(),{connected:M}=Ll();$e.useEffect(()=>{(async()=>{await Ve.getState().fetchProjectInfo(),await Ve.getState().fetchBranches(),await Ve.getState().restoreExistingWorktrees()})()},[]);const U=()=>{switch(y){case"branch":return X.jsx(Dh,{});case"worktree":return X.jsx(g_,{});case"running":return X.jsx(b_,{});default:return X.jsx(Dh,{})}};return X.jsxs("div",{className:"app",children:[X.jsx(n_,{}),X.jsx(p_,{children:U()}),d&&X.jsxs("div",{className:"loading-overlay",children:[X.jsx("div",{className:"loading-spinner"}),X.jsx("p",{children:h||"Loading..."})]}),E&&X.jsx("div",{className:"error-banner",children:E}),X.jsxs("div",{className:"connection-status",children:[X.jsx("span",{className:`dot ${M?"connected":"disconnected"}`}),M?"Connected":"Disconnected"]}),X.jsx(L_,{})]})}Zd.createRoot(document.getElementById("root")).render(X.jsx(Xi.StrictMode,{children:X.jsx(D_,{})}));
53
- //# sourceMappingURL=index-D-hASqdI.js.map
53
+ //# sourceMappingURL=index-Jm7djWxU.js.map