codekin 0.6.2 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{index-C8GlUCii.js → index-CxlBrS5y.js} +2 -2
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/server/dist/opencode-process.d.ts +8 -0
- package/server/dist/opencode-process.js +55 -4
- package/server/dist/opencode-process.js.map +1 -1
- package/server/dist/session-lifecycle.js +7 -1
- package/server/dist/session-lifecycle.js.map +1 -1
- package/server/dist/session-manager.js +10 -4
- package/server/dist/session-manager.js.map +1 -1
- package/server/dist/tsconfig.tsbuildinfo +1 -1
- package/server/dist/types.d.ts +2 -0
|
@@ -6,7 +6,7 @@ var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=
|
|
|
6
6
|
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{fe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?de(n):``}function me(e,t){switch(e.tag){case 26:case 27:case 5:return de(e.type);case 16:return de(`Lazy`);case 13:return e.child!==t&&t!==null?de(`Suspense Fallback`):de(`Suspense`);case 19:return de(`SuspenseList`);case 0:case 15:return pe(e.type,!1);case 11:return pe(e.type.render,!1);case 1:return pe(e.type,!0);case 31:return de(`Activity`);default:return``}}function he(e){try{var t=``,n=null;do t+=me(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
7
7
|
Error generating stack: `+e.message+`
|
|
8
8
|
`+e.stack}}var ge=Object.prototype.hasOwnProperty,_e=t.unstable_scheduleCallback,ve=t.unstable_cancelCallback,ye=t.unstable_shouldYield,be=t.unstable_requestPaint,xe=t.unstable_now,Se=t.unstable_getCurrentPriorityLevel,Ce=t.unstable_ImmediatePriority,we=t.unstable_UserBlockingPriority,Te=t.unstable_NormalPriority,Ee=t.unstable_LowPriority,De=t.unstable_IdlePriority,Oe=t.log,ke=t.unstable_setDisableYieldValue,Ae=null,je=null;function Me(e){if(typeof Oe==`function`&&ke(e),je&&typeof je.setStrictMode==`function`)try{je.setStrictMode(Ae,e)}catch{}}var U=Math.clz32?Math.clz32:Fe,Ne=Math.log,Pe=Math.LN2;function Fe(e){return e>>>=0,e===0?32:31-(Ne(e)/Pe|0)|0}var W=256,Ie=262144,Le=4194304;function Re(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ze(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Re(n))):i=Re(o):i=Re(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Re(n))):i=Re(o)):i=Re(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Be(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ve(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function He(){var e=Le;return Le<<=1,!(Le&62914560)&&(Le=4194304),e}function Ue(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function We(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ge(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-U(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&Ke(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ke(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-U(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function qe(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-U(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Je(e,t){var n=t&-t;return n=n&42?1:Ye(n),(n&(e.suspendedLanes|t))===0?n:0}function Ye(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Xe(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function Ze(){var e=L.p;return e===0?(e=window.event,e===void 0?32:mp(e.type)):e}function Qe(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var $e=Math.random().toString(36).slice(2),et=`__reactFiber$`+$e,tt=`__reactProps$`+$e,nt=`__reactContainer$`+$e,rt=`__reactEvents$`+$e,it=`__reactListeners$`+$e,at=`__reactHandles$`+$e,G=`__reactResources$`+$e,ot=`__reactMarker$`+$e;function st(e){delete e[et],delete e[tt],delete e[rt],delete e[it],delete e[at]}function ct(e){var t=e[et];if(t)return t;for(var n=e.parentNode;n;){if(t=n[nt]||n[et]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=ff(e);e!==null;){if(n=e[et])return n;e=ff(e)}return t}e=n,n=e.parentNode}return null}function lt(e){if(e=e[et]||e[nt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ut(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function dt(e){var t=e[G];return t||=e[G]={hoistableStyles:new Map,hoistableScripts:new Map},t}function ft(e){e[ot]=!0}var pt=new Set,mt={};function ht(e,t){gt(e,t),gt(e+`Capture`,t)}function gt(e,t){for(mt[e]=t,e=0;e<t.length;e++)pt.add(t[e])}var _t=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),vt={},yt={};function bt(e){return ge.call(yt,e)?!0:ge.call(vt,e)?!1:_t.test(e)?yt[e]=!0:(vt[e]=!0,!1)}function xt(e,t,n){if(bt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function St(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ct(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function wt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Tt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Et(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Dt(e){if(!e._valueTracker){var t=Tt(e)?`checked`:`value`;e._valueTracker=Et(e,t,``+e[t])}}function Ot(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Tt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function kt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var At=/[\n"\\]/g;function jt(e){return e.replace(At,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function Mt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+wt(t)):e.value!==``+wt(t)&&(e.value=``+wt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):Pt(e,o,wt(n)):Pt(e,o,wt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+wt(s):e.removeAttribute(`name`)}function Nt(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Dt(e);return}n=n==null?``:``+wt(n),t=t==null?n:``+wt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Dt(e)}function Pt(e,t,n){t===`number`&&kt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function Ft(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+wt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function It(e,t,n){if(t!=null&&(t=``+wt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+wt(n)}function Lt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(F(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=wt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Dt(e)}function Rt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var zt=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function Bt(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||zt.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function Vt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&Bt(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&Bt(e,o,t[o])}function Ht(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var Ut=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Wt=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Gt(e){return Wt.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function Kt(){}var qt=null;function Jt(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yt=null,Xt=null;function Zt(e){var t=lt(e);if(t&&(e=t.stateNode)){var n=e[tt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Mt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+jt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[tt]||null;if(!a)throw Error(i(90));Mt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Ot(r)}break a;case`textarea`:It(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&Ft(e,!!n.multiple,t,!1)}}}var Qt=!1;function $t(e,t,n){if(Qt)return e(t,n);Qt=!0;try{return e(t)}finally{if(Qt=!1,(Yt!==null||Xt!==null)&&(vu(),Yt&&(t=Yt,e=Xt,Xt=Yt=null,Zt(t),e)))for(t=0;t<e.length;t++)Zt(e[t])}}function en(e,t){var n=e.stateNode;if(n===null)return null;var r=n[tt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var tn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),nn=!1;if(tn)try{var rn={};Object.defineProperty(rn,`passive`,{get:function(){nn=!0}}),window.addEventListener(`test`,rn,rn),window.removeEventListener(`test`,rn,rn)}catch{nn=!1}var an=null,on=null,sn=null;function cn(){if(sn)return sn;var e,t=on,n=t.length,r,i=`value`in an?an.value:an.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return sn=i.slice(e,1<r?1-r:void 0)}function ln(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 un(){return!0}function dn(){return!1}function fn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?un:dn,this.isPropagationStopped=dn,this}return m(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=un)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=un)},persist:function(){},isPersistent:un}),t}var pn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},mn=fn(pn),hn=m({},pn,{view:0,detail:0}),gn=fn(hn),K,_n,vn,yn=m({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:An,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!==vn&&(vn&&e.type===`mousemove`?(K=e.screenX-vn.screenX,_n=e.screenY-vn.screenY):_n=K=0,vn=e),K)},movementY:function(e){return`movementY`in e?e.movementY:_n}}),bn=fn(yn),xn=fn(m({},yn,{dataTransfer:0})),Sn=fn(m({},hn,{relatedTarget:0})),Cn=fn(m({},pn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=fn(m({},pn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Tn=fn(m({},pn,{data:0})),En={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Dn={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`},On={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function kn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=On[e])?!!t[e]:!1}function An(){return kn}var jn=fn(m({},hn,{key:function(e){if(e.key){var t=En[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=ln(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Dn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:An,charCode:function(e){return e.type===`keypress`?ln(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?ln(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),Mn=fn(m({},yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Nn=fn(m({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:An})),Pn=fn(m({},pn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Fn=fn(m({},yn,{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})),In=fn(m({},pn,{newState:0,oldState:0})),Ln=[9,13,27,32],Rn=tn&&`CompositionEvent`in window,zn=null;tn&&`documentMode`in document&&(zn=document.documentMode);var Bn=tn&&`TextEvent`in window&&!zn,Vn=tn&&(!Rn||zn&&8<zn&&11>=zn),Hn=` `,Un=!1;function Wn(e,t){switch(e){case`keyup`:return Ln.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Gn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Kn=!1;function qn(e,t){switch(e){case`compositionend`:return Gn(t);case`keypress`:return t.which===32?(Un=!0,Hn):null;case`textInput`:return e=t.data,e===Hn&&Un?null:e;default:return null}}function Jn(e,t){if(Kn)return e===`compositionend`||!Rn&&Wn(e,t)?(e=cn(),sn=on=an=null,Kn=!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 Vn&&t.locale!==`ko`?null:t.data;default:return null}}var Yn={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 Xn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Yn[e.type]:t===`textarea`}function Zn(e,t,n,r){Yt?Xt?Xt.push(r):Xt=[r]:Yt=r,t=Ed(t,`onChange`),0<t.length&&(n=new mn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Qn=null,q=null;function $n(e){vd(e,0)}function er(e){if(Ot(ut(e)))return e}function J(e,t){if(e===`change`)return t}var tr=!1;if(tn){var nr;if(tn){var rr=`oninput`in document;if(!rr){var ir=document.createElement(`div`);ir.setAttribute(`oninput`,`return;`),rr=typeof ir.oninput==`function`}nr=rr}else nr=!1;tr=nr&&(!document.documentMode||9<document.documentMode)}function ar(){Qn&&(Qn.detachEvent(`onpropertychange`,or),q=Qn=null)}function or(e){if(e.propertyName===`value`&&er(q)){var t=[];Zn(t,q,e,Jt(e)),$t($n,t)}}function sr(e,t,n){e===`focusin`?(ar(),Qn=t,q=n,Qn.attachEvent(`onpropertychange`,or)):e===`focusout`&&ar()}function cr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return er(q)}function lr(e,t){if(e===`click`)return er(t)}function ur(e,t){if(e===`input`||e===`change`)return er(t)}function dr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var fr=typeof Object.is==`function`?Object.is:dr;function pr(e,t){if(fr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!ge.call(t,i)||!fr(e[i],t[i]))return!1}return!0}function mr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hr(e,t){var n=mr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=mr(n)}}function gr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?gr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function _r(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=kt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=kt(e.document)}return t}function vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var yr=tn&&`documentMode`in document&&11>=document.documentMode,br=null,xr=null,Sr=null,Cr=!1;function wr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Cr||br==null||br!==kt(r)||(r=br,`selectionStart`in r&&vr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Sr&&pr(Sr,r)||(Sr=r,r=Ed(xr,`onSelect`),0<r.length&&(t=new mn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=br)))}function Tr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Er={animationend:Tr(`Animation`,`AnimationEnd`),animationiteration:Tr(`Animation`,`AnimationIteration`),animationstart:Tr(`Animation`,`AnimationStart`),transitionrun:Tr(`Transition`,`TransitionRun`),transitionstart:Tr(`Transition`,`TransitionStart`),transitioncancel:Tr(`Transition`,`TransitionCancel`),transitionend:Tr(`Transition`,`TransitionEnd`)},Dr={},Or={};tn&&(Or=document.createElement(`div`).style,`AnimationEvent`in window||(delete Er.animationend.animation,delete Er.animationiteration.animation,delete Er.animationstart.animation),`TransitionEvent`in window||delete Er.transitionend.transition);function kr(e){if(Dr[e])return Dr[e];if(!Er[e])return e;var t=Er[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Or)return Dr[e]=t[n];return e}var Ar=kr(`animationend`),jr=kr(`animationiteration`),Mr=kr(`animationstart`),Nr=kr(`transitionrun`),Pr=kr(`transitionstart`),Fr=kr(`transitioncancel`),Ir=kr(`transitionend`),Lr=new Map,Rr=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);Rr.push(`scrollEnd`);function zr(e,t){Lr.set(e,t),ht(t,[e])}var Br=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},Vr=[],Hr=0,Ur=0;function Wr(){for(var e=Hr,t=Ur=Hr=0;t<e;){var n=Vr[t];Vr[t++]=null;var r=Vr[t];Vr[t++]=null;var i=Vr[t];Vr[t++]=null;var a=Vr[t];if(Vr[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Jr(n,i,a)}}function Gr(e,t,n,r){Vr[Hr++]=e,Vr[Hr++]=t,Vr[Hr++]=n,Vr[Hr++]=r,Ur|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Kr(e,t,n,r){return Gr(e,t,n,r),Yr(e)}function qr(e,t){return Gr(e,null,null,t),Yr(e)}function Jr(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-U(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Yr(e){if(50<lu)throw lu=0,uu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Xr={};function Zr(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qr(e,t,n,r){return new Zr(e,t,n,r)}function $r(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ei(e,t){var n=e.alternate;return n===null?(n=Qr(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ti(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function ni(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)$r(e)&&(s=1);else if(typeof e==`string`)s=Wf(e,n,te.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case k:return e=Qr(31,n,t,a),e.elementType=k,e.lanes=o,e;case y:return ri(n.children,a,o,t);case b:s=8,a|=24;break;case x:return e=Qr(12,n,t,a|2),e.elementType=x,e.lanes=o,e;case T:return e=Qr(13,n,t,a),e.elementType=T,e.lanes=o,e;case E:return e=Qr(19,n,t,a),e.elementType=E,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case C:s=10;break a;case S:s=9;break a;case w:s=11;break a;case D:s=14;break a;case O:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Qr(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function ri(e,t,n,r){return e=Qr(7,e,r,t),e.lanes=n,e}function ii(e,t,n){return e=Qr(6,e,null,t),e.lanes=n,e}function ai(e){var t=Qr(18,null,null,0);return t.stateNode=e,t}function oi(e,t,n){return t=Qr(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var si=new WeakMap;function ci(e,t){if(typeof e==`object`&&e){var n=si.get(e);return n===void 0?(t={value:e,source:t,stack:he(t)},si.set(e,t),t):n}return{value:e,source:t,stack:he(t)}}var li=[],ui=0,di=null,fi=0,pi=[],mi=0,hi=null,gi=1,_i=``;function vi(e,t){li[ui++]=fi,li[ui++]=di,di=e,fi=t}function yi(e,t,n){pi[mi++]=gi,pi[mi++]=_i,pi[mi++]=hi,hi=e;var r=gi;e=_i;var i=32-U(r)-1;r&=~(1<<i),n+=1;var a=32-U(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,gi=1<<32-U(t)+i|n<<i|r,_i=a+e}else gi=1<<a|n<<i|r,_i=e}function bi(e){e.return!==null&&(vi(e,1),yi(e,1,0))}function xi(e){for(;e===di;)di=li[--ui],li[ui]=null,fi=li[--ui],li[ui]=null;for(;e===hi;)hi=pi[--mi],pi[mi]=null,_i=pi[--mi],pi[mi]=null,gi=pi[--mi],pi[mi]=null}function Si(e,t){pi[mi++]=gi,pi[mi++]=_i,pi[mi++]=hi,gi=t.id,_i=t.overflow,hi=e}var Ci=null,wi=null,Ti=!1,Ei=null,Di=!1,Oi=Error(i(519));function ki(e){throw Fi(ci(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Oi}function Ai(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[et]=e,t[tt]=r,n){case`dialog`:yd(`cancel`,t),yd(`close`,t);break;case`iframe`:case`object`:case`embed`:yd(`load`,t);break;case`video`:case`audio`:for(n=0;n<gd.length;n++)yd(gd[n],t);break;case`source`:yd(`error`,t);break;case`img`:case`image`:case`link`:yd(`error`,t),yd(`load`,t);break;case`details`:yd(`toggle`,t);break;case`input`:yd(`invalid`,t),Nt(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:yd(`invalid`,t);break;case`textarea`:yd(`invalid`,t),Lt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Md(t.textContent,n)?(r.popover!=null&&(yd(`beforetoggle`,t),yd(`toggle`,t)),r.onScroll!=null&&yd(`scroll`,t),r.onScrollEnd!=null&&yd(`scrollend`,t),r.onClick!=null&&(t.onclick=Kt),t=!0):t=!1,t||ki(e,!0)}function ji(e){for(Ci=e.return;Ci;)switch(Ci.tag){case 5:case 31:case 13:Di=!1;return;case 27:case 3:Di=!0;return;default:Ci=Ci.return}}function Mi(e){if(e!==Ci)return!1;if(!Ti)return ji(e),Ti=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||Wd(e.type,e.memoizedProps)),n=!n),n&&wi&&ki(e),ji(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));wi=df(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));wi=df(e)}else t===27?(t=wi,Qd(e.type)?(e=uf,uf=null,wi=e):wi=t):wi=Ci?lf(e.stateNode.nextSibling):null;return!0}function Ni(){wi=Ci=null,Ti=!1}function Pi(){var e=Ei;return e!==null&&(Yl===null?Yl=e:Yl.push.apply(Yl,e),Ei=null),e}function Fi(e){Ei===null?Ei=[e]:Ei.push(e)}var Ii=B(null),Li=null,Y=null;function Ri(e,t,n){H(Ii,t._currentValue),t._currentValue=n}function X(e){e._currentValue=Ii.current,V(Ii)}function zi(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function Bi(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),zi(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),zi(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function Vi(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;fr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===ie.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[Qf]:e.push(Qf))}a=a.return}e!==null&&Bi(t,e,n,r),t.flags|=262144}function Hi(e){for(e=e.firstContext;e!==null;){if(!fr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Z(e){Li=e,Y=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ui(e){return Gi(Li,e)}function Wi(e,t){return Li===null&&Z(e),Gi(e,t)}function Gi(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},Y===null){if(e===null)throw Error(i(308));Y=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Y=Y.next=t;return n}var Ki=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},qi=t.unstable_scheduleCallback,Ji=t.unstable_NormalPriority,Yi={$$typeof:C,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Xi(){return{controller:new Ki,data:new Map,refCount:0}}function Zi(e){e.refCount--,e.refCount===0&&qi(Ji,function(){e.controller.abort()})}var Qi=null,$i=0,ea=0,ta=null;function na(e,t){if(Qi===null){var n=Qi=[];$i=0,ea=ud(),ta={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return $i++,t.then(ra,ra),t}function ra(){if(--$i===0&&Qi!==null){ta!==null&&(ta.status=`fulfilled`);var e=Qi;Qi=null,ea=0,ta=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ia(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var aa=I.S;I.S=function(e,t){Ql=xe(),typeof t==`object`&&t&&typeof t.then==`function`&&na(e,t),aa!==null&&aa(e,t)};var oa=B(null);function sa(){var e=oa.current;return e===null?Nl.pooledCache:e}function ca(e,t){t===null?H(oa,oa.current):H(oa,t.pool)}function la(){var e=sa();return e===null?null:{parent:Yi._currentValue,pool:e}}var ua=Error(i(460)),da=Error(i(474)),fa=Error(i(542)),pa={then:function(){}};function ma(e){return e=e.status,e===`fulfilled`||e===`rejected`}function ha(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Kt,Kt),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ya(e),e;default:if(typeof t.status==`string`)t.then(Kt,Kt);else{if(e=Nl,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,ya(e),e}throw _a=t,ua}}function ga(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(_a=e,ua):e}}var _a=null;function va(){if(_a===null)throw Error(i(459));var e=_a;return _a=null,e}function ya(e){if(e===ua||e===fa)throw Error(i(483))}var ba=null,xa=0;function Sa(e){var t=xa;return xa+=1,ba===null&&(ba=[]),ha(ba,e,t)}function Ca(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function wa(e,t){throw t.$$typeof===g?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Ta(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ei(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=ii(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===y?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===O&&ga(i)===t.type)?(t=a(t,n.props),Ca(t,n),t.return=e,t):(t=ni(n.type,n.key,n.props,null,e.mode,r),Ca(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=oi(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=ri(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=ii(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case _:return n=ni(t.type,t.key,t.props,null,e.mode,n),Ca(n,t),n.return=e,n;case v:return t=oi(t,e.mode,n),t.return=e,t;case O:return t=ga(t),f(e,t,n)}if(F(t)||M(t))return t=ri(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Sa(t),n);if(t.$$typeof===C)return f(e,Wi(e,t),n);wa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case _:return n.key===i?l(e,t,n,r):null;case v:return n.key===i?u(e,t,n,r):null;case O:return n=ga(n),p(e,t,n,r)}if(F(n)||M(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Sa(n),r);if(n.$$typeof===C)return p(e,t,Wi(e,n),r);wa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case _:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case v:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case O:return r=ga(r),m(e,t,n,r,i)}if(F(r)||M(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Sa(r),i);if(r.$$typeof===C)return m(e,t,n,Wi(t,r),i);wa(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ti&&vi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ti&&vi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ti&&vi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ti&&vi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ti&&vi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ti&&vi(a,g),u}function b(e,r,o,c){if(typeof o==`object`&&o&&o.type===y&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case _:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===y){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===O&&ga(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ca(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===y?(c=ri(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=ni(o.type,o.key,o.props,null,e.mode,c),Ca(c,o),c.return=e,e=c)}return s(e);case v:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=oi(o,e.mode,c),c.return=e,e=c}return s(e);case O:return o=ga(o),b(e,r,o,c)}if(F(o))return h(e,r,o,c);if(M(o)){if(l=M(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return b(e,r,Sa(o),c);if(o.$$typeof===C)return b(e,r,Wi(e,o),c);wa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ii(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{xa=0;var i=b(e,t,n,r);return ba=null,i}catch(t){if(t===ua||t===fa)throw t;var a=Qr(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ea=Ta(!0),Da=Ta(!1),Oa=!1;function ka(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Aa(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ja(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ma(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ml&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Yr(e),Jr(e,null,n),t}return Gr(e,r,t,n),Yr(e)}function Na(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qe(e,n)}}function Pa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Fa=!1;function Ia(){if(Fa){var e=ta;if(e!==null)throw e}}function La(e,t,n,r){Fa=!1;var i=e.updateQueue;Oa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(Fl&f)===f:(r&f)===f){f!==0&&f===ea&&(Fa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=m({},d,f);break a;case 2:Oa=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Ul|=o,e.lanes=o,e.memoizedState=d}}function Ra(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function za(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)Ra(n[e],t)}var Ba=B(null),Va=B(0);function Ha(e,t){e=Vl,H(Va,e),H(Ba,t),Vl=e|t.baseLanes}function Ua(){H(Va,Vl),H(Ba,Ba.current)}function Wa(){Vl=Va.current,V(Ba),V(Va)}var Ga=B(null),Ka=null;function qa(e){var t=e.alternate;H(Qa,Qa.current&1),H(Ga,e),Ka===null&&(t===null||Ba.current!==null||t.memoizedState!==null)&&(Ka=e)}function Ja(e){H(Qa,Qa.current),H(Ga,e),Ka===null&&(Ka=e)}function Ya(e){e.tag===22?(H(Qa,Qa.current),H(Ga,e),Ka===null&&(Ka=e)):Xa(e)}function Xa(){H(Qa,Qa.current),H(Ga,Ga.current)}function Za(e){V(Ga),Ka===e&&(Ka=null),V(Qa)}var Qa=B(0);function $a(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||of(n)||sf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)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 eo=0,Q=null,to=null,no=null,ro=!1,io=!1,ao=!1,oo=0,so=0,co=null,lo=0;function uo(){throw Error(i(321))}function fo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!fr(e[n],t[n]))return!1;return!0}function po(e,t,n,r,i,a){return eo=a,Q=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?As:js,ao=!1,a=n(r,i),ao=!1,io&&(a=ho(t,n,r,i)),mo(e),a}function mo(e){I.H=ks;var t=to!==null&&to.next!==null;if(eo=0,no=to=Q=null,ro=!1,so=0,co=null,t)throw Error(i(300));e===null||Js||(e=e.dependencies,e!==null&&Hi(e)&&(Js=!0))}function ho(e,t,n,r){Q=e;var a=0;do{if(io&&(co=null),so=0,io=!1,25<=a)throw Error(i(301));if(a+=1,no=to=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}I.H=Ms,o=t(n,r)}while(io);return o}function go(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?Co(t):t,e=e.useState()[0],(to===null?null:to.memoizedState)!==e&&(Q.flags|=1024),t}function _o(){var e=oo!==0;return oo=0,e}function vo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function yo(e){if(ro){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}ro=!1}eo=0,no=to=Q=null,io=!1,so=oo=0,co=null}function bo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return no===null?Q.memoizedState=no=e:no=no.next=e,no}function xo(){if(to===null){var e=Q.alternate;e=e===null?null:e.memoizedState}else e=to.next;var t=no===null?Q.memoizedState:no.next;if(t!==null)no=t,to=e;else{if(e===null)throw Q.alternate===null?Error(i(467)):Error(i(310));to=e,e={memoizedState:to.memoizedState,baseState:to.baseState,baseQueue:to.baseQueue,queue:to.queue,next:null},no===null?Q.memoizedState=no=e:no=no.next=e}return no}function So(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Co(e){var t=so;return so+=1,co===null&&(co=[]),e=ha(co,e,t),t=Q,(no===null?t.memoizedState:no.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?As:js),e}function wo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Co(e);if(e.$$typeof===C)return Ui(e)}throw Error(i(438,String(e)))}function To(e){var t=null,n=Q.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Q.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=So(),Q.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=A;return t.index++,n}function Eo(e,t){return typeof t==`function`?t(e):t}function Do(e){return Oo(xo(),to,e)}function Oo(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(eo&f)===f:(Fl&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===ea&&(d=!0);else if((eo&p)===p){u=u.next,p===ea&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,Q.lanes|=p,Ul|=p;f=u.action,ao&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,Q.lanes|=f,Ul|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!fr(o,e.memoizedState)&&(Js=!0,d&&(n=ta,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ko(e){var t=xo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);fr(o,t.memoizedState)||(Js=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function Ao(e,t,n){var r=Q,a=xo(),o=Ti;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!fr((to||a).memoizedState,n);if(s&&(a.memoizedState=n,Js=!0),a=a.queue,ts(No.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||no!==null&&no.memoizedState.tag&1){if(r.flags|=2048,Xo(9,{destroy:void 0},Mo.bind(null,r,a,n,t),null),Nl===null)throw Error(i(349));o||eo&127||jo(r,t,n)}return n}function jo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Q.updateQueue,t===null?(t=So(),Q.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function Mo(e,t,n,r){t.value=n,t.getSnapshot=r,Po(t)&&Fo(e)}function No(e,t,n){return n(function(){Po(t)&&Fo(e)})}function Po(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!fr(e,n)}catch{return!0}}function Fo(e){var t=qr(e,2);t!==null&&pu(t,e,2)}function Io(e){var t=bo();if(typeof e==`function`){var n=e;if(e=n(),ao){Me(!0);try{n()}finally{Me(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:e},t}function Lo(e,t,n,r){return e.baseState=n,Oo(e,to,typeof r==`function`?r:Eo)}function Ro(e,t,n,r,a){if(Es(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};I.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,zo(t,o)):(o.next=n.next,t.pending=n.next=o)}}function zo(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=I.T,o={};I.T=o;try{var s=n(i,r),c=I.S;c!==null&&c(o,s),Bo(e,t,s)}catch(n){Ho(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),Bo(e,t,a)}catch(n){Ho(e,t,n)}}function Bo(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){Vo(e,t,n)},function(n){return Ho(e,t,n)}):Vo(e,t,n)}function Vo(e,t,n){t.status=`fulfilled`,t.value=n,Uo(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,zo(e,n)))}function Ho(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Uo(t),t=t.next;while(t!==r)}e.action=null}function Uo(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Wo(e,t){return t}function Go(e,t){if(Ti){var n=Nl.formState;if(n!==null){a:{var r=Q;if(Ti){if(wi){b:{for(var i=wi,a=Di;i.nodeType!==8;){if(!a){i=null;break b}if(i=lf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){wi=lf(i.nextSibling),r=i.data===`F!`;break a}}ki(r)}r=!1}r&&(t=n[0])}}return n=bo(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wo,lastRenderedState:t},n.queue=r,n=Cs.bind(null,Q,r),r.dispatch=n,r=Io(!1),a=Ts.bind(null,Q,!1,r.queue),r=bo(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Ro.bind(null,Q,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function Ko(e){return qo(xo(),to,e)}function qo(e,t,n){if(t=Oo(e,t,Wo)[0],e=Do(Eo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Co(t)}catch(e){throw e===ua?fa:e}else r=t;t=xo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(Q.flags|=2048,Xo(9,{destroy:void 0},Jo.bind(null,i,n),null)),[r,a,e]}function Jo(e,t){e.action=t}function Yo(e){var t=xo(),n=to;if(n!==null)return qo(t,n,e);xo(),t=t.memoizedState,n=xo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Xo(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Q.updateQueue,t===null&&(t=So(),Q.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Zo(){return xo().memoizedState}function Qo(e,t,n,r){var i=bo();Q.flags|=e,i.memoizedState=Xo(1|t,{destroy:void 0},n,r===void 0?null:r)}function $o(e,t,n,r){var i=xo();r=r===void 0?null:r;var a=i.memoizedState.inst;to!==null&&r!==null&&fo(r,to.memoizedState.deps)?i.memoizedState=Xo(t,a,n,r):(Q.flags|=e,i.memoizedState=Xo(1|t,a,n,r))}function es(e,t){Qo(8390656,8,e,t)}function ts(e,t){$o(2048,8,e,t)}function ns(e){Q.flags|=4;var t=Q.updateQueue;if(t===null)t=So(),Q.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function rs(e){var t=xo().memoizedState;return ns({ref:t,nextImpl:e}),function(){if(Ml&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function is(e,t){return $o(4,2,e,t)}function as(e,t){return $o(4,4,e,t)}function os(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function ss(e,t,n){n=n==null?null:n.concat([e]),$o(4,4,os.bind(null,t,e),n)}function cs(){}function ls(e,t){var n=xo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&fo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function us(e,t){var n=xo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&fo(t,r[1]))return r[0];if(r=e(),ao){Me(!0);try{e()}finally{Me(!1)}}return n.memoizedState=[r,t],r}function ds(e,t,n){return n===void 0||eo&1073741824&&!(Fl&261930)?e.memoizedState=t:(e.memoizedState=n,e=fu(),Q.lanes|=e,Ul|=e,n)}function fs(e,t,n,r){return fr(n,t)?n:Ba.current===null?!(eo&42)||eo&1073741824&&!(Fl&261930)?(Js=!0,e.memoizedState=n):(e=fu(),Q.lanes|=e,Ul|=e,t):(e=ds(e,n,r),fr(e,t)||(Js=!0),e)}function ps(e,t,n,r,i){var a=L.p;L.p=a!==0&&8>a?a:8;var o=I.T,s={};I.T=s,Ts(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?ws(e,t,ia(c,r),du(e)):ws(e,t,r,du(e))}catch(n){ws(e,t,{then:function(){},status:`rejected`,reason:n},du())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function ms(){}function hs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=gs(e).queue;ps(e,a,t,R,n===null?ms:function(){return _s(e),n(r)})}function gs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:R,baseState:R,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:R},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Eo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function _s(e){var t=gs(e);t.next===null&&(t=e.alternate.memoizedState),ws(e,t.next.queue,{},du())}function vs(){return Ui(Qf)}function ys(){return xo().memoizedState}function bs(){return xo().memoizedState}function xs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=du();e=ja(n);var r=Ma(t,e,n);r!==null&&(pu(r,t,n),Na(r,t,n)),t={cache:Xi()},e.payload=t;return}t=t.return}}function Ss(e,t,n){var r=du();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Es(e)?Ds(t,n):(n=Kr(e,t,n,r),n!==null&&(pu(n,e,r),Os(n,t,r)))}function Cs(e,t,n){ws(e,t,n,du())}function ws(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Es(e))Ds(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,fr(s,o))return Gr(e,t,i,0),Nl===null&&Wr(),!1}catch{}if(n=Kr(e,t,i,r),n!==null)return pu(n,e,r),Os(n,t,r),!0}return!1}function Ts(e,t,n,r){if(r={lane:2,revertLane:ud(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Es(e)){if(t)throw Error(i(479))}else t=Kr(e,n,r,2),t!==null&&pu(t,e,2)}function Es(e){var t=e.alternate;return e===Q||t!==null&&t===Q}function Ds(e,t){io=ro=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Os(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qe(e,n)}}var ks={readContext:Ui,use:wo,useCallback:uo,useContext:uo,useEffect:uo,useImperativeHandle:uo,useLayoutEffect:uo,useInsertionEffect:uo,useMemo:uo,useReducer:uo,useRef:uo,useState:uo,useDebugValue:uo,useDeferredValue:uo,useTransition:uo,useSyncExternalStore:uo,useId:uo,useHostTransitionStatus:uo,useFormState:uo,useActionState:uo,useOptimistic:uo,useMemoCache:uo,useCacheRefresh:uo};ks.useEffectEvent=uo;var As={readContext:Ui,use:wo,useCallback:function(e,t){return bo().memoizedState=[e,t===void 0?null:t],e},useContext:Ui,useEffect:es,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Qo(4194308,4,os.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qo(4194308,4,e,t)},useInsertionEffect:function(e,t){Qo(4,2,e,t)},useMemo:function(e,t){var n=bo();t=t===void 0?null:t;var r=e();if(ao){Me(!0);try{e()}finally{Me(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=bo();if(n!==void 0){var i=n(t);if(ao){Me(!0);try{n(t)}finally{Me(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ss.bind(null,Q,e),[r.memoizedState,e]},useRef:function(e){var t=bo();return e={current:e},t.memoizedState=e},useState:function(e){e=Io(e);var t=e.queue,n=Cs.bind(null,Q,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:cs,useDeferredValue:function(e,t){return ds(bo(),e,t)},useTransition:function(){var e=Io(!1);return e=ps.bind(null,Q,e.queue,!0,!1),bo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Q,a=bo();if(Ti){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Nl===null)throw Error(i(349));Fl&127||jo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,es(No.bind(null,r,o,e),[e]),r.flags|=2048,Xo(9,{destroy:void 0},Mo.bind(null,r,o,n,t),null),n},useId:function(){var e=bo(),t=Nl.identifierPrefix;if(Ti){var n=_i,r=gi;n=(r&~(1<<32-U(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=oo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=lo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:vs,useFormState:Go,useActionState:Go,useOptimistic:function(e){var t=bo();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ts.bind(null,Q,!0,n),n.dispatch=t,[e,t]},useMemoCache:To,useCacheRefresh:function(){return bo().memoizedState=xs.bind(null,Q)},useEffectEvent:function(e){var t=bo(),n={impl:e};return t.memoizedState=n,function(){if(Ml&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},js={readContext:Ui,use:wo,useCallback:ls,useContext:Ui,useEffect:ts,useImperativeHandle:ss,useInsertionEffect:is,useLayoutEffect:as,useMemo:us,useReducer:Do,useRef:Zo,useState:function(){return Do(Eo)},useDebugValue:cs,useDeferredValue:function(e,t){return fs(xo(),to.memoizedState,e,t)},useTransition:function(){var e=Do(Eo)[0],t=xo().memoizedState;return[typeof e==`boolean`?e:Co(e),t]},useSyncExternalStore:Ao,useId:ys,useHostTransitionStatus:vs,useFormState:Ko,useActionState:Ko,useOptimistic:function(e,t){return Lo(xo(),to,e,t)},useMemoCache:To,useCacheRefresh:bs};js.useEffectEvent=rs;var Ms={readContext:Ui,use:wo,useCallback:ls,useContext:Ui,useEffect:ts,useImperativeHandle:ss,useInsertionEffect:is,useLayoutEffect:as,useMemo:us,useReducer:ko,useRef:Zo,useState:function(){return ko(Eo)},useDebugValue:cs,useDeferredValue:function(e,t){var n=xo();return to===null?ds(n,e,t):fs(n,to.memoizedState,e,t)},useTransition:function(){var e=ko(Eo)[0],t=xo().memoizedState;return[typeof e==`boolean`?e:Co(e),t]},useSyncExternalStore:Ao,useId:ys,useHostTransitionStatus:vs,useFormState:Yo,useActionState:Yo,useOptimistic:function(e,t){var n=xo();return to===null?(n.baseState=e,[e,n.queue.dispatch]):Lo(n,to,e,t)},useMemoCache:To,useCacheRefresh:bs};Ms.useEffectEvent=rs;function Ns(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:m({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Ps={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=du(),i=ja(r);i.payload=t,n!=null&&(i.callback=n),t=Ma(e,i,r),t!==null&&(pu(t,e,r),Na(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=du(),i=ja(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Ma(e,i,r),t!==null&&(pu(t,e,r),Na(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=du(),r=ja(n);r.tag=2,t!=null&&(r.callback=t),t=Ma(e,r,n),t!==null&&(pu(t,e,n),Na(t,e,n))}};function Fs(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!pr(n,r)||!pr(i,a):!0}function Is(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ps.enqueueReplaceState(t,t.state,null)}function Ls(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=m({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function Rs(e){Br(e)}function zs(e){console.error(e)}function Bs(e){Br(e)}function Vs(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Hs(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Us(e,t,n){return n=ja(n),n.tag=3,n.payload={element:null},n.callback=function(){Vs(e,t)},n}function Ws(e){return e=ja(e),e.tag=3,e}function Gs(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Hs(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Hs(t,n,r),typeof i!=`function`&&(tu===null?tu=new Set([this]):tu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function Ks(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Vi(t,n,a,!0),n=Ga.current,n!==null){switch(n.tag){case 31:case 13:return Ka===null?Tu():n.alternate===null&&Hl===0&&(Hl=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===pa?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Wu(e,r,a)),!1;case 22:return n.flags|=65536,r===pa?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),Wu(e,r,a)),!1}throw Error(i(435,n.tag))}return Wu(e,r,a),Tu(),!1}if(Ti)return t=Ga.current,t===null?(r!==Oi&&(t=Error(i(423),{cause:r}),Fi(ci(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ci(r,n),a=Us(e.stateNode,r,a),Pa(e,a),Hl!==4&&(Hl=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Oi&&(e=Error(i(422),{cause:r}),Fi(ci(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=ci(o,n),Jl===null?Jl=[o]:Jl.push(o),Hl!==4&&(Hl=2),t===null)return!0;r=ci(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Us(n.stateNode,r,e),Pa(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(tu===null||!tu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Ws(a),Gs(a,e,n,r),Pa(n,a),!1}n=n.return}while(n!==null);return!1}var qs=Error(i(461)),Js=!1;function Ys(e,t,n,r){t.child=e===null?Da(t,null,n,r):Ea(t,e.child,n,r)}function Xs(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return Z(t),r=po(e,t,n,o,a,i),s=_o(),e!==null&&!Js?(vo(e,t,i),bc(e,t,i)):(Ti&&s&&bi(t),t.flags|=1,Ys(e,t,r,i),t.child)}function Zs(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!$r(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Qs(e,t,a,r,i)):(e=ni(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!xc(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?pr:n,n(o,r)&&e.ref===t.ref)return bc(e,t,i)}return t.flags|=1,e=ei(a,r),e.ref=t.ref,e.return=t,t.child=e}function Qs(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(pr(a,r)&&e.ref===t.ref)if(Js=!1,t.pendingProps=r=a,xc(e,i))e.flags&131072&&(Js=!0);else return t.lanes=e.lanes,bc(e,t,i)}return oc(e,t,n,r,i)}function $s(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return tc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&ca(t,a===null?null:a.cachePool),a===null?Ua():Ha(t,a),Ya(t);else return r=t.lanes=536870912,tc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&ca(t,null),Ua(),Xa(t)):(ca(t,a.cachePool),Ha(t,a),Xa(t),t.memoizedState=null);return Ys(e,t,i,n),t.child}function ec(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function tc(e,t,n,r,i){var a=sa();return a=a===null?null:{parent:Yi._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&ca(t,null),Ua(),Ya(t),e!==null&&Vi(e,t,r,!0),t.childLanes=i,null}function nc(e,t){return t=hc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function rc(e,t,n){return Ea(t,e.child,null,n),e=nc(t,t.pendingProps),e.flags|=2,Za(t),t.memoizedState=null,e}function ic(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ti){if(r.mode===`hidden`)return e=nc(t,r),t.lanes=536870912,ec(null,e);if(Ja(t),(e=wi)?(e=af(e,Di),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:hi===null?null:{id:gi,overflow:_i},retryLane:536870912,hydrationErrors:null},n=ai(e),n.return=t,t.child=n,Ci=t,wi=null)):e=null,e===null)throw ki(t);return t.lanes=536870912,null}return nc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Ja(t),a)if(t.flags&256)t.flags&=-257,t=rc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(Js||Vi(e,t,n,!1),a=(n&e.childLanes)!==0,Js||a){if(r=Nl,r!==null&&(s=Je(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,qr(e,s),pu(r,e,s),qs;Tu(),t=rc(e,t,n)}else e=o.treeContext,wi=lf(s.nextSibling),Ci=t,Ti=!0,Ei=null,Di=!1,e!==null&&Si(t,e),t=nc(t,r),t.flags|=4096;return t}return e=ei(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function ac(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function oc(e,t,n,r,i){return Z(t),n=po(e,t,n,r,void 0,i),r=_o(),e!==null&&!Js?(vo(e,t,i),bc(e,t,i)):(Ti&&r&&bi(t),t.flags|=1,Ys(e,t,n,i),t.child)}function sc(e,t,n,r,i,a){return Z(t),t.updateQueue=null,n=ho(t,r,n,i),mo(e),r=_o(),e!==null&&!Js?(vo(e,t,a),bc(e,t,a)):(Ti&&r&&bi(t),t.flags|=1,Ys(e,t,n,a),t.child)}function cc(e,t,n,r,i){if(Z(t),t.stateNode===null){var a=Xr,o=n.contextType;typeof o==`object`&&o&&(a=Ui(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ps,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},ka(t),o=n.contextType,a.context=typeof o==`object`&&o?Ui(o):Xr,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Ns(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&Ps.enqueueReplaceState(a,a.state,null),La(t,r,a,i),Ia(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=Ls(n,s);a.props=c;var l=a.context,u=n.contextType;o=Xr,typeof u==`object`&&u&&(o=Ui(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&Is(t,a,r,o),Oa=!1;var f=t.memoizedState;a.state=f,La(t,r,a,i),Ia(),l=t.memoizedState,s||f!==l||Oa?(typeof d==`function`&&(Ns(t,n,d,r),l=t.memoizedState),(c=Oa||Fs(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,Aa(e,t),o=t.memoizedProps,u=Ls(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Xr,typeof l==`object`&&l&&(c=Ui(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&Is(t,a,r,c),Oa=!1,f=t.memoizedState,a.state=f,La(t,r,a,i),Ia();var p=t.memoizedState;o!==d||f!==p||Oa||e!==null&&e.dependencies!==null&&Hi(e.dependencies)?(typeof s==`function`&&(Ns(t,n,s,r),p=t.memoizedState),(u=Oa||Fs(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&Hi(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,ac(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Ea(t,e.child,null,i),t.child=Ea(t,null,n,i)):Ys(e,t,n,i),t.memoizedState=a.state,e=t.child):e=bc(e,t,i),e}function lc(e,t,n,r){return Ni(),t.flags|=256,Ys(e,t,n,r),t.child}var uc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dc(e){return{baseLanes:e,cachePool:la()}}function fc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=Kl),e}function pc(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(Qa.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ti){if(a?qa(t):Xa(t),(e=wi)?(e=af(e,Di),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:hi===null?null:{id:gi,overflow:_i},retryLane:536870912,hydrationErrors:null},n=ai(e),n.return=t,t.child=n,Ci=t,wi=null)):e=null,e===null)throw ki(t);return sf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(Xa(t),a=t.mode,c=hc({mode:`hidden`,children:c},a),r=ri(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=dc(n),r.childLanes=fc(e,s,n),t.memoizedState=uc,ec(null,r)):(qa(t),mc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(qa(t),t.flags&=-257,t=gc(e,t,n)):t.memoizedState===null?(Xa(t),c=r.fallback,a=t.mode,r=hc({mode:`visible`,children:r.children},a),c=ri(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Ea(t,e.child,null,n),r=t.child,r.memoizedState=dc(n),r.childLanes=fc(e,s,n),t.memoizedState=uc,t=ec(null,r)):(Xa(t),t.child=e.child,t.flags|=128,t=null);else if(qa(t),sf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,Fi({value:r,source:null,stack:null}),t=gc(e,t,n)}else if(Js||Vi(e,t,n,!1),s=(n&e.childLanes)!==0,Js||s){if(s=Nl,s!==null&&(r=Je(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,qr(e,r),pu(s,e,r),qs;of(c)||Tu(),t=gc(e,t,n)}else of(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,wi=lf(c.nextSibling),Ci=t,Ti=!0,Ei=null,Di=!1,e!==null&&Si(t,e),t=mc(t,r.children),t.flags|=4096);return t}return a?(Xa(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=ei(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=ri(c,a,n,null),c.flags|=2):c=ei(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,ec(null,r),r=t.child,c=e.child.memoizedState,c===null?c=dc(n):(a=c.cachePool,a===null?a=la():(l=Yi._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=fc(e,s,n),t.memoizedState=uc,ec(e.child,r)):(qa(t),n=e.child,e=n.sibling,n=ei(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function mc(e,t){return t=hc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function hc(e,t){return e=Qr(22,e,null,t),e.lanes=0,e}function gc(e,t,n){return Ea(t,e.child,null,n),e=mc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function _c(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),zi(e.return,t,n)}function vc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function yc(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Qa.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,H(Qa,o),Ys(e,t,r,n),r=Ti?fi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&_c(e,n,t);else if(e.tag===19)_c(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&$a(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),vc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&$a(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}vc(t,!0,n,null,a,r);break;case`together`:vc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function bc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ul|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Vi(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ei(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ei(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function xc(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&Hi(e))):!0}function Sc(e,t,n){switch(t.tag){case 3:ae(t,t.stateNode.containerInfo),Ri(t,Yi,e.memoizedState.cache),Ni();break;case 27:case 5:se(t);break;case 4:ae(t,t.stateNode.containerInfo);break;case 10:Ri(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ja(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(qa(t),e=bc(e,t,n),e===null?null:e.sibling):pc(e,t,n):(qa(t),t.flags|=128,null);qa(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(Vi(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return yc(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),H(Qa,Qa.current),r)break;return null;case 22:return t.lanes=0,$s(e,t,n,t.pendingProps);case 24:Ri(t,Yi,e.memoizedState.cache)}return bc(e,t,n)}function Cc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Js=!0;else{if(!xc(e,n)&&!(t.flags&128))return Js=!1,Sc(e,t,n);Js=!!(e.flags&131072)}else Js=!1,Ti&&t.flags&1048576&&yi(t,fi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=ga(t.elementType),t.type=e,typeof e==`function`)$r(e)?(r=Ls(e,r),t.tag=1,t=cc(null,t,e,r,n)):(t.tag=0,t=oc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===w){t.tag=11,t=Xs(null,t,e,r,n);break a}else if(a===D){t.tag=14,t=Zs(null,t,e,r,n);break a}}throw t=P(e)||e,Error(i(306,t,``))}}return t;case 0:return oc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=Ls(r,t.pendingProps),cc(e,t,r,a,n);case 3:a:{if(ae(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,Aa(e,t),La(t,r,null,n);var s=t.memoizedState;if(r=s.cache,Ri(t,Yi,r),r!==o.cache&&Bi(t,[Yi],n,!0),Ia(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=lc(e,t,r,n);break a}else if(r!==a){a=ci(Error(i(424)),t),Fi(a),t=lc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(wi=lf(e.firstChild),Ci=t,Ti=!0,Ei=null,Di=!0,n=Da(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ni(),r===a){t=bc(e,t,n);break a}Ys(e,t,r,n)}t=t.child}return t;case 26:return ac(e,t),e===null?(n=Af(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ti||(n=t.type,e=t.pendingProps,r=Vd(re.current).createElement(n),r[et]=t,r[tt]=e,Fd(r,n,e),ft(r),t.stateNode=r):t.memoizedState=Af(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return se(t),e===null&&Ti&&(r=t.stateNode=pf(t.type,t.pendingProps,re.current),Ci=t,Di=!0,a=wi,Qd(t.type)?(uf=a,wi=lf(r.firstChild)):wi=a),Ys(e,t,t.pendingProps.children,n),ac(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ti&&((a=r=wi)&&(r=nf(r,t.type,t.pendingProps,Di),r===null?a=!1:(t.stateNode=r,Ci=t,wi=lf(r.firstChild),Di=!1,a=!0)),a||ki(t)),se(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,Wd(a,o)?r=null:s!==null&&Wd(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=po(e,t,go,null,null,n),Qf._currentValue=a),ac(e,t),Ys(e,t,r,n),t.child;case 6:return e===null&&Ti&&((e=n=wi)&&(n=rf(n,t.pendingProps,Di),n===null?e=!1:(t.stateNode=n,Ci=t,wi=null,e=!0)),e||ki(t)),null;case 13:return pc(e,t,n);case 4:return ae(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Ea(t,null,r,n):Ys(e,t,r,n),t.child;case 11:return Xs(e,t,t.type,t.pendingProps,n);case 7:return Ys(e,t,t.pendingProps,n),t.child;case 8:return Ys(e,t,t.pendingProps.children,n),t.child;case 12:return Ys(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,Ri(t,t.type,r.value),Ys(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,Z(t),a=Ui(a),r=r(a),t.flags|=1,Ys(e,t,r,n),t.child;case 14:return Zs(e,t,t.type,t.pendingProps,n);case 15:return Qs(e,t,t.type,t.pendingProps,n);case 19:return yc(e,t,n);case 31:return ic(e,t,n);case 22:return $s(e,t,n,t.pendingProps);case 24:return Z(t),r=Ui(Yi),e===null?(a=sa(),a===null&&(a=Nl,o=Xi(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},ka(t),Ri(t,Yi,a)):((e.lanes&n)!==0&&(Aa(e,t),La(t,null,null,n),Ia()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,Ri(t,Yi,r),r!==a.cache&&Bi(t,[Yi],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Ri(t,Yi,r))),Ys(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function wc(e){e.flags|=4}function Tc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Su())e.flags|=8192;else throw _a=pa,da}else e.flags&=-16777217}function Ec(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Gf(t))if(Su())e.flags|=8192;else throw _a=pa,da}function Dc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:He(),e.lanes|=t,ql|=t)}function Oc(e,t){if(!Ti)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function kc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ac(e,t,n){var r=t.pendingProps;switch(xi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return kc(t),null;case 1:return kc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),X(Yi),oe(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Mi(t)?wc(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Pi())),kc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(wc(t),o===null?(kc(t),Tc(t,a,null,r,n)):(kc(t),Ec(t,o))):o?o===e.memoizedState?(kc(t),t.flags&=-16777217):(wc(t),kc(t),Ec(t,o)):(e=e.memoizedProps,e!==r&&wc(t),kc(t),Tc(t,a,e,r,n)),null;case 27:if(ce(t),n=re.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&wc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return kc(t),null}e=te.current,Mi(t)?Ai(t,e):(e=pf(a,r,n),t.stateNode=e,wc(t))}return kc(t),null;case 5:if(ce(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&wc(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return kc(t),null}if(o=te.current,Mi(t))Ai(t,o);else{var s=Vd(re.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[et]=t,o[tt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Fd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&wc(t)}}return kc(t),Tc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&wc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=re.current,Mi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ci,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[et]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Md(e.nodeValue,n)),e||ki(t,!0)}else e=Vd(e).createTextNode(r),e[et]=t,t.stateNode=e}return kc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Mi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[et]=t}else Ni(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;kc(t),e=!1}else n=Pi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Za(t),t):(Za(t),null);if(t.flags&128)throw Error(i(558))}return kc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Mi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[et]=t}else Ni(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;kc(t),a=!1}else a=Pi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Za(t),t):(Za(t),null)}return Za(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Dc(t,t.updateQueue),kc(t),null);case 4:return oe(),e===null&&Sd(t.stateNode.containerInfo),kc(t),null;case 10:return X(t.type),kc(t),null;case 19:if(V(Qa),r=t.memoizedState,r===null)return kc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Oc(r,!1);else{if(Hl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=$a(e),o!==null){for(t.flags|=128,Oc(r,!1),e=o.updateQueue,t.updateQueue=e,Dc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ti(n,e),n=n.sibling;return H(Qa,Qa.current&1|2),Ti&&vi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&xe()>$l&&(t.flags|=128,a=!0,Oc(r,!1),t.lanes=4194304)}else{if(!a)if(e=$a(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Dc(t,e),Oc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ti)return kc(t),null}else 2*xe()-r.renderingStartTime>$l&&n!==536870912&&(t.flags|=128,a=!0,Oc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(kc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=xe(),e.sibling=null,n=Qa.current,H(Qa,a?n&1|2:n&1),Ti&&vi(t,r.treeForkCount),e);case 22:case 23:return Za(t),Wa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(kc(t),t.subtreeFlags&6&&(t.flags|=8192)):kc(t),n=t.updateQueue,n!==null&&Dc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&V(oa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),X(Yi),kc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function jc(e,t){switch(xi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return X(Yi),oe(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ce(t),null;case 31:if(t.memoizedState!==null){if(Za(t),t.alternate===null)throw Error(i(340));Ni()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Za(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ni()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(Qa),null;case 4:return oe(),null;case 10:return X(t.type),null;case 22:case 23:return Za(t),Wa(),e!==null&&V(oa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return X(Yi),null;case 25:return null;default:return null}}function Mc(e,t){switch(xi(t),t.tag){case 3:X(Yi),oe();break;case 26:case 27:case 5:ce(t);break;case 4:oe();break;case 31:t.memoizedState!==null&&Za(t);break;case 13:Za(t);break;case 19:V(Qa);break;case 10:X(t.type);break;case 22:case 23:Za(t),Wa(),e!==null&&V(oa);break;case 24:X(Yi)}}function Nc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Uu(t,t.return,e)}}function Pc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Uu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Uu(t,t.return,e)}}function Fc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{za(t,n)}catch(t){Uu(e,e.return,t)}}}function Ic(e,t,n){n.props=Ls(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Uu(e,t,n)}}function Lc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Uu(e,t,n)}}function Rc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){Uu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Uu(e,t,n)}else n.current=null}function zc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Uu(e,e.return,t)}}function Bc(e,t,n){try{var r=e.stateNode;Id(r,e.type,n,t),r[tt]=t}catch(t){Uu(e,e.return,t)}}function Vc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Qd(e.type)||e.tag===4}function Hc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Vc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Qd(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Uc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Kt));else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Uc(e,t,n),e=e.sibling;e!==null;)Uc(e,t,n),e=e.sibling}function Wc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Qd(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Wc(e,t,n),e=e.sibling;e!==null;)Wc(e,t,n),e=e.sibling}function Gc(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Fd(t,r,n),t[et]=e,t[tt]=n}catch(t){Uu(e,e.return,t)}}var Kc=!1,qc=!1,Jc=!1,Yc=typeof WeakSet==`function`?WeakSet:Set,Xc=null;function Zc(e,t){if(e=e.containerInfo,zd=sp,e=_r(e),vr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Bd={focusedElem:e,selectionRange:n},sp=!1,Xc=t;Xc!==null;)if(t=Xc,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,Xc=e;else for(;Xc!==null;){switch(t=Xc,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=Ls(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){Uu(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)tf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:tf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,Xc=e;break}Xc=t.return}}function Qc(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:pl(e,n),r&4&&Nc(5,n);break;case 1:if(pl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){Uu(n,n.return,e)}else{var i=Ls(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){Uu(n,n.return,e)}}r&64&&Fc(n),r&512&&Lc(n,n.return);break;case 3:if(pl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{za(e,t)}catch(e){Uu(n,n.return,e)}}break;case 27:t===null&&r&4&&Gc(n);case 26:case 5:pl(e,n),t===null&&r&4&&zc(n),r&512&&Lc(n,n.return);break;case 12:pl(e,n);break;case 31:pl(e,n),r&4&&il(e,n);break;case 13:pl(e,n),r&4&&al(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=qu.bind(null,n),cf(e,n))));break;case 22:if(r=n.memoizedState!==null||Kc,!r){t=t!==null&&t.memoizedState!==null||qc,i=Kc;var a=qc;Kc=r,(qc=t)&&!a?hl(e,n,(n.subtreeFlags&8772)!=0):pl(e,n),Kc=i,qc=a}break;case 30:break;default:pl(e,n)}}function $c(e){var t=e.alternate;t!==null&&(e.alternate=null,$c(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&st(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var el=null,tl=!1;function nl(e,t,n){for(n=n.child;n!==null;)rl(e,t,n),n=n.sibling}function rl(e,t,n){if(je&&typeof je.onCommitFiberUnmount==`function`)try{je.onCommitFiberUnmount(Ae,n)}catch{}switch(n.tag){case 26:qc||Rc(n,t),nl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:qc||Rc(n,t);var r=el,i=tl;Qd(n.type)&&(el=n.stateNode,tl=!1),nl(e,t,n),mf(n.stateNode),el=r,tl=i;break;case 5:qc||Rc(n,t);case 6:if(r=el,i=tl,el=null,nl(e,t,n),el=r,tl=i,el!==null)if(tl)try{(el.nodeType===9?el.body:el.nodeName===`HTML`?el.ownerDocument.body:el).removeChild(n.stateNode)}catch(e){Uu(n,t,e)}else try{el.removeChild(n.stateNode)}catch(e){Uu(n,t,e)}break;case 18:el!==null&&(tl?(e=el,$d(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Np(e)):$d(el,n.stateNode));break;case 4:r=el,i=tl,el=n.stateNode.containerInfo,tl=!0,nl(e,t,n),el=r,tl=i;break;case 0:case 11:case 14:case 15:Pc(2,n,t),qc||Pc(4,n,t),nl(e,t,n);break;case 1:qc||(Rc(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Ic(n,t,r)),nl(e,t,n);break;case 21:nl(e,t,n);break;case 22:qc=(r=qc)||n.memoizedState!==null,nl(e,t,n),qc=r;break;default:nl(e,t,n)}}function il(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Np(e)}catch(e){Uu(t,t.return,e)}}}function al(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Np(e)}catch(e){Uu(t,t.return,e)}}function ol(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Yc),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Yc),t;default:throw Error(i(435,e.tag))}}function sl(e,t){var n=ol(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=Ju.bind(null,e,t);t.then(r,r)}})}function cl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(Qd(c.type)){el=c.stateNode,tl=!1;break a}break;case 5:el=c.stateNode,tl=!1;break a;case 3:case 4:el=c.stateNode.containerInfo,tl=!0;break a}c=c.return}if(el===null)throw Error(i(160));rl(o,s,a),el=null,tl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)ul(t,e),t=t.sibling}var ll=null;function ul(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:cl(t,e),dl(e),r&4&&(Pc(3,e,e.return),Nc(3,e),Pc(5,e,e.return));break;case 1:cl(t,e),dl(e),r&512&&(qc||n===null||Rc(n,n.return)),r&64&&Kc&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=ll;if(cl(t,e),dl(e),r&512&&(qc||n===null||Rc(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[ot]||o[et]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Fd(o,r,n),o[et]=e,ft(o),r=o;break a;case`link`:var s=Hf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Fd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=Hf(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Fd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[et]=e,ft(o),r=o}e.stateNode=r}else Uf(a,e.type,e.stateNode);else e.stateNode=Lf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&Bc(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?Uf(a,e.type,e.stateNode):Lf(a,r,e.memoizedProps))}break;case 27:cl(t,e),dl(e),r&512&&(qc||n===null||Rc(n,n.return)),n!==null&&r&4&&Bc(e,e.memoizedProps,n.memoizedProps);break;case 5:if(cl(t,e),dl(e),r&512&&(qc||n===null||Rc(n,n.return)),e.flags&32){a=e.stateNode;try{Rt(a,``)}catch(t){Uu(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,Bc(e,a,n===null?a:n.memoizedProps)),r&1024&&(Jc=!0);break;case 6:if(cl(t,e),dl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){Uu(e,e.return,t)}}break;case 3:if(Vf=null,a=ll,ll=_f(t.containerInfo),cl(t,e),ll=a,dl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Np(t.containerInfo)}catch(t){Uu(e,e.return,t)}Jc&&(Jc=!1,fl(e));break;case 4:r=ll,ll=_f(e.stateNode.containerInfo),cl(t,e),dl(e),ll=r;break;case 12:cl(t,e),dl(e);break;case 31:cl(t,e),dl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,sl(e,r)));break;case 13:cl(t,e),dl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Zl=xe()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,sl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=Kc,d=qc;if(Kc=u||a,qc=d||l,cl(t,e),qc=d,Kc=u,dl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||Kc||qc||ml(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){Uu(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){Uu(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?ef(m,!0):ef(l.stateNode,!1)}catch(e){Uu(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,sl(e,n))));break;case 19:cl(t,e),dl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,sl(e,r)));break;case 30:break;case 21:break;default:cl(t,e),dl(e)}}function dl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Vc(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;Wc(e,Hc(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(Rt(o,``),n.flags&=-33),Wc(e,Hc(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;Uc(e,Hc(e),s);break;default:throw Error(i(161))}}catch(t){Uu(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function fl(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;fl(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function pl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Qc(e,t.alternate,t),t=t.sibling}function ml(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Pc(4,t,t.return),ml(t);break;case 1:Rc(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Ic(t,t.return,n),ml(t);break;case 27:mf(t.stateNode);case 26:case 5:Rc(t,t.return),ml(t);break;case 22:t.memoizedState===null&&ml(t);break;case 30:ml(t);break;default:ml(t)}e=e.sibling}}function hl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:hl(i,a,n),Nc(4,a);break;case 1:if(hl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){Uu(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)Ra(c[i],s)}catch(e){Uu(r,r.return,e)}}n&&o&64&&Fc(a),Lc(a,a.return);break;case 27:Gc(a);case 26:case 5:hl(i,a,n),n&&r===null&&o&4&&zc(a),Lc(a,a.return);break;case 12:hl(i,a,n);break;case 31:hl(i,a,n),n&&o&4&&il(i,a);break;case 13:hl(i,a,n),n&&o&4&&al(i,a);break;case 22:a.memoizedState===null&&hl(i,a,n),Lc(a,a.return);break;case 30:break;default:hl(i,a,n)}t=t.sibling}}function gl(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Zi(n))}function _l(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zi(e))}function vl(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)yl(e,t,n,r),t=t.sibling}function yl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:vl(e,t,n,r),i&2048&&Nc(9,t);break;case 1:vl(e,t,n,r);break;case 3:vl(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Zi(e)));break;case 12:if(i&2048){vl(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){Uu(t,t.return,e)}}else vl(e,t,n,r);break;case 31:vl(e,t,n,r);break;case 13:vl(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?vl(e,t,n,r):(a._visibility|=2,bl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?vl(e,t,n,r):xl(e,t),i&2048&&gl(o,t);break;case 24:vl(e,t,n,r),i&2048&&_l(t.alternate,t);break;default:vl(e,t,n,r)}}function bl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:bl(a,o,s,c,i),Nc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,bl(a,o,s,c,i)):u._visibility&2?bl(a,o,s,c,i):xl(a,o),i&&l&2048&&gl(o.alternate,o);break;case 24:bl(a,o,s,c,i),i&&l&2048&&_l(o.alternate,o);break;default:bl(a,o,s,c,i)}t=t.sibling}}function xl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:xl(n,r),i&2048&&gl(r.alternate,r);break;case 24:xl(n,r),i&2048&&_l(r.alternate,r);break;default:xl(n,r)}t=t.sibling}}var Sl=8192;function Cl(e,t,n){if(e.subtreeFlags&Sl)for(e=e.child;e!==null;)wl(e,t,n),e=e.sibling}function wl(e,t,n){switch(e.tag){case 26:Cl(e,t,n),e.flags&Sl&&e.memoizedState!==null&&Kf(n,ll,e.memoizedState,e.memoizedProps);break;case 5:Cl(e,t,n);break;case 3:case 4:var r=ll;ll=_f(e.stateNode.containerInfo),Cl(e,t,n),ll=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Sl,Sl=16777216,Cl(e,t,n),Sl=r):Cl(e,t,n));break;default:Cl(e,t,n)}}function Tl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function El(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Xc=r,kl(r,e)}Tl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Dl(e),e=e.sibling}function Dl(e){switch(e.tag){case 0:case 11:case 15:El(e),e.flags&2048&&Pc(9,e,e.return);break;case 3:El(e);break;case 12:El(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ol(e)):El(e);break;default:El(e)}}function Ol(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Xc=r,kl(r,e)}Tl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Pc(8,t,t.return),Ol(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ol(t));break;default:Ol(t)}e=e.sibling}}function kl(e,t){for(;Xc!==null;){var n=Xc;switch(n.tag){case 0:case 11:case 15:Pc(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Zi(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Xc=r;else a:for(n=e;Xc!==null;){r=Xc;var i=r.sibling,a=r.return;if($c(r),r===n){Xc=null;break a}if(i!==null){i.return=a,Xc=i;break a}Xc=a}}}var Al={getCacheForType:function(e){var t=Ui(Yi),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ui(Yi).controller.signal}},jl=typeof WeakMap==`function`?WeakMap:Map,Ml=0,Nl=null,Pl=null,Fl=0,Il=0,Ll=null,Rl=!1,zl=!1,Bl=!1,Vl=0,Hl=0,Ul=0,Wl=0,Gl=0,Kl=0,ql=0,Jl=null,Yl=null,Xl=!1,Zl=0,Ql=0,$l=1/0,eu=null,tu=null,nu=0,ru=null,iu=null,au=0,ou=0,su=null,cu=null,lu=0,uu=null;function du(){return Ml&2&&Fl!==0?Fl&-Fl:I.T===null?Ze():ud()}function fu(){if(Kl===0)if(!(Fl&536870912)||Ti){var e=Ie;Ie<<=1,!(Ie&3932160)&&(Ie=262144),Kl=e}else Kl=536870912;return e=Ga.current,e!==null&&(e.flags|=32),Kl}function pu(e,t,n){(e===Nl&&(Il===2||Il===9)||e.cancelPendingCommit!==null)&&(bu(e,0),_u(e,Fl,Kl,!1)),We(e,n),(!(Ml&2)||e!==Nl)&&(e===Nl&&(!(Ml&2)&&(Wl|=n),Hl===4&&_u(e,Fl,Kl,!1)),nd(e))}function mu(e,t,n){if(Ml&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||Be(e,t),a=r?Ou(e,t):Eu(e,t,!0),o=r;do{if(a===0){zl&&!r&&_u(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!gu(n)){a=Eu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=Jl;var l=c.current.memoizedState.isDehydrated;if(l&&(bu(c,s).flags|=256),s=Eu(c,s,!1),s!==2){if(Bl&&!l){c.errorRecoveryDisabledLanes|=o,Wl|=o,a=4;break a}o=Yl,Yl=a,o!==null&&(Yl===null?Yl=o:Yl.push.apply(Yl,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){bu(e,0),_u(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:_u(r,t,Kl,!Rl);break a;case 2:Yl=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=Zl+300-xe(),10<a)){if(_u(r,t,Kl,!Rl),ze(r,0,!0)!==0)break a;au=t,r.timeoutHandle=qd(hu.bind(null,r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,`Throttled`,-0,0),a);break a}hu(r,n,Yl,eu,Xl,t,Kl,Wl,ql,Rl,o,null,-0,0)}}break}while(1);nd(e)}function hu(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kt},wl(t,a,d);var m=(a&62914560)===a?Zl-xe():(a&4194048)===a?Ql-xe():0;if(m=$(d,m),m!==null){au=a,e.cancelPendingCommit=m(Fu.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),_u(e,a,o,!l);return}}Fu(e,t,a,n,r,i,o,s,c)}function gu(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!fr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function _u(e,t,n,r){t&=~Gl,t&=~Wl,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-U(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ke(e,n,t)}function vu(){return Ml&6?!0:(rd(0,!1),!1)}function yu(){if(Pl!==null){if(Il===0)var e=Pl.return;else e=Pl,Y=Li=null,yo(e),ba=null,xa=0,e=Pl;for(;e!==null;)Mc(e.alternate,e),e=e.return;Pl=null}}function bu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,Jd(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),au=0,yu(),Nl=e,Pl=n=ei(e.current,null),Fl=t,Il=0,Ll=null,Rl=!1,zl=Be(e,t),Bl=!1,ql=Kl=Gl=Wl=Ul=Hl=0,Yl=Jl=null,Xl=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-U(r),a=1<<i;t|=e[i],r&=~a}return Vl=t,Wr(),n}function xu(e,t){Q=null,I.H=ks,t===ua||t===fa?(t=va(),Il=3):t===da?(t=va(),Il=4):Il=t===qs?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Ll=t,Pl===null&&(Hl=1,Vs(e,ci(t,e.current)))}function Su(){var e=Ga.current;return e===null?!0:(Fl&4194048)===Fl?Ka===null:(Fl&62914560)===Fl||Fl&536870912?e===Ka:!1}function Cu(){var e=I.H;return I.H=ks,e===null?ks:e}function wu(){var e=I.A;return I.A=Al,e}function Tu(){Hl=4,Rl||(Fl&4194048)!==Fl&&Ga.current!==null||(zl=!0),!(Ul&134217727)&&!(Wl&134217727)||Nl===null||_u(Nl,Fl,Kl,!1)}function Eu(e,t,n){var r=Ml;Ml|=2;var i=Cu(),a=wu();(Nl!==e||Fl!==t)&&(eu=null,bu(e,t)),t=!1;var o=Hl;a:do try{if(Il!==0&&Pl!==null){var s=Pl,c=Ll;switch(Il){case 8:yu(),o=6;break a;case 3:case 2:case 9:case 6:Ga.current===null&&(t=!0);var l=Il;if(Il=0,Ll=null,Mu(e,s,c,l),n&&zl){o=0;break a}break;default:l=Il,Il=0,Ll=null,Mu(e,s,c,l)}}Du(),o=Hl;break}catch(t){xu(e,t)}while(1);return t&&e.shellSuspendCounter++,Y=Li=null,Ml=r,I.H=i,I.A=a,Pl===null&&(Nl=null,Fl=0,Wr()),o}function Du(){for(;Pl!==null;)Au(Pl)}function Ou(e,t){var n=Ml;Ml|=2;var r=Cu(),a=wu();Nl!==e||Fl!==t?(eu=null,$l=xe()+500,bu(e,t)):zl=Be(e,t);a:do try{if(Il!==0&&Pl!==null){t=Pl;var o=Ll;b:switch(Il){case 1:Il=0,Ll=null,Mu(e,t,o,1);break;case 2:case 9:if(ma(o)){Il=0,Ll=null,ju(t);break}t=function(){Il!==2&&Il!==9||Nl!==e||(Il=7),nd(e)},o.then(t,t);break a;case 3:Il=7;break a;case 4:Il=5;break a;case 7:ma(o)?(Il=0,Ll=null,ju(t)):(Il=0,Ll=null,Mu(e,t,o,7));break;case 5:var s=null;switch(Pl.tag){case 26:s=Pl.memoizedState;case 5:case 27:var c=Pl;if(s?Gf(s):c.stateNode.complete){Il=0,Ll=null;var l=c.sibling;if(l!==null)Pl=l;else{var u=c.return;u===null?Pl=null:(Pl=u,Nu(u))}break b}}Il=0,Ll=null,Mu(e,t,o,5);break;case 6:Il=0,Ll=null,Mu(e,t,o,6);break;case 8:yu(),Hl=6;break a;default:throw Error(i(462))}}ku();break}catch(t){xu(e,t)}while(1);return Y=Li=null,I.H=r,I.A=a,Ml=n,Pl===null?(Nl=null,Fl=0,Wr(),Hl):0}function ku(){for(;Pl!==null&&!ye();)Au(Pl)}function Au(e){var t=Cc(e.alternate,e,Vl);e.memoizedProps=e.pendingProps,t===null?Nu(e):Pl=t}function ju(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=sc(n,t,t.pendingProps,t.type,void 0,Fl);break;case 11:t=sc(n,t,t.pendingProps,t.type.render,t.ref,Fl);break;case 5:yo(t);default:Mc(n,t),t=Pl=ti(t,Vl),t=Cc(n,t,Vl)}e.memoizedProps=e.pendingProps,t===null?Nu(e):Pl=t}function Mu(e,t,n,r){Y=Li=null,yo(t),ba=null,xa=0;var i=t.return;try{if(Ks(e,i,t,n,Fl)){Hl=1,Vs(e,ci(n,e.current)),Pl=null;return}}catch(t){if(i!==null)throw Pl=i,t;Hl=1,Vs(e,ci(n,e.current)),Pl=null;return}t.flags&32768?(Ti||r===1?e=!0:zl||Fl&536870912?e=!1:(Rl=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ga.current,r!==null&&r.tag===13&&(r.flags|=16384))),Pu(t,e)):Nu(t)}function Nu(e){var t=e;do{if(t.flags&32768){Pu(t,Rl);return}e=t.return;var n=Ac(t.alternate,t,Vl);if(n!==null){Pl=n;return}if(t=t.sibling,t!==null){Pl=t;return}Pl=t=e}while(t!==null);Hl===0&&(Hl=5)}function Pu(e,t){do{var n=jc(e.alternate,e);if(n!==null){n.flags&=32767,Pl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Pl=e;return}Pl=e=n}while(e!==null);Hl=6,Pl=null}function Fu(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do Bu();while(nu!==0);if(Ml&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=Ur,Ge(e,n,o,s,c,l),e===Nl&&(Pl=Nl=null,Fl=0),iu=t,ru=e,au=n,ou=o,su=a,cu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Yu(Te,function(){return Vu(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=I.T,I.T=null,a=L.p,L.p=2,s=Ml,Ml|=4;try{Zc(e,t,n)}finally{Ml=s,L.p=a,I.T=r}}nu=1,Iu(),Lu(),Ru()}}function Iu(){if(nu===1){nu=0;var e=ru,t=iu,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=Ml;Ml|=4;try{ul(t,e);var a=Bd,o=_r(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&gr(s.ownerDocument.documentElement,s)){if(c!==null&&vr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=hr(s,h),v=hr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}sp=!!zd,Bd=zd=null}finally{Ml=i,L.p=r,I.T=n}}e.current=t,nu=2}}function Lu(){if(nu===2){nu=0;var e=ru,t=iu,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=Ml;Ml|=4;try{Qc(e,t.alternate,t)}finally{Ml=i,L.p=r,I.T=n}}nu=3}}function Ru(){if(nu===4||nu===3){nu=0,be();var e=ru,t=iu,n=au,r=cu;t.subtreeFlags&10256||t.flags&10256?nu=5:(nu=0,iu=ru=null,zu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(tu=null),Xe(n),t=t.stateNode,je&&typeof je.onCommitFiberRoot==`function`)try{je.onCommitFiberRoot(Ae,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=I.T,i=L.p,L.p=2,I.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{I.T=t,L.p=i}}au&3&&Bu(),nd(e),i=e.pendingLanes,n&261930&&i&42?e===uu?lu++:(lu=0,uu=e):lu=0,rd(0,!1)}}function zu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Zi(t)))}function Bu(){return Iu(),Lu(),Ru(),Vu()}function Vu(){if(nu!==5)return!1;var e=ru,t=ou;ou=0;var n=Xe(au),r=I.T,a=L.p;try{L.p=32>n?32:n,I.T=null,n=su,su=null;var o=ru,s=au;if(nu=0,iu=ru=null,au=0,Ml&6)throw Error(i(331));var c=Ml;if(Ml|=4,Dl(o.current),yl(o,o.current,s,n),Ml=c,rd(0,!1),je&&typeof je.onPostCommitFiberRoot==`function`)try{je.onPostCommitFiberRoot(Ae,o)}catch{}return!0}finally{L.p=a,I.T=r,zu(e,t)}}function Hu(e,t,n){t=ci(n,t),t=Us(e.stateNode,t,2),e=Ma(e,t,2),e!==null&&(We(e,2),nd(e))}function Uu(e,t,n){if(e.tag===3)Hu(e,e,n);else for(;t!==null;){if(t.tag===3){Hu(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(tu===null||!tu.has(r))){e=ci(n,e),n=Ws(2),r=Ma(t,n,2),r!==null&&(Gs(n,r,t,e),We(r,2),nd(r));break}}t=t.return}}function Wu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new jl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Bl=!0,i.add(n),e=Gu.bind(null,e,t,n),t.then(e,e))}function Gu(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Nl===e&&(Fl&n)===n&&(Hl===4||Hl===3&&(Fl&62914560)===Fl&&300>xe()-Zl?!(Ml&2)&&bu(e,0):Gl|=n,ql===Fl&&(ql=0)),nd(e)}function Ku(e,t){t===0&&(t=He()),e=qr(e,t),e!==null&&(We(e,t),nd(e))}function qu(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ku(e,n)}function Ju(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),Ku(e,n)}function Yu(e,t){return _e(e,t)}var Xu=null,Zu=null,Qu=!1,$u=!1,ed=!1,td=0;function nd(e){e!==Zu&&e.next===null&&(Zu===null?Xu=Zu=e:Zu=Zu.next=e),$u=!0,Qu||(Qu=!0,ld())}function rd(e,t){if(!ed&&$u){ed=!0;do for(var n=!1,r=Xu;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-U(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,cd(r,a))}else a=Fl,a=ze(r,r===Nl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Be(r,a)||(n=!0,cd(r,a));r=r.next}while(n);ed=!1}}function id(){ad()}function ad(){$u=Qu=!1;var e=0;td!==0&&Kd()&&(e=td);for(var t=xe(),n=null,r=Xu;r!==null;){var i=r.next,a=od(r,t);a===0?(r.next=null,n===null?Xu=i:n.next=i,i===null&&(Zu=n)):(n=r,(e!==0||a&3)&&($u=!0)),r=i}nu!==0&&nu!==5||rd(e,!1),td!==0&&(td=0)}function od(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-U(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ve(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Nl,n=Fl,n=ze(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Il===2||Il===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&ve(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Be(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&ve(r),Xe(n)){case 2:case 8:n=we;break;case 32:n=Te;break;case 268435456:n=De;break;default:n=Te}return r=sd.bind(null,e),n=_e(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&ve(r),e.callbackPriority=2,e.callbackNode=null,2}function sd(e,t){if(nu!==0&&nu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Bu()&&e.callbackNode!==n)return null;var r=Fl;return r=ze(e,e===Nl?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(mu(e,r,t),od(e,xe()),e.callbackNode!=null&&e.callbackNode===n?sd.bind(null,e):null)}function cd(e,t){if(Bu())return null;mu(e,t,!0)}function ld(){Xd(function(){Ml&6?_e(Ce,id):ad()})}function ud(){if(td===0){var e=ea;e===0&&(e=W,W<<=1,!(W&261888)&&(W=256)),td=e}return td}function dd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:Gt(``+e)}function fd(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function pd(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=dd((i[tt]||null).action),o=r.submitter;o&&(t=(t=o[tt]||null)?dd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new mn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(td!==0){var e=o?fd(i,o):new FormData(i);hs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?fd(i,o):new FormData(i),hs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var md=0;md<Rr.length;md++){var hd=Rr[md];zr(hd.toLowerCase(),`on`+(hd[0].toUpperCase()+hd.slice(1)))}zr(Ar,`onAnimationEnd`),zr(jr,`onAnimationIteration`),zr(Mr,`onAnimationStart`),zr(`dblclick`,`onDoubleClick`),zr(`focusin`,`onFocus`),zr(`focusout`,`onBlur`),zr(Nr,`onTransitionRun`),zr(Pr,`onTransitionStart`),zr(Fr,`onTransitionCancel`),zr(Ir,`onTransitionEnd`),gt(`onMouseEnter`,[`mouseout`,`mouseover`]),gt(`onMouseLeave`,[`mouseout`,`mouseover`]),gt(`onPointerEnter`,[`pointerout`,`pointerover`]),gt(`onPointerLeave`,[`pointerout`,`pointerover`]),ht(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),ht(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),ht(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),ht(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),ht(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var gd=`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(` `),_d=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(gd));function vd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Br(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){Br(e)}i.currentTarget=null,a=c}}}}function yd(e,t){var n=t[rt];n===void 0&&(n=t[rt]=new Set);var r=e+`__bubble`;n.has(r)||(Cd(t,e,2,!1),n.add(r))}function bd(e,t,n){var r=0;t&&(r|=4),Cd(n,e,r,t)}var xd=`_reactListening`+Math.random().toString(36).slice(2);function Sd(e){if(!e[xd]){e[xd]=!0,pt.forEach(function(t){t!==`selectionchange`&&(_d.has(t)||bd(t,!1,e),bd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[xd]||(t[xd]=!0,bd(`selectionchange`,!1,t))}}function Cd(e,t,n,r){switch(mp(t)){case 2:var i=cp;break;case 8:i=lp;break;default:i=up}n=i.bind(null,t,n,e),i=void 0,!nn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function wd(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=ct(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}$t(function(){var r=a,i=Jt(n),s=[];a:{var c=Lr.get(e);if(c!==void 0){var l=mn,u=e;switch(e){case`keypress`:if(ln(n)===0)break a;case`keydown`:case`keyup`:l=jn;break;case`focusin`:u=`focus`,l=Sn;break;case`focusout`:u=`blur`,l=Sn;break;case`beforeblur`:case`afterblur`:l=Sn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=bn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=xn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=Nn;break;case Ar:case jr:case Mr:l=Cn;break;case Ir:l=Pn;break;case`scroll`:case`scrollend`:l=gn;break;case`wheel`:l=Fn;break;case`copy`:case`cut`:case`paste`:l=wn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=Mn;break;case`toggle`:case`beforetoggle`:l=In}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=en(m,p),g!=null&&d.push(Td(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==qt&&(u=n.relatedTarget||n.fromElement)&&(ct(u)||u[nt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?ct(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=bn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=Mn,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:ut(l),h=u==null?c:ut(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,ct(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Dd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Od(s,c,l,d,!1),u!==null&&f!==null&&Od(s,f,u,d,!0)}}a:{if(c=r?ut(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=J;else if(Xn(c))if(tr)v=ur;else{v=cr;var y=sr}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&Ht(r.elementType)&&(v=J):v=lr;if(v&&=v(e,r)){Zn(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&Pt(c,`number`,c.value)}switch(y=r?ut(r):window,e){case`focusin`:(Xn(y)||y.contentEditable===`true`)&&(br=y,xr=r,Sr=null);break;case`focusout`:Sr=xr=br=null;break;case`mousedown`:Cr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Cr=!1,wr(s,n,i);break;case`selectionchange`:if(yr)break;case`keydown`:case`keyup`:wr(s,n,i)}var b;if(Rn)b:{switch(e){case`compositionstart`:var x=`onCompositionStart`;break b;case`compositionend`:x=`onCompositionEnd`;break b;case`compositionupdate`:x=`onCompositionUpdate`;break b}x=void 0}else Kn?Wn(e,n)&&(x=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(x=`onCompositionStart`);x&&(Vn&&n.locale!==`ko`&&(Kn||x!==`onCompositionStart`?x===`onCompositionEnd`&&Kn&&(b=cn()):(an=i,on=`value`in an?an.value:an.textContent,Kn=!0)),y=Ed(r,x),0<y.length&&(x=new Tn(x,e,null,n,i),s.push({event:x,listeners:y}),b?x.data=b:(b=Gn(n),b!==null&&(x.data=b)))),(b=Bn?qn(e,n):Jn(e,n))&&(x=Ed(r,`onBeforeInput`),0<x.length&&(y=new Tn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:x}),y.data=b)),pd(s,e,r,n,i)}vd(s,t)})}function Td(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Ed(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=en(e,n),i!=null&&r.unshift(Td(e,i,a)),i=en(e,t),i!=null&&r.push(Td(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Dd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Od(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=en(n,a),l!=null&&o.unshift(Td(n,l,c))):i||(l=en(n,a),l!=null&&o.push(Td(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var kd=/\r\n?/g,Ad=/\u0000|\uFFFD/g;function jd(e){return(typeof e==`string`?e:``+e).replace(kd,`
|
|
9
|
-
`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function Nd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Rt(e,``+r);break;case`className`:St(e,`class`,r);break;case`tabIndex`:St(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:St(e,n,r);break;case`style`:Vt(e,r,o);break;case`data`:if(t!==`object`){St(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Nd(e,t,`name`,a.name,a,null),Nd(e,t,`formEncType`,a.formEncType,a,null),Nd(e,t,`formMethod`,a.formMethod,a,null),Nd(e,t,`formTarget`,a.formTarget,a,null)):(Nd(e,t,`encType`,a.encType,a,null),Nd(e,t,`method`,a.method,a,null),Nd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`onScroll`:r!=null&&yd(`scroll`,e);break;case`onScrollEnd`:r!=null&&yd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Gt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:yd(`beforetoggle`,e),yd(`toggle`,e),xt(e,`popover`,r);break;case`xlinkActuate`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:xt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Ut.get(n)||n,xt(e,n,r))}}function Pd(e,t,n,r,a,o){switch(n){case`style`:Vt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Rt(e,``+r);break;case`onScroll`:r!=null&&yd(`scroll`,e);break;case`onScrollEnd`:r!=null&&yd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!mt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[tt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):xt(e,n,r)}}}function Fd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:yd(`error`,e),yd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Nd(e,t,o,s,n,null)}}a&&Nd(e,t,`srcSet`,n.srcSet,n,null),r&&Nd(e,t,`src`,n.src,n,null);return;case`input`:yd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Nd(e,t,r,d,n,null)}}Nt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in yd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Nd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ft(e,!!r,n,!0):Ft(e,!!r,t,!1);return;case`textarea`:for(s in yd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Nd(e,t,s,c,n,null)}Lt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Nd(e,t,l,r,n,null)}return;case`dialog`:yd(`beforetoggle`,e),yd(`toggle`,e),yd(`cancel`,e),yd(`close`,e);break;case`iframe`:case`object`:yd(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)yd(gd[r],e);break;case`image`:yd(`error`,e),yd(`load`,e);break;case`details`:yd(`toggle`,e);break;case`embed`:case`source`:case`link`:yd(`error`,e),yd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Nd(e,t,u,r,n,null)}return;default:if(Ht(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Pd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Nd(e,t,c,r,n,null))}function Id(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Nd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Nd(e,t,p,m,r,f)}}Mt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Nd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Nd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ft(e,!!n,n?[]:``,!1):Ft(e,!!n,t,!0)):Ft(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Nd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Nd(e,t,s,a,r,o)}It(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Nd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Nd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Nd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Nd(e,t,u,p,r,m)}return;default:if(Ht(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Pd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Pd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Nd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Nd(e,t,f,p,r,m)}function Ld(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Rd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Ld(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Ld(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var zd=null,Bd=null;function Vd(e){return e.nodeType===9?e:e.ownerDocument}function Hd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Ud(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Wd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Gd=null;function Kd(){var e=window.event;return e&&e.type===`popstate`?e===Gd?!1:(Gd=e,!0):(Gd=null,!1)}var qd=typeof setTimeout==`function`?setTimeout:void 0,Jd=typeof clearTimeout==`function`?clearTimeout:void 0,Yd=typeof Promise==`function`?Promise:void 0,Xd=typeof queueMicrotask==`function`?queueMicrotask:Yd===void 0?qd:function(e){return Yd.resolve(null).then(e).catch(Zd)};function Zd(e){setTimeout(function(){throw e})}function Qd(e){return e===`head`}function $d(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)mf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,mf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&mf(e.ownerDocument.body);n=i}while(n);Np(t)}function ef(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function tf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:tf(n),st(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function nf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[ot])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=lf(e.nextSibling),e===null)break}return null}function rf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lf(e.nextSibling),e===null))return null;return e}function af(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lf(e.nextSibling),e===null))return null;return e}function of(e){return e.data===`$?`||e.data===`$~`}function sf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function lf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var uf=null;function df(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function ff(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function pf(e,t,n){switch(t=Vd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function mf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);st(e)}var hf=new Map,gf=new Set;function _f(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var vf=L.d;L.d={f:yf,r:bf,D:Cf,C:wf,L:Tf,m:Ef,X:Of,S:Df,M:kf};function yf(){var e=vf.f(),t=vu();return e||t}function bf(e){var t=lt(e);t!==null&&t.tag===5&&t.type===`form`?_s(t):vf.r(e)}var xf=typeof document>`u`?null:document;function Sf(e,t,n){var r=xf;if(r&&typeof t==`string`&&t){var i=jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),gf.has(i)||(gf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Fd(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Cf(e){vf.D(e),Sf(`dns-prefetch`,e,null)}function wf(e,t){vf.C(e,t),Sf(`preconnect`,e,t)}function Tf(e,t,n){vf.L(e,t,n);var r=xf;if(r&&e&&t){var i=`link[rel="preload"][as="`+jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+jt(n.imageSizes)+`"]`)):i+=`[href="`+jt(e)+`"]`;var a=i;switch(t){case`style`:a=jf(e);break;case`script`:a=Ff(e)}hf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),hf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Mf(a))||t===`script`&&r.querySelector(If(a))||(t=r.createElement(`link`),Fd(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Ef(e,t){vf.m(e,t);var n=xf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+jt(r)+`"][href="`+jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Ff(e)}if(!hf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),hf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(If(a)))return}r=n.createElement(`link`),Fd(r,`link`,e),ft(r),n.head.appendChild(r)}}}function Df(e,t,n){vf.S(e,t,n);var r=xf;if(r&&e){var i=dt(r).hoistableStyles,a=jf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Mf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=hf.get(a))&&zf(e,n);var c=o=r.createElement(`link`);ft(c),Fd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Rf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Of(e,t){vf.X(e,t);var n=xf;if(n&&e){var r=dt(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=m({src:e,async:!0},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),ft(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t){vf.M(e,t);var n=xf;if(n&&e){var r=dt(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),ft(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t,n,r){var a=(a=re.current)?_f(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=jf(n.href),n=dt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=jf(n.href);var o=dt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Mf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),hf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},hf.set(e,n),o||Pf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Ff(n),n=dt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function jf(e){return`href="`+jt(e)+`"`}function Mf(e){return`link[rel="stylesheet"][`+e+`]`}function Nf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Pf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Fd(t,`link`,n),ft(t),e.head.appendChild(t))}function Ff(e){return`[src="`+jt(e)+`"]`}function If(e){return`script[async]`+e}function Lf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+jt(n.href)+`"]`);if(r)return t.instance=r,ft(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ft(r),Fd(r,`style`,a),Rf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=jf(n.href);var o=e.querySelector(Mf(a));if(o)return t.state.loading|=4,t.instance=o,ft(o),o;r=Nf(n),(a=hf.get(a))&&zf(r,a),o=(e.ownerDocument||e).createElement(`link`),ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Fd(o,`link`,r),t.state.loading|=4,Rf(o,n.precedence,e),t.instance=o;case`script`:return o=Ff(n.src),(a=e.querySelector(If(o)))?(t.instance=a,ft(a),a):(r=n,(a=hf.get(o))&&(r=m({},n),Bf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ft(a),Fd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Rf(r,n.precedence,e));return t.instance}function Rf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Vf=null;function Hf(e,t,n){if(Vf===null){var r=new Map,i=Vf=new Map;i.set(n,r)}else i=Vf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ot]||a[et]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Uf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Wf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Gf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Kf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=jf(r.href),a=t.querySelector(Mf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ft(a);return}a=t.ownerDocument||t,r=Nf(r),(i=hf.get(i))&&zf(r,i),a=a.createElement(`link`),ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Fd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var qf=0;function $(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&qf===0&&(qf=62500*Rd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>qf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:R,_currentValue2:R,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ue(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ue(0),this.hiddenUpdates=Ue(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Qr(3,null,null,t),e.current=a,a.stateNode=e,t=Xi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ka(a),e}function tp(e){return e?(e=Xr,e):Xr}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=ja(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ma(e,r,t),n!==null&&(pu(n,e,t),Na(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=qr(e,67108864);t!==null&&pu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=du();t=Ye(t);var n=qr(e,t);n!==null&&pu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,up(e,t,n,r)}finally{L.p=a,I.T=i}}function lp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,up(e,t,n,r)}finally{L.p=a,I.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=lt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Re(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-U(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Ml&6)&&($l=xe()+500,rd(0,!1))}}break;case 31:case 13:s=qr(a,2),s!==null&&pu(s,a,2),vu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=Jt(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=ct(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Se()){case Ce:return 2;case we:return 8;case Te:case Ee:return 32;case De:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=lt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=ct(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Qe(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Qe(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);qt=r,n.target.dispatchEvent(r),qt=null}else return t=lt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=lt(n);a!==null&&(e.splice(t,3),t-=3,hs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[tt]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[tt]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,du(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),vu(),t[nt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ze();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.4`)throw Error(i(527,Lp,`19.2.4`));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ae=zp.inject(Rp),je=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Rs,s=zs,c=Bs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[nt]=t.current,Sd(e),new Fp(t)}})),_=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=l(d(),1),y=_(),b=`codekin-settings`,x={token:``,fontSize:16,theme:`dark`};function S(){try{let e=localStorage.getItem(b),t=e?JSON.parse(e):null,n={...x,token:t?.token??x.token,theme:t?.theme===`light`?`light`:`dark`},r=new URL(window.location.href),i=r.searchParams.get(`token`);return i&&(n.token=i,localStorage.setItem(b,JSON.stringify(n)),r.searchParams.delete(`token`),window.history.replaceState({},``,r.pathname+r.search+r.hash)),n}catch{return x}}function C(e){localStorage.setItem(b,JSON.stringify(e))}function w(){let[e,t]=(0,v.useState)(S);return{settings:e,updateSettings:(0,v.useCallback)(e=>{t(t=>{let n={...t,...e};return C(n),n})},[])}}function T(e){let[t,n]=(0,v.useState)([]),[r,i]=(0,v.useState)([]),[a,o]=(0,v.useState)([]),[s,c]=(0,v.useState)(!0),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(!1),p=t.flatMap(e=>e.repos),[m,h]=(0,v.useState)(0);return(0,v.useEffect)(()=>{let t={};e&&(t.Authorization=`Bearer ${e}`),fetch(`/cc/api/repos`,{headers:t}).then(e=>{if(!e.ok)throw Error(`Failed to load repos: ${e.status}`);return e.json()}).then(e=>{n(e.groups),i(e.globalSkills??[]),o(e.globalModules??[]),f(e.ghMissing??!1),u(null)}).catch(e=>u(e.message)).finally(()=>c(!1))},[e,m]),{groups:t,repos:p,globalSkills:r,globalModules:a,loading:s,error:l,ghMissing:d,refresh:(0,v.useCallback)(()=>h(e=>e+1),[])}}var E=`/cc`,D=`/authelia/login`;function O(e){return{"Content-Type":`application/json`,Authorization:`Bearer ${e}`}}var k=!1;function A(){k||(k=!0,window.location.href=D)}function j(e){if(e.redirected&&e.url.includes(`/authelia`))return!0;if(e.status>=502&&e.status<=504)return!1;let t=e.headers.get(`content-type`)||``;return t.includes(`application/json`)?!1:!!(e.status===401||e.status===403||e.ok&&t.includes(`text/html`))}async function M(){try{let e=await fetch(`${E}/auth-verify`,{method:`POST`,redirect:`manual`});return e.type===`opaqueredirect`?!1:e.status>=502&&e.status<=504?!0:!(e.headers.get(`content-type`)||``).includes(`text/html`)}catch{return!0}}async function N(e,t){let n=t?await fetch(e,t):await fetch(e);if(j(n))throw A(),Error(`Session expired`);return n}async function P(e){let t=await N(`${E}/auth-verify`,{method:`POST`,headers:O(e)});return t.ok?(await t.json()).valid===!0:!1}async function F(e){let t=await N(`${E}/api/sessions/list`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`Failed to list sessions: ${t.status}`);return(await t.json()).sessions??[]}async function I(e,t,n){let r=await N(`${E}/api/sessions/create`,{method:`POST`,headers:O(e),body:JSON.stringify({name:t,workingDir:n})});if(!r.ok)throw Error(`Failed to create session: ${r.status}`);return r.json()}async function L(e,t,n){let r=await N(`${E}/api/sessions/${t}/rename`,{method:`PATCH`,headers:O(e),body:JSON.stringify({name:n})});if(!r.ok)throw Error(`Failed to rename session: ${r.status}`)}async function R(e,t){let n=await N(`${E}/api/sessions/${t}`,{method:`DELETE`,headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw Error(`Failed to delete session: ${n.status}`)}async function z(e){let t=await N(`${E}/api/orchestrator/start`,{method:`POST`,headers:O(e)});if(!t.ok)throw Error(`Failed to start orchestrator: ${t.status}`);return t.json()}async function ee(e,t){let n=new FormData;n.append(`file`,t);let r=await N(`${E}/api/upload`,{method:`POST`,headers:{Authorization:`Bearer ${e}`},body:n});if(!r.ok)throw Error(`Upload failed: ${r.status}`);return(await r.json()).path}async function B(e,t,n){let r=`[Attached files: ${(await Promise.all(t.map(t=>ee(e,t)))).join(`, `)}]`;return n.trim()?`${r}\n${n}`:r}async function V(e,t){let n=await N(`${E}/api/approvals?${new URLSearchParams({path:t})}`,{headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw Error(`Failed to fetch approvals: ${n.status}`);return n.json()}async function H(e,t,n){let r=await N(`${E}/api/approvals?${new URLSearchParams({path:t})}`,{method:`DELETE`,headers:O(e),body:JSON.stringify(n)});if(!r.ok)throw Error(`Failed to remove approval: ${r.status}`)}async function te(e,t,n){let r=await N(`${E}/api/approvals?${new URLSearchParams({path:t})}`,{method:`DELETE`,headers:O(e),body:JSON.stringify({items:n})});if(!r.ok)throw Error(`Failed to bulk remove approvals: ${r.status}`)}async function ne(e,t){let n=new URLSearchParams;t&&n.set(`workingDir`,t);let r=n.toString(),i=await N(`${E}/api/sessions/archived${r?`?${r}`:``}`,{headers:{Authorization:`Bearer ${e}`}});if(!i.ok)throw Error(`Failed to list archived sessions: ${i.status}`);return(await i.json()).sessions??[]}async function re(e,t){let n=await N(`${E}/api/sessions/archived/${t}`,{headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw Error(`Failed to get archived session: ${n.status}`);return n.json()}async function ie(e,t){let n=await N(`${E}/api/sessions/archived/${t}`,{method:`DELETE`,headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw Error(`Failed to delete archived session: ${n.status}`)}async function ae(e){let t=await N(`${E}/api/settings/retention`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`Failed to get retention settings: ${t.status}`);return(await t.json()).days}async function oe(e,t){let n=await N(`${E}/api/settings/retention`,{method:`PUT`,headers:O(e),body:JSON.stringify({days:t})});if(!n.ok)throw Error(`Failed to update retention settings: ${n.status}`);return(await n.json()).days}async function se(e){let t=await N(`${E}/api/settings/repos-path`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`Failed to get repos path: ${t.status}`);return(await t.json()).path}async function ce(e,t){let n=await N(`${E}/api/settings/repos-path`,{method:`PUT`,headers:O(e),body:JSON.stringify({path:t})});if(!n.ok){let e=await n.json().catch(()=>({error:`Failed to save repos path`}));throw Error(e.error||`Failed to set repos path: ${n.status}`)}return(await n.json()).path}async function le(e){let t=await N(`${E}/api/settings/queue-messages`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`Failed to get queue messages setting: ${t.status}`);return(await t.json()).enabled}async function ue(e,t){let n=await N(`${E}/api/settings/queue-messages`,{method:`PUT`,headers:O(e),body:JSON.stringify({enabled:t})});if(!n.ok)throw Error(`Failed to update queue messages setting: ${n.status}`);return(await n.json()).enabled}async function de(e){let t=await N(`${E}/api/settings/worktree-prefix`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`Failed to get worktree prefix: ${t.status}`);return(await t.json()).prefix}async function fe(e,t){let n=await N(`${E}/api/settings/worktree-prefix`,{method:`PUT`,headers:O(e),body:JSON.stringify({prefix:t})});if(!n.ok){let e=await n.json().catch(()=>({error:`Failed to save worktree prefix`}));throw Error(e.error||`Failed to set worktree prefix: ${n.status}`)}return(await n.json()).prefix}async function pe(e){let t=await N(`${E}/api/settings/agent-name`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`Failed to get agent name: ${t.status}`);return(await t.json()).name}async function me(e,t){let n=await N(`${E}/api/settings/agent-name`,{method:`PUT`,headers:O(e),body:JSON.stringify({name:t})});if(!n.ok){let e=await n.json().catch(()=>({error:`Failed to save agent name`}));throw Error(e.error||`Failed to set agent name: ${n.status}`)}return(await n.json()).name}async function he(e,t){let n=await N(`${E}/api/browse-dirs${t?`?path=${encodeURIComponent(t)}`:``}`,{headers:{Authorization:`Bearer ${e}`}});if(!n.ok){let e=await n.json().catch(()=>({error:`Failed to browse directory`}));throw Error(e.error||`Failed to browse: ${n.status}`)}return n.json()}async function ge(e){let t=await N(`${E}/api/webhooks/config`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`Failed to get webhook config: ${t.status}`);return(await t.json()).config}async function _e(e){let t=await N(`${E}/api/webhooks/events`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`Failed to get webhook events: ${t.status}`);return(await t.json()).events??[]}function ve(){return`${location.protocol===`https:`?`wss:`:`ws:`}//${location.host}/cc/`}async function ye(e,t){let n=t?`?workingDir=${encodeURIComponent(t)}`:``,r=await fetch(`${E}/api/opencode/models${n}`,{headers:{Authorization:`Bearer ${e}`}});return r.ok?r.json():{models:[],defaults:{}}}async function be(e,t,n){let r=await N(`${E}/api/integrations/github/pr-review/health?${new URLSearchParams({repo:t,webhookUrl:n})}`,{headers:{Authorization:`Bearer ${e}`}});if(!r.ok)throw Error(`Health check failed: ${r.status}`);return r.json()}async function xe(e,t,n){let r=await N(`${E}/api/integrations/github/pr-review/setup`,{method:`POST`,headers:O(e),body:JSON.stringify({repo:t,webhookUrl:n,dryRun:!0})});if(!r.ok)throw Error(`Setup preview failed: ${r.status}`);return r.json()}async function Se(e,t,n){let r=await N(`${E}/api/integrations/github/pr-review/setup`,{method:`POST`,headers:O(e),body:JSON.stringify({repo:t,webhookUrl:n})});if(!r.ok){let e=await r.json().catch(()=>({error:`Setup failed`}));throw Error(e.error||`Setup failed: ${r.status}`)}return r.json()}async function Ce(e,t,n){let r=await N(`${E}/api/integrations/github/pr-review/test`,{method:`POST`,headers:O(e),body:JSON.stringify({repo:t,webhookUrl:n})});if(!r.ok){let e=await r.json().catch(()=>({error:`Test failed`}));throw Error(e.error||`Test failed: ${r.status}`)}return r.json()}function we(e){let[t,n]=(0,v.useState)([]),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(null),s=(0,v.useRef)(null),c=(0,v.useCallback)(async()=>{if(e)try{n(await F(e)),o(null)}catch(e){o(e instanceof Error?e.message:`Failed to load sessions`)}},[e]),l=(0,v.useCallback)(async(t,n)=>{if(!e)return null;i(!0);try{let r=await I(e,t,n);return await c(),r.sessionId}catch(e){return o(e instanceof Error?e.message:`Failed to create session`),null}finally{i(!1)}},[e,c]),u=(0,v.useCallback)(async(t,n)=>{if(e)try{await L(e,t,n),await c()}catch(e){o(e instanceof Error?e.message:`Failed to rename session`)}},[e,c]),d=(0,v.useCallback)(async t=>{if(e)try{await R(e,t),await c()}catch(e){o(e instanceof Error?e.message:`Failed to delete session`)}},[e,c]);return(0,v.useEffect)(()=>{if(e)return c(),s.current=setInterval(()=>void c(),1e4),()=>{s.current&&clearInterval(s.current)}},[e,c]),{sessions:t,loading:r,error:a,refresh:c,create:l,rename:u,remove:d}}function Te(){let[e,t]=(0,v.useState)(new Map),n=(0,v.useCallback)((e,n)=>{let r=e.requestId??crypto?.randomUUID?.()??`local-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,i={requestId:r,options:e.options,question:e.question||null,multiSelect:e.multiSelect??!1,promptType:e.promptType??null,questions:e.questions,approvePattern:e.approvePattern};t(e=>{let t=new Map(e),a=new Map(e.get(n)??new Map);return a.set(r,i),t.set(n,a),t})},[]),r=(0,v.useCallback)(e=>{t(t=>{if(e){for(let[n,r]of t)if(r.has(e)){let i=new Map(t),a=new Map(r);return a.delete(e),a.size===0?i.delete(n):i.set(n,a),i}return t}return t})},[]),i=(0,v.useCallback)(e=>{t(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},[]),a=(0,v.useCallback)(()=>{t(e=>e.size===0?e:new Map)},[]);return{getActive:(0,v.useCallback)(t=>{if(!t)return null;let n=e.get(t);return!n||n.size===0?null:n.values().next().value??null},[e]),getQueueSize:(0,v.useCallback)(t=>t?e.get(t)?.size??0:0,[e]),waitingSessions:(0,v.useMemo)(()=>{let t={};for(let[n,r]of e)r.size>0&&(t[n]=!0);return t},[e]),enqueue:n,dismiss:r,clearForSession:i,clearAll:a}}var Ee=6e4;function De({token:e,onMessageRef:t,onDisconnect:n,onHealthPong:r}){let i=(0,v.useRef)(null),[a,o]=(0,v.useState)(`disconnected`),s=(0,v.useRef)(null),c=(0,v.useRef)(null),l=(0,v.useRef)(1e3),u=(0,v.useRef)(!1),d=(0,v.useRef)(()=>{}),f=(0,v.useRef)(!1),p=(0,v.useRef)(!1),m=(0,v.useRef)(null),h=(0,v.useRef)(0),g=(0,v.useRef)(n),_=(0,v.useRef)(r);(0,v.useEffect)(()=>{g.current=n},[n]),(0,v.useEffect)(()=>{_.current=r},[r]);let y=(0,v.useCallback)(()=>{c.current&&=(clearInterval(c.current),null),s.current&&=(clearTimeout(s.current),null),m.current&&=(clearTimeout(m.current),null)},[]),b=(0,v.useCallback)(e=>{let t=i.current;t&&t.readyState===WebSocket.OPEN&&t.send(JSON.stringify(e))},[]),x=(0,v.useCallback)(()=>{if(!e)return;y(),o(`connecting`);let n=new WebSocket(ve());i.current=n,n.onopen=()=>{n.send(JSON.stringify({type:`auth`,token:e})),o(`connected`),l.current=1e3,c.current=setInterval(()=>{b({type:`ping`})},3e4)},n.onmessage=e=>{let n;try{n=JSON.parse(e.data)}catch{return}n.type===`pong`&&p.current&&(p.current=!1,m.current&&=(clearTimeout(m.current),null),_.current?.(b)),t.current?.(n)},n.onclose=e=>{if(o(`disconnected`),y(),i.current=null,g.current?.(),e.code===4001){A();return}u.current||M().then(e=>{if(!e){A();return}s.current=setTimeout(()=>{l.current=Math.min(l.current*2,3e4),d.current()},l.current)}).catch(()=>{s.current=setTimeout(d.current,l.current)})},n.onerror=()=>{}},[e,y,b,t]);(0,v.useEffect)(()=>{d.current=x},[x]);let S=(0,v.useCallback)(()=>{u.current=!0,y(),i.current?.close(),i.current=null,o(`disconnected`)},[y]),C=(0,v.useCallback)(()=>{if(f.current)return;f.current=!0,setTimeout(()=>{f.current=!1},8e3);let e=i.current;if(e&&e.readyState===WebSocket.OPEN){p.current=!0,h.current=1;let t=()=>{m.current=setTimeout(()=>{m.current=null,p.current&&(h.current<3?(h.current+=1,b({type:`ping`}),t()):(p.current=!1,l.current=1e3,e.close()))},2e3)};b({type:`ping`}),t();return}e&&e.readyState===WebSocket.CONNECTING||M().then(e=>{if(!e){A();return}l.current=1e3,s.current&&=(clearTimeout(s.current),null),x()}).catch(()=>{s.current=setTimeout(d.current,l.current)})},[b,x]);return(0,v.useEffect)(()=>(e&&(u.current=!1,x()),()=>{S()}),[e]),(0,v.useEffect)(()=>{if(!e)return;let t=setInterval(async()=>{await M()||A()},Ee);return()=>clearInterval(t)},[e]),{connState:a,send:b,disconnect:S,restoreSession:C,reconnect:x}}var Oe=500,ke=0;function Ae(){return`m${++ke}`}function je(e,t){let n=e.length>0?e[e.length-1]:void 0;switch(t.type){case`output`:return n&&n.type===`assistant`&&!n.complete?n.text+=t.data:e.push({type:`assistant`,text:t.data,complete:!1,ts:Date.now(),key:Ae()}),!0;case`result`:return n&&n.type===`assistant`&&!n.complete?(n.complete=!0,!0):!1;case`system_message`:return e.push({type:`system`,subtype:t.subtype,text:t.text,model:t.model,key:Ae()}),!0;case`user_echo`:return e.push({type:`user`,text:t.text,ts:Date.now(),key:Ae()}),!0;case`claude_started`:return!1;case`tool_active`:return n&&n.type===`tool_group`?n.tools.push({name:t.toolName,active:!0}):e.push({type:`tool_group`,tools:[{name:t.toolName,active:!0}],key:Ae()}),!0;case`tool_done`:if(n&&n.type===`tool_group`){for(let e=n.tools.length-1;e>=0;e--)if(n.tools[e].name===t.toolName&&n.tools[e].active){n.tools[e]={name:t.toolName,summary:t.summary,active:!1};break}return!0}return!1;case`tool_output`:return e.push({type:`tool_output`,content:t.content,isError:t.isError,key:Ae()}),!0;case`image`:return e.push({type:`image`,base64:t.base64,mediaType:t.mediaType,key:Ae()}),!0;case`planning_mode`:return e.push({type:`planning_mode`,active:t.active,key:Ae()}),!0;default:return!1}}function Me(e,t){let n=[...e],r=n.length-1;if(r>=0){let e=n[r];e.type===`assistant`&&!e.complete?n[r]={...e}:e.type===`tool_group`&&(n[r]={...e,tools:[...e.tools]})}return je(n,t)?n:e}function U(e){return e.length<=Oe?e:[{type:`system`,subtype:`trim`,text:`Older messages trimmed`,key:Ae()},...e.slice(-Oe+1)]}function Ne(e){let t=[];for(let n of e)je(t,n);return t}function Pe({token:e,onSessionCreated:t,onSessionJoined:n,onSessionRenamed:r,onSessionsUpdated:i,onError:a,onRawMessage:o}){let s=(0,v.useRef)({onSessionCreated:t,onSessionJoined:n,onSessionRenamed:r,onSessionsUpdated:i,onError:a,onRawMessage:o});(0,v.useEffect)(()=>{s.current={onSessionCreated:t,onSessionJoined:n,onSessionRenamed:r,onSessionsUpdated:i,onError:a,onRawMessage:o}});let[c,l]=(0,v.useState)([]),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(!1),[m,h]=(0,v.useState)([]),[g,_]=(0,v.useState)(()=>localStorage.getItem(`claude-model`)??null),[y,b]=(0,v.useState)(()=>localStorage.getItem(`claude-permission-mode`)||`acceptEdits`),[x,S]=(0,v.useState)(null),C=Te(),w=(0,v.useRef)(null),[T,E]=(0,v.useState)(null),D=C.getActive(T),O=C.getQueueSize(T),k=(0,v.useRef)(``),A=(0,v.useRef)(null),j=(0,v.useCallback)(()=>{A.current=null;let e=k.current;e&&(k.current=``,l(t=>{let n=t[t.length-1];if(n&&n.type===`assistant`&&!n.complete){let r=[...t];return r[r.length-1]={...n,text:n.text+e},U(r)}return U([...t,{type:`assistant`,text:e,complete:!1,ts:Date.now(),key:Ae()}])}))},[]),M=(0,v.useCallback)(()=>{k.current&&(A.current&&=(cancelAnimationFrame(A.current),null),j())},[j]),N=(0,v.useCallback)(e=>{switch(s.current.onRawMessage?.(e),e.type){case`thinking`:S(e.summary),p(!0);break;case`output`:S(null),p(!0),k.current+=e.data,A.current||=requestAnimationFrame(j);break;case`result`:p(!1),S(null),M(),l(t=>U(Me(t,e)));break;case`system_message`:e.subtype===`init`&&e.model&&(_(e.model),localStorage.setItem(`claude-model`,e.model)),M(),l(t=>U(Me(t,e)));break;case`user_echo`:M(),l(t=>U(Me(t,e)));break;case`tool_active`:S(null),p(!0),M(),l(t=>U(Me(t,e)));break;case`tool_done`:M(),l(t=>U(Me(t,e)));break;case`tool_output`:M(),l(t=>U(Me(t,e)));break;case`image`:M(),l(t=>U(Me(t,e)));break;case`planning_mode`:d(e.active),l(t=>U(Me(t,e)));break;case`todo_update`:h(e.tasks);break;case`prompt`:{let t=e.sessionId??w.current;if(!t)break;C.enqueue(e,t),t===w.current&&(p(!1),S(null));break}case`prompt_dismiss`:C.dismiss(e.requestId);break;case`session_created`:w.current=e.sessionId,E(e.sessionId),l([]),h([]),p(!1),S(null),s.current.onSessionCreated?.(e.sessionId);break;case`session_joined`:{w.current=e.sessionId,E(e.sessionId),p(!1),S(null),e.model&&(_(e.model),localStorage.setItem(`claude-model`,e.model)),e.permissionMode&&(b(e.permissionMode),localStorage.setItem(`claude-permission-mode`,e.permissionMode));let t=[],n=!1,r=[];if(e.outputBuffer?.length){t=Ne(e.outputBuffer);for(let t of e.outputBuffer)t.type===`planning_mode`&&(n=t.active),t.type===`todo_update`&&(r=t.tasks)}d(n),h(r),l(U(t)),s.current.onSessionJoined?.(e.sessionId);break}case`claude_started`:l(t=>U(Me(t,e)));break;case`claude_stopped`:case`exit`:{p(!1),S(null);let e=w.current;e&&C.clearForSession(e);break}case`error`:s.current.onError?.(e.message);break;case`session_deleted`:l(e=>U([...e,{type:`system`,subtype:`error`,text:`Session was deleted`,key:Ae()}]));break;case`connected`:case`pong`:break;case`session_name_update`:s.current.onSessionRenamed?.(e.sessionId,e.name);break;case`sessions_updated`:s.current.onSessionsUpdated?.();break;case`worktree_created`:s.current.onSessionsUpdated?.();break;case`info`:break}},[j,M,C]),P=(0,v.useRef)(N);(0,v.useEffect)(()=>{P.current=N},[N]);let{connState:F,send:I,disconnect:L,restoreSession:R,reconnect:z}=De({token:e,onMessageRef:P,onDisconnect:(0,v.useCallback)(()=>{p(!1),S(null),A.current&&=(cancelAnimationFrame(A.current),null)},[]),onHealthPong:(0,v.useCallback)(e=>{let t=w.current;t&&e({type:`join_session`,sessionId:t})},[])}),ee=(0,v.useCallback)(e=>{I({type:`join_session`,sessionId:e})},[I]),B=(0,v.useCallback)((e,t,n,r,i)=>{I({type:`create_session`,name:e,workingDir:t,useWorktree:n,permissionMode:r,provider:i})},[I]),V=(0,v.useCallback)((e,t)=>{I({type:`input`,data:e,...t?{displayText:t}:{}}),p(!0);let n=w.current;n&&C.clearForSession(n)},[I,C]),H=(0,v.useCallback)(e=>{let t=D?.requestId;I({type:`prompt_response`,value:e,requestId:t}),t&&C.dismiss(t),p(!0)},[I,D?.requestId,C]),te=(0,v.useCallback)(()=>{I({type:`leave_session`}),w.current=null,E(null),p(!1),S(null)},[I]),ne=(0,v.useCallback)(()=>{l([])},[]),re=(0,v.useCallback)((e,t=`notification`)=>{l(n=>U([...n,{type:`system`,subtype:t,text:e,key:Ae()}]))},[]),ie=(0,v.useCallback)(e=>{I({type:`set_model`,model:e}),_(e),localStorage.setItem(`claude-model`,e)},[I]),ae=(0,v.useCallback)(()=>{I({type:`move_to_worktree`})},[I]),oe=(0,v.useCallback)(e=>{I({type:`set_permission_mode`,permissionMode:e}),b(e),localStorage.setItem(`claude-permission-mode`,e)},[I]);return{connState:F,messages:c,tasks:m,planningMode:u,isProcessing:f,thinkingSummary:x,waitingSessions:C.waitingSessions,activePrompt:D,promptQueueSize:O,currentModel:g,send:I,joinSession:ee,createSession:B,sendInput:V,sendPromptResponse:H,leaveSession:te,clearMessages:ne,addSystemMessage:re,disconnect:L,reconnect:z,restoreSession:R,setModel:ie,currentPermissionMode:y,setPermissionMode:oe,moveToWorktree:ae}}function Fe(e){let t=(0,v.useRef)(e);(0,v.useEffect)(()=>{t.current=e}),(0,v.useEffect)(()=>{function e(){document.visibilityState===`visible`&&t.current()}return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[])}function W(e){if(e===`/joe`||e===`/joe/`||e===`/orchestrator`||e===`/orchestrator/`)return{path:e,sessionId:null,view:`orchestrator`};if(e===`/workflows`||e===`/workflows/`)return{path:e,sessionId:null,view:`workflows`};let t=e.match(/^\/s\/([a-f0-9-]+)\/?$/);return{path:e,sessionId:t?t[1]:null,view:`chat`}}function Ie(){let[e,t]=(0,v.useState)(()=>W(window.location.pathname));(0,v.useEffect)(()=>{function e(){t(W(window.location.pathname))}return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]);let n=(0,v.useCallback)((e,n=!1)=>{e!==window.location.pathname&&(n?history.replaceState(null,``,e):history.pushState(null,``,e),t(W(e)))},[]);return{...e,navigate:n}}var Le=`codekin-tentative-`;function Re(e,t){let n=`${Le}${e}`;t.length===0?localStorage.removeItem(n):localStorage.setItem(n,JSON.stringify(t.map(e=>e.text)))}function ze(e){try{let t=localStorage.getItem(`${Le}${e}`);if(t)return JSON.parse(t).map(e=>({text:e,files:[]}))}catch{}return[]}function Be(){let e={};try{for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(n?.startsWith(Le)){let t=n.slice(18),r=ze(t);r.length>0&&(e[t]=r)}}}catch{}return e}function Ve(){let[e,t]=(0,v.useState)(Be);return{queues:e,addToQueue:(0,v.useCallback)((e,n,r=[])=>{t(t=>{let i={...t,[e]:[...t[e]??[],{text:n,files:r}]};return Re(e,i[e]),i})},[]),clearQueue:(0,v.useCallback)(e=>{t(t=>{if(!t[e])return t;let n=Object.fromEntries(Object.entries(t).filter(([t])=>t!==e));return Re(e,[]),n})},[])}}function He(e){return e.groupDir??e.workingDir}function Ue({sessions:e,repos:t,activeSessionId:n,setActiveSessionId:r,joinSession:i,leaveSession:a,clearMessages:o,wsCreateSession:s,removeSession:c,pendingContextRef:l,useWorktreeRef:u,permissionModeRef:d,providerRef:f}){let p=n?e.find(e=>e.id===n)??null:null,m=p?He(p):null;return{activeSession:p,activeWorkingDir:m,handleOpenSession:(0,v.useCallback)(t=>{let n=e.filter(e=>He(e)===t.workingDir);if(n.length>0){let e=n[n.length-1];o(),a(),i(e.id);return}o(),a(),s(`hub:${t.id}`,t.workingDir,u.current,d.current,f?.current)},[e,i,s,a,o,u,d,f]),handleSelectSession:(0,v.useCallback)(e=>{e!==n&&(o(),a(),i(e))},[n,a,i,o]),handleDeleteSession:(0,v.useCallback)(async t=>{if(t===n){o(),a();let n=e.find(e=>e.id===t),s=e.filter(e=>e.id!==t);if(s.length>0){let e=n?s.filter(e=>He(e)===He(n)):[];i((e.length>0?e[0]:s[0]).id)}else r(null)}await c(t)},[n,e,o,a,i,r,c]),handleSelectRepo:(0,v.useCallback)(t=>{if(t===m)return;let n=e.filter(e=>He(e)===t);if(n.length>0){let e=n[n.length-1];o(),a(),i(e.id)}},[m,e,o,a,i]),handleDeleteRepo:(0,v.useCallback)(async t=>{let s=e.filter(e=>He(e)===t);if(s.some(e=>e.id===n)){o(),a();let n=e.filter(e=>He(e)!==t);n.length>0?i(n[0].id):r(null)}for(let e of s)await c(e.id)},[e,n,o,a,i,r,c]),handleNewSessionForRepo:(0,v.useCallback)(e=>{if(!m)return;let n=t.find(e=>e.workingDir===m),r=n?.workingDir??m,i=n?.id??r.split(`/`).pop()??`session`;o(),a(),s(`hub:${i}`,r,u.current,d.current,e??f?.current)},[m,t,o,a,s,d,u,f]),handleNewSessionFromArchive:(0,v.useCallback)((e,n)=>{let r=t.find(t=>t.workingDir===e);r&&(l.current=n,o(),a(),s(`hub:${r.id}`,r.workingDir,u.current,d.current,f?.current))},[t,o,a,s,l,d,u,f])}}var We=`/cc`,Ge=`codekin-starred-docs`;function Ke(){try{return JSON.parse(localStorage.getItem(Ge)||`{}`)}catch{return{}}}function qe(e){localStorage.setItem(Ge,JSON.stringify(e))}function Je(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(!1),[m,h]=(0,v.useState)([]),[g,_]=(0,v.useState)(!1),[y,b]=(0,v.useState)(null),[x,S]=(0,v.useState)(Ke),C=(0,v.useCallback)(async(e,t)=>{b(e),p(!0),_(!0),h([]);try{let n=new URLSearchParams({repo:e}),r=await fetch(`${We}/api/docs?${n}`,{headers:{Authorization:`Bearer ${t}`}});if(!r.ok)throw Error(`Failed to list docs: ${r.status}`);h((await r.json()).files??[])}catch{h([])}finally{_(!1)}},[]),w=(0,v.useCallback)(()=>{p(!1)},[]),T=(0,v.useCallback)(async(e,n,i)=>{d(e),t(n),r(null),s(null),a(!0),l(!1),p(!1);try{let t=new URLSearchParams({repo:e,file:n}),a=await fetch(`${We}/api/docs/file?${t}`,{headers:{Authorization:`Bearer ${i}`}});if(!a.ok)throw Error(`Failed to load file: ${a.status}`);r((await a.json()).content)}catch(e){s(e instanceof Error?e.message:`Failed to load file`)}finally{a(!1)}},[]),E=(0,v.useCallback)(()=>{t(null),r(null),s(null),a(!1),l(!1),d(null)},[]),D=(0,v.useCallback)(()=>{l(e=>!e)},[]),O=u?x[u]??[]:[],k=e!==null&&O.includes(e),A=(0,v.useCallback)(()=>{!u||!e||S(t=>{let n=t[u]??[],r=n.includes(e)?n.filter(t=>t!==e):[...n,e],i={...t,[u]:r};return qe(i),i})},[u,e]),j=y?x[y]??[]:[];return{isOpen:e!==null,selectedFile:e,content:n,loading:i,error:o,rawMode:c,toggleRawMode:D,openFile:T,close:E,repoWorkingDir:u,pickerOpen:f,pickerFiles:m,pickerLoading:g,openPicker:C,closePicker:w,pickerRepoDir:y,starredDocs:j,isCurrentFileStarred:k,toggleStarCurrentFile:A}}var Ye=1024;function Xe(e=Ye){let[t,n]=(0,v.useState)(()=>typeof window<`u`?window.innerWidth<e:!1);return(0,v.useEffect)(()=>{let t=window.matchMedia(`(max-width: ${e-1}px)`),r=e=>n(e.matches);return t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e]),t}var Ze=[{command:`/clear`,name:`Clear session`,description:`Clear conversation and start fresh`,category:`builtin`,aliases:[`/reset`,`/new`]},{command:`/compact`,name:`Compact`,description:`Compact conversation to save context`,category:`builtin`},{command:`/model`,name:`Model`,description:`Change the active model`,category:`builtin`},{command:`/help`,name:`Help`,description:`Show available commands`,category:`builtin`},{command:`/cost`,name:`Cost`,description:`Show session cost info`,category:`builtin`},{command:`/status`,name:`Status`,description:`Show session status`,category:`builtin`}],Qe=new Map;for(let e of Ze){Qe.set(e.command,e.command);for(let t of e.aliases??[])Qe.set(t,e.command)}function $e(e){return Qe.get(e)}var et=[{command:`/commit`,name:`Commit`,description:`Create a git commit`,category:`bundled`},{command:`/simplify`,name:`Simplify`,description:`Review and simplify changed code`,category:`bundled`},{command:`/loop`,name:`Loop`,description:`Run a command on a recurring interval`,category:`bundled`},{command:`/debug`,name:`Debug`,description:`Debug an issue step by step`,category:`bundled`},{command:`/claude-api`,name:`Claude API`,description:`Help with Anthropic SDK usage`,category:`bundled`}];function tt(e){let t=new Set,n=[];for(let r of e)t.has(r.command)||(t.add(r.command),n.push({command:r.command,name:r.name,description:r.description,category:`skill`,content:r.content}));for(let e of et)t.has(e.command)||(t.add(e.command),n.push(e));for(let e of Ze)if(!t.has(e.command)){t.add(e.command);for(let n of e.aliases??[])t.add(n);n.push(e)}return n}var nt=new Set(et.map(e=>e.command));function rt({token:e,activeSessionId:t,activeWorkingDir:n,sessions:r,allSkills:i,sendInput:a,onBuiltinCommand:o,tentativeQueues:s,addToQueue:c,clearQueue:l,docsContext:u,queueEnabled:d}){let[f,p]=(0,v.useState)(null),[m,h]=(0,v.useState)({}),g=(0,v.useMemo)(()=>t?m[t]??[]:[],[t,m]),_=(0,v.useCallback)(e=>{t&&h(n=>({...n,[t]:[...n[t]??[],...e]}))},[t]),y=(0,v.useCallback)(e=>{t&&h(n=>({...n,[t]:(n[t]??[]).filter((t,n)=>n!==e)}))},[t]),b=(0,v.useCallback)(e=>{let t=e.trim();if(!t.startsWith(`/`))return{expanded:e,handled:!1};let n=t.indexOf(` `),r=n===-1?t:t.slice(0,n),a=n===-1?``:t.slice(n+1).trim(),s=$e(r);if(s)return o(s,a),{expanded:e,handled:!0};let c=i.find(e=>e.command===r);if(c?.content){let t=c.content.replace(/\$ARGUMENTS/g,a||`(no arguments provided)`),n=[`[Skill: ${c.name}]`,``,t];return a&&n.push(``,`User instructions: ${a}`),{expanded:n.join(`
|
|
9
|
+
`).replace(Ad,``)}function Md(e,t){return t=jd(t),jd(e)===t}function Nd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Rt(e,``+r);break;case`className`:St(e,`class`,r);break;case`tabIndex`:St(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:St(e,n,r);break;case`style`:Vt(e,r,o);break;case`data`:if(t!==`object`){St(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Nd(e,t,`name`,a.name,a,null),Nd(e,t,`formEncType`,a.formEncType,a,null),Nd(e,t,`formMethod`,a.formMethod,a,null),Nd(e,t,`formTarget`,a.formTarget,a,null)):(Nd(e,t,`encType`,a.encType,a,null),Nd(e,t,`method`,a.method,a,null),Nd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Gt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`onScroll`:r!=null&&yd(`scroll`,e);break;case`onScrollEnd`:r!=null&&yd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Gt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:yd(`beforetoggle`,e),yd(`toggle`,e),xt(e,`popover`,r);break;case`xlinkActuate`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ct(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ct(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:xt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=Ut.get(n)||n,xt(e,n,r))}}function Pd(e,t,n,r,a,o){switch(n){case`style`:Vt(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?Rt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Rt(e,``+r);break;case`onScroll`:r!=null&&yd(`scroll`,e);break;case`onScrollEnd`:r!=null&&yd(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=Kt);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!mt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[tt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):xt(e,n,r)}}}function Fd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:yd(`error`,e),yd(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Nd(e,t,o,s,n,null)}}a&&Nd(e,t,`srcSet`,n.srcSet,n,null),r&&Nd(e,t,`src`,n.src,n,null);return;case`input`:yd(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Nd(e,t,r,d,n,null)}}Nt(e,o,c,l,u,s,a,!1);return;case`select`:for(a in yd(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Nd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&Ft(e,!!r,n,!0):Ft(e,!!r,t,!1);return;case`textarea`:for(s in yd(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Nd(e,t,s,c,n,null)}Lt(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Nd(e,t,l,r,n,null)}return;case`dialog`:yd(`beforetoggle`,e),yd(`toggle`,e),yd(`cancel`,e),yd(`close`,e);break;case`iframe`:case`object`:yd(`load`,e);break;case`video`:case`audio`:for(r=0;r<gd.length;r++)yd(gd[r],e);break;case`image`:yd(`error`,e),yd(`load`,e);break;case`details`:yd(`toggle`,e);break;case`embed`:case`source`:case`link`:yd(`error`,e),yd(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Nd(e,t,u,r,n,null)}return;default:if(Ht(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&Pd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Nd(e,t,c,r,n,null))}function Id(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Nd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Nd(e,t,p,m,r,f)}}Mt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Nd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Nd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?Ft(e,!!n,n?[]:``,!1):Ft(e,!!n,t,!0)):Ft(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Nd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Nd(e,t,s,a,r,o)}It(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Nd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Nd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Nd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Nd(e,t,u,p,r,m)}return;default:if(Ht(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&Pd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||Pd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Nd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Nd(e,t,f,p,r,m)}function Ld(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Rd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Ld(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Ld(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var zd=null,Bd=null;function Vd(e){return e.nodeType===9?e:e.ownerDocument}function Hd(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function Ud(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Wd(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Gd=null;function Kd(){var e=window.event;return e&&e.type===`popstate`?e===Gd?!1:(Gd=e,!0):(Gd=null,!1)}var qd=typeof setTimeout==`function`?setTimeout:void 0,Jd=typeof clearTimeout==`function`?clearTimeout:void 0,Yd=typeof Promise==`function`?Promise:void 0,Xd=typeof queueMicrotask==`function`?queueMicrotask:Yd===void 0?qd:function(e){return Yd.resolve(null).then(e).catch(Zd)};function Zd(e){setTimeout(function(){throw e})}function Qd(e){return e===`head`}function $d(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Np(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)mf(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,mf(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[ot]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&mf(e.ownerDocument.body);n=i}while(n);Np(t)}function ef(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function tf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:tf(n),st(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function nf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[ot])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=lf(e.nextSibling),e===null)break}return null}function rf(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=lf(e.nextSibling),e===null))return null;return e}function af(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=lf(e.nextSibling),e===null))return null;return e}function of(e){return e.data===`$?`||e.data===`$~`}function sf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function cf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function lf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var uf=null;function df(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return lf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function ff(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function pf(e,t,n){switch(t=Vd(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function mf(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);st(e)}var hf=new Map,gf=new Set;function _f(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var vf=L.d;L.d={f:yf,r:bf,D:Cf,C:wf,L:Tf,m:Ef,X:Of,S:Df,M:kf};function yf(){var e=vf.f(),t=vu();return e||t}function bf(e){var t=lt(e);t!==null&&t.tag===5&&t.type===`form`?_s(t):vf.r(e)}var xf=typeof document>`u`?null:document;function Sf(e,t,n){var r=xf;if(r&&typeof t==`string`&&t){var i=jt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),gf.has(i)||(gf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Fd(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Cf(e){vf.D(e),Sf(`dns-prefetch`,e,null)}function wf(e,t){vf.C(e,t),Sf(`preconnect`,e,t)}function Tf(e,t,n){vf.L(e,t,n);var r=xf;if(r&&e&&t){var i=`link[rel="preload"][as="`+jt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+jt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+jt(n.imageSizes)+`"]`)):i+=`[href="`+jt(e)+`"]`;var a=i;switch(t){case`style`:a=jf(e);break;case`script`:a=Ff(e)}hf.has(a)||(e=m({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),hf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Mf(a))||t===`script`&&r.querySelector(If(a))||(t=r.createElement(`link`),Fd(t,`link`,e),ft(t),r.head.appendChild(t)))}}function Ef(e,t){vf.m(e,t);var n=xf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+jt(r)+`"][href="`+jt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Ff(e)}if(!hf.has(a)&&(e=m({rel:`modulepreload`,href:e},t),hf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(If(a)))return}r=n.createElement(`link`),Fd(r,`link`,e),ft(r),n.head.appendChild(r)}}}function Df(e,t,n){vf.S(e,t,n);var r=xf;if(r&&e){var i=dt(r).hoistableStyles,a=jf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Mf(a)))s.loading=5;else{e=m({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=hf.get(a))&&zf(e,n);var c=o=r.createElement(`link`);ft(c),Fd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Rf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Of(e,t){vf.X(e,t);var n=xf;if(n&&e){var r=dt(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=m({src:e,async:!0},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),ft(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function kf(e,t){vf.M(e,t);var n=xf;if(n&&e){var r=dt(n).hoistableScripts,i=Ff(e),a=r.get(i);a||(a=n.querySelector(If(i)),a||(e=m({src:e,async:!0,type:`module`},t),(t=hf.get(i))&&Bf(e,t),a=n.createElement(`script`),ft(a),Fd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Af(e,t,n,r){var a=(a=re.current)?_f(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=jf(n.href),n=dt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=jf(n.href);var o=dt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Mf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),hf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},hf.set(e,n),o||Pf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Ff(n),n=dt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function jf(e){return`href="`+jt(e)+`"`}function Mf(e){return`link[rel="stylesheet"][`+e+`]`}function Nf(e){return m({},e,{"data-precedence":e.precedence,precedence:null})}function Pf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Fd(t,`link`,n),ft(t),e.head.appendChild(t))}function Ff(e){return`[src="`+jt(e)+`"]`}function If(e){return`script[async]`+e}function Lf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+jt(n.href)+`"]`);if(r)return t.instance=r,ft(r),r;var a=m({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),ft(r),Fd(r,`style`,a),Rf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=jf(n.href);var o=e.querySelector(Mf(a));if(o)return t.state.loading|=4,t.instance=o,ft(o),o;r=Nf(n),(a=hf.get(a))&&zf(r,a),o=(e.ownerDocument||e).createElement(`link`),ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Fd(o,`link`,r),t.state.loading|=4,Rf(o,n.precedence,e),t.instance=o;case`script`:return o=Ff(n.src),(a=e.querySelector(If(o)))?(t.instance=a,ft(a),a):(r=n,(a=hf.get(o))&&(r=m({},n),Bf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),ft(a),Fd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Rf(r,n.precedence,e));return t.instance}function Rf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function zf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Bf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Vf=null;function Hf(e,t,n){if(Vf===null){var r=new Map,i=Vf=new Map;i.set(n,r)}else i=Vf,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[ot]||a[et]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Uf(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Wf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Gf(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Kf(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=jf(r.href),a=t.querySelector(Mf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Jf.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,ft(a);return}a=t.ownerDocument||t,r=Nf(r),(i=hf.get(i))&&zf(r,i),a=a.createElement(`link`),ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Fd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=Jf.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var qf=0;function $(e,t){return e.stylesheets&&e.count===0&&Xf(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&qf===0&&(qf=62500*Rd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Xf(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>qf?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Jf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Xf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Yf=null;function Xf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Yf=new Map,t.forEach(Zf,e),Yf=null,Jf.call(e))}function Zf(e,t){if(!(t.state.loading&4)){var n=Yf.get(e);if(n)var r=n.get(null);else{n=new Map,Yf.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=Jf.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Qf={$$typeof:C,Provider:null,Consumer:null,_currentValue:R,_currentValue2:R,_threadCount:0};function $f(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Ue(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ue(0),this.hiddenUpdates=Ue(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function ep(e,t,n,r,i,a,o,s,c,l,u,d){return e=new $f(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Qr(3,null,null,t),e.current=a,a.stateNode=e,t=Xi(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},ka(a),e}function tp(e){return e?(e=Xr,e):Xr}function np(e,t,n,r,i,a){i=tp(i),r.context===null?r.context=i:r.pendingContext=i,r=ja(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=Ma(e,r,t),n!==null&&(pu(n,e,t),Na(n,e,t))}function rp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ip(e,t){rp(e,t),(e=e.alternate)&&rp(e,t)}function ap(e){if(e.tag===13||e.tag===31){var t=qr(e,67108864);t!==null&&pu(t,e,67108864),ip(e,67108864)}}function op(e){if(e.tag===13||e.tag===31){var t=du();t=Ye(t);var n=qr(e,t);n!==null&&pu(n,e,t),ip(e,t)}}var sp=!0;function cp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,up(e,t,n,r)}finally{L.p=a,I.T=i}}function lp(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,up(e,t,n,r)}finally{L.p=a,I.T=i}}function up(e,t,n,r){if(sp){var i=dp(r);if(i===null)wd(e,t,r,fp,n),Cp(e,r);else if(Tp(i,e,t,n,r))r.stopPropagation();else if(Cp(e,r),t&4&&-1<Sp.indexOf(e)){for(;i!==null;){var a=lt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Re(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-U(o);s.entanglements[1]|=c,o&=~c}nd(a),!(Ml&6)&&($l=xe()+500,rd(0,!1))}}break;case 31:case 13:s=qr(a,2),s!==null&&pu(s,a,2),vu(),ip(a,2)}if(a=dp(r),a===null&&wd(e,t,r,fp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else wd(e,t,r,null,n)}}function dp(e){return e=Jt(e),pp(e)}var fp=null;function pp(e){if(fp=null,e=ct(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return fp=e,null}function mp(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Se()){case Ce:return 2;case we:return 8;case Te:case Ee:return 32;case De:return 268435456;default:return 32}default:return 32}}var hp=!1,gp=null,_p=null,vp=null,yp=new Map,bp=new Map,xp=[],Sp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Cp(e,t){switch(e){case`focusin`:case`focusout`:gp=null;break;case`dragenter`:case`dragleave`:_p=null;break;case`mouseover`:case`mouseout`:vp=null;break;case`pointerover`:case`pointerout`:yp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:bp.delete(t.pointerId)}}function wp(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=lt(t),t!==null&&ap(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Tp(e,t,n,r,i){switch(t){case`focusin`:return gp=wp(gp,e,t,n,r,i),!0;case`dragenter`:return _p=wp(_p,e,t,n,r,i),!0;case`mouseover`:return vp=wp(vp,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return yp.set(a,wp(yp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,bp.set(a,wp(bp.get(a)||null,e,t,n,r,i)),!0}return!1}function Ep(e){var t=ct(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,Qe(e.priority,function(){op(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,Qe(e.priority,function(){op(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=dp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);qt=r,n.target.dispatchEvent(r),qt=null}else return t=lt(n),t!==null&&ap(t),e.blockedOn=n,!1;t.shift()}return!0}function Op(e,t,n){Dp(e)&&n.delete(t)}function kp(){hp=!1,gp!==null&&Dp(gp)&&(gp=null),_p!==null&&Dp(_p)&&(_p=null),vp!==null&&Dp(vp)&&(vp=null),yp.forEach(Op),bp.forEach(Op)}function Ap(e,n){e.blockedOn===n&&(e.blockedOn=null,hp||(hp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,kp)))}var jp=null;function Mp(e){jp!==e&&(jp=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){jp===e&&(jp=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(pp(r||n)===null)continue;break}var a=lt(n);a!==null&&(e.splice(t,3),t-=3,hs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Np(e){function t(t){return Ap(t,e)}gp!==null&&Ap(gp,e),_p!==null&&Ap(_p,e),vp!==null&&Ap(vp,e),yp.forEach(t),bp.forEach(t);for(var n=0;n<xp.length;n++){var r=xp[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<xp.length&&(n=xp[0],n.blockedOn===null);)Ep(n),n.blockedOn===null&&xp.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[tt]||null;if(typeof a==`function`)o||Mp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[tt]||null)s=o.formAction;else if(pp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Mp(n)}}}function Pp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Fp(e){this._internalRoot=e}Ip.prototype.render=Fp.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;np(n,du(),e,t,null,null)},Ip.prototype.unmount=Fp.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;np(e.current,2,null,e,null,null),vu(),t[nt]=null}};function Ip(e){this._internalRoot=e}Ip.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ze();e={blockedOn:null,target:e,priority:t};for(var n=0;n<xp.length&&t!==0&&t<xp[n].priority;n++);xp.splice(n,0,e),n===0&&Ep(e)}};var Lp=n.version;if(Lp!==`19.2.4`)throw Error(i(527,Lp,`19.2.4`));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Rp={bundleType:0,version:`19.2.4`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.2.4`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var zp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zp.isDisabled&&zp.supportsFiber)try{Ae=zp.inject(Rp),je=zp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=Rs,s=zs,c=Bs;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=ep(e,1,!1,null,null,n,r,null,o,s,c,Pp),e[nt]=t.current,Sd(e),new Fp(t)}})),_=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=g()})),v=l(d(),1),y=_(),b=`codekin-settings`,x={token:``,fontSize:16,theme:`dark`};function S(){try{let e=localStorage.getItem(b),t=e?JSON.parse(e):null,n={...x,token:t?.token??x.token,theme:t?.theme===`light`?`light`:`dark`},r=new URL(window.location.href),i=r.searchParams.get(`token`);return i&&(n.token=i,localStorage.setItem(b,JSON.stringify(n)),r.searchParams.delete(`token`),window.history.replaceState({},``,r.pathname+r.search+r.hash)),n}catch{return x}}function C(e){localStorage.setItem(b,JSON.stringify(e))}function w(){let[e,t]=(0,v.useState)(S);return{settings:e,updateSettings:(0,v.useCallback)(e=>{t(t=>{let n={...t,...e};return C(n),n})},[])}}function T(e){let[t,n]=(0,v.useState)([]),[r,i]=(0,v.useState)([]),[a,o]=(0,v.useState)([]),[s,c]=(0,v.useState)(!0),[l,u]=(0,v.useState)(null),[d,f]=(0,v.useState)(!1),p=t.flatMap(e=>e.repos),[m,h]=(0,v.useState)(0);return(0,v.useEffect)(()=>{let t={};e&&(t.Authorization=`Bearer ${e}`),fetch(`/cc/api/repos`,{headers:t}).then(e=>{if(!e.ok)throw Error(`Failed to load repos: ${e.status}`);return e.json()}).then(e=>{n(e.groups),i(e.globalSkills??[]),o(e.globalModules??[]),f(e.ghMissing??!1),u(null)}).catch(e=>u(e.message)).finally(()=>c(!1))},[e,m]),{groups:t,repos:p,globalSkills:r,globalModules:a,loading:s,error:l,ghMissing:d,refresh:(0,v.useCallback)(()=>h(e=>e+1),[])}}var E=`/cc`,D=`/authelia/login`;function O(e){return{"Content-Type":`application/json`,Authorization:`Bearer ${e}`}}var k=!1;function A(){k||(k=!0,window.location.href=D)}function j(e){if(e.redirected&&e.url.includes(`/authelia`))return!0;if(e.status>=502&&e.status<=504)return!1;let t=e.headers.get(`content-type`)||``;return t.includes(`application/json`)?!1:!!(e.status===401||e.status===403||e.ok&&t.includes(`text/html`))}async function M(){try{let e=await fetch(`${E}/auth-verify`,{method:`POST`,redirect:`manual`});return e.type===`opaqueredirect`?!1:e.status>=502&&e.status<=504?!0:!(e.headers.get(`content-type`)||``).includes(`text/html`)}catch{return!0}}async function N(e,t){let n=t?await fetch(e,t):await fetch(e);if(j(n))throw A(),Error(`Session expired`);return n}async function P(e){let t=await N(`${E}/auth-verify`,{method:`POST`,headers:O(e)});return t.ok?(await t.json()).valid===!0:!1}async function F(e){let t=await N(`${E}/api/sessions/list`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`Failed to list sessions: ${t.status}`);return(await t.json()).sessions??[]}async function I(e,t,n){let r=await N(`${E}/api/sessions/create`,{method:`POST`,headers:O(e),body:JSON.stringify({name:t,workingDir:n})});if(!r.ok)throw Error(`Failed to create session: ${r.status}`);return r.json()}async function L(e,t,n){let r=await N(`${E}/api/sessions/${t}/rename`,{method:`PATCH`,headers:O(e),body:JSON.stringify({name:n})});if(!r.ok)throw Error(`Failed to rename session: ${r.status}`)}async function R(e,t){let n=await N(`${E}/api/sessions/${t}`,{method:`DELETE`,headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw Error(`Failed to delete session: ${n.status}`)}async function z(e){let t=await N(`${E}/api/orchestrator/start`,{method:`POST`,headers:O(e)});if(!t.ok)throw Error(`Failed to start orchestrator: ${t.status}`);return t.json()}async function ee(e,t){let n=new FormData;n.append(`file`,t);let r=await N(`${E}/api/upload`,{method:`POST`,headers:{Authorization:`Bearer ${e}`},body:n});if(!r.ok)throw Error(`Upload failed: ${r.status}`);return(await r.json()).path}async function B(e,t,n){let r=`[Attached files: ${(await Promise.all(t.map(t=>ee(e,t)))).join(`, `)}]`;return n.trim()?`${r}\n${n}`:r}async function V(e,t){let n=await N(`${E}/api/approvals?${new URLSearchParams({path:t})}`,{headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw Error(`Failed to fetch approvals: ${n.status}`);return n.json()}async function H(e,t,n){let r=await N(`${E}/api/approvals?${new URLSearchParams({path:t})}`,{method:`DELETE`,headers:O(e),body:JSON.stringify(n)});if(!r.ok)throw Error(`Failed to remove approval: ${r.status}`)}async function te(e,t,n){let r=await N(`${E}/api/approvals?${new URLSearchParams({path:t})}`,{method:`DELETE`,headers:O(e),body:JSON.stringify({items:n})});if(!r.ok)throw Error(`Failed to bulk remove approvals: ${r.status}`)}async function ne(e,t){let n=new URLSearchParams;t&&n.set(`workingDir`,t);let r=n.toString(),i=await N(`${E}/api/sessions/archived${r?`?${r}`:``}`,{headers:{Authorization:`Bearer ${e}`}});if(!i.ok)throw Error(`Failed to list archived sessions: ${i.status}`);return(await i.json()).sessions??[]}async function re(e,t){let n=await N(`${E}/api/sessions/archived/${t}`,{headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw Error(`Failed to get archived session: ${n.status}`);return n.json()}async function ie(e,t){let n=await N(`${E}/api/sessions/archived/${t}`,{method:`DELETE`,headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw Error(`Failed to delete archived session: ${n.status}`)}async function ae(e){let t=await N(`${E}/api/settings/retention`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`Failed to get retention settings: ${t.status}`);return(await t.json()).days}async function oe(e,t){let n=await N(`${E}/api/settings/retention`,{method:`PUT`,headers:O(e),body:JSON.stringify({days:t})});if(!n.ok)throw Error(`Failed to update retention settings: ${n.status}`);return(await n.json()).days}async function se(e){let t=await N(`${E}/api/settings/repos-path`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`Failed to get repos path: ${t.status}`);return(await t.json()).path}async function ce(e,t){let n=await N(`${E}/api/settings/repos-path`,{method:`PUT`,headers:O(e),body:JSON.stringify({path:t})});if(!n.ok){let e=await n.json().catch(()=>({error:`Failed to save repos path`}));throw Error(e.error||`Failed to set repos path: ${n.status}`)}return(await n.json()).path}async function le(e){let t=await N(`${E}/api/settings/queue-messages`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`Failed to get queue messages setting: ${t.status}`);return(await t.json()).enabled}async function ue(e,t){let n=await N(`${E}/api/settings/queue-messages`,{method:`PUT`,headers:O(e),body:JSON.stringify({enabled:t})});if(!n.ok)throw Error(`Failed to update queue messages setting: ${n.status}`);return(await n.json()).enabled}async function de(e){let t=await N(`${E}/api/settings/worktree-prefix`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`Failed to get worktree prefix: ${t.status}`);return(await t.json()).prefix}async function fe(e,t){let n=await N(`${E}/api/settings/worktree-prefix`,{method:`PUT`,headers:O(e),body:JSON.stringify({prefix:t})});if(!n.ok){let e=await n.json().catch(()=>({error:`Failed to save worktree prefix`}));throw Error(e.error||`Failed to set worktree prefix: ${n.status}`)}return(await n.json()).prefix}async function pe(e){let t=await N(`${E}/api/settings/agent-name`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`Failed to get agent name: ${t.status}`);return(await t.json()).name}async function me(e,t){let n=await N(`${E}/api/settings/agent-name`,{method:`PUT`,headers:O(e),body:JSON.stringify({name:t})});if(!n.ok){let e=await n.json().catch(()=>({error:`Failed to save agent name`}));throw Error(e.error||`Failed to set agent name: ${n.status}`)}return(await n.json()).name}async function he(e,t){let n=await N(`${E}/api/browse-dirs${t?`?path=${encodeURIComponent(t)}`:``}`,{headers:{Authorization:`Bearer ${e}`}});if(!n.ok){let e=await n.json().catch(()=>({error:`Failed to browse directory`}));throw Error(e.error||`Failed to browse: ${n.status}`)}return n.json()}async function ge(e){let t=await N(`${E}/api/webhooks/config`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`Failed to get webhook config: ${t.status}`);return(await t.json()).config}async function _e(e){let t=await N(`${E}/api/webhooks/events`,{headers:{Authorization:`Bearer ${e}`}});if(!t.ok)throw Error(`Failed to get webhook events: ${t.status}`);return(await t.json()).events??[]}function ve(){return`${location.protocol===`https:`?`wss:`:`ws:`}//${location.host}/cc/`}async function ye(e,t){let n=t?`?workingDir=${encodeURIComponent(t)}`:``,r=await fetch(`${E}/api/opencode/models${n}`,{headers:{Authorization:`Bearer ${e}`}});return r.ok?r.json():{models:[],defaults:{}}}async function be(e,t,n){let r=await N(`${E}/api/integrations/github/pr-review/health?${new URLSearchParams({repo:t,webhookUrl:n})}`,{headers:{Authorization:`Bearer ${e}`}});if(!r.ok)throw Error(`Health check failed: ${r.status}`);return r.json()}async function xe(e,t,n){let r=await N(`${E}/api/integrations/github/pr-review/setup`,{method:`POST`,headers:O(e),body:JSON.stringify({repo:t,webhookUrl:n,dryRun:!0})});if(!r.ok)throw Error(`Setup preview failed: ${r.status}`);return r.json()}async function Se(e,t,n){let r=await N(`${E}/api/integrations/github/pr-review/setup`,{method:`POST`,headers:O(e),body:JSON.stringify({repo:t,webhookUrl:n})});if(!r.ok){let e=await r.json().catch(()=>({error:`Setup failed`}));throw Error(e.error||`Setup failed: ${r.status}`)}return r.json()}async function Ce(e,t,n){let r=await N(`${E}/api/integrations/github/pr-review/test`,{method:`POST`,headers:O(e),body:JSON.stringify({repo:t,webhookUrl:n})});if(!r.ok){let e=await r.json().catch(()=>({error:`Test failed`}));throw Error(e.error||`Test failed: ${r.status}`)}return r.json()}function we(e){let[t,n]=(0,v.useState)([]),[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(null),s=(0,v.useRef)(null),c=(0,v.useCallback)(async()=>{if(e)try{n(await F(e)),o(null)}catch(e){o(e instanceof Error?e.message:`Failed to load sessions`)}},[e]),l=(0,v.useCallback)(async(t,n)=>{if(!e)return null;i(!0);try{let r=await I(e,t,n);return await c(),r.sessionId}catch(e){return o(e instanceof Error?e.message:`Failed to create session`),null}finally{i(!1)}},[e,c]),u=(0,v.useCallback)(async(t,n)=>{if(e)try{await L(e,t,n),await c()}catch(e){o(e instanceof Error?e.message:`Failed to rename session`)}},[e,c]),d=(0,v.useCallback)(async t=>{if(e)try{await R(e,t),await c()}catch(e){o(e instanceof Error?e.message:`Failed to delete session`)}},[e,c]);return(0,v.useEffect)(()=>{if(e)return c(),s.current=setInterval(()=>void c(),1e4),()=>{s.current&&clearInterval(s.current)}},[e,c]),{sessions:t,loading:r,error:a,refresh:c,create:l,rename:u,remove:d}}function Te(){let[e,t]=(0,v.useState)(new Map),n=(0,v.useCallback)((e,n)=>{let r=e.requestId??crypto?.randomUUID?.()??`local-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,i={requestId:r,options:e.options,question:e.question||null,multiSelect:e.multiSelect??!1,promptType:e.promptType??null,questions:e.questions,approvePattern:e.approvePattern};t(e=>{let t=new Map(e),a=new Map(e.get(n)??new Map);return a.set(r,i),t.set(n,a),t})},[]),r=(0,v.useCallback)(e=>{t(t=>{if(e){for(let[n,r]of t)if(r.has(e)){let i=new Map(t),a=new Map(r);return a.delete(e),a.size===0?i.delete(n):i.set(n,a),i}return t}return t})},[]),i=(0,v.useCallback)(e=>{t(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},[]),a=(0,v.useCallback)(()=>{t(e=>e.size===0?e:new Map)},[]);return{getActive:(0,v.useCallback)(t=>{if(!t)return null;let n=e.get(t);return!n||n.size===0?null:n.values().next().value??null},[e]),getQueueSize:(0,v.useCallback)(t=>t?e.get(t)?.size??0:0,[e]),waitingSessions:(0,v.useMemo)(()=>{let t={};for(let[n,r]of e)r.size>0&&(t[n]=!0);return t},[e]),enqueue:n,dismiss:r,clearForSession:i,clearAll:a}}var Ee=6e4;function De({token:e,onMessageRef:t,onDisconnect:n,onHealthPong:r}){let i=(0,v.useRef)(null),[a,o]=(0,v.useState)(`disconnected`),s=(0,v.useRef)(null),c=(0,v.useRef)(null),l=(0,v.useRef)(1e3),u=(0,v.useRef)(!1),d=(0,v.useRef)(()=>{}),f=(0,v.useRef)(!1),p=(0,v.useRef)(!1),m=(0,v.useRef)(null),h=(0,v.useRef)(0),g=(0,v.useRef)(n),_=(0,v.useRef)(r);(0,v.useEffect)(()=>{g.current=n},[n]),(0,v.useEffect)(()=>{_.current=r},[r]);let y=(0,v.useCallback)(()=>{c.current&&=(clearInterval(c.current),null),s.current&&=(clearTimeout(s.current),null),m.current&&=(clearTimeout(m.current),null)},[]),b=(0,v.useCallback)(e=>{let t=i.current;t&&t.readyState===WebSocket.OPEN&&t.send(JSON.stringify(e))},[]),x=(0,v.useCallback)(()=>{if(!e)return;y(),o(`connecting`);let n=new WebSocket(ve());i.current=n,n.onopen=()=>{n.send(JSON.stringify({type:`auth`,token:e})),o(`connected`),l.current=1e3,c.current=setInterval(()=>{b({type:`ping`})},3e4)},n.onmessage=e=>{let n;try{n=JSON.parse(e.data)}catch{return}n.type===`pong`&&p.current&&(p.current=!1,m.current&&=(clearTimeout(m.current),null),_.current?.(b)),t.current?.(n)},n.onclose=e=>{if(o(`disconnected`),y(),i.current=null,g.current?.(),e.code===4001){A();return}u.current||M().then(e=>{if(!e){A();return}s.current=setTimeout(()=>{l.current=Math.min(l.current*2,3e4),d.current()},l.current)}).catch(()=>{s.current=setTimeout(d.current,l.current)})},n.onerror=()=>{}},[e,y,b,t]);(0,v.useEffect)(()=>{d.current=x},[x]);let S=(0,v.useCallback)(()=>{u.current=!0,y(),i.current?.close(),i.current=null,o(`disconnected`)},[y]),C=(0,v.useCallback)(()=>{if(f.current)return;f.current=!0,setTimeout(()=>{f.current=!1},8e3);let e=i.current;if(e&&e.readyState===WebSocket.OPEN){p.current=!0,h.current=1;let t=()=>{m.current=setTimeout(()=>{m.current=null,p.current&&(h.current<3?(h.current+=1,b({type:`ping`}),t()):(p.current=!1,l.current=1e3,e.close()))},2e3)};b({type:`ping`}),t();return}e&&e.readyState===WebSocket.CONNECTING||M().then(e=>{if(!e){A();return}l.current=1e3,s.current&&=(clearTimeout(s.current),null),x()}).catch(()=>{s.current=setTimeout(d.current,l.current)})},[b,x]);return(0,v.useEffect)(()=>(e&&(u.current=!1,x()),()=>{S()}),[e]),(0,v.useEffect)(()=>{if(!e)return;let t=setInterval(async()=>{await M()||A()},Ee);return()=>clearInterval(t)},[e]),{connState:a,send:b,disconnect:S,restoreSession:C,reconnect:x}}var Oe=500,ke=0;function Ae(){return`m${++ke}`}function je(e,t){let n=e.length>0?e[e.length-1]:void 0;switch(t.type){case`output`:return n&&n.type===`assistant`&&!n.complete?n.text+=t.data:e.push({type:`assistant`,text:t.data,complete:!1,ts:Date.now(),key:Ae()}),!0;case`result`:return n&&n.type===`assistant`&&!n.complete?(n.complete=!0,!0):!1;case`system_message`:return e.push({type:`system`,subtype:t.subtype,text:t.text,model:t.model,key:Ae()}),!0;case`user_echo`:return e.push({type:`user`,text:t.text,ts:Date.now(),key:Ae()}),!0;case`claude_started`:return e.push({type:`system`,subtype:`init`,text:`Session started`,key:Ae()}),!0;case`tool_active`:return n&&n.type===`tool_group`?n.tools.push({name:t.toolName,active:!0}):e.push({type:`tool_group`,tools:[{name:t.toolName,active:!0}],key:Ae()}),!0;case`tool_done`:if(n&&n.type===`tool_group`){for(let e=n.tools.length-1;e>=0;e--)if(n.tools[e].name===t.toolName&&n.tools[e].active){n.tools[e]={name:t.toolName,summary:t.summary,active:!1};break}return!0}return!1;case`tool_output`:return e.push({type:`tool_output`,content:t.content,isError:t.isError,key:Ae()}),!0;case`image`:return e.push({type:`image`,base64:t.base64,mediaType:t.mediaType,key:Ae()}),!0;case`planning_mode`:return e.push({type:`planning_mode`,active:t.active,key:Ae()}),!0;default:return!1}}function Me(e,t){let n=[...e],r=n.length-1;if(r>=0){let e=n[r];e.type===`assistant`&&!e.complete?n[r]={...e}:e.type===`tool_group`&&(n[r]={...e,tools:[...e.tools]})}return je(n,t)?n:e}function U(e){return e.length<=Oe?e:[{type:`system`,subtype:`trim`,text:`Older messages trimmed`,key:Ae()},...e.slice(-Oe+1)]}function Ne(e){let t=[];for(let n of e)je(t,n);return t}function Pe({token:e,onSessionCreated:t,onSessionJoined:n,onSessionRenamed:r,onSessionsUpdated:i,onError:a,onRawMessage:o}){let s=(0,v.useRef)({onSessionCreated:t,onSessionJoined:n,onSessionRenamed:r,onSessionsUpdated:i,onError:a,onRawMessage:o});(0,v.useEffect)(()=>{s.current={onSessionCreated:t,onSessionJoined:n,onSessionRenamed:r,onSessionsUpdated:i,onError:a,onRawMessage:o}});let[c,l]=(0,v.useState)([]),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(!1),[m,h]=(0,v.useState)([]),[g,_]=(0,v.useState)(()=>localStorage.getItem(`claude-model`)??null),[y,b]=(0,v.useState)(()=>localStorage.getItem(`claude-permission-mode`)||`acceptEdits`),[x,S]=(0,v.useState)(null),C=Te(),w=(0,v.useRef)(null),[T,E]=(0,v.useState)(null),D=C.getActive(T),O=C.getQueueSize(T),k=(0,v.useRef)(``),A=(0,v.useRef)(null),j=(0,v.useCallback)(()=>{A.current=null;let e=k.current;e&&(k.current=``,l(t=>{let n=t[t.length-1];if(n&&n.type===`assistant`&&!n.complete){let r=[...t];return r[r.length-1]={...n,text:n.text+e},U(r)}return U([...t,{type:`assistant`,text:e,complete:!1,ts:Date.now(),key:Ae()}])}))},[]),M=(0,v.useCallback)(()=>{k.current&&(A.current&&=(cancelAnimationFrame(A.current),null),j())},[j]),N=(0,v.useCallback)(e=>{switch(s.current.onRawMessage?.(e),e.type){case`thinking`:S(e.summary),p(!0);break;case`output`:S(null),p(!0),k.current+=e.data,A.current||=requestAnimationFrame(j);break;case`result`:p(!1),S(null),M(),l(t=>U(Me(t,e)));break;case`system_message`:e.subtype===`init`&&e.model&&(_(e.model),localStorage.setItem(`claude-model`,e.model)),M(),l(t=>U(Me(t,e)));break;case`user_echo`:M(),l(t=>U(Me(t,e)));break;case`tool_active`:S(null),p(!0),M(),l(t=>U(Me(t,e)));break;case`tool_done`:M(),l(t=>U(Me(t,e)));break;case`tool_output`:M(),l(t=>U(Me(t,e)));break;case`image`:M(),l(t=>U(Me(t,e)));break;case`planning_mode`:d(e.active),l(t=>U(Me(t,e)));break;case`todo_update`:h(e.tasks);break;case`prompt`:{let t=e.sessionId??w.current;if(!t)break;C.enqueue(e,t),t===w.current&&(p(!1),S(null));break}case`prompt_dismiss`:C.dismiss(e.requestId);break;case`session_created`:w.current=e.sessionId,E(e.sessionId),l([]),h([]),p(!1),S(null),s.current.onSessionCreated?.(e.sessionId);break;case`session_joined`:{w.current=e.sessionId,E(e.sessionId),p(!1),S(null),e.model&&(_(e.model),localStorage.setItem(`claude-model`,e.model)),e.permissionMode&&(b(e.permissionMode),localStorage.setItem(`claude-permission-mode`,e.permissionMode));let t=[],n=!1,r=[];if(e.outputBuffer?.length){t=Ne(e.outputBuffer);for(let t of e.outputBuffer)t.type===`planning_mode`&&(n=t.active),t.type===`todo_update`&&(r=t.tasks)}d(n),h(r),l(U(t)),s.current.onSessionJoined?.(e.sessionId);break}case`claude_started`:l(t=>U(Me(t,e)));break;case`claude_stopped`:case`exit`:{p(!1),S(null);let e=w.current;e&&C.clearForSession(e);break}case`error`:s.current.onError?.(e.message);break;case`session_deleted`:l(e=>U([...e,{type:`system`,subtype:`error`,text:`Session was deleted`,key:Ae()}]));break;case`connected`:case`pong`:break;case`session_name_update`:s.current.onSessionRenamed?.(e.sessionId,e.name);break;case`sessions_updated`:s.current.onSessionsUpdated?.();break;case`worktree_created`:s.current.onSessionsUpdated?.();break;case`info`:break}},[j,M,C]),P=(0,v.useRef)(N);(0,v.useEffect)(()=>{P.current=N},[N]);let{connState:F,send:I,disconnect:L,restoreSession:R,reconnect:z}=De({token:e,onMessageRef:P,onDisconnect:(0,v.useCallback)(()=>{p(!1),S(null),A.current&&=(cancelAnimationFrame(A.current),null)},[]),onHealthPong:(0,v.useCallback)(e=>{let t=w.current;t&&e({type:`join_session`,sessionId:t})},[])}),ee=(0,v.useCallback)(e=>{I({type:`join_session`,sessionId:e})},[I]),B=(0,v.useCallback)((e,t,n,r,i)=>{I({type:`create_session`,name:e,workingDir:t,useWorktree:n,permissionMode:r,provider:i})},[I]),V=(0,v.useCallback)((e,t)=>{I({type:`input`,data:e,...t?{displayText:t}:{}}),p(!0);let n=w.current;n&&C.clearForSession(n)},[I,C]),H=(0,v.useCallback)(e=>{let t=D?.requestId;I({type:`prompt_response`,value:e,requestId:t}),t&&C.dismiss(t),p(!0)},[I,D?.requestId,C]),te=(0,v.useCallback)(()=>{I({type:`leave_session`}),w.current=null,E(null),p(!1),S(null)},[I]),ne=(0,v.useCallback)(()=>{l([])},[]),re=(0,v.useCallback)((e,t=`notification`)=>{l(n=>U([...n,{type:`system`,subtype:t,text:e,key:Ae()}]))},[]),ie=(0,v.useCallback)(e=>{I({type:`set_model`,model:e}),_(e),localStorage.setItem(`claude-model`,e)},[I]),ae=(0,v.useCallback)(()=>{I({type:`move_to_worktree`})},[I]),oe=(0,v.useCallback)(e=>{I({type:`set_permission_mode`,permissionMode:e}),b(e),localStorage.setItem(`claude-permission-mode`,e)},[I]);return{connState:F,messages:c,tasks:m,planningMode:u,isProcessing:f,thinkingSummary:x,waitingSessions:C.waitingSessions,activePrompt:D,promptQueueSize:O,currentModel:g,send:I,joinSession:ee,createSession:B,sendInput:V,sendPromptResponse:H,leaveSession:te,clearMessages:ne,addSystemMessage:re,disconnect:L,reconnect:z,restoreSession:R,setModel:ie,currentPermissionMode:y,setPermissionMode:oe,moveToWorktree:ae}}function Fe(e){let t=(0,v.useRef)(e);(0,v.useEffect)(()=>{t.current=e}),(0,v.useEffect)(()=>{function e(){document.visibilityState===`visible`&&t.current()}return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[])}function W(e){if(e===`/joe`||e===`/joe/`||e===`/orchestrator`||e===`/orchestrator/`)return{path:e,sessionId:null,view:`orchestrator`};if(e===`/workflows`||e===`/workflows/`)return{path:e,sessionId:null,view:`workflows`};let t=e.match(/^\/s\/([a-f0-9-]+)\/?$/);return{path:e,sessionId:t?t[1]:null,view:`chat`}}function Ie(){let[e,t]=(0,v.useState)(()=>W(window.location.pathname));(0,v.useEffect)(()=>{function e(){t(W(window.location.pathname))}return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]);let n=(0,v.useCallback)((e,n=!1)=>{e!==window.location.pathname&&(n?history.replaceState(null,``,e):history.pushState(null,``,e),t(W(e)))},[]);return{...e,navigate:n}}var Le=`codekin-tentative-`;function Re(e,t){let n=`${Le}${e}`;t.length===0?localStorage.removeItem(n):localStorage.setItem(n,JSON.stringify(t.map(e=>e.text)))}function ze(e){try{let t=localStorage.getItem(`${Le}${e}`);if(t)return JSON.parse(t).map(e=>({text:e,files:[]}))}catch{}return[]}function Be(){let e={};try{for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(n?.startsWith(Le)){let t=n.slice(18),r=ze(t);r.length>0&&(e[t]=r)}}}catch{}return e}function Ve(){let[e,t]=(0,v.useState)(Be);return{queues:e,addToQueue:(0,v.useCallback)((e,n,r=[])=>{t(t=>{let i={...t,[e]:[...t[e]??[],{text:n,files:r}]};return Re(e,i[e]),i})},[]),clearQueue:(0,v.useCallback)(e=>{t(t=>{if(!t[e])return t;let n=Object.fromEntries(Object.entries(t).filter(([t])=>t!==e));return Re(e,[]),n})},[])}}function He(e){return e.groupDir??e.workingDir}function Ue({sessions:e,repos:t,activeSessionId:n,setActiveSessionId:r,joinSession:i,leaveSession:a,clearMessages:o,wsCreateSession:s,removeSession:c,pendingContextRef:l,useWorktreeRef:u,permissionModeRef:d,providerRef:f}){let p=n?e.find(e=>e.id===n)??null:null,m=p?He(p):null;return{activeSession:p,activeWorkingDir:m,handleOpenSession:(0,v.useCallback)(t=>{let n=e.filter(e=>He(e)===t.workingDir);if(n.length>0){let e=n[n.length-1];o(),a(),i(e.id);return}o(),a(),s(`hub:${t.id}`,t.workingDir,u.current,d.current,f?.current)},[e,i,s,a,o,u,d,f]),handleSelectSession:(0,v.useCallback)(e=>{e!==n&&(o(),a(),i(e))},[n,a,i,o]),handleDeleteSession:(0,v.useCallback)(async t=>{if(t===n){o(),a();let n=e.find(e=>e.id===t),s=e.filter(e=>e.id!==t);if(s.length>0){let e=n?s.filter(e=>He(e)===He(n)):[];i((e.length>0?e[0]:s[0]).id)}else r(null)}await c(t)},[n,e,o,a,i,r,c]),handleSelectRepo:(0,v.useCallback)(t=>{if(t===m)return;let n=e.filter(e=>He(e)===t);if(n.length>0){let e=n[n.length-1];o(),a(),i(e.id)}},[m,e,o,a,i]),handleDeleteRepo:(0,v.useCallback)(async t=>{let s=e.filter(e=>He(e)===t);if(s.some(e=>e.id===n)){o(),a();let n=e.filter(e=>He(e)!==t);n.length>0?i(n[0].id):r(null)}for(let e of s)await c(e.id)},[e,n,o,a,i,r,c]),handleNewSessionForRepo:(0,v.useCallback)(e=>{if(!m)return;let n=t.find(e=>e.workingDir===m),r=n?.workingDir??m,i=n?.id??r.split(`/`).pop()??`session`;o(),a(),s(`hub:${i}`,r,u.current,d.current,e??f?.current)},[m,t,o,a,s,d,u,f]),handleNewSessionFromArchive:(0,v.useCallback)((e,n)=>{let r=t.find(t=>t.workingDir===e);r&&(l.current=n,o(),a(),s(`hub:${r.id}`,r.workingDir,u.current,d.current,f?.current))},[t,o,a,s,l,d,u,f])}}var We=`/cc`,Ge=`codekin-starred-docs`;function Ke(){try{return JSON.parse(localStorage.getItem(Ge)||`{}`)}catch{return{}}}function qe(e){localStorage.setItem(Ge,JSON.stringify(e))}function Je(){let[e,t]=(0,v.useState)(null),[n,r]=(0,v.useState)(null),[i,a]=(0,v.useState)(!1),[o,s]=(0,v.useState)(null),[c,l]=(0,v.useState)(!1),[u,d]=(0,v.useState)(null),[f,p]=(0,v.useState)(!1),[m,h]=(0,v.useState)([]),[g,_]=(0,v.useState)(!1),[y,b]=(0,v.useState)(null),[x,S]=(0,v.useState)(Ke),C=(0,v.useCallback)(async(e,t)=>{b(e),p(!0),_(!0),h([]);try{let n=new URLSearchParams({repo:e}),r=await fetch(`${We}/api/docs?${n}`,{headers:{Authorization:`Bearer ${t}`}});if(!r.ok)throw Error(`Failed to list docs: ${r.status}`);h((await r.json()).files??[])}catch{h([])}finally{_(!1)}},[]),w=(0,v.useCallback)(()=>{p(!1)},[]),T=(0,v.useCallback)(async(e,n,i)=>{d(e),t(n),r(null),s(null),a(!0),l(!1),p(!1);try{let t=new URLSearchParams({repo:e,file:n}),a=await fetch(`${We}/api/docs/file?${t}`,{headers:{Authorization:`Bearer ${i}`}});if(!a.ok)throw Error(`Failed to load file: ${a.status}`);r((await a.json()).content)}catch(e){s(e instanceof Error?e.message:`Failed to load file`)}finally{a(!1)}},[]),E=(0,v.useCallback)(()=>{t(null),r(null),s(null),a(!1),l(!1),d(null)},[]),D=(0,v.useCallback)(()=>{l(e=>!e)},[]),O=u?x[u]??[]:[],k=e!==null&&O.includes(e),A=(0,v.useCallback)(()=>{!u||!e||S(t=>{let n=t[u]??[],r=n.includes(e)?n.filter(t=>t!==e):[...n,e],i={...t,[u]:r};return qe(i),i})},[u,e]),j=y?x[y]??[]:[];return{isOpen:e!==null,selectedFile:e,content:n,loading:i,error:o,rawMode:c,toggleRawMode:D,openFile:T,close:E,repoWorkingDir:u,pickerOpen:f,pickerFiles:m,pickerLoading:g,openPicker:C,closePicker:w,pickerRepoDir:y,starredDocs:j,isCurrentFileStarred:k,toggleStarCurrentFile:A}}var Ye=1024;function Xe(e=Ye){let[t,n]=(0,v.useState)(()=>typeof window<`u`?window.innerWidth<e:!1);return(0,v.useEffect)(()=>{let t=window.matchMedia(`(max-width: ${e-1}px)`),r=e=>n(e.matches);return t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e]),t}var Ze=[{command:`/clear`,name:`Clear session`,description:`Clear conversation and start fresh`,category:`builtin`,aliases:[`/reset`,`/new`]},{command:`/compact`,name:`Compact`,description:`Compact conversation to save context`,category:`builtin`},{command:`/model`,name:`Model`,description:`Change the active model`,category:`builtin`},{command:`/help`,name:`Help`,description:`Show available commands`,category:`builtin`},{command:`/cost`,name:`Cost`,description:`Show session cost info`,category:`builtin`},{command:`/status`,name:`Status`,description:`Show session status`,category:`builtin`}],Qe=new Map;for(let e of Ze){Qe.set(e.command,e.command);for(let t of e.aliases??[])Qe.set(t,e.command)}function $e(e){return Qe.get(e)}var et=[{command:`/commit`,name:`Commit`,description:`Create a git commit`,category:`bundled`},{command:`/simplify`,name:`Simplify`,description:`Review and simplify changed code`,category:`bundled`},{command:`/loop`,name:`Loop`,description:`Run a command on a recurring interval`,category:`bundled`},{command:`/debug`,name:`Debug`,description:`Debug an issue step by step`,category:`bundled`},{command:`/claude-api`,name:`Claude API`,description:`Help with Anthropic SDK usage`,category:`bundled`}];function tt(e){let t=new Set,n=[];for(let r of e)t.has(r.command)||(t.add(r.command),n.push({command:r.command,name:r.name,description:r.description,category:`skill`,content:r.content}));for(let e of et)t.has(e.command)||(t.add(e.command),n.push(e));for(let e of Ze)if(!t.has(e.command)){t.add(e.command);for(let n of e.aliases??[])t.add(n);n.push(e)}return n}var nt=new Set(et.map(e=>e.command));function rt({token:e,activeSessionId:t,activeWorkingDir:n,sessions:r,allSkills:i,sendInput:a,onBuiltinCommand:o,tentativeQueues:s,addToQueue:c,clearQueue:l,docsContext:u,queueEnabled:d}){let[f,p]=(0,v.useState)(null),[m,h]=(0,v.useState)({}),g=(0,v.useMemo)(()=>t?m[t]??[]:[],[t,m]),_=(0,v.useCallback)(e=>{t&&h(n=>({...n,[t]:[...n[t]??[],...e]}))},[t]),y=(0,v.useCallback)(e=>{t&&h(n=>({...n,[t]:(n[t]??[]).filter((t,n)=>n!==e)}))},[t]),b=(0,v.useCallback)(e=>{let t=e.trim();if(!t.startsWith(`/`))return{expanded:e,handled:!1};let n=t.indexOf(` `),r=n===-1?t:t.slice(0,n),a=n===-1?``:t.slice(n+1).trim(),s=$e(r);if(s)return o(s,a),{expanded:e,handled:!0};let c=i.find(e=>e.command===r);if(c?.content){let t=c.content.replace(/\$ARGUMENTS/g,a||`(no arguments provided)`),n=[`[Skill: ${c.name}]`,``,t];return a&&n.push(``,`User instructions: ${a}`),{expanded:n.join(`
|
|
10
10
|
`),displayText:e,handled:!1}}return nt.has(r)?{expanded:e,displayText:e,handled:!1}:{expanded:e,handled:!1}},[i,o]),x=(0,v.useCallback)(async i=>{if(!e)return;let{expanded:o,displayText:l,handled:f}=b(i);if(f)return;let m=u.isOpen&&u.selectedFile&&u.repoWorkingDir?`[Viewing doc: ${u.selectedFile} in ${u.repoWorkingDir}]\n\n`:``,_=(s[t??``]?.length??0)>0,v=!!n&&r.some(e=>He(e)===n&&e.isProcessing&&e.id!==t);if(d&&t&&(_||v)){if(g.length>0){h(e=>({...e,[t]:[]})),p(`Uploading files...`);try{c(t,await B(e,g,m+o)),p(null)}catch(e){c(t,m+o),p(`Upload failed: ${e instanceof Error?e.message:`unknown error`}`),setTimeout(()=>p(null),3e3)}}else c(t,m+o);return}let y=g;if(y.length===0){a(m+o,l);return}p(`Uploading files...`);try{let n=await B(e,y,m+o);t&&h(e=>({...e,[t]:[]})),p(null),a(n)}catch(e){p(`Upload failed: ${e instanceof Error?e.message:`unknown error`}`),setTimeout(()=>p(null),3e3)}},[e,t,n,r,s,c,g,b,a,u.isOpen,u.selectedFile,u.repoWorkingDir,d]),S=(0,v.useCallback)(async t=>{let n=s[t]??[];l(t);for(let t=0;t<n.length;t++){let r=n[t];if(t>0&&await new Promise(e=>setTimeout(e,100)),r.files.length>0&&e)try{a(await B(e,r.files,r.text))}catch{a(r.text)}else a(r.text)}},[s,l,a,e]),C=(0,v.useCallback)(e=>{l(e)},[l]);return(0,v.useEffect)(()=>{for(let[e,n]of Object.entries(s)){if(n.length===0)continue;let i=r.find(t=>t.id===e);if(!i)continue;let a=He(i);r.filter(t=>He(t)===a&&t.isProcessing&&t.id!==e).length===0&&e===t&&(S(e),setTimeout(()=>{p(`Session finished — starting queued session.`),setTimeout(()=>p(null),3e3)},0))}},[r,t,s,S]),{handleSend:x,handleExecuteTentative:S,handleDiscardTentative:C,tentativeMessages:t?(s[t]??[]).map((e,t)=>({type:`tentative`,text:e.files.length>0?`${e.text}\n📎 ${e.files.length} file${e.files.length>1?`s`:``} attached`:e.text,index:t,key:`tentative-${t}`})):[],activeTentativeCount:t?s[t]?.length??0:0,pendingFiles:g,addFiles:_,removeFile:y,uploadStatus:f}}function it(e,t,n){let r=e[e.length-1];if(r&&r.type===`assistant`&&!r.complete)return`Writing...`;for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.type===`tool_group`){let e=n.tools.find(e=>e.active);if(e)return`Running ${e.name}...`;break}if(n.type!==`planning_mode`&&n.type!==`tool_output`)break}if(t)return n?`Thinking: ${n}`:`Thinking...`}var at={outline:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},filled:{xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`currentColor`,stroke:`none`}},G=(e,t,n,r)=>{let i=(0,v.forwardRef)(({color:n=`currentColor`,size:i=24,stroke:a=2,title:o,className:s,children:c,...l},u)=>(0,v.createElement)(`svg`,{ref:u,...at[e],width:i,height:i,className:[`tabler-icon`,`tabler-icon-${t}`,s].join(` `),...e===`filled`?{fill:n}:{strokeWidth:a,stroke:n},...l},[o&&(0,v.createElement)(`title`,{key:`svg-title`},o),...r.map(([e,t])=>(0,v.createElement)(e,t)),...Array.isArray(c)?c:[c]]));return i.displayName=`${n}`,i},ot=G(`outline`,`alert-triangle`,`AlertTriangle`,[[`path`,{d:`M12 9v4`,key:`svg-0`}],[`path`,{d:`M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0`,key:`svg-1`}],[`path`,{d:`M12 16h.01`,key:`svg-2`}]]),st=G(`outline`,`archive`,`Archive`,[[`path`,{d:`M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2`,key:`svg-0`}],[`path`,{d:`M5 8v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-10`,key:`svg-1`}],[`path`,{d:`M10 12l4 0`,key:`svg-2`}]]),ct=G(`outline`,`arrow-down`,`ArrowDown`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M18 13l-6 6`,key:`svg-1`}],[`path`,{d:`M6 13l6 6`,key:`svg-2`}]]),lt=G(`outline`,`arrow-left`,`ArrowLeft`,[[`path`,{d:`M5 12l14 0`,key:`svg-0`}],[`path`,{d:`M5 12l6 6`,key:`svg-1`}],[`path`,{d:`M5 12l6 -6`,key:`svg-2`}]]),ut=G(`outline`,`arrow-right`,`ArrowRight`,[[`path`,{d:`M5 12l14 0`,key:`svg-0`}],[`path`,{d:`M13 18l6 -6`,key:`svg-1`}],[`path`,{d:`M13 6l6 6`,key:`svg-2`}]]),dt=G(`outline`,`arrow-up`,`ArrowUp`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M18 11l-6 -6`,key:`svg-1`}],[`path`,{d:`M6 11l6 -6`,key:`svg-2`}]]),ft=G(`outline`,`bell`,`Bell`,[[`path`,{d:`M10 5a2 2 0 1 1 4 0a7 7 0 0 1 4 6v3a4 4 0 0 0 2 3h-16a4 4 0 0 0 2 -3v-3a7 7 0 0 1 4 -6`,key:`svg-0`}],[`path`,{d:`M9 17v1a3 3 0 0 0 6 0v-1`,key:`svg-1`}]]),pt=G(`outline`,`book`,`Book`,[[`path`,{d:`M3 19a9 9 0 0 1 9 0a9 9 0 0 1 9 0`,key:`svg-0`}],[`path`,{d:`M3 6a9 9 0 0 1 9 0a9 9 0 0 1 9 0`,key:`svg-1`}],[`path`,{d:`M3 6l0 13`,key:`svg-2`}],[`path`,{d:`M12 6l0 13`,key:`svg-3`}],[`path`,{d:`M21 6l0 13`,key:`svg-4`}]]),mt=G(`outline`,`brand-github`,`BrandGithub`,[[`path`,{d:`M9 19c-4.3 1.4 -4.3 -2.5 -6 -3m12 5v-3.5c0 -1 .1 -1.4 -.5 -2c2.8 -.3 5.5 -1.4 5.5 -6a4.6 4.6 0 0 0 -1.3 -3.2a4.2 4.2 0 0 0 -.1 -3.2s-1.1 -.3 -3.5 1.3a12.3 12.3 0 0 0 -6.2 0c-2.4 -1.6 -3.5 -1.3 -3.5 -1.3a4.2 4.2 0 0 0 -.1 3.2a4.6 4.6 0 0 0 -1.3 3.2c0 4.6 2.7 5.7 5.5 6c-.6 .6 -.6 1.2 -.5 2v3.5`,key:`svg-0`}]]),ht=G(`outline`,`calendar-event`,`CalendarEvent`,[[`path`,{d:`M4 7a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12`,key:`svg-0`}],[`path`,{d:`M16 3l0 4`,key:`svg-1`}],[`path`,{d:`M8 3l0 4`,key:`svg-2`}],[`path`,{d:`M4 11l16 0`,key:`svg-3`}],[`path`,{d:`M8 15h2v2h-2l0 -2`,key:`svg-4`}]]),gt=G(`outline`,`check`,`Check`,[[`path`,{d:`M5 12l5 5l10 -10`,key:`svg-0`}]]),_t=G(`outline`,`chevron-down`,`ChevronDown`,[[`path`,{d:`M6 9l6 6l6 -6`,key:`svg-0`}]]),vt=G(`outline`,`chevron-left`,`ChevronLeft`,[[`path`,{d:`M15 6l-6 6l6 6`,key:`svg-0`}]]),yt=G(`outline`,`chevron-right`,`ChevronRight`,[[`path`,{d:`M9 6l6 6l-6 6`,key:`svg-0`}]]),bt=G(`outline`,`chevron-up`,`ChevronUp`,[[`path`,{d:`M6 15l6 -6l6 6`,key:`svg-0`}]]),xt=G(`outline`,`circle`,`Circle`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0`,key:`svg-0`}]]),St=G(`outline`,`clock`,`Clock`,[[`path`,{d:`M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0`,key:`svg-0`}],[`path`,{d:`M12 7v5l3 3`,key:`svg-1`}]]),Ct=G(`outline`,`cloud`,`Cloud`,[[`path`,{d:`M6.657 18c-2.572 0 -4.657 -2.007 -4.657 -4.483c0 -2.475 2.085 -4.482 4.657 -4.482c.393 -1.762 1.794 -3.2 3.675 -3.773c1.88 -.572 3.956 -.193 5.444 1c1.488 1.19 2.162 3.007 1.77 4.769h.99c1.913 0 3.464 1.56 3.464 3.486c0 1.927 -1.551 3.487 -3.465 3.487h-11.878`,key:`svg-0`}]]),wt=G(`outline`,`copy`,`Copy`,[[`path`,{d:`M7 9.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667l0 -8.666`,key:`svg-0`}],[`path`,{d:`M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1`,key:`svg-1`}]]),Tt=G(`outline`,`dots`,`Dots`,[[`path`,{d:`M4 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-0`}],[`path`,{d:`M11 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M18 12a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}]]),Et=G(`outline`,`external-link`,`ExternalLink`,[[`path`,{d:`M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6`,key:`svg-0`}],[`path`,{d:`M11 13l9 -9`,key:`svg-1`}],[`path`,{d:`M15 4h5v5`,key:`svg-2`}]]),Dt=G(`outline`,`eye`,`Eye`,[[`path`,{d:`M10 12a2 2 0 1 0 4 0a2 2 0 0 0 -4 0`,key:`svg-0`}],[`path`,{d:`M21 12c-2.4 4 -5.4 6 -9 6c-3.6 0 -6.6 -2 -9 -6c2.4 -4 5.4 -6 9 -6c3.6 0 6.6 2 9 6`,key:`svg-1`}]]),Ot=G(`outline`,`file-code`,`FileCode`,[[`path`,{d:`M14 3v4a1 1 0 0 0 1 1h4`,key:`svg-0`}],[`path`,{d:`M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2`,key:`svg-1`}],[`path`,{d:`M10 13l-1 2l1 2`,key:`svg-2`}],[`path`,{d:`M14 13l1 2l-1 2`,key:`svg-3`}]]),kt=G(`outline`,`file-text`,`FileText`,[[`path`,{d:`M14 3v4a1 1 0 0 0 1 1h4`,key:`svg-0`}],[`path`,{d:`M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2`,key:`svg-1`}],[`path`,{d:`M9 9l1 0`,key:`svg-2`}],[`path`,{d:`M9 13l6 0`,key:`svg-3`}],[`path`,{d:`M9 17l6 0`,key:`svg-4`}]]),At=G(`outline`,`file`,`File`,[[`path`,{d:`M14 3v4a1 1 0 0 0 1 1h4`,key:`svg-0`}],[`path`,{d:`M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2`,key:`svg-1`}]]),jt=G(`outline`,`folder-open`,`FolderOpen`,[[`path`,{d:`M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2`,key:`svg-0`}]]),Mt=G(`outline`,`folder`,`Folder`,[[`path`,{d:`M5 4h4l3 3h7a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2`,key:`svg-0`}]]),Nt=G(`outline`,`git-branch`,`GitBranch`,[[`path`,{d:`M5 18a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-0`}],[`path`,{d:`M5 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-1`}],[`path`,{d:`M15 6a2 2 0 1 0 4 0a2 2 0 1 0 -4 0`,key:`svg-2`}],[`path`,{d:`M7 8l0 8`,key:`svg-3`}],[`path`,{d:`M9 18h6a2 2 0 0 0 2 -2v-5`,key:`svg-4`}],[`path`,{d:`M14 14l3 -3l3 3`,key:`svg-5`}]]),Pt=G(`outline`,`key`,`Key`,[[`path`,{d:`M16.555 3.843l3.602 3.602a2.877 2.877 0 0 1 0 4.069l-2.643 2.643a2.877 2.877 0 0 1 -4.069 0l-.301 -.301l-6.558 6.558a2 2 0 0 1 -1.239 .578l-.175 .008h-1.172a1 1 0 0 1 -.993 -.883l-.007 -.117v-1.172a2 2 0 0 1 .467 -1.284l.119 -.13l.414 -.414h2v-2h2v-2l2.144 -2.144l-.301 -.301a2.877 2.877 0 0 1 0 -4.069l2.643 -2.643a2.877 2.877 0 0 1 4.069 0`,key:`svg-0`}],[`path`,{d:`M15 9h.01`,key:`svg-1`}]]),Ft=G(`outline`,`loader-2`,`Loader2`,[[`path`,{d:`M12 3a9 9 0 1 0 9 9`,key:`svg-0`}]]),It=G(`outline`,`logout`,`Logout`,[[`path`,{d:`M14 8v-2a2 2 0 0 0 -2 -2h-7a2 2 0 0 0 -2 2v12a2 2 0 0 0 2 2h7a2 2 0 0 0 2 -2v-2`,key:`svg-0`}],[`path`,{d:`M9 12h12l-3 -3`,key:`svg-1`}],[`path`,{d:`M18 15l3 -3`,key:`svg-2`}]]),Lt=G(`outline`,`map-2`,`Map2`,[[`path`,{d:`M12 18.5l-3 -1.5l-6 3v-13l6 -3l6 3l6 -3v7.5`,key:`svg-0`}],[`path`,{d:`M9 4v13`,key:`svg-1`}],[`path`,{d:`M15 7v5.5`,key:`svg-2`}],[`path`,{d:`M21.121 20.121a3 3 0 1 0 -4.242 0c.418 .419 1.125 1.045 2.121 1.879c1.051 -.89 1.759 -1.516 2.121 -1.879`,key:`svg-3`}],[`path`,{d:`M19 18v.01`,key:`svg-4`}]]),Rt=G(`outline`,`menu-2`,`Menu2`,[[`path`,{d:`M4 6l16 0`,key:`svg-0`}],[`path`,{d:`M4 12l16 0`,key:`svg-1`}],[`path`,{d:`M4 18l16 0`,key:`svg-2`}]]),zt=G(`outline`,`message-plus`,`MessagePlus`,[[`path`,{d:`M8 9h8`,key:`svg-0`}],[`path`,{d:`M8 13h6`,key:`svg-1`}],[`path`,{d:`M12.01 18.594l-4.01 2.406v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v5.5`,key:`svg-2`}],[`path`,{d:`M16 19h6`,key:`svg-3`}],[`path`,{d:`M19 16v6`,key:`svg-4`}]]),Bt=G(`outline`,`minus`,`Minus`,[[`path`,{d:`M5 12l14 0`,key:`svg-0`}]]),Vt=G(`outline`,`moon`,`Moon`,[[`path`,{d:`M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454l0 .008`,key:`svg-0`}]]),Ht=G(`outline`,`palette`,`Palette`,[[`path`,{d:`M12 21a9 9 0 0 1 0 -18c4.97 0 9 3.582 9 8c0 1.06 -.474 2.078 -1.318 2.828c-.844 .75 -1.989 1.172 -3.182 1.172h-2.5a2 2 0 0 0 -1 3.75a1.3 1.3 0 0 1 -1 2.25`,key:`svg-0`}],[`path`,{d:`M7.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M11.5 7.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}],[`path`,{d:`M15.5 10.5a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-3`}]]),Ut=G(`outline`,`paperclip`,`Paperclip`,[[`path`,{d:`M15 7l-6.5 6.5a1.5 1.5 0 0 0 3 3l6.5 -6.5a3 3 0 0 0 -6 -6l-6.5 6.5a4.5 4.5 0 0 0 9 9l6.5 -6.5`,key:`svg-0`}]]),Wt=G(`outline`,`pencil`,`Pencil`,[[`path`,{d:`M4 20h4l10.5 -10.5a2.828 2.828 0 1 0 -4 -4l-10.5 10.5v4`,key:`svg-0`}],[`path`,{d:`M13.5 6.5l4 4`,key:`svg-1`}]]),Gt=G(`outline`,`player-pause`,`PlayerPause`,[[`path`,{d:`M6 6a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -12`,key:`svg-0`}],[`path`,{d:`M14 6a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -12`,key:`svg-1`}]]),Kt=G(`outline`,`player-play`,`PlayerPlay`,[[`path`,{d:`M7 4v16l13 -8l-13 -8`,key:`svg-0`}]]),qt=G(`outline`,`player-stop`,`PlayerStop`,[[`path`,{d:`M5 7a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v10a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2l0 -10`,key:`svg-0`}]]),Jt=G(`outline`,`plug-connected`,`PlugConnected`,[[`path`,{d:`M7 12l5 5l-1.5 1.5a3.536 3.536 0 1 1 -5 -5l1.5 -1.5`,key:`svg-0`}],[`path`,{d:`M17 12l-5 -5l1.5 -1.5a3.536 3.536 0 1 1 5 5l-1.5 1.5`,key:`svg-1`}],[`path`,{d:`M3 21l2.5 -2.5`,key:`svg-2`}],[`path`,{d:`M18.5 5.5l2.5 -2.5`,key:`svg-3`}],[`path`,{d:`M10 11l-2 2`,key:`svg-4`}],[`path`,{d:`M13 14l-2 2`,key:`svg-5`}]]),Yt=G(`outline`,`plus`,`Plus`,[[`path`,{d:`M12 5l0 14`,key:`svg-0`}],[`path`,{d:`M5 12l14 0`,key:`svg-1`}]]),Xt=G(`outline`,`refresh`,`Refresh`,[[`path`,{d:`M20 11a8.1 8.1 0 0 0 -15.5 -2m-.5 -4v4h4`,key:`svg-0`}],[`path`,{d:`M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4`,key:`svg-1`}]]),Zt=G(`outline`,`robot-face`,`RobotFace`,[[`path`,{d:`M6 5h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2v-12a2 2 0 0 1 2 -2`,key:`svg-0`}],[`path`,{d:`M9 16c1 .667 2 1 3 1s2 -.333 3 -1`,key:`svg-1`}],[`path`,{d:`M9 7l-1 -4`,key:`svg-2`}],[`path`,{d:`M15 7l1 -4`,key:`svg-3`}],[`path`,{d:`M9 12v-1`,key:`svg-4`}],[`path`,{d:`M15 12v-1`,key:`svg-5`}]]),Qt=G(`outline`,`robot`,`Robot`,[[`path`,{d:`M6 6a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2l0 -4`,key:`svg-0`}],[`path`,{d:`M12 2v2`,key:`svg-1`}],[`path`,{d:`M9 12v9`,key:`svg-2`}],[`path`,{d:`M15 12v9`,key:`svg-3`}],[`path`,{d:`M5 16l4 -2`,key:`svg-4`}],[`path`,{d:`M15 14l4 2`,key:`svg-5`}],[`path`,{d:`M9 18h6`,key:`svg-6`}],[`path`,{d:`M10 8v.01`,key:`svg-7`}],[`path`,{d:`M14 8v.01`,key:`svg-8`}]]),$t=G(`outline`,`search`,`Search`,[[`path`,{d:`M3 10a7 7 0 1 0 14 0a7 7 0 1 0 -14 0`,key:`svg-0`}],[`path`,{d:`M21 21l-6 -6`,key:`svg-1`}]]),en=G(`outline`,`send`,`Send`,[[`path`,{d:`M10 14l11 -11`,key:`svg-0`}],[`path`,{d:`M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5`,key:`svg-1`}]]),tn=G(`outline`,`settings`,`Settings`,[[`path`,{d:`M10.325 4.317c.426 -1.756 2.924 -1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543 -.94 3.31 .826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756 .426 1.756 2.924 0 3.35a1.724 1.724 0 0 0 -1.066 2.573c.94 1.543 -.826 3.31 -2.37 2.37a1.724 1.724 0 0 0 -2.572 1.065c-.426 1.756 -2.924 1.756 -3.35 0a1.724 1.724 0 0 0 -2.573 -1.066c-1.543 .94 -3.31 -.826 -2.37 -2.37a1.724 1.724 0 0 0 -1.065 -2.572c-1.756 -.426 -1.756 -2.924 0 -3.35a1.724 1.724 0 0 0 1.066 -2.573c-.94 -1.543 .826 -3.31 2.37 -2.37c1 .608 2.296 .07 2.572 -1.065`,key:`svg-0`}],[`path`,{d:`M9 12a3 3 0 1 0 6 0a3 3 0 0 0 -6 0`,key:`svg-1`}]]),nn=G(`outline`,`shield-check`,`ShieldCheck`,[[`path`,{d:`M11.46 20.846a12 12 0 0 1 -7.96 -14.846a12 12 0 0 0 8.5 -3a12 12 0 0 0 8.5 3a12 12 0 0 1 -.09 7.06`,key:`svg-0`}],[`path`,{d:`M15 19l2 2l4 -4`,key:`svg-1`}]]),rn=G(`outline`,`sparkles`,`Sparkles`,[[`path`,{d:`M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2m-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6`,key:`svg-0`}]]),an=G(`outline`,`star`,`Star`,[[`path`,{d:`M12 17.75l-6.172 3.245l1.179 -6.873l-5 -4.867l6.9 -1l3.086 -6.253l3.086 6.253l6.9 1l-5 4.867l1.179 6.873l-6.158 -3.245`,key:`svg-0`}]]),on=G(`outline`,`sun`,`Sun`,[[`path`,{d:`M8 12a4 4 0 1 0 8 0a4 4 0 1 0 -8 0`,key:`svg-0`}],[`path`,{d:`M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7`,key:`svg-1`}]]),sn=G(`outline`,`terminal-2`,`Terminal2`,[[`path`,{d:`M8 9l3 3l-3 3`,key:`svg-0`}],[`path`,{d:`M13 15l3 0`,key:`svg-1`}],[`path`,{d:`M3 6a2 2 0 0 1 2 -2h14a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-14a2 2 0 0 1 -2 -2l0 -12`,key:`svg-2`}]]),cn=G(`outline`,`timeline`,`Timeline`,[[`path`,{d:`M4 16l6 -7l5 5l5 -6`,key:`svg-0`}],[`path`,{d:`M14 14a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-1`}],[`path`,{d:`M9 9a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-2`}],[`path`,{d:`M3 16a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-3`}],[`path`,{d:`M19 8a1 1 0 1 0 2 0a1 1 0 1 0 -2 0`,key:`svg-4`}]]),ln=G(`outline`,`trash`,`Trash`,[[`path`,{d:`M4 7l16 0`,key:`svg-0`}],[`path`,{d:`M10 11l0 6`,key:`svg-1`}],[`path`,{d:`M14 11l0 6`,key:`svg-2`}],[`path`,{d:`M5 7l1 12a2 2 0 0 0 2 2h8a2 2 0 0 0 2 -2l1 -12`,key:`svg-3`}],[`path`,{d:`M9 7v-3a1 1 0 0 1 1 -1h4a1 1 0 0 1 1 1v3`,key:`svg-4`}]]),un=G(`outline`,`upload`,`Upload`,[[`path`,{d:`M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2 -2v-2`,key:`svg-0`}],[`path`,{d:`M7 9l5 -5l5 5`,key:`svg-1`}],[`path`,{d:`M12 4l0 12`,key:`svg-2`}]]),dn=G(`outline`,`wand`,`Wand`,[[`path`,{d:`M6 21l15 -15l-3 -3l-15 15l3 3`,key:`svg-0`}],[`path`,{d:`M15 6l3 3`,key:`svg-1`}],[`path`,{d:`M9 3a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2`,key:`svg-2`}],[`path`,{d:`M19 13a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2`,key:`svg-3`}]]),fn=G(`outline`,`x`,`X`,[[`path`,{d:`M18 6l-12 12`,key:`svg-0`}],[`path`,{d:`M6 6l12 12`,key:`svg-1`}]]),pn=G(`filled`,`circle-check-filled`,`CircleCheckFilled`,[[`path`,{d:`M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-1.293 5.953a1 1 0 0 0 -1.32 -.083l-.094 .083l-3.293 3.292l-1.293 -1.292l-.094 -.083a1 1 0 0 0 -1.403 1.403l.083 .094l2 2l.094 .083a1 1 0 0 0 1.226 0l.094 -.083l4 -4l.083 -.094a1 1 0 0 0 -.083 -1.32z`,key:`svg-0`}]]),mn=G(`filled`,`circle-x-filled`,`CircleXFilled`,[[`path`,{d:`M17 3.34a10 10 0 1 1 -14.995 8.984l-.005 -.324l.005 -.324a10 10 0 0 1 14.995 -8.336zm-6.489 5.8a1 1 0 0 0 -1.218 1.567l1.292 1.293l-1.292 1.293l-.083 .094a1 1 0 0 0 1.497 1.32l1.293 -1.292l1.293 1.292l.094 .083a1 1 0 0 0 1.32 -1.497l-1.292 -1.293l1.292 -1.293l.083 -.094a1 1 0 0 0 -1.497 -1.32l-1.293 1.292l-1.293 -1.292l-.094 -.083z`,key:`svg-0`}]]),hn=G(`filled`,`star-filled`,`StarFilled`,[[`path`,{d:`M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z`,key:`svg-0`}]]),gn=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),K=o(((e,t)=>{t.exports=gn()}))();function _n({value:e,token:t,placeholder:n=`~/repos (default)`,helpText:r,onSave:i,inputClass:a}){let[o,s]=(0,v.useState)(e),[c,l]=(0,v.useState)(e),[u,d]=(0,v.useState)(!1),[f,p]=(0,v.useState)(null),[m,h]=(0,v.useState)(!1),[g,_]=(0,v.useState)(null),[y,b]=(0,v.useState)([]),[x,S]=(0,v.useState)(!1),[C,w]=(0,v.useState)(null),T=(0,v.useRef)(null);(0,v.useEffect)(()=>{s(e),l(e)},[e]),(0,v.useEffect)(()=>{if(!m)return;function e(e){T.current&&!T.current.contains(e.target)&&h(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[m]);async function E(){if(!(!t||o===c)){d(!0),p(null);try{await i(o),l(o)}catch(e){p(e instanceof Error?e.message:`Failed to save path`)}finally{d(!1)}}}async function D(e){if(t){S(!0),w(null);try{let n=await he(t,e);_(n.path),b(n.dirs),h(!0)}catch(e){w(e instanceof Error?e.message:`Failed to browse directory`)}finally{S(!1)}}}function O(){g&&D(g.replace(/\/[^/]+\/?$/,``)||`/`)}function k(e){D(g===`/`?`/${e}`:`${g}/${e}`)}function A(){g&&(s(g),h(!1))}return(0,K.jsxs)(`div`,{className:`relative`,children:[(0,K.jsx)(`label`,{className:`mb-1.5 block text-neutral-5`,style:{fontSize:a?void 0:`13px`},children:(0,K.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(Mt,{size:13,className:`text-neutral-6`}),`Repositories Path`]})}),(0,K.jsxs)(`div`,{className:`flex gap-1.5`,children:[(0,K.jsx)(`input`,{type:`text`,value:o,onChange:e=>{s(e.target.value),p(null)},onBlur:()=>void E(),onKeyDown:e=>{e.key===`Enter`&&E()},placeholder:n,disabled:u,className:`flex-1 rounded border border-neutral-9 bg-neutral-10 px-3 py-2 ${a??`text-[13px]`} font-mono text-neutral-3 outline-none focus:border-primary-7 disabled:opacity-50`}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>m?h(!1):void D(o||void 0),disabled:!t||x,className:`flex items-center gap-1 rounded border border-neutral-9 bg-neutral-10 px-2.5 py-2 text-[13px] text-neutral-4 hover:border-neutral-7 hover:text-neutral-3 disabled:opacity-50`,title:`Browse folders`,children:x?(0,K.jsx)(`span`,{className:`h-4 w-4 animate-spin rounded-full border-2 border-neutral-6 border-t-transparent`}):(0,K.jsx)(jt,{size:16})})]}),(f||C)&&(0,K.jsx)(`p`,{className:`mt-1 text-[12px] text-red-400`,children:f||C}),r&&!f&&!C&&(0,K.jsx)(`p`,{className:`mt-1 text-[12px] text-neutral-6`,children:r}),m&&g!==null&&(0,K.jsxs)(`div`,{ref:T,className:`absolute z-50 mt-1 w-full rounded-lg border border-neutral-8 bg-neutral-10 shadow-lg`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 border-b border-neutral-8 px-3 py-2`,children:[(0,K.jsx)(`button`,{type:`button`,onClick:O,className:`rounded p-0.5 text-neutral-5 hover:bg-neutral-8 hover:text-neutral-3`,title:`Go up`,children:(0,K.jsx)(dt,{size:14})}),(0,K.jsx)(`span`,{className:`flex-1 truncate font-mono text-[12px] text-neutral-4`,children:g}),(0,K.jsx)(`button`,{type:`button`,onClick:()=>h(!1),className:`rounded p-0.5 text-neutral-5 hover:bg-neutral-8 hover:text-neutral-3`,children:(0,K.jsx)(fn,{size:14})})]}),(0,K.jsx)(`div`,{className:`max-h-48 overflow-y-auto py-1`,children:y.length===0?(0,K.jsx)(`p`,{className:`px-3 py-2 text-[12px] text-neutral-6`,children:`No subdirectories`}):y.map(e=>(0,K.jsxs)(`button`,{type:`button`,onClick:()=>k(e),className:`flex w-full items-center gap-2 px-3 py-1.5 text-left text-[13px] text-neutral-3 hover:bg-neutral-8`,children:[(0,K.jsx)(Mt,{size:14,className:`shrink-0 text-neutral-5`}),(0,K.jsx)(`span`,{className:`truncate`,children:e}),(0,K.jsx)(yt,{size:12,className:`ml-auto shrink-0 text-neutral-6`})]},e))}),(0,K.jsx)(`div`,{className:`border-t border-neutral-8 px-3 py-2`,children:(0,K.jsx)(`button`,{type:`button`,onClick:A,className:`w-full rounded bg-primary-7 px-3 py-1.5 text-[13px] font-medium text-white hover:bg-primary-6`,children:`Select this folder`})})]})]})}function vn({icon:e,title:t,children:n}){return(0,K.jsxs)(`section`,{className:`settings-section-card rounded-lg border border-neutral-9/60 bg-neutral-10/30`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 px-4 py-3 border-b border-neutral-9/40`,children:[(0,K.jsx)(`span`,{className:`text-neutral-5`,children:e}),(0,K.jsx)(`h3`,{className:`text-[13px] font-semibold uppercase tracking-wide text-neutral-5`,children:t})]}),(0,K.jsx)(`div`,{className:`px-4 py-4`,children:n})]})}function yn({text:e}){let[t,n]=(0,v.useState)(!1);return(0,K.jsx)(`button`,{onClick:(0,v.useCallback)(()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)},[e]),className:`rounded p-1.5 text-neutral-5 hover:bg-neutral-9 hover:text-neutral-2 transition-colors`,title:`Copy to clipboard`,children:t?(0,K.jsx)(gt,{size:14,className:`text-success-6`}):(0,K.jsx)(wt,{size:14})})}function bn({status:e}){let t={completed:`bg-success-9/30 text-success-5`,session_created:`bg-primary-9/30 text-primary-5`,processing:`bg-yellow-900/30 text-yellow-500`,error:`bg-error-9/30 text-error-5`,filtered:`bg-neutral-9/50 text-neutral-5`,duplicate:`bg-neutral-9/50 text-neutral-5`,received:`bg-neutral-9/50 text-neutral-4`};return(0,K.jsx)(`span`,{className:`rounded px-1.5 py-0.5 text-[11px] font-medium ${t[e]||t.received}`,children:e.replace(`_`,` `)})}function xn({open:e,onClose:t,settings:n,onUpdate:r,isMobile:i=!1,autoWorktree:a=!1,onAutoWorktreeChange:o,agentName:s=`Joe`,onAgentNameChange:c}){let[l,u]=(0,v.useState)(n.token),[d,f]=(0,v.useState)(!1),[p,m]=(0,v.useState)(`idle`),[h,g]=(0,v.useState)(7),[_,y]=(0,v.useState)(``),[b,x]=(0,v.useState)(`wt/`),[S,C]=(0,v.useState)(!1),[w,T]=(0,v.useState)(null),[E,D]=(0,v.useState)(null),[O,k]=(0,v.useState)([]),[A,j]=(0,v.useState)(!1),[M,N]=(0,v.useState)(!1),[F,I]=(0,v.useState)(``),[L,R]=(0,v.useState)(null),[z,ee]=(0,v.useState)(!1),[B,V]=(0,v.useState)(null),[H,te]=(0,v.useState)(`idle`),[ne,re]=(0,v.useState)(null),[ie,pe]=(0,v.useState)(null),[he,ve]=(0,v.useState)(null),[ye,we]=(0,v.useState)(!1);if((0,v.useEffect)(()=>{u(n.token),m(`idle`),T(null)},[n.token,e]),(0,v.useEffect)(()=>{!e||!n.token||(ae(n.token).then(g).catch(()=>{}),se(n.token).then(y).catch(()=>{}),de(n.token).then(x).catch(()=>{}),le(n.token).then(C).catch(()=>{}),ge(n.token).then(D).catch(()=>{}),_e(n.token).then(k).catch(()=>{}))},[e,n.token]),!e)return null;let Te=`${location.protocol}//${location.host}/cc/api/webhooks/github`;async function Ee(){if(l.trim()){f(!0),m(`idle`);try{let e=await P(l.trim());m(e?`valid`:`invalid`),e&&r({token:l.trim()})}catch{m(`invalid`)}finally{f(!1)}}}function De(){r({token:l.trim()}),t()}return(0,K.jsx)(`div`,{className:`fixed inset-0 z-50 flex bg-black/60 ${i?`items-end`:`items-center justify-center`}`,children:(0,K.jsxs)(`div`,{className:`w-full bg-neutral-11 shadow-xl flex flex-col ${i?`max-h-[95vh] rounded-t-xl`:`max-w-2xl rounded-lg border border-neutral-10 max-h-[85vh]`}`,children:[(0,K.jsx)(`div`,{className:`flex-shrink-0 px-6 pt-5 pb-4 border-b border-neutral-10`,children:(0,K.jsx)(`h2`,{className:`text-[19px] font-semibold text-neutral-2`,children:`Settings`})}),(0,K.jsxs)(`div`,{className:`flex-1 overflow-y-auto px-6 py-5 space-y-4`,children:[(0,K.jsxs)(vn,{icon:(0,K.jsx)(Pt,{size:15}),title:`Authentication`,children:[(0,K.jsx)(`label`,{className:`mb-1 block text-[15px] text-neutral-4`,children:`Claude Code Web Token`}),(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsx)(`input`,{type:`password`,value:l,onChange:e=>{u(e.target.value),m(`idle`)},placeholder:`Enter your auth token`,className:`flex-1 rounded border border-neutral-9 bg-neutral-10 px-3 py-2 text-[15px] text-neutral-2 outline-none focus:border-primary-7`,onKeyDown:e=>e.key===`Enter`&&Ee()}),(0,K.jsx)(`button`,{onClick:Ee,disabled:d||!l.trim(),className:`rounded bg-primary-8 px-3 py-2 text-[15px] font-medium text-neutral-1 hover:bg-primary-7 disabled:opacity-50`,children:d?`...`:`Verify`})]}),p===`valid`&&(0,K.jsx)(`p`,{className:`mt-1 text-[13px] text-success-6`,children:`Token verified successfully`}),p===`invalid`&&(0,K.jsx)(`p`,{className:`mt-1 text-[13px] text-error-5`,children:`Invalid token`})]}),(0,K.jsx)(vn,{icon:(0,K.jsx)(Ht,{size:15}),title:`Preferences`,children:(0,K.jsxs)(`div`,{className:`space-y-5`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{className:`mb-1.5 block text-[15px] text-neutral-4`,children:(0,K.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(Qt,{size:14,className:`text-neutral-5`}),`Agent Name`]})}),(0,K.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,K.jsx)(`input`,{type:`text`,value:s,onChange:e=>{let t=e.target.value;c?.(t)},onBlur:e=>{let t=e.target.value.trim();t&&t!==s&&me(n.token,t).then(e=>c?.(e)).catch(()=>T(`Failed to save agent name`))},onKeyDown:e=>{if(e.key===`Enter`){let t=e.target.value.trim();t&&me(n.token,t).then(e=>c?.(e)).catch(()=>T(`Failed to save agent name`))}},placeholder:`Joe`,maxLength:30,className:`w-40 rounded border border-neutral-9 bg-neutral-10 px-3 py-2 text-[15px] text-neutral-2 outline-none focus:border-primary-7`})}),(0,K.jsx)(`p`,{className:`mt-1 text-[13px] text-neutral-6`,children:`Display name for the orchestrator agent in the sidebar and chat`})]}),(0,K.jsx)(`div`,{className:`border-t border-neutral-9/40`}),(0,K.jsxs)(`div`,{className:`grid grid-cols-2 gap-x-6 gap-y-4`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{className:`mb-1.5 block text-[15px] text-neutral-4`,children:`Theme`}),(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsx)(`button`,{onClick:()=>r({theme:`dark`}),className:`rounded px-4 py-1.5 text-[15px] font-medium transition-colors ${n.theme===`light`?`border border-neutral-9 bg-neutral-10 text-neutral-3 hover:bg-neutral-9`:`bg-primary-8 text-neutral-1`}`,children:`Dark`}),(0,K.jsx)(`button`,{onClick:()=>r({theme:`light`}),className:`rounded px-4 py-1.5 text-[15px] font-medium transition-colors ${n.theme===`light`?`bg-primary-8 text-neutral-1`:`border border-neutral-9 bg-neutral-10 text-neutral-3 hover:bg-neutral-9`}`,children:`Light`})]})]}),(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{className:`mb-1.5 block text-[15px] text-neutral-4`,children:(0,K.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(st,{size:14,className:`text-neutral-5`}),`Archived Session Retention`]})}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`input`,{type:`number`,min:1,max:365,value:h,onChange:e=>{let t=Math.max(1,Math.min(365,Number(e.target.value)));g(t),oe(n.token,t).catch(()=>T(`Failed to save retention setting`))},className:`w-20 rounded border border-neutral-9 bg-neutral-10 px-3 py-2 text-[15px] text-neutral-2 outline-none focus:border-primary-7`}),(0,K.jsx)(`span`,{className:`text-[15px] text-neutral-5`,children:`days`})]}),(0,K.jsx)(`p`,{className:`mt-1 text-[13px] text-neutral-6`,children:`Auto-delete archived sessions older than this`})]})]}),(0,K.jsx)(`div`,{className:`border-t border-neutral-9/40`}),(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`label`,{className:`flex items-center gap-2.5 cursor-pointer group`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:S,onChange:e=>{let t=e.target.checked;C(t),ue(n.token,t).catch(()=>T(`Failed to save queue messages setting`))},className:`h-4 w-4 rounded border-neutral-7 bg-neutral-10 text-primary-7 accent-primary-7 cursor-pointer`}),(0,K.jsx)(`span`,{className:`text-[15px] text-neutral-4 group-hover:text-neutral-3 transition-colors`,children:`Queue messages across sessions`})]}),(0,K.jsx)(`p`,{className:`mt-1 ml-[26px] text-[13px] text-neutral-6`,children:`When enabled, messages sent while another session for the same repo is processing will be queued and sent automatically when it finishes.`})]}),(0,K.jsx)(`div`,{className:`border-t border-neutral-9/40`}),(0,K.jsxs)(`div`,{className:`space-y-4`,children:[(0,K.jsx)(_n,{value:_,token:n.token,placeholder:`~/repos (default)`,helpText:`Absolute path to your locally cloned repositories. Leave empty to use the server default.`,inputClass:`text-[15px]`,onSave:async e=>{await ce(n.token,e),y(e)}}),(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`label`,{className:`flex items-center gap-2.5 cursor-pointer group`,children:[(0,K.jsx)(`input`,{type:`checkbox`,checked:a,onChange:e=>o?.(e.target.checked),className:`h-4 w-4 rounded border-neutral-7 bg-neutral-10 text-primary-7 accent-primary-7 cursor-pointer`}),(0,K.jsxs)(`span`,{className:`flex items-center gap-1.5 text-[15px] text-neutral-4 group-hover:text-neutral-3 transition-colors`,children:[(0,K.jsx)(Nt,{size:14,className:`text-neutral-5`}),`Auto-enable worktrees for new sessions`]})]}),(0,K.jsx)(`p`,{className:`mt-1 ml-[26px] text-[13px] text-neutral-6`,children:`When enabled, new sessions will automatically start in a git worktree`})]}),(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`label`,{className:`mb-1.5 block text-[15px] text-neutral-4`,children:`Worktree Branch Prefix`}),(0,K.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,K.jsx)(`input`,{type:`text`,value:b,onChange:e=>{let t=e.target.value;x(t),fe(n.token,t).catch(()=>T(`Failed to save worktree prefix`))},placeholder:`wt/`,className:`w-40 rounded border border-neutral-9 bg-neutral-10 px-3 py-2 text-[15px] text-neutral-2 outline-none focus:border-primary-7`})}),(0,K.jsx)(`p`,{className:`mt-1 text-[13px] text-neutral-6`,children:`Prefix for worktree branch names (e.g. wt/ → wt/abc12345)`})]})]})]})}),(0,K.jsxs)(vn,{icon:(0,K.jsx)(mt,{size:15}),title:`GitHub Webhooks`,children:[(0,K.jsx)(`div`,{className:`flex items-center gap-2 mb-3`,children:E?E.enabled?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(pn,{size:16,className:`text-success-6`}),(0,K.jsx)(`span`,{className:`text-[15px] text-success-5 font-medium`,children:`Active`}),(0,K.jsxs)(`span`,{className:`text-[13px] text-neutral-6`,children:[`· max `,E.maxConcurrentSessions,` concurrent sessions`]})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(mn,{size:16,className:`text-neutral-6`}),(0,K.jsx)(`span`,{className:`text-[15px] text-neutral-5`,children:`Disabled`})]}):(0,K.jsx)(`span`,{className:`text-[13px] text-neutral-6`,children:`Loading...`})}),(0,K.jsx)(`p`,{className:`text-[13px] text-neutral-5 mb-3`,children:`Automatically review PRs and diagnose CI failures via GitHub webhooks.`}),(0,K.jsxs)(`div`,{className:`mb-4`,children:[(0,K.jsx)(`label`,{className:`mb-1 block text-[12px] font-medium text-neutral-5 uppercase tracking-wide`,children:`Webhook URL`}),(0,K.jsxs)(`div`,{className:`flex items-center gap-1 rounded border border-neutral-9 bg-neutral-10 px-3 py-2`,children:[(0,K.jsx)(`code`,{className:`flex-1 text-[13px] text-neutral-3 font-mono truncate select-all`,children:Te}),(0,K.jsx)(yn,{text:Te})]})]}),(0,K.jsxs)(`div`,{className:`border-t border-neutral-9/40 pt-4 mb-4`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-3`,children:[(0,K.jsx)(Jt,{size:14,className:`text-neutral-5`}),(0,K.jsx)(`span`,{className:`text-[12px] font-semibold uppercase tracking-wide text-neutral-5`,children:`Integration Health`})]}),(0,K.jsxs)(`div`,{className:`flex gap-2 mb-3`,children:[(0,K.jsx)(`input`,{type:`text`,placeholder:`owner/repo`,value:F,onChange:e=>I(e.target.value),className:`flex-1 rounded border border-neutral-9 bg-neutral-10 px-3 py-2 text-[14px] text-neutral-2 outline-none focus:border-primary-7 font-mono placeholder:text-neutral-7`}),(0,K.jsxs)(`button`,{onClick:async()=>{if(!(!F.trim()||!n.token)){ee(!0),V(null),R(null);try{R(await be(n.token,F.trim(),Te))}catch(e){V(e instanceof Error?e.message:`Health check failed`)}finally{ee(!1)}}},disabled:!F.trim()||z,className:`flex items-center gap-1.5 rounded bg-primary-8 px-3 py-2 text-[13px] font-medium text-neutral-1 hover:bg-primary-7 disabled:opacity-50 transition-colors`,children:[z?(0,K.jsx)(Xt,{size:14,className:`animate-spin`}):(0,K.jsx)(Xt,{size:14}),`Check`]})]}),B&&(0,K.jsx)(`p`,{className:`text-[13px] text-error-5 mb-3`,children:B}),L&&(0,K.jsxs)(`div`,{className:`space-y-2 mb-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 mb-2`,children:[L.overall===`healthy`&&(0,K.jsx)(pn,{size:16,className:`text-success-6`}),L.overall===`degraded`&&(0,K.jsx)(ot,{size:16,className:`text-yellow-500`}),L.overall===`broken`&&(0,K.jsx)(mn,{size:16,className:`text-error-5`}),L.overall===`unconfigured`&&(0,K.jsx)(mn,{size:16,className:`text-neutral-6`}),(0,K.jsx)(`span`,{className:`text-[14px] font-medium ${L.overall===`healthy`?`text-success-5`:L.overall===`degraded`?`text-yellow-500`:L.overall===`broken`?`text-error-5`:`text-neutral-5`}`,children:L.overall===`healthy`?`Healthy`:L.overall===`degraded`?`Degraded`:L.overall===`broken`?`Broken`:`Not Configured`})]}),(0,K.jsx)(`div`,{className:`rounded border border-neutral-9 bg-neutral-10/50 divide-y divide-neutral-9/50`,children:Object.entries(L.checks).map(([e,t])=>(0,K.jsxs)(`div`,{className:`flex items-start gap-2.5 px-3 py-2.5`,children:[t.ok?(0,K.jsx)(pn,{size:14,className:`text-success-6 mt-0.5 shrink-0`}):(0,K.jsx)(mn,{size:14,className:`text-error-5 mt-0.5 shrink-0`}),(0,K.jsxs)(`div`,{className:`min-w-0`,children:[(0,K.jsx)(`span`,{className:`text-[12px] font-medium text-neutral-4 uppercase tracking-wide`,children:e===`ghCli`?`GitHub CLI`:e===`config`?`Server Config`:e===`webhook`?`GitHub Webhook`:`Deliveries`}),(0,K.jsx)(`p`,{className:`text-[13px] text-neutral-5 mt-0.5`,children:t.message})]})]},e))}),L.checks.ghCli.ok&&(L.overall===`broken`||L.overall===`degraded`)&&!L.checks.webhook.ok&&H===`idle`&&(0,K.jsxs)(`button`,{onClick:async()=>{pe(null),te(`preview`);try{let{preview:e}=await xe(n.token,F.trim(),Te);re(e)}catch(e){pe(e instanceof Error?e.message:`Preview failed`),te(`idle`)}},className:`flex items-center gap-1.5 rounded bg-primary-8 px-3 py-2 text-[13px] font-medium text-neutral-1 hover:bg-primary-7 transition-colors mt-2`,children:[(0,K.jsx)(dn,{size:14}),`Set up automatically`]}),L.checks.webhook.ok&&H===`idle`&&(0,K.jsxs)(`button`,{onClick:async()=>{we(!0),ve(null);try{ve(await Ce(n.token,F.trim(),Te))}catch(e){ve({success:!1,message:e instanceof Error?e.message:`Test failed`})}finally{we(!1)}},disabled:ye,className:`flex items-center gap-1.5 rounded border border-neutral-9 bg-neutral-10 px-3 py-2 text-[13px] text-neutral-3 hover:bg-neutral-9 disabled:opacity-50 transition-colors mt-2`,children:[ye?(0,K.jsx)(Xt,{size:14,className:`animate-spin`}):(0,K.jsx)(Kt,{size:14}),`Test delivery`]}),he&&(0,K.jsx)(`div`,{className:`rounded border px-3 py-2 text-[13px] mt-2 ${he.success?`border-success-9/50 bg-success-9/10 text-success-5`:`border-error-9/50 bg-error-9/10 text-error-5`}`,children:he.message})]}),H!==`idle`&&(0,K.jsxs)(`div`,{className:`rounded border border-primary-9/30 bg-primary-9/5 px-4 py-3 mb-3 space-y-3`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(dn,{size:14,className:`text-primary-6`}),(0,K.jsx)(`span`,{className:`text-[13px] font-medium text-primary-5`,children:`Webhook Setup`})]}),H===`preview`&&ne&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`text-[13px] text-neutral-4 space-y-1.5`,children:[(0,K.jsx)(`p`,{children:ne.action===`create`?`Will create a new webhook on ${F}:`:`Will update the existing webhook on ${F}:`}),(0,K.jsxs)(`div`,{className:`rounded bg-neutral-10/80 px-3 py-2 font-mono text-[12px] text-neutral-3 space-y-1`,children:[(0,K.jsxs)(`div`,{children:[`URL: `,ne.proposed.url]}),(0,K.jsxs)(`div`,{children:[`Events: `,ne.proposed.events.join(`, `)]}),(0,K.jsxs)(`div`,{children:[`Active: `,ne.proposed.active?`yes`:`no`]})]}),ne.changes&&ne.changes.length>0&&(0,K.jsx)(`ul`,{className:`list-disc list-inside text-[12px] text-neutral-5`,children:ne.changes.map((e,t)=>(0,K.jsx)(`li`,{children:e},t))})]}),(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsx)(`button`,{onClick:async()=>{te(`applying`),pe(null);try{await Se(n.token,F.trim(),Te),te(`done`),R(await be(n.token,F.trim(),Te))}catch(e){pe(e instanceof Error?e.message:`Setup failed`),te(`preview`)}},className:`rounded bg-primary-8 px-3 py-1.5 text-[13px] font-medium text-neutral-1 hover:bg-primary-7 transition-colors`,children:`Apply`}),(0,K.jsx)(`button`,{onClick:()=>{te(`idle`),re(null),pe(null)},className:`rounded px-3 py-1.5 text-[13px] text-neutral-5 hover:text-neutral-2 transition-colors`,children:`Cancel`})]})]}),H===`applying`&&(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-[13px] text-neutral-4`,children:[(0,K.jsx)(Xt,{size:14,className:`animate-spin text-primary-6`}),`Configuring webhook on GitHub...`]}),H===`done`&&(0,K.jsxs)(`div`,{className:`space-y-2`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-[13px] text-success-5`,children:[(0,K.jsx)(pn,{size:14}),`Webhook configured successfully.`]}),(0,K.jsx)(`button`,{onClick:()=>{te(`idle`),re(null)},className:`rounded px-3 py-1.5 text-[13px] text-neutral-5 hover:text-neutral-2 transition-colors`,children:`Dismiss`})]}),ie&&(0,K.jsx)(`p`,{className:`text-[13px] text-error-5`,children:ie})]})]}),(0,K.jsxs)(`button`,{onClick:()=>j(!A),className:`flex items-center gap-1.5 text-[13px] text-primary-6 hover:text-primary-5 mb-2 transition-colors`,children:[A?(0,K.jsx)(_t,{size:14}):(0,K.jsx)(yt,{size:14}),`Manual setup instructions`]}),A&&(0,K.jsxs)(`div`,{className:`rounded border border-neutral-9 bg-neutral-10/50 px-4 py-3 mb-3 text-[13px] text-neutral-4 space-y-2.5`,children:[(!L||!L.checks.config.ok)&&(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsx)(`span`,{className:`text-primary-6 font-semibold shrink-0`,children:`1.`}),(0,K.jsxs)(`span`,{children:[`Set `,(0,K.jsx)(`code`,{className:`text-neutral-3 bg-neutral-9/50 px-1 rounded`,children:`GITHUB_WEBHOOK_ENABLED=true`}),` and `,(0,K.jsx)(`code`,{className:`text-neutral-3 bg-neutral-9/50 px-1 rounded`,children:`GITHUB_WEBHOOK_SECRET=<your-secret>`}),` on the server, then restart.`]})]}),(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsxs)(`span`,{className:`text-primary-6 font-semibold shrink-0`,children:[!L||!L.checks.config.ok?`2`:`1`,`.`]}),(0,K.jsxs)(`span`,{children:[`In your GitHub repo, go to `,(0,K.jsx)(`strong`,{className:`text-neutral-3`,children:`Settings → Webhooks → Add webhook`})]})]}),(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsxs)(`span`,{className:`text-primary-6 font-semibold shrink-0`,children:[!L||!L.checks.config.ok?`3`:`2`,`.`]}),(0,K.jsxs)(`span`,{children:[`Set `,(0,K.jsx)(`strong`,{className:`text-neutral-3`,children:`Payload URL`}),` to the webhook URL above. Set `,(0,K.jsx)(`strong`,{className:`text-neutral-3`,children:`Content type`}),` to `,(0,K.jsx)(`code`,{className:`text-neutral-3 bg-neutral-9/50 px-1 rounded`,children:`application/json`})]})]}),(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsxs)(`span`,{className:`text-primary-6 font-semibold shrink-0`,children:[!L||!L.checks.config.ok?`4`:`3`,`.`]}),(0,K.jsxs)(`span`,{children:[`Set a `,(0,K.jsx)(`strong`,{className:`text-neutral-3`,children:`Secret`}),` matching the server's `,(0,K.jsx)(`code`,{className:`text-neutral-3 bg-neutral-9/50 px-1 rounded`,children:`GITHUB_WEBHOOK_SECRET`})]})]}),(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsxs)(`span`,{className:`text-primary-6 font-semibold shrink-0`,children:[!L||!L.checks.config.ok?`5`:`4`,`.`]}),(0,K.jsxs)(`span`,{children:[`Under `,(0,K.jsx)(`strong`,{className:`text-neutral-3`,children:`“Which events?”`}),`, select `,(0,K.jsx)(`strong`,{className:`text-neutral-3`,children:`Let me select individual events`}),` and check `,(0,K.jsx)(`strong`,{className:`text-neutral-3`,children:`Workflow runs`}),` and `,(0,K.jsx)(`strong`,{className:`text-neutral-3`,children:`Pull requests`})]})]}),(0,K.jsxs)(`p`,{className:`text-[13px] text-neutral-6 pt-1 border-t border-neutral-9/50`,children:[`Webhook events will automatically spawn `,(0,K.jsx)(Qt,{size:12,className:`inline -mt-0.5`}),` sessions for PR reviews and CI failure analysis.`]})]}),O.length>0&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`button`,{onClick:()=>N(!M),className:`flex items-center gap-1.5 text-[13px] text-primary-6 hover:text-primary-5 transition-colors`,children:[M?(0,K.jsx)(_t,{size:14}):(0,K.jsx)(yt,{size:14}),`Recent events (`,O.length,`)`]}),M&&(0,K.jsx)(`div`,{className:`mt-2 rounded border border-neutral-9 bg-neutral-10/50 divide-y divide-neutral-9/50 max-h-48 overflow-y-auto`,children:O.slice(0,10).map(e=>(0,K.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-[12px]`,children:[(0,K.jsx)(Qt,{size:13,className:`text-neutral-6 shrink-0`}),(0,K.jsx)(`span`,{className:`text-neutral-3 font-mono truncate flex-1`,children:e.repo}),(0,K.jsx)(`span`,{className:`text-neutral-5 truncate max-w-24`,children:e.workflow}),(0,K.jsx)(bn,{status:e.status})]},e.id))})]}),E&&!E.enabled&&!L&&(0,K.jsxs)(`p`,{className:`mt-3 text-[13px] text-neutral-6`,children:[`Set `,(0,K.jsx)(`code`,{className:`bg-neutral-9/50 px-1 rounded text-neutral-4`,children:`GITHUB_WEBHOOK_ENABLED=true`}),` and `,(0,K.jsx)(`code`,{className:`bg-neutral-9/50 px-1 rounded text-neutral-4`,children:`GITHUB_WEBHOOK_SECRET`}),` on the server to enable.`]})]})]}),(0,K.jsxs)(`div`,{className:`flex-shrink-0 px-6 py-4 border-t border-neutral-10 flex items-center justify-between`,children:[(0,K.jsx)(`div`,{children:w&&(0,K.jsx)(`p`,{className:`text-[13px] text-error-5`,children:w})}),(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[n.token&&(0,K.jsx)(`button`,{onClick:t,className:`rounded px-4 py-2 text-[15px] text-neutral-6 hover:text-neutral-2`,children:`Cancel`}),(0,K.jsx)(`button`,{onClick:De,disabled:!l.trim(),className:`rounded bg-primary-8 px-4 py-2 text-[15px] font-medium text-neutral-1 hover:bg-primary-7 disabled:opacity-50`,children:`Save`})]})]})]})})}function Sn({size:e=24,className:t=``}){return(0,K.jsxs)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:e,height:e,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`,className:t,children:[(0,K.jsx)(`circle`,{cx:`12`,cy:`12`,r:`2.5`}),(0,K.jsx)(`circle`,{cx:`12`,cy:`12`,r:`0.75`,fill:`currentColor`,stroke:`none`}),(0,K.jsx)(`path`,{d:`M8 20.1a9 9 0 0 1 -5 -7.1`}),(0,K.jsx)(`path`,{d:`M16 20.1a9 9 0 0 0 5 -7.1`}),(0,K.jsx)(`path`,{d:`M6.2 5a9 9 0 0 1 11.4 0`}),(0,K.jsx)(`circle`,{cx:`12`,cy:`21`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,K.jsx)(`circle`,{cx:`3`,cy:`9`,r:`1`,fill:`currentColor`,stroke:`none`}),(0,K.jsx)(`circle`,{cx:`21`,cy:`9`,r:`1`,fill:`currentColor`,stroke:`none`})]})}function Cn({groups:e,selectedId:t,onSelect:n,cloningId:r,maxHeight:i=`240px`,autoFocus:a}){let[o,s]=(0,v.useState)(``),c=(0,v.useRef)(null);(0,v.useEffect)(()=>{a&&c.current?.focus()},[a]);let l=o.trim()?e.map(e=>({...e,repos:e.repos.filter(e=>e.name.toLowerCase().includes(o.toLowerCase())||e.description?.toLowerCase().includes(o.toLowerCase()))})).filter(e=>e.repos.length>0):e;return e.reduce((e,t)=>e+t.repos.length,0)===0?(0,K.jsx)(`p`,{className:`text-center text-[15px] text-neutral-6 py-2`,children:`No repositories available`}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`input`,{ref:c,type:`text`,value:o,onChange:e=>s(e.target.value),placeholder:`Search repos…`,className:`mb-2 w-full rounded-lg border border-neutral-7 bg-neutral-11/50 px-3 py-2 text-[15px] text-neutral-2 placeholder-neutral-5 focus:border-accent-6 focus:outline-none`}),(0,K.jsx)(`div`,{className:`overflow-y-auto rounded-lg border border-neutral-7 bg-neutral-11/50`,style:{maxHeight:i},children:l.length===0?(0,K.jsx)(`p`,{className:`px-3 py-3 text-[13px] text-neutral-5 text-center`,children:`No matching repos`}):l.map(e=>(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`div`,{className:`sticky top-0 z-10 bg-neutral-8 backdrop-blur-sm px-3 py-1.5 text-[13px] font-medium uppercase tracking-wider text-neutral-4 border-b border-neutral-7`,children:e.owner}),e.repos.map(e=>{let i=r===e.id,a=t===e.id;return(0,K.jsxs)(`button`,{type:`button`,onClick:()=>n(e),disabled:!!r,className:`group flex w-full items-start gap-3 border-b border-neutral-7/50 px-3 py-2.5 text-left transition last:border-b-0 ${a?`bg-accent-9/20 border-l-2 border-l-accent-6`:r?`cursor-wait opacity-60`:`hover:bg-neutral-7/20`}`,children:[(0,K.jsx)(`div`,{className:`mt-0.5 flex-shrink-0 text-neutral-4 group-hover:text-neutral-3 transition-colors`,children:e.cloned?(0,K.jsx)(Nt,{size:16,stroke:1.5}):(0,K.jsx)(Ct,{size:16,stroke:1.5})}),(0,K.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`span`,{className:`text-[15px] font-medium text-neutral-2 group-hover:text-neutral-1 transition-colors truncate`,children:e.name}),i&&(0,K.jsx)(`span`,{className:`flex-shrink-0 rounded bg-primary-9/30 px-1.5 py-0.5 text-[13px] text-primary-4 animate-pulse`,children:`cloning...`}),!e.cloned&&!i&&(0,K.jsx)(`span`,{className:`flex-shrink-0 rounded border border-neutral-6 bg-neutral-8/50 px-1.5 py-0.5 text-[13px] text-neutral-3`,children:`remote`})]}),e.description&&(0,K.jsx)(`div`,{className:`mt-0.5 text-[13px] text-neutral-6 truncate`,children:e.description})]})]},e.id)})]},e.owner))})]})}function wn({groups:e,token:t,onOpen:n}){let[r,i]=(0,v.useState)(!1),[a,o]=(0,v.useState)(null),s=(0,v.useRef)(null),c=(0,v.useRef)(null);(0,v.useLayoutEffect)(()=>{if(!r||!s.current||!c.current)return;let e=s.current.getBoundingClientRect(),t=c.current,n=e.bottom+6,i=Math.max(8,Math.min(e.right-288,window.innerWidth-288-8));t.style.top=`${n}px`,t.style.left=`${i}px`},[r]),(0,v.useEffect)(()=>{if(!r)return;function e(e){e.key===`Escape`&&i(!1)}function t(e){let t=e.target;s.current&&!s.current.contains(t)&&c.current&&!c.current.contains(t)&&i(!1)}return document.addEventListener(`keydown`,e),document.addEventListener(`mousedown`,t),()=>{document.removeEventListener(`keydown`,e),document.removeEventListener(`mousedown`,t)}},[r]);async function l(e){if(!a){if(!e.cloned){o(e.id);try{let n={"Content-Type":`application/json`};t&&(n.Authorization=`Bearer ${t}`);let r=await fetch(`/cc/api/clone`,{method:`POST`,headers:n,body:JSON.stringify({owner:e.owner,name:e.name})});if(!r.ok){let e=await r.json();throw Error(e.error||`Clone failed`)}e.cloned=!0}catch{o(null);return}o(null)}i(!1),n(e)}}return(0,K.jsxs)(`div`,{ref:s,className:`relative h-full flex items-center`,children:[(0,K.jsx)(`button`,{onClick:()=>i(!r),className:`app-new-session-btn rounded p-1.5 transition ${r?`bg-neutral-6 text-neutral-1`:`text-neutral-3 hover:bg-neutral-6 hover:text-neutral-1`}`,title:`New session`,children:(0,K.jsx)(Yt,{size:16,stroke:2})}),r&&(0,K.jsxs)(`div`,{ref:c,className:`fixed z-50 w-72 rounded-md border border-neutral-10 bg-neutral-12 shadow-lg`,children:[(0,K.jsxs)(`div`,{className:`px-3 pt-3 pb-1`,children:[(0,K.jsx)(`h3`,{className:`text-[15px] font-medium text-neutral-3`,children:`New Session`}),(0,K.jsx)(`p`,{className:`mt-0.5 text-[13px] text-neutral-6`,children:`Choose a repository to work on`})]}),(0,K.jsx)(`div`,{className:`px-2 pb-2`,children:(0,K.jsx)(Cn,{groups:e,onSelect:l,cloningId:a,maxHeight:`240px`,autoFocus:!0})})]})]})}function Tn({token:e,workingDir:t,visible:n}){let[r,i]=(0,v.useState)(null),[a,o]=(0,v.useState)(!1),[s,c]=(0,v.useState)(!1);if((0,v.useEffect)(()=>{if(!n||!t||!e)return;let r=!1;return o(!0),c(!1),V(e,t).then(e=>{r||i(e)}).catch(()=>{r||(i(null),c(!0))}).finally(()=>{r||o(!1)}),()=>{r=!0}},[n,t,e]),!n)return null;async function l(n){if(!(!t||!e))try{await H(e,t,n),i(await V(e,t))}catch{V(e,t).then(i).catch(()=>{})}}async function u(n){if(!(!t||!e||n.length===0))try{await te(e,t,n),i(await V(e,t))}catch{V(e,t).then(i).catch(()=>{})}}if(!t)return(0,K.jsx)(`div`,{className:`border-t border-neutral-8/30 px-3 py-3`,children:(0,K.jsx)(`p`,{className:`text-[13px] text-neutral-5`,children:`Select a session to manage approvals.`})});if(a)return(0,K.jsx)(`div`,{className:`border-t border-neutral-8/30 px-3 py-3`,children:(0,K.jsx)(`p`,{className:`text-[13px] text-neutral-5`,children:`Loading...`})});if(s||!r)return(0,K.jsx)(`div`,{className:`border-t border-neutral-8/30 px-3 py-3`,children:(0,K.jsx)(`p`,{className:`text-[13px] text-neutral-5`,children:`Could not load approvals.`})});let d=t.split(`/`).pop()||t;return(0,K.jsx)(`div`,{className:`border-t border-neutral-8/30 flex flex-col min-h-0`,children:(0,K.jsxs)(`div`,{className:`ml-3 border-l border-neutral-7/30 flex flex-col min-h-0`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-1.5 flex-shrink-0`,children:[(0,K.jsx)(`span`,{className:`text-[13px] font-medium text-neutral-5 uppercase tracking-wider flex-shrink-0`,children:`Approvals`}),(0,K.jsx)(`span`,{className:`text-[12px] font-mono text-neutral-6 truncate`,title:t,children:d})]}),(0,K.jsx)(En,{approvals:r,onRemove:l,onRevokeMultiple:u})]})})}function En({approvals:e,onRemove:t,onRevokeMultiple:n}){let[r,i]=(0,v.useState)(new Set([`__tools__`,`__commands__`,`__patterns__`])),a=e.tools.length+e.commands.length+e.patterns.length,o=a===0;function s(e){i(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}let c=(0,v.useMemo)(()=>[...e.tools].sort(),[e.tools]),l=(0,v.useMemo)(()=>[...e.patterns??[]].sort(),[e.patterns]),u=(0,v.useMemo)(()=>Dn(e.commands),[e.commands]),d=Object.entries(u),f=c.length>0,p=l.length>0,m=d.length>0;return(0,K.jsxs)(K.Fragment,{children:[!o&&(0,K.jsx)(`div`,{className:`flex-shrink-0 px-3 pb-1.5`,children:(0,K.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,K.jsxs)(`span`,{className:`text-[13px] text-neutral-5`,children:[a,` rule`,a===1?``:`s`]}),(0,K.jsx)(`button`,{onClick:()=>{let t=[...e.tools.map(e=>({tool:e})),...e.commands.map(e=>({command:e})),...(e.patterns??[]).map(e=>({pattern:e}))];confirm(`Revoke all ${a} approval rules?`)&&n(t)},className:`text-[13px] text-neutral-5 hover:text-error-5 transition-colors`,children:`Revoke All`})]})}),(0,K.jsxs)(`div`,{className:`overflow-y-auto min-h-0 flex-1 px-2 py-1 approvals-scroll`,children:[!f&&!p&&!m&&(0,K.jsx)(`p`,{className:`text-[13px] text-neutral-6 py-2 text-center`,children:`No auto-approval rules yet.`}),(0,K.jsxs)(`div`,{className:`space-y-2`,children:[p&&(0,K.jsx)(On,{title:`Patterns`,count:l.length,collapsed:r.has(`__patterns__`),onToggle:()=>{s(`__patterns__`)},onRevokeAll:()=>{confirm(`Revoke all ${l.length} pattern approvals?`)&&n(l.map(e=>({pattern:e})))},children:(0,K.jsx)(`ul`,{className:`space-y-0.5`,children:l.map(e=>(0,K.jsxs)(`li`,{className:`group flex items-center justify-between rounded-md px-2 py-1 text-[13px] text-neutral-3 hover:bg-neutral-6/50 hover:text-neutral-1 transition-colors`,children:[(0,K.jsx)(`code`,{className:`truncate font-mono`,children:e}),(0,K.jsx)(`button`,{onClick:()=>{t({pattern:e})},className:`ml-2 flex-shrink-0 text-neutral-5 opacity-0 group-hover:opacity-100 hover:text-error-5 transition-all`,children:`×`})]},e))})}),f&&(0,K.jsx)(On,{title:`Tools`,count:c.length,collapsed:r.has(`__tools__`),onToggle:()=>{s(`__tools__`)},onRevokeAll:()=>{confirm(`Revoke all ${c.length} tool approvals?`)&&n(c.map(e=>({tool:e})))},children:(0,K.jsx)(`ul`,{className:`space-y-0.5`,children:c.map(e=>(0,K.jsxs)(`li`,{className:`group flex items-center justify-between rounded-md px-2 py-1 text-[13px] text-neutral-3 hover:bg-neutral-6/50 hover:text-neutral-1 transition-colors`,children:[(0,K.jsx)(`span`,{className:`truncate`,children:e}),(0,K.jsx)(`button`,{onClick:()=>{t({tool:e})},className:`ml-2 flex-shrink-0 text-neutral-5 opacity-0 group-hover:opacity-100 hover:text-error-5 transition-all`,children:`×`})]},e))})}),m&&(0,K.jsx)(On,{title:`Commands`,count:e.commands.length,collapsed:r.has(`__commands__`),onToggle:()=>{s(`__commands__`)},onRevokeAll:()=>{let t=e.commands;confirm(`Revoke all ${t.length} command approvals?`)&&n(t.map(e=>({command:e})))},children:(0,K.jsx)(`div`,{className:`space-y-1.5`,children:d.map(([e,i])=>(0,K.jsx)(kn,{prefix:e,commands:i,collapsed:r.has(`cmd:${e}`),onToggle:()=>{s(`cmd:${e}`)},onRemove:e=>{t({command:e})},onRevokeAll:()=>{confirm(`Revoke all ${i.length} "${e}" approvals?`)&&n(i.map(e=>({command:e})))}},e))})})]})]})]})}function Dn(e){let t={};for(let n of e){let e=n.split(/\s+/)[0]||`other`;t[e]||(t[e]=[]),t[e].push(n)}let n={};for(let e of Object.keys(t).sort())n[e]=t[e].sort();return n}function On({title:e,count:t,collapsed:n,onToggle:r,onRevokeAll:i,children:a}){return(0,K.jsxs)(`div`,{children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between mb-1`,children:[(0,K.jsxs)(`button`,{onClick:r,className:`flex items-center gap-1.5 text-[15px] text-neutral-4 hover:text-neutral-2 transition-colors`,children:[(0,K.jsx)(`svg`,{className:`w-2.5 h-2.5 transition-transform flex-shrink-0 ${n?``:`rotate-90`}`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,K.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9 5l7 7-7 7`})}),(0,K.jsx)(`span`,{className:`font-medium`,children:e}),(0,K.jsx)(`span`,{className:`text-[13px] text-neutral-5`,children:t})]}),!n&&t>1&&(0,K.jsx)(`button`,{onClick:i,className:`text-[13px] text-neutral-5 hover:text-error-5 transition-colors`,children:`revoke all`})]}),!n&&a]})}function kn({prefix:e,commands:t,collapsed:n,onToggle:r,onRemove:i,onRevokeAll:a}){return t.length===1?(0,K.jsxs)(`div`,{className:`group flex items-center justify-between rounded-md px-2 py-1 hover:bg-neutral-6/50 transition-colors`,children:[(0,K.jsxs)(`code`,{className:`truncate font-mono text-[13px] text-neutral-3`,title:t[0],children:[`$ `,t[0]]}),(0,K.jsx)(`button`,{onClick:()=>{i(t[0])},className:`ml-2 flex-shrink-0 text-neutral-5 opacity-0 group-hover:opacity-100 hover:text-error-5 transition-all`,children:`×`})]}):(0,K.jsxs)(`div`,{className:`rounded-md overflow-hidden`,children:[(0,K.jsxs)(`div`,{className:`flex items-center justify-between px-2 py-0.5`,children:[(0,K.jsxs)(`button`,{onClick:r,className:`flex items-center gap-1 text-[13px] text-neutral-4 hover:text-neutral-2 transition-colors`,children:[(0,K.jsx)(`svg`,{className:`w-2 h-2 transition-transform flex-shrink-0 ${n?``:`rotate-90`}`,fill:`none`,viewBox:`0 0 24 24`,stroke:`currentColor`,strokeWidth:2.5,children:(0,K.jsx)(`path`,{strokeLinecap:`round`,strokeLinejoin:`round`,d:`M9 5l7 7-7 7`})}),(0,K.jsx)(`code`,{className:`font-mono font-medium`,children:e}),(0,K.jsx)(`span`,{className:`text-[13px] text-neutral-5`,children:t.length})]}),!n&&(0,K.jsx)(`button`,{onClick:a,className:`text-[13px] text-neutral-5 hover:text-error-5 transition-colors`,children:`revoke all`})]}),!n&&(0,K.jsx)(`ul`,{className:`pl-3`,children:t.map(e=>(0,K.jsxs)(`li`,{className:`group flex items-center justify-between rounded-md px-2 py-1 hover:bg-neutral-6/50 transition-colors`,children:[(0,K.jsxs)(`code`,{className:`truncate font-mono text-[13px] text-neutral-3`,title:e,children:[`$ `,e]}),(0,K.jsx)(`button`,{onClick:()=>{i(e)},className:`ml-2 flex-shrink-0 text-neutral-5 opacity-0 group-hover:opacity-100 hover:text-error-5 transition-all`,children:`×`})]},e))})]})}function An({files:e,loading:t,starredDocs:n,onSelect:r,onClose:i}){let[a,o]=(0,v.useState)(``),s=(0,v.useRef)(null);(0,v.useEffect)(()=>{function e(e){e.key===`Escape`&&i()}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[i]);let c=new Set(n),l=a.trim()?e.filter(e=>e.path.toLowerCase().includes(a.toLowerCase())):e,u=l.filter(e=>c.has(e.path)),d=l.filter(e=>e.pinned&&!c.has(e.path)),f=l.filter(e=>!e.pinned&&!c.has(e.path)),p=(u.length>0?1:0)+(d.length>0?1:0)+(f.length>0?1:0)>1;return(0,K.jsx)(`div`,{ref:s,className:`mt-1 border-t border-neutral-8/30 pt-1`,children:t?(0,K.jsx)(`div`,{className:`flex items-center justify-center py-3`,children:(0,K.jsx)(Ft,{size:14,className:`animate-spin text-neutral-5`})}):e.length===0?(0,K.jsx)(`div`,{className:`pl-10 pr-2 py-1 text-[13px] text-neutral-5`,children:`No markdown files found`}):(0,K.jsxs)(K.Fragment,{children:[e.length>5&&(0,K.jsx)(`div`,{className:`px-2 pb-1`,children:(0,K.jsx)(`input`,{type:`text`,value:a,onChange:e=>o(e.target.value),placeholder:`Filter docs...`,autoFocus:!0,className:`w-full rounded border border-neutral-7 bg-neutral-10/50 px-2 py-1 text-[13px] text-neutral-2 placeholder-neutral-5 focus:border-accent-6 focus:outline-none`})}),(0,K.jsx)(`div`,{className:`overflow-y-auto`,style:{maxHeight:`320px`},children:l.length===0?(0,K.jsx)(`div`,{className:`pl-10 pr-2 py-1 text-[13px] text-neutral-5`,children:`No matching files`}):(0,K.jsxs)(K.Fragment,{children:[u.map(e=>(0,K.jsxs)(`button`,{onClick:()=>r(e.path),className:`group w-full flex items-center gap-2 pl-10 pr-2 py-1 text-left text-[15px] text-neutral-2 font-medium hover:bg-neutral-6/50 hover:text-neutral-1 transition-colors cursor-pointer rounded-md`,children:[(0,K.jsx)(hn,{size:13,className:`flex-shrink-0 text-primary-5`}),(0,K.jsx)(`span`,{className:`flex-1 truncate`,children:e.path})]},e.path)),u.length>0&&p&&(0,K.jsx)(`div`,{className:`border-t border-neutral-8/30 my-0.5 mx-10`}),d.map(e=>(0,K.jsxs)(`button`,{onClick:()=>r(e.path),className:`group w-full flex items-center gap-2 pl-10 pr-2 py-1 text-left text-[15px] text-neutral-2 font-medium hover:bg-neutral-6/50 hover:text-neutral-1 transition-colors cursor-pointer rounded-md`,children:[(0,K.jsx)(kt,{size:13,className:`flex-shrink-0 text-neutral-5`}),(0,K.jsx)(`span`,{className:`flex-1 truncate`,children:e.path})]},e.path)),d.length>0&&f.length>0&&(0,K.jsx)(`div`,{className:`border-t border-neutral-8/30 my-0.5 mx-10`}),f.map(e=>(0,K.jsxs)(`button`,{onClick:()=>r(e.path),className:`group w-full flex items-center gap-2 pl-10 pr-2 py-1 text-left text-[15px] text-neutral-4 hover:bg-neutral-6/50 hover:text-neutral-2 transition-colors cursor-pointer rounded-md`,children:[(0,K.jsx)(kt,{size:13,className:`flex-shrink-0 text-neutral-6`}),(0,K.jsx)(`span`,{className:`flex-1 truncate`,children:e.path})]},e.path))]})})]})})}var jn=5;function Mn({session:e}){return e.worktreePath?(0,K.jsx)(`span`,{title:`Worktree: ${e.worktreePath.split(`/`).pop()??e.worktreePath}`,className:`flex-shrink-0 text-primary-6`,children:(0,K.jsx)(Nt,{size:12,stroke:2})}):null}function Nn(e){let t=e.name||e.id.slice(0,8);return t.startsWith(`hub:`)?`new session`:t}function Pn(e){let t=e.name||e.id.slice(0,8);return t.startsWith(`hub:`)?`unnamed session`:t}function Fn(e){let t=Math.floor((Date.now()-new Date(e).getTime())/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);if(n<60)return`${n}m`;let r=Math.floor(n/60);return r<24?`${r}h`:`${Math.floor(r/24)}d`}function In(e){return!e.includes(`T`)&&!e.includes(`Z`)&&!e.includes(`+`)?new Date(e.replace(` `,`T`)+`Z`):new Date(e)}function Ln(e){let t=Math.floor((Date.now()-In(e).getTime())/1e3);if(t<60)return`${t}s`;let n=Math.floor(t/60);if(n<60)return`${n}m`;let r=Math.floor(n/60);return r<24?`${r}h`:`${Math.floor(r/24)}d`}function Rn({node:e,isActive:t,activeSessionId:n,waitingSessions:r,tentativeQueues:i,token:a,archiveRefreshKey:o,onSelectSession:s,onDeleteSession:c,onRenameSession:l,onNewSession:u,onSelectRepo:d,onDeleteRepo:f,onViewArchivedSession:p,onBrowseDocs:m,docsPickerOpen:h,docsPickerRepoDir:g,docsPickerFiles:_,docsPickerLoading:y,onDocsPickerSelect:b,onDocsPickerClose:x,docsStarredDocs:S,isMobile:C}){let[w,T]=(0,v.useState)(t||!!C),[E,D]=(0,v.useState)(!1),[O,k]=(0,v.useState)(!1),[A,j]=(0,v.useState)(!1),[M,N]=(0,v.useState)([]),[P,F]=(0,v.useState)(null),[I,L]=(0,v.useState)(``);(0,v.useEffect)(()=>{t&&T(!0)},[t]),(0,v.useEffect)(()=>{!O||!a||ne(a,e.workingDir).then(N).catch(()=>{})},[O,a,e.workingDir,o]);let[R,z]=e.hasTentative?[`bg-accent-6 animate-pulse`,`Queued`]:e.hasWaiting?[`bg-warning-5 animate-pulse`,`Waiting for input`]:e.hasActive?[`bg-success-6 animate-pulse`,`Processing`]:[`bg-neutral-6`,`Idle`],ee=A?M:M.slice(0,jn),B=M.length>jn,V=e=>{F(e.id),L(Nn(e))},H=()=>{P&&I.trim()&&l(P,I.trim()),F(null)};return(0,K.jsxs)(`div`,{className:`group/repo`,children:[(0,K.jsxs)(`div`,{className:`group flex items-center gap-1.5 px-2 py-1`,children:[(0,K.jsxs)(`button`,{onClick:()=>{T(!w),t||d(e.workingDir)},className:`flex flex-1 items-center gap-2 min-w-0 rounded px-2 py-0.5 text-left transition-colors text-neutral-3 hover:text-neutral-2`,children:[w?(0,K.jsx)(_t,{size:14,stroke:2.5,className:`flex-shrink-0 text-neutral-5 opacity-0 group-hover/repo:opacity-100 transition-opacity`}):(0,K.jsx)(yt,{size:14,stroke:2.5,className:`flex-shrink-0 text-neutral-5 opacity-0 group-hover/repo:opacity-100 transition-opacity`}),(0,K.jsx)(`span`,{className:`inline-block h-1.5 w-1.5 rounded-full flex-shrink-0 ${R}`,title:z}),(0,K.jsx)(`span`,{className:`truncate font-semibold tracking-wide ${C?`text-[17px]`:`text-[15px]`}`,children:e.displayName}),!w&&e.sessions.length>1&&(0,K.jsxs)(`span`,{className:`text-[12px] text-neutral-6 flex-shrink-0`,children:[`(`,e.sessions.length,`)`]})]}),m&&(0,K.jsx)(`button`,{onClick:t=>{t.stopPropagation(),m(e.workingDir)},className:`flex-shrink-0 rounded p-0.5 transition-colors opacity-0 group-hover:opacity-100 ${h&&g===e.workingDir?`text-primary-5 opacity-100!`:`text-neutral-5 hover:text-neutral-2`}`,title:`Browse docs`,children:(0,K.jsx)(kt,{size:14,stroke:2})}),(0,K.jsx)(`button`,{onClick:()=>D(!E),className:`flex-shrink-0 rounded p-0.5 transition-colors opacity-0 group-hover:opacity-100 ${E?`text-primary-5 opacity-100!`:`text-neutral-5 hover:text-neutral-2`}`,title:`Repo approvals`,children:(0,K.jsx)(nn,{size:16,stroke:2})}),(0,K.jsx)(`button`,{onClick:()=>k(!O),className:`flex-shrink-0 rounded p-0.5 transition-colors opacity-0 group-hover:opacity-100 ${O?`text-primary-5 opacity-100!`:`text-neutral-5 hover:text-neutral-2`}`,title:`Archived sessions`,children:(0,K.jsx)(st,{size:16,stroke:2})}),(0,K.jsx)(`span`,{onClick:t=>{t.stopPropagation(),f(e.workingDir)},className:`cursor-pointer text-[15px] text-transparent hover:text-error-5 group-hover:text-neutral-6 flex-shrink-0 px-0.5`,children:`×`})]}),w&&(0,K.jsxs)(`div`,{className:`px-2 pb-1`,children:[e.sessions.map(e=>{let t=e.id===n,[a,o]=(i[e.id]?.length??0)>0?[`bg-accent-6 animate-pulse`,`Queued`]:r[e.id]?[`bg-warning-5 animate-pulse`,`Waiting for input`]:e.isProcessing?[`bg-success-6 animate-pulse`,`Processing`]:e.active?[`bg-neutral-5`,`Idle`]:[`bg-neutral-7`,`Inactive`],l=P===e.id;return(0,K.jsxs)(`div`,{onClick:()=>{l||s(e.id)},className:`group w-full flex items-baseline gap-2 pl-10 pr-2 py-1 text-left ${C?`text-[17px]`:`text-[15px]`} transition-colors rounded-md cursor-pointer ${t?`bg-accent-9/30 text-accent-2`:`text-neutral-3 hover:bg-neutral-6/50 hover:text-neutral-1`}`,children:[e.source===`workflow`?(0,K.jsx)(rn,{size:12,className:`flex-shrink-0 self-center ${a.replace(/bg-/g,`text-`)}`,title:o}):e.source===`webhook`?(0,K.jsx)(Qt,{size:12,className:`flex-shrink-0 self-center ${a.replace(/bg-/g,`text-`)}`,title:o}):e.source===`orchestrator`||e.source===`agent`?(0,K.jsx)(Zt,{size:12,className:`flex-shrink-0 self-center ${a.replace(/bg-/g,`text-`)}`,title:o}):(0,K.jsx)(`span`,{className:`inline-flex items-center justify-center w-[12px] flex-shrink-0 self-center`,title:o,children:(0,K.jsx)(`span`,{className:`inline-block h-1.5 w-1.5 rounded-full ${a}`})}),l?(0,K.jsx)(`input`,{autoFocus:!0,value:I,onChange:e=>L(e.target.value),onBlur:H,onKeyDown:e=>{e.key===`Enter`&&H(),e.key===`Escape`&&F(null)},onClick:e=>e.stopPropagation(),className:`flex-1 min-w-0 bg-neutral-10 border border-neutral-7 rounded px-1 py-0 text-[15px] text-neutral-1 outline-none focus:border-primary-6`}):(0,K.jsxs)(`span`,{className:`flex-1 truncate font-normal flex items-center gap-1`,children:[(0,K.jsx)(Mn,{session:e}),e.provider===`opencode`&&(0,K.jsx)(`span`,{title:`OpenCode session`,className:`text-[10px] px-1 py-0 rounded bg-neutral-7 text-neutral-4 font-medium leading-tight`,children:`OC`}),Nn(e)]}),!l&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`span`,{className:`text-[13px] text-neutral-6 tabular-nums flex-shrink-0`,children:Fn(e.created)}),(0,K.jsx)(`span`,{onClick:t=>{t.stopPropagation(),V(e)},className:`cursor-pointer flex-shrink-0 text-transparent group-hover:text-neutral-5 hover:text-neutral-2! transition-colors`,title:`Rename session`,children:(0,K.jsx)(Wt,{size:13,stroke:2})}),(0,K.jsx)(`span`,{onClick:t=>{t.stopPropagation(),c(e.id)},className:`cursor-pointer text-[15px] text-transparent hover:text-error-5 group-hover:text-neutral-6 flex-shrink-0`,children:`×`})]})]},e.id)}),u&&(0,K.jsxs)(`div`,{className:`pl-10 flex gap-1 ${C?`opacity-100`:`opacity-0 group-hover/repo:opacity-100`}`,children:[(0,K.jsxs)(`button`,{onClick:()=>u(`claude`),className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-md text-[13px] text-neutral-5 hover:text-neutral-2 hover:bg-neutral-6/50 transition-colors`,children:[(0,K.jsx)(Yt,{size:12,stroke:2,className:`flex-shrink-0`}),(0,K.jsx)(`span`,{children:`Claude`})]}),(0,K.jsxs)(`button`,{onClick:()=>u(`opencode`),className:`inline-flex items-center gap-1.5 px-2 py-0.5 rounded-md text-[13px] text-neutral-5 hover:text-neutral-2 hover:bg-neutral-6/50 transition-colors`,children:[(0,K.jsx)(Yt,{size:12,stroke:2,className:`flex-shrink-0`}),(0,K.jsx)(`span`,{children:`OpenCode`})]})]}),h&&g===e.workingDir&&b&&x&&(0,K.jsx)(An,{files:_??[],loading:y??!1,starredDocs:S??[],onSelect:b,onClose:x}),E&&(0,K.jsx)(`div`,{className:`mt-1 border-t border-neutral-8/30`,children:(0,K.jsx)(Tn,{token:a,workingDir:e.workingDir,visible:E})}),O&&(0,K.jsx)(`div`,{className:`mt-1 border-t border-neutral-8/30 pt-1`,children:M.length===0?(0,K.jsx)(`div`,{className:`pl-12 pr-2 py-1 text-[13px] text-neutral-5`,children:`No archived sessions`}):(0,K.jsxs)(K.Fragment,{children:[ee.map(e=>(0,K.jsxs)(`button`,{onClick:()=>p(e.id),className:`group w-full flex items-baseline gap-2 pl-12 pr-2 py-0.5 text-left text-[15px] text-neutral-4 hover:bg-neutral-6/50 hover:text-neutral-2 transition-colors`,children:[(0,K.jsx)(st,{size:12,className:`flex-shrink-0 self-center opacity-40`}),(0,K.jsx)(`span`,{className:`flex-1 truncate`,children:Pn(e)}),(0,K.jsx)(`span`,{className:`shrink-0 text-[13px] text-neutral-6 tabular-nums`,children:Ln(e.archivedAt)})]},e.id)),B&&!A&&(0,K.jsxs)(`button`,{onClick:()=>j(!0),className:`w-full pl-12 pr-2 py-0.5 text-left text-[13px] text-neutral-5 hover:text-neutral-2 transition-colors`,children:[`Show all `,M.length,` archived...`]}),A&&B&&(0,K.jsx)(`button`,{onClick:()=>j(!1),className:`w-full pl-12 pr-2 py-0.5 text-left text-[13px] text-neutral-5 hover:text-neutral-2 transition-colors`,children:`Show less`})]})})]})]})}function zn(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var Bn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Vn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Hn={};function Un(e,t){return((t||Hn).jsx?Vn:Bn).test(e)}var Wn=/[ \t\n\f\r]/g;function Gn(e){return typeof e==`object`?e.type===`text`?Kn(e.value):!1:Kn(e)}function Kn(e){return e.replace(Wn,``)===``}var qn=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};qn.prototype.normal={},qn.prototype.property={},qn.prototype.space=void 0;function Jn(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new qn(n,r,t)}function Yn(e){return e.toLowerCase()}var Xn=class{constructor(e,t){this.attribute=t,this.property=e}};Xn.prototype.attribute=``,Xn.prototype.booleanish=!1,Xn.prototype.boolean=!1,Xn.prototype.commaOrSpaceSeparated=!1,Xn.prototype.commaSeparated=!1,Xn.prototype.defined=!1,Xn.prototype.mustUseProperty=!1,Xn.prototype.number=!1,Xn.prototype.overloadedBoolean=!1,Xn.prototype.property=``,Xn.prototype.spaceSeparated=!1,Xn.prototype.space=void 0;var Zn=s({boolean:()=>q,booleanish:()=>$n,commaOrSpaceSeparated:()=>rr,commaSeparated:()=>nr,number:()=>J,overloadedBoolean:()=>er,spaceSeparated:()=>tr}),Qn=0,q=ir(),$n=ir(),er=ir(),J=ir(),tr=ir(),nr=ir(),rr=ir();function ir(){return 2**++Qn}var ar=Object.keys(Zn),or=class extends Xn{constructor(e,t,n,r){let i=-1;if(super(e,t),sr(this,`space`,r),typeof n==`number`)for(;++i<ar.length;){let e=ar[i];sr(this,ar[i],(n&Zn[e])===Zn[e])}}};or.prototype.defined=!0;function sr(e,t,n){n&&(e[t]=n)}function cr(e){let t={},n={};for(let[r,i]of Object.entries(e.properties)){let a=new or(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Yn(r)]=r,n[Yn(a.attribute)]=r}return new qn(t,n,e.space)}var lr=cr({properties:{ariaActiveDescendant:null,ariaAtomic:$n,ariaAutoComplete:null,ariaBusy:$n,ariaChecked:$n,ariaColCount:J,ariaColIndex:J,ariaColSpan:J,ariaControls:tr,ariaCurrent:null,ariaDescribedBy:tr,ariaDetails:null,ariaDisabled:$n,ariaDropEffect:tr,ariaErrorMessage:null,ariaExpanded:$n,ariaFlowTo:tr,ariaGrabbed:$n,ariaHasPopup:null,ariaHidden:$n,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:tr,ariaLevel:J,ariaLive:null,ariaModal:$n,ariaMultiLine:$n,ariaMultiSelectable:$n,ariaOrientation:null,ariaOwns:tr,ariaPlaceholder:null,ariaPosInSet:J,ariaPressed:$n,ariaReadOnly:$n,ariaRelevant:null,ariaRequired:$n,ariaRoleDescription:tr,ariaRowCount:J,ariaRowIndex:J,ariaRowSpan:J,ariaSelected:$n,ariaSetSize:J,ariaSort:null,ariaValueMax:J,ariaValueMin:J,ariaValueNow:J,ariaValueText:null,role:null},transform(e,t){return t===`role`?t:`aria-`+t.slice(4).toLowerCase()}});function ur(e,t){return t in e?e[t]:t}function dr(e,t){return ur(e,t.toLowerCase())}var fr=cr({attributes:{acceptcharset:`accept-charset`,classname:`class`,htmlfor:`for`,httpequiv:`http-equiv`},mustUseProperty:[`checked`,`multiple`,`muted`,`selected`],properties:{abbr:null,accept:nr,acceptCharset:tr,accessKey:tr,action:null,allow:null,allowFullScreen:q,allowPaymentRequest:q,allowUserMedia:q,alt:null,as:null,async:q,autoCapitalize:null,autoComplete:tr,autoFocus:q,autoPlay:q,blocking:tr,capture:null,charSet:null,checked:q,cite:null,className:tr,cols:J,colSpan:null,content:null,contentEditable:$n,controls:q,controlsList:tr,coords:J|nr,crossOrigin:null,data:null,dateTime:null,decoding:null,default:q,defer:q,dir:null,dirName:null,disabled:q,download:er,draggable:$n,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:q,formTarget:null,headers:tr,height:J,hidden:er,high:J,href:null,hrefLang:null,htmlFor:tr,httpEquiv:tr,id:null,imageSizes:null,imageSrcSet:null,inert:q,inputMode:null,integrity:null,is:null,isMap:q,itemId:null,itemProp:tr,itemRef:tr,itemScope:q,itemType:tr,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:q,low:J,manifest:null,max:null,maxLength:J,media:null,method:null,min:null,minLength:J,multiple:q,muted:q,name:null,nonce:null,noModule:q,noValidate:q,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:q,optimum:J,pattern:null,ping:tr,placeholder:null,playsInline:q,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:q,referrerPolicy:null,rel:tr,required:q,reversed:q,rows:J,rowSpan:J,sandbox:tr,scope:null,scoped:q,seamless:q,selected:q,shadowRootClonable:q,shadowRootDelegatesFocus:q,shadowRootMode:null,shape:null,size:J,sizes:null,slot:null,span:J,spellCheck:$n,src:null,srcDoc:null,srcLang:null,srcSet:null,start:J,step:null,style:null,tabIndex:J,target:null,title:null,translate:null,type:null,typeMustMatch:q,useMap:null,value:$n,width:J,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:tr,axis:null,background:null,bgColor:null,border:J,borderColor:null,bottomMargin:J,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:q,declare:q,event:null,face:null,frame:null,frameBorder:null,hSpace:J,leftMargin:J,link:null,longDesc:null,lowSrc:null,marginHeight:J,marginWidth:J,noResize:q,noHref:q,noShade:q,noWrap:q,object:null,profile:null,prompt:null,rev:null,rightMargin:J,rules:null,scheme:null,scrolling:$n,standby:null,summary:null,text:null,topMargin:J,valueType:null,version:null,vAlign:null,vLink:null,vSpace:J,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:q,disableRemotePlayback:q,prefix:null,property:null,results:J,security:null,unselectable:null},space:`html`,transform:dr}),pr=cr({attributes:{accentHeight:`accent-height`,alignmentBaseline:`alignment-baseline`,arabicForm:`arabic-form`,baselineShift:`baseline-shift`,capHeight:`cap-height`,className:`class`,clipPath:`clip-path`,clipRule:`clip-rule`,colorInterpolation:`color-interpolation`,colorInterpolationFilters:`color-interpolation-filters`,colorProfile:`color-profile`,colorRendering:`color-rendering`,crossOrigin:`crossorigin`,dataType:`datatype`,dominantBaseline:`dominant-baseline`,enableBackground:`enable-background`,fillOpacity:`fill-opacity`,fillRule:`fill-rule`,floodColor:`flood-color`,floodOpacity:`flood-opacity`,fontFamily:`font-family`,fontSize:`font-size`,fontSizeAdjust:`font-size-adjust`,fontStretch:`font-stretch`,fontStyle:`font-style`,fontVariant:`font-variant`,fontWeight:`font-weight`,glyphName:`glyph-name`,glyphOrientationHorizontal:`glyph-orientation-horizontal`,glyphOrientationVertical:`glyph-orientation-vertical`,hrefLang:`hreflang`,horizAdvX:`horiz-adv-x`,horizOriginX:`horiz-origin-x`,horizOriginY:`horiz-origin-y`,imageRendering:`image-rendering`,letterSpacing:`letter-spacing`,lightingColor:`lighting-color`,markerEnd:`marker-end`,markerMid:`marker-mid`,markerStart:`marker-start`,navDown:`nav-down`,navDownLeft:`nav-down-left`,navDownRight:`nav-down-right`,navLeft:`nav-left`,navNext:`nav-next`,navPrev:`nav-prev`,navRight:`nav-right`,navUp:`nav-up`,navUpLeft:`nav-up-left`,navUpRight:`nav-up-right`,onAbort:`onabort`,onActivate:`onactivate`,onAfterPrint:`onafterprint`,onBeforePrint:`onbeforeprint`,onBegin:`onbegin`,onCancel:`oncancel`,onCanPlay:`oncanplay`,onCanPlayThrough:`oncanplaythrough`,onChange:`onchange`,onClick:`onclick`,onClose:`onclose`,onCopy:`oncopy`,onCueChange:`oncuechange`,onCut:`oncut`,onDblClick:`ondblclick`,onDrag:`ondrag`,onDragEnd:`ondragend`,onDragEnter:`ondragenter`,onDragExit:`ondragexit`,onDragLeave:`ondragleave`,onDragOver:`ondragover`,onDragStart:`ondragstart`,onDrop:`ondrop`,onDurationChange:`ondurationchange`,onEmptied:`onemptied`,onEnd:`onend`,onEnded:`onended`,onError:`onerror`,onFocus:`onfocus`,onFocusIn:`onfocusin`,onFocusOut:`onfocusout`,onHashChange:`onhashchange`,onInput:`oninput`,onInvalid:`oninvalid`,onKeyDown:`onkeydown`,onKeyPress:`onkeypress`,onKeyUp:`onkeyup`,onLoad:`onload`,onLoadedData:`onloadeddata`,onLoadedMetadata:`onloadedmetadata`,onLoadStart:`onloadstart`,onMessage:`onmessage`,onMouseDown:`onmousedown`,onMouseEnter:`onmouseenter`,onMouseLeave:`onmouseleave`,onMouseMove:`onmousemove`,onMouseOut:`onmouseout`,onMouseOver:`onmouseover`,onMouseUp:`onmouseup`,onMouseWheel:`onmousewheel`,onOffline:`onoffline`,onOnline:`ononline`,onPageHide:`onpagehide`,onPageShow:`onpageshow`,onPaste:`onpaste`,onPause:`onpause`,onPlay:`onplay`,onPlaying:`onplaying`,onPopState:`onpopstate`,onProgress:`onprogress`,onRateChange:`onratechange`,onRepeat:`onrepeat`,onReset:`onreset`,onResize:`onresize`,onScroll:`onscroll`,onSeeked:`onseeked`,onSeeking:`onseeking`,onSelect:`onselect`,onShow:`onshow`,onStalled:`onstalled`,onStorage:`onstorage`,onSubmit:`onsubmit`,onSuspend:`onsuspend`,onTimeUpdate:`ontimeupdate`,onToggle:`ontoggle`,onUnload:`onunload`,onVolumeChange:`onvolumechange`,onWaiting:`onwaiting`,onZoom:`onzoom`,overlinePosition:`overline-position`,overlineThickness:`overline-thickness`,paintOrder:`paint-order`,panose1:`panose-1`,pointerEvents:`pointer-events`,referrerPolicy:`referrerpolicy`,renderingIntent:`rendering-intent`,shapeRendering:`shape-rendering`,stopColor:`stop-color`,stopOpacity:`stop-opacity`,strikethroughPosition:`strikethrough-position`,strikethroughThickness:`strikethrough-thickness`,strokeDashArray:`stroke-dasharray`,strokeDashOffset:`stroke-dashoffset`,strokeLineCap:`stroke-linecap`,strokeLineJoin:`stroke-linejoin`,strokeMiterLimit:`stroke-miterlimit`,strokeOpacity:`stroke-opacity`,strokeWidth:`stroke-width`,tabIndex:`tabindex`,textAnchor:`text-anchor`,textDecoration:`text-decoration`,textRendering:`text-rendering`,transformOrigin:`transform-origin`,typeOf:`typeof`,underlinePosition:`underline-position`,underlineThickness:`underline-thickness`,unicodeBidi:`unicode-bidi`,unicodeRange:`unicode-range`,unitsPerEm:`units-per-em`,vAlphabetic:`v-alphabetic`,vHanging:`v-hanging`,vIdeographic:`v-ideographic`,vMathematical:`v-mathematical`,vectorEffect:`vector-effect`,vertAdvY:`vert-adv-y`,vertOriginX:`vert-origin-x`,vertOriginY:`vert-origin-y`,wordSpacing:`word-spacing`,writingMode:`writing-mode`,xHeight:`x-height`,playbackOrder:`playbackorder`,timelineBegin:`timelinebegin`},properties:{about:rr,accentHeight:J,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:J,amplitude:J,arabicForm:null,ascent:J,attributeName:null,attributeType:null,azimuth:J,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:J,by:null,calcMode:null,capHeight:J,className:tr,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:J,diffuseConstant:J,direction:null,display:null,dur:null,divisor:J,dominantBaseline:null,download:q,dx:null,dy:null,edgeMode:null,editable:null,elevation:J,enableBackground:null,end:null,event:null,exponent:J,externalResourcesRequired:null,fill:null,fillOpacity:J,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:nr,g2:nr,glyphName:nr,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:J,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:J,horizOriginX:J,horizOriginY:J,id:null,ideographic:J,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:J,k:J,k1:J,k2:J,k3:J,k4:J,kernelMatrix:rr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:J,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:J,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:J,overlineThickness:J,paintOrder:null,panose1:null,path:null,pathLength:J,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:tr,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:J,pointsAtY:J,pointsAtZ:J,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:rr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:rr,rev:rr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:rr,requiredFeatures:rr,requiredFonts:rr,requiredFormats:rr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:J,specularExponent:J,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:J,strikethroughThickness:J,string:null,stroke:null,strokeDashArray:rr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:J,strokeOpacity:J,strokeWidth:null,style:null,surfaceScale:J,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:rr,tabIndex:J,tableValues:null,target:null,targetX:J,targetY:J,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:rr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:J,underlineThickness:J,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:J,values:null,vAlphabetic:J,vMathematical:J,vectorEffect:null,vHanging:J,vIdeographic:J,version:null,vertAdvY:J,vertOriginX:J,vertOriginY:J,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:J,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:`svg`,transform:ur}),mr=cr({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:`xlink`,transform(e,t){return`xlink:`+t.slice(5).toLowerCase()}}),hr=cr({attributes:{xmlnsxlink:`xmlns:xlink`},properties:{xmlnsXLink:null,xmlns:null},space:`xmlns`,transform:dr}),gr=cr({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:`xml`,transform(e,t){return`xml:`+t.slice(3).toLowerCase()}}),_r={classId:`classID`,dataType:`datatype`,itemId:`itemID`,strokeDashArray:`strokeDasharray`,strokeDashOffset:`strokeDashoffset`,strokeLineCap:`strokeLinecap`,strokeLineJoin:`strokeLinejoin`,strokeMiterLimit:`strokeMiterlimit`,typeOf:`typeof`,xLinkActuate:`xlinkActuate`,xLinkArcRole:`xlinkArcrole`,xLinkHref:`xlinkHref`,xLinkRole:`xlinkRole`,xLinkShow:`xlinkShow`,xLinkTitle:`xlinkTitle`,xLinkType:`xlinkType`,xmlnsXLink:`xmlnsXlink`},vr=/[A-Z]/g,yr=/-[a-z]/g,br=/^data[-\w.:]+$/i;function xr(e,t){let n=Yn(t),r=t,i=Xn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)===`data`&&br.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(yr,Cr);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!yr.test(e)){let n=e.replace(vr,Sr);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=or}return new i(r,t)}function Sr(e){return`-`+e.toLowerCase()}function Cr(e){return e.charAt(1).toUpperCase()}var wr=Jn([lr,fr,mr,hr,gr],`html`),Tr=Jn([lr,pr,mr,hr,gr],`svg`);function Er(e){return e.join(` `).trim()}var Dr=o(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g,u=`
|
|
11
11
|
`,d=`/`,f=`*`,p=``,m=`comment`,h=`declaration`;function g(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,g=1;function v(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(u);g=~n?e.length-n:g+e.length}function y(){var e={line:l,column:g};return function(t){return t.position=new b(e),C(),t}}function b(e){this.start=e,this.end={line:l,column:g},this.source=t.source}b.prototype.content=e;function x(n){var r=Error(t.source+`:`+l+`:`+g+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=g,r.source=e,!t.silent)throw r}function S(t){var n=t.exec(e);if(n){var r=n[0];return v(r),e=e.slice(r.length),n}}function C(){S(i)}function w(e){var t;for(e||=[];t=T();)t!==!1&&e.push(t);return e}function T(){var t=y();if(!(d!=e.charAt(0)||f!=e.charAt(1))){for(var n=2;p!=e.charAt(n)&&(f!=e.charAt(n)||d!=e.charAt(n+1));)++n;if(n+=2,p===e.charAt(n-1))return x(`End of comment missing`);var r=e.slice(2,n-2);return g+=2,v(r),e=e.slice(n),g+=2,t({type:m,comment:r})}}function E(){var e=y(),t=S(a);if(t){if(T(),!S(o))return x(`property missing ':'`);var r=S(s),i=e({type:h,property:_(t[0].replace(n,p)),value:r?_(r[0].replace(n,p)):p});return S(c),i}}function D(){var e=[];w(e);for(var t;t=E();)t!==!1&&(e.push(t),w(e));return e}return C(),D()}function _(e){return e?e.replace(l,p):p}t.exports=g})),Or=o((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.default=r;var n=t(Dr());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),kr=o((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),Ar=o(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(Or()),r=kr();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),jr=Nr(`end`),Mr=Nr(`start`);function Nr(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function Pr(e){let t=Mr(e),n=jr(e);if(t&&n)return{start:t,end:n}}function Fr(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?Lr(e.position):`start`in e||`end`in e?Lr(e):`line`in e||`column`in e?Ir(e):``}function Ir(e){return Rr(e&&e.line)+`:`+Rr(e&&e.column)}function Lr(e){return Ir(e&&e.start)+`-`+Ir(e&&e.end)}function Rr(e){return e&&typeof e==`number`?e:1}var zr=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=Fr(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};zr.prototype.file=``,zr.prototype.name=``,zr.prototype.reason=``,zr.prototype.message=``,zr.prototype.stack=``,zr.prototype.column=void 0,zr.prototype.line=void 0,zr.prototype.ancestors=void 0,zr.prototype.cause=void 0,zr.prototype.fatal=void 0,zr.prototype.place=void 0,zr.prototype.ruleId=void 0,zr.prototype.source=void 0;var Br=l(Ar(),1),Vr={}.hasOwnProperty,Hr=new Map,Ur=/[A-Z]/g,Wr=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),Gr=new Set([`td`,`th`]),Kr=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function qr(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=ii(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=ri(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Tr:wr,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Jr(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function Jr(e,t,n){if(t.type===`element`)return Yr(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return Xr(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return Qr(e,t,n);if(t.type===`mdxjsEsm`)return Zr(e,t);if(t.type===`root`)return $r(e,t,n);if(t.type===`text`)return ei(e,t)}function Yr(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Tr,e.schema=i),e.ancestors.push(t);let a=ui(e,t.tagName,!1),o=ai(e,t),s=si(e,t);return Wr.has(t.tagName)&&(s=s.filter(function(e){return typeof e==`string`?!Gn(e):!0})),ti(e,o,a,t),ni(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Xr(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}di(e,t.position)}function Zr(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);di(e,t.position)}function Qr(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Tr,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:ui(e,t.name,!0),o=oi(e,t),s=si(e,t);return ti(e,o,a,t),ni(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function $r(e,t,n){let r={};return ni(r,si(e,t)),e.create(t,e.Fragment,r,n)}function ei(e,t){return t.value}function ti(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function ni(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function ri(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function ii(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=Mr(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function ai(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&Vr.call(t.properties,i)){let a=ci(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&Gr.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function oi(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`)if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else di(e,t.position);else{let i=r.name,a;if(r.value&&typeof r.value==`object`)if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else di(e,t.position);else a=r.value===null?!0:r.value;n[i]=a}return n}function si(e,t){let n=[],r=-1,i=e.passKeys?new Map:Hr;for(;++r<t.children.length;){let a=t.children[r],o;if(e.passKeys){let e=a.type===`element`?a.tagName:a.type===`mdxJsxFlowElement`||a.type===`mdxJsxTextElement`?a.name:void 0;if(e){let t=i.get(e)||0;o=e+`-`+t,i.set(e,t+1)}}let s=Jr(e,a,o);s!==void 0&&n.push(s)}return n}function ci(e,t,n){let r=xr(e.schema,t);if(!(n==null||typeof n==`number`&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?zn(n):Er(n)),r.property===`style`){let t=typeof n==`object`?n:li(e,String(n));return e.stylePropertyNameCase===`css`&&(t=fi(t)),[`style`,t]}return[e.elementAttributeNameCase===`react`&&r.space?_r[r.property]||r.property:r.attribute,n]}}function li(e,t){try{return(0,Br.default)(t,{reactCompat:!0})}catch(t){if(e.ignoreInvalidStyle)return{};let n=t,r=new zr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:n,ruleId:`style`,source:`hast-util-to-jsx-runtime`});throw r.file=e.filePath||void 0,r.url=Kr+`#cannot-parse-style-attribute`,r}}function ui(e,t,n){let r;if(!n)r={type:`Literal`,value:t};else if(t.includes(`.`)){let e=t.split(`.`),n=-1,i;for(;++n<e.length;){let t=Un(e[n])?{type:`Identifier`,name:e[n]}:{type:`Literal`,value:e[n]};i=i?{type:`MemberExpression`,object:i,property:t,computed:!!(n&&t.type===`Literal`),optional:!1}:t}r=i}else r=Un(t)&&!/^[a-z]/.test(t)?{type:`Identifier`,name:t}:{type:`Literal`,value:t};if(r.type===`Literal`){let t=r.value;return Vr.call(e.components,t)?e.components[t]:t}if(e.evaluater)return e.evaluater.evaluateExpression(r);di(e)}function di(e,t){let n=new zr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:`mdx-estree`,source:`hast-util-to-jsx-runtime`});throw n.file=e.filePath||void 0,n.url=Kr+`#cannot-handle-mdx-estrees-without-createevaluater`,n}function fi(e){let t={},n;for(n in e)Vr.call(e,n)&&(t[pi(n)]=e[n]);return t}function pi(e){let t=e.replace(Ur,mi);return t.slice(0,3)===`ms-`&&(t=`-`+t),t}function mi(e){return`-`+e.toLowerCase()}var hi={action:[`form`],cite:[`blockquote`,`del`,`ins`,`q`],data:[`object`],formAction:[`button`,`input`],href:[`a`,`area`,`base`,`link`],icon:[`menuitem`],itemId:null,manifest:[`html`],ping:[`a`,`area`],poster:[`video`],src:[`audio`,`embed`,`iframe`,`img`,`input`,`script`,`source`,`track`,`video`]},gi={};function _i(e,t){let n=t||gi;return vi(e,typeof n.includeImageAlt==`boolean`?n.includeImageAlt:!0,typeof n.includeHtml==`boolean`?n.includeHtml:!0)}function vi(e,t,n){if(bi(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return yi(e.children,t,n)}return Array.isArray(e)?yi(e,t,n):``}function yi(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=vi(e[i],t,n);return r.join(``)}function bi(e){return!!(e&&typeof e==`object`)}var xi=document.createElement(`i`);function Si(e){let t=`&`+e+`;`;xi.innerHTML=t;let n=xi.textContent;return n.charCodeAt(n.length-1)===59&&e!==`semi`||n===t?!1:n}function Ci(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function wi(e,t){return e.length>0?(Ci(e,e.length,0,t),e):t}var Ti={}.hasOwnProperty;function Ei(e){let t={},n=-1;for(;++n<e.length;)Di(t,e[n]);return t}function Di(e,t){let n;for(n in t){let r=(Ti.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){Ti.call(r,a)||(r[a]=[]);let e=i[a];Oi(r[a],Array.isArray(e)?e:e?[e]:[])}}}function Oi(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);Ci(e,0,0,r)}function ki(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function Ai(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var ji=Vi(/[A-Za-z]/),Mi=Vi(/[\dA-Za-z]/),Ni=Vi(/[#-'*+\--9=?A-Z^-~]/);function Pi(e){return e!==null&&(e<32||e===127)}var Fi=Vi(/\d/),Ii=Vi(/[\dA-Fa-f]/),Li=Vi(/[!-/:-@[-`{-~]/);function Y(e){return e!==null&&e<-2}function Ri(e){return e!==null&&(e<0||e===32)}function X(e){return e===-2||e===-1||e===32}var zi=Vi(/\p{P}|\p{S}/u),Bi=Vi(/\s/);function Vi(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function Hi(e){let t=[],n=-1,r=0,i=0;for(;++n<e.length;){let a=e.charCodeAt(n),o=``;if(a===37&&Mi(e.charCodeAt(n+1))&&Mi(e.charCodeAt(n+2)))i=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(o=String.fromCharCode(a));else if(a>55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Z(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return X(r)?(e.enter(n),s(r)):t(r)}function s(r){return X(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}var Ui={tokenize:Wi};function Wi(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null){e.consume(n);return}return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Z(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null){e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);return}return Y(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Gi={tokenize:qi},Ki={tokenize:Ji};function qi(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;return Ci(t.events,a+1,0,t.events.slice(n)),t.events.length=s,l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ki,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Ki,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null){i&&v(),_(0),e.consume(n);return}return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null){g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);return}return Y(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;Ci(t.events,a+1,0,t.events.slice(n)),t.events.length=e}}function _(r){let i=n.length;for(;i-- >r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Ji(e,t,n){return Z(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Yi(e){if(e===null||Ri(e)||Bi(e))return 1;if(zi(e))return 2}function Xi(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Zi={name:`attention`,resolveAll:Qi,tokenize:$i};function Qi(e,t){let n=-1,r,i,a,o,s,c,l,u;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){for(r=n;r--;)if(e[r][0]===`exit`&&e[r][1].type===`attentionSequence`&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};ea(d,-c),ea(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=wi(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=wi(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=wi(l,Xi(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=wi(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=wi(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,Ci(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function $i(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Yi(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Yi(o),u=!l||l===2&&i||n.includes(o),d=!i||i===2&&l||n.includes(r);return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function ea(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var ta={name:`autolink`,tokenize:na};function na(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return ji(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||Mi(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||Mi(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||Pi(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):Ni(t)?(e.consume(t),l):n(t)}function u(e){return Mi(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||Mi(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var ra={partial:!0,tokenize:ia};function ia(e,t,n){return r;function r(t){return X(t)?Z(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||Y(e)?t(e):n(e)}}var aa={continuation:{tokenize:sa},exit:ca,name:`blockQuote`,tokenize:oa};function oa(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return X(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function sa(e,t,n){let r=this;return i;function i(t){return X(t)?Z(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(aa,t,n)(r)}}function ca(e){e.exit(`blockQuote`)}var la={name:`characterEscape`,tokenize:ua};function ua(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return Li(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var da={name:`characterReference`,tokenize:fa};function fa(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=Mi,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=Ii,u):(e.enter(`characterReferenceValue`),a=7,o=Fi,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===Mi&&!Si(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var pa={partial:!0,tokenize:ga},ma={concrete:!0,name:`codeFenced`,tokenize:ha};function ha(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),X(t)?Z(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||Y(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(pa,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||Y(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):X(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),Z(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||Y(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||Y(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&X(t)?Z(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||Y(t)?e.check(pa,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||Y(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),X(t)?Z(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),X(t)?Z(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||Y(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function ga(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var _a={name:`codeIndented`,tokenize:ya},va={partial:!0,tokenize:ba};function ya(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Z(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):Y(t)?e.attempt(va,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||Y(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function ba(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):Y(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Z(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):Y(e)?i(e):n(e)}}var xa={name:`codeText`,previous:Ca,resolve:Sa,tokenize:wa};function Sa(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Ca(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function wa(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):Y(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||Y(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var Ta=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&Ea(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),Ea(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),Ea(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){let t=this.left.splice(e,1/0);Ea(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);Ea(this.left,t.reverse())}}};function Ea(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function Da(e){let t={},n=-1,r,i,a,o,s,c,l,u=new Ta(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,Oa(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(!(o[1].type===`linePrefix`||o[1].type===`listItemIndent`))break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return Ci(e,0,1/0,u.slice(0)),!l}function Oa(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var ka={resolve:ja,tokenize:Ma},Aa={partial:!0,tokenize:Na};function ja(e){return Da(e),e}function Ma(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):Y(t)?e.check(Aa,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function Na(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Z(e,a,`linePrefix`)}function a(i){if(i===null||Y(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function Pa(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||Pi(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||Y(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||Ri(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||Pi(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function Fa(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):Y(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||Y(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!X(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function Ia(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):Y(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Z(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||Y(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function La(e,t){let n;return r;function r(i){return Y(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):X(i)?Z(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var Ra={name:`definition`,tokenize:Ba},za={partial:!0,tokenize:Va};function Ba(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return Fa.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=Ai(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return Ri(t)?La(e,l)(t):l(t)}function l(t){return Pa(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(za,d,d)(t)}function d(t){return X(t)?Z(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||Y(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function Va(e,t,n){return r;function r(t){return Ri(t)?La(e,i)(t):n(t)}function i(t){return Ia(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return X(t)?Z(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||Y(e)?t(e):n(e)}}var Ha={name:`hardBreakEscape`,tokenize:Ua};function Ua(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return Y(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Wa={name:`headingAtx`,resolve:Ga,tokenize:Ka};function Ga(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},Ci(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function Ka(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||Ri(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||Y(n)?(e.exit(`atxHeading`),t(n)):X(n)?Z(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||Ri(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var qa=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Ja=[`pre`,`script`,`style`,`textarea`],Ya={concrete:!0,name:`htmlFlow`,resolveTo:Qa,tokenize:$a},Xa={partial:!0,tokenize:Q},Za={partial:!0,tokenize:eo};function Qa(e){let t=e.length;for(;t--&&!(e[t][0]===`enter`&&e[t][1].type===`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function $a(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:I):ji(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):ji(a)?(e.consume(a),i=4,r.interrupt?t:I):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:I):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return ji(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||Ri(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Ja.includes(l)?(i=1,r.interrupt?t(s):O(s)):qa.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||Mi(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return X(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||ji(t)?(e.consume(t),b):X(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||Mi(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):X(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):X(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||Y(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||Ri(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||X(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||Y(t)?O(t):X(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),L):t===63&&i===3?(e.consume(t),I):t===93&&i===5?(e.consume(t),F):Y(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Xa,R,k)(t)):t===null||Y(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Za,A,R)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||Y(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),I):O(t)}function N(t){return t===47?(e.consume(t),o=``,P):O(t)}function P(t){if(t===62){let n=o.toLowerCase();return Ja.includes(n)?(e.consume(t),L):O(t)}return ji(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),P):O(t)}function F(t){return t===93?(e.consume(t),I):O(t)}function I(t){return t===62?(e.consume(t),L):t===45&&i===2?(e.consume(t),I):O(t)}function L(t){return t===null||Y(t)?(e.exit(`htmlFlowData`),R(t)):(e.consume(t),L)}function R(n){return e.exit(`htmlFlow`),t(n)}}function eo(e,t,n){let r=this;return i;function i(t){return Y(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Q(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(ra,t,n)}}var to={name:`htmlText`,tokenize:no};function no(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):ji(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):ji(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):Y(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):Y(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):Y(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):Y(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return ji(t)?(e.consume(t),S):n(t)}function S(t){return t===45||Mi(t)?(e.consume(t),S):C(t)}function C(t){return Y(t)?(o=C,N(t)):X(t)?(e.consume(t),C):M(t)}function w(t){return t===45||Mi(t)?(e.consume(t),w):t===47||t===62||Ri(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||ji(t)?(e.consume(t),E):Y(t)?(o=T,N(t)):X(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||Mi(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):Y(t)?(o=D,N(t)):X(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):Y(t)?(o=O,N(t)):X(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):Y(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||Ri(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||Ri(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),P}function P(t){return X(t)?Z(e,F,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):F(t)}function F(t){return e.enter(`htmlTextData`),o(t)}}var ro={name:`labelEnd`,resolveAll:so,resolveTo:co,tokenize:lo},io={tokenize:uo},ao={tokenize:fo},oo={tokenize:po};function so(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&Ci(e,0,e.length,n),e}function co(e,t){let n=e.length,r=0,i,a,o,s;for(;n--;)if(i=e[n][1],a){if(i.type===`link`||i.type===`labelLink`&&i._inactive)break;e[n][0]===`enter`&&i.type===`labelLink`&&(i._inactive=!0)}else if(o){if(e[n][0]===`enter`&&(i.type===`labelImage`||i.type===`labelLink`)&&!i._balanced&&(a=n,i.type!==`labelLink`)){r=2;break}}else i.type===`labelEnd`&&(o=n);let c={type:e[a][1].type===`labelLink`?`link`:`image`,start:{...e[a][1].start},end:{...e[e.length-1][1].end}},l={type:`label`,start:{...e[a][1].start},end:{...e[o][1].end}},u={type:`labelText`,start:{...e[a+r+2][1].end},end:{...e[o-2][1].start}};return s=[[`enter`,c,t],[`enter`,l,t]],s=wi(s,e.slice(a+1,a+r+3)),s=wi(s,[[`enter`,u,t]]),s=wi(s,Xi(t.parser.constructs.insideSpan.null,e.slice(a+r+4,o-3),t)),s=wi(s,[[`exit`,u,t],e[o-2],e[o-1],[`exit`,l,t]]),s=wi(s,e.slice(o+1)),s=wi(s,[[`exit`,c,t]]),Ci(e,a,e.length,s),e}function lo(e,t,n){let r=this,i=r.events.length,a,o;for(;i--;)if((r.events[i][1].type===`labelImage`||r.events[i][1].type===`labelLink`)&&!r.events[i][1]._balanced){a=r.events[i][1];break}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(Ai(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(io,u,o?u:d)(t):t===91?e.attempt(ao,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(oo,u,d)(t)}function u(e){return t(e)}function d(e){return a._balanced=!0,n(e)}}function uo(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return Ri(t)?La(e,a)(t):a(t)}function a(t){return t===41?u(t):Pa(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return Ri(t)?La(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?Ia(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return Ri(t)?La(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function fo(e,t,n){let r=this;return i;function i(t){return Fa.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(Ai(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function po(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var mo={name:`labelStartImage`,resolveAll:ro.resolveAll,tokenize:ho};function ho(e,t,n){let r=this;return i;function i(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),a}function a(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelImage`),o):n(t)}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var go={name:`labelStartLink`,resolveAll:ro.resolveAll,tokenize:_o};function _o(e,t,n){let r=this;return i;function i(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelLink`),a}function a(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):t(e)}}var vo={name:`lineEnding`,tokenize:yo};function yo(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),Z(e,t,`linePrefix`)}}var bo={name:`thematicBreak`,tokenize:xo};function xo(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||Y(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),X(t)?Z(e,s,`whitespace`)(t):s(t))}}var So={continuation:{tokenize:Eo},exit:Oo,name:`list`,tokenize:To},Co={partial:!0,tokenize:ko},wo={partial:!0,tokenize:Do};function To(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:Fi(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(bo,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return Fi(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(ra,r.interrupt?n:u,e.attempt(Co,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return X(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Eo(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(ra,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Z(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!X(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(wo,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Z(e,e.attempt(So,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function Do(e,t,n){let r=this;return Z(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Oo(e){e.exit(this.containerState.type)}function ko(e,t,n){let r=this;return Z(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!X(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Ao={name:`setextUnderline`,resolveTo:jo,tokenize:Mo};function jo(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Mo(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),X(t)?Z(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||Y(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var No={tokenize:Po};function Po(e){let t=this,n=e.attempt(ra,r,e.attempt(this.parser.constructs.flowInitial,i,Z(e,e.attempt(this.parser.constructs.flow,i,e.attempt(ka,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var Fo={resolveAll:zo()},Io=Ro(`string`),Lo=Ro(`text`);function Ro(e){return{resolveAll:zo(e===`text`?Bo:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function zo(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):(!t[r]||t[r][1].type!==`data`)&&(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function Bo(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type===`lineEnding`)&&e[n-1][1].type===`data`){let r=e[n-1][1],i=t.sliceStream(r),a=i.length,o=-1,s=0,c;for(;a--;){let e=i[a];if(typeof e==`string`){for(o=e.length;e.charCodeAt(o-1)===32;)s++,o--;if(o)break;o=-1}else if(e===-2)c=!0,s++;else if(e!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let i={type:n===e.length||c||s<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:a?o:r.start._bufferIndex+o,_index:r.start._index+a,line:r.end.line,column:r.end.column-s,offset:r.end.offset-s},end:{...r.end}};r.end={...i.start},r.start.offset===r.end.offset?Object.assign(r,i):(e.splice(n,0,[`enter`,i,t],[`exit`,i,t]),n+=2)}n++}return e}var Vo=s({attentionMarkers:()=>Yo,contentInitial:()=>Uo,disable:()=>Xo,document:()=>Ho,flow:()=>Go,flowInitial:()=>Wo,insideSpan:()=>Jo,string:()=>Ko,text:()=>qo}),Ho={42:So,43:So,45:So,48:So,49:So,50:So,51:So,52:So,53:So,54:So,55:So,56:So,57:So,62:aa},Uo={91:Ra},Wo={[-2]:_a,[-1]:_a,32:_a},Go={35:Wa,42:bo,45:[Ao,bo],60:Ya,61:Ao,95:bo,96:ma,126:ma},Ko={38:da,92:la},qo={[-5]:vo,[-4]:vo,[-3]:vo,33:mo,38:da,42:Zi,60:[ta,to],91:go,92:[Ha,la],93:ro,95:Zi,96:xa},Jo={null:[Zi,Fo]},Yo={null:[42,95]},Xo={null:[]};function Zo(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=wi(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=Xi(a,l.events,l),l.events):[]}function f(e,t){return $o(p(e),t)}function p(e){return Qo(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index<o.length;){let t=o[r._index];if(typeof t==`string`)for(e=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===e&&r._bufferIndex<t.length;)_(t.charCodeAt(r._bufferIndex));else _(t)}}function _(e){u=u(e)}function v(e){Y(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&Ci(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Qo(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function $o(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
|
|
12
12
|
`;break;case-3:o=`\r
|
|
@@ -179,4 +179,4 @@ ${this.parser.parse(e)}</blockquote>
|
|
|
179
179
|
${e}</tr>
|
|
180
180
|
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
181
181
|
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${QE(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=$E(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+QE(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=$E(e);if(i===null)return QE(n);e=i;let a=`<img src="${e}" alt="${QE(n)}"`;return t&&(a+=` title="${QE(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:QE(e.text)}},lD=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}checkbox({raw:e}){return e}},uD=class e{options;renderer;textRenderer;constructor(e){this.options=e||zT,this.options.renderer=this.options.renderer||new cD,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new lD}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e){this.renderer.parser=this;let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(this.options.extensions?.renderers?.[r.type]){let e=r,n=this.options.extensions.renderers[e.type].call({parser:this},e);if(n!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){t+=n||``;continue}}let i=r;switch(i.type){case`space`:t+=this.renderer.space(i);break;case`hr`:t+=this.renderer.hr(i);break;case`heading`:t+=this.renderer.heading(i);break;case`code`:t+=this.renderer.code(i);break;case`table`:t+=this.renderer.table(i);break;case`blockquote`:t+=this.renderer.blockquote(i);break;case`list`:t+=this.renderer.list(i);break;case`checkbox`:t+=this.renderer.checkbox(i);break;case`html`:t+=this.renderer.html(i);break;case`def`:t+=this.renderer.def(i);break;case`paragraph`:t+=this.renderer.paragraph(i);break;case`text`:t+=this.renderer.text(i);break;default:{let e=`Token with "`+i.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`checkbox`:n+=t.checkbox(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},dD=class{options;block;constructor(e){this.options=e||zT}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?sD.lex:sD.lexInline}provideParser(){return this.block?uD.parse:uD.parseInline}},fD=new class{defaults=RT();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=uD;Renderer=cD;TextRenderer=lD;Lexer=sD;Tokenizer=oD;Hooks=dD;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new cD(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new oD(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new dD;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];dD.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&dD.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return sD.lex(e,t??this.defaults)}parser(e,t){return uD.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer():e?sD.lex:sD.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():e?uD.parse:uD.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer():e?sD.lex:sD.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():e?uD.parse:uD.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
182
|
-
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+QE(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function pD(e,t){return fD.parse(e,t)}pD.options=pD.setOptions=function(e){return fD.setOptions(e),pD.defaults=fD.defaults,BT(pD.defaults),pD},pD.getDefaults=RT,pD.defaults=zT,pD.use=function(...e){return fD.use(...e),pD.defaults=fD.defaults,BT(pD.defaults),pD},pD.walkTokens=function(e,t){return fD.walkTokens(e,t)},pD.parseInline=fD.parseInline,pD.Parser=uD,pD.parser=uD.parse,pD.Renderer=cD,pD.TextRenderer=lD,pD.Lexer=sD,pD.lexer=sD.lex,pD.Tokenizer=oD,pD.Hooks=dD,pD.parse=pD,pD.options,pD.setOptions,pD.use,pD.walkTokens,pD.parseInline,uD.parse,sD.lex;function mD(e){if(typeof e==`function`&&(e={highlight:e}),!e||typeof e.highlight!=`function`)throw Error(`Must provide highlight function`);return typeof e.langPrefix!=`string`&&(e.langPrefix=`language-`),typeof e.emptyLangClass!=`string`&&(e.emptyLangClass=``),{async:!!e.async,walkTokens(t){if(t.type!==`code`)return;let n=hD(t.lang);if(e.async)return Promise.resolve(e.highlight(t.text,n,t.lang||``)).then(gD(t));let r=e.highlight(t.text,n,t.lang||``);if(r instanceof Promise)throw Error(`markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.`);gD(t)(r)},useNewRenderer:!0,renderer:{code(t,n,r){typeof t==`object`&&(r=t.escaped,n=t.lang,t=t.text);let i=hD(n),a=i?e.langPrefix+CD(i):e.emptyLangClass,o=a?` class="${a}"`:``;return t=t.replace(/\n$/,``),`<pre><code${o}>${r?t:CD(t,!0)}\n</code></pre>`}}}}function hD(e){return(e||``).match(/\S*/)[0]}function gD(e){return t=>{typeof t==`string`&&t!==e.text&&(e.escaped=!0,e.text=t)}}var _D=/[&<>"']/,vD=new RegExp(_D.source,`g`),yD=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,bD=new RegExp(yD.source,`g`),xD={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},SD=e=>xD[e];function CD(e,t){if(t){if(_D.test(e))return e.replace(vD,SD)}else if(yD.test(e))return e.replace(bD,SD);return e}pD.use(mD({langPrefix:`hljs language-`,highlight(e,t){return t&&um.getLanguage(t)?um.highlight(e,{language:t}).value:e}})),wp.addHook(`afterSanitizeAttributes`,e=>{e.tagName===`A`&&e.getAttribute(`href`)?.startsWith(`http`)&&(e.setAttribute(`target`,`_blank`),e.setAttribute(`rel`,`noopener noreferrer`))});function wD({content:e}){return(0,K.jsx)(`div`,{className:`docs-prose`,dangerouslySetInnerHTML:{__html:(0,v.useMemo)(()=>wp.sanitize(pD.parse(e,{gfm:!0})),[e])}})}function TD({repoName:e,filePath:t,content:n,loading:r,error:i,rawMode:a,isStarred:o,onToggleRaw:s,onToggleStar:c,onClose:l}){return(0,K.jsxs)(`div`,{className:`relative flex flex-1 min-h-0 w-full flex-col`,children:[(0,K.jsxs)(`div`,{className:`docs-header flex items-center gap-2 px-4 py-2 border-b flex-shrink-0`,children:[(0,K.jsxs)(`button`,{onClick:l,className:`docs-header-back flex items-center gap-1 text-[13px] transition-colors cursor-pointer`,children:[(0,K.jsx)(vt,{size:14,stroke:2.5}),`Back`]}),(0,K.jsxs)(`span`,{className:`docs-header-path flex-1 text-[13px] text-center truncate`,children:[e,` `,(0,K.jsx)(`span`,{className:`docs-header-slash`,children:`/`}),` `,t]}),(0,K.jsx)(`button`,{onClick:c,className:`docs-header-star transition-colors cursor-pointer ${o?`is-starred`:``}`,title:o?`Remove from favourites`:`Add to favourites`,children:o?(0,K.jsx)(hn,{size:15}):(0,K.jsx)(an,{size:15})}),(0,K.jsx)(`button`,{onClick:s,className:`docs-header-toggle rounded px-2 py-0.5 text-[13px] transition-colors cursor-pointer ${a?`is-active`:``}`,children:a?`Rendered`:`Raw`})]}),(0,K.jsxs)(`div`,{className:`chat-scroll flex-1 overflow-y-auto min-h-0`,children:[(0,K.jsx)(`div`,{className:`border-t-2 border-accent-8/40`}),r?(0,K.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,K.jsx)(Ft,{size:20,className:`animate-spin text-neutral-5`})}):i?(0,K.jsx)(`div`,{className:`rounded-md bg-error-10/50 px-3 py-2 text-[13px] text-error-4 mx-4 mt-4`,children:i}):n===null?null:a?(0,K.jsx)(`pre`,{className:`px-6 py-4 text-[14px] text-neutral-3 whitespace-pre-wrap`,style:{fontFamily:`'Inconsolata', monospace`},children:n}):(0,K.jsx)(`div`,{className:`mx-auto max-w-[720px] px-6 py-4`,children:(0,K.jsx)(wD,{content:n})})]})]})}function ED({docsRepoName:e,filePath:t,content:n,loading:r,error:i,rawMode:a,isStarred:o,onToggleRaw:s,onToggleStar:c,onClose:l,activeSessionId:u,inputBarRef:d,onSendInput:f,activePrompt:p,disabled:m,pendingFiles:h,onAddFiles:g,onRemoveFile:_,skillGroups:v,slashCommands:y,sessionInputs:b,onSessionInputChange:x,currentModel:S,onModelChange:C,isMobile:w,currentPermissionMode:T,onPermissionModeChange:E,moveToWorktree:D,worktreePath:O}){return(0,K.jsxs)(`div`,{className:`flex flex-1 flex-col overflow-hidden min-h-0`,children:[(0,K.jsx)(TD,{repoName:e,filePath:t,content:n,loading:r,error:i,rawMode:a,isStarred:o,onToggleRaw:s,onToggleStar:c,onClose:l}),u?(0,K.jsx)(IT,{ref:d,onSendInput:f,isWaiting:!!p,disabled:m,onEscape:l,pendingFiles:h,onAddFiles:g,onRemoveFile:_,skillGroups:v,slashCommands:y,placeholder:`Ask Claude about this doc, or request changes...`,initialValue:u?b[u]??``:``,onValueChange:e=>{u&&x(u,e)},currentModel:S,onModelChange:C,isMobile:w,currentPermissionMode:T,onPermissionModeChange:E,onMoveToWorktree:D,worktreePath:O},`docs-${u}`):(0,K.jsx)(`div`,{className:`px-4 py-3 border-t border-neutral-10`,children:(0,K.jsx)(`div`,{className:`rounded-lg bg-neutral-11 px-3 py-2 text-[15px] text-neutral-5 opacity-40`,children:`Start a session to edit this doc`})})]})}function DD({count:e,repoName:t,onExecute:n,onDiscard:r}){return(0,K.jsxs)(`div`,{className:`flex items-center justify-between border-t border-warning-8/50 bg-warning-11/30 px-4 py-2 flex-shrink-0`,children:[(0,K.jsxs)(`span`,{className:`text-[15px] text-warning-4`,children:[`⏸ `,e,` message`,e===1?``:`s`,` queued — waiting for`,` `,(0,K.jsx)(`span`,{className:`font-medium text-warning-3`,children:t}),` session to finish`]}),(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsx)(`button`,{onClick:n,className:`rounded px-2.5 py-1 text-[13px] bg-warning-9/30 hover:bg-warning-8/50 text-warning-3 transition-colors`,children:`Execute now`}),(0,K.jsx)(`button`,{onClick:r,className:`rounded px-2.5 py-1 text-[13px] text-neutral-4 hover:text-neutral-2 hover:bg-neutral-8/50 transition-colors`,children:`Discard`})]})]})}function OD({activeSessionId:e,messages:t,fontSize:n,isMobile:r,planningMode:i,activityLabel:a,tasks:o,disabled:s,hasFileChanges:c,diffPanelOpen:l,onOpenDiffPanel:u,activePrompt:d,promptQueueSize:f,sendPromptResponse:p,activeTentativeCount:m,activeRepoName:h,onExecuteTentative:g,onDiscardTentative:_,inputBarRef:v,onSendInput:y,pendingFiles:b,onAddFiles:x,onRemoveFile:S,skillGroups:C,slashCommands:w,sessionInputs:T,onSessionInputChange:E,currentModel:D,onModelChange:O,availableModels:k,hasUserMessages:A,useWorktree:j,onWorktreeChange:M,currentPermissionMode:N,onPermissionModeChange:P,moveToWorktree:F,worktreePath:I,openCodeConnected:L,claudeDisabled:R}){let z=L===!1,ee=R||z;return(0,K.jsxs)(`div`,{className:`flex flex-1 flex-col overflow-hidden min-h-0`,children:[(0,K.jsxs)(`div`,{className:`relative flex-1 min-h-0 flex flex-col`,children:[(0,K.jsx)(km,{messages:t,fontSize:n,disabled:s,planningMode:i,activityLabel:ee?void 0:a,isMobile:r}),(0,K.jsx)(hT,{tasks:o}),R&&(0,K.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center z-10 bg-neutral-12/90`,children:(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-3 text-center px-6 max-w-md`,children:[(0,K.jsx)(`div`,{className:`text-[15px] font-medium text-neutral-3`,children:`Claude Code is disabled`}),(0,K.jsx)(`p`,{className:`text-[13px] text-neutral-5 leading-relaxed`,children:`Re-enable Claude Code from the connection status menu to continue this session.`})]})}),z&&!R&&(0,K.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center z-10 bg-neutral-12/90`,children:(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-3 text-center px-6 max-w-md`,children:[(0,K.jsx)(`div`,{className:`text-[15px] font-medium text-neutral-3`,children:`OpenCode is not connected`}),(0,K.jsxs)(`p`,{className:`text-[13px] text-neutral-5 leading-relaxed`,children:[`Install OpenCode to use this session. Visit`,` `,(0,K.jsx)(`a`,{href:`https://opencode.ai`,target:`_blank`,rel:`noopener noreferrer`,className:`text-primary-5 hover:underline`,children:`opencode.ai`}),` `,`and run `,(0,K.jsx)(`code`,{className:`bg-neutral-10 px-1.5 py-0.5 rounded text-[12px]`,children:`opencode serve`}),` to start the server.`]})]})}),c&&!l&&(0,K.jsxs)(`button`,{className:`absolute top-3 right-3 z-10 flex items-center gap-1.5 rounded-lg bg-primary-8 px-3 py-1.5 text-[13px] font-medium text-neutral-1 shadow-lg backdrop-blur-sm transition-colors hover:bg-primary-7`,onClick:u,title:`Review code changes (Ctrl+Shift+D)`,children:[(0,K.jsx)(Dt,{size:15}),`Diff view`]})]}),d&&(0,K.jsx)(gT,{options:d.options,question:d.question,multiSelect:d.multiSelect,promptType:d.promptType,questions:d.questions,approvePattern:d.approvePattern,onSelect:p,isMobile:r},d.requestId),f>1&&(0,K.jsxs)(`div`,{className:`px-3 py-1 text-[12px] text-neutral-5 bg-neutral-11 border-t border-neutral-10`,children:[f-1,` more pending`]}),m>0&&(0,K.jsx)(DD,{count:m,repoName:h,onExecute:g,onDiscard:_}),(0,K.jsx)(IT,{ref:v,onSendInput:y,isWaiting:!!d,disabled:s||ee,placeholder:R?`Claude Code is disabled`:z?`OpenCode is not connected`:void 0,onEscape:()=>{},pendingFiles:b,onAddFiles:x,onRemoveFile:S,skillGroups:C,slashCommands:w,initialValue:T[e]??``,onValueChange:t=>{E(e,t)},currentModel:D,onModelChange:O,availableModels:k,isMobile:r,showWorktreeToggle:!A,useWorktree:j,onWorktreeChange:M,currentPermissionMode:N,onPermissionModeChange:P,onMoveToWorktree:F,worktreePath:I},e??`no-session`)]})}function kD(){let{settings:e,updateSettings:t}=w(),{groups:n,repos:r,globalSkills:i,globalModules:a,ghMissing:o,refresh:s}=T(e.token),{sessions:c,rename:l,remove:u,refresh:d}=we(e.token),{queues:f,addToQueue:p,clearQueue:m}=Ve(),{sessionId:h,view:g,navigate:_}=Ie(),y=Je(),b=Xe(),[x,S]=(0,v.useState)(!1),[C,E]=(0,v.useState)(()=>h??localStorage.getItem(`codekin-active-session`)),D=(0,v.useCallback)(e=>{E(e),g!==`orchestrator`&&(e?_(`/s/${e}`):_(`/`,!0))},[_,g]),[O,k]=(0,v.useState)(!e.token),[A,j]=(0,v.useState)(!1),[M,N]=(0,v.useState)(!1),P=(0,v.useRef)(()=>{}),F=(0,v.useRef)(()=>{}),[I,L]=(0,v.useState)(!1),[R,z]=(0,v.useState)(0),[ee,B]=(0,v.useState)(null),V=(0,v.useRef)(null),H=(0,v.useRef)(null),te=(0,v.useRef)(()=>{}),[ne,re]=(0,v.useState)(()=>localStorage.getItem(`codekin-use-worktree`)===`true`),ie=(0,v.useRef)(ne);(0,v.useEffect)(()=>{ie.current=ne},[ne]);let ae=(0,v.useCallback)(e=>{re(e),localStorage.setItem(`codekin-use-worktree`,String(e))},[]),[oe,se]=(0,v.useState)(!1);(0,v.useEffect)(()=>{e.token&&le(e.token).then(se).catch(()=>{})},[e.token]);let[ce,ue]=(0,v.useState)(`Joe`);(0,v.useEffect)(()=>{e.token&&pe(e.token).then(ue).catch(()=>{})},[e.token]);let de=(0,v.useRef)(localStorage.getItem(`claude-permission-mode`)||`acceptEdits`),fe=(0,v.useRef)(localStorage.getItem(`codekin-provider`)||`claude`),me=(0,v.useRef)(null),[he,ge]=(0,v.useState)({}),{connState:_e,messages:ve,tasks:be,planningMode:xe,isProcessing:Se,thinkingSummary:Ce,waitingSessions:Te,activePrompt:Ee,promptQueueSize:De,joinSession:Oe,createSession:ke,sendInput:Ae,sendPromptResponse:je,leaveSession:Me,clearMessages:U,restoreSession:Ne,currentModel:W,setModel:Le,send:Re,disconnect:ze,reconnect:Be,currentPermissionMode:He,setPermissionMode:We,moveToWorktree:Ge}=Pe({token:e.token,onSessionCreated:e=>{if(D(e),d(),H.current){let e=H.current;H.current=null,setTimeout(()=>te.current(e),500)}},onSessionJoined:e=>{D(e)},onSessionRenamed:()=>{d()},onSessionsUpdated:()=>{d(),z(e=>e+1)},onError:e=>{V.current&&clearTimeout(V.current),B(e),V.current=setTimeout(()=>B(null),5e3),e.toLowerCase().includes(`not found`)&&D(null)},onRawMessage:e=>{e.type===`diff_result`||e.type===`diff_error`?P.current(e):e.type===`tool_done`&&(F.current(e.toolName,e.summary),(e.toolName===`Edit`||e.toolName===`Write`)&&L(!0))}}),Ke=(0,v.useCallback)(e=>{de.current=e,We(e)},[We]),[qe]=(0,v.useState)(localStorage.getItem(`codekin-provider`)||`claude`),[Ye,Ze]=(0,v.useState)([]),[Qe,$e]=(0,v.useState)(null),[et,nt]=(0,v.useState)(!1),[at,G]=(0,v.useState)(!1),ot=(0,v.useRef)(void 0),st=c.find(e=>e.id===C)?.provider??qe,ct=st===`opencode`?Ye:wT;(0,v.useEffect)(()=>{!e.token||at||ye(e.token).then(e=>{$e(e.models.length>0)}).catch(()=>{$e(!1)})},[e.token,at]);let lt=(0,v.useRef)(W);(0,v.useEffect)(()=>{lt.current=W},[W]);let ut=st===`opencode`?c.find(e=>e.id===C)?.workingDir:void 0;(0,v.useEffect)(()=>{if(st!==`opencode`||!e.token)return;let t=ut&&ut!==ot.current,n=lt.current&&Ye.some(e=>e.id===lt.current);if(!t&&Ye.length>0&&n)return;let r=ut;ye(e.token,r).then(e=>{let t=e.models.map(e=>({id:`${e.providerID}/${e.id}`,label:`${e.name} (${e.providerName})`}));if(Ze(t),$e(t.length>0),ot.current=r,!(lt.current&&t.some(e=>e.id===lt.current))){let[n,r]=Object.entries(e.defaults)[0]??[];n&&r?Le(`${n}/${r}`):t.length>0&&Le(t[0].id)}}).catch(()=>{$e(!1)})},[st,e.token,Ye.length,Le,ut]),(0,v.useEffect)(()=>{L(!1)},[C]),(0,v.useEffect)(()=>{st===`claude`&&(wT.some(e=>e.id===W)||Le(wT[0].id))},[st,W,Le]);let{activeWorkingDir:dt,handleOpenSession:ft,handleSelectSession:pt,handleDeleteSession:mt,handleSelectRepo:ht,handleDeleteRepo:gt,handleNewSessionForRepo:_t,handleNewSessionFromArchive:vt}=Ue({sessions:c,repos:r,activeSessionId:C,setActiveSessionId:D,joinSession:Oe,leaveSession:Me,clearMessages:U,wsCreateSession:ke,removeSession:u,pendingContextRef:H,useWorktreeRef:ie,permissionModeRef:de,providerRef:fe}),yt=dt?r.find(e=>e.workingDir===dt)??null:null,bt=(0,v.useMemo)(()=>[...i,...yt?.skills??[]],[i,yt?.skills]),xt=(0,v.useMemo)(()=>tt(bt),[bt]),St=(0,v.useCallback)((e,t)=>{switch(e){case`/clear`:case`/reset`:case`/new`:Me(),U(),dt&&_t();break;case`/compact`:Ae(`Please compact the conversation context to save tokens while preserving important context.`);break;case`/model`:t?Le(t):Ae(`Current model: ${W??`default`}. To change, use the model selector in the input bar.`);break;case`/help`:Ae(`[Codekin] Available commands: /clear, /compact, /model, /cost, /status, /help. Skills: type / to see autocomplete.`);break;default:Ae(`[Codekin] Command ${e} is not available in the web UI.`);break}},[Me,U,dt,_t,Ae,W,Le]),{handleSend:Ct,handleExecuteTentative:wt,handleDiscardTentative:Tt,tentativeMessages:Et,activeTentativeCount:Dt,pendingFiles:Ot,addFiles:kt,removeFile:At,uploadStatus:jt}=rt({token:e.token,activeSessionId:C,activeWorkingDir:dt,sessions:c,allSkills:bt,sendInput:Ae,onBuiltinCommand:St,tentativeQueues:f,addToQueue:p,clearQueue:m,docsContext:{isOpen:y.isOpen,selectedFile:y.selectedFile,repoWorkingDir:y.repoWorkingDir},queueEnabled:oe});(0,v.useEffect)(()=>{te.current=Ae},[Ae]),(0,v.useEffect)(()=>{function e(e){(e.metaKey||e.ctrlKey)&&e.key===`k`&&(e.preventDefault(),j(e=>!e)),(e.metaKey||e.ctrlKey)&&e.shiftKey&&e.key===`D`&&(e.preventDefault(),N(e=>!e))}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,v.useEffect)(()=>{C?localStorage.setItem(`codekin-active-session`,C):localStorage.removeItem(`codekin-active-session`)},[C]);let Mt=(0,v.useRef)(!1);(0,v.useEffect)(()=>{_e===`disconnected`&&(Mt.current=!1)},[_e]),(0,v.useEffect)(()=>{Mt.current||!C||_e!==`connected`||(Mt.current=!0,Oe(C))},[C,_e,Oe]),(0,v.useEffect)(()=>{h!==C&&(h?(U(),Me(),Oe(h),E(h)):(U(),Me(),E(null)))},[h]),(0,v.useEffect)(()=>{C&&window.location.pathname===`/`&&_(`/s/${C}`,!0)},[]),Fe(()=>{Ne()}),(0,v.useEffect)(()=>{e.token||k(!0)},[e.token]),(0,v.useEffect)(()=>{y.isOpen&&y.close()},[C]);let Nt=(0,v.useCallback)(e=>{me.current?.insertText(e+` `)},[]),Pt=(0,v.useCallback)(e=>{Ae(`[Module: ${e.name}]\n\n${e.content}`)},[Ae]),Ft=[{label:`Global`,skills:i},...yt&&yt.skills.length>0?[{label:yt.name,skills:yt.skills}]:[]],It=it(ve,Se,Ce),Lt=(0,v.useMemo)(()=>{if(!y.repoWorkingDir)return``;let e=y.repoWorkingDir.replace(/\/+$/,``).split(`/`);return e[e.length-1]||y.repoWorkingDir},[y.repoWorkingDir]),Rt=(0,v.useRef)(null),zt=(0,v.useCallback)(()=>{_(`/orchestrator`),Rt.current&&(U(),Me(),Oe(Rt.current))},[_,U,Me,Oe]),Bt=(0,v.useCallback)(e=>{Rt.current=e,U(),Me(),Oe(e)},[U,Me,Oe]),Vt=(0,v.useCallback)(t=>{y.pickerOpen&&y.pickerRepoDir===t?y.closePicker():y.openPicker(t,e.token)},[y,e.token]),Ht=(0,v.useCallback)(t=>{y.pickerRepoDir&&y.openFile(y.pickerRepoDir,t,e.token)},[y,e.token]);(0,v.useEffect)(()=>{document.documentElement.dataset.theme=e.theme},[e.theme]);let Ut=(0,v.useCallback)(()=>{et?(nt(!1),Be()):(nt(!0),ze())},[et,ze,Be]),Wt=(0,v.useCallback)(()=>{at?(G(!1),e.token&&ye(e.token).then(e=>{let t=e.models.map(e=>({id:`${e.providerID}/${e.id}`,label:`${e.name} (${e.providerName})`}));Ze(t),$e(t.length>0)}).catch(()=>{$e(!1)})):(G(!0),$e(!1),st===`opencode`&&C&&Me())},[at,e.token,st,C,Me]),Gt=c.find(e=>e.id===C),Kt=Gt?.name??null,qt=yt?.name??dt?.split(`/`).pop()??null,Jt=(0,v.useCallback)((e,t)=>{ge(n=>({...n,[e]:t}))},[]);return(0,K.jsxs)(`div`,{className:`flex h-full bg-neutral-7`,children:[(0,K.jsx)(Wm,{sessions:c,activeSessionId:C,activeWorkingDir:dt,waitingSessions:Te,tentativeQueues:f,groups:n,globalModules:a,activeRepo:yt,token:e.token,theme:e.theme,fontSize:e.fontSize,connState:_e,claudeDisabled:et,openCodeConnected:Qe,openCodeDisabled:at,onToggleClaude:Ut,onToggleOpenCode:Wt,view:g,archiveRefreshKey:R,onSelectSession:e=>{y.close(),g===`orchestrator`&&_(`/s/${e}`),pt(e)},onDeleteSession:mt,onRenameSession:l,onNewSession:_t,onNewSessionFromArchive:vt,onOpenSession:ft,onSelectRepo:ht,onDeleteRepo:gt,onSettingsOpen:()=>k(!0),onUpdateTheme:e=>t({theme:e}),onSendModule:Pt,agentName:ce,onNavigateToWorkflows:()=>_(`/workflows`),onNavigateToOrchestrator:()=>zt(),onBrowseDocs:Vt,docsPicker:{open:y.pickerOpen,repoDir:y.pickerRepoDir,files:y.pickerFiles,loading:y.pickerLoading,onSelect:Ht,onClose:y.closePicker,starredDocs:y.starredDocs},mobile:{isMobile:b,mobileOpen:x,onMobileClose:()=>S(!1)}}),(0,K.jsxs)(`div`,{className:`terminal-area flex flex-1 flex-col overflow-hidden bg-neutral-12`,children:[b&&(0,K.jsx)(Gm,{repoName:qt,sessionName:Kt,onMenuOpen:()=>S(!0),onNewSession:_t,onSettingsOpen:()=>k(!0),activeRepo:yt}),ee&&(0,K.jsx)(`div`,{className:`border-b border-error-9/50 bg-error-10/50 px-4 py-2 text-[15px] text-error-5`,children:ee}),jt&&(0,K.jsx)(`div`,{className:`border-b border-primary-9/50 bg-primary-10/50 px-4 py-2 text-[15px] text-primary-5`,children:jt}),g===`orchestrator`?(0,K.jsx)(LT,{token:e.token,onOrchestratorSessionReady:Bt,sessionJoined:!!C,activeSessionId:C,messages:[...ve,...Et],fontSize:e.fontSize+(b?1:0),isMobile:b,planningMode:xe,activityLabel:It,tasks:be,activePrompt:Ee,sendPromptResponse:je,inputBarRef:me,onSendInput:Ct,pendingFiles:Ot,onAddFiles:kt,onRemoveFile:At,skillGroups:Ft,slashCommands:xt,currentModel:W,onModelChange:Le,currentPermissionMode:He,onPermissionModeChange:Ke,disabled:!e.token,agentName:ce}):g===`workflows`?(0,K.jsx)(sg,{token:e.token,onNavigateToSession:e=>{U(),Me(),Oe(e),_(`/s/${e}`)}}):y.isOpen?(0,K.jsx)(ED,{docsRepoName:Lt,filePath:y.selectedFile,content:y.content,loading:y.loading,error:y.error,rawMode:y.rawMode,isStarred:y.isCurrentFileStarred,onToggleRaw:y.toggleRawMode,onToggleStar:y.toggleStarCurrentFile,onClose:y.close,activeSessionId:C,inputBarRef:me,onSendInput:Ct,activePrompt:Ee,disabled:!e.token,pendingFiles:Ot,onAddFiles:kt,onRemoveFile:At,skillGroups:Ft,slashCommands:xt,sessionInputs:he,onSessionInputChange:Jt,currentModel:W,onModelChange:Le,isMobile:b,currentPermissionMode:He,onPermissionModeChange:Ke,moveToWorktree:Ge,worktreePath:Gt?.worktreePath}):C?(0,K.jsx)(OD,{activeSessionId:C,messages:[...ve,...Et],fontSize:e.fontSize+(b?1:0),isMobile:b,planningMode:xe,activityLabel:It,tasks:be,disabled:!e.token,hasFileChanges:I,diffPanelOpen:M,onOpenDiffPanel:()=>N(!0),activePrompt:Ee,promptQueueSize:De,sendPromptResponse:je,activeTentativeCount:Dt,activeRepoName:yt?.name??dt?.split(`/`).pop()??`this repo`,onExecuteTentative:()=>wt(C),onDiscardTentative:()=>Tt(C),inputBarRef:me,onSendInput:Ct,pendingFiles:Ot,onAddFiles:kt,onRemoveFile:At,skillGroups:Ft,slashCommands:xt,sessionInputs:he,onSessionInputChange:Jt,currentModel:W,onModelChange:Le,availableModels:ct,hasUserMessages:ve.some(e=>e.type===`user`),useWorktree:ne,onWorktreeChange:ae,currentPermissionMode:He,onPermissionModeChange:Ke,moveToWorktree:Ge,worktreePath:Gt?.worktreePath,openCodeConnected:st===`opencode`?at?!1:Qe:null,claudeDisabled:st!==`opencode`&&et}):(0,K.jsx)(jb,{groups:n,token:e.token,ghMissing:o,onOpen:ft,onRefreshRepos:s})]}),C&&(0,K.jsx)(fT,{isOpen:M,onClose:()=>N(!1),send:Re,onHandleMessage:e=>{P.current=e},onHandleToolDone:e=>{F.current=e}}),(0,K.jsx)(xn,{open:O,onClose:()=>k(!1),settings:e,onUpdate:t,isMobile:b,autoWorktree:ne,onAutoWorktreeChange:ae,agentName:ce,onAgentNameChange:ue}),(0,K.jsx)(Ab,{open:A,onClose:()=>j(!1),repos:r,globalSkills:i,globalModules:a,onOpenRepo:ft,onSendSkill:Nt,onSendModule:Pt,onOpenSettings:()=>k(!0),isMobile:b})]})}(0,y.createRoot)(document.getElementById(`root`)).render((0,K.jsx)(v.StrictMode,{children:(0,K.jsx)(kD,{})}));
|
|
182
|
+
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+QE(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function pD(e,t){return fD.parse(e,t)}pD.options=pD.setOptions=function(e){return fD.setOptions(e),pD.defaults=fD.defaults,BT(pD.defaults),pD},pD.getDefaults=RT,pD.defaults=zT,pD.use=function(...e){return fD.use(...e),pD.defaults=fD.defaults,BT(pD.defaults),pD},pD.walkTokens=function(e,t){return fD.walkTokens(e,t)},pD.parseInline=fD.parseInline,pD.Parser=uD,pD.parser=uD.parse,pD.Renderer=cD,pD.TextRenderer=lD,pD.Lexer=sD,pD.lexer=sD.lex,pD.Tokenizer=oD,pD.Hooks=dD,pD.parse=pD,pD.options,pD.setOptions,pD.use,pD.walkTokens,pD.parseInline,uD.parse,sD.lex;function mD(e){if(typeof e==`function`&&(e={highlight:e}),!e||typeof e.highlight!=`function`)throw Error(`Must provide highlight function`);return typeof e.langPrefix!=`string`&&(e.langPrefix=`language-`),typeof e.emptyLangClass!=`string`&&(e.emptyLangClass=``),{async:!!e.async,walkTokens(t){if(t.type!==`code`)return;let n=hD(t.lang);if(e.async)return Promise.resolve(e.highlight(t.text,n,t.lang||``)).then(gD(t));let r=e.highlight(t.text,n,t.lang||``);if(r instanceof Promise)throw Error(`markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.`);gD(t)(r)},useNewRenderer:!0,renderer:{code(t,n,r){typeof t==`object`&&(r=t.escaped,n=t.lang,t=t.text);let i=hD(n),a=i?e.langPrefix+CD(i):e.emptyLangClass,o=a?` class="${a}"`:``;return t=t.replace(/\n$/,``),`<pre><code${o}>${r?t:CD(t,!0)}\n</code></pre>`}}}}function hD(e){return(e||``).match(/\S*/)[0]}function gD(e){return t=>{typeof t==`string`&&t!==e.text&&(e.escaped=!0,e.text=t)}}var _D=/[&<>"']/,vD=new RegExp(_D.source,`g`),yD=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,bD=new RegExp(yD.source,`g`),xD={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},SD=e=>xD[e];function CD(e,t){if(t){if(_D.test(e))return e.replace(vD,SD)}else if(yD.test(e))return e.replace(bD,SD);return e}pD.use(mD({langPrefix:`hljs language-`,highlight(e,t){return t&&um.getLanguage(t)?um.highlight(e,{language:t}).value:e}})),wp.addHook(`afterSanitizeAttributes`,e=>{e.tagName===`A`&&e.getAttribute(`href`)?.startsWith(`http`)&&(e.setAttribute(`target`,`_blank`),e.setAttribute(`rel`,`noopener noreferrer`))});function wD({content:e}){return(0,K.jsx)(`div`,{className:`docs-prose`,dangerouslySetInnerHTML:{__html:(0,v.useMemo)(()=>wp.sanitize(pD.parse(e,{gfm:!0})),[e])}})}function TD({repoName:e,filePath:t,content:n,loading:r,error:i,rawMode:a,isStarred:o,onToggleRaw:s,onToggleStar:c,onClose:l}){return(0,K.jsxs)(`div`,{className:`relative flex flex-1 min-h-0 w-full flex-col`,children:[(0,K.jsxs)(`div`,{className:`docs-header flex items-center gap-2 px-4 py-2 border-b flex-shrink-0`,children:[(0,K.jsxs)(`button`,{onClick:l,className:`docs-header-back flex items-center gap-1 text-[13px] transition-colors cursor-pointer`,children:[(0,K.jsx)(vt,{size:14,stroke:2.5}),`Back`]}),(0,K.jsxs)(`span`,{className:`docs-header-path flex-1 text-[13px] text-center truncate`,children:[e,` `,(0,K.jsx)(`span`,{className:`docs-header-slash`,children:`/`}),` `,t]}),(0,K.jsx)(`button`,{onClick:c,className:`docs-header-star transition-colors cursor-pointer ${o?`is-starred`:``}`,title:o?`Remove from favourites`:`Add to favourites`,children:o?(0,K.jsx)(hn,{size:15}):(0,K.jsx)(an,{size:15})}),(0,K.jsx)(`button`,{onClick:s,className:`docs-header-toggle rounded px-2 py-0.5 text-[13px] transition-colors cursor-pointer ${a?`is-active`:``}`,children:a?`Rendered`:`Raw`})]}),(0,K.jsxs)(`div`,{className:`chat-scroll flex-1 overflow-y-auto min-h-0`,children:[(0,K.jsx)(`div`,{className:`border-t-2 border-accent-8/40`}),r?(0,K.jsx)(`div`,{className:`flex items-center justify-center py-12`,children:(0,K.jsx)(Ft,{size:20,className:`animate-spin text-neutral-5`})}):i?(0,K.jsx)(`div`,{className:`rounded-md bg-error-10/50 px-3 py-2 text-[13px] text-error-4 mx-4 mt-4`,children:i}):n===null?null:a?(0,K.jsx)(`pre`,{className:`px-6 py-4 text-[14px] text-neutral-3 whitespace-pre-wrap`,style:{fontFamily:`'Inconsolata', monospace`},children:n}):(0,K.jsx)(`div`,{className:`mx-auto max-w-[720px] px-6 py-4`,children:(0,K.jsx)(wD,{content:n})})]})]})}function ED({docsRepoName:e,filePath:t,content:n,loading:r,error:i,rawMode:a,isStarred:o,onToggleRaw:s,onToggleStar:c,onClose:l,activeSessionId:u,inputBarRef:d,onSendInput:f,activePrompt:p,disabled:m,pendingFiles:h,onAddFiles:g,onRemoveFile:_,skillGroups:v,slashCommands:y,sessionInputs:b,onSessionInputChange:x,currentModel:S,onModelChange:C,isMobile:w,currentPermissionMode:T,onPermissionModeChange:E,moveToWorktree:D,worktreePath:O}){return(0,K.jsxs)(`div`,{className:`flex flex-1 flex-col overflow-hidden min-h-0`,children:[(0,K.jsx)(TD,{repoName:e,filePath:t,content:n,loading:r,error:i,rawMode:a,isStarred:o,onToggleRaw:s,onToggleStar:c,onClose:l}),u?(0,K.jsx)(IT,{ref:d,onSendInput:f,isWaiting:!!p,disabled:m,onEscape:l,pendingFiles:h,onAddFiles:g,onRemoveFile:_,skillGroups:v,slashCommands:y,placeholder:`Ask Claude about this doc, or request changes...`,initialValue:u?b[u]??``:``,onValueChange:e=>{u&&x(u,e)},currentModel:S,onModelChange:C,isMobile:w,currentPermissionMode:T,onPermissionModeChange:E,onMoveToWorktree:D,worktreePath:O},`docs-${u}`):(0,K.jsx)(`div`,{className:`px-4 py-3 border-t border-neutral-10`,children:(0,K.jsx)(`div`,{className:`rounded-lg bg-neutral-11 px-3 py-2 text-[15px] text-neutral-5 opacity-40`,children:`Start a session to edit this doc`})})]})}function DD({count:e,repoName:t,onExecute:n,onDiscard:r}){return(0,K.jsxs)(`div`,{className:`flex items-center justify-between border-t border-warning-8/50 bg-warning-11/30 px-4 py-2 flex-shrink-0`,children:[(0,K.jsxs)(`span`,{className:`text-[15px] text-warning-4`,children:[`⏸ `,e,` message`,e===1?``:`s`,` queued — waiting for`,` `,(0,K.jsx)(`span`,{className:`font-medium text-warning-3`,children:t}),` session to finish`]}),(0,K.jsxs)(`div`,{className:`flex gap-2`,children:[(0,K.jsx)(`button`,{onClick:n,className:`rounded px-2.5 py-1 text-[13px] bg-warning-9/30 hover:bg-warning-8/50 text-warning-3 transition-colors`,children:`Execute now`}),(0,K.jsx)(`button`,{onClick:r,className:`rounded px-2.5 py-1 text-[13px] text-neutral-4 hover:text-neutral-2 hover:bg-neutral-8/50 transition-colors`,children:`Discard`})]})]})}function OD({activeSessionId:e,messages:t,fontSize:n,isMobile:r,planningMode:i,activityLabel:a,tasks:o,disabled:s,hasFileChanges:c,diffPanelOpen:l,onOpenDiffPanel:u,activePrompt:d,promptQueueSize:f,sendPromptResponse:p,activeTentativeCount:m,activeRepoName:h,onExecuteTentative:g,onDiscardTentative:_,inputBarRef:v,onSendInput:y,pendingFiles:b,onAddFiles:x,onRemoveFile:S,skillGroups:C,slashCommands:w,sessionInputs:T,onSessionInputChange:E,currentModel:D,onModelChange:O,availableModels:k,hasUserMessages:A,useWorktree:j,onWorktreeChange:M,currentPermissionMode:N,onPermissionModeChange:P,moveToWorktree:F,worktreePath:I,openCodeConnected:L,claudeDisabled:R}){let z=L===!1,ee=R||z;return(0,K.jsxs)(`div`,{className:`flex flex-1 flex-col overflow-hidden min-h-0`,children:[(0,K.jsxs)(`div`,{className:`relative flex-1 min-h-0 flex flex-col`,children:[(0,K.jsx)(km,{messages:t,fontSize:n,disabled:s,planningMode:i,activityLabel:ee?void 0:a,isMobile:r}),(0,K.jsx)(hT,{tasks:o}),R&&(0,K.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center z-10 bg-neutral-12/90`,children:(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-3 text-center px-6 max-w-md`,children:[(0,K.jsx)(`div`,{className:`text-[15px] font-medium text-neutral-3`,children:`Claude Code is disabled`}),(0,K.jsx)(`p`,{className:`text-[13px] text-neutral-5 leading-relaxed`,children:`Re-enable Claude Code from the connection status menu to continue this session.`})]})}),z&&!R&&(0,K.jsx)(`div`,{className:`absolute inset-0 flex items-center justify-center z-10 bg-neutral-12/90`,children:(0,K.jsxs)(`div`,{className:`flex flex-col items-center gap-3 text-center px-6 max-w-md`,children:[(0,K.jsx)(`div`,{className:`text-[15px] font-medium text-neutral-3`,children:`OpenCode is not connected`}),(0,K.jsxs)(`p`,{className:`text-[13px] text-neutral-5 leading-relaxed`,children:[`Install OpenCode to use this session. Visit`,` `,(0,K.jsx)(`a`,{href:`https://opencode.ai`,target:`_blank`,rel:`noopener noreferrer`,className:`text-primary-5 hover:underline`,children:`opencode.ai`}),` `,`and run `,(0,K.jsx)(`code`,{className:`bg-neutral-10 px-1.5 py-0.5 rounded text-[12px]`,children:`opencode serve`}),` to start the server.`]})]})}),c&&!l&&(0,K.jsxs)(`button`,{className:`absolute top-3 right-3 z-10 flex items-center gap-1.5 rounded-lg bg-primary-8 px-3 py-1.5 text-[13px] font-medium text-neutral-1 shadow-lg backdrop-blur-sm transition-colors hover:bg-primary-7`,onClick:u,title:`Review code changes (Ctrl+Shift+D)`,children:[(0,K.jsx)(Dt,{size:15}),`Diff view`]})]}),d&&(0,K.jsx)(gT,{options:d.options,question:d.question,multiSelect:d.multiSelect,promptType:d.promptType,questions:d.questions,approvePattern:d.approvePattern,onSelect:p,isMobile:r},d.requestId),f>1&&(0,K.jsxs)(`div`,{className:`px-3 py-1 text-[12px] text-neutral-5 bg-neutral-11 border-t border-neutral-10`,children:[f-1,` more pending`]}),m>0&&(0,K.jsx)(DD,{count:m,repoName:h,onExecute:g,onDiscard:_}),(0,K.jsx)(IT,{ref:v,onSendInput:y,isWaiting:!!d,disabled:s||ee,placeholder:R?`Claude Code is disabled`:z?`OpenCode is not connected`:void 0,onEscape:()=>{},pendingFiles:b,onAddFiles:x,onRemoveFile:S,skillGroups:C,slashCommands:w,initialValue:T[e]??``,onValueChange:t=>{E(e,t)},currentModel:D,onModelChange:O,availableModels:k,isMobile:r,showWorktreeToggle:!A,useWorktree:j,onWorktreeChange:M,currentPermissionMode:N,onPermissionModeChange:P,onMoveToWorktree:F,worktreePath:I},e??`no-session`)]})}function kD(){let{settings:e,updateSettings:t}=w(),{groups:n,repos:r,globalSkills:i,globalModules:a,ghMissing:o,refresh:s}=T(e.token),{sessions:c,rename:l,remove:u,refresh:d}=we(e.token),{queues:f,addToQueue:p,clearQueue:m}=Ve(),{sessionId:h,view:g,navigate:_}=Ie(),y=Je(),b=Xe(),[x,S]=(0,v.useState)(!1),[C,E]=(0,v.useState)(()=>h??localStorage.getItem(`codekin-active-session`)),D=(0,v.useCallback)(e=>{E(e),g!==`orchestrator`&&(e?_(`/s/${e}`):_(`/`,!0))},[_,g]),[O,k]=(0,v.useState)(!e.token),[A,j]=(0,v.useState)(!1),[M,N]=(0,v.useState)(!1),P=(0,v.useRef)(()=>{}),F=(0,v.useRef)(()=>{}),[I,L]=(0,v.useState)(!1),[R,z]=(0,v.useState)(0),[ee,B]=(0,v.useState)(null),V=(0,v.useRef)(null),H=(0,v.useRef)(null),te=(0,v.useRef)(()=>{}),[ne,re]=(0,v.useState)(()=>localStorage.getItem(`codekin-use-worktree`)===`true`),ie=(0,v.useRef)(ne);(0,v.useEffect)(()=>{ie.current=ne},[ne]);let ae=(0,v.useCallback)(e=>{re(e),localStorage.setItem(`codekin-use-worktree`,String(e))},[]),[oe,se]=(0,v.useState)(!1);(0,v.useEffect)(()=>{e.token&&le(e.token).then(se).catch(()=>{})},[e.token]);let[ce,ue]=(0,v.useState)(`Joe`);(0,v.useEffect)(()=>{e.token&&pe(e.token).then(ue).catch(()=>{})},[e.token]);let de=(0,v.useRef)(localStorage.getItem(`claude-permission-mode`)||`acceptEdits`),fe=(0,v.useRef)(localStorage.getItem(`codekin-provider`)||`claude`),me=(0,v.useRef)(null),[he,ge]=(0,v.useState)({}),{connState:_e,messages:ve,tasks:be,planningMode:xe,isProcessing:Se,thinkingSummary:Ce,waitingSessions:Te,activePrompt:Ee,promptQueueSize:De,joinSession:Oe,createSession:ke,sendInput:Ae,sendPromptResponse:je,leaveSession:Me,clearMessages:U,restoreSession:Ne,currentModel:W,setModel:Le,send:Re,disconnect:ze,reconnect:Be,currentPermissionMode:He,setPermissionMode:We,moveToWorktree:Ge}=Pe({token:e.token,onSessionCreated:e=>{if(D(e),d(),H.current){let e=H.current;H.current=null,setTimeout(()=>te.current(e),500)}},onSessionJoined:e=>{D(e)},onSessionRenamed:()=>{d()},onSessionsUpdated:()=>{d(),z(e=>e+1)},onError:e=>{V.current&&clearTimeout(V.current),B(e),V.current=setTimeout(()=>B(null),5e3),e.toLowerCase().includes(`not found`)&&D(null)},onRawMessage:e=>{e.type===`diff_result`||e.type===`diff_error`?P.current(e):e.type===`tool_done`&&(F.current(e.toolName,e.summary),(e.toolName===`Edit`||e.toolName===`Write`)&&L(!0))}}),Ke=(0,v.useCallback)(e=>{de.current=e,We(e)},[We]),[qe]=(0,v.useState)(localStorage.getItem(`codekin-provider`)||`claude`),[Ye,Ze]=(0,v.useState)([]),[Qe,$e]=(0,v.useState)(null),[et,nt]=(0,v.useState)(!1),[at,G]=(0,v.useState)(!1),ot=(0,v.useRef)(void 0),st=c.find(e=>e.id===C)?.provider??qe,ct=st===`opencode`?Ye:wT;(0,v.useEffect)(()=>{!e.token||at||ye(e.token).then(e=>{$e(e.models.length>0)}).catch(()=>{$e(!1)})},[e.token,at]);let lt=(0,v.useRef)(W);(0,v.useEffect)(()=>{lt.current=W},[W]);let ut=st===`opencode`?c.find(e=>e.id===C)?.workingDir:void 0;(0,v.useEffect)(()=>{if(st!==`opencode`||!e.token)return;let t=ut&&ut!==ot.current,n=lt.current&&Ye.some(e=>e.id===lt.current);if(!t&&Ye.length>0&&n)return;let r=ut;ye(e.token,r).then(e=>{let t=e.models.map(e=>({id:`${e.providerID}/${e.id}`,label:`${e.name} (${e.providerName})`}));if(Ze(t),$e(t.length>0),ot.current=r,!(lt.current&&t.some(e=>e.id===lt.current))){let n=localStorage.getItem(`opencode-model`);if(n&&t.some(e=>e.id===n))Le(n);else{let[n,r]=Object.entries(e.defaults)[0]??[];n&&r?Le(`${n}/${r}`):t.length>0&&Le(t[0].id)}}}).catch(()=>{$e(!1)})},[st,e.token,Ye.length,Le,ut]),(0,v.useEffect)(()=>{L(!1)},[C]),(0,v.useEffect)(()=>{st===`claude`&&(wT.some(e=>e.id===W)||Le(wT[0].id))},[st,W,Le]);let{activeWorkingDir:dt,handleOpenSession:ft,handleSelectSession:pt,handleDeleteSession:mt,handleSelectRepo:ht,handleDeleteRepo:gt,handleNewSessionForRepo:_t,handleNewSessionFromArchive:vt}=Ue({sessions:c,repos:r,activeSessionId:C,setActiveSessionId:D,joinSession:Oe,leaveSession:Me,clearMessages:U,wsCreateSession:ke,removeSession:u,pendingContextRef:H,useWorktreeRef:ie,permissionModeRef:de,providerRef:fe}),yt=dt?r.find(e=>e.workingDir===dt)??null:null,bt=(0,v.useMemo)(()=>[...i,...yt?.skills??[]],[i,yt?.skills]),xt=(0,v.useMemo)(()=>tt(bt),[bt]),St=(0,v.useCallback)(e=>{Le(e),st===`opencode`&&localStorage.setItem(`opencode-model`,e)},[Le,st]),Ct=(0,v.useCallback)((e,t)=>{switch(e){case`/clear`:case`/reset`:case`/new`:Me(),U(),dt&&_t();break;case`/compact`:Ae(`Please compact the conversation context to save tokens while preserving important context.`);break;case`/model`:t?St(t):Ae(`Current model: ${W??`default`}. To change, use the model selector in the input bar.`);break;case`/help`:Ae(`[Codekin] Available commands: /clear, /compact, /model, /cost, /status, /help. Skills: type / to see autocomplete.`);break;default:Ae(`[Codekin] Command ${e} is not available in the web UI.`);break}},[Me,U,dt,_t,Ae,W,St]),{handleSend:wt,handleExecuteTentative:Tt,handleDiscardTentative:Et,tentativeMessages:Dt,activeTentativeCount:Ot,pendingFiles:kt,addFiles:At,removeFile:jt,uploadStatus:Mt}=rt({token:e.token,activeSessionId:C,activeWorkingDir:dt,sessions:c,allSkills:bt,sendInput:Ae,onBuiltinCommand:Ct,tentativeQueues:f,addToQueue:p,clearQueue:m,docsContext:{isOpen:y.isOpen,selectedFile:y.selectedFile,repoWorkingDir:y.repoWorkingDir},queueEnabled:oe});(0,v.useEffect)(()=>{te.current=Ae},[Ae]),(0,v.useEffect)(()=>{function e(e){(e.metaKey||e.ctrlKey)&&e.key===`k`&&(e.preventDefault(),j(e=>!e)),(e.metaKey||e.ctrlKey)&&e.shiftKey&&e.key===`D`&&(e.preventDefault(),N(e=>!e))}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),(0,v.useEffect)(()=>{C?localStorage.setItem(`codekin-active-session`,C):localStorage.removeItem(`codekin-active-session`)},[C]);let Nt=(0,v.useRef)(!1);(0,v.useEffect)(()=>{_e===`disconnected`&&(Nt.current=!1)},[_e]),(0,v.useEffect)(()=>{Nt.current||!C||_e!==`connected`||(Nt.current=!0,Oe(C))},[C,_e,Oe]),(0,v.useEffect)(()=>{h!==C&&(h?(U(),Me(),Oe(h),E(h)):(U(),Me(),E(null)))},[h]),(0,v.useEffect)(()=>{C&&window.location.pathname===`/`&&_(`/s/${C}`,!0)},[]),Fe(()=>{Ne()}),(0,v.useEffect)(()=>{e.token||k(!0)},[e.token]),(0,v.useEffect)(()=>{y.isOpen&&y.close()},[C]);let Pt=(0,v.useCallback)(e=>{me.current?.insertText(e+` `)},[]),Ft=(0,v.useCallback)(e=>{Ae(`[Module: ${e.name}]\n\n${e.content}`)},[Ae]),It=[{label:`Global`,skills:i},...yt&&yt.skills.length>0?[{label:yt.name,skills:yt.skills}]:[]],Lt=it(ve,Se,Ce),Rt=(0,v.useMemo)(()=>{if(!y.repoWorkingDir)return``;let e=y.repoWorkingDir.replace(/\/+$/,``).split(`/`);return e[e.length-1]||y.repoWorkingDir},[y.repoWorkingDir]),zt=(0,v.useRef)(null),Bt=(0,v.useCallback)(()=>{_(`/orchestrator`),zt.current&&(U(),Me(),Oe(zt.current))},[_,U,Me,Oe]),Vt=(0,v.useCallback)(e=>{zt.current=e,U(),Me(),Oe(e)},[U,Me,Oe]),Ht=(0,v.useCallback)(t=>{y.pickerOpen&&y.pickerRepoDir===t?y.closePicker():y.openPicker(t,e.token)},[y,e.token]),Ut=(0,v.useCallback)(t=>{y.pickerRepoDir&&y.openFile(y.pickerRepoDir,t,e.token)},[y,e.token]);(0,v.useEffect)(()=>{document.documentElement.dataset.theme=e.theme},[e.theme]);let Wt=(0,v.useCallback)(()=>{et?(nt(!1),Be()):(nt(!0),ze())},[et,ze,Be]),Gt=(0,v.useCallback)(()=>{at?(G(!1),e.token&&ye(e.token).then(e=>{let t=e.models.map(e=>({id:`${e.providerID}/${e.id}`,label:`${e.name} (${e.providerName})`}));Ze(t),$e(t.length>0)}).catch(()=>{$e(!1)})):(G(!0),$e(!1),st===`opencode`&&C&&Me())},[at,e.token,st,C,Me]),Kt=c.find(e=>e.id===C),qt=Kt?.name??null,Jt=yt?.name??dt?.split(`/`).pop()??null,Yt=(0,v.useCallback)((e,t)=>{ge(n=>({...n,[e]:t}))},[]);return(0,K.jsxs)(`div`,{className:`flex h-full bg-neutral-7`,children:[(0,K.jsx)(Wm,{sessions:c,activeSessionId:C,activeWorkingDir:dt,waitingSessions:Te,tentativeQueues:f,groups:n,globalModules:a,activeRepo:yt,token:e.token,theme:e.theme,fontSize:e.fontSize,connState:_e,claudeDisabled:et,openCodeConnected:Qe,openCodeDisabled:at,onToggleClaude:Wt,onToggleOpenCode:Gt,view:g,archiveRefreshKey:R,onSelectSession:e=>{y.close(),g===`orchestrator`&&_(`/s/${e}`),pt(e)},onDeleteSession:mt,onRenameSession:l,onNewSession:_t,onNewSessionFromArchive:vt,onOpenSession:ft,onSelectRepo:ht,onDeleteRepo:gt,onSettingsOpen:()=>k(!0),onUpdateTheme:e=>t({theme:e}),onSendModule:Ft,agentName:ce,onNavigateToWorkflows:()=>_(`/workflows`),onNavigateToOrchestrator:()=>Bt(),onBrowseDocs:Ht,docsPicker:{open:y.pickerOpen,repoDir:y.pickerRepoDir,files:y.pickerFiles,loading:y.pickerLoading,onSelect:Ut,onClose:y.closePicker,starredDocs:y.starredDocs},mobile:{isMobile:b,mobileOpen:x,onMobileClose:()=>S(!1)}}),(0,K.jsxs)(`div`,{className:`terminal-area flex flex-1 flex-col overflow-hidden bg-neutral-12`,children:[b&&(0,K.jsx)(Gm,{repoName:Jt,sessionName:qt,onMenuOpen:()=>S(!0),onNewSession:_t,onSettingsOpen:()=>k(!0),activeRepo:yt}),ee&&(0,K.jsx)(`div`,{className:`border-b border-error-9/50 bg-error-10/50 px-4 py-2 text-[15px] text-error-5`,children:ee}),Mt&&(0,K.jsx)(`div`,{className:`border-b border-primary-9/50 bg-primary-10/50 px-4 py-2 text-[15px] text-primary-5`,children:Mt}),g===`orchestrator`?(0,K.jsx)(LT,{token:e.token,onOrchestratorSessionReady:Vt,sessionJoined:!!C,activeSessionId:C,messages:[...ve,...Dt],fontSize:e.fontSize+(b?1:0),isMobile:b,planningMode:xe,activityLabel:Lt,tasks:be,activePrompt:Ee,sendPromptResponse:je,inputBarRef:me,onSendInput:wt,pendingFiles:kt,onAddFiles:At,onRemoveFile:jt,skillGroups:It,slashCommands:xt,currentModel:W,onModelChange:St,currentPermissionMode:He,onPermissionModeChange:Ke,disabled:!e.token,agentName:ce}):g===`workflows`?(0,K.jsx)(sg,{token:e.token,onNavigateToSession:e=>{U(),Me(),Oe(e),_(`/s/${e}`)}}):y.isOpen?(0,K.jsx)(ED,{docsRepoName:Rt,filePath:y.selectedFile,content:y.content,loading:y.loading,error:y.error,rawMode:y.rawMode,isStarred:y.isCurrentFileStarred,onToggleRaw:y.toggleRawMode,onToggleStar:y.toggleStarCurrentFile,onClose:y.close,activeSessionId:C,inputBarRef:me,onSendInput:wt,activePrompt:Ee,disabled:!e.token,pendingFiles:kt,onAddFiles:At,onRemoveFile:jt,skillGroups:It,slashCommands:xt,sessionInputs:he,onSessionInputChange:Yt,currentModel:W,onModelChange:St,isMobile:b,currentPermissionMode:He,onPermissionModeChange:Ke,moveToWorktree:Ge,worktreePath:Kt?.worktreePath}):C?(0,K.jsx)(OD,{activeSessionId:C,messages:[...ve,...Dt],fontSize:e.fontSize+(b?1:0),isMobile:b,planningMode:xe,activityLabel:Lt,tasks:be,disabled:!e.token,hasFileChanges:I,diffPanelOpen:M,onOpenDiffPanel:()=>N(!0),activePrompt:Ee,promptQueueSize:De,sendPromptResponse:je,activeTentativeCount:Ot,activeRepoName:yt?.name??dt?.split(`/`).pop()??`this repo`,onExecuteTentative:()=>Tt(C),onDiscardTentative:()=>Et(C),inputBarRef:me,onSendInput:wt,pendingFiles:kt,onAddFiles:At,onRemoveFile:jt,skillGroups:It,slashCommands:xt,sessionInputs:he,onSessionInputChange:Yt,currentModel:W,onModelChange:St,availableModels:ct,hasUserMessages:ve.some(e=>e.type===`user`),useWorktree:ne,onWorktreeChange:ae,currentPermissionMode:He,onPermissionModeChange:Ke,moveToWorktree:Ge,worktreePath:Kt?.worktreePath,openCodeConnected:st===`opencode`?at?!1:Qe:null,claudeDisabled:st!==`opencode`&&et}):(0,K.jsx)(jb,{groups:n,token:e.token,ghMissing:o,onOpen:ft,onRefreshRepos:s})]}),C&&(0,K.jsx)(fT,{isOpen:M,onClose:()=>N(!1),send:Re,onHandleMessage:e=>{P.current=e},onHandleToolDone:e=>{F.current=e}}),(0,K.jsx)(xn,{open:O,onClose:()=>k(!1),settings:e,onUpdate:t,isMobile:b,autoWorktree:ne,onAutoWorktreeChange:ae,agentName:ce,onAgentNameChange:ue}),(0,K.jsx)(Ab,{open:A,onClose:()=>j(!1),repos:r,globalSkills:i,globalModules:a,onOpenRepo:ft,onSendSkill:Pt,onSendModule:Ft,onOpenSettings:()=>k(!0),isMobile:b})]})}(0,y.createRoot)(document.getElementById(`root`)).render((0,K.jsx)(v.StrictMode,{children:(0,K.jsx)(kD,{})}));
|